1234567891011121314151617181920212223 |
- import{o as Ld}from"./_commonjsHelpers.773c2c82.js";function jd(ui,Et){for(var Tt=0;Tt<Et.length;Tt++){const Rt=Et[Tt];if(typeof Rt!="string"&&!Array.isArray(Rt)){for(const Kt in Rt)if(Kt!=="default"&&!(Kt in ui)){const Di=Object.getOwnPropertyDescriptor(Rt,Kt);Di&&Object.defineProperty(ui,Kt,Di.get?Di:{enumerable:!0,get:()=>Rt[Kt]})}}}return Object.freeze(Object.defineProperty(ui,Symbol.toStringTag,{value:"Module"}))}var fu,Jo={exports:{}};fu=()=>(()=>{var ui,Et,Tt,Rt,Kt={},Di={};function N(s){var i=Di[s];if(i!==void 0)return i.exports;var e=Di[s]={exports:{}};return Kt[s].call(e.exports,e,e.exports,N),e.exports}N.m=Kt,N.n=s=>{var i=s&&s.__esModule?()=>s.default:()=>s;return N.d(i,{a:i}),i},Et=Object.getPrototypeOf?s=>Object.getPrototypeOf(s):s=>s.__proto__,N.t=function(s,i){if(1&i&&(s=this(s)),8&i||typeof s=="object"&&s&&(4&i&&s.__esModule||16&i&&typeof s.then=="function"))return s;var e=Object.create(null);N.r(e);var t={};ui=ui||[null,Et({}),Et([]),Et(Et)];for(var n=2&i&&s;typeof n=="object"&&!~ui.indexOf(n);n=Et(n))Object.getOwnPropertyNames(n).forEach(r=>t[r]=()=>s[r]);return t.default=()=>s,N.d(e,t),e},N.d=(s,i)=>{for(var e in i)N.o(i,e)&&!N.o(s,e)&&Object.defineProperty(s,e,{enumerable:!0,get:i[e]})},N.f={},N.e=s=>Promise.all(Object.keys(N.f).reduce((i,e)=>(N.f[e](s,i),i),[])),N.u=s=>({265:"canvg",297:"xlsx",643:"pdfmake"}[s]||s)+".js",N.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),N.o=(s,i)=>Object.prototype.hasOwnProperty.call(s,i),Tt={},Rt="EsriAmCharts:",N.l=(s,i,e,t)=>{if(Tt[s])Tt[s].push(i);else{var n,r;if(e!==void 0)for(var a=document.getElementsByTagName("script"),o=0;o<a.length;o++){var l=a[o];if(l.getAttribute("src")==s||l.getAttribute("data-webpack")==Rt+e){n=l;break}}n||(r=!0,(n=document.createElement("script")).charset="utf-8",n.timeout=120,N.nc&&n.setAttribute("nonce",N.nc),n.setAttribute("data-webpack",Rt+e),n.src=s),Tt[s]=[i];var h=(u,d)=>{n.onerror=n.onload=null,clearTimeout(p);var c=Tt[s];if(delete Tt[s],n.parentNode&&n.parentNode.removeChild(n),c&&c.forEach(f=>f(d)),u)return u(d)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=h.bind(null,n.onerror),n.onload=h.bind(null,n.onload),r&&document.head.appendChild(n)}},N.r=s=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},N.p="",(()=>{var s={826:0};N.f.j=(t,n)=>{var r=N.o(s,t)?s[t]:void 0;if(r!==0)if(r)n.push(r[2]);else{var a=new Promise((h,p)=>r=s[t]=[h,p]);n.push(r[2]=a);var o=N.p+N.u(t),l=new Error;N.l(o,h=>{if(N.o(s,t)&&((r=s[t])!==0&&(s[t]=void 0),r)){var p=h&&(h.type==="load"?"missing":h.type),u=h&&h.target&&h.target.src;l.message="Loading chunk "+t+` failed.
- (`+p+": "+u+")",l.name="ChunkLoadError",l.type=p,l.request=u,r[1](l)}},"chunk-"+t,t)}};var i=(t,n)=>{var r,a,[o,l,h]=n,p=0;if(o.some(u=>s[u]!==0)){for(r in l)N.o(l,r)&&(N.m[r]=l[r]);h&&h(N)}for(t&&t(n);p<o.length;p++)a=o[p],N.o(s,a)&&s[a]&&s[a][0](),s[a]=0},e=self.webpackChunkEsriAmCharts=self.webpackChunkEsriAmCharts||[];e.forEach(i.bind(null,0)),e.push=i.bind(null,e.push.bind(e))})();var ws={};N.r(ws),N.d(ws,{am4charts:()=>Rs,am4core:()=>Es,am4themes_animated:()=>Td,am4themes_dark:()=>kd});var Cs={};N.r(Cs),N.d(Cs,{castNumber:()=>rl,castString:()=>sn,checkArray:()=>yu,checkBoolean:()=>tl,checkDate:()=>mu,checkNumber:()=>il,checkObject:()=>nl,checkString:()=>el,getDefault:()=>gu,getType:()=>kt,getValue:()=>be,getValueDefault:()=>rr,hasValue:()=>v,isArray:()=>Ae,isDate:()=>ki,isNaN:()=>Fe,isNumber:()=>y,isObject:()=>ye,isString:()=>J,toBoolean:()=>ve,toNumber:()=>ce,toNumberOrPercent:()=>sl,toText:()=>Xe});var Os={};N.r(Os),N.d(Os,{DEGREES:()=>vt,HALFPI:()=>Hs,PI:()=>an,RADIANS:()=>Ai,adjustTension:()=>hn,ceil:()=>Ns,closest:()=>al,cos:()=>L,fitAngleToRange:()=>bt,fitToRange:()=>R,getAngle:()=>Ee,getArcPoint:()=>or,getArcRect:()=>xt,getBBox:()=>Fi,getCenterShift:()=>bu,getCommonRectangle:()=>Mi,getCubicControlPointA:()=>Ys,getCubicControlPointB:()=>zs,getCubicCurveDistance:()=>pl,getDistance:()=>oe,getHorizontalDistance:()=>ll,getLineIntersection:()=>xu,getMidPoint:()=>ln,getPointOnCubicCurve:()=>ar,getPointOnQuadraticCurve:()=>Xs,getRotation:()=>dl,getScale:()=>ul,getVerticalDistance:()=>hl,intersect:()=>on,intersection:()=>ol,invertRange:()=>Vi,isInRectangle:()=>Us,max:()=>q,min:()=>ie,normalizeAngle:()=>Zt,round:()=>V,sin:()=>M,stretch:()=>vu,tan:()=>Ws,toNumberRange:()=>sr});var Ss={};N.r(Ss),N.d(Ss,{add:()=>ci,any:()=>lr,copy:()=>ji,each:()=>j,eachContinue:()=>hr,eachReverse:()=>cl,find:()=>Su,findIndex:()=>pr,first:()=>Pu,getSortedIndex:()=>pn,has:()=>Cu,indexOf:()=>ht,insert:()=>gl,insertIndex:()=>fi,keepIf:()=>Ks,last:()=>_u,map:()=>Li,move:()=>pt,pushAll:()=>yl,remove:()=>z,removeIndex:()=>gi,replace:()=>ml,setIndex:()=>wu,shiftLeft:()=>fl,shuffle:()=>Iu,slice:()=>Ou,toArray:()=>Gs});var Is={};N.r(Is),N.d(Is,{clone:()=>Cl,copy:()=>Tu,copyAllProperties:()=>Ei,copyProperties:()=>De,each:()=>X,eachContinue:()=>na,eachOrdered:()=>At,entries:()=>Pl,forceCopyProperties:()=>Ol,getKey:()=>Du,hasKey:()=>_t,keys:()=>ia,keysOrdered:()=>wl,merge:()=>dr,softCopyProperties:()=>ku});var Ds={};N.r(Ds),N.d(Ds,{ListIterator:()=>fn,concat:()=>Il,contains:()=>cr,each:()=>A,eachContinue:()=>rt,filter:()=>Au,find:()=>Tl,findIndex:()=>Vu,findMap:()=>Fu,flatten:()=>Dl,foldl:()=>sa,fromArray:()=>qt,indexed:()=>$t,join:()=>Vl,length:()=>Sl,map:()=>ra,max:()=>Al,min:()=>kl,sort:()=>yi,toArray:()=>Ri});var Ts={};N.r(Ts),N.d(Ts,{order:()=>fr,random:()=>Fl,repeat:()=>aa});var ks={};N.r(ks),N.d(ks,{order:()=>Pt});var As={};N.r(As),N.d(As,{brighten:()=>zl,getBrightnessStep:()=>Eu,getLightnessStep:()=>vn,hexToRgb:()=>Bl,hexToRgbWithAlpha:()=>Hl,hslToRgb:()=>ua,hsvToRgb:()=>Bu,interpolate:()=>mn,isLight:()=>Gl,lighten:()=>Yl,pad2:()=>vr,rgb:()=>Rl,rgbToHex:()=>Wl,rgbToHsl:()=>bn,rgbToHsv:()=>Ru,rgbToRGBA:()=>Xl,rgbaToRgb:()=>Nl,saturate:()=>Ul});var Vs={};N.r(Vs),N.d(Vs,{anyToDate:()=>ma,anyToNumber:()=>Or,camelToDashed:()=>Yu,capitalize:()=>wn,cleanFormat:()=>Cn,copy:()=>ql,copyProperties:()=>Vt,decimalPlaces:()=>ah,documentPointToSprite:()=>vi,documentPointToSvg:()=>Ht,escapeForRgex:()=>xr,fitNumber:()=>Sr,fitNumberRelative:()=>Ir,get12Hours:()=>On,getBaseURI:()=>Ni,getDayFromWeek:()=>nh,getFormat:()=>eh,getMonthWeek:()=>ih,getPixelRatio:()=>$l,getTimeZone:()=>Sn,getWeek:()=>Wi,getYearDay:()=>va,height:()=>sh,isIE:()=>Xi,isNotEmpty:()=>Pn,joinUrl:()=>kr,ltrim:()=>Ql,numberToString:()=>th,padString:()=>ze,parseUrl:()=>xa,plainText:()=>Cr,random:()=>Uu,relativeRadiusToValue:()=>Re,relativeToValue:()=>xe,reverseString:()=>wr,rtrim:()=>Jl,serializeUrl:()=>_a,softCopyProperties:()=>Wu,splitTextByCharCount:()=>_r,spritePointToDocument:()=>Tr,spritePointToSprite:()=>Qe,spritePointToSvg:()=>ut,spriteRectToSvg:()=>Dr,stringify:()=>fa,stripHash:()=>ca,stripTags:()=>ya,svgPointToDocument:()=>ba,svgPointToSprite:()=>at,svgRectToSprite:()=>Gu,trim:()=>ga,truncateWithEllipsis:()=>Pr,unquote:()=>zu,used:()=>Nu,valueToRelative:()=>Xu,width:()=>rh});var Fs={};N.r(Fs),N.d(Fs,{bounceIn:()=>Ph,bounceInOut:()=>wh,bounceOut:()=>In,circleIn:()=>bh,circleInOut:()=>_h,circleOut:()=>xh,cubicIn:()=>Ia,cubicInOut:()=>vh,cubicOut:()=>Qt,elasticIn:()=>Ch,elasticInOut:()=>Sh,elasticOut:()=>Oh,expIn:()=>ch,expInOut:()=>gh,expOut:()=>fh,linear:()=>Pa,polyIn:()=>wa,polyIn3:()=>uh,polyInOut:()=>Oa,polyInOut3:()=>dh,polyOut:()=>Ca,polyOut3:()=>Ar,quadIn:()=>lh,quadInOut:()=>ph,quadOut:()=>hh,sinIn:()=>yh,sinInOut:()=>mh,sinOut:()=>Sa});var Ms={};N.r(Ms),N.d(Ms,{add:()=>Ze,checkChange:()=>Rr,copy:()=>bi,getDuration:()=>Se,getNextUnit:()=>Ma,getTime:()=>Ot,getTimezoneMinutes:()=>Uh,now:()=>zh,round:()=>Be,setTimezone:()=>Vn,timeUnitDurations:()=>Yh});var Ls={};N.r(Ls),N.d(Ls,{load:()=>Fn,readBlob:()=>$h});var js={};N.r(js),N.d(js,{arc:()=>Pi,arcTo:()=>Le,arcToPoint:()=>ot,closePath:()=>pd,cubicCurveTo:()=>_i,lineTo:()=>T,moveTo:()=>E,pathToPoints:()=>ud,pointsToPath:()=>cd,polyline:()=>Zi,quadraticCurveTo:()=>ni,rectToPath:()=>Yt,rectangle:()=>Xr,spiralPoints:()=>dd});var Es={};N.r(Es),N.d(Es,{AMElement:()=>An,Adapter:()=>it,Animation:()=>gt,BaseObject:()=>Ke,BaseObjectEvents:()=>wt,Basis:()=>fd,BlurFilter:()=>Ip,Button:()=>Xt,CSVParser:()=>Ln,Cache:()=>Ml,Circle:()=>ii,CirclePattern:()=>no,CloseButton:()=>dp,Color:()=>se,ColorModifier:()=>eo,ColorSet:()=>$i,ColorizeFilter:()=>Sp,Component:()=>ti,Cone:()=>Pp,Container:()=>W,CounterDisposer:()=>un,DATE:()=>_n,DURATION:()=>br,DataItem:()=>ei,DataLoader:()=>np,DataParser:()=>Ka,DataSource:()=>rp,DateFormatter:()=>Gi,DesaturateFilter:()=>Wn,Dictionary:()=>me,DictionaryDisposer:()=>Jt,DictionaryTemplate:()=>Bi,Disposer:()=>le,DropShadowFilter:()=>qa,DurationFormatter:()=>Hr,Ellipse:()=>Wr,EventDispatcher:()=>Bt,Export:()=>tp,ExportMenu:()=>qh,Filter:()=>wi,FocusFilter:()=>Dp,GlobalAdapter:()=>jl,Group:()=>Eh,Image:()=>ap,IndexedIterable:()=>oa,Inertia:()=>Wh,Interaction:()=>Gh,InteractionKeyboardObject:()=>Nh,InteractionObject:()=>Hh,InteractionObjectEventDispatcher:()=>Bh,InterfaceColorSet:()=>ae,JSONParser:()=>Ki,Keyboard:()=>Xh,Label:()=>$e,Language:()=>Wt,LightenFilter:()=>Gr,Line:()=>yt,LinePattern:()=>io,LinearGradient:()=>dt,LinearGradientModifier:()=>Nn,List:()=>re,ListDisposer:()=>fe,ListGrouper:()=>ju,ListIterator:()=>fn,ListTemplate:()=>Oe,Modal:()=>Ea,Morpher:()=>pp,MouseCursorStyle:()=>He,MultiDisposer:()=>_e,MutableValueDisposer:()=>Me,NUMBER:()=>xn,NumberFormatter:()=>Br,OrderedList:()=>la,OrderedListTemplate:()=>yn,PLACEHOLDER:()=>st,PLACEHOLDER2:()=>mi,PX:()=>Hu,Paper:()=>Wa,Pattern:()=>xi,PatternSet:()=>Tp,Percent:()=>te,PlayButton:()=>_p,Plugin:()=>gd,PointedRectangle:()=>lp,PointedShape:()=>op,Polyarc:()=>hp,Polygon:()=>up,Polyline:()=>qi,Polyspline:()=>jn,Popup:()=>ja,Preloader:()=>Za,RadialGradient:()=>Nt,RadialGradientModifier:()=>Op,RectPattern:()=>ro,Rectangle:()=>Mn,Rectangle3D:()=>wp,Registry:()=>Ll,ResizeButton:()=>Yr,Responsive:()=>sp,ResponsiveBreakpoints:()=>Ue,RoundedRectangle:()=>St,STRING:()=>da,SVGContainer:()=>Na,SVGDefaults:()=>Dh,Scrollbar:()=>En,Slice:()=>ri,Slice3D:()=>Cp,Slider:()=>fp,SortedList:()=>gr,SortedListTemplate:()=>ha,Sprite:()=>$,SpriteEventDispatcher:()=>Ih,SpriteState:()=>Tn,StyleClass:()=>nd,StyleRule:()=>ue,SwitchButton:()=>cp,System:()=>ip,TargetedEventDispatcher:()=>ta,Tension:()=>zt,TextFormatter:()=>za,TextLink:()=>zr,Tooltip:()=>Rn,Trapezoid:()=>$a,Triangle:()=>Ur,Validatable:()=>Ga,WavedCircle:()=>Hn,WavedLine:()=>si,WavedRectangle:()=>Ja,ZoomOutButton:()=>Qa,addClass:()=>Mr,addLicense:()=>Cd,animate:()=>Zu,array:()=>Ss,blur:()=>kn,cache:()=>Hi,castColor:()=>Zl,castNumber:()=>rl,castString:()=>sn,checkBoolean:()=>tl,checkNumber:()=>il,checkObject:()=>nl,checkString:()=>el,color:()=>B,colors:()=>As,copyAttributes:()=>td,create:()=>vd,createDeferred:()=>xd,createFromConfig:()=>bd,dataLoader:()=>Nr,defaultRules:()=>Ne,disposeAllCharts:()=>md,ease:()=>Fs,fixPixelPerfect:()=>Lh,focus:()=>Ju,getElement:()=>ka,getInteraction:()=>K,getTextFormatter:()=>Ft,globalAdapter:()=>mr,is:()=>Ye,isArray:()=>Ae,isColor:()=>Kl,isElement:()=>ed,isNaN:()=>Fe,isNumber:()=>y,isObject:()=>ye,isPercent:()=>Qo,isString:()=>J,iter:()=>Ds,join:()=>Vl,keyboard:()=>Ct,math:()=>Os,max:()=>Al,min:()=>kl,net:()=>Ls,nextFrame:()=>Qs,number:()=>ks,object:()=>Is,options:()=>Z,or:()=>pa,outerHTML:()=>Qu,path:()=>js,percent:()=>F,readFrame:()=>bl,ready:()=>jh,registry:()=>_,removeClass:()=>Lr,reverse:()=>yr,string:()=>Ts,system:()=>Q,time:()=>Ms,triggerIdle:()=>_l,type:()=>Cs,unuseAllThemes:()=>wd,unuseTheme:()=>Pd,useTheme:()=>_d,utils:()=>Vs,viewPortHandler:()=>Ci,whenIdle:()=>xl,writeFrame:()=>ea});var Rs={};N.r(Rs),N.d(Rs,{Axis:()=>Gn,AxisBreak:()=>Un,AxisBullet:()=>tn,AxisDataItem:()=>Ji,AxisFill:()=>qr,AxisFillCircular:()=>bo,AxisLabel:()=>$r,AxisLabelCircular:()=>Jn,AxisLine:()=>po,AxisRenderer:()=>Kn,AxisRendererCircular:()=>_o,AxisRendererRadial:()=>Po,AxisRendererX:()=>Mt,AxisRendererX3D:()=>Eo,AxisRendererY:()=>mt,AxisRendererY3D:()=>Gp,AxisTick:()=>uo,Bullet:()=>It,Candlestick:()=>ir,CandlestickSeries:()=>Bo,CandlestickSeriesDataItem:()=>us,CategoryAxis:()=>Ve,CategoryAxisBreak:()=>go,CategoryAxisDataItem:()=>yo,Chart:()=>ai,ChartDataItem:()=>oo,ChordDiagram:()=>Yp,ChordDiagramDataItem:()=>Xp,ChordLink:()=>Lo,ChordNode:()=>Mo,CircleBullet:()=>lu,ClockHand:()=>Co,Column:()=>hi,Column3D:()=>Ro,ColumnSeries:()=>pi,ColumnSeries3D:()=>ps,ColumnSeries3DDataItem:()=>Kp,ColumnSeriesDataItem:()=>Gt,ConeColumn:()=>Uo,ConeSeries:()=>su,ConeSeriesDataItem:()=>ru,Cursor:()=>Ko,CurvedColumn:()=>Go,CurvedColumnSeries:()=>ou,CurvedColumnSeriesDataItem:()=>au,DateAxis:()=>Pe,DateAxisBreak:()=>co,DateAxisDataItem:()=>fo,DurationAxis:()=>ts,DurationAxisDataItem:()=>Lp,ErrorBullet:()=>hu,FlowDiagram:()=>os,FlowDiagramDataItem:()=>as,FlowDiagramLink:()=>tr,FlowDiagramNode:()=>er,FunnelSeries:()=>Xo,FunnelSeriesDataItem:()=>fs,FunnelSlice:()=>cs,GaugeChart:()=>Ep,GaugeChartDataItem:()=>Od,Grid:()=>Qi,GridCircular:()=>xo,HeatLegend:()=>qp,LabelBullet:()=>ls,Legend:()=>Xn,LegendDataItem:()=>Fp,LegendSettings:()=>lo,LineSeries:()=>is,LineSeriesDataItem:()=>$n,LineSeriesSegment:()=>es,NavigationBar:()=>uu,NavigationBarDataItem:()=>pu,OHLC:()=>ds,OHLCSeries:()=>$p,OHLCSeriesDataItem:()=>Ho,PictorialStackedSeries:()=>nu,PictorialStackedSeriesDataItem:()=>zo,PieChart:()=>To,PieChart3D:()=>Rp,PieChart3DDataItem:()=>Sd,PieChartDataItem:()=>Do,PieSeries:()=>ss,PieSeries3D:()=>Ao,PieSeries3DDataItem:()=>ko,PieSeriesDataItem:()=>rs,PieTick:()=>Io,PyramidSeries:()=>Yo,PyramidSeriesDataItem:()=>gs,RadarChart:()=>wo,RadarChartDataItem:()=>jp,RadarColumn:()=>Wo,RadarColumnSeries:()=>tu,RadarColumnSeriesDataItem:()=>eu,RadarCursor:()=>du,RadarSeries:()=>vo,RadarSeriesDataItem:()=>mo,SankeyDiagram:()=>Wp,SankeyDiagramDataItem:()=>Np,SankeyLink:()=>Fo,SankeyNode:()=>Vo,SerialChart:()=>Zr,SerialChartDataItem:()=>ho,Series:()=>zn,SeriesDataItem:()=>Yn,SlicedChart:()=>Hp,SlicedChartDataItem:()=>Bp,StepLineSeries:()=>Qp,StepLineSeriesDataItem:()=>No,Tick:()=>en,TreeMap:()=>Up,TreeMapDataItem:()=>zp,TreeMapSeries:()=>hs,TreeMapSeriesDataItem:()=>jo,ValueAxis:()=>ee,ValueAxisBreak:()=>Jr,ValueAxisDataItem:()=>Zn,XYChart:()=>Ut,XYChart3D:()=>Zp,XYChart3DDataItem:()=>Dd,XYChartDataItem:()=>Qr,XYChartScrollbar:()=>li,XYCursor:()=>Zo,XYSeries:()=>oi,XYSeriesDataItem:()=>qn});var Bs=function(s,i){return Bs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Bs(s,i)};function w(s,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function e(){this.constructor=s}Bs(s,i),s.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}var ct=function(){return ct=Object.assign||function(s){for(var i,e=1,t=arguments.length;e<t;e++)for(var n in i=arguments[e])Object.prototype.hasOwnProperty.call(i,n)&&(s[n]=i[n]);return s},ct.apply(this,arguments)};function de(s,i,e,t){return new(e||(e=Promise))(function(n,r){function a(h){try{l(t.next(h))}catch(p){r(p)}}function o(h){try{l(t.throw(h))}catch(p){r(p)}}function l(h){var p;h.done?n(h.value):(p=h.value,p instanceof e?p:new e(function(u){u(p)})).then(a,o)}l((t=t.apply(s,i||[])).next())})}function pe(s,i){var e,t,n,r,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return r={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function o(l){return function(h){return function(p){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,t&&(n=2&p[0]?t.return:p[0]?t.throw||((n=t.return)&&n.call(t),0):t.next)&&!(n=n.call(t,p[1])).done)return n;switch(t=0,n&&(p=[2&p[0],n.value]),p[0]){case 0:case 1:n=p;break;case 4:return a.label++,{value:p[1],done:!1};case 5:a.label++,t=p[1],p=[0];continue;case 7:p=a.ops.pop(),a.trys.pop();continue;default:if(!((n=(n=a.trys).length>0&&n[n.length-1])||p[0]!==6&&p[0]!==2)){a=0;continue}if(p[0]===3&&(!n||p[1]>n[0]&&p[1]<n[3])){a.label=p[1];break}if(p[0]===6&&a.label<n[1]){a.label=n[1],n=p;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(p);break}n[2]&&a.ops.pop(),a.trys.pop();continue}p=i.call(s,a)}catch(u){p=[6,u],t=0}finally{e=n=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}([l,h])}}}function nr(s){var i=typeof Symbol=="function"&&Symbol.iterator,e=i&&s[i],t=0;if(e)return e.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&t>=s.length&&(s=void 0),{value:s&&s[t++],done:!s}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ti(s,i){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var t,n,r=e.call(s),a=[];try{for(;(i===void 0||i-- >0)&&!(t=r.next()).done;)a.push(t.value)}catch(o){n={error:o}}finally{try{t&&!t.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}return a}function di(){for(var s=[],i=0;i<arguments.length;i++)s=s.concat(Ti(arguments[i]));return s}var te=function(){function s(i){this._value=i}return Object.defineProperty(s.prototype,"value",{get:function(){return this._value/100},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"percent",{get:function(){return this._value},enumerable:!0,configurable:!0}),s.prototype.toString=function(){return this._value+"%"},s}();function F(s){return new te(s)}function Qo(s){return s instanceof te}function Fe(s){return Number(s)!==s}function kt(s){return{}.toString.call(s)}function gu(s,i){return s||i}function el(s){if(typeof s=="string")return!0;throw new Error("Expected a string but got "+kt(s))}function tl(s){if(typeof s=="boolean")return!0;throw new Error("Expected a boolean but got "+kt(s))}function il(s){if(typeof s!="number")throw new Error("Expected a number but got "+kt(s));if(Fe(s))throw new Error("Expected a number but got NaN");return!0}function nl(s){var i=kt(s);if(i==="[object Object]")return!0;throw new Error("Expected an object but got "+i)}function yu(s){if(Array.isArray(s))return!0;throw new Error("Expected an array but got "+kt(s))}function mu(s){var i=kt(s);if(i==="[object Date]")return!0;throw new Error("Expected a date but got "+i)}function sn(s){if(typeof s=="string")return s;if(typeof s=="number")return""+s;throw new Error("Expected a string or number but got "+kt(s))}function rl(s){if(typeof s=="string"){var i=+s;if(Fe(i))throw new Error("Cannot cast string "+JSON.stringify(s)+" to a number");return i}if(typeof s=="number"){if(Fe(s))throw new Error("Expected a number but got NaN");return s}var e=kt(s);if(e==="[object Date]")return s.getTime();throw new Error("Expected a string, number, or date but got "+e)}function ve(s){return!!s}function ce(s){if(v(s)&&!y(s)){var i=Number(s);return Fe(i)&&J(s)&&s!=""?ce(s.replace(/[^0-9.\-]+/g,"")):i}return s}function Xe(s){if(v(s)&&!J(s)){if(y(s))return sn(s);if(ye(s))return s.toString()}return s}function sl(s){return!v(s)||y(s)||Qo(s)?s:J(s)&&s.indexOf("%")!=-1?F(ce(s)):ce(s)}function v(s){return s!=null}function be(s){if(v(s))return s;throw new Error("Value doesn't exist")}function rr(s,i){return v(s)?s:i}function ki(s){return kt(s)==="[object Date]"}function J(s){return typeof s=="string"}function y(s){return typeof s=="number"&&Number(s)==s}function ye(s){return typeof s=="object"&&s!=null}function Ae(s){return Array.isArray(s)}var an=Math.PI,Hs=an/2,Ai=an/180,vt=180/an;function sr(s,i,e){return v(s)?R(s=ce(s),i,e):s}function V(s,i,e){if(!y(i)||i<=0){var t=Math.round(s);return e&&t-s==.5&&t--,t}var n=Math.pow(10,i);return Math.round(s*n)/n}function Ns(s,i){if(!y(i)||i<=0)return Math.ceil(s);var e=Math.pow(10,i);return Math.ceil(s*e)/e}function vu(s,i,e){return s*(e-i)+i}function R(s,i,e){if(y(i)){if(y(e)&&e<i){var t=e;e=i,i=t}s<i&&(s=i)}return y(e)&&s>e&&(s=e),s}function M(s){return V(Math.sin(Ai*s),10)}function Ws(s){return V(Math.tan(Ai*s),10)}function L(s){return V(Math.cos(Ai*s),10)}function q(s,i){return y(s)?y(i)&&i>s?i:s:y(i)?i:null}function ie(s,i){return y(s)?y(i)&&i<s?i:s:y(i)?i:null}function al(s,i){return s.reduce(function(e,t){return Math.abs(t-i)<Math.abs(e-i)?t:e})}function on(s,i){var e=be(s.start),t=be(i.start),n=be(s.end),r=be(i.end);return Math.max(e,t)<=Math.min(n,r)}function Vi(s){var i=be(s.start);return{start:1-be(s.end),end:1-i}}function ol(s,i){var e=be(s.start),t=be(i.start),n=be(s.end),r=be(i.end),a=Math.max(e,t),o=Math.min(n,r);return o<a?void 0:{start:a,end:o}}function oe(s,i){return s?(i||(i={x:0,y:0}),Math.sqrt(Math.pow(Math.abs(s.x-i.x),2)+Math.pow(Math.abs(s.y-i.y),2))):0}function ll(s,i){return s?(i||(i={x:0,y:0}),Math.abs(s.x-i.x)):0}function hl(s,i){return s?(i||(i={x:0,y:0}),Math.abs(s.y-i.y)):0}function pl(s,i,e,t,n){if(!s)return 0;i||(i={x:0,y:0});var r=0,a=s;if(n>0)for(var o=0;o<=n;o++){var l=ar(s,i,e,t,o/n);r+=oe(a,l),a=l}return r}function ul(s,i,e,t){var n=oe(i,t),r=oe(s,e);return Math.abs(r/n)}function ln(s,i,e){return y(e)||(e=.5),{x:s.x+(i.x-s.x)*e,y:s.y+(i.y-s.y)*e}}function dl(s,i,e,t){var n=Ee(i,t)-Ee(s,e);return n<0&&(n+=360),n}function Ee(s,i){i||(i={x:2*s.x,y:2*s.y});var e=i.x-s.x,t=i.y-s.y,n=Math.atan2(t,e)*vt;return n<0&&(n+=360),Zt(n)}function bu(s,i,e,t,n){var r=dl(i,e,t,n)-90;r<0&&(r+=360);var a=oe(i,t),o=Math.cos(r)/a+i.x,l=Math.cos(r)/a+i.y;return{x:o-s.x,y:l-s.y}}function Fi(s){if(s){var i=s.length;if(i!==0){for(var e,t=void 0,n=void 0,r=void 0,a=0;a<i;a++){var o=s[a];(!y(n)||o.x>n)&&(n=o.x),(!y(t)||o.x<t)&&(t=o.x),(!y(e)||o.y<e)&&(e=o.y),(!y(r)||o.y>r)&&(r=o.y)}return{x:t,y:e,width:n-t,height:r-e}}}return{x:0,y:0,width:0,height:0}}function Mi(s){var i=s.length;if(i!==0){for(var e=void 0,t=void 0,n=void 0,r=void 0,a=0;a<i;a++){var o=s[a];e=ie(o.x,e),t=ie(o.y,t),n=q(o.x+o.width,n),r=q(o.y+o.height,r)}return{x:e,y:t,width:n-e,height:r-t}}}function Xs(s,i,e,t){return{x:(1-t)*(1-t)*s.x+2*(1-t)*t*e.x+t*t*i.x,y:(1-t)*(1-t)*s.y+2*(1-t)*t*e.y+t*t*i.y}}function ar(s,i,e,t,n){var r={x:0,y:0},a=1-n,o=a*a,l=o*a;return r.x=s.x*l+3*e.x*o*n+3*t.x*a*n*n+i.x*n*n*n,r.y=s.y*l+3*e.y*o*n+3*t.y*a*n*n+i.y*n*n*n,r}function Ys(s,i,e,t,n,r){return n=hn(n),r=hn(r),{x:(-s.x+i.x/n+e.x)*n,y:(-s.y+i.y/r+e.y)*r}}function zs(s,i,e,t,n,r){return n=hn(n),r=hn(r),{x:(i.x+e.x/n-t.x)*n,y:(i.y+e.y/r-t.y)*r}}function hn(s){return 1-s+1e-5}function Zt(s){return s==360?360:s%360}function bt(s,i,e){if(i>e){var t=i;i=e,e=t}s=Zt(s);var n=(i-Zt(i))/360;return s<i&&(s+=360*(n+1)),s>e&&(s-360>i?s-=360:s=s<i+(e-i)/2+180?e:i),s<i&&(s=s>i+(e-i)/2-180?i:e),s}function xt(s,i,e){var t=Number.MAX_VALUE,n=Number.MAX_VALUE,r=-Number.MAX_VALUE,a=-Number.MAX_VALUE,o=[];y(e)||(e=1),o.push(or(e,s)),o.push(or(e,i));for(var l=Math.min(90*Math.floor(s/90),90*Math.floor(i/90)),h=Math.max(90*Math.ceil(s/90),90*Math.ceil(i/90)),p=l;p<=h;p+=90)p>=s&&p<=i&&o.push(or(e,p));for(var u=0;u<o.length;u++){var d=o[u];d.x<t&&(t=d.x),d.y<n&&(n=d.y),d.x>r&&(r=d.x),d.y>a&&(a=d.y)}return{x:t,y:n,width:r-t,height:a-n}}function or(s,i){return{x:s*L(i),y:s*M(i)}}function Us(s,i){return s.x>=i.x&&s.x<=i.x+i.width&&s.y>=i.y&&s.y<=i.y+i.height}function xu(s,i,e,t){return{x:((s.x*i.y-i.x*s.y)*(e.x-t.x)-(s.x-i.x)*(e.x*t.y-e.y*t.x))/((s.x-i.x)*(e.y-t.y)-(s.y-i.y)*(e.x-t.x)),y:((s.x*i.y-i.x*s.y)*(e.y-t.y)-(s.y-i.y)*(e.x*t.y-e.y*t.x))/((s.x-i.x)*(e.y-t.y)-(s.y-i.y)*(e.x-t.x))}}function ht(s,i){for(var e=s.length,t=0;t<e;++t)if(s[t]===i)return t;return-1}function lr(s,i){for(var e=s.length,t=0;t<e;++t)if(i(s[t]))return!0;return!1}function Li(s,i){for(var e=s.length,t=new Array(e),n=0;n<e;++n)t[n]=i(s[n],n);return t}function j(s,i){for(var e=s.length,t=0;t<e;++t)i(s[t],t)}function cl(s,i){for(var e=s.length;e--;)i(s[e],e)}function hr(s,i){for(var e=s.length,t=0;t<e&&i(s[t],t);++t);}function fl(s,i){for(var e=s.length,t=i;t<e;++t)s[t-i]=s[t];s.length=e-i}function _u(s){var i=s.length;return i?s[i-1]:void 0}function Pu(s){return s[0]}function gl(s,i,e){e=R(e,0,s.length),s.splice(e,0,i)}function wu(s,i,e){z(s,i),gl(s,i,e)}function yl(s,i){for(var e=i.length,t=0;t<e;++t)s.push(i[t])}function z(s,i){var e=!1,t=s.indexOf(i);if(t!==-1){e=!0,s.splice(t,1);for(var n=s.length;t<n;)s[t]===i?(s.splice(t,1),--n):++t}return e}function pt(s,i,e){var t=ht(s,i);t!==-1&&gi(s,t),e==null?s.push(i):fi(s,e,i)}function ci(s,i,e){y(e)?e===0?s.unshift(i):s.splice(e,0,i):s.push(i)}function ml(s,i,e){var t=s.indexOf(i);t!==-1&&s.splice(t,1),y(e)?s.splice(e,0,i):s.push(i)}function Gs(s){return Array.isArray(s)?s:[s]}function Cu(s,i){return ht(s,i)!==-1}function ji(s){for(var i=s.length,e=new Array(i),t=0;t<i;++t)e[t]=s[t];return e}function Ou(s,i,e){e===void 0&&(e=s.length);for(var t=new Array(e-i),n=i;n<e;++n)t[n-i]=s[n];return t}function fi(s,i,e){s.splice(i,0,e)}function gi(s,i){s.splice(i,1)}function pn(s,i,e){for(var t=0,n=s.length,r=!1;t<n;){var a=t+n>>1,o=i(e,s[a]);o<0?n=a:(o===0&&(r=!0),t=a+1)}return{found:r,index:r?t-1:t}}function pr(s,i){for(var e=s.length,t=0;t<e;++t)if(i(s[t],t))return t;return-1}function Su(s,i){var e=pr(s,i);if(e!==-1)return s[e]}function Iu(s){for(var i,e,t=s.length;t!==0;)e=Math.floor(Math.random()*t),i=s[t-=1],s[t]=s[e],s[e]=i}function Ks(s,i){for(var e=s.length,t=0;t<e;)i(s[t])?++t:(s.splice(t,1),--e)}var le=function(){function s(i){this._disposed=!1,this._dispose=i}return s.prototype.isDisposed=function(){return this._disposed},s.prototype.dispose=function(){this._disposed||(this._disposed=!0,this._dispose())},s}(),_e=function(s){function i(e){return s.call(this,function(){j(e,function(t){t.dispose()})})||this}return w(i,s),i}(le),Me=function(s){function i(){var e=s.call(this,function(){v(e._disposer)&&(e._disposer.dispose(),e._disposer=void 0)})||this;return e}return w(i,s),i.prototype.get=function(){return this._value},i.prototype.set=function(e,t){v(this._disposer)&&this._disposer.dispose(),this._disposer=t,this._value=e},i.prototype.reset=function(){this.set(void 0,void 0)},i}(le),un=function(s){function i(){var e=s!==null&&s.apply(this,arguments)||this;return e._counter=0,e}return w(i,s),i.prototype.increment=function(){var e=this;return++this._counter,new le(function(){--e._counter,e._counter===0&&e.dispose()})},i}(le),Zs=!1,dn=[],cn=[],ur=[],qs=[],$s=typeof requestAnimationFrame=="function"?function(s){requestAnimationFrame(s)}:function(s){setTimeout(s,16.666666666666668)};function vl(){for(var s=Date.now(),i=dn.length,e=0;e<i;++e)dn[e](s);for(fl(dn,i),e=0;e<cn.length;++e)cn[e](s);for(cn.length=0,e=0;e<ur.length;++e)ur[e](s);ur.length=0,dn.length===0&&cn.length===0?Zs=!1:$s(vl)}function Js(){Zs||(Zs=!0,$s(vl))}function Qs(s){dn.push(s),Js()}function bl(s){cn.push(s),Js()}function ea(s){ur.push(s),Js()}function xl(s){qs.push(s)}function _l(){for(var s=Date.now(),i=qs.length,e=0;e<i;++e)qs.shift()(s)}var Bt=function(){function s(){this._listeners=[],this._killed=[],this._disabled={},this._iterating=0,this._enabled=!0,this._disposed=!1}return s.prototype.isDisposed=function(){return this._disposed},s.prototype.dispose=function(){if(!this._disposed){this._disposed=!0;var i=this._listeners;this._iterating=1,this._listeners=null,this._disabled=null;try{j(i,function(e){e.disposer.dispose()})}finally{this._killed=null,this._iterating=null}}},s.prototype.hasListeners=function(){return this._listeners.length!==0},s.prototype.hasListenersByType=function(i){return lr(this._listeners,function(e){return(e.type===null||e.type===i)&&!e.killed})},s.prototype.enable=function(){this._enabled=!0},s.prototype.disable=function(){this._enabled=!1},s.prototype.enableType=function(i){delete this._disabled[i]},s.prototype.disableType=function(i,e){e===void 0&&(e=1/0),this._disabled[i]=e},s.prototype._removeListener=function(i){if(this._iterating===0){var e=this._listeners.indexOf(i);if(e===-1)throw new Error("Invalid state: could not remove listener");this._listeners.splice(e,1)}else this._killed.push(i)},s.prototype._removeExistingListener=function(i,e,t,n){if(this._disposed)throw new Error("EventDispatcher is disposed");this._eachListener(function(r){r.once!==i||r.type!==e||t!=null&&r.callback!==t||r.context!==n||r.disposer.dispose()})},s.prototype.isEnabled=function(i){if(this._disposed)throw new Error("EventDispatcher is disposed");return this._enabled&&this._listeners.length>0&&this.hasListenersByType(i)&&this._disabled[i]==null},s.prototype.has=function(i,e,t){return pr(this._listeners,function(n){return n.once!==!0&&n.type===i&&(e==null||n.callback===e)&&n.context===t})!==-1},s.prototype._shouldDispatch=function(i){if(this._disposed)throw new Error("EventDispatcher is disposed");var e=this._disabled[i];return y(e)?(e<=1?delete this._disabled[i]:--this._disabled[i],!1):this._enabled},s.prototype._eachListener=function(i){var e=this;++this._iterating;try{j(this._listeners,i)}finally{--this._iterating,this._iterating===0&&this._killed.length!==0&&(j(this._killed,function(t){e._removeListener(t)}),this._killed.length=0)}},s.prototype.dispatchImmediately=function(i,e){this._shouldDispatch(i)&&this._eachListener(function(t){t.killed||t.type!==null&&t.type!==i||t.dispatch(i,e)})},s.prototype.dispatch=function(i,e){this._shouldDispatch(i)&&this._eachListener(function(t){t.killed||t.type!==null&&t.type!==i||xl(function(){t.killed||t.dispatch(i,e)})})},s.prototype._on=function(i,e,t,n,r,a){var o=this;if(this._disposed)throw new Error("EventDispatcher is disposed");this._removeExistingListener(i,e,t,n);var l={type:e,callback:t,context:n,shouldClone:r,dispatch:a,killed:!1,once:i,disposer:new le(function(){l.killed=!0,o._removeListener(l)})};return this._listeners.push(l),l},s.prototype.onAll=function(i,e,t){return t===void 0&&(t=!0),this._on(!1,null,i,e,t,function(n,r){return i.call(e,n,r)}).disposer},s.prototype.on=function(i,e,t,n){return n===void 0&&(n=!0),this._on(!1,i,e,t,n,function(r,a){return e.call(t,a)}).disposer},s.prototype.once=function(i,e,t,n){n===void 0&&(n=!0);var r=this._on(!0,i,e,t,n,function(a,o){r.disposer.dispose(),e.call(t,o)});return r.disposer},s.prototype.off=function(i,e,t){this._removeExistingListener(!1,i,e,t)},s.prototype.copyFrom=function(i){var e=this;if(this._disposed)throw new Error("EventDispatcher is disposed");if(i===this)throw new Error("Cannot copyFrom the same TargetedEventDispatcher");j(i._listeners,function(t){!t.killed&&t.shouldClone&&(t.type===null?e.onAll(t.callback,t.context):t.once?e.once(t.type,t.callback,t.context):e.on(t.type,t.callback,t.context))})},s}(),ta=function(s){function i(e){var t=s.call(this)||this;return t.target=e,t}return w(i,s),i.prototype.copyFrom=function(e){var t=this;if(this._disposed)throw new Error("EventDispatcher is disposed");if(e===this)throw new Error("Cannot copyFrom the same TargetedEventDispatcher");j(e._listeners,function(n){n.context!==e.target&&!n.killed&&n.shouldClone&&(n.type===null?t.onAll(n.callback,n.context):n.once?t.once(n.type,n.callback,n.context):t.on(n.type,n.callback,n.context))})},i}(Bt);function Pl(s){return function(i){for(var e in s)if(_t(s,e)&&!i([e,s[e]]))break}}function ia(s){var i=[];for(var e in s)_t(s,e)&&i.push(e);return i}function wl(s,i){return ia(s).sort(i)}function _t(s,i){return{}.hasOwnProperty.call(s,i)}function Du(s,i){return s[i]}function na(s,i){for(var e in s)if(_t(s,e)&&!i(e,s[e]))break}function X(s,i){na(s,function(e,t){return i(e,t),!0})}function At(s,i,e){j(wl(s,e),function(t){i(t,s[t])})}function Tu(s){return Object.assign({},s)}function dr(s,i){return Object.assign({},s,i)}function Cl(s){return JSON.parse(JSON.stringify(s))}function De(s,i,e){j(e,function(t){v(s[t])&&(i[t]=s[t])})}function ku(s,i,e){j(e,function(t){v(s[t])&&!v(i[t])&&(i[t]=s[t])})}function Ol(s,i,e){j(e,function(t){i[t]=s[t]})}function Ei(s,i){De(s,i,ia(s))}function qt(s){return function(i){for(var e=s.length,t=0;t<e&&i(s[t]);++t);}}function Sl(s){var i=0;return s(function(e){return++i,!0}),i}function Ri(s){var i=[];return s(function(e){return i.push(e),!0}),i}function rt(s,i){s(i)}function A(s,i){s(function(e){return i(e),!0})}function yi(s,i){return qt(Ri(s).sort(i))}function ra(s,i){return function(e){return s(function(t){return e(i(t))})}}function Au(s,i){return function(e){return s(function(t){return!i(t)||e(t)})}}function Il(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];return function(e){for(var t=!0,n=function(o){return t=e(o)},r=s.length,a=0;a<r&&(s[a](n),t);++a);}}function Dl(s){return function(i){var e=!0,t=function(n){return e=i(n)};s(function(n){return n(t),e})}}function $t(s){return function(i){var e=0;s(function(t){return i([e++,t])})}}function Vu(s,i){var e=!1,t=0;return s(function(n){return i(n)?(e=!0,!1):(++t,!0)}),e?t:-1}function Tl(s,i){var e;return s(function(t){return!i(t)||(e=t,!1)}),e}function Fu(s,i){var e;return s(function(t){var n=i(t);return n===null||(e=n,!1)}),e}function cr(s,i){var e=!1;return s(function(t){return!i(t)||(e=!0,!1)}),e}function sa(s,i,e){return s(function(t){return i=e(i,t),!0}),i}function Mu(s,i){return s==null||i<s?i:s}function kl(s){return sa(s,null,Mu)}function Lu(s,i){return s==null||i>s?i:s}function Al(s){return sa(s,null,Lu)}function Vl(s,i){i===void 0&&(i="");var e=!0,t="";return s(function(n){return e?e=!1:t+=i,t+=n,!0}),t}var fn=function(){function s(i,e){this.createNewItems=!1,this.list=i,this._create=e,this.reset()}return s.prototype.reset=function(){this._listCopy=Ri(this.list.iterator())},s.prototype.clear=function(){this._listCopy.length=0},s.prototype.getFirst=function(){return this.returnItem(0)},s.prototype.getLast=function(){return this.returnItem(this._listCopy.length-1)},s.prototype.find=function(i){var e=pr(this._listCopy,i);if(e!==-1){var t=this._listCopy[e];return z(this._listCopy,t),t}return this.getLast()},s.prototype.removeItem=function(i){return z(this._listCopy,i)},s.prototype.returnItem=function(i){if(i>=0&&i<this._listCopy.length){var e=this._listCopy[i];return z(this._listCopy,e),e}if(this.createNewItems)return this._create()},s.prototype.iterator=function(){return qt(this._listCopy)},s}();function fr(s,i){return s===i?0:s<i?-1:1}function aa(s,i){return new Array(i+1).join(s)}function Fl(s){for(var i="",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=0;t<s;t++)i+=e.charAt(Math.floor(Math.random()*e.length));return i}var Jt=function(s){function i(e){var t=e.events.on("removed",function(n){n.oldValue.dispose()},void 0,!1);return s.call(this,function(){t.dispose(),A(e.iterator(),function(n){n[1].dispose()})})||this}return w(i,s),i}(le),me=function(){function s(){this.events=new Bt,this._dictionary={}}return s.prototype.hasKey=function(i){return _t(this._dictionary,i)},s.prototype.getKey=function(i){return this._dictionary[i]},s.prototype.insertKey=function(i,e){if(_t(this._dictionary,i))throw new Error("Key "+i+" already exists in dictionary");this._dictionary[i]=e,this.events.isEnabled("insertKey")&&this.events.dispatchImmediately("insertKey",{type:"insertKey",target:this,key:i,newValue:e})},s.prototype.setKey=function(i,e){if(_t(this._dictionary,i)){var t=this._dictionary[i];t!==e&&(this._dictionary[i]=e,this.events.isEnabled("setKey")&&this.events.dispatchImmediately("setKey",{type:"setKey",target:this,key:i,oldValue:t,newValue:e}),this.events.isEnabled("removed")&&this.events.dispatchImmediately("removed",{type:"removed",target:this,oldValue:t}))}else this._dictionary[i]=e,this.events.isEnabled("insertKey")&&this.events.dispatchImmediately("insertKey",{type:"insertKey",target:this,key:i,newValue:e})},s.prototype.updateKey=function(i,e){if(!_t(this._dictionary,i))throw new Error("Key "+i+" doesn't exist in dictionary");var t=this._dictionary[i],n=e(t);t!==n&&(this._dictionary[i]=n,this.events.isEnabled("setKey")&&this.events.dispatchImmediately("setKey",{type:"setKey",target:this,key:i,oldValue:t,newValue:n}),this.events.isEnabled("removed")&&this.events.dispatchImmediately("removed",{type:"removed",target:this,oldValue:t}))},s.prototype.removeKey=function(i){if(_t(this._dictionary,i)){var e=this._dictionary[i];delete this._dictionary[i],this.events.isEnabled("removeKey")&&this.events.dispatchImmediately("removeKey",{type:"removeKey",target:this,key:i,oldValue:e}),this.events.isEnabled("removed")&&this.events.dispatchImmediately("removed",{type:"removed",target:this,oldValue:e})}},s.prototype.insertKeyIfEmpty=function(i,e){return this.hasKey(i)||this.insertKey(i,e()),this.getKey(i)},s.prototype.clear=function(){var i=this;this.events.isEnabled("removed")&&X(this._dictionary,function(e,t){i.events.dispatchImmediately("removed",{type:"removed",target:i,oldValue:t})}),this._dictionary={},this.events.isEnabled("cleared")&&this.events.dispatchImmediately("cleared",{type:"cleared",target:this})},s.prototype.copyFrom=function(i){var e=this;A(i.iterator(),function(t){e.setKey(t[0],t[1])})},s.prototype.iterator=function(){return Pl(this._dictionary)},s.prototype[Symbol.iterator]=function(){var i,e,t,n;return pe(this,function(r){switch(r.label){case 0:for(e in i=[],this._dictionary)i.push(e);t=0,r.label=1;case 1:return t<i.length?(n=i[t],_t(this._dictionary,n)?[4,[n,this._dictionary[n]]]:[3,3]):[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}})},s.prototype.each=function(i){A(this.iterator(),function(e){var t=Ti(e,2),n=t[0],r=t[1];return i(n,r)})},s.prototype.sortedIterator=function(){return yi(this.iterator(),function(i,e){return fr(i[0],e[0])})},s}(),Bi=function(s){function i(e){var t=s.call(this)||this;return t.template=e,t}return w(i,s),Object.defineProperty(i.prototype,"template",{get:function(){return this._template},set:function(e){e.isTemplate=!0,this._template=e},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){var t=this;A(e.iterator(),function(n){t.setKey(n[0],n[1].clone())})},i.prototype.create=function(e){var t=this;return this.insertKeyIfEmpty(e,function(){return t.template.clone()})},i}(me),Ml=function(){function s(){this._storage=new me,this.ttl=1e3}return s.prototype.set=function(i,e,t,n){var r=this._storage.insertKeyIfEmpty(i,function(){return new me}),a={touched:new Date().getTime(),ttl:y(n)?n:this.ttl,value:t};r.setKey(e,a)},s.prototype.get=function(i,e,t){if(t===void 0&&(t=void 0),this._storage.hasKey(i)){var n=this._storage.getKey(i);if(n.hasKey(e)){var r=n.getKey(e);return r.ttl&&r.touched+r.ttl<new Date().getTime()&&(r.expired=!0),r.expired?(n.removeKey(e),t):r.value}return t}return t},s.prototype.clear=function(i){i?this._storage.removeKey(i):this._storage.clear()},s}(),Hi=new Ml,Ll=function(){function s(){var i=this;this.events=new Bt,this.themes=[],this.loadedThemes={},this._uidCount=0,this.registeredClasses={},this._placeholders={},this.invalidSprites={},this.invalidDatas={},this.invalidRawDatas=[],this.invalidDataItems=[],this.invalidDataRange=[],this.invalidPositions={},this.invalidLayouts={},this.baseSprites=[],this.baseSpritesByUid={},this.queue=[],this.deferred=[],this.uid=this.getUniqueId(),this.invalidSprites.noBase=[],this.invalidDatas.noBase=[],this.invalidLayouts.noBase=[],this.invalidPositions.noBase=[],typeof addEventListener!="undefined"&&(addEventListener("beforeprint",function(){j(i.baseSprites,function(e){var t=e.paper.svg;t.setAttribute("viewBox","0 0 "+t.clientWidth+" "+t.clientHeight)})}),addEventListener("afterprint",function(){j(i.baseSprites,function(e){e.paper.svg.removeAttribute("viewBox")})}))}return s.prototype.getUniqueId=function(){var i=this._uidCount;return this._uidCount+=1,"id-"+i},Object.defineProperty(s.prototype,"map",{get:function(){return this._map||(this._map=new me),this._map},enumerable:!0,configurable:!0}),s.prototype.setCache=function(i,e,t){Hi.set(this.uid,i,e,t)},s.prototype.getCache=function(i,e){return e===void 0&&(e=void 0),Hi.get(this.uid,i,e)},s.prototype.dispatch=function(i,e){this.events.isEnabled(i)&&(e?(e.type=i,e.target=e.target||this,this.events.dispatch(i,{type:i,target:this})):this.events.dispatch(i,{type:i,target:this}))},s.prototype.dispatchImmediately=function(i,e){this.events.isEnabled(i)&&(e?(e.type=i,e.target=e.target||this,this.events.dispatchImmediately(i,e)):this.events.dispatchImmediately(i,{type:i,target:this}))},s.prototype.getPlaceholder=function(i){return v(this._placeholders[i])||(this._placeholders[i]="__amcharts_"+i+"_"+Fl(8)+"__"),this._placeholders[i]},s.prototype.addToInvalidComponents=function(i){i.baseId?pt(this.invalidDatas[i.baseId],i):pt(this.invalidDatas.noBase,i)},s.prototype.removeFromInvalidComponents=function(i){i.baseId&&z(this.invalidDatas[i.baseId],i),z(this.invalidDatas.noBase,i)},s.prototype.addToInvalidSprites=function(i){i.baseId?ci(this.invalidSprites[i.baseId],i):ci(this.invalidSprites.noBase,i)},s.prototype.removeFromInvalidSprites=function(i){i.baseId&&z(this.invalidSprites[i.baseId],i),z(this.invalidSprites.noBase,i)},s.prototype.addToInvalidPositions=function(i){i.baseId?ci(this.invalidPositions[i.baseId],i):ci(this.invalidPositions.noBase,i)},s.prototype.removeFromInvalidPositions=function(i){i.baseId&&z(this.invalidPositions[i.baseId],i),z(this.invalidPositions.noBase,i)},s.prototype.addToInvalidLayouts=function(i){i.baseId?ci(this.invalidLayouts[i.baseId],i):ci(this.invalidLayouts.noBase,i)},s.prototype.removeFromInvalidLayouts=function(i){i.baseId&&z(this.invalidLayouts[i.baseId],i),z(this.invalidLayouts.noBase,i)},s}(),_=new Ll;function Ye(s,i){var e=_.registeredClasses[i];return e!=null&&s instanceof e}var oa=function(){function s(i,e,t){this._array=i,this._start=e,this._end=t}return s.prototype.iterator=function(){var i=this;return function(e){if(i._start!==i._end)if(i._start<i._end)for(var t=i._start;t<i._end&&e(i._array[t]);++t);else for(t=i._start-1;t>=i._end&&e(i._array[t]);--t);}},s.prototype.backwards=function(){return new s(this._array,this._end,this._start)},s.prototype.range=function(i,e){if(i<=e){if(this._start===this._end)return this;if(this._start<this._end){var t=e-i;return i=Math.max(this._start+i,this._start),e=Math.min(i+t,this._end),new s(this._array,i,e)}return t=e-i,i=Math.max(this._start-i,this._end),e=Math.max(i-t,this._end),new s(this._array,i,e)}throw new Error("Start index must be lower than end index")},s}(),ju=function(s){function i(e,t,n){var r=s.call(this,[e.events.on("inserted",function(a){var o=a.newValue,l=r._getKey(o),h=0;rt(e.iterator(),function(p){return p!==o&&(r._getKey(p)===l&&++h,!0)}),r._insert(o,l,h)},void 0,!1),e.events.on("removed",function(a){r._remove(a.oldValue)},void 0,!1)])||this;return r._keys=[],r._groups={},r._getKey=t,r._sort=n,A(e.iterator(),function(a){r._insert(a,t(a))}),r}return w(i,s),i.prototype._insert=function(e,t,n){if(this._groups[t]==null){this._groups[t]=[];var r=pn(this._keys,this._sort,t),a=r.found,o=r.index;if(a)throw new Error("Key already exists: "+t);fi(this._keys,o,t)}n==null?this._groups[t].push(e):fi(this._groups[t],n,e)},i.prototype._remove=function(e){var t=this._getKey(e),n=this._groups[t];if(n!=null&&(z(n,e),n.length===0)){delete this._groups[t];var r=pn(this._keys,this._sort,t),a=r.found,o=r.index;if(!a)throw new Error("Key doesn't exist: "+t);gi(this._keys,o)}},i.prototype.iterator=function(){var e=this;return Dl(ra(qt(this._keys),function(t){return qt(e._groups[t])}))},i}(_e),fe=function(s){function i(e,t){t===void 0&&(t=!0);var n=this;if(t){var r=e.events.on("removed",function(a){a.oldValue.dispose()},void 0,!1);n=s.call(this,function(){r.dispose(),A(e.iterator(),function(a){a.dispose()})})||this}else n=s.call(this,function(){A(e.iterator(),function(a){a.dispose()})})||this;return n}return w(i,s),i}(le);function gn(s,i){if(!(s>=0&&s<i))throw new Error("Index out of bounds: "+s)}var re=function(){function s(i){i===void 0&&(i=[]),this.events=new Bt,this._values=i}return Object.defineProperty(s.prototype,"values",{get:function(){return this._values},enumerable:!0,configurable:!0}),s.prototype.contains=function(i){return this._values.indexOf(i)!==-1},s.prototype.removeValue=function(i){for(var e=0,t=this._values.length;e<t;)this._values[e]===i?(this.removeIndex(e),--t):++e},s.prototype.indexOf=function(i){return ht(this._values,i)},Object.defineProperty(s.prototype,"length",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),s.prototype.hasIndex=function(i){return i>=0&&i<this._values.length},s.prototype.getIndex=function(i){return this._values[i]},s.prototype.setIndex=function(i,e){gn(i,this._values.length);var t=this._values[i];return t!==e&&(this._values[i]=e,this.events.isEnabled("setIndex")&&this.events.dispatchImmediately("setIndex",{type:"setIndex",target:this,index:i,oldValue:t,newValue:e}),this.events.isEnabled("removed")&&this.events.dispatchImmediately("removed",{type:"removed",target:this,oldValue:t}),this.events.isEnabled("inserted")&&this.events.dispatchImmediately("inserted",{type:"inserted",target:this,newValue:e})),t},s.prototype.insertIndex=function(i,e){gn(i,this._values.length+1),fi(this._values,i,e),this.events.isEnabled("insertIndex")&&this.events.dispatchImmediately("insertIndex",{type:"insertIndex",target:this,index:i,newValue:e}),this.events.isEnabled("inserted")&&this.events.dispatchImmediately("inserted",{type:"inserted",target:this,newValue:e})},s.prototype._sortQuicksort=function(i,e,t){if(i<e){var n=this._sortPartition(i,e,t);this._sortQuicksort(i,n,t),this._sortQuicksort(n+1,e,t)}},s.prototype._sortPartition=function(i,e,t){for(var n=this._values,r=n[i],a=i-1,o=e+1;;){do++a;while(t(n[a],r)<0);do--o;while(t(n[o],r)>0);if(a>=o)return o;this.swap(a,o)}},s.prototype.sort=function(i){this._sortQuicksort(0,this._values.length-1,i)},s.prototype.swap=function(i,e){var t=this._values.length;if(gn(i,t),gn(e,t),i!==e){var n=this._values[i],r=this._values[e];this._values[i]=r,this.events.isEnabled("setIndex")&&this.events.dispatchImmediately("setIndex",{type:"setIndex",target:this,index:i,oldValue:n,newValue:r}),this._values[e]=n,this.events.isEnabled("setIndex")&&this.events.dispatchImmediately("setIndex",{type:"setIndex",target:this,index:e,oldValue:r,newValue:n})}},s.prototype.removeIndex=function(i){gn(i,this._values.length);var e=this._values[i];return gi(this._values,i),this.events.isEnabled("removeIndex")&&this.events.dispatchImmediately("removeIndex",{type:"removeIndex",target:this,index:i,oldValue:e}),this.events.isEnabled("removed")&&this.events.dispatchImmediately("removed",{type:"removed",target:this,oldValue:e}),e},s.prototype.moveValue=function(i,e){var t=this.indexOf(i);if(t!==-1){var n=this._values[t];gi(this._values,t),this.events.isEnabled("removeIndex")&&this.events.dispatchImmediately("removeIndex",{type:"removeIndex",target:this,index:t,oldValue:n})}e==null?(e=this._values.length,this._values.push(i)):fi(this._values,e,i),this.events.isEnabled("insertIndex")&&this.events.dispatchImmediately("insertIndex",{type:"insertIndex",target:this,index:e,newValue:i}),t===-1&&this.events.isEnabled("inserted")&&this.events.dispatchImmediately("inserted",{type:"inserted",target:this,newValue:i})},s.prototype.push=function(i){var e=this._values.push(i)-1;return this.events.isEnabled("insertIndex")&&this.events.dispatchImmediately("insertIndex",{type:"insertIndex",target:this,index:e,newValue:i}),this.events.isEnabled("inserted")&&this.events.dispatchImmediately("inserted",{type:"inserted",target:this,newValue:i}),i},s.prototype.unshift=function(i){this.insertIndex(0,i)},s.prototype.pushAll=function(i){var e=this;j(i,function(t){e.push(t)})},s.prototype.copyFrom=function(i){this.pushAll(i._values)},s.prototype.pop=function(){return this._values.length-1<0?void 0:this.removeIndex(this._values.length-1)},s.prototype.shift=function(){return this._values.length?this.removeIndex(0):void 0},s.prototype.setAll=function(i){var e=this,t=ji(this._values);this._values.length=0,j(i,function(n){e._values.push(n)}),this.events.isEnabled("setAll")&&this.events.dispatchImmediately("setAll",{type:"setAll",target:this,oldArray:t,newArray:this._values}),this.events.isEnabled("removed")&&j(t,function(n){e.events.dispatchImmediately("removed",{type:"removed",target:e,oldValue:n})}),this.events.isEnabled("inserted")&&j(this._values,function(n){e.events.dispatchImmediately("inserted",{type:"inserted",target:e,newValue:n})})},s.prototype.clear=function(){this.setAll([])},s.prototype.iterator=function(){return qt(this._values)},s.prototype[Symbol.iterator]=function(){var i,e;return pe(this,function(t){switch(t.label){case 0:i=this._values.length,e=0,t.label=1;case 1:return e<i?[4,this._values[e]]:[3,4];case 2:t.sent(),t.label=3;case 3:return++e,[3,1];case 4:return[2]}})},s.prototype.each=function(i){j(this._values,i)},s.prototype.range=function(i,e){if(i<=e){var t=e-i;return i=Math.max(i,0),e=Math.min(i+t,this._values.length),new oa(this._values,i,e)}throw new Error("Start index must be lower than end index")},s.prototype.backwards=function(){return new oa(this._values,this._values.length,0)},s}(),Oe=function(s){function i(e){var t=s.call(this)||this;return t.template=e,t}return w(i,s),Object.defineProperty(i.prototype,"template",{get:function(){return this._template},set:function(e){e.isTemplate=!0,this._template=e},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){var t=this;A(e.iterator(),function(n){t.push(n.clone())})},i.prototype.create=function(e){var t=e!=null?new e:this.template.clone();return this.push(t),t},i.prototype.clone=function(){for(var e=new i(this.template),t=this.values,n=t.length,r=0;r<n;++r)e.push(t[r].clone());return e},i}(re),la=function(){function s(i){this._values=[],this.events=new Bt,i!=null&&this.setAll(i)}return Object.defineProperty(s.prototype,"values",{get:function(){return this._values},enumerable:!0,configurable:!0}),s.prototype._insert=function(i){return this._values.push(i),this._values.length-1},Object.defineProperty(s.prototype,"length",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),s.prototype.indexOf=function(i){return ht(this._values,i)},s.prototype.contains=function(i){return this.indexOf(i)!==-1},s.prototype.getIndex=function(i){return this._values[i]},Object.defineProperty(s.prototype,"first",{get:function(){return this._values[0]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"last",{get:function(){return this._values[this._values.length-1]},enumerable:!0,configurable:!0}),s.prototype.insert=function(i){var e=this._insert(i);this.events.isEnabled("inserted")&&this.events.dispatchImmediately("inserted",{type:"inserted",target:this,index:e,newValue:i})},s.prototype.remove=function(i){var e=this.indexOf(i);if(e!==-1){var t=this._values[e];gi(this._values,e),this.events.isEnabled("removed")&&this.events.dispatchImmediately("removed",{type:"removed",target:this,index:e,oldValue:t})}},s.prototype.setAll=function(i){var e=this;cl(this._values,function(t,n){e._values.pop(),e.events.isEnabled("removed")&&e.events.dispatchImmediately("removed",{type:"removed",target:e,index:n,oldValue:t})}),j(i,function(t){e.insert(t)})},s.prototype.clear=function(){this.setAll([])},s.prototype.slice=function(i,e){var t=new s;return t._values=this._values.slice(i,e),t},s.prototype.findClosestIndex=function(i,e,t){t===void 0&&(t="any");var n,r,a=-1,o=0;return rt(this.iterator(),function(l){var h=e(l);if(t==="any"){if(h===i)return a=o,!1;var p=Math.abs(i-h);(!v(r)||r>p)&&(a=o,n=h,r=p)}else t==="left"&&h<i?(!v(n)||n<h)&&(a=o,n=h):t==="right"&&h>=i&&(!v(n)||n>=h)&&(a=o,n=h);return++o,!0}),a===-1&&(t==="left"?a=0:t==="right"&&(a=this.length-1)),a},s.prototype.iterator=function(){return qt(this._values)},s.prototype[Symbol.iterator]=function(){var i,e;return pe(this,function(t){switch(t.label){case 0:i=this._values.length,e=0,t.label=1;case 1:return e<i?[4,this._values[e]]:[3,4];case 2:t.sent(),t.label=3;case 3:return++e,[3,1];case 4:return[2]}})},s.prototype.each=function(i){j(this._values,i)},s}(),gr=function(s){function i(e){var t=s.call(this)||this;return t._ordering=e,t}return w(i,s),i.prototype._insert=function(e){var t=pn(this._values,this._ordering,e).index;return fi(this._values,t,e),t},i.prototype.indexOf=function(e){var t=pn(this._values,this._ordering,e),n=t.found,r=t.index;return n?r:-1},i.prototype.update=function(e){var t=ht(this._values,e);if(t!==-1){var n=this._values.length-1;(t===0||this._ordering(this._values[t-1],e)<0)&&(t===n||this._ordering(e,this._values[t+1])<0)||(gi(this._values,t),this._insert(e))}},i}(la),yn=function(s){function i(e){var t=s.call(this)||this;return t.template=e,t}return w(i,s),Object.defineProperty(i.prototype,"template",{get:function(){return this._template},set:function(e){e.isTemplate=!0,this._template=e},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){var t=this;A(e.iterator(),function(n){t.insert(n.clone())})},i.prototype.slice=function(e,t){var n=new i(this.template);return n._values=this._values.slice(e,t),n},i.prototype.create=function(e){var t=e!=null?new e:this.template.clone();return this.insert(t),t},i}(la),ha=function(s){function i(e,t){var n=s.call(this,t)||this;return n.template=e,n}return w(i,s),Object.defineProperty(i.prototype,"template",{get:function(){return this._template},set:function(e){e.isTemplate=!0,this._template=e},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){var t=this;A(e.iterator(),function(n){t.insert(n.clone())})},i.prototype.create=function(e){var t=e!=null?new e:this.template.clone();return this.insert(t),t},i}(gr);function Pt(s,i){return s===i?0:s<i?-1:1}function yr(s){switch(s){case 0:return 0;case-1:return 1;case 1:return-1}}function pa(s,i){return s===0?i:s}var jl=function(){function s(){this._callbackId=0,this._callbacks=new gr(function(i,e){return pa(Pt(i.priority,e.priority),Pt(i.id,e.id))})}return s.prototype.addAll=function(i,e,t,n,r){n===void 0&&(n=0),this._callbacks.insert({id:++this._callbackId,key:e,callback:t,priority:n,scope:r,type:i})},s.prototype.isEnabled=function(i,e){return lr(this._callbacks.values,function(t){return t.key===e&&i instanceof t.type})},s.prototype.applyAll=function(i,e,t){var n=this._callbacks.values,r=n.length;if(r==0)return t;for(var a=0;a<r;++a){var o=n[a];o.key===e&&i instanceof o.type&&(t=o.callback.call(o.scope,t,i,e))}return t},s}(),mr=new jl,it=function(){function s(i){this._callbackId=0,this._callbacks=new gr(function(e,t){return pa(Pt(e.priority,t.priority),Pt(e.id,t.id))}),this._disabled={},this.object=i,this.events=this._callbacks.events}return s.prototype.add=function(i,e,t,n){t===void 0&&(t=0),this._callbacks.insert({id:++this._callbackId,key:i,callback:e,priority:t,scope:n})},s.prototype.has=function(i,e,t,n){return t===void 0&&(t=0),cr(this._callbacks.iterator(),function(r){return r.key===i&&r.callback===e&&r.priority===t&&r.scope===n})},s.prototype.remove=function(i,e){var t=this;j(Ri(this._callbacks.iterator()),function(n){n.key!==i||y(e)&&e!==n.priority||t._callbacks.remove(n)})},s.prototype.enableKey=function(i){delete this._disabled[i]},s.prototype.disableKey=function(i,e){e===void 0&&(e=1/0),this._disabled[i]=e},s.prototype._hasListenersByType=function(i){return lr(this._callbacks.values,function(e){return e.key===i})},s.prototype.isEnabled=function(i){return this._disabled[i]==null&&(this._hasListenersByType(i)||mr.isEnabled(this.object,i))},s.prototype._shouldDispatch=function(i){var e=this._disabled[i];return!y(e)||(e<=1?delete this._disabled[i]:--this._disabled[i],!1)},s.prototype.apply=function(i,e){if(this._shouldDispatch(i)){var t=this._callbacks.values,n=t.length;if(n>0)for(var r=0;r<n;++r){var a=t[r];a.key===i&&(e=a.callback.call(a.scope,e,this.object,i))}return mr.applyAll(this.object,i,e)}return e},s.prototype.keys=function(){return Ri(ra(this._callbacks.iterator(),function(i){return i.key}))},s.prototype.copyFrom=function(i){var e=this;A(i._callbacks.iterator(),function(t){e.add(t.key,t.callback,t.priority,t.scope)}),X(i._disabled,function(t,n){e._disabled[t]=n})},s.prototype.clear=function(){this._callbacks.clear()},s}(),El={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgrey:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},grey:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgrey:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},rebeccapurple:{r:102,g:51,b:153},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}};function Rl(s,i){var e;return El[s]?e=El[s]:s.charAt(0)==="#"?e=Bl(s):s.match(/^rgba?\(/)&&(e=Nl(s)),e||(e={r:0,g:0,b:0,a:1}),v(i)&&(e.a=i),e}function Bl(s){s=s.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,r){return t+t+n+n+r+r});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(s);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:Hl(s)}function Hl(s){s=s.replace(/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,r,a){return t+t+n+n+r+r+a+a});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(s);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16),a:parseInt(i[4],16)/256}:void 0}function Nl(s){var i=(s=s.replace(/[ ]/g,"")).match(/^rgb\(([0-9]*),([0-9]*),([0-9]*)\)/i);if(i)i.push("1");else if(!(i=s.match(/^rgba\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\)/i)))return;return{r:parseInt(i[1]),g:parseInt(i[2]),b:parseInt(i[3]),a:parseFloat(i[4])}}function Wl(s){return"#"+vr(s.r.toString(16))+vr(s.g.toString(16))+vr(s.b.toString(16))}function Xl(s){return v(s.a)&&s.a!==1?"rgba("+s.r+","+s.g+","+s.b+","+s.a+")":"rgb("+s.r+","+s.g+","+s.b+")"}function vr(s){return s.length==1?"0"+s:""+s}function mn(s,i,e){return e=R(e,0,1),s?i?{r:s.r+Math.round((i.r-s.r)*e),g:s.g+Math.round((i.g-s.g)*e),b:s.b+Math.round((i.b-s.b)*e),a:(s.a||1)+Math.round(((i.a||1)-(s.a||1))*e)}:s:i||s}function Yl(s,i){return s&&{r:Math.max(0,Math.min(255,s.r+vn(s.r,i))),g:Math.max(0,Math.min(255,s.g+vn(s.g,i))),b:Math.max(0,Math.min(255,s.b+vn(s.b,i))),a:s.a}}function vn(s,i){var e=i>0?255-s:s;return Math.round(e*i)}function zl(s,i){if(s){var e=vn(Math.min(Math.max(s.r,s.g,s.b),230),i);return{r:Math.max(0,Math.min(255,Math.round(s.r+e))),g:Math.max(0,Math.min(255,Math.round(s.g+e))),b:Math.max(0,Math.min(255,Math.round(s.b+e))),a:s.a}}return s}function Eu(s,i){return Math.round(255*i)}function Ul(s,i){if(s==null||i==1)return s;var e=bn(s);return e.s=i,ua(e)}function ua(s){var i,e,t,n=s.h,r=s.s,a=s.l;if(r==0)i=e=t=a;else{var o=function(p,u,d){return d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?p+6*(u-p)*d:d<.5?u:d<.6666666666666666?p+(u-p)*(.6666666666666666-d)*6:p},l=a<.5?a*(1+r):a+r-a*r,h=2*a-l;i=o(h,l,n+1/3),e=o(h,l,n),t=o(h,l,n-1/3)}return{r:Math.round(255*i),g:Math.round(255*e),b:Math.round(255*t)}}function bn(s){var i=s.r/255,e=s.g/255,t=s.b/255,n=Math.max(i,e,t),r=Math.min(i,e,t),a=0,o=0,l=(n+r)/2;if(n===r)a=o=0;else{var h=n-r;switch(o=l>.5?h/(2-n-r):h/(n+r),n){case i:a=(e-t)/h+(e<t?6:0);break;case e:a=(t-i)/h+2;break;case t:a=(i-e)/h+4}a/=6}return{h:a,s:o,l}}function Ru(s){var i,e=s.r/255,t=s.g/255,n=s.b/255,r=Math.max(e,t,n),a=Math.min(e,t,n),o=0,l=r,h=r-a;if(i=r==0?0:h/r,r==a)o=0;else{switch(r){case e:o=(t-n)/h+(t<n?6:0);break;case t:o=(n-e)/h+2;break;case n:o=(e-t)/h+4}o/=6}return{h:o,s:i,v:l}}function Bu(s){var i=0,e=0,t=0,n=s.h,r=s.s,a=s.v,o=Math.floor(6*n),l=6*n-o,h=a*(1-r),p=a*(1-l*r),u=a*(1-(1-l)*r);switch(o%6){case 0:i=a,e=u,t=h;break;case 1:i=p,e=a,t=h;break;case 2:i=h,e=a,t=u;break;case 3:i=h,e=p,t=a;break;case 4:i=u,e=h,t=a;break;case 5:i=a,e=h,t=p}return{r:Math.round(255*i),g:Math.round(255*e),b:Math.round(255*t)}}function Gl(s){return(299*s.r+587*s.g+114*s.b)/1e3>=128}var se=function(){function s(i){this._value=i}return Object.defineProperty(s.prototype,"rgb",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hex",{get:function(){return this._value?Wl(this._value):"none"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rgba",{get:function(){return this._value?Xl(this._value):"none"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"alpha",{get:function(){return this._value!=null&&this._value.a!=null?this._value.a:1},set:function(i){this._value&&(this._value.a=i)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"lightColor",{get:function(){return this._lightColor||(this._lightColor=new s({r:255,g:255,b:255})),this._lightColor},set:function(i){this._lightColor=i},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"darkColor",{get:function(){return this._darkColor||(this._darkColor=new s({r:0,g:0,b:0})),this._darkColor},set:function(i){this._darkColor=i},enumerable:!0,configurable:!0}),s.prototype.toString=function(){return this.alpha<1?this.rgba:this.hex},s.prototype.lighten=function(i){return new s(Yl(this.rgb,i))},s.prototype.brighten=function(i){return new s(zl(this.rgb,i))},s.prototype.saturate=function(i){return new s(Ul(this.rgb,i))},Object.defineProperty(s.prototype,"alternative",{get:function(){if(this.rgb!=null)return Gl(this.rgb)?this.darkColor:this.lightColor;throw new Error("Color does not exist")},enumerable:!0,configurable:!0}),s}();function B(s,i){if(!v(s))return new se(void 0);if(typeof s=="string"){var e="_color_"+s+"_"+(i||"1"),t=_.getCache(e);if(t)return new se({r:t.r,g:t.g,b:t.b,a:t.a});var n=Rl(s,i);return _.setCache(e,n),new se(n)}return s instanceof se?(v(i)&&(s.alpha=i),s):new se(s)}function Kl(s){return s instanceof se}function Zl(s){return B(s)}function ft(s){return v(s)&&!Kl(s)?Zl(s):s}var Ke=function(){function s(){this._disposed=!1,this._disposers=[],this.className="BaseObject"}return s.prototype.debug=function(){},Object.defineProperty(s.prototype,"uid",{get:function(){return this._uid||(this._uid=_.getUniqueId(),_.map.setKey(this._uid,this)),this._uid},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"id",{get:function(){return this._id},set:function(i){this._id=i},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"map",{get:function(){return this._map||(this._map=new me),this._map},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"delayedMap",{get:function(){return this._delayedMap||(this._delayedMap=new me),this._delayedMap},enumerable:!0,configurable:!0}),s.prototype.addDelayedMap=function(i,e){var t=this.delayedMap;t.hasKey(e)||t.setKey(e,[]),t.getKey(e).push({property:i,target:this})},s.prototype.processDelayedMap=function(){var i=this;this.delayedMap.each(function(e,t){if(i.map.hasKey(e)){var n=i.map.getKey(e);j(t,function(r){r.target[r.property]=n}),i.delayedMap.removeKey(e)}})},s.prototype.applyTheme=function(){var i=this;if(_){var e=this.getCurrentThemes();e&&j(e,function(t,n){t(i)})}},Object.defineProperty(s.prototype,"themes",{get:function(){return this._themes},set:function(i){this._themes=i},enumerable:!0,configurable:!0}),s.prototype.getCurrentThemes=function(){return this.themes||_.themes},s.prototype.isDisposed=function(){return this._disposed},s.prototype.dispose=function(){if(!this._disposed){this._disposed=!0;var i=this._disposers;for(this._disposers=null;i.length!==0;)i.shift().dispose();this.clearCache(),this.clonedFrom&&this.clonedFrom.clones.removeValue(this);var e=this._uid;e!=null&&_.map.removeKey(e)}},s.prototype.addDisposer=function(i){this._disposers.push(i)},s.prototype.removeDispose=function(i){if(!this._disposed){var e=ht(this._disposers,i);e>-1&&this._disposers.splice(e,1)}i.dispose()},s.prototype.clone=function(i){i||(i="clone-"+_.getUniqueId());var e=new this.constructor;return e.cloneId=i,e.copyFrom(this),e},Object.defineProperty(s.prototype,"clones",{get:function(){return this._clones||(this._clones=new re),this._clones},enumerable:!0,configurable:!0}),s.prototype.copyFrom=function(i){i.clones.push(this),this.clonedFrom=i},Object.defineProperty(s.prototype,"className",{get:function(){return this._className},set:function(i){this._className=i},enumerable:!0,configurable:!0}),s.prototype.setCache=function(i,e,t){Hi.set(this.uid,i,e,t)},s.prototype.getCache=function(i,e){return e===void 0&&(e=void 0),Hi.get(this.uid,i,e)},s.prototype.clearCache=function(){Hi.clear(this.uid)},s.prototype.setTimeout=function(i,e){var t=this,n=setTimeout(function(){t.removeDispose(r),i()},e),r=new le(function(){clearTimeout(n)});return this._disposers.push(r),r},s.prototype.setInterval=function(i,e){var t=this,n=setInterval(function(){t.removeDispose(r),i()},e),r=new le(function(){clearTimeout(n)});return this._disposers.push(r),r},Object.defineProperty(s.prototype,"config",{set:function(i){try{this.processConfig(i)}catch(e){this.raiseCriticalError(e)}},enumerable:!0,configurable:!0}),s.prototype.processConfig=function(i){var e=this;if(i){var t=this;if(At(i,function(r,a){var o,l=a;if(r=="callback"&&typeof a=="function"&&a.call(t),e.hasProperty(r))if(!ye(l)||!v(l.type)||ye(t[r])&&v(t[r].className)&&!l.forceCreate&&t[r].className==l.type||e.asIs(r)?o=t[r]:(o=e.createClassInstance(l.type))?t[r]=o:o=t[r],o instanceof it)e.processAdapters(o,l);else if(o instanceof Bt)e.processEvents(o,l);else if(r=="locale"&&J(l))window["am4lang_"+l]&&(t[r]=window["am4lang_"+l]);else if(r=="parent"&&J(l)){var h=e.map.getKey(l);h?t[r]=h:e.addDelayedMap("parent",l)}else if(e.asIs(r))t[r]=l;else if(e.asFunction(r)&&J(l)){if(!v(_.registeredClasses[l]))throw Error("Invalid easing function: "+l);t[r]=_.registeredClasses[l]}else if(l instanceof s)t[r]=l;else if(o instanceof s)o.config=l;else if(o instanceof Oe||o instanceof yn||o instanceof ha){if(Ae(l))o instanceof Oe?e.processListTemplate(l,o):e.processOrderedTemplate(l,o);else if(ye(l))if(l instanceof s)o.template=l;else{var p;p=v(l.template)?l.template:l,o.template instanceof s?o.template.config=p:X(p,function(u,d){var c=o.template[u];c instanceof it?e.processAdapters(c,d):c instanceof Bt?e.processEvents(c,d):c instanceof Bi?e.processDictionaryTemplate(c,d):o.template[u]instanceof s?o.template[u].config=d:ye(d)&&v(d.type)?(c=e.createClassInstance(d.type))?(c instanceof s&&(c.config=d),o.template[u]=c):o.template[u]=d:c instanceof re?e.processList(d,c):o.template[u]=e.maybeColorOrPercent(d)}),v(l.values)&&(o instanceof Oe?e.processListTemplate(l.values,o):e.processOrderedTemplate(l.values,o))}}else o instanceof re?r=="children"?e.processList(l,o,e):e.processList(l,o):o instanceof Bi?e.processDictionaryTemplate(o,l):o instanceof me?e.processDictionary(o,l):o instanceof se||o instanceof te?t[r]=e.maybeColorOrPercent(l):ye(o)&&ye(l)?Ei(l,o):(l=e.maybeColorOrPercent(l),t[r]=l);else e.isReserved(r)||(t[r]=l)},this.configOrder),this.processingErrors.length){var n=this.processingErrors.join(`
- `);throw this._processingErrors=[],Error(n)}}},s.prototype.maybeColorOrPercent=function(i){if(J(i)){if(i.match(/^[\-]?[0-9.]+\%$/))return F(ce(i));if(i.match(/^\#[0-9abcdef]{3,}$/i))return B(i)}return i},s.prototype.processAdapters=function(i,e){var t=this;Ae(e)?j(e,function(n,r){i.add(n.key,n.callback,n.priority||0,t)}):ye(e)&&X(e,function(n,r){i.has(n,r)||i.add(n,r)})},s.prototype.processEvents=function(i,e){var t=this;Ae(e)?j(e,function(n,r){i.on(n.type,n.callback,t)}):ye(e)&&X(e,function(n,r){i.has(n,r)||i.on(n,r)})},s.prototype.processDictionaryTemplate=function(i,e){ye(e)&&X(e,function(t,n){var r;(r=t=="template"?i.template:i.hasKey(t)?i.getKey(t):i.create(t))instanceof s?r.config=n:ye(r)&&ye(n)?Ei(n,r):r.setKey(t,n)})},s.prototype.processDictionary=function(i,e){ye(e)&&X(e,function(t,n){i.setKey(t,n)})},s.prototype.processListTemplate=function(i,e){var t=this;for(j(i,function(n,r){var a,o=t.getConfigEntryType(n);if(e.hasIndex(r)&&!n.forceCreate)a=e.getIndex(r);else{if(n instanceof s)return void e.push(n);a=o?e.create(o):e.create()}n===a||ye(n)&&(a instanceof s?a.config=n:ye(a)&&ye(n)?Ei(n,a):e.setIndex(e.indexOf(a),n))});i.length>e.length;)e.pop()},s.prototype.processOrderedTemplate=function(i,e){var t=this;j(i,function(n,r){var a,o=t.getConfigEntryType(n);a=o?e.create(o):e.create(),ye(n)&&(a instanceof s?a.config=n:ye(a)&&ye(n)?Ei(n,a):e.insert(n))})},s.prototype.processList=function(i,e,t){var n=this;Ae(i)||(i=[i]);var r=e.length,a=0;for(j(i,function(o,l){if(ye(o)){var h=void 0;if(l<r&&!o.forceCreate)h=e.getIndex(l);else{if(o instanceof s)return void e.push(o);a++,h=n.createEntryInstance(o),t?h.parent=t:e.push(h)}h instanceof s?h.config=o:ye(h)&&ye(o)&&Ei(o,h)}else e.hasIndex(l)?e.setIndex(l,o):e.push(o)});!t&&i.length+a<e.length;)e.pop()},s.prototype.configOrder=function(i,e){return i==e?0:i=="language"?-1:e=="language"?1:0},s.prototype.asIs=function(i){return ht(["locale"],i)!=-1},s.prototype.asFunction=function(i){return!1},s.prototype.createClassInstance=function(i){if(v(_.registeredClasses[i]))return new _.registeredClasses[i];throw Error('Invalid type: "'+i+'".')},s.prototype.createEntryInstance=function(i){var e;return v(i.type)&&(e=this.createClassInstance(i.type)),e||i},s.prototype.getConfigEntryType=function(i){if(v(i.type)){if(v(_.registeredClasses[i.type]))return _.registeredClasses[i.type];throw Error('Invalid type: "'+i.type+'".')}},s.prototype.hasProperty=function(i){return i in this},s.prototype.isReserved=function(i){return["type","forceCreate"].indexOf(i)!==-1},Object.defineProperty(s.prototype,"processingErrors",{get:function(){return this._processingErrors||(this._processingErrors=[]),this._processingErrors},enumerable:!0,configurable:!0}),s}(),wt=function(s){function i(){var e=s.call(this)||this;return e.className="BaseObjectEvents",e}return w(i,s),Object.defineProperty(i.prototype,"events",{get:function(){return this._eventDispatcher||(this._eventDispatcher=new Bt,this._disposers.push(this._eventDispatcher)),this._eventDispatcher},enumerable:!0,configurable:!0}),i.prototype.dispatch=function(e,t){this._eventDispatcher&&this.events.isEnabled(e)&&(t?(t.type=e,t.target=t.target||this,this.events.dispatch(e,{type:e,target:this})):this.events.dispatch(e,{type:e,target:this}))},i.prototype.dispatchImmediately=function(e,t){this._eventDispatcher&&this.events.isEnabled(e)&&(t?(t.type=e,t.target=t.target||this,this.events.dispatchImmediately(e,t)):this.events.dispatchImmediately(e,{type:e,target:this}))},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),e._eventDispatcher&&this.events.copyFrom(e._eventDispatcher)},i}(Ke),Hu="px",da="string",xn="number",_n="date",br="duration",st="__\xA7\xA7\xA7__",mi="__\xA7\xA7\xA7\xA7__";function Nu(s){}function Vt(s,i){return X(s,function(e,t){v(t)&&(i[e]=t)}),i}function ca(s){return/^[^#]*/.exec(s)[0]}function Ni(){var s="#";if(/apple/i.test(navigator.vendor)){var i=document.baseURI;if(i){i=ca(i);var e=ca(location.href);i!==e&&(s=e+s)}}return s}function Wu(s,i){return X(s,function(e,t){v(t)&&!v(i[e])&&(i[e]=t)}),i}function ql(s,i){return X(s,function(e,t){i[e]=t}),i}function Pn(s){return v(s)&&s.toString()!==""}function xe(s,i){return y(s)?s:s!=null&&y(s.value)&&y(i)?i*s.value:0}function Re(s,i,e){var t;return y(s)?(t=s)<0&&(t=e?i+t:i-t):s!=null&&y(s.value)&&(t=i*s.value),t}function Xu(s,i){return s instanceof te?s.value:s/i}function $l(){return window.devicePixelRatio||1}function Yu(s){return s.replace(/\W+/g,"-").replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase()}function wn(s){var i=s.split("");return i[0]=i[0].toUpperCase(),i.join("")}function fa(s){return JSON.stringify(s)}function xr(s){return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function _r(s,i,e,t,n){if(s.length<=i)return[s];var r=[];if(e){for(var a=-1,o=s.replace(/([,;:!?\\\/]+|[\s])/g,st+"$1"+st).split(st),l=1;l<o.length;l++)(h=o[l])!="."&&h!=","||!o[l-1].match(/[\w]+$/)||(o[l-1]+=h,o[l]="");for(l=0;l<o.length;l++){var h,p=(h=o[l]).length;if(p!==0){if(p>i&&(e!==!0||n!=0)){if(t&&(h=wr(h)),d=h.match(new RegExp(".{1,"+i+"}","g"))){if(t)for(var u=0;u<d.length;u++)d[u]=wr(d[u]);r=r.concat(d)}}else a===-1&&(r.push(""),a=0),r[a].length+p+1>i&&r[a]!==""&&(r.push(""),a++),r[a]+=h;a=r.length-1}}}else{var d;if(d=s.match(new RegExp(".{1,"+i+"}","g"))){if(t)for(u=0;u<d.length;u++)d[u]=wr(d[u]);r=d}}return r.length==1&&e&&n&&r[0].length>i&&(r=[]),r}function Pr(s,i,e,t,n){return s.length<=i?s:((i-=e.length)<1&&(i=1),(_r(s,i,t,n)[0]||"")+e)}function ga(s){return s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function Jl(s){return s.replace(/[\s\uFEFF\xA0]+$/g,"")}function Ql(s){return s.replace(/^[\s\uFEFF\xA0]+/g,"")}function wr(s){return s.split("").reverse().join("")}function zu(s){var i=s.trim();return(i=s.replace(/^'(.*)'$/,"$1"))==s&&(i=s.replace(/^"(.*)"$/,"$1")),i}function ze(s,i,e){return i===void 0&&(i=0),e===void 0&&(e="0"),typeof s!="string"&&(s=s.toString()),i>s.length?Array(i-s.length+1).join(e)+s:s}function eh(s){if(s===void 0)return da;var i=(s=(s=(s=s.toLowerCase().replace(/^\[[^\]]*\]/,"")).replace(/\[[^\]]+\]/,"")).trim()).match(/\/(date|number|duration)$/);return i?i[1]:s===xn?xn:s===_n?_n:s===br?br:s.match(/[#0]/)?xn:s.match(/[ymwdhnsqaxkzgtei]/)?_n:da}function Cn(s){return s.replace(/\/(date|number|duration)$/i,"")}function ya(s){return s&&s.replace(/<[^>]*>/g,"")}function Cr(s){return s&&ya((""+s).replace(/[\n\r]+/g,". "))}function th(s){if(Fe(s))return"NaN";if(s===1/0)return"Infinity";if(s===-1/0)return"-Infinity";if(s===0&&1/s==-1/0)return"-0";var i=s<0;s=Math.abs(s);var e,t=be(/^([0-9]+)(?:\.([0-9]+))?(?:e[\+\-]([0-9]+))?$/.exec(""+s)),n=t[1],r=t[2]||"";if(t[3]==null)e=r===""?n:n+"."+r;else{var a,o=+t[3];e=s<1?"0."+aa("0",a=o-1)+n+r:(a=o-r.length)==0?n+r:a<0?n+r.slice(0,a)+"."+r.slice(a):n+r+aa("0",a)}return i?"-"+e:e}function ma(s){if(ki(s)){var i=new Date(s);return i.setMilliseconds(s.getMilliseconds()),i}if(y(s))return new Date(s);var e=Number(s);return y(e)?new Date(e):new Date(s)}function Or(s){if(ki(s))return s.getTime();if(y(s))return s;if(J(s)){var i=Number(s);return y(i)?i:void 0}}function va(s,i){var e=new Date(s.getFullYear(),0,0),t=s.getTime()-e.getTime()+60*(e.getTimezoneOffset()-s.getTimezoneOffset())*1e3;return Math.floor(t/864e5)}function Wi(s,i){var e=new Date(Date.UTC(s.getFullYear(),s.getMonth(),s.getDate())),t=e.getUTCDay()||7;e.setUTCDate(e.getUTCDate()+4-t);var n=new Date(Date.UTC(e.getUTCFullYear(),0,1));return Math.ceil(((e.getTime()-n.getTime())/864e5+1)/7)}function ih(s,i){var e=Wi(new Date(s.getFullYear(),s.getMonth(),1)),t=Wi(s);return t==1&&(t=53),t-e+1}function nh(s,i,e,t){e===void 0&&(e=1),t===void 0&&(t=!1);var n=new Date(i,0,4,0,0,0,0);return t&&n.setUTCFullYear(i),7*s+e-((n.getDay()||7)+3)}function On(s,i){return s>12?s-=12:s===0&&(s=12),v(i)?s+(i-1):s}function Sn(s,i,e,t){if(i===void 0&&(i=!1),e===void 0&&(e=!1),t===void 0&&(t=!1),t)return i?"Coordinated Universal Time":"UTC";var n=s.toLocaleString("UTC"),r=s.toLocaleString("UTC",{timeZoneName:i?"long":"short"}).substr(n.length);return e===!1&&(r=r.replace(/ (standard|daylight|summer|winter) /i," ")),r}function Uu(s,i){return Math.floor(Math.random()*(i-s))+s}function Sr(s,i,e){return s>e?e:s<i?i:s}function Ir(s,i,e){var t=e-i;return(s>e||s<i)&&(s=i+(s-t*Math.floor(s/t))),s}function at(s,i){var e=s.x,t=s.y,n=[];if(i){for(;v(i.parent);)n.push(i),i=i.parent;n.reverse();for(var r=0;r<n.length;r++){var a=n[r],o=a.rotation,l=e-a.pixelX-a.ex,h=t-a.pixelY-a.ey;a.dx&&(e-=a.dx),a.dy&&(t-=a.dy);var p=a.scale;a.group&&(p=a.group.scale),e=(L(-o)*l-M(-o)*h)/p-a.pixelPaddingLeft,t=(L(-o)*h+M(-o)*l)/p-a.pixelPaddingTop}}return{x:e,y:t}}function ut(s,i){var e=s.x,t=s.y;if(i)for(;v(i.parent);){var n=i.rotation;e+=i.pixelPaddingLeft+i.ex,t+=i.pixelPaddingTop+i.ey;var r=i.scale;i.group&&(r=i.group.scale);var a=i.pixelX+(e*L(n)-t*M(n))*r,o=i.pixelY+(e*M(n)+t*L(n))*r;i.dx&&(a+=i.dx),i.dy&&(o+=i.dy),e=a,t=o,i=i.parent}return{x:e,y:t}}function Qe(s,i,e){return at(ut(s,i),e)}function Gu(s,i){var e=at(s,i),t=at({x:s.x+s.width,y:s.y+s.height},i);return{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function Dr(s,i){var e=ut(s,i),t=ut({x:s.x+s.width,y:s.y+s.height},i);return{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function Ht(s,i,e){try{var t=i.getBoundingClientRect();return y(e)||(e=1),{x:(s.x-t.left)/e,y:(s.y-t.top)/e}}catch{return s}}function ba(s,i){try{var e=i.getBoundingClientRect();return{x:s.x+e.left,y:s.y+e.top}}catch{return s}}function vi(s,i){return i&&i.htmlContainer?at(Ht(s,be(i.htmlContainer),i.svgContainer.cssScale),i):s}function Tr(s,i){return i&&i.htmlContainer?ba(ut(s,i),be(i.htmlContainer)):s}function rh(s){var i=getComputedStyle(s),e=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),t=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth);return s.clientWidth-e-t}function sh(s){var i=getComputedStyle(s),e=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),t=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth);return s.clientHeight-e-t}function ah(s){var i=(""+s).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return i?Math.max(0,(i[1]?i[1].length:0)-(i[2]?+i[2]:0)):0}var Ku=/^([a-zA-Z][a-zA-Z0-9\+\.\-]*:)?(?:(\/\/)([^\@]+\@)?([^\/\?\#\:]*)(\:[0-9]+)?)?([^\?\#]*)(\?[^\#]*)?(\#.*)?$/;function xa(s){var i=Ku.exec(s);return{protocol:i&&i[1]||"",separator:i&&i[2]||"",authority:i&&i[3]||"",domain:i&&i[4]||"",port:i&&i[5]||"",path:i&&i[6]||"",query:i&&i[7]||"",hash:i&&i[8]||""}}function _a(s){return s.protocol+s.separator+s.authority+s.domain+s.port+s.path+s.query+s.hash}function oh(s){return s.protocol===""&&s.separator===""&&s.authority===""&&s.domain===""&&s.port===""}function kr(s,i){var e=xa(s),t=xa(i);if(oh(e))throw new Error("Left URL is not absolute");if(oh(t)){if(t.path!=="")if(t.path[0]==="/")e.path=t.path;else{var n=e.path.split(/\//),r=t.path.split(/\//);if(n.length===0?r.length!==0&&n.push(""):n.length>1&&n.pop(),yl(n,r),e.path=n.join("/"),e.path!==""&&e.path[0]!=="/")throw new Error("URL path must start with /")}return e.query=t.query,e.hash=t.hash,_a(e)}return _a(t)}function Xi(){return!!window.MSInputMethodContext&&!!document.documentMode}function Pa(s){return+s}function lh(s){return s*s}function hh(s){return s*(2-s)}function ph(s){return((s*=2)<=1?s*s:--s*(2-s)+1)/2}function wa(s,i){return Math.pow(s,i)}function Ca(s,i){return 1-Math.pow(1-s,i)}function Oa(s,i){return((s*=2)<=1?Math.pow(s,i):2-Math.pow(2-s,i))/2}function uh(s){return wa(s,3)}function Ar(s){return Ca(s,3)}function dh(s){return Oa(s,3)}function ch(s){return Math.pow(2,10*s-10)}function fh(s){return 1-Math.pow(2,-10*s)}function gh(s){return((s*=2)<=1?Math.pow(2,10*s-10):2-Math.pow(2,10-10*s))/2}function yh(s){return 1-Math.cos(s*Hs)}function Sa(s){return Math.sin(s*Hs)}function mh(s){return(1-Math.cos(an*s))/2}function Ia(s){return s*s*s}function Qt(s){return--s*s*s+1}function vh(s){return((s*=2)<=1?s*s*s:(s-=2)*s*s+2)/2}function bh(s){return 1-Math.sqrt(1-s*s)}function xh(s){return Math.sqrt(1- --s*s)}function _h(s){return((s*=2)<=1?1-Math.sqrt(1-s*s):Math.sqrt(1-(s-=2)*s)+1)/2}_.registeredClasses["ease.linear"]=Pa,_.registeredClasses["ease.quadIn"]=lh,_.registeredClasses["ease.quadOut"]=hh,_.registeredClasses["ease.quadInOut"]=ph,_.registeredClasses["ease.polyIn"]=wa,_.registeredClasses["ease.polyOut"]=Ca,_.registeredClasses["ease.polyInOut"]=Oa,_.registeredClasses["ease.polyIn3"]=uh,_.registeredClasses["ease.polyOut3"]=Ar,_.registeredClasses["ease.polyInOut3"]=dh,_.registeredClasses["ease.expIn"]=ch,_.registeredClasses["ease.expOut"]=fh,_.registeredClasses["ease.expInOut"]=gh,_.registeredClasses["ease.sinIn"]=yh,_.registeredClasses["ease.sinOut"]=Sa,_.registeredClasses["ease.sinInOut"]=mh,_.registeredClasses["ease.cubicIn"]=Ia,_.registeredClasses["ease.cubicOut"]=Qt,_.registeredClasses["ease.cubicInOut"]=vh,_.registeredClasses["ease.circleIn"]=bh,_.registeredClasses["ease.circleOut"]=xh,_.registeredClasses["ease.circleInOut"]=_h;var Vr=7.5625;function Ph(s){return 1-In(1-s)}function In(s){return(s=+s)<.36363636363636365?Vr*s*s:s<.7272727272727273?Vr*(s-=.5454545454545454)*s+.75:s<.9090909090909091?Vr*(s-=.8181818181818182)*s+.9375:Vr*(s-=.9545454545454546)*s+.984375}function wh(s){return((s*=2)<=1?1-In(1-s):In(s-1)+1)/2}_.registeredClasses["ease.bounceIn"]=Ph,_.registeredClasses["ease.bounceOut"]=In,_.registeredClasses["ease.bounceInOut"]=wh;var Dn=.3/(2*Math.PI),Fr=Math.asin(1)*Dn;function Ch(s){return 1*Math.pow(2,10*--s)*Math.sin((Fr-s)/Dn)}function Oh(s){return 1-1*Math.pow(2,-10*(s=+s))*Math.sin((s+Fr)/Dn)}function Sh(s){return((s=2*s-1)<0?1*Math.pow(2,10*s)*Math.sin((Fr-s)/Dn):2-1*Math.pow(2,-10*s)*Math.sin((Fr+s)/Dn))/2}_.registeredClasses["ease.elasticIn"]=Ch,_.registeredClasses["ease.elasticOut"]=Oh,_.registeredClasses["ease.elasticInOut"]=Sh;var Tn=function(s){function i(){var e=s.call(this)||this;return e.transitionDuration=0,e.transitionEasing=Qt,e.properties={},e.propertyFields={},e.filters=new re,e.isTemplate=!1,e.className="SpriteState",e._disposers.push(new fe(e.filters)),e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"adapter",{get:function(){var e=this;return this._adapterO||(this._adapterO=new it(this),this._adapterO.events.on("inserted",function(t){e[t.newValue.key]=e[t.newValue.key]},void 0,!1),this._adapterO.events.on("removed",function(t){e[t.newValue.key]=e[t.newValue.key]},void 0,!1)),this._adapterO},enumerable:!0,configurable:!0}),i.prototype.getPropertyValue=function(e){var t=this.properties[e],n=this.sprite;if(n){var r=this.propertyFields[e];if(v(r)&&(n.dataItem&&(t=n.dataItem.dataContext[r]),t==null&&(t="__unset")),v(t))this._adapterO&&(t=this._adapterO.apply(e,t));else{var a=n.getPropertyValue(e);(t=this._adapterO?this._adapterO.apply(e,a):a)==a&&(t=void 0)}}return t},i.prototype.copyFrom=function(e){e&&e!=this&&(this.transitionDuration=e.transitionDuration,this.transitionEasing=e.transitionEasing,Vt(e.properties,this.properties),Vt(e.propertyFields,this.propertyFields),this.filters.copyFrom(e.filters),e._adapterO&&this.adapter.copyFrom(e._adapterO))},Object.defineProperty(i.prototype,"allValues",{get:function(){var e=this,t={};return X(this.properties,function(n,r){t[n]=e.getPropertyValue(n)}),this._adapterO&&X(this._adapterO.keys(),function(n,r){var a=e.getPropertyValue(r);t[r]=a}),X(this.propertyFields,function(n){var r=e.getPropertyValue(n);t[n]=r}),t},enumerable:!0,configurable:!0}),i.prototype.reset=function(){this.properties={},this.filters.clear()},i.prototype.processConfig=function(e){v(e)&&v(e.properties)&&X(e.properties,function(t,n){J(n)&&(n.match(/^[0-9.\-]+\%$/)?e.properties[t]=F(ce(n)):n.match(/^\#[0-9abcdef]{3,}$/i)&&(e.properties[t]=ft(n)))}),s.prototype.processConfig.call(this,e)},i.prototype.asFunction=function(e){return e=="transitionEasing"||s.prototype.asIs.call(this,e)},i}(Ke);_.registeredClasses.SpriteState=Tn;var Ih=function(s){function i(){var e=s!==null&&s.apply(this,arguments)||this;return e._interactionEvents=new me,e}return w(i,s),i.prototype._dispatchSpriteEvent=function(e){if(!this.target.disabled&&!this.target.isTemplate&&this.target.events.isEnabled(e.type)){var t=dr(e,{target:this.target});this.target.events.dispatchImmediately(t.type,t)}},i.prototype._dispatchSpritePointEvent=function(e){if(!this.target.disabled&&!this.target.isTemplate&&this.target.events.isEnabled(e.type)){var t=dr(e,{target:this.target,spritePoint:e.point?vi(e.point,this.target):void 0,svgPoint:this.target.getSvgPoint(e.point)});this.target.events.dispatchImmediately(t.type,t)}},i.prototype._addInteractionObjectEvent=function(e,t,n,r){var a=this,o=r+"-"+e;return this._interactionEvents.insertKeyIfEmpty(o,function(){var l=a.target.interactions.events.on(e,t,n,r);return new un(function(){a._interactionEvents.removeKey(o),l.dispose()})}).increment()},i.prototype._on=function(e,t,n,r,a,o){var l=s.prototype._on.call(this,e,t,n,r,a,o),h=[l.disposer];switch(t){case"hit":case"track":case"doublehit":case"wheel":case"wheelup":case"wheeldown":case"wheelleft":case"wheelright":h.push(this._addInteractionObjectEvent(t,this._dispatchSpritePointEvent,this,a));break;case"rightclick":case"down":case"up":case"drag":case"dragged":case"dragstart":case"dragstop":case"over":case"out":case"swipe":case"swipeleft":case"swiperight":case"resize":case"focus":case"blur":case"toggled":h.push(this._addInteractionObjectEvent(t,this._dispatchSpriteEvent,this,a))}switch(t){case"hit":case"doublehit":case"rightclick":case"down":case"up":this.target.clickable=!0;break;case"toggled":this.target.togglable=!0;break;case"drag":case"dragstart":case"dragstop":this.target.draggable=!0;break;case"track":this.target.trackable=!0;break;case"resize":this.target.resizable=!0;break;case"swipe":case"swipeleft":case"swiperight":this.target.swipeable=!0;break;case"wheel":case"wheelup":case"wheeldown":case"wheelleft":case"wheelright":this.target.wheelable=!0;break;case"over":this.target.hoverable=!0;case"out":this.target.hoverable=!0;break;case"focus":case"blur":this.target.focusable=!0}return l.disposer=new _e(h),l},i}(ta),Dh=function(){function s(){}return s.opacity=1,s.strokeOpacity=1,s.strokeWidth=1,s.fillOpacity=1,s.fill=B("#000000"),s.stroke=B("#000000"),s.focusable=void 0,s.tabindex=0,s}(),Z={verbose:!0,commercialLicense:!1,classNamePrefix:"amcharts-",autoSetClassName:!1,minPolylineStep:.5,onlyShowOnViewport:!1,queue:!1,autoDispose:!1,licenses:[],suppressErrors:!1,suppressWarnings:!1,animationsEnabled:!0,nonce:"",deferredDelay:100,disableHoverOnTransform:"never",pixelPerfectPrecision:0};function Zu(s,i){var e=!1,t=Date.now();return Qs(function n(r){if(!e){var a=r-t;a>=s?i(1):(Qs(n),i(a/s))}}),new le(function(){e=!0})}function Th(s,i,e){return i+(e-i)*s}function qu(s,i,e){return new te(Th(s,i.percent,e.percent))}function $u(s,i,e){var t=new se(mn(i.rgb,e.rgb,s));return i.alpha!=e.alpha&&(t.alpha=i.alpha+(e.alpha-i.alpha)*s),t}function kh(s,i){return i+s.charAt(0).toUpperCase()+s.substr(1)}var Da,Yi=function(){function s(i){this._disposer=new le(function(){for(;i.length!==0;)i[0].dispose()})}return s.prototype.isDisposed=function(){return this._disposer.isDisposed()},s.prototype.dispose=function(){this._disposer.dispose()},s}(),gt=function(s){function i(e,t,n,r){var a=s.call(this)||this;return a.duration=0,a.easing=Pa,a.progress=0,a._loop=0,a._pause=!1,a._delayTimeout=null,a._time=0,a._isFinished=!1,a.className="Animation",Z.animationsEnabled===!1&&(n=0),a.object=e,a.animationOptions=Gs(t),a.duration=n,r&&(a.easing=r),a.applyTheme(),a}return w(i,s),i.prototype.debug=function(){},i.prototype.dispose=function(){s.prototype.dispose.call(this),this.pause()},i.prototype.delay=function(e){var t=this;if(e>0){this.pause(),pt(this.object.animations,this);var n=setTimeout(function(){t._delayTimeout=null,t.start()},e);this._delayTimeout=new le(function(){clearTimeout(n)})}return this},i.prototype._start=function(){this._isFinished=!1,this._delayTimeout&&(this.removeDispose(this._delayTimeout),this._delayTimeout=null),this.stopSameAnimations(),this._pause=!1,pt(Q.animations,this),pt(this.object.animations,this),Q.requestFrame()},i.prototype.start=function(){this._start(),this._startTime=Date.now(),this._time=0,this.staticOptions=[];for(var e=this.animationOptions.length-1;e>=0;e--){var t=this.animationOptions[e];if(v(t.from)||(t.childObject?t.from=t.childObject[t.property]:(t.from=this.object[t.property],v(t.from)||(t.from=Dh[t.property]))),t.from==t.to)z(this.animationOptions,t);else if(!v(t.from)||!(t.from instanceof te)&&t.to instanceof te||t.from instanceof te&&!(t.to instanceof te))this.staticOptions.push(t),z(this.animationOptions,t);else if(y(t.to))if(t.updateMethod=Th,t.from instanceof te){var n=this.object[kh(t.property,"pixel")];isNaN(n)?(this.staticOptions.push(t),z(this.animationOptions,t)):t.from=n}else isNaN(t.from)&&(this.staticOptions.push(t),z(this.animationOptions,t));else t.to instanceof se?t.from?t.updateMethod=$u:(this.staticOptions.push(t),z(this.animationOptions,t)):t.to instanceof te?(t.updateMethod=qu,isNaN(t.from)||(n=this.object[kh(t.property,"relative")],isNaN(n)||(t.from=F(100*n)))):(this.staticOptions.push(t),z(this.animationOptions,t))}if(this.applyStaticOptions(),this.events.isEnabled("animationstarted")){var r={type:"animationstarted",target:this,progress:this.progress};this.events.dispatchImmediately("animationstarted",r)}return this.update(),this.duration===0&&this.end(),this},i.prototype.loop=function(e){return y(e)||(e=1/0),this._loop=e,this},i.prototype.pause=function(){return this._pause=!0,this._delayTimeout&&(this.removeDispose(this._delayTimeout),this._delayTimeout=null),z(Q.animations,this),z(this.object.animations,this),this},i.prototype.resume=function(){return this._start(),this._startTime=Date.now()-this._time,this},i.prototype.end=function(){if(this._loop==0&&this.pause(),this.setProgress(1),this.applyStaticOptions(),this.events.isEnabled("animationended")){var e={type:"animationended",target:this,progress:this.progress};this.events.dispatchImmediately("animationended",e)}return this._loop>0?(this._loop--,this.start()):(this.stop(),this._isFinished=!0),this},i.prototype.kill=function(){this.pause(),this._isFinished=!0},i.prototype.isFinished=function(){return this._isFinished},i.prototype.applyStaticOptions=function(){var e=this;j(this.staticOptions,function(t){t.childObject?t.childObject[t.property]=e.progress==1?t.to:t.from:e.object[t.property]=e.progress==1?t.to:t.from})},i.prototype.stop=function(e){if(this.pause(),!e&&this.events.isEnabled("animationstopped")){var t={type:"animationstopped",target:this,progress:this.progress};this.events.dispatchImmediately("animationstopped",t)}return this},i.prototype.setProgress=function(e){var t=this;if(this._time=this.duration*e,j(this.animationOptions,function(r){if(r.updateMethod&&v(r.from)){var a=r.updateMethod(e,r.from,r.to);r.childObject?r.childObject[r.property]=a:t.object[r.property]=a}}),this.progress=e,this.events.isEnabled("animationprogress")){var n={type:"animationprogress",target:this,progress:this.progress};this.events.dispatchImmediately("animationprogress",n)}Q.requestFrame()},i.prototype.update=function(){if(!this._pause){var e=void 0;this._time=R(Date.now()-this._startTime,0,this.duration);var t=this._time/this.duration;e=this.easing(t),(this.duration==0||!y(e)||t>=1)&&(e=1),this.setProgress(e),V(this._time/this.duration,6)==1&&this.end()}return this},Object.defineProperty(i.prototype,"delayed",{get:function(){return!!this._delayTimeout},enumerable:!0,configurable:!0}),i.prototype.stopSameAnimations=function(){var e=this;j(ji(this.object.animations),function(t){if(t!==e&&!t.delayed){var n=[];j(e.animationOptions,function(r){j(t.animationOptions,function(a){r.property==a.property&&r.childObject==a.childObject&&(n.push(a),t.animationOptions.length==0&&t.kill())})}),j(n,function(r){z(t.animationOptions,r)})}})},i.prototype.asFunction=function(e){return e=="easing"||s.prototype.asIs.call(this,e)},i}(wt),zi="http://www.w3.org/2000/svg",Ah="http://www.w3.org/2000/xmlns/",Ta="http://www.w3.org/1999/xlink";function Ce(s,i,e,t){return s.addEventListener(i,e,t||!1),new le(function(){s.removeEventListener(i,e,t||!1)})}function ka(s){if(J(s)){var i=document.getElementById(s);if(i==null&&(i=document.getElementsByClassName(s)[0]),i instanceof HTMLElement)return i}else if(s instanceof HTMLElement)return s}function Mr(s,i){if(s)if(s.classList)j(i.split(" "),function(t){s.classList.add(t)});else{var e=s.getAttribute("class");e?s.setAttribute("class",e.split(" ").filter(function(t){return t!==i}).join(" ")+" "+i):s.setAttribute("class",i)}}function Lr(s,i){if(s)if(s.classList)s.classList.remove(i);else{var e=s.getAttribute("class");e&&s.setAttribute("class",e.split(" ").filter(function(t){return t!==i}).join(" "))}}function Vh(s,i,e){s.style[i]=e}function Aa(s,i){return s.currentStyle?s.currentStyle[i]:document.defaultView.getComputedStyle(s,null).getPropertyValue(i)}function kn(){if(document.activeElement&&document.activeElement!=document.body)if(document.activeElement.blur)document.activeElement.blur();else{var s=document.createElement("button");s.style.position="fixed",s.style.top="0px",s.style.left="-10000px",document.body.appendChild(s),s.focus(),s.blur(),document.body.removeChild(s)}}function Ju(s){if(s instanceof HTMLElement)s.focus();else{var i=document.createElement("input"),e=document.createElementNS(zi,"foreignObject");e.appendChild(i),s.appendChild(e),i.focus(),i.disabled=!0,e.remove()}}function Qu(s){if(s.outerHTML)return s.outerHTML;var i=document.createElement("div"),e=s.cloneNode(!0);return i.appendChild(e),i.innerHTML}function ed(s){return s instanceof Object&&s&&s.nodeType===1}function Fh(s,i){for(var e=i;;){if(s===e)return!0;if(e.parentNode==null){if(e.host==null)return!1;e=e.host}else e=e.parentNode}}function Va(s){for(var i=s;;){if(i.parentNode==null)return i.host!=null?i:null;i=i.parentNode}}function Mh(s){for(var i=s.ownerDocument,e=s;;){if(e.parentNode==null)return e===i||e.host!=null?e:null;e=e.parentNode}}function td(s,i){j(s.attributes,function(e){e.value!=null&&i.setAttribute(e.name,e.value)})}function Lh(s){bl(function(){try{var i=s.getBoundingClientRect(),e=i.left-Math.round(i.left),t=i.top-Math.round(i.top);e!==0&&ea(function(){s.style.left=e+"px"}),t!==0&&ea(function(){s.style.top=t+"px"})}catch{}})}var ue=function(s){function i(e,t,n){var r=this,a=function(o){return o==null?(v(Da)||((l=document.createElement("style")).type="text/css",Z.nonce!=""&&l.setAttribute("nonce",Z.nonce),document.head.appendChild(l),Da=l.sheet),Da):((l=document.createElement("style")).type="text/css",Z.nonce!=""&&l.setAttribute("nonce",Z.nonce),o.appendChild(l),l.sheet);var l}(e);return(r=s.call(this,function(){var o=ht(a.cssRules,r._rule);if(o===-1)throw new Error("Could not dispose StyleRule");a.deleteRule(o)})||this)._rule=function(o,l){var h=o.cssRules.length;return o.insertRule(l+"{}",h),o.cssRules[h]}(a,t),X(n,function(o,l){r.setStyle(o,l)}),r}return w(i,s),Object.defineProperty(i.prototype,"selector",{get:function(){return this._rule.selectorText},set:function(e){this._rule.selectorText=e},enumerable:!0,configurable:!0}),i.prototype._setVendorPrefixName=function(e,t){var n=this._rule.style;n.setProperty("-webkit-"+e,t,""),n.setProperty("-moz-"+e,t,""),n.setProperty("-ms-"+e,t,""),n.setProperty("-o-"+e,t,""),n.setProperty(e,t,"")},i.prototype.setStyle=function(e,t){e==="transition"?this._setVendorPrefixName(e,t):this._rule.style.setProperty(e,t,"")},i}(le),id=0,nd=function(s){function i(e,t,n){var r=this,a=v(n)?n:"__style_"+ ++id+"__";return(r=s.call(this,e,"."+a,t)||this)._className=a,r}return w(i,s),Object.defineProperty(i.prototype,"className",{get:function(){return this._className},set:function(e){this._className=e,this.selector="."+e},enumerable:!0,configurable:!0}),i.prototype.toString=function(){return this._className},i}(ue);function jh(s){if(document.readyState!=="loading")s();else{var i=function(){document.readyState!=="loading"&&(document.removeEventListener("readystatechange",i),s())};document.addEventListener("readystatechange",i)}}function jr(s){var i=Aa(s,"font-family");if(i)return i;var e=s.parentElement||s.parentNode;return e?jr(e):void 0}function Er(s){var i=Aa(s,"font-size");if(i)return i;var e=s.parentElement||s.parentNode;return e?Er(e):void 0}function Fa(s,i){var e=s.getBoundingClientRect(),t=Ae(i)?i:i?[i]:[];if(t.length){for(var n=0;n<t.length;n++){var r=t[n];if(!Fa(r))return!1;var a=r.getBoundingClientRect();if(e.top>=0&&e.left>=0&&e.top<=a.top+a.height&&e.left<=a.left+a.width)return!0}return!1}return e.top>=0&&e.left>=0&&e.top<=(window.innerHeight||document.documentElement.clientHeight)&&e.left<=(window.innerWidth||document.documentElement.clientWidth)}var An=function(){function s(i){this._isDisposed=!1,this._x=0,this._y=0,this._rotationY=0,this._rotationX=0,this._rotation=0,this._scale=1,this.node=typeof i=="string"?document.createElementNS(zi,i):i}return s.prototype.removeNode=function(){this.node&&this.node.parentNode&&this.node.parentNode.removeChild(this.node)},Object.defineProperty(s.prototype,"transformString",{get:function(){if(this.node)return this._transformString},enumerable:!0,configurable:!0}),s.prototype.transform=function(){var i="translate("+this._x+","+this._y+")";if(this._scale!=1&&(i+=(i?" ":"")+"scale("+this._scale+")"),this._rotation!=0){var e="rotate("+this._rotation+")";this._rotationX&&this._rotationY&&(e="rotate("+this._rotation+" "+this._rotationX+" "+this._rotationY+")"),i+=(i?" ":"")+e}this._transformString=i,this.node.setAttribute("transform",i)},s.prototype.getBBox=function(){var i={width:0,height:0,x:0,y:0};if(this.node&&this.node.parentNode)try{var e=this.node.getBBox();i.x=e.x,i.y=e.y,i.width=e.width,i.height=e.height}catch{}return i},s.prototype.moveTo=function(i){if(i){var e=i.x,t=i.y;this._x==e&&this._y==t||(this._x=e,this._y=t,this.transform())}},Object.defineProperty(s.prototype,"content",{get:function(){return this.node.innerHTML||""},set:function(i){this.node.innerHTML=i},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"textContent",{get:function(){return this.node.textContent||""},set:function(i){this.node.textContent=i},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"x",{get:function(){return this._x},set:function(i){this._x!=i&&(this._x=i,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"y",{get:function(){return this._y},set:function(i){this._y!=i&&(this._y=i,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rotation",{get:function(){return this._rotation},set:function(i){this._rotation!=i&&(this._rotation=i,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rotationX",{get:function(){return this._rotationX},set:function(i){this._rotationX!=i&&(this._rotationX=i,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rotationY",{get:function(){return this._rotationY},set:function(i){this._rotationY!=i&&(this._rotationY=i,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"scale",{get:function(){return this._scale},set:function(i){this._scale!=i&&(this._scale=i,this.transform())},enumerable:!0,configurable:!0}),s.prototype.removeAttr=function(i){this.node.removeAttribute(i)},s.prototype.attr=function(i){var e=this;return X(i,function(t,n){v(n)?e.node.setAttribute(t,n):e.node.removeAttribute(t)}),this},s.prototype.getAttr=function(i){return this.node.getAttribute(i)},s.prototype.attrNS=function(i,e,t){return this.node.setAttributeNS(i,e,t),this},s.prototype.getAttrNS=function(i,e){return this.node.getAttributeNS(i,e)},s.prototype.removeStyle=function(i){this.node.style[i]=null,delete this.node.style[i]},s.prototype.getStyle=function(i){return this.node.style[i]},s.prototype.addStyle=function(i){var e=this;return X(i,function(t,n){v(n)?e.node.style[t]=n:e.removeStyle(t)}),this},s.prototype.addClass=function(i){Mr(this.node,i)},s.prototype.removeClass=function(i){Lr(this.node,i)},s.prototype.setClass=function(i){this.node.setAttribute("class",i)},s.prototype.removeChildNodes=function(){for(;this.node.childNodes.length>0;)this.node.removeChild(this.node.firstChild)},s.prototype.isDisposed=function(){return this._isDisposed},s.prototype.dispose=function(){this.removeNode()},s}(),Eh=function(s){function i(e){return s.call(this,e)||this}return w(i,s),i.prototype.add=function(e){e&&this.node.appendChild(e.node)},i.prototype.addToBack=function(e){if(e){var t=this.node.childNodes[0];t?t!=e.node&&this.node.insertBefore(e.node,t):this.node.appendChild(e.node)}},i.prototype.removeElement=function(e){if(e)try{e.node&&e.node.parentNode==this.node&&this.node.removeChild(e.node)}catch{}},i.prototype.hasChild=function(e){for(var t=0;t<this.node.childNodes.length;t++)if(this.node.childNodes[t]==e.node)return!0;return!1},Object.defineProperty(i.prototype,"content",{get:function(){return this.node.innerHTML},set:function(e){this.node.innerHTML=e},enumerable:!0,configurable:!0}),i.prototype.removeChildren=function(){if(this.node.childNodes)for(;this.node.childNodes.length>0;){var e=this.node.firstChild;e&&e.parentNode&&e.parentNode.removeChild(e)}},i.prototype.removeChildrenByTag=function(e){if(this.node.childNodes)for(var t=this.node.getElementsByTagName(e),n=0;n<t.length;n++)this.node.removeChild(t[n])},i}(An),ae=function(s){function i(){var e=s.call(this)||this;return e._purposes={stroke:B("#e5e5e5"),fill:B("#f3f3f3"),primaryButton:B("#6794dc"),primaryButtonHover:B("#6771dc"),primaryButtonDown:B("#68dc75"),primaryButtonActive:B("#68dc75"),primaryButtonText:B("#FFFFFF"),primaryButtonStroke:B("#FFFFFF"),secondaryButton:B("#d9d9d9"),secondaryButtonHover:B("#d9d9d9").brighten(-.25),secondaryButtonDown:B("#d9d9d9").brighten(-.35),secondaryButtonActive:B("#d9d9d9").brighten(.35),secondaryButtonText:B("#000000"),secondaryButtonStroke:B("#FFFFFF"),grid:B("#000000"),background:B("#ffffff"),alternativeBackground:B("#000000"),text:B("#000000"),alternativeText:B("#FFFFFF"),disabledBackground:B("#999999"),positive:B("#67dc75"),negative:B("#dc6788")},e.className="InterfaceColorSet",e.applyTheme(),e}return w(i,s),i.prototype.debug=function(){},i.prototype.getFor=function(e){return this._purposes[e]},i.prototype.setFor=function(e,t){this._purposes[e]=t},i}(Ke);_.registeredClasses.InterfaceColorSet=ae;var Rh=new me,Bh=function(s){function i(){var e=s!==null&&s.apply(this,arguments)||this;return e._domEvents={},e}return w(i,s),i.prototype._addDOMEvent=function(e,t,n,r){var a=this;if(!this._domEvents[e]){var o=function(l){n.call(r,t,l)};this.target.element.addEventListener(e,o,!1),this._domEvents[e]=new un(function(){delete a._domEvents[e],a.target.element.removeEventListener(e,o,!1)})}return this._domEvents[e].increment()},i.prototype._dispatchKeyboardEvent=function(e,t){this.target.events.isEnabled(e)&&this.target.events.dispatchImmediately(e,{type:e,target:this.target,event:t})},i.prototype._on=function(e,t,n,r,a,o){var l=s.prototype._on.call(this,e,t,n,r,a,o),h=[l.disposer];switch(t){case"hit":case"doublehit":case"rightclick":case"down":case"up":this.target.clickable=!0;break;case"drag":case"dragstart":case"dragstop":this.target.draggable=!0;break;case"track":this.target.trackable=!0;break;case"resize":this.target.resizable=!0;break;case"swipe":case"swipeleft":case"swiperight":this.target.swipeable=!0;break;case"wheel":case"wheelup":case"wheeldown":case"wheelleft":case"wheelright":this.target.wheelable=!0;break;case"over":case"out":this.target.hoverable=!0;break;case"focus":case"blur":case"focusin":case"focusout":this.target.focusable=!0;break;case"keydown":case"keyup":case"keypress":case"input":h.push(this._addDOMEvent(t,t,this._dispatchKeyboardEvent,this))}return l.disposer=new _e(h),l},i}(ta),Hh=function(s){function i(e){var t=s.call(this)||this;return t._eventDispatcher=new Bh(t),t.eventDisposers=new me,t.replacedStyles=new me,t._clickable=!1,t._contextMenuDisabled=!1,t._hoverable=!1,t._trackable=!1,t._draggable=!1,t._swipeable=!1,t._resizable=!1,t._wheelable=!1,t._inert=!1,t._isHover=!1,t.isRealHover=!1,t._isHoverByTouch=!1,t._isDown=!1,t._isFocused=!1,t._isTouchProtected=!1,t._inertiaOptions=new me,t.inertias=new me,t._hitOptions={},t._hoverOptions={},t._swipeOptions={},t._keyboardOptions={},t._mouseOptions={},t._cursorOptions={defaultStyle:[{property:"cursor",value:"default"}]},t._disposers.push(t._eventDispatcher),t._element=e,t.className="InteractionObject",t._disposers.push(new Jt(t.inertias)),t._disposers.push(new Jt(t.eventDisposers)),t.applyTheme(),t}return w(i,s),Object.defineProperty(i.prototype,"events",{get:function(){return this._eventDispatcher},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isHover",{get:function(){return this._isHover},set:function(e){this.isHover!=e&&(this._isHover=e,e?K().overObjects.moveValue(this):(this.isRealHover=!1,K().overObjects.removeValue(this)))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isHoverByTouch",{get:function(){return this._isHoverByTouch},set:function(e){this.isHoverByTouch!=e&&(this._isHoverByTouch=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"overPointers",{get:function(){return this._overPointers||(this._overPointers=new re),this._overPointers},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isDown",{get:function(){return this._isDown},set:function(e){this.isDown!=e&&(this._isDown=e,e?K().downObjects.moveValue(this):K().downObjects.removeValue(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"downPointers",{get:function(){return this._downPointers||(this._downPointers=new re),this._downPointers},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFocused",{get:function(){return this._isFocused},set:function(e){this.isFocused!=e&&(this._isFocused=e,K().focusedObject=e?this:void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isTouchProtected",{get:function(){return this._isTouchProtected},set:function(e){this._isTouchProtected!=e&&(this._isTouchProtected=e,e?K().unprepElement(this):(this.draggable||this.swipeable||this.trackable||this.resizable)&&K().prepElement(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"clickable",{get:function(){return this._clickable},set:function(e){this._clickable!==e&&(this._clickable=e,K().processClickable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"contextMenuDisabled",{get:function(){return this._contextMenuDisabled},set:function(e){this._contextMenuDisabled!==e&&(this._contextMenuDisabled=e,K().processContextMenu(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hoverable",{get:function(){return this._hoverable},set:function(e){this._hoverable!==e&&(this._hoverable=e,K().processHoverable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackable",{get:function(){return this._trackable},set:function(e){this._trackable!==e&&(this._trackable=e,K().processTrackable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"draggable",{get:function(){return this._draggable},set:function(e){this._draggable!==e&&(this._draggable=e,K().processDraggable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"swipeable",{get:function(){return this._swipeable},set:function(e){this._swipeable!==e&&(this._swipeable=e,K().processSwipeable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"resizable",{get:function(){return this._resizable},set:function(e){this._resizable!==e&&(this._resizable=e,K().processResizable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"wheelable",{get:function(){return this._wheelable},set:function(e){this._wheelable!==e&&(this._wheelable=e,K().processWheelable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"inert",{get:function(){return this._inert},set:function(e){this._inert!==e&&(this._inert=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"focusable",{get:function(){return this._focusable},set:function(e){this._focusable!==e&&(this._focusable=e,this._focusable&&this.tabindex==-1&&(this._tabindex=1),K().processFocusable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tabindex",{get:function(){return rr(this._tabindex,-1)},set:function(e){this._tabindex!==e&&(this._tabindex=e,e>-1&&(this.focusable=!0),K().processFocusable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"element",{get:function(){return this._element},set:function(e){this._element=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"originalPosition",{get:function(){return this._originalPosition||{x:0,y:0}},set:function(e){this._originalPosition=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"originalScale",{get:function(){return rr(this._originalScale,1)},set:function(e){this._originalScale!==e&&(this._originalScale=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"originalAngle",{get:function(){return rr(this._originalAngle,0)},set:function(e){this._originalAngle!==e&&(this._originalAngle=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"inertiaOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("inertiaOptions",this._inertiaOptions):this._inertiaOptions},set:function(e){this._inertiaOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hitOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("hitOptions",this._hitOptions):this._hitOptions},set:function(e){this._hitOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hoverOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("hoverOptions",this._hoverOptions):this._hoverOptions},set:function(e){this._hoverOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"swipeOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("swipeOptions",this._swipeOptions):this._swipeOptions},set:function(e){this._swipeOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"keyboardOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("keyboardOptions",this._keyboardOptions):this._keyboardOptions},set:function(e){this._keyboardOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"mouseOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("mouseOptions",this._mouseOptions):this._mouseOptions},set:function(e){this._mouseOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cursorOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("cursorOptions",this._cursorOptions):this._cursorOptions},set:function(e){this._cursorOptions=e},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.inertiaOptions=e.inertiaOptions,this.hitOptions=e.hitOptions,this.hoverOptions=e.hoverOptions,this.swipeOptions=e.swipeOptions,this.keyboardOptions=e.keyboardOptions,this.cursorOptions=e.cursorOptions,this.contextMenuDisabled=e.contextMenuDisabled,K().applyCursorOverStyle(this)},i.prototype.setEventDisposer=function(e,t,n){var r=this.eventDisposers.getKey(e);t?r==null&&this.eventDisposers.setKey(e,n()):r!=null&&(r.dispose(),this.eventDisposers.removeKey(e))},i.prototype.dispose=function(){s.prototype.dispose.call(this);var e=K();e.overObjects.removeValue(this),e.downObjects.removeValue(this),e.trackedObjects.removeValue(this),e.transformedObjects.removeValue(this),this.isHover&&this.wheelable&&e.unlockWheel(),e.focusedObject===this&&(e.focusedObject=void 0)},i}(wt),Nh=function(){function s(i,e){this._disposed=!1,this.directionX=0,this.directionY=0,this.interaction=i,this.keyboardEvent=e,this._startedOn=new Date().getTime(),K().processDragStart(i),Q.animations.push(this),this.update()}return s.prototype.update=function(){var i=this.interaction,e=K().getKeyboardOption(i,"speed"),t=K().getKeyboardOption(i,"accelleration"),n=K().getKeyboardOption(i,"accellerationDelay"),r={x:0,y:0};this.keyboardEvent.shiftKey?(e*=.5,t=1):this.keyboardEvent.ctrlKey&&(e*=2);var a=new Date().getTime()-this._startedOn,o=a-n;if(t>0&&o>0){var l=a/n;a=n,r.x+=this.directionX*(e*t*l*o),r.y+=this.directionY*(e*t*l*o)}r.x+=this.directionX*(e*a),r.y+=this.directionY*(e*a),K().handleTransformMove(i,r,{x:0,y:0},this.keyboardEvent,!0,!1)},s.prototype.isDisposed=function(){return this._disposed},s.prototype.dispose=function(){this._disposed||(K().processDragStop(this.interaction),z(Q.animations,this))},s}(),Wh=function(s){function i(e,t,n,r){var a=s.call(this)||this;return a.animations=[],a.className="Inertia",a.interaction=e,a.type=t,a.point=n,a.startPoint=r,a._disposers.push(new Yi(a.animations)),a}return w(i,s),Object.defineProperty(i.prototype,"x",{get:function(){return this.point.x},set:function(e){y(e)&&(this.point.x=e,this.handleMove())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"y",{get:function(){return this.point.y},set:function(e){y(e)&&(this.point.y=e,this.handleMove())},enumerable:!0,configurable:!0}),i.prototype.handleMove=function(){if(this.interaction.events.isEnabled("drag")){var e={type:"drag",target:this.interaction,shift:{x:this.x-this.startPoint.x,y:this.y-this.startPoint.y},startPoint:this.startPoint,point:{x:this.x,y:this.y},touch:!1};this.interaction.events.dispatchImmediately("drag",e)}},i.prototype.done=function(){this.interaction.inertias.removeKey(this.type),this.type==="move"&&K().processDragStop(this.interaction),this.dispose()},i}(Ke),Xh=function(){function s(){}return s.prototype.getEventKey=function(i){var e;switch(i.keyCode||i.which){case 38:e="up";break;case 40:e="down";break;case 37:e="left";break;case 39:e="right";break;case 13:e="enter";break;case 27:e="esc";break;case 36:case 36:e="home";break;case 35:case 35:e="end";break;case 9:e="tab";break;case 17:e="ctrl";break;case 18:e="alt";break;case 16:e="shift";break;case 32:e="space";break;case 33:e="pgup";break;case 34:e="pgdn";break;case 45:e="ins";break;case 46:e="del";break;case 107:e="plus";break;case 109:e="minus";break;default:e="other"}return e},s.prototype.isKey=function(i,e){var t=this.getEventKey(i);return J(e)&&(e=[e]),e.indexOf(t)!==-1},s.prototype.shiftKey=function(i){return i.shiftKey},s.prototype.ctrlKey=function(i){return i.ctrlKey},s.prototype.altKey=function(i){return i.altKey},s.prototype.metaKey=function(i){return i.metaKey},s}(),Ct=new Xh,Yh={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6};function Ma(s){switch(s){case"year":return;case"month":return"year";case"week":case"day":return"month";case"hour":return"day";case"minute":return"hour";case"second":return"minute";case"millisecond":return"second"}}function Se(s,i){return v(i)||(i=1),Yh[s]*i}function zh(){return new Date}function Ot(){return zh().getTime()}function bi(s){return new Date(s.getTime())}function Rr(s,i,e,t){s=new Date(s.getTime()),i=new Date(i.getTime());var n=0,r=0;t||e=="millisecond"||(n=s.getTimezoneOffset(),s.setUTCMinutes(s.getUTCMinutes()-n),r=i.getTimezoneOffset(),i.setUTCMinutes(i.getUTCMinutes()-r));var a=!1;switch(e){case"year":s.getUTCFullYear()!=i.getUTCFullYear()&&(a=!0);break;case"month":(s.getUTCFullYear()!=i.getUTCFullYear()||s.getUTCMonth()!=i.getUTCMonth())&&(a=!0);break;case"day":(s.getUTCMonth()!=i.getUTCMonth()||s.getUTCDate()!=i.getUTCDate())&&(a=!0);break;case"hour":s.getUTCHours()!=i.getUTCHours()&&(a=!0);break;case"minute":s.getUTCMinutes()!=i.getUTCMinutes()&&(a=!0);break;case"second":s.getUTCSeconds()!=i.getUTCSeconds()&&(a=!0);break;case"millisecond":s.getTime()!=i.getTime()&&(a=!0)}if(a)return!0;var o=Ma(e);return!!o&&(s.setUTCMinutes(s.getUTCMinutes()+n),i.setUTCMinutes(i.getUTCMinutes()+r),Rr(s,i,o,t))}function Ze(s,i,e,t){var n=0;switch(t||i=="millisecond"||(n=s.getTimezoneOffset(),s.setUTCMinutes(s.getUTCMinutes()-n)),i){case"day":var r=s.getUTCDate();s.setUTCDate(r+e);break;case"second":var a=s.getUTCSeconds();s.setUTCSeconds(a+e);break;case"millisecond":var o=s.getUTCMilliseconds();s.setUTCMilliseconds(o+e);break;case"hour":var l=s.getUTCHours();s.setUTCHours(l+e);break;case"minute":var h=s.getUTCMinutes();s.setUTCMinutes(h+e);break;case"year":var p=s.getUTCFullYear();s.setUTCFullYear(p+e);break;case"month":var u=s.getUTCMonth();s.setUTCMonth(u+e);break;case"week":var d=s.getUTCDate();s.setUTCDate(d+7*e)}if(!t&&i!="millisecond"&&(s.setUTCMinutes(s.getUTCMinutes()+n),i=="day"||i=="week"||i=="month"||i=="year")){var c=s.getTimezoneOffset();if(c!=n){var f=c-n;s.setUTCMinutes(s.getUTCMinutes()+f),s.getTimezoneOffset()!=c&&s.setUTCMinutes(s.getUTCMinutes()-f)}}return s}function Be(s,i,e,t,n,r,a,o){a===void 0&&(a=0),y(e)||(e=1);var l=0;switch(o&&["day","month","week","year"].indexOf(i)!=-1&&(s=Vn(s,o)),n||i=="millisecond"||(l=s.getTimezoneOffset(),s.setUTCMinutes(s.getUTCMinutes()-l)),i){case"day":var h=s.getUTCDate();if(e>1){if(r){r=Be(r,"day",1);var p=s.getTime()-r.getTime(),u=Math.floor(p/Se("day")/e),d=Se("day",u*e);s.setTime(r.getTime()+d-l*Se("minute"))}}else s.setUTCDate(h);s.setUTCHours(0,0,0,0);break;case"second":var c=s.getUTCSeconds();e>1&&(c=Math.floor(c/e)*e),s.setUTCSeconds(c,0);break;case"millisecond":if(e==1)return s;var f=s.getUTCMilliseconds();f=Math.floor(f/e)*e,s.setUTCMilliseconds(f);break;case"hour":var g=s.getUTCHours();e>1&&(g=Math.floor(g/e)*e),s.setUTCHours(g,a,0,0);break;case"minute":var m=s.getUTCMinutes();f=s.getUTCMilliseconds(),e>1&&(m=Math.floor(m/e)*e),s.setUTCMinutes(m,0,0);break;case"month":var x=s.getUTCMonth();e>1&&(x=Math.floor(x/e)*e),s.setUTCMonth(x,1),s.setUTCHours(0,a,0,0);break;case"year":var b=s.getUTCFullYear();e>1&&(b=Math.floor(b/e)*e),s.setUTCFullYear(b,0,1),s.setUTCHours(0,a,0,0);break;case"week":var C=s.getUTCDate(),S=s.getUTCDay();y(t)||(t=1),C=S>=t?C-S+t:C-(7+S)+t,s.setUTCDate(C),s.setUTCHours(0,a,0,0)}if(!n&&i!="millisecond"&&(s.setUTCMinutes(s.getUTCMinutes()+l),i=="day"||i=="week"||i=="month"||i=="year")){var P=s.getTimezoneOffset();if(P!=l){var O=P-l;s.setUTCMinutes(s.getUTCMinutes()+O)}}return s}function Vn(s,i){return new Date(s.toLocaleString("en-US",{timeZone:i}))}function Uh(s){var i=new Date;return i.setHours(0,0,0,0),Vn(i,s).getMinutes()}var Gh=function(s){function i(){var e=s.call(this)||this;return e._globalEventsAdded=!1,e._pointerEvents={pointerdown:"mousedown",pointerup:"mouseup",pointermove:"mousemove",pointercancel:"mouseup",pointerover:"mouseover",pointerout:"mouseout",wheel:"wheel"},e._usePointerEventsOnly=!1,e._useTouchEventsOnly=!1,e._addHoverEvents=!0,e._passiveSupported=!1,e._delayedEvents={out:[]},e.overObjects=new re,e.downObjects=new re,e.trackedObjects=new re,e.transformedObjects=new re,e.pointers=new me,e.inertiaOptions=new me,e.hitOptions={doubleHitTime:300,hitTolerance:10,noFocus:!0},e.hoverOptions={touchOutBehavior:"leave",touchOutDelay:1e3},e.swipeOptions={time:500,verticalThreshold:75,horizontalThreshold:30},e.keyboardOptions={speed:.1,accelleration:1.2,accellerationDelay:2e3},e.mouseOptions={sensitivity:1},e.className="Interaction",e.body=e.getInteraction(document.body),e._disposers.push(e.body),window.hasOwnProperty("PointerEvent")?(e._pointerEvents.pointerdown="pointerdown",e._pointerEvents.pointerup="pointerup",e._pointerEvents.pointermove="pointermove",e._pointerEvents.pointercancel="pointercancel",e._pointerEvents.pointerover="pointerover",e._pointerEvents.pointerout="pointerout"):window.hasOwnProperty("MSPointerEvent")?(e._pointerEvents.pointerdown="MSPointerDown",e._pointerEvents.pointerup="MSPointerUp",e._pointerEvents.pointermove="MSPointerMove",e._pointerEvents.pointercancel="MSPointerUp",e._pointerEvents.pointerover="MSPointerOver",e._pointerEvents.pointerout="MSPointerOut"):typeof matchMedia!="undefined"&&matchMedia("(pointer:fine)").matches?"ontouchstart"in window&&(e._addHoverEvents=!1,e._useTouchEventsOnly=!0):window.navigator.userAgent.match(/MSIE /)||e.fullFF()?e._usePointerEventsOnly=!0:e._useTouchEventsOnly=!0,"onwheel"in document.createElement("div")?e._pointerEvents.wheel="wheel":v(document.onmousewheel)&&(e._pointerEvents.wheel="mousewheel"),e.inertiaOptions.setKey("move",{time:100,duration:500,factor:1,easing:Ar}),e.inertiaOptions.setKey("resize",{time:100,duration:500,factor:1,easing:Ar}),e._passiveSupported=i.passiveSupported,e.applyTheme(),e}return w(i,s),i.prototype.fullFF=function(){return window.navigator.userAgent.match(/Firefox/)&&!window.navigator.userAgent.match(/Android/)},i.prototype.debug=function(){},i.prototype.addGlobalEvents=function(){var e=this;this._globalEventsAdded||(this._useTouchEventsOnly||(this._disposers.push(Ce(document,this._pointerEvents.pointerdown,function(t){e.handleGlobalPointerDown(t)})),this._disposers.push(Ce(document,this._pointerEvents.pointermove,function(t){e.handleGlobalPointerMove(t)})),this._disposers.push(Ce(document,this._pointerEvents.pointerup,function(t){e.handleGlobalPointerUp(t)})),this._disposers.push(Ce(document,this._pointerEvents.pointercancel,function(t){e.handleGlobalPointerUp(t,!0)})),this._disposers.push(Ce(document,"mouseenter",function(t){v(t.relatedTarget)||t.buttons!=0&&t.which!=0||e.handleDocumentLeave(t)}))),this._usePointerEventsOnly||(this._disposers.push(Ce(document,"touchstart",function(t){e.handleGlobalTouchStart(t)})),this._disposers.push(Ce(document,"touchmove",function(t){e.handleGlobalTouchMove(t)})),this._disposers.push(Ce(document,"touchend",function(t){e.handleGlobalTouchEnd(t)}))),this._disposers.push(Ce(document,"keydown",function(t){e.handleGlobalKeyDown(t)})),this._disposers.push(Ce(document,"keyup",function(t){e.handleGlobalKeyUp(t)})),this._globalEventsAdded=!0)},i.prototype.processClickable=function(e){this.processTouchable(e)},i.prototype.processContextMenu=function(e){e.contextMenuDisabled?e.eventDisposers.hasKey("contextMenuDisabled")||e.eventDisposers.setKey("contextMenuDisabled",Ce(e.element,"contextmenu",function(t){t.preventDefault()})):e.eventDisposers.hasKey("contextMenuDisabled")&&e.eventDisposers.getKey("contextMenuDisabled").dispose()},i.prototype.processHoverable=function(e){var t=this;if(e.hoverable||e.trackable)this.addGlobalEvents(),this.applyCursorOverStyle(e),!e.eventDisposers.hasKey("hoverable")&&this._addHoverEvents&&e.eventDisposers.setKey("hoverable",new _e([Ce(e.element,this._pointerEvents.pointerout,function(r){return t.handlePointerOut(e,r)}),Ce(e.element,this._pointerEvents.pointerover,function(r){return t.handlePointerOver(e,r)})])),e.trackable;else{var n=e.eventDisposers.getKey("hoverable");n!=null&&(n.dispose(),e.eventDisposers.removeKey("hoverable"))}this.processTouchable(e)},i.prototype.processMovable=function(e){(e.draggable||e.swipeable||e.trackable||e.resizable)&&(this.isGlobalElement(e)||e.isTouchProtected||this.prepElement(e),this.applyCursorOverStyle(e)),this.processTouchable(e)},i.prototype.processTrackable=function(e){this.processHoverable(e),this.processMovable(e),e.trackable?this.trackedObjects.moveValue(e):this.trackedObjects.removeValue(e)},i.prototype.processDraggable=function(e){this.processMovable(e)},i.prototype.processSwipeable=function(e){this.processMovable(e)},i.prototype.processResizable=function(e){this.processMovable(e)},i.prototype.processWheelable=function(e){var t=this;if(e.wheelable)e.eventDisposers.hasKey("wheelable")||e.eventDisposers.setKey("wheelable",new _e([Ce(e.element,this._pointerEvents.wheel,function(r){return t.handleMouseWheel(e,r)},!!this._passiveSupported&&{passive:!1}),e.events.on("out",function(r){e.wheelable&&t.unlockWheel()}),e.events.on("over",function(r){e.wheelable&&t.lockWheel()})]));else{var n=e.eventDisposers.getKey("wheelable");n!=null&&(n.dispose(),e.eventDisposers.removeKey("wheelable"))}},i.prototype.processFocusable=function(e){var t=this;if(e.focusable===!0&&e.tabindex>-1&&!this._useTouchEventsOnly)e.eventDisposers.hasKey("focusable")||e.eventDisposers.setKey("focusable",new _e([Ce(e.element,"focus",function(r){return t.handleFocus(e,r)}),Ce(e.element,"blur",function(r){return t.handleBlur(e,r)}),Ce(e.element,this._pointerEvents.pointerdown,function(r){return t.handleFocusBlur(e,r)}),Ce(e.element,"touchstart",function(r){return t.handleFocusBlur(e,r)},!!this._passiveSupported&&{passive:!1})]));else{var n=e.eventDisposers.getKey("focusable");n!=null&&(n.dispose(),e.eventDisposers.removeKey("focusable"))}},i.prototype.processTouchable=function(e){var t=this;if(e.clickable||e.hoverable||e.trackable||e.draggable||e.swipeable||e.resizable)this.addGlobalEvents(),e.eventDisposers.hasKey("touchable")||(this._useTouchEventsOnly||this._usePointerEventsOnly?this._useTouchEventsOnly?this._usePointerEventsOnly||e.eventDisposers.setKey("touchable",Ce(e.element,"touchstart",function(r){return t.handleTouchDown(e,r)},!!this._passiveSupported&&{passive:!1})):e.eventDisposers.setKey("touchable",Ce(e.element,this._pointerEvents.pointerdown,function(r){return t.handlePointerDown(e,r)})):e.eventDisposers.setKey("touchable",new _e([Ce(e.element,this._pointerEvents.pointerdown,function(r){return t.handlePointerDown(e,r)}),Ce(e.element,"touchstart",function(r){return t.handleTouchDown(e,r)},!!this._passiveSupported&&{passive:!1})])));else{var n=e.eventDisposers.getKey("touchable");n!=null&&(n.dispose(),e.eventDisposers.removeKey("touchable"))}},i.prototype.handleFocus=function(e,t){if(e.focusable){if(e.isFocused=!0,e.events.isEnabled("focus")&&!Q.isPaused){var n={type:"focus",target:e,event:t};e.events.dispatchImmediately("focus",n)}}else t.preventDefault()},i.prototype.handleFocusBlur=function(e,t){e.focusable!==!1&&this.getHitOption(e,"noFocus")&&e.events.once("focus",function(){e.events.disableType("blur"),kn(),e.sprite&&e.sprite.handleBlur(),e.events.enableType("blur")})},i.prototype.handleBlur=function(e,t){if(e.focusable){if(e.isFocused=!1,e.events.isEnabled("blur")&&!Q.isPaused){var n={type:"blur",target:e,event:t};e.events.dispatchImmediately("blur",n)}}else t.preventDefault()},i.prototype.handleGlobalKeyDown=function(e){if(this.focusedObject){if(Ct.isKey(e,"esc"))kn();else if(this.focusedObject.draggable&&Ct.isKey(e,["up","down","left","right"])){e.preventDefault();var t=this.focusedObject,n="interactionKeyboardObject";if(t.eventDisposers.hasKey(n))return;var r=new Nh(t,e);switch(t.eventDisposers.setKey(n,r),Ct.getEventKey(e)){case"up":r.directionY=-1;break;case"down":r.directionY=1;break;case"left":r.directionX=-1;break;case"right":r.directionX=1}}}},i.prototype.handleGlobalKeyUp=function(e){var t="interactionKeyboardObject";if(this.focusedObject){var n=this.focusedObject.eventDisposers.getKey(t);n!=null&&(e.preventDefault(),n.dispose(),this.focusedObject.eventDisposers.removeKey(t));var r=this.focusedObject.sprite;Ct.isKey(e,"enter")&&r&&(r.events.isEnabled("hit")||r.events.isEnabled("toggled")?this.focusedObject.dispatchImmediately("hit"):r.showTooltipOn=="hit"&&this.focusedObject.dispatchImmediately("up"))}},i.prototype.handleGlobalPointerMove=function(e){var t=this.getPointer(e);if(t.point=this.getPointerPoint(e),this.events.isEnabled("track")&&!Q.isPaused){var n={type:"track",target:this,event:e,pointer:t,touch:t.touch};this.events.dispatchImmediately("track",n)}this.addBreadCrumb(t,t.point),this.handleGlobalMove(t,e)},i.prototype.handleGlobalPointerDown=function(e){this.processDelayed();var t=this.getPointer(e);if(this.events.isEnabled("down")&&!Q.isPaused){var n={type:"down",target:this,event:e,pointer:t,touch:t.touch};this.events.dispatchImmediately("down",n)}},i.prototype.preventTouchAction=function(e){e.defaultPrevented||e.preventDefault()},i.prototype.handleGlobalPointerUp=function(e,t){t===void 0&&(t=!1);var n=this.getPointer(e);if(this.events.isEnabled("up")&&!Q.isPaused){var r={type:"up",target:this,event:e,pointer:n,touch:n.touch};this.events.dispatchImmediately("up",r)}this.handleGlobalUp(n,e,t)},i.prototype.handleGlobalTouchMove=function(e){for(var t=0;t<e.changedTouches.length;t++){var n=this.getPointer(e.changedTouches[t]);if(n.point=this.getPointerPoint(e.changedTouches[t]),this.events.isEnabled("track")&&!Q.isPaused){var r={type:"track",target:this,event:e,pointer:n,touch:n.touch};this.events.dispatchImmediately("track",r)}this.addBreadCrumb(n,n.point),this.handleGlobalMove(n,e)}},i.prototype.handleGlobalTouchStart=function(e){this.processDelayed();for(var t=0;t<e.changedTouches.length;t++){var n=this.getPointer(e.changedTouches[t]);if(!this._usePointerEventsOnly&&this.events.isEnabled("down")&&!Q.isPaused){var r={type:"down",target:this,event:e,pointer:n,touch:n.touch};this.events.dispatchImmediately("down",r)}}},i.prototype.handleGlobalTouchEnd=function(e){for(var t=0;t<e.changedTouches.length;t++){var n=this.getPointer(e.changedTouches[t]);if(this.events.isEnabled("up")&&!Q.isPaused){var r={type:"up",target:this,event:e,pointer:n,touch:n.touch};this.events.dispatchImmediately("up",r)}this.handleGlobalUp(n,e)}},i.prototype.handlePointerDown=function(e,t){var n=this.getPointer(t);(n.touch||t.which==1||t.which==3)&&(n.button=t.which,this.resetPointer(n,t),this.handleDown(e,n,t))},i.prototype.handlePointerOver=function(e,t){var n=this.getPointer(t);this.handleOver(e,n,t)},i.prototype.handlePointerOut=function(e,t){var n=this.getPointer(t);this.handleOut(e,n,t)},i.prototype.handleMouseWheel=function(e,t){var n=this.getPointer(t);n.point=this.getPointerPoint(t);var r,a,o=1;if(t.deltaMode==1&&(o=50),o*=this.getMouseOption(e,"sensitivity"),!(t instanceof WheelEvent))throw new Error("Invalid event type");r=Math.round(-1*t.wheelDeltaX||t.deltaX*o),a=Math.round(-1*t.wheelDeltaY||t.deltaY*o),this.handleWheel(e,n,r,a,t)},i.prototype.handleTouchDown=function(e,t){for(var n=0;n<t.changedTouches.length;n++){var r=this.getPointer(t.changedTouches[n]);this.maybePreventDefault(e,t,r),this.resetPointer(r,t.changedTouches[n]),this.handleDown(e,r,t)}},i.prototype.handleHit=function(e,t,n){var r=Ot();if(e.lastHit&&e.lastHit>=r-this.getHitOption(e,"doubleHitTime")){if(r-e.lastHit<100)return;if(e.lastHit=void 0,e.lastHitPointer=void 0,e.events.isEnabled("doublehit")&&!Q.isPaused){var a={type:"doublehit",target:e,point:t.point,event:n,touch:t.touch};e.events.dispatchImmediately("doublehit",a)}}else e.lastHit=r,e.lastHitPointer=t,t.button===3?e.events.isEnabled("rightclick")&&!Q.isPaused&&(a={type:"rightclick",target:e,event:n},e.events.dispatchImmediately("rightclick",a)):e.events.isEnabled("hit")&&!Q.isPaused&&(a={type:"hit",target:e,event:n,point:t.point,touch:t.touch},e.events.dispatchImmediately("hit",a))},i.prototype.handleOver=function(e,t,n,r){if(e.hoverable){var a=!1;if(this.shouldCancelHovers(t)&&this.areTransformed()&&this.moved(t,this.getHitOption(e,"hitTolerance"))&&(a=!0,this.cancelAllHovers(n)),this.processDelayed(),e.overPointers.moveValue(t),!e.isRealHover&&(a||(e.isHover=!0,e.isRealHover=!0,this.overObjects.moveValue(e)),this.handleTrack(this.body,t,n,!0),e.events.isEnabled("over")&&!Q.isPaused&&!a)){var o={type:"over",target:e,event:n,pointer:t,touch:t.touch};e.events.dispatchImmediately("over",o)}}},i.prototype.handleOut=function(e,t,n,r,a){var o=this;if(r===void 0&&(r=!1),a===void 0&&(a=!1),e.hoverable&&(e.overPointers.removeValue(t),e.isHover&&(!e.hasDelayedOut||a))){if(r&&e.overPointers.length)return;if(t&&t.touch&&!a&&!this.old(t)){var l=this.getHoverOption(e,"touchOutBehavior");if(l=="leave")return this._delayedEvents.out.push({type:"out",io:e,pointer:t,event:n,keepUntil:Ot()+500}),void(e.hasDelayedOut=!0);if(l=="delay"&&this.getHoverOption(e,"touchOutDelay"))return void this._delayedEvents.out.push({type:"out",io:e,pointer:t,event:n,keepUntil:Ot()+500,timeout:this.setTimeout(function(){o.handleOut(e,t,n,!0)},this.getHoverOption(e,"touchOutDelay"))})}if(e.isHover=!1,this.overObjects.removeValue(e),!e.isDisposed()&&e.events.isEnabled("out")&&!Q.isPaused){var h={type:"out",target:e,event:n,pointer:t,touch:t.touch};e.events.dispatchImmediately("out",h)}e.overPointers.clear(),e.hasDelayedOut=!1}},i.prototype.processDelayed=function(){for(var e;e=this._delayedEvents.out.pop();)e.timeout&&e.timeout.dispose(),this.handleOut(e.io,e.pointer,e.event,!1,!0)},i.prototype.handleDown=function(e,t,n){if(this.maybePreventDefault(e,n,t),e.inert&&this.stopInertia(e),this.handleOver(e,t,n,!0),e.downPointers.moveValue(t),this.applyCursorDownStyle(e,t),e.isDown||(e.focusable!==!1&&this.getHitOption(e,"noFocus")&&this.focusedObject&&kn(),e.isDown=!0,this.downObjects.moveValue(e),e.draggable&&this.processDragStart(e,t,n),e.resizable&&this.processResizeStart(e,t,n)),e.events.isEnabled("down")&&!Q.isPaused){var r={type:"down",target:e,event:n,pointer:t,touch:t.touch};e.events.dispatchImmediately("down",r)}},i.prototype.handleGlobalUp=function(e,t,n){var r=this;n===void 0&&(n=!1);var a=this.downObjects.values.slice();a.sort(function(o,l){if(o&&l){var h=o.element.compareDocumentPosition(l.element);return h&Node.DOCUMENT_POSITION_CONTAINED_BY?1:h&Node.DOCUMENT_POSITION_CONTAINS?-1:0}return 0}),j(a,function(o){o&&o.downPointers.contains(e)&&r.handleUp(o,e,t,n)})},i.prototype.handleDocumentLeave=function(e){var t=this;A(this.downObjects.backwards().iterator(),function(n){n.downPointers.each(function(r){t.handleUp(n,r,e)})})},i.prototype.handleUp=function(e,t,n,r){if(r===void 0&&(r=!1),this.restoreCursorDownStyle(e,t),e.downPointers.removeValue(t),(t.touch||this._useTouchEventsOnly)&&this.handleOut(e,t,n,!0),e.isDown){if(e.downPointers.length==0&&(e.isDown=!1,this.downObjects.removeValue(e)),e.events.isEnabled("up")&&!Q.isPaused){var a={type:"up",target:e,event:n,pointer:t,touch:t.touch};e.events.dispatchImmediately("up",a)}r||(e.swipeable&&this.swiped(e,t)?this.handleSwipe(e,t,n):(e.clickable&&!this.moved(t,this.getHitOption(e,"hitTolerance"))&&this.handleHit(e,t,n),e.inert&&this.moved(t,this.getHitOption(e,"hitTolerance"))?this.handleInertia(e,t):e.draggable&&this.processDragStop(e,t,n),e.resizable&&this.processResizeStop(e,t,n)))}},i.prototype.maybePreventDefault=function(e,t,n){!v(t)||!(e.draggable||e.swipeable||e.trackable||e.resizable)||this.isGlobalElement(e)||t.cancelable===!1||e.isTouchProtected&&n&&n.touch||t.preventDefault()},i.prototype.cancelAllHovers=function(e){var t=this;A(this.overObjects.backwards().iterator(),function(n){if(n){var r=n.overPointers.getIndex(0);t.handleOut(n,r,e,!0,!0)}})},i.prototype.shouldCancelHovers=function(e){return Z.disableHoverOnTransform=="always"||Z.disableHoverOnTransform=="touch"&&e.touch},i.prototype.handleGlobalMove=function(e,t){var n,r=this;if(!e.touch){var a=typeof(n=e.lastEvent).composedPath=="function"?n.composedPath()[0]:n.target;A(this.overObjects.backwards().iterator(),function(o){if(o&&o.overPointers.contains(e)&&o.hoverable){var l=!1;o.element&&e.lastEvent&&Fh(o.element,a)||(l=!0),l&&r.handleOut(o,e,t,!0)}})}A(this.transformedObjects.backwards().iterator(),function(o){!o.downPointers.contains(e)||o.swipeable&&r.swiping(o,e)||!o.draggable&&!o.resizable||r.handleTransform(o,t)}),A(this.trackedObjects.backwards().iterator(),function(o){o.overPointers.contains(e)||r.handleTrack(o,e,t)})},i.prototype.handleTrack=function(e,t,n,r){if(r===void 0&&(r=!1),(r||this.moved(t,0))&&e.events.isEnabled("track")&&!Q.isPaused){var a={type:"track",target:e,event:n,point:t.point,pointer:t,touch:t.touch};e.events.dispatchImmediately("track",a)}},i.prototype.handleSwipe=function(e,t,n){if(e.events.isEnabled("swipe")&&!Q.isPaused){var r={type:"swipe",target:e,event:n,touch:t.touch};e.events.dispatchImmediately("swipe",r)}t.startPoint.x<t.point.x?e.events.isEnabled("swiperight")&&!Q.isPaused&&(r={type:"swiperight",target:e,event:n,touch:t.touch},e.events.dispatchImmediately("swiperight",r)):e.events.isEnabled("swipeleft")&&!Q.isPaused&&(r={type:"swipeleft",target:e,event:n,touch:t.touch},e.events.dispatchImmediately("swipeleft",r))},i.prototype.handleWheel=function(e,t,n,r,a){var o={x:n,y:r};e.events.isEnabled("wheel")&&!Q.isPaused&&e.events.dispatchImmediately("wheel",{type:"wheel",target:e,event:a,point:t.point,shift:o}),n<0?e.events.isEnabled("wheelleft")&&!Q.isPaused&&e.events.dispatchImmediately("wheelleft",{type:"wheelleft",target:e,event:a,point:t.point,shift:o}):n>0?e.events.isEnabled("swiperight")&&!Q.isPaused&&e.events.dispatchImmediately("wheelright",{type:"wheelright",target:e,event:a,point:t.point,shift:o}):r<0?e.events.isEnabled("wheelup")&&!Q.isPaused&&e.events.dispatchImmediately("wheelup",{type:"wheelup",target:e,event:a,point:t.point,shift:o}):r>0&&e.events.isEnabled("wheeldown")&&!Q.isPaused&&e.events.dispatchImmediately("wheeldown",{type:"wheeldown",target:e,event:a,point:t.point,shift:o})},i.prototype.handleInertia=function(e,t){e.draggable&&e.downPointers.length===0&&this.handleMoveInertia(e,t),e.resizable&&e.downPointers.length>1&&this.handleResizeInertia(e,t)},i.prototype.handleMoveInertia=function(e,t){var n=e,r={x:t.point.x,y:t.point.y},a={x:t.startPoint.x,y:t.startPoint.y},o=new Wh(n,"move",r,a),l=this.getTrailPoint(t,Ot()-this.getInertiaOption(e,"move","time"));if(l!==void 0){var h=this.getInertiaOption(e,"move","factor"),p=[{to:t.point.x+(t.point.x-l.point.x)*h,property:"x"},{to:t.point.y+(t.point.y-l.point.y)*h,property:"y"}],u=new gt(o,p,this.getInertiaOption(e,"move","duration"),this.getInertiaOption(e,"move","easing")).start();this._disposers.push(u.events.on("animationended",function(d){o.done()})),e.inertias.setKey("move",o)}else this.processDragStop(e,t,t.lastUpEvent)},i.prototype.handleResizeInertia=function(e,t){},i.prototype.handleTransform=function(e,t){var n,r,a,o=e.downPointers.getIndex(0),l=null,h=null;o&&(l=o.point,h=o.startPoint),a=r={x:e.originalPosition.x,y:e.originalPosition.y};for(var p=!0,u=1;u<e.downPointers.length;u++){var d=e.downPointers.getIndex(u);if(h.x!=d.startPoint.x&&h.y!=d.startPoint.y){p=!1,r=(n=d).point,a=n.startPoint;break}}var c=o&&this.moved(o,0);if(e.draggable&&o&&o.dragStartEvents&&o.dragStartEvents.length&&c&&e.events.isEnabled("dragstart")&&!Q.isPaused&&e.events.dispatchImmediately("dragstart",o.dragStartEvents.shift()),p&&e.draggable)this.handleTransformMove(e,l,h,t,c,o.touch),this.shouldCancelHovers(o)&&this.moved(o,this.getHitOption(e,"hitTolerance"))&&this.cancelAllHovers(t);else{var f=n&&this.moved(n,0);(this.shouldCancelHovers(o)&&this.moved(o,this.getHitOption(e,"hitTolerance"))||this.shouldCancelHovers(n)&&this.moved(n,this.getHitOption(e,"hitTolerance")))&&this.cancelAllHovers(t),e.draggable&&e.resizable?(this.handleTransformMove(e,l,h,t,c&&f,o.touch),this.handleTransformResize(e,l,h,r,a,t,c&&f,o.touch)):(e.draggable&&this.handleTransformMove(e,l,h,t,c,o.touch),!e.resizable||p&&!t.ctrlKey||this.handleTransformResize(e,l,h,r,a,t,c&&f,o.touch))}},i.prototype.handleTransformMove=function(e,t,n,r,a,o){if(a&&e.events.isEnabled("drag")&&!Q.isPaused&&(!e.isTouchProtected||!o)){var l={type:"drag",target:e,event:r,shift:{x:t.x-n.x,y:t.y-n.y},startPoint:n,point:t,touch:o};e.events.dispatchImmediately("drag",l)}},i.prototype.handleTransformResize=function(e,t,n,r,a,o,l,h){if(e.events.isEnabled("resize")&&!Q.isPaused&&(!e.isTouchProtected||!h)){var p={type:"resize",target:e,event:o,scale:ul(t,n,r,a),startPoint1:n,point1:t,startPoint2:a,point2:r,touch:h};e.events.dispatchImmediately("resize",p)}},i.prototype.processDragStart=function(e,t,n){this.transformedObjects.moveValue(e),this.shouldCancelHovers(t)&&this.cancelAllHovers(n);var r={type:"dragstart",target:e,event:n,touch:!!t&&t.touch};t&&(t.dragTarget=e),t&&t.dragStartEvents?t.dragStartEvents.push(r):Q.isPaused||e.dispatchImmediately("dragstart",r)},i.prototype.processDragStop=function(e,t,n){if(t||(t=this.getDragPointer(e)),t&&(t.dragTarget=void 0),this.transformedObjects.removeValue(e),(!t||this.moved(t,0))&&e.events.isEnabled("dragstop")&&!Q.isPaused){var r={type:"dragstop",target:e,touch:!!t&&t.touch};e.events.dispatchImmediately("dragstop",r)}},i.prototype.processResizeStart=function(e,t,n){this.transformedObjects.moveValue(e)},i.prototype.processResizeStop=function(e,t,n){this.transformedObjects.removeValue(e)},i.prototype.dragStart=function(e,t){t||(t=this.getDragPointer(e)),t&&this.handleDown(e,t,t.lastDownEvent)},i.prototype.dragStop=function(e,t,n){t||(t=this.getDragPointer(e)),t&&!n&&this.handleGlobalUp(t,t.lastUpEvent,n)},i.prototype.getDragPointer=function(e){return e?e.downPointers.getIndex(0):this.transformedObjects.length?this.getDragPointer(this.transformedObjects.getIndex(0)):void 0},i.prototype.getPointerId=function(e){return(v(e.identifier)?""+e.identifier:v(e.pointerId)?""+e.pointerId:"m").replace("-","")},i.prototype.getPointerPoint=function(e){return{x:e.clientX,y:e.clientY}},i.prototype.getPointer=function(e){var t,n=this.getPointerId(e),r=this.getPointerPoint(e);return this.pointers.hasKey(n)?(t=this.pointers.getKey(n)).touch=this.isPointerTouch(e):(t={id:n,touch:this.isPointerTouch(e),startPoint:r,startTime:Ot(),point:r,track:[],swipeCanceled:!1,dragStartEvents:[]},this.addBreadCrumb(t,r),this.pointers.setKey(n,t)),t.lastEvent=e,this.lastPointer=t,t},i.prototype.isPointerTouch=function(e){if(typeof Touch!="undefined"&&e instanceof Touch)return!0;if(typeof PointerEvent!="undefined"&&e instanceof PointerEvent&&v(e.pointerType))switch(e.pointerType){case"touch":case"pen":case 2:return!0;case"mouse":case 4:return!1;default:return!(e instanceof MouseEvent)}else if(v(e.type)&&e.type.match(/^mouse/))return!1;return!0},i.prototype.resetPointer=function(e,t){var n=this.getPointerPoint(t);e.startTime=Ot(),e.startPoint={x:n.x,y:n.y},e.point={x:n.x,y:n.y},e.track=[],e.swipeCanceled=!1},i.prototype.addBreadCrumb=function(e,t){e.track.push({timestamp:Ot(),point:t})},i.prototype.lockDocument=function(){this.prepElement(this.body)},i.prototype.unlockDocument=function(){this.transformedObjects.length==0&&this.restoreAllStyles(this.body)},i.prototype.lockElement=function(e){this.prepElement(e)},i.prototype.unlockElement=function(e){this.restoreAllStyles(e)},i.prototype.lockWheel=function(){window.addEventListener(this._pointerEvents.wheel,this.wheelLockEvent,!!this._passiveSupported&&{passive:!1})},i.prototype.unlockWheel=function(){window.removeEventListener(this._pointerEvents.wheel,this.wheelLockEvent)},i.prototype.isLocalElement=function(e,t,n){var r=this.getCache("local_pointer_"+e.id);if(v(r))return r;var a=Mh(t)||document;if(a.elementFromPoint){var o=a.elementFromPoint(e.point.x,e.point.y),l=o&&Fh(t,o);return this.setCache("local_pointer_"+e.id+"_"+n,l,100),l}return!1},i.prototype.wheelLockEvent=function(e){return e.preventDefault(),!1},i.prototype.prepElement=function(e){var t=e.element;if(t){for(var n=["touchAction","webkitTouchAction","MozTouchAction","MSTouchAction","msTouchAction","oTouchAction","userSelect","webkitUserSelect","MozUserSelect","MSUserSelect","msUserSelect","oUserSelect","touchSelect","webkitTouchSelect","MozTouchSelect","MSTouchSelect","msTouchSelect","oTouchSelect","touchCallout","webkitTouchCallout","MozTouchCallout","MSTouchCallout","msTouchCallout","oTouchCallout","contentZooming","webkitContentZooming","MozContentZooming","MSContentZooming","msContentZooming","oContentZooming","userDrag","webkitUserDrag","MozUserDrag","MSUserDrag","msUserDrag","oUserDrag"],r=0;r<n.length;r++)n[r]in t.style&&this.setTemporaryStyle(e,n[r],"none");this.setTemporaryStyle(e,"tapHighlightColor","rgba(0, 0, 0, 0)")}},i.prototype.unprepElement=function(e){var t=e.element;if(t){for(var n=["touchAction","webkitTouchAction","MozTouchAction","MSTouchAction","msTouchAction","oTouchAction","userSelect","webkitUserSelect","MozUserSelect","MSUserSelect","msUserSelect","oUserSelect","touchSelect","webkitTouchSelect","MozTouchSelect","MSTouchSelect","msTouchSelect","oTouchSelect","touchCallout","webkitTouchCallout","MozTouchCallout","MSTouchCallout","msTouchCallout","oTouchCallout","contentZooming","webkitContentZooming","MozContentZooming","MSContentZooming","msContentZooming","oContentZooming","userDrag","webkitUserDrag","MozUserDrag","MSUserDrag","msUserDrag","oUserDrag"],r=0;r<n.length;r++)n[r]in t.style&&this.restoreStyle(e,n[r]);this.restoreStyle(e,"tapHighlightColor")}},i.prototype.getHitOption=function(e,t){var n=e.hitOptions[t];return n===void 0&&(n=this.hitOptions[t]),n},i.prototype.getHoverOption=function(e,t){var n=e.hoverOptions[t];return n===void 0&&(n=this.hoverOptions[t]),n},i.prototype.getSwipeOption=function(e,t){var n=e.swipeOptions[t];return n===void 0&&(n=this.swipeOptions[t]),n},i.prototype.getKeyboardOption=function(e,t){var n=e.keyboardOptions[t];return n===void 0&&(n=this.keyboardOptions[t]),n},i.prototype.getMouseOption=function(e,t){var n=e.mouseOptions[t];return n===void 0&&(n=this.mouseOptions[t]),n},i.prototype.getInertiaOption=function(e,t,n){var r=e.inertiaOptions.getKey(t);return r&&v(r[n])?r[n]:this.inertiaOptions.getKey(t)[n]},i.prototype.stopInertia=function(e){for(var t,n=["move","resize"],r=0;r<n.length;r++)if(t=n[r],e.inertias.hasKey(t)){var a=e.inertias.getKey(t);if(a){a.dispose();continue}}},i.prototype.swiping=function(e,t){var n=Ot();return!(t.swipeCanceled||!e.swipeable)&&Math.abs(t.startPoint.y-t.point.y)<this.getSwipeOption(e,"verticalThreshold")&&t.startTime>n-this.getSwipeOption(e,"time")},i.prototype.swiped=function(e,t){var n=Ot();return!t.swipeCanceled&&Math.abs(t.startPoint.x-t.point.x)>this.getSwipeOption(e,"horizontalThreshold")&&Math.abs(t.startPoint.y-t.point.y)<this.getSwipeOption(e,"verticalThreshold")&&t.startTime>n-this.getSwipeOption(e,"time")},i.prototype.applyCursorOverStyle=function(e){var t=e.cursorOptions;if(v(t.overStyle))for(var n=0;n<t.overStyle.length;n++)Vh(e.element,t.overStyle[n].property,t.overStyle[n].value)},i.prototype.applyCursorDownStyle=function(e,t){if(!t||!t.touch){var n=e.cursorOptions.downStyle;if(e.downPointers.contains(t)&&v(n))for(var r=0;r<n.length;r++)this.setTemporaryStyle(this.body,n[r].property,n[r].value),this.setTemporaryStyle(e,n[r].property,n[r].value)}},i.prototype.restoreCursorDownStyle=function(e,t){if(!t||!t.touch){var n=e.cursorOptions.downStyle;if(e.downPointers.contains(t)&&v(n))for(var r=0;r<n.length;r++)this.restoreStyle(this.body,n[r].property),this.restoreStyle(e,n[r].property)}},i.prototype.setGlobalStyle=function(e){for(var t=K().body,n=Ae(e)?e:[e],r=0;r<n.length;r++)this.setTemporaryStyle(t,n[r].property,n[r].value)},i.prototype.restoreGlobalStyle=function(e){for(var t=K().body,n=Ae(e)?e:[e],r=0;r<n.length;r++)this.restoreStyle(t,n[r].property)},i.prototype.isGlobalElement=function(e){return document.body===e.element},i.prototype.moved=function(e,t,n){var r=this.getShift(e);return Math.abs(r.x)>t||Math.abs(r.y)>t},i.prototype.old=function(e,t){return t===void 0&&(t=300),Ot()-e.startTime>t},i.prototype.getShift=function(e){return{x:e.startPoint.x-e.point.x,y:e.startPoint.y-e.point.y}},i.prototype.getTrailPoint=function(e,t){for(var n,r=0;r<e.track.length;r++)if(e.track[r].timestamp>=t){n=e.track[r];break}return n},i.prototype.pointerExists=function(e,t){var n=!1;return e.each(function(r){r!=t&&(n=r.point.x==t.point.x&&r.point.y==t.point.y)}),n},i.prototype.getInteraction=function(e){return new Hh(e)},i.prototype.setTemporaryStyle=function(e,t,n){var r=e.element;v(r.style[t])&&!e.replacedStyles.hasKey(t)&&e.replacedStyles.setKey(t,r.style[t]),Vh(r,t,n)},i.prototype.restoreStyle=function(e,t){e.replacedStyles.hasKey(t)?(e.element.style[t]=e.replacedStyles.getKey(t),e.replacedStyles.removeKey(t)):delete e.element.style[t]},i.prototype.restoreAllStyles=function(e){A(e.replacedStyles.iterator(),function(t){var n=t[0],r=t[1];e.element.style[n]=r,e.replacedStyles.removeKey(n)})},i.prototype.dispose=function(){this.isDisposed()||(s.prototype.dispose.call(this),this.restoreAllStyles(this.body),this.unlockWheel())},i.prototype.log=function(e,t,n){if(t.changedTouches)for(var r=0;r<t.changedTouches.length;r++)this.logTouch(e,t.type,t.changedTouches[r]);else{var a,o="";if(t.pointerType)switch(t.pointerType){case 2:o="touch";break;case 4:o="mouse";break;default:o=t.pointerType}else o=typeof TouchEvent!="undefined"&&t instanceof TouchEvent?"touch":t.type.match(/^mouse/)?"mouse":"???";a=v(t.identifier)?t.identifier:v(t.pointerId)?t.pointerId:"???",console.log(n?e+" ("+n.uid+") "+t.type+" "+o+" "+a:e+" "+t.type+" "+o+" "+a)}},i.prototype.areTransformed=function(e){var t=this.transformedObjects.length;if(e)for(var n=Ae(e)?e:[e],r=0;r<n.length;r++)this.transformedObjects.contains(n[r])&&t--;return t>0},i.prototype.logTouch=function(e,t,n){console.log(e+" "+t+" touch "+n.identifier)},Object.defineProperty(i,"passiveSupported",{get:function(){var e=this;if(this._passiveSupported==null)try{var t=Object.defineProperty({},"passive",{get:function(){e._passiveSupported=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch{this._passiveSupported=!1}return this._passiveSupported},enumerable:!0,configurable:!0}),i}(wt),La=null;function K(){return La==null&&(La=new Gh),La}var ja=function(s){function i(){var e=s.call(this)||this;return e.adapter=new it(e),e._elements={},e._IOs={},e._content="",e._title="",e._classPrefix="ampopup",e._defaultStyles=!0,e._showCurtain=!1,e._draggable=!0,e._align="center",e._dynamicResize=!0,e._verticalAlign="middle",e._shift={x:0,y:0},e._tempShift={x:0,y:0},e._readerTitle="",e._closable=!0,e._cssLoaded=!1,e._fitTo="window",e.isTemplate=!1,e._sized=!1,e.className="Popup",e}return w(i,s),i.prototype.open=function(){this.container&&(this._elements.wrapper&&this.container.appendChild(this._elements.wrapper),this._elements.curtain&&(this.container.appendChild(this._elements.curtain),this.showCurtain=this.showCurtain),this.positionElement(),this.dispatchImmediately("opened"))},i.prototype.close=function(){this._elements.wrapper&&this._elements.wrapper.parentElement&&this._elements.wrapper.parentElement.removeChild(this._elements.wrapper),this._elements.curtain&&this._elements.curtain.parentElement&&this._elements.curtain.parentElement.removeChild(this._elements.curtain),this.dispatchImmediately("closed"),this.releasePointers()},i.prototype.dispose=function(){this.close(),s.prototype.dispose.call(this)},i.prototype.positionElement=function(e){var t=this;e===void 0&&(e=!0),this._elements.wrapper&&setTimeout(function(){if(t._elements.wrapper){if(e||!t._sized){t._elements.wrapper.style.opacity="0.01",t._elements.wrapper.style.left="0",t._elements.wrapper.style.top="0",t._elements.wrapper.style.margin="0 0 0 0",t._elements.wrapper.style.width="",t._elements.wrapper.style.height="";var n=t._elements.wrapper.getBoundingClientRect();t._elements.wrapper.style.width=n.width+"px",t._elements.wrapper.style.height=n.height+"px",t._sized=!0}if(t.dynamicResize)for(var r=t._elements.wrapper.getElementsByTagName("img"),a=0;a<r.length;a++){var o=r[a];if(!o.complete){o.addEventListener("load",function(){t.positionElement(!0)});break}}setTimeout(function(){if(t._elements.wrapper){var l;switch(!e&&t._sized||!t._bbox?(l=t._elements.wrapper.getBoundingClientRect(),t._elements.wrapper.style.opacity=""):l=t._bbox,t.align){case"left":t._elements.wrapper.style.left="0",t._elements.wrapper.style.right="auto",t._elements.wrapper.style.marginLeft=t.toStyle(t._shift.x+t._tempShift.x);break;case"center":t._elements.wrapper.style.left="50%",t._elements.wrapper.style.right="auto",t._elements.wrapper.style.marginLeft=t.toStyle(Math.round(-l.width/2)+(t._shift.x+t._tempShift.x));break;case"right":t._elements.wrapper.style.left="auto",t._elements.wrapper.style.right="0",t._elements.wrapper.style.marginLeft=t.toStyle(t._shift.x+t._tempShift.x);break;default:t._elements.wrapper.style.left=t.toStyle(t.left)||"auto",t._elements.wrapper.style.right=t.toStyle(t.right)||"auto",t._elements.wrapper.style.marginLeft=t.toStyle(t._shift.x+t._tempShift.x)}switch(t.verticalAlign){case"top":t._elements.wrapper.style.top="0",t._elements.wrapper.style.bottom="auto",t._elements.wrapper.style.marginTop=t.toStyle(t._shift.y+t._tempShift.y);break;case"middle":t._elements.wrapper.style.top="50%",t._elements.wrapper.style.bottom="auto",t._elements.wrapper.style.marginTop=t.toStyle(Math.round(-l.height/2)+(t._shift.y+t._tempShift.y));break;case"bottom":t._elements.wrapper.style.top="auto",t._elements.wrapper.style.bottom="0",t._elements.wrapper.style.marginTop=t.toStyle(t._shift.y+t._tempShift.y);break;default:t._elements.wrapper.style.top=t.toStyle(t.top)||"auto",t._elements.wrapper.style.bottom=t.toStyle(t.bottom)||"auto",t._elements.wrapper.style.marginTop=t.toStyle(t._shift.y+t._tempShift.y)}}},1)}},1)},i.prototype.setupDragging=function(){var e=this;this.draggable?(this._IOs.header.events.has("drag")||this._IOs.header.events.on("drag",function(t){e._tempShift.x=t.shift.x,e._tempShift.y=t.shift.y,e.positionElement(!1)}),this._IOs.header.events.has("dragstop")||this._IOs.header.events.on("dragstop",function(t){e._shift.x+=e._tempShift.x,e._shift.y+=e._tempShift.y,e._tempShift.x=0,e._tempShift.y=0,e.positionElement(!1)})):this._IOs.header&&(K().unprepElement(this._IOs.header),this._IOs.header.events.has("drag")&&this._IOs.header.events.off("drag"),this._IOs.header.events.has("dragstop")&&this._IOs.header.events.off("dragstop"))},i.prototype.toStyle=function(e){return v(e)?y(e)?e+"px":e.toString():null},Object.defineProperty(i.prototype,"classPrefix",{get:function(){return this.adapter.apply("classPrefix",this._classPrefix)},set:function(e){this._classPrefix=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"classPrefixRaw",{get:function(){return this._classPrefix},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"content",{get:function(){return this.adapter.apply("content",this._content)},set:function(e){this._content!=e&&(this._content=e,this._elements.content||this.createContentElement(),this._elements.content.innerHTML=e,this.positionElement())},enumerable:!0,configurable:!0}),i.prototype.getClassNames=function(){return this.adapter.apply("classNames",{wrapperClass:this.classPrefix+"",headerClass:this.classPrefix+"-header",titleClass:this.classPrefix+"-title",contentClass:this.classPrefix+"-content",insideClass:this.classPrefix+"-inside",curtainClass:this.classPrefix+"-curtain",closeClass:this.classPrefix+"-close"})},i.prototype.createContentElement=function(){if(!this._elements.wrapper){var e=this.getClassNames(),t=document.createElement("div");t.className=e.contentClass,t.style.opacity="0.01";var n=document.createElement("a");n.className=e.closeClass;var r=document.createElement("div");r.className=e.headerClass;var a=document.createElement("div");a.innerHTML=this.title,a.className=e.titleClass,this.title||(a.style.display="none");var o=document.createElement("div");o.className=e.insideClass,o.innerHTML=this.content,this._IOs.wrapper=K().getInteraction(t),this._IOs.header=K().getInteraction(r),this._disposers.push(this._IOs.wrapper),this._IOs.wrapper.events.on("over",this.disablePointers,this),this._IOs.wrapper.events.on("out",this.releasePointers,this),this._IOs.close=K().getInteraction(n),this._disposers.push(this._IOs.close),n.style.visibility="hidden",t.setAttribute("role","dialog"),r.appendChild(n),r.appendChild(a),t.appendChild(r),t.appendChild(o),this.container.appendChild(t),this._elements.wrapper=t,this._elements.header=r,this._elements.content=o,this._elements.title=a,this._elements.close=n,this.defaultStyles&&this.loadDefaultCSS(),this.createCurtainElement(),this.applyEvents(),this.applyReaderSettings(),this.setupDragging()}},Object.defineProperty(i.prototype,"title",{get:function(){return this.adapter.apply("title",this._title)},set:function(e){this._title!=e&&(this._title=e,this._elements.content||this.createContentElement(),this._elements.title.innerHTML=e,this.positionElement(),this.applyReaderSettings())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"readerTitle",{get:function(){return this.adapter.apply("readerTitle",this._readerTitle!=""?this._readerTitle:this.title)},set:function(e){this._readerTitle!=e&&(this._readerTitle=e,this.applyReaderSettings())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"closable",{get:function(){return this.adapter.apply("closable",this._closable)},set:function(e){e!==this._closable&&(this._closable=e,this.applyEvents())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fitTo",{get:function(){return this.adapter.apply("fitTo",this._fitTo)},set:function(e){e!=this._fitTo&&(this._fitTo=e,this.positionElement())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"defaultStyles",{get:function(){return this.adapter.apply("defaultStyles",this._defaultStyles)},set:function(e){this._defaultStyles!=e&&(this._defaultStyles=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"showCurtain",{get:function(){return this.adapter.apply("showCurtain",this._showCurtain)},set:function(e){this._showCurtain!=e&&(this._showCurtain=e,this._elements.curtain&&(this._elements.curtain.style.display=e?"block":"none"))},enumerable:!0,configurable:!0}),i.prototype.createCurtainElement=function(){var e=this.getClassNames(),t=document.createElement("div");t.className=e.curtainClass,this.container.appendChild(t),this._IOs.curtain=K().getInteraction(t),this._disposers.push(this._IOs.curtain),this._IOs.curtain.events.on("over",this.disablePointers,this),this._IOs.curtain.events.on("out",this.releasePointers,this),t.style.display=this.showCurtain?"block":"none",this._elements.curtain=t},Object.defineProperty(i.prototype,"draggable",{get:function(){return this.adapter.apply("draggable",this._draggable)},set:function(e){this._draggable!=e&&(this._draggable=e,this.setupDragging())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dynamicResize",{get:function(){return this.adapter.apply("dynamicResize",this._dynamicResize)},set:function(e){this._dynamicResize!=e&&(this._dynamicResize=e,this.positionElement(!0))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"align",{get:function(){return this.adapter.apply("align",this._align)},set:function(e){this._align!=e&&(this._align=e,this.positionElement())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"verticalAlign",{get:function(){return this.adapter.apply("verticalAlign",this._verticalAlign)},set:function(e){this._verticalAlign!=e&&(this._verticalAlign=e,this.positionElement())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"left",{get:function(){return this.adapter.apply("left",this._left)},set:function(e){this.left!=e&&(this._left=e,this._align="none",this.positionElement())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"right",{get:function(){return this.adapter.apply("right",this._right)},set:function(e){this.right!=e&&(this._right=e,this._align="none",this.positionElement())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"top",{get:function(){return this.adapter.apply("top",this._top)},set:function(e){this.top!=e&&(this._top=e,this._verticalAlign="none",this.positionElement())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bottom",{get:function(){return this.adapter.apply("bottom",this._bottom)},set:function(e){this.bottom!=e&&(this._bottom=e,this._verticalAlign="none",this.positionElement())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"elements",{get:function(){return this._elements},enumerable:!0,configurable:!0}),i.prototype.loadDefaultCSS=function(){this._cssLoaded||(this._disposers.push(function(e,t){t||(t="ampopup");var n=new ae,r=n.getFor("text"),a=n.getFor("background");a.alpha=.8;var o=n.getFor("alternativeBackground");return o.alpha=.05,Rh.insertKeyIfEmpty(t,function(){var l=new _e([new ue(e,"."+t,{overflow:"visible",position:"absolute",top:"0",left:"0","z-index":"2000"}),new ue(e,"."+t+"-curtain",{width:"100%",height:"100%",position:"absolute",top:"0",left:"0","z-index":"2001","background-color":a.hex,opacity:"0.5"}),new ue(e,"."+t+"-header",{display:"block",width:"100%","min-height":"1.8em",background:o.rgba}),new ue(e,"."+t+"-title",{"font-weight":"bold","font-size":"110%",padding:"0.5em 1.2em 0.5em 1em"}),new ue(e,"."+t+"-content",{background:a.hex,"background-color":a.rgba,color:r.hex,display:"inline-block",position:"absolute",top:"0",left:"0","max-width":"90%","max-height":"90%",overflow:"auto","z-index":"2002"}),new ue(e,"."+t+"-inside",{padding:"1em"}),new ue(e,"."+t+"-close",{display:"block",position:"absolute",top:"0.3em",right:"0.3em","background-color":"rgb(100, 100, 100)",background:"rgba(100, 100, 100, 0.1) url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBoZWlnaHQ9IjUxMiIgdmVyc2lvbj0iMSIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHdpZHRoPSI1MTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQ0NS4yIDEwOS4ybC00Mi40LTQyLjRMMjU2IDIxMy42IDEwOS4yIDY2LjhsLTQyLjQgNDIuNEwyMTMuNiAyNTYgNjYuOCA0MDIuOGw0Mi40IDQyLjRMMjU2IDI5OC40bDE0Ni44IDE0Ni44IDQyLjQtNDIuNEwyOTguNCAyNTYiLz48L3N2Zz4=) no-repeat center","background-size":"80%",width:"1.2em",height:"1.2em",cursor:"pointer"})]);return new un(function(){Rh.removeKey(t),l.dispose()})}).increment()}(Va(this.container),this.classPrefix)),X(this._elements,function(e,t){t.style.display=""}),this._cssLoaded=!0)},i.prototype.applyEvents=function(){var e=this;if(this._IOs.close)if(this.closable){this._IOs.close.element.style.visibility="visible";var t=[K().body.events.on("keyup",function(n){Ct.isKey(n.event,"esc")&&e.closable&&e.close()}),this._IOs.close.events.on("hit",function(n){e.close()})];t.push(this._IOs.curtain.events.on("hit",function(n){e.showCurtain&&e.closable&&e.close()})),this._disposers.push(new _e(t))}else this._IOs.close.element.style.visibility="hidden"},i.prototype.disablePointers=function(){this.sprite&&(this._spriteInteractionsEnabled=this.sprite.interactionsEnabled,this.sprite.interactionsEnabled=!1)},i.prototype.releasePointers=function(){v(this._spriteInteractionsEnabled)&&(this.sprite.interactionsEnabled=this._spriteInteractionsEnabled,this._spriteInteractionsEnabled=void 0)},i.prototype.applyReaderSettings=function(){this.elements.wrapper.setAttribute("aria-label",this.readerTitle)},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.container=e.container,this.sprite=e.sprite,this.classPrefix=e.classPrefixRaw,this.content=e.content,this.title=e.title,this.readerTitle=e.readerTitle,this.defaultStyles=e.defaultStyles,this.showCurtain=e.showCurtain,this.align=e.align,this.verticalAlign=e.verticalAlign,this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.adapter.copyFrom(e.adapter)},i}(wt),Ea=function(s){function i(){var e=s.call(this)||this;return e.adapter=new it(e),e.className="Modal",e.showCurtain=!0,e.draggable=!1,e}return w(i,s),i}(ja);function Ra(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];Z.suppressWarnings||console&&console.warn.apply(console,di(s))}var rd=function(){function s(){var i=this;this._targets=[],this._observer=new ResizeObserver(function(e){j(e,function(t){j(i._targets,function(n){n.target===t.target&&n.callback()})})})}return s.prototype.addTarget=function(i,e){this._observer.observe(i,{box:"content-box"}),this._targets.push({target:i,callback:e})},s.prototype.removeTarget=function(i){this._observer.unobserve(i),Ks(this._targets,function(e){return e.target!==i})},s}(),sd=function(){function s(){this._targets=[]}return s.prototype.addTarget=function(i,e){var t=this;if(this._targets.length===0){var n=null,r=function(){var o=Date.now();(n===null||o>n+s.delay)&&(n=o,j(t._targets,function(l){var h=l.target.getBoundingClientRect();h.width===l.size.width&&h.height===l.size.height||(l.size=h,l.callback())})),t._timer=requestAnimationFrame(r)};this._timer=requestAnimationFrame(r)}var a=i.getBoundingClientRect();this._targets.push({target:i,callback:e,size:a})},s.prototype.removeTarget=function(i){Ks(this._targets,function(e){return e.target!==i}),this._targets.length===0&&cancelAnimationFrame(this._timer)},s.delay=200,s}(),Ba=null,ad=function(){function s(i,e){this._disposed=!1,this._sensor=(Ba===null&&(Ba=typeof ResizeObserver!="undefined"?new rd:new sd),Ba),this._element=i,this._sensor.addTarget(i,e)}return s.prototype.isDisposed=function(){return this._disposed},s.prototype.dispose=function(){this._disposed||(this._disposed=!0,this._sensor.removeTarget(this._element))},Object.defineProperty(s.prototype,"sensor",{get:function(){return this._sensor},enumerable:!0,configurable:!0}),s.prototype.reset=function(){Ra("resizeSensor.reset() is no longer needed and can be removed")},s}(),Ha=[],Na=function(){function s(i,e){var t=this;this._disposed=!1,this.autoResize=!0,this.nonExportableSprites=[],this._disposers=[],this.cssScale=1,this._printing=!1,this.htmlElement=i,e||(this._printing=!1,this.initSensor(),this._disposers.push(Ce(window,"beforeprint",function(){t._printing=!0})),this._disposers.push(Ce(window,"afterprint",function(){t._printing=!1}))),Ha.push(this);var n=document.createElement("div"),r=n.style;r.width="100%",r.height="100%",r.position="relative",i.appendChild(n),this.SVGContainer=n}return s.prototype.initSensor=function(){var i=this;this.resizeSensor&&this.resizeSensor.dispose(),this.resizeSensor=new ad(this.htmlElement,function(){i.autoResize&&!i._printing&&i.measure()}),this._disposers.push(this.resizeSensor)},s.prototype.measure=function(){var i=rh(this.htmlElement),e=sh(this.htmlElement),t=this.container;t&&(this.width==i&&this.height==e||(this.width=i,this.height=e,i>0&&(t.maxWidth=i),e>0&&(t.maxHeight=e),Lh(this.SVGContainer)),t.maxWidth||(t.maxWidth=0),t.maxHeight||(t.maxHeight=0),this.cssScale=1,this.checkTransform(this.htmlElement))},Object.defineProperty(s.prototype,"container",{get:function(){return this._container},set:function(i){this._container=i,this.measure()},enumerable:!0,configurable:!0}),s.prototype.isDisposed=function(){return this._disposed},s.prototype.dispose=function(){this._disposed||z(Ha,this),j(this._disposers,function(i){i.dispose()})},Object.defineProperty(s.prototype,"hideOverflow",{set:function(i){this.SVGContainer.style.overflow=i?"hidden":""},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"modal",{get:function(){return v(this._modal)||(this._modal=new Ea,this._modal.container=this.SVGContainer,this._disposers.push(this._modal)),this._modal},enumerable:!0,configurable:!0}),s.prototype.openModal=function(i,e){this.closeModal();var t=this.modal;return t.content=i,t.readerTitle=e||"",t.title=e||"",t.open(),t},s.prototype.closeModal=function(){this._modal&&this.modal.close()},Object.defineProperty(s.prototype,"popups",{get:function(){if(!v(this._popups)){var i=new ja;i.container=this.SVGContainer,this._popups=new Oe(i),this._disposers.push(new fe(this._popups)),this._disposers.push(this._popups.template)}return this._popups},enumerable:!0,configurable:!0}),s.prototype.openPopup=function(i,e){var t=this.popups.create();return t.content=i,v(e)&&(t.title=e),t.open(),t},s.prototype.closeAllPopups=function(){this.popups.each(function(i){i.close()})},Object.defineProperty(s.prototype,"readerAlertElement",{get:function(){if(!v(this._readerAlertElement)){var i=document.createElement("div");i.setAttribute("role","alert"),i.style.zIndex="-100000",i.style.opacity="0",i.style.position="absolute",i.style.top="0",this.SVGContainer.appendChild(i),this._readerAlertElement=i}return this._readerAlertElement},enumerable:!0,configurable:!0}),s.prototype.readerAlert=function(i){this.readerAlertElement.innerHTML=i},s.prototype.checkTransform=function(i){if(window.getComputedStyle){if(i&&i.style){var e=window.getComputedStyle(i,null);if(e){var t=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform");if(t&&t!=="none"){var n=t.split("(")[1].split(")")[0].split(","),r=Number(n[0]),a=Number(n[1]),o=Math.sqrt(r*r+a*a);isNaN(o)||(this.cssScale*=o)}}}i.parentNode&&i.parentNode instanceof HTMLElement&&this.checkTransform(i.parentNode)}},s}(),Wa=function(){function s(i,e){this.container=i,this.id=e;var t=document.createElementNS(zi,"svg");t.setAttribute("version","1.1"),t.setAttributeNS(Ah,"xmlns",zi),t.setAttributeNS(Ah,"xmlns:xlink",Ta),t.setAttribute("role","group"),this.container.appendChild(t),this.defs=document.createElementNS(zi,"defs"),t.appendChild(this.defs),t.style.width="100%",t.style.height="100%",t.style.overflow="visible",this.svg=t}return s.prototype.add=function(i){return new An(i)},s.prototype.addGroup=function(i){return new Eh(i)},s.prototype.append=function(i){i&&this.svg.appendChild(i.node)},s.prototype.appendDef=function(i){i&&this.defs.appendChild(i.node)},s.prototype.foreignObject=function(){return new An("foreignObject")},s.prototype.supportsForeignObject=function(){return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Extensibility","1.1")},s}(),Xa=null;function Ui(){if(Xa===null){var s=document.createElement("div");s.hidden=!0,s.style.width="1px",s.style.height="1px",s.style.position="absolute",s.style.zIndex="-1000000",document.body.appendChild(s);var i=new Na(s,!0);Xa=new Wa(i.SVGContainer,"ghost")}return Xa}var xi=function(s){function i(){var e=s.call(this)||this;e._elements=new re,e.properties={},e.className="Pattern",e.width=10,e.height=10,e.x=0,e.y=0,e.patternUnits="userSpaceOnUse";var t=new ae;return e.backgroundFill=t.getFor("background"),e.backgroundOpacity=0,e.fillOpacity=1,e.fill=t.getFor("alternativeBackground"),e.stroke=t.getFor("alternativeBackground"),e.strokeOpacity=1,e.strokeWidth=1,e.shapeRendering="crispEdges",e.rotation=0,e.element=e.paper.addGroup("pattern"),e.id="pattern-"+_.getUniqueId(),e.element.attr({id:e.id}),e._disposers.push(e.element),e._disposers.push(new fe(e._elements)),e.patternUnits=e.patternUnits,e.width=e.width,e.height=e.height,e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){var e=this,t=this.element;if(t){t.removeChildNodes();var n=this.paper.add("rect");n.attr({width:this.width,height:this.height,"shape-rendering":"crispEdges",fill:this.backgroundFill.hex,"fill-opacity":this.backgroundOpacity,stroke:this.backgroundFill.hex,"stroke-opacity":0}),t.add(n),t.attr({x:this.x,y:this.y,width:this.width,height:this.height,stroke:this.stroke.hex,fill:this.fill.hex,"fill-opacity":this.fillOpacity,"stroke-opacity":this.strokeOpacity,"stroke-width":this.strokeWidth,"shape-rendering":this.shapeRendering,patternUnits:this.patternUnits,"stroke-dasharray":this.strokeDasharray}),A(this._elements.iterator(),function(r){r.rotation=e.rotation,r.rotationX=e.properties.rotationX,r.rotationY=e.properties.rotationY,e.element.add(r)})}},i.prototype.animate=function(e,t,n){return new gt(this,e,t,n).start()},i.prototype.addElement=function(e){this._elements.push(e),this._disposers.push(e)},i.prototype.removeElement=function(e){this._elements.removeValue(e),this.removeDispose(e)},Object.defineProperty(i.prototype,"elements",{get:function(){return this._elements},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fillOpacity",{get:function(){return this.properties.fillOpacity},set:function(e){this.properties.fillOpacity=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fill",{get:function(){return this.properties.fill},set:function(e){this.properties.fill=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"backgroundFill",{get:function(){return this.properties.backgroundFill},set:function(e){this.properties.backgroundFill=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"backgroundOpacity",{get:function(){return this.properties.backgroundOpacity},set:function(e){this.properties.backgroundOpacity=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"stroke",{get:function(){return this.properties.stroke},set:function(e){this.properties.stroke=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"strokeOpacity",{get:function(){return this.properties.strokeOpacity},set:function(e){this.properties.strokeOpacity=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"strokeWidth",{get:function(){return this.properties.strokeWidth},set:function(e){this.properties.strokeWidth=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"shapeRendering",{get:function(){return this.properties.shapeRendering},set:function(e){this.properties.shapeRendering=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rotation",{get:function(){return this.properties.rotation},set:function(e){this.properties.rotation=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"patternUnits",{get:function(){return this.properties.patternUnits},set:function(e){this.properties.patternUnits=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"width",{get:function(){return this.properties.width},set:function(e){this.properties.width=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"height",{get:function(){return this.properties.height},set:function(e){this.properties.height=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"x",{get:function(){return this.properties.x},set:function(e){this.properties.x=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"y",{get:function(){return this.properties.y},set:function(e){this.properties.y=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"paper",{get:function(){return this._paper?this._paper:Ui()},set:function(e){this._paper!=e&&(this._paper=e,this.draw(),e.appendDef(this.element))},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){var t=this;s.prototype.copyFrom.call(this,e),X(e.properties,function(n,r){t[n]=r})},Object.defineProperty(i.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new Yi(this._animations))),this._animations},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"strokeDasharray",{get:function(){return this.properties.strokeDashArray},set:function(e){this.properties.strokeDashArray=e,this.draw()},enumerable:!0,configurable:!0}),i.prototype.processConfig=function(e){if(e&&v(e.elements)&&Ae(e.elements))for(var t=0,n=e.elements.length;t<n;t++){var r=e.elements[t];if(v(r.type)){var a=this.createEntryInstance(r);a instanceof Ke&&(a.config=r),this.addElement(v(r.typeProperty)?a[r.typeProperty]:a.element)}}s.prototype.processConfig.call(this,e)},i}(Ke);_.registeredClasses.Pattern=xi;var dt=function(s){function i(){var e=s.call(this)||this;return e._stops=new re,e._rotation=0,e.className="LinearGradient",e._stops.events.on("setIndex",e.validate,e),e._stops.events.on("inserted",e.validate,e),e.element=e.paper.addGroup("linearGradient"),e.id="gradient-"+_.getUniqueId(),e.element.attr({id:e.id}),e._disposers.push(e.element),e.applyTheme(),e}return w(i,s),i.prototype.validate=function(){var e=this,t=(this._rotation+90)*Ai,n=Math.round(50+50*Math.sin(t+Math.PI))+"%",r=Math.round(50+50*Math.cos(t))+"%",a=Math.round(50+50*Math.sin(t))+"%",o=Math.round(50+50*Math.cos(t+Math.PI))+"%",l=this.element;l.removeChildNodes(),l.attr({x1:n,x2:a,y1:r,y2:o}),A($t(this._stops.iterator()),function(h){var p=h[0],u=h[1],d=u.offset;y(d)||(d=p/(e._stops.length-1));var c=e.paper.add("stop");v(u.color)&&c.attr({"stop-color":u.color.toString()}),y(u.opacity)&&c.attr({"stop-opacity":u.opacity}),y(d)&&c.attr({offset:d}),l.add(c)})},i.prototype.clear=function(){this._stops.clear()},i.prototype.addColor=function(e,t,n){this._stops.push({color:e,opacity:t,offset:n})},Object.defineProperty(i.prototype,"stops",{get:function(){return this._stops},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"paper",{get:function(){return this._paper?this._paper:Ui()},set:function(e){this._paper!=e&&(this._paper=e,this.validate(),e.appendDef(this.element))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rotation",{get:function(){return this._rotation},set:function(e){this._rotation=e,this.validate()},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.stops.copyFrom(e.stops),this._rotation=e.rotation},Object.defineProperty(i.prototype,"gradientUnits",{set:function(e){this.element.attr({gradientUnits:e})},enumerable:!0,configurable:!0}),i}(Ke);_.registeredClasses.LinearGradient=dt;var Nt=function(s){function i(){var e=s.call(this)||this;return e._stops=new re,e.element=e.paper.addGroup("radialGradient"),e.id="gradient-"+_.getUniqueId(),e.element.attr({id:e.id}),e._disposers.push(e.element),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){var e,t=this,n=this.element;y(this.cx)&&((e=this.cx)instanceof te&&(e=e.percent+"%"),n.attr({cx:e})),y(this.cy)&&((e=this.cy)instanceof te&&(e=e.percent+"%"),n.attr({cy:e})),this.fx&&((e=this.fx)instanceof te&&(e=e.percent+"%"),n.attr({fx:e})),this.fy&&((e=this.fy)instanceof te&&(e=e.percent+"%"),n.attr({fy:e})),n.removeChildNodes(),A($t(this._stops.iterator()),function(r){var a=r[0],o=r[1],l=o.offset;y(l)||(l=a/(t._stops.length-1));var h=t.paper.add("stop");v(o.color)&&h.attr({"stop-color":o.color.toString()}),y(o.opacity)&&h.attr({"stop-opacity":o.opacity}),y(l)&&h.attr({offset:l}),n.add(h)})},i.prototype.addColor=function(e,t,n){this._stops.push({color:e,opacity:t,offset:n}),this.draw()},Object.defineProperty(i.prototype,"paper",{get:function(){return this._paper?this._paper:Ui()},set:function(e){this._paper!=e&&(this._paper=e,this.draw(),e.appendDef(this.element))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cx",{get:function(){return this._cx},set:function(e){this._cx=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cy",{get:function(){return this._cy},set:function(e){this._cy=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fx",{get:function(){return this._fx},set:function(e){this._fx=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fy",{get:function(){return this._fy},set:function(e){this._fy=e,this.draw()},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.stops.copyFrom(e.stops),this.cx=e.cx,this.cy=e.cy,this.fx=e.fx,this.fy=e.fy},Object.defineProperty(i.prototype,"stops",{get:function(){return this._stops},enumerable:!0,configurable:!0}),i.prototype.clear=function(){this._stops.clear()},i}(Ke);_.registeredClasses.RadialGradient=Nt;var He=function(){function s(){}return s.grab=[{property:"cursor",value:"move"},{property:"cursor",value:"grab"},{property:"cursor",value:"-webkit-grab"}],s.grabbing=[{property:"cursor",value:"move"},{property:"cursor",value:"grabbing"},{property:"cursor",value:"-webkit-grabbing"}],s.pointer=[{property:"cursor",value:"pointer"}],s.default=[{property:"cursor",value:"default"}],s.horizontalResize=[{property:"cursor",value:"ew-resize"}],s.verticalResize=[{property:"cursor",value:"ns-resize"}],s.notAllowed=[{property:"cursor",value:"not-allowed"}],s.text=[{property:"cursor",value:"text"}],s}();const Kh={_decimalSeparator:".",_thousandSeparator:",",_percentPrefix:null,_percentSuffix:"%",_big_number_suffix_3:"k",_big_number_suffix_6:"M",_big_number_suffix_9:"G",_big_number_suffix_12:"T",_big_number_suffix_15:"P",_big_number_suffix_18:"E",_big_number_suffix_21:"Z",_big_number_suffix_24:"Y",_small_number_suffix_3:"m",_small_number_suffix_6:"\u03BC",_small_number_suffix_9:"n",_small_number_suffix_12:"p",_small_number_suffix_15:"f",_small_number_suffix_18:"a",_small_number_suffix_21:"z",_small_number_suffix_24:"y",_byte_suffix_B:"B",_byte_suffix_KB:"KB",_byte_suffix_MB:"MB",_byte_suffix_GB:"GB",_byte_suffix_TB:"TB",_byte_suffix_PB:"PB",_date:"yyyy-MM-dd",_date_millisecond:"mm:ss SSS",_date_second:"HH:mm:ss",_date_minute:"HH:mm",_date_hour:"HH:mm",_date_day:"MMM dd",_date_week:"ww",_date_month:"MMM",_date_year:"yyyy",_duration_millisecond:"SSS",_duration_millisecond_second:"ss.SSS",_duration_millisecond_minute:"mm:ss SSS",_duration_millisecond_hour:"hh:mm:ss SSS",_duration_millisecond_day:"d'd' mm:ss SSS",_duration_millisecond_week:"d'd' mm:ss SSS",_duration_millisecond_month:"M'm' dd'd' mm:ss SSS",_duration_millisecond_year:"y'y' MM'm' dd'd' mm:ss SSS",_duration_second:"ss",_duration_second_minute:"mm:ss",_duration_second_hour:"hh:mm:ss",_duration_second_day:"d'd' hh:mm:ss",_duration_second_week:"d'd' hh:mm:ss",_duration_second_month:"M'm' dd'd' hh:mm:ss",_duration_second_year:"y'y' MM'm' dd'd' hh:mm:ss",_duration_minute:"mm",_duration_minute_hour:"hh:mm",_duration_minute_day:"d'd' hh:mm",_duration_minute_week:"d'd' hh:mm",_duration_minute_month:"M'm' dd'd' hh:mm",_duration_minute_year:"y'y' MM'm' dd'd' hh:mm",_duration_hour:"hh'h'",_duration_hour_day:"d'd' hh'h'",_duration_hour_week:"d'd' hh'h'",_duration_hour_month:"M'm' dd'd' hh'h'",_duration_hour_year:"y'y' MM'm' dd'd' hh'h'",_duration_day:"d'd'",_duration_day_week:"d'd'",_duration_day_month:"M'm' dd'd'",_duration_day_year:"y'y' MM'm' dd'd'",_duration_week:"w'w'",_duration_week_month:"w'w'",_duration_week_year:"w'w'",_duration_month:"M'm'",_duration_month_year:"y'y' MM'm'",_duration_year:"y'y'",_era_ad:"AD",_era_bc:"BC",A:"",P:"",AM:"",PM:"","A.M.":"","P.M.":"",January:"",February:"",March:"",April:"",May:"",June:"",July:"",August:"",September:"",October:"",November:"",December:"",Jan:"",Feb:"",Mar:"",Apr:"","May(short)":"May",Jun:"",Jul:"",Aug:"",Sep:"",Oct:"",Nov:"",Dec:"",Sunday:"",Monday:"",Tuesday:"",Wednesday:"",Thursday:"",Friday:"",Saturday:"",Sun:"",Mon:"",Tue:"",Wed:"",Thu:"",Fri:"",Sat:"",_dateOrd:function(s){var i="th";if(s<11||s>13)switch(s%10){case 1:i="st";break;case 2:i="nd";break;case 3:i="rd"}return i},"Zoom Out":"",Play:"",Stop:"",Legend:"","Click, tap or press ENTER to toggle":"",Loading:"",Home:"",Chart:"","Serial chart":"","X/Y chart":"","Pie chart":"","Gauge chart":"","Radar chart":"","Sankey diagram":"","Flow diagram":"","Chord diagram":"","TreeMap chart":"","Force directed tree":"","Sliced chart":"",Series:"","Candlestick Series":"","OHLC Series":"","Column Series":"","Line Series":"","Pie Slice Series":"","Funnel Series":"","Pyramid Series":"","X/Y Series":"",Map:"","Press ENTER to zoom in":"","Press ENTER to zoom out":"","Use arrow keys to zoom in and out":"","Use plus and minus keys on your keyboard to zoom in and out":"",Export:"",Image:"",Data:"",Print:"","Press ENTER or use arrow keys to navigate":"","Click, tap or press ENTER to open":"","Click, tap or press ENTER to print.":"","Click, tap or press ENTER to export as %1.":"",'To save the image, right-click this link and choose "Save picture as..."':"",'To save the image, right-click thumbnail on the left and choose "Save picture as..."':"","(Press ESC to close this message)":"","Image Export Complete":"","Export operation took longer than expected. Something might have gone wrong.":"","Saved from":"",PNG:"",JPG:"",GIF:"",SVG:"",PDF:"",JSON:"",CSV:"",XLSX:"","Use TAB to select grip buttons or left and right arrows to change selection":"","Use left and right arrows to move selection":"","Use left and right arrows to move left selection":"","Use left and right arrows to move right selection":"","Use TAB select grip buttons or up and down arrows to change selection":"","Use up and down arrows to move selection":"","Use up and down arrows to move lower selection":"","Use up and down arrows to move upper selection":"","From %1 to %2":"","From %1":"","To %1":"","No parser available for file: %1":"","Error parsing file: %1":"","Unable to load file: %1":"","Invalid date":"",Close:"",Minimize:""};var Ya,Wt=function(s){function i(){var e=s.call(this)||this;return e.adapter=new it(e),e._locale=Kh,e._defaultLocale=Kh,e.className="Language",v(Z.defaultLocale)&&(e.locale=Z.defaultLocale),e.applyTheme(),e}return w(i,s),i.prototype.getLocale=function(e){return e==null&&(e=this._locale),this.adapter.apply("locale",{locale:e}).locale},i.prototype.translate=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];t=this.getLocale(t);var a=e,o=this.getTranslations(t)[e];if(o===null)a="";else if(v(o))o&&(a=o);else if(t!==this._defaultLocale)return this.translate.apply(this,di([e,this._defaultLocale],n));if(n.length)for(var l=n.length,h=0;h<l;++h)a=a.split("%"+(h+1)).join(n[h]);return this.adapter.apply("translate",{translation:a,locale:t}).translation},i.prototype.translateAny=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.translate.apply(this,di([e,t],n))},i.prototype.setTranslationAny=function(e,t,n){(n||this.locale)[e]=t},i.prototype.translateEmpty=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=this.translate.apply(this,di([e,t],n));return a==e?"":a},i.prototype.translateFunc=function(e,t){t=this.getLocale(t);var n=this.getTranslations(t)[e];return n!=null?n:t!==this._defaultLocale?this.translateFunc(e,this._defaultLocale):function(){return""}},i.prototype.translateAll=function(e,t){var n=this;return this.isDefault()?e:Li(e,function(r){return n.translate(r,t)})},i.prototype.isDefault=function(){return this._defaultLocale===this._locale},Object.defineProperty(i.prototype,"locale",{get:function(){return this._locale},set:function(e){if(this._locale!=e&&(this._locale=e,this.events.isEnabled("localechanged"))){var t={type:"localechanged",locale:e,target:this};this.events.dispatchImmediately("localechanged",t)}},enumerable:!0,configurable:!0}),i.prototype.getTranslations=function(e){return this.adapter.apply("translations",{translations:e,locale:e}).translations},i}(wt),za=function(s){function i(){var e=s.call(this)||this;return e.adapter=new it(e),e.className="TextFormatter",e.applyTheme(),e}return w(i,s),i.prototype.debug=function(){},i.prototype.format=function(e,t){v(t)||(t="svg");var n="",r=(e=this.escape(e)).match(/\[([^\]]*?)\]/gm);if(!r)return this.wrap(e,"",t);for(var a=e.split(/\[[^\[\]]*\]/),o=0,l=a.length;o<l;o++){var h=a[o];if(h!==""){h=this.adapter.apply("chunk",h);var p="";o>0&&(p=r[o-1].replace("[","").replace("]","")),n+=this.wrap(h,p,t)}}return n=this.unescape(n),this.cleanUp(n)},i.prototype.escape=function(e){return e.replace(/\[\[/g,_.getPlaceholder("1")).replace(/([^\/\]]{1})\]\]/g,"$1"+_.getPlaceholder("2")).replace(/\]\]/g,_.getPlaceholder("2")).replace(/\{\{/g,_.getPlaceholder("3")).replace(/\}\}/g,_.getPlaceholder("4")).replace(/\'\'/g,_.getPlaceholder("5"))},i.prototype.unescape=function(e){return e.replace(new RegExp(_.getPlaceholder("1"),"g"),"[[").replace(new RegExp(_.getPlaceholder("2"),"g"),"]]").replace(new RegExp(_.getPlaceholder("3"),"g"),"{{").replace(new RegExp(_.getPlaceholder("4"),"g"),"}}").replace(new RegExp(_.getPlaceholder("5"),"g"),"''")},i.prototype.cleanUp=function(e){return e.replace(/\[\[/g,"[").replace(/\]\]/g,"]").replace(/\{\{/g,"{").replace(/\}\}/g,"}").replace(/\'\'/g,"'")},i.prototype.wrap=function(e,t,n){return t!==""&&t!=="/"||(t=""),n==="html"?this.wrapHtml(e,this.translateStyleShortcuts(t)):this.wrapSvg(e,this.translateStyleShortcuts(t))},i.prototype.wrapSvg=function(e,t){return t===""?"<tspan>"+e+"</tspan>":"<tspan style='"+t+"'>"+e+"</tspan>"},i.prototype.getSvgElement=function(e,t){var n=new An("tspan");return n.textContent=e,t&&n.node.setAttribute("style",t),n},i.prototype.wrapHtml=function(e,t){return t===""?"<span>"+e+"</span>":"<span style='"+this.styleSvgToHtml(t)+"'>"+e+"</span>"},i.prototype.getHtmlElement=function(e,t){var n=document.createElement("span");return n.innerHTML=e,t&&n.setAttribute("style",t),n},i.prototype.styleSvgToHtml=function(e){return e.replace(/fill:/,"color:")},i.prototype.translateStyleShortcuts=function(e){if(e==""||e=="[ ]")return"";var t=_.getCache("translateStyleShortcuts_"+e);if(t)return t;var n=e.match(/('[^']*')|("[^"]*")/gi);if(n)for(var r=0;r<n.length;r++)e=e.replace(n[r],n[r].replace(/['"]*/g,"").replace(/[ ]+/g,"+"));var a=e.match(/([\w\-]*:[\s]?[^;\s\]]*)|(\#[\w]{1,6})|([\w]+)|(\/)/gi);if(!a)return e;for(r=0;r<a.length;r++)a[r].match(/^bold$/i)?a[r]="font-weight:"+a[r]:a[r]=="/"?a[r]="":a[r].match(/:/)?a[r]=a[r].replace(/\+/g," "):a[r]="fill:"+a[r];var o=a.join(";");return _.setCache("translateStyleShortcuts_"+e,o),o},i.prototype.chunk=function(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=[];e=this.escape(e);for(var a=t?e.split("'"):[e],o=0;o<a.length;o++){var l=a[o];if(l!=="")if(o%2==0)for(var h=(l=(l=l.replace(/\]\[/g,"]"+st+"[")).replace(/\[\]/g,"[ ]")).split(/[\[\]]+/),p=0;p<h.length;p++)(u=this.cleanUp(this.unescape(h[p])))!==st&&u!==""&&(p%2==0?r.push({type:"value",text:this.adapter.apply("chunk",u)}):r.push({type:n?"value":"format",text:"["+u+"]"}));else for(h=l.split(/[\[\]]+/),p=0;p<h.length;p++){var u;(u=this.cleanUp(this.unescape(h[p])))!==""&&(p%2==0?r.push({type:"text",text:u}):this.isImage(u)?r.push({type:"image",text:"["+u+"]"}):r.push({type:"format",text:"["+u+"]"}))}}return r},i.prototype.isImage=function(e){return!!e.match(/img[ ]?:/)},i}(Ke);function Ft(){return Ya==null&&(Ya=new za),Ya}_.registeredClasses.TextFormatter=za;var Br=function(s){function i(){var e=s.call(this)||this;return e._negativeBase=0,e._numberFormat="#,###.#####",e._outputFormat="svg",e._smallNumberThreshold=1,e._forceLTR=!1,e.className="NumberFormatter",e.applyTheme(),e}return w(i,s),i.prototype.dispose=function(){s.prototype.dispose.call(this),this.language&&this.language.dispose()},Object.defineProperty(i.prototype,"language",{get:function(){return this._language||(this.sprite?this._language=this.sprite.language:this._language=new Wt),this._language},set:function(e){this._language=e},enumerable:!0,configurable:!0}),i.prototype.format=function(e,t,n){var r;(t===void 0||J(t)&&t.toLowerCase()==="number")&&(t=this._numberFormat);var a=Number(e);if(ye(t))try{return this.intlLocales?new Intl.NumberFormat(this.intlLocales,t).format(a):new Intl.NumberFormat(void 0,t).format(a)}catch{return"Invalid"}else{t=Cn(t);var o=this.parseFormat(t,this.language),l=void 0;l=a>this._negativeBase?o.positive:a<this._negativeBase?o.negative:o.zero,v(n)&&!l.mod&&((l=Cl(l)).decimals.active=a==0?0:n),r=l.template.split(st).join(this.applyFormat(a,l))}return this.forceLTR&&(r="\u200E"+r),r},i.prototype.parseFormat=function(e,t){var n=this,r=this.getCache(e);if(v(r))return r;var a={positive:{thousands:{active:-1,passive:-1,interval:-1,separator:t.translateEmpty("_thousandSeparator")},decimals:{active:-1,passive:-1,separator:t.translateEmpty("_decimalSeparator")},template:"",source:"",parsed:!1},negative:{thousands:{active:-1,passive:-1,interval:-1,separator:t.translateEmpty("_thousandSeparator")},decimals:{active:-1,passive:-1,separator:t.translateEmpty("_decimalSeparator")},template:"",source:"",parsed:!1},zero:{thousands:{active:-1,passive:-1,interval:-1,separator:t.translateEmpty("_thousandSeparator")},decimals:{active:-1,passive:-1,separator:t.translateEmpty("_decimalSeparator")},template:"",source:"",parsed:!1}},o=(e=e.replace("||",mi)).split("|");return a.positive.source=o[0],o[2]===void 0?a.zero=a.positive:a.zero.source=o[2],o[1]===void 0?a.negative=a.positive:a.negative.source=o[1],X(a,function(l,h){if(!h.parsed)if(n.getCache(h.source)===void 0){var p=h.source;p.toLowerCase()==="number"&&(p=J(n._numberFormat)?n._numberFormat:"#,###.#####");for(var u=Ft().chunk(p,!0),d=0;d<u.length;d++){var c=u[d];if(c.text=c.text.replace(mi,"|"),c.type==="value"){var f=c.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESP‰!]?/);if(f)if(f===null||f[0]==="")h.template+=c.text;else{var g=f[0].match(/[abespABESP%‰!]{2}|[abespABESP%‰]{1}$/);g&&(h.mod=g[0].toLowerCase(),h.modSpacing=!!f[0].match(/[ ]{1}[abespABESP%‰!]{1}$/));var m=f[0].split(".");if(m[0]!==""){h.thousands.active=(m[0].match(/0/g)||[]).length,h.thousands.passive=(m[0].match(/\#/g)||[]).length+h.thousands.active;var x=m[0].split(",");x.length===1||(h.thousands.interval=be(x.pop()).length,h.thousands.interval===0&&(h.thousands.interval=-1))}m[1]===void 0||(h.decimals.active=(m[1].match(/0/g)||[]).length,h.decimals.passive=(m[1].match(/\#/g)||[]).length+h.decimals.active),h.template+=c.text.split(f[0]).join(st)}}else h.template+=c.text}n.setCache(h.source,h),h.parsed=!0}else a[l]=n.getCache(h.source)}),this.setCache(e,a),a},i.prototype.applyFormat=function(e,t){var n=e<0;e=Math.abs(e);var r,a="",o="",l=t.mod?t.mod.split(""):[];if(l.indexOf("b")!==-1){var h=this.applyPrefix(e,this.bytePrefixes,l.indexOf("!")!==-1);e=h[0],a=h[1],o=h[2],t.modSpacing&&(o=" "+o)}else if(l.indexOf("a")!==-1){var p=this.applyPrefix(e,e<this.smallNumberThreshold?this.smallNumberPrefixes:this.bigNumberPrefixes,l.indexOf("!")!==-1);e=p[0],a=p[1],o=p[2],t.modSpacing&&(o=" "+o)}else if(l.indexOf("p")!==-1){var u=Math.min(e.toString().length+2,21);e=parseFloat(e.toPrecision(u)),a=this.language.translate("_percentPrefix")||"",o=this.language.translate("_percentSuffix")||"",a==""&&o==""&&(o="%")}else l.indexOf("%")!==-1?(u=ie(e.toString().length+2,21),e*=100,e=parseFloat(e.toPrecision(u)),o="%"):l.indexOf("\u2030")!==-1&&(u=ie(e.toString().length+3,21),e*=1e3,e=parseFloat(e.toPrecision(u)),o="\u2030");if(l.indexOf("e")!==-1)r=t.decimals.passive>=0?e.toExponential(t.decimals.passive).split("e"):e.toExponential().split("e"),e=Number(r[0]),o="e"+r[1],t.modSpacing&&(o=" "+o);else if(t.decimals.passive===0)e=Math.round(e);else if(t.decimals.passive>0){var d=Math.pow(10,t.decimals.passive);e=Math.round(e*d)/d}var c="",f=th(e).split("."),g=f[0];if(g.length<t.thousands.active&&(g=Array(t.thousands.active-g.length+1).join("0")+g),t.thousands.interval>0){for(var m=[],x=g.split("").reverse().join(""),b=0,C=g.length;b<=C;b+=t.thousands.interval){var S=x.substr(b,t.thousands.interval).split("").reverse().join("");S!==""&&m.unshift(S)}g=m.join(t.thousands.separator)}c+=g,f.length===1&&f.push("");var P=f[1];return P.length<t.decimals.active&&(P+=Array(t.decimals.active-P.length+1).join("0")),P!==""&&(c+=t.decimals.separator+P),c===""&&(c="0"),e!==0&&n&&l.indexOf("s")===-1&&(c="-"+c),a&&(c=a+c),o&&(c+=o),c},i.prototype.applyPrefix=function(e,t,n){n===void 0&&(n=!1);for(var r=e,a="",o="",l=!1,h=1,p=0,u=t.length;p<u;p++)t[p].number<=e&&(t[p].number===0?r=0:(r=e/t[p].number,h=t[p].number),a=t[p].prefix,o=t[p].suffix,l=!0);return!l&&n&&t.length&&e!=0&&(r=e/t[0].number,a=t[0].prefix,o=t[0].suffix,l=!0),l&&(r=parseFloat(r.toPrecision(ie(h.toString().length+Math.floor(r).toString().replace(/[^0-9]*/g,"").length,21)))),[r,a,o]},i.prototype.invalidateSprite=function(){this.sprite&&this.sprite.invalidate()},Object.defineProperty(i.prototype,"numberFormat",{get:function(){return this._numberFormat},set:function(e){this._numberFormat=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"intlLocales",{get:function(){return this._intlLocales},set:function(e){this._intlLocales=e,this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"negativeBase",{get:function(){return this._negativeBase},set:function(e){this._negativeBase=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bigNumberPrefixes",{get:function(){return v(this._bigNumberPrefixes)||(this._bigNumberPrefixes=[{number:1e3,suffix:this.language.translate("_big_number_suffix_3")},{number:1e6,suffix:this.language.translate("_big_number_suffix_6")},{number:1e9,suffix:this.language.translate("_big_number_suffix_9")},{number:1e12,suffix:this.language.translate("_big_number_suffix_12")},{number:1e15,suffix:this.language.translate("_big_number_suffix_15")},{number:1e18,suffix:this.language.translate("_big_number_suffix_18")},{number:1e21,suffix:this.language.translate("_big_number_suffix_21")},{number:1e24,suffix:this.language.translate("_big_number_suffix_24")}]),this._bigNumberPrefixes},set:function(e){this._bigNumberPrefixes=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"smallNumberPrefixes",{get:function(){return v(this._smallNumberPrefixes)||(this._smallNumberPrefixes=[{number:1e-24,suffix:this.language.translate("_small_number_suffix_24")},{number:1e-21,suffix:this.language.translate("_small_number_suffix_21")},{number:1e-18,suffix:this.language.translate("_small_number_suffix_18")},{number:1e-15,suffix:this.language.translate("_small_number_suffix_15")},{number:1e-12,suffix:this.language.translate("_small_number_suffix_12")},{number:1e-9,suffix:this.language.translate("_small_number_suffix_9")},{number:1e-6,suffix:this.language.translate("_small_number_suffix_6")},{number:.001,suffix:this.language.translate("_small_number_suffix_3")}]),this._smallNumberPrefixes},set:function(e){this._smallNumberPrefixes=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"smallNumberThreshold",{get:function(){return this._smallNumberThreshold},set:function(e){this._smallNumberThreshold=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bytePrefixes",{get:function(){return v(this._bytePrefixes)||(this._bytePrefixes=[{number:1,suffix:this.language.translate("_byte_suffix_B")},{number:1024,suffix:this.language.translate("_byte_suffix_KB")},{number:1048576,suffix:this.language.translate("_byte_suffix_MB")},{number:1073741824,suffix:this.language.translate("_byte_suffix_GB")},{number:1099511627776,suffix:this.language.translate("_byte_suffix_TB")},{number:0x4000000000000,suffix:this.language.translate("_byte_suffix_PB")}]),this._bytePrefixes},set:function(e){this._bytePrefixes=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"outputFormat",{get:function(){return this._outputFormat},set:function(e){this._outputFormat=e.toLowerCase(),this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"forceLTR",{get:function(){return this._forceLTR},set:function(e){this._forceLTR=e,this.invalidateSprite()},enumerable:!0,configurable:!0}),i.prototype.escape=function(e){return e.replace("||",mi)},i.prototype.unescape=function(e){return e.replace(mi,"|")},i}(Ke);_.registeredClasses.NumberFormatter=Br;var Gi=function(s){function i(){var e=s.call(this)||this;return e._dateFormat="yyyy-MM-dd",e._inputDateFormat="yyyy-MM-dd",e._utc=!1,e.timezoneMinutes=0,e._firstDayOfWeek=1,e.months=["January","February","March","April","May","June","July","August","September","October","November","December"],e.monthsShort=["Jan","Feb","Mar","Apr","May(short)","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e.weekdays=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],e.weekdaysShort=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],e._outputFormat="svg",e.capitalize=!0,e.className="DateFormatter",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"language",{get:function(){return this._language},set:function(e){this._language=e,this.dateFormat=this._language.translate("_date")},enumerable:!0,configurable:!0}),i.prototype.format=function(e,t,n){var r,a;if(this.language||(this.sprite?this.language=this.sprite.language:this.language=new Wt),t!==void 0&&t!==""||(t=this._dateFormat),a=J(e)?this.parse(e):ma(e),ye(t))try{return this.intlLocales?new Intl.DateTimeFormat(this.intlLocales,t).format(a):new Intl.DateTimeFormat(void 0,t).format(a)}catch{return"Invalid"}else{t=Cn(t);var o=this.parseFormat(t);if(v(this.timezoneOffset)?a.setMinutes(a.getMinutes()+a.getTimezoneOffset()-this.timezoneOffset):v(this.timezone)&&n!==!1&&(a=Vn(a,this.timezone)),!y(a.getTime()))return this.language.translate("Invalid date");r=this.applyFormat(a,o,this.language),this.capitalize&&(r=r.replace(/^.{1}/,r.substr(0,1).toUpperCase()))}return r},i.prototype.parseFormat=function(e){var t=this.getCache(e);if(v(t))return t;for(var n={template:"",parts:[]},r=Ft().chunk(e,!0),a=0;a<r.length;a++){var o=r[a];if(o.type==="value"){o.text.match(/^date$/i)&&J(this._dateFormat)&&(o.text=this._dateFormat);var l=o.text.match(/G|yyyy|yyy|yy|y|YYYY|YYY|YY|Y|u|q|MMMMM|MMMM|MMM|MM|M|ww|w|W|dd|d|DDD|DD|D|F|g|EEEEE|EEEE|EEE|EE|E|eeeee|eeee|eee|ee|e|aaa|aa|a|hh|h|HH|H|KK|K|kk|k|mm|m|ss|s|SSS|SS|S|A|zzzz|zzz|zz|z|ZZ|Z|t|x|nnn|nn|n|i|I/g);if(l)for(var h=0;h<l.length;h++)n.parts.push(l[h]),o.text=o.text.replace(l[h],st)}n.template+=o.text}return this.setCache(e,n),n},i.prototype.applyFormat=function(e,t,n){var r,a,o,l,h,p,u,d,c=t.template,f=e.getTimezoneOffset(),g=e.getTime();this.utc?(r=e.getUTCFullYear(),a=e.getUTCMonth(),o=e.getUTCDay(),l=e.getUTCDate(),h=e.getUTCHours(),p=e.getUTCMinutes(),u=e.getUTCSeconds(),d=e.getUTCMilliseconds()):(r=e.getFullYear(),a=e.getMonth(),o=e.getDay(),l=e.getDate(),h=e.getHours(),p=e.getMinutes(),u=e.getSeconds(),d=e.getMilliseconds());for(var m=0,x=t.parts.length;m<x;m++){var b="";switch(t.parts[m]){case"G":b=n.translate(r<0?"_era_bc":"_era_ad");break;case"yyyy":b=Math.abs(r).toString(),r<0&&(b+=n.translate("_era_bc"));break;case"yyy":case"yy":case"y":b=Math.abs(r).toString().substr(-t.parts[m].length),r<0&&(b+=n.translate("_era_bc"));break;case"YYYY":case"YYY":case"YY":case"Y":var C=r;Wi(e)==1&&o>4&&C--,b=t.parts[m]=="YYYY"?Math.abs(C).toString():Math.abs(C).toString().substr(-t.parts[m].length),C<0&&(b+=n.translate("_era_bc"));break;case"u":case"F":case"g":break;case"q":b=""+Math.ceil((e.getMonth()+1)/3);break;case"MMMMM":b=n.translate(this.months[a]).substr(0,1);break;case"MMMM":b=n.translate(this.months[a]);break;case"MMM":b=n.translate(this.monthsShort[a]);break;case"MM":b=ze(a+1,2,"0");break;case"M":b=(a+1).toString();break;case"ww":b=ze(Wi(e,this.utc),2,"0");break;case"w":b=Wi(e,this.utc).toString();break;case"W":b=ih(e,this.utc).toString();break;case"dd":b=ze(l,2,"0");break;case"d":b=l.toString();break;case"DD":case"DDD":b=ze(va(e,this.utc).toString(),t.parts[m].length,"0");break;case"D":b=va(e,this.utc).toString();break;case"t":b=n.translateFunc("_dateOrd").call(this,l);break;case"E":b=(o||7).toString();break;case"EE":b=ze((o||7).toString(),2,"0");break;case"EEE":case"eee":b=n.translate(this.weekdaysShort[o]);break;case"EEEE":case"eeee":b=n.translate(this.weekdays[o]);break;case"EEEEE":case"eeeee":b=n.translate(this.weekdays[o]).substr(0,1);break;case"e":case"ee":b=(o-this.firstDayOfWeek+1).toString(),t.parts[m]=="ee"&&(b=ze(b,2,"0"));break;case"a":b=h>=12?n.translate("PM"):n.translate("AM");break;case"aa":b=h>=12?n.translate("P.M."):n.translate("A.M.");break;case"aaa":b=h>=12?n.translate("P"):n.translate("A");break;case"h":b=On(h).toString();break;case"hh":b=ze(On(h),2,"0");break;case"H":b=h.toString();break;case"HH":b=ze(h,2,"0");break;case"K":b=On(h,0).toString();break;case"KK":b=ze(On(h,0),2,"0");break;case"k":b=(h+1).toString();break;case"kk":b=ze(h+1,2,"0");break;case"m":b=p.toString();break;case"mm":b=ze(p,2,"0");break;case"s":b=u.toString();break;case"ss":b=ze(u,2,"0");break;case"S":case"SS":case"SSS":b=Math.round(d/1e3*Math.pow(10,t.parts[m].length)).toString();break;case"x":b=g.toString();break;case"n":case"nn":case"nnn":b=ze(d,t.parts[m].length,"0");break;case"z":b=Sn(e,!1,!1,this.utc);break;case"zz":b=Sn(e,!0,!1,this.utc);break;case"zzz":b=Sn(e,!1,!0,this.utc);break;case"zzzz":b=Sn(e,!0,!0,this.utc);break;case"Z":case"ZZ":var S=Math.abs(f)/60,P=Math.floor(S),O=60*S-60*P;this.utc&&(P=0,O=0),t.parts[m]=="Z"?(b="GMT",b+=f>0?"-":"+",b+=ze(P,2)+":"+ze(O,2)):(b=f>0?"-":"+",b+=ze(P,2)+ze(O,2));break;case"i":b=e.toISOString();break;case"I":b=e.toUTCString()}c=c.replace(st,b)}return c},i.prototype.parse=function(e,t){if(v(t)||(t=this.inputDateFormat),e instanceof Date)return e;if(typeof e=="number")return new Date(e);var n;typeof e!="string"&&(e=e.toString()),this.language||(this.sprite?this.language=this.sprite.language:this.language=new Wt);var r="";t=(t=Cn(t)).substr(0,e.length);for(var a=this.parseFormat(t),o={year:-1,year3:-1,year2:-1,year1:-1,month:-1,monthShort:-1,monthLong:-1,weekdayShort:-1,weekdayLong:-1,day:-1,yearDay:-1,week:-1,hourBase0:-1,hour12Base0:-1,hourBase1:-1,hour12Base1:-1,minute:-1,second:-1,millisecond:-1,millisecondDigits:-1,am:-1,zone:-1,timestamp:-1,iso:-1},l={year:1970,month:0,day:1,hour:0,minute:0,second:0,millisecond:0,timestamp:null,offset:0,utc:this.utc},h=0,p=0,u=0;u<a.parts.length;u++){switch(p=u+h+1,a.parts[u]){case"yyyy":case"YYYY":r+="([0-9]{4})",o.year=p;break;case"yyy":case"YYY":r+="([0-9]{3})",o.year3=p;break;case"yy":case"YY":r+="([0-9]{2})",o.year2=p;break;case"y":case"Y":r+="([0-9]{1})",o.year1=p;break;case"MMMM":r+="("+this.getStringList(this.months).join("|")+")",o.monthLong=p;break;case"MMM":r+="("+this.getStringList(this.monthsShort).join("|")+")",o.monthShort=p;break;case"MM":case"M":r+="([0-9]{2}|[0-9]{1})",o.month=p;break;case"ww":case"w":r+="([0-9]{2}|[0-9]{1})",o.week=p;break;case"dd":case"d":r+="([0-9]{2}|[0-9]{1})",o.day=p;break;case"DDD":case"DD":case"D":r+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.yearDay=p;break;case"dddd":r+="("+this.getStringList(this.weekdays).join("|")+")",o.weekdayLong=p;break;case"ddd":r+="("+this.getStringList(this.weekdaysShort).join("|")+")",o.weekdayShort=p;break;case"aaa":case"aa":case"a":r+="("+this.getStringList(["AM","PM","A.M.","P.M.","A","P"]).join("|")+")",o.am=p;break;case"hh":case"h":r+="([0-9]{2}|[0-9]{1})",o.hour12Base1=p;break;case"HH":case"H":r+="([0-9]{2}|[0-9]{1})",o.hourBase0=p;break;case"KK":case"K":r+="([0-9]{2}|[0-9]{1})",o.hour12Base0=p;break;case"kk":case"k":r+="([0-9]{2}|[0-9]{1})",o.hourBase1=p;break;case"mm":case"m":r+="([0-9]{2}|[0-9]{1})",o.minute=p;break;case"ss":case"s":r+="([0-9]{2}|[0-9]{1})",o.second=p;break;case"SSS":case"SS":case"S":r+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.millisecond=p,o.millisecondDigits=a.parts[u].length;break;case"nnn":case"nn":case"n":r+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.millisecond=p;break;case"x":r+="([0-9]{1,})",o.timestamp=p;break;case"Z":r+="GMT([-+]+[0-9]{2}:[0-9]{2})",o.zone=p;break;case"ZZ":r+="([\\-+]+[0-9]{2}[0-9]{2})",o.zone=p;break;case"i":r+="([0-9]{4})-?([0-9]{2})-?([0-9]{2})T?([0-9]{2}):?([0-9]{2}):?([0-9]{2}).?([0-9]{0,3})([zZ]|[+-][0-9]{2}:?[0-9]{2}|$)",o.iso=p,h+=7;break;case"G":case"YYYY":case"YYY":case"YY":case"Y":case"MMMMM":case"W":case"EEEEE":case"EEEE":case"EEE":case"EE":case"E":case"eeeee":case"eeee":case"eee":case"ee":case"e":case"zzzz":case"zzz":case"zz":case"z":case"t":h--}r+="[^0-9]*"}var d=new RegExp(r),c=e.match(d);if(c){if(o.year>-1&&(l.year=parseInt(c[o.year])),o.year3>-1){var f=parseInt(c[o.year3]);f+=1e3,l.year=f}if(o.year2>-1&&(f=parseInt(c[o.year2]),f+=f>50?1e3:2e3,l.year=f),o.year1>-1&&(f=parseInt(c[o.year1]),f=10*Math.floor(new Date().getFullYear()/10)+f,l.year=f),o.monthLong>-1&&(l.month=this.resolveMonth(c[o.monthLong])),o.monthShort>-1&&(l.month=this.resolveShortMonth(c[o.monthShort])),o.month>-1&&(l.month=parseInt(c[o.month])-1),o.week>-1&&o.day===-1&&(l.month=0,l.day=nh(parseInt(c[o.week]),l.year,1,this.utc)),o.day>-1&&(l.day=parseInt(c[o.day])),o.yearDay>-1&&(l.month=0,l.day=parseInt(c[o.yearDay])),o.hourBase0>-1&&(l.hour=parseInt(c[o.hourBase0])),o.hourBase1>-1&&(l.hour=parseInt(c[o.hourBase1])-1),o.hour12Base0>-1&&((f=parseInt(c[o.hour12Base0]))==11&&(f=0),o.am>-1&&!this.isAm(c[o.am])&&(f+=12),l.hour=f),o.hour12Base1>-1&&((f=parseInt(c[o.hour12Base1]))==12&&(f=0),o.am>-1&&!this.isAm(c[o.am])&&(f+=12),l.hour=f),o.minute>-1&&(l.minute=parseInt(c[o.minute])),o.second>-1&&(l.second=parseInt(c[o.second])),o.millisecond>-1&&(f=parseInt(c[o.millisecond]),o.millisecondDigits==2?f*=10:o.millisecondDigits==1&&(f*=100),l.millisecond=f),o.timestamp>-1){l.timestamp=parseInt(c[o.timestamp]);var g=new Date(l.timestamp);l.year=g.getUTCFullYear(),l.month=g.getUTCMonth(),l.day=g.getUTCDate(),l.hour=g.getUTCHours(),l.minute=g.getUTCMinutes(),l.second=g.getUTCSeconds(),l.millisecond=g.getUTCMilliseconds()}o.zone>-1&&(l.offset=this.resolveTimezoneOffset(new Date(l.year,l.month,l.day),c[o.zone])),o.iso>-1&&(l.year=ce(c[o.iso+0]),l.month=ce(c[o.iso+1])-1,l.day=ce(c[o.iso+2]),l.hour=ce(c[o.iso+3]),l.minute=ce(c[o.iso+4]),l.second=ce(c[o.iso+5]),l.millisecond=ce(c[o.iso+6]),c[o.iso+7]=="Z"||c[o.iso+7]=="z"?l.utc=!0:c[o.iso+7]!=""&&(l.offset=this.resolveTimezoneOffset(new Date(l.year,l.month,l.day),c[o.iso+7]))),n=l.utc?new Date(Date.UTC(l.year,l.month,l.day,l.hour,l.minute,l.second,l.millisecond)):new Date(l.year,l.month,l.day,l.hour,l.minute+l.offset,l.second,l.millisecond)}else n=new Date(e);return n},i.prototype.resolveTimezoneOffset=function(e,t){if(t.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)){var n=be(t.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)),r=n[1],a=n[2],o=n[3],l=60*parseInt(a)+parseInt(o);return r=="+"&&(l*=-1),l-(e||new Date).getTimezoneOffset()}return 0},i.prototype.resolveMonth=function(e){var t=this.months.indexOf(e);return t>-1||this.language&&!this.language.isDefault()&&(t=this.language.translateAll(this.months).indexOf(e))>-1?t:0},i.prototype.resolveShortMonth=function(e){var t=this.monthsShort.indexOf(e);return t>-1||(t=this.months.indexOf(e))>-1||this.language&&!this.language.isDefault()&&(t=this.language.translateAll(this.monthsShort).indexOf(e))>-1?t:0},i.prototype.isAm=function(e){return this.getStringList(["AM","A.M.","A"]).indexOf(e.toUpperCase())>-1},i.prototype.invalidateSprite=function(){this.sprite&&this.sprite.invalidate()},i.prototype.getStringList=function(e){for(var t=[],n=0;n<e.length;n++)this.language?t.push(xr(this.language.translate(e[n]))):t.push(xr(e[n]));return t},Object.defineProperty(i.prototype,"dateFormat",{get:function(){return this._dateFormat},set:function(e){this._dateFormat=e,this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"inputDateFormat",{get:function(){return this._inputDateFormat},set:function(e){this._inputDateFormat=e,this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"intlLocales",{get:function(){return this._intlLocales},set:function(e){this._intlLocales=e,this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"utc",{get:function(){return this._utc},set:function(e){this._utc=e,this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"timezoneOffset",{get:function(){return this._timezoneOffset},set:function(e){this._timezoneOffset!=e&&(this._timezoneOffset=e,this.invalidateSprite())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"timezone",{get:function(){return this._timezone},set:function(e){this._timezone!=e&&(this._timezone=e,this.timezoneMinutes=Uh(e),this.invalidateSprite())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"firstDayOfWeek",{get:function(){return this._firstDayOfWeek},set:function(e){this._firstDayOfWeek=e,this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"outputFormat",{get:function(){return this._outputFormat},set:function(e){this._outputFormat=e.toLowerCase(),this.invalidateSprite()},enumerable:!0,configurable:!0}),i}(Ke);_.registeredClasses.DateFormatter=Gi;var Hr=function(s){function i(){var e=s.call(this)||this;return e._negativeBase=0,e._baseUnit="second",e._outputFormat="svg",e._unitValues={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6},e._unitAliases={Y:"y",D:"d",H:"h",K:"h",k:"h",n:"S"},e.className="DurationFormatter",e.applyTheme(),e}return w(i,s),i.prototype.format=function(e,t,n){this.language||(this.sprite?this.language=this.sprite.language:this.language=new Wt);var r=n||this._baseUnit;t!==void 0&&t!==""||(t=v(this.durationFormat)?this.durationFormat:this.getFormat(ce(e),null,r)),t=Cn(t);var a,o=this.parseFormat(t,r),l=Number(e);a=l>this._negativeBase?o.positive:l<this._negativeBase?o.negative:o.zero;var h=this.applyFormat(l,a);return a.color!==""&&(this._outputFormat==="svg"?h="<tspan fill='"+a.color+"'>"+h+"</tspan>":this._outputFormat==="html"&&(h="<span style='color: "+a.color+";'>"+h+"</span>")),h},i.prototype.parseFormat=function(e,t){var n=this,r=this.getCache(e);if(v(r))return r;var a=t||this._baseUnit,o={positive:{color:"",template:"",parts:[],source:"",baseUnit:a,parsed:!1,absolute:!1},negative:{color:"",template:"",parts:[],source:"",baseUnit:a,parsed:!1,absolute:!1},zero:{color:"",template:"",parts:[],source:"",baseUnit:a,parsed:!1,absolute:!1}},l=(e=e.replace("||",mi)).split("|");return o.positive.source=l[0],l[2]===void 0?o.zero=o.positive:o.zero.source=l[2],l[1]===void 0?o.negative=o.positive:o.negative.source=l[1],X(o,function(h,p){if(!p.parsed)if(n.getCache(p.source)===void 0){var u,d=p.source;(u=p.source.match(/^\[([^\]]*)\]/))&&u.length&&u[0]!==""&&(d=p.source.substr(u[0].length),p.color=u[1]);for(var c=Ft().chunk(d,!0),f=0;f<c.length;f++){var g=c[f];if(g.text=g.text.replace(mi,"|"),g.type==="value"){g.text.match(/[yYMdDwhHKkmsSn]+a/)&&(p.absolute=!0,g.text=g.text.replace(/([yYMdDwhHKkmsSn]+)a/,"$1"));var m=g.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);if(m)for(var x=0;x<m.length;x++)v(m[x])||(m[x]=n._unitAliases[m[x]]),p.parts.push(m[x]),g.text=g.text.replace(m[x],st)}p.template+=g.text}n.setCache(p.source,p),p.parsed=!0}else o[h]=n.getCache(p.source)}),this.setCache(e,o),o},i.prototype.applyFormat=function(e,t){var n=!t.absolute&&e<this._negativeBase;e=Math.abs(e);for(var r=this.toTimeStamp(e,t.baseUnit),a=t.template,o=0,l=t.parts.length;o<l;o++){var h=t.parts[o],p=this.toTimeUnit(h.substr(0,1)),u=h.length,d=Math.floor(r/this._unitValues[p]);a=a.replace(st,ze(d,u,"0")),r-=d*this._unitValues[p]}return n&&(a="-"+a),a},i.prototype.toTimeStamp=function(e,t){return e*this._unitValues[t]},i.prototype.toTimeUnit=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year"}},i.prototype.invalidateSprite=function(){this.sprite&&this.sprite.invalidate()},Object.defineProperty(i.prototype,"baseUnit",{get:function(){return this._baseUnit},set:function(e){this._baseUnit=e,this.invalidateSprite()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"outputFormat",{get:function(){return this._outputFormat},set:function(e){this._outputFormat=e.toLowerCase(),this.invalidateSprite()},enumerable:!0,configurable:!0}),i.prototype.getFormat=function(e,t,n){if(v(this.durationFormat))return this.durationFormat;if(n||(n=this.baseUnit),v(t)&&e!=t){e=Math.abs(e),t=Math.abs(t);var r=this.getValueUnit(q(e,t),n);return this.durationFormats[n][r]}var a=this.getValueUnit(e,n);return this.durationFormats[n][a]},i.prototype.getValueUnit=function(e,t){var n;t||(t=this.baseUnit);var r=this.getMilliseconds(e,t);return na(this._unitValues,function(a,o){if(a==t||n){if(r/o<=1)return n||(n=a),!1;n=a}return!0}),n},i.prototype.getMilliseconds=function(e,t){return t||(t=this.baseUnit),e*this._unitValues[t]},Object.defineProperty(i.prototype,"durationFormat",{get:function(){return this._durationFormat},set:function(e){this._durationFormat!=e&&(this._durationFormat=e,this.invalidateSprite())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"durationFormats",{get:function(){return this._durationFormats||(this._durationFormats={millisecond:{millisecond:this.language.translate("_duration_millisecond"),second:this.language.translate("_duration_millisecond_second"),minute:this.language.translate("_duration_millisecond_minute"),hour:this.language.translate("_duration_millisecond_hour"),day:this.language.translate("_duration_millisecond_day"),week:this.language.translate("_duration_millisecond_week"),month:this.language.translate("_duration_millisecond_month"),year:this.language.translate("_duration_millisecond_year")},second:{second:this.language.translate("_duration_second"),minute:this.language.translate("_duration_second_minute"),hour:this.language.translate("_duration_second_hour"),day:this.language.translate("_duration_second_day"),week:this.language.translate("_duration_second_week"),month:this.language.translate("_duration_second_month"),year:this.language.translate("_duration_second_year")},minute:{minute:this.language.translate("_duration_minute"),hour:this.language.translate("_duration_minute_hour"),day:this.language.translate("_duration_minute_day"),week:this.language.translate("_duration_minute_week"),month:this.language.translate("_duration_minute_month"),year:this.language.translate("_duration_minute_year")},hour:{hour:this.language.translate("_duration_hour"),day:this.language.translate("_duration_hour_day"),week:this.language.translate("_duration_hour_week"),month:this.language.translate("_duration_hour_month"),year:this.language.translate("_duration_hour_year")},day:{day:this.language.translate("_duration_day"),week:this.language.translate("_duration_day_week"),month:this.language.translate("_duration_day_month"),year:this.language.translate("_duration_day_year")},week:{week:this.language.translate("_duration_week"),month:this.language.translate("_duration_week_month"),year:this.language.translate("_duration_week_year")},month:{month:this.language.translate("_duration_month"),year:this.language.translate("_duration_month_year")},year:{year:this.language.translate("_duration_year")}}),this._durationFormats},set:function(e){this._durationFormats=e,this.invalidateSprite()},enumerable:!0,configurable:!0}),i}(Ke);_.registeredClasses.DurationFormatter=Hr;var Ua,Zh=new me,Ga=function(s){function i(){var e=s!==null&&s.apply(this,arguments)||this;return e._validateDisposer=null,e}return w(i,s),i.prototype.invalidate=function(){this._validateDisposer===null&&(this._validateDisposer=_.events.on("exitframe",this.validate,this))},i.prototype.validate=function(){this._validateDisposer!==null&&(this._validateDisposer.dispose(),this._validateDisposer=null)},i.prototype.dispose=function(){this._validateDisposer!==null&&(this._validateDisposer.dispose(),this._validateDisposer=null),s.prototype.dispose.call(this)},i}(wt),qh=function(s){function i(){var e=s.call(this)||this;return e.adapter=new it(e),e.closeDelay=1e3,e.closeOnClick=!0,e._language=new Me,e._menuTag="ul",e._itemTag="li",e._labelTag="a",e._iconTag="img",e._classPrefix="amexport",e._defaultStyles=!0,e._align="right",e._verticalAlign="top",e._tabindex=0,e._ignoreNextClose=!1,e._items=[{label:"...",menu:[{label:"Image",menu:[{type:"png",label:"PNG"},{type:"jpg",label:"JPG"},{type:"svg",label:"SVG"},{type:"pdf",label:"PDF"}]},{label:"Data",menu:[{type:"json",label:"JSON"},{type:"csv",label:"CSV"},{type:"xlsx",label:"XLSX"},{type:"html",label:"HTML"},{type:"pdfdata",label:"PDF"}]},{label:"Print",type:"print"}]}],e.className="ExportMenu",e._disposers.push(e._language),e.invalidate(),e.applyTheme(),e}return w(i,s),i.prototype.validate=function(){this.draw(),s.prototype.validate.call(this)},i.prototype.draw=function(){var e=this;this._element?(this._element.innerHTML="",this._element.className=this.getMenuItemClass(0)):this._element=this.createMenuElement(0),this.defaultStyles&&(this._element.style.display="none"),be(this._container).appendChild(this._element);for(var t=this.adapter.apply("items",{items:this._items}).items,n=t.length,r=0;r<n;r++)this.drawBranch(this._element,t[r],0);this._element=this.adapter.apply("menuElement",{menuElement:this._element}).menuElement,this._disposers.push(K().body.events.on("down",function(a){a.pointer.touch||(e._ignoreNextClose=!1),e.close()})),this._disposers.push(K().body.events.on("keydown",function(a){var o=Ct.getEventKey(a.event);switch(o){case"esc":e.close();break;case"up":case"down":case"left":case"right":e._currentSelection&&a.event.preventDefault(),e.moveSelection(o)}})),this.defaultStyles&&this.loadDefaultCSS()},i.prototype.drawBranch=function(e,t,n){var r=this;if((t=this.adapter.apply("branch",{branch:t,level:n}).branch).unsupported!==!0){t.ascendants||(t.ascendants=new re);var a,o=t.type,l=this.createItemElement(n,o);t.icon?((a=this.createIconElement(n,o)).src=t.icon,(t.label||t.title)&&(a.title=t.title||t.label)):t.svg?(a=this.createSvgElement(n,o,t.svg),(t.label||t.title)&&(a.title=t.title||t.label)):((a=this.createLabelElement(n,o)).innerHTML=t.label?this.language.translate(t.label):"",t.title&&(a.title=t.title));var h=this.getReaderLabel(t,a.innerHTML);a.setAttribute("aria-label",h),l.appendChild(a),t.interactions=K().getInteraction(l),t.element=l,this.typeClickable(o)&&(t.interactions.events.on("hit",function(m){if(r.events.isEnabled("hit")&&!r.isDisposed()){var x={type:"hit",event:m.event,target:r,branch:t};r.events.dispatchImmediately("hit",x)}}),t.interactions.events.on("keyup",function(m){if(Ct.isKey(m.event,"enter")&&r.events.isEnabled("enter")){var x={type:"enter",event:m.event,target:r,branch:t};r.events.dispatchImmediately("enter",x)}}));var p=this.getSubMenu(t);p!=null&&(t.interactions.events.on("keyup",function(m){Ct.isKey(m.event,"enter")&&(r.selectBranch(p[0]),r.setFocus(p[0]))}),t.interactions.events.on("hit",function(m){r.selectBranch(t)})),t.interactions.events.on("over",function(m){if(m.pointer.touch&&(r._ignoreNextClose=!0),r.selectBranch(t),r.events.isEnabled("over")){var x={type:"over",event:m.event,target:r,branch:t};r.events.dispatchImmediately("over",x)}}),t.interactions.events.on("out",function(m){if(!r.isDisposed()&&(m.pointer.touch||r.delayUnselectBranch(t),r.events.isEnabled("out"))){var x={type:"out",event:m.event,target:r,branch:t};r.events.dispatchImmediately("out",x)}}),t.interactions.events.on("focus",function(m){r.selectBranch(t)}),t.interactions.events.on("blur",function(m){r.delayUnselectBranch(t)});var u=n+1;if(t.menu){var d=this.createMenuElement(u);t.submenuElement=d;for(var c=t.menu.length,f=0;f<c;f++){var g=new re;t.menu[f].ascendants=g,t.ascendants.length&&g.copyFrom(t.ascendants),g.push(t),this.drawBranch(d,t.menu[f],u)}if(d.innerHTML=="")return;l.appendChild(d)}t.hidden&&this.hideBranch(t),t.id&&l.setAttribute("id",t.id),t.color&&(l.style.backgroundColor=t.color.hex),e.appendChild(l)}},i.prototype.createMenuElement=function(e){var t=document.createElement(this.menuTag);return t.className=this.getMenuItemClass(e),e===0?t.setAttribute("role","menubar"):t.setAttribute("role","menu"),t},i.prototype.getMenuItemClass=function(e){var t=this.classPrefix+"-menu "+this.classPrefix+"-menu-level-"+e;return e===0&&(t+=" "+this.classPrefix+"-menu-root "+this.classPrefix+"-"+this.align+" "+this.classPrefix+"-"+this.verticalAlign),this.adapter.apply("menuClass",{className:t,level:e}).className},i.prototype.createItemElement=function(e,t){var n=document.createElement(this.itemTag),r=this.classPrefix+"-item "+this.classPrefix+"-item-level-"+e+" "+this.classPrefix+"-item-"+(t||"blank");return n.className=this.adapter.apply("itemClass",{className:r,level:e,type:t}).className,n.setAttribute("role","menuitem"),n.setAttribute("tabindex",this.tabindex.toString()),n},i.prototype.createLabelElement=function(e,t){var n=document.createElement(this.labelTag),r=this.classPrefix+"-label "+this.classPrefix+"-label-level-"+e+" "+this.classPrefix+"-item-"+(t||"blank");return this.typeClickable(t)&&(r+=" "+this.classPrefix+"-clickable"),n.className=this.adapter.apply("labelClass",{className:r,level:e,type:t}).className,n},i.prototype.createIconElement=function(e,t){var n=document.createElement(this.iconTag),r=this.classPrefix+"-icon "+this.classPrefix+"-icon-level-"+e+" "+this.classPrefix+"-item-"+(t||"blank");return this.typeClickable(t)&&(r+=" "+this.classPrefix+"-clickable"),n.className=this.adapter.apply("labelClass",{className:r,level:e,type:t}).className,n.setAttribute("tabindex",this.tabindex.toString()),n.setAttribute("role","menuitem"),n},i.prototype.createSvgElement=function(e,t,n){var r=new DOMParser().parseFromString(n,"image/svg+xml").documentElement,a=this.classPrefix+"-icon "+this.classPrefix+"-icon-level-"+e+" "+this.classPrefix+"-item-"+(t||"blank");return this.typeClickable(t)&&(a+=" "+this.classPrefix+"-clickable"),r.setAttribute("class",this.adapter.apply("labelClass",{className:a,level:e,type:t}).className),r.setAttribute("tabindex",this.tabindex.toString()),r.setAttribute("role","menuitem"),r},i.prototype.dispose=function(){this._disposed||(s.prototype.dispose.call(this),this._element&&this._element.parentNode&&this._element.parentNode.removeChild(this._element))},i.prototype.typeClickable=function(e){return v(e)},i.prototype.hasSubMenu=function(e){return!(!e.menu||!e.menu.length)},i.prototype.getSubMenu=function(e){if(e.menu&&e.menu.length)return e.menu},i.prototype.getReaderLabel=function(e,t){return t=ya(t),e.ascendants.length==0?(t=t=="..."?this.language.translate("Export"):t,t+=" ["+this.language.translate("Press ENTER or use arrow keys to navigate")+"]"):this.hasSubMenu(e)?t+=" ["+this.language.translate("Click, tap or press ENTER to open")+"]":e.type=="print"?t=this.language.translate("Click, tap or press ENTER to print."):this.typeClickable(e.type)&&(t=this.language.translate("Click, tap or press ENTER to export as %1.",void 0,t)),this.adapter.apply("rederLabel",{label:t,branch:e}).label},Object.defineProperty(i.prototype,"container",{get:function(){return this._container},set:function(e){this._container=e,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"items",{get:function(){return this._items},set:function(e){this._items=e,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tag",{set:function(e){this._menuTag=e,this._itemTag=e=="ul"?"li":"div",this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"menuTag",{get:function(){return this.adapter.apply("menuTag",{tag:this._menuTag}).tag},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemTag",{get:function(){return this.adapter.apply("itemTag",{tag:this._itemTag}).tag},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"labelTag",{get:function(){return this.adapter.apply("labelTag",{tag:this._labelTag}).tag},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"iconTag",{get:function(){return this.adapter.apply("iconTag",{tag:this._iconTag}).tag},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"align",{get:function(){return this.adapter.apply("align",{align:this._align}).align},set:function(e){this._align=e,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"verticalAlign",{get:function(){return this.adapter.apply("verticalAlign",{verticalAlign:this._verticalAlign}).verticalAlign},set:function(e){this._verticalAlign=e,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"classPrefix",{get:function(){return this.adapter.apply("classPrefix",{classPrefix:this._classPrefix}).classPrefix},set:function(e){this._classPrefix=e,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"defaultStyles",{get:function(){return this.adapter.apply("defaultStyles",{defaultStyles:this._defaultStyles}).defaultStyles},set:function(e){this._defaultStyles!=e&&(this._defaultStyles=e,e&&this.loadDefaultCSS()),this.invalidate()},enumerable:!0,configurable:!0}),i.prototype.loadDefaultCSS=function(){var e,t,n,r;this._disposers.push((e=Va(this.container),t=this.classPrefix,n=t||"amexport",r=new ae,Zh.insertKeyIfEmpty(n,function(){var a=new _e([new ue(e,"."+n+"-menu *",{"box-sizing":"border-box"}),new ue(e,"."+n+"-menu-level-0",{position:"absolute",top:"5px",right:"5px"}),new ue(e,"."+n+"-menu-level-0."+n+"-left",{right:"auto",left:"5px"}),new ue(e,"."+n+"-menu-level-0."+n+"-right",{right:"5px",left:"auto"}),new ue(e,"."+n+"-menu-level-0."+n+"-top",{top:"5px",bottom:"auto"}),new ue(e,"."+n+"-menu-level-0."+n+"-bottom",{top:"auto",bottom:"5px"}),new ue(e,"."+n+"-item."+n+"-item-level-0",{opacity:"0.3",width:"30px","min-height":"30px",transition:"all 100ms ease-in-out"}),new ue(e,"div:hover > div > ."+n+"-menu ."+n+"-item."+n+"-item-level-0, ."+n+"-item."+n+"-item-level-0.active",{opacity:"0.9"}),new ue(e,"."+n+"-item."+n+"-item-level-0 > a",{padding:"0","text-align":"center",overflow:"hidden"}),new ue(e,"."+n+"-item."+n+"-item-level-0:before",{display:"block"}),new ue(e,"."+n+"-item",{position:"relative",display:"block",opacity:"0","z-index":"1","border-radius":"3px","background-color":r.getFor("secondaryButton").hex,padding:"0",margin:"1px 1px 0 0",color:r.getFor("secondaryButton").alternative.hex,transition:"all 100ms ease-in-out, opacity 0.5s ease 0.5s"}),new ue(e,"."+n+"-left ."+n+"-item",{margin:"1px 0 0 1px"}),new ue(e,"."+n+"-item:hover, ."+n+"-item.active",{background:r.getFor("secondaryButtonHover").hex,color:r.getFor("secondaryButtonText").hex}),new ue(e,"."+n+"-item > ."+n+"-menu",{position:"absolute",top:"-1px",right:"0","margin-right":"100%"}),new ue(e,"."+n+"-left ."+n+"-item > ."+n+"-menu",{left:"0",right:"auto","margin-left":"100%","margin-right":"auto"}),new ue(e,"."+n+"-right ."+n+"-item > ."+n+"-menu",{left:"auto",right:"0","margin-left":"auto","margin-right":"100%"}),new ue(e,"."+n+"-top ."+n+"-item > ."+n+"-menu",{top:"-1px",bottom:"auto"}),new ue(e,"."+n+"-bottom ."+n+"-item > ."+n+"-menu",{top:"auto",bottom:"0"}),new ue(e,"."+n+"-item > ."+n+"-menu",{display:"none"}),new ue(e,"."+n+"-item:hover > ."+n+"-menu, ."+n+"-item.active > ."+n+"-menu",{display:"block"}),new ue(e,"."+n+"-item:hover > ."+n+"-menu > ."+n+"-item, ."+n+"-item.active > ."+n+"-menu > ."+n+"-item",{opacity:"1"}),new ue(e,"."+n+"-menu",{display:"block","list-style":"none",margin:"0",padding:"0"}),new ue(e,"."+n+"-label",{display:"block",cursor:"default",padding:"0.5em 1em"}),new ue(e,"."+n+"-icon",{display:"block",cursor:"default",padding:"0.2em 0.4em",width:"1.2em",height:"1.2em","min-width":"32px","min-height":"32px",margin:"auto auto","border-radius":"3px"}),new ue(e,"."+n+"-item-level-0 > ."+n+"-icon",{padding:"0.1em 0.2em"}),new ue(e,"."+n+"-clickable",{cursor:"pointer"})]);return new un(function(){Zh.removeKey(n),a.dispose()})}).increment())),this._element&&(this._element.style.display="")},Object.defineProperty(i.prototype,"tabindex",{get:function(){return this.adapter.apply("tabindex",{tabindex:this._tabindex}).tabindex},set:function(e){this._tabindex=e,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"language",{get:function(){var e=this,t=this._language.get();return t==null&&(t=new Wt,this._language.set(t,t.events.on("localechanged",function(n){e.invalidate()}))),t},set:function(e){var t=this;this._language.set(e,e.events.on("localechanged",function(n){t.invalidate()})),this.invalidate()},enumerable:!0,configurable:!0}),i.prototype.close=function(){var e=this;if(!this.isDisposed())if(this._ignoreNextClose)this._ignoreNextClose=!1;else{if(this.closeOnClick&&(this._element.style.pointerEvents="none",setTimeout(function(){e._element.style.pointerEvents="auto"},100)),this._currentSelection&&(this.setBlur(this._currentSelection),this._currentSelection=void 0),this._element)for(var t=this._element.getElementsByClassName("active"),n=t.length-1;n>=0;n--)t[n]&&Lr(t[n],"active");this.events.dispatchImmediately("closed",{type:"closed",target:this})}},i.prototype.selectBranch=function(e){var t=this;if(!this.isDisposed()&&(e.closeTimeout&&(this.removeDispose(e.closeTimeout),e.closeTimeout=void 0),Mr(e.element,"active"),e.submenuElement&&e.submenuElement.setAttribute("aria-expanded","true"),this._currentSelection&&this._currentSelection!==e&&this._currentSelection.ascendants&&A(Il(qt([this._currentSelection]),this._currentSelection.ascendants.iterator()),function(r){e.ascendants.contains(r)||e===r||t.unselectBranch(r,!0)}),A(e.ascendants.iterator(),function(r){r.closeTimeout&&(t.removeDispose(r.closeTimeout),r.closeTimeout=void 0),Mr(r.element,"active")}),this._currentSelection=e,this.events.isEnabled("branchselected"))){var n={type:"branchselected",target:this,branch:e};this.events.dispatchImmediately("branchselected",n)}},i.prototype.unselectBranch=function(e,t){if(!this.isDisposed()&&(Lr(e.element,"active"),e.submenuElement&&e.submenuElement.removeAttribute("aria-expanded"),this._currentSelection==e&&(this._currentSelection=void 0),this.events.isEnabled("branchunselected"))){var n={type:"branchunselected",target:this,branch:e};this.events.dispatchImmediately("branchunselected",n)}},i.prototype.delayUnselectBranch=function(e,t){var n=this;this.isDisposed()||(e.closeTimeout&&(this.removeDispose(e.closeTimeout),e.closeTimeout=void 0),e.closeTimeout=this.setTimeout(function(){n.unselectBranch(e,t)},this.closeDelay),t!==!0&&e.ascendants&&A(e.ascendants.iterator(),function(r){n.delayUnselectBranch(r,!0)}))},i.prototype.moveSelection=function(e){if(!this.isDisposed()&&this._currentSelection){var t;if(e=="up")t=this.getPrevSibling(this._currentSelection);else if(e=="down")t=this.getNextSibling(this._currentSelection);else if(e=="left"&&this.align=="right"||e=="right"&&this.align=="left"){var n=this.getSubMenu(this._currentSelection);n!=null&&(t=n[0])}else(e=="right"&&this.align=="right"||e=="left"&&this.align=="left")&&(t=this.getParentItem(this._currentSelection));t&&t!==this._currentSelection&&(this.selectBranch(t),this.setFocus(t),this._currentSelection=t)}},i.prototype.getSiblings=function(e){var t=this.getParentItem(e);return t&&t.menu?t.menu:[]},i.prototype.getParentItem=function(e){return e.ascendants&&e.ascendants.length?e.ascendants.getIndex(e.ascendants.length-1):void 0},i.prototype.getNextSibling=function(e){var t=this.getSiblings(e);if(t.length>1){var n=t.indexOf(e)+1;return t[n=t.length==n?0:n].unsupported?this.getNextSibling(t[n]):t[n]}return e},i.prototype.getPrevSibling=function(e){var t=this.getSiblings(e);if(t.length>1){var n=t.indexOf(e)-1;return t[n=n==-1?t.length-1:n].unsupported?this.getPrevSibling(t[n]):t[n]}return e},i.prototype.setFocus=function(e){if(e.interactions)try{e.interactions.element.focus()}catch{}},i.prototype.setBlur=function(e){if(e.interactions)try{e.interactions.element.blur()}catch{}},i.prototype.hideBranch=function(e){e.element.style.display="none"},i.prototype.showBranch=function(e){e.element.style.display=""},Object.defineProperty(i.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),i}(Ga);function Fn(s,i,e){return new Promise(function(t,n){var r=v(e)&&e.responseType=="blob",a=new XMLHttpRequest;if(a.onload=function(){if(a.status===200){var h,p;if(r)return void $h(h=a.response).then(function(d){var c={xhr:a,error:!1,response:d,blob:h,type:a.getResponseHeader("Content-Type"),target:i};t(c)});p=a.responseText||a.response;var u={xhr:a,error:!1,response:p,blob:h,type:a.getResponseHeader("Content-Type"),target:i};t(u)}else n({xhr:a,error:!0,type:a.getResponseHeader("Content-Type"),target:i})},a.onerror=function(){n({xhr:a,error:!0,type:a.getResponseHeader("Content-Type"),target:i})},a.open("GET",s,!0),e&&e.withCredentials&&(a.withCredentials=!0),v(e)){if(v(e.requestHeaders))for(var o=0;o<e.requestHeaders.length;o++){var l=e.requestHeaders[o];a.setRequestHeader(l.key,l.value)}v(e.responseType)&&(a.responseType=e.responseType)}a.send()})}function $h(s){return new Promise(function(i,e){var t=new FileReader;t.onload=function(n){i(t.result)},t.onerror=function(n){e(n)},t.readAsText(s)})}var Jh=/src: ([^;]+);/;function od(s){return de(this,void 0,void 0,function(){var i;return pe(this,function(e){switch(e.label){case 0:i=s.sheet,e.label=1;case 1:return e.trys.push([1,2,,4]),[2,i.cssRules];case 2:return e.sent(),[4,new Promise(function(t,n){s.addEventListener("load",function(){t(i.cssRules)},!0),s.addEventListener("error",function(r){n(r)},!0),setTimeout(function(){n(new Error("Timeout while waiting for <style> to load"))},1e4)})];case 3:return[2,e.sent()];case 4:return[2]}})})}function Qh(s,i,e){return de(this,void 0,void 0,function(){var t,n,r,a;return pe(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,Fn(i)];case 1:return t=o.sent(),[3,3];case 2:return n=o.sent(),console.error("Failed to load stylesheet",i,n),[2];case 3:(r=s.createElement("style")).textContent=t.response,Z.nonce!=""&&r.setAttribute("nonce",Z.nonce),s.head.appendChild(r),o.label=4;case 4:return o.trys.push([4,,7,8]),[4,od(r)];case 5:return a=o.sent(),[4,ep(s,i,a,e)];case 6:return o.sent(),[3,8];case 7:return s.head.removeChild(r),[7];case 8:return[2]}})})}function ep(s,i,e,t){return de(this,void 0,void 0,function(){var n,r,a,o,l;return pe(this,function(h){switch(h.label){case 0:for(n=[],r=e.length,a=0;a<r;a++)(o=e[a]).type===CSSRule.IMPORT_RULE?(l=o.href)&&(l=kr(i,l),n.push(Qh(s,l,t))):t(i,o);return n.length?[4,Promise.all(n)]:[3,2];case 1:h.sent(),h.label=2;case 2:return[2]}})})}function ld(s){return de(this,void 0,void 0,function(){var i,e;return pe(this,function(t){switch(t.label){case 0:(i=document.createElement("iframe")).src="about:blank",i.setAttribute("title",""),document.head.appendChild(i),t.label=1;case 1:return t.trys.push([1,,3,4]),e=i.contentDocument,[4,Promise.all(Li(document.styleSheets,function(n){var r=n.href;return r==null?ep(e,location.href,n.cssRules,s):(r=kr(location.href,r),Qh(e,r,s))}))];case 2:return t.sent(),[3,4];case 3:return document.head.removeChild(i),[7];case 4:return[2]}})})}var tp=function(s){function i(e){var t=s.call(this)||this;return t.adapter=new it(t),t._formatOptions=new me,t._extraSprites=[],t._validateSprites=[],t.dataFieldsOrder=[],t._dynamicDataFields=!0,t._removedObjects=new re,t._hiddenObjects=[],t._objectsAlreadyHidden=!1,t._filePrefix="amCharts",t.useWebFonts=!0,t.useRetina=!0,t.useSimplifiedExport=!0,t.timeoutDelay=2e3,t._exportRunning=!1,t._prevHasData=!1,t._container=e,t.className="Export",t._formatOptions.setKey("png",{}),t._formatOptions.setKey("jpg",{quality:.8}),t._formatOptions.setKey("gif",{}),t._formatOptions.setKey("svg",{}),t._formatOptions.setKey("pdf",{fontSize:14,imageFormat:"png",align:"left",addURL:!0,addColumnNames:!0}),t._formatOptions.setKey("json",{indent:2,useLocale:!0}),t._formatOptions.setKey("csv",{addColumnNames:!0,emptyAs:"",addBOM:!0}),t._formatOptions.setKey("xlsx",{addColumnNames:!0,useLocale:!0,emptyAs:""}),t._formatOptions.setKey("html",{addColumnNames:!0,emptyAs:""}),t._formatOptions.setKey("pdfdata",{fontSize:14,imageFormat:"png",addURL:!0,addColumnNames:!0,emptyAs:""}),t._formatOptions.setKey("print",{delay:500,printMethod:"iframe"}),t.adapter.add("options",function(n){var r=t._formatOptions.getKey(n.type);return n.options?n.options=dr(r,n.options):n.options=r,n}),t.applyTheme(),t.dispatchImmediately("inited"),t}return w(i,s),Object.defineProperty(i.prototype,"menu",{get:function(){return this._menu},set:function(e){var t=this;this._menu&&this.removeDispose(this._menu),this._menu=e,this._menu.container=this.container,this._menu.language=this._language,this._menu.adapter.add("branch",function(n){return n.branch.unsupported=!t.typeSupported(n.branch.type),n}),this._menu.events.on("hit",function(n){t.export(n.branch.type,n.branch.options),t.menu.close()}),this._menu.events.on("enter",function(n){t.export(n.branch.type,n.branch.options),t.menu.close()}),this._menu.events.on("over",function(n){t._disablePointers()}),this._menu.events.on("out",function(n){setTimeout(function(){t._releasePointers()},10)}),this.dispatchImmediately("menucreated"),this._menu.adapter.add("classPrefix",function(n){return n.classPrefix=Z.classNamePrefix+n.classPrefix,n}),this._disposers.push(this._menu)},enumerable:!0,configurable:!0}),i.prototype.typeSupported=function(e){var t=!0,n=this.getFormatOptions(e);return v(n)&&n.disabled?t=!1:e==="pdf"||(e==="xlsx"?t=!!this._hasData():(e!="print"||window.print)&&(["json","csv","html","pdfdata"].indexOf(e)===-1||this._hasData())||(t=!1)),this.adapter.apply("supported",{supported:t,type:e}).supported},i.prototype._hasData=function(){return this.data&&this.data.length},i.prototype._getFunction=function(e){switch(e){case"png":case"gif":case"jpg":return this.getImage;case"svg":return this.getSVG;case"pdf":case"pdfdata":return this.getPDF;case"xlsx":return this.getExcel;case"csv":return this.getCSV;case"json":return this.getJSON;case"html":return this.getHTML;case"print":return this.getPrint;default:return this.unsupported}},i.prototype.export=function(e,t){return de(this,void 0,void 0,function(){var n,r,a,o,l,h=this;return pe(this,function(p){switch(p.label){case 0:return e=="custom"?(this.handleCustom(t),[2,!0]):(this._exportRunning=!0,this.events.isEnabled("exportstarted")&&(n={type:"exportstarted",target:this,format:e,options:t},this.events.dispatchImmediately("exportstarted",n)),this.showPreloader(),this.timeoutDelay&&(this.hideTimeout(),this._timeoutTimeout=this.setTimeout(function(){if(h.events.isEnabled("exporttimedout")){var u={type:"exporttimedout",target:h,format:e,options:t};h.events.dispatchImmediately("exporttimedout",u)}h.showTimeout()},this.timeoutDelay)),this.hideNonExportableSprites(),r=this._getFunction(e),t=this.adapter.apply("options",{options:t,type:e}).options,[4,(r=this.adapter.apply("exportFunction",{func:r,type:e,options:t}).func).call(this,e,t)]);case 1:return a=p.sent(),this._exportRunning=!1,this._releasePointers(),this.restoreNonExportableSprites(),a?(this.events.isEnabled("exportfinished")&&(o={type:"exportfinished",target:this,format:e,options:t},this.events.dispatchImmediately("exportfinished",o)),this.hidePreloader(),this.hideTimeout(),this.menu&&this.menu.close(),e==="print"?[2,this.print(a,t,this.adapter.apply("title",{title:this.title,options:t}).title)]:e=="pdfdata"?[2,this.download(a,this.filePrefix+".pdf")]:[2,this.download(a,this.filePrefix+"."+e,t&&t.addBOM)]):(this.events.isEnabled("error")&&(l={type:"error",target:this,format:e,options:t},this.events.dispatchImmediately("error",l)),[2,!1])}})})},i.prototype.unsupported=function(e,t){return de(this,void 0,void 0,function(){return pe(this,function(n){return[2,""]})})},i.prototype.handleCustom=function(e){v(e)&&v(e.callback)&&e.callback.call(e.callbackTarget||this,e)},i.prototype.getPrint=function(e,t){return de(this,void 0,void 0,function(){return pe(this,function(n){return[2,this.getImage("png",t)]})})},i.prototype.getFontFamilies=function(){return de(this,void 0,void 0,function(){var e,t,n,r,a=this;return pe(this,function(o){switch(o.label){case 0:return e=this.getDOMURL(),t=[],n=[],[4,ld(function(l,h){if(h.type===CSSRule.FONT_FACE_RULE){var p=h.cssText,u=Jh.exec(p);if(u!==null){var d=u[1].split(/ *, */).map(function(c){return de(a,void 0,void 0,function(){var f,g,m,x,b,C;return pe(this,function(S){switch(S.label){case 0:return(f=/^url\(["']?([^"'\)]+)["']?\)([^,]*)$/.exec(c))!==null?[3,1]:[2,c];case 1:if(g=f[2],m=kr(l,f[1]),this.webFontFilter&&!m.match(this.webFontFilter))return[2,null];S.label=2;case 2:return S.trys.push([2,7,,8]),[4,Fn(m,void 0,{responseType:"blob"})];case 3:return x=S.sent(),window.navigator.msSaveOrOpenBlob==null?[3,4]:(b=e.createObjectURL(x.blob),t.push(b),[3,6]);case 4:return[4,(P=x.blob,new Promise(function(O,I){var k=new FileReader;k.onload=function(D){O(k.result)},k.onerror=function(D){I(D)},k.readAsDataURL(P)}))];case 5:b=S.sent(),S.label=6;case 6:return[2,'url("'+b+'")'+g];case 7:return C=S.sent(),console.error("Failed to load font",m,C),[2,null];case 8:return[2]}var P})})});n.push(Promise.all(d).then(function(c){return(c=c.filter(function(f){return f!=null})).length===0?"":p.replace(Jh,"src: "+c.join(", ")+";")}))}}})];case 1:return o.sent(),[4,Promise.all(n)];case 2:return r=o.sent(),[2,{blobs:t,cssText:r.filter(function(l){return!!l}).join(`
- `)}]}})})},i.prototype.getImage=function(e,t,n){return de(this,void 0,void 0,function(){var r,a,o,l,h;return pe(this,function(p){switch(p.label){case 0:return(r=this._objectsAlreadyHidden)||this.hideNonExportableSprites(),v(t)||(t=this.getFormatOptions(e)),[4,this.awaitValidSprites()];case 1:return p.sent(),[4,this.simplifiedImageExport()];case 2:if(!p.sent())return[3,10];a=void 0,p.label=3;case 3:return p.trys.push([3,7,,9]),[4,this.getCanvas(t)];case 4:return a=p.sent(),n===!1?[3,6]:[4,this.addExtras(a,t)];case 5:a=p.sent(),p.label=6;case 6:return o=a.toDataURL(this.getContentType(e),t.quality),this.disposeCanvas(a),r||this.restoreNonExportableSprites(),[2,o];case 7:return l=p.sent(),console.error(l.message+`
- `+l.stack),Ra("Simple export failed, falling back to advanced export"),a&&this.disposeCanvas(a),[4,this.getImageAdvanced(e,t,n)];case 8:return h=p.sent(),r||this.restoreNonExportableSprites(),[2,h];case 9:return[3,12];case 10:return[4,this.getImageAdvanced(e,t,n)];case 11:return h=p.sent(),r||this.restoreNonExportableSprites(),[2,h];case 12:return[2]}})})},i.prototype.addExtras=function(e,t,n){return de(this,void 0,void 0,function(){var r,a,o,l,h,p,u,d,c,f,g,m,x,b,C=this;return pe(this,function(S){switch(S.label){case 0:return this.extraSprites.length?(r=0,a=0,o=e.width,l=e.height,h=0,p=0,[4,Promise.all(Li(this.extraSprites,function(P){return de(C,void 0,void 0,function(){var O,I,k,D;return pe(this,function(G){switch(G.label){case 0:return(O=P instanceof $?{sprite:P,position:"bottom"}:P).position=O.position||"bottom",O.marginTop=O.marginTop||0,O.marginRight=O.marginRight||0,O.marginBottom=O.marginBottom||0,O.marginLeft=O.marginLeft||0,n?[4,O.sprite.exporting.getCanvasAdvanced(t)]:[3,2];case 1:return I=G.sent(),[3,4];case 2:return[4,O.sprite.exporting.getCanvas(t)];case 3:I=G.sent(),G.label=4;case 4:return k=I.width+O.marginLeft+O.marginRight,D=I.height+O.marginTop+O.marginBottom,O.position=="top"?(o=O.crop?l:q(o,k),a+=D):O.position=="right"?(l=O.crop?l:q(l,D),h+=k):O.position=="left"?(l=O.crop?l:q(l,D),r+=k):O.position==="bottom"&&(o=O.crop?l:q(o,k),p+=D),[2,{canvas:I,position:O.position,left:O.marginLeft,top:O.marginTop,width:k,height:D}]}})})}))]):[3,2];case 1:return u=S.sent(),(d=this.getDisposableCanvas()).width=r+o+h,d.height=a+l+p,c=d.getContext("2d"),(f=this.backgroundColor||this.findBackgroundColor(this.sprite.dom))&&(c.fillStyle=f.toString(),c.fillRect(0,0,d.width,d.height)),x=(g=r)+o,b=(m=a)+l,j(u,function(P){P.position=="top"?(m-=P.height,c.drawImage(P.canvas,r+P.left,m+P.top)):P.position=="right"?(c.drawImage(P.canvas,x+P.left,a+P.top),x+=P.width):P.position=="left"?(g-=P.width,c.drawImage(P.canvas,g+P.left,a+P.top)):P.position==="bottom"&&(c.drawImage(P.canvas,r+P.left,b+P.top),b+=P.height),C.disposeCanvas(P.canvas)}),c.drawImage(e,r,a),[2,d];case 2:return[2,e]}})})},i.prototype.getCanvas=function(e){return de(this,void 0,void 0,function(){var t,n,r,a,o,l,h,p,u,d,c,f,g,m,x,b,C;return pe(this,function(S){switch(S.label){case 0:v(e)||(e={}),t=this.backgroundColor||this.findBackgroundColor(this.sprite.dom),n=this.getDOMURL(),r=null,a=null,S.label=1;case 1:return S.trys.push([1,,4,5]),l=this.sprite.pixelWidth,h=this.sprite.pixelHeight,p=jr(this.sprite.dom),u=Er(this.sprite.dom),d=e.scale||1,c=this.getPixelRatio(e),d=this.getAdjustedScale(l*c,h*c,d,e),(o=this.getDisposableCanvas()).style.width=l*d+"px",o.style.height=h*d+"px",o.width=l*d,o.height=h*d,f=o.getContext("2d"),t&&(f.fillStyle=t.toString(),f.fillRect(0,0,l*d,h*d)),g=[],this.useWebFonts&&g.push(this.getFontFamilies().then(function(P){return a=P.blobs,P.cssText})),g.push(this.imagesToDataURI(this.sprite.dom,e)),g.push(this.prepForeignObjects(this.sprite.dom,e)),[4,Promise.all(g)];case 2:return m=S.sent(),x=this.normalizeSVG("<style>"+m[0]+"</style>"+this.serializeElement(this.sprite.paper.defs)+this.serializeElement(this.sprite.dom),e,l,h,d,p,u),b=new Blob([x],{type:"image/svg+xml"}),r=n.createObjectURL(b),[4,this.loadNewImage(r,l*d*c,h*d*c,"anonymous")];case 3:return C=S.sent(),f.drawImage(C,0,0),[3,5];case 4:return r!==null&&n.revokeObjectURL(r),a!==null&&j(a,function(P){n.revokeObjectURL(P)}),this.restoreRemovedObjects(),[7];case 5:return[2,o]}})})},i.prototype.getCanvasAdvanced=function(e){return de(this,void 0,void 0,function(){var t,n,r,a,o,l,h,p,u,d,c;return pe(this,function(f){switch(f.label){case 0:return v(e)||(e={}),[4,this.imagesToDataURI(this.sprite.dom,e)];case 1:return f.sent(),t=this.backgroundColor||this.findBackgroundColor(this.sprite.dom),[4,this.canvg];case 2:return n=f.sent(),r=this.sprite.pixelWidth,a=this.sprite.pixelHeight,o=jr(this.sprite.dom),l=Er(this.sprite.dom),h=e.scale||1,p=this.getPixelRatio(e),h=this.getAdjustedScale(r*p,a*p,h,e),u=this.normalizeSVG(this.serializeElement(this.sprite.paper.defs)+this.serializeElement(this.sprite.dom),e,r,a,h,o,l,t),(d=this.getDisposableCanvas()).style.width=r*p*h+"px",d.style.height=a*p*h+"px",d.width=r*p*h,d.height=a*p*h,c={useCORS:!0},p!=1&&(c.ignoreDimensions=!0,c.scaleWidth=r*p*h,c.scaleHeight=a*p*h),[4,n.fromString(d.getContext("2d"),u,c).render()];case 3:return f.sent(),[2,d]}})})},i.prototype.getImageAdvanced=function(e,t,n){return de(this,void 0,void 0,function(){var r,a,o;return pe(this,function(l){switch(l.label){case 0:return(r=this._objectsAlreadyHidden)||this.hideNonExportableSprites(),v(t)||(t=this.getFormatOptions(e)),[4,this.getCanvasAdvanced(t)];case 1:return a=l.sent(),n===!1?[3,3]:[4,this.addExtras(a,t,!0)];case 2:a=l.sent(),l.label=3;case 3:return o=a.toDataURL(this.getContentType(e),t.quality),this.disposeCanvas(a),r||this.restoreNonExportableSprites(),[2,o]}})})},i.prototype.getDisposableCanvas=function(){var e=document.createElement("canvas");return e.style.position="fixed",e.style.top="-10000px",document.body.appendChild(e),e},i.prototype.disposeCanvas=function(e){document.body.removeChild(e)},i.prototype.getPixelRatio=function(e){return this.useRetina?$l():1},i.prototype.getAdjustedScale=function(e,t,n,r){if(!r)return n;var a,o,l=e*n,h=e*n;return r.maxWidth&&l>r.maxWidth&&(a=r.maxWidth/e),r.maxHeight&&h>r.maxHeight&&(o=r.maxHeight/t),a||o?ie(a,o):(r.minWidth&&l<r.minWidth&&(a=r.minWidth/e),r.minHeight&&h<r.minHeight&&(o=r.minHeight/t),a||o?q(a,o):n)},i.prototype.imagesToDataURI=function(e,t){return de(this,void 0,void 0,function(){var n,r,a,o,l,h;return pe(this,function(p){switch(p.label){case 0:if(!(n=e.querySelectorAll("image")).length)return[3,2];for(r=[],a=n.length,o=0;o<a;o++)l=n[o],(h=l.getAttributeNS(i.XLINK,"href"))&&(h.indexOf("data:image")!==-1||(h.indexOf(".svg")!==-1?r.push(this.svgToDataURI(l,t)):r.push(this.imageToDataURI(l,t))));return[4,Promise.all(r)];case 1:return p.sent(),[2];case 2:return[2]}})})},i.prototype.prepForeignObjects=function(e,t){return de(this,void 0,void 0,function(){var n,r,a;return pe(this,function(o){if((n=e.querySelectorAll("foreignObject")).length)for(r=n.length,a=0;a<r;a++)this.temporarilyRemoveObject(n[a]);return[2]})})},i.prototype.imageToDataURI=function(e,t){return de(this,void 0,void 0,function(){var n,r,a;return pe(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.loadNewImage(e.getAttributeNS(i.XLINK,"href"),null,null,"anonymous")];case 1:n=o.sent(),(r=document.createElement("canvas")).width=n.width,r.height=n.height,r.getContext("2d").drawImage(n,0,0);try{return a=r.toDataURL(),e.setAttribute("href",a),[2,a]}catch{return t.keepTainted!==!1&&this.temporarilyRemoveObject(e),[2,void 0]}return[3,3];case 2:return o.sent(),t&&t.keepTainted===!1||this.temporarilyRemoveObject(e),[2,void 0];case 3:return[2]}})})},i.prototype.svgToDataURI=function(e,t){return de(this,void 0,void 0,function(){var n,r,a,o;return pe(this,function(l){switch(l.label){case 0:n=e.getAttributeNS(i.XLINK,"href"),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,Fn(n)];case 2:return r=l.sent(),a=this.adapter.apply("charset",{charset:"base64",type:"svg",options:t}).charset,o=this.adapter.apply("svgToDataURI",{data:"data:"+this.getContentType("svg")+";"+a+","+btoa(r.response),options:t}).data,e.setAttributeNS(i.XLINK,"href",o),[2,o];case 3:return l.sent(),t&&t.keepTainted===!1||this.temporarilyRemoveObject(e),[2,void 0];case 4:return[2]}})})},i.prototype.temporarilyRemoveObject=function(e,t){var n=e.parentElement||e.parentNode;t||(t=this.sprite.paper.add("g").node),n.insertBefore(t,e),e.textContent,n.removeChild(e),this._removedObjects.push({element:e,placeholder:t})},i.prototype.restoreRemovedObjects=function(){for(var e;e=this._removedObjects.pop();)(e.placeholder.parentElement||e.placeholder.parentNode).insertBefore(e.element,e.placeholder)},i.prototype.simplifiedImageExport=function(){return de(this,void 0,void 0,function(){var e,t,n,r,a,o,l;return pe(this,function(h){switch(h.label){case 0:if(this.useSimplifiedExport===!1)return[2,!1];if((e=_.getCache("simplifiedImageExport"))===!1||e===!0)return[2,e];h.label=1;case 1:h.trys.push([1,6,,7]),(t=document.createElement("canvas")).width=1,t.height=1,n=t.getContext("2d"),r=this.getDOMURL(),a=new Blob([this.normalizeSVG("<g></g>",{},1,1)],{type:"image/svg+xml"}),o=r.createObjectURL(a),l=void 0,h.label=2;case 2:return h.trys.push([2,4,,5]),[4,this.loadNewImage(o,1,1)];case 3:return l=h.sent(),[3,5];case 4:return h.sent(),[2,!1];case 5:n.drawImage(l,0,0),r.revokeObjectURL(o);try{return _.setCache("simplifiedImageExport",!0),[2,!0]}catch{return _.setCache("simplifiedImageExport",!1),[2,!1]}return[3,7];case 6:return h.sent(),_.setCache("simplifiedImageExport",!1),[2,!1];case 7:return[2]}})})},i.prototype.loadNewImage=function(e,t,n,r){return new Promise(function(a,o){var l;function h(){if(r){var p=l.src;l.onerror=function(){o(new Error('Loading image "'+e+'" failed'))},l.removeAttribute("crossorigin"),l.src="",l.src=p}else o(new Error('Loading image "'+e+'" failed'))}l=t&&n?new Image(t,n):new Image,r&&l.setAttribute("crossOrigin",r),l.onload=function(){a(l)},l.onabort=h,l.onerror=h,l.src=e})},i.prototype.getDOMURL=function(){return self.URL||self.webkitURL||self},i.prototype.getSVG=function(e,t,n){return n===void 0&&(n=!0),de(this,void 0,void 0,function(){var r,a,o,l,h,p,u,d,c,f;return pe(this,function(g){switch(g.label){case 0:return(r=this._objectsAlreadyHidden)||this.hideNonExportableSprites(),v(t)||(t=this.getFormatOptions("svg")),[4,this.awaitValidSprites()];case 1:return g.sent(),a=this.sprite.pixelWidth,o=this.sprite.pixelHeight,l=jr(this.sprite.dom),h=Er(this.sprite.dom),p=t.scale||1,u=this.getPixelRatio(t),p=this.getAdjustedScale(a*u,o*u,p,t),d=this.normalizeSVG(this.serializeElement(this.sprite.paper.defs)+this.serializeElement(this.sprite.dom),t,a,o,p,l,h),c=this.adapter.apply("charset",{charset:"charset=utf-8",type:"svg",options:t}).charset,f=this.adapter.apply("getSVG",{data:n?"data:"+this.getContentType(e)+";"+c+","+encodeURIComponent(d):d,options:t}).data,r||this.restoreNonExportableSprites(),[2,f]}})})},i.prototype.normalizeSVG=function(e,t,n,r,a,o,l,h){var p="";n&&(p+='width="'+Math.round(n*(a||1))+'px" '),r&&(p+='height="'+Math.round(r*(a||1))+'px" ');var u="";o&&(u+="font-family: "+o.replace(/"/g,"")+";"),l&&(u+="font-size: "+l+";"),a&&(p+='viewBox="0 0 '+n+" "+r+'" ');var d=[],c=e.match(/<foreignObject[\s\S]*<\/foreignObject>/gi);if(c)for(var f=0;f<c.length;f++)e=e.replace(c[f],st),d.push(c[f]);e.match(/<svg/)?p!==""&&(e=(e=(e=e.replace(/(<svg[^>]*)width="[^"]*"/,"$1")).replace(/(<svg[^>]*)height="[^"]*"/,"$1")).replace(/(<svg)/,"$1"+p)):e='<?xml version="1.0" encoding="utf-8"?><svg '+p+' style="'+u+'" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+e+"</svg>",h&&(e=e.replace(/(<svg[^>]*>)/,'$1<rect width="100%" height="100%" fill="'+h.rgba+'"/>')),/MSIE |Trident\//.test(navigator.userAgent)&&(e=e.replace(/<feColorMatrix [^\/>]*\/>/gi,""));var g=new RegExp("url\\("+xr(Ni()),"g");if(e=(e=e.replace(g,"url(#")).replace(/url\("([^)]*)"\)/gm,"url($1)"),d.length)for(f=0;f<d.length;f++)e=e.replace(st,d[f]);return this.adapter.apply("normalizeSVG",{data:e,options:t}).data},i.prototype.serializeElement=function(e){return new XMLSerializer().serializeToString(e)},i.prototype.getPDF=function(e,t){return de(this,void 0,void 0,function(){function n(m){var x={};x.normal=m.normal.path,g[m.normal.path]=m.normal.bytes,m.bold?(x.bold=m.bold.path,g[m.bold.path]=m.bold.bytes):x.bold=m.normal.path,m.italics?(x.italics=m.italics.path,g[m.italics.path]=m.italics.bytes):x.italics=m.normal.path,m.bolditalics?(x.bolditalics=m.bolditalics.path,g[m.bolditalics.path]=m.bolditalics.bytes):x.bolditalics=m.normal.path,f[m.name]=x}var r,a,o,l,h,p,u,d,c,f,g;return pe(this,function(m){switch(m.label){case 0:return[4,this.getImage(t.imageFormat||"png",t)];case 1:return r=m.sent(),[4,this.pdfmake];case 2:return a=m.sent(),o=[30,30,30,30],l={pageSize:t.pageSize||"A4",pageOrientation:t.pageOrientation||"portrait",pageMargins:t.pageMargins||o,defaultStyle:{font:t.font?t.font.name:void 0},content:[]},h=this.adapter.apply("title",{title:this.title,options:t}).title,p=0,h&&(l.content.push({text:h,fontSize:t.fontSize||14,bold:!0,margin:[0,0,0,15]}),p+=50),t.addURL&&(l.content.push({text:this.language.translate("Saved from")+": "+document.location.href,fontSize:t.fontSize,margin:[0,0,0,15]}),p+=50),e!="pdfdata"&&l.content.push({image:r,alignment:t.align||"left",fit:this.getPageSizeFit(l.pageSize,l.pageMargins,p)}),e=="pdfdata"||t.addData?(d=(u=l.content).push,c={},[4,this.getPDFData("pdf",t)]):[3,4];case 3:d.apply(u,[(c.table=m.sent(),c.fontSize=t.fontSize||14,c)]),m.label=4;case 4:return l=this.adapter.apply("pdfmakeDocument",{doc:l,options:t}).doc,f=null,g=null,t.font&&(f={},g={},n(t.font),t.extraFonts&&j(t.extraFonts,n)),[4,new Promise(function(x,b){a.createPdf(l,null,f,g).getDataUrl(function(C){x(C)})})];case 5:return[2,m.sent()]}})})},i.prototype.getPDFData=function(e,t){return de(this,void 0,void 0,function(){var n,r,a,o,l,h,p=this;return pe(this,function(u){if(n={body:[]},r=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"pdf"}).dataFields,a=this.data,t.pivot)o=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"pdfdata"}).dataFieldsOrder,At(r,function(d,c){var f=[];t.addColumnNames&&f.push(c);for(var g=a.length,m=0;m<g;m++){var x=a[m][d];f.push(p.convertToSpecialFormat(d,x,t,!0))}n.body.push(p.getPDFDataRow(f,t,void 0,!0))},function(d,c){var f=o.indexOf(d),g=o.indexOf(c);return f>g?1:f<g?-1:0});else for(t.addColumnNames&&(n.body.push(this.getPDFDataRow(r,t,void 0,!0)),n.headerRows=1),l=a.length,h=0;h<l;h++)n.body.push(this.getPDFDataRow(a[h],t,r));return[2,this.adapter.apply("pdfmakeTable",{table:n,options:t}).table]})})},i.prototype.getPDFDataRow=function(e,t,n,r){var a=this;r===void 0&&(r=!1);var o=[];n||(n=e);var l=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"pdfdata"}).dataFieldsOrder;return At(n,function(h,p){var u=a.convertEmptyValue(h,e[h],t),d=r?u:a.convertToSpecialFormat(h,u,t);d=""+d,o.push(d)},function(h,p){var u=l.indexOf(h),d=l.indexOf(p);return u>d?1:u<d?-1:0}),o},i.prototype.getPageSizeFit=function(e,t,n){n===void 0&&(n=0);var r=[0,0,0,0];typeof t=="number"?r=[t,t,t,t]:t.length==2?r=[t[0],t[1],t[0],t[1]]:t.length==4&&(r=t);var a={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]}[e];return a[0]-=r[0]+r[2],a[1]-=r[1]+r[3]+n,a},i.prototype.getExcel=function(e,t){return de(this,void 0,void 0,function(){var n,r,a,o,l,h,p,u,d,c=this;return pe(this,function(f){switch(f.label){case 0:return v(t)||(t=this.getFormatOptions("xlsx")),[4,this.xlsx];case 1:if(n=f.sent(),r=this.adapter.apply("xlsxWorkbookOptions",{xlsx:n,options:{bookType:"xlsx",bookSST:!1,type:"base64"}}).options,a=this.normalizeExcelSheetName(this.adapter.apply("xlsxSheetName",{xlsx:n,name:this.title||this.language.translate("Data")}).name),o={SheetNames:[a],Sheets:{}},l=[],h=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"xslx"}).dataFields,t.pivot)p=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"xlsx"}).dataFieldsOrder,At(h,function(g,m){var x=[];t.addColumnNames&&x.push(m);for(var b=c.data.length,C=0;C<b;C++){var S=c.data[C][g];x.push(c.convertToSpecialFormat(g,S,t,!0))}l.push(c.getExcelRow(x,t,void 0,!0))},function(g,m){var x=p.indexOf(g),b=p.indexOf(m);return x>b?1:x<b?-1:0});else for(t.addColumnNames&&l.push(this.getExcelRow(h,t,void 0,!0)),u=this.data.length,d=0;d<u;d++)l.push(this.getExcelRow(this.data[d],t,h));return o.Sheets[a]=n.utils.aoa_to_sheet(l),o=this.adapter.apply("xlsxWorkbook",{xlsx:n,workbook:o,options:t}).workbook,[2,this.adapter.apply("getExcel",{data:"data:"+this.getContentType(e)+";base64,"+n.write(o,r),options:t}).data]}})})},i.prototype.normalizeExcelSheetName=function(e){return Pr(e=e.replace(/([:\\\/?*\[\]]+)/g," "),31,"...",!0)},i.prototype.getExcelRow=function(e,t,n,r){var a=this;r===void 0&&(r=!1);var o=[];n||(n=e);var l=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"xlsx"}).dataFieldsOrder;return At(n,function(h,p){var u=a.convertEmptyValue(h,e[h],t),d=r?u:a.convertToSpecialFormat(h,u,t,!0);o.push(d)},function(h,p){var u=l.indexOf(h),d=l.indexOf(p);return u>d?1:u<d?-1:0}),o},i.prototype.getCSV=function(e,t,n){return n===void 0&&(n=!0),de(this,void 0,void 0,function(){var r,a,o,l,h,p,u,d,c,f=this;return pe(this,function(g){if(v(t)||(t=this.getFormatOptions("csv")),r="",a=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"csv"}).dataFields,o="",l=this.data,t.pivot)h=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"csv"}).dataFieldsOrder,At(a,function(m,x){var b=[];t.addColumnNames&&b.push(x);for(var C=l.length,S=0;S<C;S++){var P=l[S][m];b.push(f.convertToSpecialFormat(m,P,t,!0))}r+=o+f.getCSVRow(b,t,void 0,!0),o=`
- `},function(m,x){var b=h.indexOf(m),C=h.indexOf(x);return b>C?-1:b<C?1:0});else{for(p=l.length,u=0;u<p;u++)d=this.getCSVRow(l[u],t,a),t.reverse?r=d+o+r:r+=o+d,o=`
- `;t.addColumnNames&&(r=this.getCSVRow(a,t,void 0,!0)+o+r)}return c=this.adapter.apply("charset",{charset:"charset=utf-8",type:e,options:t}).charset,[2,this.adapter.apply("getCSV",{data:n?"data:"+this.getContentType(e)+";"+c+","+encodeURIComponent(r):r,options:t}).data]})})},i.prototype.getCSVRow=function(e,t,n,r){var a=this;r===void 0&&(r=!1);var o=t.separator||",",l=[];n||(n=e);var h=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"csv"}).dataFieldsOrder;return At(n,function(p,u){var d=a.convertEmptyValue(p,e[p],t),c=r?d:a.convertToSpecialFormat(p,d,t);c=(c=""+c).replace(/"/g,'""'),(t.forceQuotes||c.search(new RegExp(`"|
- |`+o,"g"))>=0)&&(c='"'+c+'"'),l.push(c)},function(p,u){var d=h.indexOf(p),c=h.indexOf(u);return d>c?1:d<c?-1:0}),l.join(o)},i.prototype.getHTML=function(e,t,n){return n===void 0&&(n=!0),de(this,void 0,void 0,function(){var r,a,o,l,h,p,u,d=this;return pe(this,function(c){if(v(t)||(t=this.getFormatOptions("html")),r="<table>",t.tableClass&&(r='<table class="'+t.tableClass+'">'),a=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"html"}).dataFields,o=this.data,t.pivot)l=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"html"}).dataFieldsOrder,r+=`
- <tbody>`,At(a,function(f,g){var m=[];t.addColumnNames&&m.push(g);for(var x=o.length,b=0;b<x;b++){var C=o[b][f];m.push(d.convertToSpecialFormat(f,C,t,!0))}r+=`
- `+d.getHTMLRow(m,t,void 0,!0)},function(f,g){var m=l.indexOf(f),x=l.indexOf(g);return m>x?-1:m<x?1:0}),r+=`
- </tbody>`;else{for(t.addColumnNames&&(r+=`
- <thead>
- `+this.getHTMLRow(a,t,void 0,!0,!0)+`
- </thead>`),r+=`
- <tbody>`,h=o.length,p=0;p<h;p++)r+=`
- `+this.getHTMLRow(o[p],t,a);r+=`
- </tbody>`}return r+=`
- </table>`,u=this.adapter.apply("charset",{charset:"charset=utf-8",type:e,options:t}).charset,[2,this.adapter.apply("getHTML",{data:n?"data:"+this.getContentType(e)+";"+u+","+encodeURIComponent(r):r,options:t}).data]})})},i.prototype.getHTMLRow=function(e,t,n,r,a){var o=this;r===void 0&&(r=!1),a===void 0&&(a=!1);var l=" <tr>";t.rowClass&&(l=' <tr class="'+t.rowClass+'">'),n||(n=e);var h=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"html"}).dataFieldsOrder,p=a?"th":"td",u=!0;return At(n,function(d,c){var f=o.convertEmptyValue(d,e[d],t),g=r?f:o.convertToSpecialFormat(d,f,t);g=(g=""+g).replace(/[\u00A0-\u9999<>\&]/gim,function(x){return"&#"+x.charCodeAt(0)+";"});var m=p;t.pivot&&u&&(m="th"),t.cellClass?l+=`
- <`+m+' class="'+t.cellClass+'">'+g+"</"+m+">":l+=`
- <`+m+">"+g+"</"+m+">",u=!1},function(d,c){var f=h.indexOf(d),g=h.indexOf(c);return f>g?1:f<g?-1:0}),l+=`
- </tr>`},i.prototype.getJSON=function(e,t,n){return n===void 0&&(n=!0),de(this,void 0,void 0,function(){var r,a,o,l,h,p,u,d,c=this;return pe(this,function(f){if(v(t)||(t=this.getFormatOptions("json")),a=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"json"}).dataFields,this._dynamicDataFields)r=this.data;else for(r=[],o=this.data,l=function(g,m){var x=o[m];if(typeof x=="object"){var b={};X(x,function(C,S){v(a[C])&&(b[a[C]]=c.convertToSpecialFormat(C,S,t))}),r.push(b)}},h=o.length,p=0;p<h;p++)l(0,p);return u=JSON.stringify(r,function(g,m){return typeof m=="object"&&X(m,function(x,b){m[x]=c.convertToSpecialFormat(x,b,t)}),m},t.indent),d=this.adapter.apply("charset",{charset:"charset=utf-8",type:e,options:t}).charset,[2,this.adapter.apply("getJSON",{data:n?"data:"+this.getContentType(e)+";"+d+","+encodeURIComponent(u):u,options:t}).data]})})},i.prototype.convertToSpecialFormat=function(e,t,n,r){if(typeof t=="number")if(this.isDateField(e))t=new Date(t);else{if(this.isDurationField(e))return this.durationFormatter.format(t,this.durationFormat);if(this.isNumberField(e)&&this.numberFormat)return this.numberFormatter.format(t,this.numberFormat)}return t instanceof Date?n.useTimestamps?t=t.getTime():n.useLocale?r||(t=t.toLocaleString()):t=this.dateFormatter.format(t,this.dateFormat):J(t)&&this.isDateField(e)&&this.dateFormat&&(t=this.dateFormatter.format(this.dateFormatter.parse(t),this.dateFormat)),t},i.prototype.convertEmptyValue=function(e,t,n){return v(t)?t:n.emptyAs},i.prototype.download=function(e,t,n){return n===void 0&&(n=!1),de(this,void 0,void 0,function(){var r,a,o,l,h,p,u,d,c,f,g,m,x,b,C;return pe(this,function(S){if(this.msBlobDownloadSupport()){if(m=e.split(";"),x=m.shift().replace(/data:/,""),e=decodeURIComponent(m.join(";").replace(/^[^,]*,/,"")),["image/svg+xml","application/json","text/csv"].indexOf(x)!=-1)return r=new Blob([e],{type:x}),window.navigator.msSaveBlob(r,t),[2,!0];try{o=atob(e),e=o}catch{return[2,!1]}for(p=new Array(e.length),u=0;u<e.length;++u)d=e.charCodeAt(u),p[u]=d;c=new Blob([new Uint8Array(p)],{type:x}),window.navigator.msSaveBlob(c,t)}else if(this.blobDownloadSupport()){if((a=document.createElement("a")).download=t,document.body.appendChild(a),m=e.split(";"),x=m.shift().replace(/data:/,""),e=decodeURIComponent(m.join(";").replace(/^[^,]*,/,"")),["image/svg+xml","application/json","text/csv","text/html"].indexOf(x)!=-1)return n&&(e="\uFEFF"+e),l=new Blob([e],{type:x}),h=window.URL.createObjectURL(l),a.href=h,a.download=t,a.click(),setTimeout(function(){document.body.removeChild(a),window.URL.revokeObjectURL(h)},100),[2,!0];try{o=atob(e),e=o}catch{return[2,!1]}for(p=new Array(e.length),u=0;u<e.length;++u)d=e.charCodeAt(u),p[u]=d;n&&(p=[239,187,191].concat(p)),c=new Blob([new Uint8Array(p)],{type:x}),f=window.URL.createObjectURL(c),a.href=f,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),setTimeout(function(){window.URL.revokeObjectURL(f)},100)}else this.linkDownloadSupport()?((g=document.createElement("a")).download=t,g.href=e,document.body.appendChild(g),g.click(),document.body.removeChild(g)):this.legacyIE()?(m=e.match(/^data:(.*);[ ]*([^,]*),(.*)$/)).length===4&&(m[2]=="base64"?m[1].match(/^image\//)&&this.showModal('<img src="'+e+'" style="float: left; max-width: 50%; max-height: 80%; margin: 0 1em 0.5em 0; border: 1px solid #eee;" /><p>'+this.language.translate('To save the image, right-click thumbnail on the left and choose "Save picture as..."')+'</p><p style="text-align: center;"><small>'+this.language.translate("(Press ESC to close this message)")+"</small></p>",this.language.translate("Image Export Complete")):(x=void 0,t.match(/\.svg$/)?x="image/svg+xml":(x="text/plain",t+=".txt"),(b=document.createElement("iframe")).width="1px",b.height="1px",b.style.display="none",document.body.appendChild(b),(C=b.contentDocument).open(x,"replace"),C.write(decodeURIComponent(m[3])),C.close(),C.execCommand("SaveAs",!0,t),document.body.removeChild(b))):window.location.href=e;return[2,!0]})})},i.prototype.downloadSupport=function(){return this.linkDownloadSupport()||this.msBlobDownloadSupport()},i.prototype.linkDownloadSupport=function(){var e=_.getCache("linkDownloadSupport");if(e===!1||e===!0)return e;var t=document.createElement("a").download!==void 0;return _.setCache("linkDownloadSupport",t),t},i.prototype.blobDownloadSupport=function(){return v(window.Blob)},i.prototype.msBlobDownloadSupport=function(){return v(window.navigator.msSaveOrOpenBlob)},i.prototype.legacyIE=function(){var e=document.createElement("div");return e.innerHTML="<!--[if lt IE 10]><i></i><![endif]-->",e.getElementsByTagName("i").length==1},i.prototype.print=function(e,t,n){return de(this,void 0,void 0,function(){return pe(this,function(r){return t.printMethod=="css"?[2,this.printViaCSS(e,t,n)]:[2,this.printViaIframe(e,t,n)]})})},i.prototype.printViaCSS=function(e,t,n){return de(this,void 0,void 0,function(){var r,a,o,l;return pe(this,function(h){return r=document.documentElement.scrollTop||document.body.scrollTop,a=new ue(Va(this.container),"body > *",{display:"none",position:"fixed",visibility:"hidden",opacity:"0",clipPath:"polygon(0px 0px,0px 0px,0px 0px,0px 0px);"}),n&&document&&document.title&&(o=document.title,document.title=n),(l=new Image).src=e,l.style.maxWidth="100%",l.style.display="block",l.style.position="relative",l.style.visibility="visible",l.style.opacity="1",l.style.clipPath="none",document.body.appendChild(l),this.setTimeout(function(){window.print()},50),/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&t.delay<1e3?t.delay=1e3:t.delay<100&&(t.delay=100),this.setTimeout(function(){document.body.removeChild(l),a.dispose(),o&&(document.title=document.title),document.documentElement.scrollTop=document.body.scrollTop=r},t.delay||500),[2,!0]})})},i.prototype.printViaIframe=function(e,t,n){return de(this,void 0,void 0,function(){var r,a;return pe(this,function(o){return(r=document.createElement("iframe")).style.visibility="hidden",document.body.appendChild(r),r.contentWindow.document.open(),r.contentWindow.document.close(),(a=new Image).src=e,a.style.maxWidth="100%",a.style.height="auto",n&&(r.contentWindow.document.title=n),r.contentWindow.document.body.appendChild(a),r.load=function(){r.contentWindow.document.body.appendChild(a)},this.setTimeout(function(){try{r.contentWindow.document.execCommand("print",!1,null)||r.contentWindow.print()}catch{r.contentWindow.print()}},t.delay||50),/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&t.delay<1e3?t.delay=1e3:t.delay<100&&(t.delay=100),this.setTimeout(function(){document.body.removeChild(r)},t.delay+50||100),[2,!0]})})},i.prototype.findBackgroundColor=function(e){var t=1,n=Aa(e,"background-color");if((n.match(/[^,]*,[^,]*,[^,]*,[ ]?0/)||n=="transparent")&&(t=0),t==0){var r=e.parentElement;return r?this.findBackgroundColor(r):B("#fff")}return B(n,t)},Object.defineProperty(i.prototype,"container",{get:function(){return this.adapter.apply("container",{container:this._container}).container},set:function(e){this._container=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sprite",{get:function(){return this.adapter.apply("sprite",{sprite:this._sprite}).sprite},set:function(e){this._sprite=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"extraSprites",{get:function(){return this.adapter.apply("extraSprites",{extraSprites:this._extraSprites}).extraSprites},set:function(e){this._extraSprites=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"validateSprites",{get:function(){return this.adapter.apply("validateSprites",{validateSprites:this._validateSprites}).validateSprites},set:function(e){this._validateSprites=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"data",{get:function(){return this.adapter.apply("data",{data:this._data}).data},set:function(e){this._data=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dataFields",{get:function(){return this._dataFields||this.generateDataFields(),this.adapter.apply("dataFields",{dataFields:this._dataFields}).dataFields},set:function(e){this._dataFields=e,this._dynamicDataFields=!1},enumerable:!0,configurable:!0}),i.prototype.handleDataUpdated=function(){this._dynamicDataFields&&(this._dataFields=void 0);var e=this.data.length>0;this._prevHasData!=e&&(this._prevHasData=e,this.menu&&this.menu.invalidate())},Object.defineProperty(i.prototype,"dateFormatter",{get:function(){return this._dateFormatter||(this._dateFormatter=new Gi,this._dateFormatter.language=this.language),this.adapter.apply("dateFormatter",{dateFormatter:this._dateFormatter}).dateFormatter},set:function(e){this._dateFormatter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dateFormat",{get:function(){return this.adapter.apply("dateFormat",{dateFormat:this._dateFormat}).dateFormat},set:function(e){this._dateFormat=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dateFields",{get:function(){return this._dateFields||(this._dateFields=new re),this.adapter.apply("dateFields",{dateFields:this._dateFields}).dateFields},set:function(e){this._dateFields=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"numberFormatter",{get:function(){return this._numberFormatter||(this._numberFormatter=new Br,this._numberFormatter.language=this.language),this.adapter.apply("numberFormatter",{numberFormatter:this._numberFormatter}).numberFormatter},set:function(e){this._numberFormatter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"numberFormat",{get:function(){return this.adapter.apply("numberFormat",{numberFormat:this._numberFormat}).numberFormat},set:function(e){this._numberFormat=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"numberFields",{get:function(){return this._numberFields||(this._numberFields=new re),this.adapter.apply("numberFields",{numberFields:this._numberFields}).numberFields},set:function(e){this._numberFields=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"durationFormatter",{get:function(){return this._durationFormatter||(this._durationFormatter=new Hr,this._durationFormatter.language=this.language),this.adapter.apply("durationFormatter",{durationFormatter:this._durationFormatter}).durationFormatter},set:function(e){this._durationFormatter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"durationFormat",{get:function(){return this.adapter.apply("durationFormat",{durationFormat:this._durationFormat}).durationFormat},set:function(e){this._durationFormat=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"durationFields",{get:function(){return this._durationFields||(this._durationFields=new re),this.adapter.apply("durationFields",{durationFields:this._durationFields}).durationFields},set:function(e){this._durationFields=e},enumerable:!0,configurable:!0}),i.prototype.generateDataFields=function(){var e=this;this._dataFields={},this.data.length&&j(this.data,function(t){X(t,function(n,r){v(e._dataFields[n])||(e._dataFields[n]=e.adapter.apply("dataFieldName",{name:n,field:n}).name)})})},i.prototype.isDateField=function(e){return this.adapter.apply("isDateField",{isDateField:this.dateFields.contains(e),field:e}).isDateField},i.prototype.isNumberField=function(e){return this.adapter.apply("isNumberField",{isNumberField:this.numberFields.contains(e),field:e}).isNumberField},i.prototype.isDurationField=function(e){return this.adapter.apply("isDurationField",{isDurationField:this.durationFields.contains(e),field:e}).isDurationField},i.prototype.getContentType=function(e){var t="";switch(e){case"png":case"gif":t="image/"+e;break;case"jpg":t="image/jpeg";break;case"svg":t="image/svg+xml";break;case"csv":t="text/csv";break;case"json":t="application/json";break;case"html":t="text/html";break;case"pdf":case"pdfdata":t="application/pdf";break;case"xlsx":t="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}return this.adapter.apply("contentType",{contentType:t,type:e}).contentType},Object.defineProperty(i.prototype,"filePrefix",{get:function(){return this.adapter.apply("filePrefix",{filePrefix:this._filePrefix}).filePrefix},set:function(e){this._filePrefix=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"backgroundColor",{get:function(){return this.adapter.apply("backgroundColor",{backgroundColor:this._backgroundColor}).backgroundColor},set:function(e){this._backgroundColor=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"title",{get:function(){return this.adapter.apply("title",{title:this._title}).title},set:function(e){this._title=e},enumerable:!0,configurable:!0}),i.prototype.showPreloader=function(){var e=this.preloader;e&&(e.progress=.5,e.label.text="...")},i.prototype.hidePreloader=function(){var e=this.preloader;e&&(e.progress=1)},Object.defineProperty(i.prototype,"preloader",{get:function(){return this._sprite&&this._sprite.parent&&this._sprite.parent.preloader?this._sprite.parent.preloader:void 0},enumerable:!0,configurable:!0}),i.prototype.showTimeout=function(){this.showModal(this.adapter.apply("timeoutMessage",{message:this.language.translate("Export operation took longer than expected. Something might have gone wrong.")}).message)},i.prototype.hideTimeout=function(){this._timeoutTimeout&&(this.removeDispose(this._timeoutTimeout),this._timeoutTimeout=null),this.hideModal()},Object.defineProperty(i.prototype,"language",{get:function(){return this._language||(this._language=new Wt),this._language},set:function(e){this._language=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"modal",{get:function(){return this._modal||(this._modal=new Ea,this._modal.adapter.add("classPrefix",function(e){return Z.classNamePrefix+e})),this._modal},enumerable:!0,configurable:!0}),i.prototype.showModal=function(e,t){this.hideModal(),this.hidePreloader();var n=this.modal;n.container=this.sprite.svgContainer.SVGContainer,n.content=e,n.readerTitle=t,n.open()},i.prototype.hideModal=function(){this._modal&&this.modal.close()},i.prototype._canvg=function(){return de(this,void 0,void 0,function(){var e;return pe(this,function(t){switch(t.label){case 0:return[4,N.e(265).then(N.bind(N,1234))];case 1:return(e=t.sent()).default!=null?[2,e.default]:[2,e]}})})},Object.defineProperty(i.prototype,"canvg",{get:function(){return this._canvg()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pdfmake",{get:function(){return Ua==null&&(Ua=function(){return de(this,void 0,void 0,function(){var e,t,n,r;return pe(this,function(a){switch(a.label){case 0:return[4,Promise.all([N.e(643).then(N.t.bind(N,6727,23)),N.e(643).then(N.bind(N,4995))])];case 1:return e=a.sent(),t=e[0],n=e[1],(r=window).pdfMake=r.pdfMake||{},r.pdfMake.vfs=n.default,t.vfs=n.default,[2,t]}})})}()),Ua},enumerable:!0,configurable:!0}),i.prototype._xlsx=function(){return de(this,void 0,void 0,function(){return pe(this,function(e){switch(e.label){case 0:return[4,Promise.all([N.e(739),N.e(297)]).then(N.t.bind(N,7739,23))];case 1:return[2,e.sent()]}})})},Object.defineProperty(i.prototype,"xlsx",{get:function(){return this._xlsx()},enumerable:!0,configurable:!0}),i.prototype.setFormatOptions=function(e,t){this._formatOptions.setKey(e,t)},i.prototype.getFormatOptions=function(e){return this._formatOptions.getKey(e)},Object.defineProperty(i.prototype,"formatOptions",{get:function(){return this._formatOptions},enumerable:!0,configurable:!0}),i.prototype._disablePointers=function(){v(this._spriteInteractionsEnabled)||(this._spriteInteractionsEnabled=this.sprite.interactionsEnabled),this.sprite.interactionsEnabled=!1},i.prototype._releasePointers=function(){v(this._spriteInteractionsEnabled)&&!this._exportRunning&&(this.sprite.interactionsEnabled=this._spriteInteractionsEnabled)},i.prototype.hideNonExportableSprites=function(){var e=this;if(!this._objectsAlreadyHidden){var t=this.sprite.svgContainer;t&&j(t.nonExportableSprites,function(n){n.isHidden||n.isHiding||!n.visible||e._hiddenObjects.push(n),n.hide(0)}),this._objectsAlreadyHidden=!0}},i.prototype.restoreNonExportableSprites=function(){this._objectsAlreadyHidden&&(j(this._hiddenObjects,function(e){e.show(0)}),this._hiddenObjects=[],this._objectsAlreadyHidden=!1)},i.prototype.awaitValidSprites=function(){return de(this,void 0,void 0,function(){var e;return pe(this,function(t){switch(t.label){case 0:return e=[],this.validateSprites.length&&j(this.validateSprites,function(n,r){n.invalid&&e.push(new Promise(function(a,o){n.events.once("validated",function(l){a()})}))}),e.length?[4,Promise.all(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},i.prototype.processConfig=function(e){_.registeredClasses.ExportMenu=qh,e&&(v(e.menu)&&!v(e.menu.type)&&(e.menu.type="ExportMenu"),v(e.dataFields)&&ye(e.dataFields)&&(this.dataFields=e.dataFields,delete e.dataFields)),s.prototype.processConfig.call(this,e)},i.XLINK="http://www.w3.org/1999/xlink",i}(Ga),Ie=["fill","fillOpacity","stroke","strokeOpacity","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin"],$=function(s){function i(){var e=s.call(this)||this;return e.properties={},e._eventDispatcher=new Ih(e),e._bindings={},e._isTemplate=!1,e._isPath=!1,e._inited=!1,e._ready=!1,e.isHiding=!1,e._isHidden=!1,e.isShowing=!1,e.isStandaloneInstance=!1,e._isActive=!1,e._mask=new Me,e._positionPrecision=3,e._language=new Me,e._exporting=new Me,e._exportable=!0,e._bbox={x:0,y:0,width:0,height:0},e.invalid=!1,e.positionInvalid=!1,e.propertyFields={},e.applyOnClones=!1,e._measuredWidthSelf=0,e._measuredHeightSelf=0,e.maxLeft=0,e.maxRight=0,e.maxTop=0,e.maxBottom=0,e.maxLeftSelf=0,e.maxRightSelf=0,e.maxTopSelf=0,e.maxBottomSelf=0,e._isDragged=!1,e._isResized=!1,e._disabled=!1,e._internalDisabled=!1,e._updateDisabled=!1,e._internalDefaultsApplied=!1,e.rollOutDelay=0,e.isBaseSprite=!1,e.shouldClone=!0,e.appeared=!1,e.ex=0,e.ey=0,e.dragWhileResize=!1,e.measureFailed=!1,e.preventShow=!1,e.cloneTooltip=!0,e.className="Sprite",e._disposers.push(e._eventDispatcher),e.uid,e.group=e.paper.addGroup("g"),e.setPropertyValue("scale",1),e.setPropertyValue("rotation",0),e.setPropertyValue("align","none"),e.setPropertyValue("valign","none"),e.setPropertyValue("pixelPerfect",!1),e.setPropertyValue("visible",!0),e.setPropertyValue("tooltipPosition","fixed"),e.setPropertyValue("verticalCenter","none"),e.setPropertyValue("horizontalCenter","none"),e.setPropertyValue("tooltipX",F(50)),e.setPropertyValue("tooltipX",F(50)),e.setPropertyValue("marginTop",0),e.setPropertyValue("marginBottom",0),e.setPropertyValue("marginLeft",0),e.setPropertyValue("marginRight",0),e.setPropertyValue("dx",0),e.setPropertyValue("dy",0),e.setPropertyValue("paddingTop",0),e.setPropertyValue("paddingBottom",0),e.setPropertyValue("paddingRight",0),e.setPropertyValue("paddingLeft",0),e.setPropertyValue("togglable",!1),e.setPropertyValue("hidden",!1),e.setPropertyValue("urlTarget","_self"),e.setPropertyValue("alwaysShowTooltip",!1),e.setPropertyValue("showTooltipOn","hover"),e._prevMeasuredWidth=0,e._prevMeasuredHeight=0,e._measuredWidth=0,e._measuredHeight=0,e._isMeasured=!0,e.invalidate(),e.applyTheme(),e._disposers.push(e.events),e._disposers.push(e.group),e._disposers.push(e._mask),e._disposers.push(e._language),e._disposers.push(e._exporting),e._disposers.push(new le(function(){X(e._bindings,function(t,n){n.dispose()})})),e.setPropertyValue("interactionsEnabled",!0),e}return w(i,s),Object.defineProperty(i.prototype,"events",{get:function(){return this._eventDispatcher},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"adapter",{get:function(){return this._adapterO||(this._adapterO=new it(this)),this._adapterO},enumerable:!0,configurable:!0}),i.prototype.applyTheme=function(){s.prototype.applyTheme.call(this),Z.autoSetClassName&&this.setClassName()},i.prototype.getCurrentThemes=function(){var e=this._themes;if(e)return e;var t=this._parent;return t?t.getCurrentThemes():_.themes},i.prototype.applyInternalDefaults=function(){this._internalDefaultsApplied=!0},i.prototype.invalidate=function(){this.disabled||this._isTemplate||this.__disabled||this.invalid||(this.invalid=!0,_.addToInvalidSprites(this),Q.requestFrame())},i.prototype.validate=function(){this.dispatchImmediately("beforevalidated"),this._internalDefaultsApplied||this.applyInternalDefaults(),this.beforeDraw(),this.draw(),this.invalid=!1,_.removeFromInvalidSprites(this),this.afterDraw()},i.prototype.invalidatePosition=function(){this.disabled||this._isTemplate||this.positionInvalid||(this.positionInvalid=!0,_.addToInvalidPositions(this),Q.requestFrame())},i.prototype.validatePosition=function(){var e=this.pixelX,t=this.pixelY,n=this.dx,r=this.dy,a=e+n,o=t+r;this._updateDisabled&&(this._internalDisabled?this.group.attr({display:"none"}):this.disabled||this.removeSVGAttribute("display"),this._updateDisabled=!1);var l=this.measure(),h=this.group.transformString;this.group.moveTo({x:a,y:o}),this.group.rotation=this.rotation,this.nonScaling?this.group.scale=this.scale/this.globalScale:this.group.scale=this.scale,(h!=this.group.transformString||l)&&(h==null?this.dispatch("transformed"):this.dispatchImmediately("transformed"),this.dispatch("positionchanged"),this.showTooltipOn!="hit"&&this.showTooltipOn!="always"||this.updateTooltipPosition()),e+n==a&&t+r==o&&(_.removeFromInvalidPositions(this),this.positionInvalid=!1);var p=this._maskRectangle;p&&this._clipElement.moveTo({x:p.x-e,y:p.y-t})},i.prototype.beforeDraw=function(){},i.prototype.draw=function(){},i.prototype.afterDraw=function(){var e,t;if((this.isMeasured||this.horizontalCenter!=="none"||this.verticalCenter!=="none")&&this.measureElement(),this._inited)this.dispatch("validated");else{if(this._adapterO)try{for(var n=nr(this._adapterO.keys()),r=n.next();!r.done;r=n.next()){var a=r.value;switch(a){case"mask":case"fill":case"opacity":case"fillOpacity":case"stroke":case"strokeOpacity":case"strokeWidth":case"shapeRendering":case"strokeDasharray":case"strokeDashoffset":case"strokeLinecap":case"strokeLinejoin":case"textDecoration":case"fontSize":case"fontFamily":case"fontWeight":this[a]=this[a]}}}catch(o){e={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.applyFilters(),this.visible=this.visible,this.interactionsEnabled=this.getPropertyValue("interactionsEnabled"),this._inited=!0,this.showOnInit||(this.appeared=!0),this.hidden&&this.hide(0),this.applyMask(),this.dispatch("validated"),this.dispatch("inited"),this.dispatchReady()}this.showTooltipOn=="always"&&(!this.visible||this.disabled||this.__disabled?this.hideTooltip(0):this.showTooltip())},i.prototype.dispatchReady=function(){this.isReady()||(this._ready=!0,this.dispatch("ready"))},i.prototype.reinit=function(){this._inited=!1,this.setState(this.defaultState),this.invalidate()},i.prototype.handleGlobalScale=function(){this.dispatch("globalscalechanged"),this.nonScalingStroke&&(this.strokeWidth=this.strokeWidth),this.nonScaling&&this.validatePosition(),this.updateFilterScale()},i.prototype.updateFilterScale=function(){var e=this;A(this.filters.iterator(),function(t){t.scale=e.globalScale})},i.prototype.removeFromInvalids=function(){_.removeFromInvalidSprites(this),_.removeFromInvalidPositions(this)},i.prototype.copyFrom=function(e){var t=this;s.prototype.copyFrom.call(this,e),this.isMeasured=e.isMeasured,this.states.copyFrom(e.states),e.filters.length>0&&e.filters.each(function(n){t.filters.push(n.clone())}),e._adapterO&&this.adapter.copyFrom(e._adapterO),e._interaction&&this.interactions.copyFrom(e.interactions),e._plugins&&this.plugins.copyFrom(e.plugins),this.configField=e.configField,this.applyOnClones=e.applyOnClones,this.disabled=e.disabled,this.virtualParent=e.virtualParent,this.exportable=e.exportable,e._tooltip&&(this._tooltip?this._tooltip.copyFrom(e.tooltip):e.cloneTooltip?this.tooltip=e.tooltip.clone():this._tooltip=e.tooltip),this._showSystemTooltip=e.showSystemTooltip,Vt(e.propertyFields,this.propertyFields),Vt(e.properties,this),e.fillModifier&&(this.fillModifier=e.fillModifier.clone()),e.strokeModifier&&(this.strokeModifier=e.strokeModifier.clone()),e.focusFilter&&(this.focusFilter=e.focusFilter.clone())},i.prototype.dispose=function(){if(!this.isDisposed()){if(this.showTooltipOn=="always"&&this.tooltip&&this.tooltip.hide(),this.dispatchImmediately("beforedisposed"),this.isBaseSprite){if(this.htmlContainer)for(;this.htmlContainer.childNodes.length>0;)this.htmlContainer.removeChild(this.htmlContainer.firstChild);this.isBaseSprite=!1}if(s.prototype.dispose.call(this),this._adapterO&&this._adapterO.clear(),this.applyOnClones&&this._clones)for(var e=this._clones.length-1;e>=0;e--)this._clones.getIndex(e).dispose();this._svgContainer&&this._svgContainer.dispose(),this._interactionDisposer&&(this._interactionDisposer.dispose(),this._interactionDisposer=void 0),this._urlDisposer&&this._urlDisposer.dispose(),this.removeFromInvalids(),this.element&&this.element.dispose(),this.group&&this.group.dispose(),this._numberFormatter&&this._numberFormatter.dispose(),this._focusFilter&&this._focusFilter.dispose();var t=this.stroke;!t||t instanceof se||!t.dispose||this.clonedFrom&&this.clonedFrom.stroke==t||t.dispose();var n=this.fill;if(!n||n instanceof se||!n.dispose||this.clonedFrom&&this.clonedFrom.fill==n||n.dispose(),v(this.id)&&this.map.removeKey(this.id),this.parent=void 0,this._filters)for(;this._filters.length>0;){var r=this._filters.getIndex(0);r.dispose(),this._filters.removeValue(r)}this._alwaysShowDisposers=void 0}},Object.defineProperty(i.prototype,"isTemplate",{get:function(){return this._isTemplate},set:function(e){e=ve(e),this._isTemplate!=e&&(this._isTemplate=e,this instanceof W&&A(this.children.iterator(),function(t){t.isTemplate=e}),e?(this.parent=this._parent,this.removeFromInvalids()):this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"showSystemTooltip",{get:function(){return v(this._showSystemTooltip)?this._showSystemTooltip:this.virtualParent?this.virtualParent.showSystemTooltip:!!this._parent&&this._parent.showSystemTooltip},set:function(e){e=ve(e),this._showSystemTooltip!=e&&(this._showSystemTooltip=e,this.applyAccessibility())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"topParent",{get:function(){return this._topParent?this._topParent:this._parent?this._parent.topParent:void 0},set:function(e){this._topParent=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"parent",{get:function(){return this._parent},set:function(e){if(!this._isTemplate){this.paper;var t=this._parent;t!=e&&(t&&t.children.removeValue(this),this._parent=e,e?(this.topParent=e.topParent,e.isTemplate&&(this.isTemplate=!0),this.baseId=e.baseId,e.children.push(this),this._tooltip&&!this._tooltipContainer&&(this._tooltip.parent=e.tooltipContainer),this._dataItem||(this.dataItem=e.dataItem),this.handleAlwaysShowTooltip(),this.dataItem&&this.applyAccessibility(),this.dispatchImmediately("parentset")):this.topParent=void 0)}},enumerable:!0,configurable:!0}),i.prototype.handleAlwaysShow=function(){this.showTooltip()},i.prototype.handleAlwaysShowTooltip=function(){var e=this,t=this._alwaysShowDisposers;if(t&&j(t,function(r){r.dispose()}),this._alwaysShowDisposers=[],this.showTooltipOn=="always")for(;e!=null;){var n=e.events.on("visibilitychanged",this.handleAlwaysShow,this,!1);this.addDisposer(n),this._alwaysShowDisposers.push(n),e=e.parent}},Object.defineProperty(i.prototype,"virtualParent",{get:function(){return this._virtualParent},set:function(e){this._virtualParent=e,this.dataItem&&this.applyAccessibility()},enumerable:!0,configurable:!0}),i.prototype.appendDefs=function(){this.filterElement&&this.paper.appendDef(this.filterElement);var e=this.fill;e&&e.element&&this.paper.appendDef(e.element);var t=this.stroke;if(t&&t.element&&this.paper.appendDef(t.element),this.fillModifier&&this.fill instanceof se){var n=this.fillModifier.modify(this.fill);n&&n.element&&this.paper.appendDef(n.element)}if(this.strokeModifier&&this.stroke instanceof se){var r=this.strokeModifier.modify(this.stroke);r&&r.element&&this.paper.appendDef(r.element)}this._clipPath&&this.paper.appendDef(this._clipPath),this._exportable===!1&&(this.exportable=!1)},Object.defineProperty(i.prototype,"map",{get:function(){var e=this.topParent;return e?e.map:(this._map||(this._map=new me),this._map)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"delayedMap",{get:function(){var e=this.topParent;return e?e.delayedMap:(this._delayedMap||(this._delayedMap=new me),this._delayedMap)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"id",{get:function(){return this._id},set:function(e){if(this._id!=e){if(this._id=e,this.map.hasKey(e))throw Error("Duplicate id ("+e+") used on multiple objects.");this.map.setKey(e,this),Z.autoSetClassName&&this.setClassName()}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dom",{get:function(){return this.group.node},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"paper",{get:function(){if(this._paper)return this._paper;var e=this._parent;return e?e.paper:Ui()},set:function(e){this.setPaper(e)},enumerable:!0,configurable:!0}),i.prototype.setPaper=function(e){return this._paper!=e&&(this._paper=e,this.appendDefs(),!0)},Object.defineProperty(i.prototype,"htmlContainer",{get:function(){if(this._htmlContainer)return this._htmlContainer;var e=this._parent;return e?e.htmlContainer:void 0},set:function(e){this._htmlContainer=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"titleElement",{get:function(){return this._titleElement||(this._titleElement=this.paper.add("title"),this.group.add(this._titleElement)),this._titleElement},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"descriptionElement",{get:function(){return this._descriptionElement||(this._descriptionElement=this.paper.add("desc"),this.group.add(this._descriptionElement)),this._descriptionElement},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"filters",{get:function(){return this._filters||(this._filters=new re,this._disposers.push(this._filters.events.onAll(this.applyFilters,this)),this._disposers.push(new fe(this._filters))),this._filters},enumerable:!0,configurable:!0}),i.prototype.setSVGAttributes=function(){this.fill=this.fill,this.opacity=this.opacity,this.fillOpacity=this.fillOpacity,this.stroke=this.stroke,this.strokeOpacity=this.strokeOpacity,this.shapeRendering=this.shapeRendering,this.strokeDasharray=this.strokeDasharray,this.strokeDashoffset=this.strokeDashoffset,this.strokeLinecap=this.strokeLinecap,this.strokeLinejoin=this.strokeLinejoin,this.focusable=this.focusable,this.tabindex=this.tabindex,this.role=this.role},i.prototype.setSVGAttribute=function(e){this.group.attr(e)},i.prototype.removeSVGAttribute=function(e){this.group.removeAttr(e)},i.prototype.setClassName=function(){var e=this.className,t=Z.classNamePrefix;this.element&&this.element.addClass(t+e),this.group.addClass(t+e+"-group"),v(this.id)&&this.group.addClass(t+this.id),this.userClassName&&this.group.addClass(this.userClassName)},i.prototype.uidAttr=function(){return this.setSVGAttribute({id:this.uid}),this.uid},i.prototype.updateClipPath=function(){var e=this._clipElement;e&&e.moveTo({x:this.mask.pixelX,y:this.mask.pixelY})},i.prototype.createClipPath=function(){if(!this._clipPath){this._clipPath=this.paper.addGroup("clipPath"),this.paper.appendDef(this._clipPath),this._disposers.push(this._clipPath);var e=_.getUniqueId();this._clipPath.attr({id:e}),this.group.attr({"clip-path":'url("'+Ni()+e+'")'})}},i.prototype.applyMask=function(){var e=this.mask;if(this._clipPath&&e)if(e instanceof W){this._clipElement.attr({width:q(0,e.pixelWidth),height:q(0,e.pixelHeight)});var t=Qe({x:e.pixelX,y:e.pixelY},e.parent,this);this._clipPath.x=t.x,this._clipPath.y=t.y}else e.element&&e.element!=this._clipElement&&(this._clipElement=e.element,this._clipPath.add(this._clipElement)),this._clipPath.scale=e.scale,this._clipPath.x=e.pixelX,this._clipPath.y=e.pixelY,this._clipPath.rotation=e.rotation},i.prototype.applyFilters=function(){var e=this;if(this._filters&&this._filters.length>0){var t=100,n=100;this.filterElement?this.filterElement.removeChildNodes():(this.filterElement=this.paper.addGroup("filter"),this._disposers.push(this.filterElement)),this.paper.appendDef(this.filterElement);var r="filter-"+this.uid;this.filterElement.attr({id:r}),A(this.filters.iterator(),function(l){l.sprite=e,l.paper=e.paper,e.filterElement.attr({filterUnits:l.filterUnits}),l.appendPrimitives(e.filterElement),l.width>t&&(t=l.width),l.height>n&&(n=l.height),l.scale=e.globalScale});var a=t+"%",o=n+"%";this.filterElement.attr({width:a,height:o,x:-(t-100)/2+"%",y:-(n-100)/2+"%"}),this.group.attr({filter:'url("'+Ni()+r+'")'})}else this.filterElement&&(this.group.removeAttr("filter"),this.filterElement.removeChildNodes())},i.prototype.removeClipPath=function(){this._clipPath&&(this.removeDispose(this._clipPath),this._clipPath=void 0)},i.prototype.setElement=function(e){this.element=e,this.setSVGAttributes(),this.applyAccessibility()},Object.defineProperty(i.prototype,"element",{get:function(){return this._element},set:function(e){this.removeElement(),this._element=e,this.group.add(e),e.node instanceof SVGPathElement&&(this._isPath=!0),this.invalid||this.validate(),Z.autoSetClassName&&this.setClassName()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"svgContainer",{get:function(){return this._svgContainer?this._svgContainer:this._parent?this._parent.svgContainer:void 0},set:function(e){this._svgContainer=e},enumerable:!0,configurable:!0}),i.prototype.measureElement=function(){if(this.element)if(this.definedBBox)this._bbox=this.definedBBox;else{var e=this.element.getBBox();this._bbox={x:e.x,y:e.y,width:e.width,height:e.height}}},i.prototype.updateCenter=function(){if(this.element){var e=this.element.transformString,t=this.bbox,n=0,r=0,a=t.x,o=t.y,l=t.width,h=t.height,p=this.pixelPaddingLeft,u=this.pixelPaddingRight,d=this.pixelPaddingTop,c=this.pixelPaddingBottom,f=q(l+p+u,this.pixelWidth),g=q(h+d+c,this.pixelHeight),m=t.x,x=t.x+f,b=t.y,C=t.y+g,S=this.horizontalCenter,P=this.verticalCenter;switch(S){case"none":n=a+p;break;case"left":n=p;break;case"middle":n=p-(l+u+p)/2;break;case"right":n=-u-l}switch(P){case"none":r=o+d;break;case"top":r=d;break;case"middle":r=d-(h+c+d)/2;break;case"bottom":r=-c-h}this._measuredHeight=g,this._measuredWidth=f;var O=V(n-a,this._positionPrecision,!0),I=V(r-o,this._positionPrecision,!0);this.ex=O-p,this.ey=I-d,this.maxLeft=m+O-p,this.maxRight=x+O-p,this.maxTop=b+I-d,this.maxBottom=C+I-d,this.pixelPerfect&&Z.pixelPerfectPrecision==0&&(O-=.5,I-=.5),this.element.moveTo({x:O,y:I}),e!=this.element.transformString&&this.dispatchImmediately("transformed")}},i.prototype.measure=function(){this.updateCenter();var e=this._measuredWidth,t=this._measuredHeight,n=this.maxLeft,r=this.maxRight,a=this.maxTop,o=this.maxBottom;this._measuredWidthSelf=e,this._measuredHeightSelf=t;var l=this._positionPrecision;if(this.maxLeftSelf=this.maxLeft,this.maxRightSelf=this.maxRight,this.maxTopSelf=this.maxTop,this.maxBottomSelf=this.maxBottom,this.rotation!==0||this.scale!==1||this.nonScaling){this.nonScalingStroke&&(this.strokeWidth=this.strokeWidth);var h=this.paper.svg,p=h.createSVGMatrix(),u=this.rotation,d=this.scale;this.nonScaling&&(d=this.scale/this.globalScale),p.a=L(u)*d,p.c=-M(u)*d,p.e=0,p.b=M(u)*d,p.d=L(u)*d,p.f=0;var c=h.createSVGPoint();c.x=n,c.y=a;var f=h.createSVGPoint();f.x=r,f.y=a;var g=h.createSVGPoint();g.x=r,g.y=o;var m=h.createSVGPoint();m.x=n,m.y=o;var x=c.matrixTransform(p),b=f.matrixTransform(p),C=g.matrixTransform(p),S=m.matrixTransform(p);n=Math.min(x.x,b.x,C.x,S.x),r=Math.max(x.x,b.x,C.x,S.x),a=Math.min(x.y,b.y,C.y,S.y),e=r-n,t=(o=Math.max(x.y,b.y,C.y,S.y))-a,this.maxLeft=V(n,l,!0),this.maxRight=V(r,l,!0),this.maxTop=V(a,l,!0),this.maxBottom=V(o,l,!0)}return this._measuredWidth=V(e,l,!0),this._measuredHeight=V(t,l,!0),(this._measuredWidth!=this._prevMeasuredWidth||this._measuredHeight!=this._prevMeasuredHeight)&&(this._prevMeasuredHeight=this._measuredHeight,this._prevMeasuredWidth=this._measuredWidth,this.dispatch("sizechanged"),(this.isHover||this.showTooltipOn=="hit"||this.showTooltipOn=="always")&&this.tooltip&&this.tooltip.visible&&(v(this.tooltipText)||v(this.tooltipHTML))&&this.updateTooltipPosition(),!0)},i.prototype.insertBefore=function(e){var t=this._parent;if(t){var n=t.children.indexOf(e);n!==-1&&(t.children.moveValue(this,n),t.sortChildren())}return this},i.prototype.insertAfter=function(e){var t=this._parent;if(t){var n=t.children.indexOf(e);n!==-1&&(t.children.moveValue(this,n+1),t.sortChildren())}return this},i.prototype.removeElement=function(){this._element&&(this.removeDispose(this._element),this._element=void 0)},i.prototype.getRelativeX=function(e){return e instanceof te?e.value:this._parent?e/this._parent.innerWidth:0},i.prototype.getRelativeY=function(e){return e instanceof te?e.value:this._parent?e/this._parent.innerHeight:0},i.prototype.getPixelX=function(e){var t=0;if(y(e))t=e;else if(e instanceof te){var n=e.value;this._parent&&(t=V(this._parent.innerWidth*n,this._positionPrecision,!0))}return t},i.prototype.getPixelY=function(e){var t=0;if(y(e))t=e;else if(e instanceof te){var n=e.value;this._parent&&(t=V(this._parent.innerHeight*n,this._positionPrecision,!0))}return t},i.prototype.moveTo=function(e,t,n,r){this.isDragged&&!r||(e&&(y(e.x)&&this.setPropertyValue("x",V(e.x,this._positionPrecision,!0)),y(e.y)&&this.setPropertyValue("y",V(e.y,this._positionPrecision,!0))),y(t)&&(this.rotation=t),y(n)&&(this.scale=n),this.invalidatePosition())},Object.defineProperty(i.prototype,"mask",{get:function(){return this._adapterO?this._adapterO.apply("mask",this._mask.get()):this._mask.get()},set:function(e){var t=this;this._mask.get()!==e&&(e?(this.createClipPath(),e instanceof W?this._clipElement=this.paper.add("rect"):(e.isMeasured=!1,e.element&&(this._clipElement=e.element)),this._clipElement&&this._clipPath.add(this._clipElement),this._mask.set(e,new _e([e.events.on("maxsizechanged",function(){t.inited&&t.applyMask()},void 0,!1),e.events.on("validated",this.applyMask,this,!1),e.events.on("positionchanged",this.applyMask,this,!1)])),this.applyMask()):(this._mask.reset(),this.group.removeAttr("clip-path"),this.removeClipPath()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maskRectangle",{get:function(){return this._maskRectangle},set:function(e){e?(this.createClipPath(),this._clipElement||(this._clipElement=this.paper.add("rect"),this._clipPath.add(this._clipElement)),this._clipElement.attr({width:e.width,height:e.height})):(this.removeClipPath(),this._clipElement=void 0),this._maskRectangle=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isMeasured",{get:function(){return this._isMeasured},set:function(e){(e=ve(e))||(this._measuredWidth=0,this._measuredHeight=0),this._isMeasured!=e&&(this._isMeasured=e,this.invalidatePosition())},enumerable:!0,configurable:!0}),i.prototype.hitTest=function(e){this.invalid&&this.validate(),e.invalid&&e.validate();var t=this.pixelX+this.maxLeft,n=this.pixelY+this.maxTop,r=t+this.maxRight,a=n+this.maxBottom,o=e.pixelX+e.maxLeft,l=e.pixelY+e.maxTop,h=o+e.maxRight,p=l+e.maxBottom;return!(o>r||h<t||l>a||p<n)},Object.defineProperty(i.prototype,"inited",{get:function(){return this._inited},enumerable:!0,configurable:!0}),i.prototype.isReady=function(){return this._ready},Object.defineProperty(i.prototype,"states",{get:function(){if(!this._states){var e=new Tn;this._states=new Bi(e),this._disposers.push(this._states.events.on("insertKey",this.processState,this,!1)),this._disposers.push(this._states.events.on("setKey",this.processState,this,!1)),this._disposers.push(new Jt(this._states)),this._disposers.push(e)}return this._states},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hiddenState",{get:function(){if(!this.states.getKey("hidden")){var e=this.states.create("hidden");e.properties.opacity=0,e.properties.visible=!1}return this.states.getKey("hidden")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"defaultState",{get:function(){return this.states.getKey("default")||(this.states.create("default").properties.opacity=1),this.states.getKey("default")},enumerable:!0,configurable:!0}),i.prototype.processState=function(e){var t=e.newValue;if(t.sprite=this,t.name=e.key,(this.states.hasKey("hover")||this.showTooltipOn=="hover"&&(v(this.tooltipHTML)||v(this.tooltipText)))&&(this.hoverable=!0),(this.states.hasKey("down")||this.showTooltipOn=="hover"&&(v(this.tooltipHTML)||v(this.tooltipText)))&&(this.clickable=!0),this.states.hasKey("focus")&&(this.focusable=!0),this.applyOnClones)for(var n=this.clones.values,r=n.length,a=0;a<r;++a){var o=n[a];o.isDisposed()||o.states.setKey(t.name,t)}},Object.defineProperty(i.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new Yi(this._animations))),this._animations},enumerable:!0,configurable:!0}),i.prototype.getSvgPoint=function(e){try{var t=this.htmlContainer.getBoundingClientRect();return{x:e.x-t.left,y:e.y-t.top}}catch{return e}},i.prototype.animate=function(e,t,n){return new gt(this,e,t,n).start()},i.prototype.setState=function(e,t,n){var r;if(e instanceof Tn)this.states.setKey(e.name,e),r=e;else if(!(r=this.states.getKey(e)))return;if(r.name=="hover"){if(this.isHidden)return;this.isHover=!0}return r.name=="hidden"?this.isHiding=!0:this.visible||this.setVisibility(r.properties.visible||this.defaultState.properties.visible),r.name=="active"&&(this.isActive=!0),y(t)||(t=r.transitionDuration),v(n)||(n=r.transitionEasing),this.transitTo(r,t,n)},i.prototype.applyCurrentState=function(e){var t=this.setState(this.defaultState,e);return this.isHover&&(t=this.setState("hover",e)),this.isDown&&this.interactions.downPointers.length&&(t=this.setState("down",e)),this.isFocused=this.isFocused,this.isActive&&(t=this.setState("active",e),this.isHover&&this.states.hasKey("hoverActive")&&(t=this.setState("hoverActive",e))),t},i.prototype.transitTo=function(e,t,n){var r,a=this,o=[];if(X(e.allValues,function(h,p){var u=a[h];if(p!=u&&a.defaultState.properties[h]==null&&(a.defaultState.properties[h]=u),p!="__unset"){var d={from:u,to:p,property:h};o.push(d)}}),o.length>0&&((r=this.animate(o,t,n))&&!r.isFinished()?this._disposers.push(r.events.on("animationended",function(){a.dispatchImmediately("transitionended")})):this.dispatchImmediately("transitionended")),e.filters.length>0){var l=[];A(e.filters.iterator(),function(h){var p=h.clone();l.push(p);var u=[];A(a.filters.iterator(),function(d){d.className==p.className&&(cr(a.defaultState.filters.iterator(),function(c){return c.className===p.className})||a.defaultState.filters.push(d),X(p.properties,function(c,f){var g=d.properties[c];g!=f&&u.push({property:c,from:g,to:f})}))}),p.animate(u,t,n)}),this.filters.clear(),this.filters.pushAll(l)}return r},i.prototype.isInTransition=function(){return this.animations.length>0},Object.defineProperty(i.prototype,"isHover",{get:function(){return!!this.isInteractive()&&this.interactions.isHover},set:function(e){(e=ve(e))!==this.isHover&&this.isInteractive()&&(this.interactions.isHover=e,e?this.handleOver():(this.interactions.isRealHover=!1,this.handleOut()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isDragged",{get:function(){return this._isDragged},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isResized",{get:function(){return this._isResized},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isDown",{get:function(){return!!this.isInteractive()&&this.interactions.isDown},set:function(e){e=ve(e),this.isInteractive()&&this.isDown!=e&&(this.interactions.isDown=e,e?this.handleDown():this.handleUp())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFocused",{get:function(){return!!this.isInteractive()&&this.interactions.isFocused},set:function(e){e=ve(e),this.focusable&&this.isFocused!=e&&this.isInteractive()&&(this.interactions.isFocused=e,e===!0?this.handleFocus():this.handleBlur())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isActive",{get:function(){return this._isActive},set:function(e){this.setActive(e)},enumerable:!0,configurable:!0}),i.prototype.setActive=function(e){e=ve(e),this._isActive!==e&&(this._isActive=e,e&&this.states.hasKey("active")?(this.setState("active"),this.isHover&&this.states.hasKey("hoverActive")&&this.setState("hoverActive")):this.applyCurrentState(),this.dispatchImmediately("toggled"))},Object.defineProperty(i.prototype,"disabled",{get:function(){var e=this.getPropertyValue("disabled");return v(e)?e:this.virtualParent?this.virtualParent.disabled:!!this._parent&&this._parent.disabled},set:function(e){this.setDisabled(e)},enumerable:!0,configurable:!0}),i.prototype.setDisabled=function(e){if(e=ve(e),this.getPropertyValue("disabled")!=e){if(this.setPropertyValue("disabled",e,!0),e)this.parent=this._parent,this.removeFromInvalids(),this.group.attr({display:"none"}),this.dispatch("disabled");else{if(this._parent){var t=this._parent.element;t.hasChild(this.group)||t.add(this.group)}this instanceof W?(this.deepInvalidate(),this._background&&this._background.invalidate()):this.invalidate(),this.__disabled||this.removeSVGAttribute("display"),this.dispatch("enabled")}return this.dispatch("transformed"),Q.requestFrame(),!0}return!1},Object.defineProperty(i.prototype,"__disabled",{get:function(){return this._internalDisabled},set:function(e){this._internalDisabled!=e&&(this._internalDisabled=e,this._updateDisabled=!0,this.invalidatePosition(),e||this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"numberFormatter",{get:function(){return this._numberFormatter?this._numberFormatter:this.virtualParent?this.virtualParent.numberFormatter:this._parent?this._parent.numberFormatter:(this._numberFormatter=new Br,this._numberFormatter.language=this.language,this.numberFormatter)},set:function(e){this._numberFormatter=e,this._numberFormatter.language=this.language},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dateFormatter",{get:function(){return this._dateFormatter?this._dateFormatter:this.virtualParent?this.virtualParent.dateFormatter:this._parent?this._parent.dateFormatter:(this._dateFormatter=new Gi,this._dateFormatter.language=this.language,this.dateFormatter)},set:function(e){this._dateFormatter=e,this._dateFormatter.language=this.language},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"durationFormatter",{get:function(){return this._durationFormatter?this._durationFormatter:this.virtualParent?this.virtualParent.durationFormatter:this._parent?this._parent.durationFormatter:(this._durationFormatter=new Hr,this._durationFormatter.language=this.language,this.durationFormatter)},set:function(e){this._durationFormatter=e,this._durationFormatter.language=this.language},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"language",{get:function(){var e=this._language.get();return e||(this.virtualParent?this.virtualParent.language:this._parent?this._parent.language:(e=new Wt,this.language=e,e))},set:function(e){var t=this;this._language.get()!==e&&this._language.set(e,e.events.on("localechanged",function(n){if(t._numberFormatter&&(t._numberFormatter.language=t.language),t._dateFormatter&&(t._dateFormatter.language=t.language),t._durationFormatter&&(t._durationFormatter.language=t.language),t._exporting.get()){var r=t._exporting.get();r.numberFormatter.language=t.language,r.dateFormatter.language=t.language,r.durationFormatter.language=t.language,r.language=t.language}t instanceof W&&t.deepInvalidate()}))},enumerable:!0,configurable:!0}),i.prototype.populateString=function(e,t){if(v(e)){e=sn(e);var n=(e=Ft().escape(e)).match(/\{([^}]+)\}/g),r=void 0;if(n)for(r=0;r<n.length;r++){var a=n[r].replace(/\{([^}]+)\}/,"$1"),o=this.getTagValue(a,"",t);v(o)||(o=""),e=e.split(n[r]).join(o)}e=Ft().unescape(e)}else e="";return this._adapterO?this._adapterO.apply("populateString",e):e},i.prototype.getTagValue=function(e,t,n){var r;v(n)||(n=this.dataItem);for(var a,o=[],l=/([^.]+)\(([^)]*)\)|([^.]+)/g;(a=l.exec(e))!==null;)if(a[3])o.push({prop:a[3]});else{var h=[];if(ga(a[2])!="")for(var p=/'([^']*)'|"([^"]*)"|([0-9\-]+)/g,u=void 0;(u=p.exec(a[2]))!==null;)h.push(u[1]||u[2]||u[3]);o.push({method:a[1],params:h})}if(n){v(r=this.getTagValueFromObject(o,n.values))&&!ye(r)||(r=this.getTagValueFromObject(o,n));var d=n.dataContext;!v(r)&&d&&(v(r=this.getTagValueFromObject(o,n.dataContext))||(r=this.getTagValueFromObject([{prop:e}],d)),!v(r)&&d.dataContext&&(r=this.getTagValueFromObject(o,d.dataContext))),!v(r)&&n.component&&n.component.dataItem!==n&&(r=n.component.getTagValue(e,t))}return v(r)||(r=this.getTagValueFromObject(o,this.populateStringFrom||this)),!v(r)&&this._parent&&(r=this._parent.getTagValue(e,t)),r},i.prototype.getTagValueFromObject=function(e,t,n){for(var r=t,a=!1,o=0,l=e.length;o<l;o++){var h=e[o];if(h.prop){if(!v(r=r[h.prop]))return}else switch(h.method){case"formatNumber":var p=Or(r);v(p)&&(r=this.numberFormatter.format(p,n||h.params[0]||void 0),a=!0);break;case"formatDate":var u=void 0;if(!ki(u=J(r)?this.dateFormatter.parse(r):ma(r))||Fe(u.getTime()))return;v(u)&&(r=this.dateFormatter.format(u,n||h.params[0]||void 0),a=!0);break;case"formatDuration":var d=Or(r);v(d)&&(r=this.durationFormatter.format(d,n||h.params[0]||void 0,h.params[1]||void 0),a=!0);break;case"urlEncode":case"encodeURIComponent":r=encodeURIComponent(r);break;default:r[h.method]&&r[h.method].apply(this,h.params)}}if(!a){var c=[{method:"",params:n}];if(v(n)){var f=eh(n);f===xn?c[0].method="formatNumber":f===_n?c[0].method="formatDate":f===br&&(c[0].method="formatDuration")}else y(r)?(c[0].method="formatNumber",c[0].params=""):ki(r)&&(c[0].method="formatDate",c[0].params="");c[0].method&&(r=this.getTagValueFromObject(c,r))}return r},Object.defineProperty(i.prototype,"dataItem",{get:function(){if(!this._dataItem){if(this.virtualParent)return this.virtualParent.dataItem;if(this._parent)return this._parent.dataItem}return this._dataItem},set:function(e){this.setDataItem(e)},enumerable:!0,configurable:!0}),i.prototype.setDataItem=function(e){var t=this;if(this._dataItem!=e){if(this._dataItem=e,e){if(this.configField){var n=e.dataContext;n&&(this.config=n[this.configField],!this.config&&n.dataContext&&(this.config=n.dataContext[this.configField]))}var r=e.dataContext;if(r){var a=r.dataContext;X(this.propertyFields,function(o,l){if(v(r[l]))t[o]=r[l];else if(a){var h=a[l];v(h)&&(t[o]=h)}})}}this.invalidate()}},i.prototype.getPropertyValue=function(e){var t=this.properties[e];return this._isTemplate||(this._adapterO&&(t=this._adapterO.apply(e,t)),t=mr.applyAll(this,e,t)),t},i.prototype.setColorProperty=function(e,t,n){var r=this.properties[e];return!(t instanceof se&&r instanceof se&&t.toString()==r.toString())&&this.setPropertyValue(e,t,n)},i.prototype.setPercentProperty=function(e,t,n,r,a,o){if(y(t=sl(t)))return y(a)&&(t=V(t,a,o)),this.setPropertyValue(e,t,n,r);var l=this.properties[e];return!(t instanceof te&&l instanceof te&&t.value==l.value)&&this.setPropertyValue(e,t,n,r)},i.prototype.setPropertyValue=function(e,t,n,r){if(this.properties[e]!==t&&!this.isDisposed()){if(this.properties[e]=t,this.events.isEnabled("propertychanged")){var a={type:"propertychanged",target:this,property:e};this.events.dispatchImmediately("propertychanged",a)}if(n&&this.invalidate(),r&&this.invalidatePosition(),this.applyOnClones)for(var o=this.clones.values,l=o.length,h=0;h<l;++h){var p=o[h];p.isDisposed()||(p[e]=t)}return!0}return!1},i.prototype.bind=function(e,t,n,r){var a=this;n===void 0&&(n=e),v(this._bindings[e])&&this._bindings[e].dispose(),this[e]=t[n],this._bindings[e]=t.events.on("propertychanged",function(o){if(o.property===n){var l=t[n];r&&(l=r(l)),a[e]=l}})},i.prototype.observe=function(e,t,n,r){var a=this;return new _e(Li(Gs(e),function(o){return a.events.on("propertychanged",function(l){l.property===o&&t.call(n,l)},n,r)}))},i.prototype.applyAccessibility=function(){var e=this.readerTitle,t=this.readerDescription,n=this.role,r=this.readerHidden,a=this.readerChecked,o=this.readerControls,l=this.readerLive,h=this.readerOrientation,p=this.readerValueNow,u=this.readerValueText,d=[],c=[],f=this.readerLabelledBy;f&&d.push(f);var g=this.readerDescribedBy;if(g&&c.push(g),e)if(d.length||this.showSystemTooltip){var m=this.titleElement,x=this.uid+"-title";m.node.textContent!=e&&(m.node.textContent=e,m.attr({id:x})),d.push(x)}else this._titleElement&&(this.group.removeElement(this._titleElement),this._titleElement=void 0),this.setSVGAttribute({"aria-label":e});else this.removeSVGAttribute("aria-label"),this._titleElement&&(this.group.removeElement(this._titleElement),this._titleElement=void 0);if(t){var b=this.descriptionElement,C=this.uid+"-description";b.node.textContent!=t&&(b.node.textContent=t,b.attr({id:C})),c.push(C)}else this._descriptionElement&&(this.group.removeElement(this._descriptionElement),this._descriptionElement=void 0);d.length?this.setSVGAttribute({"aria-labelledby":d.join(" ")}):this.removeSVGAttribute("aria-labelledby"),c.length?this.setSVGAttribute({"aria-describedby":c.join(" ")}):this.removeSVGAttribute("aria-describedby"),n?this.setSVGAttribute({role:n}):this.removeSVGAttribute("role"),r?this.setSVGAttribute({"aria-hidden":"true"}):this.removeSVGAttribute("aria-hidden"),a?this.setSVGAttribute({"aria-checked":"true"}):a===!1?this.setSVGAttribute({"aria-checked":"false"}):this.removeSVGAttribute("aria-checked"),o?this.setSVGAttribute({"aria-controls":o}):this.removeSVGAttribute("aria-controls"),l?this.setSVGAttribute({"aria-live":l}):this.removeSVGAttribute("aria-live"),h?this.setSVGAttribute({"aria-orientation":h}):this.removeSVGAttribute("aria-orientation"),p?this.setSVGAttribute({"aria-valuenow":p}):this.removeSVGAttribute("aria-valuenow"),u?this.setSVGAttribute({"aria-valuetext":u}):this.removeSVGAttribute("aria-valuetext")},Object.defineProperty(i.prototype,"readerTitle",{get:function(){var e=this.getPropertyValue("readerTitle");return v(e)&&this.dataItem?this.populateString(e):e},set:function(e){e=Xe(e),this.setPropertyValue("readerTitle",e)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"readerDescription",{get:function(){var e=this.getPropertyValue("readerDescription");return v(e)&&this.dataItem?this.populateString(e):this.getPropertyValue("readerDescription")},set:function(e){e=Xe(e),this.setPropertyValue("readerDescription",e)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"role",{get:function(){return this.getPropertyValue("role")},set:function(e){e=Xe(e),this.setPropertyValue("role",e)&&(this.applyAccessibility(),e=="slider"&&(this.setSVGAttribute({"aria-valuemin":"0"}),this.setSVGAttribute({"aria-valuemax":"100"})))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"readerHidden",{get:function(){return this.getPropertyValue("readerHidden")},set:function(e){e=ve(e),this.setPropertyValue("readerHidden",e)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"readerChecked",{get:function(){return this.getPropertyValue("readerChecked")},set:function(e){e=ve(e),this.setPropertyValue("readerChecked",e)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"readerControls",{get:function(){return this.getPropertyValue("readerControls")},set:function(e){e=Xe(e),this.setPropertyValue("readerControls",e)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"readerLive",{get:function(){return this.getPropertyValue("readerLive")},set:function(e){e=Xe(e),this.setPropertyValue("readerLive",e)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"readerLabelledBy",{get:function(){return this.getPropertyValue("readerLabelledBy")},set:function(e){e=Xe(e),this.setPropertyValue("readerLabelledBy",e)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"readerDescribedBy",{get:function(){return this.getPropertyValue("readerDescribedBy")},set:function(e){e=Xe(e),this.setPropertyValue("readerDescribedBy",e)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"readerOrientation",{get:function(){return this.getPropertyValue("readerOrientation")},set:function(e){e=Xe(e),this.setPropertyValue("readerOrientation",e)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"readerValueNow",{get:function(){return this.getPropertyValue("readerValueNow")},set:function(e){e=Xe(e),this.setPropertyValue("readerValueNow",e)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"readerValueText",{get:function(){return this.getPropertyValue("readerValueText")},set:function(e){e=Xe(e),this.setPropertyValue("readerValueText",e)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"keyboardOptions",{get:function(){if(!this.interactions.keyboardOptions){if(this.virtualParent)return this.virtualParent.keyboardOptions;if(this._parent)return this._parent.keyboardOptions}return this.interactions.keyboardOptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"mouseOptions",{get:function(){if(!this.interactions.mouseOptions){if(this.virtualParent)return this.virtualParent.mouseOptions;if(this._parent)return this._parent.mouseOptions}return this.interactions.mouseOptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"interactions",{get:function(){if(!this._interaction){var e=K().getInteraction(this.dom);this._interaction=e,this._interaction.clickable=this.clickable,this._interaction.hoverable=this.hoverable,this._interaction.trackable=this.trackable,this._interaction.draggable=this.draggable,this._interaction.swipeable=this.swipeable,this._interaction.resizable=this.resizable,this._interaction.wheelable=this.wheelable,this._interaction.contextMenuDisabled=this.contextMenuDisabled,this._interaction.inert=this.inert,this._interaction.sprite=this,this._disposers.push(this._interaction)}return this._interaction},enumerable:!0,configurable:!0}),i.prototype.isInteractive=function(){return!!this._interaction},Object.defineProperty(i.prototype,"focusable",{get:function(){return this.getPropertyValue("focusable")},set:function(e){var t=this;e=ve(e),this.setPropertyValue("focusable",e)&&(e||this.isInteractive())&&(this.interactions.focusable=e,e?(this.setSVGAttribute({focusable:e}),v(this._tabindex)||(this.tabindex=0)):(this.removeSVGAttribute("focusable"),this.tabindex=void 0),this.interactions.setEventDisposer("sprite-focusable",e,function(){return new _e([t.events.on("blur",t.handleBlur,t,!1),t.events.on("focus",t.handleFocus,t,!1)])}))},enumerable:!0,configurable:!0}),i.prototype.handleFocus=function(e){this.focusable&&(this.topParent&&(this.topParent.hasFocused=!0,this.topParent.focusedElement=this),this.focusFilter&&this.filters.push(this.focusFilter),this.hoverOnFocus&&(this.isHover=!0,this.handleOver()))},i.prototype.handleBlur=function(e){this.focusable&&(this.topParent&&(this.topParent.hasFocused=!1,this.topParent.focusedElement=void 0),this.focusFilter&&this.filters.removeValue(this.focusFilter),this.hoverOnFocus&&(this.isHover=!1,this.handleOut()))},Object.defineProperty(i.prototype,"focusFilter",{get:function(){return this._focusFilter||(this.virtualParent?this.virtualParent.focusFilter:this._parent?this._parent.focusFilter:void 0)},set:function(e){this._focusFilter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hoverOnFocus",{get:function(){return this.getPropertyValue("hoverOnFocus")},set:function(e){e!==this.hoverOnFocus&&this.setPropertyValue("hoverOnFocus",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tabindex",{get:function(){var e=this._tabindex;return e!=null?e:this.virtualParent?this.virtualParent.tabindex:this._parent?this._parent.tabindex:void 0},set:function(e){e=ce(e),this.setPropertyValue("tabindex",e)&&y(e)&&(this.interactions.tabindex=e,this.setSVGAttribute({tabindex:e}),this._tabindex=e,this.focusable=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"inertiaOptions",{get:function(){return!this.interactions.inertiaOptions&&this._parent?this._parent.inertiaOptions:this.interactions.inertiaOptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"draggable",{get:function(){return this.getPropertyValue("draggable")},set:function(e){var t=this;e=ve(e),this.setPropertyValue("draggable",e)&&(e||this.isInteractive())&&(this.applyCursorStyle(),this.interactions.draggable=e,this.interactions.setEventDisposer("sprite-draggable",e,function(){return new _e([t.events.on("down",t.handleDown,t,!1),t.events.on("dragstart",t.handleDragStart,t,!1),t.events.on("drag",t.handleDragMove,t,!1),t.events.on("dragstop",t.handleDragStop,t,!1)])}))},enumerable:!0,configurable:!0}),i.prototype.handleDragStart=function(e){this.interactions.isTouchProtected&&e.touch||(this.interactions.originalPosition={x:this.pixelX,y:this.pixelY},this._isDragged=!0,this.hideTooltip(0))},i.prototype.dragStart=function(e){this._isDragged=!0,K().dragStart(this.interactions,e)},i.prototype.handleDragStop=function(e){this.interactions.isTouchProtected&&e.touch||(this._isDragged=!1,this.showTooltip(),this.interactions.originalPosition=void 0)},i.prototype.dragStop=function(e,t){this._isDragged=!1,K().dragStop(this.interactions,e,t)},i.prototype.handleDragMove=function(e){if(!this.interactions.isTouchProtected||!e.touch){var t=this.interactions.originalPosition;if(t&&this._isDragged){var n=this._parent.globalScale*this.svgContainer.cssScale;this.moveTo({x:t.x+e.shift.x/n,y:t.y+e.shift.y/n},void 0,void 0,!0)}this.dispatchImmediately("dragged",e)}},Object.defineProperty(i.prototype,"inert",{get:function(){return this.getPropertyValue("inert")},set:function(e){e=ve(e),this.setPropertyValue("inert",e)&&(e||this.isInteractive())&&(this.interactions.inert=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hoverOptions",{get:function(){if(!this.interactions.hoverOptions){if(this.virtualParent)return this.virtualParent.hoverOptions;if(this._parent)return this._parent.hoverOptions}return this.interactions.hoverOptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hoverable",{get:function(){return this.getPropertyValue("hoverable")},set:function(e){var t=this;e=ve(e),this.setPropertyValue("hoverable",e)&&(e||this.isInteractive())&&(this.applyCursorStyle(),this.interactions.hoverable=e,this.interactions.setEventDisposer("sprite-hoverable",e,function(){return new _e([t.events.on("over",t.handleOver,t,!1),t.events.on("out",t.handleOut,t,!1)])}))},enumerable:!0,configurable:!0}),i.prototype.handleOver=function(e){if(this._outTimeout&&this._outTimeout.dispose(),this.isHover){this.states.hasKey("hover")&&(this.isHidden||this.applyCurrentState());var t=void 0;e&&e.pointer&&(t=Ht(e.pointer.point,this.svgContainer.SVGContainer,this.svgContainer.cssScale)),this.showTooltipOn=="hover"&&this.showTooltip(t)}else this.showTooltipOn=="hover"&&this.hideTooltip(),!this.isHidden&&this.states.hasKey("hover")&&this.applyCurrentState()},i.prototype.handleOut=function(e){var t=this;this.tooltip&&this.tooltip.targetSprite==this&&this.tooltip.keepTargetHover?this._outTimeout=this.setTimeout(function(){t.tooltip.isHover||(t.tooltip.targetSprite==t&&t.hideTooltip(),t._outTimeout=t.setTimeout(t.handleOutReal.bind(t),t.rollOutDelay))},10):(this.showTooltipOn=="hover"&&this.hideTooltip(),this._outTimeout=this.setTimeout(this.handleOutReal.bind(this),this.rollOutDelay))},i.prototype.handleOutReal=function(){this.isHidden||this.isHiding||!this.states.hasKey("hover")||this.applyCurrentState()},Object.defineProperty(i.prototype,"hitOptions",{get:function(){if(!this.interactions.hitOptions){if(this.virtualParent)return this.virtualParent.hitOptions;if(this._parent)return this._parent.hitOptions}return this.interactions.hitOptions},enumerable:!0,configurable:!0}),i.prototype.handleDown=function(e){this.interactions.downPointers.length===1&&(this.interactions.originalPosition={x:this.pixelX,y:this.pixelY},this.interactions.originalAngle=this.rotation,this.interactions.originalScale=this.scale,this.states.hasKey("down")&&this.setState("down"))},i.prototype.handleUp=function(e){var t=this;this._isResized=!1,this.states.hasKey("down")&&this.applyCurrentState(),this.showTooltipOn=="hit"&&(this.updateTooltipPosition(e.pointer?e.pointer.point:void 0),this._disposers.push(_.events.once("exitframe",function(){t.showTooltip()})),this._disposers.push(K().body.events.once("down",function(n){t.hideTooltip()})))},Object.defineProperty(i.prototype,"clickable",{get:function(){return this.getPropertyValue("clickable")},set:function(e){var t=this;e=ve(e),this.setPropertyValue("clickable",e)&&(e||this.isInteractive())&&(this.applyCursorStyle(),this.interactions.clickable=e,this.interactions.setEventDisposer("sprite-clickable",e,function(){return new _e([t.events.on("down",t.handleDown,t,!1),t.events.on("up",t.handleUp,t,!1)])}))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"togglable",{get:function(){return this.getPropertyValue("togglable")},set:function(e){var t=this;e=ve(e),this.setPropertyValue("togglable",e)&&(e||this.isInteractive())&&this.interactions.setEventDisposer("sprite-togglable",e,function(){return t.events.on("hit",t.handleToggle,t,!1)})},enumerable:!0,configurable:!0}),i.prototype.handleToggle=function(e){this.isActive=!this.isActive},Object.defineProperty(i.prototype,"contextMenuDisabled",{get:function(){return this.getPropertyValue("contextMenuDisabled")},set:function(e){e=ve(e),this.setPropertyValue("contextMenuDisabled",e)&&(this.interactions.contextMenuDisabled=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"url",{get:function(){return this.getPropertyValue("url")},set:function(e){this.setPropertyValue("url",e)&&(this._urlDisposer&&this._urlDisposer.dispose(),Pn(e)&&(this._urlDisposer=this.events.on("hit",this.urlHandler,this,!1),this.clickable=!0,this.cursorOverStyle=He.pointer))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"baseId",{get:function(){return!this._baseId&&this._parent&&(this.baseId=this._parent.baseId),this._baseId},set:function(e){this.setBaseId(e)},enumerable:!0,configurable:!0}),i.prototype.setBaseId=function(e){e!=this._baseId&&(this.invalid&&(this.invalid=!1,_.removeFromInvalidSprites(this),this.invalidate()),this._baseId=e)},Object.defineProperty(i.prototype,"baseSprite",{get:function(){return this.isBaseSprite?this:this._parent?this._parent.baseSprite:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"urlTarget",{get:function(){return this.getPropertyValue("urlTarget")},set:function(e){this.setPropertyValue("urlTarget",e)},enumerable:!0,configurable:!0}),i.prototype.urlHandler=function(e){if(Pn(this.url)){var t=this.populateString(this.url);this.urlTarget==="_self"?window.location.href=t:window.open(t,this.urlTarget)}},Object.defineProperty(i.prototype,"swipeOptions",{get:function(){if(!this.interactions.swipeOptions){if(this.virtualParent)return this.virtualParent.swipeOptions;if(this._parent)return this._parent.swipeOptions}return this.interactions.swipeOptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"swipeable",{get:function(){return this.getPropertyValue("swipeable")},set:function(e){e=ve(e),this.setPropertyValue("swipeable",e)&&(this.applyCursorStyle(),(e||this.isInteractive())&&(this.interactions.swipeable=e))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackable",{get:function(){return this.getPropertyValue("trackable")},set:function(e){e=ve(e),this.setPropertyValue("trackable",e)&&(e||this.isInteractive())&&(this.applyCursorStyle(),this.interactions.trackable=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"wheelable",{get:function(){return this.getPropertyValue("wheelable")},set:function(e){this.setPropertyValue("wheelable",e)&&(e||this.isInteractive())&&(this.applyCursorStyle(),this.interactions.wheelable=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"resizable",{get:function(){return this.getPropertyValue("resizable")},set:function(e){var t=this;e=ve(e),this.setPropertyValue("resizable",e)&&(e||this.isInteractive())&&(this.applyCursorStyle(),this.interactions.resizable=e,this.interactions.setEventDisposer("sprite-resizable",e,function(){return new _e([t.events.on("down",t.handleDown,t,!1),t.events.on("resize",t.handleResize,t,!1)])}))},enumerable:!0,configurable:!0}),i.prototype.handleResize=function(e){if((!this.interactions.isTouchProtected||!e.touch)&&(this._isResized=!0,this.scale=this.interactions.originalScale*e.scale,this.validatePosition(),this.draggable||this.dragWhileResize)){this._isDragged=!1;var t=ln(Ht(e.point1,this.htmlContainer,this.svgContainer.cssScale),Ht(e.point2,this.htmlContainer,this.svgContainer.cssScale)),n=vi(e.startPoint1,this._parent),r=vi(e.startPoint2,this._parent),a=this.interactions.originalPosition,o=this.interactions.originalScale;if(a){var l=ln({x:(n.x-a.x)/o,y:(n.y-a.y)/o},{x:(r.x-a.x)/o,y:(r.y-a.y)/o}),h=at(t,this._parent);this.moveTo({x:h.x-l.x*this.scale,y:h.y-l.y*this.scale},void 0,void 0,!0)}}},Object.defineProperty(i.prototype,"cursorOptions",{get:function(){if(!this.interactions.cursorOptions){if(this.virtualParent)return this.virtualParent.cursorOptions;if(this._parent)return this._parent.cursorOptions}return this.interactions.cursorOptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cursorOverStyle",{set:function(e){this.cursorOptions.overStyle||(this.interactions.cursorOptions={defaultStyle:this.cursorOptions.defaultStyle}),this.cursorOptions.overStyle=e,K().applyCursorOverStyle(this.interactions)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cursorDownStyle",{set:function(e){this.cursorOptions.downStyle=e},enumerable:!0,configurable:!0}),i.prototype.applyCursorStyle=function(){},Object.defineProperty(i.prototype,"interactionsEnabled",{get:function(){return this.getPropertyValue("interactionsEnabled")!==!1&&(this.virtualParent?this.virtualParent.interactionsEnabled:!this._parent||this._parent.interactionsEnabled)},set:function(e){if(e=ve(e),this.setPropertyValue("interactionsEnabled",e)){var t=null;e?this.group.node.style.pointerEvents="":t="none",this.group.node.style.pointerEvents=t}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"exporting",{get:function(){return this.getExporting()},set:function(e){this._exporting.set(e,e)},enumerable:!0,configurable:!0}),i.prototype.getExporting=function(){var e=this._exporting.get();return e||(!this.isStandaloneInstance&&this._parent?this._parent.exporting:((e=new tp(this.svgContainer.SVGContainer)).sprite=this,e.language=this.language,e.numberFormatter=this.numberFormatter,e.dateFormatter=this.dateFormatter,e.durationFormatter=this.durationFormatter,this._exporting.set(e,e),e))},Object.defineProperty(i.prototype,"exportable",{get:function(){return this._exportable},set:function(e){var t=this.svgContainer;this._exportable=e,t&&(e?z(t.nonExportableSprites,this):ht(t.nonExportableSprites,this)==-1&&t.nonExportableSprites.push(this))},enumerable:!0,configurable:!0}),i.prototype.modalPrefix=function(e){return Z.classNamePrefix+e},Object.defineProperty(i.prototype,"modal",{get:function(){var e=this.svgContainer;if(e){var t=e.modal;return t.adapter.has("classPrefix",this.modalPrefix)||t.adapter.add("classPrefix",this.modalPrefix),t}},enumerable:!0,configurable:!0}),i.prototype.openModal=function(e,t){var n=this.svgContainer;if(n)return n.openModal(e,t)},i.prototype.closeModal=function(){var e=this.svgContainer;e&&e.closeModal()},Object.defineProperty(i.prototype,"popups",{get:function(){var e=this.svgContainer;if(e){var t=e.popups;return t.template.sprite=this,t.template.adapter.has("classPrefix",this.modalPrefix)||t.template.adapter.add("classPrefix",this.modalPrefix),t}},enumerable:!0,configurable:!0}),i.prototype.openPopup=function(e,t){var n=this.svgContainer;if(n)return n.openPopup(e,t)},i.prototype.closeAllPopups=function(){var e=this.svgContainer;e&&e.closeAllPopups()},Object.defineProperty(i.prototype,"x",{get:function(){return this.getPropertyValue("x")},set:function(e){this.isDragged||this.setPercentProperty("x",e,!1,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelX",{get:function(){var e=R(this.getPixelX(this.x),this.minX,this.maxX);return this._adapterO?this._adapterO.apply("pixelX",e):e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"relativeX",{get:function(){return this._adapterO?this._adapterO.apply("relativeX",this.getRelativeX(this.x)):this.getRelativeX(this.x)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minX",{get:function(){return this.getPropertyValue("minX")},set:function(e){y(e)&&(e=V(e,this._positionPrecision,!0),this.setPropertyValue("minX",e,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxX",{get:function(){return this.getPropertyValue("maxX")},set:function(e){y(e)&&(e=V(e,this._positionPrecision,!0),this.setPropertyValue("maxX",e,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"y",{get:function(){return this.getPropertyValue("y")},set:function(e){this.isDragged||this.setPercentProperty("y",e,!1,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelY",{get:function(){var e=R(this.getPixelY(this.y),this.minY,this.maxY);return this._adapterO?this._adapterO.apply("pixelY",e):e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"relativeY",{get:function(){return this._adapterO?this._adapterO.apply("relativeY",this.getRelativeX(this.y)):this.getRelativeX(this.y)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minY",{get:function(){return this.getPropertyValue("minY")},set:function(e){y(e)&&(e=V(e,this._positionPrecision,!0),this.setPropertyValue("minY",e,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxY",{get:function(){return this.getPropertyValue("maxY")},set:function(e){y(e)&&(e=V(e,this._positionPrecision,!0),this.setPropertyValue("maxY",e,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dx",{get:function(){return this.getPropertyValue("dx")},set:function(e){y(e)&&(e=V(e,this._positionPrecision,!0),this.setPropertyValue("dx",e,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dy",{get:function(){return this.getPropertyValue("dy")},set:function(e){y(e)&&(e=V(e,this._positionPrecision,!0),this.setPropertyValue("dy",e,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rotation",{get:function(){return this.getPropertyValue("rotation")},set:function(e){y(e=ce(e))||(e=0),this.setPropertyValue("rotation",e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"align",{get:function(){return this.getPropertyValue("align")},set:function(e){e=Xe(e),this.setPropertyValue("align",e)&&this._parent&&this._parent.invalidateLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"valign",{get:function(){return this.getPropertyValue("valign")},set:function(e){e=Xe(e),this.setPropertyValue("valign",e)&&this._parent&&this._parent.invalidateLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"horizontalCenter",{get:function(){return this.getPropertyValue("horizontalCenter")},set:function(e){e=Xe(e),this.setPropertyValue("horizontalCenter",e)&&this.updateCenter()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"verticalCenter",{get:function(){return this.getPropertyValue("verticalCenter")},set:function(e){e=Xe(e),this.setPropertyValue("verticalCenter",e)&&this.updateCenter()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxWidth",{get:function(){var e=this.getPropertyValue("maxWidth");if(!y(e)&&this._parent){var t=this._parent.maxWidth;return this._parent.layout!="absolute"&&this.align!="none"&&this.align!=null&&(t=t-this.pixelMarginLeft-this.pixelMarginRight),t}return e},set:function(e){this.setMaxWidth(e)},enumerable:!0,configurable:!0}),i.prototype.setMaxWidth=function(e){var t=this.maxWidth,n=this.maxHeight;if(this.setPropertyValue("maxWidth",e)){y(this.relativeWidth)&&this.invalidate();var r={type:"maxsizechanged",target:this,previousWidth:t,previousHeight:n};this.dispatchImmediately("maxsizechanged",r)}},Object.defineProperty(i.prototype,"maxHeight",{get:function(){var e=this.getPropertyValue("maxHeight");if(!y(e)&&this._parent){var t=this._parent.maxHeight;return this._parent.layout!="absolute"&&this.valign!="none"&&this.valign!=null&&(t=t-this.pixelMarginTop-this.pixelMarginBottom),t}return e},set:function(e){this.setMaxHeight(e)},enumerable:!0,configurable:!0}),i.prototype.setMaxHeight=function(e){var t=this.maxWidth,n=this.maxHeight;if(this.setPropertyValue("maxHeight",e)){y(this.relativeHeight)&&this.invalidate();var r={type:"maxsizechanged",target:this,previousWidth:t,previousHeight:n};this.dispatchImmediately("maxsizechanged",r)}},Object.defineProperty(i.prototype,"minWidth",{get:function(){return this.getPropertyValue("minWidth")},set:function(e){this.setPropertyValue("minWidth",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minHeight",{get:function(){return this.getPropertyValue("minHeight")},set:function(e){this.setPropertyValue("minHeight",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"width",{get:function(){return this.getPropertyValue("width")},set:function(e){this.setPercentProperty("width",e,!0,!1,this._positionPrecision,!0)&&(this.percentWidth=void 0,this.relativeWidth=void 0,e instanceof te?(this.percentWidth=e.percent,y(this._pixelWidth)&&(this.maxWidth=void 0),this._pixelWidth=void 0):(this._pixelWidth=Number(e),this.maxWidth=this._pixelWidth),this.invalidatePosition())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"height",{get:function(){return this.getPropertyValue("height")},set:function(e){this.setPercentProperty("height",e,!0,!1,this._positionPrecision,!0)&&(this.percentHeight=void 0,this._relativeHeight=void 0,e instanceof te?(this.percentHeight=e.percent,y(this._pixelHeight)&&(this.maxHeight=void 0),this._pixelHeight=void 0):(this._pixelHeight=Number(e),this.maxHeight=this._pixelHeight),this.invalidatePosition())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelWidth",{get:function(){var e;e=y(this.percentWidth)?this.maxWidth:y(this._pixelWidth)?this._pixelWidth:0;var t=this.minWidth;t!=null&&e<t&&(e=t);var n=V(e,this._positionPrecision,!0);return this._adapterO?this._adapterO.apply("pixelWidth",n):n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelHeight",{get:function(){var e;e=y(this.percentHeight)?this.maxHeight:y(this._pixelHeight)?this._pixelHeight:0;var t=this.minHeight;t!=null&&e<t&&(e=t);var n=V(e,this._positionPrecision,!0);return this._adapterO?this._adapterO.apply("pixelHeight",n):n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"relativeWidth",{get:function(){var e=this._relativeWidth;if(y(e))return this._adapterO?this._adapterO.apply("relativeWidth",e):e},set:function(e){this._relativeWidth!=e&&(this._relativeWidth=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"relativeHeight",{get:function(){var e=this._relativeHeight;if(y(e))return this._adapterO?this._adapterO.apply("relativeHeight",e):e},set:function(e){this._relativeHeight!=e&&(this._relativeHeight=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"measuredWidth",{get:function(){return this.disabled||this.__disabled?0:this._adapterO?this._adapterO.apply("measuredWidth",this._measuredWidth):this._measuredWidth},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"measuredHeight",{get:function(){return this.disabled||this.__disabled?0:this._adapterO?this._adapterO.apply("measuredHeight",this._measuredHeight):this._measuredHeight},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"outerWidth",{get:function(){var e=this.pixelWidth+this.pixelMarginRight+this.pixelMarginLeft;return this._adapterO?this._adapterO.apply("outerWidth",e):e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"outerHeight",{get:function(){var e=this.pixelHeight+this.pixelMarginTop+this.pixelMarginBottom;return this._adapterO?this._adapterO.apply("outerHeight",e):e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerWidth",{get:function(){var e=Math.max(0,this.pixelWidth-this.pixelPaddingRight-this.pixelPaddingLeft);return this._adapterO?this._adapterO.apply("innerWidth",e):e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerHeight",{get:function(){var e=Math.max(0,this.pixelHeight-this.pixelPaddingTop-this.pixelPaddingBottom);return this._adapterO?this._adapterO.apply("innerHeight",e):e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"globalScale",{get:function(){var e=this.scale;return this._parent&&(e*=this._parent.globalScale),this._adapterO?this._adapterO.apply("globalScale",e):e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scale",{get:function(){return this.getPropertyValue("scale")},set:function(e){(e=ce(e))<0&&(e=0),e!=this.getPropertyValue("scale")&&(this.setPropertyValue("scale",e,!1,!0),this.handleGlobalScale())},enumerable:!0,configurable:!0}),i.prototype.margin=function(e,t,n,r){return this.marginTop=e,this.marginRight=t,this.marginBottom=n,this.marginLeft=r,this},Object.defineProperty(i.prototype,"marginLeft",{get:function(){return this.getPropertyValue("marginLeft")},set:function(e){this.setPercentProperty("marginLeft",e,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"marginRight",{get:function(){return this.getPropertyValue("marginRight")},set:function(e){this.setPercentProperty("marginRight",e,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"marginTop",{get:function(){return this.getPropertyValue("marginTop")},set:function(e){this.setPercentProperty("marginTop",e,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"marginBottom",{get:function(){return this.getPropertyValue("marginBottom")},set:function(e){this.setPercentProperty("marginBottom",e,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelMarginRight",{get:function(){var e=this.getPixelX(this.marginRight);return this._adapterO?this._adapterO.apply("pixelMarginRight",e):e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"relativeMarginRight",{get:function(){var e=this.getRelativeX(this.marginRight);return this._adapterO?this._adapterO.apply("relativeMarginRight",e):e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelMarginLeft",{get:function(){var e=this.getPixelX(this.marginLeft);return this._adapterO?this._adapterO.apply("pixelMarginLeft",e):e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"relativeMarginLeft",{get:function(){var e=this.getRelativeX(this.marginLeft);return this._adapterO?this._adapterO.apply("relativeMarginLeft",e):e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelMarginTop",{get:function(){var e=this.getPixelY(this.marginTop);return this._adapterO?this._adapterO.apply("pixelMarginTop",e):e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"relativeMarginTop",{get:function(){var e=this.getRelativeY(this.marginTop);return this._adapterO?this._adapterO.apply("relativeMarginTop",e):e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelMarginBottom",{get:function(){var e=this.getPixelY(this.marginBottom);return this._adapterO?this._adapterO.apply("pixelMarginBottom",e):e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"relativeMarginBottom",{get:function(){var e=this.getRelativeY(this.marginBottom);return this._adapterO?this._adapterO.apply("relativeMarginBottom",e):e},enumerable:!0,configurable:!0}),i.prototype.padding=function(e,t,n,r){return this.paddingTop=e,this.paddingRight=t,this.paddingBottom=n,this.paddingLeft=r,this},Object.defineProperty(i.prototype,"paddingLeft",{get:function(){return this.getPropertyValue("paddingLeft")},set:function(e){this.setPercentProperty("paddingLeft",e,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"paddingRight",{get:function(){return this.getPropertyValue("paddingRight")},set:function(e){this.setPercentProperty("paddingRight",e,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"paddingTop",{get:function(){return this.getPropertyValue("paddingTop")},set:function(e){this.setPercentProperty("paddingTop",e,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"paddingBottom",{get:function(){return this.getPropertyValue("paddingBottom")},set:function(e){this.setPercentProperty("paddingBottom",e,!0,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelPaddingRight",{get:function(){return this.getPixelX(this.paddingRight)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"relativePaddingRight",{get:function(){return this.getRelativeX(this.paddingRight)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelPaddingLeft",{get:function(){return this.getPixelX(this.paddingLeft)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"relativePaddingLeft",{get:function(){return this.getRelativeX(this.paddingLeft)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelPaddingTop",{get:function(){return this.getPixelY(this.paddingTop)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"relativePaddingTop",{get:function(){return this.getRelativeY(this.paddingTop)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelPaddingBottom",{get:function(){return this.getPixelY(this.paddingBottom)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"relativePaddingBottom",{get:function(){return this.getRelativeY(this.paddingBottom)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"path",{get:function(){return this.getPropertyValue("path")},set:function(e){this.setPath(e)},enumerable:!0,configurable:!0}),i.prototype.setPath=function(e){return!!this.setPropertyValue("path",e)&&(this._adapterO&&(e=this._adapterO.apply("path",e)),this._isPath||(this.element&&(!this.element.node||this.element.node instanceof SVGPathElement)||(this.element=this.paper.add("path")),this._isPath=!0),v(e)?this.element.attr({d:e}):this.element.removeAttr("d"),this.invalidatePosition(),this.inited||this.events.once("inited",this.validatePosition,this,!1),!0)},Object.defineProperty(i.prototype,"fillModifier",{get:function(){return this.getPropertyValue("fillModifier")},set:function(e){this.setPropertyValue("fillModifier",e)&&this.setFill(this.fill)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"strokeModifier",{get:function(){return this.getPropertyValue("strokeModifier")},set:function(e){this.setPropertyValue("strokeModifier",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fillOpacity",{get:function(){return this.getPropertyValue("fillOpacity")},set:function(e){e=sr(e,0,1),this.setPropertyValue("fillOpacity",e)&&this.setSVGAttribute({"fill-opacity":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fill",{get:function(){return this.getPropertyValue("fill")},set:function(e){this.setFill(e)},enumerable:!0,configurable:!0}),i.prototype.setFill=function(e){if(ye(e)&&!("r"in e)||(e=ft(e)),this.setColorProperty("fill",e)||this.fillModifier)if(e instanceof se&&this.fillModifier&&(e=this.fillModifier.modify(e)),this.realFill=e,e instanceof se)this.setSVGAttribute({fill:e.toString()});else if(v(e)){if(e instanceof xi||e instanceof dt||e instanceof Nt){var t=e;t.paper=this.paper,this.setSVGAttribute({fill:'url("'+Ni()+t.id+'")'})}}else this.removeSVGAttribute("fill")},Object.defineProperty(i.prototype,"opacity",{get:function(){return this.getPropertyValue("opacity")},set:function(e){e=sr(e,0,1),this.setPropertyValue("opacity",e)&&this.setSVGAttribute({opacity:e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"stroke",{get:function(){return this.getPropertyValue("stroke")},set:function(e){this.setStroke(e)},enumerable:!0,configurable:!0}),i.prototype.setStroke=function(e){if(ye(e)&&!("r"in e)||(e=ft(e)),this.setColorProperty("stroke",e)||this.strokeModifier)if(e instanceof se&&this.strokeModifier&&(e=this.strokeModifier.modify(e)),this.realStroke=e,e instanceof se)e.hex=="none"?this.removeSVGAttribute("stroke"):this.setSVGAttribute({stroke:e.toString()});else if(v(e)){if(e instanceof xi||e instanceof dt||e instanceof Nt){var t=e;t.paper=this.paper,this.setSVGAttribute({stroke:'url("'+Ni()+t.id+'")'})}}else this.removeSVGAttribute("stroke")},Object.defineProperty(i.prototype,"strokeOpacity",{get:function(){return this.getPropertyValue("strokeOpacity")},set:function(e){e=sr(e,0,1),this.setPropertyValue("strokeOpacity",e)&&this.setSVGAttribute({"stroke-opacity":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"nonScalingStroke",{get:function(){return this.getPropertyValue("nonScalingStroke")},set:function(e){e=ve(e),this.setPropertyValue("nonScalingStroke",e)&&(this.strokeWidth=this.strokeWidth)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"nonScaling",{get:function(){return this.getPropertyValue("nonScaling")},set:function(e){e=ve(e),this.setPropertyValue("nonScaling",e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"strokeWidth",{get:function(){return this.getPropertyValue("strokeWidth")},set:function(e){e=ce(e),this.setPropertyValue("strokeWidth",e,!0),this.nonScalingStroke&&(y(e)||(e=1),e/=this.globalScale),this.setSVGAttribute({"stroke-width":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"strokeDasharray",{get:function(){return this.getPropertyValue("strokeDasharray")},set:function(e){e=Xe(e),this.setPropertyValue("strokeDasharray",e)&&this.setSVGAttribute({"stroke-dasharray":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"strokeDashoffset",{get:function(){return this.getPropertyValue("strokeDashoffset")},set:function(e){e=ce(e),this.setPropertyValue("strokeDashoffset",e)&&this.setSVGAttribute({"stroke-dashoffset":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"strokeLinecap",{get:function(){return this.getPropertyValue("strokeLinecap")},set:function(e){this.setPropertyValue("strokeLinecap",e)&&this.setSVGAttribute({"stroke-linecap":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"strokeLinejoin",{get:function(){return this.getPropertyValue("strokeLinejoin")},set:function(e){this.setPropertyValue("strokeLinejoin",e)&&this.setSVGAttribute({"stroke-linejoin":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"shapeRendering",{get:function(){return this.getPropertyValue("shapeRendering")},set:function(e){e=Xe(e),this.setPropertyValue("shapeRendering",e)&&this.setSVGAttribute({"shape-rendering":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelPerfect",{get:function(){return this.getPropertyValue("pixelPerfect")},set:function(e){e=ve(e),this._positionPrecision=e?Z.pixelPerfectPrecision:3,this.setPropertyValue("pixelPerfect",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rtl",{get:function(){return v(this._rtl)?this._rtl:!!this._topParent&&this._topParent.rtl},set:function(e){e=ve(e),this.isBaseSprite&&(this.topParent.rtl=e),this._rtl=e},enumerable:!0,configurable:!0}),i.prototype.show=function(e){return this.showReal(e)},i.prototype.showReal=function(e){var t=this;if(!this.preventShow){var n,r=this.defaultState.properties;if(!this.disabled&&(this.isHidden||!this.visible||this.isHiding||r.opacity!=null&&this.opacity<r.opacity&&!this.isShowing)&&!this.isDisposed()){this.invalid&&this.validate(),this.positionInvalid&&this.validatePosition(),y(e)||(e=this.defaultState.transitionDuration),this._hideAnimation&&(this._hideAnimation.kill(),this._hideAnimation=void 0),this._showHideDisposer&&this.removeDispose(this._showHideDisposer),this._isHidden=!1,this.isHiding=!1,this.isShowing=!0,(n=this.applyCurrentState(e))&&!n.isFinished()?(this._showHideDisposer=n.events.on("animationended",function(){t.isShowing=!1}),this._disposers.push(this._showHideDisposer)):this.isShowing=!1;var a=this.defaultState.properties.visible;v(a)||(a=!0),this.visible=a,this.readerHidden=!1,this.dispatchImmediately("shown")}return n}},i.prototype.hide=function(e){return this.hideReal(e)},i.prototype.hideReal=function(e){var t,n=this;if(!this.isHiding&&this.visible&&!this.isDisposed()){this.tooltip&&this.tooltip.currentSprite==this&&this.hideTooltip(0),this._hideAnimation&&(this._hideAnimation.kill(),this._hideAnimation=void 0),this.isShowing=!1,this._showHideDisposer&&this.removeDispose(this._showHideDisposer);var r=this.hiddenState;r?(t=this.setState(r,e,void 0))&&!t.isFinished()?(this._hideAnimation=t,this._showHideDisposer=t.events.on("animationended",function(){n.isHiding=!1,n._isHidden=!0,r.properties.visible==0&&(n.visible=!1)},this),this._disposers.push(this._showHideDisposer),this._disposers.push(t)):(this.isHiding=!1,this._isHidden=!0):(this.visible=!1,this.isHiding=!1,this._isHidden=!0),this.readerHidden=!0,this.dispatchImmediately("hidden"),this.invalidate()}return y(e)||(e=this.hiddenState.transitionDuration),t},Object.defineProperty(i.prototype,"visible",{get:function(){return this.getVisibility()},set:function(e){e=ve(e),this.setVisibility(e)},enumerable:!0,configurable:!0}),i.prototype.getVisibility=function(){var e=this.getPropertyValue("visible");return v(e)||(e=!0),e},i.prototype.setVisibility=function(e){if(this.setPropertyValue("visible",e)&&(e?this.group.removeAttr("visibility"):this.group.attr({visibility:"hidden"}),this.events.isEnabled("visibilitychanged"))){var t={type:"visibilitychanged",target:this,visible:e};this.events.dispatchImmediately("visibilitychanged",t)}},Object.defineProperty(i.prototype,"zIndex",{get:function(){return this.getPropertyValue("zIndex")},set:function(e){e=ce(e),this.setPropertyValue("zIndex",e)&&this.dispatch("zIndexChanged")},enumerable:!0,configurable:!0}),i.prototype.toFront=function(){var e=this._parent;e&&e.children.indexOf(this)!=e.children.length-1&&(e.children.moveValue(this,e.children.length-1),this.dispatch("zIndexChanged"))},i.prototype.toBack=function(){var e=this._parent;e&&e.children.indexOf(this)!=0&&(e.children.moveValue(this,0),this.dispatch("zIndexChanged"))},Object.defineProperty(i.prototype,"userClassName",{get:function(){return this.getPropertyValue("userClassName")},set:function(e){this.setPropertyValue("userClassName",e)&&(!e&&this.userClassName&&this.group.removeClass(this.userClassName),this.setClassName())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltip",{get:function(){return this._tooltip?this._tooltip:this.virtualParent?this.virtualParent.tooltip:this._parent?this._parent.tooltip:void 0},set:function(e){this._tooltip&&this.removeDispose(this._tooltip),this._tooltip=e,e&&(e.parent=this.tooltipContainer)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipDataItem",{get:function(){return this._tooltipDataItem||this.dataItem},set:function(e){this._tooltipDataItem=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipColorSource",{get:function(){return this._tooltipColorSource},set:function(e){this._tooltipColorSource=e},enumerable:!0,configurable:!0}),i.prototype.showTooltip=function(e){this.showTooltipOn=="always"&&!this._tooltip&&this.tooltip&&(this._tooltip=this.tooltip.clone()),!e&&this.tooltipPosition=="pointer"&&this.isHover&&(e=Ht(K().lastPointer.point,this.svgContainer.SVGContainer,this.svgContainer.cssScale));for(var t=this;t!=null;){if(!t.visible||t.disabled||t.__disabled)return void(this._tooltip&&this._tooltip.visible&&this._tooltip.hide(0));t=t.parent}if(v(this.tooltipText)||v(this.tooltipHTML)){var n=this.tooltip,r=this.tooltipDataItem;if(n){n.targetSprite=this;var a=this,o=this.tooltipColorSource;if((n.getStrokeFromObject||n.getFillFromObject)&&o&&(o.isTemplate?r&&hr(r.sprites,function(c){return c.clonedFrom!=o||(a=c,!1)}):a=o),n.getStrokeFromObject){for(var l=this.stroke,h=a;h.parent!=null&&((l=h.stroke)==null&&(h=h.parent),l==null););l instanceof se?n.background.animate({property:"stroke",to:l},n.animationDuration):n.background.stroke=l}if(n.dataItem=r,n.label.populateStringFrom=this,n.getFillFromObject){var p=this.fill;for(h=a;h.parent!=null;)if((p=h.fill)==null||p instanceof se&&p.rgb==null)h=h.parent;else if(p!=null)break;p==null&&(p=B("#000000")),p instanceof se&&n.visible?n.background.animate({property:"fill",to:p},n.animationDuration):n.background.fill=p,n.autoTextColor&&p instanceof se&&(n.label.fill=p.alternative)}var u="";if(this.tooltipHTML&&(n.html=this.tooltipHTML,u=this.tooltipHTML),this.tooltipText&&(n.text=this.tooltipText,u=this.tooltipText),this.updateTooltipPosition(e)){if(n.readerDescribedBy=this.uidAttr(),n.label.invalid&&n.label.validate(),u!=null&&u!=""&&n.label.currentText!=""){n&&!n.parent&&(n.parent=this.tooltipContainer);var d=n.defaultState.transitionDuration;return d<=0&&(d=1),n.show(d),n.currentSprite=this,!0}this.hideTooltip(0)}else this.hideTooltip(0)}}return!1},i.prototype.updateTooltipPosition=function(e){var t=this;if(this.tooltipPosition!="pointer"){var n=ut({x:this.getTooltipX(),y:this.getTooltipY()},this);return this.pointTooltipTo(n)}if(this._interactionDisposer&&this._interactionDisposer.dispose(),this._interactionDisposer=K().body.events.on("track",function(r){return t.pointTooltipTo(Ht(r.point,t.svgContainer.SVGContainer,t.svgContainer.cssScale),!0)}),e)return this.pointTooltipTo(e,!0)},i.prototype.pointTooltipTo=function(e,t){var n=this.tooltip;return n&&this.topParent&&(n.showInViewport||Us(e,{x:0,y:0,width:this.topParent.maxWidth,height:this.topParent.maxHeight}))?(n.pointTo(e,t),!0):!1},i.prototype.hideTooltip=function(e){if(this.showTooltipOn!="always"){var t=this.tooltip;t&&(t.targetSprite==this&&(t.targetSprite=void 0),t.hide(e),this._interactionDisposer&&(this._interactionDisposer.dispose(),this._interactionDisposer=void 0))}},Object.defineProperty(i.prototype,"tooltipHTML",{get:function(){return this.getPropertyValue("tooltipHTML")},set:function(e){e=Xe(e),this.hoverable=!0,this.setPropertyValue("tooltipHTML",e)&&this.tooltip&&this.tooltip.visible&&this.showTooltip()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipText",{get:function(){return this.getPropertyValue("tooltipText")},set:function(e){(e=Xe(e))&&(this.hoverable=!0),this.setPropertyValue("tooltipText",e)&&this.tooltip&&this.tooltip.visible&&this.showTooltip()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipContainer",{get:function(){return this._tooltipContainer?this._tooltipContainer:this._parent?this._parent.tooltipContainer:void 0},set:function(e){this._tooltipContainer=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipX",{get:function(){return this.getTooltipX()},set:function(e){this.setPercentProperty("tooltipX",e)&&this.tooltip&&this.tooltip.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"alwaysShowTooltip",{get:function(){return this.getPropertyValue("showTooltipOn")=="always"},set:function(e){(e=ve(e))&&(this.showTooltipOn="always")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"showTooltipOn",{get:function(){return this.getPropertyValue("showTooltipOn")},set:function(e){this.setPropertyValue("showTooltipOn",e)&&(e=="hit"&&(this.clickable=!0),this.tooltip&&(e=="always"?this.showTooltip():this.handleAlwaysShowTooltip()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipPosition",{get:function(){return this.getPropertyValue("tooltipPosition")},set:function(e){this.setPropertyValue("tooltipPosition",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipY",{get:function(){return this.getTooltipY()},set:function(e){this.setPercentProperty("tooltipY",e)&&this.tooltip&&this.tooltip.invalidate()},enumerable:!0,configurable:!0}),i.prototype.getTooltipX=function(){var e,t=this.getPropertyValue("tooltipX");return v(t)||(t=F(50)),y(t)&&(e=t),t instanceof te&&(e=this.maxLeftSelf+this._measuredWidthSelf*t.value-this.pixelPaddingLeft-this.ex),y(e)||(e=0),e},i.prototype.getTooltipY=function(){var e,t=this.getPropertyValue("tooltipY");return v(t)||(t=F(50)),y(t)&&(e=t),t instanceof te&&(e=this.maxTopSelf+this._measuredHeightSelf*t.value-this.pixelPaddingTop-this.ey),y(e)||(e=0),e},i.prototype.raiseCriticalError=function(e,t){this.svgContainer&&(this._adapterO?this.modal.content=this._adapterO.apply("criticalError",e).message:this.modal.content=e.message,t?this.modal.closable=!0:this.disabled=!0,Z.suppressErrors||this.modal.open()),Z.verbose&&console.log(e)},i.prototype.processConfig=function(e){e&&(v(e.tooltipColorSource)&&J(e.tooltipColorSource)&&this.map.hasKey(e.tooltipColorSource)&&(e.tooltipColorSource=this.map.getKey(e.tooltipColorSource)),v(e.cursorOverStyle)&&J(e.cursorOverStyle)&&(e.cursorOverStyle=this.getCursorStyle(e.cursorOverStyle)),v(e.cursorDowntyle)&&J(e.cursorDowntyle)&&(e.cursorDowntyle=this.getCursorStyle(e.cursorDowntyle)),v(e.cursorOptions)&&(v(e.cursorOptions.overStyle)&&J(e.cursorOptions.overStyle)&&(e.cursorOptions.overStyle=this.getCursorStyle(e.cursorOptions.overStyle)),v(e.cursorOptions.downStyle)&&J(e.cursorOptions.downStyle)&&(e.cursorOptions.downStyle=this.getCursorStyle(e.cursorOptions.downStyle)))),s.prototype.processConfig.call(this,e),this.processDelayedMap()},i.prototype.getCursorStyle=function(e){switch(e){case"grab":return He.grab;case"grabbing":return He.grabbing;case"pointer":return He.pointer;case"horizontalResize":return He.horizontalResize;case"verticalResize":return He.verticalResize;default:return He.default}},i.prototype.configOrder=function(e,t){return e==t?0:e=="tooltipColorSource"?1:t=="tooltipColorSource"?-1:s.prototype.configOrder.call(this,e,t)},Object.defineProperty(i.prototype,"isHidden",{get:function(){return this._isHidden?this._isHidden:!!this._parent&&this._parent.isHidden},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"showOnInit",{get:function(){return this.getPropertyValue("showOnInit")},set:function(e){e=ve(e),this.setShowOnInit(e)},enumerable:!0,configurable:!0}),i.prototype.setShowOnInit=function(e){this.setPropertyValue("showOnInit",e)&&(this.isTemplate||(!e||this.inited||this.hidden?this._showOnInitDisposer&&this._showOnInitDisposer.dispose():(this._showOnInitDisposer=new _e([_.events.once("enterframe",this.hideInitially,this),this.events.once("beforevalidated",this.hideInitially,this,!1),this.events.on("inited",this.appear,this,!1)]),this._disposers.push(this._showOnInitDisposer))))},i.prototype.hideInitially=function(){this.isDisposed()||(this.appeared=!1,this.inited||this.hide(0))},i.prototype.appear=function(){var e=this;if(this.appeared=!1,this.hidden||this.isHidden||this.hide(0),this.hidden)this.appeared=!0,this.dispatch("appeared");else{var t=this.show();t&&!t.isFinished()?this.addDisposer(t.events.on("animationended",function(){e.appeared=!0,e.dispatch("appeared")})):(this.appeared=!0,this.dispatch("appeared"))}},Object.defineProperty(i.prototype,"hidden",{get:function(){return this.getPropertyValue("hidden")},set:function(e){e=ve(e),this.setPropertyValue("hidden",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bbox",{get:function(){return this.definedBBox?this.definedBBox:this._bbox},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"plugins",{get:function(){var e=this;return this._plugins||(this._plugins=new re,this._disposers.push(this._plugins.events.on("inserted",function(t){t.newValue.target=e,t.newValue.init()})),this._disposers.push(new fe(this._plugins))),this._plugins},enumerable:!0,configurable:!0}),i.prototype._systemUpdate=function(e){this.validate()},i.prototype._systemCheckIfValidate=function(){return!0},i.prototype._systemValidatePositions=function(){this.validatePosition()},i.prototype._systemValidateLayouts=function(){},i}(wt);_.registeredClasses.Sprite=$;var Mn=function(s){function i(){var e=s.call(this)||this;return e.className="Rectangle",e.element=e.paper.add("rect"),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this._positionPrecision;this.pixelPerfect&&(e=0);var t=V(this.innerWidth,e),n=V(this.innerHeight,e);this.element.attr({width:t,height:n})},i.prototype.measureElement=function(){},Object.defineProperty(i.prototype,"bbox",{get:function(){return this.definedBBox?this.definedBBox:this.isMeasured?{x:0,y:0,width:this.innerWidth,height:this.innerHeight}:{x:0,y:0,width:0,height:0}},enumerable:!0,configurable:!0}),i}($);_.registeredClasses.Rectangle=Mn;var W=function(s){function i(){var e=s.call(this)||this;return e._childrenByLayout=[],e._childrenDisposers=new me,e.hasFocused=!1,e.setStateOnSprites=[],e.layoutInvalid=!1,e._absoluteWidth=0,e._absoluteHeight=0,e._shouldBeReady=[],e._tapToActivate=!1,e.tapTimeout=3e3,e.className="Container",e._element=e.paper.addGroup("g"),e.group.add(e.element),e.setPropertyValue("pixelPerfect",!1),e.setPropertyValue("layout","absolute"),e.setPropertyValue("fixedWidthGrid",!1),e.setPropertyValue("verticalCenter","none"),e.setPropertyValue("horizontalCenter","none"),e._positionPrecision=4,e._disposers.push(new Jt(e._childrenDisposers)),e.children.events.on("inserted",e.handleChildAdded,e),e.children.events.on("removed",e.handleChildRemoved,e),e.applyTheme(),e}return w(i,s),i.prototype.handleChildAdded=function(e){this.processChild(e.newValue)},i.prototype.processChild=function(e){try{this._childrenDisposers.insertKey(e.uid,new _e([e.events.on("transformed",this.handleChildTransform,this),e.events.on("zIndexChanged",this.sortAndAdd,this)]))}catch{}this.element&&this.element.add(e.group),e.parent=this,e.paper=this.paper,this.dispatchImmediately("childadded",{type:"childadded",newValue:e}),this.invalidate()},i.prototype.sortAndAdd=function(){this.sortChildren(),this.addChildren()},i.prototype.handleChildRemoved=function(e){var t=e.oldValue;this._childrenDisposers.removeKey(t.uid),this.element&&this.element.removeElement(t.group),t.isMeasured&&this.invalidateLayout(),this.dispatchImmediately("childremoved",{type:"childremoved",oldValue:t})},i.prototype.handleChildTransform=function(e){e.target.isMeasured&&this.invalidateLayout()},i.prototype.invalidateLayout=function(){this.layoutInvalid||this.disabled||this.isTemplate||this.layout=="none"||this.__disabled||(this.layoutInvalid=!0,_.addToInvalidLayouts(this),Q.requestFrame())},i.prototype.invalidate=function(){s.prototype.invalidate.call(this),this.invalidateLayout()},i.prototype.deepInvalidate=function(){s.prototype.invalidate.call(this),j(this._childrenByLayout,function(e){e instanceof i?e.deepInvalidate():e.invalidate()}),this.invalidateLayout()},Object.defineProperty(i.prototype,"children",{get:function(){return this._children||(this._children=new re),this._children},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minWidth",{get:function(){return this.getPropertyValue("minWidth")},set:function(e){this.setPropertyValue("minWidth",e)&&this.invalidateLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minHeight",{get:function(){return this.getPropertyValue("minHeight")},set:function(e){this.setPropertyValue("minHeight",e)&&this.invalidateLayout()},enumerable:!0,configurable:!0}),i.prototype.removeElement=function(){},i.prototype.sortChildren=function(){var e=this;if(this._childrenByLayout=[],this.layout!="none"&&this.layout!="absolute"&&this.layout){var t=[],n=[];A(this.children.iterator(),function(r){e.layout=="horizontal"||e.layout=="grid"?y(r.percentWidth)?n.push(r):t.push(r):e.layout=="vertical"&&y(r.percentHeight)?n.push(r):t.push(r)}),this._childrenByLayout=t.concat(n)}else this._childrenByLayout=this.children.values;this.calculateRelativeSize()},i.prototype.calculateRelativeSize=function(){var e=this,t=0,n=0;j(this._childrenByLayout,function(r){r.isMeasured&&(y(r.percentWidth)&&(t+=r.percentWidth),y(r.percentHeight)&&(n+=r.percentHeight))}),j(this._childrenByLayout,function(r){r.isMeasured&&(e.layout=="horizontal"&&(y(r.percentWidth)&&(r.relativeWidth=r.percentWidth/t),y(r.percentHeight)&&(r.relativeHeight=r.percentHeight/100)),e.layout=="vertical"&&(y(r.percentHeight)&&(r.relativeHeight=r.percentHeight/n),y(r.percentWidth)&&(r.relativeWidth=r.percentWidth/100)),e.layout=="grid"&&(y(r.percentHeight)&&(r.relativeHeight=r.percentHeight/100),y(r.percentWidth)&&(r.relativeWidth=r.percentWidth/100))),e.layout!="absolute"&&r.isMeasured||(y(r.percentWidth)&&(r.relativeWidth=r.percentWidth/100),y(r.percentHeight)&&(r.relativeHeight=r.percentHeight/100))})},i.prototype.addChildren=function(){if(this.element){var e=ji(this.children.values),t=e.map(function(l,h){return{idx:h,data:l}});t.sort(function(l,h){var p=l.data.zIndex||0,u=h.data.zIndex||0;return p<u?-1:p>u?1:l.idx-h.idx}),e=t.map(function(l){return l.data});var n=this.element,r=!0;if(n.node&&n.node.childNodes){for(var a=0,o=n.node.childNodes.length;a<o;a++)if(n.node.childNodes[a]!=e[a].group.node){r=!1;break}}r||(j(e,function(l){l.group&&n.add(l.group)}),this._background&&this.group.addToBack(this._background.group),this.invalidateLayout())}},i.prototype.createChild=function(e){var t=new e;return t.parent=this,t},i.prototype.removeChildren=function(){for(;this.children.length>0;){var e=this.children.getIndex(0);e.parent=void 0,this.children.removeValue(e)}},i.prototype.disposeChildren=function(){for(;this.children.length>0;){var e=this.children.getIndex(0);e.dispose(),this.children.removeValue(e)}},Object.defineProperty(i.prototype,"background",{get:function(){return this._background||(this._background=this.createBackground(),this.processBackground()),this._background},set:function(e){this._background&&this.background!=e&&this.removeDispose(this._background),e&&(this._background=e,this._disposers.push(e),this.processBackground())},enumerable:!0,configurable:!0}),i.prototype.handleGlobalScale=function(){s.prototype.handleGlobalScale.call(this),this.children.each(function(e){e.handleGlobalScale()})},i.prototype.createBackground=function(){return new Mn},i.prototype.processBackground=function(){var e=this._background;e&&(e.isMeasured=!1,this._background.fill=new ae().getFor("background"),e.parent=this,e.isMeasured=!1,this.children.removeValue(e),this._disposers.push(e),this.group.addToBack(this._background.group))},i.prototype.validateLayout=function(){var e=this;_.removeFromInvalidLayouts(this),this.layoutInvalid=!1,this._availableWidth=this.innerWidth,this._availableHeight=this.innerHeight;var t=0,n=0,r=!0;this.children&&(this.sortChildren(),j(this._childrenByLayout,function(a){var o,l;if(y(a.relativeWidth)?(o=V(e._availableWidth*a.relativeWidth,2),e.layout=="horizontal"&&(o-=a.pixelMarginRight+a.pixelMarginLeft)):e.layout=="horizontal"&&a.invalid&&a.validate(),y(a.relativeHeight)?(l=V(e._availableHeight*a.relativeHeight,2),e.layout=="vertical"&&(l-=a.pixelMarginTop+a.pixelMarginBottom)):e.layout=="vertical"&&a.invalid&&a.validate(),a.invalid==0){if(y(a.relativeWidth)&&(a.maxWidth=o),y(a.relativeHeight)&&(a.maxHeight=l),a.isMeasured){e.layout=="horizontal"&&(y(a.percentWidth)||a.measuredWidth>0&&(e._availableWidth-=a.measuredWidth+a.pixelMarginLeft+a.pixelMarginRight)),e.layout=="vertical"&&(y(a.percentHeight)||a.measuredHeight>0&&(e._availableHeight-=a.measuredHeight+a.pixelMarginTop+a.pixelMarginBottom));var h=a.measuredWidth,p=a.measuredHeight;a.align!="none"&&(h+=a.pixelMarginLeft+a.pixelMarginRight),a.valign!="none"&&(p+=a.pixelMarginTop+a.pixelMarginBottom),t=Math.max(t,h),n=Math.max(n,p)}}else a.isMeasured&&(y(a.relativeWidth)&&a.maxWidth!=o&&(a.maxWidth=o,r=!1),y(a.relativeHeight)&&a.maxHeight!=l&&(a.maxHeight=l,r=!1))})),this._absoluteWidth=t,this._absoluteHeight=n,r&&this.arrange()},i.prototype.arrange=function(){var e,t,n,r,a,o,l,h,p,u,d,c=this,f=this.children,g=0,m=0,x=q(this.innerWidth,this._absoluteWidth),b=q(this.innerHeight,this._absoluteHeight),C=this.pixelPaddingLeft,S=this.pixelPaddingRight,P=this.pixelPaddingTop,O=this.pixelPaddingBottom,I=0,k=0,D=0,G=0,H=[],ne=[],Te=this.maxWidth,Ge=this.maxHeight,he=this.minWidth,et=this.minHeight,we=ji(f.values);if(this.reverseOrder&&we.reverse(),this.layout=="grid"){o=Te,a=1;for(var U=0,nt=we.length;U<nt;U++)if((Y=we[U]).isMeasured&&!Y.disabled&&!Y.__disabled){var qe=Y.measuredWidth;qe<o&&(o=qe),qe>a&&(a=qe)}o=R(o,1,Te),a=R(a,1,Te),l=this.fixedWidthGrid?Te/a:Te/o,l=q(1,Math.floor(l)),l=ie(this.maxColumns,l),H=this.getColumnWidth(we,l,a)}for(U=0,nt=we.length;U<nt;U++){var Y;if(!(Y=we[U]).isMeasured||Y.disabled||Y.__disabled)Y.validatePosition();else{var We=void 0,ge=void 0,ke=Y.pixelMarginLeft,Lt=Y.pixelMarginRight,tt=Y.pixelMarginTop,Je=Y.pixelMarginBottom,Dt=Y.measuredWidth,jt=Y.measuredHeight,Oi=void 0,Si=void 0,Ii=void 0,ys=void 0;switch(this.layout){case"none":break;case"absolute":switch(Y.align){case"left":We=ke-Y.maxLeft;break;case"center":We=(x-Dt)/2-Y.maxLeft;break;case"right":We=x-Lt-Y.maxRight;break;default:Y.x instanceof te||(We=Y.pixelX)}switch(Y.valign){case"top":ge=tt-Y.maxTop;break;case"middle":ge=(b-jt)/2-Y.maxTop;break;case"bottom":ge=b-Je-Y.maxBottom;break;default:Y.y instanceof te||(ge=Y.pixelY)}break;case"vertical":switch(Y.align){case"left":We=ke-Y.maxLeft;break;case"center":We=(x-Dt)/2-Y.maxLeft;break;case"right":We=x-Lt-Y.maxRight;break;default:We=Y.pixelX}k=(ge=k+tt-Y.maxTop)+Y.maxBottom+Je;break;case"horizontal":switch(Y.valign){case"top":ge=tt-Y.maxTop;break;case"middle":ge=(b-jt)/2-Y.maxTop;break;case"bottom":ge=b-Je-Y.maxBottom;break;default:ge=Y.pixelY}I=(We=I+ke-Y.maxLeft)+Y.maxRight+Lt;break;case"grid":switch(We=I+ke-Y.maxLeft,Y.valign){case"top":ge=k+tt-Y.maxTop;break;case"middle":ge=k+(b-jt)/2-Y.maxTop;break;case"bottom":ge=k+b-Je-Y.maxBottom;break;default:ge=k-Y.maxTop}I+=H[G],ne[D]=q(ne[D],jt);var qo=H[++G];if(y(qo)||(qo=a),I>ie(this.innerWidth,Te)-qo+1&&G<l){l=G,I=0,k=0,D=0,G=0,H=this.getColumnWidth(we,l,a),ne=[],U=-1;continue}G>=l&&(G=0,k+=ne[D],D++,I=0)}this.layout!=="none"&&(Y.moveTo({x:We,y:ge}),Oi=We+Y.maxLeft-ke,Si=We+Y.maxRight+Lt,Ii=ge+Y.maxTop-tt,ys=ge+Y.maxBottom+Je,(Si>t||!y(t))&&(t=Si),(Oi<e||!y(e))&&(e=Oi),(Ii<n||!y(n))&&(n=Ii),(ys>r||!y(r))&&(r=ys),(Si>p||!y(p))&&(p=Si),(Oi<h||!y(h))&&(h=Oi),(Ii<u||!y(u))&&(u=Ii),ys>d||y(d))}}if(this.layout=="none"){var nn=this.bbox;e=nn.x,t=nn.x+nn.width,n=nn.y,r=nn.y+nn.height}y(e)||(e=0,h=0),y(t)||(p=t=this._availableWidth),y(n)||(n=0,u=0),y(r)||(d=r=this._availableHeight),y(u)||(u=0),y(d)||(d=u),y(h)||(h=0),y(p)||(p=h),g=t-e,m=r-n,y(this.relativeWidth)&&(e=0,t=g=Te-C-S),y(this.relativeHeight)&&(n=0,r=m=Ge-P-O),y(this._pixelWidth)&&(e=0,g=this._pixelWidth-C-S),y(he)&&g<he&&(e=0,g=this.minWidth-C-S),y(this._pixelHeight)&&(n=0,m=this._pixelHeight-P-O),y(et)&&m<et&&(n=0,m=et-P-O);var ms=p-h,vs=d-u;if(this.layout!="none"&&(this.contentAlign||this.contentValign)&&f.length>0){var bs,xs,_s=g,Ps=m;_s<ms&&(_s=ms),Ps<vs&&(Ps=vs),this.contentAlign=="center"&&(bs=(_s-ms)/2),this.contentAlign=="right"&&(bs=_s-ms),this.contentValign=="middle"&&(xs=(Ps-vs)/2),this.contentValign=="bottom"&&(xs=Ps-vs),y(bs)&&A(f.iterator(),function(je){var rn=je.maxLeft,lt=bs;c.layout=="horizontal"&&(je.x=je.pixelX+lt),c.layout=="grid"&&(je.x=je.pixelX+lt),c.layout=="vertical"&&(lt+=je.pixelMarginLeft,je.align=="none"&&(je.x=lt-rn)),c.layout=="absolute"&&(lt+=je.pixelMarginLeft,je.align=="none"&&(je.x=lt-rn))}),y(xs)&&A(f.iterator(),function(je){var rn=je.maxTop,lt=xs;c.layout=="horizontal"&&(lt+=je.pixelMarginTop,je.valign=="none"&&(je.y=lt-rn)),c.layout=="grid"&&(lt+=je.pixelMarginTop,je.y=lt-rn),c.layout=="vertical"&&(je.y=je.pixelY+lt),c.layout=="absolute"&&(lt+=je.pixelMarginTop,je.valign=="none"&&(je.y=lt-rn))})}var $o=this.bbox;g=q(g,he),m=q(m,et),this.contentWidth=g,this.contentHeight=m,g=ie(g,Te),m=ie(m,Ge),this._bbox={x:e,y:n,width:g,height:m};var Ad=this.maxLeft,Vd=this.maxTop,Fd=this.maxBottom,Md=this.maxRight;if(this.measure(),(Ad!=this.maxLeft||Md!=this.maxRight||Vd!=this.maxTop||Fd!=this.maxBottom)&&this.events.isEnabled("transformed")){var cu={type:"transformed",target:this};$o&&(cu.dummyData=$o.width+" "+g+" "+$o.height+" "+m),this.events.dispatchImmediately("transformed",cu)}this.dispatchImmediately("layoutvalidated")},i.prototype.updateCenter=function(){s.prototype.updateCenter.call(this),this.updateBackground()},i.prototype.updateBackground=function(){var e=this._background;e&&(e.x=this.maxLeft,e.y=this.maxTop,e.width=this.maxRight-this.maxLeft,e.height=this.maxBottom-this.maxTop)},i.prototype.getColumnWidth=function(e,t,n){var r=this,a=[],o=0;return j(e,function(l){!l.isMeasured||l.disabled||l.__disabled||(r.fixedWidthGrid?a[o]=n:a[o]=q(a[o],l.measuredWidth+l.pixelMarginRight+l.pixelMarginLeft),++o==t&&(o=0))}),a},Object.defineProperty(i.prototype,"layout",{get:function(){return this.getPropertyValue("layout")},set:function(e){this.setPropertyValue("layout",e)&&this.invalidateLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"contentValign",{get:function(){return this.getPropertyValue("contentValign")},set:function(e){this.setPropertyValue("contentValign",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"contentAlign",{get:function(){return this.getPropertyValue("contentAlign")},set:function(e){this.setPropertyValue("contentAlign",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fixedWidthGrid",{get:function(){return this.getPropertyValue("fixedWidthGrid")},set:function(e){this.setPropertyValue("fixedWidthGrid",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxColumns",{get:function(){return this.getPropertyValue("maxColumns")},set:function(e){this.setPropertyValue("maxColumns",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"reverseOrder",{get:function(){return this.getPropertyValue("reverseOrder")},set:function(e){this.setPropertyValue("reverseOrder",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"setStateOnChildren",{get:function(){return this.getPropertyValue("setStateOnChildren")},set:function(e){this.setPropertyValue("setStateOnChildren",e,!0)},enumerable:!0,configurable:!0}),i.prototype.fitsToBounds=function(e){var t=e.x,n=e.y;return t>=-.5&&t<=this.pixelWidth+.5&&n>=-.5&&n<=this.pixelHeight+.5},i.prototype.copyFrom=function(e){var t=this;s.prototype.copyFrom.call(this,e),this.layout=e.layout,this.setStateOnChildren=e.setStateOnChildren,e._background&&(this.background=e._background.clone(),this.background.copyFrom(e._background)),A(e.children.iterator(),function(n){n.shouldClone&&(n.clone().parent=t)})},Object.defineProperty(i.prototype,"preloader",{get:function(){return this._preloader||(this.parent?this.parent.preloader:void 0)},set:function(e){this._preloader&&this.removeDispose(this._preloader),this._preloader=e,e&&(e.parent=this.tooltipContainer,this._disposers.push(e))},enumerable:!0,configurable:!0}),i.prototype.setPaper=function(e){var t=this,n=s.prototype.setPaper.call(this,e);return n&&(this._background&&(this._background.paper=e,this._background.topParent=this.topParent),this.children.each(function(r){r.setPaper(e),r.topParent=t.topParent})),n},i.prototype.removeFromInvalids=function(){s.prototype.removeFromInvalids.call(this),_.removeFromInvalidLayouts(this)},i.prototype.setDataItem=function(e){this._dataItem!=e&&(A(this.children.iterator(),function(t){t.dataItem=e}),this._background&&(this._background.dataItem=e)),s.prototype.setDataItem.call(this,e)},i.prototype.measureElement=function(){this.disabled||this.isTemplate||this.layout=="none"||this.__disabled||this.validateLayout()},Object.defineProperty(i.prototype,"fontFamily",{get:function(){return this.getPropertyValue("fontFamily")},set:function(e){this.setPropertyValue("fontFamily",e,!0)&&(this.setSVGAttribute({"font-family":e}),this.invalidateLabels())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fontSize",{get:function(){return this.getPropertyValue("fontSize")},set:function(e){this.setPropertyValue("fontSize",e,!0)&&(this.setSVGAttribute({"font-size":e}),this.invalidateLabels())},enumerable:!0,configurable:!0}),i.prototype.invalidateLabels=function(){this.children.each(function(e){e.hardInvalidate?(e.hardInvalidate(),e.events.once("validated",e.handleValidate,e,!1)):e instanceof i&&e.invalidateLabels()})},Object.defineProperty(i.prototype,"fontWeight",{get:function(){return this.getPropertyValue("fontWeight")},set:function(e){this.setPropertyValue("fontWeight",e),this.setSVGAttribute({"font-weight":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"textDecoration",{get:function(){return this.getPropertyValue("textDecoration")},set:function(e){this.setPropertyValue("textDecoration",e),this.setSVGAttribute({"text-decoration":e})},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._background&&this._background.dispose(),this._shouldBeReady=[],this.disposeChildren(),s.prototype.dispose.call(this)},i.prototype.setState=function(e,t,n){var r=e;return e instanceof Tn&&(r=e.name),this.setStateOnChildren&&A(this.children.iterator(),function(a){a.setState(r,t,n),r!="active"&&(a.isActive=!1)}),this._background&&this._background.setState(r),this.setStateOnSprites.length&&j(this.setStateOnSprites,function(a){a.setState(r,t,n)}),s.prototype.setState.call(this,e,t,n)},i.prototype.setActive=function(e){s.prototype.setActive.call(this,e),this._background&&(this._background.isActive=e)},i.prototype.dispatchReady=function(){var e=this;if(!this.isReady()&&!this.isDisposed()){var t=!0;rt(this.children.iterator(),function(n){return!!(n.__disabled||n.disabled||n.isReady())||(t=!1,!1)}),hr(this._shouldBeReady,function(n){return!!(n.__disabled||n.disabled||n.isReady())||(t=!1,!1)}),t?s.prototype.dispatchReady.call(this):_.events.once("exitframe",function(){e.dispatchReady(),Q.requestFrame()},void 0,!1)}},i.prototype._systemUpdate=function(e){this.children.each(function(t){t.invalid&&(t._systemCheckIfValidate()?t.dataItem&&t.dataItem.component&&t.dataItem.component.dataInvalid?e.push(t):t.validate():e.push(t))}),s.prototype._systemUpdate.call(this,e)},i.prototype._systemValidatePositions=function(){this.children.each(function(e){e.positionInvalid&&e.validatePosition()}),s.prototype._systemValidatePositions.call(this)},i.prototype._systemValidateLayouts=function(){this.layoutInvalid&&!this.isDisposed()&&this.validateLayout()},Object.defineProperty(i.prototype,"tapToActivate",{get:function(){return this._tapToActivate},set:function(e){this._tapToActivate!=e&&this.setTapToActivate(e)},enumerable:!0,configurable:!0}),i.prototype.setTapToActivate=function(e){var t=this;this._tapToActivate=e,this.interactions.isTouchProtected=e,e&&this.interactions.setEventDisposer("container-tapToActivate",e,function(){return new _e([t.events.on("hit",t.handleTapToActivate,t,!1),t.events.on("down",t.initTapTimeout,t,!1),t.events.on("track",t.initTapTimeout,t,!1),K().body.events.on("down",function(n){K().isLocalElement(n.pointer,t.paper.svg,t.uid)||t.handleTapToActivateDeactivation()},t,!1)])}),K()},i.prototype.handleTapToActivate=function(){this.interactions.isTouchProtected=!1,this.initTapTimeout()},i.prototype.handleTapToActivateDeactivation=function(){this.interactions.isTouchProtected=!0},i.prototype.initTapTimeout=function(){var e=this;this._tapToActivateTimeout&&this._tapToActivateTimeout.dispose(),this.tapToActivate&&!this.interactions.isTouchProtected&&this.tapTimeout&&(this._tapToActivateTimeout=this.setTimeout(function(){e.handleTapToActivateDeactivation()},this.tapTimeout))},i.prototype.moveHtmlContainer=function(e){var t=ka(e);if(t){this.htmlContainer=t;var n=this.svgContainer;n.htmlElement=t,n.htmlElement.appendChild(n.SVGContainer),n.initSensor(),n.measure()}else J(e)&&e!=""&&Q.log("html container '"+e+"' not found")},i.prototype.hasLicense=function(){if(Z.commercialLicense)return!0;for(var e=0;e<Z.licenses.length;e++)if(Z.licenses[e].match(/^CH.{5,}/i))return!0;return!1},i}($);_.registeredClasses.Container=W;var ip=function(){function s(){this._isPaused=!1,this.animations=[],this.uid=_.getUniqueId(),this.dummyCounter=0,this._frameRequested=!1,this.updateStepDuration=45,this.time=Date.now()}return s.prototype.reportTime=function(i,e){this.dummyCounter,e&&(this.time=Date.now())},s.prototype.update=function(){var i=this;if(!this._isPaused){this._frameRequested=!1;var e=Date.now();for(var t in _.dispatchImmediately("enterframe"),_.invalidDatas)if(_t(_.invalidDatas,t)){for(var n=_.invalidDatas[t];n.length>0;){var r=(a=n[0]).dataProvider;if(a.isDisposed())z(n,a);else if(r&&r.dataInvalid)try{if(r.validateData(),r.dataValidationProgress<1)break}catch(p){z(n,r),r.raiseCriticalError(p)}else try{if(a.validateData(),a.dataValidationProgress<1)break}catch(p){z(n,a),a.raiseCriticalError(p)}}if(Date.now()-e>this.updateStepDuration)break}for(;_.invalidRawDatas.length>0;)if((a=_.invalidRawDatas[0]).isDisposed())z(_.invalidRawDatas,a);else try{a.validateRawData()}catch(p){z(_.invalidRawDatas,a),a.raiseCriticalError(p)}for(;_.invalidDataItems.length>0;){if(r=(a=_.invalidDataItems[0]).dataProvider,!(a.isDisposed()||a.dataInvalid||r&&r.dataInvalid))try{a.validateDataItems()}catch(p){z(_.invalidDataItems,a),a.raiseCriticalError(p)}z(_.invalidDataItems,a)}for(;_.invalidDataRange.length>0;){var a;if(r=(a=_.invalidDataRange[0]).dataProvider,!(a.isDisposed()||a.dataInvalid||r&&r.dataInvalid))try{a.validateDataRange(),a.skipRangeEvent||a.dispatchImmediately("datarangechanged"),a.skipRangeEvent=!1}catch(p){z(_.invalidDataRange,a),a.raiseCriticalError(p)}z(_.invalidDataRange,a)}var o=[];X(_.invalidLayouts,function(p){i.validateLayouts(p)}),X(_.invalidPositions,function(p){i.validatePositions(p)});var l=!1;if(e=Date.now(),X(_.invalidSprites,function(p,u){for(var d=0;u.length>0;){if(i.validateLayouts(p),i.validatePositions(p),++d==5){if(Date.now()-e>i.updateStepDuration)break;d=0}var c=u[u.length-1];if(c&&!c.isDisposed()){if(c._systemCheckIfValidate())if(i.checkIfValidate2(c))try{c._systemUpdate(o)}catch(f){c.invalid=!1,z(u,c),c.raiseCriticalError(f)}else o.push(c);else o.push(c);c.invalid=!1}z(u,c)}_.invalidSprites[p]=_.invalidSprites[p].concat(o)}),X(_.invalidSprites,function(p,u){u.length>0&&(l=!0)}),X(_.invalidDatas,function(p,u){u.length>0&&(l=!0)}),j(ji(this.animations),function(p){p.update()}),X(_.invalidLayouts,function(p){i.validateLayouts(p)}),X(_.invalidPositions,function(p){i.validatePositions(p)}),_l(),X(_.invalidLayouts,function(p){i.validateLayouts(p)}),X(_.invalidPositions,function(p){i.validatePositions(p)}),_.dispatchImmediately("exitframe"),(l||this.animations.length>0||[].length>0)&&this.requestFrame(),this.updateStepDuration<200){var h=!0;X(_.invalidDatas,function(p,u){u.length>0&&(h=!1)}),X(_.invalidSprites,function(p,u){u.length>0&&(h=!1)}),h&&(this.updateStepDuration=200)}}},s.prototype.checkIfValidate2=function(i){return!(i.dataItem&&i.dataItem.component&&i.dataItem.component.dataInvalid&&!i.dataItem.component.isTemplate)},s.prototype.requestFrame=function(){var i=this;this._frameRequested||($s(function(){i.update()}),this._frameRequested=!0)},s.prototype.softInvalidate=function(i){var e=this;i.children.each(function(t){t instanceof W&&e.softInvalidate(t),t.measureFailed&&(Ye(t,"Label")?t.hardInvalidate():t.invalidate(),t.measureFailed=!1)})},s.prototype.validatePositions=function(i){for(var e=_.invalidPositions[i];e.length>0;){var t=e[e.length-1];if(t.isDisposed())z(e,t);else try{t._systemValidatePositions()}catch(n){t.positionInvalid=!1,z(e,t),t.raiseCriticalError(n)}}},s.prototype.validateLayouts=function(i){for(var e=_.invalidLayouts[i];e.length>0;){var t=e[e.length-1];if(t.isDisposed())z(e,t);else try{t.children.each(function(n){n._systemValidateLayouts()}),t.validateLayout()}catch(n){t.layoutInvalid=!1,z(e,t),t.raiseCriticalError(n)}}},s.prototype.log=function(i){(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];Z.verbose&&console&&console.log.apply(console,di(e))})(i)},Object.defineProperty(s.prototype,"isPaused",{get:function(){return this._isPaused},set:function(i){this._isPaused=i,i||(this._frameRequested=!1,this.requestFrame())},enumerable:!0,configurable:!0}),s.VERSION="4.10.28",s}(),Q=new ip,Ka=function(){function s(){}return s.prototype.parse=function(i){return[]},Object.defineProperty(s.prototype,"parsableNumbers",{get:function(){return this.options.numberFields&&this.options.numberFields.length>0},enumerable:!0,configurable:!0}),s.prototype.maybeToNumber=function(i,e){return this.options.numberFields.indexOf(i)!==-1?Or(e):e},Object.defineProperty(s.prototype,"parsableDates",{get:function(){return this.options.dateFields&&this.options.dateFields.length>0},enumerable:!0,configurable:!0}),s.prototype.maybeToDate=function(i,e){return this.options.dateFields.indexOf(i)!==-1?this.options.dateFormatter.parse(e,this.dateFormat):e},s.prototype.maybeToEmpty=function(i){return v(i)&&i!=""||!v(this.options.emptyAs)?i:this.options.emptyAs},Object.defineProperty(s.prototype,"dateFormatter",{get:function(){return this.options.dateFormatter||(this.options.dateFormatter=new Gi,this.options.dateFormat&&(this.options.dateFormat=this.options.dateFormat)),this.options.dateFormatter},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"dateFormat",{get:function(){return this.options.dateFormat||this.dateFormatter.inputDateFormat},enumerable:!0,configurable:!0}),s}(),hd=[",",";"," "],Ln=function(s){function i(){var e=s!==null&&s.apply(this,arguments)||this;return e.contentType="text/csv",e.options={delimiter:"",reverse:!1,skipRows:0,skipEmpty:!0,useColumnNames:!1},e}return w(i,s),i.isCSV=function(e){return!!i.getDelimiterFromData(e)},i.getDelimiterFromData=function(e){var t,n=e.split(`
- `),r=n.length;return j(hd,function(a){for(var o=0,l=0,h=0;h<r;++h){if(!((o=n[h].split(a).length)>1)){l=0;break}if(l===0)l=o;else if(o!=l){l=0;break}}l&&(t=a)}),t},i.prototype.parse=function(e){this.options.delimiter||(this.options.delimiter=i.getDelimiterFromData(e));var t,n,r,a=this.CSVToArray(e,this.options.delimiter),o=v(this.options.emptyAs),l=this.parsableNumbers,h=this.parsableDates,p=[],u=[];for(n=0;n<this.options.skipRows;n++)a.shift();if(this.options.useColumnNames){u=a.shift();for(var d=0;d<u.length;d++)(t=v(u[d])?u[d].replace(/^\s+|\s+$/gm,""):"")===""&&(t="col"+d),u[d]=t}for(;r=this.options.reverse?a.pop():a.shift();)if(!this.options.skipEmpty||r.length!==1||r[0]!==""){var c={};for(n=0;n<r.length;n++)c[t=u[n]===void 0?"col"+n:u[n]]=r[n]===""?this.options.emptyAs:r[n],o&&(c[t]=this.maybeToEmpty(c[t])),l&&(c[t]=this.maybeToNumber(t,c[t])),h&&(c[t]=this.maybeToDate(t,c[t]));p.push(c)}return p},i.prototype.CSVToArray=function(e,t){t=t||",";for(var n=new RegExp("(\\"+t+'|\\r?\\n|\\r|^)(?:"([^"]*(?:""[^"]*)*)"|([^"\\'+t+"\\r\\n]*))","gi"),r=[[]],a=null;a=n.exec(e);){var o,l=a[1];l.length&&l!==t&&r.push([]),o=a[2]?a[2].replace(new RegExp('""',"g"),'"'):a[3],r[r.length-1].push(o)}return r},i}(Ka),Ki=function(s){function i(){var e=s!==null&&s.apply(this,arguments)||this;return e.contentType="application/json",e.options={},e}return w(i,s),i.isJSON=function(e){try{return JSON.parse(e),!0}catch{return!1}},i.prototype.parse=function(e){var t,n=this;try{v(JSON)&&(t=JSON.parse(e))}catch{return}var r=v(this.options.emptyAs),a=this.parsableNumbers,o=this.parsableDates;if(Array.isArray(t)&&(a||o||r))for(var l=function(u,d){var c=t[u];X(c,function(f,g){r&&(c[f]=n.maybeToEmpty(c[f])),a&&(c[f]=n.maybeToNumber(f,c[f])),o&&(c[f]=n.maybeToDate(f,c[f]))})},h=0,p=t.length;h<p;h++)l(h);return t},i}(Ka),np=function(){function s(){this.adapter=new it(this)}return s.prototype.load=function(i){var e=Li(Array.isArray(i)?i:[i],function(t){return t.dispatchImmediately("started"),t.dispatchImmediately("loadstarted"),Fn(t.url,t,t.requestOptions)});Promise.all(e).then(function(t){j(t,function(n){var r=n.target;r.dispatchImmediately("loadended"),n.error?r.events.isEnabled("error")&&r.events.dispatchImmediately("error",{type:"error",code:n.xhr.status,message:r.language.translate("Unable to load file: %1",null,r.url),target:r}):r.processData(n.response,n.type),r.dispatchImmediately("ended")})}).catch(function(t){t.target&&(t.target.dispatchImmediately("loadended"),t.target.events.isEnabled("error")&&t.target.events.dispatchImmediately("error",{type:"error",code:t.xhr.status,message:t.target.language.translate("Unable to load file: %1",null,t.target.url),target:t.target}),t.target.dispatchImmediately("ended"))})},s.prototype.getParserByType=function(i){return this.adapter.apply("getParserByType",{parser:null,type:i}).parser||(i=="csv"||i=="text/csv"||i=="application/vnd.ms-excel"?new Ln:i=="json"||i=="application/json"?new Ki:void 0)},s.prototype.getParserByData=function(i,e){var t=this.adapter.apply("getParserByData",{parser:null,data:i,type:e}).parser;if(!t){if(t=this.getParserByType(e))return t;if(Ki.isJSON(i))return this.getParserByType("json");if(Ln.isCSV(i))return this.getParserByType("csv")}return t},s}(),Nr=new np,rp=function(s){function i(e,t){var n=s.call(this)||this;return n.adapter=new it(n),n._requestOptions={},n._incremental=!1,n._incrementalParams={},n._keepCount=!1,n._updateCurrentData=!1,n.showPreloader=!0,n.className="DataSource",e&&(n.url=e),t&&(n.parser=typeof t=="string"?Nr.getParserByType(t):t),n}return w(i,s),i.prototype.processData=function(e,t){if(this.dispatchImmediately("parsestarted"),this.parser||(this.parser=Nr.getParserByData(e,t),this.parser)){if(this.parser.options=this.adapter.apply("parserOptions",this.parser.options),this.parser.options.dateFields=this.adapter.apply("dateFields",this.parser.options.dateFields||[]),this.parser.options.numberFields=this.adapter.apply("numberFields",this.parser.options.numberFields||[]),this.parser.options.dateFields&&!this.parser.options.dateFormatter&&(this.parser.options.dateFormatter=this.dateFormatter),this.data=this.adapter.apply("parsedData",this.parser.parse(this.adapter.apply("unparsedData",e))),!v(this.data)&&this.events.isEnabled("parseerror")){var n={type:"parseerror",message:this.language.translate("Error parsing file: %1",null,this.url),target:this};this.events.dispatchImmediately("parseerror",n)}this.dispatchImmediately("parseended"),v(this.data)&&this.dispatchImmediately("done",{data:this.data}),this.lastLoad=new Date}else{if(this.events.isEnabled("parseerror")){var r={type:"parseerror",message:this.language.translate("No parser available for file: %1",null,this.url),target:this};this.events.dispatchImmediately("parseerror",r)}this.dispatchImmediately("parseended")}},Object.defineProperty(i.prototype,"url",{get:function(){var e=this.disableCache?this.timestampUrl(this._url):this._url;return this.incremental&&this.component.data.length&&(e=this.addUrlParams(e,this.incrementalParams)),this.adapter.apply("url",e)},set:function(e){this._url=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestOptions",{get:function(){return this.adapter.apply("requestOptions",this._requestOptions)},set:function(e){this._requestOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"parser",{get:function(){return this._parser||(this._parser=new Ki),this.adapter.apply("parser",this._parser)},set:function(e){this._parser=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"reloadFrequency",{get:function(){return this.adapter.apply("reloadTimeout",this._reloadFrequency)},set:function(e){var t=this;this._reloadFrequency!=e&&(this._reloadFrequency=e,e?v(this._reloadDisposer)||(this._reloadDisposer=this.events.on("ended",function(n){t._reloadTimeout=setTimeout(function(){t.load()},t.reloadFrequency)})):v(this._reloadDisposer)&&(this._reloadDisposer.dispose(),this._reloadDisposer=void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"incremental",{get:function(){return this.adapter.apply("incremental",this._incremental)},set:function(e){this._incremental=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"incrementalParams",{get:function(){return this.adapter.apply("incrementalParams",this._incrementalParams)},set:function(e){this._incrementalParams=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"keepCount",{get:function(){return this.adapter.apply("keepCount",this._keepCount)},set:function(e){this._keepCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"updateCurrentData",{get:function(){return this.adapter.apply("updateCurrentData",this._updateCurrentData)},set:function(e){this._updateCurrentData=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"language",{get:function(){return this._language?this._language:this.component?(this._language=this.component.language,this._language):(this.language=new Wt,this.language)},set:function(e){this._language=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dateFormatter",{get:function(){return this._dateFormatter?this._dateFormatter:this.component?(this._dateFormatter=this.component.dateFormatter,this._dateFormatter):(this.dateFormatter=new Gi,this.dateFormatter)},set:function(e){this._dateFormatter=e},enumerable:!0,configurable:!0}),i.prototype.timestampUrl=function(e){var t={};return t[new Date().getTime().toString()]="",this.addUrlParams(e,t)},i.prototype.dispose=function(){s.prototype.dispose.call(this),this._reloadTimeout&&clearTimeout(this._reloadTimeout),v(this._reloadDisposer)&&(this._reloadDisposer.dispose(),this._reloadDisposer=void 0)},i.prototype.load=function(){this.url&&(this._reloadTimeout&&clearTimeout(this._reloadTimeout),Nr.load(this))},i.prototype.addUrlParams=function(e,t){var n=e.match(/\?/)?"&":"?",r=[];return X(t,function(a,o){o!=""?r.push(a+"="+encodeURIComponent(o)):r.push(a)}),r.length?e+n+r.join("&"):e},i.prototype.processConfig=function(e){_.registeredClasses.json=Ki,_.registeredClasses.JSONParser=Ki,_.registeredClasses.csv=Ln,_.registeredClasses.CSVParser=Ln,s.prototype.processConfig.call(this,e)},i}(wt),sp=function(s){function i(){var e=s.call(this)||this;return e._rules=new re,e._appliedRules={},e._appliedTargets=[],e._useDefault=!0,e.adapter=new it(e),e._enabled=!1,e._responsiveDisposers=[],e._noStates=[],e.className="Responsive",e.rules.events.on("inserted",function(){e.checkRules()},!0),e.rules.events.on("removed",function(){e.checkRules()},!0),e._disposers.push(e.rules.events),e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"component",{get:function(){return this._component},set:function(e){var t=this;e!=this._component&&(this.disposeResponsiveHandlers(),this._component=e,this._responsiveDisposers.push(be(this.component).events.on("sizechanged",function(){t.checkRules()},this)),this._responsiveDisposers.push(be(this.component).events.once("datavalidated",function(){t._component.isReady()&&t.checkRules(!0)},this)),this.enabled=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"enabled",{get:function(){return this.adapter.apply("enabled",this._enabled)},set:function(e){this._enabled!=e&&(this._enabled=e,this.applyRules())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"useDefault",{get:function(){return this.adapter.apply("useDefault",this._useDefault)},set:function(e){this._useDefault!=e&&(this._useDefault=e,this.applyRules())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rules",{get:function(){return this.adapter.apply("rules",this._rules)},set:function(e){this._rules=e,this._enabled=!0,this.applyRules()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"defaultRules",{get:function(){return this.adapter.apply("defaultRules",Ne)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"allRules",{get:function(){var e=new re;return this.useDefault&&e.copyFrom(this.defaultRules),e.copyFrom(this.rules),this.adapter.apply("allRules",e)},enumerable:!0,configurable:!0}),i.prototype.isApplied=function(e){var t=this._appliedRules[e];return!!v(t)&&t},i.prototype.checkRules=function(e){var t=this;e===void 0&&(e=!1);var n=this.allRules;if(n&&n.length!=0){var r=!1,a=be(this.component);if(a.pixelWidth!=0&&a.pixelHeight!=0&&(A(n.iterator(),function(o){o.id||(o.id=_.getUniqueId());var l=o.relevant(a);(l&&!t.isApplied(o.id)||!l&&t.isApplied(o.id))&&(r=!0),t._appliedRules[o.id]=l}),e&&(r=!0),r)){if(!this.component.isReady())return a.hidden=!0,void a.events.once("ready",function(o){o.target.show(0),t._applyRules()});this.dispatchImmediately("ruleschanged"),this._applyRules()}}},i.prototype._applyRules=function(){var e=this;this._timeout&&this._timeout.dispose(),this._timeout=this.setTimeout(function(){e.applyRules()},10)},i.prototype.applyRules=function(e){var t=this,n=v(e)?e:be(this.component),r=!1;if(this.enabled){var a=!1;A(this.allRules.iterator(),function(o){var l=t.getState(o,n);l&&(r||(ht(t._appliedTargets,n.uid)!==-1&&n.setState(t.getDefaultState(n),0),r=!0),t.isApplied(be(o.id))&&(l.transitionDuration=0,t.setTargetState(n,l),t.dispatchImmediately("ruleapplied",{rule:o}),a=!0))}),a?ml(this._appliedTargets,n.uid):z(this._appliedTargets,n.uid)}n.children&&A(n.children.iterator(),function(o){t.applyRules(o)})},i.prototype.getState=function(e,t){var n="responsive-"+e.id,r=t.uid+"_"+n;if(ht(this._noStates,r)===-1){if(t.states.hasKey(n))return t.states.getKey(n);var a=e.state(t,n);return a||this._noStates.push(r),a}},i.prototype.getDefaultState=function(e){return e.states.hasKey("responsive-default")?e.states.getKey("responsive-default"):e.states.create("responsive-default")},i.prototype.setTargetState=function(e,t){var n=this,r=this.getDefaultState(e);X(t.properties,function(a,o){v(r.properties[a])||(r.properties[a]=n.getValue(e,a))}),e.setState(t)},i.prototype.getValue=function(e,t){var n=e.getPropertyValue(t);return!v(n)&&v(e[t])&&(n=e[t]),n},i.prototype.dispose=function(){this.disposeResponsiveHandlers(),s.prototype.dispose.call(this)},i.prototype.disposeResponsiveHandlers=function(){for(var e=this._responsiveDisposers.pop();e;)e.dispose(),e=this._responsiveDisposers.pop()},i}(wt),Ne=new re;Ne.events.on("inserted",function(s){s.newValue.id=_.getUniqueId()});var Ue=function(){function s(){}return s.widthXXS=function(i){return i.pixelWidth<=s.XXS},s.widthXS=function(i){return i.pixelWidth<=s.XS},s.widthS=function(i){return i.pixelWidth<=s.S},s.widthM=function(i){return i.pixelWidth<=s.M},s.widthL=function(i){return i.pixelWidth<=s.L},s.widthXL=function(i){return i.pixelWidth<=s.XL},s.widthXXL=function(i){return i.pixelWidth<=s.XXL},s.heightXXS=function(i){return i.pixelHeight<=s.XXS},s.heightXS=function(i){return i.pixelHeight<=s.XS},s.heightS=function(i){return i.pixelHeight<=s.S},s.heightM=function(i){return i.pixelHeight<=s.M},s.heightL=function(i){return i.pixelHeight<=s.L},s.heightXL=function(i){return i.pixelHeight<=s.XL},s.heightXXL=function(i){return i.pixelHeight<=s.XXL},s.isXXS=function(i){return i.pixelWidth<=s.XXS&&i.pixelHeight<=s.XXS},s.isXS=function(i){return i.pixelWidth<=s.XS&&i.pixelHeight<=s.XS},s.isS=function(i){return i.pixelWidth<=s.S&&i.pixelHeight<=s.S},s.isM=function(i){return i.pixelWidth<=s.M&&i.pixelHeight<=s.M},s.isL=function(i){return i.pixelWidth<=s.L&&i.pixelHeight<=s.L},s.isXL=function(i){return i.pixelWidth<=s.XL&&i.pixelHeight<=s.XL},s.isXXL=function(i){return i.pixelWidth<=s.XXL&&i.pixelHeight<=s.XXL},s.maybeXXS=function(i){return i.pixelWidth<=s.XXS||i.pixelHeight<=s.XXS},s.maybeXS=function(i){return i.pixelWidth<=s.XS||i.pixelHeight<=s.XS},s.maybeS=function(i){return i.pixelWidth<=s.S||i.pixelHeight<=s.S},s.maybeM=function(i){return i.pixelWidth<=s.M||i.pixelHeight<=s.M},s.maybeL=function(i){return i.pixelWidth<=s.L||i.pixelHeight<=s.L},s.maybeXL=function(i){return i.pixelWidth<=s.XL||i.pixelHeight<=s.XL},s.maybeXXL=function(i){return i.pixelWidth<=s.XXL||i.pixelHeight<=s.XXL},s.XXS=100,s.XS=200,s.S=300,s.M=400,s.L=600,s.XL=800,s.XXL=1e3,s}(),ei=function(s){function i(){var e=s.call(this)||this;return e._disabled=!1,e.hasProperties=!1,e.values={},e.categories={},e.dates={},e.locations={},e.workingLocations={},e.properties={},e.sprites=[],e.isTemplate=!1,e._index=null,e._visible=!0,e._hidden=!1,e._ignoreMinMax=!1,e.hasChildren={},e.isHiding=!1,e._valueAnimations={},e._locationAnimations={},e.className="DataItem",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"adapter",{get:function(){return this._adapterO||(this._adapterO=new it(this)),this._adapterO},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"index",{get:function(){return this.component&&this._index!=null?this._index:-1},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new Yi(this._animations))),this._animations},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"visible",{get:function(){return!this._hidden&&this._visible},set:function(e){e&&(this.hidden=!1),this._visible!=e&&this.setVisibility(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hidden",{get:function(){return this._hidden},set:function(e){this._hidden!=e&&(this._hidden=e,e?this.setVisibility(!1):this.setVisibility(!0,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"__disabled",{get:function(){return this._disabled},set:function(e){this._disabled=e,j(this.sprites,function(t){t.__disabled=e})},enumerable:!0,configurable:!0}),i.prototype.setVisibility=function(e,t){if(j(this.sprites,function(r){e?r.visible=r.defaultState.properties.visible:r.hiddenState?r.visible=r.hiddenState.properties.visible:r.visible=!1}),this._visible=e,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("visibilitychanged")){var n={type:"visibilitychanged",target:this,visible:e};this.events.dispatchImmediately("visibilitychanged",n)}},i.prototype.show=function(e,t,n){var r,a=this;if(!this.hidden)return this.setVisibility(!0,!0),this.isHiding=!1,this._hideDisposer&&this.removeDispose(this._hideDisposer),n&&j(n,function(o){r=a.setWorkingValue(o,a.values[o].value,e,t)}),j(this.sprites,function(o){var l=o.show(e);l==null||l.isFinished()||(a._disposers.push(l),t!=null&&t>0&&l.delay(t))}),r},i.prototype.dispose=function(){s.prototype.dispose.call(this),j(this.sprites,function(e){e.dispose()}),this.sprites=[]},i.prototype.hide=function(e,t,n,r){var a=this;if(this.isHiding=!0,j(this.sprites,function(l){var h=l.hide(e);h==null||h.isFinished()||(a._disposers.push(h),t!=null&&t>0&&h.delay(t))}),y(n)&&r){var o;if(j(r,function(l){var h=a.setWorkingValue(l,n,e,t);h&&(o=h)}),o&&!o.isFinished())return this._hideDisposer=o.events.on("animationended",function(){a.setVisibility(!1,!0),a.isHiding=!1}),this._disposers.push(this._hideDisposer),o;this.isHiding=!1,this.setVisibility(!1,!0)}else this.isHiding=!1,this.setVisibility(!1)},i.prototype.getDuration=function(e){if(!y(e)){var t=this.component;t&&(e=t.interpolationDuration)}if(e!=null)return this._adapterO?this._adapterO.apply("duration",e):e},i.prototype.getValue=function(e,t){if(e&&this.component){t||(t=this.component.dataFields[e+"Show"])||(t="value");var n=this.values[e][t];return this._adapterO&&this._adapterO.isEnabled("value")?this._adapterO.apply("value",{value:n,field:e}).value:n}},i.prototype.getWorkingValue=function(e){if(e&&this.component){var t=this.component.dataFields[e+"Show"];return t||(t="workingValue"),this._adapterO?this._adapterO.apply("workingValue",{workingValue:this.values[e][t],field:e}).workingValue:this.values[e][t]}},i.prototype.getActualWorkingValue=function(e){return this.values[e].workingValue},i.prototype.setValue=function(e,t,n,r){var a=this.values[e].value,o=this.getDuration(n);if(a!==(t=ce(t))){if(this.values[e].value=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("valuechanged")){var l={type:"valuechanged",target:this,property:e};this.events.dispatchImmediately("valuechanged",l)}this.component&&this.component.handleDataItemValueChange(this,e)}this.setWorkingValue(e,t,o,r)},i.prototype.setCalculatedValue=function(e,t,n){if(this.values[e][n]!==t&&y(t)){if(this.values[e][n]=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("calculatedvaluechanged")){var r={type:"calculatedvaluechanged",target:this,property:e};this.events.dispatchImmediately("calculatedvaluechanged",r)}this.component&&this.component.handleDataItemCalculatedValueChange(this,e)}},i.prototype.setWorkingValue=function(e,t,n,r){if(y(this.values[e].value)){var a=this.getDuration(n),o=this.values[e].workingValue;if(a!=null&&a>0&&y(o)&&this.component){if(o!=t){var l=this.animate({childObject:this.values[e],property:"workingValue",from:o,to:t,dummyData:e},a,this.component.interpolationEasing);return r!=null&&l.delay(r),l.events.on("animationstarted",this.handleInterpolationProgress,this),l.events.on("animationprogress",this.handleInterpolationProgress,this),l.events.on("animationended",this.handleInterpolationProgress,this),this._valueAnimations[e]=l,l}(h=this._valueAnimations[e])&&h.stop(),this.values[e].workingValue=t}else{var h;if((h=this._valueAnimations[e])&&h.stop(),this.values[e].workingValue=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("workingvaluechanged")){var p={type:"workingvaluechanged",target:this,property:e};this.events.dispatchImmediately("workingvaluechanged",p)}this.component&&this.component.handleDataItemWorkingValueChange(this,e)}}},i.prototype.setLocation=function(e,t,n,r){if(this.locations[e]!==t){if(this.locations[e]=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("locationchanged")){var a={type:"locationchanged",target:this,property:e};this.events.dispatchImmediately("locationchanged",a)}this.component&&this.component.handleDataItemValueChange(this,e),this.setWorkingLocation(e,t,n,r)}},i.prototype.setWorkingLocation=function(e,t,n,r){var a=this.getDuration(n),o=this.workingLocations[e];if(a!=null&&a>0&&y(o)&&this.component){if(o!=t){var l=this.animate({childObject:this.workingLocations,property:e,from:o,to:t,dummyData:e},a,this.component.interpolationEasing);return r!=null&&l.delay(r),l.events.on("animationstarted",this.handleInterpolationProgress,this),l.events.on("animationprogress",this.handleInterpolationProgress,this),l.events.on("animationended",this.handleInterpolationProgress,this),this._locationAnimations[e]=l,l}(h=this._locationAnimations[e])&&h.stop(),this.workingLocations[e]=t}else{var h;if((h=this._locationAnimations[e])&&h.stop(),this.workingLocations[e]=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("workinglocationchanged")){var p={type:"workinglocationchanged",target:this,property:e};this.events.dispatchImmediately("workinglocationchanged",p)}this.component&&this.component.handleDataItemWorkingLocationChange(this,e)}},i.prototype.setDate=function(e,t,n){!ki(t)&&this.component&&(t=this.component.dateFormatter.parse(t)),this.dates[e]!==t&&(this.dates[e]=t,this.setValue(e,t.getTime(),n))},i.prototype.getDate=function(e){return this._adapterO?this._adapterO.apply("date",{date:this.dates[e],field:e}).date:this.dates[e]},i.prototype.setProperty=function(e,t){if(this.properties[e]!==t){if(this.hasProperties=!0,this.properties[e]=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("propertychanged")){var n={type:"propertychanged",target:this,property:e,value:t};this.events.dispatchImmediately("propertychanged",n)}this.component&&this.component.handleDataItemPropertyChange(this,e)}},i.prototype.setCategory=function(e,t){J(t)||(t=sn(t)),this.categories[e]!==t&&(this.categories[e]=t)},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),e.dataContext&&(this.dataContext=ql(e.dataContext,{})),Vt(e.locations,this.locations),e._adapterO&&this.adapter.copyFrom(e._adapterO),this.component=e.component},Object.defineProperty(i.prototype,"opacity",{set:function(e){j(this.sprites,function(t){t.opacity=e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"ignoreMinMax",{get:function(){return this._ignoreMinMax},set:function(e){if(this._ignoreMinMax=e,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("propertychanged")){var t={type:"propertychanged",target:this,property:"ignoreMinMax",value:e};this.events.dispatchImmediately("propertychanged",t)}this.component&&this.component.handleDataItemPropertyChange(this,"ignoreMinMax")},enumerable:!0,configurable:!0}),i.prototype.animate=function(e,t,n){return new gt(this,e,t,n).start()},i.prototype.handleInterpolationProgress=function(e){var t=e.target.animationOptions[0];if(t){if(this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("workingvaluechanged")){var n={type:"workingvaluechanged",target:this,property:t.dummyData};this.events.dispatchImmediately("workingvaluechanged",n)}this.component&&this.component.handleDataItemWorkingValueChange(this,t.dummyData)}},i.prototype.hasValue=function(e){for(var t=0,n=e.length;t<n;t++){var r=this.values[e[t]];if(!r||!v(r.value))return!1}return!0},Object.defineProperty(i.prototype,"depth",{get:function(){return this.parent?this.parent.depth+1:0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dataContext",{get:function(){return this._dataContext},set:function(e){this._dataContext=e},enumerable:!0,configurable:!0}),i.prototype.addSprite=function(e){e.dataItem&&e.dataItem!=this&&z(e.dataItem.sprites,e),this.visible||e.hide(0),this.isHiding&&e.hide(),this.sprites.push(e),e.dataItem=this},i}(wt),ti=function(s){function i(){var e=s.call(this)||this;return e.dataFields={},e._dataSources={},e._parseDataFrom=0,e._dataDisposers=[],e._currentDataSetId="",e._start=0,e._end=1,e.skipRangeEvent=!1,e.rangeChangeDuration=0,e.rangeChangeEasing=Qt,e.parsingStepDuration=50,e.dataInvalid=!1,e.rawDataInvalid=!1,e.dataRangeInvalid=!1,e.dataItemsInvalid=!1,e.interpolationDuration=0,e.interpolationEasing=Qt,e.sequencedInterpolation=!0,e.sequencedInterpolationDelay=0,e.dataValidationProgress=0,e._addAllDataItems=!0,e._usesData=!0,e.className="Component",e.minZoomCount=1,e.maxZoomCount=0,e._dataItems=new yn(e.createDataItem()),e._dataItems.events.on("inserted",e.handleDataItemAdded,e,!1),e._dataItems.events.on("removed",e.handleDataItemRemoved,e,!1),e._disposers.push(new fe(e._dataItems)),e._disposers.push(e._dataItems.template),e.invalidateData(),e.dataUsers.events.on("inserted",e.handleDataUserAdded,e,!1),e._disposers.push(new _e(e._dataDisposers)),e._start=0,e._end=1,e.maxZoomDeclination=1,e.applyTheme(),e}return w(i,s),i.prototype.createDataItem=function(){return new ei},i.prototype.handleDataUserAdded=function(e){e.newValue.dataProvider=this},i.prototype.handleDataItemValueChange=function(e,t){this.dataItemsInvalid||this.invalidateDataItems()},i.prototype.handleDataItemWorkingValueChange=function(e,t){},i.prototype.handleDataItemWorkingLocationChange=function(e,t){},i.prototype.handleDataItemCalculatedValueChange=function(e,t){},i.prototype.handleDataItemPropertyChange=function(e,t){},i.prototype.processDataItem=function(e,t){var n=this;if(e){t||(t={}),e.dataContext=t;var r=!1;X(this.dataFields,function(a,o){var l=a,h=t[o];if(n._adapterO&&n._adapterO.isEnabled("dataContextValue")&&(h=n._adapterO.apply("dataContextValue",{field:l,value:h,dataItem:e}).value),v(h))if(r=!0,e.hasChildren[l]){var p=n.createDataItem();p.copyFrom(n.mainDataSet.template);var u=new yn(p);u.events.on("inserted",n.handleDataItemAdded,n,!1),u.events.on("removed",n.handleDataItemRemoved,n,!1),n._dataDisposers.push(new fe(u));for(var d=h.length,c=0;c<d;c++){var f=h[c],g=u.create();g.parent=e,n.processDataItem(g,f)}e[l]=u}else e[l]=h}),X(this.propertyFields,function(a,o){var l=a,h=t[o];v(h)&&(r=!0,e.setProperty(l,h))}),this._addAllDataItems||r||this.mainDataSet.remove(e)}},i.prototype.updateDataItem=function(e){var t=this;if(e){var n=e.dataContext;X(this.dataFields,function(r,a){var o=r,l=n[a];t._adapterO&&(l=t._adapterO.apply("dataContextValue",{field:o,value:l,dataItem:e}).value),v(l)&&(e.hasChildren[o]?e[o].each(function(h){t.updateDataItem(h)}):e[o]=l)}),X(this.propertyFields,function(r,a){var o=r,l=n[a];v(l)&&e.setProperty(o,l)})}},i.prototype.validateDataElements=function(){for(var e=this.endIndex,t=this.startIndex;t<e;t++){var n=this.dataItems.getIndex(t);n&&this.validateDataElement(n)}},i.prototype.validate=function(){this.validateDataElements(),s.prototype.validate.call(this)},i.prototype.validateDataElement=function(e){},i.prototype.addData=function(e,t,n){var r=this;if(!this.dataInvalid&&this.inited&&(this._parseDataFrom=this.data.length),n||(e instanceof Array?j(e,function(a){r.data.push(a)}):this.data.push(e)),this.inited)this.removeData(t,n);else if(y(t))for(;t>0;)this.data.shift(),t--;this.invalidateData()},i.prototype.removeData=function(e,t){if(y(e)&&e>0){for(;e>0;){var n=this.mainDataSet.getIndex(0);n&&this.mainDataSet.remove(n),this.dataUsers.each(function(r){if(!r.data||r.data.length==0){var a=r.mainDataSet.getIndex(0);a&&r.mainDataSet.remove(a)}}),t||this.data.shift(),this._parseDataFrom>0&&this._parseDataFrom--,e--}this.invalidateDataItems()}},i.prototype.invalidateData=function(){this.disabled||this.isTemplate||(_.addToInvalidComponents(this),Q.requestFrame(),this.dataInvalid=!0,A(this.dataUsers.iterator(),function(e){e.invalidateDataItems()}))},i.prototype.invalidateDataUsers=function(){A(this.dataUsers.iterator(),function(e){e.invalidate()})},i.prototype.invalidateDataItems=function(){this.disabled||this.isTemplate||(pt(_.invalidDataItems,this),Q.requestFrame(),this.dataItemsInvalid=!0,A(this.dataUsers.iterator(),function(e){e.invalidateDataItems()}))},i.prototype.invalidateDataRange=function(){this.disabled||this.isTemplate||(this.dataRangeInvalid=!0,pt(_.invalidDataRange,this),Q.requestFrame())},i.prototype.validateDataRange=function(){z(_.invalidDataRange,this),this.dataRangeInvalid=!1,this.startIndex==this._prevStartIndex&&this.endIndex==this._prevEndIndex||(this.rangeChangeUpdate(),this.appendDataItems(),this.invalidate(),this.dispatchImmediately("datarangechanged"))},i.prototype.sliceData=function(){this._workingStartIndex=this.startIndex,this._workingEndIndex=this.endIndex},i.prototype.rangeChangeUpdate=function(){this.sliceData(),this._prevStartIndex=this.startIndex,this._prevEndIndex=this.endIndex},i.prototype.appendDataItems=function(){for(var e=this.endIndex,t=this.startIndex;t<e;t++)(n=this.dataItems.getIndex(t))&&(n.__disabled=!1);for(t=0;t<this.startIndex;t++)(n=this.dataItems.getIndex(t))&&(n.__disabled=!0);for(t=this.endIndex;t<this.dataItems.length;t++){var n;(n=this.dataItems.getIndex(t))&&(n.__disabled=!0)}},i.prototype.invalidateRawData=function(){this.disabled||this.isTemplate||(pt(_.invalidRawDatas,this),Q.requestFrame(),this.rawDataInvalid=!0,A(this.dataUsers.iterator(),function(e){e.invalidateRawData()}))},i.prototype.validateRawData=function(){var e=this;z(_.invalidRawDatas,this),A(this.mainDataSet.iterator(),function(t){t&&e.updateDataItem(t)})},i.prototype.dispose=function(){var e=this;this.mainDataSet.template.clones.clear(),X(this._dataSources,function(t,n){e.removeDispose(n)}),this.disposeData(),s.prototype.dispose.call(this)},i.prototype.disposeData=function(){this.mainDataSet.template.clones.clear(),j(this._dataDisposers,function(e){e.dispose()}),A(this.dataUsers.iterator(),function(e){e.disposeData()}),this._dataDisposers.length=0,this._startIndex=void 0,this._endIndex=void 0,this.mainDataSet.clear(),this.mainDataSet.template.clones.clear(),this._dataSets&&this._dataSets.clear()},i.prototype.getDataItem=function(e){return this.mainDataSet.create()},i.prototype.validateData=function(){if(this.dispatchImmediately("beforedatavalidated"),this.dataInvalid=!1,_.removeFromInvalidComponents(this),!this.__disabled){if(this.dataValidationProgress=0,this._prevStartIndex=void 0,this._prevEndIndex=void 0,this._startIndex=void 0,this._endIndex=void 0,this.dataFields.data&&this.dataItem){var e=this.dataItem.dataContext;this._data=e[this.dataFields.data]}if(this._parseDataFrom===0&&this.data.length>0&&this.disposeData(),this.data.length>0){var t=this.preloader;A(this.dataUsers.iterator(),function(u){u._startIndex=void 0,u._endIndex=void 0});for(var n=0,r=Date.now(),a=this._parseDataFrom,o=this.data.length,l=function(){var u=h.data[a];if(h._usesData){var d=h.getDataItem(u);h.processDataItem(d,u)}if(h.dataUsers.each(function(c){if(c.data.length==0){var f=c.getDataItem(u);c.processDataItem(f,u)}}),++n==100&&(n=0,Date.now()-r>h.parsingStepDuration&&a<h.data.length-10))return h._parseDataFrom=a+1,t&&(a/h.data.length>.5&&!t.visible||(t.progress=a/h.data.length)),h.dataValidationProgress=a/h.data.length,a=h.data.length,h.invalidateData(),{value:void 0}},h=this;a<o;a++){var p=l();if(typeof p=="object")return p.value}t&&(t.progress=1),this.dataUsers.each(function(u){u.hidden&&u.hide(0)})}this.dataValidationProgress=1,this._parseDataFrom=0,this.invalidateDataItems(),this._internalDefaultsApplied||this.applyInternalDefaults(),this.dispatch("datavalidated")}},i.prototype.validateDataItems=function(){z(_.invalidDataItems,this),this.dataItemsInvalid=!1,this.invalidateDataRange(),this.invalidate(),this.dispatch("dataitemsvalidated")},Object.defineProperty(i.prototype,"data",{get:function(){return this._data||(this._data=[]),this._adapterO?this._adapterO.apply("data",this._data):this._data},set:function(e){this.setData(e)},enumerable:!0,configurable:!0}),i.prototype.setData=function(e){this.isDisposed()||(this._parseDataFrom=0,this.disposeData(),this._data=e,e&&e.length>0?this.invalidateData():(this.dispatchImmediately("beforedatavalidated"),this.dispatch("datavalidated")))},i.prototype.getDataSource=function(e){var t=this;return v(this._dataSources[e])||(this._dataSources[e]=new rp,this._dataSources[e].component=this,this.setDataSourceEvents(this._dataSources[e],e),this._dataSources[e].adapter.add("dateFields",function(n){return t.dataSourceDateFields(n)}),this._dataSources[e].adapter.add("numberFields",function(n){return t.dataSourceNumberFields(n)}),this.events.on("inited",function(){t.loadData(e)},this,!1)),this._dataSources[e]},Object.defineProperty(i.prototype,"dataSource",{get:function(){return this._dataSources.data||this.getDataSource("data"),this._dataSources.data},set:function(e){var t=this;this._dataSources.data&&this.removeDispose(this._dataSources.data),this._dataSources.data=e,this._dataSources.data.component=this,this.events.on("inited",function(){t.loadData("data")},this,!1),this.setDataSourceEvents(e,"data")},enumerable:!0,configurable:!0}),i.prototype.loadData=function(e){this._dataSources[e].load()},i.prototype.dataSourceDateFields=function(e){return e},i.prototype.dataSourceNumberFields=function(e){return e},i.prototype.populateDataSourceFields=function(e,t,n){return j(n,function(r){t[r]&&ht(e,t[r])===-1&&e.push(t[r])}),e},i.prototype.setDataSourceEvents=function(e,t){var n=this;e.events.on("started",function(r){var a=n.preloader;a&&(a.progress=0)},void 0,!1),e.events.on("loadstarted",function(r){var a=n.preloader;a&&(a.progress=.25)},void 0,!1),e.events.on("loadended",function(r){var a=n.preloader;a&&(a.progress=.5)},void 0,!1),e.events.on("parseended",function(r){var a=n.preloader;a&&(a.progress=.75)},void 0,!1),e.events.on("ended",function(r){var a=n.preloader;a&&(a.progress=1)},void 0,!1),e.events.on("error",function(r){var a=n.preloader;a&&(a.progress=1),n.openModal(r.message)},void 0,!1),t&&e.events.on("done",function(r){var a=n.preloader;a&&(a.progress=1),t!="data"||Ae(r.data)||(r.data=[r.data]),e.incremental&&t=="data"&&n.data.length?n.addData(r.data,e.keepCount?r.data.length:0):e.updateCurrentData&&t=="data"&&n.data.length?(j(n.data,function(o,l){v(r.data[l])&&X(o,function(h,p){v(r.data[l][h])&&(o[h]=r.data[l][h])})}),n.invalidateRawData()):n[t]=r.data})},Object.defineProperty(i.prototype,"responsive",{get:function(){return this._responsive||(this._responsive=new sp,this._responsive.component=this),this._responsive},set:function(e){this._responsive=e,this._responsive.component=this},enumerable:!0,configurable:!0}),i.prototype.zoom=function(e,t,n,r){var a=this;t===void 0&&(t=!1),n===void 0&&(n=!1);var o=e.start,l=e.end,h=e.priority;if(e.start==e.end&&(e.start=e.start-.5/this.maxZoomFactor,e.end=e.end+.5/this.maxZoomFactor),h=="end"&&l==1&&o!=0&&o<this.start&&(h="start"),h=="start"&&o==0&&l>this.end&&(h="end"),y(r)||(r=this.maxZoomDeclination),!y(o)||!y(l))return{start:this.start,end:this.end};if(this._finalStart!=o||this._finalEnd!=l){var p=this.maxZoomFactor/this.minZoomCount,u=this.maxZoomFactor/this.maxZoomCount;if(h=="start"?(this.maxZoomCount>0&&1/(l-o)<u&&(l=o+1/u),1/(l-o)>p&&(l=o+1/p),l>1&&l-o<1/p&&(o=l-1/p)):(this.maxZoomCount>0&&1/(l-o)<u&&(o=l-1/u),1/(l-o)>p&&(o<=0?l=o+1/p:o=l-1/p),o<0&&l-o<1/p&&(l=o+1/p)),o<-r&&(o=-r),1/(l-o)>p&&(l=o+1/p),l>1+r&&(l=1+r),1/(l-o)>p&&(o=l-1/p),this._finalEnd=l,this._finalStart=o,this.skipRangeEvent=t,this.dispatchImmediately("rangechangestarted"),this.rangeChangeDuration>0&&!n){var d=this.rangeChangeAnimation;if(d&&d.progress<1){var c=d.animationOptions;if(c.length>1){if(c[0].to==o&&c[1].to==l)return{start:o,end:l};d.isDisposed()||d.stop()}}this.rangeChangeAnimation&&this.rangeChangeAnimation.kill(),d=this.animate([{property:"start",to:o},{property:"end",to:l}],this.rangeChangeDuration,this.rangeChangeEasing),this.rangeChangeAnimation=d,d&&!d.isFinished()?d.events.on("animationended",function(){a.dispatchImmediately("rangechangeended")}):this.dispatchImmediately("rangechangeended")}else this.start=o,this.end=l,this.dispatch("rangechangeended")}return{start:o,end:l}},i.prototype.zoomToIndexes=function(e,t,n,r){if(y(e)&&y(t)){var a=e/this.dataItems.length,o=t/this.dataItems.length;this.zoom({start:a,end:o},n,r)}},Object.defineProperty(i.prototype,"zoomFactor",{get:function(){return R(1/(this.end-this.start),1,this.maxZoomFactor)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxZoomFactor",{get:function(){return this.getPropertyValue("maxZoomFactor")},set:function(e){this.setPropertyValue("maxZoomFactor",e)&&(e==1&&(this.maxZoomDeclination=0),this.invalidateDataRange())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxZoomDeclination",{get:function(){return this.getPropertyValue("maxZoomDeclination")},set:function(e){this.setPropertyValue("maxZoomDeclination",e)&&this.invalidateDataRange()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startIndex",{get:function(){return y(this._startIndex)||(this._startIndex=0),this._startIndex},set:function(e){this._startIndex=R(Math.round(e),0,this.dataItems.length),this.start=this.indexToPosition(this._startIndex)},enumerable:!0,configurable:!0}),i.prototype.indexToPosition=function(e){return e/this.dataItems.length},Object.defineProperty(i.prototype,"endIndex",{get:function(){var e=this.dataItems.length;return(!y(this._endIndex)||this._endIndex>e)&&(this._endIndex=e),this._endIndex},set:function(e){this._endIndex=R(Math.round(e),0,this.dataItems.length),this.end=this.indexToPosition(this._endIndex)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"start",{get:function(){return this._adapterO?this._adapterO.apply("start",this._start):this._start},set:function(e){if(this._start!=e){this._start=e;var t=Math.max(0,Math.floor(this.dataItems.length*e)||0);this._startIndex=Math.min(t,this.dataItems.length),this.invalidateDataRange(),this.invalidate(),this.dispatchImmediately("startchanged"),this.dispatch("startendchanged")}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"end",{get:function(){return this._adapterO?this._adapterO.apply("end",this._end):this._end},set:function(e){this._end!=e&&(this._end=e,this._endIndex=Math.min(this.dataItems.length,Math.ceil(this.dataItems.length*e)||0),this.invalidateDataRange(),this.invalidate(),this.dispatchImmediately("endchanged"),this.dispatch("startendchanged"))},enumerable:!0,configurable:!0}),i.prototype.removeFromInvalids=function(){s.prototype.removeFromInvalids.call(this),_.removeFromInvalidComponents(this),z(_.invalidDataItems,this),z(_.invalidDataRange,this),z(_.invalidRawDatas,this)},Object.defineProperty(i.prototype,"dataItems",{get:function(){if(this._currentDataSetId!=""){var e=this.dataSets.getKey(this._currentDataSetId);if(e)return e}return this._dataItems},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dataSets",{get:function(){return this._dataSets||(this._dataSets=new me),this._dataSets},enumerable:!0,configurable:!0}),i.prototype.setDataSet=function(e){if(this._currentDataSetId!=e){if(this.dataSets.getKey(e))return this.dataItems.each(function(t){t.__disabled=!0}),this._currentDataSetId=e,this.invalidateDataRange(),this._prevStartIndex=void 0,this.dataItems.each(function(t){t.__disabled=!1}),!0;if(this._currentDataSetId!="")return this.dataItems.each(function(t){t.__disabled=!0}),this._currentDataSetId="",this.invalidateDataRange(),this._prevStartIndex=void 0,this.dataItems.each(function(t){t.__disabled=!1}),!0}return!1},Object.defineProperty(i.prototype,"currentDataSetId",{get:function(){return this._currentDataSetId},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"mainDataSet",{get:function(){return this._dataItems},enumerable:!0,configurable:!0}),i.prototype._updateDataItemIndexes=function(e){for(var t=this.mainDataSet.values,n=t.length,r=e;r<n;++r)t[r]._index=r},i.prototype.handleDataItemAdded=function(e){e.newValue.component=this,this._updateDataItemIndexes(e.index),this.dataItemsInvalid||this.invalidateDataItems()},i.prototype.handleDataItemRemoved=function(e){this._updateDataItemIndexes(e.index),this.dataItemsInvalid||this.invalidateDataItems()},i.prototype.bindDataField=function(e,t){this.dataFields[e]=t,this.invalidateDataRange()},i.prototype.invalidateProcessedData=function(){this.resetProcessedRange(),this.invalidateDataRange()},i.prototype.resetProcessedRange=function(){this._prevEndIndex=null,this._prevStartIndex=null},Object.defineProperty(i.prototype,"dataUsers",{get:function(){var e=this;return this._dataUsers||(this._dataUsers=new re,this._disposers.push(new le(function(){A(e._dataUsers.iterator(),function(t){t.dispose()})}))),this._dataUsers},enumerable:!0,configurable:!0}),i.prototype.clone=function(){var e=s.prototype.clone.call(this);return e.dataFields=Vt(this.dataFields,{}),e},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.data=e.data,this.sequencedInterpolation=e.sequencedInterpolation,this.sequencedInterpolationDelay=e.sequencedInterpolationDelay,this.interpolationDuration=e.interpolationDuration,this.interpolationEasing=e.interpolationEasing},i.prototype.reinit=function(){this._inited=!1,this.deepInvalidate()},i.prototype.getExporting=function(){var e=s.prototype.getExporting.call(this);return e.adapter.has("data",this._exportData,-1,this)||(e.adapter.add("data",this._exportData,-1,this),this.events.on("datavalidated",function(t){e.handleDataUpdated()})),e},i.prototype._exportData=function(e){return e.data=this.data,e},i.prototype.setDisabled=function(e){var t=s.prototype.setDisabled.call(this,e);return t&&this.invalidateData(),t},i.prototype.setShowOnInit=function(e){e!=this.getPropertyValue("showOnInit")&&(!e||this.inited||this.hidden?this._showOnInitDisposer2&&this.removeDispose(this._showOnInitDisposer2):(this._showOnInitDisposer2=this.events.once("dataitemsvalidated",this.hideInitially,this,!1),this._disposers.push(this._showOnInitDisposer2))),s.prototype.setShowOnInit.call(this,e)},i.prototype.setBaseId=function(e){e!=this._baseId&&this.dataInvalid&&(this.dataInvalid=!1,_.removeFromInvalidComponents(this),this._baseId=e,this.invalidateData()),s.prototype.setBaseId.call(this,e)},Object.defineProperty(i.prototype,"minZoomCount",{get:function(){return this.getPropertyValue("minZoomCount")},set:function(e){this.setPropertyValue("minZoomCount",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxZoomCount",{get:function(){return this.getPropertyValue("maxZoomCount")},set:function(e){this.setPropertyValue("maxZoomCount",e)},enumerable:!0,configurable:!0}),i.prototype._systemCheckIfValidate=function(){return!(this.dataInvalid||this.dataProvider&&this.dataProvider.dataInvalid)},i.prototype.asFunction=function(e){return e=="interpolationEasing"||e=="rangeChangeEasing"||s.prototype.asIs.call(this,e)},i}(W);_.registeredClasses.Component=ti;var $e=function(s){function i(){var e=s.call(this)||this;return e.isOversized=!1,e.className="Label",e.fill=new ae().getFor("text"),e.wrap=!1,e.truncate=!1,e.fullWords=!0,e.ellipsis="\u2026",e.textAlign="start",e.textValign="top",e.layout="absolute",e.baseLineRatio=-.27,e._positionPrecision=1,e.events.on("maxsizechanged",function(){e.inited&&e.handleMaxSize()},e,!1),e.events.once("validated",e.handleValidate,e,!1),e.applyTheme(),e}return w(i,s),i.prototype.afterDraw=function(){s.prototype.afterDraw.call(this),this.validatePosition()},i.prototype.setPaper=function(e){var t=s.prototype.setPaper.call(this,e);return t&&this.hardInvalidate(),t},i.prototype.handleValidate=function(){!this.currentText&&!this.text||this.bbox.width!=0&&this.bbox.height!=0||_.events.once("exitframe",this.hardInvalidate,this)},i.prototype.handleMaxSize=function(){(this.bbox.width>this.availableWidth||this.bbox.width<this.availableWidth&&(this.isOversized||this.truncate)||this.bbox.height>this.availableHeight||this.bbox.height<this.availableHeight&&this.isOversized)&&this.invalidate()},i.prototype.arrange=function(){},i.prototype.updateCurrentText=function(){var e,t;Pn(this.html)&&this.paper.supportsForeignObject()?(e="html",t=this.html):(e="svg",t=this.text),ye(t)&&(t=t.toString()),v(t)&&t!==""&&(t=this.populateString(t,this.dataItem)),e=="html"?this._adapterO&&(t=this._adapterO.apply("htmlOutput",t)):this._adapterO&&(t=this._adapterO.apply("textOutput",t));var n=t!=this.currentText||e!=this._currentFormat;return this.currentText=t,this._currentFormat=e,n},i.prototype.hardInvalidate=function(){this._prevStatus="",this.invalidate()},i.prototype.getLineBBox=function(e){var t=e&&e.element,n=t&&t.node;n&&n.parentNode&&(e.bbox=t.getBBox())},i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.bbox.width,t=this.bbox.height,n=this.topParent;if(!n||n.maxWidth&&n.maxHeight){var r=q(this.availableWidth-this.pixelPaddingLeft-this.pixelPaddingRight,0),a=q(this.availableHeight-this.pixelPaddingTop-this.pixelPaddingBottom,0),o=a+","+r+this.wrap+this.truncate+this.fullWords+this.rtl+this.ellipsis;if(this.updateCurrentText()||!this.inited||this._prevStatus!=o){this._measuredWidth=0,this._measuredHeight=0,this.isOversized=!1;var l=this._currentFormat,h=this.currentText;if(v(h)&&h!=""){var p=h.split(`
- `);this._prevStatus=o,this.textAlign=this.textAlign;var u=this.group.getAttr("display");if(u=="none"&&this.group.removeAttr("display"),this.textPathElement&&this.textPathElement.removeChildren(),l==="svg"){this.element.removeAttr("display");var d=this.element;this.resetBBox();for(var c=0,f="",g=0;g<p.length;g++){var m=p[g];if(m!=""){var x=Ft().chunk(m,null,this.ignoreFormatting),b=0,C=!0,S=!1,P=this.getLineInfo(g);P?(P.text="",P.element.textContent=""):(P={text:"",element:this.getSVGLineElement("",0),complex:!1},d.add(P.element)),P.element.removeAttr("display"),P.element.removeChildren(),this.textPathElement&&P.element.add(this.textPathElement);for(var O=0;O<x.length;O++){O&&(P.complex=!0);var I=x[O];if(I.type==="format")f=I.text;else{if(S)continue;if(P.text=I.text,P.style=Ft().translateStyleShortcuts(f),this.textPathElement?this.getSvgElement(P.text,P.style,this.textPathElement):this.getSvgElement(P.text,P.style,P.element),this.getLineBBox(P),P.bbox.width=Math.ceil(P.bbox.width),b<P.bbox.height&&(b=P.bbox.height),(this.wrap||this.truncate)&&P.bbox.width>r){this.isOversized=!0;var k=P.element.textContent,D=P.bbox.width/k.length,G=ie(Math.ceil((P.bbox.width-r)/D),k.length);if(this.truncate){var H=!1,ne=P.element.node;if(ne&&ne.childNodes)for(var Te=P.element.node.childNodes.length-1;Te>=0;Te--){var Ge=P.element.node.childNodes[Te];if(H&&P.bbox.width<=r&&(Ge.textContent+=" "+this.ellipsis,P.bbox=P.element.getBBox(),P.bbox.width=Math.floor(P.bbox.width),P.bbox.width<=r))break;H=!1;var he=Ge.textContent;for(k=P.element.textContent,G=ie(Math.ceil((P.bbox.width-r)/D),k.length);P.bbox.width>r&&G<=k.length&&G>0;)(U=q(k.length-G-this.ellipsis.length,1))<=1&&(G=0,Te>0&&(H=!0,P.element.node.removeChild(Ge))),(he=Pr(he,U,this.ellipsis,this.fullWords,this.rtl)).length>U&&this.fullWords&&(he=Pr(he,U,this.ellipsis,!1,this.rtl)),Ge.textContent=he,P.bbox=P.element.getBBox(),P.bbox.width=Math.floor(P.bbox.width),G=Math.ceil(1.1*G);S=!0}}else if(P.element.node){for(var et=P.element.node.lastChild,we=void 0;P.bbox.width>r&&G<=k.length&&G>0;){var U=q(I.text.length-G,1);if(C?we=_r(I.text,U,!0,this.rtl):((we=_r(I.text,U,!0,this.rtl,!1))[0].length>U||U===1)&&(P.element.node.removeChild(et),G=0),G>0){var nt=we.shift();C&&(nt=ga(nt)),et.textContent=Ft().cleanUp(nt)}P.bbox=P.element.getBBox(),P.bbox.width=Math.floor(P.bbox.width),G++}if(we.length>0){var qe="";v(we)&&(this.rtl?qe+=we.join("")+f:qe+=f+we.join("").replace(/([\[\]]{1})/g,"$1$1"));for(var Y=O+1;Y<x.length;Y++)x[Y].type=="value"?qe+=x[Y].text.replace(/([\[\]]{1})/g,"$1$1"):qe+=x[Y].text;p.splice(g+1,0,qe)}S=!0}}this.bbox.width<P.bbox.width&&(this.bbox.width=P.bbox.width),this.bbox.height=c+b,this.textPathElement?P.element.attr({dy:-this.paddingBottom.toString()}):P.element.attr({x:"0",y:c+b,dy:V(this.baseLineRatio*b,3).toString()}),C=!1}}var We=P.element.node;We&&(et=We.lastChild)&&(et.textContent=this.rtl?Ql(et.textContent):Jl(et.textContent)),c+=b,this.addLineInfo(P,g)}else{var ge=this.getSVGLineElement("",0);ge.add(this.getSvgElement(".",Ft().translateStyleShortcuts(f))),d.add(ge);var ke=Math.ceil(ge.getBBox().height);ke>0&&(c+=ke),d.removeElement(ge);var Lt=this.getLineInfo(g);Lt&&(Lt.text="",Lt.element.textContent="")}}this.maybeHideOversized(),this.measureFailed=!1,this.bbox.width!=0&&this.bbox.height!=0||(this.measureFailed=!0),this._measuredWidth=V(q(this.bbox.width,this.pixelWidth-this.pixelPaddingLeft-this.pixelPaddingRight)),this._measuredHeight=V(q(this.bbox.height,this.pixelHeight-this.pixelPaddingTop-this.pixelPaddingBottom)),this.alignSVGText(),this.bbox.width=this._measuredWidth,this.bbox.height=this._measuredHeight,t==this._measuredHeight&&e==this._measuredWidth||this.dispatch("transformed"),this.hideUnused(p.length)}else{this.element.removeAttr("display"),this.resetBBox(),(d=this.element).removeChildren(),this.setCache("lineInfo",[],0);var tt=this.paper.foreignObject();d.add(tt),this.maxWidth&&tt.attr({width:this.maxWidth-this.pixelPaddingLeft-this.pixelPaddingRight}),this.maxHeight&&tt.attr({height:this.maxHeight-this.pixelPaddingTop-this.pixelPaddingBottom});var Je=this.getHTMLLineElement(h);tt.node.appendChild(Je),Je.style.display="inline-block";var Dt=Je.clientWidth,jt=Je.clientHeight;Je.style.display="block",this._bbox={x:0,y:0,width:Dt,height:jt},tt.attr({width:Dt+1,height:jt}),this.maybeHideOversized(),this._measuredWidth=q(this.bbox.width,this.pixelWidth-this.pixelPaddingLeft-this.pixelPaddingRight),this._measuredHeight=q(this.bbox.height,this.pixelHeight-this.pixelPaddingTop-this.pixelPaddingBottom),this.bbox.width=this._measuredWidth,this.bbox.height=this._measuredHeight,this.truncate&&(Je.style.overflow="hidden"),(Dt>r||jt>a)&&(this.isOversized=!0)}this.setStyles(),this.updateCenter(),this.updateBackground(),u=="none"&&this.group.attr({display:"none"}),this.pathElement&&this.paper.appendDef(this.pathElement)}else this.element.attr({display:"none"})}}else n.events.once("maxsizechanged",this.hardInvalidate,this,!1)},i.prototype.maybeHideOversized=function(){this.hideOversized&&(this.availableWidth<this.bbox.width||this.availableHeight<this.bbox.height?(this.element.attr({display:"none"}),this.isOversized=!0):(this.element.removeAttr("display"),this.isOversized=!1))},i.prototype.alignSVGText=function(){var e=this.element,t=e.node.children||e.node.childNodes;if(t&&(!t||t.length!=0)){var n=this._measuredWidth,r=this._measuredHeight;this.pixelPaddingLeft,this.pixelPaddingRight,this.pixelPaddingTop,this.pixelPaddingBottom,this.rtl?e.attr({direction:"rtl"}):e.removeAttr("direction");for(var a=t.length-1;a>=0;a--){var o=t[a];if(o.setAttribute("text-anchor",this.textAlign),this.textPathElement)o.removeAttribute("x"),o.removeAttribute("y");else{switch(this.textAlign){case"middle":o.setAttribute("x",(n/2).toString()+"px");break;case"end":this.rtl||o.setAttribute("x",n.toString());break;default:this.rtl?o.setAttribute("x",n.toString()):o.removeAttribute("text-anchor")}var l=ce(o.getAttribute("y"));switch(this.textValign){case"middle":o.setAttribute("y",((l||0)+(r-this.bbox.height)/2).toString());break;case"bottom":o.setAttribute("y",((l||0)+r-this.bbox.height).toString());break;default:o.setAttribute("y",(l||0).toString())}}}}},i.prototype.getSVGLineElement=function(e,t){var n=this.paper.addGroup("text");return n.textContent=e,n.attr({x:"0"}),v(t)&&n.attr({y:t.toString()}),(this.truncate||this.wrap)&&n.attr({overflow:"hidden"}),n},Object.defineProperty(i.prototype,"rtl",{get:function(){return v(this._rtl)?this._rtl:!!this._topParent&&this._topParent.rtl},set:function(e){e=ve(e),this._rtl=e,this.element&&this.alignSVGText()},enumerable:!0,configurable:!0}),i.prototype.resetBBox=function(){this._bbox={x:0,y:0,width:0,height:0}},i.prototype.getHTMLLineElement=function(e){var t=document.createElement("div");switch(t.innerHTML=e,this.textAlign){case"middle":t.style.textAlign="center";break;case"end":t.style.textAlign="right"}return this.wrap?t.style.wordWrap="break-word":t.style.whiteSpace="nowrap",this.rtl&&(t.style.direction="rtl"),v(this.fill)&&(t.style.color=this.fill.toString()),t},i.prototype.setStyles=function(){var e=this.element;!this.selectable||this.draggable||this.resizable||this.swipeable?e.addStyle({webkitUserSelect:"none",msUserSelect:"none"}):this.selectable&&(e.removeStyle("webkitUserSelect"),e.removeStyle("msUserSelect"))},i.prototype.hideUnused=function(e){this.initLineCache();var t=this.getCache("lineInfo");if(t.length>=e)for(var n=e;n<t.length;n++){var r=t[n];r&&r.element&&r.element.attr({display:"none"})}},Object.defineProperty(i.prototype,"text",{get:function(){return this.getPropertyValue("text")},set:function(e){this.setPropertyValue("text",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"path",{get:function(){return this.getPropertyValue("path")},set:function(e){this.setPropertyValue("path",e,!0)&&(this.pathElement&&this.pathElement.dispose(),this.textPathElement&&this.textPathElement.dispose(),this.pathElement=this.paper.add("path"),this.pathElement.attr({d:e}),this.pathElement.attr({id:"text-path-"+this.uid}),this._disposers.push(this.pathElement),this.textPathElement=this.paper.addGroup("textPath"),this.textPathElement.attrNS(Ta,"xlink:href","#text-path-"+this.uid),this.textPathElement.attr({path:e}),this._disposers.push(this.textPathElement),this.hardInvalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"locationOnPath",{get:function(){return this.getPropertyValue("locationOnPath")},set:function(e){this.setPropertyValue("locationOnPath",e),this.textPathElement&&this.textPathElement.attr({startOffset:100*e+"%"})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"baseLineRatio",{get:function(){return this.getPropertyValue("baseLineRatio")},set:function(e){this.setPropertyValue("baseLineRatio",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"wrap",{get:function(){return this.getPropertyValue("wrap")},set:function(e){this.resetBBox(),this.setPropertyValue("wrap",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"truncate",{get:function(){return this.getPropertyValue("truncate")},set:function(e){this.resetBBox(),this.setPropertyValue("truncate",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fullWords",{get:function(){return this.getPropertyValue("fullWords")},set:function(e){this.setPropertyValue("fullWords",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"ellipsis",{get:function(){return this.getPropertyValue("ellipsis")},set:function(e){this.setPropertyValue("ellipsis",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectable",{get:function(){return this.getPropertyValue("selectable")},set:function(e){this.setPropertyValue("selectable",e,!0),this.setStyles()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"textAlign",{get:function(){return this.getPropertyValue("textAlign")},set:function(e){this.setPropertyValue("textAlign",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"textValign",{get:function(){return this.getPropertyValue("textValign")},set:function(e){this.setPropertyValue("textValign",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"html",{get:function(){return this.getPropertyValue("html")},set:function(e){this.setPropertyValue("html",e,!0),v(e)||this.element.removeChildrenByTag("foreignObject")},enumerable:!0,configurable:!0}),i.prototype.setFill=function(e){if(s.prototype.setFill.call(this,e),this.html)for(var t=this.element.node.getElementsByTagName("div"),n=0;n<t.length;n++){var r=t[n];v(this.fill)&&(r.style.color=this.fill.toString())}},Object.defineProperty(i.prototype,"hideOversized",{get:function(){return this.getPropertyValue("hideOversized")},set:function(e){this.setPropertyValue("hideOversized",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"ignoreFormatting",{get:function(){return this.getPropertyValue("ignoreFormatting")},set:function(e){this.setPropertyValue("ignoreFormatting",e,!0)},enumerable:!0,configurable:!0}),i.prototype.measureElement=function(){},i.prototype.getLineInfo=function(e){this.initLineCache();var t=this.getCache("lineInfo");return t.length>e?t[e]:void 0},i.prototype.addLineInfo=function(e,t){this.initLineCache(),this.getCache("lineInfo")[t]=e},i.prototype.initLineCache=function(){v(this.getCache("lineInfo"))||this.setCache("lineInfo",[],0)},i.prototype.setDataItem=function(e){this._sourceDataItemEvents&&this._sourceDataItemEvents.dispose(),e&&(this._sourceDataItemEvents=new _e([e.events.on("valuechanged",this.invalidate,this,!1),e.events.on("workingvaluechanged",this.invalidate,this,!1),e.events.on("calculatedvaluechanged",this.invalidate,this,!1),e.events.on("propertychanged",this.invalidate,this,!1)])),s.prototype.setDataItem.call(this,e)},Object.defineProperty(i.prototype,"availableWidth",{get:function(){return v(this.maxWidth)?this.maxWidth:this.pixelWidth},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"availableHeight",{get:function(){return v(this.maxHeight)?this.maxHeight:this.pixelHeight},enumerable:!0,configurable:!0}),i.prototype.getSvgElement=function(e,t,n){var r=this.paper.add("tspan");if(r.textContent=e,t)if(Z.nonce&&n){var a="amcharts_element_style_"+btoa(t).replace(/[^\w]*/g,"");r.node.setAttribute("class",a);var o=document.createElementNS(zi,"defs");n.node.appendChild(o);var l=document.createElement("style");l.type="text/css",l.innerHTML="."+a+" { "+t+"}",l.setAttribute("nonce",Z.nonce),o.appendChild(l)}else r.node.setAttribute("style",t);return n&&n.add(r),r},i.prototype.deepInvalidate=function(){s.prototype.deepInvalidate.call(this),this.hardInvalidate()},Object.defineProperty(i.prototype,"readerTitle",{get:function(){var e=this.getPropertyValue("readerTitle");return e?this.dataItem&&(e=this.populateString(e)):e=this.populateString(Cr(Pn(this.html)?this.html:this.text)),e},set:function(e){e=Xe(e),this.setPropertyValue("readerTitle",e)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),i}(W);_.registeredClasses.Label=$e,Ne.push({relevant:Ue.heightXS,state:function(s,i){if(s instanceof $e&&s.parent&&s.parent.isBaseSprite){var e=s.states.create(i);return e.properties.disabled=!0,e}return null}});var St=function(s){function i(){var e=s.call(this)||this;return e.className="RoundedRectangle",e.element=e.paper.add("path"),e.cornerRadius(3,3,3,3),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.innerWidth,t=this.innerHeight;if(y(e)&&y(t)){var n=ie(e,t)/2,r=xe(this.cornerRadiusTopLeft,n),a=xe(this.cornerRadiusTopRight,n),o=xe(this.cornerRadiusBottomRight,n),l=xe(this.cornerRadiusBottomLeft,n),h=ie(Math.abs(e/2),Math.abs(t/2)),p=R(r,0,h),u=R(a,0,h),d=R(o,0,h),c=R(l,0,h),f="M"+p+",0 L"+(e-u)+",0 a"+u+","+u+" 0 0 1 "+u+","+u+" L"+e+","+(t-d)+" a"+d+","+d+" 0 0 1 -"+d+","+d+" L"+c+","+t+" a"+c+","+c+" 0 0 1 -"+c+",-"+c+" L0,"+p+" a"+p+","+p+" 0 0 1 "+p+",-"+p+" Z";this.path=f}},i.prototype.cornerRadius=function(e,t,n,r){this.cornerRadiusTopLeft=e,this.cornerRadiusTopRight=t,this.cornerRadiusBottomLeft=n,this.cornerRadiusBottomRight=r},Object.defineProperty(i.prototype,"cornerRadiusTopLeft",{get:function(){return this.getPropertyValue("cornerRadiusTopLeft")},set:function(e){this.setPercentProperty("cornerRadiusTopLeft",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cornerRadiusTopRight",{get:function(){return this.getPropertyValue("cornerRadiusTopRight")},set:function(e){this.setPercentProperty("cornerRadiusTopRight",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cornerRadiusBottomRight",{get:function(){return this.getPropertyValue("cornerRadiusBottomRight")},set:function(e){this.setPercentProperty("cornerRadiusBottomRight",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cornerRadiusBottomLeft",{get:function(){return this.getPropertyValue("cornerRadiusBottomLeft")},set:function(e){this.setPercentProperty("cornerRadiusBottomLeft",e,!0)},enumerable:!0,configurable:!0}),i.prototype.measureElement=function(){},Object.defineProperty(i.prototype,"bbox",{get:function(){return this.definedBBox?this.definedBBox:this.isMeasured?{x:0,y:0,width:this.innerWidth,height:this.innerHeight}:{x:0,y:0,width:0,height:0}},enumerable:!0,configurable:!0}),i}($);_.registeredClasses.RoundedRectangle=St;var Xt=function(s){function i(){var e=s.call(this)||this;e.className="Button",e.tooltipY=0,e.iconPosition="left",e.layout="horizontal",e.contentAlign="center",e.contentValign="middle",e.padding(8,16,8,16),e.setStateOnChildren=!0;var t=new ae,n=e.background;n.fill=t.getFor("secondaryButton"),n.stroke=t.getFor("secondaryButtonStroke"),n.fillOpacity=1,n.strokeOpacity=1,n.cornerRadius(3,3,3,3),e.label=new $e,e.label.fill=t.getFor("secondaryButtonText"),e.label.shouldClone=!1;var r=n.states.create("hover");r.properties.fillOpacity=1,r.properties.fill=t.getFor("secondaryButtonHover");var a=n.states.create("down");return a.transitionDuration=100,a.properties.fill=t.getFor("secondaryButtonDown"),a.properties.fillOpacity=1,e.role="button",e.focusable=!0,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"icon",{get:function(){return this._icon},set:function(e){var t=this._icon;t&&(t.parent=void 0),e&&(this._icon=e,e.parent=this,e.interactionsEnabled=!1,e.shouldClone=!1,this.iconPosition=this.iconPosition,this._disposers.push(e))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"iconPosition",{get:function(){return this.getPropertyValue("iconPosition")},set:function(e){this.setPropertyValue("iconPosition",e),this.icon&&(e=="left"?this.icon.toBack():this.icon.toFront())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"label",{get:function(){return this._label},set:function(e){this._label&&this.removeDispose(this._label),this._label=e,e&&(e.parent=this,e.interactionsEnabled=!1,this._disposers.push(this._label))},enumerable:!0,configurable:!0}),i.prototype.createBackground=function(){return new St},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),e.label&&this.label.copyFrom(e.label),e.icon&&(this.icon=e.icon.clone())},i}(W);_.registeredClasses.Button=Xt;var ii=function(s){function i(){var e=s.call(this)||this;return e.className="Circle",e.element=e.paper.add("circle"),e.setPercentProperty("radius",F(100)),e.setPropertyValue("horizontalCenter","middle"),e.setPropertyValue("verticalCenter","middle"),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this),this.element.attr({r:this.pixelRadius})},Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelRadius",{get:function(){return xe(this.radius,ie(this.innerWidth/2,this.innerHeight/2))},enumerable:!0,configurable:!0}),i.prototype.measureElement=function(){var e=this.pixelRadius;this._bbox={x:-e,y:-e,width:2*e,height:2*e}},i}($);_.registeredClasses.Circle=ii;var Wr=function(s){function i(){var e=s.call(this)||this;return e.className="Ellipse",e.element=e.paper.add("ellipse"),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this),this.element.attr({rx:this.radius}),this.element.attr({ry:this.radiusY})},Object.defineProperty(i.prototype,"radiusY",{get:function(){return this.innerHeight/2},set:function(e){this.height=2*e,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.innerWidth/2},set:function(e){this.width=2*e,this.invalidate()},enumerable:!0,configurable:!0}),i}(ii);_.registeredClasses.Ellipse=Wr;var ap=function(s){function i(){var e=s.call(this)||this;return e.className="Image",e.element=e.paper.add("image"),e.applyTheme(),e.width=50,e.height=50,e}return w(i,s),i.prototype.draw=function(){if(s.prototype.draw.call(this),this.href){var e=this.innerWidth,t=this.innerHeight;y(this.widthRatio)&&(e=t*this.widthRatio,this.width=e),y(this.heightRatio)&&(t=e*this.heightRatio,this.height=t),this.element.attr({width:e,height:t}),this.element.attrNS(Ta,"xlink:href",this.href)}},Object.defineProperty(i.prototype,"href",{get:function(){return this.getPropertyValue("href")},set:function(e){this.setPropertyValue("href",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"widthRatio",{get:function(){return this.getPropertyValue("widthRatio")},set:function(e){this.setPropertyValue("widthRatio",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"heightRatio",{get:function(){return this.getPropertyValue("heightRatio")},set:function(e){this.setPropertyValue("heightRatio",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bbox",{get:function(){return{x:0,y:0,width:this.pixelWidth,height:this.pixelHeight}},enumerable:!0,configurable:!0}),i}($);_.registeredClasses.Image=ap;var yt=function(s){function i(){var e=s.call(this)||this;return e.className="Line",e.element=e.paper.add("line"),e.fill=B(),e.x1=0,e.y1=0,e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this),this.x1==this.x2||this.y1==this.y2?this.pixelPerfect=!0:this.pixelPerfect=!1,this.x1=this.x1,this.x2=this.x2,this.y1=this.y1,this.y2=this.y2},Object.defineProperty(i.prototype,"x1",{get:function(){return this.getPropertyValue("x1")},set:function(e){y(e)||(e=0);var t=0;this.pixelPerfect&&this.stroke instanceof dt&&(t=1e-5),this.setPropertyValue("x1",e,!0),this.element.attr({x1:e+t})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"x2",{get:function(){var e=this.getPropertyValue("x2");return y(e)||(e=this.pixelWidth),e},set:function(e){y(e)||(e=0),this.setPropertyValue("x2",e,!0),this.element.attr({x2:e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"y1",{get:function(){return this.getPropertyValue("y1")},set:function(e){y(e)||(e=0);var t=0;this.pixelPerfect&&this.stroke instanceof dt&&(t=1e-5),this.setPropertyValue("y1",e,!0),this.element.attr({y1:e+t})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"y2",{get:function(){var e=this.getPropertyValue("y2");return y(e)||(e=this.pixelHeight),e},set:function(e){y(e)||(e=0),this.setPropertyValue("y2",e,!0),this.element.attr({y2:e})},enumerable:!0,configurable:!0}),i.prototype.positionToPoint=function(e){var t={x:this.x1,y:this.y1},n={x:this.x2,y:this.y2},r=ln(t,n,e),a=Ee(t,n);return{x:r.x,y:r.y,angle:a}},i}($);_.registeredClasses.Line=yt;var op=function(s){function i(){var e=s.call(this)||this;return e.className="PointedShape",e.pointerBaseWidth=15,e.pointerLength=10,e.pointerY=0,e.pointerX=0,e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this),y(this.pointerX)||(this.pointerX=this.pixelWidth/2),y(this.pointerY)||(this.pointerY=this.pixelHeight+10)},Object.defineProperty(i.prototype,"pointerBaseWidth",{get:function(){return this.getPropertyValue("pointerBaseWidth")},set:function(e){this.setPropertyValue("pointerBaseWidth",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pointerLength",{get:function(){return this.getPropertyValue("pointerLength")},set:function(e){this.setPropertyValue("pointerLength",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pointerX",{get:function(){return this.getPropertyValue("pointerX")},set:function(e){this.setPropertyValue("pointerX",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pointerY",{get:function(){return this.getPropertyValue("pointerY")},set:function(e){this.setPropertyValue("pointerY",e,!0)},enumerable:!0,configurable:!0}),i}($),lp=function(s){function i(){var e=s.call(this)||this;return e.className="PointedRectangle",e.element=e.paper.add("path"),e.cornerRadius=6,e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.cornerRadius,t=this.innerWidth,n=this.innerHeight;if(t>0&&n>0){var r,a,o=this.pointerX,l=this.pointerY,h=this.pointerBaseWidth/2,p=ie(t/2,n/2),u=R(e,0,p),d=R(e,0,p),c=R(e,0,p),f=R(e,0,p),g=void 0,m=void 0,x=void 0,b=void 0,C=(o-0)*(n-0)-(l-0)*(t-0),S=(o-0)*(0-n)-(l-n)*(t-0);g=C>0&&S>0?"M"+u+",0 L"+((r=R(o,u+h,t-h-d))-h)+",0 L"+o+","+(l=R(l,-1/0,0))+" L"+(r+h)+",0 L"+(t-d)+",0":"M"+u+",0 L"+(t-d)+",0",x=C<0&&S<0?" L"+(t-c)+","+n+" L"+((r=R(o,f+h,t-h-c))+h)+","+n+" L"+o+","+(l=R(l,n,1/0))+" L"+(r-h)+","+n+" L"+f+","+n:" L"+f+","+n,b=C<0&&S>0?" L0,"+(n-f)+" L0,"+((a=R(l,u+h,n-f-h))+h)+" L"+(o=R(o,-1/0,0))+","+l+" L0,"+(a-h)+" L0,"+u:" L0,"+u,m=C>0&&S<0?" L"+t+","+d+" L"+t+","+((a=R(l,d+h,n-h-c))-h)+" L"+(o=R(o,t,1/0))+","+l+" L"+t+","+(a+h)+" L"+t+","+(n-c):" L"+t+","+(n-c);var P=" a"+d+","+d+" 0 0 1 "+d+","+d,O=" a"+c+","+c+" 0 0 1 -"+c+","+c,I=" a"+f+","+f+" 0 0 1 -"+f+",-"+f,k=" a"+u+","+u+" 0 0 1 "+u+",-"+u;this.path=g+P+m+O+x+I+b+k}},Object.defineProperty(i.prototype,"cornerRadius",{get:function(){return this.getPropertyValue("cornerRadius")},set:function(e){this.setPropertyValue("cornerRadius",e,!0)},enumerable:!0,configurable:!0}),i}(op);function Zi(s){var i=T(s[0]),e={x:0,y:0},t=Z.minPolylineStep;y(t)||(t=.5);for(var n=0,r=s.length;n<r;n++){var a=s[n];oe(a,e)>t&&(i+=T(a),e=a)}return i}function E(s){return" M"+V(s.x,4)+","+V(s.y,4)+" "}function T(s){return" L"+V(s.x,4)+","+V(s.y,4)+" "}function ni(s,i){return" Q"+V(i.x,4)+","+V(i.y,4)+" "+V(s.x,4)+","+V(s.y,4)}function _i(s,i,e){return" C"+V(i.x,4)+","+V(i.y,4)+" "+V(e.x,4)+","+V(e.y,4)+" "+V(s.x,4)+","+V(s.y,4)}function pd(){return" Z"}function Le(s,i,e,t){if(i==0)return"";y(t)||(t=e);var n="",r=",",a=Math.ceil(Math.abs(i)/180),o=1;i<0&&(o=0);var l=0,h=0,p=-L(s)*e,u=-M(s)*t;if(i<.5&&e>3e3)return T({x:f=V(L(c=s+i)*e,4),y:g=V(M(c)*t,4)});for(var d=0;d<a;d++){var c,f,g;n+=" a"+e+r+t+r+0+r+0+r+o+r+(f=V(L(c=s+i/a*(d+1))*e+p-l,4))+r+(g=V(M(c)*t+u-h,4)),l=f,h=g}return n}function Pi(s,i,e,t,n,r,a){if(i==0||(y(t)||(t=0),e==0&&t<=0))return"";if(e<t){var o=e;e=t,t=o,y(n)&&(n=n/t*e)}(i=ie(i,360))==360&&(r=0,a=0);var l=s+i,h=M(ie(i,45)/2),p=(n=y(n)?n:e)/e*t,u=n/e*(r=r||0),d=n/e*(a=y(a)?a:r);r=R(r,0,(e-t)/2),u=R(u,0,(n-p)/2),a=R(a,0,(e-t)/2),d=R(d,0,(n-p)/2),r=V(R(r,0,e*h),4),u=V(R(u,0,n*h),4),a=V(R(a,0,t*h),4),d=V(R(d,0,p*h),4);var c=Math.asin(r/e/2)*vt*2,f=Math.asin(u/n/2)*vt*2;t<a&&(t=a),p<d&&(p=d);var g=Math.asin(a/t/2)*vt*2,m=Math.asin(d/p/2)*vt*2;y(g)||(g=0),y(m)||(m=0);var x=s+i/2,b={x:V(L(x)*t,4),y:M(x)*p},C={x:L(s)*(t+a),y:M(s)*(p+d)},S={x:L(s)*(e-r),y:M(s)*(n-u)},P={x:L(l)*(e-r),y:M(l)*(n-u)},O={x:L(l)*(t+a),y:M(l)*(p+d)},I={x:L(s+c)*e,y:M(s+f)*n},k={x:L(l-g)*t,y:M(l-m)*p};a+=a*M(g/2),d+=d*M(m/2),g>(l-s)/2&&(k=b);var D="";return i==360?D=E(S):(D=E(C),D+=T(S),D+=ot(I,r,u,!0)),D+=Le(s+c,i-2*c,e,n),y(t)&&t!=0?(i==360&&r==0?D+=E(O):(D+=ot(P,r,u,!0),D+=T(O),D+=ot(k,a,d,!0)),D+=Le(l-g,-(i-2*g),t,p),(i<360||r>0)&&(D+=ot(C,a,d,!0)),D+=T(C)):(D+=ot(P,r,u,!0),i<360&&(D+=T(C))),D}function ot(s,i,e,t,n,r){if(i==0)return"";var a=",";return" A"+i+a+e+a+(r=r||0)+a+ +(n=Boolean(n))+a+ +(t=Boolean(t))+a+V(s.x,4)+a+V(s.y,4)}function Xr(s,i,e,t){return y(e)||(e=0),y(t)||(t=0),E({x:e,y:t})+T({x:e+s,y:t})+T({x:e+s,y:t+i})+T({x:e,y:t+i})+" Z"}function Yt(s,i){var e=",",t=" L";return i?"M"+s.x+e+s.y+t+s.x+e+(s.y+s.height)+t+(s.x+s.width)+e+(s.y+s.height)+t+(s.x+s.width)+e+s.y+t+s.x+e+s.y:"M"+s.x+e+s.y+t+(s.x+s.width)+e+s.y+t+(s.x+s.width)+e+(s.y+s.height)+t+s.x+e+(s.y+s.height)+t+s.x+e+s.y}function ud(s,i){var e=Ui().add("path").node;if(e.setAttribute("d",s),e.getPointAtLength&&e.getTotalLength){for(var t=e.getTotalLength(),n=[],r=0;r<i;r++){var a=e.getPointAtLength(r/i*t);n.push({x:a.x,y:a.y})}return n}e.remove()}function dd(s,i,e,t,n,r,a,o,l){y(o)||(o=0),y(o)||(l=o);for(var h=n+.01,p=o*Ai,u=[];h<e+a;){var d=r;if(d/2>h&&(d=2*h),(p+=2*Math.asin(d/2/h))*vt>l+(e-n)/a*360)break;var c=p*vt,f={x:s+h*Math.cos(p),y:i+h*t/e*Math.sin(p)};u.push(f),h=n+c/360*a}return u.shift(),u}function cd(s){if(!s||s.length==0)return"";var i=E(s[0]);if(s&&s.length>0)for(var e=1;e<s.length;e++)i+=T(s[e]);return i}var qi=function(s){function i(){var e=s.call(this)||this;return e._distance=0,e.className="Polyline",e.element=e.paper.add("path"),e.shapeRendering="auto",e.fill=B(),e.strokeOpacity=1,e.applyTheme(),e}return w(i,s),i.prototype.makePath=function(){this._distance=0;var e=this.segments;if(e&&e.length>0){for(var t="",n=0,r=e.length;n<r;n++){var a=e[n];if(a.length>0){t+=E(a[0]);for(var o=1;o<a.length;o++){var l=a[o];t+=T(l),this._distance+=oe(a[o-1],l)}}}this.path=t}this._realSegments=e},Object.defineProperty(i.prototype,"segments",{get:function(){return this.getPropertyValue("segments")},set:function(e){this.setPropertyValue("segments",e),this.makePath()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"distance",{get:function(){return this._distance},enumerable:!0,configurable:!0}),i.prototype.positionToPoint=function(e){var t=0;e<0&&(e=Math.abs(e),t=180);var n=this._realSegments;if(n){for(var r=this.distance,a=0,o=0,l=0,h=void 0,p=void 0,u=0;u<n.length;u++){var d=n[u];if(d.length>1){for(var c=1;c<d.length;c++)if(o=a/r,l=(a+=oe(h=d[c-1],p=d[c]))/r,o<=e&&l>e){u=n.length;break}}else d.length==1&&(h=d[0],p=d[0],o=0,l=1)}if(h&&p){var f=ln(h,p,(e-o)/(l-o));return{x:f.x,y:f.y,angle:t+Ee(h,p)}}}return{x:0,y:0,angle:0}},Object.defineProperty(i.prototype,"realSegments",{get:function(){return this._realSegments},enumerable:!0,configurable:!0}),i}($);_.registeredClasses.Polyline=qi;var hp=function(s){function i(){var e=s.call(this)||this;return e.className="Polyarc",e.controlPointDistance=.5,e.controlPointPosition=.5,e.applyTheme(),e}return w(i,s),i.prototype.makePath=function(){this._distance=0;var e=this.segments;if(e&&e.length>0){var t="";this._realSegments=[];for(var n=0,r=e.length;n<r;n++){var a=e[n],o=[];if(this._realSegments.push(o),a.length>0){t+=E(a[0]);for(var l=1;l<a.length;l++){var h=a[l-1],p=a[l],u=oe(p,h),d=u*this.controlPointDistance,c=this.controlPointPosition,f=-Ee(h,p),g={x:h.x+(p.x-h.x)*c*.5-d*M(f),y:h.y+(p.y-h.y)*c*.5-d*L(f)},m={x:h.x+(p.x-h.x)*c*1.5-d*M(f),y:h.y+(p.y-h.y)*c*1.5-d*L(f)};t+=_i(p,g,m);var x=Math.ceil(u),b=h;if(x>0)for(var C=0;C<=x;C++){var S=ar(h,p,g,m,C/x);o.push(S),this._distance+=oe(b,S),b=S}else o.push(h)}}}this.path=t}},Object.defineProperty(i.prototype,"controlPointPosition",{get:function(){return this.getPropertyValue("controlPointPosition")},set:function(e){this.setPropertyValue("controlPointPosition",e),this.makePath()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"controlPointDistance",{get:function(){return this.getPropertyValue("controlPointDistance")},set:function(e){this.setPropertyValue("controlPointDistance",e),this.makePath()},enumerable:!0,configurable:!0}),i}(qi);_.registeredClasses.Polyarc=hp;var pp=function(s){function i(e){var t=s.call(this)||this;return t._bboxes=[],t.morphDuration=800,t.morphEasing=Qt,t.morphToSingle=!0,t.scaleRatio=1,t.className="Morpher",t.morphable=e,t.applyTheme(),t}return w(i,s),i.prototype.morphToPolygon=function(e,t,n){var r=this.morphable.currentPoints;if(r&&e){this.sortPoints(r),this.sortPoints(e),this._morphFromPointsReal=[],this._morphToPointsReal=[],v(t)||(t=this.morphDuration),v(n)||(n=this.morphEasing),this._morphFromPointsReal=this.normalizePoints(e,r),this._morphToPointsReal=this.normalizePoints(r,e),this.morphable.currentPoints=this._morphFromPointsReal;var a=new gt(this,{property:"morphProgress",from:0,to:1},t,n);return this._disposers.push(a),a.start(),a}},i.prototype.normalizePoints=function(e,t){for(var n=0,r=e.length;n<r;n++){var a=e[n][0],o=e[n][1],l=be(Fi(a)),h=l.x+l.width,p=l.y+l.height;if(t[n]||(t[n]=[]),a&&!t[n][0]&&(t[n][0]=[{x:h,y:p},{x:h,y:p}]),t[n][0]){t[n][0]=this.addPoints(t[n][0],a.length);for(var u=1/0,d=0,c=0;c<t[n][0].length;c++){var f=oe(t[n][0][c],a[0]);f<u&&(d=c,u=f)}var g=t[n][0].slice(0,d),m=t[n][0].slice(d);t[n][0]=m.concat(g)}o&&(t[n][1]||(t[n][1]=[{x:h,y:p},{x:h,y:p}]),t[n][1]=this.addPoints(t[n][1],o.length))}return t},i.prototype.sortPoints=function(e){e.sort(function(o,l){var h=be(Fi(o[0])),p=be(Fi(l[0]));return h.width*h.height>p.width*p.height?-1:1});for(var t=[],n=0,r=e.length;n<r;n++){var a=e[n][0];a&&t.push(be(Fi(a)))}return Mi(t)},i.prototype.morphToCircle=function(e,t,n){var r=this.morphable.points,a=this.sortPoints(r);this._morphFromPointsReal=[],this._morphToPointsReal=[],v(t)||(t=this.morphDuration),v(n)||(n=this.morphEasing);for(var o=0,l=r.length;o<l;o++){var h=r[o][0],p=r[o][1];if(this._morphFromPointsReal[o]=[],this._morphToPointsReal[o]=[],h){var u=h,d=h,c=be(Fi(d));this.morphToSingle&&(c=be(a));var f=c.x+c.width/2,g=c.y+c.height/2,m=e;y(m)||(m=Math.min(c.width/2,c.height/2)),u=[];var x=Ee({x:f,y:g},h[0]),b=100;h.length>b&&(b=h.length);for(var C=360/((b=(d=this.addPoints(h,b)).length)-1),S=0;S<b;S++){var P=C*S+x,O={x:f+m*L(P),y:g+m*M(P)};u[S]=O}if(p&&p.length>0)for(var I=0,k=p.length;I<k;I++)u.push({x:f,y:g});this._morphFromPointsReal[o][0]=d,this._morphToPointsReal[o][0]=u}}this.morphable.currentPoints=this._morphFromPointsReal;var D=new gt(this,{property:"morphProgress",from:0,to:1},t,n);return this._disposers.push(D),D.start(),D},i.prototype.addPoints=function(e,t){for(var n=Math.round(t/e.length),r=[],a=0,o=e.length;a<o;a++){var l,h=e[a];l=a==e.length-1?e[0]:e[a+1],r.push(h);for(var p=1;p<n;p++){var u=p/n,d={x:h.x+(l.x-h.x)*u,y:h.y+(l.y-h.y)*u};r.push(d)}r.length+e.length-a==t&&(n=0)}if(r.length<t&&e.length>0){var c=e[e.length-1];for(p=r.length;p<t;p++)r.push({x:c.x,y:c.y})}return r},i.prototype.morphToRectangle=function(e,t,n,r){var a=this.morphable.points;this.sortPoints(a),this._morphFromPointsReal=[],this._morphToPointsReal=[],v(n)||(n=this.morphDuration),v(r)||(r=this.morphEasing);for(var o=0,l=a.length;o<l;o++){var h=a[o][0],p=a[o][1];if(this._morphFromPointsReal[o]=[],this._morphToPointsReal[o]=[],h){var u=h,d=h,c=this._bboxes[o];this.morphToSingle;var f=c.x,g=c.y,m=e,x=t;if(y(m)||(m=c.width),y(x)||(x=c.height),u=[{x:f,y:g},{x:f+m,y:g},{x:f+m,y:g+x},{x:f,y:g+x}],u=this.addPoints(u,h.length),h.length<4)for(var b=h.length;b<4;b++)u.push({x:h[b].x,y:h[b].y});if(p&&p.length>0)for(var C=c.x+c.width/2,S=c.y+c.height/2,P=0,O=p.length;P<O;P++)u.push({x:C,y:S});this._morphFromPointsReal[o][0]=d,this._morphToPointsReal[o][0]=u}}this.morphable.currentPoints=this._morphFromPointsReal;var I=new gt(this,{property:"morphProgress",from:0,to:1},n,r);return this._disposers.push(I),I.start(),I},Object.defineProperty(i.prototype,"morphProgress",{get:function(){return this._morphProgress},set:function(e){this._morphProgress=e;var t=[];if(e!=null){var n=this._morphFromPointsReal,r=this._morphToPointsReal;if(n!=null&&r!=null)for(var a=0,o=n.length;a<o;a++){var l=[];t.push(l);var h=n[a][0],p=n[a][1],u=r[a][0],d=r[a][1];if(h&&h.length>0&&u&&u.length>0){for(var c=[],f=0,g=h.length;f<g;f++){var m=h[f],x=u[f],b={x:m.x+(x.x*this.scaleRatio-m.x)*e,y:m.y+(x.y*this.scaleRatio-m.y)*e};c.push(b)}l[0]=c}if(p&&p.length>0&&d&&d.length>0){for(var C=[],S=0,P=p.length;S<P;S++)m=p[S],x=d[S],b={x:m.x+(x.x*this.scaleRatio-m.x)*e,y:m.y+(x.y*this.scaleRatio-m.y)*e},C.push(b);l[1]=C}}}this.morphable.currentPoints=t},enumerable:!0,configurable:!0}),i.prototype.morphBack=function(e,t){this._morphToPointsReal=this._morphFromPointsReal,this._morphFromPointsReal=this.morphable.currentPoints,v(e)||(e=this.morphDuration),v(t)||(t=this.morphEasing);var n=new gt(this,{property:"morphProgress",from:0,to:1},e,t);return this._disposers.push(n),n.start(),n},Object.defineProperty(i.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new Yi(this._animations))),this._animations},enumerable:!0,configurable:!0}),i}(Ke),up=function(s){function i(){var e=s.call(this)||this;return e.className="Polygon",e.element=e.paper.add("path"),e.shapeRendering="auto",e._currentPoints=[],e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"points",{get:function(){var e=this.getPropertyValue("points"),t=this.path;if(t&&(!e||e.length==0)){for(var n=t.slice(1,t.length-1).split("ZM"),r=0;r<n.length;r++){var a=n[r];if(a.length>0){var o=a.split("M"),l=o[0],h=o[1];if(l&&l.length>0){var p=l.split("L");if(p.length>0){var u=[],d=[u];e.push(d);for(var c=0;c<p.length;c++){var f=p[c].split(",");u.push({x:+f[0],y:+f[1]})}if(h&&h.length>0){var g=h.split("L");if(g.length>0){var m=[];for(d.push(m),c=g.length-1;c>=0;c--)f=g[c].split(","),m.push({x:+f[0],y:+f[1]})}}}}}}this.setPropertyValue("points",e),this._currentPoints=e}return e},set:function(e){this.setPropertyValue("points",e,!0),this._currentPoints=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"currentPoints",{get:function(){return this._currentPoints&&this._currentPoints.length!=0||!this.path||(this._currentPoints=this.points),this._currentPoints},set:function(e){this._currentPoints!=e&&(this._currentPoints=e,this.draw())},enumerable:!0,configurable:!0}),i.prototype.draw=function(){var e,t,n,r,a="",o=this._currentPoints;if(o.length>0){for(var l=0,h=o.length;l<h;l++){var p=o[l][0],u=o[l][1];if(p&&p.length>0){a+=E(c=p[0]);for(var d=0;d<p.length;d++)a+=T(c=p[d]),(!y(t)||t<c.x)&&(t=c.x),(!y(e)||e>c.x)&&(e=c.x),(!y(n)||n>c.y)&&(n=c.y),(!y(r)||r<c.y)&&(r=c.y)}if(u&&u.length>0){var c;a+=E(c=u[0]);for(var f=0,g=u.length;f<g;f++)a+=T(c=u[f])}}a&&(a+=" Z"),this.bbox.x=e,this.bbox.y=n,this.bbox.width=t-e,this.bbox.height=r-n,s.prototype.setPath.call(this,a)}},i.prototype.setPath=function(e){return!!s.prototype.setPath.call(this,e)&&(this.points=[],this._bbox=this.group.getBBox(),!0)},i.prototype.measureElement=function(){},Object.defineProperty(i.prototype,"centerPoint",{get:function(){return{x:this.bbox.x+this.bbox.width/2,y:this.bbox.y+this.bbox.height/2}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"morpher",{get:function(){return this._morpher||(this._morpher=new pp(this),this._disposers.push(this._morpher)),this._morpher},enumerable:!0,configurable:!0}),i}($);_.registeredClasses.Polygon=up;var jn=function(s){function i(){var e=s.call(this)||this;return e.className="Polyspline",e.tensionX=.5,e.tensionY=.5,e.applyTheme(),e}return w(i,s),i.prototype.makePath=function(){this._distance=0;var e=this.segments,t=this.tensionX,n=this.tensionY;if(this.allPoints=[],e&&e.length>0){var r="";this._realSegments=[];for(var a=0,o=e.length;a<o;a++){var l=e[a],h=[];if(this._realSegments.push(h),l.length>0){var p=l[0],u=l[l.length-1],d=!1;V(p.x,3)==V(u.x)&&V(p.y)==V(u.y)&&(d=!0),r+=E(l[0]);for(var c=0;c<l.length-1;c++){var f=l[c-1],g=l[c],m=l[c+1],x=l[c+2];c===0?f=l[c]:c==l.length-2&&(x=l[c+1]),x||(x=m),c===0?f=d?l[l.length-2]:l[a]:c==l.length-2&&(x=d?l[1]:l[c+1]);var b=Ys(f,g,m,0,t,n),C=zs(0,g,m,x,t,n);r+=_i(m,b,C);var S=1.2*Math.ceil(pl(g,m,b,C,20)),P=g;if(S>0)for(var O=0;O<=S;O++){var I=ar(g,m,b,C,O/S);if(I.x!=P.x||I.y!=P.y){h.push(I);var k=V(Ee(P,I),5);this._distance+=oe(P,I),this.allPoints[Math.floor(this._distance)]={x:I.x,y:I.y,angle:k},P=I}}else h.push(f)}}var D=this.allPoints;if(D.length>1){for(var G=0;G<D.length;G++)if(!D[G]){if(G>1)D[G]=D[G-1];else for(var H=1;H<D.length;H++)if(D[H]){D[G]=D[H];break}}}}this.path=r}},i.prototype.getClosestPointIndex=function(e){var t,n=this.allPoints,r=1/0;if(n.length>1)for(var a=1;a<n.length;a++){var o=oe(e,n[a]);o<r&&(t=a,r=o)}return t},Object.defineProperty(i.prototype,"tensionX",{get:function(){return this.getPropertyValue("tensionX")},set:function(e){this.setPropertyValue("tensionX",e),this.makePath()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tensionY",{get:function(){return this.getPropertyValue("tensionY")},set:function(e){this.setPropertyValue("tensionY",e,!0),this.makePath()},enumerable:!0,configurable:!0}),i.prototype.positionToPoint=function(e,t){var n=0,r=this.allPoints,a=r.length;if(y(e)||(e=0),a>1){if(t&&a>3){if(e<0){e<-.01&&(e=-.01);var o=r[0],l=r[1];return{x:h=o.x-(o.x-l.x)*a*e,y:p=o.y-(o.y-l.y)*a*e,angle:Ee(o,l)}}var h,p;if(e>1)return e>1.01&&(e=1.01),o=r[r.length-2],l=r[r.length-3],{x:h=o.x+(o.x-l.x)*a*(e-1),y:p=o.y+(o.y-l.y)*a*(e-1),angle:Ee(o,{x:h,y:p})};if(e==1){var u=r[r.length-1];return{x:u.x,y:u.y,angle:u.angle}}}else e<0&&(e=Math.abs(e),n=180),e>=1&&(e=.9999999999999);var d;return{x:(d=r[Math.floor(e*a)]).x,y:d.y,angle:d.angle+n}}return a==1?{x:(d=r[0]).x,y:d.y,angle:d.angle}:{x:0,y:0,angle:0}},i}(qi);_.registeredClasses.Polyspline=jn;var ri=function(s){function i(){var e=s.call(this)||this;return e.className="Slice",e.setPropertyValue("cornerRadius",0),e.setPropertyValue("startAngle",0),e.setPercentProperty("innerRadius",0),e.setPercentProperty("radius",0),e.setPropertyValue("arc",0),e.setPropertyValue("shiftRadius",0),e.strokeOpacity=1,e.setPropertyValue("layout","none"),e.slice=e.createChild($),e.slice.isMeasured=!1,e._disposers.push(e.slice),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.radiusY;this.radius>0&&e==0&&(e=.01),this.slice.path=Pi(this.startAngle,this.arc,this.radius,this.pixelInnerRadius,e,this.cornerRadius,this.innerCornerRadius),this.slice.invalidate(),this.shiftRadius=this.shiftRadius,this.realFill instanceof Nt&&this.updateGradient(this.realFill),this.realStroke instanceof Nt&&this.updateGradient(this.realStroke)},i.prototype.updateGradient=function(e){e.element.attr({gradientUnits:"userSpaceOnUse"}),e.element.attr({r:this.radius}),e.cx=0,e.cy=0,e.element.attr({radius:this.radius})},Object.defineProperty(i.prototype,"bbox",{get:function(){return this.definedBBox?this.definedBBox:this.isMeasured?Mi([xt(this.startAngle,this.startAngle+this.arc,this.pixelInnerRadius),xt(this.startAngle,this.startAngle+this.arc,this.radius)]):{x:0,y:0,width:0,height:0}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(e){this.setPropertyValue("startAngle",Zt(e),!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"arc",{get:function(){return this.getPropertyValue("arc")},set:function(e){y(e)||(e=0),this.setPropertyValue("arc",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){var e=this.getPropertyValue("radius");return y(e)||(e=0),e},set:function(e){this.setPropertyValue("radius",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radiusY",{get:function(){var e=this.getPropertyValue("radiusY");return y(e)||(e=this.radius),e},set:function(e){this.setPropertyValue("radiusY",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelInnerRadius",{get:function(){return xe(this.innerRadius,this.radius)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cornerRadius",{get:function(){return this.getPropertyValue("cornerRadius")},set:function(e){this.setPropertyValue("cornerRadius",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerCornerRadius",{get:function(){return this.getPropertyValue("innerCornerRadius")},set:function(e){this.setPropertyValue("innerCornerRadius",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"shiftRadius",{get:function(){return this.getPropertyValue("shiftRadius")},set:function(e){this.setPropertyValue("shiftRadius",e),e=this.getPropertyValue("shiftRadius"),this.dx=e*this.radius*this.ix,this.dy=e*this.radiusY*this.iy},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"ix",{get:function(){return L(this.middleAngle)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"iy",{get:function(){return M(this.middleAngle)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"middleAngle",{get:function(){return this.startAngle+this.arc/2},enumerable:!0,configurable:!0}),i.prototype.getTooltipX=function(){var e=this.getPropertyValue("tooltipX");if(y(e))return e;var t=.5;e instanceof te&&(t=e.value);var n=xe(this.innerRadius,this.radius);return this.ix*(n+(this.radius-n)*t)},i.prototype.getTooltipY=function(){var e=this.getPropertyValue("tooltipY");if(y(e))return e;var t=.5;e instanceof te&&(t=e.value);var n=xe(this.innerRadius,this.radius);return this.iy*(n+(this.radius-n)*t)+this.slice.dy},i}(W);_.registeredClasses.Slice=ri;var Za=function(s){function i(){var e=s.call(this)||this;e.className="Preloader",e.width=F(100),e.height=F(100);var t=new ae,n=e.createChild(W);n.shouldClone=!1;var r=n.createChild(ri);r.shouldClone=!1,r.radius=53,r.arc=360,r.fill=t.getFor("fill"),r.fillOpacity=.8,r.innerRadius=42,r.isMeasured=!1,e.backgroundSlice=r;var a=n.createChild(ri);a.shouldClone=!1,a.radius=50,a.innerRadius=45,a.fill=t.getFor("alternativeBackground"),a.fillOpacity=.2,a.isMeasured=!1,e.progressSlice=a;var o=n.createChild($e);return o.shouldClone=!1,o.horizontalCenter="middle",o.verticalCenter="middle",o.isMeasured=!1,o.fill=t.getFor("text"),o.align="center",o.valign="middle",o.textAlign="middle",o.fillOpacity=.4,e.label=o,e.background.opacity=1,e.background.fill=t.getFor("background"),e.contentAlign="center",e.contentValign="middle",e.delay=300,e.states.create("hidden").properties.opacity=0,e.visible=!1,e.hide(0),e.__disabled=!0,e._disposers.push(e.backgroundSlice),e._disposers.push(e.progressSlice),e._disposers.push(e.label),e._disposers.push(n),e}return w(i,s),Object.defineProperty(i.prototype,"progress",{get:function(){return this.getPropertyValue("progress")},set:function(e){var t=this;this.__disabled=!1,this.validateLayout(),this.setPropertyValue("progress",e),this.progressSlice.arc=360*e,this.label&&(this.label.text=Math.round(100*e)+"%"),e>=1?(this._started&&(this._started=void 0),_.events.once("enterframe",function(){var n=t.hide();n&&!n.isFinished()?n.events.once("animationended",function(){t.__disabled=!0}):t.__disabled=!0}),this.interactionsEnabled=!1,this.setPropertyValue("progress",0)):e>0&&(this.delay?this._started?this._started+this.delay<=new Date().getTime()&&(this.__disabled=!1,this.show(),this.interactionsEnabled=!0):this._started=new Date().getTime():(this.__disabled=!1,this.show(),this.interactionsEnabled=!0))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"delay",{get:function(){return this.getPropertyValue("delay")},set:function(e){this.setPropertyValue("delay",e)},enumerable:!0,configurable:!0}),i}(W);_.registeredClasses.Preloader=Za;var Yr=function(s){function i(){var e=s.call(this)||this;e.className="ResizeButton",e.orientation="horizontal",e.layout="absolute",e.horizontalCenter="middle",e.verticalCenter="middle",e.draggable=!0,e.padding(8,8,8,8),e.background.cornerRadius(20,20,20,20);var t=new $;t.element=e.paper.add("path");var n=E({x:-2,y:-6});return n+=T({x:-2,y:6}),n+=E({x:2,y:-6}),n+=T({x:2,y:6}),t.path=n,t.pixelPerfect=!0,t.padding(0,4,0,4),t.stroke=new ae().getFor("alternativeText"),t.strokeOpacity=.7,e.icon=t,e.label.dispose(),e.label=void 0,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"orientation",{set:function(e){var t=this.icon;t&&(t.rotation=e=="horizontal"?0:-90)},enumerable:!0,configurable:!0}),i}(Xt);_.registeredClasses.ResizeButton=Yr;var dp=function(s){function i(){var e=s.call(this)||this;e.className="CloseButton",e.padding(8,8,8,8),e.showSystemTooltip=!0,e.width=30,e.height=30;var t=new ae;e.cursorOverStyle=He.pointer;var n=e.background;n.cornerRadius(20,20,20,20);var r=t.getFor("background");n.fill=r,n.stroke=t.getFor("primaryButton"),n.strokeOpacity=1,n.strokeWidth=1;var a=t.getFor("primaryButtonActive"),o=n.states.getKey("hover");o.properties.strokeWidth=3,o.properties.fill=r;var l=n.states.getKey("down");l.properties.stroke=a,l.properties.fill=r;var h=new $;return h.element=e.paper.add("path"),h.stroke=n.stroke,e.icon=h,e.applyTheme(),e}return w(i,s),i.prototype.validate=function(){s.prototype.validate.call(this);var e=this.pixelWidth/3,t=this.pixelHeight/3,n=E({x:-e/2,y:-t/2});n+=T({x:e/2,y:t/2}),n+=E({x:e/2,y:-t/2}),n+=T({x:-e/2,y:t/2}),this.icon.path=n,this.invalidateLayout()},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Close"))},i}(Xt);_.registeredClasses.CloseButton=dp;var cp=function(s){function i(){var e=s.call(this)||this;e.className="SwitchButton",e.tooltipY=0,e.layout="horizontal",e.contentAlign="center",e.contentValign="middle",e.padding(8,16,8,16),e.setStateOnChildren=!0,e.states.create("active");var t=new ae,n=new $e;n.fillOpacity=.3,n.states.create("active").properties.fillOpacity=1,n.isActive=!0,e.leftLabel=n;var r=new Xt,a=new ii;r.contentValign="none",r.padding(0,0,0,0),a.radius=10,r.icon=a,r.icon.valign="middle",r.label=void 0;var o=F(100);r.background.cornerRadius(o,o,o,o),r.width=3.5*a.radius,r.height=2.1*a.radius,r.marginLeft=8,r.marginRight=8,r.togglable=!0,a.dx=.7*-a.radius,a.fill=t.getFor("primaryButton"),a.states.create("hover").properties.fill=t.getFor("primaryButtonHover");var l=a.states.create("active");l.properties.fill=t.getFor("primaryButtonActive"),l.properties.dx=.7*a.radius,e.switchButton=r,e.events.on("toggled",function(){e.leftLabel.isActive=!e.isActive,e.rightLabel.isActive=e.isActive});var h=new $e;return h.fillOpacity=.3,h.states.create("active").properties.fillOpacity=1,e.rightLabel=h,e.role="button",e.focusable=!0,h.valign="middle",n.valign="middle",r.valign="middle",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"leftLabel",{get:function(){return this._leftLabel},set:function(e){this._leftLabel&&this.removeDispose(this._leftLabel),this._leftLabel=e,e&&(e.parent=this,e.interactionsEnabled=!1,e.shouldClone=!1,this._disposers.push(this._leftLabel))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rightLabel",{get:function(){return this._rightLabel},set:function(e){this._rightLabel&&this.removeDispose(this._rightLabel),this._rightLabel=e,e&&(e.parent=this,e.interactionsEnabled=!1,e.shouldClone=!1,this._disposers.push(this._rightLabel))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"switch",{get:function(){return this._switchButton},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"switchButton",{get:function(){return this._switchButton},set:function(e){this._switchButton&&this.removeDispose(this._switchButton),this._switchButton=e,e&&(e.parent=this,e.shouldClone=!1,this._disposers.push(this._switchButton))},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),e.leftLabel&&this.leftLabel.copyFrom(e.leftLabel),e.rightLabel&&this.rightLabel.copyFrom(e.rightLabel),e.switchButton&&this.switchButton.copyFrom(e.switchButton)},i}(W);_.registeredClasses.SwitchButton=cp;var En=function(s){function i(){var e=s.call(this)||this;e._previousStart=0,e._previousEnd=1,e._prevStart=0,e._prevEnd=1,e._isBusy=!1,e._skipRangeEvents=!1,e.updateWhileMoving=!0,e.className="Scrollbar",e.minHeight=12,e.minWidth=12,e.animationDuration=0,e.animationEasing=Qt,e.margin(10,10,10,10);var t=new ae,n=e.background;return n.cornerRadius(10,10,10,10),n.fill=t.getFor("fill"),n.fillOpacity=.5,e.showSystemTooltip=!0,e.startGrip=new Yr,e.endGrip=new Yr,e.events.on("transformed",function(){e.updateThumb()},e,!1),e.start=0,e.end=1,e.role="scrollbar",e.thumb.role="slider",e.thumb.readerLive="polite",e.startGrip.role="slider",e.endGrip.role="slider",e.events.once("inited",function(){e._previousStart=void 0,e.dispatchRangeChange()},void 0,!1),e.hideGrips=!1,e.orientation="horizontal",e.setSVGAttribute({"aria-valuemin":"0"}),e.setSVGAttribute({"aria-valuemax":"100"}),e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),this.orientation==="horizontal"?(v(this.readerTitle)||(this.readerTitle=this.language.translate("Use TAB to select grip buttons or left and right arrows to change selection")),v(this.thumb.readerDescription)||(this.thumb.readerDescription=this.language.translate("Use left and right arrows to move selection")),v(this.startGrip.readerDescription)||(this.startGrip.readerDescription=this.language.translate("Use left and right arrows to move left selection")),v(this.endGrip.readerDescription)||(this.endGrip.readerDescription=this.language.translate("Use left and right arrows to move right selection")),this.readerOrientation="horizontal"):(v(this.readerTitle)||(this.readerTitle=this.language.translate("Use TAB select grip buttons or up and down arrows to change selection")),v(this.thumb.readerDescription)||(this.thumb.readerDescription=this.language.translate("Use up and down arrows to move selection")),v(this.startGrip.readerDescription)||(this.startGrip.readerDescription=this.language.translate("Use up and down arrows to move upper selection")),v(this.endGrip.readerDescription)||(this.endGrip.readerDescription=this.language.translate("Use up and down arrows to move lower selection")),this.readerOrientation="vertical"),this.readerControls=this.baseSprite.uidAttr()},i.prototype.validateLayout=function(){this.updateSize(),s.prototype.validateLayout.call(this),this.updateExtremes()},i.prototype.processBackground=function(){s.prototype.processBackground.call(this);var e=this.background;e.clickable=!0,e.events.on("hit",this.handleBgHit,this,void 0)},i.prototype.handleBgHit=function(e){this.makeBusy();var t=e.spritePoint;t=Qe(t,this.background,this);var n=this.thumb;if(this.orientation=="horizontal"){var r=t.x-n.pixelWidth/2;r=R(r,0,this.innerWidth-n.pixelWidth),this._thumbAnimation=n.animate({property:"x",to:r},this.animationDuration,this.animationEasing)}else{var a=t.y-n.pixelHeight/2;a=R(a,0,this.innerHeight-n.pixelHeight),this._thumbAnimation=n.animate({property:"y",to:a},this.animationDuration,this.animationEasing)}this.animationDuration>0?this._thumbAnimation.events.on("animationended",this.makeUnbusy,this,!1):(this._thumb.validate(),this.makeUnbusy())},i.prototype.makeBusy=function(){this._isBusy=!0,this._skipRangeEvents=!1,this._unbusyTimeout&&this.removeDispose(this._unbusyTimeout),this._unbusyTimeout=void 0,this.stopAnimations()},i.prototype.stopAnimations=function(){this._thumbAnimation&&this._thumbAnimation.stop(!0),this._zoomAnimation&&this._zoomAnimation.stop(!0)},i.prototype.makeUnbusy=function(){this._unbusyTimeout=this.setTimeout(this.makeUnbusyReal.bind(this),1.1*this.animationDuration)},i.prototype.makeUnbusyReal=function(){this._usingGrip=void 0,this._isBusy=!1,this.updateWhileMoving||this.dispatchRangeChange()},i.prototype.dispatchRangeChange=function(){this._previousEnd==this.end&&this._previousStart==this.start||(this._previousStart=this.start,this._previousEnd=this.end,this.dispatch("rangechanged"))},i.prototype.updateThumb=function(e){if(e===void 0&&(e=!0),this.parent){var t=this.thumb,n=this.start,r=this.end,a=this.startGrip,o=this.endGrip;if(this.orientation=="horizontal"){var l=this.innerWidth;t.width=l*(r-n),t.maxX=l-t.pixelWidth,t.x=n*l,a.moveTo({x:t.pixelX,y:0},void 0,void 0,!0),o.moveTo({x:t.pixelX+t.pixelWidth,y:0},void 0,void 0,!0),a.readerTitle=this.language.translate("From %1",void 0,this.adapter.apply("positionValue",{value:Math.round(100*n)+"%",position:n}).value),a.readerValueNow=""+Math.round(100*n),a.readerValueText=a.readerTitle,o.readerTitle=this.language.translate("To %1",void 0,this.adapter.apply("positionValue",{value:Math.round(100*r)+"%",position:r}).value),o.readerValueNow=""+Math.round(100*r),o.readerValueText=o.readerTitle}else{var h=this.innerHeight;t.height=h*(r-n),t.maxY=h-t.pixelHeight,t.y=(1-r)*h,a.moveTo({x:0,y:t.pixelY+t.pixelHeight},void 0,void 0,!0),o.moveTo({x:0,y:t.pixelY},void 0,void 0,!0),a.readerTitle=this.language.translate("To %1",void 0,this.adapter.apply("positionValue",{value:Math.round(100*(1-n))+"%",position:1-n}).value),a.readerValueNow=""+Math.round(100*n),a.readerValueText=a.readerTitle,o.readerTitle=this.language.translate("From %1",void 0,this.adapter.apply("positionValue",{value:Math.round(100*(1-r))+"%",position:1-r}).value),o.readerValueNow=""+Math.round(100*r),o.readerValueText=o.readerTitle}t.readerTitle=this.language.translate("From %1 to %2",void 0,this.adapter.apply("positionValue",{value:Math.round(100*n)+"%",position:n}).value,this.adapter.apply("positionValue",{value:Math.round(100*r)+"%",position:r}).value),t.readerValueNow=""+Math.round(100*n),t.readerValueText=t.readerTitle,this.readerValueNow=""+Math.round(100*n),this.readerValueText=t.readerTitle,!this._skipRangeEvents&&this.updateWhileMoving&&e&&this.dispatchRangeChange()}},i.prototype.updateExtremes=function(){var e=0,t=0,n=0,r=0;this.orientation=="horizontal"?(n=this.innerWidth,t=r=this.innerHeight/2):(r=this.innerHeight,e=n=this.innerWidth/2);var a=this.startGrip;a.minX=e,a.maxX=n,a.minY=t,a.maxY=r;var o=this.endGrip;o.minX=e,o.maxX=n,o.minY=t,o.maxY=r;var l=this.thumb;l.minX=e,l.maxX=n,l.minY=t,l.maxY=r},i.prototype.updateSize=function(){var e=this.orientation,t=this.startGrip;t&&(t.orientation=e),this.endGrip&&(this.endGrip.orientation=e);var n=this.thumb;n&&(e=="horizontal"?(y(this._pixelWidth)||this.width instanceof te||(this.width=F(100)),v(this.percentHeight)&&(this.height=this.minHeight),n.height=this.innerHeight,n.verticalCenter="middle",n.horizontalCenter="left"):(y(this._pixelHeight)||this.height instanceof te||(this.height=F(100)),v(this.percentWidth)&&(this.width=this.minWidth),n.width=this.innerWidth,n.verticalCenter="top",n.horizontalCenter="middle"))},Object.defineProperty(i.prototype,"isBusy",{get:function(){return this._isBusy},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"start",{get:function(){return Math.min(this.getPosition(this._start),this.getPosition(this._end))},set:function(e){this._isBusy||(this.__start=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"__start",{get:function(){return this._start},set:function(e){this._start=this.getPosition(e),this.updateThumb()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"end",{get:function(){return Math.max(this.getPosition(this._start),this.getPosition(this._end))},set:function(e){this._isBusy||(this.__end=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"__end",{get:function(){return this._end},set:function(e){this._end=this.getPosition(e),this.updateThumb()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"range",{get:function(){return{start:this.start,end:this.end,priority:this._usingGrip}},enumerable:!0,configurable:!0}),i.prototype.skipRangeEvents=function(){this._isBusy||(this._skipRangeEvents=!0)},i.prototype.fixRange=function(e){e.start==V(this._start,2)&&e.end==V(this._end,2)||(this._start=e.start,this._end=e.end,this._skipRangeEvents=!0,this.updateThumb(),this._skipRangeEvents=!1,this.thumb.validate(),this.thumb.background.validate())},i.prototype.getPosition=function(e){return R(V(e,4),0,1)},Object.defineProperty(i.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(e){this.setPropertyValue("orientation",e)&&(e==="horizontal"?(this.startGrip.cursorOverStyle=He.horizontalResize,this.endGrip.cursorOverStyle=He.horizontalResize):(this.startGrip.cursorOverStyle=He.verticalResize,this.endGrip.cursorOverStyle=He.verticalResize),this.updateByOrientation(),this.invalidate())},enumerable:!0,configurable:!0}),i.prototype.updateByOrientation=function(){},Object.defineProperty(i.prototype,"startGrip",{get:function(){return this._startGrip},set:function(e){this._startGrip&&this.removeDispose(this._startGrip),this._startGrip=e,this.processGrip(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endGrip",{get:function(){return this._endGrip},set:function(e){this._endGrip&&this.removeDispose(this._endGrip),this._endGrip=e,this.processGrip(e)},enumerable:!0,configurable:!0}),i.prototype.processGrip=function(e){e.parent=this,e.isMeasured=!1,e.focusable=!0,e.shouldClone=!1,e.zIndex=100,e.events.on("drag",this.handleGripDrag,this,!1),e.events.on("dragstop",this.makeUnbusy,this,!1),e.events.on("down",this.makeBusy,this,!1),e.events.on("up",this.makeUnbusy,this,!1),this._disposers.push(e)},i.prototype.handleGripDrag=function(e){this.makeBusy(),e.target===this._startGrip?this._usingGrip="start":this._usingGrip="end",this.orientation=="horizontal"?(this._start=this.startGrip.pixelX/this.innerWidth,this._end=this.endGrip.pixelX/this.innerWidth):(this._start=1-this.startGrip.pixelY/this.innerHeight,this._end=1-this.endGrip.pixelY/this.innerHeight),this.updateThumb()},Object.defineProperty(i.prototype,"thumb",{get:function(){if(!this._thumb){var e=new Xt;e.background.cornerRadius(10,10,10,10),e.padding(0,0,0,0),this.thumb=e}return this._thumb},set:function(e){var t=this;e&&(this._thumb&&this.removeDispose(this._thumb),this._thumb=e,e.parent=this,e.isMeasured=!1,e.inert=!0,e.draggable=!0,e.clickable=!0,e.hoverable=!0,e.focusable=!0,e.shouldClone=!1,e.zIndex=0,e.cursorOverStyle=He.grab,e.cursorDownStyle=He.grabbing,e.events.on("dragstart",this.makeBusy,this,!1),e.events.on("dragstop",this.makeUnbusy,this,!1),e.events.on("positionchanged",this.handleThumbPosition,this,!1),e.events.on("sizechanged",this.handleThumbPosition,this,!1),e.events.on("doublehit",this.handleDoubleClick,this,!1),this._disposers.push(K().body.events.on("keyup",function(n){Ct.isKey(n.event,["space","enter"])&&t.thumb.isFocused&&(n.event.preventDefault(),t.handleDoubleClick())})),this._disposers.push(this._thumb))},enumerable:!0,configurable:!0}),i.prototype.handleDoubleClick=function(){this.makeBusy();var e=0,t=1;this.start!=0||this.end!=1?(this._prevStart=this.start,this._prevEnd=this.end):(e=this._prevStart,t=this._prevEnd);var n=this.animate([{property:"__start",to:e},{property:"__end",to:t}],this.animationDuration,this.animationEasing);n&&!n.isFinished()?(n.events.on("animationended",this.makeUnbusy,this,!1),this._zoomAnimation=n):this.makeUnbusy()},i.prototype.handleThumbPosition=function(){var e=this.thumb;if(this.orientation=="horizontal"){var t=this.innerWidth,n=e.innerWidth,r=e.pixelX;this._start=r/t,this._end=(r+n)/t,this.updateThumb()}else{var a=this.innerHeight,o=e.innerHeight,l=e.pixelY;l+o>a&&(l=a-o,e.y=l),this._start=1-(l+o)/a,this._end=1-l/a,this.updateThumb()}},i.prototype.createBackground=function(){return new St},Object.defineProperty(i.prototype,"hideGrips",{get:function(){return this._hideGrips},set:function(e){var t=this;this._hideGrips=e,this._overDisposer&&this.removeDispose(this._overDisposer),this._outDisposer&&this.removeDispose(this._outDisposer),e?(this._overDisposer=this.events.on("over",function(){t.startGrip.show(),t.endGrip.show()},void 0,!1),this._outDisposer=this.events.on("out",function(){t.startGrip.hide(),t.endGrip.hide()},void 0,!1),this.startGrip.hide(),this.endGrip.hide()):(this.startGrip.show(),this.endGrip.show())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animationDuration",{get:function(){return this.getPropertyValue("animationDuration")},set:function(e){this.setPropertyValue("animationDuration",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animationEasing",{get:function(){return this.getPropertyValue("animationEasing")},set:function(e){this.setPropertyValue("animationEasing",e)},enumerable:!0,configurable:!0}),i.prototype.asFunction=function(e){return e=="animationEasing"||s.prototype.asIs.call(this,e)},i}(W);_.registeredClasses.Scrollbar=En;var fp=function(s){function i(){var e=s.call(this)||this;return e.className="Slider",e.thumb.opacity=0,e.thumb.interactionsEnabled=!1,e.endGrip.opacity=0,e.endGrip.interactionsEnabled=!1,e.startGrip.events.on("drag",function(){e.endGrip.x=e.startGrip.x,e.endGrip.y=e.startGrip.y}),e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"__end",{get:function(){return this._start},set:function(e){},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"end",{get:function(){return this._start},set:function(e){},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"start",{get:function(){return this._start},set:function(e){this._isBusy||(this.__start=e)},enumerable:!0,configurable:!0}),i}(En);_.registeredClasses.Slider=fp;var zr=function(s){function i(){var e=s.call(this)||this;e.className="TextLink",e.selectable=!0;var t=new ae;return e.fill=t.getFor("primaryButton").brighten(.3),e.states.create("hover").properties.fill=t.getFor("primaryButtonHover").brighten(.3),e.states.create("down").properties.fill=t.getFor("primaryButtonDown").brighten(.3),e.cursorOverStyle=He.pointer,e.applyTheme(),e}return w(i,s),i}($e);_.registeredClasses.TextLink=zr;var wi=function(s){function i(){var e=s.call(this)||this;return e.properties={},e.isTemplate=!1,e._scale=1,e._nonScaling=!0,e.className="Filter",e.filterPrimitives=new re,e.properties.filterUnits="objectBoundingBox",e.filterPrimitives.events.on("inserted",function(t){e._disposers.push(t.newValue)}),e.width=120,e.height=120,e.applyTheme(),e}return w(i,s),i.prototype.appendPrimitives=function(e){A(this.filterPrimitives.iterator(),function(t){e.add(t)})},i.prototype.animate=function(e,t,n){return new gt(this,e,t,n).start()},Object.defineProperty(i.prototype,"width",{get:function(){return this.properties.width},set:function(e){this.properties.width=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"height",{get:function(){return this.properties.height},set:function(e){this.properties.height=e},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){var t=this;s.prototype.copyFrom.call(this,e),X(e.properties,function(n,r){t[n]=r})},Object.defineProperty(i.prototype,"paper",{get:function(){return this._paper?this._paper:Ui()},set:function(e){this._paper!=e&&(this._paper=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new Yi(this._animations))),this._animations},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scale",{get:function(){return this._scale},set:function(e){this._scale=e,this.updateScale()},enumerable:!0,configurable:!0}),i.prototype.updateScale=function(){},Object.defineProperty(i.prototype,"filterUnits",{get:function(){return this.properties.filterUnits},set:function(e){this.properties.filterUnits=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"nonScaling",{get:function(){return this._nonScaling},set:function(e){this._nonScaling=e,e||(this._scale=1),this.updateScale()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sprite",{set:function(e){this.setSprite(e)},enumerable:!0,configurable:!0}),i.prototype.setSprite=function(e){this._sprite&&this._sprite!=e&&this._sprite.filters.removeValue(this),this._sprite=e},i}(Ke),qa=function(s){function i(){var e=s.call(this)||this;return e.className="DropShadowFilter",e.color=B("#000"),e.feGaussianBlur=e.paper.add("feGaussianBlur"),e.feGaussianBlur.attr({result:"blurOut",in:"SourceGraphic"}),e.filterPrimitives.push(e.feGaussianBlur),e.feOffset=e.paper.add("feOffset"),e.feOffset.attr({result:"offsetBlur"}),e.filterPrimitives.push(e.feOffset),e.feFlood=e.paper.add("feFlood"),e.feFlood.attr({"flood-color":e.color}),e.filterPrimitives.push(e.feFlood),e.feComposite=e.paper.add("feComposite"),e.feComposite.attr({in2:"offsetBlur",operator:"in"}),e.filterPrimitives.push(e.feComposite),e.feMerge=e.paper.addGroup("feMerge"),e.feMerge.add(e.paper.add("feMergeNode")),e.feMerge.add(e.paper.add("feMergeNode").attr({in:"SourceGraphic"})),e.filterPrimitives.push(e.feMerge),e.width=200,e.height=200,e.blur=1.5,e.dx=3,e.dy=3,e.opacity=.5,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"color",{get:function(){return this.properties.color},set:function(e){this.properties.color=e,this.feFlood&&this.feFlood.attr({"flood-color":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"opacity",{get:function(){return this.properties.opacity},set:function(e){this.properties.opacity=e,this.feFlood.attr({"flood-opacity":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dx",{get:function(){return this.properties.dx},set:function(e){this.properties.dx=e,this.feOffset.attr({dx:e/this.scale})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dy",{get:function(){return this.properties.dy},set:function(e){this.properties.dy=e,this.feOffset.attr({dy:e/this.scale})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"blur",{get:function(){return this.properties.blur},set:function(e){this.properties.blur=e,this.feGaussianBlur.attr({stdDeviation:e/this.scale})},enumerable:!0,configurable:!0}),i.prototype.updateScale=function(){this.dx=this.dx,this.dy=this.dy,this.blur=this.blur},i}(wi);_.registeredClasses.DropShadowFilter=qa;var Rn=function(s){function i(){var e=s.call(this)||this;e._boundingRect={x:-4e4,y:-4e4,width:8e4,height:8e4},e._pointTo={x:0,y:0},e.fitPointerToBounds=!1,e._verticalOrientation="up",e.fixDoc=!0,e.className="Tooltip",e.isMeasured=!1,e.getFillFromObject=!0,e.margin(5,5,5,5),e.defaultState.transitionDuration=1,e.hiddenState.transitionDuration=1;var t=e.background;t.interactionsEnabled=!1,t.fillOpacity=.9,t.strokeWidth=1,t.strokeOpacity=1,t.stroke=B("#ffffff"),t.cornerRadius=3,t.pointerLength=6,t.pointerBaseWidth=10;var n=new qa;n.dy=1,n.dx=1,n.opacity=.5,t.filters.push(n),e.autoTextColor=!0;var r=e.createChild($e);return r.shouldClone=!1,e.label=r,r.padding(7,12,4,12),r.interactionsEnabled=!1,r.horizontalCenter="middle",r.fill=B("#ffffff"),e._disposers.push(r),e.label.events.on("sizechanged",e.drawBackground,e),e.label.zIndex=1,e.pointerOrientation="vertical",e.animationDuration=0,e.animationEasing=Qt,e.setPropertyValue("showInViewport",!1),e.role="tooltip",e.visible=!1,e.opacity=0,e.x=0,e.y=0,e.events.on("visibilitychanged",e.handleVisibility,e),e.applyTheme(),e}return w(i,s),i.prototype.handleVisibility=function(){this.visible&&this.label.invalidate()},Object.defineProperty(i.prototype,"getStrokeFromObject",{get:function(){return this.getPropertyValue("getStrokeFromObject")},set:function(e){this.setPropertyValue("getStrokeFromObject",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"autoTextColor",{get:function(){return this.getPropertyValue("autoTextColor")},set:function(e){this.setPropertyValue("autoTextColor",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"keepTargetHover",{get:function(){return this.getPropertyValue("keepTargetHover")},set:function(e){var t=this;this.setPropertyValue("keepTargetHover",e,!0)&&e&&(this.hoverable=!0,this.background.interactionsEnabled=!0,this._disposers.push(this.events.on("over",function(n){t.targetSprite&&t.targetSprite.hoverable&&(t.targetSprite.isHover=!0)})),this._disposers.push(this.events.on("out",function(n){t.targetSprite&&t.targetSprite.hoverable&&(t.targetSprite.isHover=!1)})))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"showInViewport",{get:function(){return this.getPropertyValue("showInViewport")},set:function(e){this.setPropertyValue("showInViewport",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"getFillFromObject",{get:function(){return this.getPropertyValue("getFillFromObject")},set:function(e){this.setPropertyValue("getFillFromObject",e,!0)},enumerable:!0,configurable:!0}),i.prototype.createBackground=function(){return new lp},Object.defineProperty(i.prototype,"pointerOrientation",{get:function(){return this.getPropertyValue("pointerOrientation")},set:function(e){this.setPropertyValue("pointerOrientation",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animationDuration",{get:function(){return this.getPropertyValue("animationDuration")},set:function(e){this.setPropertyValue("animationDuration",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animationEasing",{get:function(){return this.getPropertyValue("animationEasing")},set:function(e){this.setPropertyValue("animationEasing",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"html",{get:function(){return this.label.html},set:function(e){this.label.html!=e&&(this.label.html=e,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"text",{get:function(){return this.label.text},set:function(e){this.label.text!=e&&(this.label.text=e,this.invalidate())},enumerable:!0,configurable:!0}),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.label;e.invalid&&e.validate();var t,n,r=this._pointTo.x,a=this._pointTo.y,o=this._boundingRect,l=e.measuredWidth,h=e.measuredHeight,p=this.background.pointerLength;if(this.ignoreBounds&&(o=void 0),o&&this.fixDoc&&l>o.width){Tr({x:o.x,y:o.y},this.parent);var u=Tr({x:o.x+o.width,y:o.y+o.height},this.parent),d=document.body.offsetWidth;document.body.offsetHeight,u.x>d/2?o.x=o.width-l:o.width=o.x+l}var c=this.pointerOrientation;c=="horizontal"||c=="left"||c=="right"?(n=-h/2,t=c=="horizontal"?o&&r>o.x+o.width/2?-l/2-p:l/2+p:c=="left"?l/2+p:-l/2-p):(o&&(t=R(0,o.x-r+l/2,o.x-r+o.width-l/2)),c=="vertical"?o&&a>o.y+h+p?(n=-h-p,this._verticalOrientation="up"):(n=p,this._verticalOrientation="down"):c=="down"?(n=-h-p,this._verticalOrientation="up"):(n=p,this._verticalOrientation="down")),o&&(n=R(n,o.y-a,o.y+o.height-h-a)),e.x=t,e.y=n,this.drawBackground()},i.prototype.updateBackground=function(){this.group.addToBack(this.background.group)},i.prototype.drawBackground=function(){var e=this.label,t=this.background,n=e.measuredWidth,r=e.measuredHeight,a=this._boundingRect,o=n,l=e.pixelX-n/2,h=r,p=e.pixelY,u=this._pointTo.x,d=this._pointTo.y,c=a.x-u,f=c+a.width,g=a.y-d,m=g+a.height;t.x=l,t.y=p,t.width=o,t.height=h,this.fitPointerToBounds?(t.pointerX=R(-t.x,c-t.x,f-t.x),t.pointerY=R(-t.y,g-t.y,m-t.y)):(t.pointerX=-t.x,t.pointerY=-t.y),t.validate()},i.prototype.delayedPointTo=function(e,t){var n=this;this._pointToDisposer&&this._pointToDisposer.dispose(),this._pointToDisposer=_.events.once("exitframe",function(){n.pointTo(e,t)}),this.addDisposer(this._pointToDisposer)},i.prototype.pointTo=function(e,t){this._pointTo.x==e.x&&this._pointTo.y==e.y||(this._pointTo=e,this.invalidate(),!this.visible||t?(this.moveTo(this._pointTo),this._animation&&this._animation.kill()):this.pixelX==0&&this.pixelY==0?this.moveTo(this._pointTo):(this._animation&&this._animation.kill(),this._animation=new gt(this,[{property:"x",to:e.x,from:this.pixelX},{property:"y",to:e.y,from:this.pixelY}],this.animationDuration,this.animationEasing).start()))},i.prototype.setBounds=function(e){var t=this._boundingRect;t.x==e.x&&t.y==e.y&&t.width==e.width&&t.height==e.height||(this._boundingRect=e,this.invalidate())},Object.defineProperty(i.prototype,"boundingContainer",{set:function(e){this._boundingContainer=e,e.events.on("sizechanged",this.updateBounds,this),e.events.on("positionchanged",this.updateBounds,this)},enumerable:!0,configurable:!0}),i.prototype.updateBounds=function(){var e=this._boundingContainer,t=Dr({x:e.pixelX,y:e.pixelY,width:e.maxWidth,height:e.maxHeight},e);this.setBounds(t)},Object.defineProperty(i.prototype,"ignoreBounds",{get:function(){return this.getPropertyValue("ignoreBounds")},set:function(e){this.setPropertyValue("ignoreBounds",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"verticalOrientation",{get:function(){return this._verticalOrientation},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltip",{get:function(){},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.label.copyFrom(e.label),e._boundingRect&&(this._boundingRect=e._boundingRect)},i.prototype.asFunction=function(e){return e=="animationEasing"||s.prototype.asIs.call(this,e)},i}(W);_.registeredClasses.Tooltip=Rn;var $a=function(s){function i(){var e=s.call(this)||this;return e.className="Trapezoid",e.element=e.paper.add("path"),e.topSide=F(100),e.bottomSide=F(100),e.leftSide=F(100),e.rightSide=F(100),e.isMeasured=!1,e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.pixelWidth,t=this.pixelHeight,n=xe(this.topSide,e),r=xe(this.bottomSide,e),a=xe(this.leftSide,t),o=xe(this.rightSide,t),l=(e-n)/2,h=(t-a)/2,p=e-(e-n)/2,u=(t-o)/2,d=e-(e-r)/2,c=t-(t-o)/2,f=(e-r)/2,g=t-(t-a)/2,m="",x="",b="",C="";if(v(this.horizontalNeck)){var S=this.horizontalNeck.value;m=T({x:e*S,y:Math.max(h,u)}),b=T({x:e*S,y:Math.min(c,g)})}if(v(this.verticalNeck)){var P=this.verticalNeck.value;x=T({x:Math.min(p,d),y:t*P}),C=T({x:Math.max(l,f),y:t*P})}var O=E({x:l,y:h})+m+T({x:p,y:u})+x+T({x:d,y:c})+b+T({x:f,y:g})+C;this.path=O},Object.defineProperty(i.prototype,"topSide",{get:function(){return this.getPropertyValue("topSide")},set:function(e){this.setPercentProperty("topSide",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bottomSide",{get:function(){return this.getPropertyValue("bottomSide")},set:function(e){this.setPercentProperty("bottomSide",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"leftSide",{get:function(){return this.getPropertyValue("leftSide")},set:function(e){this.setPercentProperty("leftSide",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rightSide",{get:function(){return this.getPropertyValue("rightSide")},set:function(e){this.setPercentProperty("rightSide",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"horizontalNeck",{get:function(){return this.getPropertyValue("horizontalNeck")},set:function(e){this.setPropertyValue("horizontalNeck",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"verticalNeck",{get:function(){return this.getPropertyValue("verticalNeck")},set:function(e){this.setPropertyValue("verticalNeck",e,!0)},enumerable:!0,configurable:!0}),i}($);_.registeredClasses.Trapezoid=$a;var Ur=function(s){function i(){var e=s.call(this)||this;return e.className="Triangle",e.element=e.paper.add("path"),e.direction="top",e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e,t=this.pixelWidth,n=this.pixelHeight;switch(this.direction){case"right":e=E({x:0,y:0})+T({x:t,y:n/2})+T({x:0,y:n})+" Z";break;case"left":e=E({x:t,y:0})+T({x:0,y:n/2})+T({x:t,y:n})+" Z";break;case"bottom":e=E({x:0,y:0})+T({x:t,y:0})+T({x:t/2,y:n})+" Z";break;case"top":e=E({x:t/2,y:0})+T({x:t,y:n})+T({x:0,y:n})+" Z"}this.path=e},Object.defineProperty(i.prototype,"direction",{get:function(){return this.getPropertyValue("direction")},set:function(e){this.setPropertyValue("direction",e,!0)},enumerable:!0,configurable:!0}),i}($);_.registeredClasses.Triangle=Ur;var zt=function(){function s(i,e){this._tensionX=i,this._tensionY=e}return s.prototype.smooth=function(i){for(var e=i.length-1;e>0;e--){var t=i[e],n=i[e-1];Math.abs(t.x-n.x)<.1&&Math.abs(t.y-n.y)<.1&&i.splice(e-1,1)}var r=this._tensionX,a=this._tensionY;if(i.length<3||r>=1&&a>=1)return Zi(i);var o=i[0],l=i[i.length-1],h=!1;V(o.x,3)==V(l.x)&&V(o.y)==V(l.y)&&(h=!0);for(var p="",u=(e=0,i.length-1);e<u;e++){t=i[e-1],n=i[e];var d=i[e+1],c=i[e+2];e===0?t=h?i[i.length-2]:i[e]:e==i.length-2&&(c=h?i[1]:i[e+1]),p+=_i(d,Ys(t,n,d,0,r,a),zs(0,n,d,c,r,a))}return p},s}();function Bn(s,i,e,t,n,r){var a=s.x,o=s.y,l=i.x,h=i.y,p=oe(s,i);r&&(e=p/Math.round(p/e));var u=_.getCache(fa(["wavedLine",s.x,i.x,s.y,i.y,e,t]));if(!u){if(p>0){var d=Math.atan2(h-o,l-a),c=Math.cos(d),f=Math.sin(d),g=e*c,m=e*f;if(e<=1||t<=1)u=T(i);else{var x=Math.round(2*p/e),b=[],C=1;l<a&&(C*=-1),h<o&&(C*=-1);for(var S=0;S<=x;S++){var P=a+S*g/2+(C*=-1)*t/2*f,O=o+S*m/2-C*t/2*c;b.push({x:P,y:O})}u=new zt(n,n).smooth(b)}}else u="";_.setCache(fa(["wavedLine",s.x,i.x,s.y,i.y,e,t]),u)}return u}var gp=function(){function s(i,e){this._reversed=i,this._closed=e.closed}return s.prototype._curve=function(i,e,t,n,r,a){var o=(e-i)/3;return this._reversed?_i({x:n,y:e},{x:t+o*r,y:i+o},{x:n-o*a,y:e-o}):_i({x:e,y:n},{x:i+o,y:t+o*r},{x:e-o,y:n-o*a})},s.prototype.smooth=function(i){var e=this,t=NaN,n=NaN,r=NaN,a=NaN,o=NaN,l=0,h="";switch(j(i,function(p){var u=p.x,d=p.y;if(e._reversed){var c=u;u=d,d=c}var f=NaN;if(u!==n||d!==a){switch(l){case 0:l=1,e._reversed?h+=T({x:d,y:u}):h+=T({x:u,y:d});break;case 1:l=2;break;case 2:l=3,h+=e._curve(t,n,r,a,mp(t,n,r,a,f=vp(t,n,r,a,u,d)),f);break;default:h+=e._curve(t,n,r,a,o,f=vp(t,n,r,a,u,d))}t=n,n=u,r=a,a=d,o=f}}),l){case 2:this._reversed?h+=T({x:a,y:n}):h+=T({x:n,y:a});break;case 3:h+=this._curve(t,n,r,a,o,mp(t,n,r,a,o))}return this._closed&&(h+=" Z"),h},s}();function yp(s){return s<0?-1:1}function mp(s,i,e,t,n){var r=i-s;return r?(3*(t-e)/r-n)/2:n}function vp(s,i,e,t,n,r){var a=i-s,o=n-i,l=(t-e)/(a||o<0&&-0),h=(r-t)/(o||a<0&&-0),p=(l*o+h*a)/(a+o);return(yp(l)+yp(h))*Math.min(Math.abs(l),Math.abs(h),.5*Math.abs(p))||0}var bp=function(s){function i(e){return s.call(this,!1,e)||this}return w(i,s),i}(gp),xp=function(s){function i(e){return s.call(this,!0,e)||this}return w(i,s),i}(gp),fd=function(){function s(i){this._closed=i.closed}return s.prototype.smooth=function(i){var e=this,t=NaN,n=NaN,r=NaN,a=NaN,o=NaN,l=NaN,h=NaN,p=NaN,u=NaN,d=NaN,c=0,f="",g=function(x,b){f+=_i({x:(t+4*n+x)/6,y:(l+4*h+b)/6},{x:(2*t+n)/3,y:(2*l+h)/3},{x:(t+2*n)/3,y:(l+2*h)/3})},m=function(x){var b=x.x,C=x.y;switch(c){case 0:c=1,e._closed?(r=b,p=C):f+=T({x:b,y:C});break;case 1:c=2,e._closed&&(a=b,u=C);break;case 2:if(c=3,e._closed){o=b,d=C,f+=E({x:(t+4*n+b)/6,y:(l+4*h+C)/6});break}f+=T({x:(5*t+n)/6,y:(5*l+h)/6});default:g(b,C)}t=n,n=b,l=h,h=C};if(j(i,m),this._closed)switch(c){case 1:f+=E({x:r,y:p}),f+=" Z";break;case 2:f+=E({x:(r+2*a)/3,y:(p+2*u)/3}),f+=T({x:(a+2*r)/3,y:(u+2*p)/3}),f+=" Z";break;case 3:m({x:r,y:p}),m({x:a,y:u}),m({x:o,y:d})}else{switch(c){case 3:g(n,h);case 2:f+=T({x:n,y:h})}f+=" Z"}return f},s}(),Hn=function(s){function i(){var e=s.call(this)||this;return e.className="WavedCircle",e.element=e.paper.add("path"),e.waveLength=16,e.waveHeight=4,e.fill=void 0,e.fillOpacity=0,e.tension=.8,e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){var e="",t=this.pixelRadius;t>0&&(e=E((n=this.getPoints(t))[0])+new zt(this.tension,this.tension).smooth(n));var n,r=this.pixelInnerRadius;r>0&&((n=this.getPoints(r)).reverse(),e+=E(n[0])+new zt(this.tension,this.tension).smooth(n)),this.path=e},i.prototype.getPoints=function(e){for(var t=e*Math.PI*2,n=this.waveHeight/2,r=t/Math.round(t/this.waveLength),a=r/2,o=[],l=t/r,h=0;h<=l;h++){var p=h*r/t*360,u=(h*r+a)/t*360;o.push({x:(e-n)*L(p),y:(e-n)*M(p)}),o.push({x:(e+n)*L(u),y:(e+n)*M(u)})}return o.pop(),o},Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!0,!1,10,!1),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelInnerRadius",{get:function(){return xe(this.innerRadius,ie(this.innerWidth/2,this.innerHeight/2))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"waveLength",{get:function(){return this.getPropertyValue("waveLength")},set:function(e){this.setPropertyValue("waveLength",e),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"waveHeight",{get:function(){return this.getPropertyValue("waveHeight")},set:function(e){this.setPropertyValue("waveHeight",e),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(e){this.setPropertyValue("tension",e),this.invalidate()},enumerable:!0,configurable:!0}),i}(ii);_.registeredClasses.WavedCircle=Hn;var si=function(s){function i(){var e=s.call(this)||this;return e.className="WavedLine",e.element=e.paper.add("path"),e.waveLength=16,e.waveHeight=4,e.tension=.8,e.pixelPerfect=!1,e.fill=B(),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){var e={x:this.x1,y:this.y1},t={x:this.x2,y:this.y2};this.path=E(e)+Bn(e,t,this.waveLength,this.waveHeight,this.tension,!0)},Object.defineProperty(i.prototype,"waveLength",{get:function(){return this.getPropertyValue("waveLength")},set:function(e){this.setPropertyValue("waveLength",e),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"waveHeight",{get:function(){return this.getPropertyValue("waveHeight")},set:function(e){this.setPropertyValue("waveHeight",e),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(e){this.setPropertyValue("tension",e),this.invalidate()},enumerable:!0,configurable:!0}),i}(yt),Ja=function(s){function i(){var e=s.call(this)||this;return e.className="WavedRectangle",e.element=e.paper.add("path"),e.waveLength=16,e.waveHeight=4,e.tension=.8,e.setPropertyValue("wavedLeft",!0),e.setPropertyValue("wavedRight",!0),e.setPropertyValue("wavedTop",!0),e.setPropertyValue("wavedBottom",!0),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.pixelWidth,t=this.pixelHeight;if(e>0&&t>0){var n={x:0,y:0},r={x:e,y:0},a={x:e,y:t},o={x:0,y:t},l=Math.min(e,this.waveLength),h=Math.min(t,this.waveHeight),p=Math.min(t,this.waveLength),u=Math.min(e,this.waveHeight),d="",c="",f="",g="";this.wavedTop&&(d=Bn(n,r,l,h,this.tension,!0)),this.wavedRight&&(c=Bn(r,a,p,u,this.tension,!0)),this.wavedBottom&&(f=Bn(a,o,l,h,this.tension,!0)),this.wavedLeft&&(g=Bn(o,n,p,u,this.tension,!0)),this.path=E(n)+d+T(r)+c+T(a)+f+T(o)+g+"z"}},Object.defineProperty(i.prototype,"waveLength",{get:function(){return this.getPropertyValue("waveLength")},set:function(e){this.setPropertyValue("waveLength",e),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"waveHeight",{get:function(){return this.getPropertyValue("waveHeight")},set:function(e){this.setPropertyValue("waveHeight",e),this.invalidate()},enumerable:!0,configurable:!0}),i.prototype.setWavedSides=function(e,t,n,r){this.wavedTop=e,this.wavedRight=t,this.wavedBottom=n,this.wavedLeft=r},Object.defineProperty(i.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(e){this.setPropertyValue("tension",e),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"wavedRight",{get:function(){return this.getPropertyValue("wavedRight")},set:function(e){this.setPropertyValue("wavedRight",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"wavedLeft",{get:function(){return this.getPropertyValue("wavedLeft")},set:function(e){this.setPropertyValue("wavedLeft",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"wavedTop",{get:function(){return this.getPropertyValue("wavedTop")},set:function(e){this.setPropertyValue("wavedTop",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"wavedBottom",{get:function(){return this.getPropertyValue("wavedBottom")},set:function(e){this.setPropertyValue("wavedBottom",e,!0)},enumerable:!0,configurable:!0}),i}(Mn),Qa=function(s){function i(){var e=s.call(this)||this;e.className="ZoomOutButton",e.padding(9,9,9,9),e.showSystemTooltip=!0;var t=new ae,n=e.background;n.cornerRadius(20,20,20,20),n.fill=t.getFor("primaryButton"),n.stroke=t.getFor("primaryButtonStroke"),n.strokeOpacity=0,n.states.getKey("hover").properties.fill=t.getFor("primaryButtonHover"),n.states.getKey("down").properties.fill=t.getFor("primaryButtonActive");var r=new $;r.element=e.paper.add("path");var a=E({x:0,y:0});return a+=T({x:11,y:0}),r.path=a,r.pixelPerfect=!0,r.padding(8,3,8,3),r.stroke=t.getFor("primaryButtonText"),e.icon=r,e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Zoom Out"))},i}(Xt);_.registeredClasses.ZoomOutButton=Qa;var _p=function(s){function i(){var e=s.call(this)||this;e.className="PlayButton",e.padding(12,12,12,12),e.showSystemTooltip=!0;var t=new ae,n=e.background;n.cornerRadius(25,25,25,25),n.fill=t.getFor("primaryButton"),n.stroke=t.getFor("primaryButtonStroke"),n.strokeOpacity=0,n.states.getKey("hover").properties.fill=t.getFor("primaryButtonHover"),n.states.getKey("down").properties.fill=t.getFor("primaryButtonActive");var r=new Ur;r.direction="right",r.width=9,r.height=11,r.marginLeft=1,r.marginRight=1,r.horizontalCenter="middle",r.verticalCenter="middle",r.stroke=t.getFor("primaryButtonText"),r.fill=r.stroke,e.icon=r;var a=new St;a.width=11,a.height=11,a.horizontalCenter="middle",a.verticalCenter="middle",a.cornerRadius(0,0,0,0),a.stroke=t.getFor("primaryButtonText"),a.fill=r.stroke,e.togglable=!0;var o=e.states.create("active");return o.transitionDuration=0,o.properties.icon=a,e.defaultState.transitionDuration=0,e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Play"))},i}(Xt);_.registeredClasses.PlayButton=_p;var eo=function(s){function i(){var e=s.call(this)||this;return e.className="ColorModifier",e.applyTheme(),e}return w(i,s),i.prototype.modify=function(e){return e},i}(Ke);_.registeredClasses.ColorModifier=eo;var to=function(s){function i(){var e=s.call(this)||this;return e.lightnesses=[],e.brightnesses=[],e.opacities=[],e.offsets=[],e.className="GradientModifier",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"lightnesses",{get:function(){return this._lightnesses},set:function(e){this._lightnesses=e,this._brightnesses=[]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"brightnesses",{get:function(){return this._brightnesses},set:function(e){this._brightnesses=e,this._lightnesses=[]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"opacities",{get:function(){return this._opacities},set:function(e){this._opacities=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"offsets",{get:function(){return this._offsets},set:function(e){this._offsets=e},enumerable:!0,configurable:!0}),i.prototype.modify=function(e){this.gradient.clear();var t=0;this.opacities&&(t=q(t,this.opacities.length)),this.lightnesses&&(t=q(t,this.lightnesses.length)),this.brightnesses&&(t=q(t,this.brightnesses.length));for(var n,r,a=1,o=0;o<t;o++){var l=e;this.opacities&&y(this.opacities[o])&&(a=this.opacities[o]),this.lightnesses&&y(this.lightnesses[o])&&(n=this.lightnesses[o],r=void 0),this.brightnesses&&y(this.brightnesses[o])&&(r=this.brightnesses[o],n=void 0),y(r)?l=e.brighten(this.brightnesses[o]):y(n)&&(l=e.lighten(this.lightnesses[o]));var h=this.offsets[o];this.gradient.addColor(l,a,h)}return this.gradient},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this._offsets=e.offsets,this._brightnesses=e.brightnesses,this._lightnesses=e.lightnesses,this._opacities=e.opacities},i}(eo);_.registeredClasses.GradientModifier=to;var Nn=function(s){function i(){var e=s.call(this)||this;return e.className="LinearGradientModifier",e.gradient=new dt,e.applyTheme(),e}return w(i,s),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.gradient=e.gradient.clone()},i}(to);_.registeredClasses.LinearGradientModifier=Nn;var Pp=function(s){function i(){var e=s.call(this)||this;return e.className="Cone",e.angle=30,e.radius=F(100),e.topRadius=F(100),e.top=e.createChild(Wr),e.top.shouldClone=!1,e.bottom=e.createChild(Wr),e.bottom.shouldClone=!1,e.body=e.createChild($),e.body.shouldClone=!1,e.body.setElement(e.paper.add("path")),e.layout="none",e.bodyFillModifier=new Nn,e.bodyFillModifier.lightnesses=[0,-.25,0],e.body.fillModifier=e.bodyFillModifier,e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this),De(this,this.top,Ie),De(this,this.bottom,Ie),De(this,this.body,Ie);var e,t,n,r=this.innerWidth,a=this.innerHeight,o=this.bottom,l=this.top,h=this.angle;this.orientation=="horizontal"?(e=a/2,o.y=a/2,l.y=a/2,l.x=r,t=(90-h)/90,n=0,this.bodyFillModifier.gradient.rotation=90):(t=0,n=(90-h)/90,e=r/2,o.y=a,o.x=r/2,l.x=r/2,this.bodyFillModifier.gradient.rotation=0);var p,u=this.radius.value*e,d=this.topRadius.value*e;o.radius=u-u*t,o.radiusY=u-u*n,l.radius=d-d*t,l.radiusY=d-d*n,p=this.orientation=="horizontal"?E({x:0,y:a/2-o.radiusY})+Le(-90,-180,o.radius,o.radiusY)+T({x:r,y:a/2+l.radiusY})+Le(90,180,l.radius,l.radiusY)+" Z":E({x:r/2-l.radius,y:0})+Le(180,-180,l.radius,l.radiusY)+T({x:r/2+o.radius,y:a})+Le(0,180,o.radius,o.radiusY)+" Z",this.body.path=p},Object.defineProperty(i.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(e){this.setPropertyValue("angle",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPropertyValue("radius",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"topRadius",{get:function(){return this.getPropertyValue("topRadius")},set:function(e){this.setPropertyValue("topRadius",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(e){this.setPropertyValue("orientation",e,!0)},enumerable:!0,configurable:!0}),i}(W),Gr=function(s){function i(){var e=s.call(this)||this;return e.className="LightenFilter",e.feColorMatrix=e.paper.add("feColorMatrix"),e.feColorMatrix.attr({type:"matrix"}),e.filterPrimitives.push(e.feColorMatrix),e.lightness=0,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"lightness",{get:function(){return this.properties.lightness},set:function(e){this.properties.lightness=e;var t=e+1;this.feColorMatrix.attr({values:t+" 0 0 0 0 0 "+t+" 0 0 0 0 0 "+t+" 0 0 0 0 0 1 0"})},enumerable:!0,configurable:!0}),i}(wi);_.registeredClasses.LightenFilter=Gr;var wp=function(s){function i(){var e=s.call(this)||this;e.angle=30,e.depth=30,e.className="Rectangle3D",e.layout="none";var t=e.createChild($);t.shouldClone=!1,t.setElement(e.paper.add("path")),t.isMeasured=!1,e.sideBack=t,e._disposers.push(e.sideBack);var n=e.createChild($);n.shouldClone=!1,n.setElement(e.paper.add("path")),n.isMeasured=!1,e.sideBottom=n,e._disposers.push(e.sideBottom);var r=e.createChild($);r.shouldClone=!1,r.setElement(e.paper.add("path")),r.isMeasured=!1,e.sideLeft=r,e._disposers.push(e.sideLeft);var a=e.createChild($);a.shouldClone=!1,a.setElement(e.paper.add("path")),a.isMeasured=!1,e.sideRight=a,e._disposers.push(e.sideRight);var o=e.createChild($);o.shouldClone=!1,o.setElement(e.paper.add("path")),o.isMeasured=!1,e.sideTop=o,e._disposers.push(e.sideTop);var l=e.createChild($);return l.shouldClone=!1,l.setElement(e.paper.add("path")),l.isMeasured=!1,e.sideFront=l,e._disposers.push(e.sideFront),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.innerWidth,t=this.innerHeight,n=this.depth,r=this.angle,a=M(r),o=L(r),l={x:0,y:0},h={x:e,y:0},p={x:e,y:t},u={x:0,y:t},d={x:n*o,y:-n*a},c={x:n*o+e,y:-n*a},f={x:n*o+e,y:-n*a+t},g={x:n*o,y:-n*a+t};this.sideFront.path=E(l)+T(h)+T(p)+T(u)+" Z",this.sideBack.path=E(d)+T(c)+T(f)+T(g)+" Z",this.sideLeft.path=E(l)+T(d)+T(g)+T(u)+" Z",this.sideRight.path=E(h)+T(c)+T(f)+T(p)+" Z",this.sideBottom.path=E(u)+T(g)+T(f)+T(p)+" Z",this.sideTop.path=E(l)+T(d)+T(c)+T(h)+" Z"},Object.defineProperty(i.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(e){this.setPropertyValue("depth",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(e){this.setPropertyValue("angle",e,!0)},enumerable:!0,configurable:!0}),i.prototype.setFill=function(e){var t;if(s.prototype.setFill.call(this,e),ye(e)&&!("r"in e)||(e=ft(e)),e instanceof se)t=e.hex;else if(e instanceof dt||e instanceof Nt)t=e.stops.getIndex(0).color.hex;else{var n=new Gr;n.lightness=-.2,this.sideBack.filters.push(n);var r=n.clone();r.lightness=-.4,this.sideLeft.filters.push(r);var a=n.clone();a.lightness=-.2,this.sideRight.filters.push(a);var o=n.clone();o.lightness=-.1,this.sideTop.filters.push(o);var l=n.clone();l.lightness=-.5,this.sideBottom.filters.push(l)}t&&(this.sideBack.fill=B(t).lighten(-.2),this.sideLeft.fill=B(t).lighten(-.4),this.sideRight.fill=B(t).lighten(-.2),this.sideTop.fill=B(t).lighten(-.1),this.sideBottom.fill=B(t).lighten(-.5))},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.sideBack.copyFrom(e.sideBack),this.sideLeft.copyFrom(e.sideLeft),this.sideRight.copyFrom(e.sideRight),this.sideTop.copyFrom(e.sideTop),this.sideBottom.copyFrom(e.sideBottom)},i}(W),Cp=function(s){function i(){var e=s.call(this)||this;e.className="Slice3D",e.layout="none";var t=e.createChild($);e.edge=t,t.shouldClone=!1,t.isMeasured=!1,t.toBack(),e.angle=30,e.depth=20;var n=e.createChild($);e.sideA=n,n.shouldClone=!1,n.isMeasured=!1;var r=e.createChild($);return e.sideB=r,r.shouldClone=!1,r.isMeasured=!1,e.applyTheme(),e}return w(i,s),i.prototype.setFill=function(e){var t;if(s.prototype.setFill.call(this,e),e instanceof se)t=e.hex;else if(e instanceof dt||e instanceof Nt)t=e.stops.getIndex(0).color.hex;else{var n=new Gr;n.lightness=-.25,this.edge.filters.push(n),this.sideA.filters.push(n.clone()),this.sideB.filters.push(n.clone())}if(t){var r=B(t).lighten(-.25);this.edge.fill=r,this.sideA.fill=r,this.sideB.fill=r,this.edge.stroke=r,this.sideA.stroke=r,this.sideB.stroke=r}},i.prototype.draw=function(){if(this.cornerRadius=0,this.innerCornerRadius=0,s.prototype.draw.call(this),this.arc!==0&&this.radius>0&&this.depth>0){this.sideB.show(0),this.sideA.show(0),this.edge.show(0);for(var e=this.startAngle,t=this.arc,n=this.pixelInnerRadius||0,r=this.radiusY||0,a=this.radius,o=e+t,l=r/a*n,h={x:L(e)*n,y:M(e)*l},p={x:L(e)*a,y:M(e)*r},u={x:L(o)*a,y:M(o)*r},d={x:L(o)*n,y:M(o)*l},c=this.depth,f={x:h.x,y:h.y-c},g={x:p.x,y:p.y-c},m={x:u.x,y:u.y-c},x={x:d.x,y:d.y-c},b="",C=Math.ceil(t/5),S=t/C,P=e,O=g,I=0;I<C;I++)if((P+=S)>0&&P<180){b+=E(O);var k={x:L(P)*a,y:M(P)*r-c};b+=T({x:O.x,y:O.y+c}),b+=ot({x:k.x,y:k.y+c},a,r,!0),b+=T(k),b+=ot(O,a,r),b+="z",O=k}else b+=E(O),b+=ot(k={x:L(P)*a,y:M(P)*r-c},a,r,!0),b+=T({x:k.x,y:k.y+c}),b+=ot({x:O.x,y:O.y+c},a,r),b+=T(O),b+="z",O=k;for(O=f,P=e,I=0;I<C;I++)(P+=S)>0&&P<180?(b+=E(O),k={x:L(P)*n,y:M(P)*l-c},b+=T({x:O.x,y:O.y+c}),b+=ot({x:k.x,y:k.y+c},n,l,!0),b+=T(k),b+=ot(O,n,l),b+="z",O=k):(b+=E(O),b+=ot(k={x:L(P)*n,y:M(P)*l-c},n,l,!0),b+=T({x:k.x,y:k.y+c}),b+=ot({x:O.x,y:O.y+c},n,l),b+=T(O),b+="z",O=k);this.edge.path=b,this.sideA.path=E(h)+T(p)+T(g)+T(f)+" Z",this.sideB.path=E(u)+T(d)+T(x)+T(m)+" Z",this.startAngle<90?this.sideA.toBack():this.sideA.toFront(),this.startAngle+this.arc>90?this.sideB.toBack():this.sideB.toFront(),this.slice.dy=-c}else this.sideA.hide(0),this.sideB.hide(0),this.edge.hide(0)},Object.defineProperty(i.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(e){this.setPropertyValue("depth",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"angle",{get:function(){var e=this.getPropertyValue("angle");return y(e)||(e=0),e},set:function(e){this.setPropertyValue("angle",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radiusY",{get:function(){var e=this.getPropertyValue("radiusY");return y(e)||(e=this.radius-this.radius*this.angle/90),e},set:function(e){this.setPropertyValue("radiusY",e,!0)},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.edge.copyFrom(e.edge),this.sideA.copyFrom(e.sideA),this.sideB.copyFrom(e.sideB)},i}(ri),Op=function(s){function i(){var e=s.call(this)||this;return e.className="RadialGradientModifier",e.gradient=new Nt,e.applyTheme(),e}return w(i,s),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.gradient=e.gradient.clone()},i}(to);_.registeredClasses.RadialGradientModifier=Op;var io=function(s){function i(){var e=s.call(this)||this;return e.properties.gap=0,e._line=e.paper.add("path"),e.addElement(e._line),e}return w(i,s),i.prototype.draw=function(){if(s.prototype.draw.call(this),Math.round(this.rotation/90)!=this.rotation/90&&(this.properties.shapeRendering="auto"),this._line){var e=this.width,t=this.height,n="";if(this.gap)for(var r=this.gap+this.strokeWidth,a=this.height/r,o=-a/2;o<1.5*a;o++)Math.round(this.rotation/90)!=this.rotation/90?(n+=E({x:-e,y:(o+.5)*r})+T({x:2*e,y:(o+.5)*r}),this.properties.rotationX=this.width/2,this.properties.rotationY=this.height/2):n+=E({x:-e,y:o*r})+T({x:2*e,y:o*r});else Math.round(this.rotation/90)!=this.rotation/90?(n=E({x:-e,y:t/2})+T({x:2*e,y:t/2}),this.properties.rotationX=this.width/2,this.properties.rotationY=this.height/2):n=E({x:0,y:0})+T({x:e,y:0});this._line.attr({d:n})}},Object.defineProperty(i.prototype,"gap",{get:function(){return this.properties.gap},set:function(e){this.properties.gap=e,this.draw()},enumerable:!0,configurable:!0}),i}(xi);_.registeredClasses.LinePattern=io;var no=function(s){function i(){var e=s.call(this)||this;return e.properties.radius=2,e._circle=e.paper.add("circle"),e.addElement(e._circle),e.shapeRendering="auto",e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this),this._circle&&this._circle.attr({r:this.radius,cx:this.width/2,cy:this.height/2})},Object.defineProperty(i.prototype,"radius",{get:function(){return this.properties.radius},set:function(e){this.properties.radius=e,this.draw()},enumerable:!0,configurable:!0}),i}(xi);_.registeredClasses.CirclePattern=no;var ro=function(s){function i(){var e=s.call(this)||this;return e.rectHeight=1,e.rectWidth=1,e._rect=e.paper.add("rect"),e.addElement(e._rect),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this),this.properties.rotationX=this.width/2,this.properties.rotationY=this.height/2,this._rect&&this._rect.attr({width:this.rectWidth,height:this.rectHeight,x:(this.width-this.rectWidth)/2,y:(this.height-this.rectHeight)/2})},Object.defineProperty(i.prototype,"rectWidth",{get:function(){return this.properties.rectWidth},set:function(e){this.properties.rectWidth=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rectHeight",{get:function(){return this.properties.rectHeight},set:function(e){this.properties.rectHeight=e,this.draw()},enumerable:!0,configurable:!0}),i}(xi);_.registeredClasses.RectPattern=ro;var Sp=function(s){function i(){var e=s.call(this)||this;return e.className="ColorizeFilter",e.feColorMatrix=e.paper.add("feColorMatrix"),e.feColorMatrix.attr({type:"matrix"}),e.filterPrimitives.push(e.feColorMatrix),e.intensity=1,e.applyTheme(),e}return w(i,s),i.prototype.applyFilter=function(){var e,t,n,r=this.intensity,a=1-r,o=this.color;o&&o.rgb?(e=o.rgb.r/255*r,t=o.rgb.g/255*r,n=o.rgb.b/255*r):(e=0,t=0,n=0),this.feColorMatrix.attr({values:a+" 0 0 0 "+e+" 0 "+a+" 0 0 "+t+" 0 0 "+a+" 0 "+n+" 0 0 0 1 0"})},Object.defineProperty(i.prototype,"color",{get:function(){return this.properties.color},set:function(e){this.properties.color=e,this.applyFilter()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"intensity",{get:function(){return this.properties.intensity},set:function(e){this.properties.intensity=e,this.applyFilter()},enumerable:!0,configurable:!0}),i}(wi);_.registeredClasses.ColorizeFilter=Sp;var Wn=function(s){function i(){var e=s.call(this)||this;return e.className="DesaturateFilter",e.feColorMatrix=e.paper.add("feColorMatrix"),e.feColorMatrix.attr({type:"saturate"}),e.filterPrimitives.push(e.feColorMatrix),e.width=120,e.height=120,e.saturation=0,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"saturation",{get:function(){return this.properties.saturation},set:function(e){this.properties.saturation=e,this.feColorMatrix.attr({values:e.toString()})},enumerable:!0,configurable:!0}),i}(wi);_.registeredClasses.DesaturateFilter=Wn;var Ip=function(s){function i(){var e=s.call(this)||this;return e.className="BlurFilter",e.feGaussianBlur=e.paper.add("feGaussianBlur"),e.feGaussianBlur.attr({result:"blurOut",in:"SourceGraphic"}),e.filterPrimitives.push(e.feGaussianBlur),e.width=200,e.height=200,e.blur=1.5,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"blur",{get:function(){return this.properties.blur},set:function(e){this.properties.blur=e,this.feGaussianBlur.attr({stdDeviation:e/this.scale})},enumerable:!0,configurable:!0}),i}(wi);_.registeredClasses.BlurFilter=Ip;var Dp=function(s){function i(){var e=s.call(this)||this;return e.className="FocusFilter",e.feFlood=e.paper.add("feFlood"),e.feFlood.attr({"flood-color":new ae().getFor("primaryButtonHover"),result:"base"}),e.filterPrimitives.push(e.feFlood),e.feMorphology=e.paper.add("feMorphology"),e.feMorphology.attr({result:"bigger",in:"SourceGraphic",operator:"dilate",radius:"2"}),e.filterPrimitives.push(e.feMorphology),e.feColorMatrix=e.paper.add("feColorMatrix"),e.feColorMatrix.attr({result:"mask",in:"bigger",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"}),e.filterPrimitives.push(e.feColorMatrix),e.feComposite=e.paper.add("feComposite"),e.feComposite.attr({result:"drop",in:"base",in2:"mask",operator:"in"}),e.filterPrimitives.push(e.feComposite),e.feBlend=e.paper.add("feBlend"),e.feBlend.attr({in:"SourceGraphic",in2:"drop",mode:"normal"}),e.filterPrimitives.push(e.feBlend),e.width=130,e.height=130,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"stroke",{get:function(){return this.properties.stroke},set:function(e){this.properties.stroke=e,this.feFlood.attr({"flood-color":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"strokeWidth",{get:function(){return this.properties.strokeWidth},set:function(e){this.properties.strokeWidth=e,this.feMorphology.attr({radius:e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"opacity",{get:function(){return this.properties.opacity},set:function(e){this.properties.opacity=e,this.feColorMatrix.attr({values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "+e+" 0"})},enumerable:!0,configurable:!0}),i.prototype.setSprite=function(e){this._sprite&&this._sprite!=e&&this._sprite.group.removeStyle("outline"),e.group.addStyle({outline:"none"}),s.prototype.setSprite.call(this,e)},i}(wi),$i=function(s){function i(){var e=s.call(this)||this;return e._list=[],e._currentStep=0,e._startIndex=0,e._currentPass=0,e.baseColor=new se({r:103,g:183,b:220}),e.stepOptions={},e.passOptions={brighten:-.2},e.step=1,e.minColors=20,e.minLightness=.2,e.maxLightness=.9,e.shuffle=!1,e.wrap=!0,e.reuse=!1,e.saturation=1,e.className="ColorSet",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"list",{get:function(){return this._list||this.generate(this.minColors),this._list},set:function(e){this._list=e,this.reset()},enumerable:!0,configurable:!0}),i.prototype.getReusableColor=function(e){if(this._list.length==0)return this.generate(1),this.list[0];var t=e-Math.floor(e/this._list.length)*this.list.length;return this.list[t]},i.prototype.next=function(){var e;return this.list.length<=this._currentStep?this.reuse?e=this.getReusableColor(this._currentStep):(this.generate(q(this.minColors,this._currentStep+1)),e=this.list[this._currentStep]):e=this.list[this._currentStep],this._currentStep+=this.step,e.saturate(this.saturation)},i.prototype.getIndex=function(e){var t;return this.list.length<=e?this.reuse?t=this.getReusableColor(e):(this.generate(this.minColors),t=this.getIndex(e)):t=this.list[e],t.saturate(this.saturation)},i.prototype.reset=function(){this._currentStep=this._startIndex},Object.defineProperty(i.prototype,"currentStep",{get:function(){return this._currentStep},set:function(e){this._currentStep=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startIndex",{get:function(){return this._startIndex},set:function(e){this._startIndex=e,this.reset()},enumerable:!0,configurable:!0}),i.prototype.generate=function(e){var t=bn(be(this.currentColor.rgb)),n=v(this.stepOptions.hue)?this.stepOptions.hue:1/e,r={brighten:0,lighten:0,hue:t.h,lightness:t.l,saturation:t.s},a=[],o=this.list.length==0?0:1;if(this.reuse)for(var l=o;l<=e;l++)a.push(bn(be(this._list[l].rgb)).h);else for(l=o;l<=e;l++){var h=t.h+n*l;this.wrap&&h>1&&(h-=1),a.push(h)}for(this.shuffle&&a.sort(function(c,f){return Math.random()-.5}),l=0;l<e;l++){this.reuse?t=bn(be(this._list[l].rgb)):t.h=a.shift(),this.applyStepOptions(t,r,l,this._currentPass);var p=B(ua(t)),u=(this.stepOptions.brighten||0)*l+(this.passOptions.brighten||0)*this._currentPass;u!=0&&(u=this.wrap?Ir(u,this.minLightness,this.maxLightness):Sr(u,this.minLightness,this.maxLightness),p=p.brighten(u));var d=(this.stepOptions.lighten||0)*l+(this.passOptions.lighten||0)*this._currentPass;d!=0&&(d=this.wrap?Ir(d,this.minLightness,this.maxLightness):Sr(d,this.minLightness,this.maxLightness),p=p.lighten(d)),this._list.push(p)}this._currentPass++},Object.defineProperty(i.prototype,"currentColor",{get:function(){return this._list.length==0?this.baseColor.saturate(this.saturation):this._list[this._list.length-1].saturate(this.saturation)},enumerable:!0,configurable:!0}),i.prototype.applyStepOptions=function(e,t,n,r){e.l=t.lightness+(this.stepOptions.lightness||0)*n+(this.passOptions.lightness||0)*r,this.wrap?(e.l>1?e.l=e.l-Math.floor(e.l):e.l<0&&(e.l=-(e.l-Math.floor(e.l))),e.l=Ir(e.l,this.minLightness,this.maxLightness)):(e.l>1?e.l=1:e.l<0&&(e.l=0),e.l=Sr(e.l,this.minLightness,this.maxLightness))},i.prototype.processConfig=function(e){if(e){if(v(e.list)&&Ae(e.list))for(var t=0,n=e.list.length;t<n;t++)e.list[t]instanceof se||(e.list[t]=B(e.list[t]));!v(e.baseColor)||e.baseColor instanceof se||(e.baseColor=B(e.baseColor))}s.prototype.processConfig.call(this,e)},i}(Ke);_.registeredClasses.ColorSet=$i;var Tp=function(s){function i(){var e=s.call(this)||this;e._list=[],e._currentStep=0,e._startIndex=0,e._currentPass=0,e.baseColor=new se({r:103,g:183,b:220}),e.className="PatternSet";var t=new ae;return e.list=[e.getLinePattern(1e3,45,1,6),e.getRectPattern(10,0,4),e.getLinePattern(1e3,-45,1,6),e.getCirclePattern(11,2,!0),e.getLinePattern(6,90,1),e.getRectPattern(12,45,6,!0),e.getLinePattern(6,0,1),e.getRectPattern(7,0,4),e.getLinePattern(1e3,45,2,3,"4,2"),e.getCirclePattern(9,3,!1),e.getLinePattern(1e3,-45,2,3,"4,2"),e.getRectPattern(10,45,Math.sqrt(50)),e.getLinePattern(1e3,-45,2,1),e.getRectPattern(10,0,9),e.getLinePattern(1e3,45,2,1),e.getLinePattern(1e3,0,3,1),e.getRectPattern(10,45,10),e.getLinePattern(1e3,90,3,1)],e.baseColor=t.getFor("stroke"),e.applyTheme(),e}return w(i,s),i.prototype.getLinePattern=function(e,t,n,r,a){var o=new io;return o.width=e,o.height=e,o.stroke=this.baseColor,o.gap=r,o.strokeDasharray=a,o.strokeWidth=n,o.rotation=t,o},i.prototype.getRectPattern=function(e,t,n,r){var a=new ro;return a.width=e,a.height=e,a.rectWidth=n,a.rectHeight=n,r?(a.stroke=this.baseColor,a.strokeWidth=1,a.fillOpacity=0):(a.fill=this.baseColor,a.strokeWidth=0),t!=0&&(a.shapeRendering="auto"),a.rotation=t,a},i.prototype.getCirclePattern=function(e,t,n){var r=new no;return r.width=e,r.height=e,r.shapeRendering="auto",r.radius=t,n?(r.stroke=this.baseColor,r.strokeWidth=1,r.fillOpacity=0):(r.fill=this.baseColor,r.strokeWidth=0),r},Object.defineProperty(i.prototype,"list",{get:function(){return this._list},set:function(e){this._list=e,this.reset()},enumerable:!0,configurable:!0}),i.prototype.next=function(){var e=this.getIndex(this.currentStep);return this._currentStep++,e},i.prototype.getIndex=function(e){for(;this.list.length<=e;)this.generatePatterns();return this.list[e].clone()},i.prototype.generatePatterns=function(){var e=this.list.length/(this._currentPass+1);this._currentPass++;for(var t=0;t<e;t++)this.list.push(this.list[t].clone())},i.prototype.reset=function(){this._currentStep=this._startIndex},Object.defineProperty(i.prototype,"currentStep",{get:function(){return this._currentStep},set:function(e){this._currentStep=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startIndex",{get:function(){return this._startIndex},set:function(e){this._startIndex=e,this.reset()},enumerable:!0,configurable:!0}),i.prototype.processConfig=function(e){s.prototype.processConfig.call(this,e)},i}(Ke);_.registeredClasses.PatternSet=Tp;var gd=function(){function s(){this._disposed=!1,this._disposers=[]}return s.prototype.init=function(){},s.prototype.isDisposed=function(){return this._disposed},s.prototype.dispose=function(){if(!this._disposed){this._disposed=!0;var i=this._disposers;for(this._disposers=null;i.length!==0;)i.shift().dispose()}},s}(),yd=function(s){function i(){var e=s.call(this)||this;e.className="AmChartsLogo",e.valign="bottom",e.opacity=.3,e.defaultState.properties.opacity=.4,e.url="https://www.amcharts.com/",e.urlTarget="_blank",e.showSystemTooltip=!0,e.readerTitle="Chart created using amCharts library",e.width=66,e.height=21,e.background.opacity=0;var t=B("#474758");new ae().getFor("background").alternative.hex=="#ffffff"&&(t=B("#ffffff"));var n=new dt;n.addColor(t),n.addColor(t,1,.75),n.addColor(B("#3cabff"),1,.755),n.rotation=-10;var r=n,a=e.createChild(jn);a.shouldClone=!1,a.isMeasured=!1,a.segments=[[{x:15,y:15},{x:27,y:15},{x:36,y:6},{x:40.5,y:10.5},{x:45,y:6},{x:54,y:15},{x:60,y:15}]],a.strokeWidth=6*.3,a.tensionX=.8,a.tensionY=1,a.stroke=B("#3cabff");var o=e.createChild(jn);o.shouldClone=!1,o.isMeasured=!1,o.segments=[[{x:6,y:15},{x:15,y:15},{x:27,y:12*.3},{x:39.9,y:15},{x:51,y:15},{x:60,y:15}]],o.strokeWidth=6*.3,o.tensionX=.75,o.tensionY=1,o.stroke=r,e._disposers.push(o);var l=new Wn;e.filters.push(l);var h=new Wn;h.saturation=1;var p=e.states.create("hover");return p.properties.opacity=1,p.filters.push(h),e.applyTheme(),e}return w(i,s),i}(W);function kp(s,i){var e=ka(s),t=!1;if(e||((e=document.createElement("div")).style.width="200px",e.style.height="200px",e.style.top="0",e.style.left="0",e.style.visibility="hidden",e.style.position="absolute",document.body.appendChild(e),t=!0),e){e.innerHTML="";var n=new Na(e),r=new Wa(n.SVGContainer,"svg-"+(Ha.length-1)),a=new W;a.htmlContainer=e,a.svgContainer=n,a.width=F(100),a.height=F(100),a.background.fillOpacity=0,a.paper=r,r.append(a.group),t&&jh(function(){a.moveHtmlContainer(s)}),a.relativeWidth=1,a.relativeHeight=1,n.container=a;var o=a.createChild(i);o.topParent=a;var l=o.uid;_.invalidSprites[l]=[],_.invalidDatas[l]=[],_.invalidPositions[l]=[],_.invalidLayouts[l]=[],a.baseId=l,o.isBaseSprite=!0,o.focusFilter=new Dp,_.baseSprites.push(o),_.baseSpritesByUid[l]=o,o.maskRectangle={x:0,y:0,width:Math.max(n.width||0,0),height:Math.max(n.height||0,0)},a.events.on("maxsizechanged",function(C){C.previousWidth!=0&&C.previousHeight!=0||a.deepInvalidate(),o.maskRectangle&&(o.maskRectangle={x:0,y:0,width:Math.max(n.width||0,0),height:Math.max(n.height||0,0)})});var h=null,p=function(){o.isDisposed()?h=null:Mh(o.dom)==null?(Z.autoDispose?(a.htmlContainer=void 0,n.htmlElement=void 0,o.dispose()):Ra("Chart was not disposed",o.uid),h=null):h=window.setTimeout(p,1e3)};p(),o.addDisposer(new le(function(){h!==null&&clearTimeout(h),z(_.baseSprites,o),_.baseSpritesByUid[o.uid]=void 0})),o.addDisposer(a);var u=a.createChild(W);u.topParent=a,u.width=F(100),u.height=F(100),u.isMeasured=!1,a.tooltipContainer=u,o.tooltip=new Rn,o.tooltip.hide(0),o.tooltip.setBounds({x:0,y:0,width:u.maxWidth,height:u.maxHeight}),u.events.on("maxsizechanged",function(){be(o.tooltip).setBounds({x:0,y:0,width:u.maxWidth,height:u.maxHeight})},void 0,!1);var d=new Za;if(d.events.on("inited",function(){d.__disabled=!0},void 0,!1),a.preloader=d,o instanceof W&&!o.hasLicense()){var c=u.createChild(yd);u.events.on("maxsizechanged",function(C){u.maxWidth<=100||u.maxHeight<=50?c.hide():(c.isHidden||c.isHiding)&&c.show()},void 0,!1),o.logo=c,c.align="left",c.valign="bottom"}if(o.numberFormatter,a.isStandaloneInstance=!0,Z.onlyShowOnViewport)if(Fa(e,Z.viewportTarget))Z.queue&&so(o);else{o.__disabled=!0,o.tooltipContainer.__disabled=!0;var f=[Ce(window,"DOMContentLoaded",function(){Ci(o)}),Ce(window,"load",function(){Ci(o)}),Ce(window,"resize",function(){Ci(o)}),Ce(window,"scroll",function(){Ci(o)})];if(Z.viewportTarget)for(var g=Ae(Z.viewportTarget)?Z.viewportTarget:Z.viewportTarget?[Z.viewportTarget]:[],m=0;m<g.length;m++){var x=g[m];f.push(Ce(x,"resize",function(){Ci(o)})),f.push(Ce(x,"scroll",function(){Ci(o)}))}var b=new _e(f);o.addDisposer(b),o.vpDisposer=b}else Z.queue&&so(o);return o}throw Q.log("html container not found"),new Error("html container not found")}function md(){for(;_.baseSprites.length!==0;)_.baseSprites.pop().dispose()}function so(s){_.queue.indexOf(s)==-1&&(s.__disabled=!0,s.tooltipContainer.__disabled=!0,s.events.disableType("appeared"),_.queue.length==0&&(_.events.once("exitframe",function(){Ap(s)}),Q.requestFrame()),s.addDisposer(new le(function(){Kr(s)})),_.queue.push(s))}function Kr(s){var i=_.queue.indexOf(s);if(i>=0){_.queue.splice(_.queue.indexOf(s),1);var e=_.queue[i];e&&Ap(e)}}function Ci(s){s.__disabled&&Fa(s.htmlContainer,Z.viewportTarget)&&(s.vpDisposer&&s.vpDisposer.dispose(),so(s))}function Ap(s){s&&s.tooltipContainer&&(s.__disabled=!1,s.tooltipContainer.__disabled=!1,s.events.enableType("appeared"),s.dispatch("removedfromqueue"),s.showOnInit&&s.events.on("appeared",function(){Kr(s)}),s.vpDisposer&&s.vpDisposer.dispose(),s instanceof W&&s.invalidateLabels(),s.tooltipContainer&&s.tooltipContainer.invalidateLayout(),s instanceof ti?(s.invalidateData(),s.reinit(),s.events.once("datavalidated",function(){s.showOnInit?s.appear():Kr(s)})):(s.reinit(),s.events.once("inited",function(){Kr(s)}),s.showOnInit&&s.appear()))}function vd(s,i){var e;J(i)&&(v(_.registeredClasses[i])?i=_.registeredClasses[i]:(i=_.registeredClasses.Container,e=new Error("Class ["+i+"] is not loaded.")));var t=kp(s,i);return e&&t.raiseCriticalError(e),t}function bd(s,i,e){var t,n;v(e)||(e=s.type,delete s.type),v(i)||(i=s.container,delete s.container),J(e)&&v(_.registeredClasses[e])?t=_.registeredClasses[e]:typeof e!="function"?(t=W,n=new Error("Class ["+e+"] is not loaded.")):t=e;var r=kp(i,t);return n?r.raiseCriticalError(n):r.config=s,r}function xd(s,i){for(var e=[],t=2;t<arguments.length;t++)e[t-2]=arguments[t];return new Promise(function(n,r){_.deferred.push({scope:i,callback:s,args:e,resolve:n}),_.deferred.length==1&&ao()})}function ao(){var s,i=_.deferred[0];if(i){var e=(s=i.callback).call.apply(s,di([i.scope],i.args));e.events.on("ready",function(){i.resolve(e),_.deferred.shift(),Z.deferredDelay?setTimeout(ao,Z.deferredDelay):ao()})}}function _d(s){_.themes.indexOf(s)===-1&&_.themes.push(s)}function Pd(s){z(_.themes,s)}function wd(){_.themes=[]}function Cd(s){Z.licenses.push(s)}var Vp=function(s){function i(){var e=s.call(this)||this;e.className="Grip";var t=new ae;e.layout="absolute",e.padding(10,10,10,10),e.margin(3,3,3,3),e.background.fillOpacity=.3,e.background.cornerRadius(10,10,10,10);var n=new $;n.element=e.paper.add("path");var r=E({x:-6,y:0});return r+=T({x:6,y:0}),r+=E({x:-8,y:-6}),r+=T({x:0,y:-12}),r+=T({x:8,y:-6}),r+=E({x:-8,y:6}),r+=T({x:0,y:12}),r+=T({x:8,y:6}),n.path=r,n.strokeWidth=2,n.fillOpacity=0,n.pixelPerfect=!0,n.padding(0,4,0,4),n.stroke=t.getFor("text"),n.strokeOpacity=.7,n.align="center",n.valign="middle",e.icon=n,e.label.dispose(),e.label=void 0,e.position="right",e.autoHideDelay=3e3,e.events.on("shown",function(a){e._autoHideTimeout&&e._autoHideTimeout.dispose(),e.autoHideDelay&&(e._autoHideTimeout=e.setTimeout(function(){e.hide()},e.autoHideDelay))}),e.events.on("down",function(a){e._autoHideTimeout&&e._autoHideTimeout.dispose()}),e.events.on("out",function(a){e.autoHideDelay&&(e._autoHideTimeout=e.setTimeout(function(){e.hide()},e.autoHideDelay))}),e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"position",{get:function(){return this.getPropertyValue("position")},set:function(e){if(this.setPropertyValue("position",e))switch(e){case"left":this.align="left",this.valign="middle",this.horizontalCenter="left",this.verticalCenter="middle",this.icon.rotation=0,this.width=void 0,this.height=F(30);break;case"right":this.align="right",this.valign="middle",this.horizontalCenter="right",this.verticalCenter="middle",this.icon.rotation=0,this.width=void 0,this.height=F(30);break;case"top":this.align="center",this.valign="top",this.horizontalCenter="middle",this.verticalCenter="top",this.icon.rotation=90,this.width=F(30),this.height=void 0;break;case"bottom":this.align="center",this.valign="bottom",this.horizontalCenter="middle",this.verticalCenter="bottom",this.icon.rotation=90,this.width=F(30),this.height=void 0;break;default:this.align="center",this.valign="middle",this.horizontalCenter="middle",this.verticalCenter="middle",this.icon.rotation=90,this.width=F(30),this.height=void 0}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"autoHideDelay",{get:function(){return this.getPropertyValue("autoHideDelay")},set:function(e){this.setPropertyValue("autoHideDelay",e)},enumerable:!0,configurable:!0}),i}(Xt);_.registeredClasses.Grip=Vp;var oo=function(s){function i(){var e=s.call(this)||this;return e.className="ChartDataItem",e.applyTheme(),e}return w(i,s),i}(ei),ai=function(s){function i(){var e=s.call(this)||this;if(e._legend=new Me,e.constructor===i)throw new Error("'Chart' cannot be instantiated directly. Please use a specific chart type.");e.className="Chart";var t=new $e;e.titles=new Oe(t),e._disposers.push(new fe(e.titles)),e._disposers.push(t),e.width=F(100),e.height=F(100),e.layout="vertical";var n=e.createChild(W);n.shouldClone=!1,n.layout="vertical",n.width=F(100),n.height=F(100),e.chartAndLegendContainer=n;var r=n.createChild(W);return r.shouldClone=!1,r.width=F(100),r.height=F(100),e.chartContainer=r,e.showOnInit=!0,e._disposers.push(e._legend),e.titles.events.on("inserted",function(a){e.processTitle(a),e.updateReaderTitleReferences()},e,!1),e.titles.events.on("removed",function(a){e.updateReaderTitleReferences()},e,!1),e.role="region",e.defaultState.transitionDuration=1,e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Chart"))},i.prototype.draw=function(){this.fixLayout(),s.prototype.draw.call(this)},i.prototype.fixLayout=function(){var e=this.legend;if(e){var t=this.chartAndLegendContainer,n=this.chartContainer;switch(n.x=void 0,n.y=void 0,e.position!="absolute"&&(e.x=void 0,e.y=void 0),e.position){case"left":t.layout="horizontal",e.toBack();break;case"right":t.layout="horizontal",e.toFront();break;case"top":t.layout="vertical",e.toBack();break;case"bottom":t.layout="vertical",e.toFront();break;case"absolute":e.isMeasured=!1}}},i.prototype.feedLegend=function(){},i.prototype.processTitle=function(e){var t=e.newValue;return t.parent=this,t.toBack(),t.shouldClone=!1,t.align="center",t.uidAttr(),t},i.prototype.updateReaderTitleReferences=function(){if(this.titles.length){var e=[];A(this.titles.iterator(),function(t){e.push(t.uid)}),this.setSVGAttribute({"aria-labelledby":e.join(" ")})}else this.removeSVGAttribute("aria-labelledby")},Object.defineProperty(i.prototype,"legend",{get:function(){return this._legend.get()},set:function(e){this.setLegend(e)},enumerable:!0,configurable:!0}),i.prototype.setLegend=function(e){var t=this;this._legend.get()!==e&&(e?(e.parent=this.chartAndLegendContainer,this._legend.set(e,e.events.on("propertychanged",function(n){n.property=="position"&&t.fixLayout()},void 0,!1)),e.addDisposer(new le(function(){t.legend=void 0}))):this._legend.reset(),this.feedLegend())},i.prototype.dispose=function(){this.legend&&this.legend.dispose(),s.prototype.dispose.call(this)},i.prototype.processConfig=function(e){e&&v(e.legend)&&!v(e.legend.type)&&(e.legend.type="Legend"),s.prototype.processConfig.call(this,e)},i.prototype.copyFrom=function(e){this.titles.copyFrom(e.titles),this.chartContainer.copyFrom(e.chartContainer),e.legend&&(this.legend=e.legend.clone(),this.legend.removeChildren()),s.prototype.copyFrom.call(this,e)},Object.defineProperty(i.prototype,"dragGrip",{get:function(){var e=this;if(!this._dragGrip){var t=this.tooltipContainer.createChild(Vp);t.align="right",t.valign="middle",t.hide(0),t.events.on("down",function(n){n.touch&&(e.interactionsEnabled=!1)}),t.events.on("up",function(n){e.interactionsEnabled=!0}),this.events.on("down",function(n){n.touch&&t.show()}),this._dragGrip=t}return this._dragGrip},set:function(e){this._dragGrip=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"focusable",{get:function(){return this.parent.focusable},set:function(e){this.parent.focusable=e},enumerable:!0,configurable:!0}),i}(ti);_.registeredClasses.Chart=ai,Ne.push({relevant:Ue.widthXS,state:function(s,i){if(s instanceof ai){var e=s.states.create(i);return s.pixelPaddingLeft>10&&(e.properties.paddingLeft=10),s.pixelPaddingRight>10&&(e.properties.paddingRight=10),e}return null}}),Ne.push({relevant:Ue.heightXS,state:function(s,i){if(s instanceof ai){var e=s.states.create(i);return s.pixelPaddingTop>10&&(e.properties.paddingTop=10),s.pixelPaddingBottom>10&&(e.properties.paddingBottom=10),e}return null}}),Ne.push({relevant:Ue.widthXXS,state:function(s,i){if(s instanceof ai){var e=s.states.create(i);return e.properties.paddingLeft=0,e.properties.paddingRight=0,e}return null}}),Ne.push({relevant:Ue.heightXXS,state:function(s,i){if(s instanceof ai){var e=s.states.create(i);return e.properties.paddingTop=0,e.properties.paddingBottom=0,e}return null}});var It=function(s){function i(){var e=s.call(this)||this;return e.className="Bullet",e.isMeasured=!1,e.tooltipX=0,e.tooltipY=0,e.layout="none",e.applyOnClones=!0,e.copyToLegendMarker=!0,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"locationX",{get:function(){return this.getPropertyValue("locationX")},set:function(e){if(this.setPropertyValue("locationX",e)){var t=this.dataItem;t&&t.component&&t.component.invalidate()}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"locationY",{get:function(){return this.getPropertyValue("locationY")},set:function(e){if(this.setPropertyValue("locationY",e)){var t=this.dataItem;t&&t.component&&t.component.invalidate()}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"xField",{get:function(){return this.getPropertyValue("xField")},set:function(e){this.setPropertyValue("xField",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"yField",{get:function(){return this.getPropertyValue("yField")},set:function(e){this.setPropertyValue("yField",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isDynamic",{get:function(){return this.getPropertyValue("isDynamic")},set:function(e){this.setPropertyValue("isDynamic",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"copyToLegendMarker",{get:function(){return this.getPropertyValue("copyToLegendMarker")},set:function(e){this.setPropertyValue("copyToLegendMarker",e)},enumerable:!0,configurable:!0}),i}(W);_.registeredClasses.Bullet=It,Ne.push({relevant:Ue.isXS,state:function(s,i){if(s instanceof It){var e=s.states.create(i);return e.properties.disabled=!0,e}return null}});var Fp=function(s){function i(){var e=s.call(this)||this;return e.childrenCreated=!1,e.className="LegendDataItem",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"label",{get:function(){var e=this;if(!this._label){var t=this.component.labels.create();this._label=t,this.addSprite(t),this._disposers.push(t),t.parent=this.itemContainer,this._disposers.push(new le(function(){v(e.component)&&e.component.labels.removeValue(t)}))}return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"color",{get:function(){return this.properties.color},set:function(e){this.setProperty("color",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"valueLabel",{get:function(){var e=this;if(!this._valueLabel){var t=this.component.valueLabels.create();this._valueLabel=t,this.addSprite(t),this._disposers.push(t),t.parent=this.itemContainer,this._disposers.push(new le(function(){v(e.component)&&e.component.valueLabels.removeValue(t)}))}return this._valueLabel},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemContainer",{get:function(){var e=this;if(!this._itemContainer){var t=this.component,n=t.itemContainers.create();n.parent=t,this._itemContainer=n,this.addSprite(n),this._disposers.push(n),n.togglable&&n.events.on("toggled",function(o){t.toggleDataItem(o.target.dataItem)},void 0,!1),n.focusable&&(n.events.on("hit",function(o){t.focusedItem=void 0},void 0,!1),n.events.on("focus",function(o){t.focusedItem=o.target.dataItem},void 0,!1),n.events.on("blur",function(o){t.focusedItem=void 0},void 0,!1)),this._disposers.push(new le(function(){v(e.component)&&e.component.itemContainers.removeValue(n)})),this.dataContext.uidAttr&&(n.readerControls=this.dataContext.uidAttr(),n.readerLabelledBy=this.dataContext.uidAttr());var r=this.dataContext;if((r instanceof ei||r instanceof $)&&!r.isDisposed()){var a=function(o){n.readerChecked=o.visible,n.events.disableType("toggled"),n.isActive=!o.visible,n.events.enableType("toggled")};r.addDisposer(new le(function(){e.component&&e.component.dataItems.remove(e)})),r instanceof $?(n.addDisposer(r.events.on("visibilitychanged",a,void 0,!1)),n.addDisposer(r.events.on("hidden",function(o){n.readerChecked=!1,n.events.disableType("toggled"),n.isActive=!0,n.events.enableType("toggled")},void 0,!1)),n.addDisposer(r.events.on("shown",function(o){n.readerChecked=!0,n.events.disableType("toggled"),n.isActive=!1,n.events.enableType("toggled")},void 0,!1))):n.addDisposer(r.events.on("visibilitychanged",a,void 0,!1))}}return this._itemContainer},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"marker",{get:function(){var e=this;if(!this._marker){var t=this.component.markers.create();this._marker=t,t.parent=this.itemContainer,this.addSprite(t),this._disposers.push(t),this._disposers.push(new le(function(){v(e.component)&&e.component.markers.removeValue(t)}))}return this._marker},enumerable:!0,configurable:!0}),i}(ei),lo=function(){this.createMarker=!0},Xn=function(s){function i(){var e=s.call(this)||this;e.className="Legend",e.layout="grid",e.setPropertyValue("useDefaultMarker",!1),e.setPropertyValue("scrollable",!1),e.setPropertyValue("contentAlign","center");var t=new W;t.applyOnClones=!0,t.padding(8,0,8,0),t.margin(0,10,0,10),t.layout="horizontal",t.clickable=!0,t.focusable=!0,t.role="switch",t.togglable=!0,t.cursorOverStyle=He.pointer,t.background.fillOpacity=0,e.itemContainers=new Oe(t),e._disposers.push(new fe(e.itemContainers)),e._disposers.push(e.itemContainers.template),e._disposers.push(K().body.events.on("keyup",function(p){if(Ct.isKey(p.event,"enter")&&e.focusedItem){var u=e.focusedItem,d=u.itemContainer;d.togglable?e.toggleDataItem(u):d.clickable&&d.events.isEnabled("hit")&&(d.dispatchImmediately("hit",{event:p}),e.focusedItem=u)}},e));var n=new ae,r=new W;r.width=23,r.height=23,r.interactionsEnabled=!1,r.applyOnClones=!0,r.setStateOnChildren=!0,r.background.fillOpacity=0,r.background.strokeOpacity=0,r.propertyFields.fill="fill",r.valign="middle";var a=n.getFor("disabledBackground");r.events.on("childadded",function(p){var u=p.newValue.states.create("active");u.properties.stroke=a,u.properties.fill=a}),e.markers=new Oe(r),e._disposers.push(new fe(e.markers)),e._disposers.push(e.markers.template);var o=r.createChild(St);o.width=F(100),o.height=F(100),o.applyOnClones=!0,o.propertyFields.fill="fill",o.strokeOpacity=0;var l=new $e;l.text="{name}",l.margin(0,5,0,5),l.valign="middle",l.applyOnClones=!0,l.states.create("active").properties.fill=n.getFor("disabledBackground"),e.labels=new Oe(l),e._disposers.push(new fe(e.labels)),e._disposers.push(e.labels.template),l.interactionsEnabled=!1,l.truncate=!0,l.fullWords=!1;var h=new $e;return h.margin(0,5,0,0),h.valign="middle",h.width=50,h.align="right",h.textAlign="end",h.applyOnClones=!0,h.states.create("active").properties.fill=n.getFor("disabledBackground"),h.interactionsEnabled=!1,e.valueLabels=new Oe(h),e._disposers.push(new fe(e.valueLabels)),e._disposers.push(e.valueLabels.template),e.position="bottom",t.states.create("active"),t.setStateOnChildren=!0,e.role="group",e.events.on("layoutvalidated",e.handleScrollbar,e,!1),e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Legend"))},i.prototype.createDataItem=function(){return new Fp},i.prototype.validateDataElements=function(){this.scrollbar&&(this.scrollbar.start=0,this.scrollbar.end=1),s.prototype.validateDataElements.call(this)},i.prototype.validateDataElement=function(e){s.prototype.validateDataElement.call(this,e);var t=e.itemContainer,n=e.marker;e.label;var r=e.valueLabel;t.readerChecked=e.dataContext.visible,e.dataContext.legendDataItem=e;var a=e.label.maxWidth;e.label.width instanceof te||(e.label.width=void 0),a>0&&(e.label.maxWidth=a),r.align=="right"&&(r.width=void 0);var o=e.dataContext.legendSettings,l=e.dataContext;!l.createLegendMarker||this.useDefaultMarker&&l instanceof $?this.markers.template.propertyFields.fill=void 0:e.childrenCreated||(l.createLegendMarker(n),e.childrenCreated=!0),l.updateLegendValue&&l.updateLegendValue(),l.component&&l.component.updateLegendValue&&l.component.updateLegendValue(l),r.invalid&&r.validate(),r.text==""||r.text==null?r.__disabled=!0:r.__disabled=!1,!o||o.itemValueText==null&&o.valueText==null||(r.__disabled=!1);var h=e.dataContext.visible;h===void 0&&(h=!0),h=ve(h),e.dataContext.visible=h,t.events.disableType("toggled"),t.isActive=!h,t.isActive?t.setState("active",0):t.setState("default",0),t.events.enableType("toggled")},i.prototype.afterDraw=function(){var e=this,t=this.getPropertyValue("maxWidth"),n=0;this.labels.each(function(u){u.invalid&&(u.maxWidth=void 0,u.validate()),u.measuredWidth+u.pixelMarginLeft+u.pixelMarginRight>n&&(n=u.measuredWidth+u.pixelMarginLeft+u.pixelMarginRight)});var r=0;this.valueLabels.each(function(u){u.invalid&&u.validate(),u.measuredWidth+u.pixelMarginLeft+u.pixelMarginRight>r&&(r=u.measuredWidth+u.pixelMarginLeft+u.pixelMarginRight)});var a=0;this.markers.each(function(u){u.invalid&&u.validate(),u.measuredWidth+u.pixelMarginLeft+u.pixelMarginRight>a&&(a=u.measuredWidth+u.pixelMarginLeft+u.pixelMarginRight)});var o,l=this.itemContainers.template,h=l.pixelMarginRight+l.pixelMarginLeft,p=n+r+a;y(t)?((t-=h)>p&&(t=p),o=t-a-r):o=n,this.labels.each(function(u){(e.valueLabels.template.align=="right"||u.measuredWidth>o)&&(u.width instanceof te||(u.width=Math.min(u.maxWidth,o-u.pixelMarginLeft-u.pixelMarginRight),u.maxWidth=u.width))}),this.valueLabels.template.align=="right"&&this.valueLabels.each(function(u){u.width=r-u.pixelMarginRight-u.pixelMarginLeft}),s.prototype.afterDraw.call(this)},i.prototype.handleScrollbar=function(){var e=this.scrollbar;this.scrollable&&e&&(e.height=this.measuredHeight,e.x=this.measuredWidth-e.pixelWidth-e.pixelMarginLeft,this.contentHeight>this.measuredHeight?(e.visible=!0,e.thumb.height=e.height*this.measuredHeight/this.contentHeight,this.paddingRight=e.pixelWidth+e.pixelMarginLeft+ +e.pixelMarginRight):e.visible=!1,e.handleThumbPosition(),this.updateMasks())},Object.defineProperty(i.prototype,"position",{get:function(){return this.getPropertyValue("position")},set:function(e){this.setPropertyValue("position",e)&&(e=="left"||e=="right"?(this.margin(10,5,10,10),this.valign="middle",this.contentAlign="none",this.valueLabels.template.align="right",y(this.maxColumns)||(this.maxColumns=1),this.width=void 0,this.maxWidth=220):(this.maxColumns=void 0,this.width=F(100),this.valueLabels.template.align="left"),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"useDefaultMarker",{get:function(){return this.getPropertyValue("useDefaultMarker")},set:function(e){this.setPropertyValue("useDefaultMarker",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scrollable",{get:function(){return this.getPropertyValue("scrollable")},set:function(e){if(this.setPropertyValue("scrollable",e,!0))if(e){var t=this.createChild(En);this.scrollbar=t,t.isMeasured=!1,t.orientation="vertical",t.endGrip.__disabled=!0,t.startGrip.__disabled=!0,t.visible=!1,t.marginLeft=5,this._mouseWheelDisposer=this.events.on("wheel",this.handleWheel,this,!1),this._disposers.push(this._mouseWheelDisposer),this._disposers.push(t.events.on("rangechanged",this.updateMasks,this,!1))}else this._mouseWheelDisposer&&(this._mouseWheelDisposer.dispose(),this.scrollbar&&(this.scrollbar.dispose(),this.scrollbar=void 0))},enumerable:!0,configurable:!0}),i.prototype.handleWheel=function(e){var t=e.shift.y,n=this.scrollbar;if(n){var r=t/1e3*this.measuredHeight/this.contentHeight,a=n.end-n.start;t>0?(n.start=q(0,n.start-r),n.end=n.start+a):(n.end=ie(1,n.end-r),n.start=n.end-a)}},i.prototype.updateMasks=function(){var e=this;this.scrollbar&&this.itemContainers.each(function(t){t.dy=-e.scrollbar.thumb.pixelY*e.contentHeight/e.measuredHeight,t.maskRectangle={x:0,y:-t.dy,width:e.measuredWidth,height:e.measuredHeight}})},i.prototype.toggleDataItem=function(e){var t=e.dataContext;!t.visible||t.isHiding||t instanceof $&&t.isHidden?(e.color=e.colorOrig,t.appeared=!0,e.itemContainer.isActive=!1,t.hidden===!0&&(t.hidden=!1),t.show?t.show():t.visible=!0,this.svgContainer.readerAlert(this.language.translate("%1 shown",this.language.locale,e.label.readerTitle))):(e.itemContainer.isActive=!0,t.appeared=!0,t.hide?t.hide():t.visible=!1,this.svgContainer.readerAlert(this.language.translate("%1 hidden",this.language.locale,e.label.readerTitle)),e.color=new ae().getFor("disabledBackground"))},Object.defineProperty(i.prototype,"preloader",{get:function(){},enumerable:!0,configurable:!0}),i.prototype.handleDataItemPropertyChange=function(e,t){e.valueLabel.invalidate(),e.label.invalidate()},i}(ti);_.registeredClasses.Legend=Xn,Ne.push({relevant:Ue.widthXS,state:function(s,i){if(s instanceof Xn&&(s.position=="left"||s.position=="right")){var e=s.states.create(i);return e.properties.position="bottom",e}return null}}),Ne.push({relevant:Ue.heightXS,state:function(s,i){if(s instanceof Xn&&(s.position=="top"||s.position=="bottom")){var e=s.states.create(i);return e.properties.position="right",e}return null}}),Ne.push({relevant:Ue.isXS,state:function(s,i){if(s instanceof Xn){var e=s.states.create(i);return e.properties.disabled=!0,e}return null}});var Yn=function(s){function i(){var e=s.call(this)||this;return e.className="SeriesDataItem",e.values.value={},e.values.value={},e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"bullets",{get:function(){return this._bullets||(this._bullets=new me,this._disposers.push(new Jt(this._bullets))),this._bullets},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this.bullets.clear(),s.prototype.dispose.call(this)},Object.defineProperty(i.prototype,"value",{get:function(){return this.values.value.value},set:function(e){this.setValue("value",e)},enumerable:!0,configurable:!0}),i}(ei),zn=function(s){function i(){var e=s.call(this)||this;if(e._ignoreMinMax=!1,e._showBullets=!0,e.legendSettings=new lo,e._tmin=new me,e._tmax=new me,e._smin=new me,e._smax=new me,e.dataItemsByAxis=new me,e.skipFocusThreshold=20,e._itemReaderTextChanged=!1,e.calculatePercent=!1,e.usePercentHack=!0,e.autoDispose=!0,e.simplifiedProcessing=!1,e.constructor===i)throw new Error("'Series' cannot be instantiated directly. Please use a specific series type.");e.className="Series",e.isMeasured=!1,e.layout="none",e.shouldClone=!1,e.setPropertyValue("hidden",!1),e.axisRanges=new re,e.axisRanges.events.on("inserted",e.processAxisRange,e,!1),e.minBulletDistance=0,e.mainContainer=e.createChild(W),e.mainContainer.shouldClone=!1,e.mainContainer.mask=e.createChild($),e._disposers.push(e.mainContainer);var t=e.mainContainer.createChild(W);return e._shouldBeReady.push(t),t.shouldClone=!1,t.layout="none",t.virtualParent=e,e._disposers.push(t),e.bulletsContainer=t,e.tooltip=new Rn,e.tooltip.virtualParent=e,e._disposers.push(e.tooltip),e.hiddenState.transitionEasing=Ia,e.dataItem=e.createDataItem(),e._disposers.push(e.dataItem),e.dataItem.component=e,e.role="group",e.applyTheme(),e}return w(i,s),i.prototype.applyTheme=function(){s.prototype.applyTheme.call(this),Z.autoSetClassName&&this.bulletsContainer&&(this.bulletsContainer.className=this.className+"-bullets",this.bulletsContainer.setClassName())},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Series"))},i.prototype.createDataItem=function(){return new Yn},Object.defineProperty(i.prototype,"chart",{get:function(){return this._chart},set:function(e){this._chart=e},enumerable:!0,configurable:!0}),i.prototype.positionBullet=function(e){},i.prototype.processBullet=function(e){var t=this,n=e.newValue;n.isTemplate=!0,this.events.once("datavalidated",function(r){t.itemsFocusable()&&(n.focusable=!0)}),this.invalidate()},i.prototype.removeBullet=function(e){var t=e.oldValue;this.dataItems.each(function(n){var r=n.bullets.getKey(t.uid);r&&r.dispose()}),this.invalidate()},i.prototype.validateDataItems=function(){s.prototype.validateDataItems.call(this),this.processValues(!1)},i.prototype.getFirstValue=function(e,t){for(var n=t;n>=0;n--){var r=this.dataItems.getIndex(n).getActualWorkingValue(e);if(y(r))return r}return null},i.prototype.getAbsoluteFirstValue=function(e){for(var t=0;t<this.dataItems.length;t++){var n=this.dataItems.getIndex(t).values[e].value;if(y(n))return n}return null},i.prototype.rangeChangeUpdate=function(){s.prototype.rangeChangeUpdate.call(this),this.processValues(!0)},i.prototype.processValues=function(e){var t=this;if(!this.simplifiedProcessing){var n=this.dataItems,r={},a={},o={},l={},h={},p={},u={},d={},c={},f={},g=q(0,this.startIndex);g=ie(g,this.dataItems.length);var m=ie(this.endIndex,this.dataItems.length);if(y(g)||(g=0),y(m)||(m=this.dataItems.length),g>0){var x=n.getIndex(g-1);X(x.values,function(I,k){var D=x.getActualWorkingValue(I);y(D)&&(d[I]=D)})}for(var b=function(I){var k=n.getIndex(I);X(k.values,function(D,G){var H=k.getActualWorkingValue(D);if(y(H)){y(r[D])||(r[D]=0),r[D]++,y(a[D])||(a[D]=0),a[D]+=H,y(o[D])||(o[D]=0),o[D]+=Math.abs(H),y(p[D])||(p[D]=H),u[D]=H,y(l[D])?l[D]>H&&(l[D]=H):l[D]=H,y(h[D])?h[D]<H&&(h[D]=H):h[D]=H,y(c[D])||(c[D]=t.getFirstValue(D,g)),y(f[D])||(f[D]=t.getAbsoluteFirstValue(D)),k.setCalculatedValue(D,H-c[D],"change"),k.setCalculatedValue(D,(H-c[D])/c[D]*100,"changePercent"),k.setCalculatedValue(D,H-f[D],"startChange"),k.setCalculatedValue(D,(H-f[D])/f[D]*100,"startChangePercent");var ne=d[D];y(ne)||(ne=H),k.setCalculatedValue(D,H-ne,"previousChange"),k.setCalculatedValue(D,(H-ne)/ne*100,"previousChangePercent"),d[D]=H}})},C=g;C<m;C++)b(C);if(this.calculatePercent){var S=function(I){var k=n.getIndex(I);X(k.values,function(D){var G=o[D],H=k.getActualWorkingValue(D);if(y(H))if(G>0){t.usePercentHack&&H==G&&(G=k.values[D].value);var ne=H/G*100;k.setCalculatedValue(D,ne,"percent")}else k.setCalculatedValue(D,0,"percent")})};for(C=g;C<m;C++)S(C)}if(g>0){var P=n.getIndex(g-1);X(P.values,function(I){var k=P.values[I].value;P.setCalculatedValue(I,k-p[I],"change"),P.setCalculatedValue(I,(k-p[I])/p[I]*100,"changePercent")})}var O=this.dataItem;X(O.values,function(I){O.setCalculatedValue(I,a[I],"sum"),O.setCalculatedValue(I,o[I],"absoluteSum"),O.setCalculatedValue(I,a[I]/r[I],"average"),O.setCalculatedValue(I,p[I],"open"),O.setCalculatedValue(I,u[I],"close"),O.setCalculatedValue(I,l[I],"low"),O.setCalculatedValue(I,h[I],"high"),O.setCalculatedValue(I,r[I],"count")})}},i.prototype.validate=function(){Xi()&&this.filters.clear(),A(this.axisRanges.iterator(),function(r){r.validate()}),s.prototype.validate.call(this);var e=this.bulletsContainer;if(e.fill=this.fill,e.stroke=this.stroke,e.x=this.pixelX,e.y=this.pixelY,this.bulletsContainer.children.length>0)if(this._showBullets){for(var t=0;t<this.startIndex;t++)(n=this.dataItems.getIndex(t))&&n.bullets.each(function(r,a){a.__disabled=!0});for(t=this.dataItems.length-1;t>this.endIndex;t--){var n;(n=this.dataItems.getIndex(t))&&n.bullets.each(function(r,a){a.__disabled=!0})}}else this.bulletsContainer.children.each(function(r){r.__disabled=!0});this.updateTooltipBounds()},i.prototype.updateTooltipBounds=function(){if(this.topParent){var e={x:0,y:0,width:this.topParent.maxWidth,height:this.topParent.maxHeight};this.tooltip.setBounds(e)}},i.prototype.shouldCreateBullet=function(e,t){return!0},i.prototype.validateDataElement=function(e){var t=this;s.prototype.validateDataElement.call(this,e),this._showBullets?(this.isHidden||(this.bulletsContainer.visible=!0),this.bullets.each(function(n){var r=e.bullets.getKey(n.uid);if(t.shouldCreateBullet(e,n)){if(!r){var a=n.propertyFields.disabled,o=e.dataContext;a&&o&&o[a]===!1?(n.applyOnClones=!1,n.disabled=!1,r=n.clone(),n.disabled=!0,n.applyOnClones=!0):r=n.clone(),r.shouldClone=!1,e.addSprite(r),t.visible&&!t.isHiding||r.hide(0)}var l=r.dataItem;if(l!=e){l&&l.bullets.setKey(n.uid,void 0);var h=t.itemReaderText;r instanceof It&&(h||(h="{"+r.xField+"}: {"+r.yField+"}"),r.isDynamic&&(e.events.on("workingvaluechanged",r.deepInvalidate,r,!1),t.dataItem.events.on("workingvaluechanged",r.deepInvalidate,r,!1)),r.deepInvalidate()),r.focusable&&(r.events.on("focus",function(p){r.readerTitle=t.populateString(h,r.dataItem)},void 0,!1),r.events.on("blur",function(p){r.readerTitle=""},void 0,!1)),r.hoverable&&(r.events.on("over",function(p){r.readerTitle=t.populateString(h,r.dataItem)},void 0,!1),r.events.on("out",function(p){r.readerTitle=""},void 0,!1))}r.parent=t.bulletsContainer,e.bullets.setKey(n.uid,r),r.maxWidth=e.itemWidth,r.maxHeight=e.itemHeight,r.__disabled=!1,t.positionBullet(r)}else r&&(r.__disabled=!0)})):this.bulletsContainer.visible=!1},i.prototype.handleDataItemWorkingValueChange=function(e,t){this.dataRangeInvalid||this.invalidateProcessedData()},Object.defineProperty(i.prototype,"ignoreMinMax",{get:function(){return this._ignoreMinMax},set:function(e){this._ignoreMinMax=e,this.invalidateDataItems()},enumerable:!0,configurable:!0}),i.prototype.createMask=function(){},i.prototype.processAxisRange=function(e){this.rangesContainer||(this.rangesContainer=this.createChild(W),this.rangesContainer.shouldClone=!1,this.rangesContainer.isMeasured=!1);var t=e.newValue;t&&(t.contents.parent=this.rangesContainer,t.isRange=!0,t.events.on("valuechanged",this.invalidateDataItems,this,!1))},i.prototype.getAxisField=function(e){},i.prototype.showTooltipAtPosition=function(e,t){},Object.defineProperty(i.prototype,"minBulletDistance",{get:function(){return this.getPropertyValue("minBulletDistance")},set:function(e){this.setPropertyValue("minBulletDistance",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bullets",{get:function(){return this._bullets||(this._bullets=new Oe(new It),this._bullets.template.virtualParent=this,this._bullets.events.on("inserted",this.processBullet,this,!1),this._bullets.events.on("removed",this.removeBullet,this,!1),this._disposers.push(new fe(this._bullets)),this._disposers.push(this._bullets.template)),this._bullets},enumerable:!0,configurable:!0}),i.prototype.createLegendMarker=function(e){},Object.defineProperty(i.prototype,"hiddenInLegend",{get:function(){return this.getPropertyValue("hiddenInLegend")},set:function(e){this.setPropertyValue("hiddenInLegend",e)&&this.chart&&this.chart.feedLegend()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"name",{get:function(){return this.getPropertyValue("name")},set:function(e){this.setPropertyValue("name",e);var t=this.legendDataItem;t&&(t.component.invalidate(),t.component.invalidateRawData()),this.readerTitle=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemReaderText",{get:function(){var e=this._itemReaderText;return e||(this.tooltipText?e=Cr(this.tooltipText):this.tooltipHTML&&(e=Cr(this.tooltipHTML))),this._adapterO?this._adapterO.apply("itemReaderText",e):e},set:function(e){this._itemReaderText=e,this._itemReaderTextChanged=!0},enumerable:!0,configurable:!0}),i.prototype.itemsFocusable=function(){return!(this.dataItems.length>=this.skipFocusThreshold)},Object.defineProperty(i.prototype,"legendDataItem",{get:function(){return this._legendDataItem},set:function(e){this._legendDataItem=e,this._legendDataItem.itemContainer.deepInvalidate()},enumerable:!0,configurable:!0}),i.prototype.updateLegendValue=function(e,t){if(this.legendDataItem){var n=this.legendSettings,r=this.legendDataItem,a=r.label,o=r.valueLabel;e&&!e.isDisposed()||t?(o&&(n.itemValueText&&(o.text=n.itemValueText),o.dataItem=e),a&&(n.itemLabelText&&(a.text=n.itemLabelText),a.dataItem=e)):(a&&((n.labelText||n.itemLabelText!=null)&&(a.text=n.labelText),a.dataItem=this.dataItem),o&&((n.valueText||n.itemValueText!=null)&&(o.text=n.valueText),o.dataItem=this.dataItem))}},i.prototype.copyFrom=function(e){this.bullets.copyFrom(e.bullets),this.bulletsContainer.copyFrom(e.bulletsContainer),this.calculatePercent=e.calculatePercent,this.usePercentHack=e.usePercentHack,this.simplifiedProcessing=e.simplifiedProcessing,s.prototype.copyFrom.call(this,e)},i.prototype.raiseCriticalError=function(e){this._chart&&this._chart.modal&&(this._chart.modal.content=this._chart.adapter.apply("criticalError",e).message,this._chart.modal.closable=!1,Z.suppressErrors||this._chart.modal.open(),this._chart.disabled=!0),Z.verbose&&console.log(e)},i.prototype.applyFilters=function(){var e=this;s.prototype.applyFilters.call(this),this.bulletsContainer.filters.clear(),A(this.filters.iterator(),function(t){e.bulletsContainer.filters.push(t.clone())})},Object.defineProperty(i.prototype,"heatRules",{get:function(){var e=this;return this._heatRules||(this._heatRules=new re,this._heatRules.events.on("inserted",function(t){var n=t.newValue,r=n.target;if(r){var a=n.dataField;v(a)||(a="value");var o=e.dataItem,l=n.property,h=ce(n.minValue),p=ce(n.maxValue);y(h)||y(p)||e.dataItem.events.on("calculatedvaluechanged",function(u){u.property==a&&A(e.dataItems.iterator(),function(d){var c=!1;j(d.sprites,function(f){if(f.clonedFrom==r){var g=f;g[l]=g[l],c=!0}}),c||j(d.sprites,function(f){f instanceof W&&A(f.children.iterator(),function(g){if(g.className==r.className){var m=g;m[l]=m[l]}else g instanceof W&&g.deepInvalidate()})})})}),e.dataItems.template.events.on("workingvaluechanged",function(u){if(u.property==a){var d=u.target,c=!1;j(d.sprites,function(f){if(f.clonedFrom==r){var g=f;g[l]=g[l],c=!0}}),c||j(d.sprites,function(f){f instanceof W&&A(f.children.iterator(),function(g){if(g.className==r.className){var m=g;m[l]=m[l]}else g instanceof W&&g.deepInvalidate()})})}}),r.adapter.add(l,function(u,d,c){var f=ce(n.minValue),g=ce(n.maxValue),m=n.min,x=n.max;if(d instanceof $){var b=d.propertyFields[c];if(b&&d.dataItem){var C=d.dataItem.dataContext;if(C&&v(C[b]))return u}}var S=d.dataItem;if(y(f)||(f=o.values[a].low),y(g)||(g=o.values[a].high),S&&S.values[a]){var P=S.getActualWorkingValue(a);if(v(m)&&v(x)&&y(f)&&y(g)&&y(P)){var O=void 0;if(O=n.logarithmic?(Math.log(P)*Math.LOG10E-Math.log(f)*Math.LOG10E)/(Math.log(g)*Math.LOG10E-Math.log(f)*Math.LOG10E):(P-f)/(g-f),!y(P)||y(O)&&Math.abs(O)!=1/0||(O=.5),y(m))return m+(x-m)*O;if(m instanceof se)return new se(mn(m.rgb,x.rgb,O))}}return u})}})),this._heatRules},enumerable:!0,configurable:!0}),i.prototype.processConfig=function(e){var t;if(e){if(v(e.bullets)&&Ae(e.bullets))for(var n=0,r=e.bullets.length;n<r;n++){var a=e.bullets[n];v(a.type)||(a.type="Bullet")}v(e.heatRules)&&Ae(e.heatRules)&&(t=e.heatRules,delete e.heatRules)}if(s.prototype.processConfig.call(this,e),t){for(n=0,r=t.length;n<r;n++){var o=t[n],l=this;if(v(o.target)&&J(o.target))if(this.map.hasKey(o.target))l=this.map.getKey(o.target);else for(var h=o.target.split("."),p=0;p<h.length;p++)if(l instanceof re){var u=l.getIndex(ce(h[p]));l=u||l[h[p]]}else{var d=h[p].match(/^(.*)\[([0-9]+)\]/);l=d?l[d[1]]instanceof re?l[d[1]].getIndex(ce(d[2])):l[d[1]][ce(d[2])]:l[h[p]]}o.target=l,v(o.min)&&(o.min=this.maybeColorOrPercent(o.min)),v(o.max)&&(o.max=this.maybeColorOrPercent(o.max))}s.prototype.processConfig.call(this,{heatRules:t})}},i.prototype.configOrder=function(e,t){return e==t?0:e=="heatRules"?1:t=="heatRules"?-1:s.prototype.configOrder.call(this,e,t)},i.prototype.setVisibility=function(e){s.prototype.setVisibility.call(this,e),this.bulletsContainer.visible=e},i}(ti);_.registeredClasses.Series=zn,_.registeredClasses.SeriesDataItem=Yn;var ho=function(s){function i(){var e=s.call(this)||this;return e.className="SerialChartDataItem",e.applyTheme(),e}return w(i,s),i}(oo),Zr=function(s){function i(){var e=s.call(this)||this;e.className="SerialChart",e.colors=new $i,e._usesData=!1;var t=e.chartContainer.createChild(W);t.shouldClone=!1,t.width=F(100),t.height=F(100),t.isMeasured=!1,t.layout="none",t.zIndex=2,e.seriesContainer=t;var n=e.chartContainer.createChild(W);return n.shouldClone=!1,n.width=F(100),n.height=F(100),n.isMeasured=!1,n.zIndex=3,n.layout="none",e.bulletsContainer=n,e.applyTheme(),e}return w(i,s),i.prototype.dispose=function(){s.prototype.dispose.call(this),this.colors&&this.colors.dispose(),this.patterns&&this.patterns.dispose()},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Serial chart"))},Object.defineProperty(i.prototype,"series",{get:function(){return this._series||(this._series=new Oe(this.createSeries()),this._series.events.on("inserted",this.handleSeriesAdded,this,!1),this._series.events.on("removed",this.handleSeriesRemoved,this,!1),this._disposers.push(new fe(this._series,!1)),this._disposers.push(this._series.template)),this._series},enumerable:!0,configurable:!0}),i.prototype.handleSeriesRemoved=function(e){var t=e.oldValue;this.dataUsers.removeValue(t),this.dataUsers.each(function(h){h.invalidateDataItems()}),t.autoDispose?t.dispose():(t.parent=void 0,t.bulletsContainer.parent=void 0);var n=this.legend;if(n){for(var r=this.legend.dataItems,a=r.length-1;a>=0;a--){var o=r.getIndex(a);o&&o.dataContext==t&&n.dataItems.remove(o)}for(a=n.data.length-1;a>=0;a--){var l=n.data[a];l&&l==t&&z(n.data,l)}}},i.prototype.handleSeriesAdded=function(e){var t=this,n=e.newValue;n.isDisposed()||(n.chart=this,n.parent=this.seriesContainer,n.bulletsContainer.parent=this.bulletsContainer,this._dataUsers.moveValue(n),n.addDisposer(new le(function(){t.dataUsers.removeValue(n)})),this.handleSeriesAdded2(n),this.handleLegendSeriesAdded(n))},i.prototype.handleLegendSeriesAdded=function(e){e.hiddenInLegend||this.legend&&this.legend.addData(e)},i.prototype.handleSeriesAdded2=function(e){var t=this;this.dataInvalid||this._disposers.push(_.events.once("exitframe",function(){e.data&&e.data.length!=0||(e.data=t.data,e.showOnInit&&(e.reinit(),e.setPropertyValue("showOnInit",!1),e.showOnInit=!0),e.isDisposed()||e.events.once("datavalidated",function(){e.data==t.data&&(e._data=[])}))}))},i.prototype.feedLegend=function(){var e=this.legend;if(e){var t=[];A(this.series.iterator(),function(n){n.hiddenInLegend||t.push(n)}),e.dataFields.name="name",e.data=t}},i.prototype.createSeries=function(){return new zn},Object.defineProperty(i.prototype,"colors",{get:function(){return this.getPropertyValue("colors")},set:function(e){this.setPropertyValue("colors",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"patterns",{get:function(){return this.getPropertyValue("patterns")},set:function(e){this.setPropertyValue("patterns",e,!0)},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.series.copyFrom(e.series)},i.prototype.appear=function(){s.prototype.appear.call(this),this.series.each(function(e){e.showOnInit&&e.inited&&e.appear()})},i}(ai);_.registeredClasses.SerialChart=Zr;var Un=function(s){function i(){var e=s.call(this)||this;e._axis=new Me,e.dataItems=new re,e.className="AxisBreak",e.breakSize=.01,e.marginLeft=-5,e.marginRight=-5,e.marginTop=-5,e.marginBottom=-5;var t=new ae,n=new si;n.fill=t.getFor("background"),n.stroke=B(),n.fillOpacity=.9,n.zIndex=0,e._fillShape=n;var r=new si;r.fill=B(),r.stroke=t.getFor("grid"),r.strokeOpacity=.3,r.zIndex=1,e._startLine=r;var a=new si;return a.fill=B(),a.stroke=B("#000000"),a.strokeOpacity=.3,a.zIndex=2,e._endLine=a,e._disposers.push(e._axis),e.applyTheme(),e}return w(i,s),i.prototype.dispose=function(){s.prototype.dispose.call(this),this._fillShape&&this._fillShape.dispose(),this._startLine&&this._startLine.dispose(),this._endLine&&this._endLine.dispose()},Object.defineProperty(i.prototype,"startLine",{get:function(){return this._startLine},set:function(e){this._startLine&&this._startLine.dispose(),this._startLine=e,this.addBreakSprite(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endLine",{get:function(){return this._endLine},set:function(e){this._endLine&&this._endLine.dispose(),this._endLine=e,this.addBreakSprite(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fillShape",{get:function(){return this._fillShape},set:function(e){this._fillShape&&this._fillShape.dispose(),this._fillShape=e,this.addBreakSprite(e)},enumerable:!0,configurable:!0}),i.prototype.addBreakSprite=function(e){e.parent=this,e.isMeasured=!1,this._disposers.push(e)},Object.defineProperty(i.prototype,"axis",{get:function(){return this._axis.get()},set:function(e){if(this._axis.get()!==e){this._axis.set(e,e.renderer.gridContainer.events.on("transformed",this.invalidate,this,!1)),e.renderer.createBreakSprites(this);var t=e.axisBreaks.template;this.startLine.copyFrom(t.startLine),this.endLine.copyFrom(t.endLine),this.fillShape.copyFrom(t.fillShape)}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"breakSize",{get:function(){return this.getPropertyValue("breakSize")},set:function(e){this.setPropertyValue("breakSize",e)&&this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startPoint",{get:function(){var e=this.axis.renderer;if(e)return e.positionToPoint(this.startPosition)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endPoint",{get:function(){var e=this.axis.renderer;if(e)return e.positionToPoint(this.endPosition)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startPosition",{get:function(){},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endPosition",{get:function(){},enumerable:!0,configurable:!0}),i.prototype.draw=function(){s.prototype.draw.call(this),this.axis&&this.axis.renderer.updateBreakElement(this)},Object.defineProperty(i.prototype,"startValue",{get:function(){return this.getPropertyValue("startValue")},set:function(e){this.setPropertyValue("startValue",e)&&this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endValue",{get:function(){return this.getPropertyValue("endValue")},set:function(e){this.setPropertyValue("endValue",e)&&this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),i}(W);_.registeredClasses.AxisBreak=Un;var Mp,Ji=function(s){function i(){var e=s.call(this)||this;return e.className="AxisDataItem",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"grid",{get:function(){if(!this._grid){var e=this.component;if(e){var t,n=void 0;if(this.isRange){if((n=e.axisRanges.template.grid).disabled)return;t=n.clone()}else{if((n=e.renderer.grid.template).disabled)return;t=e.renderer.grid.create(),this._disposers.push(new le(function(){e.renderer.grid.removeValue(t)}))}this.grid=t,t.shouldClone=!1,this._disposers.push(t),t.axis=this.component}}return this._grid},set:function(e){this._grid&&this._grid!=e&&(z(this.sprites,this._grid),this._grid.dataItem=void 0),e&&(e.dataItem&&e.dataItem!=this&&(z(e.dataItem.sprites,e),e.dataItem.grid=void 0),this.addSprite(e)),this._grid=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tick",{get:function(){if(!this._tick){var e=this.component;if(e){var t,n=void 0;if(this.isRange){if((n=e.axisRanges.template.tick).disabled)return;t=n.clone()}else{if((n=e.renderer.ticks.template).disabled)return;t=e.renderer.ticks.create(),this._disposers.push(new le(function(){e.renderer.ticks.removeValue(t)}))}this.tick=t,t.axis=this.component,t.shouldClone=!1,this._disposers.push(t)}}return this._tick},set:function(e){this._tick&&this._tick!=e&&(z(this.sprites,this._tick),this._tick.dataItem=void 0),e&&(e.dataItem&&e.dataItem!=this&&(z(e.dataItem.sprites,e),e.dataItem.tick=void 0),this.addSprite(e)),this._tick=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"label",{get:function(){if(!this._label){var e=this.component;if(e){var t,n=void 0;if(this.isRange){if((n=e.axisRanges.template.label).disabled)return;t=n.clone()}else{if((n=e.renderer.labels.template).disabled)return;t=e.renderer.labels.create(),this._disposers.push(new le(function(){e.renderer.labels.removeValue(t)}))}this._disposers.push(t),this.label=t,t.shouldClone=!1,t.axis=this.component,t.virtualParent=e}}return this._label},set:function(e){this._label&&this._label!=e&&(z(this.sprites,this._label),this._label.dataItem=void 0),e&&(e.dataItem&&e.dataItem!=this&&(z(e.dataItem.sprites,e),e.dataItem.label=void 0),this.addSprite(e)),this._label=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"axisFill",{get:function(){if(!this._axisFill){var e=this.component;if(e){var t,n=void 0;if(this.isRange){if(n=e.axisRanges.template.axisFill,!this.isTemplate&&n.disabled)return;t=n.clone()}else{if((n=e.renderer.axisFills.template).disabled)return;t=e.renderer.axisFills.create(),this._disposers.push(new le(function(){e.renderer.axisFills.removeValue(t)}))}this.axisFill=t,t.shouldClone=!1,this._disposers.push(t)}}return this._axisFill},set:function(e){this._axisFill&&this._axisFill!=e&&(z(this.sprites,this._axisFill),this._axisFill.dataItem=void 0),e&&(e.dataItem&&e.dataItem!=this&&(z(e.dataItem.sprites,e),e.dataItem.axisFill=void 0),e.axis=this.component,this.addSprite(e)),this._axisFill=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"text",{get:function(){return this._text},set:function(e){this._text=e,this._label&&(this._label.text=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"mask",{get:function(){return this._mask},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"contents",{get:function(){if(!this._contents){var e=new W;this.addSprite(e),e.isMeasured=!1,this._contents=e;var t=this.component;if(t){var n=t.renderer.createFill(this.component);n.disabled=!1,n.axis=t,this.addSprite(n),this._mask=n,e.mask=n}}return this._contents},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"axisBreak",{get:function(){return this._axisBreak},set:function(e){this._axisBreak&&this._axisBreak.dataItems.removeValue(this),e&&e.dataItems.push(this),this._axisBreak=e},enumerable:!0,configurable:!0}),i.prototype.validate=function(){this.component&&this.component.validateDataElement(this)},i.prototype.appendChildren=function(){this.component&&this.component.appendDataItem(this)},i.prototype.hasProperty=function(e){return e=="component"||s.prototype.hasProperty.call(this,e)},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.text=e.text,e.bullet&&(this.bullet=e.bullet.clone()),this.minPosition=e.minPosition,this.maxPosition=e.maxPosition},i.prototype.setVisibility=function(e,t){s.prototype.setVisibility.call(this,e,t),this._contents&&(this._contents.visible=e)},Object.defineProperty(i.prototype,"bullet",{get:function(){return this._bullet},set:function(e){this._bullet&&this._bullet!=e&&(z(this.sprites,this._bullet),this._bullet.dataItem=void 0),this._bullet=e,e&&this.addSprite(e)},enumerable:!0,configurable:!0}),i}(ei);(function(s){s[s.Start=0]="Start",s[s.Middle=.5]="Middle",s[s.End=1]="End"})(Mp||(Mp={}));var Gn=function(s){function i(){var e=s.call(this)||this;if(e._gridCount=10,e._series=new re,e.autoDispose=!0,e._axisItemCount=0,e.constructor===i)throw new Error("'Axis' cannot be instantiated directly. Please use a specific axis type.");e.hideTooltipWhileZooming=!0,e.minWidth=1e-4,e.minHeight=1e-4,e.className="Axis",e.shouldClone=!1,e.setPropertyValue("cursorTooltipEnabled",!0),e.toggleZoomOutButton=!0,e.zoomable=!0;var t=new ae;e.title=new $e,e.title.shouldClone=!1,e._disposers.push(e.title),e.setPropertyValue("startLocation",0),e.setPropertyValue("endLocation",1),e._dataItemsIterator=new fn(e.dataItems,function(){return e.dataItems.create()}),e._dataItemsIterator.createNewItems=!0;var n=new Rn;e._disposers.push(n),n.label.padding(5,10,5,10),n.background.pointerLength=5,n.fitPointerToBounds=!0,n.background.filters.clear(),n.virtualParent=e;var r=n.background;return r.cornerRadius=0,r.fill=t.getFor("alternativeBackground"),r.stroke=r.fill,r.strokeWidth=1,r.fillOpacity=1,n.label.fill=t.getFor("alternativeText"),e.tooltip=n,e.readerHidden=!0,e.events.on("rangechangestarted",function(){e.series.each(function(a){a.hideTooltipWhileZooming&&(a.tooltip.hide(),a.tooltip.preventShow=!0)}),e.hideTooltipWhileZooming&&(e.tooltip.hide(),e.tooltip.preventShow=!0)},void 0,!1),e.events.on("rangechangeended",function(){e.series.each(function(a){a.hideTooltipWhileZooming&&(a.tooltip.hide(),a.tooltip.preventShow=!1)}),e.hideTooltipWhileZooming&&(e.tooltip.hide(),e.tooltip.preventShow=!1)},void 0,!1),e.applyTheme(),e}return w(i,s),i.prototype.fillRule=function(e,t){y(t)||(t=e.index),t/2==Math.round(t/2)?(e.axisFill.__disabled=!0,e.axisFill.opacity=0):(e.axisFill.opacity=1,e.axisFill.__disabled=!1)},i.prototype.createDataItem=function(){return new Ji},i.prototype.invalidateLayout=function(){s.prototype.invalidateLayout.call(this),A(this.series.iterator(),function(e){e.invalidateLayout()})},i.prototype.invalidateSeries=function(){A(this.series.iterator(),function(e){e.invalidate()})},i.prototype.validateDataElements=function(){this._axisItemCount=0,this.ghostLabel&&(this.renderer.updateLabelElement(this.ghostLabel,this.start,this.end),this.ghostLabel.validate())},i.prototype.updateGridCount=function(){if(this.renderer){var e=this.axisLength/this.renderer.minGridDistance;e!=this._gridCount&&(this._gridCount=e,this.clearCache())}},i.prototype.validateLayout=function(){this.axisFullLength=this.axisLength/(this.end-this.start),s.prototype.validateLayout.call(this),this.updateGridCount();var e=this.renderer;e&&(e.updateAxisLine(),e.updateTooltip(),e.updateBaseGridElement()),this._prevLength!=this.axisLength&&(this.dispatchImmediately("lengthchanged"),this._prevLength=this.axisLength)},i.prototype.initRenderer=function(){},i.prototype.appendDataItem=function(e){var t=this.renderer,n=e.tick;n&&(n.above?n.parent=t.bulletsContainer:n.parent=t.gridContainer),e.label&&(e.label.parent=t);var r=e.axisFill;r&&(r.above?r.parent=t.bulletsContainer:r.parent=t.gridContainer);var a=e.grid;a&&(a.above?a.parent=t.bulletsContainer:a.parent=t.gridContainer),e.bullet&&(e.bullet.parent=t.bulletsContainer)},i.prototype.validate=function(){s.prototype.validate.call(this),this.validateLayout(),this.renderer.updateGridContainer()},i.prototype.validateAxisRanges=function(){var e=this;A(this.axisRanges.iterator(),function(t){e.appendDataItem(t),e.validateDataElement(t),t.grid&&t.grid.validate(),t.tick&&t.tick.validate(),t.axisFill&&t.axisFill.validate(),t.label&&t.label.validate()})},i.prototype.validateBreaks=function(){this._axisBreaks&&A(this._axisBreaks.iterator(),function(e){e.invalidate()})},i.prototype.processBreak=function(e){var t=e.newValue;t.parent=this.renderer.breakContainer,t.axis=this},i.prototype.registerSeries=function(e){var t=this;return this.series.moveValue(e),new _e([new le(function(){t.series.removeValue(e)}),this.events.on("lengthchanged",e.invalidate,e,!1),this.events.on("lengthchanged",e.createMask,e,!1),this.events.on("startchanged",e.invalidate,e,!1),this.events.on("endchanged",e.invalidate,e,!1)])},Object.defineProperty(i.prototype,"renderer",{get:function(){return this._renderer},set:function(e){if(e!=this._renderer){this._renderer=e,e.chart=this.chart,e.axis=this,e.parent=this,this.title.parent=this,this.initRenderer(),this._disposers.push(e.gridContainer.events.on("maxsizechanged",this.invalidate,this,!1));var t=this.renderer.labels.create();this._disposers.push(t),t.dataItem=this.dataItems.template.clone(),t.text="L",t.parent=this.renderer,t.shouldClone=!1,t.fillOpacity=0,t.opacity=0,t.strokeOpacity=0,t.interactionsEnabled=!1,t.validate(),this.ghostLabel=t,this.events.on("beforedatavalidated",function(){t.text="L"},void 0,!1)}},enumerable:!0,configurable:!0}),i.prototype.positionToAngle=function(e){return this.renderer.positionToAngle(e)},i.prototype.pointToPosition=function(e){return this.renderer.pointToPosition(e)},i.prototype.positionToCoordinate=function(e){return this.renderer.positionToCoordinate(e)},i.prototype.getAnyRangePath=function(e,t){return this.renderer.getPositionRangePath(e,t)},i.prototype.anyToPosition=function(e){return 0},i.prototype.anyToPoint=function(e){return{x:0,y:0,angle:0}},i.prototype.getPositionRangePath=function(e,t){return this.renderer?this.renderer.getPositionRangePath(e,t):""},Object.defineProperty(i.prototype,"axisLength",{get:function(){return this.renderer?this.renderer.axisLength:0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cursorTooltipEnabled",{get:function(){return this.getPropertyValue("cursorTooltipEnabled")},set:function(e){this.setPropertyValue("cursorTooltipEnabled",e)&&(e&&this.renderer?this.renderer.updateTooltip():this.tooltip&&this.tooltip.hide(0))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"toggleZoomOutButton",{get:function(){return this.getPropertyValue("toggleZoomOutButton")},set:function(e){this.setPropertyValue("toggleZoomOutButton",e)},enumerable:!0,configurable:!0}),i.prototype.hideTooltip=function(e){s.prototype.hideTooltip.call(this,e),this._tooltipPosition=void 0},i.prototype.showTooltipAtPosition=function(e,t){var n=this._tooltip;if(!n||this.dataItems.length<=0)this._tooltipPosition=void 0;else{if(t||(e=this.toAxisPosition(e)),!y(e)||e<this.start||e>this.end)return n.hide(0),void(this._tooltipPosition=void 0);var r=this.renderer;n.parent||(n.parent=this.tooltipContainer);var a=r.tooltipLocation,o=this.getCellStartPosition(e),l=this.getCellEndPosition(e);if(this.tooltipPosition=="fixed"&&(e=o+(l-o)*a),e=R(e,this.start,this.end),this._tooltipPosition!=e){this._tooltipPosition=e;var h=r.tooltipLocation2,p=r.positionToPoint(o,h),u=r.positionToPoint(l,h);this.currentItemStartPoint=p,this.currentItemEndPoint=u,r.fullWidthTooltip&&(n.width=u.x-p.x,n.height=u.y-p.y);var d=ut(r.positionToPoint(e,h),this.renderer.line);n.text=this.getTooltipText(e),n.text&&(n.delayedPointTo(d),n.show())}this.cursorTooltipEnabled&&!this.tooltip.disabled||n.hide(0)}},i.prototype.toAxisPosition=function(e){if((e=this.renderer.toAxisPosition(e))!=null)return e*=this.end-this.start,this.renderer.inversed?this.end-e:this.start+e},i.prototype.toGlobalPosition=function(e){return this.renderer.inversed?e=this.end-e:e-=this.start,e/(this.end-this.start)},i.prototype.getTooltipText=function(e){},i.prototype.updateTooltip=function(e,t){var n=this._tooltip;n&&(n.fixDoc=!1,n.pointerOrientation=e,n.setBounds(Dr(t,this.renderer.line)))},i.prototype.roundPosition=function(e,t,n){return e},i.prototype.getCellStartPosition=function(e){return e},i.prototype.getCellEndPosition=function(e){return e},Object.defineProperty(i.prototype,"axisRanges",{get:function(){if(!this._axisRanges){var e=this.createDataItem();e.isRange=!0,e.axisFill=this.renderer.axisFills.template.clone(),e.grid=this.renderer.grid.template.clone(),e.tick=this.renderer.ticks.template.clone(),e.label=this.renderer.labels.template.clone(),e.isTemplate=!0,e.component=this,e.axisFill.disabled=!1,e.tick.disabled=!1,e.grid.disabled=!1,e.label.disabled=!1,this._axisRanges=new Oe(e),this._axisRanges.events.on("inserted",this.processAxisRange,this,!1),this._disposers.push(new fe(this._axisRanges)),this._disposers.push(this._axisRanges.template)}return this._axisRanges},enumerable:!0,configurable:!0}),i.prototype.processAxisRange=function(e){var t=e.newValue;t.component=this,t.isRange=!0},Object.defineProperty(i.prototype,"axisBreaks",{get:function(){return this._axisBreaks||(this._axisBreaks=new ha(this.createAxisBreak(),function(e,t){return Pt(e.adjustedStartValue,t.adjustedStartValue)}),this._axisBreaks.events.on("inserted",this.processBreak,this,!1),this._disposers.push(new fe(this._axisBreaks)),this._disposers.push(this._axisBreaks.template)),this._axisBreaks},enumerable:!0,configurable:!0}),i.prototype.createAxisBreak=function(){return new Un},Object.defineProperty(i.prototype,"series",{get:function(){return this._series||(this._series=new re),this._series},enumerable:!0,configurable:!0}),i.prototype.processSeriesDataItems=function(){},i.prototype.processSeriesDataItem=function(e,t){},i.prototype.postProcessSeriesDataItems=function(e){},i.prototype.postProcessSeriesDataItem=function(e){},i.prototype.updateAxisBySeries=function(){},i.prototype.hideUnusedDataItems=function(){var e=this,t=this._dataItemsIterator;t.createNewItems=!1,A(t.iterator(),function(n){e.validateDataElement(n),n.__disabled=!0}),t.clear(),t.createNewItems=!0},i.prototype.getSeriesDataItem=function(e,t,n){},i.prototype.getAngle=function(e,t,n,r,a){},i.prototype.getX=function(e,t,n,r,a){},i.prototype.getPositionX=function(e,t,n,r,a){},i.prototype.getY=function(e,t,n,r,a){},i.prototype.getPositionY=function(e,t,n,r,a){},Object.defineProperty(i.prototype,"basePoint",{get:function(){return{x:0,y:0}},enumerable:!0,configurable:!0}),i.prototype.dataChangeUpdate=function(){},i.prototype.seriesDataChangeUpdate=function(e){},i.prototype.adjustDifference=function(e,t){var n=t-e;if(y(n))return this._axisBreaks&&rt(this._axisBreaks.iterator(),function(r){var a=r.adjustedStartValue,o=r.adjustedEndValue;if(y(a)&&y(o)){if(a>t)return!1;if(o>=e&&y(a)&&y(o)){var l=r.breakSize,h=ol({start:a,end:o},{start:e,end:t});h&&(n-=(h.end-h.start)*(1-l))}return!0}}),n},i.prototype.isInBreak=function(e){if(this._axisBreaks)return Tl(this._axisBreaks.iterator(),function(t){return e>=t.adjustedStartValue&&e<=t.adjustedEndValue})},i.prototype.fixAxisBreaks=function(){var e=this;if(this._axisBreaks){var t=this._axisBreaks;if(t.length>0){j(Ri(t.iterator()),function(a){var o=ie(a.startValue,a.endValue),l=q(a.startValue,a.endValue);a.adjustedStartValue=o,a.adjustedEndValue=l,e._axisBreaks.update(a)});var n=t.first,r=Math.min(n.startValue,n.endValue);A(t.iterator(),function(a){var o=a.adjustedStartValue,l=a.adjustedEndValue;o<r&&(o=r,l<r&&(l=r)),a.adjustedStartValue=o,a.adjustedEndValue=l})}}},Object.defineProperty(i.prototype,"startIndex",{get:function(){return 0},set:function(e){},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endIndex",{get:function(){return this.dataItems.length},set:function(e){},enumerable:!0,configurable:!0}),i.prototype.getPositionLabel=function(e){return Math.round(100*e)+"%x"},Object.defineProperty(i.prototype,"chart",{get:function(){return this._chart},set:function(e){this._chart=e},enumerable:!0,configurable:!0}),i.prototype.createSeriesRange=function(e){var t=this.axisRanges.create();return t.component=this,t.axisFill=this.renderer.axisFills.template.clone(),t.axisFill.disabled=!1,t.axisFill.fillOpacity=0,t.grid=this.renderer.grid.template.clone(),t.grid.disabled=!0,t.tick=this.renderer.ticks.template.clone(),t.tick.disabled=!0,t.label=this.renderer.labels.template.clone(),t.label.disabled=!0,t.addDisposer(new le(function(){e.axisRanges.removeValue(t)})),e.axisRanges.push(t),t},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.renderer?this.renderer.copyFrom(e.renderer):e.renderer&&(this.renderer=e.renderer.clone(),this._disposers.push(this.renderer)),e.title&&(this.title?this.title.copyFrom(e.title):(this.title=e.title.clone(),this.title.parent=this),this._disposers.push(this.title))},i.prototype.resetIterators=function(){this._dataItemsIterator.reset()},i.prototype.processConfig=function(e){if(e&&v(e.axisRanges)&&Ae(e.axisRanges))for(var t=0,n=e.axisRanges.length;t<n;t++){var r=e.axisRanges[t];v(r.series)&&J(r.series)&&this.map.hasKey(r.series)&&(e.axisRanges[t]=this.createSeriesRange(this.map.getKey(r.series)),delete r.series,e.axisRanges[t].config=r)}s.prototype.processConfig.call(this,e)},i.prototype.configOrder=function(e,t){return e==t?0:e=="title"?1:t=="title"||e=="component"?-1:t=="component"?1:s.prototype.configOrder.call(this,e,t)},Object.defineProperty(i.prototype,"startLocation",{get:function(){return this.getPropertyValue("startLocation")},set:function(e){this.setPropertyValue("startLocation",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endLocation",{get:function(){return this.getPropertyValue("endLocation")},set:function(e){this.setPropertyValue("endLocation",e,!0)},enumerable:!0,configurable:!0}),i.prototype.setDisabled=function(e){var t=s.prototype.setDisabled.call(this,e);return this.renderer&&(this.renderer.gridContainer.disabled=e),t},Object.defineProperty(i.prototype,"title",{get:function(){return this._title},set:function(e){this._title&&this._title!=e&&this._title.dispose(),e&&(this._title=e,e.parent=this,e.shouldClone=!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hideTooltipWhileZooming",{get:function(){return this.getPropertyValue("hideTooltipWhileZooming")},set:function(e){this.setPropertyValue("hideTooltipWhileZooming",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"zoomable",{get:function(){return this.getPropertyValue("zoomable")},set:function(e){this.setPropertyValue("zoomable",e)},enumerable:!0,configurable:!0}),i}(ti);_.registeredClasses.Axis=Gn,_.registeredClasses.AxisDataItem=Ji,Ne.push({relevant:Ue.maybeXS,state:function(s,i){if(s instanceof Gn&&s.tooltip){var e=s.states.create(i);return e.properties.cursorTooltipEnabled=!1,e}return null}});var po=function(s){function i(){var e=s.call(this)||this;e.className="AxisLine",e.element=e.paper.add("path");var t=new ae;return e.stroke=t.getFor("grid"),e.strokeOpacity=.15,e.pixelPerfect=!0,e.fill=B(),e.applyTheme(),e.interactionsEnabled=!1,e}return w(i,s),i}($);_.registeredClasses.AxisLine=po;var qr=function(s){function i(e){var t=s.call(this)||this;t.axis=e,t.element=t.paper.add("path"),t.className="AxisFill",t.isMeasured=!1,t.location=0,t.above=!1;var n=new ae;return t.fill=n.getFor("alternativeBackground"),t.fillOpacity=0,t.applyTheme(),t}return w(i,s),i.prototype.setDisabled=function(e){var t=s.prototype.setDisabled.call(this,e);return this.axis&&this.axis.invalidateDataItems(),t},i.prototype.draw=function(){s.prototype.draw.call(this),this.__disabled||this.disabled||this.axis&&y(this.startPosition)&&y(this.endPosition)&&(this.fillPath=this.axis.getPositionRangePath(this.startPosition,this.endPosition),this.path=this.fillPath,this.isMeasured&&this.measure())},Object.defineProperty(i.prototype,"startPosition",{get:function(){return this.getPropertyValue("startPosition")},set:function(e){this.setPropertyValue("startPosition",e),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endPosition",{get:function(){return this.getPropertyValue("endPosition")},set:function(e){this.setPropertyValue("endPosition",e),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"location",{get:function(){return this.getPropertyValue("location")},set:function(e){this.setPropertyValue("location",e,!0)},enumerable:!0,configurable:!0}),i.prototype.setPath=function(e){return!!this.setPropertyValue("path",e)&&(this.element.attr({d:e}),!0)},Object.defineProperty(i.prototype,"above",{get:function(){return this.getPropertyValue("above")},set:function(e){this.setPropertyValue("above",e,!0)},enumerable:!0,configurable:!0}),i}($);_.registeredClasses.AxisFill=qr;var Qi=function(s){function i(){var e=s.call(this)||this;e.className="Grid",e.element=e.paper.add("path"),e.location=.5,e.isMeasured=!1,e.above=!1;var t=new ae;return e.stroke=t.getFor("grid"),e.pixelPerfect=!0,e.strokeOpacity=.15,e.fill=B(),e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"location",{get:function(){return this.getPropertyValue("location")},set:function(e){this.setPropertyValue("location",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"above",{get:function(){return this.getPropertyValue("above")},set:function(e){this.setPropertyValue("above",e,!0)},enumerable:!0,configurable:!0}),i.prototype.setDisabled=function(e){var t=s.prototype.setDisabled.call(this,e);return this.axis&&this.axis.invalidateDataItems(),t},i}($);_.registeredClasses.Grid=Qi,Ne.push({relevant:Ue.maybeXS,state:function(s,i){if(s instanceof Qi){var e=s.states.create(i);return e.properties.disabled=!0,e}return null}});var $r=function(s){function i(){var e=s.call(this)||this;return e.className="AxisLabel",e.isMeasured=!1,e.padding(10,10,10,10),e.location=.5,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"location",{get:function(){return this.getPropertyValue("location")},set:function(e){this.setPropertyValue("location",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"inside",{get:function(){return this.getPropertyValue("inside")},set:function(e){this.setPropertyValue("inside",e,!0)},enumerable:!0,configurable:!0}),i.prototype.setDisabled=function(e){var t=s.prototype.setDisabled.call(this,e);return this.axis&&this.axis.invalidateDataItems(),t},i}($e);_.registeredClasses.AxisLabel=$r;var en=function(s){function i(){var e=s.call(this)||this;e.className="Tick";var t=new ae;return e.fillOpacity=0,e.length=6,e.strokeOpacity=.2,e.stroke=t.getFor("grid"),e.isMeasured=!1,e.nonScalingStroke=!0,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"length",{get:function(){return this.disabled?0:this.getPropertyValue("length")},set:function(e){this.setPropertyValue("length",e,!0)},enumerable:!0,configurable:!0}),i}($);_.registeredClasses.Tick=en;var uo=function(s){function i(){var e=s.call(this)||this;return e.className="AxisTick",e.element=e.paper.add("path"),e.location=.5,e.above=!1,e.isMeasured=!1,e.pixelPerfect=!0,e.strokeOpacity=0,e.length=5,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"location",{get:function(){return this.getPropertyValue("location")},set:function(e){this.setPropertyValue("location",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"inside",{get:function(){return this.getPropertyValue("inside")},set:function(e){this.setPropertyValue("inside",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"above",{get:function(){return this.getPropertyValue("above")},set:function(e){this.setPropertyValue("above",e,!0)},enumerable:!0,configurable:!0}),i.prototype.setDisabled=function(e){var t=s.prototype.setDisabled.call(this,e);return this.axis&&this.axis.invalidateDataItems(),t},i}(en);_.registeredClasses.AxisTick=uo;var Kn=function(s){function i(){var e=s.call(this)||this;e._chart=new Me,e.className="AxisRenderer",e.minGridDistance=50,e.inside=!1,e.inversed=!1,e.tooltipLocation=.5,e.fullWidthTooltip=!1,e.cellStartLocation=0,e.cellEndLocation=1,e.minLabelPosition=0,e.maxLabelPosition=1,e.shouldClone=!1;var t=e.createChild(W);t.shouldClone=!1,t.layout="none",t.virtualParent=e,t.width=F(100),t.height=F(100),e.gridContainer=t,t.events.on("maxsizechanged",function(){e.inited&&e.invalidateAxisItems()},e,!1);var n=e.createChild(W);n.shouldClone=!1,n.isMeasured=!1,n.layout="none",n.width=F(100),n.height=F(100),e.breakContainer=n;var r=e.createChild(W);r.shouldClone=!1,r.isMeasured=!1,r.layout="none",r.width=F(100),r.height=F(100),e.bulletsContainer=r,e.line=e.createChild(po),e.line.shouldClone=!1,e.line.strokeOpacity=0;var a=e.createChild(Qi);a.shouldClone=!1,e.baseGrid=a;var o=e._disposers;return o.push(a),o.push(e.line),o.push(t),o.push(n),o.push(r),o.push(e._chart),e.ticks.template.disabled=!0,e.axisFills.template.disabled=!0,e.axisFills.template.interactionsEnabled=!1,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"axis",{get:function(){return this._axis},set:function(e){this.setAxis(e)},enumerable:!0,configurable:!0}),i.prototype.setAxis=function(e){this._axis=e,this.baseGrid.parent=e,this.line.parent=e,this.gridContainer.bind("opacity",e)},i.prototype.processRenderer=function(){this.events.on("sizechanged",this.updateTooltip,this,!1),this.events.on("positionchanged",this.updateTooltip,this,!1),this.labels.template.inside=this.inside,this.ticks.template.inside=this.inside},i.prototype.updateTooltip=function(){},Object.defineProperty(i.prototype,"axisLength",{get:function(){return 0},enumerable:!0,configurable:!0}),i.prototype.positionItem=function(e,t){e&&e.moveTo(t)},i.prototype.positionToPoint=function(e,t){return{x:0,y:0}},i.prototype.positionToAngle=function(e){return 0},i.prototype.positionToCoordinate=function(e){var t=this.axis,n=t.axisFullLength;return t.renderer.inversed?(t.end-e)*n:(e-t.start)*n},i.prototype.updateGridContainer=function(){},i.prototype.getHeight=function(){var e=this.gridContainer;return e.parent?e.parent.pixelHeight:this.gridContainer.pixelHeight||0},i.prototype.getWidth=function(){var e=this.gridContainer;return e.parent?e.parent.pixelWidth:this.gridContainer.pixelWidth||0},i.prototype.coordinateToPosition=function(e,t){var n=this.axis,r=n.axisFullLength;return V(n.renderer.inversed?n.end-e/r:e/r+n.start,5)},i.prototype.pointToPosition=function(e){return 0},i.prototype.getPositionRangePath=function(e,t){return""},i.prototype.invalidateAxisItems=function(){var e=this.axis;e&&e.invalidateDataItems()},i.prototype.updateGridElement=function(e,t,n){},i.prototype.updateTickElement=function(e,t,n){},i.prototype.updateBullet=function(e,t,n){},i.prototype.updateLabelElement=function(e,t,n,r){},i.prototype.updateFillElement=function(e,t,n){e.startPosition=t,e.endPosition=n},i.prototype.updateAxisLine=function(){},i.prototype.updateBaseGridElement=function(){},i.prototype.updateBreakElement=function(e){this.positionItem(e.startLine,e.startPoint),this.toggleVisibility(e.startLine,e.startPosition,0,1),this.positionItem(e.endLine,e.endPoint),this.toggleVisibility(e.endLine,e.endPosition,0,1)},Object.defineProperty(i.prototype,"minGridDistance",{get:function(){return this.getPropertyValue("minGridDistance")},set:function(e){this.setPropertyValue("minGridDistance",e)&&this.axis&&this.axis.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"chart",{get:function(){return this._chart.get()},set:function(e){this._chart.set(e,null)},enumerable:!0,configurable:!0}),i.prototype.toggleVisibility=function(e,t,n,r){var a=this.axis,o=e.dataItem;o&&o instanceof Ji&&(y(o.minPosition)&&(n=o.minPosition),y(o.maxPosition)&&(r=o.maxPosition));var l=a.start+(a.end-a.start)*(n-1e-4),h=a.start+(a.end-a.start)*(r+1e-4);e.disabled||(e.__disabled=t<l||t>h)},i.prototype.createBreakSprites=function(e){},Object.defineProperty(i.prototype,"axisFills",{get:function(){if(!this._axisFills){var e=this.createFill(this.axis);this._axisFills=new Oe(e),e.applyOnClones=!0,e.events.on("enabled",this.invalidateAxisItems,this,!1),this._disposers.push(new fe(this._axisFills)),this._disposers.push(this._axisFills.template)}return this._axisFills},enumerable:!0,configurable:!0}),i.prototype.createFill=function(e){return new qr(e)},Object.defineProperty(i.prototype,"grid",{get:function(){if(!this._grid){var e=this.createGrid();this._grid=new Oe(e),e.applyOnClones=!0,e.events.on("enabled",this.invalidateAxisItems,this,!1),this._disposers.push(new fe(this._grid)),this._disposers.push(this._grid.template)}return this._grid},enumerable:!0,configurable:!0}),i.prototype.createGrid=function(){return new Qi},Object.defineProperty(i.prototype,"ticks",{get:function(){if(!this._ticks){var e=this.createTick();e.applyOnClones=!0,e.isMeasured=!1,e.events.on("enabled",this.invalidateAxisItems,this,!1),this._ticks=new Oe(e),this._disposers.push(new fe(this._ticks)),this._disposers.push(this._ticks.template)}return this._ticks},enumerable:!0,configurable:!0}),i.prototype.createTick=function(){return new uo},Object.defineProperty(i.prototype,"labels",{get:function(){if(!this._labels){var e=this.createLabel();this._labels=new Oe(e),e.applyOnClones=!0,e.events.on("enabled",this.invalidateAxisItems,this,!1),this._disposers.push(new fe(this._labels)),this._disposers.push(this._labels.template)}return this._labels},enumerable:!0,configurable:!0}),i.prototype.createLabel=function(){return new $r},Object.defineProperty(i.prototype,"inside",{get:function(){return this.getPropertyValue("inside")},set:function(e){this.setPropertyValue("inside",e)&&this.axis&&this.axis.invalidate(),e?(this.width=0,this.height=0):(this.width=void 0,this.height=void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"opposite",{get:function(){return this.getPropertyValue("opposite")},set:function(e){this.setPropertyValue("opposite",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fullWidthTooltip",{get:function(){return this.getPropertyValue("fullWidthTooltip")},set:function(e){this.setPropertyValue("fullWidthTooltip",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipLocation",{get:function(){return this.getPropertyValue("tooltipLocation")},set:function(e){this.setPropertyValue("tooltipLocation",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipLocation2",{get:function(){return this.getPropertyValue("tooltipLocation2")},set:function(e){this.setPropertyValue("tooltipLocation2",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cellStartLocation",{get:function(){return this.getPropertyValue("cellStartLocation")},set:function(e){this.setPropertyValue("cellStartLocation",e)&&this.axis&&this.axis.invalidateSeries()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cellEndLocation",{get:function(){return this.getPropertyValue("cellEndLocation")},set:function(e){this.setPropertyValue("cellEndLocation",e)&&this.axis&&this.axis.invalidateSeries()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"inversed",{get:function(){return this.getPropertyValue("inversed")},set:function(e){this.setPropertyValue("inversed",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minLabelPosition",{get:function(){return this.getPropertyValue("minLabelPosition")},set:function(e){this.setPropertyValue("minLabelPosition",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxLabelPosition",{get:function(){return this.getPropertyValue("maxLabelPosition")},set:function(e){this.setPropertyValue("maxLabelPosition",e,!0)},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.grid.template.copyFrom(e.grid.template),this.ticks.template.copyFrom(e.ticks.template),this.labels.template.copyFrom(e.labels.template),this.axisFills.template.copyFrom(e.axisFills.template),this.line.copyFrom(e.line),this.baseGrid.copyFrom(e.baseGrid)},i.prototype.toAxisPosition=function(e){return e},i.prototype.setVisibility=function(e){s.prototype.setVisibility.call(this,e),this.bulletsContainer.visible=e},i}(W);_.registeredClasses.AxisRenderer=Kn;var tn=function(s){function i(){var e=s.call(this)||this;return e.className="AxisBullet",e.location=.5,e.isMeasured=!1,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"location",{get:function(){return this.getPropertyValue("location")},set:function(e){this.setPropertyValue("location",e,!0)},enumerable:!0,configurable:!0}),i.prototype.setDisabled=function(e){var t=s.prototype.setDisabled.call(this,e);return this.axis&&this.axis.invalidateDataItems(),t},i}(W);_.registeredClasses.AxisBullet=tn;var mt=function(s){function i(){var e=s.call(this)||this;return e.className="AxisRendererY",e.minGridDistance=40,e.opposite=!1,e.height=F(100),e.labels.template.verticalCenter="middle",e.applyTheme(),e}return w(i,s),i.prototype.setAxis=function(e){s.prototype.setAxis.call(this,e),e.layout="horizontal"},i.prototype.updateGridContainer=function(){var e=this.axis;if(e){var t=this.gridContainer;t.y=e.pixelY,t.height=e.axisLength}},i.prototype.toAxisPosition=function(e){var t=this.axis;if(t){var n=1-e,r=t.relativePositionSprite,a=t.pixelY;if(r?a=Qe({x:0,y:this.pixelY},this.parent,r).y:r=t.parent,r)return 1-(n-a/r.innerHeight)/(t.axisLength/r.innerHeight)}return e},i.prototype.processRenderer=function(){s.prototype.processRenderer.call(this);var e=this.axis;if(e){var t=e.title;t.valign="middle",e.height instanceof te||(e.height=F(100)),this.opposite?(t.rotation=90,this.line.toBack(),t.toFront()):(t.rotation=-90,t.toBack(),this.line.toFront())}},i.prototype.updateTooltip=function(){if(this.axis){var e=2e3,t=0,n=e,r=this.axisLength;this.opposite?this.inside&&(t=-2e3,n=e):this.inside||(t=-2e3,n=e),this.axis.updateTooltip("horizontal",{x:t,y:0,width:n,height:r})}},Object.defineProperty(i.prototype,"axisLength",{get:function(){var e=this.axis;return e.measuredHeight-e.pixelPaddingTop-e.pixelPaddingBottom||0},enumerable:!0,configurable:!0}),i.prototype.positionToPoint=function(e,t){return{x:0,y:this.positionToCoordinate(e)}},i.prototype.pointToPosition=function(e){return this.coordinateToPosition(e.y,e.x)},i.prototype.coordinateToPosition=function(e,t){var n=this.axis,r=n.axisFullLength;return V(n.renderer.inversed?1-n.start-e/r:e/r+(1-n.end),5)},i.prototype.getPositionRangePath=function(e,t){var n=R(this.positionToCoordinate(e),0,this.axisLength),r=R(this.positionToCoordinate(t),0,this.axisLength),a=Math.abs(r-n),o=this.getWidth();return Yt({x:0,y:Math.min(n,r),width:o,height:a},!0)},i.prototype.updateGridElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t);e.path=E({x:0,y:0})+T({x:this.getWidth(),y:0}),this.positionItem(e,r),this.toggleVisibility(e,t,0,1)},i.prototype.updateTickElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t),a=e.length;try{this.axis.title.measuredWidth}catch{}r.x=Qe({x:this.line.pixelX,y:0},this.line.parent,this.gridContainer).x,this.opposite?a*=e.inside?-1:1:a*=e.inside?1:-1,e.path=E({x:0,y:0})+T({x:a,y:0}),this.positionItem(e,r),this.toggleVisibility(e,t,0,1)},i.prototype.updateAxisLine=function(){this.line.path=E({x:0,y:0})+T({x:0,y:this.axisLength})},i.prototype.updateBaseGridElement=function(){s.prototype.updateBaseGridElement.call(this);var e=this.axis,t=this.getWidth(),n=this.axisLength,r=e.basePoint.y,a=this.baseGrid;if(r<-.2||r>n+.2)a.hide(0);else{var o=Qe({x:0,y:0},this.gridContainer,a.parent).x;a.path=E({x:0,y:0})+T({x:t,y:0}),a.moveTo({x:o,y:r}),a.show(0)}},i.prototype.updateLabelElement=function(e,t,n,r){v(r)||(r=e.location),t+=(n-t)*r,e.isMeasured=!e.inside;var a,o=this.positionToPoint(t),l=0,h=this.gridContainer.maxWidth;this.opposite?(e.inside?(a="right",e.align=="left"&&(l=-h,a="left"),e.align=="center"&&(l=-h/2,a="middle")):a="left",o.x=0+l):(e.inside?(a="left",e.align=="right"&&(l=h,a="right"),e.align=="center"&&(l=h/2,a="middle")):a="right",o.x=this.measuredWidth+l),e.rotation==0&&(e.horizontalCenter=a),this.positionItem(e,o),this.toggleVisibility(e,t,this.minLabelPosition,this.maxLabelPosition)},i.prototype.updateBreakElement=function(e){s.prototype.updateBreakElement.call(this,e);var t=e.startLine,n=e.endLine,r=e.fillShape,a=e.startPoint,o=e.endPoint,l=e.pixelMarginLeft,h=this.getWidth()-e.pixelMarginLeft-e.pixelMarginRight;a.y=R(a.y,-1,this.axisLength+1),o.y=R(o.y,-1,this.axisLength+1),a.y==o.y&&(a.y<0||a.y>this.axisLength)?e.fillShape.__disabled=!0:e.fillShape.__disabled=!1;var p=Math.abs(h-l);t.x=l,t.height=0,t.width=p,n.x=l,n.height=0,n.width=p,r.width=p,r.height=Math.abs(o.y-a.y),r.x=l,r.y=o.y},i.prototype.createBreakSprites=function(e){e.startLine=new si,e.endLine=new si;var t=new Ja;t.setWavedSides(!0,!1,!0,!1),e.fillShape=t},i.prototype.positionToCoordinate=function(e){var t=this.axis,n=t.axisFullLength;return t.renderer.inversed?(e-t.start)*n:(t.end-e)*n},i.prototype.updateBullet=function(e,t,n){var r=.5;e instanceof tn&&(r=e.location),t+=(n-t)*r;var a=this.positionToPoint(t);a.x=Qe({x:this.line.pixelX,y:0},this.line.parent,this.gridContainer).x,this.positionItem(e,a),this.toggleVisibility(e,t,0,1)},i}(Kn);_.registeredClasses.AxisRendererY=mt,Ne.push({relevant:Ue.widthS,state:function(s,i){if(s instanceof mt){var e=s.states.create(i);return e.properties.inside=!0,e.properties.maxLabelPosition=.9,e.properties.minLabelPosition=.1,e}return null}}),Ne.push({relevant:Ue.widthXS,state:function(s,i){if(s instanceof mt){var e=s.states.create(i);return e.properties.disabled=!0,e}return null}});var Jr=function(s){function i(){var e=s.call(this)||this;return e.className="ValueAxisBreak",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"startPosition",{get:function(){if(this.axis)return this.axis.valueToPosition(this.adjustedStartValue)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endPosition",{get:function(){if(this.axis)return this.axis.valueToPosition(this.adjustedEndValue)},enumerable:!0,configurable:!0}),i}(Un);_.registeredClasses.ValueAxisBreak=Jr;var Zn=function(s){function i(){var e=s.call(this)||this;return e.className="ValueAxisDataItem",e.values.value={},e.values.endValue={},e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"value",{get:function(){return this.values.value.value},set:function(e){this.setValue("value",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endValue",{get:function(){return this.values.endValue.value},set:function(e){this.setValue("endValue",e)},enumerable:!0,configurable:!0}),i}(Ji),ee=function(s){function i(){var e=s.call(this)||this;return e._stepDecimalPlaces=0,e._prevStepDecimalPlaces=0,e._adjustLabelPrecision=!0,e._baseValue=0,e._adjustedStart=0,e._adjustedEnd=1,e._extremesChanged=!1,e._deltaMinMax=1,e._dsc=!1,e.calculateTotals=!1,e.className="ValueAxis",e.axisFieldName="value",e.setPropertyValue("maxZoomFactor",1e3),e.setPropertyValue("extraMin",0),e.setPropertyValue("extraMax",0),e.setPropertyValue("strictMinMax",!1),e.setPropertyValue("maxPrecision",Number.MAX_VALUE),e.setPropertyValue("adjustLabelPrecision",!0),e.setPropertyValue("extraTooltipPrecision",0),e.keepSelection=!1,e.includeRangesInMinMax=!1,e.applyTheme(),e}return w(i,s),i.prototype.fillRule=function(e){var t=e.value,n=e.component;e.axisFill.disabled||(V(t/n.step/2,5)==Math.round(t/n.step/2)?e.axisFill.__disabled=!0:e.axisFill.__disabled=!1)},i.prototype.createDataItem=function(){return new Zn},i.prototype.createAxisBreak=function(){return new Jr},i.prototype.dataChangeUpdate=function(){this.clearCache(),this.keepSelection?(this._start!=0&&this.dispatchImmediately("startchanged"),this._end!=1&&this.dispatchImmediately("endchanged"),this._start==0&&this._end==1||this.dispatchImmediately("startendchanged")):this._start==0&&this._end==1||(this._start=0,this._end=1,this.dispatchImmediately("startendchanged")),this._maxZoomed=this._maxDefined,this._minZoomed=this._minDefined,this._maxAdjusted=this._maxDefined,this._minAdjusted=this._minDefined},i.prototype.processSeriesDataItems=function(){if(this.calculateTotals){var e=this.series.getIndex(0),t=e.startIndex;if(e.dataItems.length>0){t>0&&t--;var n=e.endIndex;n<e.dataItems.length&&n++;for(var r=function(l){var h={},p={};a.series.each(function(u){if(!u.excludeFromTotal){var d=u.dataItems.getIndex(l);d&&X(d.values,function(c){var f=d.values[c].workingValue;y(f)&&(y(h[c])?h[c]+=Math.abs(f):h[c]=Math.abs(f),y(p[c])?p[c]+=f:p[c]=f)})}}),a.series.each(function(u){if(!u.excludeFromTotal){var d=u.dataItems.getIndex(l);d&&X(d.values,function(c){var f=d.values[c].workingValue;y(f)&&(d.setCalculatedValue(c,h[c],"total"),d.setCalculatedValue(c,100*f/h[c],"totalPercent"),d.setCalculatedValue(c,p[c],"sum"))})}})},a=this,o=t;o<n;++o)r(o)}}},i.prototype.validate=function(){this.axisLength<=0||(s.prototype.validate.call(this),this.getMinMax(),y(this._minAdjusted)||this.dataItems.each(function(e){e.value=null}),this.fixAxisBreaks(),this.calculateZoom(),this.validateAxisElements(),this.validateAxisRanges(),this.validateBreaks(),this.hideUnusedDataItems(),this.renderer.invalidateLayout())},i.prototype.calculateZoom=function(){if(y(this.min)&&y(this.max)){var e=this.positionToValue(this.start),t=this.positionToValue(this.end),n=this.adjustDifference(e,t),r=this.adjustMinMax(e,t,n,this._gridCount,!0),a=ah(r.step);this._stepDecimalPlaces=a,e=V(e,a),t=V(t,a);var o=(r=this.adjustMinMax(e,t,n,this._gridCount,!0)).step;if(this.syncWithAxis){var l=this.getCache(e+"-"+t);y(l)&&(o=l)}else e=r.min,t=r.max;(this._minZoomed!=e||this._maxZoomed!=t||this._step!=o||this._dsc)&&(this._dsc=!1,this._minZoomed=e,this._maxZoomed=t,this._step=o,this.dispatchImmediately("selectionextremeschanged"))}},i.prototype.fixSmallStep=function(e){return 1+e==1?(e*=2,this.fixSmallStep(e)):e},i.prototype.validateAxisElements=function(){var e=this;if(y(this.max)&&y(this.min)){var t=this.minZoomed-2*this._step;this.logarithmic?Math.log(this.max)*Math.LOG10E-Math.log(this.min)*Math.LOG10E>1?t=Math.pow(10,Math.log(this.min)*Math.LOG10E):(t=Math.floor(this.minZoomed/this._step)*this._step)==0&&(t=this.minZoomed):t=Math.floor(t/this._step)*this._step;var n=this._maxZoomed+this._step;this.resetIterators();var r=this._dataItemsIterator;if(this._step==0)return;this._step=this.fixSmallStep(this._step);var a=0,o=this._prevStepDecimalPlaces!=this._stepDecimalPlaces;for(this._prevStepDecimalPlaces=this._stepDecimalPlaces;t<=n;){if(!this.isInBreak(t)){var l=r.find(function(f){return f.value===t});l.__disabled&&(l.__disabled=!1),this.appendDataItem(l),l.axisBreak=void 0,(l.value!=t||o)&&(l.value=t,l.text=this.formatLabel(t),l.label&&l.label.invalid&&l.label.validate(),l.value>=this.min&&l.value<=this.max&&l.label&&(this.axisLetter=="Y"&&l.label.measuredWidth>this.ghostLabel.measuredWidth||this.axisLetter=="X"&&l.label.measuredHeight>this.ghostLabel.measuredHeight)&&(this.ghostLabel.text=l.label.currentText,this.ghostLabel.validate())),this.validateDataElement(l)}a++;var h=t;this.logarithmic&&Math.log(this.max)*Math.LOG10E-Math.log(this.min)*Math.LOG10E>1?t=Math.pow(10,Math.log(this.min)*Math.LOG10E+a):t+=this._step;var p=Math.pow(10,Math.floor(Math.log(Math.abs(this._step))*Math.LOG10E));if(p<1){var u=Math.round(Math.abs(Math.log(Math.abs(p))*Math.LOG10E))+2;if(u=Math.min(13,u),h==(t=V(t,u))){t=n;break}}}var d=this._axisBreaks;if(d){var c=this.renderer;A(d.iterator(),function(f){if(f.breakSize>0&&oe(f.startPoint,f.endPoint)>c.minGridDistance)for(var g=f.adjustedMin;g<=f.adjustedMax;){if(g>=f.adjustedStartValue&&g<=f.adjustedEndValue){var m=r.find(function(x){return x.value===g});m.__disabled&&(m.__disabled=!1),e.appendDataItem(m),m.axisBreak=f,m.value!=g&&(m.value=g,m.text=e.formatLabel(g),m.label&&m.label.invalid&&m.label.validate()),e.validateDataElement(m)}g+=f.adjustedStep}})}}},i.prototype.validateDataElement=function(e){s.prototype.validateDataElement.call(this,e),e.itemIndex=this._axisItemCount,this._axisItemCount++;var t=this.renderer,n=e.value,r=e.endValue,a=this.valueToPosition(n);e.position=a;var o=a,l=this.valueToPosition(n+this._step);y(r)&&(l=o=this.valueToPosition(r)),e.point=t.positionToPoint(a);var h=e.tick;h&&!h.disabled&&t.updateTickElement(h,a,o);var p=e.grid;p&&!p.disabled&&t.updateGridElement(p,a,o);var u=e.label;u&&!u.disabled&&t.updateLabelElement(u,a,o);var d=e.axisFill;d&&!d.disabled&&(t.updateFillElement(d,a,l),e.isRange||this.fillRule(e)),e.bullet&&t.updateBullet(e.bullet,a,o);var c=e.mask;c&&t.updateFillElement(c,a,l)},i.prototype.formatLabel=function(e){return this.adjustLabelPrecision&&e!=0?this.numberFormatter.format(e,void 0,this._stepDecimalPlaces):this.numberFormatter.format(e)},Object.defineProperty(i.prototype,"basePoint",{get:function(){var e=this.baseValue,t=this.valueToPosition(e);return this.renderer.positionToPoint(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"baseValue",{get:function(){var e=this._baseValue;return this.logarithmic&&(e=this.min),this._adapterO?this._adapterO.apply("baseValue",e):e},set:function(e){this._baseValue=e,this.invalidateLayout(),this.invalidateSeries()},enumerable:!0,configurable:!0}),i.prototype.anyToPosition=function(e){return this.valueToPosition(e)},i.prototype.valueToPoint=function(e){var t=this.valueToPosition(e),n=this.renderer.positionToPoint(t),r=this.renderer.positionToAngle(t);return{x:n.x,y:n.y,angle:r}},i.prototype.anyToPoint=function(e){return this.valueToPoint(e)},i.prototype.valueToPosition=function(e){if(y(e)){var t=this.min,n=this.max;if(y(t)&&y(n)){var r=this._difference,a=this._axisBreaks;a&&a.length>0&&rt(a.iterator(),function(h){var p=h.adjustedStartValue,u=h.adjustedEndValue;if(y(p)&&y(u)){if(e<p)return!1;if(on({start:p,end:u},{start:t,end:n})){p=Math.max(p,t),u=Math.min(u,n);var d=h.breakSize;e>u?t+=(u-p)*(1-d):e<p||(e=p+(e-p)*d)}}return!0});var o=void 0;if(this.logarithmic){var l=this.treatZeroAs;y(l)&&e<=l&&(e=l),o=(Math.log(e)*Math.LOG10E-Math.log(this.min)*Math.LOG10E)/(Math.log(this.max)*Math.LOG10E-Math.log(this.min)*Math.LOG10E)}else o=(e-t)/r;return o}}return 0},i.prototype.invalidateLabels=function(){s.prototype.invalidateLabels.call(this),this.dataItems&&(this.dataItems.each(function(e){e.value=void 0}),this.invalidate())},i.prototype.positionToValue=function(e){var t=this.min,n=this.max;if(y(t)&&y(n)){var r=n-t,a=null,o=this._axisBreaks;return o&&o.length>0&&rt(o.iterator(),function(l){var h=l.startPosition,p=l.endPosition,u=l.adjustedStartValue,d=l.adjustedEndValue;if(y(u)&&y(d)){if(u>n)return!1;if(on({start:u,end:d},{start:t,end:n})){u=q(u,t),d=ie(d,n);var c=l.breakSize;if(r-=(d-u)*(1-c),e>p)t+=(d-u)*(1-c);else if(!(e<h))return a=u+(e-h)/(p-h)*(d-u),!1}return!0}}),y(a)||(a=this.logarithmic?Math.pow(Math.E,(e*(Math.log(this.max)*Math.LOG10E-Math.log(this.min)*Math.LOG10E)+Math.log(this.min)*Math.LOG10E)/Math.LOG10E):e*r+t),a}},i.prototype.xToValue=function(e){return this.positionToValue(this.pointToPosition({x:e,y:0}))},i.prototype.yToValue=function(e){return this.positionToValue(this.pointToPosition({x:0,y:e}))},i.prototype.pointToPosition=function(e){return this.renderer instanceof mt?1-this.renderer.pointToPosition(e):this.renderer.pointToPosition(e)},i.prototype.animateMinMax=function(e,t){return this.animate([{property:"_minAdjusted",from:this._minAdjusted,to:e},{property:"_maxAdjusted",from:this._maxAdjusted,to:t}],this.rangeChangeDuration,this.rangeChangeEasing)},i.prototype.getMinMax=function(){var e=this;this.updateGridCount();var t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;if(y(this._minDefined)&&y(this._maxDefined)||(this.series.each(function(d){if(!d.ignoreMinMax){var c=d.min(e);y(c)&&c<t&&(t=c);var f=d.max(e);y(f)&&f>n&&(n=f)}}),this.includeRangesInMinMax&&this.axisRanges.each(function(d){if(!d.ignoreMinMax){var c=ie(d.value,d.endValue),f=q(d.value,d.endValue);(c<t||!y(t))&&(t=c),(f>n||!y(n))&&(n=f)}})),this.logarithmic){var r=this.treatZeroAs;y(r)&&t<=0&&(t=r),t<=0&&this.raiseCriticalError(new Error("Logarithmic value axis can not have values <= 0."),!0)}if(t==0&&n==0&&(n=.9,t=-.9),y(this._minDefined)&&(t=this._minDefined),y(this._maxDefined)&&(n=this._maxDefined),this._adapterO&&(t=this._adapterO.apply("min",t)),this._adapterO&&(n=this._adapterO.apply("max",n)),y(t)&&y(n)){this._minReal=t,this._maxReal=n,t==Number.POSITIVE_INFINITY&&(t=void 0),n==Number.NEGATIVE_INFINITY&&(n=void 0);var a=this.adjustDifference(t,n);if(t=this.fixMin(t),(n=this.fixMax(n))-t<=1/Math.pow(10,15)){if(n-t!=0)this._deltaMinMax=(n-t)/2;else{var o=Math.log(Math.abs(n))*Math.LOG10E,l=Math.pow(10,Math.floor(o));l/=10,this._deltaMinMax=l}t-=this._deltaMinMax,n+=this._deltaMinMax}t-=(n-t)*this.extraMin,n+=(n-t)*this.extraMax;var h=this.strictMinMax;y(this._maxDefined)&&(h=!0);var p=this.adjustMinMax(t,n,a,this._gridCount,h);if(t=p.min,a=(n=p.max)-t,p=this.adjustMinMax(t,n,n-t,this._gridCount,!0),t=p.min,n=p.max,this.strictMinMax&&(t=y(this._minDefined)?this._minDefined:this._minReal,(n=y(this._maxDefined)?this._maxDefined:this._maxReal)-t<=1e-8&&(t-=this._deltaMinMax,n+=this._deltaMinMax),t-=(n-t)*this.extraMin,n+=(n-t)*this.extraMax),this._adapterO&&(t=this._adapterO.apply("min",t)),this._adapterO&&(n=this._adapterO.apply("max",n)),this._step=p.step,y(t)||y(n)||(this.start=0,this.end=1,this.renderer.labels.each(function(d){d.dataItem.text=""})),(this._minAdjusted!=t||this._maxAdjusted!=n)&&y(t)&&y(n)){var u=this._minMaxAnimation;if(this._extremesChanged&&y(this._minAdjusted)&&y(this._maxAdjusted)&&this.inited){if(u&&!u.isFinished()&&this._finalMax==n&&this._finalMin==t)return;this._finalMin=t,this._finalMax=n,(u=this.animateMinMax(t,n))&&!u.isFinished()?(u.events.on("animationprogress",this.validateDataItems,this),u.events.on("animationended",function(){e.series.each(function(d){d.validate()}),e.validateDataItems(),e.handleSelectionExtremesChange()}),this._minMaxAnimation=u):this.series.each(function(d){d.invalidate()}),this.validateDataItems(),this.dispatchImmediately("extremeschanged"),this.handleSelectionExtremesChange()}else{if(u&&!u.isFinished()&&this._finalMax==n&&this._finalMin==t)return;this._minAdjusted=t,this._maxAdjusted=n,this._finalMin=t,this._finalMax=n,this.invalidateDataItems(),this.dispatchImmediately("extremeschanged")}}this._extremesChanged=!1,this._difference=this.adjustDifference(t,n)}},i.prototype.fixMin=function(e){return e},i.prototype.fixMax=function(e){return e},i.prototype.adjustMinMax=function(e,t,n,r,a){r<=1&&(r=1),r=Math.round(r);var o=e,l=t;n===0&&(n=Math.abs(t));var h=Math.log(Math.abs(n))*Math.LOG10E,p=Math.pow(10,Math.floor(h)),u=p/=10;a&&(u=0),this.logarithmic?(e<=0&&(e=this.baseValue),e==1/0&&(e=1),t==-1/0&&(t=10),this.strictMinMax?(this._minDefined>0&&(e=this._minDefined),this._maxDefined):(e=Math.pow(10,Math.floor(Math.log(Math.abs(e))*Math.LOG10E)),t=Math.pow(10,Math.ceil(Math.log(Math.abs(t))*Math.LOG10E)))):(a?(e=Math.floor(e/p)*p,t=Math.ceil(t/p)*p):(e=Math.ceil(e/p)*p-u,t=Math.floor(t/p)*p+u),e<0&&o>=0&&(e=0),t>0&&l<=0&&(t=0)),h=Math.log(Math.abs(n))*Math.LOG10E,p=Math.pow(10,Math.floor(h)),p/=10;var d=Math.ceil(n/r/p)*p,c=Math.pow(10,Math.floor(Math.log(Math.abs(d))*Math.LOG10E)),f=Math.ceil(d/c);f>5?f=10:f<=5&&f>2&&(f=5),d=Math.ceil(d/(c*f))*c*f,this.maxPrecision<Number.MAX_VALUE&&d!=Ns(d,this.maxPrecision)&&(d=Ns(d,this.maxPrecision));var g=0;if(c<1&&(d=V(d,g=Math.round(Math.abs(Math.log(Math.abs(c))*Math.LOG10E))+1)),!this.logarithmic){var m=Math.floor(e/d);e=V(d*m,g);var x=void 0;(x=a?Math.floor(t/d):Math.ceil(t/d))==m&&x++,(t=V(d*x,g))<l&&(t+=d),e>o&&(e-=d)}return{min:e,max:t,step:d}},Object.defineProperty(i.prototype,"min",{get:function(){var e=this._minAdjusted;return y(e)||(e=this._minDefined),e},set:function(e){this._minDefined!=e&&(this._minDefined=e,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minDefined",{get:function(){return this._minDefined},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxDefined",{get:function(){return this._maxDefined},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"extraMin",{get:function(){return this.getPropertyValue("extraMin")},set:function(e){this.setPropertyValue("extraMin",e)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"extraMax",{get:function(){return this.getPropertyValue("extraMax")},set:function(e){this.setPropertyValue("extraMax",e)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"step",{get:function(){return this._step},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"max",{get:function(){var e=this._maxAdjusted;return y(e)||(e=this._maxDefined),e},set:function(e){this._maxDefined!=e&&(this._maxDefined=e,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"adjustLabelPrecision",{get:function(){return this.getPropertyValue("adjustLabelPrecision")},set:function(e){this.setPropertyValue("adjustLabelPrecision",e)&&this.invalidate()},enumerable:!0,configurable:!0}),i.prototype.registerSeries=function(e){return new _e([s.prototype.registerSeries.call(this,e),e.events.on("extremeschanged",this.handleExtremesChange,this,!1),e.events.on("selectionextremeschanged",this.handleSelectionExtremesChange,this,!1),this.events.on("extremeschanged",e.invalidate,e,!1)])},i.prototype.handleSelectionExtremesChange=function(){var e,t,n=this,r=!0;if(A(this.series.iterator(),function(c){if(!c.ignoreMinMax&&!c.isHidden&&!c.outOfRange){c.visible&&!c.isHiding&&(r=!1);var f=c.selectionMin(n),g=c.selectionMax(n);y(f)&&(!y(e)||f<e)&&(e=f),y(g)&&(!y(t)||g>t)&&(t=g)}}),this.includeRangesInMinMax&&this.axisRanges.each(function(c){if(!c.ignoreMinMax){var f=ie(c.value,c.endValue),g=q(c.value,c.endValue);f<e&&(e=f),g>t&&(t=g)}}),y(this._minDefined)?e=this.strictMinMax?this._minDefined:this.min:this.strictMinMax&&(e=this._minReal),y(this._maxDefined)?t=this.strictMinMax?this._maxDefined:this.max:this.strictMinMax&&(t=this._maxReal),e==t){e-=this._deltaMinMax,t+=this._deltaMinMax;var a=this.adjustMinMax(e,t,0,this._gridCount,this.strictMinMax);e=a.min,t=a.max}var o=this.adjustDifference(e,t),l=this.adjustMinMax(e,t,o,this._gridCount);e=l.min,t=l.max,e-=(t-e)*this.extraMin,t+=(t-e)*this.extraMax,e=R(e,this.min,this.max),t=R(t,this.min,this.max),o=this.adjustDifference(e,t),l=this.adjustMinMax(e,t,o,this._gridCount,!0),e=l.min,t=l.max,this.strictMinMax&&(e=q(e,this._minDefined),t=ie(t,this._maxDefined));var h=l.step;this.syncWithAxis&&(l=this.syncAxes(e,t,h),e=l.min,t=l.max,this.invalidate()),h=l.step,this._difference=this.adjustDifference(this.min,this.max);var p=this.valueToPosition(e),u=this.valueToPosition(t);r&&!this.syncWithAxis&&(p=0,u=1);var d=0;this.syncWithAxis?(d=5,this.setCache(e+"-"+t,h)):(this._step==h&&this._minZoomed==e&&this._maxZoomed==t||(this._dsc=!0),this._step=h,this._minZoomed=e,this._maxZoomed=t),this.keepSelection||this.zoom({start:p,end:u},!1,!1,d)},Object.defineProperty(i.prototype,"strictMinMax",{get:function(){return this.getPropertyValue("strictMinMax")},set:function(e){this.setPropertyValue("strictMinMax",e)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"logarithmic",{get:function(){return this.getPropertyValue("logarithmic")},set:function(e){this.setPropertyValue("logarithmic",e)&&(this.invalidate(),this.series.each(function(t){t.invalidateDataItems()}))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"keepSelection",{get:function(){return this.getPropertyValue("keepSelection")},set:function(e){this.setPropertyValue("keepSelection",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"includeRangesInMinMax",{get:function(){return this.getPropertyValue("includeRangesInMinMax")},set:function(e){this.setPropertyValue("includeRangesInMinMax",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxPrecision",{get:function(){return this.getPropertyValue("maxPrecision")},set:function(e){this.setPropertyValue("maxPrecision",e)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"extraTooltipPrecision",{get:function(){return this.getPropertyValue("extraTooltipPrecision")},set:function(e){this.setPropertyValue("extraTooltipPrecision",e)&&this.invalidate()},enumerable:!0,configurable:!0}),i.prototype.handleExtremesChange=function(){var e=this;this._extremesChanged=!0,this.getMinMax(),this.ghostLabel&&this.dataItems.each(function(t){t.label&&t.label.pixelWidth>0&&(e.ghostLabel.text=t.label.currentText)})},i.prototype.getX=function(e,t,n,r,a){return this.renderer.positionToPoint(this.getPositionX(e,t,n,r,a)).x},i.prototype.getPositionX=function(e,t,n,r,a){var o=e.getWorkingValue(t);v(r)||(r="valueX");var l=e.getValue(r,"stack");y(o)||(o=this.baseValue,this.logarithmic&&l>0&&(o=0));var h=this.valueToPosition(o+l);return a&&(h=R(h,a.start,a.end)),h},i.prototype.getY=function(e,t,n,r,a){return this.renderer.positionToPoint(this.getPositionY(e,t,n,r,a)).y},i.prototype.getPositionY=function(e,t,n,r,a){var o=e.getWorkingValue(t);v(r)||(r="valueY");var l=e.getValue(r,"stack");y(o)||(o=this.baseValue,this.logarithmic&&l>0&&(o=0));var h=this.valueToPosition(o+l);return a&&(h=R(h,a.start,a.end)),h},i.prototype.getAngle=function(e,t,n,r,a){var o=e.getWorkingValue(t),l=e.getValue(r,"stack");y(o)||(o=this.baseValue);var h=this.valueToPosition(o+l);return a&&(h=R(h,a.start,a.end)),this.positionToAngle(h)},i.prototype.getAnyRangePath=function(e,t,n){var r=this.valueToPosition(e),a=this.valueToPosition(t);return this.getPositionRangePath(r,a)},i.prototype.getTooltipText=function(e){var t=V(this.positionToValue(e),this._stepDecimalPlaces+this.extraTooltipPrecision),n=this.tooltip.numberFormatter.format(t);return this._adapterO?this._adapterO.apply("getTooltipText",n):n},i.prototype.zoomToValues=function(e,t,n,r){var a=(e-this.min)/(this.max-this.min),o=(t-this.min)/(this.max-this.min);this.zoom({start:a,end:o},n,r)},Object.defineProperty(i.prototype,"minZoomed",{get:function(){return this.syncWithAxis?this._minZoomed:q(this.min,this._minZoomed)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxZoomed",{get:function(){return this.syncWithAxis?this._maxZoomed:ie(this.max,this._maxZoomed)},enumerable:!0,configurable:!0}),i.prototype.fixAxisBreaks=function(){var e=this;s.prototype.fixAxisBreaks.call(this);var t=this._axisBreaks;t&&t.length>0&&t.each(function(n){var r=n.adjustedStartValue,a=n.adjustedEndValue,o=a-r,l=Math.ceil(o*n.breakSize)*e._gridCount/(e.max-e.min),h=e.adjustMinMax(r,a,o,l,!0);n.adjustedStep=h.step,n.adjustedMin=h.min,n.adjustedMax=h.max}),this._difference=this.adjustDifference(this.min,this.max)},i.prototype.getPositionLabel=function(e){var t=this.positionToValue(e);return this.numberFormatter.format(t)},i.prototype.showTooltipAt=function(e){this.showTooltipAtPosition(this.valueToPosition(e))},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.min=e.min,this.max=e.max,this.calculateTotals=e.calculateTotals,this._baseValue=e.baseValue},Object.defineProperty(i.prototype,"syncWithAxis",{get:function(){return this.getPropertyValue("syncWithAxis")},set:function(e){var t=this;this.setPropertyValue("syncWithAxis",e,!0)&&e&&(this._disposers.push(e.events.on("extremeschanged",this.handleSelectionExtremesChange,this,!1)),this._disposers.push(e.events.on("selectionextremeschanged",this.handleSelectionExtremesChange,this,!1)),this._disposers.push(e.events.on("startendchanged",this.handleSelectionExtremesChange,this,!1)),this.events.on("shown",this.handleSelectionExtremesChange,this,!1),this.events.on("maxsizechanged",function(){t.clearCache(),t._disposers.push(_.events.once("exitframe",function(){t.handleSelectionExtremesChange()}))},this,!1))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"treatZeroAs",{get:function(){return this.getPropertyValue("treatZeroAs")},set:function(e){this.setPropertyValue("treatZeroAs",e,!0)},enumerable:!0,configurable:!0}),i.prototype.syncAxes=function(e,t,n){var r=this.syncWithAxis;if(r){y(e)||(e=this.min),y(t)||(t=this.max),y(n)||(n=this._step);var a=Math.round((r.maxZoomed-r.minZoomed)/r.step),o=Math.round((t-e)/n);if(y(a)&&y(o))for(var l=!1,h=0,p=.01*(t-e),u=e,d=t,c=n;l!=1;)if(l=this.checkSync(u,d,c,a),++h>1e3&&(l=!0),l)e=u,t=d,n=c;else{h/3==Math.round(h/3)?(u=e-p*h,e>=0&&u<0&&(u=0)):(d=t+p*h)<=0&&d>0&&(d=0);var f=this.adjustMinMax(u,d,d-u,this._gridCount,!0);u=f.min,d=f.max,c=f.step}}return{min:e,max:t,step:n}},i.prototype.checkSync=function(e,t,n,r){for(var a=(t-e)/n,o=1;o<r;o++)if(V(a/o,1)==r||a*o==r)return!0;return!1},i.prototype.processConfig=function(e){e&&v(e.syncWithAxis)&&J(e.syncWithAxis)&&(this.map.hasKey(e.syncWithAxis)?e.syncWithAxis=this.map.getKey(e.syncWithAxis):(this.processingErrors.push('[ValueAxis] No axis with id "'+e.syncWithAxis+'" found for `syncWithAxis`'),delete e.xAxis)),s.prototype.processConfig.call(this,e)},i}(Gn);_.registeredClasses.ValueAxis=ee,_.registeredClasses.ValueAxisDataItem=Zn;var co=function(s){function i(){var e=s.call(this)||this;return e.className="DateAxisBreak",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"startDate",{get:function(){return this.getPropertyValue("startDate")},set:function(e){this.setPropertyValue("startDate",e)&&(this.startValue=e.getTime(),this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endDate",{get:function(){return this.getPropertyValue("endDate")},set:function(e){this.setPropertyValue("endDate",e)&&(this.endValue=e.getTime(),this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries()))},enumerable:!0,configurable:!0}),i}(Jr);_.registeredClasses.DateAxisBreak=co;var fo=function(s){function i(){var e=s.call(this)||this;return e.className="DateAxisDataItem",e.applyTheme(),e.values.date={},e.values.endDate={},e}return w(i,s),Object.defineProperty(i.prototype,"date",{get:function(){return this.dates.date},set:function(e){this.setDate("date",e),this.value=e.getTime()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endDate",{get:function(){return this.dates.endDate},set:function(e){this.setDate("endDate",e),this.endValue=e.getTime()},enumerable:!0,configurable:!0}),i}(Zn),Pe=function(s){function i(){var e=s.call(this)||this;return e._gapBreaks=!1,e.gridIntervals=new re,e.groupIntervals=new re,e.dateFormats=new me,e.periodChangeDateFormats=new me,e._baseIntervalReal={timeUnit:"day",count:1},e._prevSeriesTime={},e._minDifference={},e._firstWeekDay=1,e.groupMin={},e.groupMax={},e.className="DateAxis",e.setPropertyValue("markUnitChange",!0),e.snapTooltip=!0,e.tooltipPosition="pointer",e.setPropertyValue("groupData",!1),e.groupCount=200,e.events.on("parentset",e.getDFFormatter,e,!1),e.gridIntervals.pushAll([{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:5},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:50},{timeUnit:"millisecond",count:100},{timeUnit:"millisecond",count:500},{timeUnit:"second",count:1},{timeUnit:"second",count:5},{timeUnit:"second",count:10},{timeUnit:"second",count:30},{timeUnit:"minute",count:1},{timeUnit:"minute",count:5},{timeUnit:"minute",count:10},{timeUnit:"minute",count:15},{timeUnit:"minute",count:30},{timeUnit:"hour",count:1},{timeUnit:"hour",count:3},{timeUnit:"hour",count:6},{timeUnit:"hour",count:12},{timeUnit:"day",count:1},{timeUnit:"day",count:2},{timeUnit:"day",count:3},{timeUnit:"day",count:4},{timeUnit:"day",count:5},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"month",count:2},{timeUnit:"month",count:3},{timeUnit:"month",count:6},{timeUnit:"year",count:1},{timeUnit:"year",count:2},{timeUnit:"year",count:5},{timeUnit:"year",count:10},{timeUnit:"year",count:50},{timeUnit:"year",count:100},{timeUnit:"year",count:200},{timeUnit:"year",count:500},{timeUnit:"year",count:1e3},{timeUnit:"year",count:2e3},{timeUnit:"year",count:5e3},{timeUnit:"year",count:1e4},{timeUnit:"year",count:1e5}]),e.groupIntervals.pushAll([{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:100},{timeUnit:"second",count:1},{timeUnit:"second",count:10},{timeUnit:"minute",count:1},{timeUnit:"minute",count:10},{timeUnit:"hour",count:1},{timeUnit:"day",count:1},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"year",count:1}]),e.axisFieldName="date",e.applyTheme(),e}return w(i,s),i.prototype.fillRule=function(e){var t=e.value,n=e.component,r=n._gridInterval,a=Se(r.timeUnit,r.count);Math.round((t-n.min)/a)/2==Math.round(Math.round((t-n.min)/a)/2)?e.axisFill.__disabled=!0:e.axisFill.__disabled=!1},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),this.dateFormats.hasKey("millisecond")||this.dateFormats.setKey("millisecond",this.language.translate("_date_millisecond")),this.dateFormats.hasKey("second")||this.dateFormats.setKey("second",this.language.translate("_date_second")),this.dateFormats.hasKey("minute")||this.dateFormats.setKey("minute",this.language.translate("_date_minute")),this.dateFormats.hasKey("hour")||this.dateFormats.setKey("hour",this.language.translate("_date_hour")),this.dateFormats.hasKey("day")||this.dateFormats.setKey("day",this.language.translate("_date_day")),this.dateFormats.hasKey("week")||this.dateFormats.setKey("week",this.language.translate("_date_day")),this.dateFormats.hasKey("month")||this.dateFormats.setKey("month",this.language.translate("_date_month")),this.dateFormats.hasKey("year")||this.dateFormats.setKey("year",this.language.translate("_date_year")),this.periodChangeDateFormats.hasKey("millisecond")||this.periodChangeDateFormats.setKey("millisecond",this.language.translate("_date_millisecond")),this.periodChangeDateFormats.hasKey("second")||this.periodChangeDateFormats.setKey("second",this.language.translate("_date_second")),this.periodChangeDateFormats.hasKey("minute")||this.periodChangeDateFormats.setKey("minute",this.language.translate("_date_minute")),this.periodChangeDateFormats.hasKey("hour")||this.periodChangeDateFormats.setKey("hour",this.language.translate("_date_day")),this.periodChangeDateFormats.hasKey("day")||this.periodChangeDateFormats.setKey("day",this.language.translate("_date_day")),this.periodChangeDateFormats.hasKey("week")||this.periodChangeDateFormats.setKey("week",this.language.translate("_date_day")),this.periodChangeDateFormats.hasKey("month")||this.periodChangeDateFormats.setKey("month",this.language.translate("_date_month")+" "+this.language.translate("_date_year"))},i.prototype.createDataItem=function(){return new fo},i.prototype.createAxisBreak=function(){return new co},i.prototype.validateDataItems=function(){var e=this.start,t=this.end,n=this.baseDuration,r=(this.max-this.min)/n;this._firstWeekDay=this.getFirstWeekDay(),this.getDFFormatter(),s.prototype.validateDataItems.call(this);var a=Se(this.mainBaseInterval.timeUnit,this.mainBaseInterval.count);this.maxZoomFactor=Math.max(1,(this.max-this.min)/a),this._deltaMinMax=this.baseDuration/2,e+=(t-e)*(1-r/((this.max-this.min)/n)),this.zoom({start:e,end:t},!1,!0)},i.prototype.handleSelectionExtremesChange=function(){},i.prototype.calculateZoom=function(){var e=this;s.prototype.calculateZoom.call(this);var t=this.adjustDifference(this._minZoomed,this._maxZoomed),n=!1;if(this.groupData&&v(t)){var r=this.mainBaseInterval,a=t+(this.startLocation+(1-this.endLocation))*this.baseDuration,o=void 0;this.groupInterval?o=ct({},this.groupInterval):Se((o=this.chooseInterval(0,a,this.groupCount,this.groupIntervals)).timeUnit,o.count)<Se(r.timeUnit,r.count)&&(o=ct({},r)),this._groupInterval=o;var l=o.timeUnit+o.count;this._currentDataSetId!=l&&(this._currentDataSetId=l,this.dispatch("groupperiodchanged")),this.series.each(function(p){p.baseAxis==e&&p.setDataSet(e._currentDataSetId)&&(n=!0)})}var h=this.chooseInterval(0,t,this._gridCount);Se(h.timeUnit,h.count)<this.baseDuration&&(h=ct({},this.baseInterval)),this._gridInterval=h,this._nextGridUnit=Ma(h.timeUnit),this._intervalDuration=Se(h.timeUnit,h.count),this._gridDate=Be(new Date(this.minZoomed-Se(h.timeUnit,h.count)),h.timeUnit,h.count,this._firstWeekDay,this._df.utc,new Date(this.min),this._df.timezoneMinutes,this._df.timezone),A(this.series.iterator(),function(p){if(p.baseAxis==e){var u=p.getAxisField(e),d=Be(new Date(e._minZoomed+.05*e.baseDuration),e.baseInterval.timeUnit,e.baseInterval.count,e._firstWeekDay,e._df.utc,void 0,e._df.timezoneMinutes,e._df.timezone).getTime(),c=d.toString(),f=p.dataItemsByAxis.getKey(e.uid).getKey(c+p.currentDataSetId),g=0;e.start!=0&&(g=f?(f=e.findFirst(f,d,u)).index:p.dataItems.findClosestIndex(e._minZoomed,function(P){return P[u]},"left"));var m=e.baseInterval,x=Ze(Be(new Date(e._maxZoomed),m.timeUnit,m.count,e._firstWeekDay,e._df.utc,void 0,e._df.timezoneMinutes,e._df.timezone),m.timeUnit,m.count,e._df.utc).getTime(),b=x.toString(),C=p.dataItemsByAxis.getKey(e.uid).getKey(b+p.currentDataSetId),S=p.dataItems.length;e.end!=1&&(C?S=C.index:(x-=1,S=p.dataItems.findClosestIndex(x,function(P){return P[u]},"right"),S++)),p.max(e)<d?(p.startIndex=p.dataItems.length,p.endIndex=p.dataItems.length,p.outOfRange=!0):p.min(e)>x?(p.startIndex=0,p.endIndex=0,p.outOfRange=!0):(p.outOfRange=!1,p.startIndex=g,p.endIndex=S),!n&&p.dataRangeInvalid&&p.validateDataRange()}})},i.prototype.findFirst=function(e,t,n){var r=e.index;if(r>0){var a=e.component.dataItems.getIndex(r-1),o=a[n];return!o||o.getTime()<t?e:this.findFirst(a,t,n)}return e},i.prototype.validateData=function(){s.prototype.validateData.call(this),y(this.baseInterval.count)||(this.baseInterval.count=1)},Object.defineProperty(i.prototype,"minDifference",{get:function(){var e=this,t=Number.MAX_VALUE;return this.series.each(function(n){t>e._minDifference[n.uid]&&(t=e._minDifference[n.uid])}),t!=Number.MAX_VALUE&&t!=0||(t=Se("day")),t},enumerable:!0,configurable:!0}),i.prototype.seriesDataChangeUpdate=function(e){this._minDifference[e.uid]=Number.MAX_VALUE},i.prototype.postProcessSeriesDataItems=function(e){var t=this;this._firstWeekDay=this.getFirstWeekDay(),e?this.seriesGroupUpdate(e):this.series.each(function(n){t.seriesGroupUpdate(n)}),this.addEmptyUnitsBreaks()},i.prototype.seriesGroupUpdate=function(e){var t=this;JSON.stringify(e._baseInterval[this.uid])!=JSON.stringify(this.mainBaseInterval)&&(e._baseInterval[this.uid]=this.mainBaseInterval,e.mainDataSet.each(function(n){t.postProcessSeriesDataItem(n)}),this.groupData&&this.groupSeriesData(e))},i.prototype.groupSeriesData=function(e){var t=this;if(e.baseAxis==this&&e.dataItems.length>0&&!e.dataGrouped){e.bulletsContainer.removeChildren();var n=[],r=this.mainBaseInterval,a=Se(r.timeUnit,r.count);this.groupIntervals.each(function(o){var l=Se(o.timeUnit,o.count);(l>a&&l<t.max-t.min||t.groupInterval)&&n.push(o)}),e._dataSets&&(e._dataSets.each(function(o,l){l.each(function(h){h.dispose()}),l.clear()}),e._dataSets.clear()),e.dataGrouped=!0,j(n,function(o){var l="date"+t.axisLetter,h=o.timeUnit+o.count,p=new yn(e.mainDataSet.template.clone());e.dataSets.setKey(h,p);var u,d,c=e.mainDataSet,f=Number.NEGATIVE_INFINITY,g=0,m=[];X(e.dataFields,function(x,b){var C=x;C!=l&&C.indexOf("Show")==-1&&m.push(C)}),c.each(function(x){var b=x.getDate(l);if(b){var C=b.getTime(),S=(d=Be(new Date(C),o.timeUnit,o.count,t._df.firstDayOfWeek,t._df.utc,void 0,t._df.timezoneMinutes,t._df.timezone)).getTime();f<S?(u&&e._adapterO&&j(m,function(P){u.values[P].value=e._adapterO.apply("groupDataItem",{dataItem:u,interval:o,dataField:P,date:d,value:u.values[P].value}).value,u.values[P].workingValue=u.values[P].value}),(u=p.create()).dataContext={},u.setWorkingLocation("dateX",e.dataItems.template.locations.dateX,0),u.setWorkingLocation("openDateX",e.dataItems.template.locations.openDateX,0),u.setWorkingLocation("dateY",e.dataItems.template.locations.dateY,0),u.setWorkingLocation("openDateY",e.dataItems.template.locations.openDateY,0),u.component=e,u.setDate(l,d),u._index=g,g++,j(m,function(P){var O=x.values[P];if(O){var I=O.value;e._adapterO&&(I=e._adapterO.apply("groupValue",{dataItem:x,interval:o,dataField:P,date:d,value:I}).value);var k=u.values[P];y(I)?(k.value=I,k.workingValue=I,k.open=I,k.close=I,k.low=I,k.high=I,k.sum=I,k.average=I,k.count=1):k.count=0}}),t.postProcessSeriesDataItem(u,o),X(e.propertyFields,function(P,O){var I=P,k=x.properties[P];v(k)&&(u.hasProperties=!0,u.setProperty(I,k))}),u.groupDataItems=[x],f=S):u&&(j(m,function(P){var O=e.groupFields[P],I=x.values[P];if(I){var k=I.value;if(e._adapterO&&(k=e._adapterO.apply("groupValue",{dataItem:x,interval:o,dataField:P,date:d,value:k}).value),y(k)){var D=u.values[P];y(D.open)||(D.open=k),D.close=k,(D.low>k||!y(D.low))&&(D.low=k),(D.high<k||!y(D.high))&&(D.high=k),y(D.sum)?D.sum+=k:D.sum=k,D.count++,D.average=D.sum/D.count,y(D[O])&&(D.value=D[O],D.workingValue=D.value)}}}),Vt(x.properties,u.properties),X(e.propertyFields,function(P,O){var I=P,k=x.properties[P];v(k)&&(u.hasProperties=!0,u.setProperty(I,k))}),u.groupDataItems.push(x))}u&&Vt(x.dataContext,u.dataContext)}),u&&e._adapterO&&j(m,function(x){u.values[x].value=e._adapterO.apply("groupDataItem",{dataItem:u,interval:o,dataField:x,date:d,value:u.values[x].value}).value,u.values[x].workingValue=u.values[x].value})}),this.calculateZoom()}},i.prototype.getDFFormatter=function(){this._df=this.dateFormatter},i.prototype.postProcessSeriesDataItem=function(e,t){var n=this,r="";t?r=t.timeUnit+t.count:t=this.mainBaseInterval;var a=e.component.dataItemsByAxis.getKey(this.uid);X(e.dates,function(o){var l=e.getDate(o).getTime(),h=Be(new Date(l),t.timeUnit,t.count,n._firstWeekDay,n._df.utc,void 0,n._df.timezoneMinutes,n._df.timezone).getTime(),p=Ze(new Date(h),t.timeUnit,t.count,n._df.utc);e.setCalculatedValue(o,h,"open"),e.setCalculatedValue(o,p.getTime(),"close"),a.setKey(h+r,e)})},i.prototype.addEmptyUnitsBreaks=function(){var e=this;if(this.skipEmptyPeriods&&y(this.min)&&y(this.max)){var t=this.baseInterval.timeUnit,n=this.baseInterval.count;this._axisBreaks&&this._axisBreaks.clear();for(var r=Be(new Date(this.min),t,n,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),a=void 0,o=function(){Ze(r,t,n,l._df.utc);var h=r.getTime(),p=h.toString();cr(l.series.iterator(),function(u){return!!u.dataItemsByAxis.getKey(e.uid).getKey(p+u.currentDataSetId)})?a&&(a.endDate=new Date(h-1),a=void 0):a||((a=l.axisBreaks.create()).startDate=new Date(h),l._gapBreaks=!0)},l=this;r.getTime()<this.max-this.baseDuration;)o()}},i.prototype.fixAxisBreaks=function(){var e=this;s.prototype.fixAxisBreaks.call(this);var t=this._axisBreaks;t&&t.length>0&&t.each(function(n){var r=Math.ceil(e._gridCount*(Math.min(e.end,n.endPosition)-Math.max(e.start,n.startPosition))/(e.end-e.start));n.gridInterval=e.chooseInterval(0,n.adjustedEndValue-n.adjustedStartValue,r);var a=Be(new Date(n.adjustedStartValue),n.gridInterval.timeUnit,n.gridInterval.count,e._firstWeekDay,e._df.utc,void 0,e._df.timezoneMinutes,e._df.timezone);a.getTime()>n.startDate.getTime()&&Ze(a,n.gridInterval.timeUnit,n.gridInterval.count,e._df.utc),n.gridDate=a})},i.prototype.getFirstWeekDay=function(){return this._df?this._df.firstDayOfWeek:1},i.prototype.getGridDate=function(e,t){var n=this._gridInterval.timeUnit,r=this._gridInterval.count;Be(e,n,1,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone);var a=e.getTime(),o=bi(e),l=Ze(o,n,t,this._df.utc).getTime(),h=this.isInBreak(l);h&&h.endDate&&(Be(o=new Date(h.endDate.getTime()),n,r,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),o.getTime()<h.endDate.getTime()&&Ze(o,n,r,this._df.utc),l=o.getTime());var p=this.adjustDifference(a,l);return Math.round(p/Se(n))<r?this.getGridDate(e,t+r):o},i.prototype.getBreaklessDate=function(e,t,n){var r=new Date(e.endValue);Be(r,t,n,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),Ze(r,t,n,this._df.utc);var a=r.getTime();return(e=this.isInBreak(a))?this.getBreaklessDate(e,t,n):r},i.prototype.validateAxisElements=function(){var e=this;if(y(this.max)&&y(this.min)){this.calculateZoom();var t=this._gridDate.getTime(),n=this._gridInterval.timeUnit,r=this._gridInterval.count,a=bi(this._gridDate),o=this._dataItemsIterator;this.resetIterators();for(var l=function(){var u=h.getGridDate(bi(a),r);t=u.getTime();var d=bi(u);d=Ze(d,n,r,h._df.utc);var c=h.dateFormats.getKey(n);h.markUnitChange&&a&&Rr(u,a,h._nextGridUnit,h._df.utc)&&n!=="year"&&(c=h.periodChangeDateFormats.getKey(n));var f=h._df.format(u,c),g=o.find(function(m){return m.text===f});g.__disabled&&(g.__disabled=!1),h.appendDataItem(g),g.axisBreak=void 0,g.date=u,g.endDate=d,g.text=f,h.validateDataElement(g),a=u},h=this;t<=this._maxZoomed;)l();var p=this.renderer;this._axisBreaks&&A(this._axisBreaks.iterator(),function(u){if(u.breakSize>0){var d=u.gridInterval.timeUnit,c=u.gridInterval.count;if(oe(u.startPoint,u.endPoint)>4*p.minGridDistance)for(var f,g=u.gridDate.getTime(),m=0,x=function(){var b=bi(u.gridDate);if(g=Ze(b,d,c*m,e._df.utc).getTime(),m++,g>u.adjustedStartValue&&g<u.adjustedEndValue){var C=bi(b);C=Ze(C,d,c,e._df.utc);var S=e.dateFormats.getKey(d);e.markUnitChange&&f&&Rr(b,f,e._nextGridUnit,e._df.utc)&&d!=="year"&&(S=e.periodChangeDateFormats.getKey(d));var P=e._df.format(b,S),O=o.find(function(I){return I.text===P});O.__disabled&&(O.__disabled=!1),e.appendDataItem(O),O.axisBreak=u,u.dataItems.moveValue(O),O.date=b,O.endDate=C,O.text=P,f=b,e.validateDataElement(O)}};g<=u.adjustedMax;)x()}})}},i.prototype.validateDataElement=function(e){if(e.itemIndex=this._axisItemCount,this._axisItemCount++,y(this.max)&&y(this.min)){var t=this.renderer,n=e.value,r=e.endValue;y(r)||(r=n);var a=this.valueToPosition(n),o=this.valueToPosition(r),l=o;!e.isRange&&this._gridInterval.count>this.baseInterval.count&&(o=a+(o-a)/(this._gridInterval.count/this.baseInterval.count)),e.position=a;var h=e.tick;h&&!h.disabled&&t.updateTickElement(h,a,o);var p=e.grid;p&&!p.disabled&&t.updateGridElement(p,a,o);var u=e.axisFill;u&&!u.disabled&&(t.updateFillElement(u,a,l),e.isRange||this.fillRule(e));var d=e.mask;d&&t.updateFillElement(d,a,o),e.bullet&&t.updateBullet(e.bullet,a,o);var c=e.label;if(c&&!c.disabled){var f=c.location;f==0&&(f=this._gridInterval.count!=1||this._gridInterval.timeUnit=="week"||e.isRange?0:.5),t.updateLabelElement(c,a,o,f)}}},Object.defineProperty(i.prototype,"baseDuration",{get:function(){return Se(this.baseInterval.timeUnit,this.baseInterval.count)},enumerable:!0,configurable:!0}),i.prototype.adjustMinMax=function(e,t){return{min:e,max:t,step:this.baseDuration}},i.prototype.fixMin=function(e){var t=this.baseInterval,n=Be(new Date(e),t.timeUnit,t.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone).getTime();return n+(Ze(new Date(n),t.timeUnit,t.count,this._df.utc).getTime()-n)*this.startLocation},i.prototype.fixMax=function(e){var t=this.baseInterval,n=Be(new Date(e),t.timeUnit,t.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone).getTime();return n+(Ze(new Date(n),t.timeUnit,t.count,this._df.utc).getTime()-n)*this.endLocation},i.prototype.chooseInterval=function(e,t,n,r){r||(r=this.gridIntervals);var a=r.getIndex(e),o=Se(a.timeUnit,a.count),l=r.length-1;if(e>=l)return ct({},r.getIndex(l));var h=Math.ceil(t/o);return t<o&&e>0?ct({},r.getIndex(e-1)):h<=n?ct({},r.getIndex(e)):e+1<r.length?this.chooseInterval(e+1,t,n,r):ct({},r.getIndex(e))},i.prototype.formatLabel=function(e){return this._df.format(e)},i.prototype.dateToPosition=function(e){return this.valueToPosition(e.getTime())},i.prototype.anyToPosition=function(e){return e instanceof Date?this.dateToPosition(e):this.valueToPosition(e)},i.prototype.dateToPoint=function(e){var t=this.dateToPosition(e),n=this.renderer.positionToPoint(t),r=this.renderer.positionToAngle(t);return{x:n.x,y:n.y,angle:r}},i.prototype.anyToPoint=function(e){return e instanceof Date?this.dateToPoint(e):this.valueToPoint(e)},i.prototype.positionToDate=function(e){return new Date(this.positionToValue(e))},i.prototype.getPositionX=function(e,t,n,r,a){var o=this.getTimeByLocation(e,t,n);y(o)||(o=this.baseValue);var l=this.valueToPosition(o);return a&&(l=R(l,a.start,a.end)),l},i.prototype.getPositionY=function(e,t,n,r,a){var o=this.getTimeByLocation(e,t,n),l=e.getValue("valueX","stack");y(o)||(o=this.baseValue);var h=this.valueToPosition(o+l);return a&&(h=R(h,a.start,a.end)),h},i.prototype.getAngle=function(e,t,n,r,a){var o=this.getTimeByLocation(e,t,n),l=e.getValue(r,"stack");y(o)||(o=this.baseValue);var h=this.valueToPosition(o+l);return a&&(h=R(h,a.start,a.end)),this.positionToAngle(h)},i.prototype.getTimeByLocation=function(e,t,n){if(v(t)){y(n)||y(n=e.workingLocations[t])||(n=0);var r=e.values[t].open,a=e.values[t].close,o=e.values[t].workingValue,l=e.values[t].value-o;return a-=l,y(r-=l)&&y(a)?r+(a-r)*n:void 0}},i.prototype.processSeriesDataItem=function(e,t){var n,r=e.component,a=e["date"+t];if(y(this.timezoneOffset)?(a.setTime(a.getTime()+6e4*(a.getTimezoneOffset()-this.timezoneOffset)),e.setValue("date"+t,a.getTime(),0)):v(this.timezone)&&(a=Vn(a,this.timezone),e.setValue("date"+t,a.getTime(),0),e["date"+t]=a),a){n=a.getTime();var o,l=e["openDate"+t],h=this._prevSeriesTime[r.uid];if(l&&(o=l.getTime()),y(o)){var p=Math.abs(n-o);this._minDifference[r.uid]>p&&(this._minDifference[r.uid]=p)}var u=n-h;u>0&&this._minDifference[r.uid]>u&&(this._minDifference[r.uid]=u),this._prevSeriesTime[r.uid]=n,r._baseInterval[this.uid]&&this.postProcessSeriesDataItem(e)}},i.prototype.updateAxisBySeries=function(){s.prototype.updateAxisBySeries.call(this);var e=this.chooseInterval(0,this.minDifference,1);this.minDifference>=Se("day",27)&&e.timeUnit=="week"&&(e.timeUnit="month",e.count=1),e.timeUnit=="month"&&(this.minDifference>=Se("day",58)&&e.count==1&&(e.count=2),this.minDifference>=Se("day",87)&&e.count==2&&(e.count=3),this.minDifference>=Se("day",174)&&e.count==5&&(e.count=6)),this.minDifference>=Se("hour",23)&&e.timeUnit=="hour"&&(e.timeUnit="day",e.count=1),this.minDifference>=Se("week",1)-Se("hour",1)&&e.timeUnit=="day"&&(e.timeUnit="week",e.count=1),this.minDifference>=Se("year",1)-Se("day",1.01)&&e.timeUnit=="month"&&(e.timeUnit="year",e.count=1),this._baseIntervalReal=e,this._mainBaseInterval=e},Object.defineProperty(i.prototype,"baseInterval",{get:function(){return this._groupInterval?this._groupInterval:this._baseInterval?this._baseInterval:this._baseIntervalReal},set:function(e){JSON.stringify(this._baseInterval)!=JSON.stringify(e)&&(this._baseInterval=e,this._mainBaseInterval=e,y(e.count)||(e.count=1),this.invalidate(),this.postProcessSeriesDataItems())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"mainBaseInterval",{get:function(){return this._baseInterval?this._baseInterval:this._mainBaseInterval?this._mainBaseInterval:this._baseIntervalReal},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"skipEmptyPeriods",{get:function(){return this.getPropertyValue("skipEmptyPeriods")},set:function(e){if(e){var t=this.axisBreaks.template;t.startLine.disabled=!0,t.endLine.disabled=!0,t.fillShape.disabled=!0,t.breakSize=0}else this._gapBreaks&&(this.axisBreaks.clear(),this._gapBreaks=!1);this.setPropertyValue("skipEmptyPeriods",e)&&(this.invalidate(),this.postProcessSeriesDataItems(),this.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipDateFormat",{get:function(){return this.getPropertyValue("tooltipDateFormat")},set:function(e){this.setPropertyValue("tooltipDateFormat",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"markUnitChange",{get:function(){return this.getPropertyValue("markUnitChange")},set:function(e){this.setPropertyValue("markUnitChange",e)&&this.invalidateData()},enumerable:!0,configurable:!0}),i.prototype.getTooltipText=function(e){var t,n=this.positionToDate(e);if(n=Be(n,this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,new Date(this.min),this._df.timezoneMinutes,this._df.timezone),this.tooltipDate=n,v(this.tooltipDateFormat))t=this._df.format(n,this.tooltipDateFormat,["day","month","week","year"].indexOf(this.baseInterval.timeUnit)==-1);else{var r=this.dateFormats.getKey(this.baseInterval.timeUnit);t=r?this._df.format(n,r):this.getPositionLabel(e)}return this._adapterO?this._adapterO.apply("getTooltipText",t):t},i.prototype.roundPosition=function(e,t,n){var r=this.baseInterval,a=r.timeUnit,o=r.count,l=this.positionToDate(e);if(Be(l,a,o,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),t>0&&Ze(l,a,t*o,this._df.utc),n>0&&n<1&&l.setTime(l.getTime()+this.baseDuration*n),this.isInBreak(l.getTime()))for(;l.getTime()<this.max&&(Ze(l,a,o,this._df.utc),this.isInBreak(l.getTime())););return this.dateToPosition(l)},i.prototype.getCellStartPosition=function(e){return this.roundPosition(e,0)},i.prototype.getCellEndPosition=function(e){return this.roundPosition(e,1)},i.prototype.getSeriesDataItem=function(e,t,n){var r=this.positionToValue(t),a=r-(this.axisLetter=="Y"?e.dataItems.template.locations.dateY:e.dataItems.template.locations.dateX)*this.baseDuration,o=Be(new Date(r),this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),l=Be(new Date(r+this.baseDuration),this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone);l.getTime()>o.getTime()&&Math.abs(l.getTime()-a)<Math.abs(a-o.getTime())&&(o=l);var h,p=e.dataItemsByAxis.getKey(this.uid).getKey(o.getTime()+e.currentDataSetId);return!p&&n&&(h=this.axisLetter=="Y"?"dateY":"dateX",p=e.dataItems.getIndex(e.dataItems.findClosestIndex(o.getTime(),function(u){return u[h]?u[h].getTime():-1/0},"any"))),p},i.prototype.getPositionLabel=function(e){var t=this.positionToDate(e);return this._df.format(t,this.getCurrentLabelFormat())},i.prototype.getCurrentLabelFormat=function(){return this.dateFormats.getKey(this._gridInterval?this._gridInterval.timeUnit:"day")},i.prototype.initRenderer=function(){s.prototype.initRenderer.call(this);var e=this.renderer;e&&(e.ticks.template.location=0,e.grid.template.location=0,e.labels.template.location=0,e.baseGrid.disabled=!0)},Object.defineProperty(i.prototype,"basePoint",{get:function(){return{x:0,y:0}},enumerable:!0,configurable:!0}),i.prototype.animateMinMax=function(e,t){var n=this,r=this.animate([{property:"_minAdjusted",from:this._minAdjusted,to:e},{property:"_maxAdjusted",from:this._maxAdjusted,to:t}],this.rangeChangeDuration,this.rangeChangeEasing);return r.events.on("animationprogress",function(){n.dispatch("extremeschanged")}),r},i.prototype.handleExtremesChange=function(){if(s.prototype.handleExtremesChange.call(this),this.groupData){var e=this.baseInterval.timeUnit+this.baseInterval.count;this.groupMin[e]=this._finalMin,this.groupMax[e]=this._finalMax}},i.prototype.zoomToDates=function(e,t,n,r,a){e=this._df.parse(e),t=this._df.parse(t),this.zoomToValues(e.getTime(),t.getTime(),n,r,a)},i.prototype.zoomToValues=function(e,t,n,r,a){var o=this;if(this.groupData){var l=this.adjustDifference(e,t),h=!1;t==this.max&&(h=!0);var p=!1;if(e==this.min&&(p=!0),v(l)){var u=this.mainBaseInterval,d=this.chooseInterval(0,l,this.groupCount,this.groupIntervals);(d.timeUnit==u.timeUnit&&d.count<u.count||Se(d.timeUnit,1)<Se(u.timeUnit,1))&&(d=ct({},u));var c=d.timeUnit+d.count,f=this.groupMin[c],g=this.groupMax[c];y(f)&&y(g)||(f=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,this.series.each(function(b){var C=b.min(o),S=b.max(o);if(b._dataSets){var P=b._dataSets.getKey(d.timeUnit+d.count);if(P){var O=P.getIndex(0),I=P.getIndex(P.length-1);O&&(b.xAxis==o?C=O.dateX.getTime():b.yAxis==o&&(C=O.dateY.getTime())),I&&(b.xAxis==o?S=I.dateX.getTime():b.yAxis==o&&(S=I.dateY.getTime()))}}S=Be(Ze(new Date(S),d.timeUnit,1,o._df.utc),d.timeUnit,1,o._df.firstDayOfWeek,o._df.utc,void 0,o._df.timezoneMinutes,o._df.timezone).getTime(),C<f&&(f=C),S>g&&(g=S)}),this.groupMin[c]=f,this.groupMax[c]=g),e=R(e,f,g),t=R(t,f,g),a&&(h&&(e=R(e=t-l,f,g)),p&&(t=R(t=e+l,f,g))),m=(e-f)/(g-f),x=(t-f)/(g-f),this.zoom({start:m,end:x},n,r)}}else{var m=this.valueToPosition(e),x=this.valueToPosition(t);this.zoom({start:m,end:x},n,r)}},i.prototype.asIs=function(e){return e=="baseInterval"||s.prototype.asIs.call(this,e)},i.prototype.copyFrom=function(e){var t=this;s.prototype.copyFrom.call(this,e),this.dateFormats=e.dateFormats,this.periodChangeDateFormats=e.periodChangeDateFormats,this.groupIntervals.clear(),e.groupIntervals.each(function(n){t.groupIntervals.push(ct({},n))}),this.gridIntervals.clear(),e.gridIntervals.each(function(n){t.gridIntervals.push(ct({},n))}),e._baseInterval&&(this.baseInterval=e._baseInterval)},i.prototype.showTooltipAtPosition=function(e,t){var n=this;if(t||(e=this.toAxisPosition(e)),this.snapTooltip){var r,a=this.positionToDate(e).getTime();if(this.series.each(function(h){if(h.baseAxis==n){var p=n.getSeriesDataItem(h,e,!0);if(p){var u=void 0;h.xAxis==n&&(u=p.dateX),h.yAxis==n&&(u=p.dateY),r?Math.abs(r.getTime()-a)>Math.abs(u.getTime()-a)&&(r=u):r=u}}}),r){var o=r.getTime();r=Be(new Date(o),this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),o=r.getTime();var l=this.renderer.tooltipLocation;l==0&&(l=1e-4),r=new Date(r.getTime()+this.baseDuration*l),e=this.dateToPosition(r),this.chart.cursor&&this.chart.cursor.snapToSeries||this.series.each(function(h){var p=h.dataItemsByAxis.getKey(n.uid).getKey(o+h.currentDataSetId),u=h.showTooltipAtDataItem(p);u?n.chart._seriesPoints.push({series:h,point:u}):(h.tooltipText||h.tooltipHTML)&&h.hideTooltip()})}}s.prototype.showTooltipAtPosition.call(this,e,!0)},Object.defineProperty(i.prototype,"snapTooltip",{get:function(){return this.getPropertyValue("snapTooltip")},set:function(e){this.setPropertyValue("snapTooltip",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"groupData",{get:function(){return this.getPropertyValue("groupData")},set:function(e){var t=this;this.setPropertyValue("groupData",e)&&(this.series.each(function(n){n.setDataSet(""),e&&!n.dataGrouped&&n.inited&&(n._baseInterval[t.uid]=t.mainBaseInterval,t.groupSeriesData(n))}),this._currentDataSetId="",this._groupInterval=void 0,this.invalidate(),this.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"groupInterval",{get:function(){return this.getPropertyValue("groupInterval")},set:function(e){this.setPropertyValue("groupInterval",e)&&(this.invalidate(),this.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"groupCount",{get:function(){return this.getPropertyValue("groupCount")},set:function(e){this.setPropertyValue("groupCount",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"timezoneOffset",{get:function(){return this.getPropertyValue("timezoneOffset")},set:function(e){this.setPropertyValue("timezoneOffset",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"timezone",{get:function(){return this.getPropertyValue("timezone")},set:function(e){this.setPropertyValue("timezone",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"gridInterval",{get:function(){return this._gridInterval},enumerable:!0,configurable:!0}),i.prototype.makeGap=function(e,t){var n=e.component;if(e&&t&&!n.connect&&y(n.autoGapCount)&&n.baseAxis==this){var r=e.dates["date"+this.axisLetter],a=t.dates["date"+this.axisLetter];if(r&&a&&r.getTime()-a.getTime()>n.autoGapCount*this.baseDuration)return!0}return!1},Object.defineProperty(i.prototype,"baseValue",{get:function(){return this.min},enumerable:!0,configurable:!0}),i}(ee);_.registeredClasses.DateAxis=Pe,_.registeredClasses.DateAxisDataItem=fo;var Mt=function(s){function i(){var e=s.call(this)||this;return e.className="AxisRendererX",e.minGridDistance=120,e.opposite=!1,e.rotation=0,e.width=F(100),e.labels.template.horizontalCenter="middle",e.applyTheme(),e}return w(i,s),i.prototype.setAxis=function(e){s.prototype.setAxis.call(this,e),e.layout="vertical"},i.prototype.updateGridContainer=function(){var e=this.axis;if(e){var t=this.gridContainer;t.x=e.pixelX,t.width=e.axisLength}},i.prototype.processRenderer=function(){s.prototype.processRenderer.call(this);var e=this.axis;if(e){e.width instanceof te||(e.width=F(100)),this.line;var t=e.title;t.rotation=0,t.align="center",this.opposite?(this.line.toFront(),t.toBack()):(t.toFront(),this.toBack(),this.line.toBack())}},i.prototype.updateTooltip=function(){if(this.axis){var e=1e3,t=this.line.pixelX,n=this.line.pixelY,r=this.axisLength,a=e;this.opposite?this.inside||(n=-1e3,a=e):this.inside&&(n=-1e3,a=e),this.axis.updateTooltip("vertical",{x:t,y:n,width:r,height:a})}},i.prototype.updateLabelElement=function(e,t,n,r){v(r)||(r=e.location),t+=(n-t)*r;var a=this.positionToPoint(t);e.isMeasured=!e.inside;var o,l=0,h=this.gridContainer.maxHeight;this.opposite?(e.inside?(o="top",e.valign=="bottom"&&(l=h,o="bottom"),e.valign=="middle"&&(l=h/2,o="middle")):o="bottom",a.y=l):(e.inside?(o="bottom",e.valign=="top"&&(l=-h,o="top"),e.valign=="middle"&&(l=-h/2,o="middle")):o="top",a.y+=l),e.rotation==0&&(e.verticalCenter=o),this.positionItem(e,a),this.toggleVisibility(e,t,this.minLabelPosition,this.maxLabelPosition)},Object.defineProperty(i.prototype,"axisLength",{get:function(){var e=this.axis;return e.measuredWidth-e.pixelPaddingRight-e.pixelPaddingLeft||0},enumerable:!0,configurable:!0}),i.prototype.positionToPoint=function(e,t){return{x:this.positionToCoordinate(e),y:0}},i.prototype.pointToPosition=function(e){return this.coordinateToPosition(e.x,e.y)},i.prototype.getPositionRangePath=function(e,t){var n=R(this.positionToCoordinate(e),0,this.axisLength),r=R(this.positionToCoordinate(t),0,this.axisLength),a=Math.abs(r-n),o=this.getHeight();return Yt({x:Math.min(n,r),y:0,width:a,height:o},!0)},i.prototype.updateBreakElement=function(e){s.prototype.updateBreakElement.call(this,e);var t=e.startLine,n=e.endLine,r=e.fillShape,a=e.startPoint,o=e.endPoint,l=e.pixelMarginLeft,h=this.getHeight()-e.pixelMarginTop-e.pixelMarginBottom;a.x=R(a.x,-1,this.axisLength+1),o.x=R(o.x,-1,this.axisLength+1),a.x==o.x&&(a.x<0||a.x>this.axisLength)?e.fillShape.__disabled=!0:e.fillShape.__disabled=!1,t.y=l,t.width=0,t.height=h,n.y=l,n.width=0,n.height=h,r.height=h,r.width=Math.abs(o.x-a.x),r.y=l,r.x=a.x},i.prototype.updateGridElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t);e.path=E({x:0,y:0})+T({x:0,y:this.getHeight()}),this.positionItem(e,r),this.toggleVisibility(e,t,0,1)},i.prototype.updateTickElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t),a=e.length;r.y=Qe({x:0,y:this.line.pixelY},this.line.parent,this.gridContainer).y,this.opposite?a*=e.inside?1:-1:a*=e.inside?-1:1,e.path=E({x:0,y:0})+T({x:0,y:a}),this.positionItem(e,r),this.toggleVisibility(e,t,0,1)},i.prototype.updateAxisLine=function(){this.line.path=E({x:0,y:0})+T({x:this.axisLength,y:0})},i.prototype.updateBaseGridElement=function(){s.prototype.updateBaseGridElement.call(this);var e=this.axis,t=this.getHeight(),n=this.axisLength,r=this.baseGrid,a=e.basePoint.x;if(a<-.2||a>n+.2)r.hide(0);else{var o=Qe({x:0,y:0},this.gridContainer,r.parent).y;r.path=E({x:0,y:0})+T({x:0,y:t}),r.moveTo({x:a,y:o}),r.show(0)}},i.prototype.createBreakSprites=function(e){e.startLine=new si,e.endLine=new si;var t=new Ja;t.setWavedSides(!1,!0,!1,!0),e.fillShape=t},i.prototype.toAxisPosition=function(e){var t=e,n=this.axis;if(n){var r=n.relativePositionSprite,a=n.pixelX;if(r?a=Qe({x:this.pixelX,y:0},this.parent,r).x:r=n.parent,r)return(t-a/r.innerWidth)/(n.axisLength/r.innerWidth)}return e},i.prototype.updateBullet=function(e,t,n){var r=.5;e instanceof tn&&(r=e.location),t+=(n-t)*r;var a=this.positionToPoint(t);a.y=Qe({x:0,y:this.line.pixelY},this.line.parent,this.gridContainer).y,this.positionItem(e,a),this.toggleVisibility(e,t,0,1)},i}(Kn);_.registeredClasses.AxisRendererX=Mt,Ne.push({relevant:Ue.heightXS,state:function(s,i){if(s instanceof Mt){var e=s.states.create(i);return e.properties.inside=!0,e.properties.maxLabelPosition=.9,e.properties.minLabelPosition=.1,e}return null}}),Ne.push({relevant:Ue.heightXXS,state:function(s,i){if(s instanceof Mt){var e=s.states.create(i);return e.properties.disabled=!0,e}return null}});var go=function(s){function i(){var e=s.call(this)||this;return e.className="CategoryAxisBreak",e.properties.startLocation=.5,e.properties.endLocation=.5,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"startPosition",{get:function(){if(this.axis)return this.axis.indexToPosition(this.adjustedStartValue,this.startLocation)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endPosition",{get:function(){if(this.axis)return this.axis.indexToPosition(this.adjustedEndValue,this.endLocation)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startCategory",{get:function(){return this.getPropertyValue("startCategory")},set:function(e){this.setPropertyValue("startCategory",e)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endCategory",{get:function(){return this.getPropertyValue("endCategory")},set:function(e){this.setPropertyValue("endCategory",e)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startValue",{get:function(){var e=this.getPropertyValue("startCategory");return e?this.axis.categoryToIndex(e):this.getPropertyValue("startValue")},set:function(e){this.setPropertyValue("startValue",e)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endValue",{get:function(){var e=this.getPropertyValue("endCategory");return e?this.axis.categoryToIndex(e):this.getPropertyValue("endValue")},set:function(e){this.setPropertyValue("endValue",e)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startLocation",{get:function(){return this.getPropertyValue("startLocation")},set:function(e){this.setPropertyValue("startLocation",e)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endLocation",{get:function(){return this.getPropertyValue("endLocation")},set:function(e){this.setPropertyValue("endLocation",e)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),i}(Un);_.registeredClasses.CategoryAxisBreak=go;var yo=function(s){function i(){var e=s.call(this)||this;return e.seriesDataItems={},e.className="CategoryAxisDataItem",e.text="{category}",e.locations.category=0,e.locations.endCategory=1,e.deltaPosition=0,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"category",{get:function(){return this._adapterO&&this._adapterO.isEnabled("category")?this._adapterO.apply("category",this.properties.category):this.properties.category},set:function(e){var t=this.properties.category;this.setProperty("category",e),v(t)&&t!=e&&this.component&&this.component.validateDataElement(this)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endCategory",{get:function(){return this.properties.endCategory},set:function(e){this.setProperty("endCategory",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"deltaPosition",{get:function(){return this.properties.deltaCoordinate},set:function(e){e!=this.properties.deltaCoordinate&&(this.setProperty("deltaCoordinate",e),this.component&&(this.component.invalidateDataItems(),this.component.invalidateSeries()))},enumerable:!0,configurable:!0}),i}(Ji),Ve=function(s){function i(){var e=s.call(this)||this;e.dataItemsByCategory=new me,e.className="CategoryAxis",e.axisFieldName="category",e._lastDataItem=e.createDataItem(),e._lastDataItem.component=e,e._disposers.push(e._lastDataItem),e.applyTheme();var t=e.dataItemsByCategory;return e.addDisposer(e.mainDataSet.events.on("removed",function(n){t.removeKey(n.oldValue.category)})),e}return w(i,s),i.prototype.createDataItem=function(){return new yo},i.prototype.createAxisBreak=function(){return new go},i.prototype.processSeriesDataItem=function(e,t){s.prototype.processSeriesDataItem.call(this,e,t);var n=e["category"+this.axisLetter];if(v(n)){var r=this.dataItemsByCategory.getKey(n);if(r){var a=e.component.uid,o=r.seriesDataItems[a];o||(o=[],r.seriesDataItems[a]=o),o.push(e)}}else e.component.dataItems.remove(e)},i.prototype.validateDataRange=function(){var e=this;s.prototype.validateDataRange.call(this),A(this._series.iterator(),function(t){if(t.xAxis instanceof i&&t.yAxis instanceof i)t.invalidateDataRange();else{var n=e.positionToIndex(e.start),r=e.positionToIndex(e.end);r>=e.dataItems.length&&r--;for(var a=t.uid,o=void 0,l=void 0,h=n;h<=r;h++){var p=e.dataItems.getIndex(h);if(p){var u=p.seriesDataItems[a];if(u)for(var d=0;d<u.length;d++){var c=u[d];if(c){var f=c.index;(!y(o)||f<o)&&(o=f),(!y(l)||f>l)&&(l=f)}}}}y(o)?t.startIndex=o:t.start=e.start,y(l)?t.endIndex=l+1:t.end=e.end,e._axisBreaks&&e._axisBreaks.length>0&&t.invalidateDataRange()}})},i.prototype.validate=function(){var e=this;s.prototype.validate.call(this);var t=this.dataItems.length,n=R(Math.floor(this.start*t-1),0,t),r=R(Math.ceil(this.end*t),0,t);this.renderer.invalid&&this.renderer.validate();var a=this.renderer.axisLength/Math.max(this.renderer.minGridDistance,1/Number.MAX_SAFE_INTEGER),o=Math.min(this.dataItems.length,Math.ceil((r-n)/a));if(this._startIndex=Math.floor(n/o)*o,this._endIndex=Math.ceil(this.end*t),this.fixAxisBreaks(),this._startIndex==this._endIndex&&this._endIndex++,this._frequency=o,!(this.axisLength<=0)){this.maxZoomFactor=this.dataItems.length,this.dataItems.length<=0&&(this.maxZoomFactor=1),this.resetIterators(),n=q(0,this._startIndex-this._frequency),r=ie(this.dataItems.length,this._endIndex+this._frequency);for(var l=0,h=0;h<n;h++)(u=this.dataItems.getIndex(h)).__disabled=!0;h=r;for(var p=this.dataItems.length;h<p;h++)(u=this.dataItems.getIndex(h)).__disabled=!0;for(h=n;h<r;h++)if(h<this.dataItems.length){var u=this.dataItems.getIndex(h);h/this._frequency==Math.round(h/this._frequency)?(this.isInBreak(h)||(this.appendDataItem(u),this.validateDataElement(u,l)),l++):u.__disabled=!0}this.appendDataItem(this._lastDataItem),this.validateDataElement(this._lastDataItem,l+1,this.dataItems.length),this._axisBreaks&&this._axisBreaks.each(function(d){var c=d.adjustedStartValue,f=d.adjustedEndValue;if(on({start:c,end:f},{start:e._startIndex,end:e._endIndex})){for(var g=c;g<=f;g++)(b=e.dataItems.getIndex(g)).__disabled=!0;var m=R(Math.ceil(e._frequency/d.breakSize),1,f-c),x=0;if(d.breakSize>0)for(g=c;g<=f;g+=m){var b;(b=e.dataItems.getIndex(g)).__disabled=!1,e.appendDataItem(b),e.validateDataElement(b,x),x++}}}),this.validateBreaks(),this.validateAxisRanges(),this.ghostLabel.invalidate(),this.renderer.invalidateLayout()}},i.prototype.validateDataElement=function(e,t,n){s.prototype.validateDataElement.call(this,e),e.itemIndex=this._axisItemCount,this._axisItemCount++;var r=this.renderer;y(n)||(n=this.categoryToIndex(e.category));var a=this.categoryToIndex(e.endCategory);y(a)||(a=n);var o,l,h,p=this.indexToPosition(n,e.locations.category),u=this.indexToPosition(a,e.locations.endCategory);e.position=p,e.isRange&&(o=a,l=this.indexToPosition(n,e.locations.category),h=this.indexToPosition(o,e.locations.endCategory)),e.point=r.positionToPoint(p);var d=e.tick;d&&!d.disabled&&r.updateTickElement(d,p,u);var c=e.grid;c&&!c.disabled&&r.updateGridElement(c,p,u);var f=e.label;f&&!f.disabled&&(e.isRange&&f.text!=null||(e.text=e.text),r.updateLabelElement(f,p,u),(r instanceof mt&&e.label.measuredWidth>this.ghostLabel.measuredWidth||r instanceof Mt&&e.label.measuredHeight>this.ghostLabel.measuredHeight)&&(e.label.html?this.ghostLabel.html=e.label.currentText:this.ghostLabel.text=e.label.currentText));var g=e.axisFill;g&&!g.disabled&&(e.isRange||(o=n+this._frequency,l=this.indexToPosition(n,g.location),h=this.indexToPosition(o,g.location)),r.updateFillElement(g,l,h),e.isRange||this.fillRule(e,t)),e.bullet&&r.updateBullet(e.bullet,p,u);var m=e.mask;m&&r.updateFillElement(m,l,h)},i.prototype.disposeData=function(){this.dataItemsByCategory.clear(),s.prototype.disposeData.call(this)},i.prototype.processDataItem=function(e,t){e&&(s.prototype.processDataItem.call(this,e,t),v(e.category)&&this.dataItemsByCategory.setKey(e.category,e))},i.prototype.getDataItem=function(e){var t=e[this.dataFields.category];if(v(t))return this.dataItemsByCategory.getKey(t)||this.dataItems.create()},i.prototype.indexToPosition=function(e,t){y(t)||(t=.5);var n=this.startIndex,r=this.endIndex,a=this.adjustDifference(n,r),o=this.startLocation;a-=o,a-=1-this.endLocation,this._axisBreaks&&rt(this._axisBreaks.iterator(),function(p){var u=p.adjustedStartValue,d=p.adjustedEndValue;if(e<n||!y(u)||!y(d))return!1;if(on({start:u,end:d},{start:n,end:r})){u=Math.max(n,u),d=Math.min(r,d);var c=p.breakSize;e>d?n+=(d-u)*(1-c):e<u||(e=u+(e-u)*c)}return!0});var l=0,h=this.dataItems.getIndex(e);return h&&(l=h.deltaPosition),V(l+(e+t-o-n)/a,5)},i.prototype.categoryToPosition=function(e,t){var n=this.categoryToIndex(e);return this.indexToPosition(n,t)},i.prototype.categoryToPoint=function(e,t){var n=this.categoryToPosition(e,t),r=this.renderer.positionToPoint(n),a=this.renderer.positionToAngle(n);return{x:r.x,y:r.y,angle:a}},i.prototype.anyToPoint=function(e,t){return this.categoryToPoint(e,t)},i.prototype.anyToPosition=function(e,t){return this.categoryToPosition(e,t)},i.prototype.categoryToIndex=function(e){if(v(e)){var t=this.dataItemsByCategory.getKey(e);if(t)return t.index}},i.prototype.zoomToCategories=function(e,t){this.zoomToIndexes(this.categoryToIndex(e),this.categoryToIndex(t)+1)},i.prototype.getAnyRangePath=function(e,t,n,r){var a=this.categoryToPosition(e,n),o=this.categoryToPosition(t,r);return this.getPositionRangePath(a,o)},i.prototype.roundPosition=function(e,t){var n=this.positionToIndex(e);return this.indexToPosition(n,t)},i.prototype.getFirstSeriesDataItem=function(e,t){for(var n=0;n<e.dataItems.length;n++){var r=e.dataItems.getIndex(n);if(e.xAxis==this&&r.categoryX==t||e.yAxis==this&&r.categoryY==t)return r}},i.prototype.getLastSeriesDataItem=function(e,t){for(var n=e.dataItems.length-1;n>=0;n--){var r=e.dataItems.getIndex(n);if(e.xAxis==this&&r.categoryX==t||e.yAxis==this&&r.categoryY==t)return r}},i.prototype.getSeriesDataItemByCategory=function(e,t){var n,r=this;return t.dataItems.each(function(a){t.xAxis==r?a.categoryX==e&&(n=a):t.yAxis==r&&a.categoryY==e&&(n=a)}),n},i.prototype.getSeriesDataItem=function(e,t,n){var r=this;if(y(t)){var a=this.positionToIndex(t);a>=this.dataItems.length&&a--;var o=this.dataItems.getIndex(a);if(o){var l,h=o.category,p=e.dataItems.getIndex(a);return p&&(e.xAxis==this&&p.categoryX==h||e.yAxis==this&&p.categoryY==h)?p:(e.dataItems.each(function(u){e.xAxis==r&&u.categoryX==h&&(l||(l=u),Math.abs(a-l.index)>Math.abs(a-u.index)&&(l=u)),e.yAxis==r&&u.categoryY==h&&(l||(l=u),Math.abs(a-l.index)>Math.abs(a-u.index)&&(l=u))}),l)}}},i.prototype.getX=function(e,t,n,r,a){var o=this.getPositionX(e,t,n,r,a);return Fe(o)?this.basePoint.x:this.renderer.positionToPoint(o).x},i.prototype.getPositionX=function(e,t,n,r,a){var o;return v(t)&&(o=this.categoryToPosition(e.categories[t],n)),a&&(o=R(o,a.start,a.end)),o},i.prototype.getY=function(e,t,n,r,a){var o=this.getPositionY(e,t,n,r,a);return Fe(o)?this.basePoint.y:this.renderer.positionToPoint(o).y},i.prototype.getPositionY=function(e,t,n,r,a){var o;return v(t)&&(o=this.categoryToPosition(e.categories[t],n)),a&&(o=R(o,a.start,a.end)),o},i.prototype.getAngle=function(e,t,n,r,a){var o=this.categoryToPosition(e.categories[t],n);return a&&(o=R(o,a.start,a.end)),this.positionToAngle(o)},i.prototype.getCellStartPosition=function(e){return this.roundPosition(e,0)},i.prototype.getCellEndPosition=function(e){return this.roundPosition(e,1)},i.prototype.getTooltipText=function(e){var t=this.dataItems.getIndex(this.positionToIndex(e));if(t)return this.tooltipDataItem=t,this.tooltip.dataItem=t,this.tooltipText?this.tooltipText:this._adapterO?this._adapterO.apply("getTooltipText",t.category):t.category},i.prototype.positionToIndex=function(e){(e=V(e,10))<0&&(e=0),e>1&&(e=1);var t=this.startIndex,n=this.endIndex,r=n-t-this.startLocation-(1-this.endLocation);e+=1/r*this.startLocation;var a=null;return this._axisBreaks&&rt(this._axisBreaks.iterator(),function(o){var l=o.startPosition,h=o.endPosition,p=o.adjustedStartValue,u=o.adjustedEndValue;p=q(p,t),u=ie(u,n);var d=o.breakSize;if(r-=(u-p)*(1-d),e>h)t+=(u-p)*(1-d);else if(!(e<l)){var c=(e-l)/(h-l);return a=p+Math.round(c*(u-p)),!1}return!0}),y(a)||(a=Math.floor(e*r+t)),a>=this.dataItems.length&&(a=this.dataItems.length-1),a},i.prototype.positionToCategory=function(e){return this.getPositionLabel(e)},i.prototype.getPositionLabel=function(e){var t=this.dataItems.getIndex(this.positionToIndex(e));if(t)return t.category},Object.defineProperty(i.prototype,"basePoint",{get:function(){return this.renderer.positionToPoint(1)},enumerable:!0,configurable:!0}),i.prototype.initRenderer=function(){s.prototype.initRenderer.call(this),this.renderer.baseGrid.disabled=!0},Object.defineProperty(i.prototype,"frequency",{get:function(){return this._frequency},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sortBySeries",{get:function(){return this.getPropertyValue("sortBySeries")},set:function(e){this.setPropertyValue("sortBySeries",e,!0)},enumerable:!0,configurable:!0}),i.prototype.processConfig=function(e){e&&v(e.sortBySeries)&&J(e.sortBySeries)&&(this.map.hasKey(e.sortBySeries)?e.sortBySeries=this.map.getKey(e.sortBySeries):(this.addDelayedMap("sortBySeries",e.sortBySeries),delete e.sortBySeries)),s.prototype.processConfig.call(this,e)},i}(Gn);_.registeredClasses.CategoryAxis=Ve,_.registeredClasses.CategoryAxisDataItem=yo;var qn=function(s){function i(){var e=s.call(this)||this;return e.className="XYSeriesDataItem",e.values.customValue={},e.values.valueX={stack:0},e.values.valueY={stack:0},e.values.openValueX={},e.values.openValueY={},e.values.dateX={},e.values.dateY={},e.values.openDateX={},e.values.openDateY={},e.setLocation("dateX",.5,0),e.setLocation("dateY",.5,0),e.setLocation("categoryX",.5,0),e.setLocation("categoryY",.5,0),e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"valueX",{get:function(){return this.values.valueX.value},set:function(e){this.setValue("valueX",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"customValue",{get:function(){return this.values.customValue.value},set:function(e){this.setValue("customValue",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"valueY",{get:function(){return this.values.valueY.value},set:function(e){this.setValue("valueY",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dateX",{get:function(){return this.getDate("dateX")},set:function(e){this.setDate("dateX",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dateY",{get:function(){return this.getDate("dateY")},set:function(e){this.setDate("dateY",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"categoryX",{get:function(){return this.categories.categoryX},set:function(e){this.setCategory("categoryX",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"categoryY",{get:function(){return this.categories.categoryY},set:function(e){this.setCategory("categoryY",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"openValueX",{get:function(){return this.values.openValueX.value},set:function(e){this.setValue("openValueX",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"openValueY",{get:function(){return this.values.openValueY.value},set:function(e){this.setValue("openValueY",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"openDateX",{get:function(){return this.getDate("openDateX")},set:function(e){this.setDate("openDateX",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"openDateY",{get:function(){return this.getDate("openDateY")},set:function(e){this.setDate("openDateY",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"openCategoryX",{get:function(){return this.categories.openCategoryX},set:function(e){this.setCategory("openCategoryX",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"openCategoryY",{get:function(){return this.categories.openCategoryY},set:function(e){this.setCategory("openCategoryY",e)},enumerable:!0,configurable:!0}),i.prototype.getMin=function(e,t,n){var r,a=this;return y(n)||(n=0),j(e,function(o){var l;l=t?a.getWorkingValue(o):a.getValue(o),((l+=n)<r||!y(r))&&(r=l)}),r},i.prototype.getMax=function(e,t,n){var r,a=this;return y(n)||(n=0),j(e,function(o){var l;l=t?a.getWorkingValue(o):a.getValue(o),((l+=n)>r||!y(r))&&(r=l)}),r},i}(Yn),oi=function(s){function i(){var e=s.call(this)||this;return e.groupFields={},e._xAxis=new Me,e._yAxis=new Me,e._xValueFields=[],e._yValueFields=[],e._baseInterval={},e.dataGrouped=!1,e.usesShowFields=!1,e._dataSetChanged=!1,e._maxxX=1e5,e._maxxY=1e5,e._propertiesChanged=!1,e.outOfRange=!1,e.className="XYSeries",e.isMeasured=!1,e.groupFields.valueX="close",e.groupFields.valueY="close",e.groupFields.customValue="close",e.groupFields.openValueX="open",e.groupFields.openValueY="open",e.cursorTooltipEnabled=!0,e.cursorHoverEnabled=!0,e.excludeFromTotal=!1,e.mainContainer.mask=new $,e.mainContainer.mask.setElement(e.paper.add("path")),e.stacked=!1,e.snapTooltip=!1,e._showBullets=!1,e.tooltip.pointerOrientation="horizontal",e.properties.stackToNegative=!0,e.hideTooltipWhileZooming=!0,e.setPropertyValue("maskBullets",!0),e.tooltip.events.on("hidden",function(){e.returnBulletDefaultState()},void 0,!1),e._disposers.push(e._xAxis),e._disposers.push(e._yAxis),e.observe(Ie,function(){e.inited&&(e._propertiesChanged=!0,e.legendDataItem&&(e.legendDataItem.childrenCreated=!1),e.chart&&e.chart.legend&&e.chart.legend.invalidateDataItems(),e.invalidate())},void 0,!1),e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("X/Y Series"))},i.prototype.createDataItem=function(){return new qn},i.prototype.resetExtremes=function(){this._tmin.clear(),this._tmax.clear(),this._smin.clear(),this._smax.clear()},i.prototype.dataChangeUpdate=function(){this.dataGrouped=!1,this._baseInterval={},this._currentDataSetId="",this.resetExtremes(),this.xAxis&&this.xAxis.seriesDataChangeUpdate(this),this.yAxis&&this.yAxis.seriesDataChangeUpdate(this)},i.prototype.validateData=function(){this._baseInterval={};var e=this.dataFields;if(e.valueYShow||e.openValueXShow||e.openValueXShow||e.openValueYShow?this.usesShowFields=!0:this.usesShowFields=!1,this.defineFields(),this.data.length>0&&this.dataChangeUpdate(),s.prototype.validateData.call(this),this.updateItemReaderText(),this.chart&&(!v(this.dataFields[this._xField])||!v(this.dataFields[this._yField])))throw Error('Data fields for series "'+(this.name?this.name:this.uid)+'" are not properly defined.');this.inited&&this.isHidden&&this.hide(0),this.dataGrouped=!1},i.prototype.processDataItem=function(e,t){try{s.prototype.processDataItem.call(this,e,t),this.xAxis.processSeriesDataItem(e,"X"),this.yAxis.processSeriesDataItem(e,"Y"),this.setInitialWorkingValues(e)}catch(n){this._chart&&this._chart.raiseCriticalError(n)}},i.prototype.updateDataItem=function(e){s.prototype.updateDataItem.call(this,e),this.xAxis.processSeriesDataItem(e,"X"),this.yAxis.processSeriesDataItem(e,"Y")},i.prototype.setInitialWorkingValues=function(e){},i.prototype.disposeData=function(){s.prototype.disposeData.call(this);var e=this.xAxis,t=this.yAxis;if(e){var n=this.dataItemsByAxis.getKey(e.uid);n&&n.clear(),e instanceof Ve&&this.clearCatAxis(e)}if(t){var r=this.dataItemsByAxis.getKey(t.uid);r&&r.clear(),t instanceof Ve&&this.clearCatAxis(t)}},i.prototype.clearCatAxis=function(e){var t=this.uid;e.dataItems.each(function(n){n.seriesDataItems[t]&&(n.seriesDataItems[t]=[])})},i.prototype.defineFields=function(){var e=this.xAxis,t=this.yAxis;if(e&&t){var n=e.axisFieldName,r=n+"X",a="open"+wn(n)+"X",o=t.axisFieldName,l=o+"Y",h="open"+wn(o)+"Y";this._xField=r,this._yField=l,this.dataFields[a]&&(this._xOpenField=a),this.dataFields[h]&&(this._yOpenField=h),this.dataFields[h]||this.baseAxis!=t||(this._yOpenField=l),this.dataFields[a]||this.baseAxis!=e||(this._xOpenField=r),this.stacked&&this.baseAxis==e&&(this._xOpenField=r),this.stacked&&this.baseAxis==t&&(this._yOpenField=l),e instanceof Ve&&t instanceof Ve&&(this._yOpenField||(this._yOpenField=l)),this._xValueFields=[],this._yValueFields=[],this.addValueField(e,this._xValueFields,this._xField),this.addValueField(e,this._xValueFields,this._xOpenField),this.addValueField(t,this._yValueFields,this._yField),this.addValueField(t,this._yValueFields,this._yOpenField)}},i.prototype.addValueField=function(e,t,n){e instanceof ee&&v(this.dataFields[n])&&t.indexOf(n)==-1&&t.push(n)},i.prototype.setCategoryAxisField=function(e,t){v(this.dataFields[e])||(this.dataFields[e]=t.dataFields.category)},i.prototype.setDateAxisField=function(e,t){v(this.dataFields[e])||(this.dataFields[e]=t.dataFields.date)},i.prototype.afterDraw=function(){s.prototype.afterDraw.call(this),this.createMask()},i.prototype.createMask=function(){if(this.mainContainer.mask){var e=this.getMaskPath();A(this.axisRanges.iterator(),function(t){t.axisFill.fillPath&&(t.axisFill.validate(),e+=t.axisFill.fillPath)}),this.mainContainer.mask.path=e}},i.prototype.getMaskPath=function(){return this.xAxis&&this.yAxis?Yt({x:0,y:0,width:this.xAxis.axisLength,height:this.yAxis.axisLength}):""},i.prototype.getAxisField=function(e){return e==this.xAxis?this.xField:e==this.yAxis?this.yField:void 0},i.prototype.validateDataItems=function(){var e=this.chart;e&&(this._maxxX=q(1e5,2*e.plotContainer.maxWidth),this._maxxY=q(1e5,2*e.plotContainer.maxHeight));var t=this.xAxis,n=this.yAxis;t&&n&&(t.updateAxisBySeries(),n.updateAxisBySeries()),s.prototype.validateDataItems.call(this),t&&n&&(t.postProcessSeriesDataItems(this),n.postProcessSeriesDataItems(this))},i.prototype.validateDataRange=function(){var e=this.xAxis,t=this.yAxis;e&&t&&(e.dataRangeInvalid&&e.validateDataRange(),t.dataRangeInvalid&&t.validateDataRange()),s.prototype.validateDataRange.call(this)},i.prototype.validate=function(){var e=this.xAxis,t=this.yAxis;if(e&&t){e.invalid&&e.validate(),t.invalid&&t.validate(),this.y=t.pixelY,this.x=e.pixelX,this._showBullets=!0;var n=this.minBulletDistance;y(n)&&this.baseAxis.axisLength/(this.endIndex-this.startIndex)<n&&(this._showBullets=!1)}if(this.updateTooltip(),!(e instanceof Pe&&e.groupData&&!this.dataGrouped||t instanceof Pe&&t.groupData&&!this.dataGrouped)){s.prototype.validate.call(this);var r=this.chart,a=this.maskBullets;r&&a&&r.className=="XYChart"&&(r.leftAxesContainer.layout!="vertical"&&r.rightAxesContainer.layout!="vertical"||(this.yAxis?this.bulletsContainer.mask=this.yAxis.renderer.gridContainer:this.bulletsContainer.mask=void 0),r.topAxesContainer.layout!="horizontal"&&r.bottomAxesContainer.layout!="horizontal"||(this.xAxis?this.bulletsContainer.mask=this.xAxis.renderer.gridContainer:this.bulletsContainer.mask=void 0))}},Object.defineProperty(i.prototype,"xAxis",{get:function(){if(this.chart){if(!this._xAxis.get()){var e=this.chart.xAxes.getIndex(0);if(!e)throw Error("There are no X axes on chart.");this.xAxis=e}return this._xAxis.get()}},set:function(e){this.setXAxis(e)},enumerable:!0,configurable:!0}),i.prototype.setXAxis=function(e){var t=this._xAxis.get();t!=e&&(t&&(this.dataItemsByAxis.removeKey(t.uid),this._xAxis.dispose(),t.series.removeValue(this)),this._xAxis.set(e,e.registerSeries(this)),this.dataItemsByAxis.setKey(e.uid,new me),this.invalidateData())},Object.defineProperty(i.prototype,"yAxis",{get:function(){if(this.chart){if(!this._yAxis.get()){var e=this.chart.yAxes.getIndex(0);if(!e)throw Error("There are no Y axes on chart.");this.yAxis=e}return this._yAxis.get()}},set:function(e){this.setYAxis(e)},enumerable:!0,configurable:!0}),i.prototype.setYAxis=function(e){var t=this._yAxis.get();t!=e&&(t&&(this.dataItemsByAxis.removeKey(t.uid),this._yAxis.dispose(),t.series.removeValue(this)),this._yAxis.set(e,e.registerSeries(this)),e.chart instanceof Ut&&e.chart.handleYAxisSet(this),this.dataItemsByAxis.setKey(e.uid,new me),this.invalidateData())},Object.defineProperty(i.prototype,"baseAxis",{get:function(){var e=this.xAxis,t=this.yAxis;return!this._baseAxis&&e&&t&&(t instanceof Pe&&(this._baseAxis=t),e instanceof Pe&&(this._baseAxis=e),t instanceof Ve&&(this._baseAxis=t),e instanceof Ve&&(this._baseAxis=e),this._baseAxis||(this._baseAxis=e)),this._baseAxis},set:function(e){this._baseAxis!=e&&(this._baseAxis=e,this.invalidate())},enumerable:!0,configurable:!0}),i.prototype.addData=function(e,t,n){s.prototype.addData.call(this,e,t,n),this.scrollbarSeries&&(this.scrollbarSeries.addData(e,t,!0),this.scrollbarSeries._parseDataFrom=this._parseDataFrom)},i.prototype.setData=function(e){s.prototype.setData.call(this,e),this.scrollbarSeries&&this.scrollbarSeries.setData(e)},i.prototype.setDataSet=function(e){var t=s.prototype.setDataSet.call(this,e);if(t){this._dataSetChanged=!0;var n=this.dataItems;if(this.resetExtremes(),n&&n.length>0){var r=this.xAxis,a=this.yAxis;this._prevStartIndex=void 0,this._prevEndIndex=void 0,this._startIndex=void 0,this._endIndex=void 0,this.appeared||this.processValues(!1),r instanceof Pe&&r==this.baseAxis&&(this._tmin.setKey(r.uid,n.getIndex(0).dateX.getTime()),this._tmax.setKey(r.uid,n.getIndex(n.length-1).dateX.getTime()),this.dispatch("extremeschanged")),a instanceof Pe&&a==this.baseAxis&&(this._tmin.setKey(a.uid,n.getIndex(0).dateY.getTime()),this._tmax.setKey(a.uid,n.getIndex(n.length-1).dateY.getTime()),this.dispatch("extremeschanged"))}}return t},i.prototype.processValues=function(e){s.prototype.processValues.call(this,e);var t=this.xAxis,n=this.yAxis;if(t&&n){var r=this.dataItems,a=1/0,o=-1/0,l=1/0,h=-1/0,p=this.startIndex,u=this.endIndex,d=p,c=u;e||(p=0,u=this.dataItems.length);for(var f=p;f<u;f++){var g=r.getIndex(f);this.getStackValue(g,e);var m=g.getValue("valueX","stack"),x=g.getValue("valueY","stack");a=ie(g.getMin(this._xValueFields,e,m),a),l=ie(g.getMin(this._yValueFields,e,x),l),o=q(g.getMax(this._xValueFields,e,m),o),h=q(g.getMax(this._yValueFields,e,x),h),this.stacked&&(this.baseAxis==t&&(x<l&&(l=x),x>h&&(h=x)),this.baseAxis==n&&(m<a&&(a=m),m>o&&(o=m)))}t.processSeriesDataItems(),n.processSeriesDataItems();var b=t.uid,C=n.uid;if(this.xAxis instanceof ee&&(a==1/0||o==-1/0))return this._smin.setKey(b,void 0),this._smax.setKey(b,void 0),void this.dispatchImmediately("selectionextremeschanged");if(this.yAxis instanceof ee&&(l==1/0||h==-1/0))return this._smin.setKey(C,void 0),this._smax.setKey(C,void 0),void this.dispatchImmediately("selectionextremeschanged");if(!e&&(this._tmin.getKey(b)!=a||this._tmax.getKey(b)!=o||this._tmin.getKey(C)!=l||this._tmax.getKey(C)!=h)){this._tmin.setKey(b,a),this._tmax.setKey(b,o),this._tmin.setKey(C,l),this._tmax.setKey(C,h);var S=this.stackedSeries;S&&(S.isDisposed()?this.stackedSeries=void 0:S.processValues(!1)),this.dispatchImmediately("extremeschanged")}if(p!=d||u!=c)for(a=1/0,o=-1/0,l=1/0,h=-1/0,f=d;f<c;f++)g=r.getIndex(f),this.getStackValue(g,e),m=g.getValue("valueX","stack"),x=g.getValue("valueY","stack"),a=ie(g.getMin(this._xValueFields,e,m),a),l=ie(g.getMin(this._yValueFields,e,x),l),o=q(g.getMax(this._xValueFields,e,m),o),h=q(g.getMax(this._yValueFields,e,x),h),this.stacked&&(this.baseAxis==t&&(x<l&&(l=x),x>h&&(h=x)),this.baseAxis==n&&(m<a&&(a=m),m>o&&(o=m)));if(this.xAxis instanceof ee&&(a==1/0||o==-1/0))return this._smin.setKey(b,void 0),this._smax.setKey(b,void 0),void this.dispatchImmediately("selectionextremeschanged");if(this.yAxis instanceof ee&&(l==1/0||h==-1/0))return this._smin.setKey(C,void 0),this._smax.setKey(C,void 0),void this.dispatchImmediately("selectionextremeschanged");if((this._smin.getKey(b)!=a||this._smax.getKey(b)!=o||this._smin.getKey(C)!=l||this._smax.getKey(C)!=h)&&(this._smin.setKey(b,a),this._smax.setKey(b,o),this._smin.setKey(C,l),this._smax.setKey(C,h),this.appeared||this.start!=0||this.end!=1||this.dataItems!=this.mainDataSet)){var P,O,I=!1;n instanceof ee&&!(n instanceof Pe)&&((!y(P=this._tmin.getKey(C))||(this.usesShowFields||this._dataSetChanged||t instanceof Pe&&t.groupData&&this.isShowing)&&l<P||this.stackedSeries&&!this.isHidden)&&(this._tmin.setKey(C,l),I=!0),(!y(O=this._tmax.getKey(C))||(this.usesShowFields||this._dataSetChanged||t instanceof Pe&&t.groupData&&this.isShowing)&&h>O||this.stackedSeries&&!this.isHidden)&&(this._tmax.setKey(C,h),I=!0)),t instanceof ee&&!(t instanceof Pe)&&((!y(P=this._tmin.getKey(b))||(this.usesShowFields||this._dataSetChanged||n instanceof Pe&&n.groupData&&this.isShowing)&&a<P||this.stackedSeries&&!this.isHidden)&&(this._tmin.setKey(b,a),I=!0),(!y(O=this._tmax.getKey(b))||(this.usesShowFields||this._dataSetChanged||n instanceof Pe&&n.groupData&&this.isShowing)&&o>O||this.stackedSeries&&!this.isHidden)&&(this._tmax.setKey(b,o),I=!0)),I&&this.dispatchImmediately("extremeschanged"),this.start==0&&this.end==1&&(this._dataSetChanged=!1),this.dispatchImmediately("selectionextremeschanged")}!e&&this.stacked&&this.processValues(!0)}},i.prototype.hideTooltip=function(e){s.prototype.hideTooltip.call(this,e),this.returnBulletDefaultState(),this._prevTooltipDataItem=void 0},i.prototype.showTooltipAtPosition=function(e,t){var n;if(this.visible&&!this.isHiding&&!this.isShowing){var r=this._xAxis.get(),a=this._yAxis.get();r==this.baseAxis&&(n=r.getSeriesDataItem(this,r.toAxisPosition(e),this.snapTooltip)),a==this.baseAxis&&(n=a.getSeriesDataItem(this,a.toAxisPosition(t),this.snapTooltip));var o=this.showTooltipAtDataItem(n);if(o)return o;if(!this.tooltipText&&!this.tooltipHTML)return}this.hideTooltip()},i.prototype.getAdjustedXLocation=function(e,t,n){return e.locations[t]},i.prototype.getAdjustedYLocation=function(e,t,n){return e.locations[t]},i.prototype.showTooltipAtDataItem=function(e){var t,n,r=this.chart.cursor;if(r&&r.hideSeriesTooltipsOnSelection&&r.selection.visible&&r.downPoint)this.hideTooltip();else if(this.returnBulletDefaultState(e),e&&e.visible){if(this.updateLegendValue(e),this.cursorTooltipEnabled){this.tooltipDataItem=e;var a=this.tooltipXField,o=this.tooltipYField;if(v(e[a])&&v(e[o])){var l=this.getPoint(e,a,o,this.getAdjustedXLocation(e,a),this.getAdjustedYLocation(e,o));if(l&&(this.chart.className!="XYChart"||!(l.y<-1||l.y>this.yAxis.pixelHeight+1||l.x<-1||l.x>this.xAxis.pixelWidth+1))){if(this.tooltipX=l.x,this.tooltipY=l.y,this._prevTooltipDataItem!=e&&(this.dispatchImmediately("tooltipshownat",{type:"tooltipshownat",target:this,dataItem:e}),this._prevTooltipDataItem=e),this.cursorHoverEnabled)try{for(var h=nr(e.sprites),p=h.next();!p.done;p=h.next()){var u=p.value;!u.parent.visible||u.isHidden||u.__disabled||u.disabled||u.isHiding||(u.interactions.isRealHover||(u.dispatchImmediately("over"),u.interactions.isRealHover=!0),u.isHover=!0)}}catch(d){t={error:d}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}return this.showTooltip()?ut({x:l.x,y:l.y},this):void 0}}}}else this.updateLegendValue(e,!0)},i.prototype.returnBulletDefaultState=function(e){var t,n;if(this._prevTooltipDataItem&&this._prevTooltipDataItem!=e)try{for(var r=nr(this._prevTooltipDataItem.sprites),a=r.next();!a.done;a=r.next()){var o=a.value;if(o.isDisposed())this._prevTooltipDataItem=void 0;else{var l=o.interactions.isRealHover;o.isHover=!1,l&&o.dispatchImmediately("out")}}}catch(h){t={error:h}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},i.prototype.shouldCreateBullet=function(e,t){var n=t.xField;v(n)||(n=this.xField);var r=t.yField;if(v(r)||(r=this.yField),this.xAxis instanceof ee&&!e.hasValue([n])||this.yAxis instanceof ee&&!e.hasValue([r]))return!1;if(t.disabled){var a=t.propertyFields.disabled,o=e.dataContext;return!(!o||o[a]!==!1)}return!0},i.prototype.updateTooltip=function(){this.hideTooltipWhileZooming||!this.tooltip||this.tooltip.isHidden||this.isHiding||this.isHidden||!this.tooltipDataItem||this.showTooltipAtDataItem(this.tooltipDataItem)},i.prototype.positionBullet=function(e){s.prototype.positionBullet.call(this,e);var t=e.dataItem,n=e.xField;v(n)||(n=this.xField);var r=e.yField;v(r)||(r=this.yField);var a=this.xAxis,o=this.yAxis;if(a instanceof ee&&!t.hasValue([n])||o instanceof ee&&!t.hasValue([r]))e.visible=!1;else{var l=this.getBulletLocationX(e,n),h=this.getBulletLocationY(e,r);if(this.getPoint(t,n,r,l,h)){var p=this.xOpenField,u=this.yOpenField,d=void 0,c=void 0;if(a instanceof Pe){y(l)||(l=0);var f=void 0,g=t.getWorkingValue(n);if(p?f=t.getWorkingValue(p):a==this.baseAxis&&(f=a.baseValue),y(f)||(f=g),(f+=O=t.getValue("valueX","stack"))==(g+=O)){var m=a.baseInterval,x=a.dateFormatter;f=Be(new Date(f),m.timeUnit,m.count,x.firstDayOfWeek,x.utc,void 0,x.timezoneMinutes,x.timezone).getTime(),g=Ze(new Date(f),m.timeUnit,m.count,x.utc).getTime()}var b=void 0;b=a==this.baseAxis?f+(g-f)*l:f+(g-f)*(1-l),d=a.valueToPosition(b)}else if(a instanceof ee)y(l)||(l=0),f=void 0,g=t.getWorkingValue(n),f=p?t.getWorkingValue(p):a.baseValue,b=(f+=O=t.getValue("valueX","stack"))+((g+=O)-f)*(1-l),d=a.valueToPosition(b);else if(a instanceof Ve){var C=this.getAdjustedXLocation(t,n,e.locationX),S=this.getAdjustedXLocation(t,p,e.locationX);d=a.categoryToPosition(t[n],C);var P=void 0;p&&(P=a.categoryToPosition(t[p],S)),y(P)||(P=1),d=P+(d-P)*l}if(o instanceof Pe)y(h)||(h=0),f=void 0,g=t.getWorkingValue(r),u?f=t.getWorkingValue(u):o==this.baseAxis&&(f=o.baseValue),y(f)||(f=g),(f+=O=t.getValue("valueY","stack"))==(g+=O)&&(m=o.baseInterval,x=o.dateFormatter,f=Be(new Date(f),m.timeUnit,m.count,x.firstDayOfWeek,x.utc,void 0,x.timezoneMinutes,x.timezone).getTime(),g=Ze(new Date(f),m.timeUnit,m.count,x.utc).getTime()),b=void 0,b=o==this.baseAxis?f+(g-f)*h:f+(g-f)*(1-h),c=o.valueToPosition(b);else if(o instanceof ee){var O;y(h)||(h=0),f=void 0,g=t.getWorkingValue(r),f=u?t.getWorkingValue(u):o.baseValue,b=(f+=O=t.getValue("valueY","stack"))+((g+=O)-f)*(1-h),c=o.valueToPosition(b)}else if(o instanceof Ve){c=o.categoryToPosition(t[r],h);var I=this.getAdjustedYLocation(t,r,e.locationY),k=this.getAdjustedYLocation(t,u,e.locationY);c=o.categoryToPosition(t[r],I);var D=void 0;u&&(D=o.categoryToPosition(t[u],k)),y(D)||(D=1),c=D+(c-D)*h}e.visible=!0,this.positionBulletReal(e,d,c)}else e.visible=!1}},i.prototype.positionBulletReal=function(e,t,n){e.x=this.xAxis.renderer.positionToPoint(t,n).x,e.y=this.yAxis.renderer.positionToPoint(n,t).y},i.prototype.getBulletLocationX=function(e,t){var n=e.locationX,r=e.dataItem;return y(n)||(n=r.workingLocations[t]),n},i.prototype.getBulletLocationY=function(e,t){var n=e.locationY,r=e.dataItem;return y(n)||(n=r.workingLocations[t]),n},i.prototype.updateStacking=function(){var e=this;this.invalidateDataItems(),this.chart&&this.chart.series.each(function(t){t.baseAxis==e.baseAxis&&(t.stackedSeries=void 0,t.invalidateDataItems(),t.invalidateProcessedData())})},Object.defineProperty(i.prototype,"stacked",{get:function(){return this.getPropertyValue("stacked")},set:function(e){if(this.setPropertyValue("stacked",e,!0)){this.updateStacking();var t,n=this.xAxis,r=this.yAxis;e||(n!=this.baseAxis&&n instanceof ee&&(t=this.xField),r!=this.baseAxis&&r instanceof ee&&(t=this.yField),t&&this.dataItems.each(function(a){a.setCalculatedValue(t,0,"stack")}))}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"snapTooltip",{get:function(){return this.getPropertyValue("snapTooltip")},set:function(e){this.setPropertyValue("snapTooltip",e)},enumerable:!0,configurable:!0}),i.prototype.show=function(e){var t,n=this;this.isHidden&&(this.appeared&&this.xAxis instanceof Pe&&this.xAxis.groupData&&(this._tmin.setKey(this.yAxis.uid,void 0),this._tmax.setKey(this.yAxis.uid,void 0)),this.appeared&&this.yAxis instanceof Pe&&this.yAxis.groupData&&(this._tmin.setKey(this.xAxis.uid,void 0),this._tmax.setKey(this.xAxis.uid,void 0))),this.xAxis instanceof ee&&this.xAxis!=this.baseAxis&&(t=this._xValueFields),this.yAxis instanceof ee&&this.yAxis!=this.baseAxis&&(t=this._yValueFields);var r,a=this.startIndex,o=this.endIndex,l=0,h=this.defaultState.transitionDuration;y(e)&&(h=e),Z.animationsEnabled||(h=0),A($t(this.dataItems.iterator()),function(u){var d=u[0],c=u[1],f=h;(d<n.startIndex-10||d>n.endIndex+10)&&(f=0,l=0),n.sequencedInterpolation&&f>0&&(l=n.sequencedInterpolationDelay*d+h*(d-a)/(o-a)),r=c.show(f,l,t)}),this.dataSets.each(function(u,d){d!=n.dataItems&&d.each(function(c){c.events.disable(),c.show(0,0,t),c.events.enable()})}),this.mainDataSet!=this.dataItems&&this.mainDataSet.each(function(u){u.events.disable(),u.show(0,0,t),u.events.enable()});var p=s.prototype.show.call(this,e);return r&&!r.isFinished()&&(p=r),this.hidden&&(this.dispatchImmediately("selectionextremeschanged"),this.hidden=!1),p},i.prototype.hide=function(e){var t,n,r=this,a=this.xAxis;a instanceof ee&&a!=this.baseAxis&&(t=this._xValueFields,n=this.stacked||a.minZoomed<a.baseValue&&a.maxZoomed>a.baseValue||this.stackedSeries?a.baseValue:a.min);var o=this.yAxis;o instanceof ee&&o!=this.baseAxis&&(t=this._yValueFields,n=this.stacked||o.minZoomed<o.baseValue&&o.maxZoomed>o.baseValue||this.stackedSeries?o.baseValue:o.min);var l=this.startIndex,h=this.endIndex,p=this.hiddenState.transitionDuration;y(e)&&(p=e),Z.animationsEnabled||(p=0);var u,d=0;A($t(this.dataItems.iterator()),function(f){var g=f[0],m=f[1],x=p;(g<r.startIndex-10||g>r.endIndex+10)&&(x=0),x==0?m.hide(0,0,n,t):(r.sequencedInterpolation&&x>0&&(d=r.sequencedInterpolationDelay*g+p*(g-l)/(h-l)),u=m.hide(x,d,n,t))}),this.dataSets.each(function(f,g){g!=r.dataItems&&g.each(function(m){m.events.disable(),m.hide(0,0,n,t),m.events.enable()})}),this.mainDataSet!=this.dataItems&&this.mainDataSet.each(function(f){f.events.disable(),f.hide(0,0,n,t),f.events.enable()});var c=s.prototype.hide.call(this,p);return c&&!c.isFinished()&&c.delay(d),u&&!u.isFinished()&&(c=u),this.validateDataElements(),c},i.prototype.handleDataItemWorkingValueChange=function(e,t){s.prototype.handleDataItemWorkingValueChange.call(this,e,t),A(this.baseAxis.series.iterator(),function(n){(n.stacked||n.stackedSeries)&&n.invalidateProcessedData()})},i.prototype.getStackValue=function(e,t){var n=this,r=this.xAxis,a=this.yAxis;if(this.stacked&&r&&a){var o,l=this.chart,h=l.series.indexOf(this);r!=this.baseAxis&&r instanceof ee&&(o=this.xField),a!=this.baseAxis&&a instanceof ee&&(o=this.yField),o&&(e.setCalculatedValue(o,0,"stack"),rt(l.series.range(0,h).backwards().iterator(),function(p){if(p.xAxis==r&&p.yAxis==a&&p.className==n.className){p.stackedSeries=n;var u=p.dataItems.getIndex(e.index);if(u&&u.hasValue(n._xValueFields)&&u.hasValue(n._yValueFields)){var d,c=e.getValue(o),f=u.getValue(o)+u.getValue(o,"stack");if(d=t?u.getWorkingValue(o)+u.getValue(o,"stack"):u.getValue(o)+u.getValue(o,"stack"),!n.stackToNegative||c>=0&&f>=0||c<0&&f<0)return e.setCalculatedValue(o,d,"stack"),!1;if(!p.stacked)return!1}else if(!p.stacked)return!1}return!0}))}},Object.defineProperty(i.prototype,"stackToNegative",{get:function(){return this.getPropertyValue("stackToNegative")},set:function(e){this.setPropertyValue("stackToNegative",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"xField",{get:function(){return this._xField},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"yField",{get:function(){return this._yField},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"xOpenField",{get:function(){return this._xOpenField},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"yOpenField",{get:function(){return this._yOpenField},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipXField",{get:function(){return this._tooltipXField?this._tooltipXField:this._xField},set:function(e){this._tooltipXField=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipYField",{get:function(){return this._tooltipYField?this._tooltipYField:this._yField},set:function(e){this._tooltipYField=e},enumerable:!0,configurable:!0}),i.prototype.min=function(e){return this._tmin.getKey(e.uid)},i.prototype.max=function(e){return this._tmax.getKey(e.uid)},i.prototype.selectionMin=function(e){return this._smin.getKey(e.uid)},i.prototype.selectionMax=function(e){return this._smax.getKey(e.uid)},i.prototype.processConfig=function(e){if(e){if(v(e.baseAxis)&&J(e.baseAxis)&&(this.map.hasKey(e.baseAxis)?e.baseAxis=this.map.getKey(e.baseAxis):(this.processingErrors.push("[XYSeries ("+(this.name||"unnamed")+')] No axis with id "'+e.baseAxis+'" found for `baseAxis`.'),delete e.baseAxis)),v(e.xAxis)&&J(e.xAxis)&&(this.map.hasKey(e.xAxis)?e.xAxis=this.map.getKey(e.xAxis):(this.processingErrors.push("[XYSeries ("+(this.name||"unnamed")+')] No axis with id "'+e.xAxis+'" found for `xAxis`.'),delete e.xAxis)),v(e.yAxis)&&J(e.yAxis)&&(this.map.hasKey(e.yAxis)?e.yAxis=this.map.getKey(e.yAxis):(this.processingErrors.push("[XYSeries ("+(this.name||"unnamed")+')] No axis with id "'+e.yAxis+'" found for `yAxis`.'),delete e.yAxis)),v(e.axisRanges)&&Ae(e.axisRanges))for(var t=0,n=e.axisRanges.length;t<n;t++){var r=e.axisRanges[t];v(r.type)||(r.type="AxisDataItem"),v(r.axis)&&J(r.axis)&&this.map.hasKey(r.axis)?r.component=this.map.getKey(r.axis):v(r.component)&&J(r.component)&&this.map.hasKey(r.component)&&(r.component=this.map.getKey(r.component))}v(e.dataFields)&&ye(e.dataFields)||this.processingErrors.push("`dataFields` is not set for series ["+(this.name||"unnamed")+"]")}s.prototype.processConfig.call(this,e)},i.prototype.getPoint=function(e,t,n,r,a,o,l){if(this.xAxis&&this.yAxis){var h=this.xAxis.getX(e,t,r),p=this.yAxis.getY(e,n,a);return{x:h=R(h,-this._maxxX,this._maxxX),y:p=R(p,-this._maxxY,this._maxxY)}}},i.prototype.updateItemReaderText=function(){if(!this._itemReaderTextChanged){var e="";X(this.dataFields,function(t,n){e+="{"+t+"} "}),this.itemReaderText=e,this._itemReaderTextChanged=!1}},Object.defineProperty(i.prototype,"cursorTooltipEnabled",{get:function(){return this.getPropertyValue("cursorTooltipEnabled")},set:function(e){this.setPropertyValue("cursorTooltipEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cursorHoverEnabled",{get:function(){return this.getPropertyValue("cursorHoverEnabled")},set:function(e){this.setPropertyValue("cursorHoverEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"excludeFromTotal",{get:function(){return this.getPropertyValue("excludeFromTotal")},set:function(e){this.setPropertyValue("excludeFromTotal",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hideTooltipWhileZooming",{get:function(){return this.getPropertyValue("hideTooltipWhileZooming")},set:function(e){this.setPropertyValue("hideTooltipWhileZooming",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maskBullets",{get:function(){return this.getPropertyValue("maskBullets")},set:function(e){this.setPropertyValue("maskBullets",e);var t=this.chart;t&&(this.bulletsContainer.parent=e?t.bulletsContainer:t.axisBulletsContainer)},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){this.groupFields=Vt(e.groupFields,{}),s.prototype.copyFrom.call(this,e)},i.prototype.dispose=function(){this.scrollbarSeries&&this.scrollbarSeries.dispose(),s.prototype.dispose.call(this)},i}(zn);_.registeredClasses.XYSeries=oi,_.registeredClasses.XYSeriesDataItem=qn;var li=function(s){function i(){var e=s.call(this)||this;e._chart=new Me,e.className="XYChartScrollbar";var t=new ae;e.padding(0,0,0,0);var n=e.createChild(Ut);if(n.shouldClone=!1,n.margin(0,0,0,0),n.padding(0,0,0,0),n.interactionsEnabled=!1,e._scrollbarChart=n,!Xi()){var r=new Wn;r.filterUnits="userSpaceOnUse",n.plotContainer.filters.push(r)}e._disposers.push(e._scrollbarChart),e.minHeight=60,e.minWidth=60;var a=e.createChild($);a.shouldClone=!1,a.setElement(e.paper.add("path")),a.fill=t.getFor("background"),a.fillOpacity=.8,a.interactionsEnabled=!1,a.isMeasured=!1,a.toBack(),e._unselectedOverlay=a,e._disposers.push(e._unselectedOverlay),n.toBack(),e.background.cornerRadius(0,0,0,0);var o=e.thumb.background;o.cornerRadius(0,0,0,0),o.fillOpacity=0,o.fill=t.getFor("background");var l=o.states.getKey("hover");l&&(l.properties.fillOpacity=.2);var h=o.states.getKey("down");return h&&(h.properties.fillOpacity=.4),e._disposers.push(e._chart),e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"series",{get:function(){return this._series||(this._series=new re,this._disposers.push(this._series.events.on("inserted",this.handleSeriesAdded,this,!1)),this._disposers.push(this._series.events.on("removed",this.handleSeriesRemoved,this,!1))),this._series},enumerable:!0,configurable:!0}),i.prototype.handleSeriesAdded=function(e){var t=this,n=e.newValue;if(n.xAxis&&n.yAxis){var r=this.scrollbarChart;r.zoomOutButton.disabled=!0,this.chart=n.chart,r.dateFormatter.inputDateFormat=this.chart.dateFormatter.inputDateFormat,r.language.locale=this.chart.language.locale;var a=!0,o=!0;A(this.series.iterator(),function(b){b!=n&&(b.xAxis==n.xAxis&&t.scrollbarChart.xAxes.length>0&&(a=!1),b.yAxis==n.yAxis&&t.scrollbarChart.yAxes.length>0&&(o=!1))}),n.events.on("beforedisposed",function(){t.series.removeValue(n)});var l=new ae,h=n.clone();if((Z.onlyShowOnViewport||Z.queue)&&this.addDisposer(this.chart.events.on("removedfromqueue",function(){r.invalidateData()})),Xi()&&(h.stroke=B("#aaaaaa"),h.fill=h.stroke,h.propertyFields.fill=void 0,h.propertyFields.stroke=void 0),n.scrollbarSeries=h,a){var p=n.xAxis.clone();if(r.xAxes.moveValue(p),p.title.disabled=!0,p.rangeChangeDuration=0,(f=p.renderer).ticks.template.disabled=!0,f.inside=!0,f.labels.template.inside=!0,f.line.strokeOpacity=0,f.minLabelPosition=.02,f.maxLabelPosition=.98,f.line.disabled=!0,f.axisFills.template.disabled=!0,f.baseGrid.disabled=!0,f.grid.template.strokeOpacity=.05,f.minWidth=void 0,f.minHeight=void 0,f.padding(0,0,0,0),f.chart=r,f.margin(0,0,0,0),p.width=F(100),f.labels.template.fillOpacity=.5,p.maxZoomCount=void 0,p.minZoomCount=void 0,p instanceof Pe){var u=p,d=n.xAxis;u.groupCount=5*d.groupCount,u.min=void 0,u.max=void 0,this._disposers.push(u.clonedFrom.events.on("extremeschanged",function(){y(u.clonedFrom.minDefined)&&(u.min=u.clonedFrom.minDefined),y(u.clonedFrom.maxDefined)&&(u.max=u.clonedFrom.maxDefined)},void 0,!1))}else if(p instanceof ee){var c=p;c.min=void 0,c.max=void 0,y(c.clonedFrom.minDefined)||(c.min=void 0),y(c.clonedFrom.maxDefined)||(c.max=void 0),this._disposers.push(c.clonedFrom.events.on("extremeschanged",function(){y(c.clonedFrom.minDefined)&&(c.min=c.clonedFrom.min),y(c.clonedFrom.maxDefined)&&(c.max=c.clonedFrom.max)},void 0,!1))}h.xAxis=p}else this.scrollbarChart.xAxes.each(function(b){b.clonedFrom==n.xAxis&&(h.xAxis=b)});if(o){var f,g=n.yAxis.clone();if(r.yAxes.moveValue(g),g.title.disabled=!0,g.rangeChangeDuration=0,(f=g.renderer).ticks.template.disabled=!0,f.inside=!0,f.labels.template.inside=!0,f.line.strokeOpacity=0,f.minLabelPosition=.02,f.maxLabelPosition=.98,f.line.disabled=!0,f.axisFills.template.disabled=!0,f.grid.template.stroke=l.getFor("background"),f.baseGrid.disabled=!0,f.grid.template.strokeOpacity=.05,f.minWidth=void 0,f.minHeight=void 0,f.chart=r,f.padding(0,0,0,0),f.margin(0,0,0,0),g.height=F(100),f.labels.template.fillOpacity=.5,h.yAxis=g,g.maxZoomCount=void 0,g.minZoomCount=void 0,g instanceof Pe){var m=g;m.min=void 0,m.max=void 0,d=n.yAxis,g.groupCount=5*d.groupCount,this._disposers.push(m.clonedFrom.events.on("extremeschanged",function(){y(m.clonedFrom.minDefined)&&(m.min=m.clonedFrom.minDefined),y(m.clonedFrom.maxDefined)&&(m.max=m.clonedFrom.maxDefined)}))}else if(g instanceof ee){var x=g;x.min=void 0,x.max=void 0,y(x.clonedFrom.minDefined)||(x.min=void 0),y(x.clonedFrom.maxDefined)||(x.max=void 0),this._disposers.push(x.clonedFrom.events.on("extremeschanged",function(){y(x.clonedFrom.minDefined)&&(x.min=x.clonedFrom.minDefined),y(x.clonedFrom.maxDefined)&&(x.max=x.clonedFrom.maxDefined)}))}}else this.scrollbarChart.yAxes.each(function(b){b.clonedFrom==n.yAxis&&(h.yAxis=b)});h.rangeChangeDuration=0,h.interpolationDuration=0,h.defaultState.transitionDuration=0,h.showOnInit=!1,this._disposers.push(h.events.on("validated",this.zoomOutAxes,this,!1)),this._disposers.push(n.events.on("datavalidated",function(){h.data!=n.data&&(h.data=n.data)},void 0,!1)),h.defaultState.properties.visible=!0,r.series.push(h),this.updateByOrientation()}},i.prototype.updateByOrientation=function(){var e=this;this._scrollbarChart&&(A(this._scrollbarChart.xAxes.iterator(),function(t){var n=t.renderer;e.orientation=="vertical"?(n.grid.template.disabled=!0,n.labels.template.disabled=!0,n.minGridDistance=10):(n.grid.template.disabled=!1,n.labels.template.disabled=!1,n.minGridDistance=t.clonedFrom.renderer.minGridDistance)}),A(this._scrollbarChart.yAxes.iterator(),function(t){var n=t.renderer;e.orientation=="horizontal"?(n.grid.template.disabled=!0,n.labels.template.disabled=!0,n.minGridDistance=10):(n.grid.template.disabled=!1,n.labels.template.disabled=!1,n.minGridDistance=t.clonedFrom.renderer.minGridDistance)}))},i.prototype.handleSeriesRemoved=function(e){var t=e.oldValue,n=this.scrollbarChart;n.series.each(function(r){r&&r.clonedFrom==t&&n.series.removeValue(r)}),n.series.length==0&&(n.xAxes.clear(),n.yAxes.clear());try{t.events.off("validated",this.zoomOutAxes,this)}catch{}},Object.defineProperty(i.prototype,"scrollbarChart",{get:function(){return this._scrollbarChart},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"chart",{get:function(){return this._chart.get()},set:function(e){this._chart.get()!==e&&(this._chart.set(e,e.events.on("datavalidated",this.handleDataChanged,this,!1)),this.handleDataChanged(),this._scrollbarChart.dataProvider=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"unselectedOverlay",{get:function(){return this._unselectedOverlay},enumerable:!0,configurable:!0}),i.prototype.handleDataChanged=function(){this.chart.data!=this.scrollbarChart.data?this.scrollbarChart.data=this.chart.data:this.scrollbarChart.invalidateRawData()},i.prototype.zoomOutAxes=function(){var e=this.scrollbarChart;A(e.xAxes.iterator(),function(t){t.zoom({start:0,end:1},!0,!0)}),A(e.yAxes.iterator(),function(t){t.zoom({start:0,end:1},!0,!0)})},i.prototype.updateThumb=function(e){if(e===void 0&&(e=!0),s.prototype.updateThumb.call(this,e),this._unselectedOverlay){var t=this.thumb,n=t.pixelX||0,r=t.pixelY||0,a=t.pixelWidth||0,o=t.pixelHeight||0,l="";this.orientation=="horizontal"?(l=Yt({x:-1,y:0,width:n,height:o}),l+=Yt({x:n+a,y:0,width:(this.pixelWidth||0)-n-a,height:o})):(l=Yt({x:0,y:0,width:a,height:r}),l+=Yt({x:0,y:r+o,width:a,height:(this.pixelHeight||0)-r-o})),this._unselectedOverlay.path=l}},i.prototype.processConfig=function(e){if(e&&v(e.series)&&Ae(e.series))for(var t=0,n=e.series.length;t<n;t++){var r=e.series[t];if(v(r)&&J(r)){if(!this.map.hasKey(r))throw Error("XYChartScrollbar error: Series with id `"+r+"` does not exist.");e.series[t]=this.map.getKey(r)}}s.prototype.processConfig.call(this,e)},i}(En);_.registeredClasses.XYChartScrollbar=li;var Qr=function(s){function i(){var e=s.call(this)||this;return e.className="XYChartDataItem",e.applyTheme(),e}return w(i,s),i}(ho),Ut=function(s){function i(){var e=s.call(this)||this;e._axisRendererX=Mt,e._axisRendererY=mt,e._seriesPoints=[],e.className="XYChart",e.maskBullets=!0,e.arrangeTooltips=!0;var t=e.chartContainer;t.layout="vertical",e.padding(15,15,15,15);var n=t.createChild(W);n.shouldClone=!1,n.layout="vertical",n.width=F(100),n.zIndex=1,e.topAxesContainer=n;var r=t.createChild(W);r.shouldClone=!1,r.layout="horizontal",r.width=F(100),r.height=F(100),r.zIndex=0,e.yAxesAndPlotContainer=r;var a=t.createChild(W);a.shouldClone=!1,a.width=F(100),a.layout="vertical",a.zIndex=1,e.bottomAxesContainer=a;var o=r.createChild(W);o.shouldClone=!1,o.layout="horizontal",o.height=F(100),o.contentAlign="right",o.events.on("transformed",e.updateXAxesMargins,e,!1),o.zIndex=1,e.leftAxesContainer=o;var l=r.createChild(W);l.shouldClone=!1,l.height=F(100),l.width=F(100),l.background.fillOpacity=0,e.plotContainer=l,e.mouseWheelBehavior="none",e._cursorContainer=l;var h=r.createChild(W);h.shouldClone=!1,h.layout="horizontal",h.height=F(100),h.zIndex=1,h.events.on("transformed",e.updateXAxesMargins,e,!1),e.rightAxesContainer=h,e.seriesContainer.parent=l,e.bulletsContainer.parent=l;var p=l.createChild(Qa);p.shouldClone=!1,p.align="right",p.valign="top",p.zIndex=Number.MAX_SAFE_INTEGER,p.marginTop=5,p.marginRight=5,p.hide(0),e.zoomOutButton=p;var u=e.plotContainer.createChild(W);return u.shouldClone=!1,u.width=F(100),u.height=F(100),u.isMeasured=!1,u.zIndex=4,u.layout="none",e.axisBulletsContainer=u,e._bulletMask=e.plotContainer,e.events.on("beforedatavalidated",function(){e.series.each(function(d){d.dataGrouped=!1,d._baseInterval={}})},e,!1),e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),this.zoomOutButton.exportable=!1,v(this.readerTitle)||(this.readerTitle=this.language.translate("X/Y chart"))},i.prototype.draw=function(){s.prototype.draw.call(this),this.seriesContainer.toFront(),this.bulletsContainer.toFront(),this.maskBullets&&(this.bulletsContainer.mask=this._bulletMask),this.updateSeriesLegend()},i.prototype.updatePlotElements=function(){A(this.series.iterator(),function(e){e.invalidate()})},i.prototype.validateData=function(){this._parseDataFrom==0&&(A(this.xAxes.iterator(),function(e){e.dataChangeUpdate()}),A(this.yAxes.iterator(),function(e){e.dataChangeUpdate()}),A(this.series.iterator(),function(e){e.dataChangeUpdate()})),s.prototype.validateData.call(this)},i.prototype.updateXAxesMargins=function(){var e=this.leftAxesContainer.measuredWidth,t=this.rightAxesContainer.measuredWidth,n=this.bottomAxesContainer;n.paddingLeft==e&&n.paddingRight==t||(n.paddingLeft=e,n.paddingRight=t);var r=this.topAxesContainer;r.paddingLeft==e&&r.paddingRight==t||(r.paddingLeft=e,r.paddingRight=t)},i.prototype.reinit=function(){s.prototype.reinit.call(this),this.series.each(function(e){e.appeared=!1})},i.prototype.handleXAxisChange=function(e){this.updateXAxis(e.target)},i.prototype.handleYAxisChange=function(e){this.updateYAxis(e.target)},i.prototype.processXAxis=function(e){var t=e.newValue;t.chart=this,t.renderer||(t.renderer=new this._axisRendererX,t.renderer.observe(["opposite","inside","inversed","minGridDistance"],this.handleXAxisChange,this,!1)),t.axisLetter="X",t.events.on("startendchanged",this.handleXAxisRangeChange,this,!1),t.dataProvider=this,this.updateXAxis(t.renderer),this.processAxis(t)},i.prototype.processYAxis=function(e){var t=e.newValue;t.chart=this,t.renderer||(t.renderer=new this._axisRendererY,t.renderer.observe(["opposite","inside","inversed","minGridDistance"],this.handleYAxisChange,this,!1)),t.axisLetter="Y",t.events.on("startendchanged",this.handleYAxisRangeChange,this,!1),t.dataProvider=this,this.updateYAxis(t.renderer),this.processAxis(t)},i.prototype.handleXAxisRangeChange=function(){var e=this.getCommonAxisRange(this.xAxes);this.scrollbarX&&this.zoomAxes(this.xAxes,e,!0),this.toggleZoomOutButton(),this.updateScrollbar(this.scrollbarX,e)},i.prototype.toggleZoomOutButton=function(){if(this.zoomOutButton){var e=!1;rt(this.xAxes.iterator(),function(t){if(t.toggleZoomOutButton){if(t.maxZoomCount>0){var n=t.maxZoomFactor/t.maxZoomCount;if(V(t.end-t.start,3)<1/n)return e=!0,!1}else if(V(t.start,3)>0||V(t.end,3)<1)return e=!0,!1}return!0}),rt(this.yAxes.iterator(),function(t){if(t.toggleZoomOutButton){if(t.maxZoomCount>0){var n=t.maxZoomFactor/t.maxZoomCount;if(V(t.end-t.start,3)<1/n)return e=!0,!1}else if(V(t.start,3)>0||V(t.end,3)<1)return e=!0,!1;return!0}}),this.seriesAppeared||(e=!1),e?this.zoomOutButton.show():this.zoomOutButton.hide()}},i.prototype.seriesAppeared=function(){var e=!1;return A(this.series.iterator(),function(t){if(!t.appeared)return e=!1,!1}),e},i.prototype.handleYAxisRangeChange=function(){var e=this.getCommonAxisRange(this.yAxes);this.scrollbarY&&this.zoomAxes(this.yAxes,e,!0),this.toggleZoomOutButton(),this.updateScrollbar(this.scrollbarY,e)},i.prototype.updateScrollbar=function(e,t){e&&(e.skipRangeEvents(),e.start=t.start,e.end=t.end)},i.prototype.getCommonAxisRange=function(e){var t,n;return e.each(function(r){if(!(!r.zoomable||r instanceof ee&&r.syncWithAxis)){var a=r.start,o=r.end;r.renderer.inversed&&(a=1-r.end,o=1-r.start),(!y(t)||a<t)&&(t=a),(!y(n)||o>n)&&(n=o)}}),{start:t,end:n}},i.prototype.updateXAxis=function(e){var t=e.axis;e.opposite?(t.parent=this.topAxesContainer,t.toFront()):(t.parent=this.bottomAxesContainer,t.toBack()),t.renderer&&t.renderer.processRenderer()},i.prototype.updateYAxis=function(e){var t=e.axis;e.opposite?(t.parent=this.rightAxesContainer,t.toBack()):(t.parent=this.leftAxesContainer,t.toFront()),t.renderer&&t.renderer.processRenderer()},i.prototype.processAxis=function(e){var t=this;e instanceof Ve&&this._dataUsers.moveValue(e);var n=e.renderer;n.gridContainer.parent=this.plotContainer,n.gridContainer.toBack(),n.breakContainer.parent=this.plotContainer,n.breakContainer.toFront(),n.breakContainer.zIndex=10,e.addDisposer(new le(function(){t.dataUsers.removeValue(e)})),n.bulletsContainer.parent=this.axisBulletsContainer,this._disposers.push(e.events.on("positionchanged",function(){var r=Qe({x:0,y:0},e,t.axisBulletsContainer);e.renderer instanceof mt&&(n.bulletsContainer.y=r.y),e.renderer instanceof Mt&&(n.bulletsContainer.x=r.x)},void 0,!1)),this.plotContainer.events.on("maxsizechanged",function(){t.inited&&(e.invalidateDataItems(),t.updateSeriesMasks())},e,!1)},i.prototype.updateSeriesMasks=function(){Xi()&&this.series.each(function(e){var t=e.mainContainer.mask;e.mainContainer.mask=void 0,e.mainContainer.mask=t})},i.prototype.handleSeriesRemoved=function(e){var t=e.oldValue;t&&(t.xAxis&&(t.xAxis.series.removeValue(t),t.xAxis.invalidateProcessedData()),t.yAxis&&(t.yAxis.series.removeValue(t),t.yAxis.invalidateProcessedData()),this.series.each(function(n){n.resetExtremes()})),s.prototype.handleSeriesRemoved.call(this,e)},Object.defineProperty(i.prototype,"xAxes",{get:function(){return this._xAxes||(this._xAxes=new re,this._xAxes.events.on("inserted",this.processXAxis,this,!1),this._xAxes.events.on("removed",this.handleAxisRemoval,this,!1),this._disposers.push(new fe(this._xAxes,!1))),this._xAxes},enumerable:!0,configurable:!0}),i.prototype.handleAxisRemoval=function(e){var t=e.oldValue;this.dataUsers.removeValue(t),t.autoDispose&&t.dispose()},Object.defineProperty(i.prototype,"yAxes",{get:function(){return this._yAxes||(this._yAxes=new re,this._yAxes.events.on("inserted",this.processYAxis,this,!1),this._yAxes.events.on("removed",this.handleAxisRemoval,this,!1),this._disposers.push(new fe(this._yAxes,!1))),this._yAxes},enumerable:!0,configurable:!0}),i.prototype.handleSeriesAdded=function(e){try{s.prototype.handleSeriesAdded.call(this,e);var t=e.newValue;this.xAxes.length!=0&&this.yAxes.length!=0||(_.removeFromInvalidComponents(t),t.dataInvalid=!1),t.xAxis,t.yAxis,t.maskBullets=t.maskBullets,t.fill==null&&(this.patterns?(v(t.stroke)||(t.stroke=this.colors.next()),t.fill=this.patterns.next(),v(t.fillOpacity)&&(t.fill.backgroundOpacity=t.fillOpacity),t.stroke instanceof se&&(t.fill.stroke=t.stroke,t.fill.fill=t.stroke)):t.fill=this.colors.next()),v(t.stroke)||(t.stroke=t.fill)}catch(n){this.raiseCriticalError(n)}},Object.defineProperty(i.prototype,"cursor",{get:function(){return this._cursor},set:function(e){this._cursor!=e&&(this._cursor&&this.removeDispose(this._cursor),this._cursor=e,e&&(this._disposers.push(e),e.chart=this,e.shouldClone=!1,e.parent=this._cursorContainer,e.events.on("cursorpositionchanged",this.handleCursorPositionChange,this,!1),e.events.on("zoomstarted",this.handleCursorZoomStart,this,!1),e.events.on("zoomended",this.handleCursorZoomEnd,this,!1),e.events.on("panstarted",this.handleCursorPanStart,this,!1),e.events.on("panning",this.handleCursorPanning,this,!1),e.events.on("panended",this.handleCursorPanEnd,this,!1),e.events.on("behaviorcanceled",this.handleCursorCanceled,this,!1),e.events.on("hidden",this.handleHideCursor,this,!1),e.zIndex=Number.MAX_SAFE_INTEGER-1,this.tapToActivate&&this.setTapToActivate(this.tapToActivate)))},enumerable:!0,configurable:!0}),i.prototype.handleCursorPositionChange=function(){var e=this.cursor;if(e.visible&&!e.isHiding){var t=this.cursor.xPosition,n=this.cursor.yPosition;this.showSeriesTooltip({x:t,y:n});var r=[],a=e.snapToSeries;if(a&&!e.downPoint){a instanceof oi&&(a=[a]);var o=[];j(a,function(h){if(!h.isHidden&&!h.isHiding){var p=h.xAxis,u=h.yAxis;p instanceof ee&&!(p instanceof Pe)&&u instanceof ee&&!(u instanceof Pe)?(h.dataItems.each(function(d){o.push(d)}),pt(r,h.yAxis),pt(r,h.xAxis)):(h.baseAxis==h.xAxis&&(pt(r,h.yAxis),o.push(p.getSeriesDataItem(h,p.toAxisPosition(t),!0))),h.baseAxis==h.yAxis&&(pt(r,h.xAxis),o.push(u.getSeriesDataItem(h,u.toAxisPosition(n),!0))))}});var l=this.getClosest(o,t,n);l&&(this.series.each(function(h){var p=l.component;h!=p&&(h.hideTooltip(),h.xAxis!=p.xAxis&&(h.xAxis.hideTooltip(),r.push(h.xAxis)),h.yAxis!=p.yAxis&&(h.yAxis.hideTooltip(),r.push(h.yAxis)))}),l.component.showTooltipAtDataItem(l),e.handleSnap(l.component))}this._seriesPoints=[],this._cursorXPosition!=t&&this.showAxisTooltip(this.xAxes,t,r),this._cursorYPosition!=n&&this.showAxisTooltip(this.yAxes,n,r),this.arrangeTooltips&&this.sortSeriesTooltips(this._seriesPoints),this.legend&&this.legend.afterDraw()}},i.prototype.getClosest=function(e,t,n){var r,a=1/0;return hr(e,function(o){if(o){var l=o.component.xAxis,h=o.component.yAxis,p=l.positionToCoordinate(l.toGlobalPosition(l.toAxisPosition(t))),u=h.positionToCoordinate(h.toGlobalPosition(h.toAxisPosition(n))),d=o.component.xField,c=o.component.yField;if(l instanceof ee&&!y(o.getValue(d))||h instanceof ee&&!y(o.getValue(c)))return!0;var f=l.positionToCoordinate(l.toGlobalPosition(l.getPositionX(o,d,o.locations[d],"valueX"))),g=h.positionToCoordinate(h.toGlobalPosition(h.getPositionY(o,c,o.locations[c],"valueY"))),m=Math.sqrt(Math.pow(p-f,2)+Math.pow(u-g,2));return m<a&&(a=m,r=o),!0}}),r},i.prototype.handleHideCursor=function(){this.hideObjectTooltip(this.xAxes),this.hideObjectTooltip(this.yAxes),this.hideObjectTooltip(this.series),this._cursorXPosition=void 0,this._cursorYPosition=void 0,this.updateSeriesLegend()},i.prototype.updateSeriesLegend=function(){A(this.series.iterator(),function(e){e.updateLegendValue()})},i.prototype.hideObjectTooltip=function(e){A(e.iterator(),function(t){t.cursorTooltipEnabled&&t.hideTooltip(0)})},i.prototype.showSeriesTooltip=function(e){var t=this;if(e){var n=[];this.series.each(function(r){if(!(r.xAxis instanceof Pe&&r.xAxis.snapTooltip||r.yAxis instanceof Pe&&r.yAxis.snapTooltip)){var a=r.showTooltipAtPosition(e.x,e.y);a&&(r.tooltip.setBounds(Dr({x:0,y:0,width:t.pixelWidth,height:t.pixelHeight},t)),n.push({series:r,point:a}))}}),this.arrangeTooltips&&this.sortSeriesTooltips(n)}else this.series.each(function(r){r.hideTooltip()})},i.prototype.sortSeriesTooltips=function(e){if(e.length>0){var t=this.cursor;if(t&&y(t.maxTooltipDistance)){var n,r,a=ut({x:t.point.x,y:t.point.y},t),o=1/0;j(e,function(H){var ne=H.series,Te=H.point;if(Te){var Ge={x:Te.x,y:Te.y},he=Math.abs(oe(Ge,a));he<o&&(r=Ge,o=he,n=ne)}});var l=[];n&&(j(e,function(H){if(Math.abs(oe(H.point,r))<=Math.abs(t.maxTooltipDistance))l.push({series:H.series,point:H.point});else{var ne=H.series.tooltipDataItem;ne&&j(ne.sprites,function(Te){Te.isHover=!1,Te.handleOutReal()}),H.series.hideTooltip(0)}}),t.maxTooltipDistance<0&&(l.length>0&&j(l,function(H){n!=H.series&&H.series.hideTooltip(0)}),l=[{series:n,point:r}])),e=l}var h=ut({x:-.5,y:-.5},this.plotContainer),p=ut({x:this.plotContainer.pixelWidth+.5,y:this.plotContainer.pixelHeight+.5},this.plotContainer),u=0,d=[];j(e,function(H){var ne=H.point;ne&&Us(ne,{x:h.x,y:h.y,width:p.x-h.x,height:p.y-h.y})&&(d.push({point:ne,series:H.series}),u+=ne.y)}),e=d;var c=this.series.getIndex(0),f=!1;c&&c.yAxis&&c.yAxis.renderer.inversed&&(f=!0),f?e.sort(function(H,ne){return Pt(H.point.y,ne.point.y)}):(e.sort(function(H,ne){return Pt(ne.point.y,H.point.y)}),e.reverse());var g=u/e.length,m=ba({x:0,y:0},this.svgContainer.SVGContainer).y;if(e.length>0){var x=h.y,b=p.y;Tr({x:0,y:x},this);var C=!1;if(g>x+(b-x)/2)for(var S=b,P=e.length-1;P>=0;P--){var O=(G=e[P].series).tooltip,I=e[P].point.y;if(O.setBounds({x:0,y:-m,width:this.pixelWidth,height:S+m}),O.invalid&&O.validate(),O.toBack(),(S=ut({x:0,y:O.label.pixelY-O.pixelY+I-O.pixelMarginTop},O).y)<-m){C=!0;break}}if(g<=x+(b-x)/2||C)for(var k=x,D=(P=0,e.length);P<D;P++){var G=e[P].series;I=e[P].point.y,(O=G.tooltip).setBounds({x:0,y:k,width:this.pixelWidth,height:b}),O.invalid&&O.validate(),O.toBack(),k=ut({x:0,y:O.label.pixelY+O.label.measuredHeight-O.pixelY+I+O.pixelMarginBottom},O).y}}}},i.prototype.showAxisTooltip=function(e,t,n){var r=this;A(e.iterator(),function(a){n&&n.indexOf(a)!=-1||(r.dataItems.length>0||a.dataItems.length>0)&&a.showTooltipAtPosition(t)})},i.prototype.getUpdatedRange=function(e,t){if(e){var n,r;e.renderer.inversed?(Vi(t),n=1-e.end,r=1-e.start):(n=e.start,r=e.end);var a=r-n;return{start:n+t.start*a,end:n+t.end*a}}},i.prototype.handleCursorZoomEnd=function(e){var t=this.cursor,n=t.behavior;if(n=="zoomX"||n=="zoomXY"){var r=t.xRange;r&&this.xAxes.length>0&&((r=this.getUpdatedRange(this.xAxes.getIndex(0),r)).priority="start",this.zoomAxes(this.xAxes,r))}if(n=="zoomY"||n=="zoomXY"){var a=t.yRange;a&&this.yAxes.length>0&&((a=this.getUpdatedRange(this.yAxes.getIndex(0),a)).priority="start",this.zoomAxes(this.yAxes,a))}this.handleHideCursor()},i.prototype.handleCursorPanStart=function(e){var t=this.xAxes.getIndex(0);t&&(this._panStartXRange={start:t.start,end:t.end},t.renderer.inversed&&(this._panStartXRange=Vi(this._panStartXRange)));var n=this.yAxes.getIndex(0);n&&(this._panStartYRange={start:n.start,end:n.end},n.renderer.inversed&&(this._panStartYRange=Vi(this._panStartYRange)))},i.prototype.handleCursorPanEnd=function(e){var t=this.cursor,n=t.behavior;if(this._panEndXRange&&(n=="panX"||n=="panXY")){var r=this._panEndXRange,a=this._panStartXRange,o=0;r.start<0&&(o=r.start),a.end>1?r.end>a.end&&(o=r.end-a.end):r.end>1&&(o=r.end-1),this.zoomAxes(this.xAxes,{start:r.start-o,end:r.end-o},!1,t.snapOnPan),this._panEndXRange=void 0,this._panStartXRange=void 0}!this._panEndYRange||n!="panY"&&n!="panXY"||(o=0,(r=this._panEndYRange).start<0&&(o=r.start),r.end>1&&(o=r.end-1),this.zoomAxes(this.yAxes,{start:r.start-o,end:r.end-o},!1,t.snapOnPan),this._panEndYRange=void 0,this._panStartYRange=void 0)},i.prototype.handleCursorCanceled=function(){this._panEndXRange=void 0,this._panStartXRange=void 0},i.prototype.handleCursorPanning=function(e){var t=this.cursor,n=t.behavior,r=t.maxPanOut;if(this._panStartXRange&&(n=="panX"||n=="panXY")){var a=this._panStartXRange,o=t.xRange,l=this.getCommonAxisRange(this.xAxes),h=a.end-a.start,p=o.start*(l.end-l.start),u=Math.max(-r,p+a.start),d=Math.min(p+a.end,1+r);u<=0&&(d=u+h),d>=1&&(u=d-h);var c={start:u,end:d};this._panEndXRange=c,this.zoomAxes(this.xAxes,c,!1,!1,t.maxPanOut)}!this._panStartYRange||n!="panY"&&n!="panXY"||(a=this._panStartYRange,o=t.yRange,l=this.getCommonAxisRange(this.yAxes),h=a.end-a.start,p=o.start*(l.end-l.start),u=Math.max(-r,p+a.start),d=Math.min(p+a.end,1+r),u<=0&&(d=u+h),d>=1&&(u=d-h),c={start:u,end:d},this._panEndYRange=c,this.zoomAxes(this.yAxes,c,!1,!1,t.maxPanOut)),this.handleHideCursor()},i.prototype.handleYAxisSet=function(e){},i.prototype.handleCursorZoomStart=function(e){},Object.defineProperty(i.prototype,"scrollbarX",{get:function(){return this._scrollbarX},set:function(e){var t=this;this._scrollbarX&&this.removeDispose(this._scrollbarX),this._scrollbarX=e,e&&(this._disposers.push(e),e.parent=this.topAxesContainer,e.shouldClone=!1,e.startGrip.exportable=!1,e.endGrip.exportable=!1,e.toBack(),e.orientation="horizontal",e.events.on("rangechanged",this.handleXScrollbarChange,this,!1),this.events.on("datavalidated",function(){return e.updateThumb(!1)},this,!1),e.adapter.add("positionValue",function(n){var r=t.xAxes.getIndex(0);return r&&(n.value=r.getPositionLabel(r.renderer.inversed?1-n.position:n.position)),n}))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scrollbarY",{get:function(){return this._scrollbarY},set:function(e){var t=this;this._scrollbarY&&this.removeDispose(this._scrollbarY),this._scrollbarY=e,e&&(this._disposers.push(e),e.parent=this.rightAxesContainer,e.startGrip.exportable=!1,e.shouldClone=!1,e.endGrip.exportable=!1,e.toFront(),e.orientation="vertical",e.events.on("rangechanged",this.handleYScrollbarChange,this,!1),this.events.on("datavalidated",function(){return e.updateThumb(!1)},this,!1),e.adapter.add("positionValue",function(n){var r=t.yAxes.getIndex(0);return r&&(n.value=r.getPositionLabel(n.position)),n}))},enumerable:!0,configurable:!0}),i.prototype.handleXScrollbarChange=function(e){if(this.inited){var t=e.target,n=t.range;n.start==0&&(n.priority="start"),n.end==1&&(n.priority="end"),n=this.zoomAxes(this.xAxes,n),t.fixRange(n)}},i.prototype.handleYScrollbarChange=function(e){if(this.inited){var t=e.target,n=t.range;n.end==1&&(n.priority="end"),n.start==0&&(n.priority="start"),n=this.zoomAxes(this.yAxes,n),t.fixRange(n)}},i.prototype.zoomAxes=function(e,t,n,r,a,o){var l={start:0,end:1};this.showSeriesTooltip();var h=t;return this.dataInvalid||A(e.iterator(),function(p){var u=p.maxZoomFactor;if(y(p.minZoomCount)&&(u/=p.minZoomCount),!(o&&1/(t.end-t.start)>=u)){if(p.zoomable){if(t=p.renderer.inversed?Vi(h):h,p.hideTooltip(0),r)if(p instanceof Ve){var d=p.getCellEndPosition(0)-p.getCellStartPosition(0);t.start=p.roundPosition(t.start+d/2-p.startLocation*d,p.startLocation),t.end=p.roundPosition(t.end-d/2+(1-p.endLocation)*d,p.endLocation)}else t.start=p.roundPosition(t.start+1e-4,0,p.startLocation),t.end=p.roundPosition(t.end+1e-4,0,p.endLocation);var c=p.zoom(t,n,n,a);p.renderer.inversed&&(c=Vi(c)),l=c}}}),l},Object.defineProperty(i.prototype,"maskBullets",{get:function(){return this.getPropertyValue("maskBullets")},set:function(e){this.setPropertyValue("maskBullets",e,!0)&&this.bulletsContainer&&(this.bulletsContainer.mask=e?this._bulletMask:void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"arrangeTooltips",{get:function(){return this.getPropertyValue("arrangeTooltips")},set:function(e){this.setPropertyValue("arrangeTooltips",e,!0)},enumerable:!0,configurable:!0}),i.prototype.handleWheel=function(e){var t=this.plotContainer,n=at(Ht(e.point,this.htmlContainer,this.svgContainer.cssScale),t),r=e.shift.y;this.handleWheelReal(r,this.mouseWheelBehavior,n)},i.prototype.handleHorizontalWheel=function(e){var t=this.plotContainer,n=at(Ht(e.point,this.htmlContainer,this.svgContainer.cssScale),t);this.handleWheelReal(e.shift.x,this.horizontalMouseWheelBehavior,n)},i.prototype.handleWheelReal=function(e,t,n){if(e!=0){var r=this.plotContainer,a=this.getCommonAxisRange(this.xAxes),o=this.getCommonAxisRange(this.yAxes),l=.1;if(t=="panX"||t=="panXY"){var h=a.end-a.start,p=Math.max(-0,a.start+l*e/100*(a.end-a.start)),u=Math.min(a.end+l*e/100*(a.end-a.start),1);p<=0&&(u=p+h),u>=1&&(p=u-h),this.zoomAxes(this.xAxes,{start:p,end:u})}if(t=="panY"||t=="panXY"){e*=-1;var d=o.end-o.start,c=Math.max(-0,o.start+l*e/100*(o.end-o.start)),f=Math.min(o.end+l*e/100*(o.end-o.start),1);c<=0&&(f=c+d),f>=1&&(c=f-d),this.zoomAxes(this.yAxes,{start:c,end:f})}if(t=="zoomX"||t=="zoomXY"){var g=n.x/r.maxWidth,m=this.xAxes.getIndex(0).toAxisPosition(g);p=Math.max(-0,a.start-l*(a.end-a.start)*e/100*g),p=Math.min(p,m),u=Math.min(a.end+l*(a.end-a.start)*e/100*(1-g),1),u=Math.max(u,m),this.zoomAxes(this.xAxes,{start:p,end:u},void 0,void 0,void 0,!0)}if(t=="zoomY"||t=="zoomXY"){var x=n.y/r.maxHeight,b=this.yAxes.getIndex(0).toAxisPosition(x);c=Math.max(-0,o.start-l*(o.end-o.start)*e/100*(1-x)),c=Math.min(c,b),f=Math.min(o.end+l*e/100*x*(o.end-o.start),1),f=Math.max(f,b),this.zoomAxes(this.yAxes,{start:c,end:f},void 0,void 0,void 0,!0)}}},Object.defineProperty(i.prototype,"mouseWheelBehavior",{get:function(){return this.getPropertyValue("mouseWheelBehavior")},set:function(e){this.setPropertyValue("mouseWheelBehavior",e)&&(e!="none"?(this._mouseWheelDisposer=this.plotContainer.events.on("wheel",this.handleWheel,this,!1),this._disposers.push(this._mouseWheelDisposer)):this._mouseWheelDisposer&&(this.plotContainer.wheelable=!1,this.plotContainer.hoverable=!1,this._mouseWheelDisposer.dispose()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"horizontalMouseWheelBehavior",{get:function(){return this.getPropertyValue("horizontalMouseWheelBehavior")},set:function(e){this.setPropertyValue("horizontalMouseWheelBehavior",e)&&(e!="none"?(this._mouseWheelDisposer2=this.plotContainer.events.on("wheel",this.handleHorizontalWheel,this,!1),this._disposers.push(this._mouseWheelDisposer2)):this._mouseWheelDisposer2&&(this.plotContainer.wheelable=!1,this.plotContainer.hoverable=!1,this._mouseWheelDisposer2.dispose()))},enumerable:!0,configurable:!0}),i.prototype.dataSourceDateFields=function(e){var t=this;return e=s.prototype.dataSourceDateFields.call(this,e),A(this.series.iterator(),function(n){e=t.populateDataSourceFields(e,n.dataFields,["dateX","dateY","openDateX","openDateY"])}),e},i.prototype.dataSourceNumberFields=function(e){var t=this;return e=s.prototype.dataSourceDateFields.call(this,e),A(this.series.iterator(),function(n){e=t.populateDataSourceFields(e,n.dataFields,["valueX","valueY","openValueX","openValueY"])}),e},i.prototype.processConfig=function(e){if(e){var t=[],n=[];if(v(e.xAxes)&&Ae(e.xAxes))for(var r=0,a=e.xAxes.length;r<a;r++){if(!e.xAxes[r].type)throw Error("[XYChart error] No type set for xAxes["+r+"].");if(v(e.xAxes[r].axisRanges)){for(var o=0,l=e.xAxes[r].axisRanges.length;o<l;o++)v((p=e.xAxes[r].axisRanges[o]).date)&&J(p.date)&&(p.date=this.dateFormatter.parse(p.date)),v(p.endDate)&&J(p.endDate)&&(p.endDate=this.dateFormatter.parse(p.endDate));t.push({axisRanges:e.xAxes[r].axisRanges,index:r}),delete e.xAxes[r].axisRanges}}if(v(e.yAxes)&&Ae(e.yAxes))for(r=0,a=e.yAxes.length;r<a;r++){if(!e.yAxes[r].type)throw Error("[XYChart error] No type set for yAxes["+r+"].");if(v(e.yAxes[r].axisRanges)){o=0;for(var h=e.yAxes[r].axisRanges.length;o<h;o++){var p;v((p=e.yAxes[r].axisRanges[o]).date)&&J(p.date)&&(p.date=this.dateFormatter.parse(p.date)),v(p.endDate)&&J(p.endDate)&&(p.endDate=this.dateFormatter.parse(p.endDate))}n.push({axisRanges:e.yAxes[r].axisRanges,index:r}),delete e.yAxes[r].axisRanges}}if(v(e.series)&&Ae(e.series))for(r=0,a=e.series.length;r<a;r++)e.series[r].type=e.series[r].type||"LineSeries";if(v(e.cursor)&&!v(e.cursor.type)&&(e.cursor.type="XYCursor"),v(e.scrollbarX)&&!v(e.scrollbarX.type)&&(e.scrollbarX.type="Scrollbar"),v(e.scrollbarY)&&!v(e.scrollbarY.type)&&(e.scrollbarY.type="Scrollbar"),s.prototype.processConfig.call(this,e),n.length)for(r=0,a=n.length;r<a;r++)this.yAxes.getIndex(n[r].index).config={axisRanges:n[r].axisRanges};if(t.length)for(r=0,a=t.length;r<a;r++)this.xAxes.getIndex(t[r].index).config={axisRanges:t[r].axisRanges}}},i.prototype.configOrder=function(e,t){return e==t?0:e=="scrollbarX"?1:t=="scrollbarX"?-1:e=="scrollbarY"?1:t=="scrollbarY"?-1:e=="cursor"?1:t=="cursor"?-1:e=="series"?1:t=="series"?-1:s.prototype.configOrder.call(this,e,t)},i.prototype.createSeries=function(){return new oi},Object.defineProperty(i.prototype,"zoomOutButton",{get:function(){return this._zoomOutButton},set:function(e){var t=this;this._zoomOutButton=e,e&&e.events.on("hit",function(){t.zoomAxes(t.xAxes,{start:0,end:1}),t.zoomAxes(t.yAxes,{start:0,end:1})},void 0,!1)},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){var t=this;e.xAxes.each(function(n){var r=t.xAxes.push(n.clone());r.chart=t,r.renderer.chart=t}),e.yAxes.each(function(n){var r=t.yAxes.push(n.clone());r.renderer.chart=t,r.chart=t}),s.prototype.copyFrom.call(this,e),e.cursor&&(this.cursor=e.cursor.clone()),e.scrollbarX&&(this.scrollbarX=e.scrollbarX.clone()),e.scrollbarY&&(this.scrollbarY=e.scrollbarY.clone())},i.prototype.disposeData=function(){s.prototype.disposeData.call(this);var e=this.scrollbarX;e&&e instanceof li&&e.scrollbarChart.disposeData();var t=this.scrollbarY;t&&t instanceof li&&t.scrollbarChart.disposeData(),this.xAxes.each(function(n){n instanceof Ve&&n.disposeData()}),this.yAxes.each(function(n){n instanceof Ve&&n.disposeData()})},i.prototype.addData=function(e,t){this.scrollbarX instanceof li&&this.addScrollbarData(this.scrollbarX,t),this.scrollbarY instanceof li&&this.addScrollbarData(this.scrollbarY,t),s.prototype.addData.call(this,e,t)},i.prototype.addScrollbarData=function(e,t){var n=e.scrollbarChart;n._parseDataFrom=n.data.length,n.invalidateData()},i.prototype.removeScrollbarData=function(e,t){var n=e.scrollbarChart;if(y(t)){for(;t>0;){var r=this.dataItems.getIndex(0);r&&n.dataItems.remove(r),n.dataUsers.each(function(a){var o=a.dataItems.getIndex(0);o&&a.dataItems.remove(o)}),n._parseDataFrom--,t--}n.invalidateData()}},i.prototype.removeData=function(e){this.scrollbarX instanceof li&&this.removeScrollbarData(this.scrollbarX,e),this.scrollbarY instanceof li&&this.removeScrollbarData(this.scrollbarY,e),s.prototype.removeData.call(this,e)},i.prototype.setTapToActivate=function(e){s.prototype.setTapToActivate.call(this,e),this.cursor&&(this.cursor.interactions.isTouchProtected=e,this.plotContainer.interactions.isTouchProtected=e)},i.prototype.handleTapToActivate=function(){s.prototype.handleTapToActivate.call(this),this.cursor&&(this.cursor.interactions.isTouchProtected=!1,this.plotContainer.interactions.isTouchProtected=!1)},i.prototype.handleTapToActivateDeactivation=function(){s.prototype.handleTapToActivateDeactivation.call(this),this.cursor&&(this.cursor.interactions.isTouchProtected=!0,this.plotContainer.interactions.isTouchProtected=!0)},i}(Zr);_.registeredClasses.XYChart=Ut,Ne.push({relevant:Ue.maybeXS,state:function(s,i){if(s instanceof Ut&&s.scrollbarX){var e=s.states.create(i);return s.scrollbarX.states.create(i).properties.disabled=!0,e}return null}}),Ne.push({relevant:Ue.maybeXS,state:function(s,i){if(s instanceof Ut&&s.scrollbarY){var e=s.states.create(i);return s.scrollbarY.states.create(i).properties.disabled=!0,e}return null}});var es=function(s){function i(){var e=s.call(this)||this;e.className="LineSeriesSegment",e.isMeasured=!1,e.interactionsEnabled=!1,e.layout="none";var t=e.createChild($);e.fillSprite=t,t.shouldClone=!1,t.setElement(e.paper.add("path")),t.isMeasured=!1,e._disposers.push(t);var n=e.createChild($);return e.strokeSprite=n,n.shouldClone=!1,n.fill=B(),n.setElement(e.paper.add("path")),n.isMeasured=!1,e._disposers.push(n),e}return w(i,s),i.prototype.drawSegment=function(e,t,n,r){if(!this.disabled)if(e.length>0&&t.length>0&&y(e[0].x)&&y(e[0].y)){var a=E({x:e[0].x-.2,y:e[0].y-.2})+E(e[0]),o=this.series;o.smoothing=="bezier"?a+=new zt(n,r).smooth(e):o.smoothing=="monotoneX"?a+=new bp({closed:!1}).smooth(e):o.smoothing=="monotoneY"&&(a+=new xp({closed:!1}).smooth(e)),this.strokeOpacity==0||this.strokeSprite.strokeOpacity==0||(this.strokeSprite.path=a),(this.fillOpacity>0||this.fillSprite.fillOpacity>0)&&y(t[0].x)&&y(t[0].y)&&(a+=T(t[0]),o.smoothing=="bezier"?a+=new zt(n,r).smooth(t):o.smoothing=="monotoneX"?a+=new bp({closed:!1}).smooth(t):o.smoothing=="monotoneY"&&(a+=new xp({closed:!1}).smooth(t)),a+=T(e[0]),a+=" Z",this.fillSprite.path=a)}else this.fillSprite.path="",this.strokeSprite.path=""},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e);var t=this.strokeSprite;De(e,t.properties,Ie),t.events.copyFrom(e.strokeSprite.events),t.fillOpacity=0;var n=this.fillSprite;De(e,n.properties,Ie),n.events.copyFrom(e.fillSprite.events),n.strokeOpacity=0},i}(W);_.registeredClasses.LineSeriesSegment=es;var Lp=function(s){function i(){var e=s.call(this)||this;return e.className="DurationAxisDataItem",e.applyTheme(),e}return w(i,s),i}(Zn),ts=function(s){function i(){var e=s.call(this)||this;return e._baseUnit="second",e.className="DurationAxis",e.setPropertyValue("maxZoomFactor",1e6),e.applyTheme(),e}return w(i,s),i.prototype.formatLabel=function(e,t){return this.durationFormatter.format(e,t||this.axisDurationFormat)},i.prototype.adjustMinMax=function(e,t,n,r,a){var o,l,h,p=this.baseUnit;if(this.setPropertyValue("maxPrecision",0),p=="millisecond"||p=="second"||p=="minute"||p=="hour"){r<=1&&(r=1),r=Math.round(r);var u=e,d=t;n===0&&(n=Math.abs(t));var c,f=[60,30,20,15,10,2,1],g=1;p=="hour"&&(f=[24,12,6,4,2,1]);try{for(var m=nr(f),x=m.next();!x.done;x=m.next()){var b=x.value;if(n/b>r){g=b;break}}}catch(O){o={error:O}}finally{try{x&&!x.done&&(l=m.return)&&l.call(m)}finally{if(o)throw o.error}}var C=Math.ceil((t-e)/g/r),S=Math.log(Math.abs(C))*Math.LOG10E,P=Math.pow(10,Math.floor(S))/10;c=g*(C=al(f,C/P)*P),this.durationFormatter.getValueUnit(c,this.baseUnit),e=Math.floor(e/c)*c,t=Math.ceil(t/c)*c,a&&((e-=c)<0&&u>=0&&(e=0),(t+=c)>0&&d<=0&&(t=0)),h={min:e,max:t,step:c}}else h=s.prototype.adjustMinMax.call(this,e,t,n,r,a);return this.axisDurationFormat=this.durationFormatter.getFormat(h.step,h.max,this.baseUnit),h},Object.defineProperty(i.prototype,"tooltipDurationFormat",{get:function(){return this._tooltipDurationFormat},set:function(e){this._tooltipDurationFormat=e},enumerable:!0,configurable:!0}),i.prototype.getTooltipText=function(e){var t=V(this.positionToValue(e),this._stepDecimalPlaces),n=this.formatLabel(t,this.tooltipDurationFormat);return this._adapterO?this._adapterO.apply("getTooltipText",n):n},Object.defineProperty(i.prototype,"baseUnit",{get:function(){return this._baseUnit},set:function(e){this._baseUnit!=e&&(this._baseUnit=e,this.durationFormatter.baseUnit=e,this.invalidate())},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.baseUnit=e.baseUnit},i}(ee);_.registeredClasses.DurationAxis=ts,_.registeredClasses.DurationAxisDataItem=Lp;var $n=function(s){function i(){var e=s.call(this)||this;return e.className="LineSeriesDataItem",e}return w(i,s),i}(qn),is=function(s){function i(){var e=s.call(this)||this;return e.minDistance=.5,e.segments=new Oe(e.createSegment()),e.segments.template.applyOnClones=!0,e._disposers.push(new fe(e.segments)),e._disposers.push(e.segments.template),e._segmentsIterator=new fn(e.segments,function(){return e.segments.create()}),e._segmentsIterator.createNewItems=!0,e.className="LineSeries",e.strokeOpacity=1,e.fillOpacity=0,e.connect=!0,e.tensionX=1,e.tensionY=1,e.autoGapCount=1.1,e.smoothing="bezier",e.segmentsContainer=e.mainContainer.createChild(W),e.segmentsContainer.isMeasured=!1,e.bulletsContainer.toFront(),e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Line Series"))},i.prototype.createSegment=function(){return new es},i.prototype.createDataItem=function(){return new $n},i.prototype.setInitialWorkingValues=function(e){var t=this._yAxis.get(),n=this._xAxis.get();if(this.appeared&&this.visible){var r=this.dataItems.getIndex(e.index-1);if(e.component=this,this.baseAxis==n&&t instanceof ee){var a=t.minZoomed;if(r&&(a=r.values.valueY.workingValue),e.setWorkingValue("valueY",a,0),e.setWorkingValue("valueY",e.values.valueY.value),n instanceof Pe)e.setWorkingLocation("dateX",e.locations.dateX-1,0),e.setWorkingLocation("dateX",e.locations.dateX);else if(n instanceof ts&&r){var o=e.valueX;e.setWorkingValue("valueX",r.valueX,0),e.setWorkingValue("valueX",o)}}if(this.baseAxis==t&&n instanceof ee){var l=n.minZoomed;r&&(l=r.values.valueX.workingValue),e.setWorkingValue("valueX",l,0),e.setWorkingValue("valueX",e.values.valueX.value),t instanceof Pe?(e.setWorkingLocation("dateY",e.locations.dateX-1,0),e.setWorkingLocation("dateY",e.locations.dateY)):t instanceof ts&&r&&(o=e.valueY,e.setWorkingValue("valueY",r.valueY,0),e.setWorkingValue("valueY",o))}}else this.baseAxis==n&&t instanceof ee&&(n instanceof Pe&&e.setWorkingLocation("dateX",e.locations.dateX),n instanceof Ve&&e.setWorkingLocation("categoryX",e.locations.categoryX)),this.baseAxis==t&&n instanceof ee&&(t instanceof Pe&&e.setWorkingLocation("dateY",e.locations.dateY),t instanceof Ve&&e.setWorkingLocation("categoryY",e.locations.categoryY))},i.prototype.updateLegendValue=function(e,t){s.prototype.updateLegendValue.call(this,e,t),e&&e.segment&&(this.tooltipColorSource=e.segment)},i.prototype.validate=function(){var e=this;s.prototype.validate.call(this),this.xAxis&&this.yAxis&&(this._segmentsIterator.reset(),this.openSegmentWrapper(this._adjustedStartIndex),A(this.axisRanges.iterator(),function(t){e.openSegmentWrapper(e._adjustedStartIndex,t)}),A(this._segmentsIterator.iterator(),function(t){t.__disabled=!0}))},i.prototype.sliceData=function(){for(var e=this.startIndex,t=this.endIndex,n=this.startIndex-1;n>=0;n--)if((a=this.dataItems.getIndex(n))&&a.hasValue(this._xValueFields)&&a.hasValue(this._yValueFields)){e=n;break}this._adjustedStartIndex=this.findAdjustedIndex(e,["stroke","strokeWidth","strokeDasharray","strokeOpacity","fill","fillOpacity","opacity"]),n=this.endIndex;for(var r=this.dataItems.length;n<r;n++){var a;if((a=this.dataItems.getIndex(n))&&a.hasValue(this._xValueFields)&&a.hasValue(this._yValueFields)){t=n+1;break}}this._workingStartIndex=e,this._workingEndIndex=t},i.prototype.findAdjustedIndex=function(e,t){var n=this,r=this.propertyFields,a=e;return j(t,function(o){if(v(r[o]))for(var l=a;l>=0;l--){var h=n.dataItems.getIndex(l);if(h&&v(h.properties[o])){e>l&&(e=l);break}}}),e},i.prototype.openSegmentWrapper=function(e,t){var n={index:e,axisRange:t};do n=this.openSegment(n.index,n.axisRange);while(n)},i.prototype.getSegment=function(){var e=this._segmentsIterator.getFirst();return e.series=this,e.isDisposed()?(this.segments.removeValue(e),this.getSegment()):e},i.prototype.openSegment=function(e,t){var n=!1,r=[];e=Math.min(e,this.dataItems.length);var a,o=Math.min(this._workingEndIndex,this.dataItems.length);this._workingEndIndex=Math.min(this._workingEndIndex,this.dataItems.length);var l=!1,h=this.getSegment();h.strokeDasharray=void 0,h.__disabled=!1,t?(h.parent=t.contents,De(t.contents,h,Ie)):(De(this,h,Ie),h.filters.clear(),h.parent=this.segmentsContainer),this.group.node.removeAttribute("fill");for(var p=this.connect,u=!1,d=e;d<o;d++){var c=this.dataItems.getIndex(d);if(c.segment=h,c.hasProperties&&(d==e?this.updateSegmentProperties(c.properties,h):l=this.updateSegmentProperties(c.properties,h,!0)),c.hasValue(this._xValueFields)&&c.hasValue(this._yValueFields))this.addPoints(r,c,this.xField,this.yField),u=!0;else{if(d==e)continue;if(!p&&u){a=d;break}}if(a=d,this.baseAxis instanceof Pe){var f=this.dataItems.getIndex(d+1);if(f&&this.baseAxis.makeGap(f,c)){n=!0;break}}if(l)break}return this.closeSegment(h,r,e,a,t,n)},i.prototype.addPoints=function(e,t,n,r,a){var o=this.getPoint(t,n,r,t.workingLocations[n],t.workingLocations[r]);a||(t.point=o),e.push(o)},i.prototype.closeSegment=function(e,t,n,r,a,o){var l=[];if(this.dataFields[this._xOpenField]||this.dataFields[this._yOpenField]||this.stacked)for(var h=r;h>=n;h--){var p=this.dataItems.getIndex(h);p.hasValue(this._xValueFields)&&p.hasValue(this._yValueFields)&&this.addPoints(l,p,this.xOpenField,this.yOpenField,!0)}else{var u=this.baseAxis,d=t.length,c=this.xAxis,f=this.yAxis;d>0&&(u==c?(l.push({x:t[d-1].x,y:f.basePoint.y}),l.push({x:t[0].x,y:f.basePoint.y})):(l.push({x:c.basePoint.x,y:t[d-1].y}),l.push({x:c.basePoint.x,y:t[0].y})))}return this.drawSegment(e,t,l),o&&r++,r<this._workingEndIndex-1?{index:r,axisRange:a}:null},i.prototype.drawSegment=function(e,t,n){e.drawSegment(t,n,this.tensionX,this.tensionY)},i.prototype.updateSegmentProperties=function(e,t,n){var r=!1;return X(e,function(a,o){if(v(o)){var l=t[a],h=void 0;l&&(h=l.toString?l.toString():l);var p=void 0;o&&(p=o.toString?o.toString():o),l==o||h!=null&&p!=null&&h==p||(n||(t[a]=o),r=!0)}}),r},Object.defineProperty(i.prototype,"connect",{get:function(){return this.getPropertyValue("connect")},set:function(e){this.setPropertyValue("connect",e)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tensionX",{get:function(){return this.getPropertyValue("tensionX")},set:function(e){this.setPropertyValue("tensionX",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tensionY",{get:function(){return this.getPropertyValue("tensionY")},set:function(e){this.setPropertyValue("tensionY",e,!0)},enumerable:!0,configurable:!0}),i.prototype.createLegendMarker=function(e){var t=this,n=e.pixelWidth,r=e.pixelHeight;e.disposeChildren();var a=e.createChild(yt);if(a.shouldClone=!1,De(this,a,Ie),a.x2=n,a.y=r/2,a.y2=1e-5,a.visible=!0,this.fillOpacity>0){var o=e.createChild(Mn);De(this,o,Ie),o.width=n,o.height=r,o.y=0,o.strokeOpacity=0,o.visible=!0,a.y=0}var l=e.dataItem;l.color=this.stroke,l.colorOrig=this.fill,rt(this.bullets.iterator(),function(h){if(h instanceof It&&!h.copyToLegendMarker)return!1;var p=!1;if(h instanceof W&&A(h.children.iterator(),function(d){if(d instanceof $e)return p=!0,!0}),!p){var u=h.clone();return u.parent=e,u.isMeasured=!0,u.tooltipText=void 0,u.x=n/2,t.fillOpacity>0?u.y=0:u.y=r/2,u.visible=!0,v(u.fill)||(u.fill=t.fill),v(u.stroke)||(u.stroke=t.stroke),!1}})},i.prototype.disposeData=function(){s.prototype.disposeData.call(this),this.segments.clear()},Object.defineProperty(i.prototype,"autoGapCount",{get:function(){return this.getPropertyValue("autoGapCount")},set:function(e){this.setPropertyValue("autoGapCount",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"smoothing",{get:function(){return this.getPropertyValue("smoothing")},set:function(e){this.setPropertyValue("smoothing",e,!0)},enumerable:!0,configurable:!0}),i}(oi);_.registeredClasses.LineSeries=is,_.registeredClasses.LineSeriesDataItem=$n;var mo=function(s){function i(){var e=s.call(this)||this;return e.className="RadarSeriesDataItem",e.setLocation("dateX",0,0),e.setLocation("dateY",0,0),e.setLocation("categoryX",0,0),e.setLocation("categoryY",0,0),e.applyTheme(),e}return w(i,s),i}($n),vo=function(s){function i(){var e=s.call(this)||this;return e.className="RadarSeries",e.connectEnds=!0,e.applyTheme(),e}return w(i,s),i.prototype.validate=function(){this.chart.invalid&&this.chart.validate(),s.prototype.validate.call(this)},i.prototype.createDataItem=function(){return new mo},i.prototype.getPoint=function(e,t,n,r,a,o,l){o||(o="valueX"),l||(l="valueY");var h=oe({x:this.yAxis.getX(e,n,a,l),y:this.yAxis.getY(e,n,a,l)});h==0&&(h=1e-5);var p=this.xAxis.getAngle(e,t,r,o),u=this.chart.startAngle,d=this.chart.endAngle;return p<u||p>d?void 0:{x:h*L(p),y:h*M(p)}},i.prototype.addPoints=function(e,t,n,r,a){var o=this.getPoint(t,n,r,t.locations[n],t.locations[r]);o&&e.push(o)},i.prototype.getMaskPath=function(){var e=this.yAxis.renderer;return Pi(e.startAngle,e.endAngle-e.startAngle,e.pixelRadius,e.pixelInnerRadius)},i.prototype.drawSegment=function(e,t,n){var r=this.yAxis.renderer;this.connectEnds&&Math.abs(r.endAngle-r.startAngle)==360&&(this.dataFields[this._xOpenField]||this.dataFields[this._yOpenField]||this.stacked)&&(t.push(t[0]),n.length>0&&n.unshift(n[n.length-1])),s.prototype.drawSegment.call(this,e,t,n)},Object.defineProperty(i.prototype,"connectEnds",{get:function(){return this.getPropertyValue("connectEnds")},set:function(e){this.setPropertyValue("connectEnds",e,!0)},enumerable:!0,configurable:!0}),i.prototype.positionBulletReal=function(e,t,n){var r=this.xAxis,a=this.yAxis;(t<r.start||t>r.end||n<a.start||n>a.end)&&(e.visible=!1),e.moveTo(this.xAxis.renderer.positionToPoint(t,n))},i.prototype.setXAxis=function(e){s.prototype.setXAxis.call(this,e),this.updateRendererRefs()},i.prototype.setYAxis=function(e){s.prototype.setYAxis.call(this,e),this.updateRendererRefs()},i.prototype.updateRendererRefs=function(){var e=this.xAxis.renderer,t=this.yAxis.renderer;e.axisRendererY=t},i}(is);_.registeredClasses.RadarSeries=vo,_.registeredClasses.RadarSeriesDataItem=mo;var bo=function(s){function i(e){var t=s.call(this,e)||this;return t.className="AxisFillCircular",t.element=t.paper.add("path"),t.radius=F(100),t.applyTheme(),t}return w(i,s),i.prototype.draw=function(){if(s.prototype.draw.call(this),!this.__disabled&&!this.disabled&&this.axis){var e=this.axis.renderer;this.fillPath=e.getPositionRangePath(this.startPosition,this.endPosition,this.radius,v(this.innerRadius)?this.innerRadius:e.innerRadius,this.cornerRadius),this.path=this.fillPath}},Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cornerRadius",{get:function(){return this.getPropertyValue("cornerRadius")},set:function(e){this.setPropertyValue("cornerRadius",e,!0)},enumerable:!0,configurable:!0}),i}(qr);_.registeredClasses.AxisFillCircular=bo;var xo=function(s){function i(){var e=s.call(this)||this;return e.className="GridCircular",e.pixelPerfect=!1,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),i}(Qi);_.registeredClasses.GridCircular=xo;var Jn=function(s){function i(){var e=s.call(this)||this;return e.fdx=0,e.fdy=0,e.className="AxisLabelCircular",e.padding(0,0,0,0),e.location=.5,e.locationOnPath=.5,e.radius=0,e.isMeasured=!1,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"relativeRotation",{get:function(){return this.getPropertyValue("relativeRotation")},set:function(e){if(this.setPropertyValue("relativeRotation",e,!0),!v(e)){this.rotation=void 0;var t=this.dataItem;t&&t.component&&t.component.invalidateDataItems()}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bent",{get:function(){return this.getPropertyValue("bent")},set:function(e){this.setPropertyValue("bent",e,!0),this.setPropertyValue("wrap",!1),this.setPropertyValue("horizontalCenter","none"),this.setPropertyValue("verticalCenter","none"),e?(this.setPropertyValue("dx",0),this.setPropertyValue("dy",0),this.setPropertyValue("x",0),this.setPropertyValue("y",0),this.setPropertyValue("rotation",0),this.fdx=0,this.fdy=0,this.textAlign="middle"):this.textPathElement&&(this.textPathElement.dispose(),this.textPathElement=void 0)},enumerable:!0,configurable:!0}),i.prototype.pixelRadius=function(e){var t=1;return this.inside&&(t=-1),xe(this.radius,e)*t},i.prototype.pixelRadiusY=function(e,t){var n=1;this.inside&&(n=-1);var r=this.radius;return y(r)?xe(r*=t/e,e)*n:xe(r,t)*n},i.prototype.fixPosition=function(e,t,n,r,a){y(n)||(n=t),y(r)||(r=0),y(a)||(a=0);var o={x:t*L(e),y:n*M(e)};this.invalid&&this.validate();var l=!1,h=this.radius;(h instanceof te&&h.value<0||h<0)&&(l=!0);var p=this.relativeRotation,u=this.pixelRadius(t);if(this.bent){var d={x:(t+u)*L(e+180),y:(n+u*n/t)*M(e+180)};return this.path=E(d)+Le(e+180,360,t+u,n+u*n/t),void(this.textPathElement&&this.textPathElement.attr({startOffset:100*this.locationOnPath+"%"}))}if(y(p)){this.horizontalCenter="none",this.verticalCenter="none",e=bt(e,-180,180);var c=this.bbox.width,f=this.bbox.height,g=this.pixelPaddingBottom,m=this.pixelPaddingTop,x=this.pixelPaddingLeft,b=this.pixelPaddingRight;e>90||e<-90?p==-90&&(p=90,c=0):(p==-90&&(f=-f),p==90&&(p=-90,c=-x-b,f=-f-m-g)),this.rotation=p+e+90;var C=M(p)/2,S=L(p)/2,P=this.rotation;this.dx=f*C*M(P)-c*S*L(P),this.dy=-f*C*L(P)-c*S*M(P),this.inside?e>90||e<-90?u-=(g+m)*L(p)+(x+b)*M(p):u+=(g+this.bbox.height+m)*L(p)+(x+b+this.bbox.width)*M(p):u+=(f+g+m)*L(p)+(c+x+b)*M(p),o.x+=L(e)*u,o.y+=M(e)*u*n/t}else this.horizontalCenter="middle",this.verticalCenter="middle",l?(this.dx=0,this.dy=0,o.x=(t+u)*L(e),o.y=(n+u*n/t)*M(e)):(this.dy=this._measuredHeight/2*M(e),this.dx=this._measuredWidth/2*L(e),o.x+=L(e)*u,o.y+=M(e)*u*n/t);o.x+=r,o.y+=a,this.fdx=this.dx,this.fdy=this.dy,this.moveTo(o)},i}($r);_.registeredClasses.AxisLabelCircular=Jn;var _o=function(s){function i(){var e=s.call(this)||this;return e.pixelRadiusReal=0,e.layout="none",e.className="AxisRendererCircular",e.isMeasured=!1,e.startAngle=-90,e.endAngle=270,e.useChartAngles=!0,e.radius=F(100),e.isMeasured=!1,e.grid.template.location=0,e.labels.template.location=0,e.labels.template.radius=15,e.ticks.template.location=0,e.ticks.template.pixelPerfect=!1,e.tooltipLocation=0,e.line.strokeOpacity=0,e.applyTheme(),e}return w(i,s),i.prototype.setAxis=function(e){var t=this;s.prototype.setAxis.call(this,e),e.isMeasured=!1;var n=e.tooltip;n.adapter.add("dx",function(r,a){var o=at({x:a.pixelX,y:a.pixelY},t);return t.pixelRadius*Math.cos(Math.atan2(o.y,o.x))-o.x}),n.adapter.add("dy",function(r,a){var o=at({x:a.pixelX,y:a.pixelY},t);return t.pixelRadius*Math.sin(Math.atan2(o.y,o.x))-o.y})},i.prototype.validate=function(){this.chart&&this.chart.invalid&&this.chart.validate(),s.prototype.validate.call(this)},Object.defineProperty(i.prototype,"axisLength",{get:function(){return 2*Math.PI*this.pixelRadius},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!1,!1,10,!1)&&this.axis&&this.axis.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelRadius",{get:function(){return Re(this.radius,this.pixelRadiusReal)||0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerRadius",{get:function(){var e=this.chart,t=this.getPropertyValue("innerRadius");if(e){if(v(t)){if(t instanceof te&&e){var n=e.mr,r=t.value;t=F(100*(r=Math.max(n*r,n-Math.min(e.plotContainer.innerHeight,e.plotContainer.innerWidth))/n))}}else(t=e.innerRadius)instanceof te&&e&&(t=F(t.value*e.innerRadiusModifyer*100));return t}},set:function(e){this.setPercentProperty("innerRadius",e,!1,!1,10,!1)&&this.axis&&this.axis.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"useChartAngles",{get:function(){return this.getPropertyValue("useChartAngles")},set:function(e){this.setPropertyValue("useChartAngles",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelInnerRadius",{get:function(){return Re(this.innerRadius,this.pixelRadiusReal)||0},enumerable:!0,configurable:!0}),i.prototype.positionToPoint=function(e,t){y(t)||(t=1);var n=this.positionToCoordinate(e),r=this.startAngle+(this.endAngle-this.startAngle)*n/this.axisLength,a=this.pixelRadius,o=this.pixelInnerRadius;if(this.axisRendererY){var l=R(this.axisRendererY.positionToCoordinate(t),0,1/0);return l==0&&(l=1e-6),{x:l*L(r),y:l*M(r)}}return{x:L(r)*o+(a-o)*L(r)*t,y:M(r)*o+(a-o)*M(r)*t}},i.prototype.positionToAngle=function(e){var t=this.axis,n=(this.endAngle-this.startAngle)/(t.end-t.start);return V(t.renderer.inversed?this.startAngle+(t.end-e)*n:this.startAngle+(e-t.start)*n,3)},i.prototype.angleToPosition=function(e){var t=this.axis,n=(this.endAngle-this.startAngle)/(t.end-t.start);return V(t.renderer.inversed?t.end-(e-this.startAngle)/n:(e-this.startAngle)/n+t.start,5)},i.prototype.updateAxisLine=function(){var e=this.pixelRadius,t=this.startAngle,n=ie(360,this.endAngle-t);this.line.path=E({x:e*L(t),y:e*M(t)})+Le(t,n,e,e)},i.prototype.updateGridElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t);if(y(r.x)&&y(r.y)&&e.element){var a=vt*Math.atan2(r.y,r.x),o=Re(v(e.radius)?e.radius:F(100),this.pixelRadius),l=Re(e.innerRadius,this.pixelRadius);e.zIndex=0;var h=Re(y(l)?l:this.innerRadius,this.pixelRadiusReal,!0);y(h)||(h=0),e.path=E({x:h*L(a),y:h*M(a)})+T({x:o*L(a),y:o*M(a)})}this.toggleVisibility(e,t,0,1)},i.prototype.updateTickElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t);if(e.element){var a=this.pixelRadius,o=vt*Math.atan2(r.y,r.x),l=e.length;e.inside&&(l=-l),e.zIndex=1,e.path=E({x:a*L(o),y:a*M(o)})+T({x:(a+l)*L(o),y:(a+l)*M(o)})}this.toggleVisibility(e,t,0,1)},i.prototype.updateBullet=function(e,t,n){var r=.5;e instanceof tn&&(r=e.location),t+=(n-t)*r;var a=this.positionToPoint(t),o=this.pixelRadius,l=vt*Math.atan2(a.y,a.x);a={x:o*L(l),y:o*M(l)},this.positionItem(e,a),this.toggleVisibility(e,t,0,1)},i.prototype.updateLabelElement=function(e,t,n,r){v(r)||(r=e.location),t+=(n-t)*r,e.fixPosition(this.positionToAngle(t),this.pixelRadius),e.zIndex=2,this.toggleVisibility(e,t,this.minLabelPosition,this.maxLabelPosition)},i.prototype.fitsToBounds=function(e){return!0},Object.defineProperty(i.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(e){this.setPropertyValue("startAngle",e)&&(this.invalidateAxisItems(),this.axis&&this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(e){this.setPropertyValue("endAngle",e)&&(this.invalidateAxisItems(),this.axis&&this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),i.prototype.getPositionRangePath=function(e,t,n,r,a){var o="";if(y(e)&&y(t)){v(n)||(n=this.radius),e=q(e,this.axis.start),(t=ie(t,this.axis.end))<e&&(t=e);var l=Re(n,this.pixelRadius),h=Re(r,this.pixelRadius,!0),p=this.positionToAngle(e);o=Pi(p,this.positionToAngle(t)-p,l,h,l,a)}return o},i.prototype.createGrid=function(){return new xo},i.prototype.createFill=function(e){return new bo(e)},i.prototype.createLabel=function(){return new Jn},i.prototype.pointToPosition=function(e){var t=bt(Ee(e),this.startAngle,this.endAngle);return this.coordinateToPosition((t-this.startAngle)/360*this.axisLength)},i}(Kn);_.registeredClasses.AxisRendererCircular=_o;var Po=function(s){function i(){var e=s.call(this)||this;return e._chart=new Me,e.pixelRadiusReal=0,e.className="AxisRendererRadial",e.isMeasured=!1,e.startAngle=-90,e.endAngle=270,e.minGridDistance=30,e.gridType="circles",e.axisAngle=-90,e.isMeasured=!1,e.layout="none",e.radius=F(100),e.line.strokeOpacity=0,e.labels.template.horizontalCenter="middle",e._disposers.push(e._chart),e.applyTheme(),e}return w(i,s),i.prototype.validate=function(){this.chart&&this.chart.invalid&&this.chart.validate(),s.prototype.validate.call(this)},Object.defineProperty(i.prototype,"axisLength",{get:function(){return this.pixelRadius-this.pixelInnerRadius},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!1,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelRadius",{get:function(){return Re(this.radius,this.pixelRadiusReal)||0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerRadius",{get:function(){var e=this.chart,t=this.getPropertyValue("innerRadius");if(e)if(v(t)){if(t instanceof te&&e){var n=e.mr,r=t.value;t=F(100*(r=Math.max(n*r,n-Math.min(e.plotContainer.innerHeight,e.plotContainer.innerWidth))/n))}}else(t=e.innerRadius)instanceof te&&e&&(t=F(t.value*e.innerRadiusModifyer*100));return t},set:function(e){this.setPercentProperty("innerRadius",e,!1,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelInnerRadius",{get:function(){return Re(this.innerRadius,this.pixelRadiusReal)||0},enumerable:!0,configurable:!0}),i.prototype.positionToPoint=function(e,t){var n=R(this.positionToCoordinate(e),0,1/0);return{x:n*L(this.axisAngle),y:n*M(this.axisAngle)}},i.prototype.updateAxisLine=function(){this.line.path=E({x:this.pixelInnerRadius*L(this.axisAngle),y:this.pixelInnerRadius*M(this.axisAngle)})+T({x:this.pixelRadius*L(this.axisAngle),y:this.pixelRadius*M(this.axisAngle)});var e=this.axis.title;e.valign="none",e.horizontalCenter="middle",e.verticalCenter="bottom",e.y=-this.axisLength/2;var t=90;this.opposite?this.inside||(t=-90):this.inside&&(t=-90),e.rotation=t},i.prototype.updateGridElement=function(e,t,n){t+=(n-t)*e.location;var r,a=oe(this.positionToPoint(t)),o=this.startAngle,l=this.endAngle,h=this.chart;if(y(a)&&e.element&&h){var p=h.xAxes.getIndex(0),u=0,d=h.series.getIndex(0);if(d&&(u=d.dataItems.length),this.gridType=="polygons"&&u>0&&d&&p&&p instanceof Ve){var c=p.renderer.grid.template.location,f=p.getAngle(d.dataItems.getIndex(0),"categoryX",c);r=E({x:a*L(f),y:a*M(f)});for(var g=1;g<u;g++)r+=T({x:a*L(f=p.getAngle(d.dataItems.getIndex(g),"categoryX",c)),y:a*M(f)});r+=T({x:a*L(f=p.getAngle(d.dataItems.getIndex(u-1),"categoryX",p.renderer.cellEndLocation)),y:a*M(f)})}else r=E({x:a*L(o),y:a*M(o)})+Le(o,l-o,a,a);e.path=r}this.toggleVisibility(e,t,0,1)},i.prototype.updateLabelElement=function(e,t,n,r){v(r)||(r=e.location),t+=(n-t)*r;var a=this.positionToPoint(t);this.positionItem(e,a),this.toggleVisibility(e,t,this.minLabelPosition,this.maxLabelPosition)},i.prototype.updateBaseGridElement=function(){},i.prototype.fitsToBounds=function(e){return!0},Object.defineProperty(i.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(e){this.setPropertyValue("startAngle",e)&&this.invalidateAxisItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(e){this.setPropertyValue("endAngle",e)&&this.invalidateAxisItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"axisAngle",{get:function(){return this.getPropertyValue("axisAngle")},set:function(e){this.setPropertyValue("axisAngle",Zt(e)),this.invalidateAxisItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"gridType",{get:function(){return this.chart.xAxes.getIndex(0)instanceof Ve?this.getPropertyValue("gridType"):"circles"},set:function(e){this.setPropertyValue("gridType",e,!0)},enumerable:!0,configurable:!0}),i.prototype.getPositionRangePath=function(e,t){var n,r=this.pixelInnerRadius,a=this.axisLength+r,o=R(this.positionToCoordinate(e),r,a),l=R(this.positionToCoordinate(t),r,a),h=this.startAngle,p=this.endAngle-h,u=this.chart,d=u.xAxes.getIndex(0),c=u.series.getIndex(0),f=0;if(c&&(f=c.dataItems.length),this.gridType=="polygons"&&f>0&&c&&d&&d instanceof Ve){var g=d.renderer.grid.template.location,m=d.getAngle(c.dataItems.getIndex(0),"categoryX",g);n=E({x:l*L(m),y:l*M(m)});for(var x=1;x<f;x++)n+=T({x:l*L(m=d.getAngle(c.dataItems.getIndex(x),"categoryX",g)),y:l*M(m)});for(n+=T({x:l*L(m=d.getAngle(c.dataItems.getIndex(f-1),"categoryX",d.renderer.cellEndLocation)),y:l*M(m)}),n+=E({x:o*L(m),y:o*M(m)}),x=f-1;x>=0;x--)n+=T({x:o*L(m=d.getAngle(c.dataItems.getIndex(x),"categoryX",g)),y:o*M(m)})}else n=Pi(h,p,l,o);return n},i.prototype.updateBreakElement=function(e){var t=e.startLine,n=e.endLine,r=e.fillShape,a=e.startPoint,o=e.endPoint;t.radius=Math.abs(a.y),n.radius=Math.abs(o.y),r.radius=Math.abs(o.y),r.innerRadius=Math.abs(a.y)},i.prototype.createBreakSprites=function(e){e.startLine=new Hn,e.endLine=new Hn,e.fillShape=new Hn},i.prototype.updateTooltip=function(){if(this.axis){var e=this.axisAngle;e<0&&(e+=360);var t="vertical";(e>45&&e<135||e>225&&e<315)&&(t="horizontal"),this.axis.updateTooltip(t,{x:-4e3,y:-4e3,width:8e3,height:8e3})}},i.prototype.updateTickElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t);if(e.element){var a=Zt(this.axisAngle+90);a/90!=Math.round(a/90)?e.pixelPerfect=!1:e.pixelPerfect=!0;var o=-e.length;e.inside&&(o*=-1),e.path=E({x:0,y:0})+T({x:o*L(a),y:o*M(a)})}this.positionItem(e,r),this.toggleVisibility(e,t,0,1)},i.prototype.updateBullet=function(e,t,n){var r=.5;e instanceof tn&&(r=e.location),t+=(n-t)*r;var a=this.positionToPoint(t);this.positionItem(e,a),this.toggleVisibility(e,t,0,1)},i.prototype.positionToCoordinate=function(e){var t=this.axis,n=t.axisFullLength,r=this.pixelInnerRadius;return V(t.renderer.inversed?(t.end-e)*n+r:(e-t.start)*n+r,1)},i.prototype.pointToPosition=function(e){var t=oe(e)-this.pixelInnerRadius;return this.coordinateToPosition(t)},Object.defineProperty(i.prototype,"chart",{get:function(){return this._chart.get()},set:function(e){this._chart.set(e,null)},enumerable:!0,configurable:!0}),i}(mt);_.registeredClasses.AxisRendererRadial=Po;var jp=function(s){function i(){var e=s.call(this)||this;return e.className="RadarChartDataItem",e.applyTheme(),e}return w(i,s),i}(Qr),wo=function(s){function i(){var e=s.call(this)||this;e._axisRendererX=_o,e._axisRendererY=Po,e.innerRadiusModifyer=1,e.mr=1,e.className="RadarChart",e.startAngle=-90,e.endAngle=270,e.radius=F(80),e.innerRadius=0;var t=e.plotContainer.createChild(W);return t.shouldClone=!1,t.layout="absolute",t.align="center",t.valign="middle",e.seriesContainer.parent=t,e.radarContainer=t,e.bulletsContainer.parent=t,e.axisBulletsContainer=t,e._cursorContainer=t,e.chartContainer.events.on("maxsizechanged",e.invalidate,e,!1),e._bulletMask=t.createChild(ii),e._bulletMask.shouldClone=!1,e._bulletMask.element=e.paper.add("path"),e._bulletMask.opacity=0,e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Radar chart"))},i.prototype.processAxis=function(e){s.prototype.processAxis.call(this,e);var t=e.renderer;t.gridContainer.parent=t,t.breakContainer.parent=t,e.parent=this.radarContainer,t.toBack()},i.prototype.handleXAxisRangeChange=function(){s.prototype.handleXAxisRangeChange.call(this),A(this.yAxes.iterator(),function(e){e.invalidate()})},i.prototype.handleYAxisRangeChange=function(){s.prototype.handleYAxisRangeChange.call(this),A(this.xAxes.iterator(),function(e){e.invalidate()})},i.prototype.processConfig=function(e){if(e&&(v(e.cursor)&&!v(e.cursor.type)&&(e.cursor.type="RadarCursor"),v(e.series)&&Ae(e.series)))for(var t=0,n=e.series.length;t<n;t++)e.series[t].type=e.series[t].type||"RadarSeries";s.prototype.processConfig.call(this,e)},i.prototype.beforeDraw=function(){s.prototype.beforeDraw.call(this);var e=this.plotContainer,t=xt(this.startAngle,this.endAngle,1),n={x:0,y:0,width:0,height:0},r=e.innerWidth/t.width,a=e.innerHeight/t.height,o=this.innerRadius;if(o instanceof te){var l=o.value,h=Math.min(r,a);this.mr=h,l=Math.max(h*l,h-Math.min(e.innerHeight,e.innerWidth))/h,n=xt(this.startAngle,this.endAngle,l),this.innerRadiusModifyer=l/o.value,o=F(100*l)}t=Mi([t,n]);var p=Math.min(e.innerWidth/t.width,e.innerHeight/t.height),u=2*Re(this.radius,p)||0,d=u/2,c=this.startAngle,f=this.endAngle;this._pixelInnerRadius=Re(o,d),this._bulletMask.path=Pi(c,f-c,d,this._pixelInnerRadius),A(this.xAxes.iterator(),function(m){m.renderer.useChartAngles&&(m.renderer.startAngle=c,m.renderer.endAngle=f),m.width=u,m.height=u,m.renderer.pixelRadiusReal=d}),A(this.yAxes.iterator(),function(m){m.renderer.startAngle=c,m.renderer.endAngle=f,m.width=u,m.height=u,m.renderer.pixelRadiusReal=d});var g=this.cursor;g&&(g.width=u,g.height=u,g.startAngle=c,g.endAngle=f),this.radarContainer.definedBBox={x:d*t.x,y:d*t.y,width:d*t.width,height:d*t.height},this.radarContainer.validatePosition()},i.prototype.createSeries=function(){return new vo},Object.defineProperty(i.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(e){this.setPropertyValue("startAngle",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(e){this.setPropertyValue("endAngle",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelInnerRadius",{get:function(){return this._pixelInnerRadius},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),i.prototype.updateXAxis=function(e){e&&e.processRenderer()},i.prototype.updateYAxis=function(e){e&&e.processRenderer()},i}(Ut);_.registeredClasses.RadarChart=wo;var Co=function(s){function i(){var e=s.call(this)||this;e._axis=new Me,e.className="ClockHand";var t=new ae;e.fill=t.getFor("alternativeBackground"),e.stroke=e.fill;var n=new ii;n.radius=5,e.pin=n,e.isMeasured=!1,e.startWidth=5,e.endWidth=1,e.width=F(100),e.height=F(100),e.radius=F(100),e.innerRadius=F(0);var r=new $a;return e.hand=r,e._disposers.push(e._axis),e.applyTheme(),e}return w(i,s),i.prototype.validate=function(){s.prototype.validate.call(this);var e=this.hand;e.width=this.pixelWidth;var t=Math.max(this.startWidth,this.endWidth);if(e.height=t,e.leftSide=F(this.startWidth/t*100),e.rightSide=F(this.endWidth/t*100),this.axis){var n=this.axis.renderer,r=Re(this.innerRadius,n.pixelRadius),a=Re(this.radius,n.pixelRadius);e.x=r,e.y=-t/2,e.width=a-r}},Object.defineProperty(i.prototype,"pin",{get:function(){return this._pin},set:function(e){this._pin&&this.removeDispose(this._pin),e&&(this._pin=e,e.parent=this,this._disposers.push(e))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hand",{get:function(){return this._hand},set:function(e){this._hand&&this.removeDispose(this._hand),e&&(this._hand=e,e.parent=this,this._disposers.push(e))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startWidth",{get:function(){return this.getPropertyValue("startWidth")},set:function(e){this.setPropertyValue("startWidth",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endWidth",{get:function(){return this.getPropertyValue("endWidth")},set:function(e){this.setPropertyValue("endWidth",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rotationDirection",{get:function(){return this.getPropertyValue("rotationDirection")},set:function(e){this.setPropertyValue("rotationDirection",e)},enumerable:!0,configurable:!0}),i.prototype.showValue=function(e,t,n){if(this._value=e,e!=null&&(y(t)||(t=0),this.axis)){var r=this.axis.renderer.positionToAngle(this.axis.anyToPosition(e)),a=this.rotation;this.rotationDirection=="clockWise"&&r<a&&(this.rotation=a-360),this.rotationDirection=="counterClockWise"&&r>a&&(this.rotation=a+360),this.animate({property:"rotation",to:r},t,n)}},Object.defineProperty(i.prototype,"currentPosition",{get:function(){if(this.axis)return this.axis.renderer.angleToPosition(this.rotation)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){return this._value},set:function(e){this.showValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"axis",{get:function(){return this._axis.get()},set:function(e){if(this.axis!=e&&this._axis.set(e,new _e([e.events.on("datavalidated",this.updateValue,this,!1),e.events.on("datarangechanged",this.updateValue,this,!1),e.events.on("dataitemsvalidated",this.updateValue,this,!1),e.events.on("propertychanged",this.invalidate,this,!1)])),e){var t=e.chart;t&&(this.rotation=t.startAngle)}this.parent=e.renderer,this.zIndex=5},enumerable:!0,configurable:!0}),i.prototype.updateValue=function(){this.value=this.value},i.prototype.processConfig=function(e){e&&v(e.axis)&&J(e.axis)&&this.map.hasKey(e.axis)&&(e.axis=this.map.getKey(e.axis)),s.prototype.processConfig.call(this,e)},i}(W);_.registeredClasses.ClockHand=Co;var Od=function(s){function i(){var e=s.call(this)||this;return e.className="GaugeChartDataItem",e.applyTheme(),e}return w(i,s),i}(jp),Ep=function(s){function i(){var e=s.call(this)||this;return e.className="GaugeChart",e.startAngle=180,e.endAngle=360,e.hands=new Oe(new Co),e.hands.events.on("inserted",e.processHand,e,!1),e._disposers.push(new fe(e.hands)),e._disposers.push(e.hands.template),e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Gauge chart"))},i.prototype.processHand=function(e){var t=e.newValue;t.axis||(t.axis=this.xAxes.getIndex(0))},i.prototype.configOrder=function(e,t){return e==t?0:e=="hands"?1:t=="hands"?-1:s.prototype.configOrder.call(this,e,t)},i}(wo);_.registeredClasses.GaugeChart=Ep;var ns=function(s){function i(){var e=s.call(this)||this;return e.className="PercentSeriesDataItem",e.applyTheme(),e}return w(i,s),i.prototype.uidAttr=function(){return this.slice.uidAttr()},i.prototype.hide=function(e,t,n,r){return r||(r=["value"]),s.prototype.hide.call(this,e,t,0,r)},i.prototype.setVisibility=function(e,t){t||(e?this.setWorkingValue("value",this.values.value.value,0,0):this.setWorkingValue("value",0,0,0)),s.prototype.setVisibility.call(this,e,t)},i.prototype.show=function(e,t,n){return n||(n=["value"]),s.prototype.show.call(this,e,t,n)},Object.defineProperty(i.prototype,"category",{get:function(){return this.properties.category},set:function(e){this.setProperty("category",e)},enumerable:!0,configurable:!0}),i.prototype.createLegendMarker=function(e){this.component.createLegendMarker(e,this)},Object.defineProperty(i.prototype,"legendDataItem",{get:function(){return this._legendDataItem},set:function(e){this._legendDataItem=e,e.label&&(e.label.dataItem=this),e.valueLabel&&(e.valueLabel.dataItem=this)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tick",{get:function(){var e=this;if(!this._tick){var t=this.component.ticks.create();this._tick=t,this.addSprite(t),this._disposers.push(t),t.parent=this.component.ticksContainer,this._disposers.push(new le(function(){e.component&&e.component.ticks.removeValue(t)})),t.visible=this.visible}return this._tick},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"label",{get:function(){var e=this;if(!this._label){var t=this.component.labels.create();this.addSprite(t),this._label=t,this._disposers.push(t),t.parent=this.component.labelsContainer,this._disposers.push(new le(function(){e.component&&e.component.labels.removeValue(t)})),t.visible=this.visible}return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"slice",{get:function(){var e=this;if(!this._slice){var t=this.component,n=t.slices.create();this.addSprite(n),this._slice=n,this._disposers.push(n),n.parent=t.slicesContainer,this._disposers.push(new le(function(){t.slices.removeValue(n)})),n.visible=this.visible,t.itemsFocusable()?(v(this.component.role)||(this.component.role="menu"),v(n.role)||(n.role="menuitem"),n.focusable=!0):(v(this.component.role)||(this.component.role="list"),v(n.role)||(n.role="listitem"),n.focusable=!1),n.focusable&&(n.events.on("focus",function(r){n.readerTitle=t.populateString(t.itemReaderText,e)},void 0,!1),n.events.on("blur",function(r){n.readerTitle=""},void 0,!1)),n.hoverable&&(n.events.on("over",function(r){n.readerTitle=t.populateString(t.itemReaderText,e)},void 0,!1),n.events.on("out",function(r){n.readerTitle=""},void 0,!1))}return this._slice},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hiddenInLegend",{get:function(){return this.properties.hiddenInLegend},set:function(e){this.setProperty("hiddenInLegend",e)},enumerable:!0,configurable:!0}),i}(Yn),Qn=function(s){function i(){var e=s.call(this)||this;e.className="PercentSeries",e._addAllDataItems=!1,e.colors=new $i,e.colors.step=1,e.isMeasured=!0,e.calculatePercent=!0;var t=e.createChild(W);t.shouldClone=!1,t.isMeasured=!1,e.slicesContainer=t;var n=e.createChild(W);n.shouldClone=!1,n.isMeasured=!1,n.layout="none",e.ticksContainer=n;var r=e.createChild(W);return r.shouldClone=!1,r.isMeasured=!1,r.layout="none",e.labelsContainer=r,e.alignLabels=!1,e.bulletsContainer.toFront(),e.skipFocusThreshold=50,e.defaultState.transitionEasing=Sa,e.itemReaderText="{category}: {value.percent.formatNumber('#.#p')}",e.applyTheme(),e}return w(i,s),i.prototype.createSlice=function(){return new $},i.prototype.createTick=function(){return new en},i.prototype.createLabel=function(){return new $e},Object.defineProperty(i.prototype,"slices",{get:function(){if(!this._slices){var e=this.createSlice();e.applyOnClones=!0,this._disposers.push(e),this.initSlice(e),this._slices=new Oe(e),this._disposers.push(new fe(this._slices))}return this._slices},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"ticks",{get:function(){if(!this._ticks){var e=this.createTick();e.applyOnClones=!0,this._disposers.push(e),this.initTick(e),this._ticks=new Oe(e),this._disposers.push(new fe(this._ticks))}return this._ticks},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"labels",{get:function(){if(!this._labels){var e=this.createLabel();e.applyOnClones=!0,this._disposers.push(e),this.initLabel(e),this._labels=new Oe(e),this._disposers.push(new fe(this._labels))}return this._labels},enumerable:!0,configurable:!0}),i.prototype.createDataItem=function(){return new ns},i.prototype.initSlice=function(e){},i.prototype.initLabel=function(e){e.text="{category}: {value.percent.formatNumber('#.0p')}",e.isMeasured=!1,e.padding(5,5,5,5)},i.prototype.initTick=function(e){},i.prototype.validateDataItems=function(){this.colors.reset(),this.patterns&&this.patterns.reset(),s.prototype.validateDataItems.call(this)},i.prototype.validateDataElement=function(e){var t=e.slice;t&&(t.fill==null?this.patterns?(v(t.stroke)||(t.stroke=this.colors.next()),t.fill=this.patterns.next(),v(t.fillOpacity)&&(t.fill.backgroundOpacity=t.fillOpacity),t.stroke instanceof se&&(t.fill.stroke=t.stroke,t.fill.fill=t.stroke)):t.fill=this.colors.next():this.colors.currentStep+=this.colors.step,t.stroke==null&&(t.stroke=t.fill)),s.prototype.validateDataElement.call(this,e),t&&e.bullets.each(function(n,r){r.fill==null&&(r.fill=t.fill),r.stroke==null&&(r.stroke=t.stroke)}),this.updateLegendValue(e)},i.prototype.validateData=function(){s.prototype.validateData.call(this),this.chart&&this.chart.feedLegend()},i.prototype.arrangeLabels=function(e){for(var t=0,n=e.length;t<n;t++){var r=e[t].label;if(r){r.invalid&&r.validate();var a=r.measuredHeight;r.visible||(a=0),r.pixelY-a/2<-this.maxHeight/2&&(r.y=-this.maxHeight/2+a/2);var o=this.getNextLabel(t+1,e),l=r.pixelY+a;o&&o.y<l&&(o.y=l)}}},i.prototype.arrangeLabels2=function(e){for(var t=this.maxHeight/2,n=e.length-1;n>=0;n--){var r=e[n].label;if(r){r.invalid&&r.validate();var a=r.measuredHeight;r.visible||(a=0),n==e.length-1&&(t+=a/2),r.pixelY+a>t&&(r.y=t-a,t=r.y)}}},i.prototype.getNextLabel=function(e,t){if(t.length>=e){var n=t[e];if(n)return n.label&&n.visible?n.label:this.getNextLabel(e+1,t)}},Object.defineProperty(i.prototype,"colors",{get:function(){return this.getPropertyValue("colors")},set:function(e){this.setPropertyValue("colors",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"patterns",{get:function(){return this.getPropertyValue("patterns")},set:function(e){this.setPropertyValue("patterns",e,!0)},enumerable:!0,configurable:!0}),i.prototype.createLegendMarker=function(e,t){A(e.children.iterator(),function(n){var r=t.slice;n.defaultState.properties.fill=r.fill,n.defaultState.properties.stroke=r.stroke,n.defaultState.properties.fillOpacity=r.fillOpacity,n.defaultState.properties.strokeOpacity=r.strokeOpacity,n.fill=r.fill,n.stroke=r.stroke,n.fillOpacity=r.fillOpacity,n.strokeOpacity=r.strokeOpacity,n.fill==null&&(n.__disabled=!0);var a=e.dataItem;a.color=r.fill,a.colorOrig=r.fill,n.addDisposer(r.events.on("propertychanged",function(o){o.property=="fill"&&(n.__disabled=!1,n.isActive||(n.fill=r.fill),n.defaultState.properties.fill=r.fill,a.color=r.fill,a.colorOrig=r.fill),o.property=="stroke"&&(n.isActive||(n.stroke=r.stroke),n.defaultState.properties.stroke=r.stroke),o.property=="strokeOpacity"&&(n.isActive||(n.strokeOpacity=r.strokeOpacity),n.defaultState.properties.strokeOpacity=r.strokeOpacity)},void 0,!1))})},i.prototype.handleSliceScale=function(e){var t=this,n=e.target.dataItem;n&&n.bullets&&A(n.bullets.iterator(),function(r){var a=r[1];t.positionBullet(a)})},i.prototype.handleSliceMove=function(e){},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.slices.template.copyFrom(e.slices.template),this.labels.template.copyFrom(e.labels.template),this.ticks.template.copyFrom(e.ticks.template),this.colors=e.colors.clone()},Object.defineProperty(i.prototype,"alignLabels",{get:function(){return this.getPropertyValue("alignLabels")},set:function(e){this.setAlignLabels(e)},enumerable:!0,configurable:!0}),i.prototype.setAlignLabels=function(e){this.setPropertyValue("alignLabels",e,!0)},Object.defineProperty(i.prototype,"ignoreZeroValues",{get:function(){return this.getPropertyValue("ignoreZeroValues")},set:function(e){this.setPropertyValue("ignoreZeroValues",e,!0)},enumerable:!0,configurable:!0}),i.prototype.updateLegendValue=function(e){if(e){var t=e.legendDataItem,n=e.legendSettings;t&&n&&n&&(n.labelText&&(t.label.text=n.labelText),n.itemLabelText&&(t.label.text=n.itemLabelText),n.valueText&&(t.valueLabel.text=n.valueText),n.itemValueText&&(t.valueLabel.text=n.itemValueText))}},i}(zn);_.registeredClasses.PercentSeries=Qn,_.registeredClasses.PercentSeriesDataItem=ns,Ne.push({relevant:Ue.maybeXS,state:function(s,i){if(s instanceof Qn){var e=s.states.create(i);return s.labels.template.states.create(i).properties.disabled=!0,s.ticks.template.states.create(i).properties.disabled=!0,e}return null}});var Oo=function(s){function i(){var e=s.call(this)||this;return e.className="PercentChartDataItem",e.applyTheme(),e}return w(i,s),i}(ho),So=function(s){function i(){var e=s.call(this)||this;return e.className="PercentChart",e.align="none",e.valign="none",e.chartContainer.minHeight=50,e.chartContainer.minWidth=50,e.applyTheme(),e}return w(i,s),i.prototype.validateData=function(){s.prototype.validateData.call(this),this.feedLegend()},i.prototype.feedLegend=function(){var e=this.legend;if(e){var t=[];A(this.series.iterator(),function(n){n.hiddenInLegend||A(n.dataItems.iterator(),function(r){r.hiddenInLegend||(t.push(r),r.legendSettings||(r.legendSettings=n.legendSettings))})}),e.data=t,e.dataFields.name="category"}},i.prototype.createSeries=function(){return new Qn},i.prototype.setLegend=function(e){s.prototype.setLegend.call(this,e),e&&(e.labels.template.text="{category}",e.valueLabels.template.text="{value.percent.formatNumber('#.0p')}",e.itemContainers.template.events.on("over",function(t){var n=t.target.dataItem.dataContext;if(n.visible&&!n.isHiding){var r=n.slice;r.dispatchImmediately("over"),r.isHover=!0,r.interactions.isRealHover=!0}}),e.itemContainers.template.events.on("out",function(t){var n=t.target.dataItem.dataContext.slice;n.dispatchImmediately("out"),n.isHover=!1}))},i}(Zr);_.registeredClasses.PercentChart=So,_.registeredClasses.PercentChartDataItem=Oo;var Io=function(s){function i(){var e=s.call(this)||this;return e._label=new Me,e._slice=new Me,e.className="PieTick",e.element=e.paper.add("polyline"),e._disposers.push(e._label),e._disposers.push(e._slice),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.slice,t=this.label,n=e.dataItem.component;if(e&&e.radius>0&&t&&t.text){var r=e.dx+e.slice.dx+e.pixelX+e.ix*e.radius*e.scale,a=e.dy+e.slice.dy+e.pixelY+e.iy*e.radiusY*e.scale,o=void 0,l=void 0,h=void 0,p=void 0;if(n.alignLabels)o=t.pixelX-this.length,l=t.pixelY,h=t.pixelX,p=l,t.horizontalCenter=="right"&&(h=(o+=2*this.length)-this.length);else{var u=t.pixelRadius(e.radius);h=o=r+u*e.ix,p=l=a+u*e.iy}this.element.attr({points:[r,a,o,l,h,p]})}},Object.defineProperty(i.prototype,"slice",{get:function(){return this._slice.get()},set:function(e){this._slice.set(e,new _e([e.events.on("transformed",this.invalidate,this),e.events.on("validated",this.invalidate,this)]))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"label",{get:function(){return this._label.get()},set:function(e){this._label.set(e,e.events.on("transformed",this.invalidate,this,!1))},enumerable:!0,configurable:!0}),i}(en);_.registeredClasses.PieTick=Io;var rs=function(s){function i(){var e=s.call(this)||this;return e.className="PieSeriesDataItem",e.values.radiusValue={},e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"radiusValue",{get:function(){return this.values.radiusValue.value},set:function(e){this.setValue("radiusValue",e)},enumerable:!0,configurable:!0}),i.prototype.hide=function(e,t,n,r){return s.prototype.hide.call(this,e,t,0,["value","radiusValue"])},i.prototype.show=function(e,t,n){return s.prototype.show.call(this,e,t,["value","radiusValue"])},i}(ns),ss=function(s){function i(){var e=s.call(this)||this;return e.className="PieSeries",e.alignLabels=!0,e.layout="none",e.labels.template.radius=F(5),e.addDisposer(e.labels.template.events.on("enabled",e.invalidate,e,!1)),e.applyTheme(),e}return w(i,s),i.prototype.createSlice=function(){return new ri},i.prototype.createTick=function(){return new Io},i.prototype.createLabel=function(){return new Jn},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Pie Slice Series"))},i.prototype.createDataItem=function(){return new rs},i.prototype.initSlice=function(e){e.isMeasured=!1,e.defaultState.properties.scale=1,e.observe("scale",this.handleSliceScale,this),e.observe(["dx","dy","x","y","shiftRadius"],this.handleSliceMove,this),e.tooltipText="{category}: {value.percent.formatNumber('#.#p')} ({value.value})",e.states.create("hover").properties.scale=1.05,e.defaultState.properties.shiftRadius=0,e.togglable=!0,e.events.on("toggled",function(t){t.target.hideTooltip(),t.target.interactions.lastHitPointer&&t.target.interactions.lastHitPointer.touch&&!t.target.isActive&&(t.target.isHover=!1)}),e.states.create("active").properties.shiftRadius=.1},i.prototype.validate=function(){this._leftItems=[],this._rightItems=[],this._currentStartAngle=this.startAngle,this._arcRect=xt(this.startAngle,this.endAngle),this._maxRadiusPercent=0;for(var e=this.startIndex;e<this.endIndex;e++){var t=this.dataItems.getIndex(e).values.radiusValue.percent;t>this._maxRadiusPercent&&(this._maxRadiusPercent=t)}s.prototype.validate.call(this),this.alignLabels&&(this.startAngle>this.endAngle?this._rightItems.reverse():this._leftItems.reverse(),this._rightItems.sort(function(n,r){var a=(n.slice.middleAngle+360)%360,o=(r.slice.middleAngle+360)%360;return a>270&&(a-=360),o>270&&(o-=360),a<o?-1:a>o?1:0}),this._leftItems.sort(function(n,r){var a=(n.slice.middleAngle+360)%360,o=(r.slice.middleAngle+360)%360;return a<o?1:a>o?-1:0}),this.arrangeLabels(this._rightItems),this.arrangeLabels2(this._rightItems),this.arrangeLabels(this._leftItems),this.arrangeLabels2(this._leftItems))},i.prototype.validateDataElement=function(e){if(this.pixelRadius>0){!this.ignoreZeroValues||e.value!=0&&e.value!=null?e.__disabled=!1:e.__disabled=!0;var t=e.slice;if(t.radius=this.pixelRadius,y(e.radiusValue)&&(t.radius=this.pixelInnerRadius+(this.pixelRadius-this.pixelInnerRadius)*e.values.radiusValue.percent/this._maxRadiusPercent),t.innerRadius instanceof te||(t.innerRadius=this.pixelInnerRadius),t.startAngle=this._currentStartAngle,t.arc=Math.abs(e.values.value.percent)*(this.endAngle-this.startAngle)/100,!this.labels.template.disabled){var n=e.label,r=e.tick;r.slice=t,r.label=n;var a=(t.middleAngle+360)%360,o=void 0;if(this.alignLabels){var l=n.pixelRadius(t.radius),h=r.length+l;n.dx=0,n.dy=0,n.verticalCenter="middle";var p=this._arcRect;a>270||a<=90?(h+=(p.width+p.x)*this.pixelRadius,n.horizontalCenter="left",this._rightItems.push(e)):(h-=p.x*this.pixelRadius,n.horizontalCenter="right",this._leftItems.push(e),h*=-1);var u=t.radius+r.length+l;o={x:h,y:t.iy*u},n.moveTo(o)}else{var d=t.depth;y(d)||(d=0),n.fixPosition(t.middleAngle,t.radius,t.radiusY,0,-d)}}this._currentStartAngle+=t.arc,s.prototype.validateDataElement.call(this,e)}},Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!0,!1,10,!1)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelRadius",{get:function(){return this._pixelRadius},set:function(e){this._pixelRadius!=e&&(this._pixelRadius=e,this.invalidateDataItems())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelInnerRadius",{get:function(){return this._pixelInnerRadius},set:function(e){this._pixelInnerRadius!=e&&(this._pixelInnerRadius=e,this.invalidateDataItems())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startAngle",{get:function(){var e=this.getPropertyValue("startAngle");return y(e)?e:this._startAngleInternal},set:function(e){this.setPropertyValue("startAngle",Zt(e),!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endAngle",{get:function(){var e=this.getPropertyValue("endAngle");return y(e)?e:this._endAngleInternal},set:function(e){this.setPropertyValue("endAngle",e,!0)},enumerable:!0,configurable:!0}),i.prototype.positionBullet=function(e){s.prototype.positionBullet.call(this,e);var t=e.dataItem.slice,n=e.locationX;y(n)||(n=.5);var r=e.locationY;y(r)||(r=1);var a=t.startAngle+t.arc*n;e.x=r*t.radius*L(a),e.y=r*t.radiusY*M(a)},i.prototype.handleSliceMove=function(e){if(!this.alignLabels){var t=e.target,n=t.dataItem;if(n){var r=n.label;r&&(r.dx=r.fdx+t.dx+t.pixelX,r.dy=r.fdy+t.dy+t.pixelY)}}},Object.defineProperty(i.prototype,"bbox",{get:function(){if(this.definedBBox)return this.definedBBox;var e=this.chart;return e?xt(e.startAngle,e.endAngle,this.pixelRadius):xt(this.startAngle,this.endAngle,this.pixelRadius)},enumerable:!0,configurable:!0}),i}(Qn);_.registeredClasses.PieSeries=ss,_.registeredClasses.PieSeriesDataItem=rs;var Do=function(s){function i(){var e=s.call(this)||this;return e.className="PieChartDataItem",e.applyTheme(),e}return w(i,s),i}(Oo),To=function(s){function i(){var e=s.call(this)||this;e.className="PieChart",e.innerRadius=0,e.radius=F(80),e.align="none",e.valign="none",e.startAngle=-90,e.endAngle=270;var t=e.seriesContainer;return t.isMeasured=!0,t.valign="middle",t.align="center",t.layout="absolute",t.width=void 0,t.height=void 0,e.chartContainer.minHeight=50,e.chartContainer.minWidth=50,e.chartContainer.events.on("maxsizechanged",e.updateRadius,e,!1),e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Pie chart"))},i.prototype.validateLayout=function(){s.prototype.validateLayout.call(this),this.updateRadius()},i.prototype.handleSeriesAdded=function(e){s.prototype.handleSeriesAdded.call(this,e),this._chartPixelRadius=void 0,this.updateSeriesAngles()},i.prototype.updateSeriesAngles=function(){var e=this;this.series.each(function(t){t._startAngleInternal=e.startAngle,t._endAngleInternal=e.endAngle})},i.prototype.updateRadius=function(){var e=this.chartContainer,t=xt(this.startAngle,this.endAngle,1),n={x:0,y:0,width:0,height:0},r=this.innerRadius;r instanceof te&&(n=xt(this.startAngle,this.endAngle,r.value)),t=Mi([t,n]);var a=Math.min(e.innerWidth/t.width,e.innerHeight/t.height);y(a)||(a=0);var o=Re(this.radius,a),l=Re(this.innerRadius,a),h=(o-l)/this.series.length;o==this._chartPixelRadius&&l==this._chartPixelInnerRadius||(this._chartPixelRadius=o,this._chartPixelInnerRadius=l,A($t(this.series.iterator()),function(p){var u=p[0],d=p[1],c=l+Re(d.radius,o-l),f=l+Re(d.innerRadius,o-l);y(c)||(c=l+h*(u+1)),y(f)||(f=l+h*u),d.pixelRadius=c,d.pixelInnerRadius=f}),this.seriesContainer.definedBBox={x:o*t.x,y:o*t.y,width:o*t.width,height:o*t.height},this.seriesContainer.invalidateLayout(),this.bulletsContainer.x=this.seriesContainer.x,this.bulletsContainer.y=this.seriesContainer.y)},Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!0,!1,10,!1)&&this.invalidateLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),i.prototype.createSeries=function(){return new ss},Object.defineProperty(i.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(e){this.setPropertyValue("startAngle",e)&&(this.updateRadius(),this.updateSeriesAngles())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(e){this.setPropertyValue("endAngle",e)&&(this.updateRadius(),this.updateSeriesAngles())},enumerable:!0,configurable:!0}),i}(So);_.registeredClasses.PieChart=To,_.registeredClasses.PieChartDataItem=Do;var ko=function(s){function i(){var e=s.call(this)||this;return e.className="PieSeries3DDataItem",e.values.depthValue={},e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"depthValue",{get:function(){return this.values.depthValue.value},set:function(e){this.setValue("depthValue",e)},enumerable:!0,configurable:!0}),i}(rs),Ao=function(s){function i(){var e=s.call(this)||this;return e.className="PieSeries3D",e.applyTheme(),e}return w(i,s),i.prototype.createDataItem=function(){return new ko},i.prototype.createSlice=function(){return new Cp},i.prototype.validateDataElement=function(e){var t=e.slice,n=this.depth;y(n)||(n=this.chart.depth);var r=e.values.depthValue.percent;y(r)||(r=100),t.depth=r*n/100;var a=this.angle;y(a)||(a=this.chart.angle),t.angle=a,s.prototype.validateDataElement.call(this,e)},i.prototype.validate=function(){s.prototype.validate.call(this);for(var e=this._workingStartIndex;e<this._workingEndIndex;e++){var t=this.dataItems.getIndex(e).slice,n=t.startAngle;n>=-90&&n<90?t.toFront():n>=90&&t.toBack()}},Object.defineProperty(i.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(e){this.setPropertyValue("depth",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(e){this.setPropertyValue("angle",e)},enumerable:!0,configurable:!0}),i.prototype.positionBullet=function(e){s.prototype.positionBullet.call(this,e);var t=e.dataItem.slice;e.y=e.pixelY-t.depth},i}(ss);_.registeredClasses.PieSeries3D=Ao,_.registeredClasses.PieSeries3DDataItem=ko;var Sd=function(s){function i(){var e=s.call(this)||this;return e.className="PieChart3DDataItem",e.applyTheme(),e}return w(i,s),i}(Do),Rp=function(s){function i(){var e=s.call(this)||this;return e.className="PieChart3D",e.depth=20,e.angle=10,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(e){this.setPropertyValue("depth",e)&&this.invalidateDataUsers()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(e){e=R(e,0,90),this.setPropertyValue("angle",e)&&this.invalidateDataUsers()},enumerable:!0,configurable:!0}),i.prototype.createSeries=function(){return new Ao},i}(To);_.registeredClasses.PieChart3D=Rp;var Bp=function(s){function i(){var e=s.call(this)||this;return e.className="SlicedChartDataItem",e.applyTheme(),e}return w(i,s),i}(Oo),Hp=function(s){function i(){var e=s.call(this)||this;return e.className="SlicedChart",e.seriesContainer.layout="horizontal",e.padding(15,15,15,15),e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Sliced chart"))},i.prototype.validate=function(){s.prototype.validate.call(this)},i}(So);_.registeredClasses.SlicedChart=Hp,_.registeredClasses.SlicedChartDataItem=Bp;var er=function(s){function i(){var e=s.call(this)||this;return e.legendSettings=new lo,e.className="FlowDiagramNode",e.isMeasured=!1,new ae,e.draggable=!0,e.inert=!0,e.setStateOnChildren=!0,e.events.on("positionchanged",e.invalidateLinks,e,!1),e.events.on("sizechanged",e.invalidateLinks,e,!1),e}return w(i,s),i.prototype.handleHit=function(e){this.isHidden||this.isHiding?this.show():this.hide()},i.prototype.show=function(e){var t=s.prototype.show.call(this,e);return this.outgoingDataItems.each(function(n){(!n.toNode||n.toNode&&!n.toNode.isHidden)&&(n.setWorkingValue("value",n.getValue("value"),e),n.link.show())}),this.incomingDataItems.each(function(n){(!n.fromNode||n.fromNode&&!n.fromNode.isHidden)&&(n.setWorkingValue("value",n.getValue("value"),e),n.link.show())}),t},i.prototype.hide=function(e){var t=s.prototype.hide.call(this,e);return this.outgoingDataItems.each(function(n){n.setWorkingValue("value",0,e),n.link.hide()}),this.incomingDataItems.each(function(n){n.setWorkingValue("value",0,e),n.link.hide()}),t},i.prototype.validate=function(){this.isDisposed()||(s.prototype.validate.call(this),this.invalidateLinks())},i.prototype.invalidateLinks=function(){var e=this;this.outgoingDataItems.each(function(t){var n=t.link;if(n.colorMode=="fromNode"&&(n.fill=n.dataItem.fromNode.color),n.colorMode=="gradient"){n.fill=n.gradient,n.stroke=n.gradient;var r=n.gradient.stops.getIndex(0);r&&(r.color=e.color,n.gradient.validate())}}),this.incomingDataItems.each(function(t){var n=t.link;if(n.colorMode=="toNode"&&(n.fill=n.dataItem.toNode.color),n.colorMode=="gradient"){n.fill=n.gradient,n.stroke=n.gradient;var r=n.gradient.stops.getIndex(1);r&&(r.color=e.color,n.gradient.validate())}})},Object.defineProperty(i.prototype,"incomingDataItems",{get:function(){var e=this;if(!this._incomingDataItems){var t=new re;t.events.on("inserted",function(){e.chart.sortBy=="name"?e._incomingSorted=yi(e._incomingDataItems.iterator(),function(n,r){return fr(n.fromName,r.fromName)}):e.chart.sortBy=="value"?e._incomingSorted=yi(e._incomingDataItems.iterator(),function(n,r){return yr(Pt(n.value,r.value))}):e._incomingSorted=e._incomingDataItems.iterator()},void 0,!1),this._incomingDataItems=t}return this._incomingDataItems},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"outgoingDataItems",{get:function(){var e=this;if(!this._outgoingDataItems){var t=new re;t.events.on("inserted",function(){e.chart.sortBy=="name"?e._outgoingSorted=yi(e._outgoingDataItems.iterator(),function(n,r){return fr(n.fromName,r.fromName)}):e.chart.sortBy=="value"?e._outgoingSorted=yi(e._outgoingDataItems.iterator(),function(n,r){return yr(Pt(n.value,r.value))}):e._outgoingSorted=e._outgoingDataItems.iterator()},void 0,!1),this._outgoingDataItems=t}return this._outgoingDataItems},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"name",{get:function(){return this.getPropertyValue("name")},set:function(e){this.setPropertyValue("name",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"total",{get:function(){return this.getPropertyValue("total")},set:function(e){this.setPropertyValue("total",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"totalIncoming",{get:function(){return this.getPropertyValue("totalIncoming")},set:function(e){this.setPropertyValue("totalIncoming",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"totalOutgoing",{get:function(){return this.getPropertyValue("totalOutgoing")},set:function(e){this.setPropertyValue("totalOutgoing",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"color",{get:function(){return this.getPropertyValue("color")},set:function(e){this.setColorProperty("color",e),this._background&&(this._background.fill=e),this.fill=e},enumerable:!0,configurable:!0}),i.prototype.createLegendMarker=function(e){var t=e.pixelWidth,n=e.pixelHeight;e.removeChildren();var r=e.createChild(St);r.shouldClone=!1,De(this,r,Ie),r.stroke=this.fill,r.copyFrom(this),r.padding(0,0,0,0),r.width=t,r.height=n;var a=e.dataItem;a.color=r.fill,a.colorOrig=r.fill},Object.defineProperty(i.prototype,"legendDataItem",{get:function(){return this._legendDataItem},set:function(e){this._legendDataItem=e,this._legendDataItem.itemContainer.deepInvalidate()},enumerable:!0,configurable:!0}),i}(W);_.registeredClasses.FlowDiagramNode=er;var tr=function(s){function i(){var e=s.call(this)||this;e.className="FlowDiagramLink";var t=new ae;return e.maskBullets=!1,e.colorMode="fromNode",e.layout="none",e.isMeasured=!1,e.startAngle=0,e.endAngle=0,e.strokeOpacity=0,e.verticalCenter="none",e.horizontalCenter="none",e.tooltipText="{fromName}\u2192{toName}:{value.value}",e.tooltipLocation=.5,e.link=e.createChild($),e.link.shouldClone=!1,e.link.setElement(e.paper.add("path")),e.link.isMeasured=!1,e.fillOpacity=.2,e.fill=t.getFor("alternativeBackground"),e.applyTheme(),e}return w(i,s),i.prototype.positionBullets=function(){var e=this;A(this.bullets.iterator(),function(t){t.parent=e.bulletsContainer,t.maxWidth=e.maxWidth,t.maxHeight=e.maxHeight,e.positionBullet(t)})},Object.defineProperty(i.prototype,"bulletsContainer",{get:function(){if(!this._bulletsContainer){var e=this.createChild(W);e.shouldClone=!1,e.layout="none",this._bulletsContainer=e}return this._bulletsContainer},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bulletsMask",{get:function(){if(!this._bulletsMask){var e=this.createChild($);e.shouldClone=!1,e.setElement(this.paper.add("path")),e.isMeasured=!1,this._bulletsMask=e}return this._bulletsMask},enumerable:!0,configurable:!0}),i.prototype.positionBullet=function(e){var t=e.locationX;y(t)||(t=e.locationY),y(t)||(t=.5);var n=this.middleLine.positionToPoint(t);e.moveTo(n);var r,a=e.propertyFields.rotation;e.dataItem&&(r=e.dataItem.dataContext[a]),y(r)||(r=n.angle),e.rotation=r},Object.defineProperty(i.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(e){this.setPropertyValue("startAngle",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(e){this.setPropertyValue("endAngle",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"colorMode",{get:function(){return this.getPropertyValue("colorMode")},set:function(e){if(e=="gradient"){var t=this.fill;this.gradient.stops.clear(),t instanceof se&&(this.gradient.addColor(t),this.gradient.addColor(t)),this.fill=this.gradient,this.stroke=this.gradient}this.setPropertyValue("colorMode",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maskBullets",{get:function(){return this.getPropertyValue("maskBullets")},set:function(e){this.setPropertyValue("maskBullets",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipLocation",{get:function(){return this.getPropertyValue("tooltipLocation")},set:function(e){this.setPropertyValue("tooltipLocation",e,!0)},enumerable:!0,configurable:!0}),i.prototype.setFill=function(e){s.prototype.setFill.call(this,e);var t=this._gradient;t&&e instanceof se&&(t.stops.clear(),t.addColor(e),t.addColor(e))},i.prototype.measureElement=function(){},Object.defineProperty(i.prototype,"bullets",{get:function(){var e=this;return this._bullets||(this._bullets=new Oe(new It),this._disposers.push(new fe(this._bullets)),this._disposers.push(this._bullets.template),this._bullets.events.on("inserted",function(t){t.newValue.events.on("propertychanged",function(n){n.property!="locationX"&&n.property!="locationY"||e.positionBullet(n.target)},void 0,!1)},void 0,!1)),this._bullets},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.bullets.copyFrom(e.bullets);var t=this.middleLine;t&&(t instanceof yt&&e.middleLine instanceof yt&&t.copyFrom(e.middleLine),t instanceof qi&&e.middleLine instanceof qi&&t.copyFrom(e.middleLine)),this.link.copyFrom(e.link)},i.prototype.getTooltipX=function(){if(this.middleLine)return this.middleLine.positionToPoint(this.tooltipLocation).x},i.prototype.getTooltipY=function(){if(this.middleLine)return this.middleLine.positionToPoint(this.tooltipLocation).y},Object.defineProperty(i.prototype,"gradient",{get:function(){return this._gradient||(this._gradient=new dt),this._gradient},enumerable:!0,configurable:!0}),i}(W);_.registeredClasses.FlowDiagramLink=tr;var as=function(s){function i(){var e=s.call(this)||this;return e.className="FlowDiagramDataItem",e.values.value={},e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"fromName",{get:function(){return this.properties.fromName},set:function(e){this.setProperty("fromName",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"toName",{get:function(){return this.properties.toName},set:function(e){this.setProperty("toName",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"color",{get:function(){return this.properties.color},set:function(e){this.setProperty("color",ft(e))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){return this.values.value.value},set:function(e){this.setValue("value",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"link",{get:function(){var e=this;if(!this._link){var t=this.component.links.create();this._link=t,this.addSprite(t),this._disposers.push(new le(function(){e.component&&e.component.links.removeValue(t)}))}return this._link},enumerable:!0,configurable:!0}),i}(oo),os=function(s){function i(){var e=s.call(this)||this;e.colors=new $i,e.className="FlowDiagram",e.nodePadding=20,e.sortBy="none",e.sequencedInterpolation=!0,e.colors.step=2,e.minNodeSize=.02;var t=e.chartContainer.createChild(W);t.shouldClone=!1,t.layout="none",t.isMeasured=!1,e.linksContainer=t;var n=e.chartContainer.createChild(W);return n.shouldClone=!1,n.layout="none",n.isMeasured=!1,e.nodesContainer=n,e.dataItem=e.createDataItem(),e.dataItem.component=e,e.applyTheme(),e}return w(i,s),i.prototype.dispose=function(){s.prototype.dispose.call(this),this.dataItem.dispose()},i.prototype.validateData=function(){var e=this;this._parseDataFrom==0&&this.nodes.clear(),this.sortNodes(),this.colors.reset(),s.prototype.validateData.call(this);var t,n,r=0,a=0;A(this.dataItems.iterator(),function(l){var h=l.fromName;h&&((p=e.nodes.getKey(h))||((p=e.nodes.create(h)).name=h,p.chart=e,p.dataItem=l),l.fromNode=p,l.fromNode.outgoingDataItems.push(l));var p,u=l.toName;if(u&&((p=e.nodes.getKey(u))||((p=e.nodes.create(u)).name=u,p.chart=e,p.dataItem=l),l.toNode=p,l.toNode.incomingDataItems.push(l)),!l.fromNode){var d=new Nn;d.opacities=[0,1],l.link.strokeModifier=d}if(!l.toNode){var c=new Nn;c.opacities=[1,0],l.link.strokeModifier=c}var f=l.value;y(f)&&(r+=f,a++,(t>f||!y(t))&&(t=f),(n<f||!y(n))&&(n=f))});var o="value";this.dataItem.setCalculatedValue(o,n,"high"),this.dataItem.setCalculatedValue(o,t,"low"),this.dataItem.setCalculatedValue(o,r,"sum"),this.dataItem.setCalculatedValue(o,r/a,"average"),this.dataItem.setCalculatedValue(o,a,"count"),A(this.nodes.iterator(),function(l){var h=l[1];h.fill instanceof se&&(h.color=h.fill),h.color==null&&(h.color=e.colors.next()),h.dataItem.color!=null&&(h.color=h.dataItem.color),h.dataItem.visible||h.hide(0),e.getNodeValue(h)}),this.sortNodes(),this.feedLegend()},i.prototype.handleDataItemWorkingValueChange=function(e,t){this.invalidate()},i.prototype.sortNodes=function(){this.sortBy=="name"?this._sorted=this.nodes.sortedIterator():this.sortBy=="value"?this._sorted=yi(this.nodes.iterator(),function(e,t){return yr(Pt(e[1].total,t[1].total))}):this._sorted=this.nodes.iterator()},i.prototype.getNodeValue=function(e){var t=0,n=0;A(e.incomingDataItems.iterator(),function(r){var a=r.getWorkingValue("value");y(a)&&(t+=a)}),A(e.outgoingDataItems.iterator(),function(r){var a=r.getWorkingValue("value");y(a)&&(n+=a)}),e.total=t+n,e.totalIncoming=t,e.totalOutgoing=n},i.prototype.changeSorting=function(){this.sortNodes()},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Flow diagram"))},i.prototype.createDataItem=function(){return new as},Object.defineProperty(i.prototype,"nodePadding",{get:function(){return this.getPropertyValue("nodePadding")},set:function(e){this.setPropertyValue("nodePadding",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sortBy",{get:function(){return this.getPropertyValue("sortBy")},set:function(e){this.setPropertyValue("sortBy",e),this.changeSorting()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minNodeSize",{get:function(){return this.getPropertyValue("minNodeSize")},set:function(e){this.setPropertyValue("minNodeSize",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"nodes",{get:function(){if(!this._nodes){var e=this.createNode();e.events.on("hit",function(t){t.target.handleHit(t)}),this._nodes=new Bi(e),this._disposers.push(new Jt(this._nodes))}return this._nodes},enumerable:!0,configurable:!0}),i.prototype.createNode=function(){var e=new er;return this._disposers.push(e),e},Object.defineProperty(i.prototype,"links",{get:function(){return this._links||(this._links=new Oe(this.createLink()),this._disposers.push(new fe(this._links))),this._links},enumerable:!0,configurable:!0}),i.prototype.createLink=function(){var e=new tr;return this._disposers.push(e),e},i.prototype.feedLegend=function(){var e=this.legend;if(e){var t=[];this.nodes.each(function(n,r){t.push(r)}),e.data=t,e.dataFields.name="name"}},i.prototype.disposeData=function(){s.prototype.disposeData.call(this),this.nodes.clear()},i}(ai);_.registeredClasses.FlowDiagram=os;var ls=function(s){function i(){var e=s.call(this)||this;e.className="LabelBullet";var t=e.createChild($e);return t.shouldClone=!1,t.verticalCenter="middle",t.horizontalCenter="middle",t.truncate=!0,t.hideOversized=!1,t.maxWidth=500,t.maxHeight=500,t.stroke=B(),t.strokeOpacity=0,t.fill=new ae().getFor("text"),e.events.on("maxsizechanged",e.handleMaxSize,e,!1),e.label=t,e.applyTheme(),e}return w(i,s),i.prototype.handleMaxSize=function(){this.label.maxWidth=this.maxWidth,this.label.maxHeight=this.maxHeight},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.label.copyFrom(e.label)},i}(It);_.registeredClasses.LabelBullet=ls;var Vo=function(s){function i(){var e=s.call(this)||this;e.nextInCoord=0,e.nextOutCoord=0,e.className="SankeyNode",e.width=10,e.height=10;var t=e.createChild(ls);t.shouldClone=!1,t.locationX=1,t.locationY=.5,t.label.text="{name}",t.width=150,t.height=150,t.label.horizontalCenter="left",t.label.padding(0,5,0,5),e.nameLabel=t;var n=e.createChild(ls);n.shouldClone=!1,n.label.hideOversized=!1,n.locationX=.5,n.locationY=.5,n.width=150,n.height=150,n.label.horizontalCenter="middle",e.valueLabel=n;var r=e.hiddenState;return r.properties.fill=new ae().getFor("disabledBackground"),r.properties.opacity=.5,r.properties.visible=!0,e.background.hiddenState.copyFrom(r),e}return w(i,s),i.prototype.invalidateLinks=function(){var e=this;s.prototype.invalidateLinks.call(this),this.nextInCoord=0,this.nextOutCoord=0;var t=this.chart;if(t){var n=t.orientation;this._incomingSorted&&A(this._incomingSorted,function(r){var a=r.link,o=r.getWorkingValue("value");if(y(o)){a.parent=e.chart.linksContainer;var l=void 0,h=void 0,p=void 0;if(n=="horizontal"?(l=e.pixelX+e.dx,h=e.nextInCoord+e.pixelY+e.dy,p=0):(h=e.pixelY+e.dy,l=e.nextInCoord+e.pixelX+e.dx,p=90),a.endX=l,a.endY=h,a.startAngle=p,a.endAngle=p,a.gradient.rotation=p,a.linkWidth=o*t.valueHeight,!r.fromNode){n=="horizontal"?(a.maxWidth=200,a.startX=e.pixelX+e.dx-a.maxWidth,a.startY=a.endY):(a.maxHeight=200,a.startX=a.endX,a.startY=e.pixelY+e.dy-a.maxHeight),a.gradient,a.fill=r.toNode.color;var u=a.gradient.stops.getIndex(0);u&&(a.colorMode=="gradient"&&(u.color=e.color),u.opacity=0,a.fill=a.gradient,a.stroke=a.gradient,a.gradient.validate())}e.nextInCoord+=a.linkWidth}}),this._outgoingSorted&&A(this._outgoingSorted,function(r){var a=r.link;a.parent=e.chart.linksContainer;var o=r.getWorkingValue("value");if(y(o)){var l=void 0,h=void 0,p=void 0;if(n=="horizontal"?(p=0,l=e.pixelX+e.pixelWidth+e.dx-1,h=e.nextOutCoord+e.pixelY+e.dy):(p=90,l=e.nextOutCoord+e.pixelX+e.dx,h=e.pixelY+e.pixelHeight+e.dy-1),a.startX=l,a.startY=h,a.startAngle=p,a.endAngle=p,a.gradient.rotation=p,a.linkWidth=o*e.chart.valueHeight,!r.toNode){n=="horizontal"?(a.maxWidth=200,a.endX=e.pixelX+a.maxWidth+e.dx,a.endY=a.startY):(a.maxHeight=200,a.endX=a.startX,a.endY=e.pixelY+a.maxHeight+e.dy),a.opacity=e.opacity;var u=a.gradient.stops.getIndex(1);u&&(a.colorMode=="gradient"&&(u.color=e.color),u.opacity=0,a.fill=a.gradient,a.stroke=a.gradient,a.gradient.validate())}e.nextOutCoord+=a.linkWidth}})}this.positionBullet(this.nameLabel),this.positionBullet(this.valueLabel)},i.prototype.positionBullet=function(e){e&&(e.x=this.measuredWidth*e.locationX,e.y=this.measuredHeight*e.locationY)},Object.defineProperty(i.prototype,"level",{get:function(){return this.getPropertyValue("level")},set:function(e){this.setPropertyValue("level",e,!0)},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.nameLabel.copyFrom(e.nameLabel),this.valueLabel.copyFrom(e.valueLabel)},i}(er);_.registeredClasses.SankeyNode=Vo;var Fo=function(s){function i(){var e=s.call(this)||this;return e.className="SankeyLink",new ae,e.tension=.8,e.controlPointDistance=.2,e.startAngle=0,e.endAngle=0,e.linkWidth=0,e.startX=0,e.endX=0,e.startY=0,e.endY=0,e.middleLine=e.createChild(jn),e.middleLine.shouldClone=!1,e.middleLine.strokeOpacity=0,e.applyTheme(),e}return w(i,s),i.prototype.makeBackwards=function(){this.states.getKey("backwards")!=null&&this.setState("backwards")},i.prototype.validate=function(){var e,t,n,r;if(s.prototype.validate.call(this),!this.isTemplate){var a=this.startX,o=this.startY,l=this.endX,h=this.endY;if(this.states.getKey("backwards")&&this.setState("default"),this.dataItem){var p=this.dataItem.component;p&&(p.orientation=="horizontal"?l<a&&(a=(e=Ti([l,a],2))[0],l=e[1],o=(t=Ti([h,o],2))[0],h=t[1],this.makeBackwards()):h<o&&(o=(n=Ti([h,o],2))[0],h=n[1],a=(r=Ti([l,a],2))[0],l=r[1],this.makeBackwards()))}y(l)||(l=a),y(h)||(h=o);var u=this.startAngle,d=this.endAngle,c=this.linkWidth,f="",g=a,m=o,x=l,b=h,C=a+c*M(u),S=l+c*M(d),P=o+c*L(u),O=h+c*L(d),I=a+c/2*M(u),k=l+c/2*M(d),D=o+c/2*L(u),G=h+c/2*L(d);this.zIndex=this.zIndex||this.dataItem.index;var H=this.tension+(1-this.tension)*M(u),ne=this.tension+(1-this.tension)*L(u);if(this.middleLine.tensionX=H,this.middleLine.tensionY=ne,y(c)&&y(a)&&y(l)&&y(o)&&y(h)){V(g,3)==V(x,3)&&(x+=.01),V(m,3)==V(b,3)&&(b+=.01),V(C,3)==V(S,3)&&(S+=.01),V(P,3)==V(O,3)&&(O+=.01);var Te=Math.min(C,S,g,x),Ge=Math.min(P,O,m,b),he=Math.max(C,S,g,x),et=Math.max(P,O,m,b);this._bbox={x:Te,y:Ge,width:he-Te,height:et-Ge};var we=this.controlPointDistance,U=g+(x-g)*we*L(u),nt=m+(b-m)*we*M(u),qe=x-(x-g)*we*L(d),Y=b-(b-m)*we*M(d),We=I+(k-I)*we*L(u),ge=D+(G-D)*we*M(u),ke=k-(k-I)*we*L(d),Lt=G-(G-D)*we*M(d),tt=Ee({x:U,y:nt},{x:qe,y:Y}),Je=(c/L(tt)-c)/Ws(tt)*L(u),Dt=(c/M(tt)-c)*Ws(tt)*M(u),jt=-Je/2+C+(S-C)*we*L(u),Oi=-Dt/2+P+(O-P)*we*M(u),Si=-Je/2+S-(S-C)*we*L(d),Ii=-Dt/2+O-(O-P)*we*M(d);G==D&&(G+=.01),this.middleLine.segments=[[{x:I,y:D},{x:We,y:ge},{x:ke,y:Lt},{x:k,y:G}]],U+=Je/2,nt+=Dt/2,qe+=Je/2,Y+=Dt/2,f+=E({x:g,y:m}),f+=new zt(H,ne).smooth([{x:g,y:m},{x:U,y:nt},{x:qe,y:Y},{x,y:b}]),f+=T({x:S,y:O}),f+=new zt(H,ne).smooth([{x:S,y:O},{x:Si,y:Ii},{x:jt,y:Oi},{x:C,y:P}]),f+=" Z"}this.link.path=f,this.maskBullets&&(this.bulletsMask.path=f,this.bulletsContainer.mask=this.bulletsMask),this.positionBullets()}},Object.defineProperty(i.prototype,"startX",{get:function(){return this.getPropertyValue("startX")},set:function(e){this.setPropertyValue("startX",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endX",{get:function(){return this.getPropertyValue("endX")},set:function(e){this.setPropertyValue("endX",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startY",{get:function(){return this.getPropertyValue("startY")},set:function(e){this.setPropertyValue("startY",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endY",{get:function(){return this.getPropertyValue("endY")},set:function(e){this.setPropertyValue("endY",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"linkWidth",{get:function(){return this.getPropertyValue("linkWidth")},set:function(e){this.setPropertyValue("linkWidth",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"controlPointDistance",{get:function(){return this.getPropertyValue("controlPointDistance")},set:function(e){this.setPropertyValue("controlPointDistance",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(e){this.setPropertyValue("tension",e,!0)},enumerable:!0,configurable:!0}),i}(tr);_.registeredClasses.SankeyLink=Fo;var Np=function(s){function i(){var e=s.call(this)||this;return e.className="SankeyDiagramDataItem",e.applyTheme(),e}return w(i,s),i}(as),Wp=function(s){function i(){var e=s.call(this)||this;return e.className="SankeyDiagram",e.orientation="horizontal",e.nodeAlign="middle",e.nodesContainer.width=F(100),e.nodesContainer.height=F(100),e.linksContainer.width=F(100),e.linksContainer.height=F(100),e.applyTheme(),e}return w(i,s),i.prototype.validateData=function(){var e=this;this._valueHeight=void 0,s.prototype.validateData.call(this),this._levelCount=0,this.nodes.each(function(t,n){n.level=void 0}),this.nodes.each(function(t,n){n.level=e.getNodeLevel(n,0),e._levelCount=q(e._levelCount,n.level)})},i.prototype.getNodeLevel=function(e,t){var n=this,r=[t];return A(e.incomingDataItems.iterator(),function(a){a.fromNode&&(y(a.fromNode.level)?r.push(a.fromNode.level+1):(n._counter=0,n.checkLoop(a.fromNode),n._counter<n.dataItems.length&&r.push(n.getNodeLevel(a.fromNode,t+1))))}),Math.max.apply(Math,di(r))},i.prototype.checkLoop=function(e){var t=this;this._counter++,this._counter>this.dataItems.length||A(e.incomingDataItems.iterator(),function(n){t.checkLoop(n.fromNode)})},i.prototype.calculateValueHeight=function(){var e=this;this._levelSum={},this._levelNodesCount={},this.maxSum=0;var t,n,r,a=this.dataItem.values.value.sum;A(this._sorted,function(u){var d=u[1];e.getNodeValue(d)}),this.nodes.each(function(u,d){var c=d.level,f=Math.max(d.totalIncoming,d.totalOutgoing);f/a<e.minNodeSize&&(f=a*e.minNodeSize),y(e._levelSum[c])?e._levelSum[c]+=f:e._levelSum[c]=f,y(e._levelNodesCount[c])?e._levelNodesCount[c]++:e._levelNodesCount[c]=1}),t=this.orientation=="horizontal"?this.chartContainer.maxHeight-1:this.chartContainer.maxWidth-1,X(this._levelSum,function(u,d){var c=d,f=e._levelNodesCount[u],g=(t-(f-1)*e.nodePadding)/c;g==1/0&&(g=0),(r>g||!y(r))&&(r=g,e.maxSum=c,n=ce(u))}),this._maxSumLevel=n;var o=this._levelNodesCount[this._maxSumLevel],l=(t-(o-1)*this.nodePadding)/this.maxSum;if(l==1/0&&(l=0),y(this.valueHeight)){var h=void 0;try{h=this._heightAnimation.animationOptions[0].to}catch{}if(h!=l){var p=this.interpolationDuration;try{p=this.nodes.template.states.getKey("active").transitionDuration}catch{}this._heightAnimation=new gt(this,{property:"valueHeight",from:this.valueHeight,to:l},p,this.interpolationEasing).start(),this._disposers.push(this._heightAnimation)}}else this.valueHeight=l},i.prototype.validate=function(){var e=this;s.prototype.validate.call(this),this.calculateValueHeight();var t,n=this.nodesContainer,r={},a=this._levelNodesCount[this._maxSumLevel],o=this.dataItem.values.value.sum;t=this.orientation=="horizontal"?this.chartContainer.maxHeight-1:this.chartContainer.maxWidth-1,A(this._sorted,function(l){var h,p,u,d=l[1],c=d.level,f=0,g=e._levelNodesCount[c];switch(e.nodeAlign){case"bottom":f=(e.maxSum-e._levelSum[c])*e.valueHeight-(g-a)*e.nodePadding;break;case"middle":f=(e.maxSum-e._levelSum[c])*e.valueHeight/2-(g-a)*e.nodePadding/2}if(e.maxSum==0)switch(e.nodeAlign){case"bottom":f=t-g*(e.minNodeSize*t+e.nodePadding);break;case"middle":f=t/2-g/2*(e.minNodeSize*t+e.nodePadding)}d.parent=n;var m=Math.max(d.totalIncoming,d.totalOutgoing);if(m/o<e.minNodeSize&&(m=o*e.minNodeSize),e.orientation=="horizontal"){p=(h=(e.innerWidth-d.pixelWidth)/e._levelCount)*d.level,u=r[c]||f;var x=m*e.valueHeight;o==0&&x==0&&(x=e.minNodeSize*t),d.height=x,d.minX=p,d.maxX=p,r[c]=u+x+e.nodePadding}else{h=(e.innerHeight-d.pixelHeight)/e._levelCount,p=r[c]||f,u=h*d.level;var b=m*e.valueHeight;o==0&&b==0&&(b=e.minNodeSize*t),d.width=b,d.minY=u,d.maxY=u,r[c]=p+b+e.nodePadding}d.x=p,d.y=u})},i.prototype.showReal=function(e){var t=this;if(!this.preventShow){if(this.interpolationDuration>0){var n=this.nodesContainer,r=0;A(this.links.iterator(),function(a){a.hide(0)}),A(this._sorted,function(a){var o,l=a[1];t.orientation=="horizontal"?(l.dx=-(n.pixelWidth-l.pixelWidth)/Math.max(t._levelCount,1),o="dx"):(l.dy=-(n.pixelHeight-l.pixelHeight)/Math.max(t._levelCount,1),o="dy");var h=0,p=t.interpolationDuration;t.sequencedInterpolation&&(h=t.sequencedInterpolationDelay*r+p*r/Sl(t.nodes.iterator())),l.opacity=0,l.invalidateLinks(),l.animate([{property:"opacity",from:0,to:1},{property:o,to:0}],t.interpolationDuration,t.interpolationEasing).delay(h),A(l.outgoingDataItems.iterator(),function(u){var d=u.link.show(t.interpolationDuration);d&&!d.isFinished()&&d.delay(h)}),A(l.incomingDataItems.iterator(),function(u){if(!u.fromNode){var d=u.link.show(t.interpolationDuration);d&&!d.isFinished()&&d.delay(h)}}),r++})}return s.prototype.showReal.call(this)}},i.prototype.changeSorting=function(){var e=this;this.sortNodes();var t={};A(this._sorted,function(n){var r,a,o=n[1],l=o.level,h=(e.maxSum-e._levelSum[l])*e.valueHeight/2;e.orientation=="horizontal"?(r="y",a=o.pixelHeight):(r="x",a=o.pixelWidth),o.animate({property:r,to:t[l]||h},e.interpolationDuration,e.interpolationEasing),t[l]=(t[l]||h)+a+e.nodePadding,o.invalidateLinks()})},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Sankey diagram"))},i.prototype.createDataItem=function(){return new Np},Object.defineProperty(i.prototype,"nodeAlign",{get:function(){return this.getPropertyValue("nodeAlign")},set:function(e){this.setPropertyValue("nodeAlign",e),this.changeSorting()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(e){this.setPropertyValue("orientation",e,!0);var t=this.nodes.template.nameLabel;e=="vertical"?(this.nodes.template.width=void 0,t.label.horizontalCenter="middle",t.locationX=.5):(this.nodes.template.height=void 0,t.label.horizontalCenter="left",t.locationX=1)},enumerable:!0,configurable:!0}),i.prototype.createNode=function(){var e=new Vo;return this._disposers.push(e),e},i.prototype.createLink=function(){var e=new Fo;return this._disposers.push(e),e},Object.defineProperty(i.prototype,"valueHeight",{get:function(){return this._valueHeight},set:function(e){e!=this._valueHeight&&(this._valueHeight=e,this.invalidate())},enumerable:!0,configurable:!0}),i.prototype.disposeData=function(){s.prototype.disposeData.call(this),this._sorted=this.nodes.iterator()},i}(os);_.registeredClasses.SankeyDiagram=Wp;var Mo=function(s){function i(){var e=s.call(this)||this;e.className="ChordNode";var t=e.createChild(Jn);t.location=.5,t.radius=5,t.text="{name}",t.zIndex=1,t.shouldClone=!1,e.label=t,e.layout="none",e.events.on("positionchanged",e.updateRotation,e,!1),e.isMeasured=!1,e.slice=e.createChild(ri),e.slice.isMeasured=!1;var n=e.hiddenState;return n.properties.fill=new ae().getFor("disabledBackground"),n.properties.opacity=.5,n.properties.visible=!0,e.setStateOnChildren=!1,e.slice.hiddenState.properties.visible=!0,e.adapter.add("tooltipX",function(r,a){return a.slice.ix*(a.slice.radius-(a.slice.radius-a.slice.pixelInnerRadius)/2)}),e.adapter.add("tooltipY",function(r,a){return a.slice.iy*(a.slice.radius-(a.slice.radius-a.slice.pixelInnerRadius)/2)}),e}return w(i,s),i.prototype.invalidateLinks=function(){var e=this;s.prototype.invalidateLinks.call(this);var t=this.label,n=this.slice,r=this.chart;if(r&&n){var a=this.total,o=n.arc,l=n.startAngle;this.children.each(function(u){if(u instanceof It){var d=u.locationX;y(d)||(d=.5);var c=u.locationY;y(c)||(c=1);var f=l+o*d,g=c*n.radius;u.x=g*L(f),u.y=g*M(f)}});var h=l+o*t.location,p=l+(1-a/this.adjustedTotal)*o*.5;Fe(p)&&(p=l),t.fixPosition(h,n.radius),this.nextAngle=p,this._outgoingSorted&&A(this._outgoingSorted,function(u){var d=u.link;d.parent=e.chart.linksContainer;var c=u.getWorkingValue("value");if(y(c)){if(r.nonRibbon){var f=d.percentWidth;y(f)||(f=5),f/=100,d.startAngle=l+o/2-o/2*f,d.arc=o*f}else d.arc=c*r.valueAngle,d.startAngle=e.nextAngle,e.nextAngle+=d.arc;u.toNode||(d.endAngle=d.startAngle),d.radius=n.pixelInnerRadius}}),this._incomingSorted&&A(this._incomingSorted,function(u){var d=u.link;if(d.radius=n.pixelInnerRadius,r.nonRibbon){var c=d.percentWidth;y(c)||(c=5),c/=100,d.endAngle=l+o/2-o/2*c,d.arc=o*c}else{d.endAngle=e.nextAngle;var f=u.getWorkingValue("value");y(f)&&(d.arc=f*r.valueAngle,e.nextAngle+=d.arc)}u.fromNode||(d.startAngle=d.endAngle)})}},i.prototype.updateRotation=function(){var e=this.slice,t=this.trueStartAngle+e.arc/2,n=e.radius,r=n*L(t),a=n*M(t),o=Ee({x:r+this.pixelX,y:a+this.pixelY});e.startAngle=this.trueStartAngle+(o-t),this.dx=-this.pixelX,this.dy=-this.pixelY},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.label.copyFrom(e.label),this.slice.copyFrom(e.slice)},i}(er);_.registeredClasses.ChordNode=Mo;var Id=function(s){function i(){var e=s.call(this)||this;return e.className="QuadraticCurve",e.element=e.paper.add("path"),e.pixelPerfect=!1,e.fill=B(),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){if(y(this.x1+this.x2+this.y1+this.y2+this.cpx+this.cpy)){var e={x:this.x1,y:this.y1},t={x:this.x2,y:this.y2},n={x:this.cpx,y:this.cpy},r=E(e)+ni(t,n);this.path=r}},Object.defineProperty(i.prototype,"cpx",{get:function(){return this.getPropertyValue("cpx")},set:function(e){this.setPropertyValue("cpx",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cpy",{get:function(){return this.getPropertyValue("cpy")},set:function(e){this.setPropertyValue("cpy",e,!0)},enumerable:!0,configurable:!0}),i.prototype.positionToPoint=function(e){var t={x:this.x1,y:this.y1},n={x:this.cpx,y:this.cpy},r={x:this.x2,y:this.y2},a=Xs(t,r,n,e),o=Xs(t,r,n,e+.001);return{x:a.x,y:a.y,angle:Ee(a,o)}},i}(yt),Lo=function(s){function i(){var e=s.call(this)||this;return e.className="ChordLink",e.middleLine=e.createChild(Id),e.middleLine.shouldClone=!1,e.middleLine.strokeOpacity=0,e.applyTheme(),e}return w(i,s),i.prototype.validate=function(){if(s.prototype.validate.call(this),!this.isTemplate){var e=this.startAngle,t=this.endAngle,n=this.arc,r=this.radius,a=this.dataItem.fromNode,o=this.dataItem.toNode,l=0,h=0;a&&(l=a.pixelX+a.dx,h=a.pixelY+a.dy);var p=0,u=0;if(o&&(p=o.pixelX+o.dx,u=o.pixelY+o.dy),r>0){var d=r*L(e)+l,c=r*M(e)+h,f=r*L(t)+p,g=r*M(t)+u,m={x:0,y:0},x=E({x:d,y:c});x+=Le(e,n,r),x+=ni({x:f,y:g},m),x+=Le(t,n,r),x+=ni({x:d,y:c},m),this.link.path=n>0?x:"",this.maskBullets&&(this.bulletsMask.path=x,this.bulletsContainer.mask=this.bulletsMask);var b=e+n/2,C=t+n/2,S=this.middleLine;S.x1=r*L(b)+l,S.y1=r*M(b)+h,S.x2=r*L(C)+p,S.y2=r*M(C)+u,S.cpx=0,S.cpy=0,S.stroke=this.fill,this.positionBullets()}}},Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPropertyValue("radius",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"arc",{get:function(){return this.getPropertyValue("arc")},set:function(e){this.setPropertyValue("arc",e,!0)},enumerable:!0,configurable:!0}),i}(tr);_.registeredClasses.ChordLink=Lo;var Xp=function(s){function i(){var e=s.call(this)||this;return e.className="ChordDiagramDataItem",e.applyTheme(),e}return w(i,s),i}(as),Yp=function(s){function i(){var e=s.call(this)||this;e.valueAngle=0,e.className="ChordDiagram",e.startAngle=-90,e.endAngle=270,e.radius=F(80),e.innerRadius=-15,e.nodePadding=5;var t=e.chartContainer.createChild(W);return t.align="center",t.valign="middle",t.shouldClone=!1,t.layout="absolute",e.chordContainer=t,e.nodesContainer.parent=t,e.linksContainer.parent=t,e.chartContainer.events.on("maxsizechanged",e.invalidate,e,!1),e.applyTheme(),e}return w(i,s),i.prototype.validate=function(){var e=this,t=this.chartContainer,n=this.endAngle,r=this.startAngle+this.nodePadding/2,a=xt(this.startAngle,this.endAngle,1);a=Mi([a,{x:0,y:0,width:0,height:0}]);var o=Math.min(t.innerWidth/a.width,t.innerHeight/a.height);y(o)||(o=0);var l=Re(this.radius,o),h=Re(this.innerRadius,l,!0),p=this.dataItem.values.value.sum,u=0,d=0;A(this._sorted,function(c){var f=c[1];e.getNodeValue(f),u++;var g=f.total;f.total/p<e.minNodeSize&&(g=p*e.minNodeSize),d+=g}),this.valueAngle=(n-this.startAngle-this.nodePadding*u)/d,A(this._sorted,function(c){var f=c[1],g=f.slice;g.radius=l,g.innerRadius=h;var m,x=f.total;f.total/p<e.minNodeSize&&(x=p*e.minNodeSize),f.adjustedTotal=x,m=e.nonRibbon?(n-e.startAngle)/u-e.nodePadding:e.valueAngle*x,g.arc=m,g.startAngle=r,f.trueStartAngle=r,f.parent=e.nodesContainer,f.validate(),r+=m+e.nodePadding}),this.chordContainer.definedBBox={x:l*a.x,y:l*a.y,width:l*a.width,height:l*a.height},this.chordContainer.invalidateLayout(),s.prototype.validate.call(this)},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Chord diagram"))},i.prototype.createDataItem=function(){return new Xp},Object.defineProperty(i.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(e){this.setPropertyValue("startAngle",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(e){this.setPropertyValue("endAngle",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"nonRibbon",{get:function(){return this.getPropertyValue("nonRibbon")},set:function(e){this.setPropertyValue("nonRibbon",e,!0),this.links.template.middleLine.strokeOpacity=1,this.links.template.link.fillOpacity=0},enumerable:!0,configurable:!0}),i.prototype.createNode=function(){var e=new Mo;return this._disposers.push(e),e},i.prototype.createLink=function(){var e=new Lo;return this._disposers.push(e),e},i}(os);_.registeredClasses.ChordDiagram=Yp;var hi=function(s){function i(){var e=s.call(this)||this;return e.className="Column",e.width=F(80),e.height=F(80),e.events.disableType("transformed"),e.applyOnClones=!0,e.strokeOpacity=1,e.layout="none",e.createAssets(),e.events.on("childadded",e.handleKidAdded,e,!1),e}return w(i,s),i.prototype.handleKidAdded=function(){this.layout=="none"&&(this.layout="absolute")},i.prototype.createAssets=function(){this.column=this.createChild(St),this.column.shouldClone=!1,this.column.isMeasured=!1,this.column.cornerRadius(0,0,0,0),this._disposers.push(this.column)},i.prototype.validate=function(){s.prototype.validate.call(this);var e=this.column;e&&(e.width=ie(this.pixelWidth,this.maxWidth),e.height=ie(this.pixelHeight,this.maxHeight),e.invalid&&e.validate())},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.column&&this.column.copyFrom(e.column)},Object.defineProperty(i.prototype,"bbox",{get:function(){return this.definedBBox?this.definedBBox:this.column?{x:0,y:0,width:this.column.measuredWidth,height:this.column.measuredHeight}:{x:0,y:0,width:ie(this.pixelWidth,this.maxWidth),height:ie(this.pixelHeight,this.maxHeight)}},enumerable:!0,configurable:!0}),i}(W);_.registeredClasses.Column=hi;var Gt=function(s){function i(){var e=s.call(this)||this;return e.className="ColumnSeriesDataItem",e.locations.dateX=.5,e.locations.dateY=.5,e.locations.categoryX=.5,e.locations.categoryY=.5,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"column",{get:function(){return this._column},set:function(e){this.setColumn(e)},enumerable:!0,configurable:!0}),i.prototype.setColumn=function(e){var t=this;if(this._column&&e!=this._column&&z(this.sprites,this._column),this._column=e,e){var n=e.dataItem;n&&n!=this&&(n.column=void 0),this.addSprite(e),this._disposers.push(new le(function(){t.component&&t.component.columns.removeValue(e)}))}},Object.defineProperty(i.prototype,"width",{get:function(){var e=this.properties.width;return this._adapterO&&(e=this._adapterO.apply("width",e)),e},set:function(e){this.properties.width!=e&&(this.properties.width=e,this.component&&this.component.validateDataElement(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"height",{get:function(){var e=this.properties.height;return this._adapterO&&(e=this._adapterO.apply("height",e)),e},set:function(e){this.properties.height!=e&&(this.properties.height=e,this.component&&this.component.validateDataElement(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rangesColumns",{get:function(){return this._rangesColumns||(this._rangesColumns=new me),this._rangesColumns},enumerable:!0,configurable:!0}),i}(qn),pi=function(s){function i(){var e=s.call(this)||this;e._startLocation=0,e._endLocation=1,e.className="ColumnSeries",e.width=F(100),e.height=F(100),e.strokeOpacity=0,e.fillOpacity=1,e.clustered=!0;var t=e.mainContainer.createChild(W);return t.shouldClone=!1,t.isMeasured=!1,t.layout="none",e._columnsContainer=t,e.columns.template.pixelPerfect=!1,e.tooltipColorSource=e.columns.template,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"columnsContainer",{get:function(){return this._columnsContainer},enumerable:!0,configurable:!0}),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Column Series"))},i.prototype.createDataItem=function(){return new Gt},i.prototype.validate=function(){var e=this;if(this.group.node.removeAttribute("fill"),this.chart&&this.xAxis&&this.yAxis){var t,n=this.chart.series,r=0,a=0,o=[];A(n.iterator(),function(g){var m;g instanceof i&&e.baseAxis==g.baseAxis&&(m=e.baseAxis==e.xAxis?e.chart.yAxes.indexOf(g.yAxis):e.chart.xAxes.indexOf(g.xAxis),o.push({series:g,axis:m}))}),o.sort(function(g,m){return g.axis-m.axis}),j(o,function(g){var m=g.series;m instanceof i&&((!m.stacked&&m.clustered||t!=g.axis&&m.clustered)&&r++,m==e&&(a=r-1)),t=g.axis}),this.clustered||(a=0,r=1);var l=this.baseAxis.renderer,h=l.cellStartLocation,p=l.cellEndLocation;this._startLocation=h+a/r*(p-h),this._endLocation=h+(a+1)/r*(p-h);var u=this.xAxis,d=this.yAxis;u instanceof Ve&&d instanceof ee&&u.sortBySeries==this&&this.sortCategoryAxis(u,"valueY"),d instanceof Ve&&u instanceof ee&&d.sortBySeries==this&&this.sortCategoryAxis(d,"valueX")}s.prototype.validate.call(this);for(var c=0;c<this.startIndex;c++){var f=this.dataItems.getIndex(c);this.disableUnusedColumns(f)}for(c=this.dataItems.length-1;c>this.endIndex;c--)f=this.dataItems.getIndex(c),this.disableUnusedColumns(f);this._propertiesChanged=!1},i.prototype.sortCategoryAxis=function(e,t){var n=this;this.dataItems.values.sort(function(a,o){return o.values[t].workingValue-a.values[t].workingValue});var r=0;this.dataItems.each(function(a){a._index=r,r++}),e.dataItems.each(function(a){var o=a.component,l=o.categoryToPosition(a.category)-a.deltaPosition,h=o.getSeriesDataItemByCategory(a.category,n);if(h){var p=n.dataItems.indexOf(h);a._index=p;var u=V((p+.5)/n.dataItems.length-l,3);a.deltaAnimation&&!a.deltaAnimation.isDisposed()&&a.deltaAnimation.animationOptions[0].to==u||u!=V(a.deltaPosition,3)&&(a.deltaAnimation&&a.deltaAnimation.stop(),a.deltaAnimation=a.animate({property:"deltaPosition",from:-u,to:0},o.interpolationDuration,o.interpolationEasing),n._disposers.push(a.deltaAnimation))}}),e.dataItems.values.sort(function(a,o){return a.index-o.index})},i.prototype.validateDataElement=function(e){this.chart&&this.xAxis&&this.yAxis&&(this.validateDataElementReal(e),s.prototype.validateDataElement.call(this,e))},i.prototype.getStartLocation=function(e){var t=this._startLocation;return this.baseAxis==this.xAxis?t+=e.locations[this.xOpenField]-.5:t+=e.locations[this.yOpenField]-.5,t},i.prototype.getEndLocation=function(e){var t=this._endLocation;return this.baseAxis==this.xAxis?t+=e.locations[this.xField]-.5:t+=e.locations[this.yField]-.5,t},i.prototype.validateDataElementReal=function(e){var t,n,r,a,o=this,l=this.getStartLocation(e),h=this.getEndLocation(e),p=this.xField,u=this.xOpenField,d=this.yField,c=this.yOpenField,f=this.columns.template,g=f.percentWidth,m=f.percentHeight,x=f.pixelWidth,b=f.pixelHeight,C=f.maxWidth,S=f.maxHeight,P=f.pixelPaddingLeft,O=f.pixelPaddingRight,I=f.pixelPaddingTop,k=f.pixelPaddingBottom,D=!1,G=e.width;v(G)&&(y(G)&&(x=G),G instanceof te&&(g=100*G.value));var H=e.height;if(v(H)&&(y(H)&&(b=H),H instanceof te&&(m=100*H.value)),this.xAxis instanceof Ve&&this.yAxis instanceof Ve){if(!e.hasValue(this._xValueFields)||!e.hasValue(this._yValueFields))return;l=0,h=1,Fe(g)||(l+=he=V((h-l)*(1-g/100)/2,5),h-=he),t=this.xAxis.getX(e,u,l),n=this.xAxis.getX(e,p,h),Fe(g)&&(t+=he=(n-t-x)/2,n-=he),!Fe(C)&&C<Math.abs(n-t)&&(t+=he=(n-t-C)/2,n-=he),l=0,h=1,Fe(m)||(l+=he=V((1-m/100)/2,5),h-=he),r=this.yAxis.getY(e,c,l),a=this.yAxis.getY(e,d,h),Fe(m)&&(a+=he=(a-r-b)/2,r-=he),!Fe(S)&&S<Math.abs(a-r)&&(a+=he=(a-r-S)/2,r-=he),n=this.fixHorizontalCoordinate(n),t=this.fixHorizontalCoordinate(t),r=this.fixVerticalCoordinate(r),a=this.fixVerticalCoordinate(a)}else if(this.baseAxis==this.xAxis){if(!e.hasValue(this._yValueFields))return;Fe(g)||(l+=he=V((h-l)*(1-g/100)/2,5),h-=he),t=this.xAxis.getX(e,u,l),n=this.xAxis.getX(e,p,h),Fe(g)&&(t+=he=(n-t-x)/2,n-=he),!Fe(C)&&C<Math.abs(n-t)&&(t+=he=(n-t-C)/2,n-=he);var ne=e.locations[c],Te=e.locations[d];this.yAxis instanceof ee&&this.dataFields[this.yField]!=this.dataFields[this.yOpenField]&&(ne=0,Te=0),a=this.yAxis.getY(e,c,ne),r=this.yAxis.getY(e,d,Te);var Ge=Math.ceil(this.yAxis.axisLength);(r<0&&a<0||r>Ge&&a>Ge)&&(D=!0),r=this.fixVerticalCoordinate(r),a=this.fixVerticalCoordinate(a),Math.abs(n-t)-P-O==0&&(D=!0)}else{if(!e.hasValue(this._xValueFields))return;var he;Fe(m)||(l+=he=V((h-l)*(1-m/100)/2,5),h-=he),r=this.yAxis.getY(e,c,l),a=this.yAxis.getY(e,d,h),Fe(m)&&(a-=he=(a-r-b)/2,r+=he),!Fe(S)&&S<Math.abs(a-r)&&(a-=he=(a-r-S)/2,r+=he);var et=e.locations[p],we=e.locations[u];this.xAxis instanceof ee&&this.dataFields[this.xField]!=this.dataFields[this.xOpenField]&&(et=0,we=0),n=this.xAxis.getX(e,p,et),t=this.xAxis.getX(e,u,we),Ge=Math.ceil(this.xAxis.axisLength),(n<0&&t<0||n>Ge&&t>Ge)&&(D=!0),n=this.fixHorizontalCoordinate(n),t=this.fixHorizontalCoordinate(t),Math.abs(r-a)-I-k==0&&(D=!0)}var U,nt=Math.abs(n-t),qe=Math.abs(a-r),Y=Math.min(t,n),We=Math.min(r,a);D?this.disableUnusedColumns(e):(e.column?(U=e.column,this._propertiesChanged&&(De(this,U,Ie),De(this.columns.template,U,Ie),j(Ie,function(ge){U[ge]=U[ge]}))):(De(this,U=this.columns.create(),Ie),De(this.columns.template,U,Ie),e.addSprite(U),e.column=U,U.paper=this.paper,this.itemsFocusable()?(v(this.role)||(this.role="menu"),v(U.role)||(U.role="menuitem"),U.focusable=!0):(v(this.role)||(this.role="list"),v(U.role)||(U.role="listitem"),U.focusable=!1),U.focusable&&(U.events.on("focus",function(ge){U.readerTitle=o.populateString(o.itemReaderText,e)},void 0,!1),U.events.on("blur",function(ge){U.readerTitle=""},void 0,!1)),U.hoverable&&(U.events.on("over",function(ge){U.readerTitle=o.populateString(o.itemReaderText,e)},void 0,!1),U.events.on("out",function(ge){U.readerTitle=""},void 0,!1)),U.parent=this.columnsContainer,U.virtualParent=this),U.width=nt,U.height=qe,U.x=Y,U.y=We,U.realX=t,U.realY=r,U.realWidth=n-t,U.realHeight=a-r,this.setColumnStates(U),U.invalid&&U.validate(),U.__disabled=!1,A(this.axisRanges.iterator(),function(ge){var ke=e.rangesColumns.getKey(ge.uid);ke||(ke=o.columns.create(),De(ge.contents,ke,Ie),e.addSprite(ke),e.rangesColumns.setKey(ge.uid,ke),ke.paper=o.paper),ke.parent=ge.contents,ke.width=nt,ke.height=qe,ke.x=Y,ke.y=We,o.setColumnStates(ke),ke.invalid&&ke.validate(),ke.__disabled=!1})),e.itemWidth=nt,e.itemHeight=qe},i.prototype.disableUnusedColumns=function(e){e&&(e.column&&(e.column.width=0,e.column.height=0,e.column.__disabled=!0),A(this.axisRanges.iterator(),function(t){var n=e.rangesColumns.getKey(t.uid);n&&(n.width=0,n.height=0,n.__disabled=!0)}))},i.prototype.setColumnStates=function(e){if(this._dropFromOpenState||this._dropFromPreviousState||this._riseFromOpenState||this._riseFromPreviousState){var t=e.dataItem;if(this.xAxis instanceof ee||this.yAxis instanceof ee){var n,r=void 0,a=void 0;this.baseAxis==this.yAxis?(this.xOpenField&&this.xField&&this.xAxis instanceof ee&&(n=t.getValue(this.xOpenField),r=t.getValue(this.xField)),a=t.getValue(this.xAxis.axisFieldName+"X","previousChange")):(this.yOpenField&&this.yField&&this.yAxis instanceof ee&&(n=t.getValue(this.yOpenField),r=t.getValue(this.yField)),a=t.getValue(this.yAxis.axisFieldName+"Y","previousChange")),r<n?(t.droppedFromOpen=!0,e.defaultState.copyFrom(this._dropFromOpenState),e.setState(this._dropFromOpenState,0)):(t.droppedFromOpen=!1,e.defaultState.copyFrom(this._riseFromOpenState),e.setState(this._riseFromOpenState,0)),a<0?(t.droppedFromPrevious=!0,e.defaultState.copyFrom(this._dropFromPreviousState),e.setState(this._dropFromPreviousState,0)):(t.droppedFromPrevious=!1,e.defaultState.copyFrom(this._riseFromPreviousState),e.setState(this._riseFromPreviousState,0))}}},Object.defineProperty(i.prototype,"columns",{get:function(){return this._columns||(this._columns=new Oe(this.createColumnTemplate()),this._disposers.push(new fe(this._columns)),this._disposers.push(this._columns.template)),this._columns},enumerable:!0,configurable:!0}),i.prototype.createColumnTemplate=function(){return new hi},Object.defineProperty(i.prototype,"clustered",{get:function(){return this.getPropertyValue("clustered")},set:function(e){this.setPropertyValue("clustered",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dropFromOpenState",{get:function(){return this._dropFromOpenState||(this._dropFromOpenState=this.states.create("dropFromOpenState")),this._dropFromOpenState},set:function(e){this._dropFromOpenState=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dropFromPreviousState",{get:function(){return this._dropFromPreviousState||(this._dropFromPreviousState=this.states.create("dropFromPreviousState")),this._dropFromPreviousState},set:function(e){this._dropFromPreviousState=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"riseFromOpenState",{get:function(){return this._riseFromOpenState||(this._riseFromOpenState=this.states.create("riseFromOpenState")),this._riseFromOpenState},set:function(e){this._riseFromOpenState=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"riseFromPreviousState",{get:function(){return this._riseFromPreviousState||(this._riseFromPreviousState=this.states.create("riseFromPreviousState")),this._riseFromPreviousState},set:function(e){this._riseFromPreviousState=e},enumerable:!0,configurable:!0}),i.prototype.updateLegendValue=function(e,t){var n=this;if(s.prototype.updateLegendValue.call(this,e,t),this.legendDataItem){var r,a,o=this.legendDataItem.marker;e&&(r=e.droppedFromOpen?this._dropFromOpenState:this._riseFromOpenState,a=e.droppedFromPrevious?this._dropFromPreviousState:this._riseFromPreviousState),A(o.children.iterator(),function(l){e?(l.setState(a),l.setState(r)):(l.setState(n._riseFromPreviousState),l.setState(n._riseFromOpenState))})}},i.prototype.createLegendMarker=function(e){var t=e.pixelWidth,n=e.pixelHeight;e.removeChildren();var r=e.createChild(St);r.shouldClone=!1,De(this,r,Ie),r.copyFrom(this.columns.template),r.padding(0,0,0,0),r.width=t,r.height=n;var a=e.dataItem;a.color=this.fill,a.colorOrig=this.fill},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.columns.template.copyFrom(e.columns.template)},i.prototype.getBulletLocationX=function(e,t){if(this.baseAxis==this.xAxis){var n=e.locationX;y(n)||(n=.5);var r=this.getEndLocation(e.dataItem);return r-(r-this.getStartLocation(e.dataItem))*n}return s.prototype.getBulletLocationX.call(this,e,t)},i.prototype.getBulletLocationY=function(e,t){if(this.baseAxis==this.yAxis){var n=e.locationY;y(n)||(n=.5);var r=this.getEndLocation(e.dataItem);return r-(r-this.getStartLocation(e.dataItem))*n}return s.prototype.getBulletLocationY.call(this,e,t)},i.prototype.getAdjustedXLocation=function(e,t,n){return y(n)||(n=e?e.locations[t]:.5),this._endLocation-(this._endLocation-this._startLocation)*(1-n)},i.prototype.getAdjustedYLocation=function(e,t,n){return y(n)||(n=e?e.locations[t]:.5),this._endLocation-(this._endLocation-this._startLocation)*n},i.prototype.fixVerticalCoordinate=function(e){var t=this.columns.template.pixelPaddingBottom;return R(e,-this.columns.template.pixelPaddingTop,this.yAxis.axisLength+t)},i.prototype.fixHorizontalCoordinate=function(e){var t=this.columns.template.pixelPaddingLeft,n=this.columns.template.pixelPaddingRight;return R(e,-t,this.xAxis.axisLength+n)},i.prototype.disposeData=function(){s.prototype.disposeData.call(this),this.columns.clear()},i}(oi);_.registeredClasses.ColumnSeries=pi,_.registeredClasses.ColumnSeriesDataItem=Gt;var jo=function(s){function i(){var e=s.call(this)||this;return e.className="TreeMapSeriesDataItem",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"parentName",{get:function(){var e=this.treeMapDataItem;if(e&&e.parent)return e.parent.name},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){var e=this.treeMapDataItem;if(e)return e.value},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"treeMapDataItem",{get:function(){return this._dataContext},enumerable:!0,configurable:!0}),i.prototype.hide=function(e,t,n,r){var a=this.treeMapDataItem;return a&&a.hide(e),s.prototype.hide.call(this,e,t,n,r)},i.prototype.show=function(e,t,n){var r=this.treeMapDataItem;return r&&r.show(e,t,n),s.prototype.show.call(this,e,t,n)},i}(Gt),hs=function(s){function i(){var e=s.call(this)||this;e.className="TreeMapSeries",e.applyTheme(),e.fillOpacity=1,e.strokeOpacity=1,e.minBulletDistance=0,e.columns.template.tooltipText="{parentName} {name}: {value}",e.columns.template.configField="config";var t=new ae;return e.stroke=t.getFor("background"),e.dataFields.openValueX="x0",e.dataFields.valueX="x1",e.dataFields.openValueY="y0",e.dataFields.valueY="y1",e.sequencedInterpolation=!1,e.showOnInit=!1,e.columns.template.pixelPerfect=!1,e}return w(i,s),i.prototype.processDataItem=function(e,t){t.seriesDataItem=e,s.prototype.processDataItem.call(this,e,t)},i.prototype.createDataItem=function(){return new jo},i.prototype.show=function(e){if(!this.preventShow){var t=this.defaultState.transitionDuration;return y(e)&&(t=e),this.dataItems.each(function(n){n.show(e)}),s.prototype.showReal.call(this,t)}},i.prototype.hide=function(e){var t=this.defaultState.transitionDuration;y(e)&&(t=e);var n=s.prototype.hideReal.call(this,t);return this.dataItems.each(function(r){r.hide(e)}),n},i.prototype.processValues=function(){},i.prototype.getStartLocation=function(e){return 0},i.prototype.getEndLocation=function(e){return 1},i.prototype.dataChangeUpdate=function(){},i.prototype.processConfig=function(e){e&&(v(e.dataFields)&&ye(e.dataFields)||(e.dataFields={})),s.prototype.processConfig.call(this,e)},i.prototype.createLegendMarker=function(e){var t=e.pixelWidth,n=e.pixelHeight;e.removeChildren();var r=e.createChild(St);r.shouldClone=!1,De(this,r,Ie),r.padding(0,0,0,0),r.width=t,r.height=n;var a=e.dataItem;a.color=r.fill,a.colorOrig=r.fill},i.prototype.disableUnusedColumns=function(e){s.prototype.disableUnusedColumns.call(this,e),e.column&&(e.column.__disabled=!1)},i}(pi);_.registeredClasses.TreeMapSeries=hs,_.registeredClasses.TreeMapSeriesDataItem=jo;var zp=function(s){function i(){var e=s.call(this)||this;return e.rows=[],e.className="TreeMapDataItem",e.values.value={workingValue:0},e.values.x0={},e.values.y0={},e.values.x1={},e.values.y1={},e.hasChildren.children=!0,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"legendDataItem",{get:function(){return this._legendDataItem},set:function(e){this._legendDataItem=e,e.label&&(e.label.dataItem=this),e.valueLabel&&(e.valueLabel.dataItem=this)},enumerable:!0,configurable:!0}),i.prototype.getDuration=function(){return 0},Object.defineProperty(i.prototype,"value",{get:function(){var e=0;return this.children&&this.children.length!=0?A(this.children.iterator(),function(t){var n=t.value;y(n)&&(e+=n)}):e=this.values.value.workingValue,e},set:function(e){this.setValue("value",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"percent",{get:function(){return this.parent?this.value/this.parent.value*100:100},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"x0",{get:function(){return this.values.x0.value},set:function(e){this.setValue("x0",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"x1",{get:function(){return this.values.x1.value},set:function(e){this.setValue("x1",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"y0",{get:function(){return this.values.y0.value},set:function(e){this.setValue("y0",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"y1",{get:function(){return this.values.y1.value},set:function(e){this.setValue("y1",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"name",{get:function(){return this.properties.name},set:function(e){this.setProperty("name",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"children",{get:function(){return this.properties.children},set:function(e){this.setProperty("children",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"level",{get:function(){return this.parent?this.parent.level+1:0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"color",{get:function(){var e=this.properties.color;return e==null&&this.parent&&(e=this.parent.color),e==null&&this.component&&(e=this.component.colors.getIndex(this.component.colors.step*this.index)),e},set:function(e){this.setProperty("color",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fill",{get:function(){return this.color},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"series",{get:function(){return this._series},set:function(e){e!=this._series&&(this._series&&(this.component.series.removeValue(this._series),this._series.dispose()),this._series=e,this._disposers.push(e))},enumerable:!0,configurable:!0}),i.prototype.hide=function(e,t,n,r){this.setWorkingValue("value",0),this.children&&this.children.each(function(o){o.hide(e,t,n,r)});var a=this.seriesDataItem;return a&&a.bullets.each(function(o,l){l.hide(),l.preventShow=!0}),s.prototype.hide.call(this,e,t,n,r)},i.prototype.show=function(e,t,n){this.setWorkingValue("value",this.values.value.value),this.children&&this.children.each(function(a){a.show(e,t,n)});var r=this.seriesDataItem;return r&&r.bullets.each(function(a,o){o.preventShow=!1}),s.prototype.show.call(this,e,t,n)},i}(Qr),Up=function(s){function i(){var e=s.call(this)||this;e.layoutAlgorithm=e.squarify,e.zoomable=!0,e.className="TreeMap",e._usesData=!0,e.maxLevels=2,e.currentLevel=0,e.hideParentColumns=!1,e.colors=new $i,e.sorting="descending";var t=e.xAxes.push(new ee);t.title.disabled=!0,t.strictMinMax=!0;var n=t.renderer;n.inside=!0,n.labels.template.disabled=!0,n.ticks.template.disabled=!0,n.grid.template.disabled=!0,n.axisFills.template.disabled=!0,n.minGridDistance=100,n.line.disabled=!0,n.baseGrid.disabled=!0;var r=e.yAxes.push(new ee);r.title.disabled=!0,r.strictMinMax=!0;var a=r.renderer;a.inside=!0,a.labels.template.disabled=!0,a.ticks.template.disabled=!0,a.grid.template.disabled=!0,a.axisFills.template.disabled=!0,a.minGridDistance=100,a.line.disabled=!0,a.baseGrid.disabled=!0,a.inversed=!0,e.xAxis=t,e.yAxis=r;var o=new hs;return e.seriesTemplates=new Bi(o),o.virtualParent=e,e._disposers.push(new Jt(e.seriesTemplates)),e._disposers.push(o),e.zoomOutButton.events.on("hit",function(){e.zoomToChartDataItem(e._homeDataItem)},void 0,!1),e.seriesTemplates.events.on("insertKey",function(l){l.newValue.isTemplate=!0},void 0,!1),e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"navigationBar",{get:function(){return this._navigationBar},set:function(e){var t=this;this._navigationBar!=e&&(this._navigationBar=e,e.parent=this,e.toBack(),e.links.template.events.on("hit",function(n){var r=n.target.dataItem.dataContext;r.isDisposed()||(t.zoomToChartDataItem(r),t.createTreeSeries(r))},void 0,!0),this._disposers.push(e))},enumerable:!0,configurable:!0}),i.prototype.validateData=function(){this.series.clear(),this._tempSeries=[],s.prototype.validateData.call(this),this._homeDataItem&&this._homeDataItem.dispose();var e=this.dataItems.template.clone();this._homeDataItem=e,A(this.dataItems.iterator(),function(r){r.parent=e}),e.children=this.dataItems,e.x0=0,e.y0=0,e.name=this._homeText;var t=1e3,n=10*Math.round(t*this.pixelHeight/this.pixelWidth/10)||1e3;e.x1=t,e.y1=n,this.xAxis.min=0,this.xAxis.max=t,this.xAxis.getMinMax(),this.yAxis.min=0,this.yAxis.max=n,this.yAxis.getMinMax(),this.layoutItems(e),this.createTreeSeries(e),this.feedLegend()},i.prototype.layoutItems=function(e,t){if(e){var n=e.children;t||(t=this.sorting),t=="ascending"&&n.values.sort(function(l,h){return l.value-h.value}),t=="descending"&&n.values.sort(function(l,h){return h.value-l.value}),this._updateDataItemIndexes(0),this.layoutAlgorithm(e);for(var r=0,a=n.length;r<a;r++){var o=n.getIndex(r);o.children&&this.layoutItems(o)}}},i.prototype.createTreeSeries=function(e){var t=this;this._tempSeries=[];for(var n=[e],r=e.parent;r!=null;)this.initSeries(r),n.push(r),r=r.parent;n.reverse(),this.navigationBar&&(this.navigationBar.data=n),this.createTreeSeriesReal(e),j(this._tempSeries,function(a){t.series.indexOf(a)==-1&&t.series.push(a),a.zIndex=a.level})},i.prototype.createTreeSeriesReal=function(e){if(e.children&&e.level<this.currentLevel+this.maxLevels){this.initSeries(e);for(var t=0;t<e.children.length;t++){var n=e.children.getIndex(t);n.children&&this.createTreeSeriesReal(n)}}},i.prototype.setData=function(e){this.currentLevel=0,this.currentlyZoomed=void 0,this.xAxis.start=0,this.xAxis.end=1,this.yAxis.start=0,this.yAxis.end=1,s.prototype.setData.call(this,e)},i.prototype.seriesAppeared=function(){return!0},i.prototype.initSeries=function(e){var t=this;if(!e.series){var n=void 0,r=this.seriesTemplates.getKey(e.level.toString());(n=r?r.clone():this.series.create()).dataItem.dataContext=e,n.name=e.name,n.parentDataItem=e,e.series=n;var a=e.level;n.level=a;var o=e.dataContext;o&&(n.config=o.config),this.dataUsers.removeValue(n),n.data=e.children.values,n.fill=e.color,n.columnsContainer.hide(0),n.bulletsContainer.hide(0),n.columns.template.adapter.add("fill",function(l,h){var p=h.dataItem;if(p){var u=p.treeMapDataItem;if(u)return h.fill=u.color,h.adapter.remove("fill"),u.color}}),this.zoomable&&(e.level>this.currentLevel||e.children&&e.children.length>0)&&(n.columns.template.cursorOverStyle=He.pointer,this.zoomable&&n.columns.template.events.on("hit",function(l){var h=l.target.dataItem;e.level>t.currentLevel?t.zoomToChartDataItem(h.treeMapDataItem.parent):t.zoomToSeriesDataItem(h)},this,void 0))}this._tempSeries.push(e.series)},i.prototype.toggleBullets=function(e){var t=this;A(this.series.iterator(),function(n){t._tempSeries.indexOf(n)==-1?(n.columnsContainer.hide(),n.bulletsContainer.hide(e)):(n.columnsContainer.show(),n.bulletsContainer.show(e),n.dataItems.each(function(r){r.bullets.each(function(a,o){o.show()})}),n.level<t.currentLevel?(t.hideParentColumns&&n.columnsContainer.hide(),n.bulletsContainer.hide(e)):n.level==t.currentLevel&&t.maxLevels>1&&n.dataItems.each(function(r){r.treeMapDataItem.children&&r.bullets.each(function(a,o){o.hide()})}))})},i.prototype.zoomToSeriesDataItem=function(e){this.zoomToChartDataItem(e.treeMapDataItem)},i.prototype.zoomToChartDataItem=function(e){var t=this;e||(e=this._homeDataItem);var n=this.zoomOutButton;if(n&&(e!=this._homeDataItem?n.show():n.hide()),e&&e.children){this.xAxis.zoomToValues(e.x0,e.x1),this.yAxis.zoomToValues(e.y0,e.y1),this.currentLevel=e.level,this.currentlyZoomed=e,this.createTreeSeries(e);var r=this.xAxis.rangeChangeAnimation||this.yAxis.rangeChangeAnimation;!r||r.isDisposed()||r.isFinished()?this.toggleBullets():(this._dataDisposers.push(r),r.events.once("animationended",function(){t.toggleBullets()}))}},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("TreeMap chart"))},i.prototype.createDataItem=function(){return new zp},Object.defineProperty(i.prototype,"maxLevels",{get:function(){return this.getPropertyValue("maxLevels")},set:function(e){this.setPropertyValue("maxLevels",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"currentLevel",{get:function(){return this.getPropertyValue("currentLevel")},set:function(e){this.setPropertyValue("currentLevel",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hideParentColumns",{get:function(){return this.getPropertyValue("hideParentColumns")},set:function(e){this.setPropertyValue("hideParentColumns",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sorting",{get:function(){return this.getPropertyValue("sorting")},set:function(e){this.setPropertyValue("sorting",e,!0)},enumerable:!0,configurable:!0}),i.prototype.createSeries=function(){return new hs},Object.defineProperty(i.prototype,"homeText",{get:function(){return this._homeText},set:function(e){this._homeText=e,this._homeDataItem&&(this._homeDataItem.name=this._homeText)},enumerable:!0,configurable:!0}),i.prototype.processConfig=function(e){if(e){if(v(e.layoutAlgorithm)&&J(e.layoutAlgorithm))switch(e.layoutAlgorithm){case"squarify":e.layoutAlgorithm=this.squarify;break;case"binaryTree":e.layoutAlgorithm=this.binaryTree;break;case"slice":e.layoutAlgorithm=this.slice;break;case"dice":e.layoutAlgorithm=this.dice;break;case"sliceDice":e.layoutAlgorithm=this.sliceDice;break;default:delete e.layoutAlgorithm}v(e.navigationBar)&&!v(e.navigationBar.type)&&(e.navigationBar.type="NavigationBar"),s.prototype.processConfig.call(this,e)}},i.prototype.validateLayout=function(){s.prototype.validateLayout.call(this),this.layoutItems(this.currentlyZoomed)},i.prototype.validateDataItems=function(){s.prototype.validateDataItems.call(this),this.layoutItems(this._homeDataItem),A(this.series.iterator(),function(e){e.validateRawData()}),this.zoomToChartDataItem(this._homeDataItem)},i.prototype.binaryTree=function(e){var t,n,r=e.children,a=r.length,o=new Array(a+1);for(o[0]=n=t=0;t<a;++t)o[t+1]=n+=r.getIndex(t).value;a>0&&function l(h,p,u,d,c,f,g){if(h>=p-1)return(P=r.getIndex(h)).x0=d,P.y0=c,P.x1=f,void(P.y1=g);for(var m=o[h],x=u/2+m,b=h+1,C=p-1;b<C;){var S=b+C>>>1;o[S]<x?b=S+1:C=S}x-o[b-1]<o[b]-x&&h+1<b&&--b;var P,O=o[b]-m,I=u-O;if(u==0)return(P=r.getIndex(h)).x0=d,P.y0=c,P.x1=f,void(P.y1=g);if(f-d>g-c){var k=(d*I+f*O)/u;l(h,b,O,d,c,k,g),l(b,p,I,k,c,f,g)}else{var D=(c*I+g*O)/u;l(h,b,O,d,c,f,D),l(b,p,I,d,D,f,g)}}(0,a,e.value,e.x0,e.y0,e.x1,e.y1)},i.prototype.slice=function(e){for(var t,n=e.x0,r=e.x1,a=e.y0,o=e.y1,l=e.children,h=-1,p=l.length,u=e.value&&(o-a)/e.value;++h<p;)(t=l.getIndex(h)).x0=n,t.x1=r,t.y0=a,a+=t.value*u,t.y1=a},i.prototype.dice=function(e){for(var t,n=e.x0,r=e.x1,a=e.y0,o=e.y1,l=e.children,h=-1,p=l.length,u=e.value&&(r-n)/e.value;++h<p;)(t=l.getIndex(h)).y0=a,t.y1=o,t.x0=n,n+=t.value*u,t.x1=n},i.prototype.sliceDice=function(e){1&e.level?this.slice(e):this.dice(e)},i.prototype.squarify=function(e){for(var t,n,r,a,o,l,h,p,u,d,c=(1+Math.sqrt(5))/2,f=e.x0,g=e.x1,m=e.y0,x=e.y1,b=e.children,C=0,S=0,P=b.length,O=e.value;C<P;){n=g-f,r=x-m;do a=b.getIndex(S++).value;while(!a&&S<P);for(o=l=a,d=a*a*(u=Math.max(r/n,n/r)/(O*c)),p=Math.max(l/d,d/o);S<P;++S){if(a+=t=b.getIndex(S).value,t<o&&(o=t),t>l&&(l=t),d=a*a*u,(h=Math.max(l/d,d/o))>p){a-=t;break}p=h}var I=this.dataItems.template.clone();I.value=a,I.dice=n<r,I.children=b.slice(C,S),I.x0=f,I.y0=m,I.x1=g,I.y1=x,I.dice?(I.y1=O?m+=r*a/O:x,this.dice(I)):(I.x1=O?f+=n*a/O:g,this.slice(I)),O-=a,C=S}},i.prototype.handleSeriesAdded2=function(){},i.prototype.handleDataItemValueChange=function(e,t){t=="value"&&this.invalidateDataItems()},i.prototype.handleDataItemWorkingValueChange=function(e,t){t=="value"&&this.invalidateDataItems()},i.prototype.getLegendLevel=function(e){if(e&&e.children){if(e.children.length>1)return e;if(e.children.length==1){var t=e.children.getIndex(0);return t.children?this.getLegendLevel(t):e}return e}},i.prototype.handleLegendSeriesAdded=function(e){},Object.defineProperty(i.prototype,"homeDataItem",{get:function(){return this._homeDataItem},enumerable:!0,configurable:!0}),i.prototype.feedLegend=function(){var e=this.legend;if(e){e.dataFields.name="name";var t=this.getLegendLevel(this._homeDataItem);if(t){var n=[];t.children.each(function(r){n.push(r)}),e.data=n}}},i.prototype.disposeData=function(){s.prototype.disposeData.call(this),this._homeDataItem=void 0,this.series.clear(),this.navigationBar&&this.navigationBar.disposeData(),this.xAxis.disposeData(),this.yAxis.disposeData()},i.prototype.getExporting=function(){var e=this,t=s.prototype.getExporting.call(this);return t.adapter.add("formatDataFields",function(n){return n.format!="csv"&&n.format!="xlsx"||v(e.dataFields.children)&&delete n.dataFields[e.dataFields.children],n}),t},i}(Ut);_.registeredClasses.TreeMap=Up;var Eo=function(s){function i(){var e=s.call(this)||this;return e._chart=new Me,e.className="AxisRendererX3D",e._disposers.push(e._chart),e.applyTheme(),e}return w(i,s),i.prototype.updateGridElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t);if(e.element){var a=this.chart.dx3D||0,o=this.chart.dy3D||0,l=this.getHeight();e.path=E({x:a,y:o})+T({x:a,y:l+o})+T({x:0,y:l})}this.positionItem(e,r),this.toggleVisibility(e,t,0,1)},i.prototype.updateBaseGridElement=function(){s.prototype.updateBaseGridElement.call(this);var e=this.getHeight(),t=this.chart.dx3D||0,n=this.chart.dy3D||0;this.baseGrid.path=E({x:t,y:n})+T({x:0,y:0})+T({x:0,y:e})},Object.defineProperty(i.prototype,"chart",{get:function(){return this._chart.get()},set:function(e){e&&this._chart.set(e,e.events.on("propertychanged",this.handle3DChanged,this,!1))},enumerable:!0,configurable:!0}),i.prototype.handle3DChanged=function(e){e.property!="depth"&&e.property!="angle"||this.invalidate()},i}(Mt);_.registeredClasses.AxisRendererX3D=Eo;var Gp=function(s){function i(){var e=s.call(this)||this;return e._chart=new Me,e.className="AxisRendererY3D",e._disposers.push(e._chart),e.applyTheme(),e}return w(i,s),i.prototype.updateGridElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t);if(e.element){var a=this.chart.dx3D||0,o=this.chart.dy3D||0,l=this.getWidth();e.path=E({x:0,y:0})+T({x:a,y:o})+T({x:l+a,y:o})}this.positionItem(e,r),this.toggleVisibility(e,t,0,1)},i.prototype.updateBaseGridElement=function(){s.prototype.updateBaseGridElement.call(this);var e=this.chart.dx3D||0,t=this.chart.dy3D||0,n=this.getWidth();this.baseGrid.path=E({x:0,y:0})+T({x:n,y:0})+T({x:n+e,y:t})},Object.defineProperty(i.prototype,"chart",{get:function(){return this._chart.get()},set:function(e){e&&this._chart.set(e,e.events.on("propertychanged",this.handle3DChanged,this,!1))},enumerable:!0,configurable:!0}),i.prototype.handle3DChanged=function(e){e.property!="depth"&&e.property!="angle"||this.invalidate()},i}(mt),Ro=function(s){function i(){var e=s.call(this)||this;return e.className="Column3D",e}return w(i,s),i.prototype.createAssets=function(){this.column3D=this.createChild(wp),this.column3D.shouldClone=!1,this.column3D.strokeOpacity=0,this.column=this.column3D},i.prototype.validate=function(){s.prototype.validate.call(this),this.column3D&&(this.column3D.width=this.pixelWidth,this.column3D.height=this.pixelHeight,this.column3D.invalid&&this.column3D.validate())},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.column3D&&this.column3D.copyFrom(e.column3D)},i.prototype.setFill=function(e){s.prototype.setFill.call(this,e),this.column.fill=e},i}(hi);_.registeredClasses.Column3D=Ro;var Kp=function(s){function i(){var e=s.call(this)||this;return e.className="ColumnSeries3DDataItem",e.applyTheme(),e}return w(i,s),i}(Gt),ps=function(s){function i(){var e=s.call(this)||this;return e.className="ColumnSeries3D",e.columns.template.column3D.applyOnClones=!0,e.columns.template.hiddenState.properties.visible=!0,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"columnsContainer",{get:function(){var e=this.chart;return e&&e.columnsContainer&&e.leftAxesContainer.layout!="vertical"&&e.rightAxesContainer.layout!="vertical"&&e.bottomAxesContainer.layout!="horizontal"&&e.topAxesContainer.layout!="horizontal"?e.columnsContainer:this._columnsContainer},enumerable:!0,configurable:!0}),i.prototype.validateDataElementReal=function(e){s.prototype.validateDataElementReal.call(this,e),e.column&&(e.column.dx=this.dx,e.column.dy=this.dy,e.column.visible=this.visible)},i.prototype.validateDataElements=function(){s.prototype.validateDataElements.call(this),this.chart&&this.chart.invalidateLayout()},i.prototype.createColumnTemplate=function(){return new Ro},Object.defineProperty(i.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(e){this.setPropertyValue("depth",e,!0),this.columns.template.column3D.depth=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(e){this.setPropertyValue("angle",e),this.columns.template.column3D.angle=e},enumerable:!0,configurable:!0}),i}(pi);_.registeredClasses.ColumnSeries3D=ps,_.registeredClasses.ColumnSeries3DDataItem=Kp;var Dd=function(s){function i(){var e=s.call(this)||this;return e.className="XYChart3DDataItem",e.applyTheme(),e}return w(i,s),i}(Qr),Zp=function(s){function i(){var e=s.call(this)||this;e._axisRendererX=Eo,e._axisRendererY=Gp,e.className="XYChart3D",e.depth=30,e.angle=30;var t=e.seriesContainer.createChild(W);return t.shouldClone=!1,t.isMeasured=!1,t.layout="none",e.columnsContainer=t,e.columnsContainer.mask=e.createChild($),e.applyTheme(),e}return w(i,s),i.prototype.updateSeriesMasks=function(){if(s.prototype.updateSeriesMasks.call(this),Xi()){var e=this.columnsContainer,t=e.mask;e.mask=void 0,e.mask=t}},Object.defineProperty(i.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(e){this.setPropertyValue("depth",e),this.fixLayout(),this.invalidateDataUsers()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(e){this.setPropertyValue("angle",e),this.fixLayout(),this.invalidateDataUsers()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dx3D",{get:function(){return L(this.angle)*this.depth},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dy3D",{get:function(){return-M(this.angle)*this.depth},enumerable:!0,configurable:!0}),i.prototype.validateLayout=function(){s.prototype.validateLayout.call(this),this.fixColumns()},i.prototype.fixLayout=function(){this.chartContainer.paddingTop=-this.dy3D,this.chartContainer.paddingRight=this.dx3D,this.scrollbarX&&(this.scrollbarX.dy=this.dy3D,this.scrollbarX.dx=this.dx3D),this.scrollbarY&&(this.scrollbarY.dy=this.dy3D,this.scrollbarY.dx=this.dx3D),this.fixColumns(),s.prototype.fixLayout.call(this)},i.prototype.fixColumns=function(){var e=this,t=1,n=0;A(this.series.iterator(),function(a){a instanceof ps&&(!a.clustered&&n>0&&t++,a.depthIndex=t-1,n++)});var r=0;A(this.series.iterator(),function(a){if(a instanceof ps){a.depth=e.depth/t,a.angle=e.angle,a.columnsContainer==e.columnsContainer&&(a.dx=e.depth/t*L(e.angle)*a.depthIndex,a.dy=-e.depth/t*M(e.angle)*a.depthIndex);var o=!1;(a.baseAxis==a.xAxis&&a.xAxis.renderer.inversed||a.baseAxis==a.yAxis&&a.yAxis.renderer.inversed)&&(o=!0);var l=1;a.dataItems.each(function(h){var p=h.column;p&&(p.zIndex=o?1e3*(1e3-l)+r-100*a.depthIndex:1e3*l+r-100*a.depthIndex),l++}),o?r--:r++}}),this.maskColumns()},i.prototype.processConfig=function(e){if(e&&v(e.series)&&Ae(e.series))for(var t=0,n=e.series.length;t<n;t++)e.series[t].type=e.series[t].type||"ColumnSeries3D";s.prototype.processConfig.call(this,e)},i.prototype.maskColumns=function(){var e=this.plotContainer.pixelWidth,t=this.plotContainer.pixelHeight,n=this.dx3D,r=this.dy3D,a=E({x:0,y:0})+T({x:n,y:r})+T({x:e+n,y:r})+T({x:e+n,y:t+r})+T({x:e,y:t})+T({x:e,y:t})+T({x:0,y:t})+" Z",o=this.columnsContainer;o&&o.mask&&(o.mask.path=a)},i}(Ut);_.registeredClasses.XYChart3D=Zp;var qp=function(s){function i(){var e=s.call(this)||this;e.className="HeatLegend",e.markerContainer=e.createChild(W),e.markerContainer.shouldClone=!1,e.markerCount=1;var t=new St;return t.minHeight=20,t.minWidth=20,t.interactionsEnabled=!1,t.fillOpacity=1,t.cornerRadius(0,0,0,0),e.markerContainer.minHeight=20,e.markerContainer.minWidth=20,e.orientation="horizontal",e.markers=new Oe(t),e._disposers.push(new fe(e.markers)),e._disposers.push(e.markers.template),e.applyTheme(),e}return w(i,s),i.prototype.getMinFromRules=function(e){var t,n=this.series;if(n)return rt(n.heatRules.iterator(),function(r){return r.property!=e||(t=r.min,!1)}),t},i.prototype.getMaxFromRules=function(e){var t,n=this.series;if(n)return A(n.heatRules.iterator(),function(r){return r.property!=e||(t=r.max,!1)}),t},i.prototype.validate=function(){s.prototype.validate.call(this),this.valueAxis.renderer.inversed=this.reverseOrder;var e=this.series,t=this.minColor,n=this.maxColor;if(v(t)||(t=ft(this.getMinFromRules("fill"))),v(n)||(n=ft(this.getMaxFromRules("fill"))),e){var r=e.fill;!v(t)&&r instanceof se&&(t=r),!v(n)&&r instanceof se&&(n=r)}v(n)||(n=ft(this.getMaxFromRules("fill")));var a=ce(this.getMinFromRules("fillOpacity"));y(a)||(a=1);var o=ce(this.getMaxFromRules("fillOpacity"));y(o)||(o=1);var l=ce(this.getMinFromRules("strokeOpacity"));y(l)||(l=1);var h=ce(this.getMaxFromRules("strokeOpacity"));y(h)||(h=1);for(var p=ft(this.getMinFromRules("stroke")),u=ft(this.getMaxFromRules("stroke")),d=0;d<this.markerCount;d++){var c=this.markers.getIndex(d);if(c||((c=this.markers.create()).parent=this.markerContainer,c.height=F(100),c.width=F(100)),this.markerCount==1){var f=new dt;if(this.reverseOrder?(f.addColor(n,o),f.addColor(t,a)):(f.addColor(t,a),f.addColor(n,o)),this.orientation=="vertical"&&(f.rotation=-90),c.fill=f,v(p)&&v(u)){var g=new dt;this.reverseOrder?(g.addColor(u,h),g.addColor(p,l)):(g.addColor(p,l),g.addColor(u,h)),this.orientation=="vertical"&&(g.rotation=-90),c.stroke=g}}else{var m=d;this.reverseOrder&&(m=this.markerCount-d-1);var x=new se(mn(t.rgb,n.rgb,m/this.markerCount));c.fill=x;var b=a+(o-a)*m/this.markerCount;if(c.fillOpacity=b,v(p)&&v(u)){var C=new se(mn(p.rgb,u.rgb,m/this.markerCount));c.stroke=C;var S=l+(h-l)*m/this.markerCount;c.strokeOpacity=S}}}var P=this.valueAxis.renderer;this.markerCount>1&&(this.orientation=="horizontal"?P.minGridDistance=this.measuredWidth/this.markerCount:P.minGridDistance=this.measuredHeight/this.markerCount),this.valueAxis.invalidate(),d=this.markerCount;for(var O=this.markers.length;d<O;d++)this.markers.getIndex(d).parent=void 0},Object.defineProperty(i.prototype,"minColor",{get:function(){return this.getPropertyValue("minColor")},set:function(e){e instanceof se||(e=ft(e)),this.setColorProperty("minColor",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxColor",{get:function(){return this.getPropertyValue("maxColor")},set:function(e){e instanceof se||(e=ft(e)),this.setColorProperty("maxColor",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"markerCount",{get:function(){return this.getPropertyValue("markerCount")},set:function(e){this.setPropertyValue("markerCount",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minValue",{get:function(){return this.getPropertyValue("minValue")},set:function(e){this.setPropertyValue("minValue",e),this.valueAxis.min=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxValue",{get:function(){return this.getPropertyValue("maxValue")},set:function(e){this.setPropertyValue("maxValue",e),this.valueAxis.max=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(e){this.setPropertyValue("orientation",e,!0);var t=this.markerContainer,n=this.valueAxis;e=="horizontal"?(v(this.width)||(this.width=200),this.height=void 0,n.width=F(100),n.height=void 0,n.tooltip.pointerOrientation="vertical",this.layout="vertical",t.width=F(100),t.height=void 0,n.renderer instanceof Mt||(n.renderer=new Mt)):(v(this.height)||(this.height=200),this.width=void 0,this.layout="horizontal",t.width=void 0,t.height=F(100),n.height=F(100),n.width=void 0,n.tooltip.pointerOrientation="horizontal",n.renderer instanceof mt||(n.renderer=new mt),n.renderer.inside=!0,n.renderer.labels.template.inside=!0,this.markerContainer.reverseOrder=!0);var r=n.renderer;r.grid.template.disabled=!0,r.axisFills.template.disabled=!0,r.baseGrid.disabled=!0,r.labels.template.padding(2,3,2,3),r.minHeight=void 0,r.minWidth=void 0,this.markerContainer.layout=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"valueAxis",{get:function(){return this._valueAxis||(this.valueAxis=this.createChild(ee),this.valueAxis.shouldClone=!1),this._valueAxis},set:function(e){this._valueAxis=e,e.parent=this,e.strictMinMax=!0,this.orientation=this.orientation},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"series",{get:function(){return this._series},set:function(e){var t=this;this._series=e;var n="value";try{var r=e.heatRules.getIndex(0).dataField;r&&(n=r)}catch{}this.updateMinMax(e.dataItem.values[n].low,e.dataItem.values[n].high),e.dataItem.events.on("calculatedvaluechanged",function(a){t.updateMinMax(e.dataItem.values[n].low,e.dataItem.values[n].high)},void 0,!1),e.heatRules.events.on("inserted",this.invalidate,this,!1),e.heatRules.events.on("removed",this.invalidate,this,!1)},enumerable:!0,configurable:!0}),i.prototype.updateMinMax=function(e,t){var n=this.valueAxis;y(this.minValue)||(n.min=e,n.invalidate()),y(this.maxValue)||(n.max=t,n.invalidate())},i.prototype.processConfig=function(e){if(e&&v(e.series)&&J(e.series)&&J(e.series))if(this.map.hasKey(e.series))e.series=this.map.getKey(e.series);else{var t=e.series,n=this.map.events.on("insertKey",function(r){r.key==t&&(this.series=r.newValue,n.dispose())},this);this._disposers.push(n),delete e.series}s.prototype.processConfig.call(this,e)},i}(W);_.registeredClasses.HeatLegend=qp;var ir=function(s){function i(){var e=s.call(this)||this;return e.className="Candlestick",e.layout="none",e}return w(i,s),i.prototype.createAssets=function(){s.prototype.createAssets.call(this),this.lowLine=this.createChild(yt),this.lowLine.shouldClone=!1,this.highLine=this.createChild(yt),this.highLine.shouldClone=!1},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.lowLine&&this.lowLine.copyFrom(e.lowLine),this.highLine&&this.highLine.copyFrom(e.highLine)},i}(hi);_.registeredClasses.Candlestick=ir;var us=function(s){function i(){var e=s.call(this)||this;return e.values.lowValueX={},e.values.lowValueY={},e.values.highValueX={},e.values.highValueY={},e.className="CandlestickSeriesDataItem",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"lowValueX",{get:function(){return this.values.lowValueX.value},set:function(e){this.setValue("lowValueX",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"lowValueY",{get:function(){return this.values.lowValueY.value},set:function(e){this.setValue("lowValueY",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"highValueX",{get:function(){return this.values.highValueX.value},set:function(e){this.setValue("highValueX",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"highValueY",{get:function(){return this.values.highValueY.value},set:function(e){this.setValue("highValueY",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"closeValueX",{get:function(){return this.values.valueX.value},set:function(e){this.setValue("valueX",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"closeValueY",{get:function(){return this.values.valueY.value},set:function(e){this.setValue("valueY",e)},enumerable:!0,configurable:!0}),i}(Gt),Bo=function(s){function i(){var e=s.call(this)||this;e.className="CandlestickSeries",e.groupFields.lowValueX="low",e.groupFields.lowValueY="low",e.groupFields.highValueX="high",e.groupFields.highValueY="high",e.strokeOpacity=1;var t=new ae,n=t.getFor("positive"),r=t.getFor("negative");return e.dropFromOpenState.properties.fill=r,e.dropFromOpenState.properties.stroke=r,e.riseFromOpenState.properties.fill=n,e.riseFromOpenState.properties.stroke=n,e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Candlestick Series"))},i.prototype.createDataItem=function(){return new us},i.prototype.validateDataElementReal=function(e){s.prototype.validateDataElementReal.call(this,e),this.validateCandlestick(e)},i.prototype.validateCandlestick=function(e){var t=e.column;if(t){var n=t.lowLine,r=t.highLine;if(this.baseAxis==this.xAxis){var a=t.pixelWidth/2;n.x=a,r.x=a;var o=e.getWorkingValue(this.yOpenField),l=e.getWorkingValue(this.yField),h=this.yAxis.getY(e,this.yOpenField),p=this.yAxis.getY(e,this.yField),u=this.yAxis.getY(e,this.yLowField),d=this.yAxis.getY(e,this.yHighField),c=t.pixelY;n.y1=u-c,r.y1=d-c,o<l?(n.y2=h-c,r.y2=p-c):(n.y2=p-c,r.y2=h-c)}if(this.baseAxis==this.yAxis){var f=t.pixelHeight/2;n.y=f,r.y=f;var g=e.getWorkingValue(this.xOpenField),m=e.getWorkingValue(this.xField),x=this.xAxis.getX(e,this.xOpenField),b=this.xAxis.getX(e,this.xField),C=this.xAxis.getX(e,this.xLowField),S=this.xAxis.getX(e,this.xHighField),P=t.pixelX;n.x1=C-P,r.x1=S-P,g<m?(n.x2=x-P,r.x2=b-P):(n.x2=b-P,r.x2=x-P)}A(this.axisRanges.iterator(),function(O){var I=e.rangesColumns.getKey(O.uid);if(I){var k=I.lowLine;k.x=n.x,k.y=n.y,k.x1=n.x1,k.x2=n.x2,k.y1=n.y1,k.y2=n.y2;var D=I.highLine;D.x=r.x,D.y=r.y,D.x1=r.x1,D.x2=r.x2,D.y1=r.y1,D.y2=r.y2}})}},Object.defineProperty(i.prototype,"xLowField",{get:function(){return this._xLowField},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"yLowField",{get:function(){return this._yLowField},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"xHighField",{get:function(){return this._xHighField},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"yHighField",{get:function(){return this._yHighField},enumerable:!0,configurable:!0}),i.prototype.defineFields=function(){s.prototype.defineFields.call(this);var e=this.xAxis,t=this.yAxis;if(e&&t){if(this.baseAxis==e){var n=wn(t.axisFieldName);this._yLowField="low"+n+"Y",this._yHighField="high"+n+"Y"}if(this.baseAxis==t){var r=wn(e.axisFieldName);this._xLowField="low"+r+"X",this._xHighField="high"+r+"X"}this.addValueField(e,this._xValueFields,this._xLowField),this.addValueField(e,this._xValueFields,this._xHighField),this.addValueField(t,this._yValueFields,this._yLowField),this.addValueField(t,this._yValueFields,this._yHighField)}},i.prototype.createLegendMarker=function(e){var t=e.pixelWidth,n=e.pixelHeight;e.removeChildren();var r,a,o=e.createChild(ir);o.shouldClone=!1,o.copyFrom(this.columns.template);var l=o.lowLine,h=o.highLine;this.baseAxis==this.yAxis?(r=t/3,a=n,l.y=n/2,h.y=n/2,l.x2=t/3,h.x2=t/3,h.x=t/3*2,o.column.x=t/3):(r=t,a=n/3,l.x=t/2,h.x=t/2,l.y2=n/3,h.y2=n/3,h.y=n/3*2,o.column.y=n/3),o.width=r,o.height=a,De(this,e,Ie),De(this.columns.template,o,Ie),o.stroke=this.riseFromOpenState.properties.stroke,o.fill=o.stroke;var p=e.dataItem;p.color=o.fill,p.colorOrig=o.fill},i.prototype.createColumnTemplate=function(){return new ir},i}(pi);_.registeredClasses.CandlestickSeries=Bo,_.registeredClasses.CandlestickSeriesDataItem=us;var ds=function(s){function i(){var e=s.call(this)||this;return e.className="OHLC",e.layout="none",e}return w(i,s),i.prototype.createAssets=function(){this.openLine=this.createChild(yt),this.openLine.shouldClone=!1,this.highLowLine=this.createChild(yt),this.highLowLine.shouldClone=!1,this.closeLine=this.createChild(yt),this.closeLine.shouldClone=!1},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.openLine&&this.openLine.copyFrom(e.openLine),this.highLowLine&&this.highLowLine.copyFrom(e.highLowLine),this.closeLine&&this.closeLine.copyFrom(e.closeLine)},i}(ir);_.registeredClasses.OHLC=ds;var Ho=function(s){function i(){var e=s.call(this)||this;return e.className="OHLCSeriesDataItem",e.applyTheme(),e}return w(i,s),i}(us),$p=function(s){function i(){var e=s.call(this)||this;return e.className="OHLCSeries",e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("OHLC Series"))},i.prototype.createDataItem=function(){return new Ho},i.prototype.validateCandlestick=function(e){var t=e.column;if(t){var n=t.openLine,r=t.highLowLine,a=t.closeLine;if(this.baseAxis==this.xAxis){var o=t.pixelWidth/2;r.x=o,e.getWorkingValue(this.yOpenField),e.getWorkingValue(this.yField);var l=this.yAxis.getY(e,this.yOpenField),h=this.yAxis.getY(e,this.yField),p=this.yAxis.getY(e,this.yLowField),u=this.yAxis.getY(e,this.yHighField),d=t.pixelY;n.y1=l-d,n.y2=l-d,n.x1=0,n.x2=o,a.y1=h-d,a.y2=h-d,a.x1=o,a.x2=2*o,r.y1=u-d,r.y2=p-d}if(this.baseAxis==this.yAxis){var c=t.pixelHeight/2;r.y=c,e.getWorkingValue(this.xOpenField),e.getWorkingValue(this.xField);var f=this.xAxis.getX(e,this.xOpenField),g=this.xAxis.getX(e,this.xField),m=this.xAxis.getX(e,this.xLowField),x=this.xAxis.getX(e,this.xHighField),b=t.pixelX;n.x1=f-b,n.x2=f-b,n.y1=c,n.y2=2*c,a.x1=g-b,a.x2=g-b,a.y1=0,a.y2=c,r.x1=x-b,r.x2=m-b}A(this.axisRanges.iterator(),function(C){var S=e.rangesColumns.getKey(C.uid);if(S){var P=S.openLine;P.x=n.x,P.y=n.y,P.x1=n.x1,P.x2=n.x2,P.y1=n.y1,P.y2=n.y2;var O=S.closeLine;O.x=a.x,O.y=a.y,O.x1=a.x1,O.x2=a.x2,O.y1=a.y1,O.y2=a.y2;var I=S.highLowLine;I.x=r.x,I.y=r.y,I.x1=r.x1,I.x2=r.x2,I.y1=r.y1,I.y2=r.y2}})}},i.prototype.createLegendMarker=function(e){var t=e.pixelWidth,n=e.pixelHeight;e.removeChildren();var r,a,o=e.createChild(ds);o.shouldClone=!1,o.copyFrom(this.columns.template);var l=o.openLine,h=o.closeLine,p=o.highLowLine;this.baseAxis==this.yAxis?(r=t/3,a=n,p.y=n/2,p.x2=t,l.x=t/3*2,l.y2=n/2,h.x=t/3,h.y2=n,h.y1=n/2):(r=t,a=n/3,p.x=t/2,p.y2=n,l.y=n/3*2,l.x2=t/2,h.y=n/3,h.x2=t,h.x1=t/2),o.width=r,o.height=a,De(this,e,Ie),De(this.columns.template,o,Ie),o.stroke=this.riseFromOpenState.properties.stroke;var u=e.dataItem;u.color=o.stroke,u.colorOrig=o.stroke},i.prototype.createColumnTemplate=function(){return new ds},i}(Bo);_.registeredClasses.OHLCSeries=$p,_.registeredClasses.OHLCSeriesDataItem=Ho;var Jp=function(s){function i(){var e=s.call(this)||this;return e.className="StepLineSeriesSegment",e}return w(i,s),i.prototype.drawSegment=function(e,t,n,r,a,o){if(e.length>0&&t.length>0)if(a){var l=E(e[0]);if(e.length>0)for(var h=1;h<e.length;h++){var p=e[h];h/2==Math.round(h/2)?l+=E(p):l+=T(p)}this.strokeSprite.path=l,(this.fillOpacity>0||this.fillSprite.fillOpacity>0)&&(l=E(e[0])+Zi(e),l+=T(t[0])+Zi(t),l+=T(e[0]),l+=" Z",this.fillSprite.path=l)}else l=E(e[0])+Zi(e),this.strokeSprite.path=l,(this.fillOpacity>0||this.fillSprite.fillOpacity>0)&&(l+=T(t[0])+Zi(t),l+=T(e[0]),l+=" Z",this.fillSprite.path=l);else this.strokeSprite.path="",this.fillSprite.path=""},i}(es);_.registeredClasses.StepLineSeriesSegment=Jp;var No=function(s){function i(){var e=s.call(this)||this;return e.className="StepLineSeriesDataItem",e.applyTheme(),e}return w(i,s),i}($n),Qp=function(s){function i(){var e=s.call(this)||this;return e.className="StepLineSeries",e.applyTheme(),e.startLocation=0,e.endLocation=1,e}return w(i,s),i.prototype.createDataItem=function(){return new No},i.prototype.addPoints=function(e,t,n,r,a){var o,l,h,p;this.baseAxis==this.xAxis&&(o=this.startLocation,l=this.endLocation,h=this.getAdjustedXLocation(t,this.yOpenField),p=this.getAdjustedXLocation(t,this.yField)),this.baseAxis==this.yAxis&&(h=this.startLocation,p=this.endLocation,o=this.getAdjustedXLocation(t,this.xOpenField),l=this.getAdjustedXLocation(t,this.xField));var u=this.xAxis.getX(t,n,o),d=this.yAxis.getY(t,r,h),c=this.xAxis.getX(t,n,l),f=this.yAxis.getY(t,r,p);if(u=R(u,-1e5,1e5),d=R(d,-1e5,1e5),c=R(c,-1e5,1e5),f=R(f,-1e5,1e5),!this.noRisers&&e.length>1){var g=e[e.length-1];this.baseAxis==this.xAxis&&(a?e.push({x:g.x,y:f}):e.push({x:u,y:g.y})),this.baseAxis==this.yAxis&&(a?e.push({x:c,y:g.y}):e.push({x:g.x,y:d}))}var m={x:u,y:d},x={x:c,y:f};a?e.push(x,m):e.push(m,x)},i.prototype.drawSegment=function(e,t,n){var r=!1;this.yAxis==this.baseAxis&&(r=!0),e.drawSegment(t,n,this.tensionX,this.tensionY,this.noRisers,r)},i.prototype.createSegment=function(){return new Jp},Object.defineProperty(i.prototype,"noRisers",{get:function(){return this.getPropertyValue("noRisers")},set:function(e){this.setPropertyValue("noRisers",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startLocation",{get:function(){return this.getPropertyValue("startLocation")},set:function(e){this.setPropertyValue("startLocation",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endLocation",{get:function(){return this.getPropertyValue("endLocation")},set:function(e){this.setPropertyValue("endLocation",e,!0)},enumerable:!0,configurable:!0}),i}(is);_.registeredClasses.StepLineSeries=Qp,_.registeredClasses.StepLineSeriesDataItem=No;var Wo=function(s){function i(){var e=s.call(this)||this;return e.className="RadarColumn",e}return w(i,s),i.prototype.createAssets=function(){this.radarColumn=this.createChild(ri),this.radarColumn.shouldClone=!1,this.radarColumn.strokeOpacity=void 0,this.column=this.radarColumn},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.radarColumn&&this.radarColumn.copyFrom(e.radarColumn)},i.prototype.getTooltipX=function(){var e=this.getPropertyValue("tooltipX");return y(e)?e:this.radarColumn.getTooltipX()},i.prototype.getTooltipY=function(){var e=this.getPropertyValue("tooltipX");return y(e)?e:this.radarColumn.getTooltipY()},i}(hi);_.registeredClasses.RadarColumn=Wo;var eu=function(s){function i(){var e=s.call(this)||this;return e.className="ColumnSeriesDataItem",e.applyTheme(),e}return w(i,s),i}(Gt),tu=function(s){function i(){var e=s.call(this)||this;return e.className="RadarColumnSeries",e.applyTheme(),e}return w(i,s),i.prototype.createColumnTemplate=function(){return new Wo},i.prototype.validate=function(){this.chart.invalid&&this.chart.validate(),s.prototype.validate.call(this)},i.prototype.disableUnusedColumns=function(e){e&&(e.column&&(e.column.__disabled=!0),A(this.axisRanges.iterator(),function(t){var n=e.rangesColumns.getKey(t.uid);n&&(n.__disabled=!0)}))},i.prototype.validateDataElementReal=function(e){var t,n,r,a,o=this,l=this.chart.startAngle,h=this.chart.endAngle,p=this.yField,u=this.yOpenField,d=this.xField,c=this.xOpenField,f=this.getStartLocation(e),g=this.getEndLocation(e),m=(h-l)/(this.dataItems.length*(this.end-this.start)),x=e.column;x||(x=this.columns.create(),e.column=x,De(this,x,Ie),De(this.columns.template,x,Ie),e.addSprite(x),x.paper=this.paper,this.setColumnStates(x));var b=x.width,C=100;b instanceof te&&(C=b.percent);var S=V((g-f)*(1-C/100)/2,5);if(f+=S,g-=S,this.xAxis instanceof Ve&&this.yAxis instanceof Ve)r=oe({x:this.yAxis.getX(e,p,0,"valueY"),y:this.yAxis.getY(e,p,0,"valueY")}),a=oe({x:this.yAxis.getX(e,u,1,"valueY"),y:this.yAxis.getY(e,u,1,"valueY")}),t=this.xAxis.getAngle(e,c,0,"valueX"),n=this.xAxis.getAngle(e,d,1,"valueX"),l+=f*m,h-=(1-g)*m;else if(this.baseAxis==this.xAxis)r=oe({x:this.yAxis.getX(e,p,e.locations[p],"valueY"),y:this.yAxis.getY(e,p,e.locations[p],"valueY")}),a=oe({x:this.yAxis.getX(e,u,e.locations[u],"valueY"),y:this.yAxis.getY(e,u,e.locations[u],"valueY")}),t=this.xAxis.getAngle(e,c,f,"valueX"),n=this.xAxis.getAngle(e,d,g,"valueX"),l+=f*m,h-=(1-g)*m;else{if(r=oe({x:this.yAxis.getX(e,p,f,"valueY"),y:this.yAxis.getY(e,p,f,"valueY")}),a=oe({x:this.yAxis.getX(e,u,g,"valueY"),y:this.yAxis.getY(e,u,g,"valueY")}),y(b)){var P=Math.abs(r-a);if(P>b){var O=(P-b)/2;r+=O,a-=O}}t=this.xAxis.getAngle(e,d,e.locations[d],"valueX"),n=this.xAxis.getAngle(e,c,e.locations[c],"valueX")}if(n<t){var I=n;n=t,t=I}t=R(t,l,h),n=R(n,l,h);var k=x.radarColumn;k.startAngle=t;var D=n-t;D>0?(k.arc=D,k.radius=r,k.innerRadius=a,x.__disabled=!1,x.parent=this.columnsContainer,A(this.axisRanges.iterator(),function(G){var H=e.rangesColumns.getKey(G.uid);H||(H=o.columns.create(),Ol(o.columns.template,H,Ie),De(G.contents,H,Ie),H.dataItem&&z(H.dataItem.sprites,H),e.addSprite(H),H.paper=o.paper,o.setColumnStates(H),e.rangesColumns.setKey(G.uid,H));var ne=H.radarColumn;ne.startAngle=t,ne.arc=D,ne.radius=r,ne.innerRadius=a,ne.invalid&&(ne.paper=o.paper,ne.validate()),H.__disabled=!1,H.parent=G.contents})):this.disableUnusedColumns(e)},i.prototype.getPoint=function(e,t,n,r,a,o,l){o||(o="valueX"),l||(l="valueY");var h=oe({x:this.yAxis.getX(e,n,a,l),y:this.yAxis.getY(e,n,a,l)});h==0&&(h=1e-5);var p=this.xAxis.getAngle(e,t,r,o);return{x:h*L(p),y:h*M(p)}},i.prototype.getMaskPath=function(){var e=this.yAxis.renderer;return Pi(e.startAngle,e.endAngle-e.startAngle,e.pixelRadius,e.pixelInnerRadius)},i.prototype.positionBulletReal=function(e,t,n){var r=this.xAxis,a=this.yAxis;(t<r.start||t>r.end||n<a.start||n>a.end)&&(e.visible=!1),e.moveTo(this.xAxis.renderer.positionToPoint(t,n))},i.prototype.setXAxis=function(e){s.prototype.setXAxis.call(this,e),this.updateRendererRefs()},i.prototype.setYAxis=function(e){s.prototype.setYAxis.call(this,e),this.updateRendererRefs()},i.prototype.updateRendererRefs=function(){var e=this.xAxis.renderer,t=this.yAxis.renderer;e.axisRendererY=t},i}(pi);_.registeredClasses.RadarColumnSeries=tu,_.registeredClasses.RadarColumnSeriesDataItem=eu;var cs=function(s){function i(){var e=s.call(this)||this;return e.slice=e.createChild($),e.slice.shouldClone=!1,e.slice.setElement(e.paper.add("path")),e.slice.isMeasured=!1,e.orientation="vertical",e.bottomWidth=F(100),e.topWidth=F(100),e.isMeasured=!1,e.width=10,e.height=10,e.expandDistance=0,e.className="FunnelSlice",e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.pixelPaddingTop,t=this.pixelPaddingBottom,n=this.pixelPaddingRight,r=this.pixelPaddingLeft,a=this.pixelWidth-n-r,o=this.pixelHeight-e-t,l=this.expandDistance,h="";if(this.orientation=="vertical"){var p={x:(a-(b=xe(this.topWidth,a)))/2+r,y:e},u={x:(a+b)/2+r,y:e},d={x:(a+(C=xe(this.bottomWidth,a)))/2+r,y:e+o},c={x:(a-C)/2+r,y:e+o},f={x:u.x+(d.x-u.x)/2+l*o,y:u.y+.5*o},g={x:p.x+(c.x-p.x)/2-l*o,y:p.y+.5*o},m=T(d),x=T(p);l!=0&&(m=ni(d,f),x=ni(p,g)),h=E(p)+T(u)+m+T(c)+x,this.tickPoint={x:u.x+(d.x-u.x)/2,y:u.y+(d.y-u.y)/2}}else{var b,C,S={x:r,y:(o-(b=xe(this.topWidth,o)))/2+e},P={x:r,y:(o+b)/2+e},O={x:r+a,y:(o-(C=xe(this.bottomWidth,o)))/2+e},I={x:r+a,y:(o+C)/2+e};f={y:S.y+(O.y-S.y)/2-l*a,x:S.x+.5*a},g={y:P.y+(I.y-P.y)/2+l*a,x:P.x+.5*a},m=T(O),x=T(P),l!=0&&(m=ni(O,f),x=ni(P,g)),h=E(P)+T(S)+m+T(I)+x,this.tickPoint={y:P.y+(I.y-P.y)/2,x:P.x+(I.x-P.x)/2}}this.slice.path=h,this.invalidateLayout()},i.prototype.getPoint=function(e,t){var n=this.pixelPaddingTop,r=this.pixelPaddingBottom,a=this.pixelPaddingRight,o=this.pixelPaddingLeft,l=this.pixelWidth-a-o,h=this.pixelHeight-n-r;if(this.orientation=="vertical"){var p={x:(l-(f=xe(this.topWidth,l)))/2+o,y:n},u={x:(l+f)/2+o,y:n},d={x:(l+(g=xe(this.bottomWidth,l)))/2+o,y:n+h},c=p.x+((l-g)/2+o-p.x)*t;return{x:c+(u.x+(d.x-u.x)*t-c)*e,y:u.y+(d.y-u.y)*t}}var f,g,m=o,x=(h-(f=xe(this.topWidth,h)))/2+n,b=(h+f)/2+n,C=o+l,S=x+((h-(g=xe(this.bottomWidth,h)))/2+n-x)*e;return{y:S+(b+((h+g)/2+n-b)*e-S)*t,x:m+(C-m)*e}},Object.defineProperty(i.prototype,"bottomWidth",{get:function(){return this.getPropertyValue("bottomWidth")},set:function(e){this.setPercentProperty("bottomWidth",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"topWidth",{get:function(){return this.getPropertyValue("topWidth")},set:function(e){this.setPercentProperty("topWidth",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(e){this.setPropertyValue("orientation",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"expandDistance",{get:function(){return this.getPropertyValue("expandDistance")},set:function(e){this.setPropertyValue("expandDistance",e,!0)},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.slice&&this.slice.copyFrom(e.slice)},i}(W);_.registeredClasses.FunnelSlice=cs;var iu=function(s){function i(){var e=s.call(this)||this;return e._label=new Me,e._slice=new Me,e.className="FunnelTick",e.element=e.paper.add("path"),e._disposers.push(e._label),e._disposers.push(e._slice),e.setPropertyValue("locationX",0),e.setPropertyValue("locationY",0),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.slice,t=e.getPoint(this.locationX,this.locationY);if(t){var n=this.label,r=e.dataItem.component,a=void 0,o=void 0,l=void 0;if(r.orientation=="vertical"){var h=n.pixelX,p=n.pixelY;r.labelsOpposite||(h+=n.maxRight),a=Qe(t,e,this.parent),l=Qe({x:h,y:p},n.parent,this.parent),o={x:n.parent.pixelX-this.length,y:l.y},r.labelsOpposite||(o.x=n.parent.measuredWidth+this.length)}else h=n.pixelX,p=n.pixelY,r.labelsOpposite||(p+=n.maxBottom),a=Qe(t,e,this.parent),o={x:(l=Qe({x:h,y:p},n.parent,this.parent)).x,y:n.parent.pixelY-this.length},r.labelsOpposite||(o.y=n.parent.measuredHeight+this.length);this.path=E(a)+T(o)+T(l)}},Object.defineProperty(i.prototype,"slice",{get:function(){return this._slice.get()},set:function(e){this._slice.set(e,new _e([e.events.on("transformed",this.invalidate,this,!1),e.events.on("validated",this.invalidate,this,!1)]))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"label",{get:function(){return this._label.get()},set:function(e){this._label.set(e,e.events.on("transformed",this.invalidate,this,!1))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"locationX",{get:function(){return this.getPropertyValue("locationX")},set:function(e){this.setPropertyValue("locationX",e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"locationY",{get:function(){return this.getPropertyValue("locationY")},set:function(e){this.setPropertyValue("locationY",e,!1,!0)},enumerable:!0,configurable:!0}),i}(en);_.registeredClasses.FunnelTick=iu;var fs=function(s){function i(){var e=s.call(this)||this;return e.className="FunnelSeriesDataItem",e.events.on("visibilitychanged",function(){e.component&&e.component.invalidateDataItems()},e,!1),e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"sliceLink",{get:function(){var e=this;if(!this._sliceLink){var t=this.component.sliceLinks.create();this._sliceLink=t,this._disposers.push(t),t.parent=this.component.slicesContainer,this._disposers.push(new le(function(){e.component&&e.component.sliceLinks.removeValue(t)})),this.addSprite(t),t.visible=this.visible}return this._sliceLink},enumerable:!0,configurable:!0}),i}(ns),Xo=function(s){function i(){var e=s.call(this)||this;return e._nextY=0,e.className="FunnelSeries",e.orientation="vertical",e.width=F(100),e.height=F(100),e.slicesContainer.width=F(100),e.slicesContainer.height=F(100),e._disposers.push(e.slicesContainer.events.on("maxsizechanged",e.invalidateDataItems,e,!1)),e.labelsOpposite=!0,e.labelsContainer.layout="absolute",e.bottomRatio=0,e.applyTheme(),e}return w(i,s),i.prototype.createSlice=function(){return new cs},i.prototype.createTick=function(){return new iu},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Funnel Series"))},i.prototype.createDataItem=function(){return new fs},i.prototype.initSlice=function(e){e.isMeasured=!1,e.defaultState.properties.scale=1,e.observe("scale",this.handleSliceScale,this),e.observe(["dx","dy","x","y"],this.handleSliceMove,this),e.tooltipText="{category}: {value.percent.formatNumber('#.#p')} ({value.value})",e.states.create("hover").properties.expandDistance=.2},i.prototype.initLabel=function(e){s.prototype.initLabel.call(this,e),e.verticalCenter="middle",e.horizontalCenter="middle",e.isMeasured=!0,e.padding(5,5,5,5)},i.prototype.validate=function(){s.prototype.validate.call(this),this._nextY=0},i.prototype.validateDataElements=function(){var e=this,t=this.slicesContainer,n=this.labelsContainer,r=this.labels.template;this.alignLabels?(r.interactionsEnabled=!0,t.isMeasured=!0,n.isMeasured=!0):(r.interactionsEnabled=!1,t.isMeasured=!1,n.isMeasured=!1);var a=0,o=0;this.dataItems.each(function(l){v(l.value)&&(o++,l.value>0?a+=Math.abs(l.getWorkingValue("value")/l.value):e.ignoreZeroValues||!l.visible||l.__disabled||l.isHiding?o--:a+=1)}),this._total=1/o*a,this._count=o,s.prototype.validateDataElements.call(this),this.arrangeLabels()},i.prototype.getNextValue=function(e){var t=e.index,n=e.getWorkingValue("value");if(t<this.dataItems.length-1){var r=this.dataItems.getIndex(t+1);if(n=r.getWorkingValue("value"),!r.visible||r.isHiding||r.__disabled||r.value==0&&this.ignoreZeroValues)return this.getNextValue(r)}return n},i.prototype.formDataElement=function(){},i.prototype.validateDataElement=function(e){var t=this,n=e.slice;n.orientation=this.orientation;var r=e.sliceLink;r.orientation=this.orientation;var a=e.tick,o=e.label;a.slice=n,a.label=o,v(e.value)?(this.decorateSlice(e),j(e.sprites,function(l){e.value==0&&t.ignoreZeroValues?l.__disabled=!0:l.__disabled=!1})):j(e.sprites,function(l){l.__disabled=!0}),e.index==this.dataItems.length-1&&(r.disabled=!0),s.prototype.validateDataElement.call(this,e),r.fill=n.fill},i.prototype.decorateSlice=function(e){var t=e.slice,n=e.sliceLink,r=e.label,a=e.tick,o=this.slicesContainer.innerWidth,l=this.slicesContainer.innerHeight,h=this.getNextValue(e),p=Math.abs(e.getWorkingValue("value")),u=this.bottomRatio,d=1;if(e.value!=0?d=p/Math.abs(e.value):(e.__disabled||e.isHiding||!e.visible)&&(d=1e-6),this.ignoreZeroValues&&e.value==0)e.__disabled=!0;else if(e.__disabled=!1,this._nextY==1/0&&(this._nextY=0),this.orientation=="vertical"){var c=n.pixelHeight*d;l+=c,t.topWidth=p/this.dataItem.values.value.high*o,t.bottomWidth=(p-(p-h)*u)/this.dataItem.values.value.high*o,n.topWidth=t.bottomWidth,n.bottomWidth=(p-(p-h))/this.dataItem.values.value.high*o,t.y=this._nextY,t.height=Math.min(1e5,q(0,l/this._count*d/this._total-c)),t.x=o/2,this.alignLabels?r.x=void 0:r.x=t.x,r.y=t.pixelY+t.pixelHeight*a.locationY,this._nextY+=t.pixelHeight+c,n.y=this._nextY-c,n.x=t.x}else{var f=n.pixelWidth*d;o+=f,t.topWidth=p/this.dataItem.values.value.high*l,t.bottomWidth=(p-(p-h)*u)/this.dataItem.values.value.high*l,n.topWidth=t.bottomWidth,n.bottomWidth=(p-(p-h))/this.dataItem.values.value.high*l,t.x=this._nextY,t.width=Math.min(1e5,o/this._count*d*1/this._total-f),t.y=l/2,this.alignLabels?r.y=this.labelsContainer.measuredHeight:r.y=t.y,r.x=t.pixelX+t.pixelWidth*a.locationX,this._nextY+=t.pixelWidth+f,n.x=this._nextY-f,n.y=t.y}},i.prototype.getLastLabel=function(e){if(e>0){var t=this.labels.getIndex(e);return t.__disabled||!t.visible?this.getLastLabel(e-1):t}},i.prototype.arrangeLabels=function(){if(this.alignLabels){var e=this.labels.length;if(e>1){var t=this.getLastLabel(e-1);if(t){var n=t.pixelY,r=t.pixelX;if(e>1){for(var a=e-2;a>=0;a--)(o=this.labels.getIndex(a)).visible&&!o.__disabled&&(o.invalid&&o.validate(),this.orientation=="vertical"?o.pixelY+o.measuredHeight>n&&(o.y=Math.min(1e6,n-o.measuredHeight)):o.pixelX+o.measuredWidth>r&&(o.x=Math.min(1e6,r-o.measuredWidth)),n=o.pixelY,r=o.pixelX);for(n=0,r=0,a=0;a<e;a++){var o;(o=this.labels.getIndex(a)).visible&&!o.__disabled&&(o.invalid&&o.validate(),this.orientation=="vertical"?o.pixelY<n&&(o.y=Math.min(1e6,n)):o.pixelX<r&&(o.x=Math.min(1e6,r)),n+=o.measuredHeight,r+=o.measuredWidth)}}}}}},i.prototype.positionBullet=function(e){s.prototype.positionBullet.call(this,e);var t=e.dataItem.slice,n=e.locationX;y(n)||(n=.5);var r=e.locationY;y(r)||(r=1),e.x=t.pixelX+t.measuredWidth*n,e.y=t.pixelY+t.measuredHeight*r},Object.defineProperty(i.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(e){this.setPropertyValue("orientation",e)&&(this.labelsOpposite=this.labelsOpposite,this.invalidate(),e=="vertical"?(this.ticks.template.locationX=1,this.ticks.template.locationY=.5,this.labels.template.rotation=0,this.layout="horizontal"):(this.ticks.template.locationX=.5,this.ticks.template.locationY=1,this.labels.template.rotation=-90,this.layout="vertical"))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bottomRatio",{get:function(){return this.getPropertyValue("bottomRatio")},set:function(e){this.setPropertyValue("bottomRatio",e)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sliceLinks",{get:function(){if(!this._sliceLinks){var e=new cs;e.applyOnClones=!0,e.fillOpacity=.5,e.expandDistance=-.3,e.hiddenState.properties.opacity=0,this._disposers.push(e),this._sliceLinks=new Oe(e),this._disposers.push(new fe(this._sliceLinks))}return this._sliceLinks},enumerable:!0,configurable:!0}),i.prototype.show=function(e){var t=this,n=this.startIndex,r=this.endIndex,a=this.defaultState.transitionDuration;y(e)&&(a=e),Z.animationsEnabled||(a=0);var o=0;return A($t(this.dataItems.iterator()),function(l){var h=l[0],p=l[1];t.sequencedInterpolation&&(o=t.sequencedInterpolationDelay*h+a*(h-n)/(r-n)),p.show(a,o,["value"])}),s.prototype.show.call(this,e)},i.prototype.hide=function(e){var t=this,n=["value"],r=this.startIndex,a=this.endIndex,o=0,l=this.hiddenState.transitionDuration;y(e)&&(l=e),Z.animationsEnabled||(l=0),A($t(this.dataItems.iterator()),function(p){var u=p[0],d=p[1];t.sequencedInterpolation&&(o=t.sequencedInterpolationDelay*u+l*(u-r)/(a-r)),d.hide(l,o,0,n)});var h=s.prototype.hide.call(this,e);return h&&!h.isFinished()&&h.delay(o),h},i.prototype.setAlignLabels=function(e){s.prototype.setAlignLabels.call(this,e),this.ticks.template.disabled=!e;var t=this.labelsContainer;t&&(e?(t.height=void 0,t.width=void 0,t.margin(10,10,10,10)):(t.width=F(100),t.height=F(100))),this.labelsOpposite=this.labelsOpposite},Object.defineProperty(i.prototype,"labelsOpposite",{get:function(){return this.getPropertyValue("labelsOpposite")},set:function(e){this.setPropertyValue("labelsOpposite",e);var t=this.labels.template,n="none",r="none";this.alignLabels?e?(this.labelsContainer.toFront(),this.orientation=="vertical"?(this.ticks.template.locationX=1,t.horizontalCenter="left",n="right"):(this.ticks.template.locationY=1,t.horizontalCenter="right",r="bottom")):(this.labelsContainer.toBack(),this.orientation=="vertical"?(this.ticks.template.locationX=0,n="left"):(r="top",this.ticks.template.locationY=0)):this.orientation=="vertical"?n="center":r="middle",t.align=n,t.valign=r,this.validateLayout(),this.ticks.each(function(a){a.invalidate()}),this.invalidateDataItems()},enumerable:!0,configurable:!0}),i}(Qn);_.registeredClasses.FunnelSeries=Xo,_.registeredClasses.FunnelSeriesDataItem=fs;var gs=function(s){function i(){var e=s.call(this)||this;return e.className="PyramidSeriesDataItem",e.applyTheme(),e}return w(i,s),i}(fs),Yo=function(s){function i(){var e=s.call(this)||this;return e.className="PyramidSeries",e.topWidth=F(0),e.bottomWidth=F(100),e.pyramidHeight=F(100),e.valueIs="area",e.sliceLinks.template.width=0,e.sliceLinks.template.height=0,e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Pyramid Series"))},i.prototype.createDataItem=function(){return new gs},i.prototype.validate=function(){s.prototype.validate.call(this),this._nextWidth=void 0},i.prototype.getNextValue=function(e){var t=e.index,n=e.getWorkingValue("value");return t<this.dataItems.length-1&&(n=this.dataItems.getIndex(t+1).getWorkingValue("value")),n==0&&(n=1e-6),n},i.prototype.validateDataElements=function(){var e=this,t=this.slicesContainer.innerWidth,n=this.slicesContainer.innerHeight;if(this.dataItems.each(function(o){if(o.value>0){var l=o.getWorkingValue("value")/o.value,h=o.sliceLink;e.orientation=="vertical"?n-=h.pixelHeight*l:t-=h.pixelWidth*l}}),this._pyramidHeight=xe(this.pyramidHeight,n),this._pyramidWidth=xe(this.pyramidHeight,t),this.orientation=="vertical"){var r=(n-this._pyramidHeight)/2;this.slicesContainer.y=r,this.labelsContainer.y=r,this.ticksContainer.y=r}else{var a=(t-this._pyramidWidth)/2;this.slicesContainer.x=a,this.labelsContainer.x=a,this.ticksContainer.x=a}s.prototype.validateDataElements.call(this)},i.prototype.decorateSlice=function(e){var t=this.dataItem.values.value.absoluteSum;if(t!=0){var n=e.slice,r=e.sliceLink,a=e.label,o=e.tick;this.getNextValue(e);var l=Math.abs(e.getWorkingValue("value")),h=this._pyramidWidth,p=this._pyramidHeight,u=this.slicesContainer.innerWidth,d=this.slicesContainer.innerHeight,c=r.pixelWidth,f=r.pixelHeight;if(e.value!=0&&e.value!=null||!this.ignoreZeroValues?e.__disabled=!1:e.__disabled=!0,this.orientation=="vertical"){var g=xe(this.topWidth,u);y(this._nextWidth)||(this._nextWidth=g);var m=xe(this.bottomWidth,u),x=this._nextWidth,b=Math.atan2(p,g-m);(I=Math.tan(Math.PI/2-b))==0&&(I=1e-8);var C=void 0,S=void 0;if(this.valueIs=="area"){var P=(g+m)/2*p*l/t,O=Math.abs(x*x-2*P*I);S=(C=(x-Math.sqrt(O))/I)>0?(2*P-C*x)/C:x}else S=x-(C=p*l/t)*I;n.height=C,n.width=u,n.bottomWidth=S,n.topWidth=x,r.topWidth=n.bottomWidth,r.bottomWidth=n.bottomWidth,n.y=this._nextY,this.alignLabels?a.x=0:a.x=u/2,a.y=n.pixelY+n.pixelHeight*o.locationY+n.dy,this._nextY+=n.pixelHeight+f*l/Math.max(Math.abs(e.value),1e-8),r.y=this._nextY-f,r.x=u/2}else{var I;g=xe(this.topWidth,d),y(this._nextWidth)||(this._nextWidth=g),m=xe(this.bottomWidth,d),x=this._nextWidth,b=Math.atan2(h,g-m),(I=Math.tan(Math.PI/2-b))==0&&(I=1e-8);var k=void 0;S=void 0,S=this.valueIs=="area"?(2*(P=(g+m)/2*h*l/t)-(k=(x-Math.sqrt(x*x-2*P*I))/I)*x)/k:x-(k=h*l/t)*I,n.width=k,n.height=d,n.bottomWidth=S,n.topWidth=x,r.topWidth=n.bottomWidth,r.bottomWidth=n.bottomWidth,n.x=this._nextY,this.alignLabels?a.y=this.labelsContainer.measuredHeight:a.y=d/2,a.x=n.pixelX+n.pixelWidth*o.locationX+n.dx,this._nextY+=n.pixelWidth+c*l/Math.max(Math.abs(e.value),1e-8),r.x=this._nextY-c,r.y=d/2}this._nextWidth=n.bottomWidth}},Object.defineProperty(i.prototype,"topWidth",{get:function(){return this.getPropertyValue("topWidth")},set:function(e){this.setPercentProperty("topWidth",e,!1,!1,10,!1)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pyramidHeight",{get:function(){return this.getPropertyValue("pyramidHeight")},set:function(e){this.setPercentProperty("pyramidHeight",e,!1,!1,10,!1)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bottomWidth",{get:function(){return this.getPropertyValue("bottomWidth")},set:function(e){this.setPercentProperty("bottomWidth",e,!1,!1,10,!1)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"valueIs",{get:function(){return this.getPropertyValue("valueIs")},set:function(e){this.setPropertyValue("valueIs",e)&&this.invalidate()},enumerable:!0,configurable:!0}),i}(Xo);_.registeredClasses.PyramidSeries=Yo,_.registeredClasses.PyramidSeriesDataItem=gs;var zo=function(s){function i(){var e=s.call(this)||this;return e.className="PictorialStackedSeriesDataItem",e.applyTheme(),e}return w(i,s),i}(gs),nu=function(s){function i(){var e=s.call(this)||this;return e.className="PictorialStackedSeries",e.topWidth=F(100),e.bottomWidth=F(100),e.valueIs="height",e.applyTheme(),e.startLocation=0,e.endLocation=1,e.align="center",e.valign="middle",e._maskSprite=e.slicesContainer.createChild($),e._maskSprite.visible=!1,e._maskSprite.zIndex=100,e._maskSprite.shouldClone=!1,e}return w(i,s),i.prototype.validateDataElements=function(){var e=this.slicesContainer.maxWidth,t=this.slicesContainer.maxHeight,n=this._maskSprite,r=n.measuredWidth/n.scale,a=n.measuredHeight/n.scale,o=ie(t/a,e/r);o==1/0&&(o=1),o=q(.001,o);var l,h,p=this.startLocation,u=this.endLocation,d=ie(e,r*o),c=ie(t,a*o);n.scale=o,this.orientation=="vertical"?(this.topWidth=d+4,this.bottomWidth=d+4,this.pyramidHeight=c*(u-p),n.x=e/2,n.y=c/2):(this.topWidth=c+4,this.bottomWidth=c+4,this.pyramidHeight=d*(u-p),n.valign="middle",n.x=d/2,n.y=t/2),n.verticalCenter="middle",n.horizontalCenter="middle",s.prototype.validateDataElements.call(this),this.orientation=="vertical"?(this.valign=="bottom"&&(l=t-c),this.valign=="middle"&&(l=(t-c)/2),this.valign=="top"&&(l=0),this.align=="left"&&(h=-(e-d)/2),this.align=="center"&&(h=0),this.align=="right"&&(h=(e-d)/2),this.slices.template.dy=p*c,this.alignLabels&&(this.slicesContainer.dx=h)):(this.valign=="bottom"&&(l=(t-c)/2),this.valign=="middle"&&(l=0),this.valign=="top"&&(l=-(t-c)/2),this.align=="left"&&(h=0),this.align=="center"&&(h=(e-d)/2),this.align=="right"&&(h=e-d),this.slices.template.dx=p*d,this.alignLabels&&(this.slicesContainer.dy=l)),this.slicesContainer.x=h,this.labelsContainer.x=h,this.ticksContainer.x=h,this.slicesContainer.y=l,this.labelsContainer.y=l,this.ticksContainer.y=l,d>0&&c>0&&(this.slicesContainer.mask=n)},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Pyramid Series"))},i.prototype.createDataItem=function(){return new zo},Object.defineProperty(i.prototype,"maskSprite",{get:function(){return this._maskSprite},enumerable:!0,configurable:!0}),i.prototype.initSlice=function(e){s.prototype.initSlice.call(this,e);var t=e.states.getKey("hover");t&&(t.properties.expandDistance=0)},Object.defineProperty(i.prototype,"startLocation",{get:function(){return this.getPropertyValue("startLocation")},set:function(e){this.setPropertyValue("startLocation",e)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endLocation",{get:function(){return this.getPropertyValue("endLocation")},set:function(e){this.setPropertyValue("endLocation",e)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),i}(Yo);_.registeredClasses.PictorialStackedSeries=nu,_.registeredClasses.PictorialStackedSeriesDataItem=zo;var Uo=function(s){function i(){var e=s.call(this)||this;return e.className="ConeColumn",e}return w(i,s),i.prototype.createAssets=function(){this.coneColumn=this.createChild(Pp),this.coneColumn.shouldClone=!1,this.column=this.coneColumn},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.coneColumn&&this.coneColumn.copyFrom(e.coneColumn)},i}(hi);_.registeredClasses.ConeColumn=Uo;var ru=function(s){function i(){var e=s.call(this)||this;return e.className="ConeSeriesDataItem",e.applyTheme(),e}return w(i,s),i}(Gt),su=function(s){function i(){var e=s.call(this)||this;return e.className="ConeSeries",e.applyTheme(),e}return w(i,s),i.prototype.createColumnTemplate=function(){return new Uo},i.prototype.getMaskPath=function(){var e=0,t=0,n=this.columns.getIndex(0);if(n)return this.baseAxis==this.xAxis?t=n.coneColumn.innerWidth/2+1:e=n.coneColumn.innerHeight/2+1,Yt({x:-e,y:0,width:this.xAxis.axisLength+e,height:this.yAxis.axisLength+t})},i.prototype.validateDataElementReal=function(e){if(s.prototype.validateDataElementReal.call(this,e),e.column){var t=e.column.coneColumn;t.fill=e.column.fill,this.baseAxis==this.yAxis?t.orientation="horizontal":t.orientation="vertical"}},i}(pi);_.registeredClasses.ConeSeries=su,_.registeredClasses.ConeSeriesDataItem=ru;var Go=function(s){function i(){var e=s.call(this)||this;return e.className="CurvedColumn",e}return w(i,s),i.prototype.createAssets=function(){this.curvedColumn=this.createChild($),this.curvedColumn.shouldClone=!1,this.setPropertyValue("tension",.7),this.width=F(120),this.height=F(120),this.column=this.curvedColumn},i.prototype.draw=function(){s.prototype.draw.call(this);var e,t=this.realWidth,n=this.realHeight,r=this.realX-this.pixelX,a=this.realY-this.pixelY;this.width;var o=1,l=1;this.orientation=="vertical"?(o=this.tension,e=[{x:0,y:n+a},{x:t/2,y:a},{x:t,y:n+a}]):(l=this.tension,e=[{x:r,y:n=Math.abs(n)},{x:r+t,y:n/2},{x:r,y:0}]);var h=E(e[0])+new zt(o,l).smooth(e);this.column.path=h},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.curvedColumn&&this.curvedColumn.copyFrom(e.curvedColumn)},Object.defineProperty(i.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(e){this.setPropertyValue("tension",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(e){this.setPropertyValue("orientation",e,!0)},enumerable:!0,configurable:!0}),i}(hi);_.registeredClasses.CurvedColumn=Go;var au=function(s){function i(){var e=s.call(this)||this;return e.className="CurvedColumnSeriesDataItem",e.applyTheme(),e}return w(i,s),i}(Gt),ou=function(s){function i(){var e=s.call(this)||this;return e.className="CurvedColumnSeries",e.applyTheme(),e}return w(i,s),i.prototype.createColumnTemplate=function(){return new Go},i.prototype.validateDataElementReal=function(e){s.prototype.validateDataElementReal.call(this,e);var t=e.column;(t=e.column)&&(e.column.curvedColumn.fill=e.column.fill,this.baseAxis==this.yAxis?t.orientation="horizontal":t.orientation="vertical")},i}(pi);_.registeredClasses.CurvedColumnSeries=ou,_.registeredClasses.CurvedColumnSeriesDataItem=au;var lu=function(s){function i(){var e=s.call(this)||this;e.className="CircleBullet";var t=e.createChild(ii);return t.shouldClone=!1,t.radius=5,t.isMeasured=!1,e.circle=t,e.applyTheme(),e}return w(i,s),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.circle.copyFrom(e.circle)},i}(It);_.registeredClasses.CircleBullet=lu;var hu=function(s){function i(){var e=s.call(this)||this;return e.className="ErrorBullet",e.errorLine=e.createChild($),e.errorLine.shouldClone=!1,e.width=20,e.height=20,e.strokeOpacity=1,e.isDynamic=!0,e}return w(i,s),i.prototype.validatePosition=function(){s.prototype.validatePosition.call(this);var e=this.pixelWidth/2,t=this.pixelHeight/2;this.errorLine.path=E({x:-e,y:-t})+T({x:e,y:-t})+E({x:0,y:-t})+T({x:0,y:t})+E({x:-e,y:t})+T({x:e,y:t})},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.errorLine.copyFrom(e.errorLine)},i}(It);_.registeredClasses.ErrorBullet=hu;var pu=function(s){function i(){var e=s.call(this)||this;return e.className="NavigationBarDataItem",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"name",{get:function(){return this.properties.name},set:function(e){this.setProperty("name",e)},enumerable:!0,configurable:!0}),i}(ei),uu=function(s){function i(){var e=s.call(this)||this;e.className="NavigationBar";var t=new ae,n=new zr;n.valign="middle",n.paddingTop=8,n.paddingBottom=8,e.paddingBottom=2,e.links=new Oe(n),e._disposers.push(new fe(e.links)),e._disposers.push(n),e._linksIterator=new fn(e.links,function(){return e.links.create()}),e._linksIterator.createNewItems=!0;var r=new Ur;r.direction="right",r.width=8,r.height=12,r.fill=t.getFor("alternativeBackground"),r.fillOpacity=.5,r.valign="middle",r.marginLeft=10,r.marginRight=10,e.separators=new Oe(r),e._disposers.push(new fe(e.separators)),e._disposers.push(r);var a=new zr;return e.activeLink=a,a.copyFrom(n),a.valign="middle",a.fontWeight="bold",e.width=F(100),e.layout="grid",e.dataFields.name="name",e.applyTheme(),e}return w(i,s),i.prototype.validateDataElements=function(){this.removeChildren(),this._linksIterator.reset(),s.prototype.validateDataElements.call(this)},i.prototype.validateDataElement=function(e){var t;if(s.prototype.validateDataElement.call(this,e),e.index<this.dataItems.length-1){(t=this._linksIterator.getLast()).parent=this;var n=this.separators.create();n.parent=this,n.valign="middle"}else(t=this.activeLink).events.copyFrom(this.links.template.events),t.hide(0),t.show(),t.parent=this;t.dataItem=e,t.text=e.name,t.validate()},i}(ti);_.registeredClasses.NavigationBar=uu,_.registeredClasses.NavigationBarDataItem=pu;var Ko=function(s){function i(){var e=s.call(this)||this;e.point={x:0,y:0},e._stick="none",e.className="Cursor",e.width=F(100),e.height=F(100),e.shouldClone=!1,e.hide(0),e.trackable=!0,e.clickable=!0,e.isMeasured=!1;var t=K();return e._disposers.push(t.body.events.on("down",e.handleCursorDown,e)),e._disposers.push(t.body.events.on("up",e.handleCursorUp,e)),e._disposers.push(t.body.events.on("track",e.handleCursorMove,e)),e.applyTheme(),e}return w(i,s),i.prototype.handleCursorMove=function(e){if(!(!this.interactionsEnabled||this.interactions.isTouchProtected&&e.touch)){if((this._generalBehavior=="zoom"||this._generalBehavior=="pan")&&this.downPoint||K().isLocalElement(e.pointer,this.paper.svg,this.uid)){var t=vi(e.pointer.point,this);return this._stick=="hard"&&this._stickPoint&&(t=this._stickPoint),this._stick=="soft"&&this._stickPoint&&(this.fitsToBounds(t)||(t=this._stickPoint)),this._adapterO&&this._adapterO.apply("cursorPoint",t),this.triggerMove(t),t}this.isHidden&&this.isHiding||this.hide()}},i.prototype.hideReal=function(e){if(this._stick!="hard"&&this._stick!="soft"||!this._stickPoint)return s.prototype.hideReal.call(this,e)},i.prototype.triggerMove=function(e,t,n){e.x=V(e.x,1),e.y=V(e.y,1),t&&(this._stick=t),t!="hard"&&t!="soft"||(this._stickPoint=e),this.triggerMoveReal(e,n)},i.prototype.triggerMoveReal=function(e,t){(this.point.x!=e.x||this.point.y!=e.y||t)&&(this.point=e,this.invalidatePosition(),this.fitsToBounds(e)?this.show(0):this.downPoint||this.hide(0),this.visible&&(this.getPositions(),this.dispatch("cursorpositionchanged")))},i.prototype.triggerDown=function(e){this.triggerDownReal(e)},i.prototype.triggerDownReal=function(e){switch(this._generalBehavior){case"zoom":this.dispatchImmediately("zoomstarted");break;case"select":this.dispatchImmediately("selectstarted");break;case"pan":this.dispatchImmediately("panstarted"),K().setGlobalStyle(He.grabbing)}},i.prototype.triggerUp=function(e){this.triggerUpReal(e)},i.prototype.triggerUpReal=function(e){Q.requestFrame(),this.updatePoint(this.upPoint);var t=K();if(oe(this._upPointOrig,this._downPointOrig)>t.getHitOption(this.interactions,"hitTolerance")){switch(this._generalBehavior){case"zoom":this.dispatch("zoomended");break;case"select":this.dispatch("selectended");break;case"pan":this.dispatch("panended"),t.setGlobalStyle(He.default)}this.downPoint=void 0,this.updateSelection()}},i.prototype.updateSelection=function(){},i.prototype.getPositions=function(){this.xPosition=this.point.x/this.innerWidth,this.yPosition=1-this.point.y/this.innerHeight},i.prototype.handleCursorDown=function(e){if(!(!this.interactionsEnabled||this.interactions.isTouchProtected&&e.touch)&&K().isLocalElement(e.pointer,this.paper.svg,this.uid)){kn();var t=vi(e.pointer.point,this);this._stick=="hard"&&this._stickPoint&&(t=this._stickPoint),this._adapterO&&this._adapterO.apply("cursorPoint",t),this.fitsToBounds(t)&&(this._downPointOrig={x:t.x,y:t.y},e.event.cancelable&&this.shouldPreventGestures(e.touch)&&this.fitsToBounds(t)&&e.event.preventDefault(),this.triggerMove(t),this.triggerDown(t))}},i.prototype.shouldPreventGestures=function(e){return!0},i.prototype.updatePoint=function(e){},i.prototype.handleCursorUp=function(e){if(this.interactionsEnabled&&(this.downPoint||K().isLocalElement(e.pointer,this.paper.svg,this.uid))){var t=vi(e.pointer.point,this);this._adapterO&&this._adapterO.apply("cursorPoint",t),this.downPoint&&this.fitsToBounds(this.downPoint)&&(this._stick=="hard"&&this._stickPoint&&(t=this._stickPoint),this._upPointOrig={x:t.x,y:t.y},this.triggerMove(t),this.triggerUp(t))}},Object.defineProperty(i.prototype,"chart",{get:function(){return this._chart},set:function(e){this._chart=e,v(this._chart.plotContainer)&&K().lockElement(this._chart.plotContainer.interactions)},enumerable:!0,configurable:!0}),i}(W);_.registeredClasses.Cursor=Ko;var Zo=function(s){function i(){var e=s.call(this)||this;e._lineX=new Me,e._lineY=new Me,e._xAxis=new Me,e._yAxis=new Me,e._snapToDisposers=[],e.className="XYCursor",e.behavior="zoomX",e.maxPanOut=.1;var t=new ae;e.snapOnPan=!0;var n=e.createChild($);n.shouldClone=!1,n.fillOpacity=.2,n.fill=t.getFor("alternativeBackground"),n.isMeasured=!1,n.visible=!1,n.interactionsEnabled=!1,e.selection=n,e._disposers.push(e.selection);var r=e.createChild($);r.shouldClone=!1,r.stroke=t.getFor("grid"),r.fill=B(),r.strokeDasharray="3,3",r.isMeasured=!1,r.strokeOpacity=.4,r.interactionsEnabled=!1,r.y=0,e.lineX=r,e._disposers.push(e.lineX);var a=e.createChild($);return a.shouldClone=!1,a.stroke=t.getFor("grid"),a.fill=B(),a.strokeDasharray="3,3",a.isMeasured=!1,a.strokeOpacity=.4,a.interactionsEnabled=!1,a.x=0,e.lineY=a,e._disposers.push(e.lineY),e.events.on("sizechanged",e.updateSize,e,!1),e._disposers.push(e._lineX),e._disposers.push(e._lineY),e._disposers.push(e._xAxis),e._disposers.push(e._yAxis),e.mask=e,e.hideSeriesTooltipsOnSelection=!0,e.applyTheme(),e}return w(i,s),i.prototype.updateSize=function(){this.lineX&&(this.lineX.path=E({x:0,y:0})+T({x:0,y:this.innerHeight})),this.lineY&&(this.lineY.path=E({x:0,y:0})+T({x:this.innerWidth,y:0}))},i.prototype.updateSelection=function(){if(this._usesSelection){var e=this.downPoint,t=this.behavior;if(e){var n=this.point;this.lineX&&(n.x=this.lineX.pixelX),this.lineY&&(n.y=this.lineY.pixelY);var r=this.selection,a=Math.min(n.x,e.x),o=Math.min(n.y,e.y),l=V(Math.abs(e.x-n.x),this._positionPrecision),h=V(Math.abs(e.y-n.y),this._positionPrecision);switch(t){case"zoomX":case"selectX":o=0,h=this.pixelHeight;break;case"zoomY":case"selectY":a=0,l=this.pixelWidth}r.x=a,r.y=o,r.path=Xr(l,h),r.validatePosition()}else this._generalBehavior!="select"&&this.selection.hide()}},i.prototype.fixPoint=function(e){return e.x=Math.max(0,e.x),e.y=Math.max(0,e.y),e.x=Math.min(this.pixelWidth,e.x),e.y=Math.min(this.pixelHeight,e.y),e},i.prototype.triggerMoveReal=function(e,t){s.prototype.triggerMoveReal.call(this,e,t);var n=this.snapToSeries;if(n&&!this.downPoint)if(n instanceof oi)n.isHidden&&this.updateLinePositions(e);else{var r=!0;j(n,function(a){a.isHidden||(r=!1)}),r&&this.updateLinePositions(e)}else this.updateLinePositions(e);this.downPoint&&oe(this.downPoint,e)>3&&this._generalBehavior=="pan"&&(this.getPanningRanges(),this.dispatch("panning"))},i.prototype.updateLinePositions=function(e){e=this.fixPoint(this.point),this.lineX&&this.lineX.visible&&!this.xAxis&&(this.lineX.x=e.x),this.lineY&&this.lineY.visible&&!this.yAxis&&(this.lineY.y=e.y),this.updateSelection()},i.prototype.triggerDownReal=function(e){if(this.visible&&!this.isHiding)if(this._generalBehavior=="select"&&(this.selection.parent=this.parent),this.fitsToBounds(e)){this.downPoint={x:e.x,y:e.y},this.updatePoint(e),this.point.x=this.downPoint.x,this.point.y=this.downPoint.y;var t=this.selection,n=this.downPoint.x,r=this.downPoint.y;this._usesSelection&&(t.x=n,t.y=r,t.path="",t.show()),s.prototype.triggerDownReal.call(this,e)}else this.downPoint=void 0;else this.downPoint=void 0},i.prototype.updatePoint=function(e){this.lineX&&(e.x=this.lineX.pixelX),this.lineY&&(e.y=this.lineY.pixelY)},i.prototype.triggerUpReal=function(e){this.hasMoved()?this.downPoint&&(this.upPoint=e,this.updatePoint(this.upPoint),this._generalBehavior!="pan"&&this.getRanges(),this._generalBehavior!="select"&&this.selection.hide(),s.prototype.triggerUpReal.call(this,e)):(this._generalBehavior!="select"?this.selection.hide(0):(this.xRange=void 0,this.yRange=void 0,this.dispatchImmediately("selectended")),this._generalBehavior=="pan"&&K().setGlobalStyle(He.default),this.dispatchImmediately("behaviorcanceled")),this.downPoint=void 0,this.dispatch("cursorpositionchanged")},i.prototype.hasMoved=function(){return(this.behavior=="zoomX"||this.behavior=="panX"?ll(this._upPointOrig,this._downPointOrig):this.behavior=="zoomY"||this.behavior=="panY"?hl(this._upPointOrig,this._downPointOrig):oe(this._upPointOrig,this._downPointOrig))>K().getHitOption(this.interactions,"hitTolerance")},i.prototype.getPanningRanges=function(){var e=V(this.downPoint.x/this.innerWidth,5),t=1-V(this.downPoint.y/this.innerHeight,5),n=e-V(this.point.x/this.innerWidth,5),r=t-(1-V(this.point.y/this.innerHeight,5));this.xRange={start:n,end:1+n},this.yRange={start:r,end:1+r},this.behavior=="panX"&&(this.yRange.start=0,this.yRange.end=1),this.behavior=="panY"&&(this.xRange.start=0,this.xRange.end=1)},i.prototype.getRanges=function(){this.lineX&&(this.upPoint.x=this.lineX.pixelX),this.lineY&&(this.upPoint.y=this.lineY.pixelY),this.selection;var e=V(this.downPoint.x/this.innerWidth,5),t=V(this.upPoint.x/this.innerWidth,5),n=1-V(this.downPoint.y/this.innerHeight,5),r=1-V(this.upPoint.y/this.innerHeight,5);this.xRange={start:ie(e,t),end:q(e,t)},this.yRange={start:ie(n,r),end:q(n,r)}},Object.defineProperty(i.prototype,"behavior",{get:function(){return this.getPropertyValue("behavior")},set:function(e){this.setPropertyValue("behavior",e,!0),this._usesSelection=!1,e.indexOf("zoom")!=-1&&(this._generalBehavior="zoom",this._usesSelection=!0),e.indexOf("select")!=-1&&(this._generalBehavior="select",this._usesSelection=!0),e.indexOf("pan")!=-1&&(this._generalBehavior="pan",this._usesSelection=!1)},enumerable:!0,configurable:!0}),i.prototype.shouldPreventGestures=function(e){return!(this.interactions.isTouchProtected&&e||this.behavior=="none")},Object.defineProperty(i.prototype,"fullWidthLineX",{get:function(){return this.getPropertyValue("fullWidthLineX")},set:function(e){this.setPropertyValue("fullWidthLineX",e),e||this.updateSize()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fullWidthLineY",{get:function(){return this.getPropertyValue("fullWidthLineY")},set:function(e){this.setPropertyValue("fullWidthLineY",e),e||this.updateSize()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hideSeriesTooltipsOnSelection",{get:function(){return this.getPropertyValue("hideSeriesTooltipsOnSelection")},set:function(e){this.setPropertyValue("hideSeriesTooltipsOnSelection",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxTooltipDistance",{get:function(){return this.getPropertyValue("maxTooltipDistance")},set:function(e){this.setPropertyValue("maxTooltipDistance",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxPanOut",{get:function(){return this.getPropertyValue("maxPanOut")},set:function(e){this.setPropertyValue("maxPanOut",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"xAxis",{get:function(){return this._xAxis.get()},set:function(e){var t=this;this._xAxis.get()!=e&&this._xAxis.set(e,new _e([e.tooltip.events.on("positionchanged",this.handleXTooltipPosition,this,!1),e.events.on("rangechangestarted",function(n){t.hide(0),t.preventShow=!0},void 0,!1),e.events.on("rangechangeended",function(n){t.preventShow=!1,t.hide(0),t.dispatch("cursorpositionchanged")},void 0,!1)]))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"yAxis",{get:function(){return this._yAxis.get()},set:function(e){var t=this;this._yAxis.get()!=e&&this._yAxis.set(e,new _e([e.tooltip.events.on("positionchanged",this.handleYTooltipPosition,this,!1),e.events.on("rangechangestarted",function(n){t.hide(0),t.__disabled=!0},void 0,!1),e.events.on("rangechangeended",function(n){t.__disabled=!1,t.hide(0),t.dispatch("cursorpositionchanged")},void 0,!1)]))},enumerable:!0,configurable:!0}),i.prototype.handleXTooltipPosition=function(e){var t=this.xAxis.tooltip,n=at({x:t.pixelX,y:t.pixelY},this),r=n.x;if(n.y=1,this.lineX&&(this.lineX.x=r,this.fitsToBounds(n)||this.hide()),this.xAxis&&this.fullWidthLineX){var a=this.xAxis.currentItemStartPoint,o=this.xAxis.currentItemEndPoint;if(a&&o){this.lineX.x=r;var l=o.x-a.x;this.lineX.path=Xr(l,this.innerHeight,-l/2)}}},i.prototype.handleYTooltipPosition=function(e){var t=this.yAxis.tooltip,n=at({x:t.pixelX,y:t.pixelY},this),r=n.y;if(n.x=1,this.lineY&&(this.lineY.y=r,this.fitsToBounds(n)||this.hide()),this.yAxis&&this.fullWidthLineY){var a=this.yAxis.currentItemStartPoint,o=this.yAxis.currentItemEndPoint;if(a&&o){this.lineY.y=r;var l=o.y-a.y;this.lineY.path=Xr(this.innerWidth,l,0,-l/2)}}},Object.defineProperty(i.prototype,"lineX",{get:function(){return this._lineX.get()},set:function(e){e?(e.setElement(this.paper.add("path")),this._lineX.set(e,e.events.on("positionchanged",this.updateSelection,this,!1)),e.interactionsEnabled=!1,e.parent=this):this._lineX.reset()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"lineY",{get:function(){return this._lineY.get()},set:function(e){e?(e.setElement(this.paper.add("path")),this._lineY.set(e,e.events.on("positionchanged",this.updateSelection,this,!1)),e.parent=this,e.interactionsEnabled=!1):this._lineY.reset()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selection",{get:function(){return this._selection},set:function(e){this._selection=e,e&&(e.element=this.paper.add("path"),e.parent=this)},enumerable:!0,configurable:!0}),i.prototype.processConfig=function(e){var t=this;if(e&&(v(e.xAxis)&&J(e.xAxis)&&(this.map.hasKey(e.xAxis)?e.xAxis=this.map.getKey(e.xAxis):(this.processingErrors.push('[XYCursor] No axis with id "'+e.xAxis+'" found for `xAxis`'),delete e.xAxis)),v(e.yAxis)&&J(e.yAxis)&&(this.map.hasKey(e.yAxis)?e.yAxis=this.map.getKey(e.yAxis):(this.processingErrors.push('[XYCursor] No axis with id "'+e.yAxis+'" found for `yAxis`'),delete e.yAxis)),v(e.snapToSeries))){var n=Ae(e.snapToSeries)?e.snapToSeries:[e.snapToSeries],r=!1;j(n,function(a,o){J(a)&&(t.map.hasKey(a)?n[o]=t.map.getKey(a):(t.processingErrors.push('[XYCursor] No series with id "'+a+'" found for `series`'),r=!0))}),r?delete e.snapToSeries:e.snapToSeries=n}s.prototype.processConfig.call(this,e)},Object.defineProperty(i.prototype,"snapToSeries",{get:function(){return this.getPropertyValue("snapToSeries")},set:function(e){var t=this;this.setPropertyValue("snapToSeries",e)&&(e instanceof oi&&(e=[e]),this._snapToDisposers&&j(this._snapToDisposers,function(n){n.dispose()}),this._snapToDisposers=[],e&&j(e,function(n){t._snapToDisposers.push(n.events.on("tooltipshownat",function(){t.handleSnap(n)},void 0,!1))}))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"snapOnPan",{get:function(){return this.getPropertyValue("snapOnPan")},set:function(e){this.setPropertyValue("snapOnPan",e)},enumerable:!0,configurable:!0}),i.prototype.handleSnap=function(e){if(!this.downPoint){var t=e.getTooltipX()+e.xAxis.pixelX,n=e.getTooltipY()+e.yAxis.pixelY,r=e.xAxis,a=e.yAxis;r&&r.renderer.opposite&&(n-=this.pixelHeight),this.point={x:t,y:n},this.getPositions();var o=t,l=n;t-=this.pixelWidth,a&&a.renderer.opposite&&(t+=this.pixelWidth);var h=e.tooltip,p=h.animationDuration,u=h.animationEasing;r instanceof ee&&!(r instanceof Pe)&&a instanceof ee&&!(a instanceof Pe)?(e.yAxis.showTooltipAtPosition(this.yPosition),e.xAxis.showTooltipAtPosition(this.xPosition)):(e.baseAxis==e.xAxis&&e.yAxis.showTooltipAtPosition(this.yPosition),e.baseAxis==e.yAxis&&e.xAxis.showTooltipAtPosition(this.xPosition)),this.lineY.x=t,this.lineX.y=n,this.xAxis||this.lineX.animate([{property:"x",to:o}],p,u),this.yAxis||this.lineY.animate([{property:"y",to:l}],p,u)}},i.prototype.dispose=function(){this.hide(0),s.prototype.dispose.call(this)},i}(Ko);_.registeredClasses.XYCursor=Zo;var du=function(s){function i(){var e=s.call(this)||this;return e.className="RadarCursor",e.radius=F(100),e.innerRadius=F(0),e.applyTheme(),e.mask=void 0,e}return w(i,s),i.prototype.fitsToBounds=function(e){var t=oe(e);return t<this.truePixelRadius+1&&t>this.pixelInnerRadius-1},Object.defineProperty(i.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(e){this.setPropertyValue("startAngle",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(e){this.setPropertyValue("endAngle",e,!0)},enumerable:!0,configurable:!0}),i.prototype.triggerMoveReal=function(e,t){this.xAxis&&(!this.xAxis||this.xAxis.cursorTooltipEnabled&&!this.xAxis.tooltip.disabled)||this.updateLineX(this.point),this.yAxis&&(!this.yAxis||this.yAxis.cursorTooltipEnabled&&!this.yAxis.tooltip.disabled)||this.updateLineY(this.point),this.updateSelection(),s.prototype.triggerMoveReal.call(this,e,t)},i.prototype.updateLineX=function(e){var t=this.pixelRadius,n=this.startAngle,r=this.endAngle,a=this.pixelInnerRadius;if(t>0&&y(n)&&y(r)&&y(a)){var o=bt(Ee(e),n,r),l=void 0;if(this.lineX&&this.lineX.visible){if(this.lineX.moveTo({x:0,y:0}),this.xAxis&&this.fullWidthLineX){var h=this.xAxis.currentItemStartPoint,p=this.xAxis.currentItemEndPoint;if(h&&p){var u=bt(Ee(h),n,r),d=bt(Ee(p),n,r)-u;n<r?d<0&&(d+=360):d>0&&(d-=360),l=E({x:a*L(o-=d/2),y:a*M(o)})+T({x:t*L(o),y:t*M(o)})+Le(o,d,t)+T({x:a*L(o+d),y:a*M(o+d)})+Le(o+d,-d,a)}}l||(l=E({x:a*L(o),y:a*M(o)})+T({x:t*L(o),y:t*M(o)})),this.lineX.path=l}}},i.prototype.updateLineY=function(e){if(this.lineY&&this.lineY.visible){var t=this.startAngle,n=this.endAngle,r=this.truePixelRadius,a=R(oe(e),0,this.truePixelRadius);if(y(a)&&y(t)){this.lineY.moveTo({x:0,y:0});var o=void 0,l=n-t;if(this.yAxis&&this.fullWidthLineY){var h=this.yAxis.currentItemStartPoint,p=this.yAxis.currentItemEndPoint;if(h&&p){var u=R(oe(h),0,r);o=E({x:(a=R(oe(p),0,r))*L(t),y:a*M(t)})+Le(t,l,a),o+=E({x:u*L(n),y:u*M(n)})+Le(n,-l,u)}}o||(o=E({x:a*L(t),y:a*M(t)})+Le(t,n-t,a)),this.lineY.path=o}}},i.prototype.updateSelection=function(){if(this._usesSelection){var e=this.downPoint;if(e){var t=this.point,n=this.pixelRadius,r=this.truePixelRadius,a=this.pixelInnerRadius,o=Math.min(this.startAngle,this.endAngle),l=Math.max(this.startAngle,this.endAngle),h=bt(Ee(e),o,l),p=bt(Ee(t),o,l),u=oe(e);if(u<r){var d=R(oe(t),0,r);this._prevAngle=p;var c=E({x:0,y:0}),f=M(h),g=L(h),m=M(p),x=L(p),b=this.behavior;b=="zoomX"||b=="selectX"?c+=T({x:n*g,y:n*f})+Le(h,p-h,n)+T({x:a*x,y:a*m})+Le(p,h-p,a):b=="zoomY"||b=="selectY"?c=E({x:d*L(o),y:d*M(o)})+Le(o,l-o,d)+T({x:u*L(l),y:u*M(l)})+Le(l,o-l,u)+" Z":b=="zoomXY"&&(c=E({x:d*L(h),y:d*M(h)})+Le(h,p-h,d)+T({x:u*L(p),y:u*M(p)})+Le(p,h-p,u)+" Z"),this.selection.path=c}this.selection.moveTo({x:0,y:0})}}},i.prototype.getPositions=function(){if(this.chart){var e=this.pixelInnerRadius,t=this.truePixelRadius-e,n=this.startAngle,r=this.endAngle,a=(bt(Ee(this.point),n,r)-n)/(r-n);this.xPosition=a,this.yPosition=R((oe(this.point)-e)/t,0,1)}},i.prototype.updatePoint=function(e){},i.prototype.handleXTooltipPosition=function(e){if(this.xAxis.cursorTooltipEnabled){var t=this.xAxis.tooltip;this.updateLineX(at({x:t.pixelX,y:t.pixelY},this))}},i.prototype.handleYTooltipPosition=function(e){if(this.yAxis.cursorTooltipEnabled){var t=this.yAxis.tooltip;this.updateLineY(at({x:t.pixelX,y:t.pixelY},this))}},i.prototype.updateLinePositions=function(e){},i.prototype.getRanges=function(){var e=this.downPoint;if(e){var t=this.upPoint;if(this.chart){var n=this.pixelRadius,r=this.startAngle,a=this.endAngle,o=bt(Ee(e),this.startAngle,this.endAngle),l=bt(Ee(t),this.startAngle,this.endAngle),h=R(oe(e),0,n),p=R(oe(t),0,n),u=0,d=1,c=0,f=1,g=this.behavior;if(g=="zoomX"||g=="selectX"||g=="zoomXY"||g=="selectXY"){var m=a-r;u=V((o-r)/m,5),d=V((l-r)/m,5)}g!="zoomY"&&g!="selectY"&&g!="zoomXY"&&g!="selectXY"||(c=V(h/n,5),f=V(p/n,5)),this.xRange={start:Math.min(u,d),end:Math.max(u,d)},this.yRange={start:Math.min(c,f),end:Math.max(c,f)},this.behavior=="selectX"||this.behavior=="selectY"||this.behavior=="selectXY"||this.selection.hide()}}},i.prototype.updateSize=function(){},Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!1,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelRadius",{get:function(){return Re(this.radius,this.truePixelRadius)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"truePixelRadius",{get:function(){return xe(F(100),ie(this.innerWidth/2,this.innerHeight/2))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!1,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelInnerRadius",{get:function(){var e=this.innerRadius;return e instanceof te&&(e=F(100*e.value*this.chart.innerRadiusModifyer)),Re(e,this.truePixelRadius)||0},enumerable:!0,configurable:!0}),i.prototype.fixPoint=function(e){return e},i}(Zo);_.registeredClasses.RadarCursor=du;const Td=function(s){Ye(s,"SpriteState")&&(s.transitionDuration=400),Ye(s,"Component")&&(s.rangeChangeDuration=500,s.interpolationDuration=500,s.sequencedInterpolation=!1,Ye(s,"SankeyDiagram")&&(s.sequencedInterpolation=!0),Ye(s,"FunnelSeries")&&(s.sequencedInterpolation=!0)),Ye(s,"Chart")&&(s.defaultState.transitionDuration=2e3,s.hiddenState.transitionDuration=1e3),Ye(s,"Tooltip")&&(s.animationDuration=400,s.defaultState.transitionDuration=400,s.hiddenState.transitionDuration=400),Ye(s,"Scrollbar")&&(s.animationDuration=500),Ye(s,"Series")&&(s.defaultState.transitionDuration=1e3,s.hiddenState.transitionDuration=700,s.hiddenState.properties.opacity=1,s.showOnInit=!0),Ye(s,"MapSeries")&&(s.hiddenState.properties.opacity=0),Ye(s,"PercentSeries")&&(s.hiddenState.properties.opacity=0),Ye(s,"FunnelSlice")&&(s.defaultState.transitionDuration=800,s.hiddenState.transitionDuration=1e3,s.hiddenState.properties.opacity=1),Ye(s,"Slice")&&(s.defaultState.transitionDuration=700,s.hiddenState.transitionDuration=1e3,s.hiddenState.properties.opacity=1),Ye(s,"Preloader")&&(s.hiddenState.transitionDuration=2e3),Ye(s,"Column")&&(s.defaultState.transitionDuration=700,s.hiddenState.transitionDuration=1e3,s.hiddenState.properties.opacity=1),Ye(s,"Column3D")&&(s.hiddenState.properties.opacity=0)},kd=function(s){Ye(s,"InterfaceColorSet")&&(s.setFor("stroke",B("#000000")),s.setFor("fill",B("#2b2b2b")),s.setFor("primaryButton",B("#6794dc").lighten(-.2)),s.setFor("primaryButtonHover",B("#6771dc").lighten(-.2)),s.setFor("primaryButtonDown",B("#68dc75").lighten(-.2)),s.setFor("primaryButtonActive",B("#68dc75").lighten(-.2)),s.setFor("primaryButtonText",B("#FFFFFF")),s.setFor("primaryButtonStroke",B("#6794dc")),s.setFor("secondaryButton",B("#3b3b3b")),s.setFor("secondaryButtonHover",B("#3b3b3b").lighten(.1)),s.setFor("secondaryButtonDown",B("#3b3b3b").lighten(.15)),s.setFor("secondaryButtonActive",B("#3b3b3b").lighten(.15)),s.setFor("secondaryButtonText",B("#bbbbbb")),s.setFor("secondaryButtonStroke",B("#3b3b3b").lighten(-.2)),s.setFor("grid",B("#bbbbbb")),s.setFor("background",B("#000000")),s.setFor("alternativeBackground",B("#ffffff")),s.setFor("text",B("#ffffff")),s.setFor("alternativeText",B("#000000")),s.setFor("disabledBackground",B("#bbbbbb"))),Ye(s,"Scrollbar")&&(s.background.fillOpacity=.4,s.thumb.background.fillOpacity=.5)};return Z.commercialLicense=!0,ws})(),Jo.exports=fu();const Rd=jd({__proto__:null,default:Ld(Jo.exports)},[Jo.exports]);export{Rd as i};
|