From dd36c0742a08321da9fd9283efd235967a606c3d Mon Sep 17 00:00:00 2001 From: denz Date: Thu, 26 May 2016 16:36:15 +0900 Subject: [PATCH] update minified file. --- web/src/main/webapp/lib/js/pinpoint-component.min.js | 8 ++++---- web/src/main/webapp/lib/js/pinpoint-component.min.js.map | 2 +- web/src/main/webapp/lib/js/time-slider.min.js | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/web/src/main/webapp/lib/js/pinpoint-component.min.js b/web/src/main/webapp/lib/js/pinpoint-component.min.js index 38d475ac3..6a61a0fe2 100644 --- a/web/src/main/webapp/lib/js/pinpoint-component.min.js +++ b/web/src/main/webapp/lib/js/pinpoint-component.min.js @@ -1,6 +1,6 @@ /*! pinpoint - v1.6.0 */ -!function(a,b){"use strict";var c=function(a,c){this.$snap=b("#"+a),this.snap=Snap("#"+a),this._init(c),this._initControlClass(),this._addInnerEventListener()};c.prototype._init=function(a){this.groups={},this._aListener={inEvent:[],outEvent:[],clickEvent:[],selectTime:[],changeSliderTimeSeries:[],changeSelectionZone:[]},this.opt={duration:300,xAxisTicks:5,eventZoneHeight:30,headerZoneHeight:20,stateLineThickness:4,minSliderTimeSeries:6e3,maxSelectionTimeSeries:1728e5,headerTextTopPadding:10,selectionPointRadius:4},this.opt.minSliderTimeSeries=1e3*(this.opt.xAxisTicks+1);var b;for(b in a)this.opt[b]=a[b];this.oEventData=new c.EventData(this.opt.eventData||[]),this._checkOffset()},c.prototype._initControlClass=function(a){this.oPositionManager=new c.PositionManager({width:this.opt.width,selectTime:this.opt.selectTime,xAxisTicks:this.opt.xAxisTicks,handleTimeSeries:this.opt.handleTimeSeries,sliderTimeSeries:this.opt.timeSeries,minSliderTimeSeries:this.opt.minSliderTimeSeries,maxSelectionTimeSeries:this.opt.maxSelectionTimeSeries});var b=this.opt.height-this.opt.headerZoneHeight-this.opt.eventZoneHeight;this.oLoading=new c.LoadingIndicator(this,this.getGroup("loading",c.GROUP_TYPE.TOP_BASE,c.oDrawOrder.loading),{width:this.opt.width,height:this.opt.height,duration:2e3}),this.oBackground=new c.Background(this,this.getGroup("background",c.GROUP_TYPE.CONTENT_BASE,c.oDrawOrder.background),{top:0,left:0,width:this.opt.width,height:b,duration:this.opt.duration}),this.oStateLine=new c.StateLine(this,this.getGroup("state-line",c.GROUP_TYPE.TOP_BASE,c.oDrawOrder["state-line"]),{width:this.opt.width,duration:this.opt.duration,topLineY:this.opt.headerZoneHeight,thickness:this.opt.stateLineThickness,timeSeries:this.opt.timeSeries,bottomLineY:this.opt.height-this.opt.eventZoneHeight}),this.oSelectionManager=new c.SelectionManager(this,{margin:this.opt.left,height:this.opt.height,duration:this.opt.duration,handleSrc:this.opt.handleSrc,eventZoneHeight:this.opt.eventZoneHeight,headerZoneHeight:this.opt.headerZoneHeight,contentZoneHeight:b,selectionPointRadius:this.opt.selectionPointRadius}),this.oXAxis=new c.XAxis(this,this.getGroup("x-axis",c.GROUP_TYPE.TOP_BASE,c.oDrawOrder["x-axis"]),{endY:this.opt.height-this.opt.eventZoneHeight,width:this.opt.width,textY:this.opt.headerTextTopPadding,startY:this.opt.headerZoneHeight,duration:this.opt.duration}),this.oEvents=new c.Events(this,this.getGroup("events",c.GROUP_TYPE.BOTTOM_BASE,c.oDrawOrder.events),{duration:this.opt.duration}),this.oLoading.hide()},c.prototype.getGroup=function(a,b,c){if(this.groups[a])return this.groups[a];var d=this.groups[a]=this.snap.g().attr({"class":a,"data-order":c});return this._setTransform(d,b),this._sortGroup(d,c),this.groups[a]},c.prototype._setTransform=function(a,b){switch(b){case c.GROUP_TYPE.TOP_BASE:break;case c.GROUP_TYPE.CONTENT_BASE:a.attr({transform:"translate(0, "+this.opt.headerZoneHeight+")"});break;case c.GROUP_TYPE.BOTTOM_BASE:a.attr({transform:"translate(0, "+(this.opt.height-this.opt.eventZoneHeight)+")"})}},c.prototype._sortGroup=function(a,b){for(var c=this.snap.selectAll("g"),d=null,e=c.length-1;e>=0;e--)c[e]!=a&&b=0;b--)this._aRawData.unshift(a[b]),this._oHash[this.makeID(a[b])]=a[b];var e=this._getAfterDataBoundary(a,d);for(b=e;bd)for(b=d;be;e++){var f=a[e].eventTimestamp;if(!(c>f))break;b=e}return b},c.EventData.prototype._getAfterDataBoundary=function(a,b){var c=Number.MAX_SAFE_INTEGER,d=b+1,e=a.length;if(e>d)for(var f=this._aRawData[this._aRawData.length-1].eventTimestamp,g=d;e>g;g++){var h=a[g].eventTimestamp;if(h>f){c=g;break}}return c}}(window,jQuery),function(a,b){var c={ID_POSTFIX:"+event-circle",ID_SPLITER:"+"},d=a.TimeSlider;d.Events=function(a,b,c){this.timeSlider=a,this.group=b,this._oEventData=a.oEventData,this._init(c),this._addEventElements(),this._addEvents()},d.Events.prototype._init=function(a){this._oEventGroupElementHash={},this.opt={y:4,barLength:4,gapBarNCircle:2,circleRadius:8};for(var b in a)this.opt[b]=a[b];this._filterShadow=this.timeSlider.snap.filter(Snap.filter.shadow(1,1,1,"#000",.3))},d.Events.prototype._addEventElements=function(){for(var a=this._oEventData.count(),b=0;a>b;b++)this._addEventElement(this._oEventData.getDataByIndex(b),!0)},d.Events.prototype._addEventElement=function(a,b){var c=this._makeElement(a);return this.group[b?"append":"prepend"](c),this.timeSlider.oPositionManager.isInSliderTimeSeries(a.eventTimestamp)===!1&&this.hide(c),c},d.Events.prototype._makeID=function(a){return this._oEventData.makeID(a)+c.ID_POSTFIX},d.Events.prototype._makeElement=function(a){var b=this.opt,c=a.eventTimestamp,d=this._makeID(a),e=this.group.g().attr({"data-id":d,"data-time":c,transform:"translate("+this.timeSlider.oPositionManager.getPositionFromTime(c)+",0)"}).add(this.timeSlider.snap.line(0,b.y,0,b.y+b.barLength),this.timeSlider.snap.circle(0,b.y+b.circleRadius+b.gapBarNCircle+b.barLength,b.circleRadius).attr({fill:TimeSlider.EventColor[a.eventTypeCode],"class":"event",filter:this._filterShadow,"data-time":c}));return this._oEventGroupElementHash[d]=e,e},d.Events.prototype._addEvents=function(){var a=this;this.group.mouseover(function(b,c,d){a._fireEvent("inEvent",b,c,d)}),this.group.mouseout(function(b,c,d){a._fireEvent("outEvent",b,c,d)}),this.group.click(function(b,c,d){a._fireEvent("clickEvent",b,c,d)})},d.Events.prototype._fireEvent=function(a,b,d,e){this.timeSlider.fireEvent(a,[d,e,this._oEventData.getDataByKey(b.srcElement.parentNode.getAttribute("data-id").split(c.ID_SPLITER)[0])])},d.Events.prototype.reset=function(){var a=this;for(var b in this._oEventGroupElementHash){var d=this._oEventGroupElementHash[b],e=this._oEventData.getDataByKey(b.split(c.ID_SPLITER)[0]).eventTimestamp;a.timeSlider.oPositionManager.isInSliderTimeSeries(e)?(a.show(d),function(b,c){b.animate({transform:"translate("+c+",0)"},a.opt.duration)}(d,this.timeSlider.oPositionManager.getPositionFromTime(e))):!function(b,c){b.animate({transform:"translate("+c+",0)"},a.opt.duration,function(){a.hide(b)})}(d,a.timeSlider.oPositionManager.isBeforeSliderStartTime(e)?0:a.timeSlider.oPositionManager.getSliderEndPosition())}},d.Events.prototype.changeData=function(){var a=this.group.selectAll("g");if(0===a.length)return void this._addEventElements();var b,c,d,e=0,f=this._oEventData.count(),g=a.length,h=a[g-1];for(b=0;g>b;b++){var i=a[b],j=parseInt(i.attr("data-time"));for(c=e;f>c;c++){if(d=this._oEventData.getDataByIndex(c),!(d.eventTimestampe;e++){d=this._oEventData.getDataByIndex(e);var k=this._makeElement(d);h.after(k),h=k}this.reset()},d.Events.prototype.emptyData=function(){for(var a in this._oEventGroupElementHash)this._oEventGroupElementHash[a].remove();this._oEventGroupElementHash={}},d.Events.prototype.show=function(a){a.attr("display","block")},d.Events.prototype.hide=function(a){a.attr("display","none")}}(window,jQuery),function(a,b){var c={HANDLER_IMAGE_WIDTH:30,HANDLER_IMAGE_HEIGHT:18},d=a.TimeSlider;d.Handler=function(a,b,d,e,f,g){this.timeSlider=a,this.group=b,this.opt=d,this._previousX=d.x,this._handleSrc=d.handleSrc||c.NORMAL_IMG,this._handleDownSrc=this._getHandleDownSrc(),this.callbackStart=e,this.callbackDrag=f,this.callbackEnd=g,this._addElements(),this.setX(d.x),this.addEvent()},d.Handler.prototype._getHandleDownSrc=function(){var a=this._handleSrc.lastIndexOf(".");return this._handleSrc.substring(0,a)+"_down"+this._handleSrc.substring(a)},d.Handler.prototype._addElements=function(){this.handlerGrip=this.timeSlider.snap.circle(0,3,7).attr({filter:this.timeSlider.snap.filter(Snap.filter.shadow(0,0,4,"#000",.5))}),this.handlerGroup=this.group.g(),this.handlerGroup.add(this.timeSlider.snap.line(0,0,0,this.opt.height),this.handlerGrip)},d.Handler.prototype.addEvent=function(a){var b=this,c=-1;this.handlerGrip.mousedown(function(a,b,c){a.stopPropagation()}),this.handlerGrip.click(function(a,b,c){a.stopPropagation()}),this.handlerGrip.drag(function(a,d,e,f,g){var h=e-b.opt.margin;b._isInRestirctionZone(h)!==!1&&(b.handlerGroup.attr({transform:"translate("+h+", 0)"}),c=h,b.callbackDrag(h))},function(a,c,d){d.stopPropagation(),b.callbackStart(a-b.opt.margin)},function(a){a.stopPropagation(),b._previousX!==c&&-1!==c?(b.callbackEnd(!0,c),b._previousX=c):b.callbackEnd(!1)})},d.Handler.prototype.setX=function(a){this.handlerGroup.animate({transform:"translate("+a+", 0)"},this.opt.duration,mina.easeout)},d.Handler.prototype._isInRestirctionZone=function(a){return!(a<=this.opt.zone[0]||a>=this.opt.zone[1])},d.Handler.prototype.setZone=function(a,b){this.opt.zone=[a,b]},d.Handler.prototype.setPositionAndZone=function(a,b){this.setX(a),this.callbackDrag(a),this.setZone(b[0],b[1])}}(window,jQuery),function(a,b){var c={SIZE:30},d=a.TimeSlider;d.LoadingIndicator=function(a,b,c){this.timeSlider=a,this.opt=c,this.group=b,this._bRunn=!1,this._addElements(),this.show()},d.LoadingIndicator.prototype._addElements=function(){var a=c.SIZE/2,b=this.opt.width/2-a,d=this.opt.height/2-a;this.group.add(this.timeSlider.snap.rect(0,0,this.opt.width,this.opt.height)),this.elClockwiseBox=this.timeSlider.snap.rect(b,d,c.SIZE,c.SIZE).attr({stroke:"rgba(197, 197, 197, .9)"}),this.elAnitclockwiseBox=this.timeSlider.snap.rect(b,d,c.SIZE,c.SIZE).attr({stroke:"rgba(239, 246, 105, .9)"}),this.group.add(this.elClockwiseBox,this.elAnitclockwiseBox)},d.LoadingIndicator.prototype.show=function(){this.group.attr("display","block"),this._bRunn=!0,this._animate(this.elClockwiseBox,0,360,mina.easeout),this._animate(this.elAnitclockwiseBox,45,-315,mina.easein)},d.LoadingIndicator.prototype._animate=function(a,b,c,d){var e=this;Snap.animate(b,c,function(b){a.attr("transform","rotate("+b+"deg)")},e.opt.duration,d,function(){e._bRunn===!0&&e._animate(a,c,b,d)})},d.LoadingIndicator.prototype.hide=function(){this.group.attr("display","none"),this._bRunn=!1}}(window,jQuery),function(a,b){var c={xAxisTicks:5},d=a.TimeSlider;d.PositionManager=function(a){this._width=a.width,this._minSliderTimeSeries=a.minSliderTimeSeries,this._maxSelectionTimeSeries=a.maxSelectionTimeSeries,this._initInnerVar(),this._setSliderTimeSeries(a.sliderTimeSeries[0],a.sliderTimeSeries[1]),this._initSelectionTimeSeries(a.handleTimeSeries||[]),this._resetSelectionByTime(),this._xAxisTicks=a.xAxisTicks||c.xAxisTicks,this.setSelectTime(a.selectTime)},d.PositionManager.prototype._initInnerVar=function(){this._aSelectionTimeSeries=[],this._aSelectionPosition=[]},d.PositionManager.prototype._setSliderTimeSeries=function(a,b){this._startTime=a,this._endTime=b,this._calcuTimePerPoint()},d.PositionManager.prototype._initSelectionTimeSeries=function(a){2!=a.length&&(a=[this._startTime,this._endTime]),a[1]-a[0]>this._maxSelectionTimeSeries&&(a[0]=a[1]-this._maxSelectionTimeSeries),this._setSelectionTimeSeries(a[0],a[1])},d.PositionManager.prototype._resetSelectionByPosition=function(){this._setSelectionTimeSeries(this.getTimeFromPosition(this._aSelectionPosition[0]),this.getTimeFromPosition(this._aSelectionPosition[1]))},d.PositionManager.prototype._setSelectionTimeSeries=function(a,b){this._aSelectionTimeSeries[0]=null===a?this._aSelectionTimeSeries[0]:a,this._aSelectionTimeSeries[1]=null===b?this._aSelectionTimeSeries[1]:b},d.PositionManager.prototype._resetSelectionByTime=function(){this._setSelectionPosition(this.getPositionFromTime(this._aSelectionTimeSeries[0]),this.getPositionFromTime(this._aSelectionTimeSeries[1]))},d.PositionManager.prototype._setSelectionPosition=function(a,b){this._aSelectionPosition[0]=null===a?this._aSelectionPosition[0]:a,this._aSelectionPosition[1]=null===b?this._aSelectionPosition[1]:b},d.PositionManager.prototype.isInMaxSelectionTimeSeries=function(a,b){return b-a<=this._maxSelectionTimeSeries},d.PositionManager.prototype.getNewSelectionTimeSeriesFromStart=function(a){return[a,a+this._maxSelectionTimeSeries]},d.PositionManager.prototype.getNewSelectionTimeSeriesFromEnd=function(a){return[a-this._maxSelectionTimeSeries,a]},d.PositionManager.prototype.isBeforeSliderStartTime=function(a){return athis._endTime},d.PositionManager.prototype.getSliderEndTime=function(){return this._endTime},d.PositionManager.prototype.setWidth=function(a){this._width=a,this._calcuTimePerPoint(),this._reset()},d.PositionManager.prototype.getSliderEndPosition=function(){return this._width},d.PositionManager.prototype.getSliderStartTimeStr=function(){return this._formatDate(new Date(this._startTime))},d.PositionManager.prototype.getSliderEndTimeStr=function(){return this._formatDate(new Date(this._endTime))},d.PositionManager.prototype.getFullTimeStr=function(a){return this._formatDate(new Date(this.getTimeFromPosition(a)))},d.PositionManager.prototype._formatDate=function(a){return a.getFullYear()+"."+this._twoChipers(a.getMonth()+1)+"."+this._twoChipers(a.getDate())+" "+this._twoChipers(a.getHours())+":"+this._twoChipers(a.getMinutes())+":"+this._twoChipers(a.getSeconds())},d.PositionManager.prototype._twoChipers=function(a){return 10>a?"0"+a:a},d.PositionManager.prototype.isInSelectionZone=function(a){return a>=this._aSelectionPosition[0]&&a<=this._aSelectionPosition[1]},d.PositionManager.prototype.isInSliderTimeSeries=function(a){return a>=this._startTime&&a<=this._endTime},d.PositionManager.prototype.getSliderTimeSeries=function(){return[this._startTime,this._endTime]},d.PositionManager.prototype.getSelectionTimeSeries=function(){return[this._aSelectionTimeSeries[0],this._aSelectionTimeSeries[1]]},d.PositionManager.prototype.getSelectionPosition=function(){return[this._aSelectionPosition[0],this._aSelectionPosition[1]]},d.PositionManager.prototype.isInSelectionZoneSelectPoint=function(){return this._selectPosition>=this._aSelectionPosition[0]&&this._selectPosition<=this._aSelectionPosition[1]},d.PositionManager.prototype.getSelectPosition=function(){return this._selectPosition},d.PositionManager.prototype.setSelectTime=function(a){this._selectTime=a,this._selectPosition=this.getPositionFromTime(a)},d.PositionManager.prototype.setSelectPosition=function(a){this._selectPosition=a,this._selectTime=this.getTimeFromPosition(a)},d.PositionManager.prototype.getTimeFromPosition=function(a){return this._startTime+this._timePerPoint*a},d.PositionManager.prototype.getPositionFromTime=function(a){return parseInt((a-this._startTime)/this._timePerPoint)},d.PositionManager.prototype.calcuSelectionZone=function(){var a=parseInt((this._aSelectionPosition[1]-this._aSelectionPosition[0])/2),b=this._selectPosition-a,c=this._selectPosition+a;0>b?(c+=Math.abs(b),b=0):c>this._width&&(b-=c-this._width,c=this._width),this._setSelectionTimeSeries(this.getTimeFromPosition(b),this.getTimeFromPosition(c)),this._setSelectionPosition(b,c)},d.PositionManager.prototype.getXBarPosition=function(){for(var a=this,b=this._xAxisTicks+1,c=parseInt(this._width/b),d=[],e=0;b>e;e++)if(0!==e){var f=e*c;d.push({x:f,time:a.getTimeStr(f)})}return d},d.PositionManager.prototype.getTimeStr=function(a){var b=a*this._timePerPoint+this._startTime,c=new Date(b);return this._twoChipers(c.getMonth()+1)+"."+this._twoChipers(c.getDate())+" "+this._twoChipers(c.getHours())+":"+this._twoChipers(c.getMinutes())},d.PositionManager.prototype.setSelectionStartPosition=function(a){this._setSelectionTimeSeries(this.getTimeFromPosition(a),null),this._setSelectionPosition(a,null)},d.PositionManager.prototype.setSelectionEndPosition=function(a){this._setSelectionTimeSeries(null,this.getTimeFromPosition(a)),this._setSelectionPosition(null,a)},d.PositionManager.prototype.zoomIn=function(){if(this._startTime!==this._aSelectionTimeSeries[0]||this._endTime!==this._aSelectionTimeSeries[1]){var a=parseInt((this._endTime-this._startTime)/4),b=this._selectTime-a,c=this._selectTime+a;if(c-bc?c:this._aSelectionTimeSeries[1]+e;this._setSelectionTimeSeries(b,f)}if(this._aSelectionTimeSeries[1]>c){e=this._aSelectionTimeSeries[1]-c;var g=this._aSelectionTimeSeries[0]-ethis.opt.headerZoneHeight&&cb;b++)this._addEventElement(this._oEventData.getDataByIndex(b))},d.StateLine.prototype._addEventElement=function(a){},d.StateLine.prototype._makeID=function(a){return this._oEventData.makeID(a)+c.ID_POSTFIX},d.StateLine.prototype._addLine=function(a,b,c){var d=this._makeID(c),e=this._makeRect(a,b,this.opt.topLineY,this.opt.bottomLineY-this.opt.topLineY,c.eventTypeCode,d);this._oLineElementHash[d]=[e],this.group.add(e)},d.StateLine.prototype._makeRect=function(a,b,c,d,e,f){return console.log(a,b,c,d,e),this.timeSlider.snap.rect(a,c,b,d).attr({fill:TimeSlider.EventColor[e],"data-id":f})},d.StateLine.prototype._makeLine=function(a,b,c,d,e){return console.log(a,b,c),this.timeSlider.snap.line(a,c,b,c).attr({stroke:TimeSlider.EventColor[d],"data-id":e,strokeWidth:this.opt.thickness})},d.StateLine.prototype._hasEventData=function(a){return"undefined"!=typeof this._oLineElementHash[a]},d.StateLine.prototype._getX2=function(a){return this.timeSlider.oPositionManager.getPositionFromTime(-1==a.durationEndTimestamp?this.timeSlider.oPositionManager.getSliderEndTime():a.durationEndTimestamp)},d.StateLine.prototype.changeData=function(){for(var a=this._oEventData.count(),b=0;a>b;b++){var c=this._oEventData.getDataByIndex(b);this._hasEventData(this._makeID(c))===!1&&this._addEventElement(c); -}this.reset()},d.StateLine.prototype.emptyData=function(){for(var a in this._oLineElementHash){var b=this._oLineElementHash[a];b[0].remove()}this._oLineElementHash={}},d.StateLine.prototype.setDefaultStateLineColor=function(a){this._baseColor=a,this._hasDurationData!==!0&&this._aBaseLine.forEach(function(b){b.attr("fill",a)})},d.StateLine.prototype._resetBaseLineColor=function(){var a=this;this._aBaseLine.forEach(function(b){b.attr("fill",a._hasDurationData===!0?TimeSlider.EventColor.base:a._baseColor)})},d.StateLine.prototype.reset=function(){var a=this,b=this.timeSlider.oPositionManager;for(var d in this._oLineElementHash){var e=this._oLineElementHash[d],f=this._oEventData.getDataByKey(d.split(c.ID_SPLITER)[0]);b.isInSliderTimeSeries(f.durationStartTimestamp)||b.isInSliderTimeSeries(f.durationEndTimestamp)?e.forEach(function(c){a.show(c),c.animate({x:b.getPositionFromTime(f.durationStartTimestamp),width:a._getX2(f)-b.getPositionFromTime(f.durationStartTimestamp)},a.opt.duration)}):e.forEach(function(b){a.hide(b)})}this._aBaseLine.forEach(function(c){c.animate({width:b.getSliderEndPosition()},a.opt.duration)}),this._resetBaseLineColor()},d.StateLine.prototype.show=function(a){a.attr("display","block")},d.StateLine.prototype.hide=function(a){a.attr("display","none")}}(window,jQuery),function(a,b){var c=a.TimeSlider;c.TimeSeriesSignboard=function(a,b,c){this.timeSlider=a,this.group=b,this.opt=c,this._init(),this._addElements()},c.TimeSeriesSignboard.prototype._init=function(){this._halfHeight=this.opt.height-12},c.TimeSeriesSignboard.prototype._addElements=function(){this._elStartTime=this.group.text(0,this._halfHeight,this.timeSlider.oPositionManager.getSliderStartTimeStr()).attr({"text-anchor":"start"}),this._elEndTime=this.group.text(this.timeSlider.oPositionManager.getSliderEndPosition(),this._halfHeight,this.timeSlider.oPositionManager.getSliderEndTimeStr()).attr({"text-anchor":"end"}),this.group.add(this._elStartTime,this._elEndTime)},c.TimeSeriesSignboard.prototype.reset=function(){this._elStartTime.attr("text",this.timeSlider.oPositionManager.getSliderStartTimeStr()),this._elEndTime.attr("text",this.timeSlider.oPositionManager.getSliderEndTimeStr())},c.TimeSeriesSignboard.prototype.resize=function(){var a=this;this._elEndTime.animate({x:a.timeSlider.oPositionManager.getSliderEndPosition()},this.opt.duration,function(){a._elEndTime.attr("text",a.timeSlider.oPositionManager.getSliderEndTimeStr())})}}(window,jQuery),function(a,b){var c=a.TimeSlider;c.TimeSignboard=function(a,b,c){this.timeSlider=a,this.group=b,this.opt=c,this._textMaxWidth=100,this._xPadding=10,this._addElements()},c.TimeSignboard.prototype._addElements=function(){var a=this._isIn(this.opt.x),b=this.opt.x+(a?this._xPadding:-this._xPadding);this.timeText=this.group.text(b,26,this.timeSlider.oPositionManager.getFullTimeStr(this.opt.x)).attr({textAnchor:a?"start":"end"}),this.group.add(this.timeText)},c.TimeSignboard.prototype.setX=function(a){var b=this._isIn(a);this.timeText.attr({x:a+(b?this._xPadding:-this._xPadding),text:this.timeSlider.oPositionManager.getFullTimeStr(a),textAnchor:b?"start":"end"})},c.TimeSignboard.prototype._isIn=function(a){return"left"==this.opt.direction?a"+d.format("HH:mm:ss")},fnYAxisFormat:function(a,b,d,e){return c.Util.addComma(e+d-(a*b+d))},fOnSelect:function(){}}),this.option(a),this.option("minY",this._oExternal.loadFromStorage("scatter-y-min")||this.option("minY")),this.option("maxY",this._oExternal.loadFromStorage("scatter-y-max")||this.option("maxY"))},c.prototype._initVariables=function(){this._aBubbles=[],this._oSCManager=new c.SizeCoordinateManager(this.option()),this._bPause=!1,this._bDestroied=!1,this._bRequesting=!1,this._getContainer()},c.prototype._getContainer=function(){var a=this.option("containerId");switch(typeof a){case"string":this._$elContainer=b("#"+a);break;case"object":this._$elContainer=a;break;case"function":this._$elContainer=a()}this._$elContainer=b(this._$elContainer),this._$elContainer.css({width:this._oSCManager.getWidth(),height:this._oSCManager.getHeight(),position:"relative"}).addClass(this.option("containerClass"))},c.prototype._initManager=function(){var a=this;this._oBubbleTypeManager=new c.BubbleTypeManager(this.option(),this._oSCManager,this._$elContainer,{onChange:function(b){a._oRendererManager.toggle(b)},onSend:function(b,c){a._oExternal.sendAnalytics(b,c)}}),this._oRendererManager=new c.RendererManager(this.option(),this._oSCManager,this._aAgentList,this._$elContainer),this._oDragManager=new c.DragManager(this.option(),this._oSCManager,this._$elContainer,{onSelect:function(b,c){a.hasDataByXY(c.fromX,c.toX,c.fromY,c.toY)&&a._oExternal.onSelect(b,c,a._currentAgent)}})},c.prototype._initElements=function(){this._$elPluginArea=b("
").css({top:"0px",left:this._oSCManager.getLeftOfPluginArea()+"px",width:this._oSCManager.getPadding().right+"px",height:this._oSCManager.getHeight()+"px","z-index":510,position:"absolute"}).addClass("plugins").appendTo(this._$elContainer)},c.prototype._initPlugin=function(a){var c=this;b.each(a,function(a,b){b.initElement(c._$elContainer,c._$elPluginArea,c.option()).initEvent(c)})},c.prototype._initInnerPlugin=function(){this._oMessage=new c.MessagePlugin,this._oMessage.initElement(this._$elContainer,this._$elPluginArea,this.option()).initEvent(self)},c.prototype.fireDragEvent=function(a){this._oDragManager.triggerDrag(a)},c.prototype.selectArea=function(a,b,c){this._oExternal.onSelect(a,b,c,this._currentAgent)},c.prototype.selectType=function(a){return this._oBubbleTypeManager.selectType(a),this._oRendererManager.selectType(this._currentAgent,a),this},c.prototype.addBubbles=function(a){this._aBubbles.push(a)},c.prototype._getSumCountByType=function(a){var c=this,d={},e=this._oSCManager.getX();b.each(this.option("typeInfo"),function(a,b){d[b[0]]=0});for(var f=0;f0&&this._oMessage.hide();for(var a=0,b=this._aBubbles.length;b>a;a++)this._drawBubbles(this._aBubbles[a])},c.prototype.clear=function(){this._oRendererManager.clear(),this._aBubbles=[],this._oBubbleTypeManager.showTypeCount(this._getSumCountByType()),this._oDragManager.hide(),this._oMessage.show(this.option("noDataStr"))},c.prototype._drawBubbles=function(a){var d=this,e=this.option("typeInfo"),f=this.option("propertyIndex"),g=this.option("sPrefix");setTimeout(function(){b.each(d._aAgentList,function(b,h){for(var i=0,j=a.countByAgent(h);j>i&&!d._bDestroied;i++){var k=a.getDataByAgent(h,i),l=k[f.groupCount];if(0!==l){var m=e[k[f.type]];d._oRendererManager.drawBubble(c.Util.makeKey(h,g,m[0]),m[1],k)}}})},0)},c.prototype.addBubbleAndMoveAndDraw=function(a,b,c){if(b===!1){if(a.isEmpty())return;this._oMessage.hide()}this.addBubbles(a),this._bPause!==!0&&(this._oBubbleTypeManager.showTypeCount(this._getSumCountByType(b)),this._drawBubbles(a),this._moveChart(a,c),this._oRendererManager.updateXYAxis(),this._removeBubble())},c.prototype._moveChart=function(a,b){var c=this._oSCManager.getX(),d=a.getX(),e=this.option("chartAnimationTime");if(d.min>=c.max){var f=d.max-c.max,g=f*this._oSCManager.getPixelPerTime();this._oSCManager.setX(c.min+f,c.max+f),this._oRendererManager.moveChart(parseInt(g,10),e>b?0:e)}},c.prototype._removeBubble=function(){for(var a=this._oSCManager.getX().min,b=0;bl;l++)for(var n=this._aBubbles[l],o=0,p=n.count();p>o;o++){var q=n.getData(o),r=n.getAgentName(q);if(f===this._AGENT_ALL||f===r){var s=q[i.x],t=h[q[i.type]][0];if(c.Util.isInRange(a,b,s)&&c.Util.indexOf(k,t)>=0){var u=q[i.y];(c.Util.isInRange(d,e,u)||e===j.max&&u>e)&&g.push([n.getTransactionID(q),q[i.x],q[i.y]])}}}return g},c.prototype.getDataByRange=function(a,b,d,e){var f=[],g=this.option("typeInfo"),h=this.option("propertyIndex");b=parseInt(b,10),d=parseInt(d,10);for(var i=0,j=this._aBubbles.length;j>i;i++)for(var k=this._aBubbles[i],l=0,m=k.count();m>l;l++){var n=k.getData(l),o=k.getAgentName(n);if(e===this._AGENT_ALL||e===o){var p=g[n[h.type]][0];if(a===p){var q=n[h.y];("Failed"===a||c.Util.isInRange(b,d,q))&&f.push([k.getTransactionID(n),n[h.x],n[h.y]])}}}return f},c.prototype.hasDataByXY=function(a,b,d,e){var f=this.option("typeInfo"),g=this.option("propertyIndex");a=parseInt(a,10),b=parseInt(b,10),d=parseInt(d,10),e=parseInt(e,10);for(var h=this._oSCManager.getY(),i=this._oBubbleTypeManager.getVisibleType(),j=0,k=this._aBubbles.length;k>j;j++)for(var l=this._aBubbles[j],m=0,n=l.count();n>m;m++){var o=l.getData(m),p=l.getAgentName(o);if(this._currentAgent===this._AGENT_ALL||this._currentAgent===p){var q=o[g.x],r=f[o[g.type]][0];if(c.Util.isInRange(a,b,q)&&c.Util.indexOf(i,r)>=0){var s=o[g.y];if(c.Util.isInRange(d,e,s)||e===h.max&&s>e)return!0}}}return!1},c.prototype.getChartAsImage=function(a){return this._oRendererManager.getChartAsImage(a,this._oBubbleTypeManager.getElementLI())},c.prototype.drawWithDataSource=function(a){this._oDataLoadManager=a,this._oDataLoadManager.setTimeManager(this._oSCManager),this._oDataLoadManager.abort(),this._oDataLoadManager.initCallCount(),this._drawWithDataSource(),this.option("realtime")&&this._invokeLoadRealtimeData()},c.prototype._invokeLoadRealtimeData=function(){var a=this;setTimeout(function(){a._drawWithRealtimeDataSource()},this._oDataLoadManager.getRealtimeInterval())},c.prototype._drawWithDataSource=function(){var a=this;this._bPause||this._bRequesting||this._oDataLoadManager.isCompleted()||(this._oDataLoadManager.isFirstRequest()&&this._oMessage.show(this.option("loadingStr")),this._oDataLoadManager.loadData(function(){a._bRequesting=!1},function(b,c,d){var e=a.createDataBlock(b);e.isEmpty()===!1&&a.addBubbleAndMoveAndDraw(e,!1,0),c===!0?setTimeout(function(){a._drawWithDataSource()},d):a._aBubbles&&0===a._aBubbles.length&&a._oMessage.show(a.option("noDataStr"))},function(){a._showServerError(),a._oExternal.onError()},this._oSCManager.getXOfPixel(),this._oSCManager.getYOfPixel()),this._bRequesting=!0)},c.prototype._drawWithRealtimeDataSource=function(){var a=this;this._oDataLoadManager.loadRealtimeData(function(b,c,d,e){a._oMessage.hide(),a._hideServerError(),d?(a.pause(),a.resume(e-a._oSCManager.getGapX(),e)):(a.addBubbleAndMoveAndDraw(a.createDataBlock(b),!0,c),setTimeout(function(){a._bPause===!1&&a._drawWithRealtimeDataSource()},c))},function(){a._showServerError(),a._oExternal.onError(),setTimeout(function(){a._bPause===!1&&a._drawWithRealtimeDataSource()},0)},this._oSCManager.getXOfPixel(),this._oSCManager.getYOfPixel())},c.prototype._hideServerError=function(){this._$elContainer.css({backgroundImage:"none"})},c.prototype._showServerError=function(){this._$elContainer.css({backgroundImage:"url("+this.option("errorImage")+")",backgroundRepeat:"no-repeat",backgroundPosition:"88% 21%",backgroundSize:"30px 30px"})},c.prototype.redraw=function(){this._oRendererManager.clear(),this._oRendererManager.updateXYAxis(),this.redrawBubbles()},c.prototype.abort=function(){this._bPause=!0,this._oDataLoadManager.abort()},c.prototype.pause=function(){this._bPause=!0,this.option("realtime")&&this._oRendererManager.reset()},c.prototype.resume=function(a,b){this._bPause=!1,this.option("realtime")?(this._aBubbles=[],this._oSCManager.setX(a,b,!0),this._oDataLoadManager.reset(),this._oDataLoadManager.setRealtimeFrom(b),this._oRendererManager.updateXYAxis(),this._drawWithDataSource(),this._invokeLoadRealtimeData()):this._drawWithDataSource()},c.prototype.changeRangeOfY=function(a){this._oSCManager.setY(a.min,a.max)},c.prototype.selectAgent=function(a,c){var d=this,e=a===this._AGENT_ALL,f=this.option("typeInfo"),g={};c===!0?(this._oBubbleTypeManager.selectAll(),b.each(f,function(a,b){g[b[0]]=!0})):b.each(f,function(a,b){g[b[0]]=d._oBubbleTypeManager.isChecked(b[0])}),this._currentAgent=a,this._oRendererManager.showSelectedAgent(e,a,g),this._oBubbleTypeManager.showTypeCount(this._getSumCountByType())},c.prototype.getCurrentAgent=function(){return this._currentAgent},a.BigScatterChart2=c}(window,jQuery),function(a,b){"use strict";function c(a,b,c){this._initData(a),this._splitDataByAgent(b,c)}c.prototype._initData=function(a){this._from=a.from,this._to=a.to,this._resultFrom=a.complete?a.from:a.resultFrom,this._resultTo=a.complete?a.to:a.resultTo,this._oAgentMetaInfo=a.scatter.metadata,this._aAllData=a.scatter.dotList,this._bLoadComplete=a.complete,this._oAgentData={},this._oCountOfType={}},c.prototype._splitDataByAgent=function(a,c){var d=this;this._oPropertyIndex=a,this._oTypeInfo=c,b.each(this._oAgentMetaInfo,function(a,e){var f=e[0];d._oAgentData[f]=[],d._oCountOfType[f]={},b.each(c,function(a,b){d._oCountOfType[f][b[0]]=0})});var e=Number.MAX_VALUE,f=0;b.each(this._aAllData,function(b,g){var h=d._getAgentName(g[2]+"");e=Math.min(g[1],e),f=Math.max(g[1],f),g[0]+=d._from,d._oAgentData[h].push(g),d._oCountOfType[h][c[g[a.type]+""][0]]++}),this._minX=this._bLoadComplete?this._from:this._resultFrom,this._maxX=this._bLoadComplete?this._to:this._resultTo,this._minY=e,this._maxY=f},c.prototype._getAgentName=function(a){return this._oAgentMetaInfo[a][0]},c.prototype.getDataByAgent=function(a,b){return this._oAgentData[a][b]},c.prototype.getData=function(a){return this._aAllData[a]},c.prototype.count=function(){return this._aAllData.length},c.prototype.countByAgent=function(a){return this._oAgentData[a]?this._oAgentData[a].length:0},c.prototype.getCount=function(a,b,c,d){return 2===arguments.length?this._oCountOfType[a]?this._oCountOfType[a][b]:0:this._getRealtimeCount(a,b,c,d)},c.prototype._getRealtimeCount=function(a,c,d,e){var f=this,g=0;return b.each(this._aAllData,function(b,h){a===f._getAgentName(h[f._oPropertyIndex.meta]+"")&&c===f._oTypeInfo[h[f._oPropertyIndex.type]+""][0]&&h[f._oPropertyIndex.x]>=d&&h[f._oPropertyIndex.x]<=e&&g++}),g},c.prototype.getTransactionID=function(a){var b=this._oAgentMetaInfo[a[this._oPropertyIndex.meta]+""];return b[1]+"^"+b[2]+"^"+a[this._oPropertyIndex.transactionId]},c.prototype.getAgentName=function(a){var b=this._oAgentMetaInfo[a[this._oPropertyIndex.meta]+""];return b[0]},c.prototype.getX=function(){return{min:this._minX,max:this._maxX}},c.prototype.isEmpty=function(){return 0===this._aAllData.length},a.BigScatterChart2.DataBlock=c}(window,jQuery),function(a,b){"use strict";function c(a,b,c,d){this._option=a,this._oCallback=d,this._oSCManager=b,this._$elContainer=c,this._initVariable(),this._initElement(c),this._initEvent()}var d="jquery-drag-to-select";c.prototype.option=function(a){return this._option[a]},c.prototype._initVariable=function(){},c.prototype._initElement=function(a){var c=this._oSCManager.getPadding(),d=this.option("lineColor"),e=this.option("axisLabelStyle");this._$element=b("
").css({top:"0px",left:"0px",width:this._oSCManager.getWidth()+"px",height:this._oSCManager.getHeight()+"px",cursor:"crosshair","z-index":500,position:"absolute","background-color":"rgba(0,0,0,0)"}).addClass("overlay").appendTo(a),this._welXGuideNumber=b("
").css({top:this._oSCManager.getHeight()-c.bottom+10+"px",left:"0px",color:d,width:"56px",height:"22px",border:"1px solid #ccc",display:"none",position:"absolute","text-align":"center",background:"#fff","line-height":"22px","margin-left":"-28px","border-radius":"5px"}).css(e).append(b("")).append(b("
").css({top:"-10px",left:"27px",height:"10px",position:"absolute","border-left":"1px solid red"})).appendTo(this._$element),this._welYGuideNumber=b("
").css({top:"0px",left:"0px",color:d,width:"41px",height:"22px",border:"1px solid #ccc",display:"none",position:"absolute","margin-top":"-10px","text-align":"right",background:"#fff","line-height":"22px","padding-right":"3px","border-radius":"5px","vertical-align":"middle"}).css(e).append(b("")).append(b("
").css({top:"9px",right:"-10px",width:"10px",position:"absolute","border-top":"1px solid red"})).appendTo(this._$element)},c.prototype._initEvent=function(){var a=this,b=!1;this._$element.dragToSelect({className:d,onHide:function(c){var d=a._adjustSelectBoxForChart(c);a._oCallback.onSelect(d,a._parseCoordinatesToXY(d)),a._$elDragArea=c,a._$elDragArea.hide(),a._hideGuideValue(),b=!1},onMove:function(c){return a.option("bUseMouseGuideLine")?void(a._checkMouseXYInChart(c.pageX,c.pageY)?(b||(a._showGuideValue(),b=!0),a._moveGuideValue(c.pageX,c.pageY)):(b=!1,a._hideGuideValue())):!1},onLeave:function(c){b=!1,a._hideGuideValue()}})},c.prototype._checkMouseXYInChart=function(a,b){var c=this._oSCManager.getPadding(),d=this._oSCManager.getBubbleSize(),e=this._$elContainer.offset(),f=e.left+c.left+d,g=e.left+this._$elContainer.width()-c.right-d,h=e.top+c.top+d,i=e.top+this._$elContainer.height()-c.bottom-d;return a>=f&&g>=a&&b>=h&&i>=b},c.prototype.triggerDrag=function(a){var b=this._adjustSelectBoxForChart(a);this._oCallback.onSelect(b,this._parseCoordinatesToXY(b))},c.prototype._adjustSelectBoxForChart=function(a){var b=this._oSCManager.getPadding(),c=this._oSCManager.getBubbleSize(),d=b.top+c,e=b.left+c,f=this._oSCManager.getWidth()-b.right-c,g=this._oSCManager.getHeight()-b.bottom-c,h=parseInt(a.css("left"),10),i=h+a.width(),j=parseInt(a.css("top"),10),k=j+a.height();j=Math.max(j,d),h=Math.max(h,e),i=Math.min(i,f),k=Math.min(k,g);var l={top:j,left:h,width:i-h,height:k-j};return a.animate(l,200),l},c.prototype._parseCoordinatesToXY=function(a){var b=this._oSCManager.getPadding(),c=this._oSCManager.getBubbleSize();return{fromX:this._oSCManager.parseMouseXToXData(a.left-b.left-c),toX:this._oSCManager.parseMouseXToXData(a.left+a.width-b.left-c),fromY:this._oSCManager.parseMouseYToYData(this._oSCManager.getHeight()-(b.bottom+c)-(a.top+a.height)),toY:this._oSCManager.parseMouseYToYData(this._oSCManager.getHeight()-(b.bottom+c)-a.top)}},c.prototype._showGuideValue=function(){this._welXGuideNumber.show(),this._welYGuideNumber.show()},c.prototype._moveGuideValue=function(a,b){var c=this._oSCManager.getPadding(),d=this._oSCManager.getBubbleSize(),e=this._$elContainer.offset(),f=a-e.left,g=b-e.top;this._welXGuideNumber.css("left",f).find("span").text(moment(this._oSCManager.parseMouseXToXData(f-c.left,d)).format("HH:mm:ss")),this._welYGuideNumber.css("top",g).find("span").text(BigScatterChart2.Util.addComma(this._oSCManager.parseMouseYToYData(this._oSCManager.getHeight()-g-c.bottom-d)))},c.prototype._hideGuideValue=function(){this._welXGuideNumber.hide(),this._welYGuideNumber.hide()},c.prototype.hide=function(){this._hideGuideValue(),this._$elContainer.find("."+d).hide()},a.BigScatterChart2.DragManager=c}(window,jQuery),function(a,b){"use strict";function c(a,b,c,d){this._filter=b,this._option=c,this._application=a,this._cbLoaded=d,this._initVar()}c.prototype._initVar=function(){this._callCount=0,this._bLoadCompleted=!1,this._lastLoadTime=-1},c.prototype.option=function(a){return this._option[a]},c.prototype.loadData=function(a,c,d,e,f){var g=this,h=this._oSCManager.getX();this._oAjax=b.ajax({url:this.getUrl(),data:{to:0===this._callCount?h.max:this._lastLoadTime-1,from:h.min,limit:this.option("fetchLimit"),filter:this._filter||"",application:this._application,xGroupUnit:e,yGroupUnit:f},headers:{accept:"application/json"},dataType:"json"}).done(function(a){a.exception?d():(g._callCount+=1,g._bLoadCompleted=a.complete,g._lastLoadTime=a.resultFrom,c(a,!g._bLoadCompleted,g._getIntervalTime()))}).always(function(){a()})},c.prototype.loadRealtimeData=function(a,c,d,e){var f=this,g=this._oSCManager.getX(),h=Date.now(),i=this._nextFrom||g.max,j=this._nextTo||g.max+this.option("realtimeInterval");this._oRealtimeAjax=b.ajax({url:this.getUrl(),data:{to:j,from:i,limit:this.option("fetchLimit"),filter:"",application:this._application,xGroupUnit:d,yGroupUnit:e,backwardDirection:!1},headers:{accept:"application/json"},dataType:"json"}).done(function(b){b.exception?c():(f._nextFrom=b.complete?b.to:b.resultTo,f._nextTo=f._nextFrom+f.option("realtimeInterval"),a(b,f._calcuRealtimeIntervalTime(b.currentServerTime,Date.now()-h),f._isResetRealtime(b.currentServerTime),b.currentServerTime),f._cbLoaded(f._oSCManager.getX(),f._nextFrom,f._nextTo))}).fail(function(){f.loadRealtimeData(a,c,d,e)})},c.prototype._isResetRealtime=function(a){return a-this._nextTo>=this.option("realtimeResetTimeGap")},c.prototype._calcuRealtimeIntervalTime=function(a,b){var c=parseInt(this.option("realtimeInterval"),0);if(b>c)return 0;var d=a-this._nextTo-this.option("realtimeDefaultTimeGap");return 0>d?Math.max(c-b-d,c):Math.max(c-b-d,0)},c.prototype.setRealtimeFrom=function(a){this._nextFrom=a,this._nextTo=a+this.option("realtimeInteraval")},c.prototype._getIntervalTime=function(){return this.option("useIntervalForFetching")?this.option("fetchingInterval"):0},c.prototype.getRealtimeInterval=function(){return this.option("realtimeDefaultTimeGap")},c.prototype.getUrl=function(){return this.option("url")},c.prototype.initCallCount=function(){this._callCount=0},c.prototype.isFirstRequest=function(){return 0===this._callCount},c.prototype.isCompleted=function(){return this._bLoadCompleted},c.prototype.abort=function(){this._oAjax&&this._oAjax.abort(),this._oRealtimeAjax&&this._oRealtimeAjax.abort()},c.prototype.setTimeManager=function(a){this._oSCManager=a},c.prototype.reset=function(){this._bLoadCompleted=!1,this.initCallCount()},a.BigScatterChart2.DataLoadManager=c}(window,jQuery),function(a,b){"use strict";function c(a,b,c,d){this._option=a,this._oSCManager=b,this._aAgentList=c,this._$elWrapper=d,this._initVariable(),this._makeGridCanvas(),this._makeAxisCanvas(),this._drawGridLine(),this._drawAxisLine(),this._drawAxisValue(),this.updateXYAxis(),this._makeDataCanvas()}c.prototype.option=function(a){return this._option[a]},c.prototype._initVariable=function(){this._oElScrollCanvas={},this._oScrollCtx={},this._ticksOfX=this.option("ticksOfX")-1,this._ticksOfY=this.option("ticksOfY")-1,this._aElAxisX=[],this._aElAxisY=[];var a=this.option("checkBoxImage");this._oCheckedBoxImage=new Image,this._oCheckedBoxImage.src=a.checked,this._oUncheckedBoxImage=new Image,this._oUncheckedBoxImage.src=a.unchecked},c.prototype._makeGridCanvas=function(){this._$elGuideCanvas=b("").attr({width:this._oSCManager.getWidth(),height:this._oSCManager.getHeight()}).css({top:0,"z-index":0,position:"absolute"}).append(this._getNotSupportMarkup()).appendTo(this._$elWrapper),this._oCtxGrid=this._$elGuideCanvas.get(0).getContext("2d")},c.prototype._makeAxisCanvas=function(){this._$elAxisCanvas=b("").attr({width:this._oSCManager.getWidth(),height:this._oSCManager.getHeight()}).css({top:0,"z-index":10,position:"absolute"}).append(this._getNotSupportMarkup()).appendTo(this._$elWrapper),this._oCtxAxis=this._$elAxisCanvas.get(0).getContext("2d")},c.prototype._getNotSupportMarkup=function(){return b("
Your browser does not support the canvas element, get a better one!
").css({color:"#fff",width:this._oSCManager.getWidth(),height:this._oSCManager.getHeight(),"text-align":"center","background-color":"#8b2e19"})},c.prototype._drawGridLine=function(){var a=this._oSCManager.getWidth(),b=this._oSCManager.getHeight(),c=this._oSCManager.getPadding(),d=this._oSCManager.getBubbleSize(),e=this._oSCManager.getWidthOfChartSpace()/this._ticksOfX,f=this._oSCManager.getHeightOfChartSpace()/this._ticksOfY,g=0,h=0;for(this._setStyle(this._oCtxGrid,this.option("gridAxisStyle")),g=0;g<=this._ticksOfX;g++)h=c.left+d+e*g,this._oCtxGrid.beginPath(),this._moveTo(this._oCtxGrid,h,c.top),this._lineTo(this._oCtxGrid,h,b-c.bottom),this._oCtxGrid.stroke();for(g=0;g<=this._ticksOfY;g++)h=b-(c.bottom+d+f*g),this._oCtxGrid.beginPath(),this._moveTo(this._oCtxGrid,c.left,h),this._lineTo(this._oCtxGrid,a-c.right,h),this._oCtxGrid.stroke()},c.prototype._drawAxisLine=function(){var a=this._oSCManager.getWidth(),b=this._oSCManager.getHeight(),c=this._oSCManager.getPadding(),d=this._oSCManager.getBubbleSize(),e=this.option("lineColor"),f=this.option("gridAxisStyle"),g=this._oSCManager.getWidthOfChartSpace()/this._ticksOfX,h=this._oSCManager.getHeightOfChartSpace()/this._ticksOfY,i=0,j=0;for(this._oCtxAxis.lineWidth=f.lineWidth,this._oCtxAxis.globalAlpha=1,this._oCtxAxis.lineCap="round",this._oCtxAxis.strokeStyle=e,this._oCtxAxis.beginPath(),this._moveTo(this._oCtxAxis,c.left,c.top),this._lineTo(this._oCtxAxis,c.left,b-c.bottom),this._lineTo(this._oCtxAxis,a-c.right,b-c.bottom),this._oCtxAxis.stroke(),i=0;i<=this._ticksOfX;i++)j=c.left+d+g*i,this._oCtxAxis.beginPath(),this._moveTo(this._oCtxAxis,j,b-c.bottom),this._lineTo(this._oCtxAxis,j,b-c.bottom+10),this._oCtxAxis.stroke();for(i=0;i<=this._ticksOfY;i++)j=b-(c.bottom+d+h*i),this._oCtxAxis.beginPath(),this._moveTo(this._oCtxAxis,c.left,j),this._lineTo(this._oCtxAxis,c.left-10,j),this._oCtxAxis.stroke()},c.prototype._setStyle=function(a,c){b.each(c,function(b,c){"lineDash"===b?a.setLineDash(c):a[b]=c})},c.prototype._moveTo=function(a,b,c){b%1===0&&(b+=.5),c%1===0&&(c+=.5),a.moveTo(b,c)},c.prototype._lineTo=function(a,b,c){b%1===0&&(b+=.5),c%1===0&&(c+=.5),a.lineTo(b,c)},c.prototype._drawAxisValue=function(){var a=this._oSCManager.getWidthOfChartSpace()/this._ticksOfX,c=this._oSCManager.getHeightOfChartSpace()/this._ticksOfY,d=this._oSCManager.getWidth(),e=this._oSCManager.getHeight(),f=this._oSCManager.getPadding(),g=this._oSCManager.getBubbleSize(),h=(this.option("sPrefix"),this.option("lineColor")),i=this.option("axisLabelStyle"),j=0;for(this._welCoordinate=b("
").css({top:0,width:d,height:e,cursor:"crosshair","z-index":10,position:"absolute","background-color":"rgba(0,0,0,0)"}).addClass("coordinate").appendTo(this._$elWrapper),j=0;j<=this._ticksOfX;j++)this._aElAxisX.push(b("
").css({top:e-f.bottom+10+"px", -left:f.left-a/2+j*a+"px",color:h,width:a+"px",position:"absolute","text-align":"center"}).css(i).text(" "));for(j=0;j<=this._ticksOfY;j++)this._aElAxisY.push(b("
").css({top:g+j*c+f.top-10+"px",left:"0px",width:f.left-15+"px",color:h,position:"absolute","text-align":"right","vertical-align":"middle"}).css(i).text(" "));this._welCoordinate.append(this._aElAxisX).append(this._aElAxisY);var k=this.option("labelX");BigScatterChart2.Util.isString(k)&&k.length>0&&b("
").text(k).css(i).css({top:e-f.bottom+10+"px",right:0,color:h,position:"absolute","text-align":"center"}).appendTo(this._welCoordinate);var l=this.option("labelY");BigScatterChart2.Util.isString(l)&&l.length>0&&b("
").text(l).css(i).css({top:g+f.top+10+"px",left:"0px",color:h,width:f.left-15+"px",position:"absolute","text-align":"right","vertical-align":"middle"}).appendTo(this._welCoordinate)},c.prototype._makeDataCanvas=function(){var a=this,c=this._oSCManager.getBubbleSize(),d=this.option("sPrefix"),e=100,f=this.option("typeInfo"),g=this._oSCManager.getWidthOfChartSpace(),h=this._oSCManager.getHeightOfChartSpace(),i=this._oSCManager.getCanvasWidth();this._$elScroller=b("
").css({top:"0px",left:"0px",height:h+2*c+"px",position:"absolute","background-color":"gray"}).addClass("canvas-scroller"),b("
").css({top:this._oSCManager.getTopOfChartSpace()+"px",left:this._oSCManager.getLeftOfChartSpace()+c+"px",width:g+"px",height:h+2*c+"px","z-index":e++,overflow:"hidden",position:"absolute"}).addClass("canvas-wrapper").append(this._$elScroller).appendTo(this._$elWrapper),b.each(this._aAgentList,function(g,j){b.each(f,function(f,g){var k=BigScatterChart2.Util.makeKey(j,d,g[0]);a._oElScrollCanvas[k]=[b("").attr({width:i,height:h+2*c+"px","data-key":k}).css({top:"0px",left:"0px","z-index":e++,position:"absolute"}).appendTo(a._$elScroller),b("").attr({width:i,height:h+2*c+"px","data-key":k}).css({top:"0px",left:i+"px","z-index":e++,position:"absolute"}).appendTo(a._$elScroller)],a._oScrollCtx[k]=[a._oElScrollCanvas[k][0].get(0).getContext("2d"),a._oElScrollCanvas[k][1].get(0).getContext("2d")]})}),this._oScrollIndexOrder=[0,1]},c.prototype.getChartAsImage=function(a,b){return this._mergeAllDisplay(b).get(0).toDataURL("image/"+a.toLowerCase())},c.prototype.updateXYAxis=function(a,c,d,e){var f=this;b.isNumeric(a),b.isNumeric(c),b.isNumeric(d),b.isNumeric(e);var g=this.option("fnXAxisFormat"),h=this._oSCManager.getX(),i=this._oSCManager.getGapX()/this._ticksOfX;b.each(this._aElAxisX,function(a,c){b.isFunction(g)?c.html(g.call(f,i,a,h.min)):c.html((i*a+h.min).round())});var j=this.option("fnYAxisFormat"),k=this._oSCManager.getY(),l=this._oSCManager.getGapY()/this._ticksOfY;b.each(this._aElAxisY,function(a,c){b.isFunction(j)?c.html(j.call(f,l,a,k.min,k.max)):c.html(BigScatterChart2.Util.addComma(k.max+k.min-(l*a+k.min)))})},c.prototype.clear=function(){var a=this._oSCManager.getCanvasWidth(),c=this._oSCManager.getHeight();b.each(this._oScrollCtx,function(d,e){b.each(e,function(b,d){d.clearRect(0,0,a,c)})})},c.prototype.selectType=function(a,c){b.each(this._oElScrollCanvas,function(a,d){b.each(d,function(b,d){BigScatterChart2.Util.endsWith(a,c)?d.show():d.hide()})})},c.prototype.toggle=function(a){b.each(this._oElScrollCanvas,function(c,d){b.each(d,function(b,d){BigScatterChart2.Util.endsWith(c,a)&&d.toggle()})})},c.prototype.showSelectedAgent=function(a,c,d){var e=this;b.each(this._oElScrollCanvas,function(f,g){if(a){var h=e._visible(f.split("-"),d)?"show":"hide";b.each(g,function(a,b){b[h]()})}else b.each(g,function(a,b){BigScatterChart2.Util.startsWith(f,c)?b[e._visible(f.split("-"),d)?"show":"hide"]():b.hide()})})},c.prototype._visible=function(a,b){return b[a[a.length-1]]},c.prototype.drawBubble=function(a,b,c){var d=this.option("propertyIndex"),e=this.option("bubbleRadius"),f=this._oSCManager.getY(),g=(c[d.x]-this._oSCManager.getStartX())*this._oSCManager.getPixelPerTime(),h=this._oSCManager.parseYDataToYChart(BigScatterChart2.Util.getBoundaryValue(f,c[d.y]),!1),i=this._oSCManager.parseZDataToZChart(c.r||e),j=this._oSCManager.getCanvasWidth(),k=this._oScrollIndexOrder[0],l=parseInt(this._oElScrollCanvas[a][k].css("left")),m=l+j;g>m?(k=this._oScrollIndexOrder[1],g-=m):g-=l,this._oScrollCtx[a][k].beginPath(),this._oScrollCtx[a][k].fillStyle=b,this._oScrollCtx[a][k].strokeStyle=b,this._oScrollCtx[a][k].arc(g,h,i,0,2*Math.PI,!0),this._oScrollCtx[a][k].globalAlpha=.3+.1*c[d.groupCount],this._oScrollCtx[a][k].fill()},c.prototype.moveChart=function(a,c){var d=this,e=this._oSCManager.getCanvasWidth(),f=this._oSCManager.getHeight(),g=parseInt(this._$elScroller.css("left"),10)-a;this._$elScroller.animate({left:g},c,function(){var a=d._oScrollIndexOrder[0],c=!1;b.each(d._oElScrollCanvas,function(a,b){Math.abs(g)>parseInt(b[d._oScrollIndexOrder[0]].css("left"))+e&&(c=!0,b[d._oScrollIndexOrder[0]].css("left",parseInt(b[d._oScrollIndexOrder[1]].css("left"))+e),d._oScrollCtx[a][d._oScrollIndexOrder[0]].clearRect(0,0,e,f))}),c&&(d._oScrollIndexOrder[0]=d._oScrollIndexOrder[1],d._oScrollIndexOrder[1]=a)})},c.prototype.reset=function(){var a=this._oSCManager.getCanvasWidth();this._$elScroller.css("left",0),this._oScrollIndexOrder=[0,1],b.each(this._oElScrollCanvas,function(c,d){b.each(d,function(b,c){c.css("left",b*a)})}),this.clear()},c.prototype._mergeAllDisplay=function(a){var c=this,d=this._oSCManager.getPadding(),e=this._oSCManager.getBubbleSize(),f=this._oSCManager.getWidth(),g=this._oSCManager.getHeight(),h=b("").attr({width:f,height:g}),i=h.get(0).getContext("2d");i.fillStyle="#FFFFFF",i.fillRect(0,0,f,g),i.drawImage(this._$elGuideCanvas.get(0),0,0),b.each(this._oElScrollCanvas,function(a,c){b.each(c,function(a,b){b.is(":visible")&&i.drawImage(b.get(0),d.left+e,d.top)})}),i.drawImage(this._$elAxisCanvas.get(0),0,0),i.textBaseline="top";var j=this._$elWrapper.offset();return i.textAlign="left",b.each(a,function(a,b){var d=b.offset(),e=d.left-j.left,f=d.top-j.top;i.font=b.css("font"),i.fillStyle=b.css("color"),i.fillText(b.text(),e+parseInt(b.css("padding-left"),10),f),b.hasClass("unchecked")?i.drawImage(c._oUncheckedBoxImage,e,f):i.drawImage(c._oCheckedBoxImage,e,f)}),i.textAlign="center",b.each(this._aElAxisX,function(a,b){i.font=b.css("font"),i.fillStyle=b.css("color"),i.fillText(b.text(),parseInt(b.css("left"),10)+b.get(0).getBoundingClientRect().width/2,parseInt(b.css("top"),10))}),i.textAlign="right",b.each(this._aElAxisY,function(a,b){i.font=b.css("font"),i.fillStyle=b.css("color"),i.fillText(b.text(),parseInt(b.css("left"),10)+b.get(0).getBoundingClientRect().width,parseInt(b.css("top"),10))}),h},a.BigScatterChart2.RendererManager=c}(window,jQuery),function(a,b){"use strict";function c(a,b,c,d){this._option=a,this._oSCManager=b,this._oCallback=d,this._initVar(),this._initElements(c),this._initEvents()}c.prototype.option=function(a){return this._option[a]},c.prototype._initVar=function(){this._oReferenceLI={},this._oReferenceSpan={}},c.prototype._initElements=function(a){var c=this,d=this._oSCManager.getPadding();this._$element=b("
").css({top:0,width:this._oSCManager.getWidth()-d.right,height:d.top,cursor:"pointer","z-index":510,position:"absolute","background-color":"rgba(0,0,0,0)"}).addClass("bubble-type"),this._$elTypeUL=b("