@arcgis/charts-components 5.1.0-next.65 → 5.1.0-next.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/2333HQZZ.js +2 -0
- package/dist/cdn/25LAV2UI.js +2 -0
- package/dist/cdn/{SMGWUDX3.js → 2J5IWBKU.js} +1 -1
- package/dist/cdn/2NIOPMWE.js +2 -0
- package/dist/cdn/32WPXK4K.js +2 -0
- package/dist/cdn/35NR6IHU.js +2 -0
- package/dist/cdn/4BDLJPIB.js +2 -0
- package/dist/cdn/4HRFZU2C.js +2 -0
- package/dist/cdn/4NYTLY62.js +2 -0
- package/dist/cdn/{66CPF67N.js → 5KOFW5BO.js} +1 -1
- package/dist/cdn/5PSQ7OKJ.js +2 -0
- package/dist/cdn/6GURKNO2.js +2 -0
- package/dist/cdn/{GLST76GV.js → 6GVGNQYH.js} +1 -1
- package/dist/cdn/6RKNXP6N.js +2 -0
- package/dist/cdn/{X6QQ322N.js → 6TKG7ZF7.js} +1 -1
- package/dist/cdn/{6VW6XPBH.js → 75FO5HPY.js} +1 -1
- package/dist/cdn/7HGCX3PA.js +2 -0
- package/dist/cdn/7Y5FTMNT.js +2 -0
- package/dist/cdn/{4YWBOW4N.js → 7YDVVZJU.js} +1 -1
- package/dist/cdn/AALOFAWG.js +2 -0
- package/dist/cdn/AMLWVAHN.js +2 -0
- package/dist/cdn/BVK4ULHH.js +2 -0
- package/dist/cdn/BXDRHDLV.js +2 -0
- package/dist/cdn/BXNLQMSP.js +2 -0
- package/dist/cdn/{3WMOCDMO.js → CCNHG4LT.js} +1 -1
- package/dist/cdn/CUAIY5DK.js +37 -0
- package/dist/cdn/DHCFSWRJ.js +2 -0
- package/dist/cdn/ECRW3QJF.js +2 -0
- package/dist/cdn/{DHZT5P3N.js → EF4GVHB2.js} +1 -1
- package/dist/cdn/EGHVQUKF.js +2 -0
- package/dist/cdn/EP5VVTAX.js +2 -0
- package/dist/cdn/EWLMYFSA.js +2 -0
- package/dist/cdn/{QFC7M2Y2.js → FFXTYOTF.js} +1 -1
- package/dist/cdn/FOSGOEWY.js +2 -0
- package/dist/cdn/G56RB2UI.js +2 -0
- package/dist/cdn/{HR62GM42.js → GKYHQ5OF.js} +1 -1
- package/dist/cdn/GXQDCOI4.js +99 -0
- package/dist/cdn/HW42VNOU.js +2 -0
- package/dist/cdn/I54YDLFZ.js +2 -0
- package/dist/cdn/I6IYDKWG.js +2 -0
- package/dist/cdn/IN3H6ULU.js +2 -0
- package/dist/cdn/ISNJYFT7.js +2 -0
- package/dist/cdn/ITB7EYBT.js +2 -0
- package/dist/cdn/JDQ6BNXO.js +2 -0
- package/dist/cdn/JMMW4Z5P.js +2 -0
- package/dist/cdn/JTL73F75.js +2 -0
- package/dist/cdn/KOLQWSYX.js +2 -0
- package/dist/cdn/KYFOP4WA.js +2 -0
- package/dist/cdn/L2NQ6Z3Z.js +2 -0
- package/dist/cdn/LGAAHH35.js +2 -0
- package/dist/cdn/LIXBROPH.js +2 -0
- package/dist/cdn/LRQVALTM.js +2 -0
- package/dist/cdn/LT62HS4S.js +2 -0
- package/dist/cdn/MUCSVAGN.js +2 -0
- package/dist/cdn/N4IITAR7.js +2 -0
- package/dist/cdn/NEEKPRM4.js +2 -0
- package/dist/cdn/NEFPCTH3.js +2 -0
- package/dist/cdn/NVV2EBVI.js +2 -0
- package/dist/cdn/O7ZCEGVR.js +2 -0
- package/dist/cdn/{WIP3X44L.js → OPDQRTZL.js} +3 -3
- package/dist/cdn/PG36SBDU.js +2 -0
- package/dist/cdn/PGJD4Q7S.js +2 -0
- package/dist/cdn/PGVNBWSU.js +23 -0
- package/dist/cdn/PL24HKI7.js +2 -0
- package/dist/cdn/PLBPOYRN.js +2 -0
- package/dist/cdn/QEPCR5IP.js +2 -0
- package/dist/cdn/QT24FAYQ.js +2 -0
- package/dist/cdn/R6XIAIZH.js +2 -0
- package/dist/cdn/RDBNRYTF.js +2 -0
- package/dist/cdn/RQLVJM4J.js +2 -0
- package/dist/cdn/RX6QOYCR.js +2 -0
- package/dist/cdn/SNZF4LXV.js +2 -0
- package/dist/cdn/{QRNEQ6OE.js → TJA5FMLP.js} +1 -1
- package/dist/cdn/TZJGC4RS.js +2 -0
- package/dist/cdn/{IIJZ52BJ.js → VRXVXPKS.js} +1 -1
- package/dist/cdn/VWCFL5P6.js +2 -0
- package/dist/cdn/W5VC5OCC.js +2 -0
- package/dist/cdn/W6T7TNP5.js +2 -0
- package/dist/cdn/WNEW6UZS.js +2 -0
- package/dist/cdn/XFXE7IY2.js +2 -0
- package/dist/cdn/XV7GLCBP.js +2 -0
- package/dist/cdn/Y3DU5EIT.js +2 -0
- package/dist/cdn/Y3NWCVUF.js +2 -0
- package/dist/cdn/YHUBOYF5.js +2 -0
- package/dist/cdn/YNRVU2AU.js +2 -0
- package/dist/cdn/YPSEQYTV.js +2 -0
- package/dist/cdn/YQTJQ5J7.js +2 -0
- package/dist/cdn/Z4GL4EF6.js +2 -0
- package/dist/cdn/ZIXBICPN.js +2 -0
- package/dist/cdn/ZRDVJBTQ.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chart-rendering/common/data/utils/summarize-data/interfaces.d.ts +8 -0
- package/dist/chart-rendering/common/interfaces.d.ts +7 -0
- package/dist/chunks/action-bar-utils.js +22 -28
- package/dist/chunks/axis-lines-symbol.js +8 -8
- package/dist/chunks/bar-chart-model.js +19 -25
- package/dist/chunks/bar-chart-series.js +12 -18
- package/dist/chunks/box-plot-data.js +75 -81
- package/dist/chunks/box-plot-model.js +19 -19
- package/dist/chunks/chart-model.js +40 -46
- package/dist/chunks/chart-ui-utils2.js +47 -53
- package/dist/chunks/class-breaks.js +16 -16
- package/dist/chunks/combo-bar-line-chart-model.js +20 -20
- package/dist/chunks/data-labels-symbol.js +5 -5
- package/dist/chunks/data.js +53 -59
- package/dist/chunks/gauge-model.js +22 -28
- package/dist/chunks/generate-x-axis-title.js +30 -36
- package/dist/chunks/heat-chart-model.js +10 -16
- package/dist/chunks/histogram-data.js +53 -59
- package/dist/chunks/histogram-model.js +31 -31
- package/dist/chunks/index.js +608 -20565
- package/dist/chunks/index2.js +171 -678
- package/dist/chunks/index3.js +46 -181
- package/dist/chunks/interfaces.js +16443 -103
- package/dist/chunks/interfaces2.js +109 -0
- package/dist/chunks/line-chart-model.js +2 -2
- package/dist/chunks/model-setter.js +15 -21
- package/dist/chunks/model-with-guides.js +22 -28
- package/dist/chunks/model-with-tooltips.js +23 -29
- package/dist/chunks/model-with-x-guides.js +4 -4
- package/dist/chunks/model-with-y-guides.js +25 -31
- package/dist/chunks/negative-values-stacked-to-baseline.js +41 -47
- package/dist/chunks/pie-chart-data.js +33 -39
- package/dist/chunks/pie-chart-model.js +62 -68
- package/dist/chunks/radar-chart-model.js +8 -15
- package/dist/chunks/rotated-state.js +9 -15
- package/dist/chunks/scatterplot-model.js +84 -90
- package/dist/chunks/serial-chart-data.js +8178 -4195
- package/dist/chunks/serial-chart-model.js +32 -39
- package/dist/chunks/series-length.js +14 -20
- package/dist/chunks/series.js +10 -16
- package/dist/chunks/utils.js +337 -119
- package/dist/chunks/utils2.js +19 -25
- package/dist/chunks/web-component-utils.js +42 -42
- package/dist/components/arcgis-chart/customElement.js +5255 -5339
- package/dist/components/arcgis-charts-action-bar/customElement.js +2 -2
- package/dist/components/arcgis-charts-config-bar-chart/customElement.js +22 -28
- package/dist/components/arcgis-charts-config-bar-chart-data/customElement.js +4 -10
- package/dist/components/arcgis-charts-config-bar-chart-popover/customElement.js +15 -20
- package/dist/components/arcgis-charts-config-bar-chart-series/customElement.js +9 -15
- package/dist/components/arcgis-charts-config-bar-chart-series-popover/customElement.js +9 -15
- package/dist/components/arcgis-charts-config-box-plot/customElement.js +10 -16
- package/dist/components/arcgis-charts-config-box-plot-data/customElement.js +5 -11
- package/dist/components/arcgis-charts-config-box-plot-popover/customElement.js +33 -38
- package/dist/components/arcgis-charts-config-box-plot-series/customElement.js +4 -10
- package/dist/components/arcgis-charts-config-box-plot-series-popover/customElement.js +4 -10
- package/dist/components/arcgis-charts-config-chart-rename-popover/customElement.js +7 -13
- package/dist/components/arcgis-charts-config-create-flow/customElement.js +14 -20
- package/dist/components/arcgis-charts-config-font-style/customElement.js +14 -20
- package/dist/components/arcgis-charts-config-format/customElement.js +4 -10
- package/dist/components/arcgis-charts-config-format-popover/customElement.js +10 -16
- package/dist/components/arcgis-charts-config-general/customElement.js +8 -14
- package/dist/components/arcgis-charts-config-guide/customElement.js +14 -19
- package/dist/components/arcgis-charts-config-guide-popover/customElement.js +13 -19
- package/dist/components/arcgis-charts-config-guides-type-popover/customElement.js +4 -10
- package/dist/components/arcgis-charts-config-heat-chart/customElement.js +20 -26
- package/dist/components/arcgis-charts-config-heat-chart-data/customElement.js +17 -24
- package/dist/components/arcgis-charts-config-heat-chart-popover/customElement.js +15 -21
- package/dist/components/arcgis-charts-config-histogram/customElement.js +26 -32
- package/dist/components/arcgis-charts-config-histogram-data/customElement.js +26 -32
- package/dist/components/arcgis-charts-config-histogram-popover/customElement.js +5 -11
- package/dist/components/arcgis-charts-config-line-chart/customElement.js +18 -24
- package/dist/components/arcgis-charts-config-line-chart-data/customElement.js +12 -18
- package/dist/components/arcgis-charts-config-line-chart-popover/customElement.js +8 -14
- package/dist/components/arcgis-charts-config-line-chart-series/customElement.js +4 -10
- package/dist/components/arcgis-charts-config-line-chart-series-popover/customElement.js +4 -10
- package/dist/components/arcgis-charts-config-pie-chart/customElement.js +5 -11
- package/dist/components/arcgis-charts-config-pie-chart-data/customElement.js +8 -14
- package/dist/components/arcgis-charts-config-pie-chart-popover/customElement.js +18 -24
- package/dist/components/arcgis-charts-config-pie-chart-slices/customElement.js +8 -14
- package/dist/components/arcgis-charts-config-pie-chart-slices-popover/customElement.js +4 -10
- package/dist/components/arcgis-charts-config-scatter-plot/customElement.js +22 -28
- package/dist/components/arcgis-charts-config-scatter-plot-data/customElement.js +9 -15
- package/dist/components/arcgis-charts-config-scatter-plot-popover/customElement.js +5 -11
- package/dist/components/arcgis-charts-config-select-chart-type-popover/customElement.js +4 -10
- package/dist/components/arcgis-charts-config-view-charts/customElement.js +12 -19
- package/dist/components/arcgis-charts-info-modal/customElement.js +4 -10
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +421 -412
- package/dist/utils/chart-config/utils/index.d.ts +22 -1
- package/dist/utils/chart-config/validator/index.d.ts +2 -2
- package/dist/utils/data/index.d.ts +48 -1
- package/dist/utils/data/pie-chart/index.d.ts +31 -0
- package/package.json +3 -3
- package/dist/cdn/2R7GVZ2K.js +0 -2
- package/dist/cdn/3LT2GKQ2.js +0 -2
- package/dist/cdn/4D7IL776.js +0 -23
- package/dist/cdn/4TUXERAH.js +0 -2
- package/dist/cdn/53BACKKK.js +0 -2
- package/dist/cdn/5TNV7JHC.js +0 -2
- package/dist/cdn/627BGNFG.js +0 -2
- package/dist/cdn/6LOKVOKI.js +0 -2
- package/dist/cdn/6NZ5UJML.js +0 -2
- package/dist/cdn/6WJVFMRO.js +0 -2
- package/dist/cdn/7GZN67ZQ.js +0 -2
- package/dist/cdn/7SSD7QVG.js +0 -2
- package/dist/cdn/7XRXZ5B3.js +0 -2
- package/dist/cdn/7Y57O4FJ.js +0 -2
- package/dist/cdn/7Y7YFJKK.js +0 -2
- package/dist/cdn/7YXQ6TZT.js +0 -2
- package/dist/cdn/A642VLJ3.js +0 -2
- package/dist/cdn/AVCKTWRB.js +0 -2
- package/dist/cdn/BCEUGCIB.js +0 -2
- package/dist/cdn/BP7HN7YH.js +0 -2
- package/dist/cdn/BPZNMCFA.js +0 -2
- package/dist/cdn/DRLAYMR6.js +0 -2
- package/dist/cdn/DXWMRZX7.js +0 -2
- package/dist/cdn/E7ZG5PMT.js +0 -2
- package/dist/cdn/EDBE2EVF.js +0 -2
- package/dist/cdn/EDCUOXXS.js +0 -2
- package/dist/cdn/EWCL54AQ.js +0 -2
- package/dist/cdn/FKR2N42T.js +0 -2
- package/dist/cdn/GT2GE37X.js +0 -2
- package/dist/cdn/HHMRHLFD.js +0 -2
- package/dist/cdn/HMYIPN7X.js +0 -2
- package/dist/cdn/HQZDYYW6.js +0 -2
- package/dist/cdn/HZDIYXNY.js +0 -2
- package/dist/cdn/I34GLJPW.js +0 -2
- package/dist/cdn/IGRLN5QE.js +0 -2
- package/dist/cdn/IJD3YDOE.js +0 -2
- package/dist/cdn/ITF5WJUH.js +0 -2
- package/dist/cdn/J73HEYK6.js +0 -2
- package/dist/cdn/JWTEQZTD.js +0 -2
- package/dist/cdn/KDLX6TGN.js +0 -2
- package/dist/cdn/LLNUWDC5.js +0 -2
- package/dist/cdn/LZ7LNUEI.js +0 -2
- package/dist/cdn/MAZJTJ64.js +0 -2
- package/dist/cdn/MB7BDR7H.js +0 -2
- package/dist/cdn/MTTVUHUH.js +0 -2
- package/dist/cdn/MVLJJ7VZ.js +0 -2
- package/dist/cdn/N373OIOT.js +0 -2
- package/dist/cdn/N4GBOPIU.js +0 -2
- package/dist/cdn/OG3JZ3LP.js +0 -37
- package/dist/cdn/PSYU6XTK.js +0 -2
- package/dist/cdn/PVTBEXFF.js +0 -2
- package/dist/cdn/PYLJO324.js +0 -2
- package/dist/cdn/QQ6DOFHZ.js +0 -99
- package/dist/cdn/RAJWBR34.js +0 -2
- package/dist/cdn/S7COU7MH.js +0 -2
- package/dist/cdn/SYY7UU2N.js +0 -2
- package/dist/cdn/TN45YUM2.js +0 -2
- package/dist/cdn/TODWZ6FZ.js +0 -2
- package/dist/cdn/TP7767ZV.js +0 -2
- package/dist/cdn/UFJOL4MK.js +0 -2
- package/dist/cdn/ULSVHCH4.js +0 -2
- package/dist/cdn/UVFPEIK2.js +0 -2
- package/dist/cdn/V3PU5TMU.js +0 -2
- package/dist/cdn/V3VVN7ST.js +0 -2
- package/dist/cdn/V5JXE6N4.js +0 -2
- package/dist/cdn/VPOAGMYE.js +0 -2
- package/dist/cdn/VXMMIOTJ.js +0 -2
- package/dist/cdn/WL2XRSAH.js +0 -2
- package/dist/cdn/WWARKOXR.js +0 -2
- package/dist/cdn/WWGW24FD.js +0 -2
- package/dist/cdn/XUHCS2SB.js +0 -2
- package/dist/cdn/YBAPI2UV.js +0 -2
- package/dist/cdn/YJDYXU2Q.js +0 -2
- package/dist/cdn/YUZ26Q2B.js +0 -2
- package/dist/cdn/ZRDKD2U3.js +0 -2
- package/dist/cdn/ZVOSWG36.js +0 -2
- /package/dist/cdn/{FPDW4F45.js → VCUC6CMW.js} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import g from"./PGJD4Q7S.js";import f from"./L2NQ6Z3Z.js";import e from"./RDBNRYTF.js";import d from"./2NIOPMWE.js";import c from"./N4IITAR7.js";import b from"./R6XIAIZH.js";import{c as bp,d as fm,e as xp,g as Sp,i as $t,j as _t,k as Ni,l as Cp,m as mm,n as ym,p as gm}from"./YJXIGYX6.js";import a from"./GXQDCOI4.js";import{D as jl,a as Yc,d as qc,g as pa,h as or,k as wa,l as oo,t as gr,u as Nr,v as Uc,w as Rr,x as ai,y as Yi,z as ni}from"./Y7IQV44J.js";import{g as Gc}from"./3ZHL4GR5.js";import{a as eu}from"./EZM4ZDQI.js";import{a as A,b as J,c as ki,e as St,f as Ti,h as Fa,i as Un,j as Nh,k as De,l as lo,n as yi,o as ri,p as Ii,r as sn,v as gi,y as at}from"./ETLJKITO.js";import{H as Xc}from"./J66D7A5G.js";import{c as cb}from"./QPIMTXPL.js";export default $arcgis.t(([{substitute:Kt},,,,,,,,,,,,,,Ix,,wg,Mx,Fg,{sqlLiteral:Nx},{$:Wl,$a:mf,$b:as,$c:qf,A:Rh,Ac:ln,Ad:ls,Ae:Ql,B:Jc,Bb:bo,Bc:Lf,Bd:pp,Be:lm,Cc:kf,Cd:rm,Db:Uh,Dc:If,Eb:$f,Ec:ss,Ee:um,F:Qn,Fb:_f,Fc:Mf,Fe:hm,G:Bh,Gb:zl,Gd:dp,Ge:pm,H:nt,Hb:Tf,Hc:vi,Ib:Kh,Ic:Nf,Jb:Of,Jc:Rf,Ka:mo,Kb:rs,Kc:Bf,La:Jn,Lb:Sr,Lc:jf,Ld:un,Ma:hf,Mc:Ef,Me:fp,Nb:wf,Nc:Wf,Nd:si,Oa:pf,Oc:os,Od:zr,Pb:Xl,Pc:Cr,Pd:us,Pe:mp,Qb:qi,Qc:Hf,Qd:Xr,Qe:yp,R:jh,Rb:Aa,Rc:ip,Rd:Ae,Sb:Zh,Sc:zf,Sd:da,Se:Co,Tb:me,Tc:rp,Td:Yt,Te:gp,Ub:Yl,Uc:Pt,Ue:dm,Va:R,Vb:Qh,Vc:Xf,Wa:df,Wb:V,Wc:ap,Xa:cf,Xb:jr,Y:ef,Ya:Hl,Yb:ql,Yc:Je,Z:Eh,Za:ff,Zb:Jh,Zc:Yf,_:Wh,_a:zh,_c:np,a:lr,ac:ep,ad:Gf,ba:tf,bb:yf,bc:Ff,c:vr,cb:es,cc:Er,cd:Uf,d:uo,dc:kt,dd:Kf,e:ho,ed:Zf,fa:rf,fb:gf,fc:Df,ga:af,gb:xr,gd:Qf,ha:nf,hb:ts,hc:Zt,i:Kc,ib:yo,ic:Gl,j:br,jb:vf,jd:Jf,k:po,kb:Xh,l:Br,la:sf,lb:bf,mb:xf,mc:Wr,n:co,nb:on,nd:Pr,o:Da,oa:of,ob:go,od:em,pa:lf,pb:Sf,pd:sp,pe:am,qb:Yh,qd:Mi,qe:nm,r:fo,ra:uf,rb:qh,rc:tp,rd:xo,re:sm,s:Lt,sb:Gh,sd:So,t:El,td:tm,te:hs,u:Kn,ua:Hh,ub:is,uc:Af,ud:op,ue:cp,vb:Cf,vd:lp,ve:Kl,w:Zc,wb:Pf,wc:Hr,wd:im,we:Zl,x:Zn,xb:vo,xc:Vf,xe:He,y:Ct,yc:Ul,yd:up,ye:om,z:Qc,zc:ns,zd:hp,ze:ur},{a:Jl,b:vm,c:ps,d:Pp,f:Oi,g:$p,h:bm,i:_p,p:xm,t:Sm},{a:Pm},{c:iu},{a:$m,e:_m},{a:Cm,b:Tp,f:ds,g:tu,i:Op},{e:cm,f:vp}])=>{var de=(function(){function a(i){this._value=i}return Object.defineProperty(a.prototype,"value",{get:function(){return this._value/100},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"percent",{get:function(){return this._value},enumerable:!0,configurable:!0}),a.prototype.toString=function(){return""+this._value+"%"},a})();function N(a){return new de(a)}function wp(a){return a instanceof de}var Fp=function(a,i){return Fp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Fp(a,i)};function T(a,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");Fp(a,i);function e(){this.constructor=a}a.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}var Gi=function(){return Gi=Object.assign||function(i){for(var e,t=1,r=arguments.length;t<r;t++){e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n])}return i},Gi.apply(this,arguments)};function Qe(a,i,e,t){function r(n){return n instanceof e?n:new e(function(s){s(n)})}return new(e||(e=Promise))(function(n,s){function o(h){try{u(t.next(h))}catch(p){s(p)}}function l(h){try{u(t.throw(h))}catch(p){s(p)}}function u(h){h.done?n(h.value):r(h.value).then(o,l)}u((t=t.apply(a,i||[])).next())})}function Re(a,i){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},t,r,n,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=o(0),s.throw=o(1),s.return=o(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(u){return function(h){return l([u,h])}}function l(u){if(t)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(e=0)),e;)try{if(t=1,r&&(n=u[0]&2?r.return:u[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,u[1])).done)return n;switch(r=0,n&&(u=[u[0]&2,n.value]),u[0]){case 0:case 1:n=u;break;case 4:return e.label++,{value:u[1],done:!1};case 5:e.label++,r=u[1],u=[0];continue;case 7:u=e.ops.pop(),e.trys.pop();continue;default:if(n=e.trys,!(n=n.length>0&&n[n.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!n||u[1]>n[0]&&u[1]<n[3])){e.label=u[1];break}if(u[0]===6&&e.label<n[1]){e.label=n[1],n=u;break}if(n&&e.label<n[2]){e.label=n[2],e.ops.push(u);break}n[2]&&e.ops.pop(),e.trys.pop();continue}u=i.call(a,e)}catch(h){u=[6,h],r=0}finally{t=n=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function hn(a){var i=typeof Symbol=="function"&&Symbol.iterator,e=i&&a[i],t=0;if(e)return e.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&t>=a.length&&(a=void 0),{value:a&&a[t++],done:!a}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function Va(a,i){var e=typeof Symbol=="function"&&a[Symbol.iterator];if(!e)return a;var t=e.call(a),r,n=[],s;try{for(;(i===void 0||i-- >0)&&!(r=t.next()).done;)n.push(r.value)}catch(o){s={error:o}}finally{try{r&&!r.done&&(e=t.return)&&e.call(t)}finally{if(s)throw s.error}}return n}function ca(){for(var a=[],i=0;i<arguments.length;i++)a=a.concat(Va(arguments[i]));return a}function Tt(a){return Number(a)!==a}function Tm(a){return{}.toString.call(a)}function cs(a){if(typeof a=="string")return a;if(typeof a=="number")return""+a;throw new Error("Expected a string or number but got "+Tm(a))}function tt(a){return!!a}function ke(a){if(P(a)&&!S(a)){var i=Number(a);return Tt(i)&&ce(a)&&a!=""?ke(a.replace(/[^0-9.\-]+/g,"")):i}return a}function jt(a){if(P(a)&&!ce(a)){if(S(a))return cs(a);if(Be(a))return a.toString()}return a}function Om(a){return!P(a)||S(a)||wp(a)?a:ce(a)&&a.indexOf("%")!=-1?N(ke(a)):ke(a)}function P(a){return a!=null}function ze(a){if(P(a))return a;throw new Error("Value doesn't exist")}function ru(a,i){return P(a)?a:i}function La(a){return Tm(a)==="[object Date]"}function ce(a){return typeof a=="string"}function S(a){return typeof a=="number"&&Number(a)==a}function Be(a){return typeof a=="object"&&a!=null}function Xe(a){return Array.isArray(a)}var Po=Math.PI,Ap=Po/2,fs=Po/180,qr=180/Po;function nu(a,i,e){return P(a)?(a=ke(a),G(a,i,e)):a}function E(a,i,e){if(!S(i)||i<=0){var t=Math.round(a);return e&&t-a==.5&&t--,t}else{var r=Math.pow(10,i);return Math.round(a*r)/r}}function Vp(a,i){if(!S(i)||i<=0)return Math.ceil(a);var e=Math.pow(10,i);return Math.ceil(a*e)/e}function G(a,i,e){if(S(i)){if(S(e)&&e<i){var t=e;e=i,i=t}a<i&&(a=i)}return S(e)&&a>e&&(a=e),a}function X(a){return E(Math.sin(fs*a),10)}function Lp(a){return E(Math.tan(fs*a),10)}function Y(a){return E(Math.cos(fs*a),10)}function he(a,i){return S(a)?S(i)&&i>a?i:a:S(i)?i:null}function ye(a,i){return S(a)?S(i)&&i<a?i:a:S(i)?i:null}function wm(a,i){return a.reduce(function(e,t){return Math.abs(t-i)<Math.abs(e-i)?t:e})}function ms(a,i){var e=ze(a.start),t=ze(i.start),r=ze(a.end),n=ze(i.end);return Math.max(e,t)<=Math.min(r,n)}function ys(a){var i=ze(a.start),e=ze(a.end);return{start:1-e,end:1-i}}function Fm(a,i){var e=ze(a.start),t=ze(i.start),r=ze(a.end),n=ze(i.end),s=Math.max(e,t),o=Math.min(r,n);if(!(o<s))return{start:s,end:o}}function _e(a,i){return a?(i||(i={x:0,y:0}),Math.sqrt(Math.pow(Math.abs(a.x-i.x),2)+Math.pow(Math.abs(a.y-i.y),2))):0}function Dm(a,i){return a?(i||(i={x:0,y:0}),Math.abs(a.x-i.x)):0}function Am(a,i){return a?(i||(i={x:0,y:0}),Math.abs(a.y-i.y)):0}function Vm(a,i,e,t,r){if(!a)return 0;i||(i={x:0,y:0});var n=0,s=a;if(r>0)for(var o=0;o<=r;o++){var l=$o(a,i,e,t,o/r);n+=_e(s,l),s=l}return n}function Lm(a,i,e,t){var r=_e(i,t),n=_e(a,e);return Math.abs(n/r)}function pn(a,i,e){return S(e)||(e=.5),{x:a.x+(i.x-a.x)*e,y:a.y+(i.y-a.y)*e}}function ft(a,i){i||(i={x:a.x*2,y:a.y*2});var e=i.x-a.x,t=i.y-a.y,r=Math.atan2(t,e)*qr;return r<0&&(r+=360),Yr(r)}function gs(a){if(a){var i=a.length;if(i!==0){for(var e=void 0,t=void 0,r,n=void 0,s=0;s<i;s++){var o=a[s];(!S(t)||o.x>t)&&(t=o.x),(!S(e)||o.x<e)&&(e=o.x),(!S(r)||o.y<r)&&(r=o.y),(!S(n)||o.y>n)&&(n=o.y)}return{x:e,y:r,width:t-e,height:n-r}}}return{x:0,y:0,width:0,height:0}}function Gr(a){var i=a.length;if(i!==0){for(var e=void 0,t=void 0,r=void 0,n=void 0,s=0;s<i;s++){var o=a[s];e=ye(o.x,e),t=ye(o.y,t),r=he(o.x+o.width,r),n=he(o.y+o.height,n)}return{x:e,y:t,width:r-e,height:n-t}}}function kp(a,i,e,t){var r=(1-t)*(1-t)*a.x+2*(1-t)*t*e.x+t*t*i.x,n=(1-t)*(1-t)*a.y+2*(1-t)*t*e.y+t*t*i.y;return{x:r,y:n}}function $o(a,i,e,t,r){var n={x:0,y:0},s=1-r,o=s*s,l=o*s;return n.x=a.x*l+e.x*3*o*r+t.x*3*s*r*r+i.x*r*r*r,n.y=a.y*l+e.y*3*o*r+t.y*3*s*r*r+i.y*r*r*r,n}function su(a,i,e,t,r,n){return r=au(r),n=au(n),{x:(-a.x+i.x/r+e.x)*r,y:(-a.y+i.y/n+e.y)*n}}function ou(a,i,e,t,r,n){return r=au(r),n=au(n),{x:(i.x+e.x/r-t.x)*r,y:(i.y+e.y/n-t.y)*n}}function au(a){return 1-a+1e-5}function Yr(a){return a==360?360:a%360}function Ui(a,i,e){if(i>e){var t=i;i=e,e=t}a=Yr(a);var r=(i-Yr(i))/360;a<i&&(a+=360*(r+1));var n=i+(e-i)/2+180,s=i+(e-i)/2-180;return a>e&&(a-360>i?a-=360:a<n?a=e:a=i),a<i&&(a>s?a=i:a=e),a}function wi(a,i,e){var t=Number.MAX_VALUE,r=Number.MAX_VALUE,n=-Number.MAX_VALUE,s=-Number.MAX_VALUE,o=[];S(e)||(e=1),o.push(Dp(e,a)),o.push(Dp(e,i));for(var l=Math.min(Math.floor(a/90)*90,Math.floor(i/90)*90),u=Math.max(Math.ceil(a/90)*90,Math.ceil(i/90)*90),h=l;h<=u;h+=90)h>=a&&h<=i&&o.push(Dp(e,h));for(var p=0;p<o.length;p++){var d=o[p];d.x<t&&(t=d.x),d.y<r&&(r=d.y),d.x>n&&(n=d.x),d.y>s&&(s=d.y)}return{x:t,y:r,width:n-t,height:s-r}}function Dp(a,i){return{x:a*Y(i),y:a*X(i)}}function lu(a,i){return a.x>=i.x&&a.x<=i.x+i.width&&a.y>=i.y&&a.y<=i.y+i.height}function oi(a,i){for(var e=a.length,t=0;t<e;++t)if(a[t]===i)return t;return-1}function _o(a,i){for(var e=a.length,t=0;t<e;++t)if(i(a[t]))return!0;return!1}function fa(a,i){for(var e=a.length,t=new Array(e),r=0;r<e;++r)t[r]=i(a[r],r);return t}function H(a,i){for(var e=a.length,t=0;t<e;++t)i(a[t],t)}function km(a,i){for(var e=a.length;e--;)i(a[e],e)}function vs(a,i){for(var e=a.length,t=0;t<e&&i(a[t],t);++t);}function Im(a,i){for(var e=a.length,t=i;t<e;++t)a[t-i]=a[t];a.length=e-i}function Mm(a,i){for(var e=i.length,t=0;t<e;++t)a.push(i[t])}function oe(a,i){var e=!1,t=a.indexOf(i);if(t!==-1){e=!0,a.splice(t,1);for(var r=a.length;t<r;)a[t]===i?(a.splice(t,1),--r):++t}return e}function bi(a,i,e){var t=oi(a,i);t!==-1&&Ia(a,t),e==null?a.push(i):ka(a,e,i)}function dn(a,i,e){S(e)?e===0?a.unshift(i):a.splice(e,0,i):a.push(i)}function Nm(a,i,e){var t=a.indexOf(i);t!==-1&&a.splice(t,1),S(e)?a.splice(e,0,i):a.push(i)}function uu(a){return Array.isArray(a)?a:[a]}function ma(a){for(var i=a.length,e=new Array(i),t=0;t<i;++t)e[t]=a[t];return e}function ka(a,i,e){a.splice(i,0,e)}function Ia(a,i){a.splice(i,1)}function bs(a,i,e){for(var t=0,r=a.length,n=!1;t<r;){var s=t+r>>1,o=i(e,a[s]);o<0?r=s:(o===0&&(n=!0),t=s+1)}return{found:n,index:n?t-1:t}}function hu(a,i){for(var e=a.length,t=0;t<e;++t)if(i(a[t],t))return t;return-1}function Ip(a,i){for(var e=a.length,t=0;t<e;)i(a[t])?++t:(a.splice(t,1),--e)}var Ce=(function(){function a(i){this._disposed=!1,this._dispose=i}return a.prototype.isDisposed=function(){return this._disposed},a.prototype.dispose=function(){this._disposed||(this._disposed=!0,this._dispose())},a})();var Fe=(function(a){T(i,a);function i(e){return a.call(this,function(){H(e,function(t){t.dispose()})})||this}return i})(Ce);var Ue=(function(a){T(i,a);function i(){var e=a.call(this,function(){P(e._disposer)&&(e._disposer.dispose(),e._disposer=void 0)})||this;return e}return i.prototype.get=function(){return this._value},i.prototype.set=function(e,t){P(this._disposer)&&this._disposer.dispose(),this._disposer=t,this._value=e},i.prototype.reset=function(){this.set(void 0,void 0)},i})(Ce);var ya=(function(a){T(i,a);function i(){var e=a!==null&&a.apply(this,arguments)||this;return e._counter=0,e}return i.prototype.increment=function(){var e=this;return++this._counter,new Ce(function(){--e._counter,e._counter===0&&e.dispose()})},i})(Ce);var Mp=!1,pu=[],To=[],du=[],Np=[],fb=1e3/60,cu=typeof requestAnimationFrame=="function"?function(a){requestAnimationFrame(a)}:function(a){setTimeout(a,fb)};function Rm(){for(var a=Date.now(),i=pu.length,e=0;e<i;++e)pu[e](a);Im(pu,i);for(var e=0;e<To.length;++e)To[e](a);To.length=0;for(var e=0;e<du.length;++e)du[e](a);du.length=0,pu.length===0&&To.length===0?Mp=!1:cu(Rm)}function Bm(){Mp||(Mp=!0,cu(Rm))}function Rp(a){To.push(a),Bm()}function fu(a){du.push(a),Bm()}function Bp(a){Np.push(a)}function jp(){for(var a=Date.now(),i=Np.length,e=0;e<i;++e)Np.shift()(a)}var Ri=(function(){function a(){this._listeners=[],this._killed=[],this._disabled={},this._iterating=0,this._enabled=!0,this._disposed=!1}return a.prototype.isDisposed=function(){return this._disposed},a.prototype.dispose=function(){if(!this._disposed){this._disposed=!0;var i=this._listeners;this._iterating=1,this._listeners=null,this._disabled=null;try{H(i,function(e){e.disposer.dispose()})}finally{this._killed=null,this._iterating=null}}},a.prototype.hasListeners=function(){return this._listeners.length!==0},a.prototype.hasListenersByType=function(i){return _o(this._listeners,function(e){return(e.type===null||e.type===i)&&!e.killed})},a.prototype.enable=function(){this._enabled=!0},a.prototype.disable=function(){this._enabled=!1},a.prototype.enableType=function(i){delete this._disabled[i]},a.prototype.disableType=function(i,e){e===void 0&&(e=1/0),this._disabled[i]=e},a.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)},a.prototype._removeExistingListener=function(i,e,t,r){if(this._disposed)throw new Error("EventDispatcher is disposed");this._eachListener(function(n){n.once===i&&n.type===e&&(t==null||n.callback===t)&&n.context===r&&n.disposer.dispose()})},a.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},a.prototype.has=function(i,e,t){var r=hu(this._listeners,function(n){return n.once!==!0&&n.type===i&&(e==null||n.callback===e)&&n.context===t});return r!==-1},a.prototype._shouldDispatch=function(i){if(this._disposed)throw new Error("EventDispatcher is disposed");var e=this._disabled[i];return S(e)?(e<=1?delete this._disabled[i]:--this._disabled[i],!1):this._enabled},a.prototype._eachListener=function(i){var e=this;++this._iterating;try{H(this._listeners,i)}finally{--this._iterating,this._iterating===0&&this._killed.length!==0&&(H(this._killed,function(t){e._removeListener(t)}),this._killed.length=0)}},a.prototype.dispatchImmediately=function(i,e){this._shouldDispatch(i)&&this._eachListener(function(t){!t.killed&&(t.type===null||t.type===i)&&t.dispatch(i,e)})},a.prototype.dispatch=function(i,e){this._shouldDispatch(i)&&this._eachListener(function(t){!t.killed&&(t.type===null||t.type===i)&&Bp(function(){t.killed||t.dispatch(i,e)})})},a.prototype._on=function(i,e,t,r,n,s){var o=this;if(this._disposed)throw new Error("EventDispatcher is disposed");this._removeExistingListener(i,e,t,r);var l={type:e,callback:t,context:r,shouldClone:n,dispatch:s,killed:!1,once:i,disposer:new Ce(function(){l.killed=!0,o._removeListener(l)})};return this._listeners.push(l),l},a.prototype.onAll=function(i,e,t){return t===void 0&&(t=!0),this._on(!1,null,i,e,t,function(r,n){return i.call(e,r,n)}).disposer},a.prototype.on=function(i,e,t,r){return r===void 0&&(r=!0),this._on(!1,i,e,t,r,function(n,s){return e.call(t,s)}).disposer},a.prototype.once=function(i,e,t,r){r===void 0&&(r=!0);var n=this._on(!0,i,e,t,r,function(s,o){n.disposer.dispose(),e.call(t,o)});return n.disposer},a.prototype.off=function(i,e,t){this._removeExistingListener(!1,i,e,t)},a.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");H(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))})},a})();var Oo=(function(a){T(i,a);function i(e){var t=a.call(this)||this;return t.target=e,t}return 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");H(e._listeners,function(r){r.context!==e.target&&!r.killed&&r.shouldClone&&(r.type===null?t.onAll(r.callback,r.context):r.once?t.once(r.type,r.callback,r.context):t.on(r.type,r.callback,r.context))})},i})(Ri);function Em(a){return function(i){for(var e in a)if(hr(a,e)&&!i([e,a[e]]))break}}function Wm(a){var i=[];for(var e in a)hr(a,e)&&i.push(e);return i}function mb(a,i){return Wm(a).sort(i)}function hr(a,i){return{}.hasOwnProperty.call(a,i)}function Ep(a,i){for(var e in a)if(hr(a,e)&&!i(e,a[e]))break}function te(a,i){Ep(a,function(e,t){return i(e,t),!0})}function $r(a,i,e){H(mb(a,e),function(t){i(t,a[t])})}function wo(a,i){return Object.assign({},a,i)}function Hm(a){return JSON.parse(JSON.stringify(a))}function it(a,i,e){H(e,function(t){P(a[t])&&(i[t]=a[t])})}function zm(a,i,e){H(e,function(t){i[t]=a[t]})}function xs(a,i){it(a,i,Wm(a))}function Ur(a){return function(i){for(var e=a.length,t=0;t<e&&i(a[t]);++t);}}function Xm(a){var i=0;return a(function(e){return++i,!0}),i}function cn(a){var i=[];return a(function(e){return i.push(e),!0}),i}function Dt(a,i){a(i)}function I(a,i){a(function(e){return i(e),!0})}function ga(a,i){return Ur(cn(a).sort(i))}function mu(a,i){return function(e){return a(function(t){return e(i(t))})}}function Ym(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];return function(e){for(var t=!0,r=function(o){return t=e(o)},n=a.length,s=0;s<n&&(a[s](r),!!t);++s);}}function qm(a){return function(i){var e=!0,t=function(r){return e=i(r)};a(function(r){return r(t),e})}}function pr(a){return function(i){var e=0;a(function(t){return i([e++,t])})}}function Gm(a,i){var e;return a(function(t){return i(t)?(e=t,!1):!0}),e}function Ss(a,i){var e=!1;return a(function(t){return i(t)?(e=!0,!1):!0}),e}var fn=(function(){function a(i,e){this.createNewItems=!1,this.list=i,this._create=e,this.reset()}return a.prototype.reset=function(){this._listCopy=cn(this.list.iterator())},a.prototype.clear=function(){this._listCopy.length=0},a.prototype.getFirst=function(){return this.returnItem(0)},a.prototype.getLast=function(){return this.returnItem(this._listCopy.length-1)},a.prototype.find=function(i){var e=hu(this._listCopy,i);if(e!==-1){var t=this._listCopy[e];return oe(this._listCopy,t),t}else return this.getLast()},a.prototype.removeItem=function(i){return oe(this._listCopy,i)},a.prototype.returnItem=function(i){if(i>=0&&i<this._listCopy.length){var e=this._listCopy[i];return oe(this._listCopy,e),e}else if(this.createNewItems)return this._create()},a.prototype.iterator=function(){return Ur(this._listCopy)},a})();function Fo(a,i){return a===i?0:a<i?-1:1}function Wp(a,i){return new Array(i+1).join(a)}function Um(a){for(var i="",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=0;t<a;t++)i+=e.charAt(Math.floor(Math.random()*e.length));return i}var Bi=(function(a){T(i,a);function i(e){var t=this,r=e.events.on("removed",function(n){n.oldValue.dispose()},void 0,!1);return t=a.call(this,function(){r.dispose(),I(e.iterator(),function(n){var s=n[1];s.dispose()})})||this,t}return i})(Ce);var Oe=(function(){function a(){this.events=new Ri,this._dictionary={}}return a.prototype.hasKey=function(i){return hr(this._dictionary,i)},a.prototype.getKey=function(i){return this._dictionary[i]},a.prototype.insertKey=function(i,e){if(hr(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})},a.prototype.setKey=function(i,e){if(hr(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})},a.prototype.updateKey=function(i,e){if(hr(this._dictionary,i)){var t=this._dictionary[i],r=e(t);t!==r&&(this._dictionary[i]=r,this.events.isEnabled("setKey")&&this.events.dispatchImmediately("setKey",{type:"setKey",target:this,key:i,oldValue:t,newValue:r}),this.events.isEnabled("removed")&&this.events.dispatchImmediately("removed",{type:"removed",target:this,oldValue:t}))}else throw new Error("Key "+i+" doesn't exist in dictionary")},a.prototype.removeKey=function(i){if(hr(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})}},a.prototype.insertKeyIfEmpty=function(i,e){return this.hasKey(i)||this.insertKey(i,e()),this.getKey(i)},a.prototype.clear=function(){var i=this;this.events.isEnabled("removed")&&te(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})},a.prototype.copyFrom=function(i){var e=this;I(i.iterator(),function(t){e.setKey(t[0],t[1])})},a.prototype.iterator=function(){return Em(this._dictionary)},a.prototype[Symbol.iterator]=function(){var i,e,t,r;return Re(this,function(n){switch(n.label){case 0:i=[];for(e in this._dictionary)i.push(e);t=0,n.label=1;case 1:return t<i.length?(r=i[t],hr(this._dictionary,r)?[4,[r,this._dictionary[r]]]:[3,3]):[3,4];case 2:n.sent(),n.label=3;case 3:return t++,[3,1];case 4:return[2]}})},a.prototype.each=function(i){I(this.iterator(),function(e){var t=Va(e,2),r=t[0],n=t[1];return i(r,n)})},a.prototype.sortedIterator=function(){return ga(this.iterator(),function(i,e){return Fo(i[0],e[0])})},a})();var Kr=(function(a){T(i,a);function i(e){var t=a.call(this)||this;return t.template=e,t}return 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;I(e.iterator(),function(r){t.setKey(r[0],r[1].clone())})},i.prototype.create=function(e){var t=this;return this.insertKeyIfEmpty(e,function(){return t.template.clone()})},i})(Oe);var Km=(function(){function a(){this._storage=new Oe,this.ttl=1e3}return a.prototype.set=function(i,e,t,r){var n=this._storage.insertKeyIfEmpty(i,function(){return new Oe}),s={touched:new Date().getTime(),ttl:S(r)?r:this.ttl,value:t};n.setKey(e,s)},a.prototype.get=function(i,e,t){if(t===void 0&&(t=void 0),this._storage.hasKey(i)){var r=this._storage.getKey(i);if(r.hasKey(e)){var n=r.getKey(e);return n.ttl&&n.touched+n.ttl<new Date().getTime()&&(n.expired=!0),n.expired?(r.removeKey(e),t):n.value}else return t}else return t},a.prototype.clear=function(i){i?this._storage.removeKey(i):this._storage.clear()},a})();var Ma=new Km;var Zm=(function(){function a(){var i=this;this.events=new Ri,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<"u"&&(addEventListener("beforeprint",function(){H(i.baseSprites,function(e){var t=e.paper.svg;t.setAttribute("viewBox","0 0 "+t.clientWidth+" "+t.clientHeight)})}),addEventListener("afterprint",function(){H(i.baseSprites,function(e){var t=e.paper.svg;t.removeAttribute("viewBox")})}))}return a.prototype.getUniqueId=function(){var i=this._uidCount;return this._uidCount+=1,"id-"+i},Object.defineProperty(a.prototype,"map",{get:function(){return this._map||(this._map=new Oe),this._map},enumerable:!0,configurable:!0}),a.prototype.setCache=function(i,e,t){Ma.set(this.uid,i,e,t)},a.prototype.getCache=function(i,e){return e===void 0&&(e=void 0),Ma.get(this.uid,i,e)},a.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}))},a.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}))},a.prototype.getPlaceholder=function(i){return P(this._placeholders[i])?this._placeholders[i]:(this._placeholders[i]="__amcharts_"+i+"_"+Um(8)+"__",this._placeholders[i])},a.prototype.addToInvalidComponents=function(i){i.baseId?bi(this.invalidDatas[i.baseId],i):bi(this.invalidDatas.noBase,i)},a.prototype.removeFromInvalidComponents=function(i){i.baseId&&oe(this.invalidDatas[i.baseId],i),oe(this.invalidDatas.noBase,i)},a.prototype.addToInvalidSprites=function(i){i.baseId?dn(this.invalidSprites[i.baseId],i):dn(this.invalidSprites.noBase,i)},a.prototype.removeFromInvalidSprites=function(i){i.baseId&&oe(this.invalidSprites[i.baseId],i),oe(this.invalidSprites.noBase,i)},a.prototype.addToInvalidPositions=function(i){i.baseId?dn(this.invalidPositions[i.baseId],i):dn(this.invalidPositions.noBase,i)},a.prototype.removeFromInvalidPositions=function(i){i.baseId&&oe(this.invalidPositions[i.baseId],i),oe(this.invalidPositions.noBase,i)},a.prototype.addToInvalidLayouts=function(i){i.baseId?dn(this.invalidLayouts[i.baseId],i):dn(this.invalidLayouts.noBase,i)},a.prototype.removeFromInvalidLayouts=function(i){i.baseId&&oe(this.invalidLayouts[i.baseId],i),oe(this.invalidLayouts.noBase,i)},a})();var C=new Zm;function Hp(a,i){var e=C.registeredClasses[i];return e!=null&&a instanceof e}var Qm={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 Jm(a,i){var e;return Qm[a]?e=Qm[a]:a.charAt(0)==="#"?e=yb(a):a.match(/^rgba?\(/)&&(e=vb(a)),e||(e={r:0,g:0,b:0,a:1}),P(i)&&(e.a=i),e}function yb(a){var i=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;a=a.replace(i,function(t,r,n,s){return r+r+n+n+s+s});var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:gb(a)}function gb(a){var i=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])$/i;a=a.replace(i,function(t,r,n,s,o){return r+r+n+n+s+s+o+o});var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16),a:parseInt(e[4],16)/256}:void 0}function vb(a){a=a.replace(/[ ]/g,"");var i=a.match(/^rgb\(([0-9]*),([0-9]*),([0-9]*)\)/i);if(i)i.push("1");else if(i=a.match(/^rgba\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\)/i),!i)return;return{r:parseInt(i[1]),g:parseInt(i[2]),b:parseInt(i[3]),a:parseFloat(i[4])}}function ey(a){return"#"+zp(a.r.toString(16))+zp(a.g.toString(16))+zp(a.b.toString(16))}function ty(a){return P(a.a)&&a.a!==1?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":"rgb("+a.r+","+a.g+","+a.b+")"}function zp(a){return a.length==1?"0"+a:""+a}function mn(a,i,e){return e=G(e,0,1),a?i?{r:a.r+Math.round((i.r-a.r)*e),g:a.g+Math.round((i.g-a.g)*e),b:a.b+Math.round((i.b-a.b)*e),a:(a.a||1)+Math.round(((i.a||1)-(a.a||1))*e)}:a:i||a}function iy(a,i){return a&&{r:Math.max(0,Math.min(255,a.r+yu(a.r,i))),g:Math.max(0,Math.min(255,a.g+yu(a.g,i))),b:Math.max(0,Math.min(255,a.b+yu(a.b,i))),a:a.a}}function yu(a,i){var e=i>0?255-a:a;return Math.round(e*i)}function ry(a,i){if(a){var e=Math.min(Math.max(a.r,a.g,a.b),230),t=yu(e,i);return{r:Math.max(0,Math.min(255,Math.round(a.r+t))),g:Math.max(0,Math.min(255,Math.round(a.g+t))),b:Math.max(0,Math.min(255,Math.round(a.b+t))),a:a.a}}else return a}function ay(a,i){if(a==null||i==1)return a;var e=Ao(a);return e.s=i,Xp(e)}function Xp(a){var i,e,t,r=a.h,n=a.s,s=a.l;if(n==0)i=e=t=s;else{var o=function(p,d,c){return c<0&&(c+=1),c>1&&(c-=1),c<.16666666666666666?p+(d-p)*6*c:c<.5?d:c<.6666666666666666?p+(d-p)*(.6666666666666666-c)*6:p},l=s<.5?s*(1+n):s+n-s*n,u=2*s-l;i=o(u,l,r+1/3),e=o(u,l,r),t=o(u,l,r-1/3)}return{r:Math.round(i*255),g:Math.round(e*255),b:Math.round(t*255)}}function Ao(a){var i=a.r/255,e=a.g/255,t=a.b/255,r=Math.max(i,e,t),n=Math.min(i,e,t),s=0,o=0,l=(r+n)/2;if(r===n)s=o=0;else{var u=r-n;switch(o=l>.5?u/(2-r-n):u/(r+n),r){case i:s=(e-t)/u+(e<t?6:0);break;case e:s=(t-i)/u+2;break;case t:s=(i-e)/u+4;break}s/=6}return{h:s,s:o,l}}function gu(a){return(a.r*299+a.g*587+a.b*114)/1e3>=128}var be=(function(){function a(i){this._value=i}return Object.defineProperty(a.prototype,"rgb",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"hex",{get:function(){return this._value?ey(this._value):"none"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"rgba",{get:function(){return this._value?ty(this._value):"none"},enumerable:!0,configurable:!0}),Object.defineProperty(a.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(a.prototype,"lightColor",{get:function(){return this._lightColor||(this._lightColor=new a({r:255,g:255,b:255})),this._lightColor},set:function(i){this._lightColor=i},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"darkColor",{get:function(){return this._darkColor||(this._darkColor=new a({r:0,g:0,b:0})),this._darkColor},set:function(i){this._darkColor=i},enumerable:!0,configurable:!0}),a.prototype.toString=function(){return this.alpha<1?this.rgba:this.hex},a.prototype.lighten=function(i){return new a(iy(this.rgb,i))},a.prototype.brighten=function(i){return new a(ry(this.rgb,i))},a.prototype.saturate=function(i){return new a(ay(this.rgb,i))},Object.defineProperty(a.prototype,"alternative",{get:function(){if(this.rgb!=null)return gu(this.rgb)?this.darkColor:this.lightColor;throw new Error("Color does not exist")},enumerable:!0,configurable:!0}),a})();function ie(a,i){if(!P(a))return new be(void 0);if(typeof a=="string"){var e="_color_"+a+"_"+(i||"1"),t=C.getCache(e);if(t)return new be({r:t.r,g:t.g,b:t.b,a:t.a});var r=Jm(a,i);return C.setCache(e,r),new be(r)}return a instanceof be?(P(i)&&(a.alpha=i),a):new be(a)}function ny(a){return a instanceof be}function sy(a){return ie(a)}function pi(a){return P(a)&&!ny(a)?sy(a):a}var ge={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};var Yp=(function(){function a(i,e,t){this._array=i,this._start=e,this._end=t}return a.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(var t=i._start-1;t>=i._end&&e(i._array[t]);--t);}},a.prototype.backwards=function(){return new a(this._array,this._end,this._start)},a.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 a(this._array,i,e)}else{var t=e-i;return i=Math.max(this._start-i,this._end),e=Math.max(i-t,this._end),new a(this._array,i,e)}}else throw new Error("Start index must be lower than end index")},a})();var bb=(function(a){T(i,a);function i(e,t,r){var n=a.call(this,[e.events.on("inserted",function(s){var o=s.newValue,l=n._getKey(o),u=0;Dt(e.iterator(),function(h){return h===o?!1:(n._getKey(h)===l&&++u,!0)}),n._insert(o,l,u)},void 0,!1),e.events.on("removed",function(s){n._remove(s.oldValue)},void 0,!1)])||this;return n._keys=[],n._groups={},n._getKey=t,n._sort=r,I(e.iterator(),function(s){n._insert(s,t(s))}),n}return i.prototype._insert=function(e,t,r){if(this._groups[t]==null){this._groups[t]=[];var n=bs(this._keys,this._sort,t),s=n.found,o=n.index;if(s)throw new Error("Key already exists: "+t);ka(this._keys,o,t)}r==null?this._groups[t].push(e):ka(this._groups[t],r,e)},i.prototype._remove=function(e){var t=this._getKey(e),r=this._groups[t];if(r!=null&&(oe(r,e),r.length===0)){delete this._groups[t];var n=bs(this._keys,this._sort,t),s=n.found,o=n.index;if(s)Ia(this._keys,o);else throw new Error("Key doesn't exist: "+t)}},i.prototype.iterator=function(){var e=this;return qm(mu(Ur(this._keys),function(t){return Ur(e._groups[t])}))},i})(Fe);var Pe=(function(a){T(i,a);function i(e,t){t===void 0&&(t=!0);var r=this;if(t){var n=e.events.on("removed",function(s){s.oldValue.dispose()},void 0,!1);r=a.call(this,function(){n.dispose(),I(e.iterator(),function(s){s.dispose()})})||this}else r=a.call(this,function(){I(e.iterator(),function(s){s.dispose()})})||this;return r}return i})(Ce);function Vo(a,i){if(!(a>=0&&a<i))throw new Error("Index out of bounds: "+a)}var ve=(function(){function a(i){i===void 0&&(i=[]),this.events=new Ri,this._values=i}return Object.defineProperty(a.prototype,"values",{get:function(){return this._values},enumerable:!0,configurable:!0}),a.prototype.contains=function(i){return this._values.indexOf(i)!==-1},a.prototype.removeValue=function(i){for(var e=0,t=this._values.length;e<t;)this._values[e]===i?(this.removeIndex(e),--t):++e},a.prototype.indexOf=function(i){return oi(this._values,i)},Object.defineProperty(a.prototype,"length",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),a.prototype.hasIndex=function(i){return i>=0&&i<this._values.length},a.prototype.getIndex=function(i){return this._values[i]},a.prototype.setIndex=function(i,e){Vo(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},a.prototype.insertIndex=function(i,e){Vo(i,this._values.length+1),ka(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})},a.prototype._sortQuicksort=function(i,e,t){if(i<e){var r=this._sortPartition(i,e,t);this._sortQuicksort(i,r,t),this._sortQuicksort(r+1,e,t)}},a.prototype._sortPartition=function(i,e,t){for(var r=this._values,n=r[i],s=i-1,o=e+1;;){do++s;while(t(r[s],n)<0);do--o;while(t(r[o],n)>0);if(s>=o)return o;this.swap(s,o)}},a.prototype.sort=function(i){this._sortQuicksort(0,this._values.length-1,i)},a.prototype.swap=function(i,e){var t=this._values.length;if(Vo(i,t),Vo(e,t),i!==e){var r=this._values[i],n=this._values[e];this._values[i]=n,this.events.isEnabled("setIndex")&&this.events.dispatchImmediately("setIndex",{type:"setIndex",target:this,index:i,oldValue:r,newValue:n}),this._values[e]=r,this.events.isEnabled("setIndex")&&this.events.dispatchImmediately("setIndex",{type:"setIndex",target:this,index:e,oldValue:n,newValue:r})}},a.prototype.removeIndex=function(i){Vo(i,this._values.length);var e=this._values[i];return Ia(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},a.prototype.moveValue=function(i,e){var t=this.indexOf(i);if(t!==-1){var r=this._values[t];Ia(this._values,t),this.events.isEnabled("removeIndex")&&this.events.dispatchImmediately("removeIndex",{type:"removeIndex",target:this,index:t,oldValue:r})}e==null?(e=this._values.length,this._values.push(i)):ka(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})},a.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},a.prototype.unshift=function(i){this.insertIndex(0,i)},a.prototype.pushAll=function(i){var e=this;H(i,function(t){e.push(t)})},a.prototype.copyFrom=function(i){this.pushAll(i._values)},a.prototype.pop=function(){var i=this._values.length-1;return i<0?void 0:this.removeIndex(this._values.length-1)},a.prototype.shift=function(){return this._values.length?this.removeIndex(0):void 0},a.prototype.setAll=function(i){var e=this,t=ma(this._values);this._values.length=0,H(i,function(r){e._values.push(r)}),this.events.isEnabled("setAll")&&this.events.dispatchImmediately("setAll",{type:"setAll",target:this,oldArray:t,newArray:this._values}),this.events.isEnabled("removed")&&H(t,function(r){e.events.dispatchImmediately("removed",{type:"removed",target:e,oldValue:r})}),this.events.isEnabled("inserted")&&H(this._values,function(r){e.events.dispatchImmediately("inserted",{type:"inserted",target:e,newValue:r})})},a.prototype.clear=function(){this.setAll([])},a.prototype.iterator=function(){return Ur(this._values)},a.prototype[Symbol.iterator]=function(){var i,e;return Re(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]}})},a.prototype.each=function(i){H(this._values,i)},a.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 Yp(this._values,i,e)}else throw new Error("Start index must be lower than end index")},a.prototype.backwards=function(){return new Yp(this._values,this._values.length,0)},a})();var Le=(function(a){T(i,a);function i(e){var t=a.call(this)||this;return t.template=e,t}return 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;I(e.iterator(),function(r){t.push(r.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,r=t.length,n=0;n<r;++n)e.push(t[n].clone());return e},i})(ve);var qp=(function(){function a(i){this._values=[],this.events=new Ri,i!=null&&this.setAll(i)}return Object.defineProperty(a.prototype,"values",{get:function(){return this._values},enumerable:!0,configurable:!0}),a.prototype._insert=function(i){return this._values.push(i),this._values.length-1},Object.defineProperty(a.prototype,"length",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),a.prototype.indexOf=function(i){return oi(this._values,i)},a.prototype.contains=function(i){return this.indexOf(i)!==-1},a.prototype.getIndex=function(i){return this._values[i]},Object.defineProperty(a.prototype,"first",{get:function(){return this._values[0]},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"last",{get:function(){return this._values[this._values.length-1]},enumerable:!0,configurable:!0}),a.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})},a.prototype.remove=function(i){var e=this.indexOf(i);if(e!==-1){var t=this._values[e];Ia(this._values,e),this.events.isEnabled("removed")&&this.events.dispatchImmediately("removed",{type:"removed",target:this,index:e,oldValue:t})}},a.prototype.setAll=function(i){var e=this;km(this._values,function(t,r){e._values.pop(),e.events.isEnabled("removed")&&e.events.dispatchImmediately("removed",{type:"removed",target:e,index:r,oldValue:t})}),H(i,function(t){e.insert(t)})},a.prototype.clear=function(){this.setAll([])},a.prototype.slice=function(i,e){var t=new a;return t._values=this._values.slice(i,e),t},a.prototype.findClosestIndex=function(i,e,t){t===void 0&&(t="any");var r=-1,n,s,o=0;return Dt(this.iterator(),function(l){var u=e(l);if(t==="any"){if(u===i)return r=o,!1;var h=Math.abs(i-u);(!P(s)||s>h)&&(r=o,n=u,s=h)}else t==="left"&&u<i?(!P(n)||n<u)&&(r=o,n=u):t==="right"&&u>=i&&(!P(n)||n>=u)&&(r=o,n=u);return++o,!0}),r===-1&&(t==="left"?r=0:t==="right"&&(r=this.length-1)),r},a.prototype.iterator=function(){return Ur(this._values)},a.prototype[Symbol.iterator]=function(){var i,e;return Re(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]}})},a.prototype.each=function(i){H(this._values,i)},a})();var Lo=(function(a){T(i,a);function i(e){var t=a.call(this)||this;return t._ordering=e,t}return i.prototype._insert=function(e){var t=bs(this._values,this._ordering,e).index;return ka(this._values,t,e),t},i.prototype.indexOf=function(e){var t=bs(this._values,this._ordering,e),r=t.found,n=t.index;return r?n:-1},i.prototype.update=function(e){var t=oi(this._values,e);if(t!==-1){var r=this._values.length-1;(t===0||this._ordering(this._values[t-1],e)<0)&&(t===r||this._ordering(e,this._values[t+1])<0)||(Ia(this._values,t),this._insert(e))}},i})(qp);var Na=(function(a){T(i,a);function i(e){var t=a.call(this)||this;return t.template=e,t}return 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;I(e.iterator(),function(r){t.insert(r.clone())})},i.prototype.slice=function(e,t){var r=new i(this.template);return r._values=this._values.slice(e,t),r},i.prototype.create=function(e){var t=e!=null?new e:this.template.clone();return this.insert(t),t},i})(qp);var ko=(function(a){T(i,a);function i(e,t){var r=a.call(this,t)||this;return r.template=e,r}return 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;I(e.iterator(),function(r){t.insert(r.clone())})},i.prototype.create=function(e){var t=e!=null?new e:this.template.clone();return this.insert(t),t},i})(Lo);function Fi(a,i){return a===i?0:a<i?-1:1}function $s(a){switch(a){case 0:return 0;case-1:return 1;case 1:return-1}}function vu(a,i){return a===0?i:a}var oy=(function(){function a(){this._callbackId=0,this._callbacks=new Lo(function(i,e){return vu(Fi(i.priority,e.priority),Fi(i.id,e.id))})}return a.prototype.addAll=function(i,e,t,r,n){r===void 0&&(r=0),this._callbacks.insert({id:++this._callbackId,key:e,callback:t,priority:r,scope:n,type:i})},a.prototype.isEnabled=function(i,e){return _o(this._callbacks.values,function(t){return t.key===e&&i instanceof t.type})},a.prototype.applyAll=function(i,e,t){var r=this._callbacks.values,n=r.length;if(n==0)return t;for(var s=0;s<n;++s){var o=r[s];o.key===e&&i instanceof o.type&&(t=o.callback.call(o.scope,t,i,e))}return t},a})();var Io=new oy,gt=(function(){function a(i){this._callbackId=0,this._callbacks=new Lo(function(e,t){return vu(Fi(e.priority,t.priority),Fi(e.id,t.id))}),this._disabled={},this.object=i,this.events=this._callbacks.events}return a.prototype.add=function(i,e,t,r){t===void 0&&(t=0),this._callbacks.insert({id:++this._callbackId,key:i,callback:e,priority:t,scope:r})},a.prototype.has=function(i,e,t,r){return t===void 0&&(t=0),Ss(this._callbacks.iterator(),function(n){return n.key===i&&n.callback===e&&n.priority===t&&n.scope===r})},a.prototype.remove=function(i,e){var t=this;H(cn(this._callbacks.iterator()),function(r){r.key===i&&(!S(e)||e===r.priority)&&t._callbacks.remove(r)})},a.prototype.enableKey=function(i){delete this._disabled[i]},a.prototype.disableKey=function(i,e){e===void 0&&(e=1/0),this._disabled[i]=e},a.prototype._hasListenersByType=function(i){return _o(this._callbacks.values,function(e){return e.key===i})},a.prototype.isEnabled=function(i){return this._disabled[i]==null&&(this._hasListenersByType(i)||Io.isEnabled(this.object,i))},a.prototype._shouldDispatch=function(i){var e=this._disabled[i];return S(e)?(e<=1?delete this._disabled[i]:--this._disabled[i],!1):!0},a.prototype.apply=function(i,e){if(this._shouldDispatch(i)){var t=this._callbacks.values,r=t.length;if(r>0)for(var n=0;n<r;++n){var s=t[n];s.key===i&&(e=s.callback.call(s.scope,e,this.object,i))}return e=Io.applyAll(this.object,i,e),e}else return e},a.prototype.keys=function(){return cn(mu(this._callbacks.iterator(),function(i){return i.key}))},a.prototype.copyFrom=function(i){var e=this;I(i._callbacks.iterator(),function(t){e.add(t.key,t.callback,t.priority,t.scope)}),te(i._disabled,function(t,r){e._disabled[t]=r})},a.prototype.clear=function(){this._callbacks.clear()},a})();var st=(function(){function a(){this._disposed=!1,this._disposers=[],this.className="BaseObject"}return a.prototype.debug=function(){},Object.defineProperty(a.prototype,"uid",{get:function(){return this._uid||(this._uid=C.getUniqueId(),C.map.setKey(this._uid,this)),this._uid},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"id",{get:function(){return this._id},set:function(i){this._id=i},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"map",{get:function(){return this._map||(this._map=new Oe),this._map},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"delayedMap",{get:function(){return this._delayedMap||(this._delayedMap=new Oe),this._delayedMap},enumerable:!0,configurable:!0}),a.prototype.addDelayedMap=function(i,e){var t=this.delayedMap;t.hasKey(e)||t.setKey(e,[]);var r=t.getKey(e);r.push({property:i,target:this})},a.prototype.processDelayedMap=function(){var i=this;this.delayedMap.each(function(e,t){if(i.map.hasKey(e)){var r=i.map.getKey(e);H(t,function(n){n.target[n.property]=r}),i.delayedMap.removeKey(e)}})},a.prototype.applyTheme=function(){var i=this;if(C){var e=this.getCurrentThemes();e&&H(e,function(t,r){t(i)})}},Object.defineProperty(a.prototype,"themes",{get:function(){return this._themes},set:function(i){this._themes=i},enumerable:!0,configurable:!0}),a.prototype.getCurrentThemes=function(){return this.themes||C.themes},a.prototype.isDisposed=function(){return this._disposed},a.prototype.dispose=function(){if(!this._disposed){this._disposed=!0;var i=this._disposers;for(this._disposers=null;i.length!==0;){var e=i.shift();e.dispose()}this.clearCache(),this.clonedFrom&&this.clonedFrom.clones.removeValue(this);var t=this._uid;t!=null&&C.map.removeKey(t)}},a.prototype.addDisposer=function(i){this._disposers.push(i)},a.prototype.removeDispose=function(i){if(!this._disposed){var e=oi(this._disposers,i);e>-1&&this._disposers.splice(e,1)}i.dispose()},a.prototype.clone=function(i){i||(i="clone-"+C.getUniqueId());var e=new this.constructor;return e.cloneId=i,e.copyFrom(this),e},Object.defineProperty(a.prototype,"clones",{get:function(){return this._clones||(this._clones=new ve),this._clones},enumerable:!0,configurable:!0}),a.prototype.copyFrom=function(i){i.clones.push(this),this.clonedFrom=i},Object.defineProperty(a.prototype,"className",{get:function(){return this._className},set:function(i){this._className=i},enumerable:!0,configurable:!0}),a.prototype.setCache=function(i,e,t){Ma.set(this.uid,i,e,t)},a.prototype.getCache=function(i,e){return e===void 0&&(e=void 0),Ma.get(this.uid,i,e)},a.prototype.clearCache=function(){Ma.clear(this.uid)},a.prototype.setTimeout=function(i,e){var t=this,r=setTimeout(function(){t.removeDispose(n),i()},e),n=new Ce(function(){clearTimeout(r)});return this._disposers.push(n),n},a.prototype.setInterval=function(i,e){var t=this,r=setInterval(function(){t.removeDispose(n),i()},e),n=new Ce(function(){clearTimeout(r)});return this._disposers.push(n),n},Object.defineProperty(a.prototype,"config",{set:function(i){try{this.processConfig(i)}catch(e){this.raiseCriticalError(e)}},enumerable:!0,configurable:!0}),a.prototype.processConfig=function(i){var e=this;if(i){var t=this;if($r(i,function(n,s){var o=s;if(n=="callback"&&typeof s=="function"&&s.call(t),e.hasProperty(n)){var l;if(Be(o)&&P(o.type)&&(!Be(t[n])||!P(t[n].className)||o.forceCreate||t[n].className!=o.type)&&!e.asIs(n)?(l=e.createClassInstance(o.type),l?t[n]=l:l=t[n]):l=t[n],l instanceof gt)e.processAdapters(l,o);else if(l instanceof Ri)e.processEvents(l,o);else if(n=="locale"&&ce(o))window["am4lang_"+o]&&(t[n]=window["am4lang_"+o]);else if(n=="parent"&&ce(o)){var u=e.map.getKey(o);u?t[n]=u:e.addDelayedMap("parent",o)}else if(e.asIs(n))t[n]=o;else if(e.asFunction(n)&&ce(o))if(P(C.registeredClasses[o]))t[n]=C.registeredClasses[o];else throw Error("Invalid easing function: "+o);else if(o instanceof a)t[n]=o;else if(l instanceof a)l.config=o;else if(l instanceof Le||l instanceof Na||l instanceof ko){if(Xe(o))l instanceof Le?e.processListTemplate(o,l):e.processOrderedTemplate(o,l);else if(Be(o))if(o instanceof a)l.template=o;else{var h=void 0;P(o.template)?h=o.template:h=o,l.template instanceof a?l.template.config=h:te(h,function(p,d){var c=l.template[p];c instanceof gt?e.processAdapters(c,d):c instanceof Ri?e.processEvents(c,d):c instanceof Kr?e.processDictionaryTemplate(c,d):l.template[p]instanceof a?l.template[p].config=d:Be(d)&&P(d.type)?(c=e.createClassInstance(d.type),c?(c instanceof a&&(c.config=d),l.template[p]=c):l.template[p]=d):c instanceof ve?e.processList(d,c):l.template[p]=e.maybeColorOrPercent(d)}),P(o.values)&&(l instanceof Le?e.processListTemplate(o.values,l):e.processOrderedTemplate(o.values,l))}}else l instanceof ve?n=="children"?e.processList(o,l,e):e.processList(o,l):l instanceof Kr?e.processDictionaryTemplate(l,o):l instanceof Oe?e.processDictionary(l,o):l instanceof be||l instanceof de?t[n]=e.maybeColorOrPercent(o):Be(l)&&Be(o)?xs(o,l):(o=e.maybeColorOrPercent(o),t[n]=o)}else e.isReserved(n)||(t[n]=o)},this.configOrder),this.processingErrors.length){var r=this.processingErrors.join(`
|
|
3
|
+
`);throw this._processingErrors=[],Error(r)}}},a.prototype.maybeColorOrPercent=function(i){if(ce(i)){if(i.match(/^[\-]?[0-9.]+\%$/))return N(ke(i));if(i.match(/^\#[0-9abcdef]{3,}$/i))return ie(i)}return i},a.prototype.processAdapters=function(i,e){var t=this;Xe(e)?H(e,function(r,n){i.add(r.key,r.callback,r.priority||0,t)}):Be(e)&&te(e,function(r,n){i.has(r,n)||i.add(r,n)})},a.prototype.processEvents=function(i,e){var t=this;Xe(e)?H(e,function(r,n){i.on(r.type,r.callback,t)}):Be(e)&&te(e,function(r,n){i.has(r,n)||i.on(r,n)})},a.prototype.processDictionaryTemplate=function(i,e){Be(e)&&te(e,function(t,r){var n;t=="template"?n=i.template:i.hasKey(t)?n=i.getKey(t):n=i.create(t),n instanceof a?n.config=r:Be(n)&&Be(r)?xs(r,n):n.setKey(t,r)})},a.prototype.processDictionary=function(i,e){Be(e)&&te(e,function(t,r){i.setKey(t,r)})},a.prototype.processListTemplate=function(i,e){var t=this;for(H(i,function(r,n){var s=t.getConfigEntryType(r),o;if(e.hasIndex(n)&&!r.forceCreate)o=e.getIndex(n);else if(r instanceof a){e.push(r);return}else s?o=e.create(s):o=e.create();r===o||Be(r)&&(o instanceof a?o.config=r:Be(o)&&Be(r)?xs(r,o):e.setIndex(e.indexOf(o),r))});i.length>e.length;)e.pop()},a.prototype.processOrderedTemplate=function(i,e){var t=this;H(i,function(r,n){var s=t.getConfigEntryType(r),o;s?o=e.create(s):o=e.create(),Be(r)&&(o instanceof a?o.config=r:Be(o)&&Be(r)?xs(r,o):e.insert(r))})},a.prototype.processList=function(i,e,t){var r=this;Xe(i)||(i=[i]);var n=e.length,s=0;for(H(i,function(o,l){if(Be(o)){var u=void 0;if(l<n&&!o.forceCreate)u=e.getIndex(l);else if(o instanceof a){e.push(o);return}else s++,u=r.createEntryInstance(o),t?u.parent=t:e.push(u);u instanceof a?u.config=o:Be(u)&&Be(o)&&xs(o,u)}else e.hasIndex(l)?e.setIndex(l,o):e.push(o)});!t&&i.length+s<e.length;)e.pop()},a.prototype.configOrder=function(i,e){return i==e?0:i=="language"?-1:e=="language"?1:0},a.prototype.asIs=function(i){return oi(["locale"],i)!=-1},a.prototype.asFunction=function(i){return!1},a.prototype.createClassInstance=function(i){if(P(C.registeredClasses[i]))return new C.registeredClasses[i];throw Error('Invalid type: "'+i+'".')},a.prototype.createEntryInstance=function(i){var e;return P(i.type)&&(e=this.createClassInstance(i.type)),e||i},a.prototype.getConfigEntryType=function(i){if(P(i.type)){if(P(C.registeredClasses[i.type]))return C.registeredClasses[i.type];throw Error('Invalid type: "'+i.type+'".')}},a.prototype.hasProperty=function(i){return i in this},a.prototype.isReserved=function(i){return["type","forceCreate"].indexOf(i)!==-1},Object.defineProperty(a.prototype,"processingErrors",{get:function(){return this._processingErrors||(this._processingErrors=[]),this._processingErrors},enumerable:!0,configurable:!0}),a})();var Et=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="BaseObjectEvents",e}return Object.defineProperty(i.prototype,"events",{get:function(){return this._eventDispatcher||(this._eventDispatcher=new Ri,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){a.prototype.copyFrom.call(this,e),e._eventDispatcher&&this.events.copyFrom(e._eventDispatcher)},i})(st);var $e={};cb($e,{anyToDate:()=>Ro,anyToNumber:()=>Ds,camelToDashed:()=>Pb,capitalize:()=>xn,cleanFormat:()=>Ba,copy:()=>Qp,copyProperties:()=>xi,decimalPlaces:()=>ud,documentPointToSprite:()=>Zr,documentPointToSvg:()=>_r,escapeForRgex:()=>Os,fitNumber:()=>Bo,fitNumberRelative:()=>jo,get12Hours:()=>As,getBaseURI:()=>Ra,getDayFromWeek:()=>nd,getFormat:()=>id,getMonthWeek:()=>ad,getPixelRatio:()=>Jp,getTimeZone:()=>Vs,getWeek:()=>Ts,getWeekYear:()=>sd,getYearDay:()=>Pu,height:()=>ld,isIE:()=>Qr,isNotEmpty:()=>bn,joinUrl:()=>Eo,ltrim:()=>td,numberToString:()=>rd,padString:()=>Wt,parseUrl:()=>Kp,plainText:()=>Fs,random:()=>_b,relativeRadiusToValue:()=>mt,relativeToValue:()=>Ee,reverseString:()=>xu,rtrim:()=>ed,serializeUrl:()=>Zp,softCopyProperties:()=>Sb,splitTextByCharCount:()=>Mo,spritePointToDocument:()=>Ls,spritePointToSprite:()=>It,spritePointToSvg:()=>di,spriteRectToSvg:()=>Sn,stringify:()=>Su,stripHash:()=>Up,stripTags:()=>Cu,svgPointToDocument:()=>$u,svgPointToSprite:()=>Qt,svgRectToSprite:()=>Tb,trim:()=>No,truncateWithEllipsis:()=>ws,unquote:()=>$b,used:()=>dr,valueToRelative:()=>Cb,width:()=>od});function ly(){return/apple/i.test(navigator.vendor)}function uy(){return/MSIE |Trident\//.test(navigator.userAgent)}var bu="string",yn="number",gn="date",_s="duration",qt="__\xA7\xA7\xA7__",va="__\xA7\xA7\xA7\xA7__";function dr(a){}function xi(a,i){return te(a,function(e,t){P(t)&&(i[e]=t)}),i}function Up(a){return/^[^#]*/.exec(a)[0]}function Ra(){var a="#";if(ly()){var i=document.baseURI;if(i){i=Up(i);var e=Up(location.href);i!==e&&(a=e+a)}}return a}function Sb(a,i){return te(a,function(e,t){P(t)&&!P(i[e])&&(i[e]=t)}),i}function Qp(a,i){return te(a,function(e,t){i[e]=t}),i}function bn(a){return P(a)&&a.toString()!==""}function Ee(a,i){return S(a)?a:a!=null&&S(a.value)&&S(i)?i*a.value:0}function mt(a,i,e){var t;return S(a)?(t=a,t<0&&(e?t=i+t:t=i-t)):a!=null&&S(a.value)&&(t=i*a.value),t}function Cb(a,i){return a instanceof de?a.value:a/i}function Jp(){var a=window.devicePixelRatio||1;return a}function Pb(a){return a.replace(/\W+/g,"-").replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase()}function xn(a){var i=a.split("");return i[0]=i[0].toUpperCase(),i.join("")}function Su(a){return JSON.stringify(a)}function Os(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Mo(a,i,e,t,r){if(a.length<=i)return[a];var n=[];if(e){for(var s=-1,o=a.replace(/([,;:!?\\\/]+|[\s])/g,qt+"$1"+qt),l=o.split(qt),u=1;u<l.length;u++){var h=l[u];(h=="."||h==",")&&l[u-1].match(/[\w]+$/)&&(l[u-1]+=h,l[u]="")}for(var u=0;u<l.length;u++){var h=l[u],p=h.length;if(p!==0){if(p>i&&(e!==!0||r!=!1)){t&&(h=xu(h));var d=h.match(new RegExp(".{1,"+i+"}","g"));if(d){if(t)for(var c=0;c<d.length;c++)d[c]=xu(d[c]);n=n.concat(d)}}else s===-1&&(n.push(""),s=0),n[s].length+p+1>i&&n[s]!==""&&(n.push(""),s++),n[s]+=h;s=n.length-1}}}else{var d=a.match(new RegExp(".{1,"+i+"}","g"));if(d){if(t)for(var c=0;c<d.length;c++)t||(d[c]=xu(d[c]));n=d}}return n.length==1&&e&&r&&n[0].length>i&&(n=[]),n}function ws(a,i,e,t,r){if(a.length<=i)return a;i-=e.length,i<1&&(i=1);var n=Mo(a,i,t,r);return(n[0]||"")+e}function No(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function ed(a){return a.replace(/[\s\uFEFF\xA0]+$/g,"")}function td(a){return a.replace(/^[\s\uFEFF\xA0]+/g,"")}function xu(a){return a.split("").reverse().join("")}function $b(a){var i=a.trim();return i=a.replace(/^'(.*)'$/,"$1"),i==a&&(i=a.replace(/^"(.*)"$/,"$1")),i}function Wt(a,i,e){return i===void 0&&(i=0),e===void 0&&(e="0"),typeof a!="string"&&(a=a.toString()),i>a.length?Array(i-a.length+1).join(e)+a:a}function id(a){if(typeof a>"u")return bu;a=a.toLowerCase().replace(/^\[[^\]]*\]/,""),a=a.replace(/\[[^\]]+\]/,""),a=a.trim();var i=a.match(/\/(date|number|duration)$/);return i?i[1]:a===yn?yn:a===gn?gn:a===_s?_s:a.match(/[#0]/)?yn:a.match(/[ymwdhnsqaxkzgtei]/)?gn:bu}function Ba(a){return a.replace(/\/(date|number|duration)$/i,"")}function Cu(a){return a&&a.replace(/<[^>]*>/g,"")}function Fs(a){return a&&Cu((""+a).replace(/[\n\r]+/g,". "))}function rd(a){if(Tt(a))return"NaN";if(a===1/0)return"Infinity";if(a===-1/0)return"-Infinity";if(a===0&&1/a===-1/0)return"-0";var i=a<0;a=Math.abs(a);var e=ze(/^([0-9]+)(?:\.([0-9]+))?(?:e[\+\-]([0-9]+))?$/.exec(""+a)),t=e[1],r=e[2]||"",n;if(e[3]==null)n=r===""?t:t+"."+r;else{var s=+e[3];if(a<1){var o=s-1;n="0."+Wp("0",o)+t+r}else{var o=s-r.length;o===0?n=t+r:o<0?n=t+r.slice(0,o)+"."+r.slice(o):n=t+r+Wp("0",o)}}return i?"-"+n:n}function Ro(a){if(La(a)){var i=new Date(a);return i.setMilliseconds(a.getMilliseconds()),i}else{if(S(a))return new Date(a);var e=Number(a);return S(e)?new Date(e):new Date(a)}}function Ds(a){if(La(a))return a.getTime();if(S(a))return a;if(ce(a)){var i=Number(a);return S(i)?i:void 0}}function Pu(a,i){i===void 0&&(i=!1);var e=new Date(a.getFullYear(),0,0),t=a.getTime()-e.getTime()+(e.getTimezoneOffset()-a.getTimezoneOffset())*60*1e3,r=1e3*60*60*24;return Math.floor(t/r)}function Ts(a,i){i===void 0&&(i=!1);var e=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())),t=e.getUTCDay()||7;e.setUTCDate(e.getUTCDate()+4-t);var r=new Date(Date.UTC(e.getUTCFullYear(),0,1));return Math.ceil(((e.getTime()-r.getTime())/864e5+1)/7)}function ad(a,i){i===void 0&&(i=!1);var e=Ts(new Date(a.getFullYear(),a.getMonth(),1),i),t=Ts(a,i);return t==1&&(t=53),t-e+1}function nd(a,i,e,t){e===void 0&&(e=1),t===void 0&&(t=!1);var r=new Date(i,0,4,0,0,0,0);t&&r.setUTCFullYear(i);var n=a*7+e-((r.getDay()||7)+3);return n}function As(a,i){return a>12?a-=12:a===0&&(a=12),P(i)?a+(i-1):a}function Vs(a,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 r=a.toLocaleString("UTC"),n=a.toLocaleString("UTC",{timeZoneName:i?"long":"short"}).substr(r.length);return e===!1&&(n=n.replace(/ (standard|daylight|summer|winter) /i," ")),n}function sd(a,i){i===void 0&&(i=!1);var e=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())),t=e.getUTCDay()||7;e.setUTCDate(e.getUTCDate()+4-t);var r=new Date(Date.UTC(e.getUTCFullYear(),0,1));return r.getFullYear()}function _b(a,i){return Math.floor(Math.random()*(i-a))+a}function Bo(a,i,e){return a>e?e:a<i?i:a}function jo(a,i,e){var t=e-i;return(a>e||a<i)&&(a=i+(a-t*Math.floor(a/t))),a}function Qt(a,i){var e=a.x,t=a.y,r=[];if(i){for(;P(i.parent);)r.push(i),i=i.parent;r.reverse();for(var n=0;n<r.length;n++){var s=r[n],o=s.rotation,l=e-s.pixelX-s.ex,u=t-s.pixelY-s.ey;s.dx&&(e-=s.dx),s.dy&&(t-=s.dy);var h=s.scale;s.group&&(h=s.group.scale),e=(Y(-o)*l-X(-o)*u)/h-s.pixelPaddingLeft,t=(Y(-o)*u+X(-o)*l)/h-s.pixelPaddingTop}}return{x:e,y:t}}function di(a,i){var e=a.x,t=a.y;if(i)for(;P(i.parent);){var r=i.rotation;e+=i.pixelPaddingLeft+i.ex,t+=i.pixelPaddingTop+i.ey;var n=i.scale;i.group&&(n=i.group.scale);var s=i.pixelX+(e*Y(r)-t*X(r))*n,o=i.pixelY+(e*X(r)+t*Y(r))*n;i.dx&&(s+=i.dx),i.dy&&(o+=i.dy),e=s,t=o,i=i.parent}return{x:e,y:t}}function It(a,i,e){return Qt(di(a,i),e)}function Tb(a,i){var e=Qt(a,i),t=Qt({x:a.x+a.width,y:a.y+a.height},i);return{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function Sn(a,i){var e=di(a,i),t=di({x:a.x+a.width,y:a.y+a.height},i);return{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function _r(a,i,e){try{var t=i.getBoundingClientRect();return S(e)||(e=1),{x:(a.x-t.left)/e,y:(a.y-t.top)/e}}catch{return a}}function $u(a,i){try{var e=i.getBoundingClientRect();return{x:a.x+e.left,y:a.y+e.top}}catch{return a}}function Zr(a,i){if(i&&i.htmlContainer){var e=_r(a,ze(i.htmlContainer),i.svgContainer.cssScale);return Qt(e,i)}else return a}function Ls(a,i){if(i&&i.htmlContainer){var e=di(a,i);return $u(e,ze(i.htmlContainer))}else return a}function od(a){var i=getComputedStyle(a),e=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),t=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth);return a.clientWidth-e-t}function ld(a){var i=getComputedStyle(a),e=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),t=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth);return a.clientHeight-e-t}function ud(a){var i=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return i?Math.max(0,(i[1]?i[1].length:0)-(i[2]?+i[2]:0)):0}var Ob=/^([a-zA-Z][a-zA-Z0-9\+\.\-]*:)?(?:(\/\/)([^\@]+\@)?([^\/\?\#\:]*)(\:[0-9]+)?)?([^\?\#]*)(\?[^\#]*)?(\#.*)?$/;function Kp(a){var i=Ob.exec(a);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 Zp(a){return a.protocol+a.separator+a.authority+a.domain+a.port+a.path+a.query+a.hash}function hy(a){return a.protocol===""&&a.separator===""&&a.authority===""&&a.domain===""&&a.port===""}function Eo(a,i){var e=Kp(a),t=Kp(i);if(hy(e))throw new Error("Left URL is not absolute");if(hy(t)){if(t.path!=="")if(t.path[0]==="/")e.path=t.path;else{var r=e.path.split(/\//),n=t.path.split(/\//);if(r.length===0?n.length!==0&&r.push(""):r.length>1&&r.pop(),Mm(r,n),e.path=r.join("/"),e.path!==""&&e.path[0]!=="/")throw new Error("URL path must start with /")}return e.query=t.query,e.hash=t.hash,Zp(e)}else return Zp(t)}function Qr(){return!!window.MSInputMethodContext&&!!document.documentMode}function pd(a){return+a}C.registeredClasses["ease.linear"]=pd;function wb(a){return a*a}C.registeredClasses["ease.quadIn"]=wb;function Fb(a){return a*(2-a)}C.registeredClasses["ease.quadOut"]=Fb;function Db(a){return a*=2,(a<=1?a*a:--a*(2-a)+1)/2}C.registeredClasses["ease.quadInOut"]=Db;function py(a,i){return Math.pow(a,i)}C.registeredClasses["ease.polyIn"]=py;function dy(a,i){return 1-Math.pow(1-a,i)}C.registeredClasses["ease.polyOut"]=dy;function cy(a,i){return a*=2,(a<=1?Math.pow(a,i):2-Math.pow(2-a,i))/2}C.registeredClasses["ease.polyInOut"]=cy;function Ab(a){return py(a,3)}C.registeredClasses["ease.polyIn3"]=Ab;function wu(a){return dy(a,3)}C.registeredClasses["ease.polyOut3"]=wu;function Vb(a){return cy(a,3)}C.registeredClasses["ease.polyInOut3"]=Vb;function Lb(a){return Math.pow(2,10*a-10)}C.registeredClasses["ease.expIn"]=Lb;function kb(a){return 1-Math.pow(2,-10*a)}C.registeredClasses["ease.expOut"]=kb;function Ib(a){return a*=2,(a<=1?Math.pow(2,10*a-10):2-Math.pow(2,10-10*a))/2}C.registeredClasses["ease.expInOut"]=Ib;function Mb(a){return 1-Math.cos(a*Ap)}C.registeredClasses["ease.sinIn"]=Mb;function dd(a){return Math.sin(a*Ap)}C.registeredClasses["ease.sinOut"]=dd;function Nb(a){return(1-Math.cos(Po*a))/2}C.registeredClasses["ease.sinInOut"]=Nb;function cd(a){return a*a*a}C.registeredClasses["ease.cubicIn"]=cd;function cr(a){return--a*a*a+1}C.registeredClasses["ease.cubicOut"]=cr;function Rb(a){return a*=2,(a<=1?a*a*a:(a-=2)*a*a+2)/2}C.registeredClasses["ease.cubicInOut"]=Rb;function Bb(a){return 1-Math.sqrt(1-a*a)}C.registeredClasses["ease.circleIn"]=Bb;function jb(a){return Math.sqrt(1- --a*a)}C.registeredClasses["ease.circleOut"]=jb;function Eb(a){return a*=2,(a<=1?1-Math.sqrt(1-a*a):Math.sqrt(1-(a-=2)*a)+1)/2}C.registeredClasses["ease.circleInOut"]=Eb;var hd=4/11,Wb=6/11,Hb=8/11,zb=3/4,Xb=9/11,Yb=10/11,qb=15/16,Gb=21/22,Ub=63/64,_u=1/hd/hd;function Kb(a){return 1-Tu(1-a)}C.registeredClasses["ease.bounceIn"]=Kb;function Tu(a){return a=+a,a<hd?_u*a*a:a<Hb?_u*(a-=Wb)*a+zb:a<Yb?_u*(a-=Xb)*a+qb:_u*(a-=Gb)*a+Ub}C.registeredClasses["ease.bounceOut"]=Tu;function Zb(a){return a*=2,(a<=1?1-Tu(1-a):Tu(a-1)+1)/2}C.registeredClasses["ease.bounceInOut"]=Zb;var Qb=2*Math.PI,Wo=1,Ho=.3/Qb,Ou=Math.asin(1/Wo)*Ho;function Jb(a){return Wo*Math.pow(2,10*--a)*Math.sin((Ou-a)/Ho)}C.registeredClasses["ease.elasticIn"]=Jb;function ex(a){return 1-Wo*Math.pow(2,-10*(a=+a))*Math.sin((a+Ou)/Ho)}C.registeredClasses["ease.elasticOut"]=ex;function tx(a){return a=a*2-1,(a<0?Wo*Math.pow(2,10*a)*Math.sin((Ou-a)/Ho):2-Wo*Math.pow(2,-10*a)*Math.sin((Ou+a)/Ho))/2}C.registeredClasses["ease.elasticInOut"]=tx;var Cn=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.transitionDuration=0,e.transitionEasing=cr,e.properties={},e.propertyFields={},e.filters=new ve,e.isTemplate=!1,e.className="SpriteState",e._disposers.push(new Pe(e.filters)),e.applyTheme(),e}return Object.defineProperty(i.prototype,"adapter",{get:function(){var e=this;return this._adapterO||(this._adapterO=new gt(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],r=this.sprite;if(r){var n=this.propertyFields[e];if(P(n)&&(r.dataItem&&(t=r.dataItem.dataContext[n]),t==null&&(t="__unset")),P(t))this._adapterO&&(t=this._adapterO.apply(e,t));else{var s=r.getPropertyValue(e);this._adapterO?t=this._adapterO.apply(e,s):t=s,t==s&&(t=void 0)}}return t},i.prototype.copyFrom=function(e){e&&e!=this&&(this.transitionDuration=e.transitionDuration,this.transitionEasing=e.transitionEasing,xi(e.properties,this.properties),xi(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={};if(te(this.properties,function(s,o){t[s]=e.getPropertyValue(s)}),this._adapterO){var r=this._adapterO.keys();te(r,function(s,o){var l=e.getPropertyValue(o);t[o]=l})}var n=this.propertyFields;return te(n,function(s){var o=e.getPropertyValue(s);t[s]=o}),t},enumerable:!0,configurable:!0}),i.prototype.reset=function(){this.properties={},this.filters.clear()},i.prototype.processConfig=function(e){P(e)&&P(e.properties)&&te(e.properties,function(t,r){ce(r)&&(r.match(/^[0-9.\-]+\%$/)?e.properties[t]=N(ke(r)):r.match(/^\#[0-9abcdef]{3,}$/i)&&(e.properties[t]=pi(r)))}),a.prototype.processConfig.call(this,e)},i.prototype.asFunction=function(e){return e=="transitionEasing"||a.prototype.asIs.call(this,e)},i})(st);C.registeredClasses.SpriteState=Cn;var fd=(function(a){T(i,a);function i(){var e=a!==null&&a.apply(this,arguments)||this;return e._interactionEvents=new Oe,e}return i.prototype._dispatchSpriteEvent=function(e){if(!(this.target.disabled||this.target.isTemplate)&&this.target.events.isEnabled(e.type)){var t=wo(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=wo(e,{target:this.target,spritePoint:e.point?Zr(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,r,n){var s=this,o=n+"-"+e,l=this._interactionEvents.insertKeyIfEmpty(o,function(){var u=s.target.interactions.events.on(e,t,r,n);return new ya(function(){s._interactionEvents.removeKey(o),u.dispose()})});return l.increment()},i.prototype._on=function(e,t,r,n,s,o){var l=a.prototype._on.call(this,e,t,r,n,s,o),u=[l.disposer];switch(t){case"hit":case"track":case"doublehit":case"wheel":case"wheelup":case"wheeldown":case"wheelleft":case"wheelright":u.push(this._addInteractionObjectEvent(t,this._dispatchSpritePointEvent,this,s));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":u.push(this._addInteractionObjectEvent(t,this._dispatchSpriteEvent,this,s));break}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;break}return l.disposer=new Fe(u),l},i})(Oo);var md=(function(){function a(){}return a.opacity=1,a.strokeOpacity=1,a.strokeWidth=1,a.fillOpacity=1,a.fill=ie("#000000"),a.stroke=ie("#000000"),a.focusable=void 0,a.tabindex=0,a})();var yd=(function(a){T(i,a);function i(){var e=a!==null&&a.apply(this,arguments)||this;return e._domEvents={},e}return i.prototype._addDOMEvent=function(e,t,r,n){var s=this;if(!this._domEvents[e]){var o=function(l){r.call(n,t,l)};this.target.element.addEventListener(e,o,!1),this._domEvents[e]=new ya(function(){delete s._domEvents[e],s.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,r,n,s,o){var l=a.prototype._on.call(this,e,t,r,n,s,o),u=[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":u.push(this._addDOMEvent(t,t,this._dispatchKeyboardEvent,this));break;case"keyup":u.push(this._addDOMEvent(t,t,this._dispatchKeyboardEvent,this));break;case"keypress":u.push(this._addDOMEvent(t,t,this._dispatchKeyboardEvent,this));break;case"input":u.push(this._addDOMEvent(t,t,this._dispatchKeyboardEvent,this));break}return l.disposer=new Fe(u),l},i})(Oo);var gd=(function(a){T(i,a);function i(e){var t=a.call(this)||this;return t._eventDispatcher=new yd(t),t.eventDisposers=new Oe,t.replacedStyles=new Oe,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 Oe,t.inertias=new Oe,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 Bi(t.inertias)),t._disposers.push(new Bi(t.eventDisposers)),t.applyTheme(),t}return 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?pe().overObjects.moveValue(this):(this.isRealHover=!1,pe().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 ve),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?pe().downObjects.moveValue(this):pe().downObjects.removeValue(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"downPointers",{get:function(){return this._downPointers||(this._downPointers=new ve),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,e?pe().focusedObject=this:pe().focusedObject=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?pe().unprepElement(this):(this.draggable||this.swipeable||this.trackable||this.resizable)&&pe().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,pe().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,pe().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,pe().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,pe().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,pe().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,pe().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,pe().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,pe().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),pe().processFocusable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tabindex",{get:function(){return ru(this._tabindex,-1)},set:function(e){this._tabindex!==e&&(this._tabindex=e,e>-1&&(this.focusable=!0),pe().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 ru(this._originalScale,1)},set:function(e){this._originalScale!==e&&(this._originalScale=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"originalAngle",{get:function(){return ru(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){a.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,pe().applyCursorOverStyle(this)},i.prototype.setEventDisposer=function(e,t,r){var n=this.eventDisposers.getKey(e);t?n==null&&this.eventDisposers.setKey(e,r()):n!=null&&(n.dispose(),this.eventDisposers.removeKey(e))},i.prototype.dispose=function(){a.prototype.dispose.call(this);var e=pe();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})(Et);var vd=(function(){function a(i,e){this._disposed=!1,this.directionX=0,this.directionY=0,this.interaction=i,this.keyboardEvent=e,this._startedOn=new Date().getTime(),pe().processDragStart(i),Se.animations.push(this),this.update()}return a.prototype.update=function(){var i=this.interaction,e=pe().getKeyboardOption(i,"speed"),t=pe().getKeyboardOption(i,"accelleration"),r=pe().getKeyboardOption(i,"accellerationDelay"),n={x:0,y:0};this.keyboardEvent.shiftKey?(e*=.5,t=1):this.keyboardEvent.ctrlKey&&(e*=2);var s=new Date().getTime()-this._startedOn,o=s-r;if(t>0&&o>0){var l=s/r;s=r,n.x+=this.directionX*(e*t*l*o),n.y+=this.directionY*(e*t*l*o)}n.x+=this.directionX*(e*s),n.y+=this.directionY*(e*s),pe().handleTransformMove(i,n,{x:0,y:0},this.keyboardEvent,!0,!1)},a.prototype.isDisposed=function(){return this._disposed},a.prototype.dispose=function(){this._disposed||(pe().processDragStop(this.interaction),oe(Se.animations,this))},a})();var bd=(function(a){T(i,a);function i(e,t,r,n){var s=a.call(this)||this;return s.animations=[],s.className="Inertia",s.interaction=e,s.type=t,s.point=r,s.startPoint=n,s._disposers.push(new fr(s.animations)),s}return Object.defineProperty(i.prototype,"x",{get:function(){return this.point.x},set:function(e){S(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){S(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"&&pe().processDragStop(this.interaction),this.dispose()},i})(st);var ja="http://www.w3.org/2000/svg",Sd="http://www.w3.org/2000/xmlns/",ks="http://www.w3.org/1999/xlink";function ot(a,i,e,t){return a.addEventListener(i,e,t||!1),new Ce(function(){a.removeEventListener(i,e,t||!1)})}function zo(a){if(ce(a)){var i=document.getElementById(a);if(i==null&&(i=document.getElementsByClassName(a)[0]),i instanceof HTMLElement)return i}else if(a instanceof HTMLElement)return a}function Is(a,i){if(a)if(a.classList){var e=i.split(" ");H(e,function(r){a.classList.add(r)})}else{var t=a.getAttribute("class");t?a.setAttribute("class",t.split(" ").filter(function(r){return r!==i}).join(" ")+" "+i):a.setAttribute("class",i)}}function Ms(a,i){if(a)if(a.classList)a.classList.remove(i);else{var e=a.getAttribute("class");e&&a.setAttribute("class",e.split(" ").filter(function(t){return t!==i}).join(" "))}}function Cd(a,i,e){a.style[i]=e}function Fu(a,i){return a.currentStyle?a.currentStyle[i]:document.defaultView.getComputedStyle(a,null).getPropertyValue(i)}function Pn(){if(document.activeElement&&document.activeElement!=document.body)if(document.activeElement.blur)document.activeElement.blur();else{var a=document.createElement("button");a.style.position="fixed",a.style.top="0px",a.style.left="-10000px",document.body.appendChild(a),a.focus(),a.blur(),document.body.removeChild(a)}}function Pd(a,i){for(var e=i;;){if(a===e)return!0;if(e.parentNode==null){if(e.host==null)return!1;e=e.host}else e=e.parentNode}}function Ns(a){for(var i=a;;){if(i.parentNode==null)return i.host!=null?i:null;i=i.parentNode}}function Du(a){for(var i=a.ownerDocument,e=a;;){if(e.parentNode==null)return e===i||e.host!=null?e:null;e=e.parentNode}}function fy(a){return typeof a.composedPath=="function"?a.composedPath()[0]:a.target}function $d(a){Rp(function(){try{var i=a.getBoundingClientRect(),e=i.left-Math.round(i.left),t=i.top-Math.round(i.top);e!==0&&fu(function(){a.style.left=e+"px"}),t!==0&&fu(function(){a.style.top=t+"px"})}catch{}})}var xd;function ix(a){if(a==null){if(!P(xd)){var i=document.createElement("style");i.type="text/css",ge.nonce!=""&&i.setAttribute("nonce",ge.nonce),document.head.appendChild(i),xd=i.sheet}return xd}else{var i=document.createElement("style");return i.type="text/css",ge.nonce!=""&&i.setAttribute("nonce",ge.nonce),a.appendChild(i),i.sheet}}function rx(a,i){var e=a.cssRules.length;return a.insertRule(i+"{}",e),a.cssRules[e]}var Ye=(function(a){T(i,a);function i(e,t,r){var n=this,s=ix(e);return n=a.call(this,function(){var o=oi(s.cssRules,n._rule);if(o===-1)throw new Error("Could not dispose StyleRule");s.deleteRule(o)})||this,n._rule=rx(s,t),te(r,function(o,l){n.setStyle(o,l)}),n}return 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 r=this._rule.style;r.setProperty("-webkit-"+e,t,""),r.setProperty("-moz-"+e,t,""),r.setProperty("-ms-"+e,t,""),r.setProperty("-o-"+e,t,""),r.setProperty(e,t,"")},i.prototype.setStyle=function(e,t){e==="transition"?this._setVendorPrefixName(e,t):this._rule.style.setProperty(e,t,"")},i})(Ce);var ax=0,nx=(function(a){T(i,a);function i(e,t,r){var n=this,s=P(r)?r:"__style_"+ ++ax+"__";return n=a.call(this,e,"."+s,t)||this,n._className=s,n}return 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})(Ye);function _d(a){if(document.readyState!=="loading")a();else{var i=function(){document.readyState!=="loading"&&(document.removeEventListener("readystatechange",i),a())};document.addEventListener("readystatechange",i)}}function Xo(a){var i=Fu(a,"font-family");if(i)return i;var e=a.parentElement||a.parentNode;return e?Xo(e):void 0}function Yo(a){var i=Fu(a,"font-size");if(i)return i;var e=a.parentElement||a.parentNode;return e?Yo(e):void 0}function Au(a,i){var e=a.getBoundingClientRect(),t=Xe(i)?i:i?[i]:[];if(t.length){for(var r=0;r<t.length;r++){var n=t[r];if(!Au(n))return!1;var s=n.getBoundingClientRect();if(e.top>=0&&e.left>=0&&e.top<=s.top+s.height&&e.left<=s.left+s.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 my=(function(){function a(){}return a.prototype.getEventKey=function(i){var e=i.keyCode||i.which,t;switch(e){case 38:t="up";break;case 40:t="down";break;case 37:t="left";break;case 39:t="right";break;case 13:t="enter";break;case 27:t="esc";break;case 36:t="home";break;case 35:t="end";break;case 9:t="tab";break;case 17:t="ctrl";break;case 18:t="alt";break;case 16:t="shift";break;case 32:t="space";break;case 36:t="home";break;case 35:t="end";break;case 33:t="pgup";break;case 34:t="pgdn";break;case 45:t="ins";break;case 46:t="del";break;case 107:t="plus";break;case 109:t="minus";break;default:t="other";break}return t},a.prototype.isKey=function(i,e){var t=this.getEventKey(i);return ce(e)&&(e=[e]),e.indexOf(t)!==-1},a.prototype.shiftKey=function(i){return i.shiftKey},a.prototype.ctrlKey=function(i){return i.ctrlKey},a.prototype.altKey=function(i){return i.altKey},a.prototype.metaKey=function(i){return i.metaKey},a})();var Si=new my;var sx={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6};function Td(a){switch(a){case"year":return;case"month":return"year";case"week":return"month";case"day":return"month";case"hour":return"day";case"minute":return"hour";case"second":return"minute";case"millisecond":return"second"}}function vt(a,i){return P(i)||(i=1),sx[a]*i}function ox(){return new Date}function Or(){return ox().getTime()}function $n(a){return new Date(a.getTime())}function Vu(a,i,e,t){a=new Date(a.getTime()),i=new Date(i.getTime());var r=0,n=0;!t&&e!="millisecond"&&(r=a.getTimezoneOffset(),a.setUTCMinutes(a.getUTCMinutes()-r),n=i.getTimezoneOffset(),i.setUTCMinutes(i.getUTCMinutes()-n));var s=!1;switch(e){case"year":a.getUTCFullYear()!=i.getUTCFullYear()&&(s=!0);break;case"month":(a.getUTCFullYear()!=i.getUTCFullYear()||a.getUTCMonth()!=i.getUTCMonth())&&(s=!0);break;case"day":(a.getUTCMonth()!=i.getUTCMonth()||a.getUTCDate()!=i.getUTCDate())&&(s=!0);break;case"hour":a.getUTCHours()!=i.getUTCHours()&&(s=!0);break;case"minute":a.getUTCMinutes()!=i.getUTCMinutes()&&(s=!0);break;case"second":a.getUTCSeconds()!=i.getUTCSeconds()&&(s=!0);break;case"millisecond":a.getTime()!=i.getTime()&&(s=!0);break}if(s)return!0;var o=Td(e);return o?(a.setUTCMinutes(a.getUTCMinutes()+r),i.setUTCMinutes(i.getUTCMinutes()+n),Vu(a,i,o,t)):!1}function Jt(a,i,e,t){var r=0;switch(!t&&i!="millisecond"&&(r=a.getTimezoneOffset(),a.setUTCMinutes(a.getUTCMinutes()-r)),i){case"day":var n=a.getUTCDate();a.setUTCDate(n+e);break;case"second":var s=a.getUTCSeconds();a.setUTCSeconds(s+e);break;case"millisecond":var o=a.getUTCMilliseconds();a.setUTCMilliseconds(o+e);break;case"hour":var l=a.getUTCHours();a.setUTCHours(l+e);break;case"minute":var u=a.getUTCMinutes();a.setUTCMinutes(u+e);break;case"year":var h=a.getUTCFullYear();a.setUTCFullYear(h+e);break;case"month":var p=a.getUTCMonth();a.setUTCMonth(p+e);break;case"week":var d=a.getUTCDate();a.setUTCDate(d+e*7);break}if(!t&&i!="millisecond"&&(a.setUTCMinutes(a.getUTCMinutes()+r),i=="day"||i=="week"||i=="month"||i=="year")){var c=a.getTimezoneOffset();if(c!=r){var f=c-r;a.setUTCMinutes(a.getUTCMinutes()+f),a.getTimezoneOffset()!=c&&a.setUTCMinutes(a.getUTCMinutes()-f)}}return a}function At(a,i,e,t,r,n,s,o){s===void 0&&(s=0),S(e)||(e=1);var l=0;switch(o&&["day","month","week","year"].indexOf(i)!=-1&&(a=Rs(a,o)),!r&&i!="millisecond"&&(l=a.getTimezoneOffset(),a.setUTCMinutes(a.getUTCMinutes()-l)),i){case"day":var u=a.getUTCDate();if(e>1){if(n){n=At(n,"day",1);var h=a.getTime()-n.getTime(),p=Math.floor(h/vt("day")/e),d=vt("day",p*e);a.setTime(n.getTime()+d-l*vt("minute"))}}else a.setUTCDate(u);a.setUTCHours(0,0,0,0);break;case"second":var c=a.getUTCSeconds();e>1&&(c=Math.floor(c/e)*e),a.setUTCSeconds(c,0);break;case"millisecond":if(e==1)return a;var f=a.getUTCMilliseconds();f=Math.floor(f/e)*e,a.setUTCMilliseconds(f);break;case"hour":var m=a.getUTCHours();e>1&&(m=Math.floor(m/e)*e),a.setUTCHours(m,s,0,0);break;case"minute":var y=a.getUTCMinutes();f=a.getUTCMilliseconds(),e>1&&(y=Math.floor(y/e)*e),a.setUTCMinutes(y,0,0);break;case"month":var v=a.getUTCMonth();e>1&&(v=Math.floor(v/e)*e),a.setUTCMonth(v,1),a.setUTCHours(0,s,0,0);break;case"year":var b=a.getUTCFullYear();e>1&&(b=Math.floor(b/e)*e),a.setUTCFullYear(b,0,1),a.setUTCHours(0,s,0,0);break;case"week":var x=a.getUTCDate(),_=a.getUTCDay();S(t)||(t=1),_>=t?x=x-_+t:x=x-(7+_)+t,a.setUTCDate(x),a.setUTCHours(0,s,0,0);break}if(!r&&i!="millisecond"&&(a.setUTCMinutes(a.getUTCMinutes()+l),i=="day"||i=="week"||i=="month"||i=="year")){var $=a.getTimezoneOffset();if($!=l){var O=$-l;a.setUTCMinutes(a.getUTCMinutes()+O)}}return a}function Rs(a,i){var e=new Date(a.toLocaleString("en-US",{timeZone:i}));return e}function yy(a){var i=new Date;i.setHours(0,0,0,0);var e=Rs(i,a);return e.getMinutes()}var gy=(function(a){T(i,a);function i(){var e=a.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 ve,e.downObjects=new ve,e.trackedObjects=new ve,e.transformedObjects=new ve,e.pointers=new Oe,e.inertiaOptions=new Oe,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<"u"&&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":P(document.onmousewheel)&&(e._pointerEvents.wheel="mousewheel"),e.inertiaOptions.setKey("move",{time:100,duration:500,factor:1,easing:wu}),e.inertiaOptions.setKey("resize",{time:100,duration:500,factor:1,easing:wu}),e._passiveSupported=i.passiveSupported,e.applyTheme(),e}return 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(ot(document,this._pointerEvents.pointerdown,function(t){e.handleGlobalPointerDown(t)})),this._disposers.push(ot(document,this._pointerEvents.pointermove,function(t){e.handleGlobalPointerMove(t)})),this._disposers.push(ot(document,this._pointerEvents.pointerup,function(t){e.handleGlobalPointerUp(t)})),this._disposers.push(ot(document,this._pointerEvents.pointercancel,function(t){e.handleGlobalPointerUp(t,!0)})),this._disposers.push(ot(document,"mouseenter",function(t){!P(t.relatedTarget)&&(t.buttons==0||t.which==0)&&e.handleDocumentLeave(t)}))),this._usePointerEventsOnly||(this._disposers.push(ot(document,"touchstart",function(t){e.handleGlobalTouchStart(t)})),this._disposers.push(ot(document,"touchmove",function(t){e.handleGlobalTouchMove(t)})),this._disposers.push(ot(document,"touchend",function(t){e.handleGlobalTouchEnd(t)}))),this._disposers.push(ot(document,"keydown",function(t){e.handleGlobalKeyDown(t)})),this._disposers.push(ot(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",ot(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 Fe([ot(e.element,this._pointerEvents.pointerout,function(n){return t.handlePointerOut(e,n)}),ot(e.element,this._pointerEvents.pointerover,function(n){return t.handlePointerOver(e,n)})])),e.trackable;else{var r=e.eventDisposers.getKey("hoverable");r!=null&&(r.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 Fe([ot(e.element,this._pointerEvents.wheel,function(n){return t.handleMouseWheel(e,n)},this._passiveSupported?{passive:!1}:!1),e.events.on("out",function(n){e.wheelable&&t.unlockWheel()}),e.events.on("over",function(n){e.wheelable&&t.lockWheel()})]));else{var r=e.eventDisposers.getKey("wheelable");r!=null&&(r.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 Fe([ot(e.element,"focus",function(n){return t.handleFocus(e,n)}),ot(e.element,"blur",function(n){return t.handleBlur(e,n)}),ot(e.element,this._pointerEvents.pointerdown,function(n){return t.handleFocusBlur(e,n)}),ot(e.element,"touchstart",function(n){return t.handleFocusBlur(e,n)},this._passiveSupported?{passive:!1}:!1)]));else{var r=e.eventDisposers.getKey("focusable");r!=null&&(r.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?e.eventDisposers.setKey("touchable",new Fe([ot(e.element,this._pointerEvents.pointerdown,function(n){return t.handlePointerDown(e,n)}),ot(e.element,"touchstart",function(n){return t.handleTouchDown(e,n)},this._passiveSupported?{passive:!1}:!1)])):this._useTouchEventsOnly?this._usePointerEventsOnly||e.eventDisposers.setKey("touchable",ot(e.element,"touchstart",function(n){return t.handleTouchDown(e,n)},this._passiveSupported?{passive:!1}:!1)):e.eventDisposers.setKey("touchable",ot(e.element,this._pointerEvents.pointerdown,function(n){return t.handlePointerDown(e,n)})));else{var r=e.eventDisposers.getKey("touchable");r!=null&&(r.dispose(),e.eventDisposers.removeKey("touchable"))}},i.prototype.handleFocus=function(e,t){if(!e.focusable){t.preventDefault();return}if(e.isFocused=!0,e.events.isEnabled("focus")&&!Se.isPaused){var r={type:"focus",target:e,event:t};e.events.dispatchImmediately("focus",r)}},i.prototype.handleFocusBlur=function(e,t){e.focusable!==!1&&this.getHitOption(e,"noFocus")&&e.events.once("focus",function(){e.events.disableType("blur"),Pn(),e.sprite&&e.sprite.handleBlur(),e.events.enableType("blur")})},i.prototype.handleBlur=function(e,t){if(!e.focusable){t.preventDefault();return}if(e.isFocused=!1,e.events.isEnabled("blur")&&!Se.isPaused){var r={type:"blur",target:e,event:t};e.events.dispatchImmediately("blur",r)}},i.prototype.handleGlobalKeyDown=function(e){if(this.focusedObject){if(Si.isKey(e,"esc"))Pn();else if(this.focusedObject.draggable&&Si.isKey(e,["up","down","left","right"])){e.preventDefault();var t=this.focusedObject,r="interactionKeyboardObject";if(t.eventDisposers.hasKey(r))return;var n=new vd(t,e);switch(t.eventDisposers.setKey(r,n),Si.getEventKey(e)){case"up":n.directionY=-1;break;case"down":n.directionY=1;break;case"left":n.directionX=-1;break;case"right":n.directionX=1;break}}}},i.prototype.handleGlobalKeyUp=function(e){var t="interactionKeyboardObject";if(this.focusedObject){var r=this.focusedObject.eventDisposers.getKey(t);r!=null&&(e.preventDefault(),r.dispose(),this.focusedObject.eventDisposers.removeKey(t));var n=this.focusedObject.sprite;Si.isKey(e,"enter")&&n&&(n.events.isEnabled("hit")||n.events.isEnabled("toggled")?this.focusedObject.dispatchImmediately("hit"):n.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")&&!Se.isPaused){var r={type:"track",target:this,event:e,pointer:t,touch:t.touch};this.events.dispatchImmediately("track",r)}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")&&!Se.isPaused){var r={type:"down",target:this,event:e,pointer:t,touch:t.touch};this.events.dispatchImmediately("down",r)}},i.prototype.preventTouchAction=function(e){e.defaultPrevented||e.preventDefault()},i.prototype.handleGlobalPointerUp=function(e,t){t===void 0&&(t=!1);var r=this.getPointer(e);if(this.events.isEnabled("up")&&!Se.isPaused){var n={type:"up",target:this,event:e,pointer:r,touch:r.touch};this.events.dispatchImmediately("up",n)}this.handleGlobalUp(r,e,t)},i.prototype.handleGlobalTouchMove=function(e){for(var t=0;t<e.changedTouches.length;t++){var r=this.getPointer(e.changedTouches[t]);if(r.point=this.getPointerPoint(e.changedTouches[t]),this.events.isEnabled("track")&&!Se.isPaused){var n={type:"track",target:this,event:e,pointer:r,touch:r.touch};this.events.dispatchImmediately("track",n)}this.addBreadCrumb(r,r.point),this.handleGlobalMove(r,e)}},i.prototype.handleGlobalTouchStart=function(e){this.processDelayed();for(var t=0;t<e.changedTouches.length;t++){var r=this.getPointer(e.changedTouches[t]);if(!this._usePointerEventsOnly&&this.events.isEnabled("down")&&!Se.isPaused){var n={type:"down",target:this,event:e,pointer:r,touch:r.touch};this.events.dispatchImmediately("down",n)}}},i.prototype.handleGlobalTouchEnd=function(e){for(var t=0;t<e.changedTouches.length;t++){var r=this.getPointer(e.changedTouches[t]);if(this.events.isEnabled("up")&&!Se.isPaused){var n={type:"up",target:this,event:e,pointer:r,touch:r.touch};this.events.dispatchImmediately("up",n)}this.handleGlobalUp(r,e)}},i.prototype.handlePointerDown=function(e,t){var r=this.getPointer(t);!r.touch&&t.which!=1&&t.which!=3||(r.button=t.which,this.resetPointer(r,t),this.handleDown(e,r,t))},i.prototype.handlePointerOver=function(e,t){var r=this.getPointer(t);this.handleOver(e,r,t)},i.prototype.handlePointerOut=function(e,t){var r=this.getPointer(t);this.handleOut(e,r,t)},i.prototype.handleMouseWheel=function(e,t){var r=this.getPointer(t);r.point=this.getPointerPoint(t);var n=0,s=0,o=1;if(t.deltaMode==1&&(o=50),o*=this.getMouseOption(e,"sensitivity"),t instanceof WheelEvent)n=Math.round(-1*t.wheelDeltaX||t.deltaX*o),s=Math.round(-1*t.wheelDeltaY||t.deltaY*o);else throw new Error("Invalid event type");this.handleWheel(e,r,n,s,t)},i.prototype.handleTouchDown=function(e,t){for(var r=0;r<t.changedTouches.length;r++){var n=this.getPointer(t.changedTouches[r]);this.maybePreventDefault(e,t,n),this.resetPointer(n,t.changedTouches[r]),this.handleDown(e,n,t)}},i.prototype.handleHit=function(e,t,r){var n=Or();if(e.lastHit&&e.lastHit>=n-this.getHitOption(e,"doubleHitTime")){if(n-e.lastHit<100)return;if(e.lastHit=void 0,e.lastHitPointer=void 0,e.events.isEnabled("doublehit")&&!Se.isPaused){var s={type:"doublehit",target:e,point:t.point,event:r,touch:t.touch};e.events.dispatchImmediately("doublehit",s)}}else if(e.lastHit=n,e.lastHitPointer=t,t.button===3){if(e.events.isEnabled("rightclick")&&!Se.isPaused){var s={type:"rightclick",target:e,event:r};e.events.dispatchImmediately("rightclick",s)}}else if(e.events.isEnabled("hit")&&!Se.isPaused){var s={type:"hit",target:e,event:r,point:t.point,touch:t.touch};e.events.dispatchImmediately("hit",s)}},i.prototype.handleOver=function(e,t,r,n){if(n===void 0&&(n=!1),!!e.hoverable){var s=!1;if(this.shouldCancelHovers(t)&&this.areTransformed()&&this.moved(t,this.getHitOption(e,"hitTolerance"))&&(s=!0,this.cancelAllHovers(r)),this.processDelayed(),e.overPointers.moveValue(t),!e.isRealHover&&(s||(e.isHover=!0,e.isRealHover=!0,this.overObjects.moveValue(e)),this.handleTrack(this.body,t,r,!0),e.events.isEnabled("over")&&!Se.isPaused&&!s)){var o={type:"over",target:e,event:r,pointer:t,touch:t.touch};e.events.dispatchImmediately("over",o)}}},i.prototype.handleOut=function(e,t,r,n,s){var o=this;if(n===void 0&&(n=!1),s===void 0&&(s=!1),!!e.hoverable&&(e.overPointers.removeValue(t),e.isHover&&(!e.hasDelayedOut||s))){if(n&&e.overPointers.length)return;if(t&&t.touch&&!s&&!this.old(t)){var l=this.getHoverOption(e,"touchOutBehavior");if(l=="leave"){this._delayedEvents.out.push({type:"out",io:e,pointer:t,event:r,keepUntil:Or()+500}),e.hasDelayedOut=!0;return}else if(l=="delay"&&this.getHoverOption(e,"touchOutDelay")){this._delayedEvents.out.push({type:"out",io:e,pointer:t,event:r,keepUntil:Or()+500,timeout:this.setTimeout(function(){o.handleOut(e,t,r,!0)},this.getHoverOption(e,"touchOutDelay"))});return}}if(e.isHover=!1,this.overObjects.removeValue(e),!e.isDisposed()&&e.events.isEnabled("out")&&!Se.isPaused){var u={type:"out",target:e,event:r,pointer:t,touch:t.touch};e.events.dispatchImmediately("out",u)}e.overPointers.clear(),e.hasDelayedOut=!1}},i.prototype.processDelayed=function(){for(var e;e=this._delayedEvents.out.pop(),!!e;)e.timeout&&e.timeout.dispose(),this.handleOut(e.io,e.pointer,e.event,!1,!0)},i.prototype.handleDown=function(e,t,r){if(this.maybePreventDefault(e,r,t),e.inert&&this.stopInertia(e),this.handleOver(e,t,r,!0),e.downPointers.moveValue(t),this.applyCursorDownStyle(e,t),e.isDown||(e.focusable!==!1&&this.getHitOption(e,"noFocus")&&this.focusedObject&&Pn(),e.isDown=!0,this.downObjects.moveValue(e),e.draggable&&this.processDragStart(e,t,r),e.resizable&&this.processResizeStart(e,t,r)),e.events.isEnabled("down")&&!Se.isPaused){var n={type:"down",target:e,event:r,pointer:t,touch:t.touch};e.events.dispatchImmediately("down",n)}},i.prototype.handleGlobalUp=function(e,t,r){var n=this;r===void 0&&(r=!1);var s=this.downObjects.values.slice();s.sort(function(o,l){if(o&&l){var u=o.element.compareDocumentPosition(l.element);return u&Node.DOCUMENT_POSITION_CONTAINED_BY?1:u&Node.DOCUMENT_POSITION_CONTAINS?-1:0}else return 0}),H(s,function(o){o&&o.downPointers.contains(e)&&n.handleUp(o,e,t,r)})},i.prototype.handleDocumentLeave=function(e){var t=this;I(this.downObjects.backwards().iterator(),function(r){r.downPointers.each(function(n){t.handleUp(r,n,e)})})},i.prototype.handleUp=function(e,t,r,n){if(n===void 0&&(n=!1),this.restoreCursorDownStyle(e,t),e.downPointers.removeValue(t),(t&&t.touch||this._useTouchEventsOnly)&&this.handleOut(e,t,r,!0),e.isDown){if(e.downPointers.length==0&&(e.isDown=!1,this.downObjects.removeValue(e)),e.events.isEnabled("up")&&!Se.isPaused&&t){var s={type:"up",target:e,event:r,pointer:t,touch:t.touch};e.events.dispatchImmediately("up",s)}n||(e.swipeable&&this.swiped(e,t)?this.handleSwipe(e,t,r):(e.clickable&&!this.moved(t,this.getHitOption(e,"hitTolerance"))&&this.handleHit(e,t,r),e.inert&&this.moved(t,this.getHitOption(e,"hitTolerance"))?this.handleInertia(e,t):e.draggable&&this.processDragStop(e,t,r),e.resizable&&this.processResizeStop(e,t,r)))}},i.prototype.maybePreventDefault=function(e,t,r){P(t)&&(e.draggable||e.swipeable||e.trackable||e.resizable)&&!this.isGlobalElement(e)&&t.cancelable!==!1&&(!e.isTouchProtected||!r||!r.touch)&&t.preventDefault()},i.prototype.cancelAllHovers=function(e){var t=this;I(this.overObjects.backwards().iterator(),function(r){if(r){var n=r.overPointers.getIndex(0);t.handleOut(r,n,e,!0,!0)}})},i.prototype.shouldCancelHovers=function(e){return ge.disableHoverOnTransform=="always"||ge.disableHoverOnTransform=="touch"&&e.touch},i.prototype.handleGlobalMove=function(e,t){var r=this;if(!e.touch){var n=fy(e.lastEvent);I(this.overObjects.backwards().iterator(),function(s){if(s&&s.overPointers.contains(e)&&s.hoverable){var o=!1;s.element&&e.lastEvent&&Pd(s.element,n)||(o=!0),o&&r.handleOut(s,e,t,!0)}})}I(this.transformedObjects.backwards().iterator(),function(s){s.downPointers.contains(e)&&!(s.swipeable&&r.swiping(s,e))&&(s.draggable||s.resizable)&&r.handleTransform(s,t)}),I(this.trackedObjects.backwards().iterator(),function(s){s.overPointers.contains(e)||r.handleTrack(s,e,t)})},i.prototype.handleTrack=function(e,t,r,n){if(n===void 0&&(n=!1),!(!n&&!this.moved(t,0))&&e.events.isEnabled("track")&&!Se.isPaused){var s={type:"track",target:e,event:r,point:t.point,pointer:t,touch:t.touch};e.events.dispatchImmediately("track",s)}},i.prototype.handleSwipe=function(e,t,r){if(e.events.isEnabled("swipe")&&!Se.isPaused){var n={type:"swipe",target:e,event:r,touch:t.touch};e.events.dispatchImmediately("swipe",n)}if(t.startPoint.x<t.point.x){if(e.events.isEnabled("swiperight")&&!Se.isPaused){var n={type:"swiperight",target:e,event:r,touch:t.touch};e.events.dispatchImmediately("swiperight",n)}}else if(e.events.isEnabled("swipeleft")&&!Se.isPaused){var n={type:"swipeleft",target:e,event:r,touch:t.touch};e.events.dispatchImmediately("swipeleft",n)}},i.prototype.handleWheel=function(e,t,r,n,s){var o={x:r,y:n};e.events.isEnabled("wheel")&&!Se.isPaused&&e.events.dispatchImmediately("wheel",{type:"wheel",target:e,event:s,point:t.point,shift:o}),r<0?e.events.isEnabled("wheelleft")&&!Se.isPaused&&e.events.dispatchImmediately("wheelleft",{type:"wheelleft",target:e,event:s,point:t.point,shift:o}):r>0?e.events.isEnabled("swiperight")&&!Se.isPaused&&e.events.dispatchImmediately("wheelright",{type:"wheelright",target:e,event:s,point:t.point,shift:o}):n<0?e.events.isEnabled("wheelup")&&!Se.isPaused&&e.events.dispatchImmediately("wheelup",{type:"wheelup",target:e,event:s,point:t.point,shift:o}):n>0&&e.events.isEnabled("wheeldown")&&!Se.isPaused&&e.events.dispatchImmediately("wheeldown",{type:"wheeldown",target:e,event:s,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 r=e,n="move",s={x:t.point.x,y:t.point.y},o={x:t.startPoint.x,y:t.startPoint.y},l=new bd(r,n,s,o),u=this.getTrailPoint(t,Or()-this.getInertiaOption(e,"move","time"));if(typeof u>"u"){this.processDragStop(e,t,t.lastUpEvent);return}var h=this.getInertiaOption(e,"move","factor"),p=[{to:t.point.x+(t.point.x-u.point.x)*h,property:"x"},{to:t.point.y+(t.point.y-u.point.y)*h,property:"y"}],d=new Gt(l,p,this.getInertiaOption(e,"move","duration"),this.getInertiaOption(e,"move","easing")).start();this._disposers.push(d.events.on("animationended",function(c){l.done()})),e.inertias.setKey("move",l)},i.prototype.handleResizeInertia=function(e,t){},i.prototype.handleTransform=function(e,t){var r=e.downPointers.getIndex(0),n=null,s=null;r&&(n=r.point,s=r.startPoint);var o,l,u;l={x:e.originalPosition.x,y:e.originalPosition.y},u=l;for(var h=!0,p=1;p<e.downPointers.length;p++){var d=e.downPointers.getIndex(p);if(s.x!=d.startPoint.x&&s.y!=d.startPoint.y){h=!1,o=d,l=o.point,u=o.startPoint;break}}var c=r&&this.moved(r,0);if(e.draggable&&r&&r.dragStartEvents&&r.dragStartEvents.length&&c&&e.events.isEnabled("dragstart")&&!Se.isPaused&&e.events.dispatchImmediately("dragstart",r.dragStartEvents.shift()),h&&e.draggable)this.handleTransformMove(e,n,s,t,c,r.touch),this.shouldCancelHovers(r)&&this.moved(r,this.getHitOption(e,"hitTolerance"))&&this.cancelAllHovers(t);else{var f=o&&this.moved(o,0);(this.shouldCancelHovers(r)&&this.moved(r,this.getHitOption(e,"hitTolerance"))||this.shouldCancelHovers(o)&&this.moved(o,this.getHitOption(e,"hitTolerance")))&&this.cancelAllHovers(t),e.draggable&&e.resizable?(this.handleTransformMove(e,n,s,t,c&&f,r.touch),this.handleTransformResize(e,n,s,l,u,t,c&&f,r.touch)):(e.draggable&&this.handleTransformMove(e,n,s,t,c,r.touch),e.resizable&&(!h||t.ctrlKey)&&this.handleTransformResize(e,n,s,l,u,t,c&&f,r.touch))}},i.prototype.handleTransformMove=function(e,t,r,n,s,o){if(s&&e.events.isEnabled("drag")&&!Se.isPaused&&(!e.isTouchProtected||!o)){var l={type:"drag",target:e,event:n,shift:{x:t.x-r.x,y:t.y-r.y},startPoint:r,point:t,touch:o};e.events.dispatchImmediately("drag",l)}},i.prototype.handleTransformResize=function(e,t,r,n,s,o,l,u){if(e.events.isEnabled("resize")&&!Se.isPaused&&(!e.isTouchProtected||!u)){var h={type:"resize",target:e,event:o,scale:Lm(t,r,n,s),startPoint1:r,point1:t,startPoint2:s,point2:n,touch:u};e.events.dispatchImmediately("resize",h)}},i.prototype.processDragStart=function(e,t,r){this.transformedObjects.moveValue(e),this.shouldCancelHovers(t)&&this.cancelAllHovers(r);var n={type:"dragstart",target:e,event:r,touch:t?t.touch:!1};t&&(t.dragTarget=e),t&&t.dragStartEvents?t.dragStartEvents.push(n):Se.isPaused||e.dispatchImmediately("dragstart",n)},i.prototype.processDragStop=function(e,t,r){if(t||(t=this.getDragPointer(e)),t&&(t.dragTarget=void 0),this.transformedObjects.removeValue(e),(!t||this.moved(t,0))&&e.events.isEnabled("dragstop")&&!Se.isPaused){var n={type:"dragstop",target:e,touch:t?t.touch:!1};e.events.dispatchImmediately("dragstop",n)}},i.prototype.processResizeStart=function(e,t,r){this.transformedObjects.moveValue(e)},i.prototype.processResizeStop=function(e,t,r){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,r){t||(t=this.getDragPointer(e)),t&&!r&&this.handleGlobalUp(t,t.lastUpEvent,r)},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){var t="";return P(e.identifier)?t=""+e.identifier:P(e.pointerId)?t=""+e.pointerId:t="m",t.replace("-","")},i.prototype.getPointerPoint=function(e){return{x:e.clientX,y:e.clientY}},i.prototype.getPointer=function(e){var t=this.getPointerId(e),r=this.getPointerPoint(e),n;return this.pointers.hasKey(t)?(n=this.pointers.getKey(t),n.touch=this.isPointerTouch(e)):(n={id:t,touch:this.isPointerTouch(e),startPoint:r,startTime:Or(),point:r,track:[],swipeCanceled:!1,dragStartEvents:[]},this.addBreadCrumb(n,r),this.pointers.setKey(t,n)),n.lastEvent=e,this.lastPointer=n,n},i.prototype.isPointerTouch=function(e){if(typeof Touch<"u"&&e instanceof Touch)return!0;if(typeof PointerEvent<"u"&&e instanceof PointerEvent&&P(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(P(e.type)&&e.type.match(/^mouse/))return!1;return!0},i.prototype.resetPointer=function(e,t){var r=this.getPointerPoint(t);e.startTime=Or(),e.startPoint={x:r.x,y:r.y},e.point={x:r.x,y:r.y},e.track=[],e.swipeCanceled=!1},i.prototype.addBreadCrumb=function(e,t){e.track.push({timestamp:Or(),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}:!1)},i.prototype.unlockWheel=function(){window.removeEventListener(this._pointerEvents.wheel,this.wheelLockEvent)},i.prototype.isLocalElement=function(e,t,r){var n=this.getCache("local_pointer_"+e.id);if(P(n))return n;var s=Du(t)||document;if(s.elementFromPoint){var o=s.elementFromPoint(e.point.x,e.point.y),l=o&&Pd(t,o);return this.setCache("local_pointer_"+e.id+"_"+r,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 r=["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"],n=0;n<r.length;n++)r[n]in t.style&&this.setTemporaryStyle(e,r[n],"none");this.setTemporaryStyle(e,"tapHighlightColor","rgba(0, 0, 0, 0)")}},i.prototype.unprepElement=function(e){var t=e.element;if(t){for(var r=["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"],n=0;n<r.length;n++)r[n]in t.style&&this.restoreStyle(e,r[n]);this.restoreStyle(e,"tapHighlightColor")}},i.prototype.getHitOption=function(e,t){var r=e.hitOptions[t];return typeof r>"u"&&(r=this.hitOptions[t]),r},i.prototype.getHoverOption=function(e,t){var r=e.hoverOptions[t];return typeof r>"u"&&(r=this.hoverOptions[t]),r},i.prototype.getSwipeOption=function(e,t){var r=e.swipeOptions[t];return typeof r>"u"&&(r=this.swipeOptions[t]),r},i.prototype.getKeyboardOption=function(e,t){var r=e.keyboardOptions[t];return typeof r>"u"&&(r=this.keyboardOptions[t]),r},i.prototype.getMouseOption=function(e,t){var r=e.mouseOptions[t];return typeof r>"u"&&(r=this.mouseOptions[t]),r},i.prototype.getInertiaOption=function(e,t,r){var n=e.inertiaOptions.getKey(t),s;return n&&P(n[r])?s=n[r]:s=this.inertiaOptions.getKey(t)[r],s},i.prototype.stopInertia=function(e){for(var t,r=["move","resize"],n=0;n<r.length;n++)if(t=r[n],e.inertias.hasKey(t)){var s=e.inertias.getKey(t);if(s){s.dispose();continue}}},i.prototype.swiping=function(e,t){var r=Or();return t.swipeCanceled||!e.swipeable?!1:Math.abs(t.startPoint.y-t.point.y)<this.getSwipeOption(e,"verticalThreshold")&&t.startTime>r-this.getSwipeOption(e,"time")},i.prototype.swiped=function(e,t){var r=Or();return t.swipeCanceled?!1: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>r-this.getSwipeOption(e,"time")},i.prototype.applyCursorOverStyle=function(e){var t=e.cursorOptions;if(P(t.overStyle))for(var r=0;r<t.overStyle.length;r++)Cd(e.element,t.overStyle[r].property,t.overStyle[r].value)},i.prototype.applyCursorDownStyle=function(e,t){if(!(t&&t.touch)){var r=e.cursorOptions.downStyle;if(e.downPointers.contains(t)&&P(r))for(var n=0;n<r.length;n++)this.setTemporaryStyle(this.body,r[n].property,r[n].value),this.setTemporaryStyle(e,r[n].property,r[n].value)}},i.prototype.restoreCursorDownStyle=function(e,t){if(!(t&&t.touch)){var r=e.cursorOptions.downStyle;if(e.downPointers.contains(t)&&P(r))for(var n=0;n<r.length;n++)this.restoreStyle(this.body,r[n].property),this.restoreStyle(e,r[n].property)}},i.prototype.setGlobalStyle=function(e){for(var t=pe().body,r=Xe(e)?e:[e],n=0;n<r.length;n++)this.setTemporaryStyle(t,r[n].property,r[n].value)},i.prototype.restoreGlobalStyle=function(e){for(var t=pe().body,r=Xe(e)?e:[e],n=0;n<r.length;n++)this.restoreStyle(t,r[n].property)},i.prototype.isGlobalElement=function(e){return document.body===e.element},i.prototype.moved=function(e,t,r){r===void 0&&(r=300);var n=this.getShift(e);return Math.abs(n.x)>t||Math.abs(n.y)>t},i.prototype.old=function(e,t){return t===void 0&&(t=300),Or()-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 r,n=0;n<e.track.length;n++)if(e.track[n].timestamp>=t){r=e.track[n];break}return r},i.prototype.pointerExists=function(e,t){var r=!1;return e.each(function(n){n!=t&&(r=n.point.x==t.point.x&&n.point.y==t.point.y)}),r},i.prototype.getInteraction=function(e){return new gd(e)},i.prototype.setTemporaryStyle=function(e,t,r){var n=e.element;P(n.style[t])&&!e.replacedStyles.hasKey(t)&&e.replacedStyles.setKey(t,n.style[t]),Cd(n,t,r)},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){I(e.replacedStyles.iterator(),function(t){var r=t[0],n=t[1];e.element.style[r]=n,e.replacedStyles.removeKey(r)})},i.prototype.dispose=function(){this.isDisposed()||(a.prototype.dispose.call(this),this.restoreAllStyles(this.body),this.unlockWheel())},i.prototype.log=function(e,t,r){var n=!0;if(n){if(t.changedTouches){for(var s=0;s<t.changedTouches.length;s++)this.logTouch(e,t.type,t.changedTouches[s]);return}var o="";if(t.pointerType)switch(t.pointerType){case 2:o="touch";break;case 4:o="mouse";break;default:o=t.pointerType;break}else typeof TouchEvent<"u"&&t instanceof TouchEvent?o="touch":t.type.match(/^mouse/)?o="mouse":o="???";var l="";P(t.identifier)?l=t.identifier:P(t.pointerId)?l=t.pointerId:l="???",console.log(r?e+" ("+r.uid+") "+t.type+" "+o+" "+l:e+" "+t.type+" "+o+" "+l)}},i.prototype.areTransformed=function(e){var t=this.transformedObjects.length;if(e)for(var r=Xe(e)?e:[e],n=0;n<r.length;n++)this.transformedObjects.contains(r[n])&&t--;return t>0},i.prototype.logTouch=function(e,t,r){console.log(e+" "+t+" touch "+r.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})(Et);var Od=null;function pe(){return Od==null&&(Od=new gy),Od}var Ea=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="Rectangle",e.element=e.paper.add("rect"),e.applyTheme(),e}return i.prototype.draw=function(){a.prototype.draw.call(this);var e=this._positionPrecision;this.pixelPerfect&&(e=0);var t=E(this.innerWidth,e),r=E(this.innerHeight,e);this.element.attr({width:t,height:r})},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})(ee);C.registeredClasses.Rectangle=Ea;var se=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e._purposes={stroke:ie("#e5e5e5"),fill:ie("#f3f3f3"),primaryButton:ie("#6794dc"),primaryButtonHover:ie("#6771dc"),primaryButtonDown:ie("#68dc75"),primaryButtonActive:ie("#68dc75"),primaryButtonText:ie("#FFFFFF"),primaryButtonStroke:ie("#FFFFFF"),secondaryButton:ie("#d9d9d9"),secondaryButtonHover:ie("#d9d9d9").brighten(-.25),secondaryButtonDown:ie("#d9d9d9").brighten(-.35),secondaryButtonActive:ie("#d9d9d9").brighten(.35),secondaryButtonText:ie("#000000"),secondaryButtonStroke:ie("#FFFFFF"),grid:ie("#000000"),background:ie("#ffffff"),alternativeBackground:ie("#000000"),text:ie("#000000"),alternativeText:ie("#FFFFFF"),disabledBackground:ie("#999999"),positive:ie("#67dc75"),negative:ie("#dc6788")},e.className="InterfaceColorSet",e.applyTheme(),e}return i.prototype.debug=function(){},i.prototype.getFor=function(e){return this._purposes[e]},i.prototype.setFor=function(e,t){this._purposes[e]=t},i})(st);C.registeredClasses.InterfaceColorSet=se;var U=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e._childrenByLayout=[],e._childrenDisposers=new Oe,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 Bi(e._childrenDisposers)),e.children.events.on("inserted",e.handleChildAdded,e),e.children.events.on("removed",e.handleChildRemoved,e),e.applyTheme(),e}return i.prototype.handleChildAdded=function(e){this.processChild(e.newValue)},i.prototype.processChild=function(e){try{this._childrenDisposers.insertKey(e.uid,new Fe([e.events.on("transformed",this.handleChildTransform,this),e.events.on("zIndexChanged",this.sortAndAdd,this)]))}catch{}if(this.element){var t=this.element;t.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;if(this._childrenDisposers.removeKey(t.uid),this.element){var r=this.element;r.removeElement(t.group)}t.isMeasured&&this.invalidateLayout(),this.dispatchImmediately("childremoved",{type:"childremoved",oldValue:t})},i.prototype.handleChildTransform=function(e){var t=e.target;t.isMeasured&&this.invalidateLayout()},i.prototype.invalidateLayout=function(){this.layoutInvalid||this.disabled||this.isTemplate||this.layout=="none"||this.__disabled||(this.layoutInvalid=!0,C.addToInvalidLayouts(this),Se.requestFrame())},i.prototype.invalidate=function(){a.prototype.invalidate.call(this),this.invalidateLayout()},i.prototype.deepInvalidate=function(){a.prototype.invalidate.call(this),H(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 ve),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)this._childrenByLayout=this.children.values;else{var t=[],r=[];I(this.children.iterator(),function(n){e.layout=="horizontal"||e.layout=="grid"?S(n.percentWidth)?r.push(n):t.push(n):e.layout=="vertical"&&S(n.percentHeight)?r.push(n):t.push(n)}),this._childrenByLayout=t.concat(r)}this.calculateRelativeSize()},i.prototype.calculateRelativeSize=function(){var e=this,t=0,r=0;H(this._childrenByLayout,function(n){n.isMeasured&&(S(n.percentWidth)&&(t+=n.percentWidth),S(n.percentHeight)&&(r+=n.percentHeight))}),H(this._childrenByLayout,function(n){n.isMeasured&&(e.layout=="horizontal"&&(S(n.percentWidth)&&(n.relativeWidth=n.percentWidth/t),S(n.percentHeight)&&(n.relativeHeight=n.percentHeight/100)),e.layout=="vertical"&&(S(n.percentHeight)&&(n.relativeHeight=n.percentHeight/r),S(n.percentWidth)&&(n.relativeWidth=n.percentWidth/100)),e.layout=="grid"&&(S(n.percentHeight)&&(n.relativeHeight=n.percentHeight/100),S(n.percentWidth)&&(n.relativeWidth=n.percentWidth/100))),(e.layout=="absolute"||!n.isMeasured)&&(S(n.percentWidth)&&(n.relativeWidth=n.percentWidth/100),S(n.percentHeight)&&(n.relativeHeight=n.percentHeight/100))})},i.prototype.addChildren=function(){if(this.element){var e=ma(this.children.values),t=e.map(function(l,u){return{idx:u,data:l}});t.sort(function(l,u){var h=l.data.zIndex||0,p=u.data.zIndex||0;return h<p?-1:h>p?1:l.idx-u.idx}),e=t.map(function(l){return l.data});var r=this.element,n=!0;if(r.node&&r.node.childNodes){for(var s=0,o=r.node.childNodes.length;s<o;s++)if(r.node.childNodes[s]!=e[s].group.node){n=!1;break}}n||(H(e,function(l){l.group&&r.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(){a.prototype.handleGlobalScale.call(this),this.children.each(function(e){e.handleGlobalScale()})},i.prototype.createBackground=function(){return new Ea},i.prototype.processBackground=function(){var e=this._background;e&&(e.isMeasured=!1,this._background.fill=new se().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;C.removeFromInvalidLayouts(this),this.layoutInvalid=!1,this._availableWidth=this.innerWidth,this._availableHeight=this.innerHeight;var t=0,r=0,n=!0;this.children&&(this.sortChildren(),H(this._childrenByLayout,function(s){var o,l;if(S(s.relativeWidth)?(o=E(e._availableWidth*s.relativeWidth,2),e.layout=="horizontal"&&(o-=s.pixelMarginRight+s.pixelMarginLeft)):e.layout=="horizontal"&&s.invalid&&s.validate(),S(s.relativeHeight)?(l=E(e._availableHeight*s.relativeHeight,2),e.layout=="vertical"&&(l-=s.pixelMarginTop+s.pixelMarginBottom)):e.layout=="vertical"&&s.invalid&&s.validate(),s.invalid==!1){if(S(s.relativeWidth)&&(s.maxWidth=o),S(s.relativeHeight)&&(s.maxHeight=l),s.isMeasured){e.layout=="horizontal"&&(S(s.percentWidth)||s.measuredWidth>0&&(e._availableWidth-=s.measuredWidth+s.pixelMarginLeft+s.pixelMarginRight)),e.layout=="vertical"&&(S(s.percentHeight)||s.measuredHeight>0&&(e._availableHeight-=s.measuredHeight+s.pixelMarginTop+s.pixelMarginBottom));var u=s.measuredWidth,h=s.measuredHeight;s.align!="none"&&(u+=s.pixelMarginLeft+s.pixelMarginRight),s.valign!="none"&&(h+=s.pixelMarginTop+s.pixelMarginBottom),t=Math.max(t,u),r=Math.max(r,h)}}else s.isMeasured&&(S(s.relativeWidth)&&s.maxWidth!=o&&(s.maxWidth=o,n=!1),S(s.relativeHeight)&&s.maxHeight!=l&&(s.maxHeight=l,n=!1))})),this._absoluteWidth=t,this._absoluteHeight=r,n&&this.arrange()},i.prototype.arrange=function(){var e=this,t=this.children,r=0,n=0,s=he(this.innerWidth,this._absoluteWidth),o=he(this.innerHeight,this._absoluteHeight),l,u,h,p,d=this.pixelPaddingLeft,c=this.pixelPaddingRight,f=this.pixelPaddingTop,m=this.pixelPaddingBottom,y=0,v=0,b=0,x=0,_=[],$=[],O,F,w,D=this.maxWidth,B=this.maxHeight,L=this.minWidth,M=this.minHeight,Q=ma(t.values);if(this.reverseOrder&&Q.reverse(),this.layout=="grid"){F=D,O=1;for(var ae=0,K=Q.length;ae<K;ae++){var z=Q[ae];if(z.isMeasured&&!z.disabled&&!z.__disabled){var Te=z.measuredWidth;Te<F&&(F=Te),Te>O&&(O=Te)}}F=G(F,1,D),O=G(O,1,D),this.fixedWidthGrid?w=D/O:w=D/F,w=he(1,Math.floor(w)),w=ye(this.maxColumns,w),_=this.getColumnWidth(Q,w,O)}for(var ue,Me,ct,qe,ae=0,K=Q.length;ae<K;ae++){var z=Q[ae];if(z.isMeasured&&!z.disabled&&!z.__disabled){var ne=void 0,Ne=void 0,Ze=z.pixelMarginLeft,zt=z.pixelMarginRight,Xt=z.pixelMarginTop,Bt=z.pixelMarginBottom,ii=z.measuredWidth,_i=z.measuredHeight,mi=void 0,nr=void 0,sr=void 0,Yn=void 0;switch(this.layout){case"none":break;case"absolute":switch(z.align){case"left":ne=Ze-z.maxLeft;break;case"center":ne=(s-ii)/2-z.maxLeft;break;case"right":ne=s-zt-z.maxRight;break;default:z.x instanceof de||(ne=z.pixelX);break}switch(z.valign){case"top":Ne=Xt-z.maxTop;break;case"middle":Ne=(o-_i)/2-z.maxTop;break;case"bottom":Ne=o-Bt-z.maxBottom;break;default:z.y instanceof de||(Ne=z.pixelY);break}break;case"vertical":switch(z.align){case"left":ne=Ze-z.maxLeft;break;case"center":ne=(s-ii)/2-z.maxLeft;break;case"right":ne=s-zt-z.maxRight;break;default:ne=z.pixelX;break}Ne=v+Xt-z.maxTop,v=Ne+z.maxBottom+Bt;break;case"horizontal":switch(z.valign){case"top":Ne=Xt-z.maxTop;break;case"middle":Ne=(o-_i)/2-z.maxTop;break;case"bottom":Ne=o-Bt-z.maxBottom;break;default:Ne=z.pixelY;break}ne=y+Ze-z.maxLeft,y=ne+z.maxRight+zt;break;case"grid":switch(ne=y+Ze-z.maxLeft,z.valign){case"top":Ne=v+Xt-z.maxTop;break;case"middle":Ne=v+(o-_i)/2-z.maxTop;break;case"bottom":Ne=v+o-Bt-z.maxBottom;break;default:Ne=v-z.maxTop;break}y+=_[x],$[b]=he($[b],_i),x++;var Ih=_[x];if(S(Ih)||(Ih=O),y>ye(this.innerWidth,D)-Ih+1&&x<w){w=x,y=0,v=0,b=0,x=0,_=this.getColumnWidth(Q,w,O),$=[],ae=-1;continue}x>=w&&(x=0,v+=$[b],b++,y=0);break}this.layout!=="none"&&(z.moveTo({x:ne,y:Ne}),mi=ne+z.maxLeft-Ze,nr=ne+z.maxRight+zt,sr=Ne+z.maxTop-Xt,Yn=Ne+z.maxBottom+Bt,(nr>u||!S(u))&&(u=nr),(mi<l||!S(l))&&(l=mi),(sr<h||!S(h))&&(h=sr),(Yn>p||!S(p))&&(p=Yn),(nr>Me||!S(Me))&&(Me=nr),(mi<ue||!S(ue))&&(ue=mi),(sr<ct||!S(ct))&&(ct=sr),(Yn>qe||!S(qe))&&(qe=qe))}else z.validatePosition()}if(this.layout=="none"){var qn=this.bbox;l=qn.x,u=qn.x+qn.width,h=qn.y,p=qn.y+qn.height}S(l)||(l=0,ue=0),S(u)||(u=this._availableWidth,Me=u),S(h)||(h=0,ct=0),S(p)||(p=this._availableHeight,qe=p),S(ct)||(ct=0),S(qe)||(qe=ct),S(ue)||(ue=0),S(Me)||(Me=ue),r=u-l,n=p-h,S(this.relativeWidth)&&(r=D-d-c,l=0,u=r),S(this.relativeHeight)&&(n=B-f-m,h=0,p=n),S(this._pixelWidth)&&(l=0,r=this._pixelWidth-d-c),S(L)&&r<L&&(l=0,r=this.minWidth-d-c),S(this._pixelHeight)&&(h=0,n=this._pixelHeight-f-m),S(M)&&n<M&&(h=0,n=M-f-m);var kl=Me-ue,Il=qe-ct;if(this.layout!="none"&&(this.contentAlign||this.contentValign)&&t.length>0){var Ml,Nl,Rl=r,Bl=n;Rl<kl&&(Rl=kl),Bl<Il&&(Bl=Il),this.contentAlign=="center"&&(Ml=(Rl-kl)/2),this.contentAlign=="right"&&(Ml=Rl-kl),this.contentValign=="middle"&&(Nl=(Bl-Il)/2),this.contentValign=="bottom"&&(Nl=Bl-Il),S(Ml)&&I(t.iterator(),function(Ft){var Gn=Ft.maxLeft,Li=Ml;e.layout=="horizontal"&&(Ft.x=Ft.pixelX+Li),e.layout=="grid"&&(Ft.x=Ft.pixelX+Li),e.layout=="vertical"&&(Li+=Ft.pixelMarginLeft,Ft.align=="none"&&(Ft.x=Li-Gn)),e.layout=="absolute"&&(Li+=Ft.pixelMarginLeft,Ft.align=="none"&&(Ft.x=Li-Gn))}),S(Nl)&&I(t.iterator(),function(Ft){var Gn=Ft.maxTop,Li=Nl;e.layout=="horizontal"&&(Li+=Ft.pixelMarginTop,Ft.valign=="none"&&(Ft.y=Li-Gn)),e.layout=="grid"&&(Li+=Ft.pixelMarginTop,Ft.y=Li-Gn),e.layout=="vertical"&&(Ft.y=Ft.pixelY+Li),e.layout=="absolute"&&(Li+=Ft.pixelMarginTop,Ft.valign=="none"&&(Ft.y=Li-Gn))})}var Mh=this.bbox;r=he(r,L),n=he(n,M),this.contentWidth=r,this.contentHeight=n,r=ye(r,D),n=ye(n,B),this._bbox={x:l,y:h,width:r,height:n};var ub=this.maxLeft,hb=this.maxTop,pb=this.maxBottom,db=this.maxRight;if(this.measure(),(ub!=this.maxLeft||db!=this.maxRight||hb!=this.maxTop||pb!=this.maxBottom)&&this.events.isEnabled("transformed")){var zc={type:"transformed",target:this};Mh&&(zc.dummyData=Mh.width+" "+r+" "+Mh.height+" "+n),this.events.dispatchImmediately("transformed",zc)}this.dispatchImmediately("layoutvalidated")},i.prototype.updateCenter=function(){a.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,r){var n=this,s=[],o=0;return H(e,function(l){l.isMeasured&&!l.disabled&&!l.__disabled&&(n.fixedWidthGrid?s[o]=r:s[o]=he(s[o],l.measuredWidth+l.pixelMarginRight+l.pixelMarginLeft),o++,o==t&&(o=0))}),s},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,r=e.y,n=.5;return t>=-n&&t<=this.pixelWidth+n&&r>=-n&&r<=this.pixelHeight+n},i.prototype.copyFrom=function(e){var t=this;a.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)),I(e.children.iterator(),function(r){if(r.shouldClone){var n=r.clone();n.parent=t}})},Object.defineProperty(i.prototype,"preloader",{get:function(){var e=this._preloader;if(e)return e;if(this.parent)return this.parent.preloader},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,r=a.prototype.setPaper.call(this,e);return r&&(this._background&&(this._background.paper=e,this._background.topParent=this.topParent),this.children.each(function(n){n.setPaper(e),n.topParent=t.topParent})),r},i.prototype.removeFromInvalids=function(){a.prototype.removeFromInvalids.call(this),C.removeFromInvalidLayouts(this)},i.prototype.setDataItem=function(e){this._dataItem!=e&&(I(this.children.iterator(),function(t){t.dataItem=e}),this._background&&(this._background.dataItem=e)),a.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(),a.prototype.dispose.call(this)},i.prototype.setState=function(e,t,r){var n=e;return e instanceof Cn&&(n=e.name),this.setStateOnChildren&&I(this.children.iterator(),function(s){s.setState(n,t,r),n!="active"&&(s.isActive=!1)}),this._background&&this._background.setState(n),this.setStateOnSprites.length&&H(this.setStateOnSprites,function(s){s.setState(n,t,r)}),a.prototype.setState.call(this,e,t,r)},i.prototype.setActive=function(e){a.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;Dt(this.children.iterator(),function(r){return!r.__disabled&&!r.disabled&&!r.isReady()?(t=!1,!1):!0}),vs(this._shouldBeReady,function(r){return!r.__disabled&&!r.disabled&&!r.isReady()?(t=!1,!1):!0}),t?a.prototype.dispatchReady.call(this):C.events.once("exitframe",function(){e.dispatchReady(),Se.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))}),a.prototype._systemUpdate.call(this,e)},i.prototype._systemValidatePositions=function(){this.children.each(function(e){e.positionInvalid&&e.validatePosition()}),a.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 Fe([t.events.on("hit",t.handleTapToActivate,t,!1),t.events.on("down",t.initTapTimeout,t,!1),t.events.on("track",t.initTapTimeout,t,!1),pe().body.events.on("down",function(r){pe().isLocalElement(r.pointer,t.paper.svg,t.uid)||t.handleTapToActivateDeactivation()},t,!1)])}),pe()},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=zo(e);if(t){this.htmlContainer=t;var r=this.svgContainer;r.htmlElement=t,r.htmlElement.appendChild(r.SVGContainer),r.initSensor(),r.measure()}else ce(e)&&e!=""&&Se.log("html container '"+e+"' not found")},i.prototype.hasLicense=function(){if(ge.commercialLicense)return!0;for(var e=0;e<ge.licenses.length;e++)if(ge.licenses[e].match(/^CH.{5,}/i))return!0;return!1},i})(ee);C.registeredClasses.Container=U;function vy(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];ge.verbose&&console&&console.log.apply(console,ca(a))}function Bs(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];ge.suppressWarnings||console&&console.warn.apply(console,ca(a))}var by=(function(){function a(){this._isPaused=!1,this.animations=[],this.uid=C.getUniqueId(),this.dummyCounter=0,this._frameRequested=!1,this.updateStepDuration=45,this.time=Date.now()}return a.prototype.reportTime=function(i,e){this.dummyCounter<6,e&&(this.time=Date.now())},a.prototype.update=function(){var i=this;if(!this._isPaused){this._frameRequested=!1;var e=Date.now();C.dispatchImmediately("enterframe");var t=[];for(var r in C.invalidDatas)if(hr(C.invalidDatas,r)){for(var n=C.invalidDatas[r];n.length>0;){var s=n[0],o=s.dataProvider;if(s.isDisposed())oe(n,s);else if(o&&o.dataInvalid)try{if(o.validateData(),o.dataValidationProgress<1)break}catch(p){oe(n,o),o.raiseCriticalError(p)}else try{if(s.validateData(),s.dataValidationProgress<1)break}catch(p){oe(n,s),s.raiseCriticalError(p)}}if(Date.now()-e>this.updateStepDuration)break}for(;C.invalidRawDatas.length>0;){var s=C.invalidRawDatas[0];if(s.isDisposed())oe(C.invalidRawDatas,s);else try{s.validateRawData()}catch(d){oe(C.invalidRawDatas,s),s.raiseCriticalError(d)}}for(;C.invalidDataItems.length>0;){var s=C.invalidDataItems[0],o=s.dataProvider;if(!(s.isDisposed()||s.dataInvalid||o&&o.dataInvalid))try{s.validateDataItems()}catch(c){oe(C.invalidDataItems,s),s.raiseCriticalError(c)}oe(C.invalidDataItems,s)}for(;C.invalidDataRange.length>0;){var s=C.invalidDataRange[0],o=s.dataProvider;if(!(s.isDisposed()||s.dataInvalid||o&&o.dataInvalid))try{s.validateDataRange(),s.skipRangeEvent||s.dispatchImmediately("datarangechanged"),s.skipRangeEvent=!1}catch(c){oe(C.invalidDataRange,s),s.raiseCriticalError(c)}oe(C.invalidDataRange,s)}var l=[];te(C.invalidLayouts,function(p){i.validateLayouts(p)}),te(C.invalidPositions,function(p){i.validatePositions(p)});var u=!1;if(e=Date.now(),te(C.invalidSprites,function(p,d){for(var c=0;d.length>0;){if(i.validateLayouts(p),i.validatePositions(p),c++,c==5){if(Date.now()-e>i.updateStepDuration)break;c=0}var f=d[d.length-1];if(f&&!f.isDisposed()){if(!f._systemCheckIfValidate())l.push(f);else if(!i.checkIfValidate2(f))l.push(f);else try{f._systemUpdate(l)}catch(m){f.invalid=!1,oe(d,f),f.raiseCriticalError(m)}f.invalid=!1}oe(d,f)}C.invalidSprites[p]=C.invalidSprites[p].concat(l)}),te(C.invalidSprites,function(p,d){d.length>0&&(u=!0)}),te(C.invalidDatas,function(p,d){d.length>0&&(u=!0)}),H(ma(this.animations),function(p){p.update()}),te(C.invalidLayouts,function(p){i.validateLayouts(p)}),te(C.invalidPositions,function(p){i.validatePositions(p)}),jp(),te(C.invalidLayouts,function(p){i.validateLayouts(p)}),te(C.invalidPositions,function(p){i.validatePositions(p)}),C.dispatchImmediately("exitframe"),(u||this.animations.length>0||t.length>0)&&this.requestFrame(),this.updateStepDuration<200){var h=!0;te(C.invalidDatas,function(p,d){d.length>0&&(h=!1)}),te(C.invalidSprites,function(p,d){d.length>0&&(h=!1)}),h&&(this.updateStepDuration=200)}}},a.prototype.checkIfValidate2=function(i){return!(i.dataItem&&i.dataItem.component&&i.dataItem.component.dataInvalid&&!i.dataItem.component.isTemplate)},a.prototype.requestFrame=function(){var i=this;this._frameRequested||(cu(function(){i.update()}),this._frameRequested=!0)},a.prototype.softInvalidate=function(i){var e=this;i.children.each(function(t){t instanceof U&&e.softInvalidate(t),t.measureFailed&&(Hp(t,"Label")?t.hardInvalidate():t.invalidate(),t.measureFailed=!1)})},a.prototype.validatePositions=function(i){for(var e=C.invalidPositions[i];e.length>0;){var t=e[e.length-1];if(t.isDisposed())oe(e,t);else try{t._systemValidatePositions()}catch(r){t.positionInvalid=!1,oe(e,t),t.raiseCriticalError(r)}}},a.prototype.validateLayouts=function(i){for(var e=C.invalidLayouts[i];e.length>0;){var t=e[e.length-1];if(t.isDisposed())oe(e,t);else try{t.children.each(function(r){r._systemValidateLayouts()}),t.validateLayout()}catch(r){t.layoutInvalid=!1,oe(e,t),t.raiseCriticalError(r)}}},a.prototype.log=function(i){vy(i)},Object.defineProperty(a.prototype,"isPaused",{get:function(){return this._isPaused},set:function(i){this._isPaused=i,i||(this._frameRequested=!1,this.requestFrame())},enumerable:!0,configurable:!0}),a.VERSION="4.10.39",a})();var Se=new by;function Sy(a,i,e){return i+(e-i)*a}function ux(a,i,e){return new de(Sy(a,i.percent,e.percent))}function hx(a,i,e){var t=new be(mn(i.rgb,e.rgb,a));return i.alpha!=e.alpha&&(t.alpha=i.alpha+(e.alpha-i.alpha)*a),t}function xy(a,i){return i+a.charAt(0).toUpperCase()+a.substr(1)}var fr=(function(){function a(i){this._disposer=new Ce(function(){for(;i.length!==0;)i[0].dispose()})}return a.prototype.isDisposed=function(){return this._disposer.isDisposed()},a.prototype.dispose=function(){this._disposer.dispose()},a})();var Gt=(function(a){T(i,a);function i(e,t,r,n){var s=a.call(this)||this;return s.duration=0,s.easing=pd,s.progress=0,s._loop=0,s._pause=!1,s._delayTimeout=null,s._time=0,s._isFinished=!1,s.className="Animation",ge.animationsEnabled===!1&&(r=0),s.object=e,s.animationOptions=uu(t),s.duration=r,n&&(s.easing=n),s.applyTheme(),s}return i.prototype.debug=function(){},i.prototype.dispose=function(){a.prototype.dispose.call(this),this.pause()},i.prototype.delay=function(e){var t=this;if(e>0){this.pause(),bi(this.object.animations,this);var r=setTimeout(function(){t._delayTimeout=null,t.start()},e);this._delayTimeout=new Ce(function(){clearTimeout(r)})}return this},i.prototype._start=function(){this._isFinished=!1,this._delayTimeout&&(this.removeDispose(this._delayTimeout),this._delayTimeout=null),this.stopSameAnimations(),this._pause=!1,bi(Se.animations,this),bi(this.object.animations,this),Se.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(P(t.from)||(t.childObject?t.from=t.childObject[t.property]:(t.from=this.object[t.property],P(t.from)||(t.from=md[t.property]))),t.from==t.to)oe(this.animationOptions,t);else if(!P(t.from)||!(t.from instanceof de)&&t.to instanceof de||t.from instanceof de&&!(t.to instanceof de))this.staticOptions.push(t),oe(this.animationOptions,t);else if(S(t.to))if(t.updateMethod=Sy,t.from instanceof de){var r=this.object[xy(t.property,"pixel")];isNaN(r)?(this.staticOptions.push(t),oe(this.animationOptions,t)):t.from=r}else isNaN(t.from)&&(this.staticOptions.push(t),oe(this.animationOptions,t));else if(t.to instanceof be)t.from?t.updateMethod=hx:(this.staticOptions.push(t),oe(this.animationOptions,t));else if(t.to instanceof de){if(t.updateMethod=ux,!isNaN(t.from)){var r=this.object[xy(t.property,"relative")];isNaN(r)||(t.from=N(r*100))}}else this.staticOptions.push(t),oe(this.animationOptions,t)}if(this.applyStaticOptions(),this.events.isEnabled("animationstarted")){var n={type:"animationstarted",target:this,progress:this.progress};this.events.dispatchImmediately("animationstarted",n)}return this.update(),this.duration===0&&this.end(),this},i.prototype.loop=function(e){return S(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),oe(Se.animations,this),oe(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;H(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,H(this.animationOptions,function(n){if(n.updateMethod&&P(n.from)){var s=n.updateMethod(e,n.from,n.to);n.childObject?n.childObject[n.property]=s:t.object[n.property]=s}}),this.progress=e,this.events.isEnabled("animationprogress")){var r={type:"animationprogress",target:this,progress:this.progress};this.events.dispatchImmediately("animationprogress",r)}Se.requestFrame()},i.prototype.update=function(){if(!this._pause){var e=void 0;this._time=G(Date.now()-this._startTime,0,this.duration);var t=this._time/this.duration;e=this.easing(t),(this.duration==0||!S(e)||t>=1)&&(e=1),this.setProgress(e),E(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;H(ma(this.object.animations),function(t){if(t!==e&&!t.delayed){var r=[];H(e.animationOptions,function(n){H(t.animationOptions,function(s){n.property==s.property&&n.childObject==s.childObject&&(r.push(s),t.animationOptions.length==0&&t.kill())})}),H(r,function(n){oe(t.animationOptions,n)})}})},i.prototype.asFunction=function(e){return e=="easing"||a.prototype.asIs.call(this,e)},i})(Et);var Wa=(function(){function a(i){this._isDisposed=!1,this._x=0,this._y=0,this._rotationY=0,this._rotationX=0,this._rotation=0,this._scale=1,typeof i=="string"?this.node=document.createElementNS(ja,i):this.node=i}return a.prototype.removeNode=function(){this.node&&this.node.parentNode&&this.node.parentNode.removeChild(this.node)},Object.defineProperty(a.prototype,"transformString",{get:function(){if(this.node)return this._transformString},enumerable:!0,configurable:!0}),a.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)},a.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},a.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(a.prototype,"content",{get:function(){return this.node.innerHTML||""},set:function(i){this.node.innerHTML=i},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"textContent",{get:function(){return this.node.textContent||""},set:function(i){this.node.textContent=i},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"x",{get:function(){return this._x},set:function(i){this._x!=i&&(this._x=i,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"y",{get:function(){return this._y},set:function(i){this._y!=i&&(this._y=i,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"rotation",{get:function(){return this._rotation},set:function(i){this._rotation!=i&&(this._rotation=i,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"rotationX",{get:function(){return this._rotationX},set:function(i){this._rotationX!=i&&(this._rotationX=i,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"rotationY",{get:function(){return this._rotationY},set:function(i){this._rotationY!=i&&(this._rotationY=i,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"scale",{get:function(){return this._scale},set:function(i){this._scale!=i&&(this._scale=i,this.transform())},enumerable:!0,configurable:!0}),a.prototype.removeAttr=function(i){this.node.removeAttribute(i)},a.prototype.attr=function(i){var e=this;return te(i,function(t,r){P(r)?e.node.setAttribute(t,r):e.node.removeAttribute(t)}),this},a.prototype.getAttr=function(i){return this.node.getAttribute(i)},a.prototype.attrNS=function(i,e,t){return this.node.setAttributeNS(i,e,t),this},a.prototype.getAttrNS=function(i,e){return this.node.getAttributeNS(i,e)},a.prototype.removeStyle=function(i){this.node.style[i]=null,delete this.node.style[i]},a.prototype.getStyle=function(i){return this.node.style[i]},a.prototype.addStyle=function(i){var e=this;return te(i,function(t,r){P(r)?e.node.style[t]=r:e.removeStyle(t)}),this},a.prototype.addClass=function(i){Is(this.node,i)},a.prototype.removeClass=function(i){Ms(this.node,i)},a.prototype.setClass=function(i){this.node.setAttribute("class",i)},a.prototype.removeChildNodes=function(){for(;this.node.childNodes.length>0;)this.node.removeChild(this.node.firstChild)},a.prototype.isDisposed=function(){return this._isDisposed},a.prototype.dispose=function(){this.removeNode()},a})();var Go=(function(a){T(i,a);function i(e){return a.call(this,e)||this}return 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),r=0;r<t.length;r++)this.node.removeChild(t[r])},i})(Wa);var Cy=new Oe;function Py(a,i){i||(i="ampopup");var e=new se,t=e.getFor("text"),r=e.getFor("background");r.alpha=.8;var n=e.getFor("alternativeBackground");n.alpha=.05;var s=Cy.insertKeyIfEmpty(i,function(){var o=new Fe([new Ye(a,"."+i,{overflow:"visible",position:"absolute",top:"0",left:"0","z-index":"2000"}),new Ye(a,"."+i+"-curtain",{width:"100%",height:"100%",position:"absolute",top:"0",left:"0","z-index":"2001","background-color":r.hex,opacity:"0.5"}),new Ye(a,"."+i+"-header",{display:"block",width:"100%","min-height":"1.8em",background:n.rgba}),new Ye(a,"."+i+"-title",{"font-weight":"bold","font-size":"110%",padding:"0.5em 1.2em 0.5em 1em"}),new Ye(a,"."+i+"-content",{background:r.hex,"background-color":r.rgba,color:t.hex,display:"inline-block",position:"absolute",top:"0",left:"0","max-width":"90%","max-height":"90%",overflow:"auto","z-index":"2002"}),new Ye(a,"."+i+"-inside",{padding:"1em"}),new Ye(a,"."+i+"-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 ya(function(){Cy.removeKey(i),o.dispose()})});return s.increment()}var Uo=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.adapter=new gt(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 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(),a.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 r=t._elements.wrapper.getBoundingClientRect();t._elements.wrapper.style.width=r.width+"px",t._elements.wrapper.style.height=r.height+"px",t._sized=!0}if(t.dynamicResize)for(var n=t._elements.wrapper.getElementsByTagName("img"),s=0;s<n.length;s++){var o=n[s];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._bbox:(l=t._elements.wrapper.getBoundingClientRect(),t._elements.wrapper.style.opacity=""),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);break}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);break}}},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&&(pe().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 P(e)?S(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 r=document.createElement("a");r.className=e.closeClass;var n=document.createElement("div");n.className=e.headerClass;var s=document.createElement("div");s.innerHTML=this.title,s.className=e.titleClass,this.title||(s.style.display="none");var o=document.createElement("div");o.className=e.insideClass,o.innerHTML=this.content,this._IOs.wrapper=pe().getInteraction(t),this._IOs.header=pe().getInteraction(n),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=pe().getInteraction(r),this._disposers.push(this._IOs.close),r.style.visibility="hidden",t.setAttribute("role","dialog"),n.appendChild(r),n.appendChild(s),t.appendChild(n),t.appendChild(o),this.container.appendChild(t),this._elements.wrapper=t,this._elements.header=n,this._elements.content=o,this._elements.title=s,this._elements.close=r,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=pe().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(Py(Ns(this.container),this.classPrefix)),te(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=[pe().body.events.on("keyup",function(r){Si.isKey(r.event,"esc")&&e.closable&&e.close()}),this._IOs.close.events.on("hit",function(r){e.close()})];t.push(this._IOs.curtain.events.on("hit",function(r){e.showCurtain&&e.closable&&e.close()})),this._disposers.push(new Fe(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(){P(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){a.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})(Et);var Ko=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.adapter=new gt(e),e.className="Modal",e.showCurtain=!0,e.draggable=!1,e}return i})(Uo);var px=(function(){function a(){var i=this;this._targets=[],this._observer=new ResizeObserver(function(e){H(e,function(t){H(i._targets,function(r){r.target===t.target&&r.callback()})})})}return a.prototype.addTarget=function(i,e){this._observer.observe(i,{box:"content-box"}),this._targets.push({target:i,callback:e})},a.prototype.removeTarget=function(i){this._observer.unobserve(i),Ip(this._targets,function(e){return e.target!==i})},a})(),dx=(function(){function a(){this._targets=[]}return a.prototype.addTarget=function(i,e){var t=this;if(this._targets.length===0){var r=null,n=function(){var o=Date.now();(r===null||o>r+a.delay)&&(r=o,H(t._targets,function(l){var u=l.target.getBoundingClientRect();(u.width!==l.size.width||u.height!==l.size.height)&&(l.size=u,l.callback())})),t._timer=requestAnimationFrame(n)};this._timer=requestAnimationFrame(n)}var s=i.getBoundingClientRect();this._targets.push({target:i,callback:e,size:s})},a.prototype.removeTarget=function(i){Ip(this._targets,function(e){return e.target!==i}),this._targets.length===0&&cancelAnimationFrame(this._timer)},a.delay=200,a})(),ku=null;function cx(){return ku===null&&(typeof ResizeObserver<"u"?ku=new px:ku=new dx),ku}var $y=(function(){function a(i,e){this._disposed=!1,this._sensor=cx(),this._element=i,this._sensor.addTarget(i,e)}return a.prototype.isDisposed=function(){return this._disposed},a.prototype.dispose=function(){this._disposed||(this._disposed=!0,this._sensor.removeTarget(this._element))},Object.defineProperty(a.prototype,"sensor",{get:function(){return this._sensor},enumerable:!0,configurable:!0}),a.prototype.reset=function(){Bs("resizeSensor.reset() is no longer needed and can be removed")},a})();var Iu=[],Zo=(function(){function a(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(ot(window,"beforeprint",function(){t._printing=!0})),this._disposers.push(ot(window,"afterprint",function(){t._printing=!1}))),Iu.push(this);var r=document.createElement("div"),n=r.style;n.width="100%",n.height="100%",n.position="relative",i.appendChild(r),this.SVGContainer=r}return a.prototype.initSensor=function(){var i=this;this.resizeSensor&&this.resizeSensor.dispose();var e=function(){i.autoResize&&!i._printing&&i.measure()};this.resizeSensor=new $y(this.htmlElement,e),this._disposers.push(this.resizeSensor)},a.prototype.measure=function(){var i=od(this.htmlElement),e=ld(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),$d(this.SVGContainer)),t.maxWidth||(t.maxWidth=0),t.maxHeight||(t.maxHeight=0),this.cssScale=1,this.checkTransform(this.htmlElement))},Object.defineProperty(a.prototype,"container",{get:function(){return this._container},set:function(i){this._container=i,this.measure()},enumerable:!0,configurable:!0}),a.prototype.isDisposed=function(){return this._disposed},a.prototype.dispose=function(){this._disposed||oe(Iu,this),H(this._disposers,function(i){i.dispose()})},Object.defineProperty(a.prototype,"hideOverflow",{set:function(i){i?this.SVGContainer.style.overflow="hidden":this.SVGContainer.style.overflow=""},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"modal",{get:function(){return P(this._modal)||(this._modal=new Ko,this._modal.container=this.SVGContainer,this._disposers.push(this._modal)),this._modal},enumerable:!0,configurable:!0}),a.prototype.openModal=function(i,e){this.closeModal();var t=this.modal;return t.content=i,t.readerTitle=e||"",t.title=e||"",t.open(),t},a.prototype.closeModal=function(){this._modal&&this.modal.close()},Object.defineProperty(a.prototype,"popups",{get:function(){if(!P(this._popups)){var i=new Uo;i.container=this.SVGContainer,this._popups=new Le(i),this._disposers.push(new Pe(this._popups)),this._disposers.push(this._popups.template)}return this._popups},enumerable:!0,configurable:!0}),a.prototype.openPopup=function(i,e){var t=this.popups.create();return t.content=i,P(e)&&(t.title=e),t.open(),t},a.prototype.closeAllPopups=function(){this.popups.each(function(i){i.close()})},Object.defineProperty(a.prototype,"readerAlertElement",{get:function(){if(!P(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}),a.prototype.readerAlert=function(i){this.readerAlertElement.innerHTML=i},a.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 r=t.split("(")[1].split(")")[0].split(","),n=Number(r[0]),s=Number(r[1]),o=Math.sqrt(n*n+s*s);isNaN(o)||(this.cssScale*=o)}}}i.parentNode&&i.parentNode instanceof HTMLElement&&this.checkTransform(i.parentNode)}},a})();var Mu=(function(){function a(i,e){this.container=i,this.id=e;var t=document.createElementNS(ja,"svg");t.setAttribute("version","1.1"),t.setAttributeNS(Sd,"xmlns",ja),t.setAttributeNS(Sd,"xmlns:xlink",ks),t.setAttribute("role","group"),this.container.appendChild(t),this.defs=document.createElementNS(ja,"defs"),t.appendChild(this.defs),t.style.width="100%",t.style.height="100%",t.style.overflow="visible",this.svg=t}return a.prototype.add=function(i){return new Wa(i)},a.prototype.addGroup=function(i){return new Go(i)},a.prototype.append=function(i){i&&this.svg.appendChild(i.node)},a.prototype.appendDef=function(i){i&&this.defs.appendChild(i.node)},a.prototype.foreignObject=function(){var i=new Wa("foreignObject");return i},a.prototype.supportsForeignObject=function(){return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Extensibility","1.1")},a})();var wd=null;function wr(){if(wd===null){var a=document.createElement("div");a.hidden=!0,a.style.width="1px",a.style.height="1px",a.style.position="absolute",a.style.zIndex="-1000000",document.body.appendChild(a);var i=new Zo(a,!0);wd=new Mu(i.SVGContainer,"ghost")}return wd}var Fr=(function(a){T(i,a);function i(){var e=a.call(this)||this;e._elements=new ve,e.properties={},e.className="Pattern",e.width=10,e.height=10,e.x=0,e.y=0,e.patternUnits="userSpaceOnUse";var t=new se;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-"+C.getUniqueId(),e.element.attr({id:e.id}),e._disposers.push(e.element),e._disposers.push(new Pe(e._elements)),e.patternUnits=e.patternUnits,e.width=e.width,e.height=e.height,e.applyTheme(),e}return i.prototype.draw=function(){var e=this,t=this.element;if(t){t.removeChildNodes();var r=this.paper.add("rect");r.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(r),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}),I(this._elements.iterator(),function(n){n.rotation=e.rotation,n.rotationX=e.properties.rotationX,n.rotationY=e.properties.rotationY,e.element.add(n)})}},i.prototype.animate=function(e,t,r){return new Gt(this,e,t,r).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:wr()},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;a.prototype.copyFrom.call(this,e),te(e.properties,function(r,n){t[r]=n})},Object.defineProperty(i.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new fr(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&&P(e.elements)&&Xe(e.elements))for(var t=0,r=e.elements.length;t<r;t++){var n=e.elements[t];if(P(n.type)){var s=this.createEntryInstance(n);s instanceof st&&(s.config=n),this.addElement(P(n.typeProperty)?s[n.typeProperty]:s.element)}}a.prototype.processConfig.call(this,e)},i})(st);C.registeredClasses.Pattern=Fr;var Ht=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e._stops=new ve,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-"+C.getUniqueId(),e.element.attr({id:e.id}),e._disposers.push(e.element),e.applyTheme(),e}return i.prototype.validate=function(){var e=this,t=(this._rotation+90)*fs,r=Math.round(50+Math.sin(t+Math.PI)*50)+"%",n=Math.round(50+Math.cos(t)*50)+"%",s=Math.round(50+Math.sin(t)*50)+"%",o=Math.round(50+Math.cos(t+Math.PI)*50)+"%",l=this.element;l.removeChildNodes(),l.attr({x1:r,x2:s,y1:n,y2:o}),I(pr(this._stops.iterator()),function(u){var h=u[0],p=u[1],d=p.offset;S(d)||(d=h/(e._stops.length-1));var c=e.paper.add("stop");P(p.color)&&c.attr({"stop-color":p.color.toString()}),S(p.opacity)&&c.attr({"stop-opacity":p.opacity}),S(d)&&c.attr({offset:d}),l.add(c)})},i.prototype.clear=function(){this._stops.clear()},i.prototype.addColor=function(e,t,r){this._stops.push({color:e,opacity:t,offset:r})},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:wr()},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){a.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})(st);C.registeredClasses.LinearGradient=Ht;var ji=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e._stops=new ve,e.element=e.paper.addGroup("radialGradient"),e.id="gradient-"+C.getUniqueId(),e.element.attr({id:e.id}),e._disposers.push(e.element),e.applyTheme(),e}return i.prototype.draw=function(){var e=this,t=this.element;if(S(this.cx)){var r=this.cx;r instanceof de&&(r=r.percent+"%"),t.attr({cx:r})}if(S(this.cy)){var r=this.cy;r instanceof de&&(r=r.percent+"%"),t.attr({cy:r})}if(this.fx){var r=this.fx;r instanceof de&&(r=r.percent+"%"),t.attr({fx:r})}if(this.fy){var r=this.fy;r instanceof de&&(r=r.percent+"%"),t.attr({fy:r})}t.removeChildNodes(),I(pr(this._stops.iterator()),function(n){var s=n[0],o=n[1],l=o.offset;S(l)||(l=s/(e._stops.length-1));var u=e.paper.add("stop");P(o.color)&&u.attr({"stop-color":o.color.toString()}),S(o.opacity)&&u.attr({"stop-opacity":o.opacity}),S(l)&&u.attr({offset:l}),t.add(u)})},i.prototype.addColor=function(e,t,r){this._stops.push({color:e,opacity:t,offset:r}),this.draw()},Object.defineProperty(i.prototype,"paper",{get:function(){return this._paper?this._paper:wr()},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){a.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})(st);C.registeredClasses.RadialGradient=ji;var We=(function(){function a(){}return a.grab=[{property:"cursor",value:"move"},{property:"cursor",value:"grab"},{property:"cursor",value:"-webkit-grab"}],a.grabbing=[{property:"cursor",value:"move"},{property:"cursor",value:"grabbing"},{property:"cursor",value:"-webkit-grabbing"}],a.pointer=[{property:"cursor",value:"pointer"}],a.default=[{property:"cursor",value:"default"}],a.horizontalResize=[{property:"cursor",value:"ew-resize"}],a.verticalResize=[{property:"cursor",value:"ns-resize"}],a.notAllowed=[{property:"cursor",value:"not-allowed"}],a.text=[{property:"cursor",value:"text"}],a})();var Fd={_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(a){var i="th";if(a<11||a>13)switch(a%10){case 1:i="st";break;case 2:i="nd";break;case 3:i="rd";break}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 Ci=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.adapter=new gt(e),e._locale=Fd,e._defaultLocale=Fd,e.className="Language",P(ge.defaultLocale)&&(e.locale=ge.defaultLocale),e.applyTheme(),e}return 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 r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];t=this.getLocale(t);var s=e,o=this.getTranslations(t),l=o[e];if(l===null)s="";else if(P(l))l&&(s=l);else if(t!==this._defaultLocale)return this.translate.apply(this,ca([e,this._defaultLocale],r));if(r.length)for(var u=r.length,h=0;h<u;++h)s=s.split("%"+(h+1)).join(r[h]);return this.adapter.apply("translate",{translation:s,locale:t}).translation},i.prototype.translateAny=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return this.translate.apply(this,ca([e,t],r))},i.prototype.setTranslationAny=function(e,t,r){var n=r||this.locale;n[e]=t},i.prototype.translateEmpty=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var s=this.translate.apply(this,ca([e,t],r));return s==e?"":s},i.prototype.translateFunc=function(e,t){t=this.getLocale(t);var r=this.getTranslations(t),n=r[e];return n??(t!==this._defaultLocale?this.translateFunc(e,this._defaultLocale):function(){return""})},i.prototype.translateAll=function(e,t){var r=this;return this.isDefault()?e:fa(e,function(n){return r.translate(n,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})(Et);var Ad=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.adapter=new gt(e),e.className="TextFormatter",e.applyTheme(),e}return i.prototype.debug=function(){},i.prototype.format=function(e,t){P(t)||(t="svg");var r="";e=this.escape(e);var n=e.match(/\[([^\]]*?)\]/gm);if(!n)return this.wrap(e,"",t);for(var s=e.split(/\[[^\[\]]*\]/),o=0,l=s.length;o<l;o++){var u=s[o];if(u!==""){u=this.adapter.apply("chunk",u);var h="";o>0&&(h=n[o-1].replace("[","").replace("]","")),r+=this.wrap(u,h,t)}}return r=this.unescape(r),this.cleanUp(r)},i.prototype.escape=function(e){return e.replace(/\[\[/g,C.getPlaceholder("1")).replace(/([^\/\]]{1})\]\]/g,"$1"+C.getPlaceholder("2")).replace(/\]\]/g,C.getPlaceholder("2")).replace(/\{\{/g,C.getPlaceholder("3")).replace(/\}\}/g,C.getPlaceholder("4")).replace(/\'\'/g,C.getPlaceholder("5"))},i.prototype.unescape=function(e){return e.replace(new RegExp(C.getPlaceholder("1"),"g"),"[[").replace(new RegExp(C.getPlaceholder("2"),"g"),"]]").replace(new RegExp(C.getPlaceholder("3"),"g"),"{{").replace(new RegExp(C.getPlaceholder("4"),"g"),"}}").replace(new RegExp(C.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,r){switch((t===""||t==="/")&&(t=""),r){case"html":return this.wrapHtml(e,this.translateStyleShortcuts(t));default:return 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 r=new Wa("tspan");return r.textContent=e,t&&r.node.setAttribute("style",t),r},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 r=document.createElement("span");return r.innerHTML=e,t&&r.setAttribute("style",t),r},i.prototype.styleSvgToHtml=function(e){return e=e.replace(/fill:/,"color:"),e},i.prototype.translateStyleShortcuts=function(e){if(e==""||e=="[ ]")return"";var t=C.getCache("translateStyleShortcuts_"+e);if(t)return t;var r=e.match(/('[^']*')|("[^"]*")/gi);if(r)for(var n=0;n<r.length;n++)e=e.replace(r[n],r[n].replace(/['"]*/g,"").replace(/[ ]+/g,"+"));var s=e.match(/([\w\-]*:[\s]?[^;\s\]]*)|(\#[\w]{1,6})|([\w]+)|(\/)/gi);if(!s)return e;for(var n=0;n<s.length;n++)s[n].match(/^bold$/i)?s[n]="font-weight:"+s[n]:s[n]=="/"?s[n]="":s[n].match(/:/)?s[n]=s[n].replace(/\+/g," "):s[n]="fill:"+s[n];var o=s.join(";");return C.setCache("translateStyleShortcuts_"+e,o),o},i.prototype.chunk=function(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=[];e=this.escape(e);for(var s=t?e.split("'"):[e],o=0;o<s.length;o++){var l=s[o];if(l!=="")if(o%2===0){l=l.replace(/\]\[/g,"]"+qt+"["),l=l.replace(/\[\]/g,"[ ]");for(var u=l.split(/[\[\]]+/),h=0;h<u.length;h++){var p=this.cleanUp(this.unescape(u[h]));p!==qt&&p!==""&&(h%2===0?n.push({type:"value",text:this.adapter.apply("chunk",p)}):n.push({type:r?"value":"format",text:"["+p+"]"}))}}else for(var u=l.split(/[\[\]]+/),h=0;h<u.length;h++){var p=this.cleanUp(this.unescape(u[h]));p!==""&&(h%2===0?n.push({type:"text",text:p}):this.isImage(p)?n.push({type:"image",text:"["+p+"]"}):n.push({type:"format",text:"["+p+"]"}))}}return n},i.prototype.isImage=function(e){return!!e.match(/img[ ]?:/)},i})(st);var Dd;function Di(){return Dd==null&&(Dd=new Ad),Dd}C.registeredClasses.TextFormatter=Ad;var ba=(function(a){T(i,a);function i(){var e=a.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 i.prototype.dispose=function(){a.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 Ci),this._language},set:function(e){this._language=e},enumerable:!0,configurable:!0}),i.prototype.format=function(e,t,r){(typeof t>"u"||ce(t)&&t.toLowerCase()==="number")&&(t=this._numberFormat);var n,s=Number(e);if(Be(t))try{return this.intlLocales?new Intl.NumberFormat(this.intlLocales,t).format(s):new Intl.NumberFormat(void 0,t).format(s)}catch{return"Invalid"}else{t=Ba(t);var o=this.parseFormat(t,this.language),l=void 0;s>this._negativeBase?l=o.positive:s<this._negativeBase?l=o.negative:l=o.zero,P(r)&&!l.mod&&(l=Hm(l),l.decimals.active=s==0?0:r),n=l.template.split(qt).join(this.applyFormat(s,l))}return this.forceLTR&&(n="\u200E"+n),n},i.prototype.parseFormat=function(e,t){var r=this,n=this.getCache(e);if(P(n))return n;var s={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}};e=e.replace("||",va);var o=e.split("|");return s.positive.source=o[0],typeof o[2]>"u"?s.zero=s.positive:s.zero.source=o[2],typeof o[1]>"u"?s.negative=s.positive:s.negative.source=o[1],te(s,function(l,u){if(!u.parsed){if(typeof r.getCache(u.source)<"u"){s[l]=r.getCache(u.source);return}var h=u.source;h.toLowerCase()==="number"&&(h=ce(r._numberFormat)?r._numberFormat:"#,###.#####");for(var p=Di().chunk(h,!0),d=0;d<p.length;d++){var c=p[d];if(c.text=c.text.replace(va,"|"),c.type==="value"){var f=c.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESP‰!]?/);if(f)if(f===null||f[0]==="")u.template+=c.text;else{var m=f[0].match(/[abespABESP%‰!]{2}|[abespABESP%‰]{1}$/);m&&(u.mod=m[0].toLowerCase(),u.modSpacing=!!f[0].match(/[ ]{1}[abespABESP%‰!]{1}$/));var y=f[0].split(".");if(y[0]!==""){u.thousands.active=(y[0].match(/0/g)||[]).length,u.thousands.passive=(y[0].match(/\#/g)||[]).length+u.thousands.active;var v=y[0].split(",");v.length===1||(u.thousands.interval=ze(v.pop()).length,u.thousands.interval===0&&(u.thousands.interval=-1))}typeof y[1]>"u"||(u.decimals.active=(y[1].match(/0/g)||[]).length,u.decimals.passive=(y[1].match(/\#/g)||[]).length+u.decimals.active),u.template+=c.text.split(f[0]).join(qt)}}else u.template+=c.text}r.setCache(u.source,u),u.parsed=!0}}),this.setCache(e,s),s},i.prototype.applyFormat=function(e,t){var r=e<0;e=Math.abs(e);var n="",s="",o=t.mod?t.mod.split(""):[];if(o.indexOf("b")!==-1){var l=this.applyPrefix(e,this.bytePrefixes,o.indexOf("!")!==-1);e=l[0],n=l[1],s=l[2],t.modSpacing&&(s=" "+s)}else if(o.indexOf("a")!==-1){var u=this.applyPrefix(e,e<this.smallNumberThreshold?this.smallNumberPrefixes:this.bigNumberPrefixes,o.indexOf("!")!==-1);e=u[0],n=u[1],s=u[2],t.modSpacing&&(s=" "+s)}else if(o.indexOf("p")!==-1){var h=Math.min(e.toString().length+2,21);e=parseFloat(e.toPrecision(h)),n=this.language.translate("_percentPrefix")||"",s=this.language.translate("_percentSuffix")||"",n==""&&s==""&&(s="%")}else if(o.indexOf("%")!==-1){var h=ye(e.toString().length+2,21);e*=100,e=parseFloat(e.toPrecision(h)),s="%"}else if(o.indexOf("\u2030")!==-1){var h=ye(e.toString().length+3,21);e*=1e3,e=parseFloat(e.toPrecision(h)),s="\u2030"}if(o.indexOf("e")!==-1){var p=void 0;t.decimals.passive>=0?p=e.toExponential(t.decimals.passive).split("e"):p=e.toExponential().split("e"),e=Number(p[0]),s="e"+p[1],t.modSpacing&&(s=" "+s)}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=rd(e).split("."),m=f[0];if(m.length<t.thousands.active&&(m=Array(t.thousands.active-m.length+1).join("0")+m),t.thousands.interval>0){for(var y=[],v=m.split("").reverse().join(""),b=0,x=m.length;b<=x;b+=t.thousands.interval){var _=v.substr(b,t.thousands.interval).split("").reverse().join("");_!==""&&y.unshift(_)}m=y.join(t.thousands.separator)}c+=m,f.length===1&&f.push("");var $=f[1];return $.length<t.decimals.active&&($+=Array(t.decimals.active-$.length+1).join("0")),$!==""&&(c+=t.decimals.separator+$),c===""&&(c="0"),e!==0&&r&&o.indexOf("s")===-1&&(c="-"+c),n&&(c=n+c),s&&(c+=s),c},i.prototype.applyPrefix=function(e,t,r){r===void 0&&(r=!1);for(var n=e,s="",o="",l=!1,u=1,h=0,p=t.length;h<p;h++)t[h].number<=e&&(t[h].number===0?n=0:(n=e/t[h].number,u=t[h].number),s=t[h].prefix,o=t[h].suffix,l=!0);return!l&&r&&t.length&&e!=0&&(n=e/t[0].number,s=t[0].prefix,o=t[0].suffix,l=!0),l&&(n=parseFloat(n.toPrecision(ye(u.toString().length+Math.floor(n).toString().replace(/[^0-9]*/g,"").length,21)))),[n,s,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 P(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 P(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 P(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("||",va)},i.prototype.unescape=function(e){return e.replace(va,"|")},i})(st);C.registeredClasses.NumberFormatter=ba;var Ki=(function(a){T(i,a);function i(){var e=a.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 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,r){this.language||(this.sprite?this.language=this.sprite.language:this.language=new Ci),(typeof t>"u"||t==="")&&(t=this._dateFormat);var n,s;if(ce(e)?s=this.parse(e):s=Ro(e),Be(t))try{return this.intlLocales?new Intl.DateTimeFormat(this.intlLocales,t).format(s):new Intl.DateTimeFormat(void 0,t).format(s)}catch{return"Invalid"}else{t=Ba(t);var o=this.parseFormat(t);if(P(this.timezoneOffset)?s.setMinutes(s.getMinutes()+s.getTimezoneOffset()-this.timezoneOffset):P(this.timezone)&&r!==!1&&(s=Rs(s,this.timezone)),!S(s.getTime()))return this.language.translate("Invalid date");n=this.applyFormat(s,o,this.language),this.capitalize&&(n=n.replace(/^.{1}/,n.substr(0,1).toUpperCase()))}return n},i.prototype.parseFormat=function(e){var t=this.getCache(e);if(P(t))return t;for(var r={template:"",parts:[]},n=Di().chunk(e,!0),s=0;s<n.length;s++){var o=n[s];if(o.type==="value"){o.text.match(/^date$/i)&&ce(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 u=0;u<l.length;u++)r.parts.push(l[u]),o.text=o.text.replace(l[u],qt)}r.template+=o.text}return this.setCache(e,r),r},i.prototype.applyFormat=function(e,t,r){var n=t.template,s,o,l,u,h,p,d,c,f=e.getTimezoneOffset(),m=e.getTime();this.utc?(s=e.getUTCFullYear(),o=e.getUTCMonth(),l=e.getUTCDay(),u=e.getUTCDate(),h=e.getUTCHours(),p=e.getUTCMinutes(),d=e.getUTCSeconds(),c=e.getUTCMilliseconds()):(s=e.getFullYear(),o=e.getMonth(),l=e.getDay(),u=e.getDate(),h=e.getHours(),p=e.getMinutes(),d=e.getSeconds(),c=e.getMilliseconds());for(var y=0,v=t.parts.length;y<v;y++){var b="";switch(t.parts[y]){case"G":b=r.translate(s<0?"_era_bc":"_era_ad");break;case"yyyy":b=Math.abs(s).toString(),s<0&&(b+=r.translate("_era_bc"));break;case"yyy":case"yy":case"y":b=Math.abs(s).toString().substr(-t.parts[y].length),s<0&&(b+=r.translate("_era_bc"));break;case"YYYY":case"YYY":case"YY":case"Y":var x=sd(e);t.parts[y]=="YYYY"?b=Math.abs(x).toString():b=Math.abs(x).toString().substr(-t.parts[y].length),x<0&&(b+=r.translate("_era_bc"));break;case"u":break;case"q":b=""+Math.ceil((e.getMonth()+1)/3);break;case"MMMMM":b=r.translate(this.months[o]).substr(0,1);break;case"MMMM":b=r.translate(this.months[o]);break;case"MMM":b=r.translate(this.monthsShort[o]);break;case"MM":b=Wt(o+1,2,"0");break;case"M":b=(o+1).toString();break;case"ww":b=Wt(Ts(e,this.utc),2,"0");break;case"w":b=Ts(e,this.utc).toString();break;case"W":b=ad(e,this.utc).toString();break;case"dd":b=Wt(u,2,"0");break;case"d":b=u.toString();break;case"DD":case"DDD":b=Wt(Pu(e,this.utc).toString(),t.parts[y].length,"0");break;case"D":b=Pu(e,this.utc).toString();break;case"F":break;case"g":break;case"t":b=r.translateFunc("_dateOrd").call(this,u);break;case"E":b=(l||7).toString();break;case"EE":b=Wt((l||7).toString(),2,"0");break;case"EEE":case"eee":b=r.translate(this.weekdaysShort[l]);break;case"EEEE":case"eeee":b=r.translate(this.weekdays[l]);break;case"EEEEE":case"eeeee":b=r.translate(this.weekdays[l]).substr(0,1);break;case"e":case"ee":b=(l-this.firstDayOfWeek+1).toString(),t.parts[y]=="ee"&&(b=Wt(b,2,"0"));break;case"a":h>=12?b=r.translate("PM"):b=r.translate("AM");break;case"aa":h>=12?b=r.translate("P.M."):b=r.translate("A.M.");break;case"aaa":h>=12?b=r.translate("P"):b=r.translate("A");break;case"h":b=As(h).toString();break;case"hh":b=Wt(As(h),2,"0");break;case"H":b=h.toString();break;case"HH":b=Wt(h,2,"0");break;case"K":b=As(h,0).toString();break;case"KK":b=Wt(As(h,0),2,"0");break;case"k":b=(h+1).toString();break;case"kk":b=Wt(h+1,2,"0");break;case"m":b=p.toString();break;case"mm":b=Wt(p,2,"0");break;case"s":b=d.toString();break;case"ss":b=Wt(d,2,"0");break;case"S":case"SS":case"SSS":b=Math.round(c/1e3*Math.pow(10,t.parts[y].length)).toString();break;case"x":b=m.toString();break;case"n":case"nn":case"nnn":b=Wt(c,t.parts[y].length,"0");break;case"z":b=Vs(e,!1,!1,this.utc);break;case"zz":b=Vs(e,!0,!1,this.utc);break;case"zzz":b=Vs(e,!1,!0,this.utc);break;case"zzzz":b=Vs(e,!0,!0,this.utc);break;case"Z":case"ZZ":var _=Math.abs(f)/60,$=Math.floor(_),O=_*60-$*60;this.utc&&($=0,O=0),t.parts[y]=="Z"?(b="GMT",b+=f>0?"-":"+",b+=Wt($,2)+":"+Wt(O,2)):(b=f>0?"-":"+",b+=Wt($,2)+Wt(O,2));break;case"i":b=e.toISOString();break;case"I":b=e.toUTCString();break}n=n.replace(qt,b)}return n},i.prototype.parse=function(e,t){if(P(t)||(t=this.inputDateFormat),e instanceof Date)return e;if(typeof e=="number")return new Date(e);typeof e!="string"&&(e=e.toString()),this.language||(this.sprite?this.language=this.sprite.language:this.language=new Ci);var r,n="";t=Ba(t),t=t.substr(0,e.length);for(var s=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},u=0,h=0,p=0;p<s.parts.length;p++){switch(h=p+u+1,s.parts[p]){case"yyyy":case"YYYY":n+="([0-9]{4})",o.year=h;break;case"yyy":case"YYY":n+="([0-9]{3})",o.year3=h;break;case"yy":case"YY":n+="([0-9]{2})",o.year2=h;break;case"y":case"Y":n+="([0-9]{1})",o.year1=h;break;case"MMMM":n+="("+this.getStringList(this.months).join("|")+")",o.monthLong=h;break;case"MMM":n+="("+this.getStringList(this.monthsShort).join("|")+")",o.monthShort=h;break;case"MM":case"M":n+="([0-9]{2}|[0-9]{1})",o.month=h;break;case"ww":case"w":n+="([0-9]{2}|[0-9]{1})",o.week=h;break;case"dd":case"d":n+="([0-9]{2}|[0-9]{1})",o.day=h;break;case"DDD":case"DD":case"D":n+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.yearDay=h;break;case"dddd":n+="("+this.getStringList(this.weekdays).join("|")+")",o.weekdayLong=h;break;case"ddd":n+="("+this.getStringList(this.weekdaysShort).join("|")+")",o.weekdayShort=h;break;case"aaa":case"aa":case"a":n+="("+this.getStringList(["AM","PM","A.M.","P.M.","A","P"]).join("|")+")",o.am=h;break;case"hh":case"h":n+="([0-9]{2}|[0-9]{1})",o.hour12Base1=h;break;case"HH":case"H":n+="([0-9]{2}|[0-9]{1})",o.hourBase0=h;break;case"KK":case"K":n+="([0-9]{2}|[0-9]{1})",o.hour12Base0=h;break;case"kk":case"k":n+="([0-9]{2}|[0-9]{1})",o.hourBase1=h;break;case"mm":case"m":n+="([0-9]{2}|[0-9]{1})",o.minute=h;break;case"ss":case"s":n+="([0-9]{2}|[0-9]{1})",o.second=h;break;case"SSS":case"SS":case"S":n+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.millisecond=h,o.millisecondDigits=s.parts[p].length;break;case"nnn":case"nn":case"n":n+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.millisecond=h;break;case"x":n+="([0-9]{1,})",o.timestamp=h;break;case"Z":n+="GMT([-+]+[0-9]{2}:[0-9]{2})",o.zone=h;break;case"ZZ":n+="([\\-+]+[0-9]{2}[0-9]{2})",o.zone=h;break;case"i":n+="([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=h,u+=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":u--;break}n+="[^0-9]*"}var d=new RegExp(n),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){var f=parseInt(c[o.year2]);f>50?f+=1e3:f+=2e3,l.year=f}if(o.year1>-1){var f=parseInt(c[o.year1]);f=Math.floor(new Date().getFullYear()/10)*10+f,l.year=f}if(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=nd(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){var f=parseInt(c[o.hour12Base0]);f==11&&(f=0),o.am>-1&&!this.isAm(c[o.am])&&(f+=12),l.hour=f}if(o.hour12Base1>-1){var f=parseInt(c[o.hour12Base1]);f==12&&(f=0),o.am>-1&&!this.isAm(c[o.am])&&(f+=12),l.hour=f}if(o.minute>-1&&(l.minute=parseInt(c[o.minute])),o.second>-1&&(l.second=parseInt(c[o.second])),o.millisecond>-1){var f=parseInt(c[o.millisecond]);o.millisecondDigits==2?f*=10:o.millisecondDigits==1&&(f*=100),l.millisecond=f}if(o.timestamp>-1){l.timestamp=parseInt(c[o.timestamp]);var m=new Date(l.timestamp);l.year=m.getUTCFullYear(),l.month=m.getUTCMonth(),l.day=m.getUTCDate(),l.hour=m.getUTCHours(),l.minute=m.getUTCMinutes(),l.second=m.getUTCSeconds(),l.millisecond=m.getUTCMilliseconds()}o.zone>-1&&(l.offset=this.resolveTimezoneOffset(new Date(l.year,l.month,l.day),c[o.zone])),o.iso>-1&&(l.year=ke(c[o.iso+0]),l.month=ke(c[o.iso+1])-1,l.day=ke(c[o.iso+2]),l.hour=ke(c[o.iso+3]),l.minute=ke(c[o.iso+4]),l.second=ke(c[o.iso+5]),l.millisecond=ke(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]))),l.utc?r=new Date(Date.UTC(l.year,l.month,l.day,l.hour,l.minute,l.second,l.millisecond)):r=new Date(l.year,l.month,l.day,l.hour,l.minute+l.offset,l.second,l.millisecond)}else r=new Date(e);return r},i.prototype.resolveTimezoneOffset=function(e,t){var r=t.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/);if(r){var n=ze(t.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)),s=n[1],o=n[2],l=n[3],u=parseInt(o)*60+parseInt(l);s=="+"&&(u*=-1);var h=(e||new Date).getTimezoneOffset(),p=u-h;return p}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),t>-1)?t:0},i.prototype.resolveShortMonth=function(e){var t=this.monthsShort.indexOf(e);return t>-1||(t=this.months.indexOf(e),t>-1)||this.language&&!this.language.isDefault()&&(t=this.language.translateAll(this.monthsShort).indexOf(e),t>-1)?t:0},i.prototype.isAm=function(e){var t=this.getStringList(["AM","A.M.","A"]);return t.indexOf(e.toUpperCase())>-1},i.prototype.invalidateSprite=function(){this.sprite&&this.sprite.invalidate()},i.prototype.getStringList=function(e){for(var t=[],r=0;r<e.length;r++)this.language?t.push(Os(this.language.translate(e[r]))):t.push(Os(e[r]));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=yy(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})(st);C.registeredClasses.DateFormatter=Ki;var js=(function(a){T(i,a);function i(){var e=a.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 i.prototype.format=function(e,t,r){this.language||(this.sprite?this.language=this.sprite.language:this.language=new Ci);var n=r||this._baseUnit;(typeof t>"u"||t==="")&&(P(this.durationFormat)?t=this.durationFormat:t=this.getFormat(ke(e),null,n)),t=Ba(t);var s=this.parseFormat(t,n),o=Number(e),l;o>this._negativeBase?l=s.positive:o<this._negativeBase?l=s.negative:l=s.zero;var u=this.applyFormat(o,l);return l.color!==""&&(this._outputFormat==="svg"?u="<tspan fill='"+l.color+"'>"+u+"</tspan>":this._outputFormat==="html"&&(u="<span style='color: "+l.color+";'>"+u+"</span>")),u},i.prototype.parseFormat=function(e,t){var r=this,n=this.getCache(e);if(P(n))return n;var s=t||this._baseUnit,o={positive:{color:"",template:"",parts:[],source:"",baseUnit:s,parsed:!1,absolute:!1},negative:{color:"",template:"",parts:[],source:"",baseUnit:s,parsed:!1,absolute:!1},zero:{color:"",template:"",parts:[],source:"",baseUnit:s,parsed:!1,absolute:!1}};e=e.replace("||",va);var l=e.split("|");return o.positive.source=l[0],typeof l[2]>"u"?o.zero=o.positive:o.zero.source=l[2],typeof l[1]>"u"?o.negative=o.positive:o.negative.source=l[1],te(o,function(u,h){if(!h.parsed){if(typeof r.getCache(h.source)<"u"){o[u]=r.getCache(h.source);return}var p=h.source,d=[];d=h.source.match(/^\[([^\]]*)\]/),d&&d.length&&d[0]!==""&&(p=h.source.substr(d[0].length),h.color=d[1]);for(var c=Di().chunk(p,!0),f=0;f<c.length;f++){var m=c[f];if(m.text=m.text.replace(va,"|"),m.type==="value"){m.text.match(/[yYMdDwhHKkmsSn]+a/)&&(h.absolute=!0,m.text=m.text.replace(/([yYMdDwhHKkmsSn]+)a/,"$1"));var y=m.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);if(y)for(var v=0;v<y.length;v++)P(y[v])||(y[v]=r._unitAliases[y[v]]),h.parts.push(y[v]),m.text=m.text.replace(y[v],qt)}h.template+=m.text}r.setCache(h.source,h),h.parsed=!0}}),this.setCache(e,o),o},i.prototype.applyFormat=function(e,t){var r=!t.absolute&&e<this._negativeBase;e=Math.abs(e);for(var n=this.toTimeStamp(e,t.baseUnit),s=t.template,o=0,l=t.parts.length;o<l;o++){var u=t.parts[o],h=this.toTimeUnit(u.substr(0,1)),p=u.length,d=Math.floor(n/this._unitValues[h]);s=s.replace(qt,Wt(d,p,"0")),n-=d*this._unitValues[h]}return r&&(s="-"+s),s},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,r){if(P(this.durationFormat))return this.durationFormat;if(r||(r=this.baseUnit),P(t)&&e!=t){e=Math.abs(e),t=Math.abs(t);var n=this.getValueUnit(he(e,t),r);return this.durationFormats[r][n]}else{var s=this.getValueUnit(e,r);return this.durationFormats[r][s]}},i.prototype.getValueUnit=function(e,t){t||(t=this.baseUnit);var r,n=this.getMilliseconds(e,t);return Ep(this._unitValues,function(s,o){if(s==t||r){var l=n/o;if(l<=1)return r||(r=s),!1;r=s}return!0}),r},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})(st);C.registeredClasses.DurationFormatter=js;var _y=new Oe;function Ty(a,i){var e=i||"amexport",t=new se,r=_y.insertKeyIfEmpty(e,function(){var n=new Fe([new Ye(a,"."+e+"-menu *",{"box-sizing":"border-box"}),new Ye(a,"."+e+"-menu-level-0",{position:"absolute",top:"5px",right:"5px"}),new Ye(a,"."+e+"-menu-level-0."+e+"-left",{right:"auto",left:"5px"}),new Ye(a,"."+e+"-menu-level-0."+e+"-right",{right:"5px",left:"auto"}),new Ye(a,"."+e+"-menu-level-0."+e+"-top",{top:"5px",bottom:"auto"}),new Ye(a,"."+e+"-menu-level-0."+e+"-bottom",{top:"auto",bottom:"5px"}),new Ye(a,"."+e+"-item."+e+"-item-level-0",{opacity:"0.3",width:"30px","min-height":"30px",transition:"all 100ms ease-in-out"}),new Ye(a,"div:hover > div > ."+e+"-menu ."+e+"-item."+e+"-item-level-0, ."+e+"-item."+e+"-item-level-0.active",{opacity:"0.9"}),new Ye(a,"."+e+"-item."+e+"-item-level-0 > a",{padding:"0","text-align":"center",overflow:"hidden"}),new Ye(a,"."+e+"-item."+e+"-item-level-0:before",{display:"block"}),new Ye(a,"."+e+"-item",{position:"relative",display:"block",opacity:"0","z-index":"1","border-radius":"3px","background-color":t.getFor("secondaryButton").hex,padding:"0",margin:"1px 1px 0 0",color:t.getFor("secondaryButton").alternative.hex,transition:"all 100ms ease-in-out, opacity 0.5s ease 0.5s"}),new Ye(a,"."+e+"-left ."+e+"-item",{margin:"1px 0 0 1px"}),new Ye(a,"."+e+"-item:hover, ."+e+"-item.active",{background:t.getFor("secondaryButtonHover").hex,color:t.getFor("secondaryButtonText").hex}),new Ye(a,"."+e+"-item > ."+e+"-menu",{position:"absolute",top:"-1px",right:"0","margin-right":"100%"}),new Ye(a,"."+e+"-left ."+e+"-item > ."+e+"-menu",{left:"0",right:"auto","margin-left":"100%","margin-right":"auto"}),new Ye(a,"."+e+"-right ."+e+"-item > ."+e+"-menu",{left:"auto",right:"0","margin-left":"auto","margin-right":"100%"}),new Ye(a,"."+e+"-top ."+e+"-item > ."+e+"-menu",{top:"-1px",bottom:"auto"}),new Ye(a,"."+e+"-bottom ."+e+"-item > ."+e+"-menu",{top:"auto",bottom:"0"}),new Ye(a,"."+e+"-item > ."+e+"-menu",{display:"none"}),new Ye(a,"."+e+"-item:hover > ."+e+"-menu, ."+e+"-item.active > ."+e+"-menu",{display:"block"}),new Ye(a,"."+e+"-item:hover > ."+e+"-menu > ."+e+"-item, ."+e+"-item.active > ."+e+"-menu > ."+e+"-item",{opacity:"1"}),new Ye(a,"."+e+"-menu",{display:"block","list-style":"none",margin:"0",padding:"0"}),new Ye(a,"."+e+"-label",{display:"block",cursor:"default",padding:"0.5em 1em"}),new Ye(a,"."+e+"-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 Ye(a,"."+e+"-item-level-0 > ."+e+"-icon",{padding:"0.1em 0.2em"}),new Ye(a,"."+e+"-clickable",{cursor:"pointer"})]);return new ya(function(){_y.removeKey(e),n.dispose()})});return r.increment()}var Qo=(function(a){T(i,a);function i(){var e=a!==null&&a.apply(this,arguments)||this;return e._validateDisposer=null,e}return i.prototype.invalidate=function(){this._validateDisposer===null&&(this._validateDisposer=C.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),a.prototype.dispose.call(this)},i})(Et);var Vd=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.adapter=new gt(e),e.closeDelay=1e3,e.closeOnClick=!0,e._language=new Ue,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 i.prototype.validate=function(){this.draw(),a.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"),ze(this._container).appendChild(this._element);for(var t=this.adapter.apply("items",{items:this._items}).items,r=t.length,n=0;n<r;n++)this.drawBranch(this._element,t[n],0);this._element=this.adapter.apply("menuElement",{menuElement:this._element}).menuElement,this._disposers.push(pe().body.events.on("down",function(s){s.pointer.touch||(e._ignoreNextClose=!1),e.close()})),this._disposers.push(pe().body.events.on("keydown",function(s){var o=Si.getEventKey(s.event);switch(o){case"esc":e.close();break;case"up":case"down":case"left":case"right":e._currentSelection&&s.event.preventDefault(),e.moveSelection(o);break}})),this.defaultStyles&&this.loadDefaultCSS()},i.prototype.drawBranch=function(e,t,r){var n=this;if(t=this.adapter.apply("branch",{branch:t,level:r}).branch,t.unsupported!==!0){t.ascendants||(t.ascendants=new ve);var s=t.type,o=this.createItemElement(r,s),l;t.icon?(l=this.createIconElement(r,s),l.src=t.icon,(t.label||t.title)&&(l.title=t.title||t.label)):t.svg?(l=this.createSvgElement(r,s,t.svg),(t.label||t.title)&&(l.title=t.title||t.label)):(l=this.createLabelElement(r,s),l.innerHTML=t.label?this.language.translate(t.label):"",t.title&&(l.title=t.title));var u=this.getReaderLabel(t,l.innerHTML);l.setAttribute("aria-label",u),o.appendChild(l),t.interactions=pe().getInteraction(o),t.element=o,this.typeClickable(s)&&(t.interactions.events.on("hit",function(y){if(n.events.isEnabled("hit")&&!n.isDisposed()){var v={type:"hit",event:y.event,target:n,branch:t};n.events.dispatchImmediately("hit",v)}}),t.interactions.events.on("keyup",function(y){if(Si.isKey(y.event,"enter")&&n.events.isEnabled("enter")){var v={type:"enter",event:y.event,target:n,branch:t};n.events.dispatchImmediately("enter",v)}}));{var h=this.getSubMenu(t);h!=null&&(t.interactions.events.on("keyup",function(y){Si.isKey(y.event,"enter")&&(n.selectBranch(h[0]),n.setFocus(h[0]))}),t.interactions.events.on("hit",function(y){n.selectBranch(t)}))}t.interactions.events.on("over",function(y){if(y.pointer.touch&&(n._ignoreNextClose=!0),n.selectBranch(t),n.events.isEnabled("over")){var v={type:"over",event:y.event,target:n,branch:t};n.events.dispatchImmediately("over",v)}}),t.interactions.events.on("out",function(y){if(!n.isDisposed()&&(y.pointer.touch||n.delayUnselectBranch(t),n.events.isEnabled("out"))){var v={type:"out",event:y.event,target:n,branch:t};n.events.dispatchImmediately("out",v)}}),t.interactions.events.on("focus",function(y){n.selectBranch(t)}),t.interactions.events.on("blur",function(y){n.delayUnselectBranch(t)});var p=r+1;if(t.menu){var d=this.createMenuElement(p);t.submenuElement=d;for(var c=t.menu.length,f=0;f<c;f++){var m=new ve;t.menu[f].ascendants=m,t.ascendants.length&&m.copyFrom(t.ascendants),m.push(t),this.drawBranch(d,t.menu[f],p)}if(d.innerHTML=="")return;o.appendChild(d)}t.hidden&&this.hideBranch(t),t.id&&o.setAttribute("id",t.id),t.color&&(o.style.backgroundColor=t.color.hex),e.appendChild(o)}},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 r=document.createElement(this.itemTag),n=this.classPrefix+"-item "+this.classPrefix+"-item-level-"+e+" "+this.classPrefix+"-item-"+(t||"blank");return r.className=this.adapter.apply("itemClass",{className:n,level:e,type:t}).className,r.setAttribute("role","menuitem"),r.setAttribute("tabindex",this.tabindex.toString()),r},i.prototype.createLabelElement=function(e,t){var r=document.createElement(this.labelTag),n=this.classPrefix+"-label "+this.classPrefix+"-label-level-"+e+" "+this.classPrefix+"-item-"+(t||"blank");return this.typeClickable(t)&&(n+=" "+this.classPrefix+"-clickable"),r.className=this.adapter.apply("labelClass",{className:n,level:e,type:t}).className,r},i.prototype.createIconElement=function(e,t){var r=document.createElement(this.iconTag),n=this.classPrefix+"-icon "+this.classPrefix+"-icon-level-"+e+" "+this.classPrefix+"-item-"+(t||"blank");return this.typeClickable(t)&&(n+=" "+this.classPrefix+"-clickable"),r.className=this.adapter.apply("labelClass",{className:n,level:e,type:t}).className,r.setAttribute("tabindex",this.tabindex.toString()),r.setAttribute("role","menuitem"),r},i.prototype.createSvgElement=function(e,t,r){var n=new DOMParser,s=n.parseFromString(r,"image/svg+xml").documentElement,o=this.classPrefix+"-icon "+this.classPrefix+"-icon-level-"+e+" "+this.classPrefix+"-item-"+(t||"blank");return this.typeClickable(t)&&(o+=" "+this.classPrefix+"-clickable"),s.setAttribute("class",this.adapter.apply("labelClass",{className:o,level:e,type:t}).className),s.setAttribute("tabindex",this.tabindex.toString()),s.setAttribute("role","menuitem"),s},i.prototype.dispose=function(){this._disposed||(a.prototype.dispose.call(this),this._element&&this._element.parentNode&&this._element.parentNode.removeChild(this._element))},i.prototype.typeClickable=function(e){return P(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=Cu(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(){this._disposers.push(Ty(Ns(this.container),this.classPrefix)),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 Ci,this._language.set(t,t.events.on("localechanged",function(r){e.invalidate()}))),t},set:function(e){var t=this;this._language.set(e,e.events.on("localechanged",function(r){t.invalidate()})),this.invalidate()},enumerable:!0,configurable:!0}),i.prototype.close=function(){var e=this;if(!this.isDisposed()){if(this._ignoreNextClose){this._ignoreNextClose=!1;return}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"),r=t.length,n=r-1;n>=0;n--)t[n]&&Ms(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),Is(e.element,"active"),e.submenuElement&&e.submenuElement.setAttribute("aria-expanded","true"),this._currentSelection&&this._currentSelection!==e&&this._currentSelection.ascendants&&I(Ym(Ur([this._currentSelection]),this._currentSelection.ascendants.iterator()),function(n){!e.ascendants.contains(n)&&e!==n&&t.unselectBranch(n,!0)}),I(e.ascendants.iterator(),function(n){n.closeTimeout&&(t.removeDispose(n.closeTimeout),n.closeTimeout=void 0),Is(n.element,"active")}),this._currentSelection=e,this.events.isEnabled("branchselected"))){var r={type:"branchselected",target:this,branch:e};this.events.dispatchImmediately("branchselected",r)}},i.prototype.unselectBranch=function(e,t){if(!this.isDisposed()&&(Ms(e.element,"active"),e.submenuElement&&e.submenuElement.removeAttribute("aria-expanded"),this._currentSelection==e&&(this._currentSelection=void 0),this.events.isEnabled("branchunselected"))){var r={type:"branchunselected",target:this,branch:e};this.events.dispatchImmediately("branchunselected",r)}},i.prototype.delayUnselectBranch=function(e,t){var r=this;this.isDisposed()||(e.closeTimeout&&(this.removeDispose(e.closeTimeout),e.closeTimeout=void 0),e.closeTimeout=this.setTimeout(function(){r.unselectBranch(e,t)},this.closeDelay),t!==!0&&e.ascendants&&I(e.ascendants.iterator(),function(n){r.delayUnselectBranch(n,!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 r=this.getSubMenu(this._currentSelection);r!=null&&(t=r[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){if(e.ascendants&&e.ascendants.length)return e.ascendants.getIndex(e.ascendants.length-1)},i.prototype.getNextSibling=function(e){var t=this.getSiblings(e);if(t.length>1){var r=t.indexOf(e)+1;return r=t.length==r?0:r,t[r].unsupported?this.getNextSibling(t[r]):t[r]}else return e},i.prototype.getPrevSibling=function(e){var t=this.getSiblings(e);if(t.length>1){var r=t.indexOf(e)-1;return r=r==-1?t.length-1:r,t[r].unsupported?this.getPrevSibling(t[r]):t[r]}else 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})(Qo);function Es(a,i,e){return new Promise(function(t,r){var n=P(e)&&e.responseType=="blob",s=new XMLHttpRequest;if(s.onload=function(){if(s.status===200){var u=void 0,h;if(n){h=s.response,fx(h).then(function(d){var c={xhr:s,error:!1,response:d,blob:h,type:s.getResponseHeader("Content-Type"),target:i};t(c)});return}else u=s.responseText||s.response;var p={xhr:s,error:!1,response:u,blob:h,type:s.getResponseHeader("Content-Type"),target:i};t(p)}else r({xhr:s,error:!0,type:s.getResponseHeader("Content-Type"),target:i})},s.onerror=function(){r({xhr:s,error:!0,type:s.getResponseHeader("Content-Type"),target:i})},s.open("GET",a,!0),e&&e.withCredentials&&(s.withCredentials=!0),P(e)){if(P(e.requestHeaders))for(var o=0;o<e.requestHeaders.length;o++){var l=e.requestHeaders[o];s.setRequestHeader(l.key,l.value)}P(e.responseType)&&(s.responseType=e.responseType)}s.send()})}function fx(a){return new Promise(function(i,e){var t=new FileReader;t.onload=function(r){i(t.result)},t.onerror=function(r){e(r)},t.readAsText(a)})}var kd;function mx(){return Qe(this,void 0,void 0,function(){var a,i,e,t;return Re(this,function(r){switch(r.label){case 0:return[4,Promise.all([import("./ZXIRDWJW.js"),import("./DXMV5YU3.js")])];case 1:return a=r.sent(),i=a[0].default||a[0],e=a[1].default||a[1],t=window,t.pdfMake=t.pdfMake||{},t.pdfMake.vfs=e,i.vfs=e,[2,i]}})})}var Oy=/src: ([^;]+);/;function yx(){return window.navigator.msSaveOrOpenBlob!=null}function gx(a){return new Promise(function(i,e){var t=new FileReader;t.onload=function(r){i(t.result)},t.onerror=function(r){e(r)},t.readAsDataURL(a)})}function vx(a){return Qe(this,void 0,void 0,function(){var i,e;return Re(this,function(t){switch(t.label){case 0:i=a.sheet,t.label=1;case 1:return t.trys.push([1,2,,4]),[2,i.cssRules];case 2:return e=t.sent(),[4,new Promise(function(r,n){a.addEventListener("load",function(){r(i.cssRules)},!0),a.addEventListener("error",function(s){n(s)},!0),setTimeout(function(){n(new Error("Timeout while waiting for <style> to load"))},1e4)})];case 3:return[2,t.sent()];case 4:return[2]}})})}function wy(a,i,e){return Qe(this,void 0,void 0,function(){var t,r,n,s;return Re(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,Es(i)];case 1:return t=o.sent(),[3,3];case 2:return r=o.sent(),console.error("Failed to load stylesheet",i,r),[2];case 3:n=a.createElement("style"),n.textContent=t.response,ge.nonce!=""&&n.setAttribute("nonce",ge.nonce),a.head.appendChild(n),o.label=4;case 4:return o.trys.push([4,,7,8]),[4,vx(n)];case 5:return s=o.sent(),[4,Fy(a,i,s,e)];case 6:return o.sent(),[3,8];case 7:return a.head.removeChild(n),[7];case 8:return[2]}})})}function Fy(a,i,e,t){return Qe(this,void 0,void 0,function(){var r,n,s,o,l;return Re(this,function(u){switch(u.label){case 0:for(r=[],n=e.length,s=0;s<n;s++)o=e[s],o.type===CSSRule.IMPORT_RULE?(l=o.href,l&&(l=Eo(i,l),r.push(wy(a,l,t)))):t(i,o);return r.length?[4,Promise.all(r)]:[3,2];case 1:u.sent(),u.label=2;case 2:return[2]}})})}function bx(a){return Qe(this,void 0,void 0,function(){var i,e;return Re(this,function(t){switch(t.label){case 0:i=document.createElement("iframe"),i.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(fa(document.styleSheets,function(r){var n=r.href;return n==null?Fy(e,location.href,r.cssRules,a):(n=Eo(location.href,n),wy(e,n,a))}))];case 2:return t.sent(),[3,4];case 3:return document.head.removeChild(i),[7];case 4:return[2]}})})}var Id=(function(a){T(i,a);function i(e){var t=a.call(this)||this;return t.adapter=new gt(t),t._formatOptions=new Oe,t._extraSprites=[],t._validateSprites=[],t.dataFieldsOrder=[],t._dynamicDataFields=!0,t._removedObjects=new ve,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(r){var n=t._formatOptions.getKey(r.type);return r.options?r.options=wo(n,r.options):r.options=n,r}),t.applyTheme(),t.dispatchImmediately("inited"),t}return 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(r){return r.branch.unsupported=!t.typeSupported(r.branch.type),r}),this._menu.events.on("hit",function(r){t.export(r.branch.type,r.branch.options),t.menu.close()}),this._menu.events.on("enter",function(r){t.export(r.branch.type,r.branch.options),t.menu.close()}),this._menu.events.on("over",function(r){t._disablePointers()}),this._menu.events.on("out",function(r){setTimeout(function(){t._releasePointers()},10)}),this.dispatchImmediately("menucreated"),this._menu.adapter.add("classPrefix",function(r){return r.classPrefix=ge.classNamePrefix+r.classPrefix,r}),this._disposers.push(this._menu)},enumerable:!0,configurable:!0}),i.prototype.typeSupported=function(e){var t=!0,r=this.getFormatOptions(e);return P(r)&&r.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 Qe(this,void 0,void 0,function(){var r,n,s,o,l,u=this;return Re(this,function(h){switch(h.label){case 0:return e=="custom"?(this.handleCustom(t),[2,!0]):(this._exportRunning=!0,this.events.isEnabled("exportstarted")&&(r={type:"exportstarted",target:this,format:e,options:t},this.events.dispatchImmediately("exportstarted",r)),this.showPreloader(),this.timeoutDelay&&(this.hideTimeout(),this._timeoutTimeout=this.setTimeout(function(){if(u.events.isEnabled("exporttimedout")){var p={type:"exporttimedout",target:u,format:e,options:t};u.events.dispatchImmediately("exporttimedout",p)}u.showTimeout()},this.timeoutDelay)),this.hideNonExportableSprites(),n=this._getFunction(e),t=this.adapter.apply("options",{options:t,type:e}).options,n=this.adapter.apply("exportFunction",{func:n,type:e,options:t}).func,[4,n.call(this,e,t)]);case 1:return s=h.sent(),this._exportRunning=!1,this._releasePointers(),this.restoreNonExportableSprites(),s?(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(s,t,this.adapter.apply("title",{title:this.title,options:t}).title)]:e=="pdfdata"?[2,this.download(s,this.filePrefix+".pdf")]:[2,this.download(s,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 Qe(this,void 0,void 0,function(){return Re(this,function(r){return[2,""]})})},i.prototype.handleCustom=function(e){P(e)&&P(e.callback)&&e.callback.call(e.callbackTarget||this,e)},i.prototype.getPrint=function(e,t){return Qe(this,void 0,void 0,function(){return Re(this,function(r){return[2,this.getImage("png",t)]})})},i.prototype.getFontFamilies=function(){return Qe(this,void 0,void 0,function(){var e,t,r,n,s=this;return Re(this,function(o){switch(o.label){case 0:return e=this.getDOMURL(),t=[],r=[],[4,bx(function(l,u){if(u.type===CSSRule.FONT_FACE_RULE){var h=u.cssText,p=Oy.exec(h);if(p!==null){var d=p[1].split(/ *, */).map(function(c){return Qe(s,void 0,void 0,function(){var f,m,y,v,b,x;return Re(this,function(_){switch(_.label){case 0:return f=/^url\(["']?([^"'\)]+)["']?\)([^,]*)$/.exec(c),f!==null?[3,1]:[2,c];case 1:if(m=f[2],y=Eo(l,f[1]),this.webFontFilter&&!y.match(this.webFontFilter))return[2,null];_.label=2;case 2:return _.trys.push([2,7,,8]),[4,Es(y,void 0,{responseType:"blob"})];case 3:return v=_.sent(),yx()?(b=e.createObjectURL(v.blob),t.push(b),[3,6]):[3,4];case 4:return[4,gx(v.blob)];case 5:b=_.sent(),_.label=6;case 6:return[2,'url("'+b+'")'+m];case 7:return x=_.sent(),console.error("Failed to load font",y,x),[2,null];case 8:return[2]}})})});r.push(Promise.all(d).then(function(c){return c=c.filter(function(f){return f!=null}),c.length===0?"":h.replace(Oy,"src: "+c.join(", ")+";")}))}}})];case 1:return o.sent(),[4,Promise.all(r)];case 2:return n=o.sent(),[2,{blobs:t,cssText:n.filter(function(l){return!!l}).join(`
|
|
4
|
+
`)}]}})})},i.prototype.getImage=function(e,t,r){return Qe(this,void 0,void 0,function(){var n,s,o,l,u,h,h;return Re(this,function(p){switch(p.label){case 0:return n=this._objectsAlreadyHidden,n||this.hideNonExportableSprites(),P(t)||(t=this.getFormatOptions(e)),[4,this.awaitValidSprites()];case 1:return p.sent(),[4,this.simplifiedImageExport()];case 2:if(!p.sent())return[3,10];s=void 0,p.label=3;case 3:return p.trys.push([3,7,,9]),[4,this.getCanvas(t)];case 4:return s=p.sent(),r===!1?[3,6]:[4,this.addExtras(s,t)];case 5:o=p.sent(),this.disposeCanvas(s),s=o,p.label=6;case 6:return l=s.toDataURL(this.getContentType(e),t.quality),this.disposeCanvas(s),n||this.restoreNonExportableSprites(),[2,l];case 7:return u=p.sent(),console.error(u.message+`
|
|
5
|
+
`+u.stack),Bs("Simple export failed, falling back to advanced export"),s&&this.disposeCanvas(s),[4,this.getImageAdvanced(e,t,r)];case 8:return h=p.sent(),n||this.restoreNonExportableSprites(),[2,h];case 9:return[3,12];case 10:return[4,this.getImageAdvanced(e,t,r)];case 11:return h=p.sent(),n||this.restoreNonExportableSprites(),[2,h];case 12:return[2]}})})},i.prototype.addExtras=function(e,t,r){return Qe(this,void 0,void 0,function(){var n,s,o,l,u,h,p,d,c,f,m,y,v,b,x=this;return Re(this,function(_){switch(_.label){case 0:return this.extraSprites.length?(n=0,s=0,o=e.width,l=e.height,u=0,h=0,[4,Promise.all(fa(this.extraSprites,function($){return Qe(x,void 0,void 0,function(){var O,F,w,D;return Re(this,function(B){switch(B.label){case 0:return $ instanceof ee?O={sprite:$,position:"bottom"}:O=$,O.position=O.position||"bottom",O.marginTop=O.marginTop||0,O.marginRight=O.marginRight||0,O.marginBottom=O.marginBottom||0,O.marginLeft=O.marginLeft||0,r?[4,O.sprite.exporting.getCanvasAdvanced(t)]:[3,2];case 1:return F=B.sent(),[3,4];case 2:return[4,O.sprite.exporting.getCanvas(t)];case 3:F=B.sent(),B.label=4;case 4:return w=F.width+O.marginLeft+O.marginRight,D=F.height+O.marginTop+O.marginBottom,O.position=="top"?(o=O.crop?l:he(o,w),s+=D):O.position=="right"?(l=O.crop?l:he(l,D),u+=w):O.position=="left"?(l=O.crop?l:he(l,D),n+=w):O.position==="bottom"&&(o=O.crop?l:he(o,w),h+=D),[2,{canvas:F,position:O.position,left:O.marginLeft,top:O.marginTop,width:w,height:D}]}})})}))]):[3,2];case 1:return p=_.sent(),d=this.getDisposableCanvas(),d.width=n+o+u,d.height=s+l+h,c=d.getContext("2d"),f=this.backgroundColor||this.findBackgroundColor(this.sprite.dom),f&&(c.fillStyle=f.toString(),c.fillRect(0,0,d.width,d.height)),m=n,y=s,v=m+o,b=y+l,H(p,function($){$.position=="top"?(y-=$.height,c.drawImage($.canvas,n+$.left,y+$.top)):$.position=="right"?(c.drawImage($.canvas,v+$.left,s+$.top),v+=$.width):$.position=="left"?(m-=$.width,c.drawImage($.canvas,m+$.left,s+$.top)):$.position==="bottom"&&(c.drawImage($.canvas,n+$.left,b+$.top),b+=$.height),x.disposeCanvas($.canvas)}),c.drawImage(e,n,s),[2,d];case 2:return[2,e]}})})},i.prototype.getCanvas=function(e){return Qe(this,void 0,void 0,function(){var t,r,n,s,o,l,u,h,p,d,c,f,m,y,v,b,x;return Re(this,function(_){switch(_.label){case 0:P(e)||(e={}),t=this.backgroundColor||this.findBackgroundColor(this.sprite.dom),r=this.getDOMURL(),n=null,s=null,_.label=1;case 1:return _.trys.push([1,,4,5]),l=this.sprite.pixelWidth,u=this.sprite.pixelHeight,h=Xo(this.sprite.dom),p=Yo(this.sprite.dom),d=e.scale||1,c=this.getPixelRatio(e),d=this.getAdjustedScale(l*c,u*c,d,e),o=this.getDisposableCanvas(),o.style.width=l*d+"px",o.style.height=u*d+"px",o.width=l*d,o.height=u*d,f=o.getContext("2d"),t&&(f.fillStyle=t.toString(),f.fillRect(0,0,l*d,u*d)),m=[],this.useWebFonts&&m.push(this.getFontFamilies().then(function($){return s=$.blobs,$.cssText})),m.push(this.imagesToDataURI(this.sprite.dom,e)),m.push(this.prepForeignObjects(this.sprite.dom,e)),[4,Promise.all(m)];case 2:return y=_.sent(),v=this.normalizeSVG("<style>"+y[0]+"</style>"+this.serializeElement(this.sprite.paper.defs)+this.serializeElement(this.sprite.dom),e,l,u,d,h,p),b=new Blob([v],{type:"image/svg+xml"}),n=r.createObjectURL(b),[4,this.loadNewImage(n,l*d*c,u*d*c,"anonymous")];case 3:return x=_.sent(),f.drawImage(x,0,0),[3,5];case 4:return n!==null&&r.revokeObjectURL(n),s!==null&&H(s,function($){r.revokeObjectURL($)}),this.restoreRemovedObjects(),[7];case 5:return[2,o]}})})},i.prototype.getCanvasAdvanced=function(e){return Qe(this,void 0,void 0,function(){var t,r,n,s,o,l,u,h,p,d,c;return Re(this,function(f){switch(f.label){case 0:return P(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 r=f.sent(),n=this.sprite.pixelWidth,s=this.sprite.pixelHeight,o=Xo(this.sprite.dom),l=Yo(this.sprite.dom),u=e.scale||1,h=this.getPixelRatio(e),u=this.getAdjustedScale(n*h,s*h,u,e),p=this.normalizeSVG(this.serializeElement(this.sprite.paper.defs)+this.serializeElement(this.sprite.dom),e,n,s,u,o,l,t),d=this.getDisposableCanvas(),d.style.width=n*h*u+"px",d.style.height=s*h*u+"px",d.width=n*h*u,d.height=s*h*u,c={useCORS:!0},h!=1&&(c.ignoreDimensions=!0,c.scaleWidth=n*h*u,c.scaleHeight=s*h*u),[4,r.fromString(d.getContext("2d"),p,c).render()];case 3:return f.sent(),[2,d]}})})},i.prototype.getImageAdvanced=function(e,t,r){return Qe(this,void 0,void 0,function(){var n,s,o;return Re(this,function(l){switch(l.label){case 0:return n=this._objectsAlreadyHidden,n||this.hideNonExportableSprites(),P(t)||(t=this.getFormatOptions(e)),[4,this.getCanvasAdvanced(t)];case 1:return s=l.sent(),r===!1?[3,3]:[4,this.addExtras(s,t,!0)];case 2:s=l.sent(),l.label=3;case 3:return o=s.toDataURL(this.getContentType(e),t.quality),this.disposeCanvas(s),n||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.contains(e)&&document.body.removeChild(e)},i.prototype.getPixelRatio=function(e){return this.useRetina?Jp():1},i.prototype.getAdjustedScale=function(e,t,r,n){if(!n)return r;var s=e*r,o=e*r,l,u;return n.maxWidth&&s>n.maxWidth&&(l=n.maxWidth/e),n.maxHeight&&o>n.maxHeight&&(u=n.maxHeight/t),l||u?ye(l,u):(n.minWidth&&s<n.minWidth&&(l=n.minWidth/e),n.minHeight&&o<n.minHeight&&(u=n.minHeight/t),l||u?he(l,u):r)},i.prototype.imagesToDataURI=function(e,t){return Qe(this,void 0,void 0,function(){var r,n,s,o,l,u;return Re(this,function(h){switch(h.label){case 0:if(r=e.querySelectorAll("image"),!r.length)return[3,2];for(n=[],s=r.length,o=0;o<s;o++)l=r[o],u=l.getAttributeNS(i.XLINK,"href"),u&&(u.indexOf("data:image")!==-1||(u.indexOf(".svg")!==-1?n.push(this.svgToDataURI(l,t)):n.push(this.imageToDataURI(l,t))));return[4,Promise.all(n)];case 1:return h.sent(),[2];case 2:return[2]}})})},i.prototype.prepForeignObjects=function(e,t){return Qe(this,void 0,void 0,function(){var r,n,s;return Re(this,function(o){if(r=e.querySelectorAll("foreignObject"),r.length)for(n=r.length,s=0;s<n;s++)this.temporarilyRemoveObject(r[s]);return[2]})})},i.prototype.imageToDataURI=function(e,t){return Qe(this,void 0,void 0,function(){var r,n,s,o;return Re(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,this.loadNewImage(e.getAttributeNS(i.XLINK,"href"),null,null,"anonymous")];case 1:r=l.sent(),n=document.createElement("canvas"),n.width=r.width,n.height=r.height,n.getContext("2d").drawImage(r,0,0);try{return s=n.toDataURL(),e.setAttribute("href",s),[2,s]}catch{return t.keepTainted!==!1&&this.temporarilyRemoveObject(e),[2,void 0]}return[3,3];case 2:return o=l.sent(),(!t||t.keepTainted!==!1)&&this.temporarilyRemoveObject(e),[2,void 0];case 3:return[2]}})})},i.prototype.svgToDataURI=function(e,t){return Qe(this,void 0,void 0,function(){var r,n,s,o,l;return Re(this,function(u){switch(u.label){case 0:r=e.getAttributeNS(i.XLINK,"href"),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,Es(r)];case 2:return n=u.sent(),s=this.adapter.apply("charset",{charset:"base64",type:"svg",options:t}).charset,o=this.adapter.apply("svgToDataURI",{data:"data:"+this.getContentType("svg")+";"+s+","+btoa(n.response),options:t}).data,e.setAttributeNS(i.XLINK,"href",o),[2,o];case 3:return l=u.sent(),(!t||t.keepTainted!==!1)&&this.temporarilyRemoveObject(e),[2,void 0];case 4:return[2]}})})},i.prototype.temporarilyRemoveObject=function(e,t){var r=e.parentElement||e.parentNode;t||(t=this.sprite.paper.add("g").node),r.insertBefore(t,e),e.textContent,r.removeChild(e),this._removedObjects.push({element:e,placeholder:t})},i.prototype.restoreRemovedObjects=function(){for(var e;e=this._removedObjects.pop(),!!e;){var t=e.placeholder.parentElement||e.placeholder.parentNode;t.insertBefore(e.element,e.placeholder)}},i.prototype.simplifiedImageExport=function(){return Qe(this,void 0,void 0,function(){var e,t,r,n,s,o,l,u,h;return Re(this,function(p){switch(p.label){case 0:if(this.useSimplifiedExport===!1)return[2,!1];if(e=C.getCache("simplifiedImageExport"),e===!1||e===!0)return[2,e];p.label=1;case 1:p.trys.push([1,6,,7]),t=document.createElement("canvas"),t.width=1,t.height=1,r=t.getContext("2d"),n=this.getDOMURL(),s=new Blob([this.normalizeSVG("<g></g>",{},1,1)],{type:"image/svg+xml"}),o=n.createObjectURL(s),l=void 0,p.label=2;case 2:return p.trys.push([2,4,,5]),[4,this.loadNewImage(o,1,1)];case 3:return l=p.sent(),[3,5];case 4:return u=p.sent(),[2,!1];case 5:r.drawImage(l,0,0),n.revokeObjectURL(o);try{return C.setCache("simplifiedImageExport",!0),[2,!0]}catch{return C.setCache("simplifiedImageExport",!1),[2,!1]}return[3,7];case 6:return h=p.sent(),C.setCache("simplifiedImageExport",!1),[2,!1];case 7:return[2]}})})},i.prototype.loadNewImage=function(e,t,r,n){return new Promise(function(s,o){var l;t&&r?l=new Image(t,r):l=new Image,n&&l.setAttribute("crossOrigin",n),l.onload=function(){s(l)};function u(){if(n){var h=l.src;l.onerror=function(){o(new Error('Loading image "'+e+'" failed'))},l.removeAttribute("crossorigin"),l.src="",l.src=h}else o(new Error('Loading image "'+e+'" failed'))}l.onabort=u,l.onerror=u,l.src=e})},i.prototype.getDOMURL=function(){return self.URL||self.webkitURL||self},i.prototype.getSVG=function(e,t,r){return r===void 0&&(r=!0),Qe(this,void 0,void 0,function(){var n,s,o,l,u,h,p,d,c,f;return Re(this,function(m){switch(m.label){case 0:return n=this._objectsAlreadyHidden,n||this.hideNonExportableSprites(),P(t)||(t=this.getFormatOptions("svg")),[4,this.awaitValidSprites()];case 1:return m.sent(),s=this.sprite.pixelWidth,o=this.sprite.pixelHeight,l=Xo(this.sprite.dom),u=Yo(this.sprite.dom),h=t.scale||1,p=this.getPixelRatio(t),h=this.getAdjustedScale(s*p,o*p,h,t),d=this.normalizeSVG(this.serializeElement(this.sprite.paper.defs)+this.serializeElement(this.sprite.dom),t,s,o,h,l,u),c=this.adapter.apply("charset",{charset:"charset=utf-8",type:"svg",options:t}).charset,f=this.adapter.apply("getSVG",{data:r?"data:"+this.getContentType(e)+";"+c+","+encodeURIComponent(d):d,options:t}).data,n||this.restoreNonExportableSprites(),[2,f]}})})},i.prototype.normalizeSVG=function(e,t,r,n,s,o,l,u){var h="";r&&(h+='width="'+Math.round(r*(s||1))+'px" '),n&&(h+='height="'+Math.round(n*(s||1))+'px" ');var p="";o&&(p+="font-family: "+o.replace(/"/g,"")+";"),l&&(p+="font-size: "+l+";"),s&&(h+='viewBox="0 0 '+r+" "+n+'" ');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],qt),d.push(c[f]);e.match(/<svg/)?h!==""&&(e=e.replace(/(<svg[^>]*)width="[^"]*"/,"$1"),e=e.replace(/(<svg[^>]*)height="[^"]*"/,"$1"),e=e.replace(/(<svg)/,"$1"+h)):e='<?xml version="1.0" encoding="utf-8"?><svg '+h+' style="'+p+'" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+e+"</svg>",u&&(e=e.replace(/(<svg[^>]*>)/,'$1<rect width="100%" height="100%" fill="'+u.rgba+'"/>')),uy()&&(e=e.replace(/<feColorMatrix [^\/>]*\/>/gi,""));var m=new RegExp("url\\("+Os(Ra()),"g");if(e=e.replace(m,"url(#"),e=e.replace(/url\("([^)]*)"\)/gm,"url($1)"),d.length)for(var f=0;f<d.length;f++)e=e.replace(qt,d[f]);return e=this.adapter.apply("normalizeSVG",{data:e,options:t}).data,e},i.prototype.serializeElement=function(e){return new XMLSerializer().serializeToString(e)},i.prototype.getPDF=function(e,t){return Qe(this,void 0,void 0,function(){function r(y){var v={};v.normal=y.normal.path,m[y.normal.path]=y.normal.bytes,y.bold?(v.bold=y.bold.path,m[y.bold.path]=y.bold.bytes):v.bold=y.normal.path,y.italics?(v.italics=y.italics.path,m[y.italics.path]=y.italics.bytes):v.italics=y.normal.path,y.bolditalics?(v.bolditalics=y.bolditalics.path,m[y.bolditalics.path]=y.bolditalics.bytes):v.bolditalics=y.normal.path,f[y.name]=v}var n,s,o,l,u,h,p,d,c,f,m;return Re(this,function(y){switch(y.label){case 0:return[4,this.getImage(t.imageFormat||"png",t)];case 1:return n=y.sent(),[4,this.pdfmake];case 2:return s=y.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:[]},u=this.adapter.apply("title",{title:this.title,options:t}).title,h=0,u&&(l.content.push({text:u,fontSize:t.fontSize||14,bold:!0,margin:[0,0,0,15]}),h+=50),t.addURL&&(l.content.push({text:this.language.translate("Saved from")+": "+document.location.href,fontSize:t.fontSize,margin:[0,0,0,15]}),h+=50),e!="pdfdata"&&l.content.push({image:n,alignment:t.align||"left",fit:this.getPageSizeFit(l.pageSize,l.pageMargins,h)}),e=="pdfdata"||t.addData?(d=(p=l.content).push,c={},[4,this.getPDFData("pdf",t)]):[3,4];case 3:d.apply(p,[(c.table=y.sent(),c.fontSize=t.fontSize||14,c)]),y.label=4;case 4:return l=this.adapter.apply("pdfmakeDocument",{doc:l,options:t}).doc,f=null,m=null,t.font&&(f={},m={},r(t.font),t.extraFonts&&H(t.extraFonts,r)),[4,new Promise(function(v,b){s.createPdf(l,null,f,m).getDataUrl(function(x){v(x)})})];case 5:return[2,y.sent()]}})})},i.prototype.getPDFData=function(e,t){return Qe(this,void 0,void 0,function(){var r,n,s,o,l,u,h=this;return Re(this,function(p){if(r={body:[]},n=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"pdf"}).dataFields,s=this.data,t.pivot)o=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"pdfdata"}).dataFieldsOrder,$r(n,function(d,c){var f=[];t.addColumnNames&&f.push(c);for(var m=s.length,y=0;y<m;y++){var v=s[y][d];f.push(h.convertToSpecialFormat(d,v,t,!0))}r.body.push(h.getPDFDataRow(f,t,void 0,!0))},function(d,c){var f=o.indexOf(d),m=o.indexOf(c);return f>m?1:f<m?-1:0});else for(t.addColumnNames&&(r.body.push(this.getPDFDataRow(n,t,void 0,!0)),r.headerRows=1),l=s.length,u=0;u<l;u++)r.body.push(this.getPDFDataRow(s[u],t,n));return[2,this.adapter.apply("pdfmakeTable",{table:r,options:t}).table]})})},i.prototype.getPDFDataRow=function(e,t,r,n){var s=this;n===void 0&&(n=!1);var o=[];r||(r=e);var l=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"pdfdata"}).dataFieldsOrder;return $r(r,function(u,h){var p=s.convertEmptyValue(u,e[u],t),d=n?p:s.convertToSpecialFormat(u,p,t);d=""+d,o.push(d)},function(u,h){var p=l.indexOf(u),d=l.indexOf(h);return p>d?1:p<d?-1:0}),o},i.prototype.getPageSizeFit=function(e,t,r){r===void 0&&(r=0);var n=[0,0,0,0];typeof t=="number"?n=[t,t,t,t]:t.length==2?n=[t[0],t[1],t[0],t[1]]:t.length==4&&(n=t);var s={"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]},o=s[e];return o[0]-=n[0]+n[2],o[1]-=n[1]+n[3]+r,o},i.prototype.getExcel=function(e,t){return Qe(this,void 0,void 0,function(){var r,n,s,o,l,u,h,p,d,c,f=this;return Re(this,function(m){switch(m.label){case 0:return P(t)||(t=this.getFormatOptions("xlsx")),[4,this.xlsx];case 1:if(r=m.sent(),n=this.adapter.apply("xlsxWorkbookOptions",{xlsx:r,options:{bookType:"xlsx",bookSST:!1,type:"base64"}}).options,s=this.normalizeExcelSheetName(this.adapter.apply("xlsxSheetName",{xlsx:r,name:this.title||this.language.translate("Data")}).name),o={SheetNames:[s],Sheets:{}},l=[],u=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"xslx"}).dataFields,t.pivot)h=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"xlsx"}).dataFieldsOrder,$r(u,function(y,v){var b=[];t.addColumnNames&&b.push(v);for(var x=f.data.length,_=0;_<x;_++){var $=f.data[_][y];b.push(f.convertToSpecialFormat(y,$,t,!0))}l.push(f.getExcelRow(b,t,void 0,!0))},function(y,v){var b=h.indexOf(y),x=h.indexOf(v);return b>x?1:b<x?-1:0});else for(t.addColumnNames&&l.push(this.getExcelRow(u,t,void 0,!0)),p=this.data.length,d=0;d<p;d++)l.push(this.getExcelRow(this.data[d],t,u));return o.Sheets[s]=r.utils.aoa_to_sheet(l),o=this.adapter.apply("xlsxWorkbook",{xlsx:r,workbook:o,options:t}).workbook,c=this.adapter.apply("getExcel",{data:"data:"+this.getContentType(e)+";base64,"+r.write(o,n),options:t}).data,[2,c]}})})},i.prototype.normalizeExcelSheetName=function(e){return e=e.replace(/([:\\\/?*\[\]]+)/g," "),ws(e,31,"...",!0)},i.prototype.getExcelRow=function(e,t,r,n){var s=this;n===void 0&&(n=!1);var o=[];r||(r=e);var l=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"xlsx"}).dataFieldsOrder;return $r(r,function(u,h){var p=s.convertEmptyValue(u,e[u],t),d=n?p:s.convertToSpecialFormat(u,p,t,!0);o.push(d)},function(u,h){var p=l.indexOf(u),d=l.indexOf(h);return p>d?1:p<d?-1:0}),o},i.prototype.getCSV=function(e,t,r){return r===void 0&&(r=!0),Qe(this,void 0,void 0,function(){var n,s,o,l,u,h,p,d,c,f,m=this;return Re(this,function(y){if(P(t)||(t=this.getFormatOptions("csv")),n="",s=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"csv"}).dataFields,o="",l=this.data,t.pivot)u=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"csv"}).dataFieldsOrder,$r(s,function(v,b){var x=[];t.addColumnNames&&x.push(b);for(var _=l.length,$=0;$<_;$++){var O=l[$][v];x.push(m.convertToSpecialFormat(v,O,t,!0))}n+=o+m.getCSVRow(x,t,void 0,!0),o=`
|
|
6
|
+
`},function(v,b){var x=u.indexOf(v),_=u.indexOf(b);return x>_?-1:x<_?1:0});else{for(h=l.length,p=0;p<h;p++)d=this.getCSVRow(l[p],t,s),t.reverse?n=d+o+n:n+=o+d,o=`
|
|
7
|
+
`;t.addColumnNames&&(n=this.getCSVRow(s,t,void 0,!0)+o+n)}return c=this.adapter.apply("charset",{charset:"charset=utf-8",type:e,options:t}).charset,f=this.adapter.apply("getCSV",{data:r?"data:"+this.getContentType(e)+";"+c+","+encodeURIComponent(n):n,options:t}).data,[2,f]})})},i.prototype.getCSVRow=function(e,t,r,n){var s=this;n===void 0&&(n=!1);var o=t.separator||",",l=[];r||(r=e);var u=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"csv"}).dataFieldsOrder;return $r(r,function(h,p){var d=s.convertEmptyValue(h,e[h],t),c=n?d:s.convertToSpecialFormat(h,d,t);c=""+c,c=c.replace(/"/g,'""'),(t.forceQuotes||c.search(new RegExp(`"|
|
|
8
|
+
|`+o,"g"))>=0)&&(c='"'+c+'"'),l.push(c)},function(h,p){var d=u.indexOf(h),c=u.indexOf(p);return d>c?1:d<c?-1:0}),l.join(o)},i.prototype.getHTML=function(e,t,r){return r===void 0&&(r=!0),Qe(this,void 0,void 0,function(){var n,s,o,l,u,h,p,d,c=this;return Re(this,function(f){if(P(t)||(t=this.getFormatOptions("html")),n="<table>",t.tableClass&&(n='<table class="'+t.tableClass+'">'),s=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,n+=`
|
|
9
|
+
<tbody>`,$r(s,function(m,y){var v=[];t.addColumnNames&&v.push(y);for(var b=o.length,x=0;x<b;x++){var _=o[x][m];v.push(c.convertToSpecialFormat(m,_,t,!0))}n+=`
|
|
10
|
+
`+c.getHTMLRow(v,t,void 0,!0)},function(m,y){var v=l.indexOf(m),b=l.indexOf(y);return v>b?-1:v<b?1:0}),n+=`
|
|
11
|
+
</tbody>`;else{for(t.addColumnNames&&(n+=`
|
|
12
|
+
<thead>
|
|
13
|
+
`+this.getHTMLRow(s,t,void 0,!0,!0)+`
|
|
14
|
+
</thead>`),n+=`
|
|
15
|
+
<tbody>`,u=o.length,h=0;h<u;h++)n+=`
|
|
16
|
+
`+this.getHTMLRow(o[h],t,s);n+=`
|
|
17
|
+
</tbody>`}return n+=`
|
|
18
|
+
</table>`,p=this.adapter.apply("charset",{charset:"charset=utf-8",type:e,options:t}).charset,d=this.adapter.apply("getHTML",{data:r?"data:"+this.getContentType(e)+";"+p+","+encodeURIComponent(n):n,options:t}).data,[2,d]})})},i.prototype.getHTMLRow=function(e,t,r,n,s){var o=this;n===void 0&&(n=!1),s===void 0&&(s=!1);var l=" <tr>";t.rowClass&&(l=' <tr class="'+t.rowClass+'">'),r||(r=e);var u=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"html"}).dataFieldsOrder,h=s?"th":"td",p=!0;return $r(r,function(d,c){var f=o.convertEmptyValue(d,e[d],t),m=n?f:o.convertToSpecialFormat(d,f,t);m=""+m,m=m.replace(/[\u00A0-\u9999<>\&]/gim,function(v){return"&#"+v.charCodeAt(0)+";"});var y=h;t.pivot&&p&&(y="th"),t.cellClass?l+=`
|
|
19
|
+
<`+y+' class="'+t.cellClass+'">'+m+"</"+y+">":l+=`
|
|
20
|
+
<`+y+">"+m+"</"+y+">",p=!1},function(d,c){var f=u.indexOf(d),m=u.indexOf(c);return f>m?1:f<m?-1:0}),l+=`
|
|
21
|
+
</tr>`,l},i.prototype.getJSON=function(e,t,r){return r===void 0&&(r=!0),Qe(this,void 0,void 0,function(){var n,s,o,l,u,h,p,d,c,f=this;return Re(this,function(m){if(P(t)||(t=this.getFormatOptions("json")),s=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"json"}).dataFields,this._dynamicDataFields)n=this.data;else for(n=[],o=this.data,l=function(y,v){var b=o[v];if(typeof b=="object"){var x={};te(b,function(_,$){P(s[_])&&(x[s[_]]=f.convertToSpecialFormat(_,$,t))}),n.push(x)}},u=o.length,h=0;h<u;h++)l(u,h);return p=JSON.stringify(n,function(y,v){return typeof v=="object"&&te(v,function(b,x){v[b]=f.convertToSpecialFormat(b,x,t)}),v},t.indent),d=this.adapter.apply("charset",{charset:"charset=utf-8",type:e,options:t}).charset,c=this.adapter.apply("getJSON",{data:r?"data:"+this.getContentType(e)+";"+d+","+encodeURIComponent(p):p,options:t}).data,[2,c]})})},i.prototype.convertToSpecialFormat=function(e,t,r,n){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?r.useTimestamps?t=t.getTime():r.useLocale?n||(t=t.toLocaleString()):t=this.dateFormatter.format(t,this.dateFormat):ce(t)&&this.isDateField(e)&&this.dateFormat&&(t=this.dateFormatter.format(this.dateFormatter.parse(t),this.dateFormat)),t},i.prototype.convertEmptyValue=function(e,t,r){return P(t)?t:r.emptyAs},i.prototype.download=function(e,t,r){return r===void 0&&(r=!1),Qe(this,void 0,void 0,function(){var y,v,o,n,h,p,d,c,s,y,v,o,l,u,h,p,d,c,f,m,y,v,b,x;return Re(this,function(_){if(this.msBlobDownloadSupport()){if(y=e.split(";"),v=y.shift().replace(/data:/,""),e=decodeURIComponent(y.join(";").replace(/^[^,]*,/,"")),["image/svg+xml","application/json","text/csv"].indexOf(v)==-1)try{o=atob(e),e=o}catch{return[2,!1]}else return n=new Blob([e],{type:v}),window.navigator.msSaveBlob(n,t),[2,!0];for(h=new Array(e.length),p=0;p<e.length;++p)d=e.charCodeAt(p),h[p]=d;c=new Blob([new Uint8Array(h)],{type:v}),window.navigator.msSaveBlob(c,t)}else if(this.blobDownloadSupport()){if(s=document.createElement("a"),s.download=t,document.body.appendChild(s),y=e.split(";"),v=y.shift().replace(/data:/,""),e=decodeURIComponent(y.join(";").replace(/^[^,]*,/,"")),["image/svg+xml","application/json","text/csv","text/html"].indexOf(v)==-1)try{o=atob(e),e=o}catch{return[2,!1]}else return r&&(e="\uFEFF"+e),l=new Blob([e],{type:v}),u=window.URL.createObjectURL(l),s.href=u,s.download=t,s.click(),setTimeout(function(){document.body.removeChild(s),window.URL.revokeObjectURL(u)},100),[2,!0];for(h=new Array(e.length),p=0;p<e.length;++p)d=e.charCodeAt(p),h[p]=d;r&&(h=[239,187,191].concat(h)),c=new Blob([new Uint8Array(h)],{type:v}),f=window.URL.createObjectURL(c),s.href=f,s.download=t,document.body.appendChild(s),s.click(),document.body.removeChild(s),setTimeout(function(){window.URL.revokeObjectURL(f)},100)}else this.linkDownloadSupport()?(m=document.createElement("a"),m.download=t,m.href=e,document.body.appendChild(m),m.click(),document.body.removeChild(m)):this.legacyIE()?(y=e.match(/^data:(.*);[ ]*([^,]*),(.*)$/),y.length===4&&(y[2]=="base64"?y[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")):(v=void 0,t.match(/\.svg$/)?v="image/svg+xml":(v="text/plain",t+=".txt"),b=document.createElement("iframe"),b.width="1px",b.height="1px",b.style.display="none",document.body.appendChild(b),x=b.contentDocument,x.open(v,"replace"),x.write(decodeURIComponent(y[3])),x.close(),x.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=C.getCache("linkDownloadSupport");if(e===!1||e===!0)return e;var t=document.createElement("a"),r=typeof t.download<"u";return C.setCache("linkDownloadSupport",r),r},i.prototype.blobDownloadSupport=function(){return P(window.Blob)},i.prototype.msBlobDownloadSupport=function(){return P(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,r){return Qe(this,void 0,void 0,function(){return Re(this,function(n){return t.printMethod=="css"?[2,this.printViaCSS(e,t,r)]:[2,this.printViaIframe(e,t,r)]})})},i.prototype.printViaCSS=function(e,t,r){return Qe(this,void 0,void 0,function(){var n,s,o,l,u;return Re(this,function(h){return n=document.documentElement.scrollTop||document.body.scrollTop,s=new Ye(Ns(this.container),"body > *",{display:"none",position:"fixed",visibility:"hidden",opacity:"0",clipPath:"polygon(0px 0px,0px 0px,0px 0px,0px 0px);"}),r&&document&&document.title&&(o=document.title,document.title=r),l=new Image,l.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),u=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,u&&t.delay<1e3?t.delay=1e3:t.delay<100&&(t.delay=100),this.setTimeout(function(){document.body.removeChild(l),s.dispose(),o&&(document.title=document.title),document.documentElement.scrollTop=document.body.scrollTop=n},t.delay||500),[2,!0]})})},i.prototype.printViaIframe=function(e,t,r){return Qe(this,void 0,void 0,function(){var n,s,o;return Re(this,function(l){return n=document.createElement("iframe"),n.style.visibility="hidden",document.body.appendChild(n),n.contentWindow.document.open(),n.contentWindow.document.close(),s=new Image,s.src=e,s.style.maxWidth="100%",s.style.height="auto",r&&(n.contentWindow.document.title=r),n.contentWindow.document.body.appendChild(s),n.load=function(){n.contentWindow.document.body.appendChild(s)},this.setTimeout(function(){try{n.contentWindow.document.execCommand("print",!1,null)||n.contentWindow.print()}catch{n.contentWindow.print()}},t.delay||50),o=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,o&&t.delay<1e3?t.delay=1e3:t.delay<100&&(t.delay=100),this.setTimeout(function(){document.body.removeChild(n)},t.delay+50||100),[2,!0]})})},i.prototype.findBackgroundColor=function(e){var t=1,r=Fu(e,"background-color");if((r.match(/[^,]*,[^,]*,[^,]*,[ ]?0/)||r=="transparent")&&(t=0),t==0){var n=e.parentElement;return n?this.findBackgroundColor(n):ie("#fff")}else return ie(r,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 Ki,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 ve),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 ba,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 ve),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 js,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 ve),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&&H(this.data,function(t){te(t,function(r,n){P(e._dataFields[r])||(e._dataFields[r]=e.adapter.apply("dataFieldName",{name:r,field:r}).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";break}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 Ci),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 Ko,this._modal.adapter.add("classPrefix",function(e){return e=ge.classNamePrefix+e,e})),this._modal},enumerable:!0,configurable:!0}),i.prototype.showModal=function(e,t){this.hideModal(),this.hidePreloader();var r=this.modal;r.container=this.sprite.svgContainer.SVGContainer,r.content=e,r.readerTitle=t,r.open()},i.prototype.hideModal=function(){this._modal&&this.modal.close()},i.prototype._canvg=function(){return Qe(this,void 0,void 0,function(){var e;return Re(this,function(t){switch(t.label){case 0:return[4,import("./SXJYUHC3.js")];case 1:return e=t.sent(),e.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 kd==null&&(kd=mx()),kd},enumerable:!0,configurable:!0}),i.prototype._xlsx=function(){return Qe(this,void 0,void 0,function(){return Re(this,function(e){switch(e.label){case 0:return[4,import("./KZ37E2J3.js")];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(){P(this._spriteInteractionsEnabled)||(this._spriteInteractionsEnabled=this.sprite.interactionsEnabled),this.sprite.interactionsEnabled=!1},i.prototype._releasePointers=function(){P(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&&H(t.nonExportableSprites,function(r){!r.isHidden&&!r.isHiding&&r.visible&&e._hiddenObjects.push(r),r.hide(0)}),this._objectsAlreadyHidden=!0}},i.prototype.restoreNonExportableSprites=function(){this._objectsAlreadyHidden&&(H(this._hiddenObjects,function(e){e.show(0)}),this._hiddenObjects=[],this._objectsAlreadyHidden=!1)},i.prototype.awaitValidSprites=function(){return Qe(this,void 0,void 0,function(){var e;return Re(this,function(t){switch(t.label){case 0:return e=[],this.validateSprites.length&&H(this.validateSprites,function(r,n){r.invalid&&e.push(new Promise(function(s,o){r.events.once("validated",function(l){s()})}))}),e.length?[4,Promise.all(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},i.prototype.processConfig=function(e){C.registeredClasses.ExportMenu=Vd,e&&(P(e.menu)&&!P(e.menu.type)&&(e.menu.type="ExportMenu"),P(e.dataFields)&&Be(e.dataFields)&&(this.dataFields=e.dataFields,delete e.dataFields)),a.prototype.processConfig.call(this,e)},i.XLINK="http://www.w3.org/1999/xlink",i})(Qo);var Ke=["fill","fillOpacity","stroke","strokeOpacity","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin"],ee=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.properties={},e._eventDispatcher=new fd(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 Ue,e._positionPrecision=3,e._language=new Ue,e._exporting=new Ue,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",N(50)),e.setPropertyValue("tooltipX",N(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 Ce(function(){te(e._bindings,function(t,r){r.dispose()})})),e.setPropertyValue("interactionsEnabled",!0),e}return 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 gt(this)),this._adapterO},enumerable:!0,configurable:!0}),i.prototype.applyTheme=function(){a.prototype.applyTheme.call(this),ge.autoSetClassName&&this.setClassName()},i.prototype.getCurrentThemes=function(){var e=this._themes;if(e)return e;var t=this._parent;return t?t.getCurrentThemes():C.themes},i.prototype.applyInternalDefaults=function(){this._internalDefaultsApplied=!0},i.prototype.invalidate=function(){this.disabled||this._isTemplate||this.__disabled||this.invalid||(this.invalid=!0,C.addToInvalidSprites(this),Se.requestFrame())},i.prototype.validate=function(){this.dispatchImmediately("beforevalidated"),this._internalDefaultsApplied||this.applyInternalDefaults(),this.beforeDraw(),this.draw(),this.invalid=!1,C.removeFromInvalidSprites(this),this.afterDraw()},i.prototype.invalidatePosition=function(){this.disabled||this._isTemplate||this.positionInvalid||(this.positionInvalid=!0,C.addToInvalidPositions(this),Se.requestFrame())},i.prototype.validatePosition=function(){var e=this.pixelX,t=this.pixelY,r=this.dx,n=this.dy,s=e+r,o=t+n;this._updateDisabled&&(this._internalDisabled?this.group.attr({display:"none"}):this.disabled||this.removeSVGAttribute("display"),this._updateDisabled=!1);var l=this.measure(),u=this.group.transformString;this.group.moveTo({x:s,y:o}),this.group.rotation=this.rotation,this.nonScaling?this.group.scale=this.scale/this.globalScale:this.group.scale=this.scale,(u!=this.group.transformString||l)&&(u==null?this.dispatch("transformed"):this.dispatchImmediately("transformed"),this.dispatch("positionchanged"),(this.showTooltipOn=="hit"||this.showTooltipOn=="always")&&this.updateTooltipPosition()),e+r==s&&t+n==o&&(C.removeFromInvalidPositions(this),this.positionInvalid=!1);var h=this._maskRectangle;h&&this._clipElement.moveTo({x:h.x-e,y:h.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 r=hn(this._adapterO.keys()),n=r.next();!n.done;n=r.next()){var s=n.value;switch(s){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[s]=this[s];break}}}catch(o){e={error:o}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}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.showTooltip():this.hideTooltip(0))},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;I(this.filters.iterator(),function(t){t.scale=e.globalScale})},i.prototype.removeFromInvalids=function(){C.removeFromInvalidSprites(this),C.removeFromInvalidPositions(this)},i.prototype.copyFrom=function(e){var t=this;a.prototype.copyFrom.call(this,e),this.isMeasured=e.isMeasured,this.states.copyFrom(e.states),e.filters.length>0&&e.filters.each(function(r){t.filters.push(r.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,xi(e.propertyFields,this.propertyFields),xi(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(a.prototype.dispose.call(this),this._adapterO&&this._adapterO.clear(),this.applyOnClones&&this._clones)for(var e=this._clones.length-1;e>=0;e--){var t=this._clones.getIndex(e);t.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 r=this.stroke;r&&!(r instanceof be)&&r.dispose&&(this.clonedFrom&&this.clonedFrom.stroke==r||r.dispose());var n=this.fill;if(n&&!(n instanceof be)&&n.dispose&&(this.clonedFrom&&this.clonedFrom.fill==n||n.dispose()),P(this.id)&&this.map.removeKey(this.id),this.parent=void 0,this._filters)for(;this._filters.length>0;){var s=this._filters.getIndex(0);s.dispose(),this._filters.removeValue(s)}this._alwaysShowDisposers=void 0}},Object.defineProperty(i.prototype,"isTemplate",{get:function(){return this._isTemplate},set:function(e){e=tt(e),this._isTemplate!=e&&(this._isTemplate=e,this instanceof U&&I(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 P(this._showSystemTooltip)?this._showSystemTooltip:this.virtualParent?this.virtualParent.showSystemTooltip:this._parent?this._parent.showSystemTooltip:!1},set:function(e){e=tt(e),this._showSystemTooltip!=e&&(this._showSystemTooltip=e,this.applyAccessibility())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"topParent",{get:function(){if(this._topParent)return this._topParent;if(this._parent)return this._parent.topParent},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&&H(t,function(n){n.dispose()}),this._alwaysShowDisposers=[],this.showTooltipOn=="always")for(;e!=null;){var r=e.events.on("visibilitychanged",this.handleAlwaysShow,this,!1);this.addDisposer(r),this._alwaysShowDisposers.push(r),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 be){var r=this.fillModifier.modify(this.fill);r&&r.element&&this.paper.appendDef(r.element)}if(this.strokeModifier&&this.stroke instanceof be){var n=this.strokeModifier.modify(this.stroke);n&&n.element&&this.paper.appendDef(n.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 Oe),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 Oe),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),ge.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:wr()},set:function(e){this.setPaper(e)},enumerable:!0,configurable:!0}),i.prototype.setPaper=function(e){var t=this._paper;return t!=e?(this._paper=e,this.appendDefs(),!0):!1},Object.defineProperty(i.prototype,"htmlContainer",{get:function(){if(this._htmlContainer)return this._htmlContainer;var e=this._parent;if(e)return e.htmlContainer},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 ve,this._disposers.push(this._filters.events.onAll(this.applyFilters,this)),this._disposers.push(new Pe(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=ge.classNamePrefix;this.element&&this.element.addClass(t+e),this.group.addClass(t+e+"-group"),P(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=C.getUniqueId();this._clipPath.attr({id:e}),this.group.attr({"clip-path":'url("'+Ra()+e+'")'})}},i.prototype.applyMask=function(){var e=this.mask;if(this._clipPath&&e)if(e instanceof U){this._clipElement.attr({width:he(0,e.pixelWidth),height:he(0,e.pixelHeight)});var t=It({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,r=100;this.filterElement?this.filterElement.removeChildNodes():(this.filterElement=this.paper.addGroup("filter"),this._disposers.push(this.filterElement)),this.paper.appendDef(this.filterElement);var n="filter-"+this.uid;this.filterElement.attr({id:n}),I(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>r&&(r=l.height),l.scale=e.globalScale});var s=t+"%",o=r+"%";this.filterElement.attr({width:s,height:o,x:-(t-100)/2+"%",y:-(r-100)/2+"%"}),this.group.attr({filter:'url("'+Ra()+n+'")'})}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(),ge.autoSetClassName&&this.setClassName()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"svgContainer",{get:function(){if(this._svgContainer)return this._svgContainer;if(this._parent)return this._parent.svgContainer},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,r=0,n=0,s=t.x,o=t.y,l=t.width,u=t.height,h=this.pixelPaddingLeft,p=this.pixelPaddingRight,d=this.pixelPaddingTop,c=this.pixelPaddingBottom,f=he(l+h+p,this.pixelWidth),m=he(u+d+c,this.pixelHeight),y=t.x,v=t.x+f,b=t.y,x=t.y+m,_=this.horizontalCenter,$=this.verticalCenter;switch(_){case"none":r=s+h;break;case"left":r=h;break;case"middle":r=h-(l+p+h)/2;break;case"right":r=-p-l;break}switch($){case"none":n=o+d;break;case"top":n=d;break;case"middle":n=d-(u+c+d)/2;break;case"bottom":n=-c-u;break}this._measuredHeight=m,this._measuredWidth=f;var O=E(r-s,this._positionPrecision,!0),F=E(n-o,this._positionPrecision,!0);this.ex=O-h,this.ey=F-d,this.maxLeft=y+O-h,this.maxRight=v+O-h,this.maxTop=b+F-d,this.maxBottom=x+F-d,this.pixelPerfect&&ge.pixelPerfectPrecision==0&&(O-=.5,F-=.5),this.element.moveTo({x:O,y:F}),e!=this.element.transformString&&this.dispatchImmediately("transformed")}},i.prototype.measure=function(){this.updateCenter();var e=this._measuredWidth,t=this._measuredHeight,r=this.maxLeft,n=this.maxRight,s=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 u=this.paper.svg,h=u.createSVGMatrix(),p=this.rotation,d=this.scale;this.nonScaling&&(d=this.scale/this.globalScale),h.a=Y(p)*d,h.c=-X(p)*d,h.e=0,h.b=X(p)*d,h.d=Y(p)*d,h.f=0;var c=u.createSVGPoint();c.x=r,c.y=s;var f=u.createSVGPoint();f.x=n,f.y=s;var m=u.createSVGPoint();m.x=n,m.y=o;var y=u.createSVGPoint();y.x=r,y.y=o;var v=c.matrixTransform(h),b=f.matrixTransform(h),x=m.matrixTransform(h),_=y.matrixTransform(h);r=Math.min(v.x,b.x,x.x,_.x),n=Math.max(v.x,b.x,x.x,_.x),s=Math.min(v.y,b.y,x.y,_.y),o=Math.max(v.y,b.y,x.y,_.y),e=n-r,t=o-s,this.maxLeft=E(r,l,!0),this.maxRight=E(n,l,!0),this.maxTop=E(s,l,!0),this.maxBottom=E(o,l,!0)}return this._measuredWidth=E(e,l,!0),this._measuredHeight=E(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&&(P(this.tooltipText)||P(this.tooltipHTML))&&this.updateTooltipPosition(),!0):!1},i.prototype.insertBefore=function(e){var t=this._parent;if(t){var r=t.children.indexOf(e);r!==-1&&(t.children.moveValue(this,r),t.sortChildren())}return this},i.prototype.insertAfter=function(e){var t=this._parent;if(t){var r=t.children.indexOf(e);r!==-1&&(t.children.moveValue(this,r+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 de?e.value:this._parent?e/this._parent.innerWidth:0},i.prototype.getRelativeY=function(e){return e instanceof de?e.value:this._parent?e/this._parent.innerHeight:0},i.prototype.getPixelX=function(e){var t=0;if(S(e))t=e;else if(e instanceof de){var r=e.value;this._parent&&(t=E(this._parent.innerWidth*r,this._positionPrecision,!0))}return t},i.prototype.getPixelY=function(e){var t=0;if(S(e))t=e;else if(e instanceof de){var r=e.value;this._parent&&(t=E(this._parent.innerHeight*r,this._positionPrecision,!0))}return t},i.prototype.moveTo=function(e,t,r,n){this.isDragged&&!n||(e&&(S(e.x)&&this.setPropertyValue("x",E(e.x,this._positionPrecision,!0)),S(e.y)&&this.setPropertyValue("y",E(e.y,this._positionPrecision,!0))),S(t)&&(this.rotation=t),S(r)&&(this.scale=r),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 U?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 Fe([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=tt(e),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,r=this.pixelY+this.maxTop,n=t+this.maxRight,s=r+this.maxBottom,o=e.pixelX+e.maxLeft,l=e.pixelY+e.maxTop,u=o+e.maxRight,h=l+e.maxBottom;return!(o>n||u<t||l>s||h<r)},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 Cn;this._states=new Kr(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 Bi(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(){if(!this.states.getKey("default")){var e=this.states.create("default");e.properties.opacity=1}return 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"&&(P(this.tooltipHTML)||P(this.tooltipText)))&&(this.hoverable=!0),(this.states.hasKey("down")||this.showTooltipOn=="hover"&&(P(this.tooltipHTML)||P(this.tooltipText)))&&(this.clickable=!0),this.states.hasKey("focus")&&(this.focusable=!0),this.applyOnClones)for(var r=this.clones.values,n=r.length,s=0;s<n;++s){var o=r[s];o.isDisposed()||o.states.setKey(t.name,t)}},Object.defineProperty(i.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new fr(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,r){return new Gt(this,e,t,r).start()},i.prototype.setState=function(e,t,r){var n;if(e instanceof Cn)this.states.setKey(e.name,e),n=e;else if(n=this.states.getKey(e),!n)return;if(n.name=="hover"){if(this.isHidden)return;this.isHover=!0}return n.name=="hidden"?this.isHiding=!0:this.visible||this.setVisibility(n.properties.visible||this.defaultState.properties.visible),n.name=="active"&&(this.isActive=!0),S(t)||(t=n.transitionDuration),P(r)||(r=n.transitionEasing),this.transitTo(n,t,r)},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,r){var n=this,s=[],o=e.allValues,l;if(te(o,function(h,p){var d=n[h];if(p!=d&&n.defaultState.properties[h]==null&&(n.defaultState.properties[h]=d),p!="__unset"){var c={from:d,to:p,property:h};s.push(c)}}),s.length>0&&(l=this.animate(s,t,r),l&&!l.isFinished()?this._disposers.push(l.events.on("animationended",function(){n.dispatchImmediately("transitionended")})):this.dispatchImmediately("transitionended")),e.filters.length>0){var u=[];I(e.filters.iterator(),function(h){var p=h.clone();u.push(p);var d=[];I(n.filters.iterator(),function(c){c.className==p.className&&(Ss(n.defaultState.filters.iterator(),function(f){return f.className===p.className})||n.defaultState.filters.push(c),te(p.properties,function(f,m){var y=c.properties[f];y!=m&&d.push({property:f,from:y,to:m})}))}),p.animate(d,t,r)}),this.filters.clear(),this.filters.pushAll(u)}return l},i.prototype.isInTransition=function(){return this.animations.length>0},Object.defineProperty(i.prototype,"isHover",{get:function(){return this.isInteractive()?this.interactions.isHover:!1},set:function(e){e=tt(e),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:!1},set:function(e){e=tt(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:!1},set:function(e){e=tt(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=tt(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 P(e)?e:this.virtualParent?this.virtualParent.disabled:this._parent?this._parent.disabled:!1},set:function(e){this.setDisabled(e)},enumerable:!0,configurable:!0}),i.prototype.setDisabled=function(e){e=tt(e);var t=this.getPropertyValue("disabled");if(t!=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 r=this._parent.element;r.hasChild(this.group)||r.add(this.group)}this instanceof U?(this.deepInvalidate(),this._background&&this._background.invalidate()):this.invalidate(),this.__disabled||this.removeSVGAttribute("display"),this.dispatch("enabled")}return this.dispatch("transformed"),Se.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 ba,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 Ki,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 js,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 Ci,this.language=e,e))},set:function(e){var t=this;this._language.get()!==e&&this._language.set(e,e.events.on("localechanged",function(r){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 n=t._exporting.get();n.numberFormatter.language=t.language,n.dateFormatter.language=t.language,n.durationFormatter.language=t.language,n.language=t.language}t instanceof U&&t.deepInvalidate()}))},enumerable:!0,configurable:!0}),i.prototype.populateString=function(e,t){if(P(e)){e=cs(e),e=Di().escape(e);var r=e.match(/\{([^}]+)\}/g),n=void 0;if(r)for(n=0;n<r.length;n++){var s=r[n].replace(/\{([^}]+)\}/,"$1"),o=this.getTagValue(s,"",t);P(o)||(o=""),e=e.split(r[n]).join(o)}e=Di().unescape(e)}else e="";return this._adapterO?this._adapterO.apply("populateString",e):e},i.prototype.getTagValue=function(e,t,r){var n;P(r)||(r=this.dataItem);for(var s=[],o=/([^.]+)\(([^)]*)\)|([^.]+)/g,l;l=o.exec(e),l!==null;)if(l[3])s.push({prop:l[3]});else{var u=[];if(No(l[2])!="")for(var h=/'([^']*)'|"([^"]*)"|([0-9\-]+)/g,p=void 0;p=h.exec(l[2]),p!==null;)u.push(p[1]||p[2]||p[3]);s.push({method:l[1],params:u})}if(r){n=this.getTagValueFromObject(s,r.values),(!P(n)||Be(n))&&(n=this.getTagValueFromObject(s,r));var d=r.dataContext;!P(n)&&d&&(n=this.getTagValueFromObject(s,r.dataContext),P(n)||(n=this.getTagValueFromObject([{prop:e}],d)),!P(n)&&d.dataContext&&(n=this.getTagValueFromObject(s,d.dataContext))),!P(n)&&r.component&&r.component.dataItem!==r&&(n=r.component.getTagValue(e,t))}return P(n)||(n=this.getTagValueFromObject(s,this.populateStringFrom||this)),!P(n)&&this._parent&&(n=this._parent.getTagValue(e,t)),n},i.prototype.getTagValueFromObject=function(e,t,r){for(var n=t,s=!1,o=0,l=e.length;o<l;o++){var u=e[o];if(u.prop){if(n=n[u.prop],!P(n))return}else switch(u.method){case"formatNumber":var h=Ds(n);P(h)&&(n=this.numberFormatter.format(h,r||u.params[0]||void 0),s=!0);break;case"formatDate":var p=void 0;if(ce(n)?p=this.dateFormatter.parse(n):p=Ro(n),!La(p)||Tt(p.getTime()))return;P(p)&&(n=this.dateFormatter.format(p,r||u.params[0]||void 0),s=!0);break;case"formatDuration":var d=Ds(n);P(d)&&(n=this.durationFormatter.format(d,r||u.params[0]||void 0,u.params[1]||void 0),s=!0);break;case"urlEncode":case"encodeURIComponent":n=encodeURIComponent(n);break;default:n[u.method]&&n[u.method].apply(this,u.params);break}}if(!s){var c=[{method:"",params:r}];if(!P(r))S(n)?(c[0].method="formatNumber",c[0].params=""):La(n)&&(c[0].method="formatDate",c[0].params="");else{var f=id(r);f===yn?c[0].method="formatNumber":f===gn?c[0].method="formatDate":f===_s&&(c[0].method="formatDuration")}c[0].method&&(n=this.getTagValueFromObject(c,n))}return n},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 r=e.dataContext;r&&(this.config=r[this.configField],!this.config&&r.dataContext&&(this.config=r.dataContext[this.configField]))}var n=e.dataContext;if(n){var s=n.dataContext;te(this.propertyFields,function(o,l){if(P(n[l])){var u=t;u[o]=n[l]}else if(s){var h=s[l];if(P(h)){var u=t;u[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=Io.applyAll(this,e,t)),t},i.prototype.setColorProperty=function(e,t,r){var n=this.properties[e];return t instanceof be&&n instanceof be&&t.toString()==n.toString()?!1:this.setPropertyValue(e,t,r)},i.prototype.setPercentProperty=function(e,t,r,n,s,o){if(t=Om(t),S(t))return S(s)&&(t=E(t,s,o)),this.setPropertyValue(e,t,r,n);var l=this.properties[e];return t instanceof de&&l instanceof de&&t.value==l.value?!1:this.setPropertyValue(e,t,r,n)},i.prototype.setPropertyValue=function(e,t,r,n){if(this.properties[e]!==t&&!this.isDisposed()){if(this.properties[e]=t,this.events.isEnabled("propertychanged")){var s={type:"propertychanged",target:this,property:e};this.events.dispatchImmediately("propertychanged",s)}if(r&&this.invalidate(),n&&this.invalidatePosition(),this.applyOnClones)for(var o=this.clones.values,l=o.length,u=0;u<l;++u){var h=o[u];h.isDisposed()||(h[e]=t)}return!0}return!1},i.prototype.bind=function(e,t,r,n){var s=this;r===void 0&&(r=e),P(this._bindings[e])&&this._bindings[e].dispose(),this[e]=t[r],this._bindings[e]=t.events.on("propertychanged",function(o){if(o.property===r){var l=t[r];n&&(l=n(l)),s[e]=l}})},i.prototype.observe=function(e,t,r,n){var s=this;return new Fe(fa(uu(e),function(o){return s.events.on("propertychanged",function(l){l.property===o&&t.call(r,l)},r,n)}))},i.prototype.applyAccessibility=function(){var e=this.readerTitle,t=this.readerDescription,r=this.role,n=this.readerHidden,s=this.readerChecked,o=this.readerControls,l=this.readerLive,u=this.readerOrientation,h=this.readerValueNow,p=this.readerValueText,d=[],c=[],f=this.readerLabelledBy;f&&d.push(f);var m=this.readerDescribedBy;if(m&&c.push(m),e)if(d.length||this.showSystemTooltip){var y=this.titleElement,v=this.uid+"-title";y.node.textContent!=e&&(y.node.textContent=e,y.attr({id:v})),d.push(v)}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,x=this.uid+"-description";b.node.textContent!=t&&(b.node.textContent=t,b.attr({id:x})),c.push(x)}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"),r?this.setSVGAttribute({role:r}):this.removeSVGAttribute("role"),n?this.setSVGAttribute({"aria-hidden":"true"}):this.removeSVGAttribute("aria-hidden"),s?this.setSVGAttribute({"aria-checked":"true"}):s===!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"),u?this.setSVGAttribute({"aria-orientation":u}):this.removeSVGAttribute("aria-orientation"),h?this.setSVGAttribute({"aria-valuenow":h}):this.removeSVGAttribute("aria-valuenow"),p?this.setSVGAttribute({"aria-valuetext":p}):this.removeSVGAttribute("aria-valuetext")},Object.defineProperty(i.prototype,"readerTitle",{get:function(){var e=this.getPropertyValue("readerTitle");return P(e)&&this.dataItem?this.populateString(e):e},set:function(e){e=jt(e),this.setPropertyValue("readerTitle",e)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"readerDescription",{get:function(){var e=this.getPropertyValue("readerDescription");return P(e)&&this.dataItem?this.populateString(e):this.getPropertyValue("readerDescription")},set:function(e){e=jt(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=jt(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=tt(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=tt(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=jt(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=jt(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=jt(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=jt(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=jt(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=jt(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=jt(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=pe().getInteraction(this.dom);this._interaction=e,e.clickable=this.clickable,e.hoverable=this.hoverable,e.trackable=this.trackable,e.draggable=this.draggable,e.swipeable=this.swipeable,e.resizable=this.resizable,e.wheelable=this.wheelable,e.contextMenuDisabled=this.contextMenuDisabled,e.inert=this.inert,e.sprite=this,this._disposers.push(e)}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=tt(e),this.setPropertyValue("focusable",e)&&(!e&&!this.isInteractive()||(this.interactions.focusable=e,e?(this.setSVGAttribute({focusable:e}),P(this._tabindex)||(this.tabindex=0)):(this.removeSVGAttribute("focusable"),this.tabindex=void 0),this.interactions.setEventDisposer("sprite-focusable",e,function(){return new Fe([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(){var e=this._focusFilter;if(e)return e;if(this.virtualParent)return this.virtualParent.focusFilter;if(this._parent)return this._parent.focusFilter},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;if(e!=null)return e;if(this.virtualParent)return this.virtualParent.tabindex;if(this._parent)return this._parent.tabindex},set:function(e){e=ke(e),this.setPropertyValue("tabindex",e)&&S(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=tt(e),this.setPropertyValue("draggable",e)&&(!e&&!this.isInteractive()||(this.applyCursorStyle(),this.interactions.draggable=e,this.interactions.setEventDisposer("sprite-draggable",e,function(){return new Fe([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,pe().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,pe().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 r=this._parent.globalScale*this.svgContainer.cssScale;this.moveTo({x:t.x+e.shift.x/r,y:t.y+e.shift.y/r},void 0,void 0,!0)}this.dispatchImmediately("dragged",e)}},Object.defineProperty(i.prototype,"inert",{get:function(){return this.getPropertyValue("inert")},set:function(e){e=tt(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=tt(e),this.setPropertyValue("hoverable",e)&&(!e&&!this.isInteractive()||(this.applyCursorStyle(),this.interactions.hoverable=e,this.interactions.setEventDisposer("sprite-hoverable",e,function(){return new Fe([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=_r(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;if(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);return}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(C.events.once("exitframe",function(){t.showTooltip()})),this._disposers.push(pe().body.events.once("down",function(r){t.hideTooltip()})))},Object.defineProperty(i.prototype,"clickable",{get:function(){return this.getPropertyValue("clickable")},set:function(e){var t=this;e=tt(e),this.setPropertyValue("clickable",e)&&(!e&&!this.isInteractive()||(this.applyCursorStyle(),this.interactions.clickable=e,this.interactions.setEventDisposer("sprite-clickable",e,function(){return new Fe([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=tt(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=tt(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(),bn(e)&&(this._urlDisposer=this.events.on("hit",this.urlHandler,this,!1),this.clickable=!0,this.cursorOverStyle=We.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,C.removeFromInvalidSprites(this),this.invalidate()),this._baseId=e)},Object.defineProperty(i.prototype,"baseSprite",{get:function(){if(this.isBaseSprite)return this;if(this._parent)return this._parent.baseSprite},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(bn(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=tt(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=tt(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=tt(e),this.setPropertyValue("resizable",e)&&(!e&&!this.isInteractive()||(this.applyCursorStyle(),this.interactions.resizable=e,this.interactions.setEventDisposer("sprite-resizable",e,function(){return new Fe([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=_r(e.point1,this.htmlContainer,this.svgContainer.cssScale),r=_r(e.point2,this.htmlContainer,this.svgContainer.cssScale),n=pn(t,r),s=Zr(e.startPoint1,this._parent),o=Zr(e.startPoint2,this._parent),l=this.interactions.originalPosition,u=this.interactions.originalScale;if(l){var h={x:(s.x-l.x)/u,y:(s.y-l.y)/u},p={x:(o.x-l.x)/u,y:(o.y-l.y)/u},d=pn(h,p),c=Qt(n,this._parent);this.moveTo({x:c.x-d.x*this.scale,y:c.y-d.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,pe().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(){var e=this.getPropertyValue("interactionsEnabled");return e===!1?!1:this.virtualParent?this.virtualParent.interactionsEnabled:this._parent?this._parent.interactionsEnabled:!0},set:function(e){if(e=tt(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();if(e)return e;if(this.isStandaloneInstance||!this._parent)e=new Id(this.svgContainer.SVGContainer),e.sprite=this,e.language=this.language,e.numberFormatter=this.numberFormatter,e.dateFormatter=this.dateFormatter,e.durationFormatter=this.durationFormatter,this._exporting.set(e,e);else return this._parent.exporting;return e},Object.defineProperty(i.prototype,"exportable",{get:function(){return this._exportable},set:function(e){var t=this.svgContainer;this._exportable=e,t&&(e?oe(t.nonExportableSprites,this):oi(t.nonExportableSprites,this)==-1&&t.nonExportableSprites.push(this))},enumerable:!0,configurable:!0}),i.prototype.modalPrefix=function(e){return e=ge.classNamePrefix+e,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 r=this.svgContainer;if(r)return r.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 r=this.svgContainer;if(r)return r.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=G(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){S(e)&&(e=E(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){S(e)&&(e=E(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=G(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){S(e)&&(e=E(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){S(e)&&(e=E(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){S(e)&&(e=E(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){S(e)&&(e=E(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){e=ke(e),S(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=jt(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=jt(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=jt(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=jt(e),this.setPropertyValue("verticalCenter",e)&&this.updateCenter()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxWidth",{get:function(){var e=this.getPropertyValue("maxWidth");if(!S(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,r=this.maxHeight;if(this.setPropertyValue("maxWidth",e)){S(this.relativeWidth)&&this.invalidate();var n={type:"maxsizechanged",target:this,previousWidth:t,previousHeight:r};this.dispatchImmediately("maxsizechanged",n)}},Object.defineProperty(i.prototype,"maxHeight",{get:function(){var e=this.getPropertyValue("maxHeight");if(!S(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,r=this.maxHeight;if(this.setPropertyValue("maxHeight",e)){S(this.relativeHeight)&&this.invalidate();var n={type:"maxsizechanged",target:this,previousWidth:t,previousHeight:r};this.dispatchImmediately("maxsizechanged",n)}},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){var t=this.setPercentProperty("width",e,!0,!1,this._positionPrecision,!0);t&&(this.percentWidth=void 0,this.relativeWidth=void 0,e instanceof de?(this.percentWidth=e.percent,S(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){var t=this.setPercentProperty("height",e,!0,!1,this._positionPrecision,!0);t&&(this.percentHeight=void 0,this._relativeHeight=void 0,e instanceof de?(this.percentHeight=e.percent,S(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;S(this.percentWidth)?e=this.maxWidth:S(this._pixelWidth)?e=this._pixelWidth:e=0;var t=this.minWidth;t!=null&&e<t&&(e=t);var r=E(e,this._positionPrecision,!0);return this._adapterO?this._adapterO.apply("pixelWidth",r):r},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelHeight",{get:function(){var e;S(this.percentHeight)?e=this.maxHeight:S(this._pixelHeight)?e=this._pixelHeight:e=0;var t=this.minHeight;t!=null&&e<t&&(e=t);var r=E(e,this._positionPrecision,!0);return this._adapterO?this._adapterO.apply("pixelHeight",r):r},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"relativeWidth",{get:function(){var e=this._relativeWidth;if(S(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(S(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=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=ke(e),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,r,n){return this.marginTop=e,this.marginRight=t,this.marginBottom=r,this.marginLeft=n,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,r,n){return this.paddingTop=e,this.paddingRight=t,this.paddingBottom=r,this.paddingLeft=n,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),P(e)?this.element.attr({d:e}):this.element.removeAttr("d"),this.invalidatePosition(),this.inited||this.events.once("inited",this.validatePosition,this,!1),!0):!1},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=nu(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((!Be(e)||"r"in e)&&(e=pi(e)),this.setColorProperty("fill",e)||this.fillModifier){if(e instanceof be&&this.fillModifier&&(e=this.fillModifier.modify(e)),this.realFill=e,e instanceof be)this.setSVGAttribute({fill:e.toString()});else if(!P(e))this.removeSVGAttribute("fill");else if(e instanceof Fr||e instanceof Ht||e instanceof ji){var t=e;t.paper=this.paper,this.setSVGAttribute({fill:'url("'+Ra()+t.id+'")'})}}},Object.defineProperty(i.prototype,"opacity",{get:function(){return this.getPropertyValue("opacity")},set:function(e){e=nu(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((!Be(e)||"r"in e)&&(e=pi(e)),this.setColorProperty("stroke",e)||this.strokeModifier){if(e instanceof be&&this.strokeModifier&&(e=this.strokeModifier.modify(e)),this.realStroke=e,e instanceof be)e.hex=="none"?this.removeSVGAttribute("stroke"):this.setSVGAttribute({stroke:e.toString()});else if(!P(e))this.removeSVGAttribute("stroke");else if(e instanceof Fr||e instanceof Ht||e instanceof ji){var t=e;t.paper=this.paper,this.setSVGAttribute({stroke:'url("'+Ra()+t.id+'")'})}}},Object.defineProperty(i.prototype,"strokeOpacity",{get:function(){return this.getPropertyValue("strokeOpacity")},set:function(e){e=nu(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=tt(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=tt(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=ke(e),this.setPropertyValue("strokeWidth",e,!0),this.nonScalingStroke&&(S(e)||(e=1),e=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=jt(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=ke(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=jt(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=tt(e),e?this._positionPrecision=ge.pixelPerfectPrecision:this._positionPrecision=3,this.setPropertyValue("pixelPerfect",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rtl",{get:function(){return P(this._rtl)?this._rtl:this._topParent?this._topParent.rtl:!1},set:function(e){e=tt(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 r,n=this.defaultState.properties;if(!this.disabled&&(this.isHidden||!this.visible||this.isHiding||n.opacity!=null&&this.opacity<n.opacity&&!this.isShowing)&&!this.isDisposed()){this.invalid&&this.validate(),this.positionInvalid&&this.validatePosition(),S(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,r=this.applyCurrentState(e),r&&!r.isFinished()?(this._showHideDisposer=r.events.on("animationended",function(){t.isShowing=!1}),this._disposers.push(this._showHideDisposer)):this.isShowing=!1;var s=this.defaultState.properties.visible;P(s)||(s=!0),this.visible=s,this.readerHidden=!1,this.dispatchImmediately("shown")}return r}},i.prototype.hide=function(e){return this.hideReal(e)},i.prototype.hideReal=function(e){var t=this,r;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 n=this.hiddenState;n?(r=this.setState(n,e,void 0),r&&!r.isFinished()?(this._hideAnimation=r,this._showHideDisposer=r.events.on("animationended",function(){t.isHiding=!1,t._isHidden=!0,n.properties.visible==!1&&(t.visible=!1)},this),this._disposers.push(this._showHideDisposer),this._disposers.push(r)):(this.isHiding=!1,this._isHidden=!0)):(this.visible=!1,this.isHiding=!1,this._isHidden=!0),this.readerHidden=!0,this.dispatchImmediately("hidden"),this.invalidate()}return S(e)||(e=this.hiddenState.transitionDuration),r},Object.defineProperty(i.prototype,"visible",{get:function(){return this.getVisibility()},set:function(e){e=tt(e),this.setVisibility(e)},enumerable:!0,configurable:!0}),i.prototype.getVisibility=function(){var e=this.getPropertyValue("visible");return P(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=ke(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(){if(this._tooltip)return this._tooltip;if(this.virtualParent)return this.virtualParent.tooltip;if(this._parent)return this._parent.tooltip},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(){var e=this._tooltipDataItem;return e||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=_r(pe().lastPointer.point,this.svgContainer.SVGContainer,this.svgContainer.cssScale));for(var t=this;t!=null;){if(!t.visible||t.disabled||t.__disabled){this._tooltip&&this._tooltip.visible&&this._tooltip.hide(0);return}t=t.parent}if(P(this.tooltipText)||P(this.tooltipHTML)){var r=this.tooltip,n=this.tooltipDataItem;if(r){r.targetSprite=this;var s=this,o=this.tooltipColorSource;if((r.getStrokeFromObject||r.getFillFromObject)&&o&&(o.isTemplate?n&&vs(n.sprites,function(c){return c.clonedFrom==o?(s=c,!1):!0}):s=o),r.getStrokeFromObject){for(var l=this.stroke,u=s;u.parent!=null&&(l=u.stroke,l==null&&(u=u.parent),l==null););l instanceof be?r.background.animate({property:"stroke",to:l},r.animationDuration):r.background.stroke=l}if(r.dataItem=n,r.label.populateStringFrom=this,r.getFillFromObject){for(var h=this.fill,u=s;u.parent!=null;)if(h=u.fill,h==null||h instanceof be&&h.rgb==null)u=u.parent;else if(h!=null)break;h==null&&(h=ie("#000000")),h instanceof be&&r.visible?r.background.animate({property:"fill",to:h},r.animationDuration):r.background.fill=h,r.autoTextColor&&h instanceof be&&(r.label.fill=h.alternative)}var p="";if(this.tooltipHTML&&(r.html=this.tooltipHTML,p=this.tooltipHTML),this.tooltipText&&(r.text=this.tooltipText,p=this.tooltipText),this.updateTooltipPosition(e))if(r.readerDescribedBy=this.uidAttr(),r.label.invalid&&r.label.validate(),p!=null&&p!=""&&r.label.currentText!=""){r&&!r.parent&&(r.parent=this.tooltipContainer);var d=r.defaultState.transitionDuration;return d<=0&&(d=1),r.show(d),r.currentSprite=this,!0}else this.hideTooltip(0);else this.hideTooltip(0)}}return!1},i.prototype.updateTooltipPosition=function(e){var t=this;if(this.tooltipPosition=="pointer"){if(this._interactionDisposer&&this._interactionDisposer.dispose(),this._interactionDisposer=pe().body.events.on("track",function(n){return t.pointTooltipTo(_r(n.point,t.svgContainer.SVGContainer,t.svgContainer.cssScale),!0)}),e)return this.pointTooltipTo(e,!0)}else{var r=di({x:this.getTooltipX(),y:this.getTooltipY()},this);return this.pointTooltipTo(r)}},i.prototype.pointTooltipTo=function(e,t){var r=this.tooltip;return r&&this.topParent&&(r.showInViewport||lu(e,{x:0,y:0,width:this.topParent.maxWidth,height:this.topParent.maxHeight}))?(r.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=jt(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=jt(e),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(){if(this._tooltipContainer)return this._tooltipContainer;if(this._parent)return this._parent.tooltipContainer},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=tt(e),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=this.getPropertyValue("tooltipX");P(e)||(e=N(50));var t;return S(e)&&(t=e),e instanceof de&&(t=this.maxLeftSelf+this._measuredWidthSelf*e.value-this.pixelPaddingLeft-this.ex),S(t)||(t=0),t},i.prototype.getTooltipY=function(){var e=this.getPropertyValue("tooltipY");P(e)||(e=N(50));var t;return S(e)&&(t=e),e instanceof de&&(t=this.maxTopSelf+this._measuredHeightSelf*e.value-this.pixelPaddingTop-this.ey),S(t)||(t=0),t},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,ge.suppressErrors||this.modal.open()),ge.verbose&&console.log(e)},i.prototype.processConfig=function(e){e&&(P(e.tooltipColorSource)&&ce(e.tooltipColorSource)&&this.map.hasKey(e.tooltipColorSource)&&(e.tooltipColorSource=this.map.getKey(e.tooltipColorSource)),P(e.cursorOverStyle)&&ce(e.cursorOverStyle)&&(e.cursorOverStyle=this.getCursorStyle(e.cursorOverStyle)),P(e.cursorDowntyle)&&ce(e.cursorDowntyle)&&(e.cursorDowntyle=this.getCursorStyle(e.cursorDowntyle)),P(e.cursorOptions)&&(P(e.cursorOptions.overStyle)&&ce(e.cursorOptions.overStyle)&&(e.cursorOptions.overStyle=this.getCursorStyle(e.cursorOptions.overStyle)),P(e.cursorOptions.downStyle)&&ce(e.cursorOptions.downStyle)&&(e.cursorOptions.downStyle=this.getCursorStyle(e.cursorOptions.downStyle)))),a.prototype.processConfig.call(this,e),this.processDelayedMap()},i.prototype.getCursorStyle=function(e){switch(e){case"grab":return We.grab;case"grabbing":return We.grabbing;case"pointer":return We.pointer;case"horizontalResize":return We.horizontalResize;case"verticalResize":return We.verticalResize;default:return We.default}},i.prototype.configOrder=function(e,t){return e==t?0:e=="tooltipColorSource"?1:t=="tooltipColorSource"?-1:a.prototype.configOrder.call(this,e,t)},Object.defineProperty(i.prototype,"isHidden",{get:function(){return this._isHidden?this._isHidden:this._parent?this._parent.isHidden:!1},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"showOnInit",{get:function(){return this.getPropertyValue("showOnInit")},set:function(e){e=tt(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=new Fe([C.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)):this._showOnInitDisposer&&this._showOnInitDisposer.dispose()))},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=tt(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 ve,this._disposers.push(this._plugins.events.on("inserted",function(t){t.newValue.target=e,t.newValue.init()})),this._disposers.push(new Pe(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})(Et);C.registeredClasses.Sprite=ee;var Md=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e._rules=new ve,e._appliedRules={},e._appliedTargets=[],e._useDefault=!0,e.adapter=new gt(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 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(ze(this.component).events.on("sizechanged",function(){t.checkRules()},this)),this._responsiveDisposers.push(ze(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",ht)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"allRules",{get:function(){var e=new ve;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 P(t)?t:!1},i.prototype.checkRules=function(e){var t=this;e===void 0&&(e=!1);var r=this.allRules;if(!(!r||r.length==0)){var n=!1,s=ze(this.component);if(!(s.pixelWidth==0||s.pixelHeight==0)&&(I(r.iterator(),function(o){o.id||(o.id=C.getUniqueId());var l=o.relevant(s);(l&&!t.isApplied(o.id)||!l&&t.isApplied(o.id))&&(n=!0),t._appliedRules[o.id]=l}),e&&(n=!0),n)){if(!this.component.isReady()){s.hidden=!0,s.events.once("ready",function(o){o.target.show(0),t._applyRules()});return}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,r=P(e)?e:ze(this.component),n=!1;if(this.enabled){var s=!1;I(this.allRules.iterator(),function(o){var l=t.getState(o,r);l&&(n||(oi(t._appliedTargets,r.uid)!==-1&&r.setState(t.getDefaultState(r),0),n=!0),t.isApplied(ze(o.id))&&(l.transitionDuration=0,t.setTargetState(r,l),t.dispatchImmediately("ruleapplied",{rule:o}),s=!0))}),s?Nm(this._appliedTargets,r.uid):oe(this._appliedTargets,r.uid)}r.children&&I(r.children.iterator(),function(o){t.applyRules(o)})},i.prototype.getState=function(e,t){var r="responsive-"+e.id,n=t.uid+"_"+r;if(oi(this._noStates,n)===-1){if(t.states.hasKey(r))return t.states.getKey(r);var s=e.state(t,r);return s||this._noStates.push(n),s}},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 r=this,n=this.getDefaultState(e);te(t.properties,function(s,o){P(n.properties[s])||(n.properties[s]=r.getValue(e,s))}),e.setState(t)},i.prototype.getValue=function(e,t){var r=e.getPropertyValue(t);return!P(r)&&P(e[t])&&(r=e[t]),r},i.prototype.dispose=function(){this.disposeResponsiveHandlers(),a.prototype.dispose.call(this)},i.prototype.disposeResponsiveHandlers=function(){for(var e=this._responsiveDisposers.pop();e;)e.dispose(),e=this._responsiveDisposers.pop()},i})(Et);var ht=new ve;ht.events.on("inserted",function(a){a.newValue.id=C.getUniqueId()});var yt=(function(){function a(){}return a.widthXXS=function(i){return i.pixelWidth<=a.XXS},a.widthXS=function(i){return i.pixelWidth<=a.XS},a.widthS=function(i){return i.pixelWidth<=a.S},a.widthM=function(i){return i.pixelWidth<=a.M},a.widthL=function(i){return i.pixelWidth<=a.L},a.widthXL=function(i){return i.pixelWidth<=a.XL},a.widthXXL=function(i){return i.pixelWidth<=a.XXL},a.heightXXS=function(i){return i.pixelHeight<=a.XXS},a.heightXS=function(i){return i.pixelHeight<=a.XS},a.heightS=function(i){return i.pixelHeight<=a.S},a.heightM=function(i){return i.pixelHeight<=a.M},a.heightL=function(i){return i.pixelHeight<=a.L},a.heightXL=function(i){return i.pixelHeight<=a.XL},a.heightXXL=function(i){return i.pixelHeight<=a.XXL},a.isXXS=function(i){return i.pixelWidth<=a.XXS&&i.pixelHeight<=a.XXS},a.isXS=function(i){return i.pixelWidth<=a.XS&&i.pixelHeight<=a.XS},a.isS=function(i){return i.pixelWidth<=a.S&&i.pixelHeight<=a.S},a.isM=function(i){return i.pixelWidth<=a.M&&i.pixelHeight<=a.M},a.isL=function(i){return i.pixelWidth<=a.L&&i.pixelHeight<=a.L},a.isXL=function(i){return i.pixelWidth<=a.XL&&i.pixelHeight<=a.XL},a.isXXL=function(i){return i.pixelWidth<=a.XXL&&i.pixelHeight<=a.XXL},a.maybeXXS=function(i){return i.pixelWidth<=a.XXS||i.pixelHeight<=a.XXS},a.maybeXS=function(i){return i.pixelWidth<=a.XS||i.pixelHeight<=a.XS},a.maybeS=function(i){return i.pixelWidth<=a.S||i.pixelHeight<=a.S},a.maybeM=function(i){return i.pixelWidth<=a.M||i.pixelHeight<=a.M},a.maybeL=function(i){return i.pixelWidth<=a.L||i.pixelHeight<=a.L},a.maybeXL=function(i){return i.pixelWidth<=a.XL||i.pixelHeight<=a.XL},a.maybeXXL=function(i){return i.pixelWidth<=a.XXL||i.pixelHeight<=a.XXL},a.XXS=100,a.XS=200,a.S=300,a.M=400,a.L=600,a.XL=800,a.XXL=1e3,a})();var lt=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.isOversized=!1,e.className="Label",e.fill=new se().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 i.prototype.afterDraw=function(){a.prototype.afterDraw.call(this),this.validatePosition()},i.prototype.setPaper=function(e){var t=a.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)&&C.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;bn(this.html)&&this.paper.supportsForeignObject()?(e="html",t=this.html):(e="svg",t=this.text),Be(t)&&(t=t.toString()),P(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 r=t!=this.currentText||e!=this._currentFormat;return this.currentText=t,this._currentFormat=e,r},i.prototype.hardInvalidate=function(){this._prevStatus="",this.invalidate()},i.prototype.getLineBBox=function(e){var t=e&&e.element,r=t&&t.node;r&&r.parentNode&&(e.bbox=t.getBBox())},i.prototype.draw=function(){a.prototype.draw.call(this);var e=this.bbox.width,t=this.bbox.height,r=this.topParent;if(r&&(!r.maxWidth||!r.maxHeight)){r.events.once("maxsizechanged",this.hardInvalidate,this,!1);return}var n=he(this.availableWidth-this.pixelPaddingLeft-this.pixelPaddingRight,0),s=he(this.availableHeight-this.pixelPaddingTop-this.pixelPaddingBottom,0),o=s+","+n+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,u=this.currentText;if(!P(u)||u==""){this.element.attr({display:"none"});return}var h=u.split(`
|
|
22
|
+
`);this._prevStatus=o,this.textAlign=this.textAlign;var p=this.group.getAttr("display");if(p=="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="",m=0;m<h.length;m++){var y=h[m];if(y==""){var v=this.getSVGLineElement("",0);v.add(this.getSvgElement(".",Di().translateStyleShortcuts(f))),d.add(v);var b=Math.ceil(v.getBBox().height);b>0&&(c+=b),d.removeElement(v);var x=this.getLineInfo(m);x&&(x.text="",x.element.textContent="");continue}var _=Di().chunk(y,null,this.ignoreFormatting),$=0,O=!0,F=!1,w=this.getLineInfo(m);w?(w.text="",w.element.textContent=""):(w={text:"",element:this.getSVGLineElement("",0),complex:!1},d.add(w.element)),w.element.removeAttr("display"),w.element.removeChildren(),this.textPathElement&&w.element.add(this.textPathElement);for(var D=0;D<_.length;D++){D&&(w.complex=!0);var B=_[D];if(B.type==="format")f=B.text;else{if(F)continue;if(w.text=B.text,w.style=Di().translateStyleShortcuts(f),this.textPathElement?this.getSvgElement(w.text,w.style,this.textPathElement):this.getSvgElement(w.text,w.style,w.element),this.getLineBBox(w),w.bbox.width=Math.ceil(w.bbox.width),$<w.bbox.height&&($=w.bbox.height),(this.wrap||this.truncate)&&w.bbox.width>n){this.isOversized=!0;var L=w.element.textContent,M=w.bbox.width/L.length,Q=ye(Math.ceil((w.bbox.width-n)/M),L.length);if(this.truncate){var ae=!1,K=w.element.node;if(K&&K.childNodes)for(var z=w.element.node.childNodes.length-1;z>=0;z--){var Te=w.element.node.childNodes[z];if(ae&&w.bbox.width<=n&&(Te.textContent+=" "+this.ellipsis,w.bbox=w.element.getBBox(),w.bbox.width=Math.floor(w.bbox.width),w.bbox.width<=n))break;ae=!1;var ue=Te.textContent;for(L=w.element.textContent,Q=ye(Math.ceil((w.bbox.width-n)/M),L.length);w.bbox.width>n&&Q<=L.length&&Q>0;){var Me=he(L.length-Q-this.ellipsis.length,1);Me<=1&&(Q=0,z>0&&(ae=!0,w.element.node.removeChild(Te))),ue=ws(ue,Me,this.ellipsis,this.fullWords,this.rtl),ue.length>Me&&this.fullWords&&(ue=ws(ue,Me,this.ellipsis,!1,this.rtl)),Te.textContent=ue,w.bbox=w.element.getBBox(),w.bbox.width=Math.floor(w.bbox.width),Q=Math.ceil(Q*1.1)}F=!0}}else{var ct=w.element.node;if(ct){for(var qe=w.element.node.lastChild,ne=void 0;w.bbox.width>n&&Q<=L.length&&Q>0;){var Me=he(B.text.length-Q,1);if(O?ne=Mo(B.text,Me,!0,this.rtl):(ne=Mo(B.text,Me,!0,this.rtl,!1),(ne[0].length>Me||Me===1)&&(w.element.node.removeChild(qe),Q=0)),Q>0){var Ne=ne.shift();O&&(Ne=No(Ne)),qe.textContent=Di().cleanUp(Ne)}w.bbox=w.element.getBBox(),w.bbox.width=Math.floor(w.bbox.width),Q++}if(ne.length>0){var Ze="";P(ne)&&(this.rtl?Ze+=ne.join("")+f:Ze+=f+ne.join("").replace(/([\[\]]{1})/g,"$1$1"));for(var zt=D+1;zt<_.length;zt++)_[zt].type=="value"?Ze+=_[zt].text.replace(/([\[\]]{1})/g,"$1$1"):Ze+=_[zt].text;h.splice(m+1,0,Ze)}F=!0}}}this.bbox.width<w.bbox.width&&(this.bbox.width=w.bbox.width),this.bbox.height=c+$,this.textPathElement?w.element.attr({dy:-this.paddingBottom.toString()}):w.element.attr({x:"0",y:c+$,dy:E(this.baseLineRatio*$,3).toString()}),O=!1}}var Xt=w.element.node;if(Xt){var qe=Xt.lastChild;qe&&(qe.textContent=this.rtl?td(qe.textContent):ed(qe.textContent))}c+=$,this.addLineInfo(w,m)}this.maybeHideOversized(),this.measureFailed=!1,(this.bbox.width==0||this.bbox.height==0)&&(this.measureFailed=!0),this._measuredWidth=E(he(this.bbox.width,this.pixelWidth-this.pixelPaddingLeft-this.pixelPaddingRight)),this._measuredHeight=E(he(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(h.length)}else{this.element.removeAttr("display"),this.resetBBox();var d=this.element;d.removeChildren(),this.setCache("lineInfo",[],0);var Bt=this.paper.foreignObject();d.add(Bt),this.maxWidth&&Bt.attr({width:this.maxWidth-this.pixelPaddingLeft-this.pixelPaddingRight}),this.maxHeight&&Bt.attr({height:this.maxHeight-this.pixelPaddingTop-this.pixelPaddingBottom});var ii=this.getHTMLLineElement(u);Bt.node.appendChild(ii),ii.style.display="inline-block";var _i=ii.clientWidth,mi=ii.clientHeight;ii.style.display="block",this._bbox={x:0,y:0,width:_i,height:mi},Bt.attr({width:_i+1,height:mi}),this.maybeHideOversized(),this._measuredWidth=he(this.bbox.width,this.pixelWidth-this.pixelPaddingLeft-this.pixelPaddingRight),this._measuredHeight=he(this.bbox.height,this.pixelHeight-this.pixelPaddingTop-this.pixelPaddingBottom),this.bbox.width=this._measuredWidth,this.bbox.height=this._measuredHeight,this.truncate&&(ii.style.overflow="hidden"),(_i>n||mi>s)&&(this.isOversized=!0)}this.setStyles(),this.updateCenter(),this.updateBackground(),p=="none"&&this.group.attr({display:"none"}),this.pathElement&&this.paper.appendDef(this.pathElement)}},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 r=this._measuredWidth,n=this._measuredHeight;this.pixelPaddingLeft,this.pixelPaddingRight,this.pixelPaddingTop,this.pixelPaddingBottom,this.rtl?e.attr({direction:"rtl"}):e.removeAttr("direction");for(var s=t.length-1;s>=0;s--){var o=t[s];if(o.setAttribute("text-anchor",this.textAlign),this.textPathElement)o.removeAttribute("x"),o.removeAttribute("y");else{switch(this.textAlign){case"middle":o.setAttribute("x",(r/2).toString()+"px");break;case"end":this.rtl||o.setAttribute("x",r.toString());break;default:this.rtl?o.setAttribute("x",r.toString()):o.removeAttribute("text-anchor");break}var l=ke(o.getAttribute("y"));switch(this.textValign){case"middle":o.setAttribute("y",((l||0)+(n-this.bbox.height)/2).toString());break;case"bottom":o.setAttribute("y",((l||0)+n-this.bbox.height).toString());break;default:o.setAttribute("y",(l||0).toString());break}}}}},i.prototype.getSVGLineElement=function(e,t){var r=this.paper.addGroup("text");return r.textContent=e,r.attr({x:"0"}),P(t)&&r.attr({y:t.toString()}),(this.truncate||this.wrap)&&r.attr({overflow:"hidden"}),r},Object.defineProperty(i.prototype,"rtl",{get:function(){return P(this._rtl)?this._rtl:this._topParent?this._topParent.rtl:!1},set:function(e){e=tt(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";break}return this.wrap?t.style.wordWrap="break-word":t.style.whiteSpace="nowrap",this.rtl&&(t.style.direction="rtl"),P(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 r=e;r<t.length;r++){var n=t[r];n&&n.element&&n.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(ks,"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:e*100+"%"})},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){if(this.setPropertyValue("html",e,!0),!P(e)){var t=this.element;t.removeChildrenByTag("foreignObject")}},enumerable:!0,configurable:!0}),i.prototype.setFill=function(e){if(a.prototype.setFill.call(this,e),this.html)for(var t=this.element,r=t.node.getElementsByTagName("div"),n=0;n<r.length;n++){var s=r[n];P(this.fill)&&(s.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(){P(this.getCache("lineInfo"))||this.setCache("lineInfo",[],0)},i.prototype.setDataItem=function(e){this._sourceDataItemEvents&&this._sourceDataItemEvents.dispose(),e&&(this._sourceDataItemEvents=new Fe([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)])),a.prototype.setDataItem.call(this,e)},Object.defineProperty(i.prototype,"availableWidth",{get:function(){return P(this.maxWidth)?this.maxWidth:this.pixelWidth},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"availableHeight",{get:function(){return P(this.maxHeight)?this.maxHeight:this.pixelHeight},enumerable:!0,configurable:!0}),i.prototype.getSvgElement=function(e,t,r){var n=this.paper.add("tspan");if(n.textContent=e,t)if(ge.nonce&&r){var s="amcharts_element_style_"+btoa(t).replace(/[^\w]*/g,"");n.node.setAttribute("class",s);var o=document.createElementNS(ja,"defs");r.node.appendChild(o);var l=document.createElement("style");l.type="text/css",l.innerHTML="."+s+" { "+t+"}",l.setAttribute("nonce",ge.nonce),o.appendChild(l)}else n.node.setAttribute("style",t);return r&&r.add(n),n},i.prototype.deepInvalidate=function(){a.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(Fs(bn(this.html)?this.html:this.text)),e},set:function(e){e=jt(e),this.setPropertyValue("readerTitle",e)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),i})(U);C.registeredClasses.Label=lt;ht.push({relevant:yt.heightXS,state:function(a,i){if(a instanceof lt&&a.parent&&a.parent.isBaseSprite){var e=a.states.create(i);return e.properties.disabled=!0,e}return null}});var Mt=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="RoundedRectangle",e.element=e.paper.add("path"),e.cornerRadius(3,3,3,3),e.applyTheme(),e}return i.prototype.draw=function(){a.prototype.draw.call(this);var e=this.innerWidth,t=this.innerHeight;if(S(e)&&S(t)){var r=ye(e,t)/2,n=Ee(this.cornerRadiusTopLeft,r),s=Ee(this.cornerRadiusTopRight,r),o=Ee(this.cornerRadiusBottomRight,r),l=Ee(this.cornerRadiusBottomLeft,r),u=ye(Math.abs(e/2),Math.abs(t/2)),h=G(n,0,u),p=G(s,0,u),d=G(o,0,u),c=G(l,0,u),f="M"+h+",0 L"+(e-p)+",0",m=" L"+c+","+t,y=" L0,"+h,v=" L"+e+","+(t-d),b=" a"+p+","+p+" 0 0 1 "+p+","+p,x=" a"+d+","+d+" 0 0 1 -"+d+","+d,_=" a"+c+","+c+" 0 0 1 -"+c+",-"+c,$=" a"+h+","+h+" 0 0 1 "+h+",-"+h,O=f+b+v+x+m+_+y+$+" Z";this.path=O}},i.prototype.cornerRadius=function(e,t,r,n){this.cornerRadiusTopLeft=e,this.cornerRadiusTopRight=t,this.cornerRadiusBottomLeft=r,this.cornerRadiusBottomRight=n},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})(ee);C.registeredClasses.RoundedRectangle=Mt;var Pi=(function(a){T(i,a);function i(){var e=a.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 se,r=e.background;r.fill=t.getFor("secondaryButton"),r.stroke=t.getFor("secondaryButtonStroke"),r.fillOpacity=1,r.strokeOpacity=1,r.cornerRadius(3,3,3,3),e.label=new lt,e.label.fill=t.getFor("secondaryButtonText"),e.label.shouldClone=!1;var n=r.states.create("hover");n.properties.fillOpacity=1,n.properties.fill=t.getFor("secondaryButtonHover");var s=r.states.create("down");return s.transitionDuration=100,s.properties.fill=t.getFor("secondaryButtonDown"),s.properties.fillOpacity=1,e.role="button",e.focusable=!0,e.applyTheme(),e}return 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 Mt},i.prototype.copyFrom=function(e){a.prototype.copyFrom.call(this,e),e.label&&this.label.copyFrom(e.label),e.icon&&(this.icon=e.icon.clone())},i})(U);C.registeredClasses.Button=Pi;function _n(a){var i=k(a[0]),e={x:0,y:0},t=ge.minPolylineStep;S(t)||(t=.5);for(var r=0,n=a.length;r<n;r++){var s=a[r];_e(s,e)>t&&(i+=k(s),e=s)}return i}function W(a){return" M"+E(a.x,4)+","+E(a.y,4)+" "}function k(a){return" L"+E(a.x,4)+","+E(a.y,4)+" "}function ea(a,i){return" Q"+E(i.x,4)+","+E(i.y,4)+" "+E(a.x,4)+","+E(a.y,4)}function xa(a,i,e){return" C"+E(i.x,4)+","+E(i.y,4)+" "+E(e.x,4)+","+E(e.y,4)+" "+E(a.x,4)+","+E(a.y,4)}function Ge(){return" Z"}function bt(a,i,e,t){if(i==0)return"";S(t)||(t=e);var r="",n=",",s=Math.ceil(Math.abs(i)/180),o=1;i<0&&(o=0);var l=0,u=0,h=-Y(a)*e,p=-X(a)*t;if(i<.5&&e>3e3){var d=a+i,c=E(Y(d)*e,4),f=E(X(d)*t,4);return k({x:c,y:f})}for(var m=0;m<s;m++){var d=a+i/s*(m+1),c=E(Y(d)*e+h-l,4),f=E(X(d)*t+p-u,4);r+=" a"+e+n+t+n+0+n+0+n+o+n+c+n+f,l=c,u=f}return r}function mr(a,i,e,t,r,n,s){if(i==0||(S(t)||(t=0),e==0&&t<=0))return"";if(e<t){var o=e;e=t,t=o,S(r)&&(r=r/t*e)}i=ye(i,360),i==360&&(n=0,s=0);var l=a+i,u=X(ye(i,45)/2);r=S(r)?r:e,n=n||0,s=S(s)?s:n;var h=r/e*t,p=r/e*n,d=r/e*s;n=G(n,0,(e-t)/2),p=G(p,0,(r-h)/2),s=G(s,0,(e-t)/2),d=G(d,0,(r-h)/2),n=E(G(n,0,e*u),4),p=E(G(p,0,r*u),4),s=E(G(s,0,t*u),4),d=E(G(d,0,h*u),4);var c=Math.asin(n/e/2)*qr*2,f=Math.asin(p/r/2)*qr*2;t<s&&(t=s),h<d&&(h=d);var m=Math.asin(s/t/2)*qr*2,y=Math.asin(d/h/2)*qr*2;S(m)||(m=0),S(y)||(y=0);var v=a+i/2,b={x:E(Y(v)*t,4),y:X(v)*h},x={x:Y(a)*(t+s),y:X(a)*(h+d)},_={x:Y(a)*(e-n),y:X(a)*(r-p)},$={x:Y(l)*(e-n),y:X(l)*(r-p)},O={x:Y(l)*(t+s),y:X(l)*(h+d)},F={x:Y(a+c)*e,y:X(a+f)*r},w={x:Y(l-m)*t,y:X(l-y)*h};s+=s*X(m/2),d+=d*X(y/2),m>(l-a)/2&&(w=b);var D="";return i==360?D=W(_):(D=W(x),D+=k(_),D+=Ei(F,n,p,!0)),D+=bt(a+c,i-2*c,e,r),S(t)&&t!=0?(i==360&&n==0?D+=W(O):(D+=Ei($,n,p,!0),D+=k(O),D+=Ei(w,s,d,!0)),D+=bt(l-m,-(i-2*m),t,h),(i<360||n>0)&&(D+=Ei(x,s,d,!0)),D+=k(x)):(D+=Ei($,n,p,!0),i<360&&(D+=k(x))),D}function Ei(a,i,e,t,r,n){if(i==0)return"";n=n||0,r=!!r,t=!!t;var s=",",o=+t,l=+r;return" A"+i+s+e+s+n+s+l+s+o+s+E(a.x,4)+s+E(a.y,4)}function Nu(a,i,e,t){return S(e)||(e=0),S(t)||(t=0),W({x:e,y:t})+k({x:e+a,y:t})+k({x:e+a,y:t+i})+k({x:e,y:t+i})+Ge()}function Zi(a,i){var e=",",t=" L";return i?"M"+a.x+e+a.y+t+a.x+e+(a.y+a.height)+t+(a.x+a.width)+e+(a.y+a.height)+t+(a.x+a.width)+e+a.y+t+a.x+e+a.y:"M"+a.x+e+a.y+t+(a.x+a.width)+e+a.y+t+(a.x+a.width)+e+(a.y+a.height)+t+a.x+e+(a.y+a.height)+t+a.x+e+a.y}var Jo=(function(a){T(i,a);function i(){var e=a.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 ee;t.element=e.paper.add("path");var r=W({x:-2,y:-6});return r+=k({x:-2,y:6}),r+=W({x:2,y:-6}),r+=k({x:2,y:6}),t.path=r,t.pixelPerfect=!0,t.padding(0,4,0,4),t.stroke=new se().getFor("alternativeText"),t.strokeOpacity=.7,e.icon=t,e.label.dispose(),e.label=void 0,e.applyTheme(),e}return Object.defineProperty(i.prototype,"orientation",{set:function(e){var t=this.icon;t&&(e=="horizontal"?t.rotation=0:t.rotation=-90)},enumerable:!0,configurable:!0}),i})(Pi);C.registeredClasses.ResizeButton=Jo;var Ha=(function(a){T(i,a);function i(){var e=a.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=cr,e.margin(10,10,10,10);var t=new se,r=e.background;return r.cornerRadius(10,10,10,10),r.fill=t.getFor("fill"),r.fillOpacity=.5,e.showSystemTooltip=!0,e.startGrip=new Jo,e.endGrip=new Jo,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 i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),this.orientation==="horizontal"?(P(this.readerTitle)||(this.readerTitle=this.language.translate("Use TAB to select grip buttons or left and right arrows to change selection")),P(this.thumb.readerDescription)||(this.thumb.readerDescription=this.language.translate("Use left and right arrows to move selection")),P(this.startGrip.readerDescription)||(this.startGrip.readerDescription=this.language.translate("Use left and right arrows to move left selection")),P(this.endGrip.readerDescription)||(this.endGrip.readerDescription=this.language.translate("Use left and right arrows to move right selection")),this.readerOrientation="horizontal"):(P(this.readerTitle)||(this.readerTitle=this.language.translate("Use TAB select grip buttons or up and down arrows to change selection")),P(this.thumb.readerDescription)||(this.thumb.readerDescription=this.language.translate("Use up and down arrows to move selection")),P(this.startGrip.readerDescription)||(this.startGrip.readerDescription=this.language.translate("Use up and down arrows to move upper selection")),P(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(),a.prototype.validateLayout.call(this),this.updateExtremes()},i.prototype.processBackground=function(){a.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=It(t,this.background,this);var r=this.thumb;if(this.orientation=="horizontal"){var n=t.x-r.pixelWidth/2;n=G(n,0,this.innerWidth-r.pixelWidth),this._thumbAnimation=r.animate({property:"x",to:n},this.animationDuration,this.animationEasing)}else{var s=t.y-r.pixelHeight/2;s=G(s,0,this.innerHeight-r.pixelHeight),this._thumbAnimation=r.animate({property:"y",to:s},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),this.animationDuration*1.1)},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,r=this.start,n=this.end,s=this.startGrip,o=this.endGrip,l=this.adapter.apply("positionValueDirection",{flipped:!1}).flipped,u=l?"To %1":"From %1",h=l?"From %1":"To %1",p,d;if(this.orientation=="horizontal"){var c=this.innerWidth;t.width=c*(n-r),t.maxX=c-t.pixelWidth,t.x=r*c,s.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),p=this.adapter.apply("positionValue",{value:Math.round(r*100)+"%",position:r}).value,d=this.adapter.apply("positionValue",{value:Math.round(n*100)+"%",position:n}).value,s.readerTitle=this.language.translate(u,void 0,p),s.readerValueNow=""+Math.round(r*100),s.readerValueText=s.readerTitle,o.readerTitle=this.language.translate(h,void 0,d),o.readerValueNow=""+Math.round(n*100),o.readerValueText=o.readerTitle}else{var f=this.innerHeight;t.height=f*(n-r),t.maxY=f-t.pixelHeight,t.y=(1-n)*f,s.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),p=this.adapter.apply("positionValue",{value:Math.round((1-r)*100)+"%",position:1-r}).value,d=this.adapter.apply("positionValue",{value:Math.round((1-n)*100)+"%",position:1-n}).value,s.readerTitle=this.language.translate(h,void 0,p),s.readerValueNow=""+Math.round(r*100),s.readerValueText=s.readerTitle,o.readerTitle=this.language.translate(u,void 0,d),o.readerValueNow=""+Math.round(n*100),o.readerValueText=o.readerTitle}t.readerTitle=this.language.translate("From %1 to %2",void 0,p,d),t.readerValueNow=""+Math.round(r*100),t.readerValueText=t.readerTitle,this.readerValueNow=""+Math.round(r*100),this.readerValueText=t.readerTitle,!this._skipRangeEvents&&this.updateWhileMoving&&e&&this.dispatchRangeChange()}},i.prototype.updateExtremes=function(){var e=this.orientation,t=0,r=0,n=0,s=0;e=="horizontal"?(n=this.innerWidth,r=s=this.innerHeight/2):(s=this.innerHeight,t=n=this.innerWidth/2);var o=this.startGrip;o.minX=t,o.maxX=n,o.minY=r,o.maxY=s;var l=this.endGrip;l.minX=t,l.maxX=n,l.minY=r,l.maxY=s;var u=this.thumb;u.minX=t,u.maxX=n,u.minY=r,u.maxY=s},i.prototype.updateSize=function(){var e=this.orientation,t=this.startGrip;t&&(t.orientation=e),this.endGrip&&(this.endGrip.orientation=e);var r=this.thumb;r&&(e=="horizontal"?(S(this._pixelWidth)||this.width instanceof de||(this.width=N(100)),P(this.percentHeight)&&(this.height=this.minHeight),r.height=this.innerHeight,r.verticalCenter="middle",r.horizontalCenter="left"):(S(this._pixelHeight)||this.height instanceof de||(this.height=N(100)),P(this.percentWidth)&&(this.width=this.minWidth),r.width=this.innerWidth,r.verticalCenter="top",r.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!=E(this._start,2)||e.end!=E(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 G(E(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=We.horizontalResize,this.endGrip.cursorOverStyle=We.horizontalResize):(this.startGrip.cursorOverStyle=We.verticalResize,this.endGrip.cursorOverStyle=We.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 Pi;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=We.grab,e.cursorDownStyle=We.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(pe().body.events.on("keyup",function(r){Si.isKey(r.event,["space","enter"])&&t.thumb.isFocused&&(r.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 r=this.animate([{property:"__start",to:e},{property:"__end",to:t}],this.animationDuration,this.animationEasing);r&&!r.isFinished()?(r.events.on("animationended",this.makeUnbusy,this,!1),this._zoomAnimation=r):this.makeUnbusy()},i.prototype.handleThumbPosition=function(){var e=this.thumb;if(this.orientation=="horizontal"){var t=this.innerWidth,r=e.innerWidth,n=e.pixelX;this._start=n/t,this._end=(n+r)/t,this.updateThumb()}else{var s=this.innerHeight,o=e.innerHeight,l=e.pixelY;l+o>s&&(l=s-o,e.y=l),this._start=1-(l+o)/s,this._end=1-l/s,this.updateThumb()}},i.prototype.createBackground=function(){return new Mt},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"||a.prototype.asIs.call(this,e)},i})(U);C.registeredClasses.Scrollbar=Ha;var el=(function(){function a(){}return a.prototype.parse=function(i){return[]},Object.defineProperty(a.prototype,"parsableNumbers",{get:function(){return this.options.numberFields&&this.options.numberFields.length>0},enumerable:!0,configurable:!0}),a.prototype.maybeToNumber=function(i,e){return this.options.numberFields.indexOf(i)!==-1?Ds(e):e},Object.defineProperty(a.prototype,"parsableDates",{get:function(){return this.options.dateFields&&this.options.dateFields.length>0},enumerable:!0,configurable:!0}),a.prototype.maybeToDate=function(i,e){return this.options.dateFields.indexOf(i)!==-1?this.options.dateFormatter.parse(e,this.dateFormat):e},a.prototype.maybeToEmpty=function(i){return(!P(i)||i=="")&&P(this.options.emptyAs)?this.options.emptyAs:i},Object.defineProperty(a.prototype,"dateFormatter",{get:function(){return this.options.dateFormatter||(this.options.dateFormatter=new Ki,this.options.dateFormat&&(this.options.dateFormat=this.options.dateFormat)),this.options.dateFormatter},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"dateFormat",{get:function(){return this.options.dateFormat||this.dateFormatter.inputDateFormat},enumerable:!0,configurable:!0}),a})();var xx=[",",";"," "],Tn=(function(a){T(i,a);function i(){var e=a!==null&&a.apply(this,arguments)||this;return e.contentType="text/csv",e.options={delimiter:"",reverse:!1,skipRows:0,skipEmpty:!0,useColumnNames:!1},e}return i.isCSV=function(e){return!!i.getDelimiterFromData(e)},i.getDelimiterFromData=function(e){var t=e.split(`
|
|
23
|
+
`),r=t.length,n;return H(xx,function(s){for(var o=0,l=0,u=0;u<r;++u)if(o=t[u].split(s).length,o>1){if(l===0)l=o;else if(o!=l){l=0;break}}else{l=0;break}l&&(n=s)}),n},i.prototype.parse=function(e){this.options.delimiter||(this.options.delimiter=i.getDelimiterFromData(e));var t=this.CSVToArray(e,this.options.delimiter),r=P(this.options.emptyAs),n=this.parsableNumbers,s=this.parsableDates,o=[],l=[],u,h;for(h=0;h<this.options.skipRows;h++)t.shift();if(this.options.useColumnNames){l=t.shift();for(var p=0;p<l.length;p++)u=P(l[p])?l[p].replace(/^\s+|\s+$/gm,""):"",u===""&&(u="col"+p),l[p]=u}for(var d;d=this.options.reverse?t.pop():t.shift(),!!d;)if(!(this.options.skipEmpty&&d.length===1&&d[0]==="")){var c={};for(h=0;h<d.length;h++)u=l[h]===void 0?"col"+h:l[h],c[u]=d[h]===""?this.options.emptyAs:d[h],r&&(c[u]=this.maybeToEmpty(c[u])),n&&(c[u]=this.maybeToNumber(u,c[u])),s&&(c[u]=this.maybeToDate(u,c[u]));o.push(c)}return o},i.prototype.CSVToArray=function(e,t){t=t||",";for(var r=new RegExp("(\\"+t+'|\\r?\\n|\\r|^)(?:"([^"]*(?:""[^"]*)*)"|([^"\\'+t+"\\r\\n]*))","gi"),n=[[]],s=null;s=r.exec(e),!!s;){var o=s[1];o.length&&o!==t&&n.push([]);var l=void 0;s[2]?l=s[2].replace(new RegExp('""',"g"),'"'):l=s[3],n[n.length-1].push(l)}return n},i})(el);var za=(function(a){T(i,a);function i(){var e=a!==null&&a.apply(this,arguments)||this;return e.contentType="application/json",e.options={},e}return i.isJSON=function(e){try{return JSON.parse(e),!0}catch{return!1}},i.prototype.parse=function(e){var t=this,r;try{P(JSON)&&(r=JSON.parse(e))}catch{return}var n=P(this.options.emptyAs),s=this.parsableNumbers,o=this.parsableDates;if(Array.isArray(r)&&(s||o||n))for(var l=function(p,d){var c=r[p];te(c,function(f,m){n&&(c[f]=t.maybeToEmpty(c[f])),s&&(c[f]=t.maybeToNumber(f,c[f])),o&&(c[f]=t.maybeToDate(f,c[f]))})},u=0,h=r.length;u<h;u++)l(u,h);return r},i})(el);var Dy=(function(){function a(){this.adapter=new gt(this)}return a.prototype.load=function(i){var e=Array.isArray(i)?i:[i],t=fa(e,function(r){return r.dispatchImmediately("started"),r.dispatchImmediately("loadstarted"),Es(r.url,r,r.requestOptions)});Promise.all(t).then(function(r){H(r,function(n){var s=n.target;s.dispatchImmediately("loadended"),n.error?s.events.isEnabled("error")&&s.events.dispatchImmediately("error",{type:"error",code:n.xhr.status,message:s.language.translate("Unable to load file: %1",null,s.url),target:s}):s.processData(n.response,n.type),s.dispatchImmediately("ended")})}).catch(function(r){r.target&&(r.target.dispatchImmediately("loadended"),r.target.events.isEnabled("error")&&r.target.events.dispatchImmediately("error",{type:"error",code:r.xhr.status,message:r.target.language.translate("Unable to load file: %1",null,r.target.url),target:r.target}),r.target.dispatchImmediately("ended"))})},a.prototype.getParserByType=function(i){var e=this.adapter.apply("getParserByType",{parser:null,type:i}).parser;if(e)return e;if(i=="csv"||i=="text/csv"||i=="application/vnd.ms-excel")return new Tn;if(i=="json"||i=="application/json")return new za},a.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),t)return t;if(za.isJSON(i))return this.getParserByType("json");if(Tn.isCSV(i))return this.getParserByType("csv")}return t},a})();var tl=new Dy;var Nd=(function(a){T(i,a);function i(e,t){var r=a.call(this)||this;return r.adapter=new gt(r),r._requestOptions={},r._incremental=!1,r._incrementalParams={},r._keepCount=!1,r._updateCurrentData=!1,r.showPreloader=!0,r.className="DataSource",e&&(r.url=e),t&&(typeof t=="string"?r.parser=tl.getParserByType(t):r.parser=t),r}return i.prototype.processData=function(e,t){if(this.dispatchImmediately("parsestarted"),!this.parser&&(this.parser=tl.getParserByData(e,t),!this.parser)){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");return}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))),!P(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"),P(this.data)&&this.dispatchImmediately("done",{data:this.data}),this.lastLoad=new Date},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 za),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?P(this._reloadDisposer)||(this._reloadDisposer=this.events.on("ended",function(r){t._reloadTimeout=setTimeout(function(){t.load()},t.reloadFrequency)})):P(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 Ci,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 Ki,this.dateFormatter)},set:function(e){this._dateFormatter=e},enumerable:!0,configurable:!0}),i.prototype.timestampUrl=function(e){var t=new Date().getTime().toString(),r={};return r[t]="",this.addUrlParams(e,r)},i.prototype.dispose=function(){a.prototype.dispose.call(this),this._reloadTimeout&&clearTimeout(this._reloadTimeout),P(this._reloadDisposer)&&(this._reloadDisposer.dispose(),this._reloadDisposer=void 0)},i.prototype.load=function(){this.url&&(this._reloadTimeout&&clearTimeout(this._reloadTimeout),tl.load(this))},i.prototype.addUrlParams=function(e,t){var r=e.match(/\?/)?"&":"?",n=[];return te(t,function(s,o){o!=""?n.push(s+"="+encodeURIComponent(o)):n.push(s)}),n.length?e+r+n.join("&"):e},i.prototype.processConfig=function(e){C.registeredClasses.json=za,C.registeredClasses.JSONParser=za,C.registeredClasses.csv=Tn,C.registeredClasses.CSVParser=Tn,a.prototype.processConfig.call(this,e)},i})(Et);var Wi=(function(a){T(i,a);function i(){var e=a.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 Object.defineProperty(i.prototype,"adapter",{get:function(){return this._adapterO||(this._adapterO=new gt(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 fr(this._animations))),this._animations},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"visible",{get:function(){return this._hidden?!1: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,H(this.sprites,function(t){t.__disabled=e})},enumerable:!0,configurable:!0}),i.prototype.setVisibility=function(e,t){if(H(this.sprites,function(n){e?n.visible=n.defaultState.properties.visible:n.hiddenState?n.visible=n.hiddenState.properties.visible:n.visible=!1}),this._visible=e,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("visibilitychanged")){var r={type:"visibilitychanged",target:this,visible:e};this.events.dispatchImmediately("visibilitychanged",r)}},i.prototype.show=function(e,t,r){var n=this;if(!this.hidden){this.setVisibility(!0,!0),this.isHiding=!1,this._hideDisposer&&this.removeDispose(this._hideDisposer);var s;return r&&H(r,function(o){s=n.setWorkingValue(o,n.values[o].value,e,t)}),H(this.sprites,function(o){var l=o.show(e);l!=null&&!l.isFinished()&&(n._disposers.push(l),t!=null&&t>0&&l.delay(t))}),s}},i.prototype.dispose=function(){a.prototype.dispose.call(this),H(this.sprites,function(e){e.dispose()}),this.sprites=[]},i.prototype.hide=function(e,t,r,n){var s=this;if(this.isHiding=!0,H(this.sprites,function(l){var u=l.hide(e);u!=null&&!u.isFinished()&&(s._disposers.push(u),t!=null&&t>0&&u.delay(t))}),S(r)&&n){var o;if(H(n,function(l){var u=s.setWorkingValue(l,r,e,t);u&&(o=u)}),o&&!o.isFinished())return this._hideDisposer=o.events.on("animationended",function(){s.setVisibility(!1,!0),s.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(!S(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||(t="value"));var r=this.values[e][t];return this._adapterO&&this._adapterO.isEnabled("value")?this._adapterO.apply("value",{value:r,field:e}).value:r}},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,r,n){var s=this.values[e].value,o=this.getDuration(r);if(t=ke(t),s!==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,n)},i.prototype.setCalculatedValue=function(e,t,r){var n=this.values[e][r];if(n!==t&&S(t)){if(this.values[e][r]=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("calculatedvaluechanged")){var s={type:"calculatedvaluechanged",target:this,property:e};this.events.dispatchImmediately("calculatedvaluechanged",s)}this.component&&this.component.handleDataItemCalculatedValueChange(this,e)}},i.prototype.setWorkingValue=function(e,t,r,n){if(S(this.values[e].value)){var s=this.getDuration(r),o=this.values[e].workingValue;if(s!=null&&s>0&&S(o)&&this.component)if(o!=t){var l=this.animate({childObject:this.values[e],property:"workingValue",from:o,to:t,dummyData:e},s,this.component.interpolationEasing);return n!=null&&l.delay(n),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}else{var u=this._valueAnimations[e];u&&u.stop(),this.values[e].workingValue=t}else{var u=this._valueAnimations[e];if(u&&u.stop(),this.values[e].workingValue=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("workingvaluechanged")){var h={type:"workingvaluechanged",target:this,property:e};this.events.dispatchImmediately("workingvaluechanged",h)}this.component&&this.component.handleDataItemWorkingValueChange(this,e)}}},i.prototype.setLocation=function(e,t,r,n){var s=this.locations[e];if(s!==t){if(this.locations[e]=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("locationchanged")){var o={type:"locationchanged",target:this,property:e};this.events.dispatchImmediately("locationchanged",o)}this.component&&this.component.handleDataItemValueChange(this,e),this.setWorkingLocation(e,t,r,n)}},i.prototype.setWorkingLocation=function(e,t,r,n){var s=this.getDuration(r),o=this.workingLocations[e];if(s!=null&&s>0&&S(o)&&this.component)if(o!=t){var l=this.animate({childObject:this.workingLocations,property:e,from:o,to:t,dummyData:e},s,this.component.interpolationEasing);return n!=null&&l.delay(n),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}else{var u=this._locationAnimations[e];u&&u.stop(),this.workingLocations[e]=t}else{var u=this._locationAnimations[e];if(u&&u.stop(),this.workingLocations[e]=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("workinglocationchanged")){var h={type:"workinglocationchanged",target:this,property:e};this.events.dispatchImmediately("workinglocationchanged",h)}this.component&&this.component.handleDataItemWorkingLocationChange(this,e)}},i.prototype.setDate=function(e,t,r){!La(t)&&this.component&&(t=this.component.dateFormatter.parse(t));var n=this.dates[e];n!==t&&(this.dates[e]=t,this.setValue(e,t.getTime(),r))},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 r={type:"propertychanged",target:this,property:e,value:t};this.events.dispatchImmediately("propertychanged",r)}this.component&&this.component.handleDataItemPropertyChange(this,e)}},i.prototype.setCategory=function(e,t){ce(t)||(t=cs(t)),this.categories[e]!==t&&(this.categories[e]=t)},i.prototype.copyFrom=function(e){a.prototype.copyFrom.call(this,e),e.dataContext&&(this.dataContext=Qp(e.dataContext,{})),xi(e.locations,this.locations),e._adapterO&&this.adapter.copyFrom(e._adapterO),this.component=e.component},Object.defineProperty(i.prototype,"opacity",{set:function(e){H(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,r){return new Gt(this,e,t,r).start()},i.prototype.handleInterpolationProgress=function(e){var t=e.target,r=t.animationOptions[0];if(r){if(this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("workingvaluechanged")){var n={type:"workingvaluechanged",target:this,property:r.dummyData};this.events.dispatchImmediately("workingvaluechanged",n)}this.component&&this.component.handleDataItemWorkingValueChange(this,r.dummyData)}},i.prototype.hasValue=function(e){for(var t=0,r=e.length;t<r;t++){var n=this.values[e[t]];if(!n||!P(n.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&&oe(e.dataItem.sprites,e),this.visible||e.hide(0),this.isHiding&&e.hide(),this.sprites.push(e),e.dataItem=this},i})(Et);var Hi=(function(a){T(i,a);function i(){var e=a.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=cr,e.parsingStepDuration=50,e.dataInvalid=!1,e.rawDataInvalid=!1,e.dataRangeInvalid=!1,e.dataItemsInvalid=!1,e.interpolationDuration=0,e.interpolationEasing=cr,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 Na(e.createDataItem()),e._dataItems.events.on("inserted",e.handleDataItemAdded,e,!1),e._dataItems.events.on("removed",e.handleDataItemRemoved,e,!1),e._disposers.push(new Pe(e._dataItems)),e._disposers.push(e._dataItems.template),e.invalidateData(),e.dataUsers.events.on("inserted",e.handleDataUserAdded,e,!1),e._disposers.push(new Fe(e._dataDisposers)),e._start=0,e._end=1,e.maxZoomDeclination=1,e.applyTheme(),e}return i.prototype.createDataItem=function(){return new Wi},i.prototype.handleDataUserAdded=function(e){var t=e.newValue;t.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 r=this;if(e){t||(t={}),e.dataContext=t;var n=!1;te(this.dataFields,function(s,o){var l=s,u=t[o];if(r._adapterO&&r._adapterO.isEnabled("dataContextValue")&&(u=r._adapterO.apply("dataContextValue",{field:l,value:u,dataItem:e}).value),P(u))if(n=!0,e.hasChildren[l]){var h=r.createDataItem();h.copyFrom(r.mainDataSet.template);var p=new Na(h);p.events.on("inserted",r.handleDataItemAdded,r,!1),p.events.on("removed",r.handleDataItemRemoved,r,!1),r._dataDisposers.push(new Pe(p));for(var d=u.length,c=0;c<d;c++){var f=u[c],m=p.create();m.parent=e,r.processDataItem(m,f)}var y=e;y[l]=p}else e[l]=u}),te(this.propertyFields,function(s,o){var l=s,u=t[o];P(u)&&(n=!0,e.setProperty(l,u))}),!this._addAllDataItems&&!n&&this.mainDataSet.remove(e)}},i.prototype.updateDataItem=function(e){var t=this;if(e){var r=e.dataContext;te(this.dataFields,function(n,s){var o=n,l=r[s];if(t._adapterO&&(l=t._adapterO.apply("dataContextValue",{field:o,value:l,dataItem:e}).value),P(l))if(e.hasChildren[o]){var u=e,h=u[o];h.each(function(p){t.updateDataItem(p)})}else e[o]=l}),te(this.propertyFields,function(n,s){var o=n,l=r[s];P(l)&&e.setProperty(o,l)})}},i.prototype.validateDataElements=function(){for(var e=this.endIndex,t=this.startIndex;t<e;t++){var r=this.dataItems.getIndex(t);r&&this.validateDataElement(r)}},i.prototype.validate=function(){this.validateDataElements(),a.prototype.validate.call(this)},i.prototype.validateDataElement=function(e){},i.prototype.addData=function(e,t,r){var n=this;if(!this.dataInvalid&&this.inited&&(this._parseDataFrom=this.data.length),r||(e instanceof Array?H(e,function(s){n.data.push(s)}):this.data.push(e)),this.inited)this.removeData(t,r);else if(S(t))for(;t>0;)this.data.shift(),t--;this.invalidateData()},i.prototype.removeData=function(e,t){if(S(e)&&e>0){for(;e>0;){var r=this.mainDataSet.getIndex(0);r&&this.mainDataSet.remove(r),this.dataUsers.each(function(n){if(!n.data||n.data.length==0){var s=n.mainDataSet.getIndex(0);s&&n.mainDataSet.remove(s)}}),t||this.data.shift(),this._parseDataFrom>0&&this._parseDataFrom--,e--}this.invalidateDataItems()}},i.prototype.invalidateData=function(){this.disabled||this.isTemplate||(C.addToInvalidComponents(this),Se.requestFrame(),this.dataInvalid=!0,I(this.dataUsers.iterator(),function(e){e.invalidateDataItems()}))},i.prototype.invalidateDataUsers=function(){I(this.dataUsers.iterator(),function(e){e.invalidate()})},i.prototype.invalidateDataItems=function(){this.disabled||this.isTemplate||(bi(C.invalidDataItems,this),Se.requestFrame(),this.dataItemsInvalid=!0,I(this.dataUsers.iterator(),function(e){e.invalidateDataItems()}))},i.prototype.invalidateDataRange=function(){this.disabled||this.isTemplate||(this.dataRangeInvalid=!0,bi(C.invalidDataRange,this),Se.requestFrame())},i.prototype.validateDataRange=function(){oe(C.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++){var r=this.dataItems.getIndex(t);r&&(r.__disabled=!1)}for(var t=0;t<this.startIndex;t++){var r=this.dataItems.getIndex(t);r&&(r.__disabled=!0)}for(var t=this.endIndex;t<this.dataItems.length;t++){var r=this.dataItems.getIndex(t);r&&(r.__disabled=!0)}},i.prototype.invalidateRawData=function(){this.disabled||this.isTemplate||(bi(C.invalidRawDatas,this),Se.requestFrame(),this.rawDataInvalid=!0,I(this.dataUsers.iterator(),function(e){e.invalidateRawData()}))},i.prototype.validateRawData=function(){var e=this;oe(C.invalidRawDatas,this),I(this.mainDataSet.iterator(),function(t){t&&e.updateDataItem(t)})},i.prototype.dispose=function(){var e=this;this.mainDataSet.template.clones.clear(),te(this._dataSources,function(t,r){e.removeDispose(r)}),this.disposeData(),a.prototype.dispose.call(this)},i.prototype.disposeData=function(){this.mainDataSet.template.clones.clear(),H(this._dataDisposers,function(e){e.dispose()}),I(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,C.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;I(this.dataUsers.iterator(),function(p){p._startIndex=void 0,p._endIndex=void 0});var r=0,n=Date.now(),s=this._parseDataFrom,o=this.data.length,l=function(){var p=u.data[s];if(u._usesData){var d=u.getDataItem(p);u.processDataItem(d,p)}if(u.dataUsers.each(function(f){if(f.data.length==0){var m=f.getDataItem(p);f.processDataItem(m,p)}}),r++,r==100){r=0;var c=Date.now()-n;if(c>u.parsingStepDuration&&s<u.data.length-10)return u._parseDataFrom=s+1,t&&(s/u.data.length>.5&&!t.visible||(t.progress=s/u.data.length)),u.dataValidationProgress=s/u.data.length,s=u.data.length,u.invalidateData(),{value:void 0}}},u=this;for(s;s<o;s++){var h=l();if(typeof h=="object")return h.value}t&&(t.progress=1),this.dataUsers.each(function(p){(p.hidden||p.appeared&&!p.visible&&p.stacked)&&p.hide(0)})}this.dataValidationProgress=1,this._parseDataFrom=0,this.invalidateDataItems(),this._internalDefaultsApplied||this.applyInternalDefaults(),this.dispatch("datavalidated")}},i.prototype.validateDataItems=function(){oe(C.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 P(this._dataSources[e])||(this._dataSources[e]=new Nd,this._dataSources[e].component=this,this.setDataSourceEvents(this._dataSources[e],e),this._dataSources[e].adapter.add("dateFields",function(r){return t.dataSourceDateFields(r)}),this._dataSources[e].adapter.add("numberFields",function(r){return t.dataSourceNumberFields(r)}),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,r){return H(r,function(n){t[n]&&oi(e,t[n])===-1&&e.push(t[n])}),e},i.prototype.setDataSourceEvents=function(e,t){var r=this;e.events.on("started",function(n){var s=r.preloader;s&&(s.progress=0)},void 0,!1),e.events.on("loadstarted",function(n){var s=r.preloader;s&&(s.progress=.25)},void 0,!1),e.events.on("loadended",function(n){var s=r.preloader;s&&(s.progress=.5)},void 0,!1),e.events.on("parseended",function(n){var s=r.preloader;s&&(s.progress=.75)},void 0,!1),e.events.on("ended",function(n){var s=r.preloader;s&&(s.progress=1)},void 0,!1),e.events.on("error",function(n){var s=r.preloader;s&&(s.progress=1),r.openModal(n.message)},void 0,!1),t&&e.events.on("done",function(n){var s=r.preloader;s&&(s.progress=1),t=="data"&&!Xe(n.data)&&(n.data=[n.data]),e.incremental&&t=="data"&&r.data.length?r.addData(n.data,e.keepCount?n.data.length:0):e.updateCurrentData&&t=="data"&&r.data.length?(H(r.data,function(o,l){P(n.data[l])&&te(o,function(u,h){P(n.data[l][u])&&(o[u]=n.data[l][u])})}),r.invalidateRawData()):r[t]=n.data})},Object.defineProperty(i.prototype,"responsive",{get:function(){return this._responsive||(this._responsive=new Md,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,r,n){var s=this;t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.start,l=e.end,u=e.priority;if(e.start==e.end&&(e.start=e.start-.5/this.maxZoomFactor,e.end=e.end+.5/this.maxZoomFactor),u=="end"&&l==1&&o!=0&&o<this.start&&(u="start"),u=="start"&&o==0&&l>this.end&&(u="end"),S(n)||(n=this.maxZoomDeclination),!S(o)||!S(l))return{start:this.start,end:this.end};if(this._finalStart!=o||this._finalEnd!=l){var h=this.maxZoomFactor/this.minZoomCount,p=this.maxZoomFactor/this.maxZoomCount;if(u=="start"?(this.maxZoomCount>0&&1/(l-o)<p&&(l=o+1/p),1/(l-o)>h&&(l=o+1/h),l>1&&l-o<1/h&&(o=l-1/h)):(this.maxZoomCount>0&&1/(l-o)<p&&(o=l-1/p),1/(l-o)>h&&(o<=0?l=o+1/h:o=l-1/h),o<0&&l-o<1/h&&(l=o+1/h)),o<-n&&(o=-n),1/(l-o)>h&&(l=o+1/h),l>1+n&&(l=1+n),1/(l-o)>h&&(o=l-1/h),this._finalEnd=l,this._finalStart=o,this.skipRangeEvent=t,this.dispatchImmediately("rangechangestarted"),this.rangeChangeDuration>0&&!r){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(){s.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,r,n){if(!(!S(e)||!S(t))){var s=e/this.dataItems.length,o=t/this.dataItems.length;this.zoom({start:s,end:o},r,n)}},Object.defineProperty(i.prototype,"zoomFactor",{get:function(){return G(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 S(this._startIndex)||(this._startIndex=0),this._startIndex},set:function(e){this._startIndex=G(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(!S(this._endIndex)||this._endIndex>e)&&(this._endIndex=e),this._endIndex},set:function(e){this._endIndex=G(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(){a.prototype.removeFromInvalids.call(this),C.removeFromInvalidComponents(this),oe(C.invalidDataItems,this),oe(C.invalidDataRange,this),oe(C.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 Oe),this._dataSets},enumerable:!0,configurable:!0}),i.prototype.setDataSet=function(e){if(this._currentDataSetId!=e){var t=this.dataSets.getKey(e);if(t)return this.dataItems.each(function(r){r.__disabled=!0}),this._currentDataSetId=e,this.invalidateDataRange(),this._prevStartIndex=void 0,this.dataItems.each(function(r){r.__disabled=!1}),!0;if(this._currentDataSetId!="")return this.dataItems.each(function(r){r.__disabled=!0}),this._currentDataSetId="",this.invalidateDataRange(),this._prevStartIndex=void 0,this.dataItems.each(function(r){r.__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,r=t.length,n=e;n<r;++n)t[n]._index=n},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 ve,this._disposers.push(new Ce(function(){I(e._dataUsers.iterator(),function(t){t.dispose()})}))),this._dataUsers},enumerable:!0,configurable:!0}),i.prototype.clone=function(){var e=a.prototype.clone.call(this);return e.dataFields=xi(this.dataFields,{}),e},i.prototype.copyFrom=function(e){a.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=a.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=a.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.events.once("dataitemsvalidated",this.hideInitially,this,!1),this._disposers.push(this._showOnInitDisposer2)):this._showOnInitDisposer2&&this.removeDispose(this._showOnInitDisposer2)),a.prototype.setShowOnInit.call(this,e)},i.prototype.setBaseId=function(e){e!=this._baseId&&this.dataInvalid&&(this.dataInvalid=!1,C.removeFromInvalidComponents(this),this._baseId=e,this.invalidateData()),a.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"||a.prototype.asIs.call(this,e)},i})(U);C.registeredClasses.Component=Hi;var ta=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.childrenCreated=!1,e.className="LegendDataItem",e.applyTheme(),e}return 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 Ce(function(){P(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 Ce(function(){P(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,r=t.itemContainers.create();r.parent=t,this._itemContainer=r,this.addSprite(r),this._disposers.push(r),r.togglable&&r.events.on("toggled",function(o){t.toggleDataItem(o.target.dataItem)},void 0,!1),r.focusable&&(r.events.on("hit",function(o){t.focusedItem=void 0},void 0,!1),r.events.on("focus",function(o){t.focusedItem=o.target.dataItem},void 0,!1),r.events.on("blur",function(o){t.focusedItem=void 0},void 0,!1)),this._disposers.push(new Ce(function(){P(e.component)&&e.component.itemContainers.removeValue(r)})),this.dataContext.uidAttr&&(r.readerControls=this.dataContext.uidAttr(),r.readerLabelledBy=this.dataContext.uidAttr());var n=this.dataContext;if((n instanceof Wi||n instanceof ee)&&!n.isDisposed()){var s=function(o){r.readerChecked=o.visible,r.events.disableType("toggled"),r.isActive=!o.visible,r.events.enableType("toggled")};n.addDisposer(new Ce(function(){e.component&&e.component.dataItems.remove(e)})),n instanceof ee?(r.addDisposer(n.events.on("visibilitychanged",s,void 0,!1)),r.addDisposer(n.events.on("hidden",function(o){r.readerChecked=!1,r.events.disableType("toggled"),r.isActive=!0,r.events.enableType("toggled")},void 0,!1)),r.addDisposer(n.events.on("shown",function(o){r.readerChecked=!0,r.events.disableType("toggled"),r.isActive=!1,r.events.enableType("toggled")},void 0,!1))):r.addDisposer(n.events.on("visibilitychanged",s,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 Ce(function(){P(e.component)&&e.component.markers.removeValue(t)}))}return this._marker},enumerable:!0,configurable:!0}),i})(Wi);var il=(function(){function a(){this.createMarker=!0}return a})();var On=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="Legend",e.layout="grid",e.setPropertyValue("useDefaultMarker",!1),e.setPropertyValue("scrollable",!1),e.setPropertyValue("contentAlign","center");var t=new U;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=We.pointer,t.background.fillOpacity=0,e.itemContainers=new Le(t),e._disposers.push(new Pe(e.itemContainers)),e._disposers.push(e.itemContainers.template),e._disposers.push(pe().body.events.on("keyup",function(h){if(Si.isKey(h.event,"enter")&&e.focusedItem){var p=e.focusedItem,d=p.itemContainer;d.togglable?e.toggleDataItem(p):d.clickable&&d.events.isEnabled("hit")&&(d.dispatchImmediately("hit",{event:h}),e.focusedItem=p)}},e));var r=new se,n=new U;n.width=23,n.height=23,n.interactionsEnabled=!1,n.applyOnClones=!0,n.setStateOnChildren=!0,n.background.fillOpacity=0,n.background.strokeOpacity=0,n.propertyFields.fill="fill",n.valign="middle";var s=r.getFor("disabledBackground");n.events.on("childadded",function(h){var p=h.newValue,d=p.states.create("active");d.properties.stroke=s,d.properties.fill=s}),e.markers=new Le(n),e._disposers.push(new Pe(e.markers)),e._disposers.push(e.markers.template);var o=n.createChild(Mt);o.width=N(100),o.height=N(100),o.applyOnClones=!0,o.propertyFields.fill="fill",o.strokeOpacity=0;var l=new lt;l.text="{name}",l.margin(0,5,0,5),l.valign="middle",l.applyOnClones=!0,l.states.create("active").properties.fill=r.getFor("disabledBackground"),e.labels=new Le(l),e._disposers.push(new Pe(e.labels)),e._disposers.push(e.labels.template),l.interactionsEnabled=!1,l.truncate=!0,l.fullWords=!1;var u=new lt;return u.margin(0,5,0,0),u.valign="middle",u.width=50,u.align="right",u.textAlign="end",u.applyOnClones=!0,u.states.create("active").properties.fill=r.getFor("disabledBackground"),u.interactionsEnabled=!1,e.valueLabels=new Le(u),e._disposers.push(new Pe(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.events.on("parentset",function(){var h=e.parent;h&&e._disposers.push(h.events.on("maxsizechanged",function(){e.scrollable&&e.setTimeout(function(){e.updateMasks(),e.handleScrollbar(),e._handleWheelReal(1)},100)}))}),e.applyTheme(),e}return i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Legend"))},i.prototype.createDataItem=function(){return new ta},i.prototype.validateDataElements=function(){this.scrollbar&&(this.scrollbar.start=0,this.scrollbar.end=1),a.prototype.validateDataElements.call(this)},i.prototype.validateDataElement=function(e){a.prototype.validateDataElement.call(this,e);var t=e.itemContainer,r=e.marker;e.label;var n=e.valueLabel;t.readerChecked=e.dataContext.visible,e.dataContext.legendDataItem=e;var s=e.label.maxWidth;e.label.width instanceof de||(e.label.width=void 0),s>0&&(e.label.maxWidth=s),n.align=="right"&&(n.width=void 0);var o=e.dataContext.legendSettings,l=e.dataContext;l.createLegendMarker&&(!this.useDefaultMarker||!(l instanceof ee))?e.childrenCreated||(l.createLegendMarker(r),e.childrenCreated=!0):this.markers.template.propertyFields.fill=void 0,l.updateLegendValue&&l.updateLegendValue(),l.component&&l.component.updateLegendValue&&l.component.updateLegendValue(l),n.invalid&&n.validate(),n.text==""||n.text==null?n.__disabled=!0:n.__disabled=!1,o&&(o.itemValueText!=null||o.valueText!=null)&&(n.__disabled=!1);var u=e.dataContext.visible;u===void 0&&(u=!0),u=tt(u),e.dataContext.visible=u,t.events.disableType("toggled"),t.isActive=!u,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"),r=0;this.labels.each(function(p){p.invalid&&(p.maxWidth=void 0,p.validate()),p.measuredWidth+p.pixelMarginLeft+p.pixelMarginRight>r&&(r=p.measuredWidth+p.pixelMarginLeft+p.pixelMarginRight)});var n=0;this.valueLabels.each(function(p){p.invalid&&p.validate(),p.measuredWidth+p.pixelMarginLeft+p.pixelMarginRight>n&&(n=p.measuredWidth+p.pixelMarginLeft+p.pixelMarginRight)});var s=0;this.markers.each(function(p){p.invalid&&p.validate(),p.measuredWidth+p.pixelMarginLeft+p.pixelMarginRight>s&&(s=p.measuredWidth+p.pixelMarginLeft+p.pixelMarginRight)});var o=this.itemContainers.template,l=o.pixelMarginRight+o.pixelMarginLeft,u,h=r+n+s;S(t)?(t=t-l,t>h&&(t=h),u=t-s-n):u=r,this.labels.each(function(p){(e.valueLabels.template.align=="right"||p.measuredWidth>u)&&(p.width instanceof de||(p.width=Math.min(p.maxWidth,u-p.pixelMarginLeft-p.pixelMarginRight),p.maxWidth=p.width))}),this.valueLabels.template.align=="right"&&this.valueLabels.each(function(p){p.width=n-p.pixelMarginRight-p.pixelMarginLeft}),a.prototype.afterDraw.call(this)},i.prototype.handleScrollbar=function(){var e=this.scrollbar;if(this.scrollable&&e){var t=this.maxHeight;e.height=t,e.x=this.measuredWidth-e.pixelWidth-e.pixelMarginLeft,this.contentHeight>t?(e.visible=!0,e.thumb.height=e.height*t/this.contentHeight,this.paddingRight=e.pixelWidth+e.pixelMarginLeft+e.pixelMarginRight):(e.thumb.height=e.height*t/this.contentHeight,this.paddingRight=e.pixelWidth+e.pixelMarginLeft+e.pixelMarginRight,e.visible=!1,e.start=0,e.end=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",S(this.maxColumns)||(this.maxColumns=1),this.width=void 0,this.maxWidth=220):(this.maxColumns=void 0,this.width=N(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(Ha);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){this._handleWheelReal(e.shift.y)},i.prototype._handleWheelReal=function(e){var t=this.scrollbar;if(t){var r=e/1e3*this.measuredHeight/this.contentHeight,n=t.end-t.start;e>0?(t.start=he(0,t.start-r),t.end=t.start+n):(t.end=ye(1,t.end-r),t.start=t.end-n)}},i.prototype.updateMasks=function(){var e=this;this.scrollbar&&this.itemContainers.each(function(t){t.dy=-e.scrollbar.thumb.pixelY*e.contentHeight/e.maxHeight,t.maskRectangle={x:0,y:-t.dy,width:e.measuredWidth,height:e.maxHeight}}),this.invalidatePosition()},i.prototype.toggleDataItem=function(e){var t=e.dataContext;!t.visible||t.isHiding||t instanceof ee&&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 se().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})(Hi);C.registeredClasses.Legend=On;ht.push({relevant:yt.widthXS,state:function(a,i){if(a instanceof On&&(a.position=="left"||a.position=="right")){var e=a.states.create(i);return e.properties.position="bottom",e}return null}});ht.push({relevant:yt.heightXS,state:function(a,i){if(a instanceof On&&(a.position=="top"||a.position=="bottom")){var e=a.states.create(i);return e.properties.position="right",e}return null}});ht.push({relevant:yt.isXS,state:function(a,i){if(a instanceof On){var e=a.states.create(i);return e.properties.disabled=!0,e}return null}});var li=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="Line",e.element=e.paper.add("line"),e.fill=ie(),e.x1=0,e.y1=0,e.applyTheme(),e}return i.prototype.draw=function(){a.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){S(e)||(e=0);var t=0;this.pixelPerfect&&this.stroke instanceof Ht&&(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 S(e)||(e=this.pixelWidth),e},set:function(e){S(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){S(e)||(e=0);var t=0;this.pixelPerfect&&this.stroke instanceof Ht&&(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 S(e)||(e=this.pixelHeight),e},set:function(e){S(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},r={x:this.x2,y:this.y2},n=pn(t,r,e),s=ft(t,r);return{x:n.x,y:n.y,angle:s}},i})(ee);C.registeredClasses.Line=li;var Qi=(function(){function a(i,e){this._tensionX=i,this._tensionY=e}return a.prototype.smooth=function(i){for(var e=i.length-1;e>0;e--){var t=i[e],r=i[e-1];Math.abs(t.x-r.x)<.1&&Math.abs(t.y-r.y)<.1&&i.splice(e-1,1)}var n=this._tensionX,s=this._tensionY;if(i.length<3||n>=1&&s>=1)return _n(i);var o=i[0],l=i[i.length-1],u=!1;E(o.x,3)==E(l.x)&&E(o.y)==E(l.y)&&(u=!0);for(var h="",e=0,p=i.length-1;e<p;e++){var t=i[e-1],r=i[e],d=i[e+1],c=i[e+2];e===0?u?t=i[i.length-2]:t=i[e]:e==i.length-2&&(u?c=i[1]:c=i[e+1]);var f=su(t,r,d,c,n,s),m=ou(t,r,d,c,n,s);h+=xa(d,f,m)}return h},a})();function wn(a,i,e,t,r,n){var s=a.x,o=a.y,l=i.x,u=i.y,h=_e(a,i);n&&(e=h/Math.round(h/e));var p=C.getCache(Su(["wavedLine",a.x,i.x,a.y,i.y,e,t]));if(!p){if(h>0){var d=Math.atan2(u-o,l-s),c=Math.cos(d),f=Math.sin(d),m=e*c,y=e*f;if(e<=1||t<=1)p=k(i);else{var v=Math.round(2*h/e),b=[],x=1;l<s&&(x*=-1),u<o&&(x*=-1);for(var _=0;_<=v;_++){x*=-1;var $=s+_*m/2+x*t/2*f,O=o+_*y/2-x*t/2*c;b.push({x:$,y:O})}p=new Qi(r,r).smooth(b)}}else p="";C.setCache(Su(["wavedLine",a.x,i.x,a.y,i.y,e,t]),p)}return p}var ky=(function(){function a(i,e){this._reversed=i,this._closed=e.closed}return a.prototype._curve=function(i,e,t,r,n,s){var o=(e-i)/3;return this._reversed?xa({x:r,y:e},{x:t+o*n,y:i+o},{x:r-o*s,y:e-o}):xa({x:e,y:r},{x:i+o,y:t+o*n},{x:e-o,y:r-o*s})},a.prototype.smooth=function(i){var e=this,t=NaN,r=NaN,n=NaN,s=NaN,o=NaN,l=0,u="";switch(H(i,function(h){var p=h.x,d=h.y;if(e._reversed){var c=p;p=d,d=c}var f=NaN;if(!(p===r&&d===s)){switch(l){case 0:l=1,e._reversed?u+=k({x:d,y:p}):u+=k({x:p,y:d});break;case 1:l=2;break;case 2:l=3,u+=e._curve(t,r,n,s,Vy(t,r,n,s,f=Ly(t,r,n,s,p,d)),f);break;default:u+=e._curve(t,r,n,s,o,f=Ly(t,r,n,s,p,d));break}t=r,r=p,n=s,s=d,o=f}}),l){case 2:this._reversed?u+=k({x:s,y:r}):u+=k({x:r,y:s});break;case 3:u+=this._curve(t,r,n,s,o,Vy(t,r,n,s,o));break}return this._closed&&(u+=Ge()),u},a})();function Ay(a){return a<0?-1:1}function Vy(a,i,e,t,r){var n=i-a;return n?(3*(t-e)/n-r)/2:r}function Ly(a,i,e,t,r,n){var s=i-a,o=r-i,l=(t-e)/(s||o<0&&-0),u=(n-t)/(o||s<0&&-0),h=(l*o+u*s)/(s+o);return(Ay(l)+Ay(u))*Math.min(Math.abs(l),Math.abs(u),.5*Math.abs(h))||0}var Rd=(function(a){T(i,a);function i(e){return a.call(this,!1,e)||this}return i})(ky);var Bd=(function(a){T(i,a);function i(e){return a.call(this,!0,e)||this}return i})(ky);var Sx=(function(){function a(i){this._closed=i.closed}return a.prototype.smooth=function(i){var e=this,t=NaN,r=NaN,n=NaN,s=NaN,o=NaN,l=NaN,u=NaN,h=NaN,p=NaN,d=NaN,c=0,f="",m=function(v,b){f+=xa({x:(t+4*r+v)/6,y:(l+4*u+b)/6},{x:(2*t+r)/3,y:(2*l+u)/3},{x:(t+2*r)/3,y:(l+2*u)/3})},y=function(v){var b=v.x,x=v.y;switch(c){case 0:c=1,e._closed?(n=b,h=x):f+=k({x:b,y:x});break;case 1:c=2,e._closed&&(s=b,p=x);break;case 2:if(c=3,e._closed){o=b,d=x,f+=W({x:(t+4*r+b)/6,y:(l+4*u+x)/6});break}else f+=k({x:(5*t+r)/6,y:(5*l+u)/6});default:m(b,x);break}t=r,r=b,l=u,u=x};if(H(i,y),this._closed)switch(c){case 1:f+=W({x:n,y:h}),f+=Ge();break;case 2:f+=W({x:(n+2*s)/3,y:(h+2*p)/3}),f+=k({x:(s+2*n)/3,y:(p+2*h)/3}),f+=Ge();break;case 3:y({x:n,y:h}),y({x:s,y:p}),y({x:o,y:d});break}else{switch(c){case 3:m(r,u);case 2:f+=k({x:r,y:u});break}f+=Ge()}return f},a})();var Dr=(function(a){T(i,a);function i(){var e=a.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=ie(),e.applyTheme(),e}return i.prototype.draw=function(){var e={x:this.x1,y:this.y1},t={x:this.x2,y:this.y2};this.path=W(e)+wn(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})(li);var Xa=(function(a){T(i,a);function i(){var e=a.call(this)||this;e._axis=new Ue,e.dataItems=new ve,e.className="AxisBreak",e.breakSize=.01,e.marginLeft=-5,e.marginRight=-5,e.marginTop=-5,e.marginBottom=-5;var t=new se,r=new Dr;r.fill=t.getFor("background"),r.stroke=ie(),r.fillOpacity=.9,r.zIndex=0,e._fillShape=r;var n=new Dr;n.fill=ie(),n.stroke=t.getFor("grid"),n.strokeOpacity=.3,n.zIndex=1,e._startLine=n;var s=new Dr;return s.fill=ie(),s.stroke=ie("#000000"),s.strokeOpacity=.3,s.zIndex=2,e._endLine=s,e._disposers.push(e._axis),e.applyTheme(),e}return i.prototype.dispose=function(){a.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(){if(a.prototype.draw.call(this),this.axis){var e=this.axis.renderer;e.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})(U);C.registeredClasses.AxisBreak=Xa;var jd=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="PointedShape",e.pointerBaseWidth=15,e.pointerLength=10,e.pointerY=0,e.pointerX=0,e.applyTheme(),e}return i.prototype.draw=function(){a.prototype.draw.call(this),S(this.pointerX)||(this.pointerX=this.pixelWidth/2),S(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})(ee);var Ed=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="PointedRectangle",e.element=e.paper.add("path"),e.cornerRadius=6,e.applyTheme(),e}return i.prototype.draw=function(){a.prototype.draw.call(this);var e=this.cornerRadius,t=this.innerWidth,r=this.innerHeight;if(t>0&&r>0){var n=this.pointerX,s=this.pointerY,o=this.pointerBaseWidth/2,l=ye(t/2,r/2),u=G(e,0,l),h=G(e,0,l),p=G(e,0,l),d=G(e,0,l),c=0,f=0,m=t,y=0,v=t,b=r,x=0,_=r,$=void 0,O=void 0,F=void 0,w=void 0,D=(n-c)*(b-f)-(s-f)*(v-c),B=(n-x)*(y-_)-(s-_)*(m-x);if(D>0&&B>0){var L=G(n,u+o,t-o-h);s=G(s,-1/0,0),$="M"+u+",0 L"+(L-o)+",0 L"+n+","+s+" L"+(L+o)+",0 L"+(t-h)+",0"}else $="M"+u+",0 L"+(t-h)+",0";if(D<0&&B<0){var L=G(n,d+o,t-o-p);s=G(s,r,1/0),F=" L"+(t-p)+","+r+" L"+(L+o)+","+r+" L"+n+","+s+" L"+(L-o)+","+r+" L"+d+","+r}else F=" L"+d+","+r;if(D<0&&B>0){var M=G(s,u+o,r-d-o);n=G(n,-1/0,0),w=" L0,"+(r-d)+" L0,"+(M+o)+" L"+n+","+s+" L0,"+(M-o)+" L0,"+u}else w=" L0,"+u;if(D>0&&B<0){var M=G(s,h+o,r-o-p);n=G(n,t,1/0),O=" L"+t+","+h+" L"+t+","+(M-o)+" L"+n+","+s+" L"+t+","+(M+o)+" L"+t+","+(r-p)}else O=" L"+t+","+(r-p);var Q=" a"+h+","+h+" 0 0 1 "+h+","+h,ae=" a"+p+","+p+" 0 0 1 -"+p+","+p,K=" a"+d+","+d+" 0 0 1 -"+d+",-"+d,z=" a"+u+","+u+" 0 0 1 "+u+",-"+u;this.path=$+Q+O+ae+F+K+w+z}},Object.defineProperty(i.prototype,"cornerRadius",{get:function(){return this.getPropertyValue("cornerRadius")},set:function(e){this.setPropertyValue("cornerRadius",e,!0)},enumerable:!0,configurable:!0}),i})(jd);var Ji=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.properties={},e.isTemplate=!1,e._scale=1,e._nonScaling=!0,e.className="Filter",e.filterPrimitives=new ve,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 i.prototype.appendPrimitives=function(e){I(this.filterPrimitives.iterator(),function(t){e.add(t)})},i.prototype.animate=function(e,t,r){var n=new Gt(this,e,t,r).start();return n},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;a.prototype.copyFrom.call(this,e),te(e.properties,function(r,n){t[r]=n})},Object.defineProperty(i.prototype,"paper",{get:function(){return this._paper?this._paper:wr()},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 fr(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})(st);var Ws=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="DropShadowFilter",e.color=ie("#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 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})(Ji);C.registeredClasses.DropShadowFilter=Ws;var Ar=(function(a){T(i,a);function i(){var e=a.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=ie("#ffffff"),t.cornerRadius=3,t.pointerLength=6,t.pointerBaseWidth=10;var r=new Ws;r.dy=1,r.dx=1,r.opacity=.5,t.filters.push(r),e.autoTextColor=!0;var n=e.createChild(lt);return n.shouldClone=!1,e.label=n,n.padding(7,12,4,12),n.interactionsEnabled=!1,n.horizontalCenter="middle",n.fill=ie("#ffffff"),e._disposers.push(n),e.label.events.on("sizechanged",e.drawBackground,e),e.label.zIndex=1,e.pointerOrientation="vertical",e.animationDuration=0,e.animationEasing=cr,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 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(r){t.targetSprite&&t.targetSprite.hoverable&&(t.targetSprite.isHover=!0)})),this._disposers.push(this.events.on("out",function(r){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 Ed},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(){a.prototype.draw.call(this);var e=this.label;e.invalid&&e.validate();var t=this._pointTo.x,r=this._pointTo.y,n=this._boundingRect,s=e.measuredWidth,o=e.measuredHeight,l=this.background.pointerLength,u,h;if(this.ignoreBounds&&(n=void 0),n&&this.fixDoc&&s>n.width){Ls({x:n.x,y:n.y},this.parent);var p=Ls({x:n.x+n.width,y:n.y+n.height},this.parent),d=document.body.offsetWidth;document.body.offsetHeight,p.x>d/2?n.x=n.width-s:n.width=n.x+s}var c=this.pointerOrientation;c=="horizontal"||c=="left"||c=="right"?(h=-o/2,c=="horizontal"?n&&t>n.x+n.width/2?u=-s/2-l:u=s/2+l:c=="left"?u=s/2+l:u=-s/2-l):(n&&(u=G(0,n.x-t+s/2,n.x-t+n.width-s/2)),c=="vertical"?n&&r>n.y+o+l?(h=-o-l,this._verticalOrientation="up"):(h=l,this._verticalOrientation="down"):c=="down"?(h=-o-l,this._verticalOrientation="up"):(h=l,this._verticalOrientation="down")),n&&(h=G(h,n.y-r,n.y+n.height-o-r)),e.x=u,e.y=h,this.drawBackground()},i.prototype.updateBackground=function(){this.group.addToBack(this.background.group)},i.prototype.drawBackground=function(){var e=this.label,t=this.background,r=e.measuredWidth,n=e.measuredHeight,s=this._boundingRect,o=r,l=e.pixelX-r/2,u=n,h=e.pixelY,p=this._pointTo.x,d=this._pointTo.y,c=s.x-p,f=c+s.width,m=s.y-d,y=m+s.height;t.x=l,t.y=h,t.width=o,t.height=u,this.fitPointerToBounds?(t.pointerX=G(-t.x,c-t.x,f-t.x),t.pointerY=G(-t.y,m-t.y,y-t.y)):(t.pointerX=-t.x,t.pointerY=-t.y),t.validate()},i.prototype.delayedPointTo=function(e,t){var r=this;this._pointToDisposer&&this._pointToDisposer.dispose(),this._pointToDisposer=C.events.once("exitframe",function(){r.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=Sn({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){a.prototype.copyFrom.call(this,e),this.label.copyFrom(e.label),e._boundingRect&&(this._boundingRect=e._boundingRect)},i.prototype.asFunction=function(e){return e=="animationEasing"||a.prototype.asIs.call(this,e)},i})(U);C.registeredClasses.Tooltip=Ar;var Sa=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="AxisDataItem",e.applyTheme(),e}return Object.defineProperty(i.prototype,"grid",{get:function(){if(!this._grid){var e=this.component;if(e){var t=void 0,r;if(this.isRange){if(t=e.axisRanges.template.grid,t.disabled)return;r=t.clone()}else{if(t=e.renderer.grid.template,t.disabled)return;r=e.renderer.grid.create(),this._disposers.push(new Ce(function(){e.renderer.grid.removeValue(r)}))}this.grid=r,r.shouldClone=!1,this._disposers.push(r),r.axis=this.component}}return this._grid},set:function(e){this._grid&&this._grid!=e&&(oe(this.sprites,this._grid),this._grid.dataItem=void 0),e&&(e.dataItem&&e.dataItem!=this&&(oe(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=void 0,r;if(this.isRange){if(t=e.axisRanges.template.tick,t.disabled)return;r=t.clone()}else{if(t=e.renderer.ticks.template,t.disabled)return;r=e.renderer.ticks.create(),this._disposers.push(new Ce(function(){e.renderer.ticks.removeValue(r)}))}this.tick=r,r.axis=this.component,r.shouldClone=!1,this._disposers.push(r)}}return this._tick},set:function(e){this._tick&&this._tick!=e&&(oe(this.sprites,this._tick),this._tick.dataItem=void 0),e&&(e.dataItem&&e.dataItem!=this&&(oe(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=void 0,r;if(this.isRange){if(t=e.axisRanges.template.label,t.disabled)return;r=t.clone()}else{if(t=e.renderer.labels.template,t.disabled)return;r=e.renderer.labels.create(),this._disposers.push(new Ce(function(){e.renderer.labels.removeValue(r)}))}this._disposers.push(r),this.label=r,r.shouldClone=!1,r.axis=this.component,r.virtualParent=e}}return this._label},set:function(e){this._label&&this._label!=e&&(oe(this.sprites,this._label),this._label.dataItem=void 0),e&&(e.dataItem&&e.dataItem!=this&&(oe(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=void 0,r;if(this.isRange){if(t=e.axisRanges.template.axisFill,!this.isTemplate&&t.disabled)return;r=t.clone()}else{if(t=e.renderer.axisFills.template,t.disabled)return;r=e.renderer.axisFills.create(),this._disposers.push(new Ce(function(){e.renderer.axisFills.removeValue(r)}))}this.axisFill=r,r.shouldClone=!1,this._disposers.push(r)}}return this._axisFill},set:function(e){this._axisFill&&this._axisFill!=e&&(oe(this.sprites,this._axisFill),this._axisFill.dataItem=void 0),e&&(e.dataItem&&e.dataItem!=this&&(oe(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 U;this.addSprite(e),e.isMeasured=!1,this._contents=e;var t=this.component;if(t){var r=t.renderer.createFill(this.component);r.disabled=!1,r.axis=t,this.addSprite(r),this._mask=r,e.mask=r}}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"?!0:a.prototype.hasProperty.call(this,e)},i.prototype.copyFrom=function(e){a.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){a.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&&(oe(this.sprites,this._bullet),this._bullet.dataItem=void 0),this._bullet=e,e&&this.addSprite(e)},enumerable:!0,configurable:!0}),i})(Wi);var Iy;(function(a){a[a.Start=0]="Start",a[a.Middle=.5]="Middle",a[a.End=1]="End"})(Iy||(Iy={}));var Fn=(function(a){T(i,a);function i(){var e=a.call(this)||this;if(e._gridCount=10,e._series=new ve,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 se;e.title=new lt,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 r=new Ar;e._disposers.push(r),r.label.padding(5,10,5,10),r.background.pointerLength=5,r.fitPointerToBounds=!0,r.background.filters.clear(),r.virtualParent=e;var n=r.background;return n.cornerRadius=0,n.fill=t.getFor("alternativeBackground"),n.stroke=n.fill,n.strokeWidth=1,n.fillOpacity=1,r.label.fill=t.getFor("alternativeText"),e.tooltip=r,e.readerHidden=!0,e.events.on("rangechangestarted",function(){e.series.each(function(s){s.hideTooltipWhileZooming&&(s.tooltip.hide(),s.tooltip.preventShow=!0)}),e.hideTooltipWhileZooming&&(e.tooltip.hide(),e.tooltip.preventShow=!0)},void 0,!1),e.events.on("rangechangeended",function(){e.series.each(function(s){s.hideTooltipWhileZooming&&(s.tooltip.hide(),s.tooltip.preventShow=!1)}),e.hideTooltipWhileZooming&&(e.tooltip.hide(),e.tooltip.preventShow=!1)},void 0,!1),e.applyTheme(),e}return i.prototype.fillRule=function(e,t){S(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 Sa},i.prototype.invalidateLayout=function(){a.prototype.invalidateLayout.call(this),I(this.series.iterator(),function(e){e.invalidateLayout()})},i.prototype.invalidateSeries=function(){I(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),a.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,r=e.tick;r&&(r.above?r.parent=t.bulletsContainer:r.parent=t.gridContainer),e.label&&(e.label.parent=t);var n=e.axisFill;n&&(n.above?n.parent=t.bulletsContainer:n.parent=t.gridContainer);var s=e.grid;s&&(s.above?s.parent=t.bulletsContainer:s.parent=t.gridContainer),e.bullet&&(e.bullet.parent=t.bulletsContainer)},i.prototype.validate=function(){a.prototype.validate.call(this),this.validateLayout(),this.renderer.updateGridContainer()},i.prototype.validateAxisRanges=function(){var e=this;I(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&&I(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 Fe([new Ce(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){a.prototype.hideTooltip.call(this,e),this._tooltipPosition=void 0},i.prototype.showTooltipAtPosition=function(e,t){var r=this._tooltip;if(!r||this.dataItems.length<=0)this._tooltipPosition=void 0;else{if(t||(e=this.toAxisPosition(e)),!S(e)||e<this.start||e>this.end){r.hide(0),this._tooltipPosition=void 0;return}var n=this.renderer;r.parent||(r.parent=this.tooltipContainer);var s=n.tooltipLocation,o=this.getCellStartPosition(e),l=this.getCellEndPosition(e);if(this.tooltipPosition=="fixed"&&(e=o+(l-o)*s),e=G(e,this.start,this.end),this._tooltipPosition!=e){this._tooltipPosition=e;var u=n.tooltipLocation2,h=n.positionToPoint(o,u),p=n.positionToPoint(l,u);this.currentItemStartPoint=h,this.currentItemEndPoint=p,n.fullWidthTooltip&&(r.width=p.x-h.x,r.height=p.y-h.y);var d=n.positionToPoint(e,u),c=di(d,this.renderer.line);r.text=this.getTooltipText(e),r.text&&(r.delayedPointTo(c),r.show())}(!this.cursorTooltipEnabled||this.tooltip.disabled)&&r.hide(0)}},i.prototype.toAxisPosition=function(e){if(e=this.renderer.toAxisPosition(e),e!=null)return e=e*(this.end-this.start),this.renderer.inversed?e=this.end-e:e=this.start+e,e},i.prototype.toGlobalPosition=function(e){return this.renderer.inversed?e=this.end-e:e=e-this.start,e/(this.end-this.start)},i.prototype.getTooltipText=function(e){},i.prototype.updateTooltip=function(e,t){var r=this._tooltip;r&&(r.fixDoc=!1,r.pointerOrientation=e,r.setBounds(Sn(t,this.renderer.line)))},i.prototype.roundPosition=function(e,t,r){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 Le(e),this._axisRanges.events.on("inserted",this.processAxisRange,this,!1),this._disposers.push(new Pe(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 ko(this.createAxisBreak(),function(e,t){return Fi(e.adjustedStartValue,t.adjustedStartValue)}),this._axisBreaks.events.on("inserted",this.processBreak,this,!1),this._disposers.push(new Pe(this._axisBreaks)),this._disposers.push(this._axisBreaks.template)),this._axisBreaks},enumerable:!0,configurable:!0}),i.prototype.createAxisBreak=function(){return new Xa},Object.defineProperty(i.prototype,"series",{get:function(){return this._series||(this._series=new ve),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,I(t.iterator(),function(r){e.validateDataElement(r),r.__disabled=!0}),t.clear(),t.createNewItems=!0},i.prototype.getSeriesDataItem=function(e,t,r){},i.prototype.getAngle=function(e,t,r,n,s){},i.prototype.getX=function(e,t,r,n,s){},i.prototype.getPositionX=function(e,t,r,n,s){},i.prototype.getY=function(e,t,r,n,s){},i.prototype.getPositionY=function(e,t,r,n,s){},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 r=t-e;if(S(r))return this._axisBreaks&&Dt(this._axisBreaks.iterator(),function(n){var s=n.adjustedStartValue,o=n.adjustedEndValue;if(S(s)&&S(o)){if(s>t)return!1;if(o>=e&&S(s)&&S(o)){var l=n.breakSize,u=Fm({start:s,end:o},{start:e,end:t});u&&(r-=(u.end-u.start)*(1-l))}return!0}}),r},i.prototype.isInBreak=function(e){if(this._axisBreaks)return Gm(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){H(cn(t.iterator()),function(s){var o=ye(s.startValue,s.endValue),l=he(s.startValue,s.endValue);s.adjustedStartValue=o,s.adjustedEndValue=l,e._axisBreaks.update(s)});var r=t.first,n=Math.min(r.startValue,r.endValue);I(t.iterator(),function(s){var o=s.adjustedStartValue,l=s.adjustedEndValue;o<n&&(o=n,l<n&&(l=n)),s.adjustedStartValue=o,s.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(e*100)+"%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 Ce(function(){e.axisRanges.removeValue(t)})),e.axisRanges.push(t),t},i.prototype.copyFrom=function(e){a.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&&P(e.axisRanges)&&Xe(e.axisRanges))for(var t=0,r=e.axisRanges.length;t<r;t++){var n=e.axisRanges[t];P(n.series)&&ce(n.series)&&this.map.hasKey(n.series)&&(e.axisRanges[t]=this.createSeriesRange(this.map.getKey(n.series)),delete n.series,e.axisRanges[t].config=n)}a.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:a.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=a.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})(Hi);C.registeredClasses.Axis=Fn;C.registeredClasses.AxisDataItem=Sa;ht.push({relevant:yt.maybeXS,state:function(a,i){if(a instanceof Fn&&a.tooltip){var e=a.states.create(i);return e.properties.cursorTooltipEnabled=!1,e}return null}});var Bu=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="AxisLine",e.element=e.paper.add("path");var t=new se;return e.stroke=t.getFor("grid"),e.strokeOpacity=.15,e.pixelPerfect=!0,e.fill=ie(),e.applyTheme(),e.interactionsEnabled=!1,e}return i})(ee);C.registeredClasses.AxisLine=Bu;var Ya=(function(a){T(i,a);function i(e){var t=a.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 r=new se;return t.fill=r.getFor("alternativeBackground"),t.fillOpacity=0,t.applyTheme(),t}return i.prototype.setDisabled=function(e){var t=a.prototype.setDisabled.call(this,e);return this.axis&&this.axis.invalidateDataItems(),t},i.prototype.draw=function(){a.prototype.draw.call(this),!(this.__disabled||this.disabled)&&this.axis&&S(this.startPosition)&&S(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):!1},Object.defineProperty(i.prototype,"above",{get:function(){return this.getPropertyValue("above")},set:function(e){this.setPropertyValue("above",e,!0)},enumerable:!0,configurable:!0}),i})(ee);C.registeredClasses.AxisFill=Ya;var qa=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="Grid",e.element=e.paper.add("path"),e.location=.5,e.isMeasured=!1,e.above=!1;var t=new se;return e.stroke=t.getFor("grid"),e.pixelPerfect=!0,e.strokeOpacity=.15,e.fill=ie(),e.applyTheme(),e}return 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=a.prototype.setDisabled.call(this,e);return this.axis&&this.axis.invalidateDataItems(),t},i})(ee);C.registeredClasses.Grid=qa;ht.push({relevant:yt.maybeXS,state:function(a,i){if(a instanceof qa){var e=a.states.create(i);return e.properties.disabled=!0,e}return null}});var ia=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="AxisLabel",e.isMeasured=!1,e.padding(10,10,10,10),e.location=.5,e.applyTheme(),e}return 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=a.prototype.setDisabled.call(this,e);return this.axis&&this.axis.invalidateDataItems(),t},i})(lt);C.registeredClasses.AxisLabel=ia;var ra=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="Tick";var t=new se;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 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})(ee);C.registeredClasses.Tick=ra;var ju=(function(a){T(i,a);function i(){var e=a.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 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=a.prototype.setDisabled.call(this,e);return this.axis&&this.axis.invalidateDataItems(),t},i})(ra);C.registeredClasses.AxisTick=ju;var Ga=(function(a){T(i,a);function i(){var e=a.call(this)||this;e._chart=new Ue,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(U);t.shouldClone=!1,t.layout="none",t.virtualParent=e,t.width=N(100),t.height=N(100),e.gridContainer=t,t.events.on("maxsizechanged",function(){e.inited&&e.invalidateAxisItems()},e,!1);var r=e.createChild(U);r.shouldClone=!1,r.isMeasured=!1,r.layout="none",r.width=N(100),r.height=N(100),e.breakContainer=r;var n=e.createChild(U);n.shouldClone=!1,n.isMeasured=!1,n.layout="none",n.width=N(100),n.height=N(100),e.bulletsContainer=n,e.line=e.createChild(Bu),e.line.shouldClone=!1,e.line.strokeOpacity=0;var s=e.createChild(qa);s.shouldClone=!1,e.baseGrid=s;var o=e._disposers;return o.push(s),o.push(e.line),o.push(t),o.push(r),o.push(n),o.push(e._chart),e.ticks.template.disabled=!0,e.axisFills.template.disabled=!0,e.axisFills.template.interactionsEnabled=!1,e.applyTheme(),e}return 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,r=this.axis,n=r.axisFullLength;return r.renderer.inversed?t=(r.end-e)*n:t=(e-r.start)*n,t},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 r,n=this.axis,s=n.axisFullLength;return n.renderer.inversed?r=n.end-e/s:r=e/s+n.start,E(r,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,r){},i.prototype.updateTickElement=function(e,t,r){},i.prototype.updateBullet=function(e,t,r){},i.prototype.updateLabelElement=function(e,t,r,n){},i.prototype.updateFillElement=function(e,t,r){e.startPosition=t,e.endPosition=r},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,r,n){var s=this.axis,o=e.dataItem;o&&o instanceof Sa&&(S(o.minPosition)&&(r=o.minPosition),S(o.maxPosition)&&(n=o.maxPosition));var l=s.start+(s.end-s.start)*(r-1e-4),u=s.start+(s.end-s.start)*(n+1e-4);e.disabled||(t<l||t>u?e.__disabled=!0:e.__disabled=!1)},i.prototype.createBreakSprites=function(e){},Object.defineProperty(i.prototype,"axisFills",{get:function(){if(!this._axisFills){var e=this.createFill(this.axis);this._axisFills=new Le(e),e.applyOnClones=!0,e.events.on("enabled",this.invalidateAxisItems,this,!1),this._disposers.push(new Pe(this._axisFills)),this._disposers.push(this._axisFills.template)}return this._axisFills},enumerable:!0,configurable:!0}),i.prototype.createFill=function(e){return new Ya(e)},Object.defineProperty(i.prototype,"grid",{get:function(){if(!this._grid){var e=this.createGrid();this._grid=new Le(e),e.applyOnClones=!0,e.events.on("enabled",this.invalidateAxisItems,this,!1),this._disposers.push(new Pe(this._grid)),this._disposers.push(this._grid.template)}return this._grid},enumerable:!0,configurable:!0}),i.prototype.createGrid=function(){return new qa},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 Le(e),this._disposers.push(new Pe(this._ticks)),this._disposers.push(this._ticks.template)}return this._ticks},enumerable:!0,configurable:!0}),i.prototype.createTick=function(){return new ju},Object.defineProperty(i.prototype,"labels",{get:function(){if(!this._labels){var e=this.createLabel();this._labels=new Le(e),e.applyOnClones=!0,e.events.on("enabled",this.invalidateAxisItems,this,!1),this._disposers.push(new Pe(this._labels)),this._disposers.push(this._labels.template)}return this._labels},enumerable:!0,configurable:!0}),i.prototype.createLabel=function(){return new ia},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){a.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){a.prototype.setVisibility.call(this,e),this.bulletsContainer.visible=e},i})(U);C.registeredClasses.AxisRenderer=Ga;var rl=(function(a){T(i,a);function i(){var e=a.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 i.prototype.draw=function(){a.prototype.draw.call(this);var e=this.pixelWidth,t=this.pixelHeight;if(e>0&&t>0){var r={x:0,y:0},n={x:e,y:0},s={x:e,y:t},o={x:0,y:t},l=Math.min(e,this.waveLength),u=Math.min(t,this.waveHeight),h=Math.min(t,this.waveLength),p=Math.min(e,this.waveHeight),d="",c="",f="",m="";this.wavedTop&&(d=wn(r,n,l,u,this.tension,!0)),this.wavedRight&&(c=wn(n,s,h,p,this.tension,!0)),this.wavedBottom&&(f=wn(s,o,l,u,this.tension,!0)),this.wavedLeft&&(m=wn(o,r,h,p,this.tension,!0)),this.path=W(r)+d+k(n)+c+k(s)+f+k(o)+m+"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,r,n){this.wavedTop=e,this.wavedRight=t,this.wavedBottom=r,this.wavedLeft=n},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})(Ea);var aa=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="AxisBullet",e.location=.5,e.isMeasured=!1,e.applyTheme(),e}return 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=a.prototype.setDisabled.call(this,e);return this.axis&&this.axis.invalidateDataItems(),t},i})(U);C.registeredClasses.AxisBullet=aa;var Ot=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="AxisRendererY",e.minGridDistance=40,e.opposite=!1,e.height=N(100),e.labels.template.verticalCenter="middle",e.applyTheme(),e}return i.prototype.setAxis=function(e){a.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 r=1-e,n=t.relativePositionSprite,s=t.pixelY;if(n?s=It({x:0,y:this.pixelY},this.parent,n).y:n=t.parent,n){var o=s/n.innerHeight,l=t.axisLength/n.innerHeight;return 1-(r-o)/l}}return e},i.prototype.processRenderer=function(){a.prototype.processRenderer.call(this);var e=this.axis;if(e){var t=e.title;t.valign="middle",e.height instanceof de||(e.height=N(100)),this.opposite?(t.rotation=90,this.line.toBack(),t.toFront()):(t.rotation=-90,t.toBack(),this.line.toFront())}},i.prototype.updateTooltip=function(){var e=this.axis;if(e){var t=2e3,r=0,n=0,s=t,o=this.axisLength;this.opposite?this.inside&&(r=-t,s=t):this.inside||(r=-t,s=t),this.axis.updateTooltip("horizontal",{x:r,y:n,width:s,height:o})}},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 r,n=this.axis,s=n.axisFullLength;return n.renderer.inversed?r=1-n.start-e/s:r=e/s+(1-n.end),E(r,5)},i.prototype.getPositionRangePath=function(e,t){var r=G(this.positionToCoordinate(e),0,this.axisLength),n=G(this.positionToCoordinate(t),0,this.axisLength),s=Math.abs(n-r),o=this.getWidth(),l=Math.min(r,n),u=0;return Zi({x:u,y:l,width:o,height:s},!0)},i.prototype.updateGridElement=function(e,t,r){t=t+(r-t)*e.location;var n=this.positionToPoint(t);e.path=W({x:0,y:0})+k({x:this.getWidth(),y:0}),this.positionItem(e,n),this.toggleVisibility(e,t,0,1)},i.prototype.updateTickElement=function(e,t,r){t=t+(r-t)*e.location;var n=this.positionToPoint(t),s=e.length;try{this.axis.title.measuredWidth}catch{}n.x=It({x:this.line.pixelX,y:0},this.line.parent,this.gridContainer).x,this.opposite?s*=e.inside?-1:1:s*=e.inside?1:-1,e.path=W({x:0,y:0})+k({x:s,y:0}),this.positionItem(e,n),this.toggleVisibility(e,t,0,1)},i.prototype.updateAxisLine=function(){this.line.path=W({x:0,y:0})+k({x:0,y:this.axisLength})},i.prototype.updateBaseGridElement=function(){a.prototype.updateBaseGridElement.call(this);var e=this.axis,t=this.getWidth(),r=this.axisLength,n=e.basePoint.y,s=this.baseGrid;if(n<-.2||n>r+.2)s.hide(0);else{var o=It({x:0,y:0},this.gridContainer,s.parent).x;s.path=W({x:0,y:0})+k({x:t,y:0}),s.moveTo({x:o,y:n}),s.show(0)}},i.prototype.updateLabelElement=function(e,t,r,n){P(n)||(n=e.location),t=t+(r-t)*n,e.isMeasured=!e.inside;var s=this.positionToPoint(t),o,l=0,u=this.gridContainer.maxWidth;this.opposite?(e.inside?(o="right",e.align=="left"&&(l=-u,o="left"),e.align=="center"&&(l=-u/2,o="middle")):o="left",s.x=0+l):(e.inside?(o="left",e.align=="right"&&(l=u,o="right"),e.align=="center"&&(l=u/2,o="middle")):o="right",s.x=this.measuredWidth+l),e.rotation==0&&(e.horizontalCenter=o),this.positionItem(e,s),this.toggleVisibility(e,t,this.minLabelPosition,this.maxLabelPosition)},i.prototype.updateBreakElement=function(e){a.prototype.updateBreakElement.call(this,e);var t=e.startLine,r=e.endLine,n=e.fillShape,s=e.startPoint,o=e.endPoint,l=e.pixelMarginLeft,u=this.getWidth()-e.pixelMarginLeft-e.pixelMarginRight;s.y=G(s.y,-1,this.axisLength+1),o.y=G(o.y,-1,this.axisLength+1),s.y==o.y&&(s.y<0||s.y>this.axisLength)?e.fillShape.__disabled=!0:e.fillShape.__disabled=!1;var h=Math.abs(u-l);t.x=l,t.height=0,t.width=h,r.x=l,r.height=0,r.width=h,n.width=h,n.height=Math.abs(o.y-s.y),n.x=l,n.y=o.y},i.prototype.createBreakSprites=function(e){e.startLine=new Dr,e.endLine=new Dr;var t=new rl;t.setWavedSides(!0,!1,!0,!1),e.fillShape=t},i.prototype.positionToCoordinate=function(e){var t,r=this.axis,n=r.axisFullLength;return r.renderer.inversed?t=(e-r.start)*n:t=(r.end-e)*n,t},i.prototype.updateBullet=function(e,t,r){var n=.5;e instanceof aa&&(n=e.location),t=t+(r-t)*n;var s=this.positionToPoint(t);s.x=It({x:this.line.pixelX,y:0},this.line.parent,this.gridContainer).x,this.positionItem(e,s),this.toggleVisibility(e,t,0,1)},i})(Ga);C.registeredClasses.AxisRendererY=Ot;ht.push({relevant:yt.widthS,state:function(a,i){if(a instanceof Ot){var e=a.states.create(i);return e.properties.inside=!0,e.properties.maxLabelPosition=.9,e.properties.minLabelPosition=.1,e}return null}});ht.push({relevant:yt.widthXS,state:function(a,i){if(a instanceof Ot){var e=a.states.create(i);return e.properties.disabled=!0,e}return null}});var Hs=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="ValueAxisBreak",e.applyTheme(),e}return 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})(Xa);C.registeredClasses.ValueAxisBreak=Hs;var Vr=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="ValueAxisDataItem",e.values.value={},e.values.endValue={},e.applyTheme(),e}return 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})(Sa);var re=(function(a){T(i,a);function i(){var e=a.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 i.prototype.fillRule=function(e){var t=e.value,r=e.component;e.axisFill.disabled||(E(t/r.step/2,5)==Math.round(t/r.step/2)?e.axisFill.__disabled=!0:e.axisFill.__disabled=!1)},i.prototype.createDataItem=function(){return new Vr},i.prototype.createAxisBreak=function(){return new Hs},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 r=e.endIndex;r<e.dataItems.length&&r++;for(var n=function(l){var u={},h={};s.series.each(function(p){if(!p.excludeFromTotal){var d=p.dataItems.getIndex(l);d&&te(d.values,function(c){var f=d.values[c].workingValue;S(f)&&(S(u[c])?u[c]+=Math.abs(f):u[c]=Math.abs(f),S(h[c])?h[c]+=f:h[c]=f)})}}),s.series.each(function(p){if(!p.excludeFromTotal){var d=p.dataItems.getIndex(l);d&&te(d.values,function(c){var f=d.values[c].workingValue;S(f)&&(d.setCalculatedValue(c,u[c],"total"),d.setCalculatedValue(c,100*f/u[c],"totalPercent"),d.setCalculatedValue(c,h[c],"sum"))})}})},s=this,o=t;o<r;++o)n(o)}}},i.prototype.validate=function(){this.axisLength<=0||(a.prototype.validate.call(this),this.getMinMax(),S(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(S(this.min)&&S(this.max)){var e=this.positionToValue(this.start),t=this.positionToValue(this.end),r=this.adjustDifference(e,t),n=this.adjustMinMax(e,t,r,this._gridCount,!0),s=ud(n.step);this._stepDecimalPlaces=s,e=E(e,s),t=E(t,s),n=this.adjustMinMax(e,t,r,this._gridCount,!0);var o=n.step;if(this.syncWithAxis){var l=this.getCache(e+"-"+t);S(l)&&(o=l)}else e=n.min,t=n.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(S(this.max)&&S(this.min)){var t=this.minZoomed-this._step*2;if(!this.logarithmic)t=Math.floor(t/this._step)*this._step;else{var r=Math.log(this.max)*Math.LOG10E-Math.log(this.min)*Math.LOG10E;r>1?t=Math.pow(10,Math.log(this.min)*Math.LOG10E):(t=Math.floor(this.minZoomed/this._step)*this._step,t==0&&(t=this.minZoomed))}var n=this._maxZoomed+this._step;this.resetIterators();var s=this._dataItemsIterator;if(this._step==0)return;this._step=this.fixSmallStep(this._step);var o=0,l=this._prevStepDecimalPlaces!=this._stepDecimalPlaces;for(this._prevStepDecimalPlaces=this._stepDecimalPlaces;t<=n;){var u=this.isInBreak(t);if(!u){var h=s.find(function(y){return y.value===t});h.__disabled&&(h.__disabled=!1),this.appendDataItem(h),h.axisBreak=void 0,(h.value!=t||l)&&(h.value=t,h.text=this.formatLabel(t),h.label&&h.label.invalid&&h.label.validate(),h.value>=this.min&&h.value<=this.max&&h.label&&(this.axisLetter=="Y"&&h.label.measuredWidth>this.ghostLabel.measuredWidth||this.axisLetter=="X"&&h.label.measuredHeight>this.ghostLabel.measuredHeight)&&(this.ghostLabel.text=h.label.currentText,this.ghostLabel.validate())),this.validateDataElement(h)}o++;var p=t;if(!this.logarithmic)t+=this._step;else{var r=Math.log(this.max)*Math.LOG10E-Math.log(this.min)*Math.LOG10E;r>1?t=Math.pow(10,Math.log(this.min)*Math.LOG10E+o):t+=this._step}var d=Math.pow(10,Math.floor(Math.log(Math.abs(this._step))*Math.LOG10E));if(d<1){var c=Math.round(Math.abs(Math.log(Math.abs(d))*Math.LOG10E))+2;if(c=Math.min(13,c),t=E(t,c),p==t){t=n;break}}}var f=this._axisBreaks;if(f){var m=this.renderer;I(f.iterator(),function(y){if(y.breakSize>0&&_e(y.startPoint,y.endPoint)>m.minGridDistance)for(var v=y.adjustedMin;v<=y.adjustedMax;){if(v>=y.adjustedStartValue&&v<=y.adjustedEndValue){var b=s.find(function(x){return x.value===v});b.__disabled&&(b.__disabled=!1),e.appendDataItem(b),b.axisBreak=y,b.value!=v&&(b.value=v,b.text=e.formatLabel(v),b.label&&b.label.invalid&&b.label.validate()),e.validateDataElement(b)}v+=y.adjustedStep}})}}},i.prototype.validateDataElement=function(e){a.prototype.validateDataElement.call(this,e),e.itemIndex=this._axisItemCount,this._axisItemCount++;var t=this.renderer,r=e.value,n=e.endValue,s=this.valueToPosition(r);e.position=s;var o=s,l=this.valueToPosition(r+this._step);S(n)&&(o=this.valueToPosition(n),l=o),e.point=t.positionToPoint(s);var u=e.tick;u&&!u.disabled&&t.updateTickElement(u,s,o);var h=e.grid;h&&!h.disabled&&t.updateGridElement(h,s,o);var p=e.label;p&&!p.disabled&&t.updateLabelElement(p,s,o);var d=e.axisFill;d&&!d.disabled&&(t.updateFillElement(d,s,l),e.isRange||this.fillRule(e)),e.bullet&&t.updateBullet(e.bullet,s,o);var c=e.mask;c&&t.updateFillElement(c,s,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),r=this.renderer.positionToPoint(t);return r},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),r=this.renderer.positionToPoint(t),n=this.renderer.positionToAngle(t);return{x:r.x,y:r.y,angle:n}},i.prototype.anyToPoint=function(e){return this.valueToPoint(e)},i.prototype.valueToPosition=function(e){if(S(e)){var t=this.min,r=this.max;if(S(t)&&S(r)){var n=this._difference,s=this._axisBreaks;s&&s.length>0&&Dt(s.iterator(),function(u){var h=u.adjustedStartValue,p=u.adjustedEndValue;if(S(h)&&S(p)){if(e<h)return!1;if(ms({start:h,end:p},{start:t,end:r})){h=Math.max(h,t),p=Math.min(p,r);var d=u.breakSize;e>p?t+=(p-h)*(1-d):e<h||(e=h+(e-h)*d)}}return!0});var o=void 0;if(!this.logarithmic)o=(e-t)/n;else{var l=this.treatZeroAs;S(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)}return o}}return 0},i.prototype.invalidateLabels=function(){a.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,r=this.max;if(S(t)&&S(r)){var n=r-t,s=null,o=this._axisBreaks;return o&&o.length>0&&Dt(o.iterator(),function(l){var u=l.startPosition,h=l.endPosition,p=l.adjustedStartValue,d=l.adjustedEndValue;if(S(p)&&S(d)){if(p>r)return!1;if(ms({start:p,end:d},{start:t,end:r})){p=he(p,t),d=ye(d,r);var c=l.breakSize;if(n-=(d-p)*(1-c),e>h)t+=(d-p)*(1-c);else if(!(e<u)){var f=(e-u)/(h-u);return s=p+f*(d-p),!1}}return!0}}),S(s)||(this.logarithmic?s=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):s=e*n+t),s}},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 Ot?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,r=Number.NEGATIVE_INFINITY;if((!S(this._minDefined)||!S(this._maxDefined))&&(this.series.each(function(d){if(!d.ignoreMinMax){var c=d.min(e);S(c)&&c<t&&(t=c);var f=d.max(e);S(f)&&f>r&&(r=f)}}),this.includeRangesInMinMax&&this.axisRanges.each(function(d){if(!d.ignoreMinMax){var c=ye(d.value,d.endValue),f=he(d.value,d.endValue);(c<t||!S(t))&&(t=c),(f>r||!S(r))&&(r=f)}})),this.logarithmic){var n=this.treatZeroAs;S(n)&&t<=0&&(t=n),t<=0&&this.raiseCriticalError(new Error("Logarithmic value axis can not have values <= 0."),!0)}if(t==0&&r==0&&(r=.9,t=-.9),S(this._minDefined)&&(t=this._minDefined),S(this._maxDefined)&&(r=this._maxDefined),this._adapterO&&(t=this._adapterO.apply("min",t)),this._adapterO&&(r=this._adapterO.apply("max",r)),!(!S(t)||!S(r))){this._minReal=t,this._maxReal=r,t==Number.POSITIVE_INFINITY&&(t=void 0),r==Number.NEGATIVE_INFINITY&&(r=void 0);var s=this.adjustDifference(t,r);if(t=this.fixMin(t),r=this.fixMax(r),r-t<=1/Math.pow(10,15)){if(r-t!=0)this._deltaMinMax=(r-t)/2;else{var o=Math.log(Math.abs(r))*Math.LOG10E,l=Math.pow(10,Math.floor(o));l=l/10,this._deltaMinMax=l}t-=this._deltaMinMax,r+=this._deltaMinMax}t-=(r-t)*this.extraMin,r+=(r-t)*this.extraMax;var u=this.strictMinMax;S(this._maxDefined)&&(u=!0);var h=this.adjustMinMax(t,r,s,this._gridCount,u);if(t=h.min,r=h.max,s=r-t,h=this.adjustMinMax(t,r,r-t,this._gridCount,!0),t=h.min,r=h.max,this.strictMinMax&&(S(this._minDefined)?t=this._minDefined:t=this._minReal,S(this._maxDefined)?r=this._maxDefined:r=this._maxReal,r-t<=1e-8&&(t-=this._deltaMinMax,r+=this._deltaMinMax),t-=(r-t)*this.extraMin,r+=(r-t)*this.extraMax),this._adapterO&&(t=this._adapterO.apply("min",t)),this._adapterO&&(r=this._adapterO.apply("max",r)),this._step=h.step,!S(t)&&!S(r)&&(this.start=0,this.end=1,this.renderer.labels.each(function(d){d.dataItem.text=""})),(this._minAdjusted!=t||this._maxAdjusted!=r)&&S(t)&&S(r)){var p=this._minMaxAnimation;if(this._extremesChanged&&S(this._minAdjusted)&&S(this._maxAdjusted)&&this.inited){if(p&&!p.isFinished()&&this._finalMax==r&&this._finalMin==t)return;this._finalMin=t,this._finalMax=r,p=this.animateMinMax(t,r),p&&!p.isFinished()?(p.events.on("animationprogress",this.validateDataItems,this),p.events.on("animationended",function(){e.series.each(function(d){d.validate()}),e.validateDataItems(),e.handleSelectionExtremesChange()}),this._minMaxAnimation=p):this.series.each(function(d){d.invalidate()}),this.validateDataItems(),this.dispatchImmediately("extremeschanged"),this.handleSelectionExtremesChange()}else{if(p&&!p.isFinished()&&this._finalMax==r&&this._finalMin==t)return;this._minAdjusted=t,this._maxAdjusted=r,this._finalMin=t,this._finalMax=r,this.invalidateDataItems(),this.dispatchImmediately("extremeschanged"),this._saveMinMax(t,r)}}this._extremesChanged=!1,this._difference=this.adjustDifference(t,r)}},i.prototype.fixMin=function(e){return e},i.prototype.fixMax=function(e){return e},i.prototype.adjustMinMax=function(e,t,r,n,s){n<=1&&(n=1),n=Math.round(n);var o=e,l=t;r===0&&(r=Math.abs(t));var u=Math.log(Math.abs(r))*Math.LOG10E,h=Math.pow(10,Math.floor(u));h=h/10;var p=h;s&&(p=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:e=e,this._maxDefined>0&&(t=t)):(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)))):(s?(e=Math.floor(e/h)*h,t=Math.ceil(t/h)*h):(e=Math.ceil(e/h)*h-p,t=Math.floor(t/h)*h+p),e<0&&o>=0&&(e=0),t>0&&l<=0&&(t=0)),u=Math.log(Math.abs(r))*Math.LOG10E,h=Math.pow(10,Math.floor(u)),h=h/10;var d=Math.ceil(r/n/h)*h,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!=Vp(d,this.maxPrecision)&&(d=Vp(d,this.maxPrecision));var m=0;if(c<1&&(m=Math.round(Math.abs(Math.log(Math.abs(c))*Math.LOG10E))+1,d=E(d,m)),!this.logarithmic){var y=Math.floor(e/d);e=E(d*y,m);var v=void 0;s?v=Math.floor(t/d):v=Math.ceil(t/d),v==y&&v++,t=E(d*v,m),t<l&&(t=t+d),e>o&&(e=e-d)}return{min:e,max:t,step:d}},Object.defineProperty(i.prototype,"min",{get:function(){var e=this._minAdjusted;return S(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 S(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 Fe([a.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=this,t,r,n=!0;if(I(this.series.iterator(),function(c){if(!c.ignoreMinMax&&!c.isHidden&&!c.outOfRange){c.visible&&!c.isHiding&&(n=!1);var f=c.selectionMin(e),m=c.selectionMax(e);S(f)&&(!S(t)||f<t)&&(t=f),S(m)&&(!S(r)||m>r)&&(r=m)}}),this.includeRangesInMinMax&&this.axisRanges.each(function(c){if(!c.ignoreMinMax){var f=ye(c.value,c.endValue),m=he(c.value,c.endValue);f<t&&(t=f),m>r&&(r=m)}}),S(this._minDefined)?this.strictMinMax?t=this._minDefined:t=this.min:this.strictMinMax&&(t=this._minReal),S(this._maxDefined)?this.strictMinMax?r=this._maxDefined:r=this.max:this.strictMinMax&&(r=this._maxReal),t==r){t-=this._deltaMinMax,r+=this._deltaMinMax;var s=this.adjustMinMax(t,r,0,this._gridCount,this.strictMinMax);t=s.min,r=s.max}var o=this.adjustDifference(t,r),l=this.adjustMinMax(t,r,o,this._gridCount);t=l.min,r=l.max,t-=(r-t)*this.extraMin,r+=(r-t)*this.extraMax,t=G(t,this.min,this.max),r=G(r,this.min,this.max),o=this.adjustDifference(t,r),l=this.adjustMinMax(t,r,o,this._gridCount,!0),t=l.min,r=l.max,this.strictMinMax&&(t=he(t,this._minDefined),r=ye(r,this._maxDefined));var u=l.step;this.syncWithAxis&&(l=this.syncAxes(t,r,u),t=l.min,r=l.max,this.invalidate()),u=l.step,this._difference=this.adjustDifference(this.min,this.max);var h=this.valueToPosition(t),p=this.valueToPosition(r);n&&!this.syncWithAxis&&(h=0,p=1);var d=0;this.syncWithAxis?(d=5,this.setCache(t+"-"+r,u)):((this._step!=u||this._minZoomed!=t||this._maxZoomed!=r)&&(this._dsc=!0),this._step=u,this._minZoomed=t,this._maxZoomed=r),this.keepSelection||this.zoom({start:h,end:p},!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;if(this._extremesChanged=!0,this.getMinMax(),this.ghostLabel){var t=0;this.dataItems.each(function(r){r.label&&r.label.pixelWidth>t&&(e.ghostLabel.text=r.label.currentText)})}},i.prototype.getX=function(e,t,r,n,s){return this.renderer.positionToPoint(this.getPositionX(e,t,r,n,s)).x},i.prototype.getPositionX=function(e,t,r,n,s){var o=e.getWorkingValue(t);P(n)||(n="valueX");var l=e.getValue(n,"stack");S(o)||(o=this.baseValue,this.logarithmic&&l>0&&(o=0));var u=this.valueToPosition(o+l);return s&&(u=G(u,s.start,s.end)),u},i.prototype.getY=function(e,t,r,n,s){return this.renderer.positionToPoint(this.getPositionY(e,t,r,n,s)).y},i.prototype.getPositionY=function(e,t,r,n,s){var o=e.getWorkingValue(t);P(n)||(n="valueY");var l=e.getValue(n,"stack");S(o)||(o=this.baseValue,this.logarithmic&&l>0&&(o=0));var u=this.valueToPosition(o+l);return s&&(u=G(u,s.start,s.end)),u},i.prototype.getAngle=function(e,t,r,n,s){var o=e.getWorkingValue(t),l=e.getValue(n,"stack");S(o)||(o=this.baseValue);var u=this.valueToPosition(o+l);return s&&(u=G(u,s.start,s.end)),this.positionToAngle(u)},i.prototype.getAnyRangePath=function(e,t,r){var n=this.valueToPosition(e),s=this.valueToPosition(t);return this.getPositionRangePath(n,s)},i.prototype.getTooltipText=function(e){var t=E(this.positionToValue(e),this._stepDecimalPlaces+this.extraTooltipPrecision),r=this.tooltip.numberFormatter.format(t);return this._adapterO?this._adapterO.apply("getTooltipText",r):r},i.prototype.zoomToValues=function(e,t,r,n){var s=(e-this.min)/(this.max-this.min),o=(t-this.min)/(this.max-this.min);this.zoom({start:s,end:o},r,n)},Object.defineProperty(i.prototype,"minZoomed",{get:function(){return this.syncWithAxis?this._minZoomed:he(this.min,this._minZoomed)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxZoomed",{get:function(){return this.syncWithAxis?this._maxZoomed:ye(this.max,this._maxZoomed)},enumerable:!0,configurable:!0}),i.prototype.fixAxisBreaks=function(){var e=this;a.prototype.fixAxisBreaks.call(this);var t=this._axisBreaks;t&&t.length>0&&t.each(function(r){var n=r.adjustedStartValue,s=r.adjustedEndValue,o=s-n,l=Math.ceil(o*r.breakSize)*e._gridCount/(e.max-e.min),u=e.adjustMinMax(n,s,o,l,!0);r.adjustedStep=u.step,r.adjustedMin=u.min,r.adjustedMax=u.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){a.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(C.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,r){var n=this.syncWithAxis;if(n){S(e)||(e=this.min),S(t)||(t=this.max),S(r)||(r=this._step);var s=Math.round((n.maxZoomed-n.minZoomed)/n.step),o=Math.round((t-e)/r);if(S(s)&&S(o))for(var l=!1,u=0,h=(t-e)*.01,p=e,d=t,c=r;l!=!0;)if(l=this.checkSync(p,d,c,s),u++,u>1e3&&(l=!0),l)e=p,t=d,r=c;else{u/3==Math.round(u/3)?(p=e-h*u,e>=0&&p<0&&(p=0)):(d=t+h*u,d<=0&&d>0&&(d=0));var f=this.adjustMinMax(p,d,d-p,this._gridCount,!0);p=f.min,d=f.max,c=f.step}}return{min:e,max:t,step:r}},i.prototype.checkSync=function(e,t,r,n){for(var s=(t-e)/r,o=1;o<n;o++)if(E(s/o,1)==n||s*o==n)return!0;return!1},i.prototype.processConfig=function(e){e&&P(e.syncWithAxis)&&ce(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)),a.prototype.processConfig.call(this,e)},i.prototype._saveMinMax=function(e,t){},i})(Fn);C.registeredClasses.ValueAxis=re;C.registeredClasses.ValueAxisDataItem=Vr;var Wd=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="Grip";var t=new se;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 r=new ee;r.element=e.paper.add("path");var n=W({x:-6,y:0});return n+=k({x:6,y:0}),n+=W({x:-8,y:-6}),n+=k({x:0,y:-12}),n+=k({x:8,y:-6}),n+=W({x:-8,y:6}),n+=k({x:0,y:12}),n+=k({x:8,y:6}),r.path=n,r.strokeWidth=2,r.fillOpacity=0,r.pixelPerfect=!0,r.padding(0,4,0,4),r.stroke=t.getFor("text"),r.strokeOpacity=.7,r.align="center",r.valign="middle",e.icon=r,e.label.dispose(),e.label=void 0,e.position="right",e.autoHideDelay=3e3,e.events.on("shown",function(s){e._autoHideTimeout&&e._autoHideTimeout.dispose(),e.autoHideDelay&&(e._autoHideTimeout=e.setTimeout(function(){e.hide()},e.autoHideDelay))}),e.events.on("down",function(s){e._autoHideTimeout&&e._autoHideTimeout.dispose()}),e.events.on("out",function(s){e.autoHideDelay&&(e._autoHideTimeout=e.setTimeout(function(){e.hide()},e.autoHideDelay))}),e.applyTheme(),e}return 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=N(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=N(30);break;case"top":this.align="center",this.valign="top",this.horizontalCenter="middle",this.verticalCenter="top",this.icon.rotation=90,this.width=N(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=N(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=N(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})(Pi);C.registeredClasses.Grip=Wd;var al=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="ChartDataItem",e.applyTheme(),e}return i})(Wi);var na=(function(a){T(i,a);function i(){var e=a.call(this)||this;if(e._legend=new Ue,e.constructor===i)throw new Error("'Chart' cannot be instantiated directly. Please use a specific chart type.");e.className="Chart";var t=new lt;e.titles=new Le(t),e._disposers.push(new Pe(e.titles)),e._disposers.push(t),e.width=N(100),e.height=N(100),e.layout="vertical";var r=e.createChild(U);r.shouldClone=!1,r.layout="vertical",r.width=N(100),r.height=N(100),e.chartAndLegendContainer=r;var n=r.createChild(U);return n.shouldClone=!1,n.width=N(100),n.height=N(100),e.chartContainer=n,e.showOnInit=!0,e._disposers.push(e._legend),e.titles.events.on("inserted",function(s){e.processTitle(s),e.updateReaderTitleReferences()},e,!1),e.titles.events.on("removed",function(s){e.updateReaderTitleReferences()},e,!1),e.role="region",e.defaultState.transitionDuration=1,e.applyTheme(),e}return i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Chart"))},i.prototype.draw=function(){this.fixLayout(),a.prototype.draw.call(this)},i.prototype.fixLayout=function(){var e=this.legend;if(e){var t=this.chartAndLegendContainer,r=this.chartContainer;switch(r.x=void 0,r.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;break}}},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=[];I(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(r){r.property=="position"&&t.fixLayout()},void 0,!1)),e.addDisposer(new Ce(function(){t.legend=void 0}))):this._legend.reset(),this.feedLegend())},i.prototype.dispose=function(){this.legend&&this.legend.dispose(),a.prototype.dispose.call(this)},i.prototype.processConfig=function(e){e&&P(e.legend)&&!P(e.legend.type)&&(e.legend.type="Legend"),a.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()),a.prototype.copyFrom.call(this,e)},Object.defineProperty(i.prototype,"dragGrip",{get:function(){var e=this;if(!this._dragGrip){var t=this.tooltipContainer.createChild(Wd);t.align="right",t.valign="middle",t.hide(0),t.events.on("down",function(r){r.touch&&(e.interactionsEnabled=!1)}),t.events.on("up",function(r){e.interactionsEnabled=!0}),this.events.on("down",function(r){r.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})(Hi);C.registeredClasses.Chart=na;ht.push({relevant:yt.widthXS,state:function(a,i){if(a instanceof na){var e=a.states.create(i);return a.pixelPaddingLeft>10&&(e.properties.paddingLeft=10),a.pixelPaddingRight>10&&(e.properties.paddingRight=10),e}return null}});ht.push({relevant:yt.heightXS,state:function(a,i){if(a instanceof na){var e=a.states.create(i);return a.pixelPaddingTop>10&&(e.properties.paddingTop=10),a.pixelPaddingBottom>10&&(e.properties.paddingBottom=10),e}return null}});ht.push({relevant:yt.widthXXS,state:function(a,i){if(a instanceof na){var e=a.states.create(i);return e.properties.paddingLeft=0,e.properties.paddingRight=0,e}return null}});ht.push({relevant:yt.heightXXS,state:function(a,i){if(a instanceof na){var e=a.states.create(i);return e.properties.paddingTop=0,e.properties.paddingBottom=0,e}return null}});var ui=(function(a){T(i,a);function i(){var e=a.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 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})(U);C.registeredClasses.Bullet=ui;ht.push({relevant:yt.isXS,state:function(a,i){if(a instanceof ui){var e=a.states.create(i);return e.properties.disabled=!0,e}return null}});var Dn=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="SeriesDataItem",e.values.value={},e.values.value={},e.applyTheme(),e}return Object.defineProperty(i.prototype,"bullets",{get:function(){return this._bullets||(this._bullets=new Oe,this._disposers.push(new Bi(this._bullets))),this._bullets},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this.bullets.clear(),a.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})(Wi);var Lr=(function(a){T(i,a);function i(){var e=a.call(this)||this;if(e._ignoreMinMax=!1,e._showBullets=!0,e.legendSettings=new il,e._tmin=new Oe,e._tmax=new Oe,e._smin=new Oe,e._smax=new Oe,e.dataItemsByAxis=new Oe,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 ve,e.axisRanges.events.on("inserted",e.processAxisRange,e,!1),e.minBulletDistance=0,e.mainContainer=e.createChild(U),e.mainContainer.shouldClone=!1,e.mainContainer.mask=e.createChild(ee),e._disposers.push(e.mainContainer);var t=e.mainContainer.createChild(U);return e._shouldBeReady.push(t),t.shouldClone=!1,t.layout="none",t.virtualParent=e,e._disposers.push(t),e.bulletsContainer=t,e.tooltip=new Ar,e.tooltip.virtualParent=e,e._disposers.push(e.tooltip),e.hiddenState.transitionEasing=cd,e.dataItem=e.createDataItem(),e._disposers.push(e.dataItem),e.dataItem.component=e,e.role="group",e.applyTheme(),e}return i.prototype.applyTheme=function(){a.prototype.applyTheme.call(this),ge.autoSetClassName&&this.bulletsContainer&&(this.bulletsContainer.className=this.className+"-bullets",this.bulletsContainer.setClassName())},i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Series"))},i.prototype.createDataItem=function(){return new Dn},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,r=e.newValue;r.isTemplate=!0,this.events.once("datavalidated",function(n){t.itemsFocusable()&&(r.focusable=!0)}),this.invalidate()},i.prototype.removeBullet=function(e){var t=e.oldValue;this.dataItems.each(function(r){var n=r.bullets.getKey(t.uid);n&&n.dispose()}),this.invalidate()},i.prototype.validateDataItems=function(){a.prototype.validateDataItems.call(this),this.processValues(!1)},i.prototype.getFirstValue=function(e,t){for(var r=t;r>=0;r--){var n=this.dataItems.getIndex(r),s=n.getActualWorkingValue(e);if(S(s))return s}return null},i.prototype.getAbsoluteFirstValue=function(e){for(var t=0;t<this.dataItems.length;t++){var r=this.dataItems.getIndex(t),n=r.values[e].value;if(S(n))return n}return null},i.prototype.rangeChangeUpdate=function(){a.prototype.rangeChangeUpdate.call(this),this.processValues(!0)},i.prototype.processValues=function(e){var t=this;if(!this.simplifiedProcessing){var r=this.dataItems,n={},s={},o={},l={},u={},h={},p={},d={},c={},f={},m=he(0,this.startIndex);m=ye(m,this.dataItems.length);var y=ye(this.endIndex,this.dataItems.length);if(S(m)||(m=0),S(y)||(y=this.dataItems.length),m>0){var v=r.getIndex(m-1);te(v.values,function(F,w){var D=v.getActualWorkingValue(F);S(D)&&(d[F]=D)})}for(var b=function(F){var w=r.getIndex(F);te(w.values,function(D,B){var L=w.getActualWorkingValue(D);if(S(L)){S(n[D])||(n[D]=0),n[D]++,S(s[D])||(s[D]=0),s[D]+=L,S(o[D])||(o[D]=0),o[D]+=Math.abs(L),S(h[D])||(h[D]=L),p[D]=L,S(l[D])?l[D]>L&&(l[D]=L):l[D]=L,S(u[D])?u[D]<L&&(u[D]=L):u[D]=L,S(c[D])||(c[D]=t.getFirstValue(D,m)),S(f[D])||(f[D]=t.getAbsoluteFirstValue(D)),w.setCalculatedValue(D,L-c[D],"change"),w.setCalculatedValue(D,(L-c[D])/c[D]*100,"changePercent"),w.setCalculatedValue(D,L-f[D],"startChange"),w.setCalculatedValue(D,(L-f[D])/f[D]*100,"startChangePercent");var M=d[D];S(M)||(M=L),w.setCalculatedValue(D,L-M,"previousChange"),w.setCalculatedValue(D,(L-M)/M*100,"previousChangePercent"),d[D]=L}})},x=m;x<y;x++)b(x);if(this.calculatePercent)for(var _=function(F){var w=r.getIndex(F);te(w.values,function(D){var B=o[D],L=w.getActualWorkingValue(D);if(S(L))if(B>0){t.usePercentHack&&L==B&&(B=w.values[D].value);var M=L/B*100;w.setCalculatedValue(D,M,"percent")}else w.setCalculatedValue(D,0,"percent")})},x=m;x<y;x++)_(x);if(m>0){var $=r.getIndex(m-1);te($.values,function(F){var w=$.values[F].value;$.setCalculatedValue(F,w-h[F],"change"),$.setCalculatedValue(F,(w-h[F])/h[F]*100,"changePercent")})}var O=this.dataItem;te(O.values,function(F){O.setCalculatedValue(F,s[F],"sum"),O.setCalculatedValue(F,o[F],"absoluteSum"),O.setCalculatedValue(F,s[F]/n[F],"average"),O.setCalculatedValue(F,h[F],"open"),O.setCalculatedValue(F,p[F],"close"),O.setCalculatedValue(F,l[F],"low"),O.setCalculatedValue(F,u[F],"high"),O.setCalculatedValue(F,n[F],"count")})}},i.prototype.validate=function(){Qr()&&this.filters.clear(),I(this.axisRanges.iterator(),function(n){n.validate()}),a.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++){var r=this.dataItems.getIndex(t);r&&r.bullets.each(function(n,s){s.__disabled=!0})}for(var t=this.dataItems.length-1;t>this.endIndex;t--){var r=this.dataItems.getIndex(t);r&&r.bullets.each(function(o,l){l.__disabled=!0})}}else this.bulletsContainer.children.each(function(n){n.__disabled=!0});this.updateTooltipBounds()},i.prototype.updateTooltipBounds=function(){if(this.topParent){var e=0,t=0,r=this.topParent.maxWidth,n=this.topParent.maxHeight,s={x:e,y:t,width:r,height:n};this.tooltip.setBounds(s)}},i.prototype.shouldCreateBullet=function(e,t){return!0},i.prototype.validateDataElement=function(e){var t=this;a.prototype.validateDataElement.call(this,e),this._showBullets?(this.isHidden||(this.bulletsContainer.visible=!0),this.bullets.each(function(r){var n=e.bullets.getKey(r.uid);if(t.shouldCreateBullet(e,r)){if(!n){var s=r.propertyFields.disabled,o=e.dataContext;s&&o&&o[s]===!1?(r.applyOnClones=!1,r.disabled=!1,n=r.clone(),r.disabled=!0,r.applyOnClones=!0):n=r.clone(),n.shouldClone=!1,e.addSprite(n),(!t.visible||t.isHiding)&&n.hide(0)}var l=n.dataItem;if(l!=e){l&&l.bullets.setKey(r.uid,void 0);var u=t.itemReaderText;n instanceof ui&&(u||(u="{"+n.xField+"}: {"+n.yField+"}"),n.isDynamic&&(e.events.on("workingvaluechanged",n.deepInvalidate,n,!1),t.dataItem.events.on("workingvaluechanged",n.deepInvalidate,n,!1)),n.deepInvalidate()),n.focusable&&(n.events.on("focus",function(h){n.readerTitle=t.populateString(u,n.dataItem)},void 0,!1),n.events.on("blur",function(h){n.readerTitle=""},void 0,!1)),n.hoverable&&(n.events.on("over",function(h){n.readerTitle=t.populateString(u,n.dataItem)},void 0,!1),n.events.on("out",function(h){n.readerTitle=""},void 0,!1))}n.parent=t.bulletsContainer,e.bullets.setKey(r.uid,n),n.maxWidth=e.itemWidth,n.maxHeight=e.itemHeight,n.__disabled=!1,t.positionBullet(n)}else n&&(n.__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(U),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 Le(new ui),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 Pe(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=Fs(this.tooltipText):this.tooltipHTML&&(e=Fs(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 r=this.legendSettings,n=this.legendDataItem,s=n.label,o=n.valueLabel;e&&!e.isDisposed()||t?(o&&(r.itemValueText&&(o.text=r.itemValueText),o.dataItem=e),s&&(r.itemLabelText&&(s.text=r.itemLabelText),s.dataItem=e)):(s&&((r.labelText||r.itemLabelText!=null)&&(s.text=r.labelText),s.dataItem=this.dataItem),o&&((r.valueText||r.itemValueText!=null)&&(o.text=r.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,a.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,ge.suppressErrors||this._chart.modal.open(),this._chart.disabled=!0),ge.verbose&&console.log(e)},i.prototype.applyFilters=function(){var e=this;a.prototype.applyFilters.call(this),this.bulletsContainer.filters.clear(),I(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 ve,this._heatRules.events.on("inserted",function(t){var r=t.newValue,n=r.target;if(n){var s=r.dataField;P(s)||(s="value");var o=e.dataItem,l=r.property,u=ke(r.minValue),h=ke(r.maxValue);!S(u)&&!S(h)&&e.dataItem.events.on("calculatedvaluechanged",function(p){p.property==s&&I(e.dataItems.iterator(),function(d){var c=!1;H(d.sprites,function(f){if(f.clonedFrom==n){var m=f;m[l]=m[l],c=!0}}),c||H(d.sprites,function(f){f instanceof U&&I(f.children.iterator(),function(m){if(m.className==n.className){var y=m;y[l]=y[l]}else m instanceof U&&m.deepInvalidate()})})})}),e.dataItems.template.events.on("workingvaluechanged",function(p){if(p.property==s){var d=p.target,c=!1;H(d.sprites,function(f){if(f.clonedFrom==n){var m=f;m[l]=m[l],c=!0}}),c||H(d.sprites,function(f){f instanceof U&&I(f.children.iterator(),function(m){if(m.className==n.className){var y=m;y[l]=y[l]}else m instanceof U&&m.deepInvalidate()})})}}),n.adapter.add(l,function(p,d,c){var f=ke(r.minValue),m=ke(r.maxValue),y=r.min,v=r.max;if(d instanceof ee){var b=d,x=b.propertyFields[c];if(x&&d.dataItem){var _=d.dataItem.dataContext;if(_&&P(_[x]))return p}}var $=d.dataItem;if(S(f)||(f=o.values[s].low),S(m)||(m=o.values[s].high),$){var O=$.values[s];if(O){var F=$.getActualWorkingValue(s);if(P(y)&&P(v)&&S(f)&&S(m)&&S(F)){var w=void 0;if(r.logarithmic?w=(Math.log(F)*Math.LOG10E-Math.log(f)*Math.LOG10E)/(Math.log(m)*Math.LOG10E-Math.log(f)*Math.LOG10E):w=(F-f)/(m-f),S(F)&&(!S(w)||Math.abs(w)==1/0)&&(w=.5),S(y))return y+(v-y)*w;if(y instanceof be)return new be(mn(y.rgb,v.rgb,w))}}}return p})}})),this._heatRules},enumerable:!0,configurable:!0}),i.prototype.processConfig=function(e){var t;if(e){if(P(e.bullets)&&Xe(e.bullets))for(var r=0,n=e.bullets.length;r<n;r++){var s=e.bullets[r];P(s.type)||(s.type="Bullet")}P(e.heatRules)&&Xe(e.heatRules)&&(t=e.heatRules,delete e.heatRules)}if(a.prototype.processConfig.call(this,e),t){for(var r=0,n=t.length;r<n;r++){var o=t[r],l=this;if(P(o.target)&&ce(o.target))if(this.map.hasKey(o.target))l=this.map.getKey(o.target);else for(var u=o.target.split("."),h=0;h<u.length;h++)if(l instanceof ve){var p=l.getIndex(ke(u[h]));p?l=p:l=l[u[h]]}else{var d=u[h].match(/^(.*)\[([0-9]+)\]/);d?l[d[1]]instanceof ve?l=l[d[1]].getIndex(ke(d[2])):l=l[d[1]][ke(d[2])]:l=l[u[h]]}o.target=l,P(o.min)&&(o.min=this.maybeColorOrPercent(o.min)),P(o.max)&&(o.max=this.maybeColorOrPercent(o.max))}a.prototype.processConfig.call(this,{heatRules:t})}},i.prototype.configOrder=function(e,t){return e==t?0:e=="heatRules"?1:t=="heatRules"?-1:a.prototype.configOrder.call(this,e,t)},i.prototype.setVisibility=function(e){a.prototype.setVisibility.call(this,e),this.bulletsContainer.visible=e},i})(Hi);C.registeredClasses.Series=Lr;C.registeredClasses.SeriesDataItem=Dn;var sa=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e._list=[],e._currentStep=0,e._startIndex=0,e._currentPass=0,e.baseColor=new be({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 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(he(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=this.currentColor,r=Ao(ze(t.rgb)),n=P(this.stepOptions.hue)?this.stepOptions.hue:1/e,s={brighten:0,lighten:0,hue:r.h,lightness:r.l,saturation:r.s},o=[],l=this.list.length==0?0:1;if(this.reuse)for(var u=l;u<=e;u++)o.push(Ao(ze(this._list[u].rgb)).h);else for(var u=l;u<=e;u++){var h=r.h+n*u;this.wrap&&h>1&&(h-=1),o.push(h)}this.shuffle&&o.sort(function(f,m){return Math.random()-.5});for(var u=0;u<e;u++){this.reuse?r=Ao(ze(this._list[u].rgb)):r.h=o.shift(),this.applyStepOptions(r,s,u,this._currentPass);var p=ie(Xp(r)),d=(this.stepOptions.brighten||0)*u+(this.passOptions.brighten||0)*this._currentPass;d!=0&&(this.wrap?d=jo(d,this.minLightness,this.maxLightness):d=Bo(d,this.minLightness,this.maxLightness),p=p.brighten(d));var c=(this.stepOptions.lighten||0)*u+(this.passOptions.lighten||0)*this._currentPass;c!=0&&(this.wrap?c=jo(c,this.minLightness,this.maxLightness):c=Bo(c,this.minLightness,this.maxLightness),p=p.lighten(c)),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,r,n){e.l=t.lightness+(this.stepOptions.lightness||0)*r+(this.passOptions.lightness||0)*n,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=jo(e.l,this.minLightness,this.maxLightness)):(e.l>1?e.l=1:e.l<0&&(e.l=0),e.l=Bo(e.l,this.minLightness,this.maxLightness))},i.prototype.processConfig=function(e){if(e){if(P(e.list)&&Xe(e.list))for(var t=0,r=e.list.length;t<r;t++)e.list[t]instanceof be||(e.list[t]=ie(e.list[t]));P(e.baseColor)&&!(e.baseColor instanceof be)&&(e.baseColor=ie(e.baseColor))}a.prototype.processConfig.call(this,e)},i})(st);C.registeredClasses.ColorSet=sa;var nl=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="SerialChartDataItem",e.applyTheme(),e}return i})(al);var Ca=(function(a){T(i,a);function i(){var e=a.call(this)||this;e._exitDP={},e.className="SerialChart",e.colors=new sa,e._usesData=!1;var t=e.chartContainer.createChild(U);t.shouldClone=!1,t.width=N(100),t.height=N(100),t.isMeasured=!1,t.layout="none",t.zIndex=2,e.seriesContainer=t;var r=e.chartContainer.createChild(U);return r.shouldClone=!1,r.width=N(100),r.height=N(100),r.isMeasured=!1,r.zIndex=3,r.layout="none",e.bulletsContainer=r,e.applyTheme(),e}return i.prototype.dispose=function(){a.prototype.dispose.call(this),this.colors&&this.colors.dispose(),this.patterns&&this.patterns.dispose()},i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Serial chart"))},Object.defineProperty(i.prototype,"series",{get:function(){return this._series||(this._series=new Le(this.createSeries()),this._series.events.on("inserted",this.handleSeriesAdded,this,!1),this._series.events.on("removed",this.handleSeriesRemoved,this,!1),this._disposers.push(new Pe(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(u){u.invalidateDataItems()}),this._exitDP[t.uid]&&(this._exitDP[t.uid].dispose(),delete this._exitDP[t.uid]),t.autoDispose?t.dispose():(t.parent=void 0,t.bulletsContainer.parent=void 0);var r=this.legend;if(r){for(var n=this.legend.dataItems,s=n.length-1;s>=0;s--){var o=n.getIndex(s);o&&o.dataContext==t&&r.dataItems.remove(o)}for(var s=r.data.length-1;s>=0;s--){var l=r.data[s];l&&l==t&&oe(r.data,l)}}},i.prototype.handleSeriesAdded=function(e){var t=this,r=e.newValue;r.isDisposed()||(r.chart=this,r.parent=this.seriesContainer,r.bulletsContainer.parent=this.bulletsContainer,this._dataUsers.moveValue(r),r.addDisposer(new Ce(function(){t.dataUsers.removeValue(r)})),this.handleSeriesAdded2(r),this.handleLegendSeriesAdded(r))},i.prototype.handleLegendSeriesAdded=function(e){e.hiddenInLegend||this.legend&&this.legend.addData(e)},i.prototype.handleSeriesAdded2=function(e){var t=this;this.dataInvalid||(this._exitDP[e.uid]=C.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=[])}))}),this._disposers.push(this._exitDP[e.uid]))},i.prototype.feedLegend=function(){var e=this.legend;if(e){var t=[];I(this.series.iterator(),function(r){r.hiddenInLegend||t.push(r)}),e.dataFields.name="name",e.data=t}},i.prototype.createSeries=function(){return new Lr},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){a.prototype.copyFrom.call(this,e),this.series.copyFrom(e.series)},i.prototype.appear=function(){a.prototype.appear.call(this),this.series.each(function(e){e.showOnInit&&e.inited&&e.appear()})},i})(na);C.registeredClasses.SerialChart=Ca;var Eu=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="DateAxisBreak",e.applyTheme(),e}return 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})(Hs);C.registeredClasses.DateAxisBreak=Eu;var Ua=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="DateAxisDataItem",e.applyTheme(),e.values.date={},e.values.endDate={},e}return 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})(Vr);var xe=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e._gapBreaks=!1,e.gridIntervals=new ve,e.groupIntervals=new ve,e.dateFormats=new Oe,e.periodChangeDateFormats=new Oe,e._baseIntervalReal={timeUnit:"day",count:1},e._prevSeriesTime={},e._minDifference={},e._firstWeekDay=1,e.groupMin={},e.groupMax={},e._intervalMax={},e._intervalMin={},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 i.prototype.fillRule=function(e){var t=e.value,r=e.component,n=r._gridInterval,s=vt(n.timeUnit,n.count);Math.round((t-r.min)/s)/2==Math.round(Math.round((t-r.min)/s)/2)?e.axisFill.__disabled=!0:e.axisFill.__disabled=!1},i.prototype.applyInternalDefaults=function(){a.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 Ua},i.prototype.createAxisBreak=function(){return new Eu},i.prototype.validateDataItems=function(){var e=this.start,t=this.end,r=this.baseDuration,n=(this.max-this.min)/r;this._firstWeekDay=this.getFirstWeekDay(),this.getDFFormatter(),a.prototype.validateDataItems.call(this);var s=vt(this.mainBaseInterval.timeUnit,this.mainBaseInterval.count);this.maxZoomFactor=Math.max(1,(this.max-this.min)/s),this._deltaMinMax=this.baseDuration/2;var o=(this.max-this.min)/r;e=e+(t-e)*(1-n/o),this.zoom({start:e,end:t},!1,!0)},i.prototype.handleSelectionExtremesChange=function(){},i.prototype.getIntervalMax=function(e){return this._intervalMax[e.timeUnit+e.count]},i.prototype.getIntervalMin=function(e){return this._intervalMin[e.timeUnit+e.count]},i.prototype.calculateZoom=function(){var e=this;a.prototype.calculateZoom.call(this);var t=this.adjustDifference(this._minZoomed,this._maxZoomed),r=!1;if(this.groupData&&P(t)){var n=this.mainBaseInterval,s=this.getIntervalMin(n),o=this.getIntervalMax(n),l=s+(o-s)*this.start,u=s+(o-s)*this.end,h=this.adjustDifference(l,u),p=h+(this.startLocation+(1-this.endLocation))*this.baseDuration,d=void 0;this.groupInterval?d=Gi({},this.groupInterval):(d=this.chooseInterval(0,p,this.groupCount,this.groupIntervals),vt(d.timeUnit,d.count)<vt(n.timeUnit,n.count)&&(d=Gi({},n))),this._groupInterval=d;var c=d.timeUnit+d.count;this._currentDataSetId!=c&&(this._currentDataSetId=c,this.dispatch("groupperiodchanged")),this.series.each(function(m){m.baseAxis==e&&m.setDataSet(e._currentDataSetId)&&(r=!0)})}var f=this.chooseInterval(0,t,this._gridCount);vt(f.timeUnit,f.count)<this.baseDuration&&(f=Gi({},this.baseInterval)),this._gridInterval=f,this._nextGridUnit=Td(f.timeUnit),this._intervalDuration=vt(f.timeUnit,f.count),this._gridDate=At(new Date(this.minZoomed-vt(f.timeUnit,f.count)),f.timeUnit,f.count,this._firstWeekDay,this._df.utc,new Date(this.min),this._df.timezoneMinutes,this._df.timezone),I(this.series.iterator(),function(m){if(m.baseAxis==e){var y=m.getAxisField(e),v=At(new Date(e._minZoomed+e.baseDuration*.05),e.baseInterval.timeUnit,e.baseInterval.count,e._firstWeekDay,e._df.utc,void 0,e._df.timezoneMinutes,e._df.timezone).getTime(),b=v.toString(),x=m.dataItemsByAxis.getKey(e.uid).getKey(b+m.currentDataSetId),_=0;e.start!=0&&(x?(x=e.findFirst(x,v,y),_=x.index):_=m.dataItems.findClosestIndex(e._minZoomed,function(B){return B[y]},"left"));var $=e.baseInterval,O=Jt(At(new Date(e._maxZoomed),$.timeUnit,$.count,e._firstWeekDay,e._df.utc,void 0,e._df.timezoneMinutes,e._df.timezone),$.timeUnit,$.count,e._df.utc).getTime(),F=O.toString(),w=m.dataItemsByAxis.getKey(e.uid).getKey(F+m.currentDataSetId),D=m.dataItems.length;e.end!=1&&(w?D=w.index:(O-=1,D=m.dataItems.findClosestIndex(O,function(B){return B[y]},"right"),D++)),m.max(e)<v?(m.startIndex=m.dataItems.length,m.endIndex=m.dataItems.length,m.outOfRange=!0):m.min(e)>O?(m.startIndex=0,m.endIndex=0,m.outOfRange=!0):(m.outOfRange=!1,m.startIndex=_,m.endIndex=D),!r&&m.dataRangeInvalid&&m.validateDataRange()}})},i.prototype.findFirst=function(e,t,r){var n=e.index;if(n>0){var s=e.component,o=s.dataItems.getIndex(n-1),l=o[r];return!l||l.getTime()<t?e:this.findFirst(o,t,r)}else return e},i.prototype.validateData=function(){a.prototype.validateData.call(this),S(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(r){t>e._minDifference[r.uid]&&(t=e._minDifference[r.uid])}),(t==Number.MAX_VALUE||t==0)&&(t=vt("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(r){t.seriesGroupUpdate(r)}),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(r){t.postProcessSeriesDataItem(r)}),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 r=[],n=this.mainBaseInterval,s=vt(n.timeUnit,n.count);this.groupIntervals.each(function(o){var l=vt(o.timeUnit,o.count);(l>s&&l<t.max-t.min||t.groupInterval)&&r.push(o)}),e._dataSets&&(e._dataSets.each(function(o,l){l.each(function(u){u.dispose()}),l.clear()}),e._dataSets.clear()),e.dataGrouped=!0,H(r,function(o){var l="date"+t.axisLetter,u=o.timeUnit+o.count,h=new Na(e.mainDataSet.template.clone());e.dataSets.setKey(u,h);var p=e.mainDataSet,d=Number.NEGATIVE_INFINITY,c=0,f,m=[];te(e.dataFields,function(v,b){var x=v;x!=l&&x.indexOf("Show")==-1&&m.push(x)});var y;p.each(function(v){var b=v.getDate(l);if(b){var x=b.getTime();y=At(new Date(x),o.timeUnit,o.count,t._df.firstDayOfWeek,t._df.utc,void 0,t._df.timezoneMinutes,t._df.timezone);var _=y.getTime();d<_?(f&&e._adapterO&&H(m,function($){f.values[$].value=e._adapterO.apply("groupDataItem",{dataItem:f,interval:o,dataField:$,date:y,value:f.values[$].value}).value,f.values[$].workingValue=f.values[$].value}),f=h.create(),f.dataContext={},f.setWorkingLocation("dateX",e.dataItems.template.locations.dateX,0),f.setWorkingLocation("openDateX",e.dataItems.template.locations.openDateX,0),f.setWorkingLocation("dateY",e.dataItems.template.locations.dateY,0),f.setWorkingLocation("openDateY",e.dataItems.template.locations.openDateY,0),f.component=e,f.setDate(l,y),f._index=c,c++,H(m,function($){var O=v.values[$];if(O){var F=O.value;e._adapterO&&(F=e._adapterO.apply("groupValue",{dataItem:v,interval:o,dataField:$,date:y,value:F}).value);var w=f.values[$];S(F)?(w.value=F,w.workingValue=F,w.open=F,w.close=F,w.low=F,w.high=F,w.sum=F,w.average=F,w.count=1):w.count=0}}),t.postProcessSeriesDataItem(f,o),te(e.propertyFields,function($,O){var F=$,w=v.properties[$];P(w)&&(f.hasProperties=!0,f.setProperty(F,w))}),f.groupDataItems=[v],d=_):f&&(H(m,function($){var O=e.groupFields[$],F=v.values[$];if(F){var w=F.value;if(e._adapterO&&(w=e._adapterO.apply("groupValue",{dataItem:v,interval:o,dataField:$,date:y,value:w}).value),S(w)){var D=f.values[$];S(D.open)||(D.open=w),D.close=w,(D.low>w||!S(D.low))&&(D.low=w),(D.high<w||!S(D.high))&&(D.high=w),S(D.sum)?D.sum+=w:D.sum=w,D.count++,D.average=D.sum/D.count,S(D[O])&&(D.value=D[O],D.workingValue=D.value)}}}),xi(v.properties,f.properties),te(e.propertyFields,function($,O){var F=$,w=v.properties[$];P(w)&&(f.hasProperties=!0,f.setProperty(F,w))}),f.groupDataItems.push(v))}f&&xi(v.dataContext,f.dataContext)}),f&&e._adapterO&&H(m,function(v){f.values[v].value=e._adapterO.apply("groupDataItem",{dataItem:f,interval:o,dataField:v,date:y,value:f.values[v].value}).value,f.values[v].workingValue=f.values[v].value})}),this.calculateZoom()}},i.prototype.getDFFormatter=function(){this._df=this.dateFormatter},i.prototype.postProcessSeriesDataItem=function(e,t){var r=this,n="";t?n=t.timeUnit+t.count:t=this.mainBaseInterval;var s=e.component,o=s.dataItemsByAxis.getKey(this.uid);te(e.dates,function(l){var u=e.getDate(l),h=u.getTime(),p=At(new Date(h),t.timeUnit,t.count,r._firstWeekDay,r._df.utc,void 0,r._df.timezoneMinutes,r._df.timezone),d=p.getTime(),c=Jt(new Date(d),t.timeUnit,t.count,r._df.utc);e.setCalculatedValue(l,d,"open"),e.setCalculatedValue(l,c.getTime(),"close"),o.setKey(d+n,e)})},i.prototype.addEmptyUnitsBreaks=function(){var e=this;if(this.skipEmptyPeriods&&S(this.min)&&S(this.max)){var t=this.baseInterval.timeUnit,r=this.baseInterval.count;this._axisBreaks&&this._axisBreaks.clear();for(var n=At(new Date(this.min),t,r,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),s=void 0,o=function(){Jt(n,t,r,l._df.utc);var u=n.getTime(),h=u.toString(),p=Ss(l.series.iterator(),function(d){return!!d.dataItemsByAxis.getKey(e.uid).getKey(h+d.currentDataSetId)});p?s&&(s.endDate=new Date(u-1),s=void 0):s||(s=l.axisBreaks.create(),s.startDate=new Date(u),l._gapBreaks=!0)},l=this;n.getTime()<this.max-this.baseDuration;)o()}},i.prototype.fixAxisBreaks=function(){var e=this;a.prototype.fixAxisBreaks.call(this);var t=this._axisBreaks;t&&t.length>0&&t.each(function(r){var n=Math.ceil(e._gridCount*(Math.min(e.end,r.endPosition)-Math.max(e.start,r.startPosition))/(e.end-e.start));r.gridInterval=e.chooseInterval(0,r.adjustedEndValue-r.adjustedStartValue,n);var s=At(new Date(r.adjustedStartValue),r.gridInterval.timeUnit,r.gridInterval.count,e._firstWeekDay,e._df.utc,void 0,e._df.timezoneMinutes,e._df.timezone);s.getTime()>r.startDate.getTime()&&Jt(s,r.gridInterval.timeUnit,r.gridInterval.count,e._df.utc),r.gridDate=s})},i.prototype.getFirstWeekDay=function(){return this._df?this._df.firstDayOfWeek:1},i.prototype.getGridDate=function(e,t){var r=this._gridInterval.timeUnit,n=this._gridInterval.count;At(e,r,1,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone);var s=e.getTime(),o=$n(e),l=Jt(o,r,t,this._df.utc).getTime(),u=this.isInBreak(l);u&&u.endDate&&(o=new Date(u.endDate.getTime()),At(o,r,n,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),o.getTime()<u.endDate.getTime()&&Jt(o,r,n,this._df.utc),l=o.getTime());var h=this.adjustDifference(s,l),p=Math.round(h/vt(r));return p<n?this.getGridDate(e,t+n):o},i.prototype.getBreaklessDate=function(e,t,r){var n=new Date(e.endValue);At(n,t,r,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),Jt(n,t,r,this._df.utc);var s=n.getTime();return e=this.isInBreak(s),e?this.getBreaklessDate(e,t,r):n},i.prototype.validateAxisElements=function(){var e=this;if(S(this.max)&&S(this.min)){this.calculateZoom();var t=this._gridDate.getTime(),r=this._gridInterval.timeUnit,n=this._gridInterval.count,s=$n(this._gridDate),o=this._dataItemsIterator;this.resetIterators();for(var l=function(){var p=u.getGridDate($n(s),n);t=p.getTime();var d=$n(p);d=Jt(d,r,n,u._df.utc);var c=u.dateFormats.getKey(r);u.markUnitChange&&s&&Vu(p,s,u._nextGridUnit,u._df.utc)&&r!=="year"&&(c=u.periodChangeDateFormats.getKey(r));var f=u._df.format(p,c),m=o.find(function(y){return y.text===f});m.__disabled&&(m.__disabled=!1),u.appendDataItem(m),m.axisBreak=void 0,m.date=p,m.endDate=d,m.text=f,u.validateDataElement(m),s=p},u=this;t<=this._maxZoomed;)l();var h=this.renderer;this._axisBreaks&&I(this._axisBreaks.iterator(),function(p){if(p.breakSize>0){var d=p.gridInterval.timeUnit,c=p.gridInterval.count;if(_e(p.startPoint,p.endPoint)>h.minGridDistance*4)for(var f=p.gridDate.getTime(),m,y=0,v=function(){var b=$n(p.gridDate);if(f=Jt(b,d,c*y,e._df.utc).getTime(),y++,f>p.adjustedStartValue&&f<p.adjustedEndValue){var x=$n(b);x=Jt(x,d,c,e._df.utc);var _=e.dateFormats.getKey(d);e.markUnitChange&&m&&Vu(b,m,e._nextGridUnit,e._df.utc)&&d!=="year"&&(_=e.periodChangeDateFormats.getKey(d));var $=e._df.format(b,_),O=o.find(function(F){return F.text===$});O.__disabled&&(O.__disabled=!1),e.appendDataItem(O),O.axisBreak=p,p.dataItems.moveValue(O),O.date=b,O.endDate=x,O.text=$,m=b,e.validateDataElement(O)}};f<=p.adjustedMax;)v()}})}},i.prototype.validateDataElement=function(e){if(e.itemIndex=this._axisItemCount,this._axisItemCount++,S(this.max)&&S(this.min)){var t=this.renderer,r=e.value,n=e.endValue;S(n)||(n=r);var s=this.valueToPosition(r),o=this.valueToPosition(n),l=o;!e.isRange&&this._gridInterval.count>this.baseInterval.count&&(o=s+(o-s)/(this._gridInterval.count/this.baseInterval.count)),e.position=s;var u=e.tick;u&&!u.disabled&&t.updateTickElement(u,s,o);var h=e.grid;h&&!h.disabled&&t.updateGridElement(h,s,o);var p=e.axisFill;p&&!p.disabled&&(t.updateFillElement(p,s,l),e.isRange||this.fillRule(e));var d=e.mask;d&&t.updateFillElement(d,s,o),e.bullet&&t.updateBullet(e.bullet,s,o);var c=e.label;if(c&&!c.disabled){var f=c.location;f==0&&(this._gridInterval.count==1&&this._gridInterval.timeUnit!="week"&&!e.isRange?f=.5:f=0),t.updateLabelElement(c,s,o,f)}}},Object.defineProperty(i.prototype,"baseDuration",{get:function(){return vt(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,r=At(new Date(e),t.timeUnit,t.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone).getTime(),n=Jt(new Date(r),t.timeUnit,t.count,this._df.utc).getTime();return r+(n-r)*this.startLocation},i.prototype.fixMax=function(e){var t=this.baseInterval,r=At(new Date(e),t.timeUnit,t.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone).getTime(),n=Jt(new Date(r),t.timeUnit,t.count,this._df.utc).getTime();return r+(n-r)*this.endLocation},i.prototype.chooseInterval=function(e,t,r,n){n||(n=this.gridIntervals);var s=n.getIndex(e),o=vt(s.timeUnit,s.count),l=n.length-1;if(e>=l)return Gi({},n.getIndex(l));var u=Math.ceil(t/o);return t<o&&e>0?Gi({},n.getIndex(e-1)):u<=r?Gi({},n.getIndex(e)):e+1<n.length?this.chooseInterval(e+1,t,r,n):Gi({},n.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),r=this.renderer.positionToPoint(t),n=this.renderer.positionToAngle(t);return{x:r.x,y:r.y,angle:n}},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,r,n,s){var o=this.getTimeByLocation(e,t,r);S(o)||(o=this.baseValue);var l=this.valueToPosition(o);return s&&(l=G(l,s.start,s.end)),l},i.prototype.getPositionY=function(e,t,r,n,s){var o=this.getTimeByLocation(e,t,r),l=e.getValue("valueX","stack");S(o)||(o=this.baseValue);var u=this.valueToPosition(o+l);return s&&(u=G(u,s.start,s.end)),u},i.prototype.getAngle=function(e,t,r,n,s){var o=this.getTimeByLocation(e,t,r),l=e.getValue(n,"stack");S(o)||(o=this.baseValue);var u=this.valueToPosition(o+l);return s&&(u=G(u,s.start,s.end)),this.positionToAngle(u)},i.prototype.getTimeByLocation=function(e,t,r){if(P(t)){S(r)||(r=e.workingLocations[t],S(r)||(r=0));var n=e.values[t].open,s=e.values[t].close,o=e.values[t].workingValue,l=e.values[t].value,u=l-o;if(n-=u,s-=u,S(n)&&S(s))return n+(s-n)*r}},i.prototype.processSeriesDataItem=function(e,t){var r=e.component,n,s=e["date"+t];if(S(this.timezoneOffset)?(s.setTime(s.getTime()+(s.getTimezoneOffset()-this.timezoneOffset)*6e4),e.setValue("date"+t,s.getTime(),0)):P(this.timezone)&&(s=Rs(s,this.timezone),e.setValue("date"+t,s.getTime(),0),e["date"+t]=s),s)n=s.getTime();else return;var o=e["openDate"+t],l=this._prevSeriesTime[r.uid],u;if(o&&(u=o.getTime()),S(u)){var h=Math.abs(n-u);this._minDifference[r.uid]>h&&(this._minDifference[r.uid]=h)}var p=n-l;p>0&&this._minDifference[r.uid]>p&&(this._minDifference[r.uid]=p),this._prevSeriesTime[r.uid]=n,r._baseInterval[this.uid]&&this.postProcessSeriesDataItem(e)},i.prototype.updateAxisBySeries=function(){a.prototype.updateAxisBySeries.call(this);var e=this.chooseInterval(0,this.minDifference,1);this.minDifference>=vt("day",27)&&e.timeUnit=="week"&&(e.timeUnit="month",e.count=1),e.timeUnit=="month"&&(this.minDifference>=vt("day",58)&&e.count==1&&(e.count=2),this.minDifference>=vt("day",87)&&e.count==2&&(e.count=3),this.minDifference>=vt("day",174)&&e.count==5&&(e.count=6)),this.minDifference>=vt("hour",23)&&e.timeUnit=="hour"&&(e.timeUnit="day",e.count=1),this.minDifference>=vt("week",1)-vt("hour",1)&&e.timeUnit=="day"&&(e.timeUnit="week",e.count=1),this.minDifference>=vt("year",1)-vt("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,S(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,r=this.positionToDate(e);if(r=At(r,this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,new Date(this.min),this._df.timezoneMinutes,this._df.timezone),this.tooltipDate=r,P(this.tooltipDateFormat))t=this._df.format(r,this.tooltipDateFormat,["day","month","week","year"].indexOf(this.baseInterval.timeUnit)==-1);else{var n=this.dateFormats.getKey(this.baseInterval.timeUnit);n?t=this._df.format(r,n):t=this.getPositionLabel(e)}return this._adapterO?this._adapterO.apply("getTooltipText",t):t},i.prototype.roundPosition=function(e,t,r){var n=this.baseInterval,s=n.timeUnit,o=n.count,l=this.positionToDate(e);if(At(l,s,o,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),t>0&&Jt(l,s,t*o,this._df.utc),r>0&&r<1&&l.setTime(l.getTime()+this.baseDuration*r),this.isInBreak(l.getTime()))for(;l.getTime()<this.max&&(Jt(l,s,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,r){var n=this.positionToValue(t),s=.5;this.axisLetter=="Y"?s=e.dataItems.template.locations.dateY:s=e.dataItems.template.locations.dateX;var o=n-s*this.baseDuration,l=At(new Date(n),this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),u=At(new Date(n+this.baseDuration),this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone);u.getTime()>l.getTime()&&Math.abs(u.getTime()-o)<Math.abs(o-l.getTime())&&(l=u);var h=e.dataItemsByAxis.getKey(this.uid),p=h.getKey(l.getTime()+e.currentDataSetId);if(!p&&r){var d;this.axisLetter=="Y"?d="dateY":d="dateX",p=e.dataItems.getIndex(e.dataItems.findClosestIndex(l.getTime(),function(c){return c[d]?c[d].getTime():-1/0},"any"))}return 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(){a.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 r=this,n=this.animate([{property:"_minAdjusted",from:this._minAdjusted,to:e},{property:"_maxAdjusted",from:this._maxAdjusted,to:t}],this.rangeChangeDuration,this.rangeChangeEasing);return n.events.on("animationprogress",function(){r.dispatch("extremeschanged")}),n},i.prototype.handleExtremesChange=function(){if(a.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,r,n,s){e=this._df.parse(e),t=this._df.parse(t),this.zoomToValues(e.getTime(),t.getTime(),r,n,s)},i.prototype.zoomToValues=function(e,t,r,n,s){var o=this;if(this.groupData){var h=this.adjustDifference(e,t),p=!1;t==this.max&&(p=!0);var d=!1;if(e==this.min&&(d=!0),P(h)){var c=this.mainBaseInterval,f=this.chooseInterval(0,h,this.groupCount,this.groupIntervals);(f.timeUnit==c.timeUnit&&f.count<c.count||vt(f.timeUnit,1)<vt(c.timeUnit,1))&&(f=Gi({},c));var m=f.timeUnit+f.count,y=this.groupMin[m],v=this.groupMax[m];(!S(y)||!S(v))&&(y=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,this.series.each(function(_){var $=_.min(o),O=_.max(o);if(_._dataSets){var F=_._dataSets.getKey(f.timeUnit+f.count);if(F){var w=F.getIndex(0),D=F.getIndex(F.length-1);w&&(_.xAxis==o?$=w.dateX.getTime():_.yAxis==o&&($=w.dateY.getTime())),D&&(_.xAxis==o?O=D.dateX.getTime():_.yAxis==o&&(O=D.dateY.getTime()))}}O=At(Jt(new Date(O),f.timeUnit,1,o._df.utc),f.timeUnit,1,o._df.firstDayOfWeek,o._df.utc,void 0,o._df.timezoneMinutes,o._df.timezone).getTime(),$<y&&(y=$),O>v&&(v=O)}),this.groupMin[m]=y,this.groupMax[m]=v),e=G(e,y,v),t=G(t,y,v),s&&(p&&(e=t-h,e=G(e,y,v)),d&&(t=e+h,t=G(t,y,v)));var l=(e-y)/(v-y),u=(t-y)/(v-y);this.zoom({start:l,end:u},r,n)}}else{var l=this.valueToPosition(e),u=this.valueToPosition(t);this.zoom({start:l,end:u},r,n)}},i.prototype.asIs=function(e){return e=="baseInterval"||a.prototype.asIs.call(this,e)},i.prototype.copyFrom=function(e){var t=this;a.prototype.copyFrom.call(this,e),this.dateFormats=e.dateFormats,this.periodChangeDateFormats=e.periodChangeDateFormats,this.groupIntervals.clear(),e.groupIntervals.each(function(r){t.groupIntervals.push(Gi({},r))}),this.gridIntervals.clear(),e.gridIntervals.each(function(r){t.gridIntervals.push(Gi({},r))}),e._baseInterval&&(this.baseInterval=e._baseInterval)},i.prototype.showTooltipAtPosition=function(e,t){var r=this;if(t||(e=this.toAxisPosition(e)),this.snapTooltip){var n=this.positionToDate(e),s=n.getTime(),o;if(this.series.each(function(h){if(h.baseAxis==r){var p=r.getSeriesDataItem(h,e,!0);if(p){var d=void 0;h.xAxis==r&&(d=p.dateX),h.yAxis==r&&(d=p.dateY),o?Math.abs(o.getTime()-s)>Math.abs(d.getTime()-s)&&(o=d):o=d}}}),o){var l=o.getTime();o=At(new Date(l),this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),l=o.getTime();var u=this.renderer.tooltipLocation;u==0&&(u=1e-4),o=new Date(o.getTime()+this.baseDuration*u),e=this.dateToPosition(o),this.chart.cursor&&this.chart.cursor.snapToSeries||this.series.each(function(h){var p=h.dataItemsByAxis.getKey(r.uid).getKey(l+h.currentDataSetId),d=h.showTooltipAtDataItem(p);d?r.chart._seriesPoints.push({series:h,point:d}):(h.tooltipText||h.tooltipHTML)&&h.hideTooltip()})}}a.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(r){r.setDataSet(""),e&&!r.dataGrouped&&r.inited&&(r._baseInterval[t.uid]=t.mainBaseInterval,t.groupSeriesData(r))}),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 r=e.component;if(e&&t&&!r.connect&&S(r.autoGapCount)&&r.baseAxis==this){var n=e.dates["date"+this.axisLetter],s=t.dates["date"+this.axisLetter];if(n&&s){var o=n.getTime(),l=s.getTime();if(o-l>r.autoGapCount*this.baseDuration)return!0}}return!1},Object.defineProperty(i.prototype,"baseValue",{get:function(){return this.min},enumerable:!0,configurable:!0}),i.prototype._saveMinMax=function(e,t){var r=this.groupInterval;r||(r=this.mainBaseInterval);var n=r.timeUnit+r.count;this._intervalMin[n]=e,this._intervalMax[n]=t},i})(re);C.registeredClasses.DateAxis=xe;C.registeredClasses.DateAxisDataItem=Ua;var xt=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="AxisRendererX",e.minGridDistance=120,e.opposite=!1,e.rotation=0,e.width=N(100),e.labels.template.horizontalCenter="middle",e.applyTheme(),e}return i.prototype.setAxis=function(e){a.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(){a.prototype.processRenderer.call(this);var e=this.axis;if(e){e.width instanceof de||(e.width=N(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(){var e=this.axis;if(e){var t=1e3,r=this.line.pixelX,n=this.line.pixelY,s=this.axisLength,o=t;this.opposite?this.inside||(n=-t,o=t):this.inside&&(n=-t,o=t),this.axis.updateTooltip("vertical",{x:r,y:n,width:s,height:o})}},i.prototype.updateLabelElement=function(e,t,r,n){P(n)||(n=e.location),t=t+(r-t)*n;var s=this.positionToPoint(t);e.isMeasured=!e.inside;var o=0,l,u=this.gridContainer.maxHeight;this.opposite?(e.inside?(l="top",e.valign=="bottom"&&(o=u,l="bottom"),e.valign=="middle"&&(o=u/2,l="middle")):l="bottom",s.y=o):(e.inside?(l="bottom",e.valign=="top"&&(o=-u,l="top"),e.valign=="middle"&&(o=-u/2,l="middle")):l="top",s.y+=o),e.rotation==0&&(e.verticalCenter=l),this.positionItem(e,s),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 r=G(this.positionToCoordinate(e),0,this.axisLength),n=G(this.positionToCoordinate(t),0,this.axisLength),s=Math.abs(n-r),o=this.getHeight(),l=Math.min(r,n),u=0;return Zi({x:l,y:u,width:s,height:o},!0)},i.prototype.updateBreakElement=function(e){a.prototype.updateBreakElement.call(this,e);var t=e.startLine,r=e.endLine,n=e.fillShape,s=e.startPoint,o=e.endPoint,l=e.pixelMarginLeft,u=this.getHeight()-e.pixelMarginTop-e.pixelMarginBottom;s.x=G(s.x,-1,this.axisLength+1),o.x=G(o.x,-1,this.axisLength+1),s.x==o.x&&(s.x<0||s.x>this.axisLength)?e.fillShape.__disabled=!0:e.fillShape.__disabled=!1,t.y=l,t.width=0,t.height=u,r.y=l,r.width=0,r.height=u,n.height=u,n.width=Math.abs(o.x-s.x),n.y=l,n.x=s.x},i.prototype.updateGridElement=function(e,t,r){t=t+(r-t)*e.location;var n=this.positionToPoint(t);e.path=W({x:0,y:0})+k({x:0,y:this.getHeight()}),this.positionItem(e,n),this.toggleVisibility(e,t,0,1)},i.prototype.updateTickElement=function(e,t,r){t=t+(r-t)*e.location;var n=this.positionToPoint(t),s=e.length;n.y=It({x:0,y:this.line.pixelY},this.line.parent,this.gridContainer).y,this.opposite?s*=e.inside?1:-1:s*=e.inside?-1:1,e.path=W({x:0,y:0})+k({x:0,y:s}),this.positionItem(e,n),this.toggleVisibility(e,t,0,1)},i.prototype.updateAxisLine=function(){this.line.path=W({x:0,y:0})+k({x:this.axisLength,y:0})},i.prototype.updateBaseGridElement=function(){a.prototype.updateBaseGridElement.call(this);var e=this.axis,t=this.getHeight(),r=this.axisLength,n=this.baseGrid,s=e.basePoint.x;if(s<-.2||s>r+.2)n.hide(0);else{var o=It({x:0,y:0},this.gridContainer,n.parent).y;n.path=W({x:0,y:0})+k({x:0,y:t}),n.moveTo({x:s,y:o}),n.show(0)}},i.prototype.createBreakSprites=function(e){e.startLine=new Dr,e.endLine=new Dr;var t=new rl;t.setWavedSides(!1,!0,!1,!0),e.fillShape=t},i.prototype.toAxisPosition=function(e){var t=e,r=this.axis;if(r){var n=r.relativePositionSprite,s=r.pixelX;if(n?s=It({x:this.pixelX,y:0},this.parent,n).x:n=r.parent,n){var o=s/n.innerWidth,l=r.axisLength/n.innerWidth;return(t-o)/l}}return e},i.prototype.updateBullet=function(e,t,r){var n=.5;e instanceof aa&&(n=e.location),t=t+(r-t)*n;var s=this.positionToPoint(t);s.y=It({x:0,y:this.line.pixelY},this.line.parent,this.gridContainer).y,this.positionItem(e,s),this.toggleVisibility(e,t,0,1)},i})(Ga);C.registeredClasses.AxisRendererX=xt;ht.push({relevant:yt.heightXS,state:function(a,i){if(a instanceof xt){var e=a.states.create(i);return e.properties.inside=!0,e.properties.maxLabelPosition=.9,e.properties.minLabelPosition=.1,e}return null}});ht.push({relevant:yt.heightXXS,state:function(a,i){if(a instanceof xt){var e=a.states.create(i);return e.properties.disabled=!0,e}return null}});var Wu=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="CategoryAxisBreak",e.properties.startLocation=.5,e.properties.endLocation=.5,e.applyTheme(),e}return 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})(Xa);C.registeredClasses.CategoryAxisBreak=Wu;var oa=(function(a){T(i,a);function i(){var e=a.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 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),P(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})(Sa);var we=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.dataItemsByCategory=new Oe,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(r){t.removeKey(r.oldValue.category)})),e}return i.prototype.createDataItem=function(){return new oa},i.prototype.createAxisBreak=function(){return new Wu},i.prototype.processSeriesDataItem=function(e,t){a.prototype.processSeriesDataItem.call(this,e,t);var r=e["category"+this.axisLetter];if(P(r)){var n=this.dataItemsByCategory.getKey(r);if(n){var s=e.component.uid,o=n.seriesDataItems[s];o||(o=[],n.seriesDataItems[s]=o),o.push(e)}}else e.component.dataItems.remove(e)},i.prototype.validateDataRange=function(){var e=this;a.prototype.validateDataRange.call(this),I(this._series.iterator(),function(t){if(t.xAxis instanceof i&&t.yAxis instanceof i)t.invalidateDataRange();else{var r=e.positionToIndex(e.start),n=e.positionToIndex(e.end);n>=e.dataItems.length&&n--;for(var s=t.uid,o=void 0,l=void 0,u=r;u<=n;u++){var h=e.dataItems.getIndex(u);if(h){var p=h.seriesDataItems[s];if(p)for(var d=0;d<p.length;d++){var c=p[d];if(c){var f=c.index;(!S(o)||f<o)&&(o=f),(!S(l)||f>l)&&(l=f)}}}}S(o)?t.startIndex=o:t.start=e.start,S(l)?t.endIndex=l+1:t.end=e.end,e._axisBreaks&&e._axisBreaks.length>0&&t.invalidateDataRange()}})},i.prototype.validate=function(){var e=this;a.prototype.validate.call(this);var t=this.dataItems.length,r=G(Math.floor(this.start*t-1),0,t),n=G(Math.ceil(this.end*t),0,t);this.renderer.invalid&&this.renderer.validate();var s=this.renderer.axisLength/Math.max(this.renderer.minGridDistance,1/Number.MAX_SAFE_INTEGER),o=Math.min(this.dataItems.length,Math.ceil((n-r)/s));if(this._startIndex=Math.floor(r/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(),r=he(0,this._startIndex-this._frequency),n=ye(this.dataItems.length,this._endIndex+this._frequency);for(var l=0,u=0;u<r;u++){var h=this.dataItems.getIndex(u);h.__disabled=!0}for(var u=n,p=this.dataItems.length;u<p;u++){var h=this.dataItems.getIndex(u);h.__disabled=!0}for(var u=r;u<n;u++)if(u<this.dataItems.length){var h=this.dataItems.getIndex(u);if(u/this._frequency==Math.round(u/this._frequency)){var d=this.isInBreak(u);d||(this.appendDataItem(h),this.validateDataElement(h,l)),l++}else h.__disabled=!0}if(this.appendDataItem(this._lastDataItem),this.validateDataElement(this._lastDataItem,l+1,this.dataItems.length),this._axisBreaks){var c=this._axisBreaks;c.each(function(f){var m=f.adjustedStartValue,y=f.adjustedEndValue;if(ms({start:m,end:y},{start:e._startIndex,end:e._endIndex})){for(var v=m;v<=y;v++){var b=e.dataItems.getIndex(v);b.__disabled=!0}var x=G(Math.ceil(e._frequency/f.breakSize),1,y-m),_=0;if(f.breakSize>0)for(var v=m;v<=y;v=v+x){var b=e.dataItems.getIndex(v);b.__disabled=!1,e.appendDataItem(b),e.validateDataElement(b,_),_++}}})}this.validateBreaks(),this.validateAxisRanges(),this.ghostLabel.invalidate(),this.renderer.invalidateLayout()}},i.prototype.validateDataElement=function(e,t,r){a.prototype.validateDataElement.call(this,e),e.itemIndex=this._axisItemCount,this._axisItemCount++;var n=this.renderer;S(r)||(r=this.categoryToIndex(e.category));var s=this.categoryToIndex(e.endCategory);S(s)||(s=r);var o=this.indexToPosition(r,e.locations.category),l=this.indexToPosition(s,e.locations.endCategory);e.position=o;var u,h,p;e.isRange&&(u=s,h=this.indexToPosition(r,e.locations.category),p=this.indexToPosition(u,e.locations.endCategory)),e.point=n.positionToPoint(o);var d=e.tick;d&&!d.disabled&&n.updateTickElement(d,o,l);var c=e.grid;c&&!c.disabled&&n.updateGridElement(c,o,l);var f=e.label;f&&!f.disabled&&((!e.isRange||f.text==null)&&(e.text=e.text),n.updateLabelElement(f,o,l),(n instanceof Ot&&e.label.measuredWidth>this.ghostLabel.measuredWidth||n instanceof xt&&e.label.measuredHeight>this.ghostLabel.measuredHeight)&&(e.label.html?this.ghostLabel.html=e.label.currentText:this.ghostLabel.text=e.label.currentText));var m=e.axisFill;m&&!m.disabled&&(e.isRange||(u=r+this._frequency,h=this.indexToPosition(r,m.location),p=this.indexToPosition(u,m.location)),n.updateFillElement(m,h,p),e.isRange||this.fillRule(e,t)),e.bullet&&n.updateBullet(e.bullet,o,l);var y=e.mask;y&&n.updateFillElement(y,h,p)},i.prototype.disposeData=function(){this.dataItemsByCategory.clear(),a.prototype.disposeData.call(this)},i.prototype.processDataItem=function(e,t){e&&(a.prototype.processDataItem.call(this,e,t),P(e.category)&&this.dataItemsByCategory.setKey(e.category,e))},i.prototype.getDataItem=function(e){var t=e[this.dataFields.category];if(P(t)){var r=this.dataItemsByCategory.getKey(t);return r||this.dataItems.create()}},i.prototype.indexToPosition=function(e,t){S(t)||(t=.5);var r=this.startIndex,n=this.endIndex,s=this.adjustDifference(r,n),o=this.startLocation,l=this.endLocation;if(s-=o,s-=1-l,this._axisBreaks){var u=this._axisBreaks;Dt(u.iterator(),function(d){var c=d.adjustedStartValue,f=d.adjustedEndValue;if(e<r||!S(c)||!S(f))return!1;if(ms({start:c,end:f},{start:r,end:n})){c=Math.max(r,c),f=Math.min(n,f);var m=d.breakSize;e>f?r+=(f-c)*(1-m):e<c||(e=c+(e-c)*m)}return!0})}var h=0,p=this.dataItems.getIndex(e);return p&&(h=p.deltaPosition),E(h+(e+t-o-r)/s,5)},i.prototype.categoryToPosition=function(e,t){var r=this.categoryToIndex(e);return this.indexToPosition(r,t)},i.prototype.categoryToPoint=function(e,t){var r=this.categoryToPosition(e,t),n=this.renderer.positionToPoint(r),s=this.renderer.positionToAngle(r);return{x:n.x,y:n.y,angle:s}},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(P(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,r,n){var s=this.categoryToPosition(e,r),o=this.categoryToPosition(t,n);return this.getPositionRangePath(s,o)},i.prototype.roundPosition=function(e,t){var r=this.positionToIndex(e);return this.indexToPosition(r,t)},i.prototype.getFirstSeriesDataItem=function(e,t){for(var r=0;r<e.dataItems.length;r++){var n=e.dataItems.getIndex(r);if(e.xAxis==this&&n.categoryX==t||e.yAxis==this&&n.categoryY==t)return n}},i.prototype.getLastSeriesDataItem=function(e,t){for(var r=e.dataItems.length-1;r>=0;r--){var n=e.dataItems.getIndex(r);if(e.xAxis==this&&n.categoryX==t||e.yAxis==this&&n.categoryY==t)return n}},i.prototype.getSeriesDataItemByCategory=function(e,t){var r=this,n;return t.dataItems.each(function(s){t.xAxis==r?s.categoryX==e&&(n=s):t.yAxis==r&&s.categoryY==e&&(n=s)}),n},i.prototype.getSeriesDataItem=function(e,t,r){var n=this;if(S(t)){var s=this.positionToIndex(t);s>=this.dataItems.length&&s--;var o=this.dataItems.getIndex(s);if(o){var l=o.category,u,h=e.dataItems.getIndex(s);return h&&(e.xAxis==this&&h.categoryX==l||e.yAxis==this&&h.categoryY==l)?h:(e.dataItems.each(function(p){e.xAxis==n&&p.categoryX==l&&(u||(u=p),Math.abs(s-u.index)>Math.abs(s-p.index)&&(u=p)),e.yAxis==n&&p.categoryY==l&&(u||(u=p),Math.abs(s-u.index)>Math.abs(s-p.index)&&(u=p))}),u)}}},i.prototype.getX=function(e,t,r,n,s){var o=this.getPositionX(e,t,r,n,s);return Tt(o)?this.basePoint.x:this.renderer.positionToPoint(o).x},i.prototype.getPositionX=function(e,t,r,n,s){var o;return P(t)&&(o=this.categoryToPosition(e.categories[t],r)),s&&(o=G(o,s.start,s.end)),o},i.prototype.getY=function(e,t,r,n,s){var o=this.getPositionY(e,t,r,n,s);return Tt(o)?this.basePoint.y:this.renderer.positionToPoint(o).y},i.prototype.getPositionY=function(e,t,r,n,s){var o;return P(t)&&(o=this.categoryToPosition(e.categories[t],r)),s&&(o=G(o,s.start,s.end)),o},i.prototype.getAngle=function(e,t,r,n,s){var o=this.categoryToPosition(e.categories[t],r);return s&&(o=G(o,s.start,s.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=E(e,10),e<0&&(e=0),e>1&&(e=1);var t=this.startIndex,r=this.endIndex,n=r-t-this.startLocation-(1-this.endLocation);e+=1/n*this.startLocation;var s=null;if(this._axisBreaks){var o=this._axisBreaks;Dt(o.iterator(),function(l){var u=l.startPosition,h=l.endPosition,p=l.adjustedStartValue,d=l.adjustedEndValue;p=he(p,t),d=ye(d,r);var c=l.breakSize;if(n-=(d-p)*(1-c),e>h)t+=(d-p)*(1-c);else if(!(e<u)){var f=(e-u)/(h-u);return s=p+Math.round(f*(d-p)),!1}return!0})}return S(s)||(s=Math.floor(e*n+t)),s>=this.dataItems.length&&(s=this.dataItems.length-1),s},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(){a.prototype.initRenderer.call(this);var e=this.renderer;e.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&&P(e.sortBySeries)&&ce(e.sortBySeries)&&(this.map.hasKey(e.sortBySeries)?e.sortBySeries=this.map.getKey(e.sortBySeries):(this.addDelayedMap("sortBySeries",e.sortBySeries),delete e.sortBySeries)),a.prototype.processConfig.call(this,e)},i})(Fn);C.registeredClasses.CategoryAxis=we;C.registeredClasses.CategoryAxisDataItem=oa;var An=(function(a){T(i,a);function i(){var e=a.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 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,r){var n=this,s;return S(r)||(r=0),H(e,function(o){var l;t?l=n.getWorkingValue(o):l=n.getValue(o),l+=r,(l<s||!S(s))&&(s=l)}),s},i.prototype.getMax=function(e,t,r){var n=this,s;return S(r)||(r=0),H(e,function(o){var l;t?l=n.getWorkingValue(o):l=n.getValue(o),l+=r,(l>s||!S(s))&&(s=l)}),s},i})(Dn);var Nt=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.groupFields={},e._xAxis=new Ue,e._yAxis=new Ue,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 ee,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(Ke,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 i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("X/Y Series"))},i.prototype.createDataItem=function(){return new An},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(),a.prototype.validateData.call(this),this.updateItemReaderText(),this.chart&&(!P(this.dataFields[this._xField])||!P(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{a.prototype.processDataItem.call(this,e,t),this.xAxis.processSeriesDataItem(e,"X"),this.yAxis.processSeriesDataItem(e,"Y"),this.setInitialWorkingValues(e)}catch(r){this._chart&&this._chart.raiseCriticalError(r)}},i.prototype.updateDataItem=function(e){a.prototype.updateDataItem.call(this,e),this.xAxis.processSeriesDataItem(e,"X"),this.yAxis.processSeriesDataItem(e,"Y")},i.prototype.setInitialWorkingValues=function(e){},i.prototype.disposeData=function(){a.prototype.disposeData.call(this);var e=this.xAxis,t=this.yAxis;if(e){var r=this.dataItemsByAxis.getKey(e.uid);r&&r.clear(),e instanceof we&&this.clearCatAxis(e)}if(t){var n=this.dataItemsByAxis.getKey(t.uid);n&&n.clear(),t instanceof we&&this.clearCatAxis(t)}},i.prototype.clearCatAxis=function(e){var t=this.uid;e.dataItems.each(function(r){r.seriesDataItems[t]&&(r.seriesDataItems[t]=[])})},i.prototype.defineFields=function(){var e=this.xAxis,t=this.yAxis;if(e&&t){var r=e.axisFieldName,n=r+"X",s="open"+xn(r)+"X",o=t.axisFieldName,l=o+"Y",u="open"+xn(o)+"Y";this._xField=n,this._yField=l,this.dataFields[s]&&(this._xOpenField=s),this.dataFields[u]&&(this._yOpenField=u),!this.dataFields[u]&&this.baseAxis==t&&(this._yOpenField=l),!this.dataFields[s]&&this.baseAxis==e&&(this._xOpenField=n),this.stacked&&this.baseAxis==e&&(this._xOpenField=n),this.stacked&&this.baseAxis==t&&(this._yOpenField=l),e instanceof we&&t instanceof we&&(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,r){e instanceof re&&P(this.dataFields[r])&&t.indexOf(r)==-1&&t.push(r)},i.prototype.setCategoryAxisField=function(e,t){P(this.dataFields[e])||(this.dataFields[e]=t.dataFields.category)},i.prototype.setDateAxisField=function(e,t){P(this.dataFields[e])||(this.dataFields[e]=t.dataFields.date)},i.prototype.afterDraw=function(){a.prototype.afterDraw.call(this),this.createMask()},i.prototype.createMask=function(){if(this.mainContainer.mask){var e=this.getMaskPath();I(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?Zi({x:0,y:0,width:this.xAxis.axisLength,height:this.yAxis.axisLength}):""},i.prototype.getAxisField=function(e){if(e==this.xAxis)return this.xField;if(e==this.yAxis)return this.yField},i.prototype.validateDataItems=function(){var e=this.chart;e&&(this._maxxX=he(1e5,e.plotContainer.maxWidth*2),this._maxxY=he(1e5,e.plotContainer.maxHeight*2));var t=this.xAxis,r=this.yAxis;t&&r&&(t.updateAxisBySeries(),r.updateAxisBySeries()),a.prototype.validateDataItems.call(this),t&&r&&(t.postProcessSeriesDataItems(this),r.postProcessSeriesDataItems(this))},i.prototype.validateDataRange=function(){var e=this.xAxis,t=this.yAxis;e&&t&&(e.dataRangeInvalid&&e.validateDataRange(),t.dataRangeInvalid&&t.validateDataRange()),a.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 r=this.minBulletDistance;S(r)&&this.baseAxis.axisLength/(this.endIndex-this.startIndex)<r&&(this._showBullets=!1)}if(this.updateTooltip(),!(e instanceof xe&&e.groupData&&!this.dataGrouped||t instanceof xe&&t.groupData&&!this.dataGrouped)){a.prototype.validate.call(this);var n=this.chart,s=this.maskBullets;n&&s&&n.className=="XYChart"&&((n.leftAxesContainer.layout=="vertical"||n.rightAxesContainer.layout=="vertical")&&(this.yAxis?this.bulletsContainer.mask=this.yAxis.renderer.gridContainer:this.bulletsContainer.mask=void 0),(n.topAxesContainer.layout=="horizontal"||n.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 Oe),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 rt&&e.chart.handleYAxisSet(this),this.dataItemsByAxis.setKey(e.uid,new Oe),this.invalidateData())},Object.defineProperty(i.prototype,"baseAxis",{get:function(){var e=this.xAxis,t=this.yAxis;return!this._baseAxis&&e&&t&&(t instanceof xe&&(this._baseAxis=t),e instanceof xe&&(this._baseAxis=e),t instanceof we&&(this._baseAxis=t),e instanceof we&&(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,r){a.prototype.addData.call(this,e,t,r);var n=this.scrollbarSeries;n&&(this.scrollbarSeries.addData(e,t,!0),this.scrollbarSeries._parseDataFrom=this._parseDataFrom)},i.prototype.setData=function(e){a.prototype.setData.call(this,e),this.scrollbarSeries&&this.scrollbarSeries.setData(e)},i.prototype.setDataSet=function(e){var t=a.prototype.setDataSet.call(this,e);if(t){this._dataSetChanged=!0;var r=this.dataItems;if(this.resetExtremes(),r&&r.length>0){var n=this.xAxis,s=this.yAxis;this._prevStartIndex=void 0,this._prevEndIndex=void 0,this._startIndex=void 0,this._endIndex=void 0,this.appeared||this.processValues(!1),n instanceof xe&&n==this.baseAxis&&(this._tmin.setKey(n.uid,r.getIndex(0).dateX.getTime()),this._tmax.setKey(n.uid,r.getIndex(r.length-1).dateX.getTime()),this.dispatch("extremeschanged")),s instanceof xe&&s==this.baseAxis&&(this._tmin.setKey(s.uid,r.getIndex(0).dateY.getTime()),this._tmax.setKey(s.uid,r.getIndex(r.length-1).dateY.getTime()),this.dispatch("extremeschanged"))}}return t},i.prototype.processValues=function(e){a.prototype.processValues.call(this,e);var t=this.xAxis,r=this.yAxis;if(!(!t||!r)){var n=this.dataItems,s=1/0,o=-1/0,l=1/0,u=-1/0,h=this.startIndex,p=this.endIndex,d=h,c=p;e||(h=0,p=this.dataItems.length);for(var f=h;f<p;f++){var m=n.getIndex(f);this.getStackValue(m,e);var y=m.getValue("valueX","stack"),v=m.getValue("valueY","stack");e||(y=m.getValue("valueX","stackTrue"),v=m.getValue("valueY","stackTrue")),s=ye(m.getMin(this._xValueFields,e,y),s),l=ye(m.getMin(this._yValueFields,e,v),l),o=he(m.getMax(this._xValueFields,e,y),o),u=he(m.getMax(this._yValueFields,e,v),u),this.stacked&&(this.baseAxis==t&&(v<l&&(l=v),v>u&&(u=v)),this.baseAxis==r&&(y<s&&(s=y),y>o&&(o=y)))}t.processSeriesDataItems(),r.processSeriesDataItems();var b=t.uid,x=r.uid;if(this.xAxis instanceof re&&(s==1/0||o==-1/0)){this._smin.setKey(b,void 0),this._smax.setKey(b,void 0),this.dispatchImmediately("selectionextremeschanged");return}if(this.yAxis instanceof re&&(l==1/0||u==-1/0)){this._smin.setKey(x,void 0),this._smax.setKey(x,void 0),this.dispatchImmediately("selectionextremeschanged");return}if(!e&&(this._tmin.getKey(b)!=s||this._tmax.getKey(b)!=o||this._tmin.getKey(x)!=l||this._tmax.getKey(x)!=u)){this._tmin.setKey(b,s),this._tmax.setKey(b,o),this._tmin.setKey(x,l),this._tmax.setKey(x,u);var _=this.stackedSeries;_&&(_.isDisposed()?this.stackedSeries=void 0:_.processValues(!1)),this.dispatchImmediately("extremeschanged")}if(h!=d||p!=c){s=1/0,o=-1/0,l=1/0,u=-1/0;for(var f=d;f<c;f++){var m=n.getIndex(f);this.getStackValue(m,e);var y=m.getValue("valueX","stack"),v=m.getValue("valueY","stack");e||(y=m.getValue("valueX","stackTrue"),v=m.getValue("valueY","stackTrue")),s=ye(m.getMin(this._xValueFields,e,y),s),l=ye(m.getMin(this._yValueFields,e,v),l),o=he(m.getMax(this._xValueFields,e,y),o),u=he(m.getMax(this._yValueFields,e,v),u),this.stacked&&(this.baseAxis==t&&(v<l&&(l=v),v>u&&(u=v)),this.baseAxis==r&&(y<s&&(s=y),y>o&&(o=y)))}}if(this.xAxis instanceof re&&(s==1/0||o==-1/0)){this._smin.setKey(b,void 0),this._smax.setKey(b,void 0),this.dispatchImmediately("selectionextremeschanged");return}if(this.yAxis instanceof re&&(l==1/0||u==-1/0)){this._smin.setKey(x,void 0),this._smax.setKey(x,void 0),this.dispatchImmediately("selectionextremeschanged");return}if((this._smin.getKey(b)!=s||this._smax.getKey(b)!=o||this._smin.getKey(x)!=l||this._smax.getKey(x)!=u)&&(this._smin.setKey(b,s),this._smax.setKey(b,o),this._smin.setKey(x,l),this._smax.setKey(x,u),this.appeared||this.start!=0||this.end!=1||this.dataItems!=this.mainDataSet)){var $=!1;if(r instanceof re&&!(r instanceof xe)){var O=this._tmin.getKey(x);(!S(O)||(this.usesShowFields||this._dataSetChanged||t instanceof xe&&t.groupData&&this.isShowing)&&l<O||this.stackedSeries&&!this.isHidden&&!e)&&(this._tmin.setKey(x,l),$=!0);var F=this._tmax.getKey(x);(!S(F)||(this.usesShowFields||this._dataSetChanged||t instanceof xe&&t.groupData&&this.isShowing)&&u>F||this.stackedSeries&&!this.isHidden&&!e)&&(this._tmax.setKey(x,u),$=!0)}if(t instanceof re&&!(t instanceof xe)){var O=this._tmin.getKey(b);(!S(O)||(this.usesShowFields||this._dataSetChanged||r instanceof xe&&r.groupData&&this.isShowing)&&s<O||this.stackedSeries&&!this.isHidden&&!e)&&(this._tmin.setKey(b,s),$=!0);var F=this._tmax.getKey(b);(!S(F)||(this.usesShowFields||this._dataSetChanged||r instanceof xe&&r.groupData&&this.isShowing)&&o>F||this.stackedSeries&&!this.isHidden&&!e)&&(this._tmax.setKey(b,o),$=!0)}$&&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){a.prototype.hideTooltip.call(this,e),this.returnBulletDefaultState(),this._prevTooltipDataItem=void 0},i.prototype.showTooltipAtPosition=function(e,t){var r;if(this.visible&&!this.isHiding&&!this.isShowing){var n=this._xAxis.get(),s=this._yAxis.get();n==this.baseAxis&&(r=n.getSeriesDataItem(this,n.toAxisPosition(e),this.snapTooltip)),s==this.baseAxis&&(r=s.getSeriesDataItem(this,s.toAxisPosition(t),this.snapTooltip));var o=this.showTooltipAtDataItem(r);if(o)return o;if(!this.tooltipText&&!this.tooltipHTML)return}this.hideTooltip()},i.prototype.getAdjustedXLocation=function(e,t,r){return e.locations[t]},i.prototype.getAdjustedYLocation=function(e,t,r){return e.locations[t]},i.prototype.showTooltipAtDataItem=function(e){var t,r,n=this.chart.cursor;if(n&&n.hideSeriesTooltipsOnSelection&&n.selection.visible&&n.downPoint){this.hideTooltip();return}if(this.returnBulletDefaultState(e),e&&e.visible){if(this.updateLegendValue(e),this.cursorTooltipEnabled){this.tooltipDataItem=e;var s=this.tooltipXField,o=this.tooltipYField;if(P(e[s])&&P(e[o])){var l=this.getPoint(e,s,o,this.getAdjustedXLocation(e,s),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 u=hn(e.sprites),h=u.next();!h.done;h=u.next()){var p=h.value;!p.parent.visible||p.isHidden||p.__disabled||p.disabled||p.isHiding||(p.interactions.isRealHover||(p.dispatchImmediately("over"),p.interactions.isRealHover=!0),p.isHover=!0)}}catch(d){t={error:d}}finally{try{h&&!h.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return this.showTooltip()?di({x:l.x,y:l.y},this):void 0}}}}else this.updateLegendValue(e,!0)},i.prototype.returnBulletDefaultState=function(e){var t,r;if(this._prevTooltipDataItem&&this._prevTooltipDataItem!=e)try{for(var n=hn(this._prevTooltipDataItem.sprites),s=n.next();!s.done;s=n.next()){var o=s.value;if(o.isDisposed())this._prevTooltipDataItem=void 0;else{var l=o.interactions.isRealHover;o.isHover=!1,l&&o.dispatchImmediately("out")}}}catch(u){t={error:u}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},i.prototype.shouldCreateBullet=function(e,t){var r=t.xField;P(r)||(r=this.xField);var n=t.yField;if(P(n)||(n=this.yField),this.xAxis instanceof re&&!e.hasValue([r])||this.yAxis instanceof re&&!e.hasValue([n]))return!1;if(t.disabled){var s=t.propertyFields.disabled,o=e.dataContext;return!!(o&&o[s]===!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){a.prototype.positionBullet.call(this,e);var t=e.dataItem,r=e.xField;P(r)||(r=this.xField);var n=e.yField;P(n)||(n=this.yField);var s=this.xAxis,o=this.yAxis;if(s instanceof re&&!t.hasValue([r])||o instanceof re&&!t.hasValue([n]))e.visible=!1;else{var l=this.getBulletLocationX(e,r),u=this.getBulletLocationY(e,n),h=this.getPoint(t,r,n,l,u);if(h){var p=this.xOpenField,d=this.yOpenField,c=void 0,f=void 0;if(s instanceof xe){S(l)||(l=0);var m=void 0,y=t.getWorkingValue(r);p?m=t.getWorkingValue(p):s==this.baseAxis&&(m=s.baseValue),S(m)||(m=y);var v=t.getValue("valueX","stack");if(m+=v,y+=v,m==y){var b=s.baseInterval,x=s.dateFormatter;m=At(new Date(m),b.timeUnit,b.count,x.firstDayOfWeek,x.utc,void 0,x.timezoneMinutes,x.timezone).getTime(),y=Jt(new Date(m),b.timeUnit,b.count,x.utc).getTime()}var _=void 0;s==this.baseAxis?_=m+(y-m)*l:_=m+(y-m)*(1-l),c=s.valueToPosition(_)}else if(s instanceof re){S(l)||(l=0);var m=void 0,y=t.getWorkingValue(r);p?m=t.getWorkingValue(p):m=s.baseValue;var v=t.getValue("valueX","stack");m+=v,y+=v;var _=m+(y-m)*(1-l);c=s.valueToPosition(_)}else if(s instanceof we){var $=this.getAdjustedXLocation(t,r,e.locationX),O=this.getAdjustedXLocation(t,p,e.locationX);c=s.categoryToPosition(t[r],$);var F=void 0;p&&(F=s.categoryToPosition(t[p],O)),S(F)||(F=1),c=F+(c-F)*l}if(o instanceof xe){S(u)||(u=0);var m=void 0,y=t.getWorkingValue(n);d?m=t.getWorkingValue(d):o==this.baseAxis&&(m=o.baseValue),S(m)||(m=y);var v=t.getValue("valueY","stack");if(m+=v,y+=v,m==y){var b=o.baseInterval,x=o.dateFormatter;m=At(new Date(m),b.timeUnit,b.count,x.firstDayOfWeek,x.utc,void 0,x.timezoneMinutes,x.timezone).getTime(),y=Jt(new Date(m),b.timeUnit,b.count,x.utc).getTime()}var _=void 0;o==this.baseAxis?_=m+(y-m)*u:_=m+(y-m)*(1-u),f=o.valueToPosition(_)}else if(o instanceof re){S(u)||(u=0);var m=void 0,y=t.getWorkingValue(n);d?m=t.getWorkingValue(d):m=o.baseValue;var v=t.getValue("valueY","stack");m+=v,y+=v;var _=m+(y-m)*(1-u);f=o.valueToPosition(_)}else if(o instanceof we){f=o.categoryToPosition(t[n],u);var w=this.getAdjustedYLocation(t,n,e.locationY),D=this.getAdjustedYLocation(t,d,e.locationY);f=o.categoryToPosition(t[n],w);var B=void 0;d&&(B=o.categoryToPosition(t[d],D)),S(B)||(B=1),f=B+(f-B)*u}e.visible=!0,this.positionBulletReal(e,c,f)}else e.visible=!1}},i.prototype.positionBulletReal=function(e,t,r){e.x=this.xAxis.renderer.positionToPoint(t,r).x,e.y=this.yAxis.renderer.positionToPoint(r,t).y},i.prototype.getBulletLocationX=function(e,t){var r=e.locationX,n=e.dataItem;return S(r)||(r=n.workingLocations[t]),r},i.prototype.getBulletLocationY=function(e,t){var r=e.locationY,n=e.dataItem;return S(r)||(r=n.workingLocations[t]),r},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=this.xAxis,r=this.yAxis;if(!e){var n;t!=this.baseAxis&&t instanceof re&&(n=this.xField),r!=this.baseAxis&&r instanceof re&&(n=this.yField),n&&this.dataItems.each(function(s){s.setCalculatedValue(n,0,"stack"),s.setCalculatedValue(n,0,"stackTrue")})}}},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=this;this.isHidden&&(this.appeared&&this.xAxis instanceof xe&&this.xAxis.groupData&&(this._tmin.setKey(this.yAxis.uid,void 0),this._tmax.setKey(this.yAxis.uid,void 0)),this.appeared&&this.yAxis instanceof xe&&this.yAxis.groupData&&(this._tmin.setKey(this.xAxis.uid,void 0),this._tmax.setKey(this.xAxis.uid,void 0)));var r;this.xAxis instanceof re&&this.xAxis!=this.baseAxis&&(r=this._xValueFields),this.yAxis instanceof re&&this.yAxis!=this.baseAxis&&(r=this._yValueFields);var n=this.startIndex,s=this.endIndex,o=0,l=this.defaultState.transitionDuration;S(e)&&(l=e),ge.animationsEnabled||(l=0);var u;I(pr(this.dataItems.iterator()),function(p){var d=p[0],c=p[1],f=l;(d<t.startIndex-10||d>t.endIndex+10)&&(f=0,o=0),t.sequencedInterpolation&&f>0&&(o=t.sequencedInterpolationDelay*d+l*(d-n)/(s-n)),u=c.show(f,o,r)}),this.dataSets.each(function(p,d){d!=t.dataItems&&d.each(function(c){c.events.disable(),c.show(0,0,r),c.events.enable()})}),this.mainDataSet!=this.dataItems&&this.mainDataSet.each(function(p){p.events.disable(),p.show(0,0,r),p.events.enable()});var h=a.prototype.show.call(this,e);return u&&!u.isFinished()&&(h=u),this.hidden&&(this.dispatchImmediately("selectionextremeschanged"),this.hidden=!1),h},i.prototype.hide=function(e){var t=this,r,n,s=this.xAxis;s instanceof re&&s!=this.baseAxis&&(r=this._xValueFields,this.stacked||s.minZoomed<s.baseValue&&s.maxZoomed>s.baseValue||this.stackedSeries?n=s.baseValue:n=s.min);var o=this.yAxis;o instanceof re&&o!=this.baseAxis&&(r=this._yValueFields,this.stacked||o.minZoomed<o.baseValue&&o.maxZoomed>o.baseValue||this.stackedSeries?n=o.baseValue:n=o.min);var l=this.startIndex,u=this.endIndex,h=this.hiddenState.transitionDuration;S(e)&&(h=e),ge.animationsEnabled||(h=0);var p=0,d;I(pr(this.dataItems.iterator()),function(f){var m=f[0],y=f[1],v=h;(m<t.startIndex-10||m>t.endIndex+10)&&(v=0),v==0?y.hide(0,0,n,r):(t.sequencedInterpolation&&v>0&&(p=t.sequencedInterpolationDelay*m+h*(m-l)/(u-l)),d=y.hide(v,p,n,r))}),this.dataSets.each(function(f,m){m!=t.dataItems&&m.each(function(y){y.events.disable(),y.hide(0,0,n,r),y.events.enable()})}),this.mainDataSet!=this.dataItems&&this.mainDataSet.each(function(f){f.events.disable(),f.hide(0,0,n,r),f.events.enable()});var c=a.prototype.hide.call(this,h);return c&&!c.isFinished()&&c.delay(p),d&&!d.isFinished()&&(c=d),this.appeared&&this.dispatch("selectionextremeschanged"),this.validateDataElements(),c},i.prototype.handleDataItemWorkingValueChange=function(e,t){a.prototype.handleDataItemWorkingValueChange.call(this,e,t);var r=this.baseAxis.series;I(r.iterator(),function(n){(n.stacked||n.stackedSeries)&&n.invalidateProcessedData()})},i.prototype.getStackValue=function(e,t){var r=this,n=this.xAxis,s=this.yAxis;if(!(!this.stacked||!n||!s)){var o=this.chart,l=o.series.indexOf(this),u;if(n!=this.baseAxis&&n instanceof re&&(u=this.xField),s!=this.baseAxis&&s instanceof re&&(u=this.yField),!u)return;e.setCalculatedValue(u,0,"stack"),e.setCalculatedValue(u,0,"stackTrue"),Dt(o.series.range(0,l).backwards().iterator(),function(h){if(h.xAxis==n&&h.yAxis==s&&h.className==r.className){h.stackedSeries=r;var p=h.dataItems.getIndex(e.index);if(p&&p.hasValue(r._xValueFields)&&p.hasValue(r._yValueFields)){var d=e.getValue(u),c=void 0,f=p.getValue(u,"stackTrue");f==null&&(f=0);var m=p.getValue(u)+f;if(c=p.getWorkingValue(u)+p.getValue(u,"stack"),r.stackToNegative){if(d>=0&&m>=0||d<0&&m<0)return e.setCalculatedValue(u,c,"stack"),e.setCalculatedValue(u,m,"stackTrue"),!1;if(!h.stacked)return!1}else return e.setCalculatedValue(u,c,"stack"),e.setCalculatedValue(u,m,"stackTrue"),!1}else if(!h.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){var t=this._smin.getKey(e.uid);return t},i.prototype.selectionMax=function(e){var t=this._smax.getKey(e.uid);return t},i.prototype.processConfig=function(e){if(e){if(P(e.baseAxis)&&ce(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)),P(e.xAxis)&&ce(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)),P(e.yAxis)&&ce(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)),P(e.axisRanges)&&Xe(e.axisRanges))for(var t=0,r=e.axisRanges.length;t<r;t++){var n=e.axisRanges[t];P(n.type)||(n.type="AxisDataItem"),P(n.axis)&&ce(n.axis)&&this.map.hasKey(n.axis)?n.component=this.map.getKey(n.axis):P(n.component)&&ce(n.component)&&this.map.hasKey(n.component)&&(n.component=this.map.getKey(n.component))}(!P(e.dataFields)||!Be(e.dataFields))&&this.processingErrors.push("`dataFields` is not set for series ["+(this.name||"unnamed")+"]")}a.prototype.processConfig.call(this,e)},i.prototype.getPoint=function(e,t,r,n,s,o,l){if(this.xAxis&&this.yAxis){var u=this.xAxis.getX(e,t,n),h=this.yAxis.getY(e,r,s);return u=G(u,-this._maxxX,this._maxxX),h=G(h,-this._maxxY,this._maxxY),{x:u,y:h}}},i.prototype.updateItemReaderText=function(){if(!this._itemReaderTextChanged){var e="";te(this.dataFields,function(t,r){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&&(e?this.bulletsContainer.parent=t.bulletsContainer:this.bulletsContainer.parent=t.axisBulletsContainer)},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){this.groupFields=xi(e.groupFields,{}),a.prototype.copyFrom.call(this,e)},i.prototype.dispose=function(){this.scrollbarSeries&&this.scrollbarSeries.dispose(),a.prototype.dispose.call(this)},i})(Lr);C.registeredClasses.XYSeries=Nt;C.registeredClasses.XYSeriesDataItem=An;var Hu=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="ZoomOutButton",e.padding(9,9,9,9),e.showSystemTooltip=!0;var t=new se,r=e.background;r.cornerRadius(20,20,20,20),r.fill=t.getFor("primaryButton"),r.stroke=t.getFor("primaryButtonStroke"),r.strokeOpacity=0,r.states.getKey("hover").properties.fill=t.getFor("primaryButtonHover"),r.states.getKey("down").properties.fill=t.getFor("primaryButtonActive");var n=new ee;n.element=e.paper.add("path");var s=W({x:0,y:0});return s+=k({x:11,y:0}),n.path=s,n.pixelPerfect=!0,n.padding(8,3,8,3),n.stroke=t.getFor("primaryButtonText"),e.icon=n,e.applyTheme(),e}return i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Zoom Out"))},i})(Pi);C.registeredClasses.ZoomOutButton=Hu;var Vn=(function(a){T(i,a);function i(){var e=a.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 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})(Ji);C.registeredClasses.DesaturateFilter=Vn;var Pa=(function(a){T(i,a);function i(){var e=a.call(this)||this;e._chart=new Ue,e.className="XYChartScrollbar";var t=new se;e.padding(0,0,0,0);var r=e.createChild(rt);if(r.shouldClone=!1,r.margin(0,0,0,0),r.padding(0,0,0,0),r.interactionsEnabled=!1,e._scrollbarChart=r,!Qr()){var n=new Vn;n.filterUnits="userSpaceOnUse",r.plotContainer.filters.push(n)}e._disposers.push(e._scrollbarChart),e.minHeight=60,e.minWidth=60;var s=e.createChild(ee);s.shouldClone=!1,s.setElement(e.paper.add("path")),s.fill=t.getFor("background"),s.fillOpacity=.8,s.interactionsEnabled=!1,s.isMeasured=!1,s.toBack(),e._unselectedOverlay=s,e._disposers.push(e._unselectedOverlay),r.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 u=o.states.getKey("down");return u&&(u.properties.fillOpacity=.4),e._disposers.push(e._chart),e.applyTheme(),e}return Object.defineProperty(i.prototype,"series",{get:function(){return this._series||(this._series=new ve,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,r=e.newValue;if(!(!r.xAxis||!r.yAxis)){var n=this.scrollbarChart;n.zoomOutButton.disabled=!0,this.chart=r.chart,n.dateFormatter.inputDateFormat=this.chart.dateFormatter.inputDateFormat,n.language.locale=this.chart.language.locale;var s=!0,o=!0;I(this.series.iterator(),function(x){x!=r&&(x.xAxis==r.xAxis&&t.scrollbarChart.xAxes.length>0&&(s=!1),x.yAxis==r.yAxis&&t.scrollbarChart.yAxes.length>0&&(o=!1))}),r.events.on("beforedisposed",function(){t.series.removeValue(r)});var l=new se,u=r.clone();if((ge.onlyShowOnViewport||ge.queue)&&this.addDisposer(this.chart.events.on("removedfromqueue",function(){n.invalidateData()})),Qr()&&(u.stroke=ie("#aaaaaa"),u.fill=u.stroke,u.propertyFields.fill=void 0,u.propertyFields.stroke=void 0),r.scrollbarSeries=u,s){var h=r.xAxis.clone();n.xAxes.moveValue(h),h.title.disabled=!0,h.rangeChangeDuration=0;var p=h.renderer;p.ticks.template.disabled=!0,p.inside=!0,p.labels.template.inside=!0,p.line.strokeOpacity=0,p.minLabelPosition=.02,p.maxLabelPosition=.98,p.line.disabled=!0,p.axisFills.template.disabled=!0,p.baseGrid.disabled=!0,p.grid.template.strokeOpacity=.05,p.minWidth=void 0,p.minHeight=void 0,p.padding(0,0,0,0),p.chart=n,p.margin(0,0,0,0),h.width=N(100);var d=p.labels.template;if(d.fillOpacity=.5,h.maxZoomCount=void 0,h.minZoomCount=void 0,h instanceof xe){var c=h,f=r.xAxis;c.groupCount=f.groupCount*5,c.min=void 0,c.max=void 0,this._disposers.push(c.clonedFrom.events.on("extremeschanged",function(){S(c.clonedFrom.minDefined)&&(c.min=c.clonedFrom.minDefined),S(c.clonedFrom.maxDefined)&&(c.max=c.clonedFrom.maxDefined)},void 0,!1))}else if(h instanceof re){var m=h;m.min=void 0,m.max=void 0,S(m.clonedFrom.minDefined)||(m.min=void 0),S(m.clonedFrom.maxDefined)||(m.max=void 0),this._disposers.push(m.clonedFrom.events.on("extremeschanged",function(){S(m.clonedFrom.minDefined)&&(m.min=m.clonedFrom.min),S(m.clonedFrom.maxDefined)&&(m.max=m.clonedFrom.max)},void 0,!1))}u.xAxis=h}else this.scrollbarChart.xAxes.each(function(x){x.clonedFrom==r.xAxis&&(u.xAxis=x)});if(o){var y=r.yAxis.clone();n.yAxes.moveValue(y),y.title.disabled=!0,y.rangeChangeDuration=0;var p=y.renderer;p.ticks.template.disabled=!0,p.inside=!0,p.labels.template.inside=!0,p.line.strokeOpacity=0,p.minLabelPosition=.02,p.maxLabelPosition=.98,p.line.disabled=!0,p.axisFills.template.disabled=!0,p.grid.template.stroke=l.getFor("background"),p.baseGrid.disabled=!0,p.grid.template.strokeOpacity=.05,p.minWidth=void 0,p.minHeight=void 0,p.chart=n,p.padding(0,0,0,0),p.margin(0,0,0,0),y.height=N(100);var d=p.labels.template;if(d.fillOpacity=.5,u.yAxis=y,y.maxZoomCount=void 0,y.minZoomCount=void 0,y instanceof xe){var v=y;v.min=void 0,v.max=void 0;var f=r.yAxis;y.groupCount=f.groupCount*5,this._disposers.push(v.clonedFrom.events.on("extremeschanged",function(){S(v.clonedFrom.minDefined)&&(v.min=v.clonedFrom.minDefined),S(v.clonedFrom.maxDefined)&&(v.max=v.clonedFrom.maxDefined)}))}else if(y instanceof re){var b=y;b.min=void 0,b.max=void 0,S(b.clonedFrom.minDefined)||(b.min=void 0),S(b.clonedFrom.maxDefined)||(b.max=void 0),this._disposers.push(b.clonedFrom.events.on("extremeschanged",function(){S(b.clonedFrom.minDefined)&&(b.min=b.clonedFrom.minDefined),S(b.clonedFrom.maxDefined)&&(b.max=b.clonedFrom.maxDefined)}))}}else this.scrollbarChart.yAxes.each(function(x){x.clonedFrom==r.yAxis&&(u.yAxis=x)});u.rangeChangeDuration=0,u.interpolationDuration=0,u.defaultState.transitionDuration=0,u.showOnInit=!1,this._disposers.push(u.events.on("validated",this.zoomOutAxes,this,!1)),this._disposers.push(r.events.on("datavalidated",function(){u.data!=r.data&&(u.data=r.data)},void 0,!1)),u.defaultState.properties.visible=!0,n.series.push(u),this.updateByOrientation()}},i.prototype.updateByOrientation=function(){var e=this;this._scrollbarChart&&(I(this._scrollbarChart.xAxes.iterator(),function(t){var r=t.renderer;e.orientation=="vertical"?(r.grid.template.disabled=!0,r.labels.template.disabled=!0,r.minGridDistance=10):(r.grid.template.disabled=!1,r.labels.template.disabled=!1,r.minGridDistance=t.clonedFrom.renderer.minGridDistance)}),I(this._scrollbarChart.yAxes.iterator(),function(t){var r=t.renderer;e.orientation=="horizontal"?(r.grid.template.disabled=!0,r.labels.template.disabled=!0,r.minGridDistance=10):(r.grid.template.disabled=!1,r.labels.template.disabled=!1,r.minGridDistance=t.clonedFrom.renderer.minGridDistance)}))},i.prototype.handleSeriesRemoved=function(e){var t=e.oldValue,r=this.scrollbarChart;r.series.each(function(n){n&&n.clonedFrom==t&&r.series.removeValue(n)}),r.series.length==0&&(r.xAxes.clear(),r.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;I(e.xAxes.iterator(),function(t){t.zoom({start:0,end:1},!0,!0)}),I(e.yAxes.iterator(),function(t){t.zoom({start:0,end:1},!0,!0)})},i.prototype.updateThumb=function(e){if(e===void 0&&(e=!0),a.prototype.updateThumb.call(this,e),this._unselectedOverlay){var t=this.thumb,r=t.pixelX||0,n=t.pixelY||0,s=t.pixelWidth||0,o=t.pixelHeight||0,l="";this.orientation=="horizontal"?(l=Zi({x:-1,y:0,width:r,height:o}),l+=Zi({x:r+s,y:0,width:(this.pixelWidth||0)-r-s,height:o})):(l=Zi({x:0,y:0,width:s,height:n}),l+=Zi({x:0,y:n+o,width:s,height:(this.pixelHeight||0)-n-o})),this._unselectedOverlay.path=l}},i.prototype.processConfig=function(e){if(e&&P(e.series)&&Xe(e.series))for(var t=0,r=e.series.length;t<r;t++){var n=e.series[t];if(P(n)&&ce(n))if(this.map.hasKey(n))e.series[t]=this.map.getKey(n);else throw Error("XYChartScrollbar error: Series with id `"+n+"` does not exist.")}a.prototype.processConfig.call(this,e)},i})(Ha);C.registeredClasses.XYChartScrollbar=Pa;var Ln=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="XYChartDataItem",e.applyTheme(),e}return i})(nl);var rt=(function(a){T(i,a);function i(){var e=a.call(this)||this;e._axisRendererX=xt,e._axisRendererY=Ot,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 r=t.createChild(U);r.shouldClone=!1,r.layout="vertical",r.width=N(100),r.zIndex=1,e.topAxesContainer=r;var n=t.createChild(U);n.shouldClone=!1,n.layout="horizontal",n.width=N(100),n.height=N(100),n.zIndex=0,e.yAxesAndPlotContainer=n;var s=t.createChild(U);s.shouldClone=!1,s.width=N(100),s.layout="vertical",s.zIndex=1,e.bottomAxesContainer=s;var o=n.createChild(U);o.shouldClone=!1,o.layout="horizontal",o.height=N(100),o.contentAlign="right",o.events.on("transformed",e.updateXAxesMargins,e,!1),o.zIndex=1,e.leftAxesContainer=o;var l=n.createChild(U);l.shouldClone=!1,l.height=N(100),l.width=N(100),l.background.fillOpacity=0,e.plotContainer=l,e.mouseWheelBehavior="none",e._cursorContainer=l;var u=n.createChild(U);u.shouldClone=!1,u.layout="horizontal",u.height=N(100),u.zIndex=1,u.events.on("transformed",e.updateXAxesMargins,e,!1),e.rightAxesContainer=u,e.seriesContainer.parent=l,e.bulletsContainer.parent=l;var h=l.createChild(Hu);h.shouldClone=!1,h.align="right",h.valign="top",h.zIndex=Number.MAX_SAFE_INTEGER,h.marginTop=5,h.marginRight=5,h.hide(0),e.zoomOutButton=h;var p=e.plotContainer.createChild(U);return p.shouldClone=!1,p.width=N(100),p.height=N(100),p.isMeasured=!1,p.zIndex=4,p.layout="none",e.axisBulletsContainer=p,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 i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),this.zoomOutButton.exportable=!1,P(this.readerTitle)||(this.readerTitle=this.language.translate("X/Y chart"))},i.prototype.draw=function(){a.prototype.draw.call(this),this.seriesContainer.toFront(),this.bulletsContainer.toFront(),this.maskBullets&&(this.bulletsContainer.mask=this._bulletMask),this.updateSeriesLegend()},i.prototype.updatePlotElements=function(){I(this.series.iterator(),function(e){e.invalidate()})},i.prototype.validateData=function(){this._parseDataFrom==0&&(I(this.xAxes.iterator(),function(e){e.dataChangeUpdate()}),I(this.yAxes.iterator(),function(e){e.dataChangeUpdate()}),I(this.series.iterator(),function(e){e.dataChangeUpdate()})),a.prototype.validateData.call(this)},i.prototype.updateXAxesMargins=function(){var e=this.leftAxesContainer.measuredWidth,t=this.rightAxesContainer.measuredWidth,r=this.bottomAxesContainer;(r.paddingLeft!=e||r.paddingRight!=t)&&(r.paddingLeft=e,r.paddingRight=t);var n=this.topAxesContainer;(n.paddingLeft!=e||n.paddingRight!=t)&&(n.paddingLeft=e,n.paddingRight=t)},i.prototype.reinit=function(){a.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;Dt(this.xAxes.iterator(),function(t){if(t.toggleZoomOutButton){if(t.maxZoomCount>0){var r=t.maxZoomFactor/t.maxZoomCount;if(E(t.end-t.start,3)<1/r)return e=!0,!1}else if(E(t.start,3)>0||E(t.end,3)<1)return e=!0,!1}return!0}),Dt(this.yAxes.iterator(),function(t){if(t.toggleZoomOutButton){if(t.maxZoomCount>0){var r=t.maxZoomFactor/t.maxZoomCount;if(E(t.end-t.start,3)<1/r)return e=!0,!1}else if(E(t.start,3)>0||E(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 I(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,r;return e.each(function(n){if(!(!n.zoomable||n instanceof re&&n.syncWithAxis)){var s=n.start,o=n.end;n.renderer.inversed&&(s=1-n.end,o=1-n.start),(!S(t)||s<t)&&(t=s),(!S(r)||o>r)&&(r=o)}}),{start:t,end:r}},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 we&&this._dataUsers.moveValue(e);var r=e.renderer;r.gridContainer.parent=this.plotContainer,r.gridContainer.toBack(),r.breakContainer.parent=this.plotContainer,r.breakContainer.toFront(),r.breakContainer.zIndex=10,e.addDisposer(new Ce(function(){t.dataUsers.removeValue(e)})),r.bulletsContainer.parent=this.axisBulletsContainer,this._disposers.push(e.events.on("positionchanged",function(){var n=It({x:0,y:0},e,t.axisBulletsContainer);e.renderer instanceof Ot&&(r.bulletsContainer.y=n.y),e.renderer instanceof xt&&(r.bulletsContainer.x=n.x)},void 0,!1)),this.plotContainer.events.on("maxsizechanged",function(){t.inited&&(e.invalidateDataItems(),t.updateSeriesMasks())},e,!1)},i.prototype.updateSeriesMasks=function(){Qr()&&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(r){r.resetExtremes()})),a.prototype.handleSeriesRemoved.call(this,e)},Object.defineProperty(i.prototype,"xAxes",{get:function(){return this._xAxes||(this._xAxes=new ve,this._xAxes.events.on("inserted",this.processXAxis,this,!1),this._xAxes.events.on("removed",this.handleAxisRemoval,this,!1),this._disposers.push(new Pe(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 ve,this._yAxes.events.on("inserted",this.processYAxis,this,!1),this._yAxes.events.on("removed",this.handleAxisRemoval,this,!1),this._disposers.push(new Pe(this._yAxes,!1))),this._yAxes},enumerable:!0,configurable:!0}),i.prototype.handleSeriesAdded=function(e){try{a.prototype.handleSeriesAdded.call(this,e);var t=e.newValue;(this.xAxes.length==0||this.yAxes.length==0)&&(C.removeFromInvalidComponents(t),t.dataInvalid=!1),t.xAxis,t.yAxis,t.maskBullets=t.maskBullets,t.fill==null&&(this.patterns?(P(t.stroke)||(t.stroke=this.colors.next()),t.fill=this.patterns.next(),P(t.fillOpacity)&&(t.fill.backgroundOpacity=t.fillOpacity),t.stroke instanceof be&&(t.fill.stroke=t.stroke,t.fill.fill=t.stroke)):t.fill=this.colors.next()),P(t.stroke)||(t.stroke=t.fill)}catch(r){this.raiseCriticalError(r)}},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,r=this.cursor.yPosition;this.showSeriesTooltip({x:t,y:r});var n=[],s=e.snapToSeries;if(s&&!e.downPoint){s instanceof Nt&&(s=[s]);var o=[];H(s,function(u){if(!u.isHidden&&!u.isHiding){var h=u.xAxis,p=u.yAxis;h instanceof re&&!(h instanceof xe)&&p instanceof re&&!(p instanceof xe)?(u.dataItems.each(function(d){o.push(d)}),bi(n,u.yAxis),bi(n,u.xAxis)):(u.baseAxis==u.xAxis&&(bi(n,u.yAxis),o.push(h.getSeriesDataItem(u,h.toAxisPosition(t),!0))),u.baseAxis==u.yAxis&&(bi(n,u.xAxis),o.push(p.getSeriesDataItem(u,p.toAxisPosition(r),!0))))}});var l=this.getClosest(o,t,r);l&&(this.series.each(function(u){var h=l.component;u!=h&&(u.hideTooltip(),u.xAxis!=h.xAxis&&(u.xAxis.hideTooltip(),n.push(u.xAxis)),u.yAxis!=h.yAxis&&(u.yAxis.hideTooltip(),n.push(u.yAxis)))}),l.component.showTooltipAtDataItem(l),e.handleSnap(l.component))}this._seriesPoints=[],this._cursorXPosition!=t&&this.showAxisTooltip(this.xAxes,t,n),this._cursorYPosition!=r&&this.showAxisTooltip(this.yAxes,r,n),this.arrangeTooltips&&this.sortSeriesTooltips(this._seriesPoints),this.legend&&this.legend.afterDraw()}},i.prototype.getClosest=function(e,t,r){var n=1/0,s;return vs(e,function(o){if(o){var l=o.component.xAxis,u=o.component.yAxis,h=l.positionToCoordinate(l.toGlobalPosition(l.toAxisPosition(t))),p=u.positionToCoordinate(u.toGlobalPosition(u.toAxisPosition(r))),d=o.component.xField,c=o.component.yField;if(l instanceof re&&!S(o.getValue(d))||u instanceof re&&!S(o.getValue(c)))return!0;var f=l.positionToCoordinate(l.toGlobalPosition(l.getPositionX(o,d,o.locations[d],"valueX"))),m=u.positionToCoordinate(u.toGlobalPosition(u.getPositionY(o,c,o.locations[c],"valueY"))),y=Math.sqrt(Math.pow(h-f,2)+Math.pow(p-m,2));return y<n&&(n=y,s=o),!0}}),s},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(){I(this.series.iterator(),function(e){e.updateLegendValue()})},i.prototype.hideObjectTooltip=function(e){I(e.iterator(),function(t){t.cursorTooltipEnabled&&t.hideTooltip(0)})},i.prototype.showSeriesTooltip=function(e){var t=this;if(!e){this.series.each(function(n){n.hideTooltip()});return}var r=[];this.series.each(function(n){if(!(n.xAxis instanceof xe&&n.xAxis.snapTooltip||n.yAxis instanceof xe&&n.yAxis.snapTooltip)){var s=n.showTooltipAtPosition(e.x,e.y);s&&(n.tooltip.setBounds(Sn({x:0,y:0,width:t.pixelWidth,height:t.pixelHeight},t)),r.push({series:n,point:s}))}}),this.arrangeTooltips&&this.sortSeriesTooltips(r)},i.prototype.sortSeriesTooltips=function(e){if(e.length>0){var t=this.cursor;if(t&&S(t.maxTooltipDistance)){var r=di({x:t.point.x,y:t.point.y},t),n,s,o=1/0;H(e,function(L){var M=L.series,Q=L.point;if(Q){var ae={x:Q.x,y:Q.y},K=Math.abs(_e(ae,r));K<o&&(s=ae,o=K,n=M)}});var l=[];n&&(H(e,function(L){if(Math.abs(_e(L.point,s))<=Math.abs(t.maxTooltipDistance))l.push({series:L.series,point:L.point});else{var M=L.series.tooltipDataItem;M&&H(M.sprites,function(Q){Q.isHover=!1,Q.handleOutReal()}),L.series.hideTooltip(0)}}),t.maxTooltipDistance<0&&(l.length>0&&H(l,function(L){n!=L.series&&L.series.hideTooltip(0)}),l=[{series:n,point:s}])),e=l}var u=di({x:-.5,y:-.5},this.plotContainer),h=di({x:this.plotContainer.pixelWidth+.5,y:this.plotContainer.pixelHeight+.5},this.plotContainer),p=0,d=[];H(e,function(L){var M=L.point;M&&lu(M,{x:u.x,y:u.y,width:h.x-u.x,height:h.y-u.y})&&(d.push({point:M,series:L.series}),p+=M.y)}),e=d;var c=this.series.getIndex(0),f=!1;c&&c.yAxis&&c.yAxis.renderer.inversed&&(f=!0),f?e.sort(function(L,M){return Fi(L.point.y,M.point.y)}):(e.sort(function(L,M){return Fi(M.point.y,L.point.y)}),e.reverse());var m=p/e.length,y=$u({x:0,y:0},this.svgContainer.SVGContainer).y;if(e.length>0){var v=u.y,b=h.y;Ls({x:0,y:v},this);var x=!1;if(m>v+(b-v)/2)for(var _=b,$=e.length-1;$>=0;$--){var O=e[$].series,F=O.tooltip,w=e[$].point.y;if(F.setBounds({x:0,y:-y,width:this.pixelWidth,height:_+y}),F.invalid&&F.validate(),F.toBack(),_=di({x:0,y:F.label.pixelY-F.pixelY+w-F.pixelMarginTop},F).y,_<-y){x=!0;break}}if(m<=v+(b-v)/2||x)for(var D=v,$=0,B=e.length;$<B;$++){var O=e[$].series,w=e[$].point.y,F=O.tooltip;F.setBounds({x:0,y:D,width:this.pixelWidth,height:b}),F.invalid&&F.validate(),F.toBack(),D=di({x:0,y:F.label.pixelY+F.label.measuredHeight-F.pixelY+w+F.pixelMarginBottom},F).y}}}},i.prototype.showAxisTooltip=function(e,t,r){var n=this;I(e.iterator(),function(s){(!r||r.indexOf(s)==-1)&&(n.dataItems.length>0||s.dataItems.length>0)&&s.showTooltipAtPosition(t)})},i.prototype.getUpdatedRange=function(e,t){if(e){var r,n,s=e.renderer.inversed;s?(ys(t),r=1-e.end,n=1-e.start):(r=e.start,n=e.end);var o=n-r;return{start:r+t.start*o,end:r+t.end*o}}},i.prototype.handleCursorZoomEnd=function(e){var t=this.cursor,r=t.behavior;if(r=="zoomX"||r=="zoomXY"){var n=t.xRange;n&&this.xAxes.length>0&&(n=this.getUpdatedRange(this.xAxes.getIndex(0),n),n.priority="start",this.zoomAxes(this.xAxes,n))}if(r=="zoomY"||r=="zoomXY"){var s=t.yRange;s&&this.yAxes.length>0&&(s=this.getUpdatedRange(this.yAxes.getIndex(0),s),s.priority="start",this.zoomAxes(this.yAxes,s))}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=ys(this._panStartXRange)));var r=this.yAxes.getIndex(0);r&&(this._panStartYRange={start:r.start,end:r.end},r.renderer.inversed&&(this._panStartYRange=ys(this._panStartYRange)))},i.prototype.handleCursorPanEnd=function(e){var t=this.cursor,r=t.behavior;if(this._panEndXRange&&(r=="panX"||r=="panXY")){var n=this._panEndXRange,s=this._panStartXRange,o=0;n.start<0&&(o=n.start),s.end>1?n.end>s.end&&(o=n.end-s.end):n.end>1&&(o=n.end-1),this.zoomAxes(this.xAxes,{start:n.start-o,end:n.end-o},!1,t.snapOnPan),this._panEndXRange=void 0,this._panStartXRange=void 0}if(this._panEndYRange&&(r=="panY"||r=="panXY")){var n=this._panEndYRange,o=0;n.start<0&&(o=n.start),n.end>1&&(o=n.end-1),this.zoomAxes(this.yAxes,{start:n.start-o,end:n.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,r=t.behavior,n=t.maxPanOut;if(this._panStartXRange&&(r=="panX"||r=="panXY")){var s=this._panStartXRange,o=t.xRange,l=this.getCommonAxisRange(this.xAxes),u=s.end-s.start,h=o.start*(l.end-l.start),p=Math.max(-n,h+s.start),d=Math.min(h+s.end,1+n);p<=0&&(d=p+u),d>=1&&(p=d-u);var c={start:p,end:d};this._panEndXRange=c,this.zoomAxes(this.xAxes,c,!1,!1,t.maxPanOut)}if(this._panStartYRange&&(r=="panY"||r=="panXY")){var s=this._panStartYRange,o=t.yRange,l=this.getCommonAxisRange(this.yAxes),u=s.end-s.start,h=o.start*(l.end-l.start),p=Math.max(-n,h+s.start),d=Math.min(h+s.end,1+n);p<=0&&(d=p+u),d>=1&&(p=d-u);var c={start:p,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(r){var n=t.xAxes.getIndex(0);return n&&(r.value=n.getPositionLabel(n.renderer.inversed?1-r.position:r.position)),r}),e.adapter.add("positionValueDirection",function(r){var n=t.xAxes.getIndex(0);return n&&(r.flipped=n.renderer.inversed),r}))},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(r){var n=t.yAxes.getIndex(0);return n&&(r.value=n.getPositionLabel(n.renderer.inversed?r.position:1-r.position)),r}),e.adapter.add("positionValueDirection",function(r){var n=t.yAxes.getIndex(0);return n&&(r.flipped=!n.renderer.inversed),r}))},enumerable:!0,configurable:!0}),i.prototype.handleXScrollbarChange=function(e){if(this.inited){var t=e.target,r=t.range;r.start==0&&(r.priority="start"),r.end==1&&(r.priority="end"),r=this.zoomAxes(this.xAxes,r),t.fixRange(r)}},i.prototype.handleYScrollbarChange=function(e){if(this.inited){var t=e.target,r=t.range;r.end==1&&(r.priority="end"),r.start==0&&(r.priority="start"),r=this.zoomAxes(this.yAxes,r),t.fixRange(r)}},i.prototype.zoomAxes=function(e,t,r,n,s,o){var l={start:0,end:1};this.showSeriesTooltip();var u=t;return this.dataInvalid||I(e.iterator(),function(h){var p=h.maxZoomFactor;if(S(h.minZoomCount)&&(p=p/h.minZoomCount),!(o&&1/(t.end-t.start)>=p)){if(h.zoomable){if(h.renderer.inversed?t=ys(u):t=u,h.hideTooltip(0),n)if(h instanceof we){var d=h.getCellEndPosition(0)-h.getCellStartPosition(0);t.start=h.roundPosition(t.start+d/2-h.startLocation*d,h.startLocation),t.end=h.roundPosition(t.end-d/2+(1-h.endLocation)*d,h.endLocation)}else{var c=1e-4;t.start=h.roundPosition(t.start+c,0,h.startLocation),t.end=h.roundPosition(t.end+c,0,h.endLocation)}var f=h.zoom(t,r,r,s);h.renderer.inversed&&(f=ys(f)),l=f}}}),l},Object.defineProperty(i.prototype,"maskBullets",{get:function(){return this.getPropertyValue("maskBullets")},set:function(e){this.setPropertyValue("maskBullets",e,!0)&&this.bulletsContainer&&(e?this.bulletsContainer.mask=this._bulletMask:this.bulletsContainer.mask=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,r=_r(e.point,this.htmlContainer,this.svgContainer.cssScale),n=Qt(r,t),s=e.shift.y;this.handleWheelReal(s,this.mouseWheelBehavior,n)},i.prototype.handleHorizontalWheel=function(e){var t=this.plotContainer,r=_r(e.point,this.htmlContainer,this.svgContainer.cssScale),n=Qt(r,t);this.handleWheelReal(e.shift.x,this.horizontalMouseWheelBehavior,n)},i.prototype.handleWheelReal=function(e,t,r){if(e!=0){var n=this.plotContainer,s=this.getCommonAxisRange(this.xAxes),o=this.getCommonAxisRange(this.yAxes),l=.1,u=0;if(t=="panX"||t=="panXY"){var h=this.xAxes.getIndex(0),p=!1,d=l;h instanceof we&&(d=.5/((s.end-s.start)*h.dataItems.length),p=!0),l=Math.max(.2,d);var c=s.end-s.start,f=Math.max(-u,s.start+l*e/100*(s.end-s.start)),m=Math.min(s.end+l*e/100*(s.end-s.start),1+u);f<=0&&(m=f+c),m>=1&&(f=m-c),this.zoomAxes(this.xAxes,{start:f,end:m},void 0,p)}if(t=="panY"||t=="panXY"){var y=this.yAxes.getIndex(0),d=l,p=!1;y instanceof we&&(d=.5/((s.end-s.start)*y.dataItems.length),p=!0),l=Math.max(.2,d),e*=-1;var v=o.end-o.start,b=Math.max(-u,o.start+l*e/100*(o.end-o.start)),x=Math.min(o.end+l*e/100*(o.end-o.start),1+u);b<=0&&(x=b+v),x>=1&&(b=x-v),this.zoomAxes(this.yAxes,{start:b,end:x},void 0,p)}if(t=="zoomX"||t=="zoomXY"){var _=r.x/n.maxWidth,$=this.xAxes.getIndex(0).toAxisPosition(_),f=Math.max(-u,s.start-l*(s.end-s.start)*e/100*_);f=Math.min(f,$);var m=Math.min(s.end+l*(s.end-s.start)*e/100*(1-_),1+u);m=Math.max(m,$),this.zoomAxes(this.xAxes,{start:f,end:m},void 0)}if(t=="zoomY"||t=="zoomXY"){var O=r.y/n.maxHeight,F=this.yAxes.getIndex(0).toAxisPosition(O),b=Math.max(-u,o.start-l*(o.end-o.start)*e/100*(1-O));b=Math.min(b,F);var x=Math.min(o.end+l*e/100*O*(o.end-o.start),1+u);x=Math.max(x,F),this.zoomAxes(this.yAxes,{start:b,end:x},void 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=a.prototype.dataSourceDateFields.call(this,e),I(this.series.iterator(),function(r){e=t.populateDataSourceFields(e,r.dataFields,["dateX","dateY","openDateX","openDateY"])}),e},i.prototype.dataSourceNumberFields=function(e){var t=this;return e=a.prototype.dataSourceDateFields.call(this,e),I(this.series.iterator(),function(r){e=t.populateDataSourceFields(e,r.dataFields,["valueX","valueY","openValueX","openValueY"])}),e},i.prototype.processConfig=function(e){if(e){var t=[],r=[];if(P(e.xAxes)&&Xe(e.xAxes))for(var n=0,s=e.xAxes.length;n<s;n++)if(e.xAxes[n].type){if(P(e.xAxes[n].axisRanges)){for(var o=0,l=e.xAxes[n].axisRanges.length;o<l;o++){var u=e.xAxes[n].axisRanges[o];P(u.date)&&ce(u.date)&&(u.date=this.dateFormatter.parse(u.date)),P(u.endDate)&&ce(u.endDate)&&(u.endDate=this.dateFormatter.parse(u.endDate))}t.push({axisRanges:e.xAxes[n].axisRanges,index:n}),delete e.xAxes[n].axisRanges}}else throw Error("[XYChart error] No type set for xAxes["+n+"].");if(P(e.yAxes)&&Xe(e.yAxes))for(var n=0,s=e.yAxes.length;n<s;n++)if(e.yAxes[n].type){if(P(e.yAxes[n].axisRanges)){for(var o=0,h=e.yAxes[n].axisRanges.length;o<h;o++){var u=e.yAxes[n].axisRanges[o];P(u.date)&&ce(u.date)&&(u.date=this.dateFormatter.parse(u.date)),P(u.endDate)&&ce(u.endDate)&&(u.endDate=this.dateFormatter.parse(u.endDate))}r.push({axisRanges:e.yAxes[n].axisRanges,index:n}),delete e.yAxes[n].axisRanges}}else throw Error("[XYChart error] No type set for yAxes["+n+"].");if(P(e.series)&&Xe(e.series))for(var n=0,s=e.series.length;n<s;n++)e.series[n].type=e.series[n].type||"LineSeries";if(P(e.cursor)&&!P(e.cursor.type)&&(e.cursor.type="XYCursor"),P(e.scrollbarX)&&!P(e.scrollbarX.type)&&(e.scrollbarX.type="Scrollbar"),P(e.scrollbarY)&&!P(e.scrollbarY.type)&&(e.scrollbarY.type="Scrollbar"),a.prototype.processConfig.call(this,e),r.length)for(var n=0,s=r.length;n<s;n++)this.yAxes.getIndex(r[n].index).config={axisRanges:r[n].axisRanges};if(t.length)for(var n=0,s=t.length;n<s;n++)this.xAxes.getIndex(t[n].index).config={axisRanges:t[n].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:a.prototype.configOrder.call(this,e,t)},i.prototype.createSeries=function(){return new Nt},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(r){var n=t.xAxes.push(r.clone());n.chart=t,n.renderer.chart=t}),e.yAxes.each(function(r){var n=t.yAxes.push(r.clone());n.renderer.chart=t,n.chart=t}),a.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(){a.prototype.disposeData.call(this);var e=this.scrollbarX;e&&e instanceof Pa&&e.scrollbarChart.disposeData();var t=this.scrollbarY;t&&t instanceof Pa&&t.scrollbarChart.disposeData(),this.xAxes.each(function(r){r instanceof we&&r.disposeData()}),this.yAxes.each(function(r){r instanceof we&&r.disposeData()})},i.prototype.addData=function(e,t){this.scrollbarX instanceof Pa&&this.addScrollbarData(this.scrollbarX,t),this.scrollbarY instanceof Pa&&this.addScrollbarData(this.scrollbarY,t),a.prototype.addData.call(this,e,t)},i.prototype.addScrollbarData=function(e,t){var r=e.scrollbarChart;r._parseDataFrom=r.data.length,r.invalidateData()},i.prototype.removeScrollbarData=function(e,t){var r=e.scrollbarChart;if(S(t)){for(;t>0;){var n=this.dataItems.getIndex(0);n&&r.dataItems.remove(n),r.dataUsers.each(function(s){var o=s.dataItems.getIndex(0);o&&s.dataItems.remove(o)}),r._parseDataFrom--,t--}r.invalidateData()}},i.prototype.removeData=function(e){this.scrollbarX instanceof Pa&&this.removeScrollbarData(this.scrollbarX,e),this.scrollbarY instanceof Pa&&this.removeScrollbarData(this.scrollbarY,e),a.prototype.removeData.call(this,e)},i.prototype.setTapToActivate=function(e){a.prototype.setTapToActivate.call(this,e),this.cursor&&(this.cursor.interactions.isTouchProtected=e,this.plotContainer.interactions.isTouchProtected=e)},i.prototype.handleTapToActivate=function(){a.prototype.handleTapToActivate.call(this),this.cursor&&(this.cursor.interactions.isTouchProtected=!1,this.plotContainer.interactions.isTouchProtected=!1)},i.prototype.handleTapToActivateDeactivation=function(){a.prototype.handleTapToActivateDeactivation.call(this),this.cursor&&(this.cursor.interactions.isTouchProtected=!0,this.plotContainer.interactions.isTouchProtected=!0)},i})(Ca);C.registeredClasses.XYChart=rt;ht.push({relevant:yt.maybeXS,state:function(a,i){if(a instanceof rt&&a.scrollbarX){var e=a.states.create(i),t=a.scrollbarX.states.create(i);return t.properties.disabled=!0,e}return null}});ht.push({relevant:yt.maybeXS,state:function(a,i){if(a instanceof rt&&a.scrollbarY){var e=a.states.create(i),t=a.scrollbarY.states.create(i);return t.properties.disabled=!0,e}return null}});var zs=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="LineSeriesSegment",e.isMeasured=!1,e.interactionsEnabled=!1,e.layout="none";var t=e.createChild(ee);e.fillSprite=t,t.shouldClone=!1,t.setElement(e.paper.add("path")),t.isMeasured=!1,e._disposers.push(t);var r=e.createChild(ee);return e.strokeSprite=r,r.shouldClone=!1,r.fill=ie(),r.setElement(e.paper.add("path")),r.isMeasured=!1,e._disposers.push(r),e}return i.prototype.drawSegment=function(e,t,r,n){if(!this.disabled)if(e.length>0&&t.length>0&&S(e[0].x)&&S(e[0].y)){var s=W({x:e[0].x-.2,y:e[0].y-.2})+W(e[0]),o=this.series;o.smoothing=="bezier"?s+=new Qi(r,n).smooth(e):o.smoothing=="monotoneX"?s+=new Rd({closed:!1}).smooth(e):o.smoothing=="monotoneY"&&(s+=new Bd({closed:!1}).smooth(e)),this.strokeOpacity==0||this.strokeSprite.strokeOpacity==0||(this.strokeSprite.path=s),(this.fillOpacity>0||this.fillSprite.fillOpacity>0)&&S(t[0].x)&&S(t[0].y)&&(s+=k(t[0]),o.smoothing=="bezier"?s+=new Qi(r,n).smooth(t):o.smoothing=="monotoneX"?s+=new Rd({closed:!1}).smooth(t):o.smoothing=="monotoneY"&&(s+=new Bd({closed:!1}).smooth(t)),s+=k(e[0]),s+=Ge(),this.fillSprite.path=s)}else this.fillSprite.path="",this.strokeSprite.path=""},i.prototype.copyFrom=function(e){a.prototype.copyFrom.call(this,e);var t=this.strokeSprite;it(e,t.properties,Ke),t.events.copyFrom(e.strokeSprite.events),t.fillOpacity=0;var r=this.fillSprite;it(e,r.properties,Ke),r.events.copyFrom(e.fillSprite.events),r.strokeOpacity=0},i})(U);C.registeredClasses.LineSeriesSegment=zs;var My=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="DurationAxisDataItem",e.applyTheme(),e}return i})(Vr);var sl=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e._baseUnit="second",e.className="DurationAxis",e.setPropertyValue("maxZoomFactor",1e6),e.applyTheme(),e}return i.prototype.formatLabel=function(e,t){return this.durationFormatter.format(e,t||this.axisDurationFormat)},i.prototype.adjustMinMax=function(e,t,r,n,s){var o,l,u,h=this.baseUnit;if(this.setPropertyValue("maxPrecision",0),h=="millisecond"||h=="second"||h=="minute"||h=="hour"){n<=1&&(n=1),n=Math.round(n);var p=e,d=t;r===0&&(r=Math.abs(t));var c=r/n,f=[60,30,20,15,10,2,1],m=1;h=="hour"&&(f=[24,12,6,4,2,1]);try{for(var y=hn(f),v=y.next();!v.done;v=y.next()){var b=v.value;if(r/b>n){m=b;break}}}catch(w){o={error:w}}finally{try{v&&!v.done&&(l=y.return)&&l.call(y)}finally{if(o)throw o.error}}var x=Math.ceil((t-e)/m/n),_=Math.log(Math.abs(x))*Math.LOG10E,$=Math.pow(10,Math.floor(_))/10,O=x/$,F=wm(f,O);x=F*$,c=m*x,this.durationFormatter.getValueUnit(c,this.baseUnit),e=Math.floor(e/c)*c,t=Math.ceil(t/c)*c,s&&(e-=c,e<0&&p>=0&&(e=0),t+=c,t>0&&d<=0&&(t=0)),u={min:e,max:t,step:c}}else u=a.prototype.adjustMinMax.call(this,e,t,r,n,s);return this.axisDurationFormat=this.durationFormatter.getFormat(u.step,u.max,this.baseUnit),u},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=E(this.positionToValue(e),this._stepDecimalPlaces),r=this.formatLabel(t,this.tooltipDurationFormat);return this._adapterO?this._adapterO.apply("getTooltipText",r):r},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){a.prototype.copyFrom.call(this,e),this.baseUnit=e.baseUnit},i})(re);C.registeredClasses.DurationAxis=sl;C.registeredClasses.DurationAxisDataItem=My;var er=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="LineSeriesDataItem",e}return i})(An);var ut=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.minDistance=.5,e.segments=new Le(e.createSegment()),e.segments.template.applyOnClones=!0,e._disposers.push(new Pe(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(U),e.segmentsContainer.isMeasured=!1,e.bulletsContainer.toFront(),e.applyTheme(),e}return i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Line Series"))},i.prototype.createSegment=function(){return new zs},i.prototype.createDataItem=function(){return new er},i.prototype.setInitialWorkingValues=function(e){var t=this._yAxis.get(),r=this._xAxis.get();if(this.appeared&&this.visible){var n=this.dataItems.getIndex(e.index-1);if(e.component=this,this.baseAxis==r&&t instanceof re){var s=t.minZoomed;if(n&&(s=n.values.valueY.workingValue),e.setWorkingValue("valueY",s,0),e.setWorkingValue("valueY",e.values.valueY.value),r instanceof xe)e.setWorkingLocation("dateX",e.locations.dateX-1,0),e.setWorkingLocation("dateX",e.locations.dateX);else if(r instanceof sl&&n){var o=e.valueX;e.setWorkingValue("valueX",n.valueX,0),e.setWorkingValue("valueX",o)}}if(this.baseAxis==t&&r instanceof re){var l=r.minZoomed;if(n&&(l=n.values.valueX.workingValue),e.setWorkingValue("valueX",l,0),e.setWorkingValue("valueX",e.values.valueX.value),t instanceof xe)e.setWorkingLocation("dateY",e.locations.dateX-1,0),e.setWorkingLocation("dateY",e.locations.dateY);else if(t instanceof sl&&n){var o=e.valueY;e.setWorkingValue("valueY",n.valueY,0),e.setWorkingValue("valueY",o)}}}else this.baseAxis==r&&t instanceof re&&(r instanceof xe&&e.setWorkingLocation("dateX",e.locations.dateX),r instanceof we&&e.setWorkingLocation("categoryX",e.locations.categoryX)),this.baseAxis==t&&r instanceof re&&(t instanceof xe&&e.setWorkingLocation("dateY",e.locations.dateY),t instanceof we&&e.setWorkingLocation("categoryY",e.locations.categoryY))},i.prototype.updateLegendValue=function(e,t){a.prototype.updateLegendValue.call(this,e,t),e&&e.segment&&(this.tooltipColorSource=e.segment)},i.prototype.validate=function(){var e=this;a.prototype.validate.call(this),this.xAxis&&this.yAxis&&(this._segmentsIterator.reset(),this.openSegmentWrapper(this._adjustedStartIndex),I(this.axisRanges.iterator(),function(t){e.openSegmentWrapper(e._adjustedStartIndex,t)}),I(this._segmentsIterator.iterator(),function(t){t.__disabled=!0}))},i.prototype.sliceData=function(){for(var e=this.startIndex,t=this.endIndex,r=this.startIndex-1;r>=0;r--){var n=this.dataItems.getIndex(r);if(n&&n.hasValue(this._xValueFields)&&n.hasValue(this._yValueFields)){e=r;break}}this._adjustedStartIndex=this.findAdjustedIndex(e,["stroke","strokeWidth","strokeDasharray","strokeOpacity","fill","fillOpacity","opacity"]);for(var r=this.endIndex,s=this.dataItems.length;r<s;r++){var n=this.dataItems.getIndex(r);if(n&&n.hasValue(this._xValueFields)&&n.hasValue(this._yValueFields)){t=r+1;break}}this._workingStartIndex=e,this._workingEndIndex=t},i.prototype.findAdjustedIndex=function(e,t){var r=this,n=this.propertyFields,s=e;return H(t,function(o){if(P(n[o]))for(var l=s;l>=0;l--){var u=r.dataItems.getIndex(l);if(u&&P(u.properties[o])){e>l&&(e=l);break}}}),e},i.prototype.openSegmentWrapper=function(e,t){var r={index:e,axisRange:t};do r=this.openSegment(r.index,r.axisRange);while(r)},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 r=!1,n=[];e=Math.min(e,this.dataItems.length);var s=Math.min(this._workingEndIndex,this.dataItems.length);this._workingEndIndex=Math.min(this._workingEndIndex,this.dataItems.length);var o,l=!1,u=this.getSegment();u.strokeDasharray=void 0,u.__disabled=!1,t?(u.parent=t.contents,it(t.contents,u,Ke)):(it(this,u,Ke),u.filters.clear(),u.parent=this.segmentsContainer),this.group.node.removeAttribute("fill");for(var h=this.connect,p=!1,d=e;d<s;d++){var c=this.dataItems.getIndex(d);if(c.segment=u,c.hasProperties&&(d==e?this.updateSegmentProperties(c.properties,u):l=this.updateSegmentProperties(c.properties,u,!0)),c.hasValue(this._xValueFields)&&c.hasValue(this._yValueFields))this.addPoints(n,c,this.xField,this.yField),p=!0;else{if(d==e)continue;if(!h&&p){o=d;break}}if(o=d,this.baseAxis instanceof xe){var f=this.dataItems.getIndex(d+1);if(f&&this.baseAxis.makeGap(f,c)){r=!0;break}}if(l)break}return this.closeSegment(u,n,e,o,t,r)},i.prototype.addPoints=function(e,t,r,n,s){var o=this.getPoint(t,r,n,t.workingLocations[r],t.workingLocations[n]);s||(t.point=o),e.push(o)},i.prototype.closeSegment=function(e,t,r,n,s,o){var l=[];if(this.dataFields[this._xOpenField]||this.dataFields[this._yOpenField]||this.stacked)for(var u=n;u>=r;u--){var h=this.dataItems.getIndex(u);h.hasValue(this._xValueFields)&&h.hasValue(this._yValueFields)&&this.addPoints(l,h,this.xOpenField,this.yOpenField,!0)}else{var p=this.baseAxis,d=t.length,c=this.xAxis,f=this.yAxis;d>0&&(p==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&&n++,n<this._workingEndIndex-1?{index:n,axisRange:s}:null},i.prototype.drawSegment=function(e,t,r){e.drawSegment(t,r,this.tensionX,this.tensionY)},i.prototype.updateSegmentProperties=function(e,t,r){var n=!1;return te(e,function(s,o){if(P(o)){var l=t[s],u=void 0;l&&(l.toString?u=l.toString():u=l);var h=void 0;o&&(o.toString?h=o.toString():h=o),l==o||u!=null&&h!=null&&u==h||(r||(t[s]=o),n=!0)}}),n},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,r=e.pixelWidth,n=e.pixelHeight;e.disposeChildren();var s=e.createChild(li);if(s.shouldClone=!1,it(this,s,Ke),s.x2=r,s.y=n/2,s.y2=1e-5,s.visible=!0,this.fillOpacity>0){var o=e.createChild(Ea);it(this,o,Ke),o.width=r,o.height=n,o.y=0,o.strokeOpacity=0,o.visible=!0,s.y=0}var l=e.dataItem;l.color=this.stroke,l.colorOrig=this.fill,Dt(this.bullets.iterator(),function(u){if(u instanceof ui&&!u.copyToLegendMarker)return!1;var h=!1;if(u instanceof U&&I(u.children.iterator(),function(d){if(d instanceof lt)return h=!0,!0}),!h){var p=u.clone();return p.parent=e,p.isMeasured=!0,p.tooltipText=void 0,p.x=r/2,t.fillOpacity>0?p.y=0:p.y=n/2,p.visible=!0,P(p.fill)||(p.fill=t.fill),P(p.stroke)||(p.stroke=t.stroke),!1}})},i.prototype.disposeData=function(){a.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})(Nt);C.registeredClasses.LineSeries=ut;C.registeredClasses.LineSeriesDataItem=er;var kr=(function(a){T(i,a);function i(){var e=a.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 Object.defineProperty(i.prototype,"relativeRotation",{get:function(){return this.getPropertyValue("relativeRotation")},set:function(e){if(this.setPropertyValue("relativeRotation",e,!0),!P(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),Ee(this.radius,e)*t},i.prototype.pixelRadiusY=function(e,t){var r=1;this.inside&&(r=-1);var n=this.radius;return S(n)?(n*=t/e,Ee(n,e)*r):Ee(n,t)*r},i.prototype.fixPosition=function(e,t,r,n,s){S(r)||(r=t),S(n)||(n=0),S(s)||(s=0);var o={x:t*Y(e),y:r*X(e)};this.invalid&&this.validate();var l=!1,u=this.radius;(u instanceof de&&u.value<0||u<0)&&(l=!0);var h=this.relativeRotation,p=this.pixelRadius(t);if(this.bent){var d={x:(t+p)*Y(e+180),y:(r+p*r/t)*X(e+180)};this.path=W(d)+bt(e+180,360,t+p,r+p*r/t),this.textPathElement&&this.textPathElement.attr({startOffset:this.locationOnPath*100+"%"});return}if(S(h)){this.horizontalCenter="none",this.verticalCenter="none",e=Ui(e,-180,180);var c=this.bbox.width,f=this.bbox.height,m=this.pixelPaddingBottom,y=this.pixelPaddingTop,v=this.pixelPaddingLeft,b=this.pixelPaddingRight;e>90||e<-90?h==-90&&(h=90,c=0):(h==-90&&(f=-f),h==90&&(h=-90,c=-v-b,f=-f-y-m)),this.rotation=h+e+90;var x=X(h)/2,_=Y(h)/2,$=this.rotation;this.dx=f*x*X($)-c*_*Y($),this.dy=-f*x*Y($)-c*_*X($),this.inside?e>90||e<-90?p-=(m+y)*Y(h)+(v+b)*X(h):p+=(m+this.bbox.height+y)*Y(h)+(v+b+this.bbox.width)*X(h):p+=(f+m+y)*Y(h)+(c+v+b)*X(h),o.x+=Y(e)*p,o.y+=X(e)*p*r/t}else this.horizontalCenter="middle",this.verticalCenter="middle",l?(this.dx=0,this.dy=0,o.x=(t+p)*Y(e),o.y=(r+p*r/t)*X(e)):(this.dy=this._measuredHeight/2*X(e),this.dx=this._measuredWidth/2*Y(e),o.x+=Y(e)*p,o.y+=X(e)*p*r/t);o.x+=n,o.y+=s,this.fdx=this.dx,this.fdy=this.dy,this.moveTo(o)},i})(ia);C.registeredClasses.AxisLabelCircular=kr;var zi=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="Circle",e.element=e.paper.add("circle"),e.setPercentProperty("radius",N(100)),e.setPropertyValue("horizontalCenter","middle"),e.setPropertyValue("verticalCenter","middle"),e.applyTheme(),e}return i.prototype.draw=function(){a.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 Ee(this.radius,ye(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:e*2,height:e*2}},i})(ee);C.registeredClasses.Circle=zi;var zu=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="Trapezoid",e.element=e.paper.add("path"),e.topSide=N(100),e.bottomSide=N(100),e.leftSide=N(100),e.rightSide=N(100),e.isMeasured=!1,e.applyTheme(),e}return i.prototype.draw=function(){a.prototype.draw.call(this);var e=this.pixelWidth,t=this.pixelHeight,r=Ee(this.topSide,e),n=Ee(this.bottomSide,e),s=Ee(this.leftSide,t),o=Ee(this.rightSide,t),l=(e-r)/2,u=(t-s)/2,h=e-(e-r)/2,p=(t-o)/2,d=e-(e-n)/2,c=t-(t-o)/2,f=(e-n)/2,m=t-(t-s)/2,y="",v="",b="",x="";if(P(this.horizontalNeck)){var _=this.horizontalNeck.value;y=k({x:e*_,y:Math.max(u,p)}),b=k({x:e*_,y:Math.min(c,m)})}if(P(this.verticalNeck)){var $=this.verticalNeck.value;v=k({x:Math.min(h,d),y:t*$}),x=k({x:Math.max(l,f),y:t*$})}var O=W({x:l,y:u})+y+k({x:h,y:p})+v+k({x:d,y:c})+b+k({x:f,y:m})+x;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})(ee);C.registeredClasses.Trapezoid=zu;var Xu=(function(a){T(i,a);function i(){var e=a.call(this)||this;e._axis=new Ue,e.className="ClockHand";var t=new se;e.fill=t.getFor("alternativeBackground"),e.stroke=e.fill;var r=new zi;r.radius=5,e.pin=r,e.isMeasured=!1,e.startWidth=5,e.endWidth=1,e.width=N(100),e.height=N(100),e.radius=N(100),e.innerRadius=N(0);var n=new zu;return e.hand=n,e._disposers.push(e._axis),e.applyTheme(),e}return i.prototype.validate=function(){a.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=N(this.startWidth/t*100),e.rightSide=N(this.endWidth/t*100),this.axis){var r=this.axis.renderer,n=mt(this.innerRadius,r.pixelRadius),s=mt(this.radius,r.pixelRadius);e.x=n,e.y=-t/2,e.width=s-n}},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,r){if(this._value=e,e!=null&&(S(t)||(t=0),this.axis)){var n=this.axis.renderer,s=n.positionToAngle(this.axis.anyToPosition(e)),o=this.rotation;this.rotationDirection=="clockWise"&&s<o&&(this.rotation=o-360),this.rotationDirection=="counterClockWise"&&s>o&&(this.rotation=o+360),this.animate({property:"rotation",to:s},t,r)}},Object.defineProperty(i.prototype,"currentPosition",{get:function(){if(this.axis){var e=this.axis.renderer;return e.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 Fe([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&&P(e.axis)&&ce(e.axis)&&this.map.hasKey(e.axis)&&(e.axis=this.map.getKey(e.axis)),a.prototype.processConfig.call(this,e)},i})(U);C.registeredClasses.ClockHand=Xu;var Hd=(function(a){T(i,a);function i(){var e=a.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 i})(er);var Yu=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="RadarSeries",e.connectEnds=!0,e.applyTheme(),e}return i.prototype.validate=function(){this.chart.invalid&&this.chart.validate(),a.prototype.validate.call(this)},i.prototype.createDataItem=function(){return new Hd},i.prototype.getPoint=function(e,t,r,n,s,o,l){o||(o="valueX"),l||(l="valueY");var u=this.yAxis.getX(e,r,s,l),h=this.yAxis.getY(e,r,s,l),p=_e({x:u,y:h});p==0&&(p=1e-5);var d=this.xAxis.getAngle(e,t,n,o),c=this.chart.startAngle,f=this.chart.endAngle;if(!(d<c||d>f))return{x:p*Y(d),y:p*X(d)}},i.prototype.addPoints=function(e,t,r,n,s){var o=this.getPoint(t,r,n,t.locations[r],t.locations[n]);o&&e.push(o)},i.prototype.getMaskPath=function(){var e=this.yAxis.renderer;return mr(e.startAngle,e.endAngle-e.startAngle,e.pixelRadius,e.pixelInnerRadius)},i.prototype.drawSegment=function(e,t,r){var n=this.yAxis,s=n.renderer;this.connectEnds&&Math.abs(s.endAngle-s.startAngle)==360&&(this.dataFields[this._xOpenField]||this.dataFields[this._yOpenField]||this.stacked)&&(t.push(t[0]),r.length>0&&r.unshift(r[r.length-1])),a.prototype.drawSegment.call(this,e,t,r)},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,r){var n=this.xAxis,s=this.yAxis;(t<n.start||t>n.end||r<s.start||r>s.end)&&(e.visible=!1),e.moveTo(this.xAxis.renderer.positionToPoint(t,r))},i.prototype.setXAxis=function(e){a.prototype.setXAxis.call(this,e),this.updateRendererRefs()},i.prototype.setYAxis=function(e){a.prototype.setYAxis.call(this,e),this.updateRendererRefs()},i.prototype.updateRendererRefs=function(){var e=this.xAxis.renderer,t=this.yAxis.renderer;e.axisRendererY=t},i})(ut);C.registeredClasses.RadarSeries=Yu;C.registeredClasses.RadarSeriesDataItem=Hd;var Xs=(function(a){T(i,a);function i(e){var t=a.call(this,e)||this;return t.className="AxisFillCircular",t.element=t.paper.add("path"),t.radius=N(100),t.applyTheme(),t}return i.prototype.draw=function(){if(a.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,P(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})(Ya);C.registeredClasses.AxisFillCircular=Xs;var qu=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="GridCircular",e.pixelPerfect=!1,e.applyTheme(),e}return 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})(qa);C.registeredClasses.GridCircular=qu;var $a=(function(a){T(i,a);function i(){var e=a.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=N(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 i.prototype.setAxis=function(e){var t=this;a.prototype.setAxis.call(this,e),e.isMeasured=!1;var r=e.tooltip;r.adapter.add("dx",function(n,s){var o=Qt({x:s.pixelX,y:s.pixelY},t);return t.pixelRadius*Math.cos(Math.atan2(o.y,o.x))-o.x}),r.adapter.add("dy",function(n,s){var o=Qt({x:s.pixelX,y:s.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(),a.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 mt(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(!P(t))t=e.innerRadius,t instanceof de&&e&&(t=N(t.value*e.innerRadiusModifyer*100));else if(t instanceof de&&e){var r=e.mr,n=t.value;n=Math.max(r*n,r-Math.min(e.plotContainer.innerHeight,e.plotContainer.innerWidth))/r,t=N(n*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 mt(this.innerRadius,this.pixelRadiusReal)||0},enumerable:!0,configurable:!0}),i.prototype.positionToPoint=function(e,t){S(t)||(t=1);var r=this.positionToCoordinate(e),n=this.startAngle+(this.endAngle-this.startAngle)*r/this.axisLength,s=this.pixelRadius,o=this.pixelInnerRadius;if(this.axisRendererY){var l=G(this.axisRendererY.positionToCoordinate(t),0,1/0);l==0&&(l=1e-6);var u={x:l*Y(n),y:l*X(n)};return u}return{x:Y(n)*o+(s-o)*Y(n)*t,y:X(n)*o+(s-o)*X(n)*t}},i.prototype.positionToAngle=function(e){var t=this.axis,r=(this.endAngle-this.startAngle)/(t.end-t.start),n;return t.renderer.inversed?n=this.startAngle+(t.end-e)*r:n=this.startAngle+(e-t.start)*r,E(n,3)},i.prototype.angleToPosition=function(e){var t=this.axis,r=(this.endAngle-this.startAngle)/(t.end-t.start),n;return t.renderer.inversed?n=t.end-(e-this.startAngle)/r:n=(e-this.startAngle)/r+t.start,E(n,5)},i.prototype.updateAxisLine=function(){var e=this.pixelRadius,t=this.startAngle,r=this.endAngle,n=ye(360,r-t);this.line.path=W({x:e*Y(t),y:e*X(t)})+bt(t,n,e,e)},i.prototype.updateGridElement=function(e,t,r){t=t+(r-t)*e.location;var n=this.positionToPoint(t);if(S(n.x)&&S(n.y)&&e.element){var s=qr*Math.atan2(n.y,n.x),o=mt(P(e.radius)?e.radius:N(100),this.pixelRadius),l=mt(e.innerRadius,this.pixelRadius);e.zIndex=0;var u=mt(S(l)?l:this.innerRadius,this.pixelRadiusReal,!0);S(u)||(u=0),e.path=W({x:u*Y(s),y:u*X(s)})+k({x:o*Y(s),y:o*X(s)})}this.toggleVisibility(e,t,0,1)},i.prototype.updateTickElement=function(e,t,r){t=t+(r-t)*e.location;var n=this.positionToPoint(t);if(e.element){var s=this.pixelRadius,o=qr*Math.atan2(n.y,n.x),l=e.length;e.inside&&(l=-l),e.zIndex=1,e.path=W({x:s*Y(o),y:s*X(o)})+k({x:(s+l)*Y(o),y:(s+l)*X(o)})}this.toggleVisibility(e,t,0,1)},i.prototype.updateBullet=function(e,t,r){var n=.5;e instanceof aa&&(n=e.location),t=t+(r-t)*n;var s=this.positionToPoint(t),o=this.pixelRadius,l=qr*Math.atan2(s.y,s.x);s={x:o*Y(l),y:o*X(l)},this.positionItem(e,s),this.toggleVisibility(e,t,0,1)},i.prototype.updateLabelElement=function(e,t,r,n){P(n)||(n=e.location),t=t+(r-t)*n,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,r,n,s){var o="";if(S(e)&&S(t)){P(r)||(r=this.radius),e=he(e,this.axis.start),t=ye(t,this.axis.end),t<e&&(t=e);var l=mt(r,this.pixelRadius),u=mt(n,this.pixelRadius,!0),h=this.positionToAngle(e),p=this.positionToAngle(t),d=p-h;o=mr(h,d,l,u,l,s)}return o},i.prototype.createGrid=function(){return new qu},i.prototype.createFill=function(e){return new Xs(e)},i.prototype.createLabel=function(){return new kr},i.prototype.pointToPosition=function(e){var t=Ui(ft(e),this.startAngle,this.endAngle);return this.coordinateToPosition((t-this.startAngle)/360*this.axisLength)},i})(Ga);C.registeredClasses.AxisRendererCircular=$a;var Ys=(function(a){T(i,a);function i(){var e=a.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 i.prototype.draw=function(){var e="",t=this.pixelRadius;if(t>0){var r=this.getPoints(t);e=W(r[0])+new Qi(this.tension,this.tension).smooth(r)}var n=this.pixelInnerRadius;if(n>0){var r=this.getPoints(n);r.reverse(),e+=W(r[0])+new Qi(this.tension,this.tension).smooth(r)}this.path=e},i.prototype.getPoints=function(e){for(var t=e*Math.PI*2,r=this.waveHeight/2,n=t/Math.round(t/this.waveLength),s=n/2,o=[],l=t/n,u=0;u<=l;u++){var h=u*n/t*360,p=(u*n+s)/t*360;o.push({x:(e-r)*Y(h),y:(e-r)*X(h)}),o.push({x:(e+r)*Y(p),y:(e+r)*X(p)})}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 Ee(this.innerRadius,ye(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})(zi);C.registeredClasses.WavedCircle=Ys;var Gu=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e._chart=new Ue,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=N(100),e.line.strokeOpacity=0,e.labels.template.horizontalCenter="middle",e._disposers.push(e._chart),e.applyTheme(),e}return i.prototype.validate=function(){this.chart&&this.chart.invalid&&this.chart.validate(),a.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 mt(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(!P(t))t=e.innerRadius,t instanceof de&&e&&(t=N(t.value*e.innerRadiusModifyer*100));else if(t instanceof de&&e){var r=e.mr,n=t.value;n=Math.max(r*n,r-Math.min(e.plotContainer.innerHeight,e.plotContainer.innerWidth))/r,t=N(n*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 mt(this.innerRadius,this.pixelRadiusReal)||0},enumerable:!0,configurable:!0}),i.prototype.positionToPoint=function(e,t){var r=G(this.positionToCoordinate(e),0,1/0);return{x:r*Y(this.axisAngle),y:r*X(this.axisAngle)}},i.prototype.updateAxisLine=function(){this.line.path=W({x:this.pixelInnerRadius*Y(this.axisAngle),y:this.pixelInnerRadius*X(this.axisAngle)})+k({x:this.pixelRadius*Y(this.axisAngle),y:this.pixelRadius*X(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,r){t=t+(r-t)*e.location;var n=this.positionToPoint(t),s,o=_e(n),l=this.startAngle,u=this.endAngle,h=this.chart;if(S(o)&&e.element&&h){var p=h.xAxes.getIndex(0),d=0,c=h.series.getIndex(0);if(c&&(d=c.dataItems.length),this.gridType=="polygons"&&d>0&&c&&p&&p instanceof we){var f=p.renderer.grid.template.location,m=p.getAngle(c.dataItems.getIndex(0),"categoryX",f);s=W({x:o*Y(m),y:o*X(m)});for(var y=1;y<d;y++)m=p.getAngle(c.dataItems.getIndex(y),"categoryX",f),s+=k({x:o*Y(m),y:o*X(m)});m=p.getAngle(c.dataItems.getIndex(d-1),"categoryX",p.renderer.cellEndLocation),s+=k({x:o*Y(m),y:o*X(m)})}else s=W({x:o*Y(l),y:o*X(l)})+bt(l,u-l,o,o);e.path=s}this.toggleVisibility(e,t,0,1)},i.prototype.updateLabelElement=function(e,t,r,n){P(n)||(n=e.location),t=t+(r-t)*n;var s=this.positionToPoint(t);this.positionItem(e,s),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",Yr(e)),this.invalidateAxisItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"gridType",{get:function(){var e=this.chart.xAxes.getIndex(0);return e instanceof we?this.getPropertyValue("gridType"):"circles"},set:function(e){this.setPropertyValue("gridType",e,!0)},enumerable:!0,configurable:!0}),i.prototype.getPositionRangePath=function(e,t){var r=this.pixelInnerRadius,n=this.axisLength+r,s=G(this.positionToCoordinate(e),r,n),o=G(this.positionToCoordinate(t),r,n),l=this.startAngle,u=this.endAngle,h=u-l,p,d=this.chart,c=d.xAxes.getIndex(0),f=d.series.getIndex(0),m=0;if(f&&(m=f.dataItems.length),this.gridType=="polygons"&&m>0&&f&&c&&c instanceof we){var y=c.renderer.grid.template.location,v=c.getAngle(f.dataItems.getIndex(0),"categoryX",y);p=W({x:o*Y(v),y:o*X(v)});for(var b=1;b<m;b++)v=c.getAngle(f.dataItems.getIndex(b),"categoryX",y),p+=k({x:o*Y(v),y:o*X(v)});v=c.getAngle(f.dataItems.getIndex(m-1),"categoryX",c.renderer.cellEndLocation),p+=k({x:o*Y(v),y:o*X(v)}),p+=W({x:s*Y(v),y:s*X(v)});for(var b=m-1;b>=0;b--)v=c.getAngle(f.dataItems.getIndex(b),"categoryX",y),p+=k({x:s*Y(v),y:s*X(v)})}else p=mr(l,h,o,s);return p},i.prototype.updateBreakElement=function(e){var t=e.startLine,r=e.endLine,n=e.fillShape,s=e.startPoint,o=e.endPoint;t.radius=Math.abs(s.y),r.radius=Math.abs(o.y),n.radius=Math.abs(o.y),n.innerRadius=Math.abs(s.y)},i.prototype.createBreakSprites=function(e){e.startLine=new Ys,e.endLine=new Ys,e.fillShape=new Ys},i.prototype.updateTooltip=function(){var e=this.axis;if(e){var t=4e3,r=-4e3,n=-4e3,s=t*2,o=t*2,l=this.axisAngle;l<0&&(l+=360);var u="vertical";(l>45&&l<135||l>225&&l<315)&&(u="horizontal"),this.axis.updateTooltip(u,{x:r,y:n,width:s,height:o})}},i.prototype.updateTickElement=function(e,t,r){t=t+(r-t)*e.location;var n=this.positionToPoint(t);if(e.element){var s=Yr(this.axisAngle+90);s/90!=Math.round(s/90)?e.pixelPerfect=!1:e.pixelPerfect=!0;var o=-e.length;e.inside&&(o*=-1),e.path=W({x:0,y:0})+k({x:o*Y(s),y:o*X(s)})}this.positionItem(e,n),this.toggleVisibility(e,t,0,1)},i.prototype.updateBullet=function(e,t,r){var n=.5;e instanceof aa&&(n=e.location),t=t+(r-t)*n;var s=this.positionToPoint(t);this.positionItem(e,s),this.toggleVisibility(e,t,0,1)},i.prototype.positionToCoordinate=function(e){var t,r=this.axis,n=r.axisFullLength,s=this.pixelInnerRadius;return r.renderer.inversed?t=(r.end-e)*n+s:t=(e-r.start)*n+s,E(t,1)},i.prototype.pointToPosition=function(e){var t=_e(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})(Ot);C.registeredClasses.AxisRendererRadial=Gu;var zd=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="RadarChartDataItem",e.applyTheme(),e}return i})(Ln);var Uu=(function(a){T(i,a);function i(){var e=a.call(this)||this;e._axisRendererX=$a,e._axisRendererY=Gu,e.innerRadiusModifyer=1,e.mr=1,e.className="RadarChart",e.startAngle=-90,e.endAngle=270,e.radius=N(80),e.innerRadius=0;var t=e.plotContainer.createChild(U);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(zi),e._bulletMask.shouldClone=!1,e._bulletMask.element=e.paper.add("path"),e._bulletMask.opacity=0,e.applyTheme(),e}return i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Radar chart"))},i.prototype.processAxis=function(e){a.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(){a.prototype.handleXAxisRangeChange.call(this),I(this.yAxes.iterator(),function(e){e.invalidate()})},i.prototype.handleYAxisRangeChange=function(){a.prototype.handleYAxisRangeChange.call(this),I(this.xAxes.iterator(),function(e){e.invalidate()})},i.prototype.processConfig=function(e){if(e&&(P(e.cursor)&&!P(e.cursor.type)&&(e.cursor.type="RadarCursor"),P(e.series)&&Xe(e.series)))for(var t=0,r=e.series.length;t<r;t++)e.series[t].type=e.series[t].type||"RadarSeries";a.prototype.processConfig.call(this,e)},i.prototype.beforeDraw=function(){a.prototype.beforeDraw.call(this);var e=this.plotContainer,t=wi(this.startAngle,this.endAngle,1),r={x:0,y:0,width:0,height:0},n=e.innerWidth/t.width,s=e.innerHeight/t.height,o=this.innerRadius;if(o instanceof de){var l=o.value,u=Math.min(n,s);this.mr=u,l=Math.max(u*l,u-Math.min(e.innerHeight,e.innerWidth))/u,r=wi(this.startAngle,this.endAngle,l),this.innerRadiusModifyer=l/o.value,o=N(l*100)}t=Gr([t,r]);var h=Math.min(e.innerWidth/t.width,e.innerHeight/t.height),p=mt(this.radius,h)*2||0,d=p/2,c=this.startAngle,f=this.endAngle;this._pixelInnerRadius=mt(o,d),this._bulletMask.path=mr(c,f-c,d,this._pixelInnerRadius),I(this.xAxes.iterator(),function(y){y.renderer.useChartAngles&&(y.renderer.startAngle=c,y.renderer.endAngle=f),y.width=p,y.height=p,y.renderer.pixelRadiusReal=d}),I(this.yAxes.iterator(),function(y){y.renderer.startAngle=c,y.renderer.endAngle=f,y.width=p,y.height=p,y.renderer.pixelRadiusReal=d});var m=this.cursor;m&&(m.width=p,m.height=p,m.startAngle=c,m.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 Yu},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})(rt);C.registeredClasses.RadarChart=Uu;var Cx=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="GaugeChartDataItem",e.applyTheme(),e}return i})(zd);var Ir=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="GaugeChart",e.startAngle=180,e.endAngle=360,e.hands=new Le(new Xu),e.hands.events.on("inserted",e.processHand,e,!1),e._disposers.push(new Pe(e.hands)),e._disposers.push(e.hands.template),e.applyTheme(),e}return i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(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:a.prototype.configOrder.call(this,e,t)},i})(Uu);C.registeredClasses.GaugeChart=Ir;var tr=(function(a){T(i,a);function i(){var e=a.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(ee),e.slice.isMeasured=!1,e._disposers.push(e.slice),e.applyTheme(),e}return i.prototype.draw=function(){a.prototype.draw.call(this);var e=this.radiusY;this.radius>0&&e==0&&(e=.01),this.slice.path=mr(this.startAngle,this.arc,this.radius,this.pixelInnerRadius,e,this.cornerRadius,this.innerCornerRadius),this.slice.invalidate(),this.shiftRadius=this.shiftRadius,this.realFill instanceof ji&&this.updateGradient(this.realFill),this.realStroke instanceof ji&&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(){if(this.definedBBox)return this.definedBBox;if(this.isMeasured){var e=wi(this.startAngle,this.startAngle+this.arc,this.pixelInnerRadius),t=wi(this.startAngle,this.startAngle+this.arc,this.radius);return Gr([e,t])}else return{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",Yr(e),!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"arc",{get:function(){return this.getPropertyValue("arc")},set:function(e){S(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 S(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 S(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 Ee(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 Y(this.middleAngle)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"iy",{get:function(){return X(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(S(e))return e;var t=.5;e instanceof de&&(t=e.value);var r=Ee(this.innerRadius,this.radius);return this.ix*(r+(this.radius-r)*t)},i.prototype.getTooltipY=function(){var e=this.getPropertyValue("tooltipY");if(S(e))return e;var t=.5;e instanceof de&&(t=e.value);var r=Ee(this.innerRadius,this.radius);return this.iy*(r+(this.radius-r)*t)+this.slice.dy},i})(U);C.registeredClasses.Slice=tr;var qs=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="PercentSeriesDataItem",e.applyTheme(),e}return i.prototype.uidAttr=function(){return this.slice.uidAttr()},i.prototype.hide=function(e,t,r,n){return n||(n=["value"]),a.prototype.hide.call(this,e,t,0,n)},i.prototype.setVisibility=function(e,t){t||(e?this.setWorkingValue("value",this.values.value.value,0,0):this.setWorkingValue("value",0,0,0)),a.prototype.setVisibility.call(this,e,t)},i.prototype.show=function(e,t,r){return r||(r=["value"]),a.prototype.show.call(this,e,t,r)},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 Ce(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 Ce(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,r=t.slices.create();this.addSprite(r),this._slice=r,this._disposers.push(r),r.parent=t.slicesContainer,this._disposers.push(new Ce(function(){t.slices.removeValue(r)})),r.visible=this.visible,t.itemsFocusable()?(P(this.component.role)||(this.component.role="menu"),P(r.role)||(r.role="menuitem"),r.focusable=!0):(P(this.component.role)||(this.component.role="list"),P(r.role)||(r.role="listitem"),r.focusable=!1),r.focusable&&(r.events.on("focus",function(n){r.readerTitle=t.populateString(t.itemReaderText,e)},void 0,!1),r.events.on("blur",function(n){r.readerTitle=""},void 0,!1)),r.hoverable&&(r.events.on("over",function(n){r.readerTitle=t.populateString(t.itemReaderText,e)},void 0,!1),r.events.on("out",function(n){r.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})(Dn);var Ka=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="PercentSeries",e._addAllDataItems=!1,e.colors=new sa,e.colors.step=1,e.isMeasured=!0,e.calculatePercent=!0;var t=e.createChild(U);t.shouldClone=!1,t.isMeasured=!1,e.slicesContainer=t;var r=e.createChild(U);r.shouldClone=!1,r.isMeasured=!1,r.layout="none",e.ticksContainer=r;var n=e.createChild(U);n.shouldClone=!1,n.isMeasured=!1,n.layout="none",e.labelsContainer=n,e.alignLabels=!1,e.bulletsContainer.toFront(),e.skipFocusThreshold=50;var s=e.defaultState;return s.transitionEasing=dd,e.itemReaderText="{category}: {value.percent.formatNumber('#.#p')}",e.applyTheme(),e}return i.prototype.createSlice=function(){return new ee},i.prototype.createTick=function(){return new ra},i.prototype.createLabel=function(){return new lt},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 Le(e),this._disposers.push(new Pe(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 Le(e),this._disposers.push(new Pe(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 Le(e),this._disposers.push(new Pe(this._labels))}return this._labels},enumerable:!0,configurable:!0}),i.prototype.createDataItem=function(){return new qs},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(),a.prototype.validateDataItems.call(this)},i.prototype.validateDataElement=function(e){var t=e.slice;t&&(t.fill==null?this.patterns?(P(t.stroke)||(t.stroke=this.colors.next()),t.fill=this.patterns.next(),P(t.fillOpacity)&&(t.fill.backgroundOpacity=t.fillOpacity),t.stroke instanceof be&&(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)),a.prototype.validateDataElement.call(this,e),t&&e.bullets.each(function(r,n){n.fill==null&&(n.fill=t.fill),n.stroke==null&&(n.stroke=t.stroke)}),this.updateLegendValue(e)},i.prototype.validateData=function(){a.prototype.validateData.call(this),this.chart&&this.chart.feedLegend()},i.prototype.arrangeLabels=function(e){for(var t=0,r=e.length;t<r;t++){var n=e[t],s=n.label;if(s){s.invalid&&s.validate();var o=s.measuredHeight;s.visible||(o=0),s.pixelY-o/2<-this.maxHeight/2&&(s.y=-this.maxHeight/2+o/2);var l=this.getNextLabel(t+1,e),u=s.pixelY+o/2;if(l){l.invalid&&l.validate();var h=l.measuredHeight;l.visible||(h=0);var p=l.pixelY;p==null&&(p=0),p-h/2<u&&(l.y=u+h/2)}}}},i.prototype.arrangeLabels2=function(e){for(var t=this.maxHeight/2,r=e.length-1;r>=0;r--){var n=e[r],s=n.label;if(s){s.invalid&&s.validate();var o=s.measuredHeight;s.visible||(o=0),s.pixelY+o/2>t&&(s.y=t-o/2,t=s.y-o/2)}}},i.prototype.getNextLabel=function(e,t){if(t.length>=e){var r=t[e];if(r)return r.label?r.visible?r.label:this.getNextLabel(e+1,t):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){I(e.children.iterator(),function(r){var n=t.slice;r.defaultState.properties.fill=n.fill,r.defaultState.properties.stroke=n.stroke,r.defaultState.properties.fillOpacity=n.fillOpacity,r.defaultState.properties.strokeOpacity=n.strokeOpacity,r.fill=n.fill,r.stroke=n.stroke,r.fillOpacity=n.fillOpacity,r.strokeOpacity=n.strokeOpacity,r.fill==null&&(r.__disabled=!0);var s=e.dataItem;s.color=n.fill,s.colorOrig=n.fill,r.addDisposer(n.events.on("propertychanged",function(o){o.property=="fill"&&(r.__disabled=!1,r.isActive||(r.fill=n.fill),r.defaultState.properties.fill=n.fill,s.color=n.fill,s.colorOrig=n.fill),o.property=="stroke"&&(r.isActive||(r.stroke=n.stroke),r.defaultState.properties.stroke=n.stroke),o.property=="strokeOpacity"&&(r.isActive||(r.strokeOpacity=n.strokeOpacity),r.defaultState.properties.strokeOpacity=n.strokeOpacity)},void 0,!1))})},i.prototype.handleSliceScale=function(e){var t=this,r=e.target,n=r.dataItem;n&&n.bullets&&I(n.bullets.iterator(),function(s){var o=s[1];t.positionBullet(o)})},i.prototype.handleSliceMove=function(e){},i.prototype.copyFrom=function(e){a.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,r=e.legendSettings;t&&r&&r&&(r.labelText&&(t.label.text=r.labelText),r.itemLabelText&&(t.label.text=r.itemLabelText),r.valueText&&(t.valueLabel.text=r.valueText),r.itemValueText&&(t.valueLabel.text=r.itemValueText))}},i})(Lr);C.registeredClasses.PercentSeries=Ka;C.registeredClasses.PercentSeriesDataItem=qs;ht.push({relevant:yt.maybeXS,state:function(a,i){if(a instanceof Ka){var e=a.states.create(i),t=a.labels.template.states.create(i);t.properties.disabled=!0;var r=a.ticks.template.states.create(i);return r.properties.disabled=!0,e}return null}});var Ku=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e._label=new Ue,e._slice=new Ue,e.className="PieTick",e.element=e.paper.add("polyline"),e._disposers.push(e._label),e._disposers.push(e._slice),e.applyTheme(),e}return i.prototype.draw=function(){a.prototype.draw.call(this);var e=this.slice,t=this.label,r=e.dataItem.component;if(e&&e.radius>0&&t&&t.text){var n=e.dx+e.slice.dx+e.pixelX+e.ix*e.radius*e.scale,s=e.dy+e.slice.dy+e.pixelY+e.iy*e.radiusY*e.scale,o=void 0,l=void 0,u=void 0,h=void 0;if(r.alignLabels)o=t.pixelX-this.length,l=t.pixelY,u=t.pixelX,h=l,t.horizontalCenter=="right"&&(o+=2*this.length,u=o-this.length);else{var p=t.pixelRadius(e.radius);o=n+p*e.ix,l=s+p*e.iy,u=o,h=l}this.element.attr({points:[n,s,o,l,u,h]})}},Object.defineProperty(i.prototype,"slice",{get:function(){return this._slice.get()},set:function(e){this._slice.set(e,new Fe([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})(ra);C.registeredClasses.PieTick=Ku;var la=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="PieSeriesDataItem",e.values.radiusValue={},e.applyTheme(),e}return 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,r,n){return a.prototype.hide.call(this,e,t,0,["value","radiusValue"])},i.prototype.show=function(e,t,r){return a.prototype.show.call(this,e,t,["value","radiusValue"])},i})(qs);var ci=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="PieSeries",e.alignLabels=!0,e.layout="none",e.labels.template.radius=N(5),e.addDisposer(e.labels.template.events.on("enabled",e.invalidate,e,!1)),e.applyTheme(),e}return i.prototype.createSlice=function(){return new tr},i.prototype.createTick=function(){return new Ku},i.prototype.createLabel=function(){return new kr},i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Pie Slice Series"))},i.prototype.createDataItem=function(){return new la},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})";var t=e.states.create("hover");t.properties.scale=1.05;var r=e.defaultState;r.properties.shiftRadius=0,e.togglable=!0,e.events.on("toggled",function(s){s.target.hideTooltip(),s.target.interactions.lastHitPointer&&s.target.interactions.lastHitPointer.touch&&!s.target.isActive&&(s.target.isHover=!1)});var n=e.states.create("active");n.properties.shiftRadius=.1},i.prototype.validate=function(){this._leftItems=[],this._rightItems=[],this._currentStartAngle=this.startAngle,this._arcRect=wi(this.startAngle,this.endAngle),this._maxRadiusPercent=0;for(var e=this.startIndex;e<this.endIndex;e++){var t=this.dataItems.getIndex(e),r=t.values.radiusValue.percent;r>this._maxRadiusPercent&&(this._maxRadiusPercent=r)}a.prototype.validate.call(this),this.alignLabels&&(this.startAngle>this.endAngle?this._rightItems.reverse():this._leftItems.reverse(),this._rightItems.sort(function(n,s){var o=(n.slice.middleAngle+360)%360,l=(s.slice.middleAngle+360)%360;return o>270&&(o-=360),l>270&&(l-=360),o<l?-1:o>l?1:0}),this._leftItems.sort(function(n,s){var o=(n.slice.middleAngle+360)%360,l=(s.slice.middleAngle+360)%360;return o<l?1:o>l?-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=!0:e.__disabled=!1;var t=e.slice;if(t.radius=this.pixelRadius,S(e.radiusValue)&&(t.radius=this.pixelInnerRadius+(this.pixelRadius-this.pixelInnerRadius)*e.values.radiusValue.percent/this._maxRadiusPercent),t.innerRadius instanceof de||(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 r=e.label,n=e.tick;n.slice=t,n.label=r;var s=(t.middleAngle+360)%360,o=void 0;if(this.alignLabels){var l=r.pixelRadius(t.radius),u=n.length+l;r.dx=0,r.dy=0,r.verticalCenter="middle";var h=this._arcRect;s>270||s<=90?(u+=(h.width+h.x)*this.pixelRadius,r.horizontalCenter="left",this._rightItems.push(e)):(u-=h.x*this.pixelRadius,r.horizontalCenter="right",this._leftItems.push(e),u*=-1);var p=t.radius+n.length+l;o={x:u,y:t.iy*p},r.moveTo(o)}else{var d=t.depth;S(d)||(d=0),r.fixPosition(t.middleAngle,t.radius,t.radiusY,0,-d)}}this._currentStartAngle+=t.arc,a.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 S(e)?e:this._startAngleInternal},set:function(e){this.setPropertyValue("startAngle",Yr(e),!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endAngle",{get:function(){var e=this.getPropertyValue("endAngle");return S(e)?e:this._endAngleInternal},set:function(e){this.setPropertyValue("endAngle",e,!0)},enumerable:!0,configurable:!0}),i.prototype.positionBullet=function(e){a.prototype.positionBullet.call(this,e);var t=e.dataItem,r=t.slice,n=e.locationX;S(n)||(n=.5);var s=e.locationY;S(s)||(s=1);var o=r.startAngle+r.arc*n;e.x=s*r.radius*Y(o),e.y=s*r.radiusY*X(o)},i.prototype.handleSliceMove=function(e){if(!this.alignLabels){var t=e.target,r=t.dataItem;if(r){var n=r.label;n&&(n.dx=n.fdx+t.dx+t.pixelX,n.dy=n.fdy+t.dy+t.pixelY)}}},Object.defineProperty(i.prototype,"bbox",{get:function(){if(this.definedBBox)return this.definedBBox;var e=this.chart;return e?wi(e.startAngle,e.endAngle,this.pixelRadius):wi(this.startAngle,this.endAngle,this.pixelRadius)},enumerable:!0,configurable:!0}),i})(Ka);C.registeredClasses.PieSeries=ci;C.registeredClasses.PieSeriesDataItem=la;var ol=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="PercentChartDataItem",e.applyTheme(),e}return i})(nl);var ll=(function(a){T(i,a);function i(){var e=a.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 i.prototype.validateData=function(){a.prototype.validateData.call(this),this.feedLegend()},i.prototype.feedLegend=function(){var e=this.legend;if(e){var t=[];I(this.series.iterator(),function(r){r.hiddenInLegend||I(r.dataItems.iterator(),function(n){n.hiddenInLegend||(t.push(n),n.legendSettings||(n.legendSettings=r.legendSettings))})}),e.data=t,e.dataFields.name="category"}},i.prototype.createSeries=function(){return new Ka},i.prototype.setLegend=function(e){a.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 r=t.target.dataItem.dataContext;if(r.visible&&!r.isHiding){var n=r.slice;n.dispatchImmediately("over"),n.isHover=!0,n.interactions.isRealHover=!0}}),e.itemContainers.template.events.on("out",function(t){var r=t.target.dataItem.dataContext,n=r.slice;n.dispatchImmediately("out"),n.isHover=!1}))},i})(Ca);C.registeredClasses.PercentChart=ll;C.registeredClasses.PercentChartDataItem=ol;var Zu=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="PieChartDataItem",e.applyTheme(),e}return i})(ol);var Vt=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="PieChart",e.innerRadius=0,e.radius=N(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._disposers.push(e.seriesContainer.events.on("positionchanged",function(){e.bulletsContainer.x=e.seriesContainer.x,e.bulletsContainer.y=e.seriesContainer.y})),e.applyTheme(),e}return i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Pie chart"))},i.prototype.validateLayout=function(){a.prototype.validateLayout.call(this),this.updateRadius()},i.prototype.handleSeriesAdded=function(e){a.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=wi(this.startAngle,this.endAngle,1),r={x:0,y:0,width:0,height:0},n=this.innerRadius;n instanceof de&&(r=wi(this.startAngle,this.endAngle,n.value)),t=Gr([t,r]);var s=Math.min(e.innerWidth/t.width,e.innerHeight/t.height);S(s)||(s=0);var o=mt(this.radius,s),l=mt(this.innerRadius,s),u=(o-l)/this.series.length;(o!=this._chartPixelRadius||l!=this._chartPixelInnerRadius)&&(this._chartPixelRadius=o,this._chartPixelInnerRadius=l,I(pr(this.series.iterator()),function(h){var p=h[0],d=h[1],c=l+mt(d.radius,o-l),f=l+mt(d.innerRadius,o-l);S(c)||(c=l+u*(p+1)),S(f)||(f=l+u*p),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())},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 ci},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})(ll);C.registeredClasses.PieChart=Vt;C.registeredClasses.PieChartDataItem=Zu;var Xi=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="Column",e.width=N(80),e.height=N(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 i.prototype.handleKidAdded=function(){this.layout=="none"&&(this.layout="absolute")},i.prototype.createAssets=function(){this.column=this.createChild(Mt),this.column.shouldClone=!1,this.column.isMeasured=!1,this.column.cornerRadius(0,0,0,0),this._disposers.push(this.column)},i.prototype.validate=function(){a.prototype.validate.call(this);var e=this.column;e&&(e.width=ye(this.pixelWidth,this.maxWidth),e.height=ye(this.pixelHeight,this.maxHeight),e.invalid&&e.validate())},i.prototype.copyFrom=function(e){a.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:ye(this.pixelWidth,this.maxWidth),height:ye(this.pixelHeight,this.maxHeight)}},enumerable:!0,configurable:!0}),i})(U);C.registeredClasses.Column=Xi;var ei=(function(a){T(i,a);function i(){var e=a.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 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&&oe(this.sprites,this._column),this._column=e,e){var r=e.dataItem;r&&r!=this&&(r.column=void 0),this.addSprite(e),this._disposers.push(new Ce(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 Oe),this._rangesColumns},enumerable:!0,configurable:!0}),i})(An);var pt=(function(a){T(i,a);function i(){var e=a.call(this)||this;e._startLocation=0,e._endLocation=1,e.className="ColumnSeries",e.width=N(100),e.height=N(100),e.strokeOpacity=0,e.fillOpacity=1,e.clustered=!0;var t=e.mainContainer.createChild(U);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 Object.defineProperty(i.prototype,"columnsContainer",{get:function(){return this._columnsContainer},enumerable:!0,configurable:!0}),i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Column Series"))},i.prototype.createDataItem=function(){return new ei},i.prototype.validate=function(){var e=this;if(this.group.node.removeAttribute("fill"),this.chart&&this.xAxis&&this.yAxis){var t=this.chart.series,r=0,n=0,s=[];I(t.iterator(),function(m){if(m instanceof i&&e.baseAxis==m.baseAxis){var y;e.baseAxis==e.xAxis?y=e.chart.yAxes.indexOf(m.yAxis):y=e.chart.xAxes.indexOf(m.xAxis),s.push({series:m,axis:y})}}),s.sort(function(m,y){return m.axis-y.axis});var o;H(s,function(m){var y=m.series;y instanceof i&&((!y.stacked&&y.clustered||o!=m.axis&&y.clustered)&&r++,y==e&&(n=r-1)),o=m.axis}),this.clustered||(n=0,r=1);var l=this.baseAxis.renderer,u=l.cellStartLocation,h=l.cellEndLocation;this._startLocation=u+n/r*(h-u),this._endLocation=u+(n+1)/r*(h-u);var p=this.xAxis,d=this.yAxis;p instanceof we&&d instanceof re&&p.sortBySeries==this&&this.sortCategoryAxis(p,"valueY"),d instanceof we&&p instanceof re&&d.sortBySeries==this&&this.sortCategoryAxis(d,"valueX")}a.prototype.validate.call(this);for(var c=0;c<this.startIndex;c++){var f=this.dataItems.getIndex(c);this.disableUnusedColumns(f)}for(var c=this.dataItems.length-1;c>this.endIndex;c--){var f=this.dataItems.getIndex(c);this.disableUnusedColumns(f)}this._propertiesChanged=!1},i.prototype.sortCategoryAxis=function(e,t){var r=this;this.dataItems.values.sort(function(s,o){return o.values[t].workingValue-s.values[t].workingValue});var n=0;this.dataItems.each(function(s){s._index=n,n++}),e.dataItems.each(function(s){var o=s.component,l=o.categoryToPosition(s.category)-s.deltaPosition,u=o.getSeriesDataItemByCategory(s.category,r);if(u){var h=r.dataItems.indexOf(u);s._index=h;var p=E((h+.5)/r.dataItems.length-l,3);s.deltaAnimation&&!s.deltaAnimation.isDisposed()&&s.deltaAnimation.animationOptions[0].to==p||p!=E(s.deltaPosition,3)&&(s.deltaAnimation&&s.deltaAnimation.stop(),s.deltaAnimation=s.animate({property:"deltaPosition",from:-p,to:0},o.interpolationDuration,o.interpolationEasing),r._disposers.push(s.deltaAnimation))}}),e.dataItems.values.sort(function(s,o){return s.index-o.index})},i.prototype.validateDataElement=function(e){this.chart&&this.xAxis&&this.yAxis&&(this.validateDataElementReal(e),a.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=this,r,n,s,o,l=this.getStartLocation(e),u=this.getEndLocation(e),h=this.xField,p=this.xOpenField,d=this.yField,c=this.yOpenField,f=this.columns.template,m=f.percentWidth,y=f.percentHeight,v=f.pixelWidth,b=f.pixelHeight,x=f.maxWidth,_=f.maxHeight,$=f.pixelPaddingLeft,O=f.pixelPaddingRight,F=f.pixelPaddingTop,w=f.pixelPaddingBottom,D=!1,B=e.width;P(B)&&(S(B)&&(v=B),B instanceof de&&(m=B.value*100));var L=e.height;if(P(L)&&(S(L)&&(b=L),L instanceof de&&(y=L.value*100)),this.xAxis instanceof we&&this.yAxis instanceof we){if(!e.hasValue(this._xValueFields)||!e.hasValue(this._yValueFields))return;if(l=0,u=1,!Tt(m)){var M=E((u-l)*(1-m/100)/2,5);l+=M,u-=M}if(r=this.xAxis.getX(e,p,l),n=this.xAxis.getX(e,h,u),Tt(m)){var M=(n-r-v)/2;r+=M,n-=M}if(!Tt(x)&&x<Math.abs(n-r)){var M=(n-r-x)/2;r+=M,n-=M}if(l=0,u=1,!Tt(y)){var M=E((1-y/100)/2,5);l+=M,u-=M}if(s=this.yAxis.getY(e,c,l),o=this.yAxis.getY(e,d,u),Tt(y)){var M=(o-s-b)/2;o+=M,s-=M}if(!Tt(_)&&_<Math.abs(o-s)){var M=(o-s-_)/2;o+=M,s-=M}n=this.fixHorizontalCoordinate(n),r=this.fixHorizontalCoordinate(r),s=this.fixVerticalCoordinate(s),o=this.fixVerticalCoordinate(o)}else if(this.baseAxis==this.xAxis){if(!e.hasValue(this._yValueFields))return;if(!Tt(m)){var M=E((u-l)*(1-m/100)/2,5);l+=M,u-=M}if(r=this.xAxis.getX(e,p,l),n=this.xAxis.getX(e,h,u),Tt(m)){var M=(n-r-v)/2;r+=M,n-=M}if(!Tt(x)&&x<Math.abs(n-r)){var M=(n-r-x)/2;r+=M,n-=M}var Q=e.locations[c],ae=e.locations[d];this.yAxis instanceof re&&this.dataFields[this.yField]!=this.dataFields[this.yOpenField]&&(Q=0,ae=0),o=this.yAxis.getY(e,c,Q),s=this.yAxis.getY(e,d,ae);var K=Math.ceil(this.yAxis.axisLength);(s<0&&o<0||s>K&&o>K)&&(D=!0),s=this.fixVerticalCoordinate(s),o=this.fixVerticalCoordinate(o),Math.abs(n-r)-$-O==0&&(D=!0)}else{if(!e.hasValue(this._xValueFields))return;if(!Tt(y)){var M=E((u-l)*(1-y/100)/2,5);l+=M,u-=M}if(s=this.yAxis.getY(e,c,l),o=this.yAxis.getY(e,d,u),Tt(y)){var M=(o-s-b)/2;o-=M,s+=M}if(!Tt(_)&&_<Math.abs(o-s)){var M=(o-s-_)/2;o-=M,s+=M}var z=e.locations[h],Te=e.locations[p];this.xAxis instanceof re&&this.dataFields[this.xField]!=this.dataFields[this.xOpenField]&&(z=0,Te=0),n=this.xAxis.getX(e,h,z),r=this.xAxis.getX(e,p,Te);var K=Math.ceil(this.xAxis.axisLength);(n<0&&r<0||n>K&&r>K)&&(D=!0),n=this.fixHorizontalCoordinate(n),r=this.fixHorizontalCoordinate(r),Math.abs(s-o)-F-w==0&&(D=!0)}var ue=Math.abs(n-r),Me=Math.abs(o-s),ct=Math.min(r,n),qe=Math.min(s,o);if(D)this.disableUnusedColumns(e);else{var ne;e.column?(ne=e.column,this._propertiesChanged&&(it(this,ne,Ke),it(this.columns.template,ne,Ke),H(Ke,function(Ne){ne[Ne]=ne[Ne]}))):(ne=this.columns.create(),it(this,ne,Ke),it(this.columns.template,ne,Ke),e.addSprite(ne),e.column=ne,ne.paper=this.paper,this.itemsFocusable()?(P(this.role)||(this.role="menu"),P(ne.role)||(ne.role="menuitem"),ne.focusable=!0):(P(this.role)||(this.role="list"),P(ne.role)||(ne.role="listitem"),ne.focusable=!1),ne.focusable&&(ne.events.on("focus",function(Ne){ne.readerTitle=t.populateString(t.itemReaderText,e)},void 0,!1),ne.events.on("blur",function(Ne){ne.readerTitle=""},void 0,!1)),ne.hoverable&&(ne.events.on("over",function(Ne){ne.readerTitle=t.populateString(t.itemReaderText,e)},void 0,!1),ne.events.on("out",function(Ne){ne.readerTitle=""},void 0,!1)),ne.parent=this.columnsContainer,ne.virtualParent=this),ne.width=ue,ne.height=Me,ne.x=ct,ne.y=qe,ne.realX=r,ne.realY=s,ne.realWidth=n-r,ne.realHeight=o-s,this.setColumnStates(ne),ne.invalid&&ne.validate(),ne.__disabled=!1,I(this.axisRanges.iterator(),function(Ne){var Ze=e.rangesColumns.getKey(Ne.uid);Ze||(Ze=t.columns.create(),it(Ne.contents,Ze,Ke),e.addSprite(Ze),e.rangesColumns.setKey(Ne.uid,Ze),Ze.paper=t.paper),Ze.parent=Ne.contents,Ze.width=ue,Ze.height=Me,Ze.x=ct,Ze.y=qe,t.setColumnStates(Ze),Ze.invalid&&Ze.validate(),Ze.__disabled=!1})}e.itemWidth=ue,e.itemHeight=Me},i.prototype.disableUnusedColumns=function(e){e&&(e.column&&(e.column.width=0,e.column.height=0,e.column.__disabled=!0),I(this.axisRanges.iterator(),function(t){var r=e.rangesColumns.getKey(t.uid);r&&(r.width=0,r.height=0,r.__disabled=!0)}))},i.prototype.setColumnStates=function(e){if(this._dropFromOpenState||this._dropFromPreviousState||this._riseFromOpenState||this._riseFromPreviousState){var t=e.dataItem;if(this.xAxis instanceof re||this.yAxis instanceof re){var r,n=void 0,s=void 0;this.baseAxis==this.yAxis?(this.xOpenField&&this.xField&&this.xAxis instanceof re&&(r=t.getValue(this.xOpenField),n=t.getValue(this.xField)),s=t.getValue(this.xAxis.axisFieldName+"X","previousChange")):(this.yOpenField&&this.yField&&this.yAxis instanceof re&&(r=t.getValue(this.yOpenField),n=t.getValue(this.yField)),s=t.getValue(this.yAxis.axisFieldName+"Y","previousChange")),n<r?(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)),s<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 Le(this.createColumnTemplate()),this._disposers.push(new Pe(this._columns)),this._disposers.push(this._columns.template)),this._columns},enumerable:!0,configurable:!0}),i.prototype.createColumnTemplate=function(){return new Xi},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 r=this;if(a.prototype.updateLegendValue.call(this,e,t),this.legendDataItem){var n=this.legendDataItem.marker,s,o;e&&(e.droppedFromOpen?s=this._dropFromOpenState:s=this._riseFromOpenState,e.droppedFromPrevious?o=this._dropFromPreviousState:o=this._riseFromPreviousState),I(n.children.iterator(),function(l){e?(l.setState(o),l.setState(s)):(l.setState(r._riseFromPreviousState),l.setState(r._riseFromOpenState))})}},i.prototype.createLegendMarker=function(e){var t=e.pixelWidth,r=e.pixelHeight;e.removeChildren();var n=e.createChild(Mt);n.shouldClone=!1,it(this,n,Ke),n.copyFrom(this.columns.template),n.padding(0,0,0,0),n.width=t,n.height=r;var s=e.dataItem;s.color=this.fill,s.colorOrig=this.fill},i.prototype.copyFrom=function(e){a.prototype.copyFrom.call(this,e),this.columns.template.copyFrom(e.columns.template)},i.prototype.getBulletLocationX=function(e,t){if(this.baseAxis==this.xAxis){var r=e.locationX;S(r)||(r=.5);var n=this.getEndLocation(e.dataItem),s=this.getStartLocation(e.dataItem);return n-(n-s)*r}else return a.prototype.getBulletLocationX.call(this,e,t)},i.prototype.getBulletLocationY=function(e,t){if(this.baseAxis==this.yAxis){var r=e.locationY;S(r)||(r=.5);var n=this.getEndLocation(e.dataItem),s=this.getStartLocation(e.dataItem);return n-(n-s)*r}else return a.prototype.getBulletLocationY.call(this,e,t)},i.prototype.getAdjustedXLocation=function(e,t,r){return S(r)||(e?r=e.locations[t]:r=.5),this._endLocation-(this._endLocation-this._startLocation)*(1-r)},i.prototype.getAdjustedYLocation=function(e,t,r){return S(r)||(e?r=e.locations[t]:r=.5),this._endLocation-(this._endLocation-this._startLocation)*r},i.prototype.fixVerticalCoordinate=function(e){var t=this.columns.template.pixelPaddingBottom,r=this.columns.template.pixelPaddingTop,n=-r,s=this.yAxis.axisLength+t;return G(e,n,s)},i.prototype.fixHorizontalCoordinate=function(e){var t=this.columns.template.pixelPaddingLeft,r=this.columns.template.pixelPaddingRight,n=-t,s=this.xAxis.axisLength+r;return G(e,n,s)},i.prototype.disposeData=function(){a.prototype.disposeData.call(this),this.columns.clear()},i})(Nt);C.registeredClasses.ColumnSeries=pt;C.registeredClasses.ColumnSeriesDataItem=ei;var kn=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="Candlestick",e.layout="none",e}return i.prototype.createAssets=function(){a.prototype.createAssets.call(this),this.lowLine=this.createChild(li),this.lowLine.shouldClone=!1,this.highLine=this.createChild(li),this.highLine.shouldClone=!1},i.prototype.copyFrom=function(e){a.prototype.copyFrom.call(this,e),this.lowLine&&this.lowLine.copyFrom(e.lowLine),this.highLine&&this.highLine.copyFrom(e.highLine)},i})(Xi);C.registeredClasses.Candlestick=kn;var In=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.values.lowValueX={},e.values.lowValueY={},e.values.highValueX={},e.values.highValueY={},e.className="CandlestickSeriesDataItem",e.applyTheme(),e}return 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})(ei);var wt=(function(a){T(i,a);function i(){var e=a.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 se,r=t.getFor("positive"),n=t.getFor("negative");return e.dropFromOpenState.properties.fill=n,e.dropFromOpenState.properties.stroke=n,e.riseFromOpenState.properties.fill=r,e.riseFromOpenState.properties.stroke=r,e.applyTheme(),e}return i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Candlestick Series"))},i.prototype.createDataItem=function(){return new In},i.prototype.validateDataElementReal=function(e){a.prototype.validateDataElementReal.call(this,e),this.validateCandlestick(e)},i.prototype.validateCandlestick=function(e){var t=e.column;if(t){var r=t.lowLine,n=t.highLine;if(this.baseAxis==this.xAxis){var s=t.pixelWidth/2;r.x=s,n.x=s;var o=e.getWorkingValue(this.yOpenField),l=e.getWorkingValue(this.yField),u=this.yAxis.getY(e,this.yOpenField),h=this.yAxis.getY(e,this.yField),p=this.yAxis.getY(e,this.yLowField),d=this.yAxis.getY(e,this.yHighField),c=t.pixelY;r.y1=p-c,n.y1=d-c,o<l?(r.y2=u-c,n.y2=h-c):(r.y2=h-c,n.y2=u-c)}if(this.baseAxis==this.yAxis){var f=t.pixelHeight/2;r.y=f,n.y=f;var m=e.getWorkingValue(this.xOpenField),y=e.getWorkingValue(this.xField),v=this.xAxis.getX(e,this.xOpenField),b=this.xAxis.getX(e,this.xField),x=this.xAxis.getX(e,this.xLowField),_=this.xAxis.getX(e,this.xHighField),$=t.pixelX;r.x1=x-$,n.x1=_-$,m<y?(r.x2=v-$,n.x2=b-$):(r.x2=b-$,n.x2=v-$)}I(this.axisRanges.iterator(),function(O){var F=e.rangesColumns.getKey(O.uid);if(F){var w=F.lowLine;w.x=r.x,w.y=r.y,w.x1=r.x1,w.x2=r.x2,w.y1=r.y1,w.y2=r.y2;var D=F.highLine;D.x=n.x,D.y=n.y,D.x1=n.x1,D.x2=n.x2,D.y1=n.y1,D.y2=n.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(){a.prototype.defineFields.call(this);var e=this.xAxis,t=this.yAxis;if(e&&t){if(this.baseAxis==e){var r=xn(t.axisFieldName);this._yLowField="low"+r+"Y",this._yHighField="high"+r+"Y"}if(this.baseAxis==t){var n=xn(e.axisFieldName);this._xLowField="low"+n+"X",this._xHighField="high"+n+"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,r=e.pixelHeight;e.removeChildren();var n=e.createChild(kn);n.shouldClone=!1,n.copyFrom(this.columns.template);var s,o,l=n.lowLine,u=n.highLine;this.baseAxis==this.yAxis?(s=t/3,o=r,l.y=r/2,u.y=r/2,l.x2=t/3,u.x2=t/3,u.x=t/3*2,n.column.x=t/3):(s=t,o=r/3,l.x=t/2,u.x=t/2,l.y2=r/3,u.y2=r/3,u.y=r/3*2,n.column.y=r/3),n.width=s,n.height=o,it(this,e,Ke),it(this.columns.template,n,Ke),n.stroke=this.riseFromOpenState.properties.stroke,n.fill=n.stroke;var h=e.dataItem;h.color=n.fill,h.colorOrig=n.fill},i.prototype.createColumnTemplate=function(){return new kn},i})(pt);C.registeredClasses.CandlestickSeries=wt;C.registeredClasses.CandlestickSeriesDataItem=In;var Xd=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="StepLineSeriesSegment",e}return i.prototype.drawSegment=function(e,t,r,n,s,o){if(e.length>0&&t.length>0)if(s){var l=W(e[0]);if(e.length>0)for(var u=1;u<e.length;u++){var h=e[u];u/2==Math.round(u/2)?l+=W(h):l+=k(h)}this.strokeSprite.path=l,(this.fillOpacity>0||this.fillSprite.fillOpacity>0)&&(l=W(e[0])+_n(e),l+=k(t[0])+_n(t),l+=k(e[0]),l+=Ge(),this.fillSprite.path=l)}else{var l=W(e[0])+_n(e);this.strokeSprite.path=l,(this.fillOpacity>0||this.fillSprite.fillOpacity>0)&&(l+=k(t[0])+_n(t),l+=k(e[0]),l+=Ge(),this.fillSprite.path=l)}else this.strokeSprite.path="",this.fillSprite.path=""},i})(zs);C.registeredClasses.StepLineSeriesSegment=Xd;var Yd=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="StepLineSeriesDataItem",e.applyTheme(),e}return i})(er);var Ai=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="StepLineSeries",e.applyTheme(),e.startLocation=0,e.endLocation=1,e}return i.prototype.createDataItem=function(){return new Yd},i.prototype.addPoints=function(e,t,r,n,s){var o,l,u,h;this.baseAxis==this.xAxis&&(o=this.startLocation,l=this.endLocation,u=this.getAdjustedXLocation(t,this.yOpenField),h=this.getAdjustedXLocation(t,this.yField)),this.baseAxis==this.yAxis&&(u=this.startLocation,h=this.endLocation,o=this.getAdjustedXLocation(t,this.xOpenField),l=this.getAdjustedXLocation(t,this.xField));var p=this.xAxis.getX(t,r,o),d=this.yAxis.getY(t,n,u),c=this.xAxis.getX(t,r,l),f=this.yAxis.getY(t,n,h);if(p=G(p,-1e5,1e5),d=G(d,-1e5,1e5),c=G(c,-1e5,1e5),f=G(f,-1e5,1e5),!this.noRisers&&e.length>1){var m=e[e.length-1];this.baseAxis==this.xAxis&&(s?e.push({x:m.x,y:f}):e.push({x:p,y:m.y})),this.baseAxis==this.yAxis&&(s?e.push({x:c,y:m.y}):e.push({x:m.x,y:d}))}var y={x:p,y:d},v={x:c,y:f};s?e.push(v,y):e.push(y,v)},i.prototype.drawSegment=function(e,t,r){var n=!1;this.yAxis==this.baseAxis&&(n=!0),e.drawSegment(t,r,this.tensionX,this.tensionY,this.noRisers,n)},i.prototype.createSegment=function(){return new Xd},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})(ut);C.registeredClasses.StepLineSeries=Ai;C.registeredClasses.StepLineSeriesDataItem=Yd;var Gs=(function(a){T(i,a);function i(){var e=a.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 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})(Ji);C.registeredClasses.LightenFilter=Gs;var qd=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="Slice3D",e.layout="none";var t=e.createChild(ee);e.edge=t,t.shouldClone=!1,t.isMeasured=!1,t.toBack(),e.angle=30,e.depth=20;var r=e.createChild(ee);e.sideA=r,r.shouldClone=!1,r.isMeasured=!1;var n=e.createChild(ee);return e.sideB=n,n.shouldClone=!1,n.isMeasured=!1,e.applyTheme(),e}return i.prototype.setFill=function(e){a.prototype.setFill.call(this,e);var t;if(e instanceof be)t=e.hex;else if(e instanceof Ht||e instanceof ji)t=e.stops.getIndex(0).color.hex;else{var r=new Gs;r.lightness=-.25,this.edge.filters.push(r),this.sideA.filters.push(r.clone()),this.sideB.filters.push(r.clone())}if(t){var n=ie(t).lighten(-.25);this.edge.fill=n,this.sideA.fill=n,this.sideB.fill=n,this.edge.stroke=n,this.sideA.stroke=n,this.sideB.stroke=n}},i.prototype.draw=function(){if(this.cornerRadius=0,this.innerCornerRadius=0,a.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,r=this.pixelInnerRadius||0,n=this.radiusY||0,s=this.radius,o=e+t,l=n/s*r,u={x:Y(e)*r,y:X(e)*l},h={x:Y(e)*s,y:X(e)*n},p={x:Y(o)*s,y:X(o)*n},d={x:Y(o)*r,y:X(o)*l},c=this.depth,f={x:u.x,y:u.y-c},m={x:h.x,y:h.y-c},y={x:p.x,y:p.y-c},v={x:d.x,y:d.y-c},b="",x=Math.ceil(t/5),_=t/x,$=e,O=m,F=0;F<x;F++)if($+=_,$>0&&$<180){b+=W(O);var w={x:Y($)*s,y:X($)*n-c};b+=k({x:O.x,y:O.y+c}),b+=Ei({x:w.x,y:w.y+c},s,n,!0),b+=k(w),b+=Ei(O,s,n),b+="z",O=w}else{b+=W(O);var w={x:Y($)*s,y:X($)*n-c};b+=Ei(w,s,n,!0),b+=k({x:w.x,y:w.y+c}),b+=Ei({x:O.x,y:O.y+c},s,n),b+=k(O),b+="z",O=w}O=f,$=e;for(var F=0;F<x;F++)if($+=_,$>0&&$<180){b+=W(O);var w={x:Y($)*r,y:X($)*l-c};b+=k({x:O.x,y:O.y+c}),b+=Ei({x:w.x,y:w.y+c},r,l,!0),b+=k(w),b+=Ei(O,r,l),b+="z",O=w}else{b+=W(O);var w={x:Y($)*r,y:X($)*l-c};b+=Ei(w,r,l,!0),b+=k({x:w.x,y:w.y+c}),b+=Ei({x:O.x,y:O.y+c},r,l),b+=k(O),b+="z",O=w}this.edge.path=b,this.sideA.path=W(u)+k(h)+k(m)+k(f)+Ge(),this.sideB.path=W(p)+k(d)+k(v)+k(y)+Ge(),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 S(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 S(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){a.prototype.copyFrom.call(this,e),this.edge.copyFrom(e.edge),this.sideA.copyFrom(e.sideA),this.sideB.copyFrom(e.sideB)},i})(tr);var Gd=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="PieSeries3DDataItem",e.values.depthValue={},e.applyTheme(),e}return Object.defineProperty(i.prototype,"depthValue",{get:function(){return this.values.depthValue.value},set:function(e){this.setValue("depthValue",e)},enumerable:!0,configurable:!0}),i})(la);var Qu=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="PieSeries3D",e.applyTheme(),e}return i.prototype.createDataItem=function(){return new Gd},i.prototype.createSlice=function(){return new qd},i.prototype.validateDataElement=function(e){var t=e.slice,r=this.depth;S(r)||(r=this.chart.depth);var n=e.values.depthValue.percent;S(n)||(n=100),t.depth=n*r/100;var s=this.angle;S(s)||(s=this.chart.angle),t.angle=s,a.prototype.validateDataElement.call(this,e)},i.prototype.validate=function(){a.prototype.validate.call(this);for(var e=this._workingStartIndex;e<this._workingEndIndex;e++){var t=this.dataItems.getIndex(e),r=t.slice,n=r.startAngle;n>=-90&&n<90?r.toFront():n>=90&&r.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){a.prototype.positionBullet.call(this,e);var t=e.dataItem,r=t.slice;e.y=e.pixelY-r.depth},i})(ci);C.registeredClasses.PieSeries3D=Qu;C.registeredClasses.PieSeries3DDataItem=Gd;var Px=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="PieChart3DDataItem",e.applyTheme(),e}return i})(Zu);var Ny=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="PieChart3D",e.depth=20,e.angle=10,e.applyTheme(),e}return 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=G(e,0,90),this.setPropertyValue("angle",e)&&this.invalidateDataUsers()},enumerable:!0,configurable:!0}),i.prototype.createSeries=function(){return new Qu},i})(Vt);C.registeredClasses.PieChart3D=Ny;var Ry=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="SlicedChartDataItem",e.applyTheme(),e}return i})(ol);var By=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="SlicedChart",e.seriesContainer.layout="horizontal",e.padding(15,15,15,15),e.applyTheme(),e}return i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Sliced chart"))},i.prototype.validate=function(){a.prototype.validate.call(this)},i})(ll);C.registeredClasses.SlicedChart=By;C.registeredClasses.SlicedChartDataItem=Ry;var Za=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.legendSettings=new il,e.className="FlowDiagramNode",e.isMeasured=!1,new se,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 i.prototype.handleHit=function(e){this.isHidden||this.isHiding?this.show():this.hide()},i.prototype.show=function(e){var t=a.prototype.show.call(this,e);return this.outgoingDataItems.each(function(r){(!r.toNode||r.toNode&&!r.toNode.isHidden)&&(r.setWorkingValue("value",r.getValue("value"),e),r.link.show())}),this.incomingDataItems.each(function(r){(!r.fromNode||r.fromNode&&!r.fromNode.isHidden)&&(r.setWorkingValue("value",r.getValue("value"),e),r.link.show())}),t},i.prototype.hide=function(e){var t=a.prototype.hide.call(this,e);return this.outgoingDataItems.each(function(r){r.setWorkingValue("value",0,e),r.link.hide()}),this.incomingDataItems.each(function(r){r.setWorkingValue("value",0,e),r.link.hide()}),t},i.prototype.validate=function(){this.isDisposed()||(a.prototype.validate.call(this),this.invalidateLinks())},i.prototype.invalidateLinks=function(){var e=this;this.outgoingDataItems.each(function(t){var r=t.link;if(r.colorMode=="fromNode"&&(r.fill=r.dataItem.fromNode.color),r.colorMode=="gradient"){r.fill=r.gradient,r.stroke=r.gradient;var n=r.gradient.stops.getIndex(0);n&&(n.color=e.color,r.gradient.validate())}}),this.incomingDataItems.each(function(t){var r=t.link;if(r.colorMode=="toNode"&&(r.fill=r.dataItem.toNode.color),r.colorMode=="gradient"){r.fill=r.gradient,r.stroke=r.gradient;var n=r.gradient.stops.getIndex(1);n&&(n.color=e.color,r.gradient.validate())}})},Object.defineProperty(i.prototype,"incomingDataItems",{get:function(){var e=this;if(!this._incomingDataItems){var t=new ve;t.events.on("inserted",function(){e.chart.sortBy=="name"?e._incomingSorted=ga(e._incomingDataItems.iterator(),function(r,n){return Fo(r.fromName,n.fromName)}):e.chart.sortBy=="value"?e._incomingSorted=ga(e._incomingDataItems.iterator(),function(r,n){return $s(Fi(r.value,n.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 ve;t.events.on("inserted",function(){e.chart.sortBy=="name"?e._outgoingSorted=ga(e._outgoingDataItems.iterator(),function(r,n){return Fo(r.fromName,n.fromName)}):e.chart.sortBy=="value"?e._outgoingSorted=ga(e._outgoingDataItems.iterator(),function(r,n){return $s(Fi(r.value,n.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,r=e.pixelHeight;e.removeChildren();var n=e.createChild(Mt);n.shouldClone=!1,it(this,n,Ke),n.stroke=this.fill,n.copyFrom(this),n.padding(0,0,0,0),n.width=t,n.height=r;var s=e.dataItem;s.color=n.fill,s.colorOrig=n.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})(U);C.registeredClasses.FlowDiagramNode=Za;var _a=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e._distance=0,e.className="Polyline",e.element=e.paper.add("path"),e.shapeRendering="auto",e.fill=ie(),e.strokeOpacity=1,e.applyTheme(),e}return i.prototype.makePath=function(){this._distance=0;var e=this.segments;if(e&&e.length>0){for(var t="",r=0,n=e.length;r<n;r++){var s=e[r];if(s.length>0){t+=W(s[0]);for(var o=1;o<s.length;o++){var l=s[o];t+=k(l),this._distance+=_e(s[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 r=this._realSegments;if(r){for(var n=this.distance,s=0,o=void 0,l=0,u=0,h=void 0,p=void 0,d=0;d<r.length;d++){var c=r[d];if(c.length>1){for(var f=1;f<c.length;f++)if(h=c[f-1],p=c[f],l=s/n,o=_e(h,p),s+=o,u=s/n,l<=e&&u>e){d=r.length;break}}else c.length==1&&(h=c[0],p=c[0],l=0,u=1)}if(h&&p){var m=(e-l)/(u-l),y=pn(h,p,m);return{x:y.x,y:y.y,angle:t+ft(h,p)}}}return{x:0,y:0,angle:0}},Object.defineProperty(i.prototype,"realSegments",{get:function(){return this._realSegments},enumerable:!0,configurable:!0}),i})(ee);C.registeredClasses.Polyline=_a;var Qa=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="FlowDiagramLink";var t=new se;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(ee),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 i.prototype.positionBullets=function(){var e=this;I(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(U);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(ee);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;S(t)||(t=e.locationY),S(t)||(t=.5);var r=this.middleLine.positionToPoint(t);e.moveTo(r);var n=e.propertyFields.rotation,s;if(e.dataItem){var o=e.dataItem.dataContext;s=o[n]}S(s)||(s=r.angle),e.rotation=s},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 be&&(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){a.prototype.setFill.call(this,e);var t=this._gradient;t&&e instanceof be&&(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 Le(new ui),this._disposers.push(new Pe(this._bullets)),this._disposers.push(this._bullets.template),this._bullets.events.on("inserted",function(t){t.newValue.events.on("propertychanged",function(r){(r.property=="locationX"||r.property=="locationY")&&e.positionBullet(r.target)},void 0,!1)},void 0,!1)),this._bullets},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){a.prototype.copyFrom.call(this,e),this.bullets.copyFrom(e.bullets);var t=this.middleLine;t&&(t instanceof li&&e.middleLine instanceof li&&t.copyFrom(e.middleLine),t instanceof _a&&e.middleLine instanceof _a&&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 Ht),this._gradient},enumerable:!0,configurable:!0}),i})(U);C.registeredClasses.FlowDiagramLink=Qa;var Ju=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="ColorModifier",e.applyTheme(),e}return i.prototype.modify=function(e){return e},i})(st);C.registeredClasses.ColorModifier=Ju;var ul=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.lightnesses=[],e.brightnesses=[],e.opacities=[],e.offsets=[],e.className="GradientModifier",e.applyTheme(),e}return 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=he(t,this.opacities.length)),this.lightnesses&&(t=he(t,this.lightnesses.length)),this.brightnesses&&(t=he(t,this.brightnesses.length));for(var r=1,n,s,o=0;o<t;o++){var l=e;this.opacities&&S(this.opacities[o])&&(r=this.opacities[o]),this.lightnesses&&S(this.lightnesses[o])&&(n=this.lightnesses[o],s=void 0),this.brightnesses&&S(this.brightnesses[o])&&(s=this.brightnesses[o],n=void 0),S(s)?l=e.brighten(this.brightnesses[o]):S(n)&&(l=e.lighten(this.lightnesses[o]));var u=this.offsets[o];this.gradient.addColor(l,r,u)}return this.gradient},i.prototype.copyFrom=function(e){a.prototype.copyFrom.call(this,e),this._offsets=e.offsets,this._brightnesses=e.brightnesses,this._lightnesses=e.lightnesses,this._opacities=e.opacities},i})(Ju);C.registeredClasses.GradientModifier=ul;var Mn=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="LinearGradientModifier",e.gradient=new Ht,e.applyTheme(),e}return i.prototype.copyFrom=function(e){a.prototype.copyFrom.call(this,e),this.gradient=e.gradient.clone()},i})(ul);C.registeredClasses.LinearGradientModifier=Mn;var Us=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="FlowDiagramDataItem",e.values.value={},e.applyTheme(),e}return 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",pi(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 Ce(function(){e.component&&e.component.links.removeValue(t)}))}return this._link},enumerable:!0,configurable:!0}),i})(al);var Ks=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.colors=new sa,e.className="FlowDiagram",e.nodePadding=20,e.sortBy="none",e.sequencedInterpolation=!0,e.colors.step=2,e.minNodeSize=.02;var t=e.chartContainer.createChild(U);t.shouldClone=!1,t.layout="none",t.isMeasured=!1,e.linksContainer=t;var r=e.chartContainer.createChild(U);return r.shouldClone=!1,r.layout="none",r.isMeasured=!1,e.nodesContainer=r,e.dataItem=e.createDataItem(),e.dataItem.component=e,e.applyTheme(),e}return i.prototype.dispose=function(){a.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(),a.prototype.validateData.call(this);var t=0,r=0,n,s;I(this.dataItems.iterator(),function(l){var u=l.fromName;if(u){var h=e.nodes.getKey(u);h||(h=e.nodes.create(u),h.name=u,h.chart=e,h.dataItem=l),l.fromNode=h,l.fromNode.outgoingDataItems.push(l)}var p=l.toName;if(p){var h=e.nodes.getKey(p);h||(h=e.nodes.create(p),h.name=p,h.chart=e,h.dataItem=l),l.toNode=h,l.toNode.incomingDataItems.push(l)}if(!l.fromNode){var d=new Mn;d.opacities=[0,1],l.link.strokeModifier=d}if(!l.toNode){var c=new Mn;c.opacities=[1,0],l.link.strokeModifier=c}var f=l.value;S(f)&&(t+=f,r++,(n>f||!S(n))&&(n=f),(s<f||!S(s))&&(s=f))});var o="value";this.dataItem.setCalculatedValue(o,s,"high"),this.dataItem.setCalculatedValue(o,n,"low"),this.dataItem.setCalculatedValue(o,t,"sum"),this.dataItem.setCalculatedValue(o,t/r,"average"),this.dataItem.setCalculatedValue(o,r,"count"),I(this.nodes.iterator(),function(l){var u=l[1];u.fill instanceof be&&(u.color=u.fill),u.color==null&&(u.color=e.colors.next()),u.dataItem.color!=null&&(u.color=u.dataItem.color),u.dataItem.visible||u.hide(0),e.getNodeValue(u)}),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=ga(this.nodes.iterator(),function(e,t){return $s(Fi(e[1].total,t[1].total))}):this._sorted=this.nodes.iterator()},i.prototype.getNodeValue=function(e){var t=0,r=0;I(e.incomingDataItems.iterator(),function(n){var s=n.getWorkingValue("value");S(s)&&(t+=s)}),I(e.outgoingDataItems.iterator(),function(n){var s=n.getWorkingValue("value");S(s)&&(r+=s)}),e.total=t+r,e.totalIncoming=t,e.totalOutgoing=r},i.prototype.changeSorting=function(){this.sortNodes()},i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Flow diagram"))},i.prototype.createDataItem=function(){return new Us},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 Kr(e),this._disposers.push(new Bi(this._nodes))}return this._nodes},enumerable:!0,configurable:!0}),i.prototype.createNode=function(){var e=new Za;return this._disposers.push(e),e},Object.defineProperty(i.prototype,"links",{get:function(){return this._links||(this._links=new Le(this.createLink()),this._disposers.push(new Pe(this._links))),this._links},enumerable:!0,configurable:!0}),i.prototype.createLink=function(){var e=new Qa;return this._disposers.push(e),e},i.prototype.feedLegend=function(){var e=this.legend;if(e){var t=[];this.nodes.each(function(r,n){t.push(n)}),e.data=t,e.dataFields.name="name"}},i.prototype.disposeData=function(){a.prototype.disposeData.call(this),this.nodes.clear()},i})(na);C.registeredClasses.FlowDiagram=Ks;var hl=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="LabelBullet";var t=e.createChild(lt);return t.shouldClone=!1,t.verticalCenter="middle",t.horizontalCenter="middle",t.truncate=!0,t.hideOversized=!1,t.maxWidth=500,t.maxHeight=500,t.stroke=ie(),t.strokeOpacity=0,t.fill=new se().getFor("text"),e.events.on("maxsizechanged",e.handleMaxSize,e,!1),e.label=t,e.applyTheme(),e}return i.prototype.handleMaxSize=function(){this.label.maxWidth=this.maxWidth,this.label.maxHeight=this.maxHeight},i.prototype.copyFrom=function(e){a.prototype.copyFrom.call(this,e),this.label.copyFrom(e.label)},i})(ui);C.registeredClasses.LabelBullet=hl;var eh=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.nextInCoord=0,e.nextOutCoord=0,e.className="SankeyNode",e.width=10,e.height=10;var t=e.createChild(hl);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 r=e.createChild(hl);r.shouldClone=!1,r.label.hideOversized=!1,r.locationX=.5,r.locationY=.5,r.width=150,r.height=150,r.label.horizontalCenter="middle",e.valueLabel=r;var n=e.hiddenState;return n.properties.fill=new se().getFor("disabledBackground"),n.properties.opacity=.5,n.properties.visible=!0,e.background.hiddenState.copyFrom(n),e}return i.prototype.invalidateLinks=function(){var e=this;a.prototype.invalidateLinks.call(this),this.nextInCoord=0,this.nextOutCoord=0;var t=this.chart;if(t){var r=t.orientation;this._incomingSorted&&I(this._incomingSorted,function(n){var s=n.link,o=n.getWorkingValue("value");if(S(o)){s.parent=e.chart.linksContainer;var l=void 0,u=void 0,h=void 0;if(r=="horizontal"?(l=e.pixelX+e.dx,u=e.nextInCoord+e.pixelY+e.dy,h=0):(u=e.pixelY+e.dy,l=e.nextInCoord+e.pixelX+e.dx,h=90),s.endX=l,s.endY=u,s.startAngle=h,s.endAngle=h,s.gradient.rotation=h,s.linkWidth=o*t.valueHeight,!n.fromNode){r=="horizontal"?(s.maxWidth=200,s.startX=e.pixelX+e.dx-s.maxWidth,s.startY=s.endY):(s.maxHeight=200,s.startX=s.endX,s.startY=e.pixelY+e.dy-s.maxHeight),s.gradient,s.fill=n.toNode.color;var p=s.gradient.stops.getIndex(0);p&&(s.colorMode=="gradient"&&(p.color=e.color),p.opacity=0,s.fill=s.gradient,s.stroke=s.gradient,s.gradient.validate())}e.nextInCoord+=s.linkWidth}}),this._outgoingSorted&&I(this._outgoingSorted,function(n){var s=n.link;s.parent=e.chart.linksContainer;var o=n.getWorkingValue("value");if(S(o)){var l=void 0,u=void 0,h=void 0;if(r=="horizontal"?(h=0,l=e.pixelX+e.pixelWidth+e.dx-1,u=e.nextOutCoord+e.pixelY+e.dy):(h=90,l=e.nextOutCoord+e.pixelX+e.dx,u=e.pixelY+e.pixelHeight+e.dy-1),s.startX=l,s.startY=u,s.startAngle=h,s.endAngle=h,s.gradient.rotation=h,s.linkWidth=o*e.chart.valueHeight,!n.toNode){r=="horizontal"?(s.maxWidth=200,s.endX=e.pixelX+s.maxWidth+e.dx,s.endY=s.startY):(s.maxHeight=200,s.endX=s.startX,s.endY=e.pixelY+s.maxHeight+e.dy),s.opacity=e.opacity;var p=s.gradient.stops.getIndex(1);p&&(s.colorMode=="gradient"&&(p.color=e.color),p.opacity=0,s.fill=s.gradient,s.stroke=s.gradient,s.gradient.validate())}e.nextOutCoord+=s.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){a.prototype.copyFrom.call(this,e),this.nameLabel.copyFrom(e.nameLabel),this.valueLabel.copyFrom(e.valueLabel)},i})(Za);C.registeredClasses.SankeyNode=eh;var Nn=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="Polyspline",e.tensionX=.5,e.tensionY=.5,e.applyTheme(),e}return i.prototype.makePath=function(){this._distance=0;var e=this.segments,t=this.tensionX,r=this.tensionY;if(this.allPoints=[],e&&e.length>0){var n="";this._realSegments=[];for(var s=0,o=e.length;s<o;s++){var l=e[s],u=[];if(this._realSegments.push(u),l.length>0){var h=l[0],p=l[l.length-1],d=!1;E(h.x,3)==E(p.x)&&E(h.y)==E(p.y)&&(d=!0),n+=W(l[0]);for(var c=0;c<l.length-1;c++){var f=l[c-1],m=l[c],y=l[c+1],v=l[c+2];c===0?f=l[c]:c==l.length-2&&(v=l[c+1]),v||(v=y),c===0?d?f=l[l.length-2]:f=l[s]:c==l.length-2&&(d?v=l[1]:v=l[c+1]);var b=su(f,m,y,v,t,r),x=ou(f,m,y,v,t,r);n+=xa(y,b,x);var _=Math.ceil(Vm(m,y,b,x,20))*1.2,$=m;if(_>0)for(var O=0;O<=_;O++){var F=$o(m,y,b,x,O/_);if(!(F.x==$.x&&F.y==$.y)){u.push(F);var w=E(ft($,F),5);this._distance+=_e($,F),this.allPoints[Math.floor(this._distance)]={x:F.x,y:F.y,angle:w},$=F}}else u.push(f)}}var D=this.allPoints;if(D.length>1){for(var B=0;B<D.length;B++)if(!D[B]){if(B>1)D[B]=D[B-1];else for(var L=1;L<D.length;L++)if(D[L]){D[B]=D[L];break}}}}this.path=n}},i.prototype.getClosestPointIndex=function(e){var t=this.allPoints,r,n=1/0;if(t.length>1)for(var s=1;s<t.length;s++){var o=_e(e,t[s]);o<n&&(r=s,n=o)}return r},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 r=0,n=this.allPoints,s=n.length;if(S(e)||(e=0),s>1){if(t&&s>3){if(e<0){e<-.01&&(e=-.01);var o=n[0],l=n[1],u=o.x-(o.x-l.x)*s*e,h=o.y-(o.y-l.y)*s*e;return{x:u,y:h,angle:ft(o,l)}}else if(e>1){e>1.01&&(e=1.01);var o=n[n.length-2],l=n[n.length-3],u=o.x+(o.x-l.x)*s*(e-1),h=o.y+(o.y-l.y)*s*(e-1);return{x:u,y:h,angle:ft(o,{x:u,y:h})}}else if(e==1){var p=n[n.length-1];return{x:p.x,y:p.y,angle:p.angle}}}else e<0&&(e=Math.abs(e),r=180),e>=1&&(e=.9999999999999);var d=n[Math.floor(e*s)];return{x:d.x,y:d.y,angle:d.angle+r}}else if(s==1){var d=n[0];return{x:d.x,y:d.y,angle:d.angle}}else return{x:0,y:0,angle:0}},i})(_a);C.registeredClasses.Polyspline=Nn;var th=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="SankeyLink",new se,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(Nn),e.middleLine.shouldClone=!1,e.middleLine.strokeOpacity=0,e.applyTheme(),e}return i.prototype.makeBackwards=function(){this.states.getKey("backwards")!=null&&this.setState("backwards")},i.prototype.validate=function(){var e,t,r,n;if(a.prototype.validate.call(this),!this.isTemplate){var s=this.startX,o=this.startY,l=this.endX,u=this.endY;if(this.states.getKey("backwards")&&this.setState("default"),this.dataItem){var h=this.dataItem.component;h&&(h.orientation=="horizontal"?l<s&&(e=Va([l,s],2),s=e[0],l=e[1],t=Va([u,o],2),o=t[0],u=t[1],this.makeBackwards()):u<o&&(r=Va([u,o],2),o=r[0],u=r[1],n=Va([l,s],2),s=n[0],l=n[1],this.makeBackwards()))}S(l)||(l=s),S(u)||(u=o);var p=this.startAngle,d=this.endAngle,c=this.linkWidth,f="",m=s,y=o,v=l,b=u,x=s+c*X(p),_=l+c*X(d),$=o+c*Y(p),O=u+c*Y(d),F=s+c/2*X(p),w=l+c/2*X(d),D=o+c/2*Y(p),B=u+c/2*Y(d);this.zIndex=this.zIndex||this.dataItem.index;var L=this.tension+(1-this.tension)*X(p),M=this.tension+(1-this.tension)*Y(p);if(this.middleLine.tensionX=L,this.middleLine.tensionY=M,S(c)&&S(s)&&S(l)&&S(o)&&S(u)){E(m,3)==E(v,3)&&(v+=.01),E(y,3)==E(b,3)&&(b+=.01),E(x,3)==E(_,3)&&(_+=.01),E($,3)==E(O,3)&&(O+=.01);var Q=Math.min(x,_,m,v),ae=Math.min($,O,y,b),K=Math.max(x,_,m,v),z=Math.max($,O,y,b);this._bbox={x:Q,y:ae,width:K-Q,height:z-ae};var Te=this.controlPointDistance,ue=m+(v-m)*Te*Y(p),Me=y+(b-y)*Te*X(p),ct=v-(v-m)*Te*Y(d),qe=b-(b-y)*Te*X(d),ne=F+(w-F)*Te*Y(p),Ne=D+(B-D)*Te*X(p),Ze=w-(w-F)*Te*Y(d),zt=B-(B-D)*Te*X(d),Xt=ft({x:ue,y:Me},{x:ct,y:qe}),Bt=(c/Y(Xt)-c)/Lp(Xt)*Y(p),ii=(c/X(Xt)-c)*Lp(Xt)*X(p),_i=-Bt/2+x+(_-x)*Te*Y(p),mi=-ii/2+$+(O-$)*Te*X(p),nr=-Bt/2+_-(_-x)*Te*Y(d),sr=-ii/2+O-(O-$)*Te*X(d);B==D&&(B+=.01),this.middleLine.segments=[[{x:F,y:D},{x:ne,y:Ne},{x:Ze,y:zt},{x:w,y:B}]],ue+=Bt/2,Me+=ii/2,ct+=Bt/2,qe+=ii/2,f+=W({x:m,y}),f+=new Qi(L,M).smooth([{x:m,y},{x:ue,y:Me},{x:ct,y:qe},{x:v,y:b}]),f+=k({x:_,y:O}),f+=new Qi(L,M).smooth([{x:_,y:O},{x:nr,y:sr},{x:_i,y:mi},{x,y:$}]),f+=Ge()}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})(Qa);C.registeredClasses.SankeyLink=th;var jy=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="SankeyDiagramDataItem",e.applyTheme(),e}return i})(Us);var Ey=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="SankeyDiagram",e.orientation="horizontal",e.nodeAlign="middle",e.nodesContainer.width=N(100),e.nodesContainer.height=N(100),e.linksContainer.width=N(100),e.linksContainer.height=N(100),e.applyTheme(),e}return i.prototype.validateData=function(){var e=this;this._valueHeight=void 0,a.prototype.validateData.call(this),this._levelCount=0,this.nodes.each(function(t,r){r.level=void 0}),this.nodes.each(function(t,r){r.level=e.getNodeLevel(r,0),e._levelCount=he(e._levelCount,r.level)})},i.prototype.getNodeLevel=function(e,t){var r=this,n=[t];return I(e.incomingDataItems.iterator(),function(s){s.fromNode&&(S(s.fromNode.level)?n.push(s.fromNode.level+1):(r._counter=0,r.checkLoop(s.fromNode),r._counter<r.dataItems.length&&n.push(r.getNodeLevel(s.fromNode,t+1))))}),Math.max.apply(Math,ca(n))},i.prototype.checkLoop=function(e){var t=this;this._counter++,!(this._counter>this.dataItems.length)&&I(e.incomingDataItems.iterator(),function(r){t.checkLoop(r.fromNode)})},i.prototype.calculateValueHeight=function(){var e=this;this._levelSum={},this._levelNodesCount={},this.maxSum=0;var t=this.dataItem.values.value.sum;I(this._sorted,function(p){var d=p[1];e.getNodeValue(d)}),this.nodes.each(function(p,d){var c=d.level,f=Math.max(d.totalIncoming,d.totalOutgoing);f/t<e.minNodeSize&&(f=t*e.minNodeSize),S(e._levelSum[c])?e._levelSum[c]+=f:e._levelSum[c]=f,S(e._levelNodesCount[c])?e._levelNodesCount[c]++:e._levelNodesCount[c]=1});var r;this.orientation=="horizontal"?r=this.chartContainer.maxHeight-1:r=this.chartContainer.maxWidth-1;var n,s;te(this._levelSum,function(p,d){var c=d,f=e._levelNodesCount[p],m=(r-(f-1)*e.nodePadding)/c;m==1/0&&(m=0),(s>m||!S(s))&&(s=m,e.maxSum=c,n=ke(p))}),this._maxSumLevel=n;var o=this._levelNodesCount[this._maxSumLevel],l=(r-(o-1)*this.nodePadding)/this.maxSum;if(l==1/0&&(l=0),!S(this.valueHeight))this.valueHeight=l;else{var u=void 0;try{u=this._heightAnimation.animationOptions[0].to}catch{}if(u!=l){var h=this.interpolationDuration;try{h=this.nodes.template.states.getKey("active").transitionDuration}catch{}this._heightAnimation=new Gt(this,{property:"valueHeight",from:this.valueHeight,to:l},h,this.interpolationEasing).start(),this._disposers.push(this._heightAnimation)}}},i.prototype.validate=function(){var e=this;a.prototype.validate.call(this),this.calculateValueHeight();var t=this.nodesContainer,r={},n=this._levelNodesCount[this._maxSumLevel],s=this.dataItem.values.value.sum,o;this.orientation=="horizontal"?o=this.chartContainer.maxHeight-1:o=this.chartContainer.maxWidth-1,I(this._sorted,function(l){var u=l[1],h=u.level,p=0,d=e._levelNodesCount[h];switch(e.nodeAlign){case"bottom":p=(e.maxSum-e._levelSum[h])*e.valueHeight-(d-n)*e.nodePadding;break;case"middle":p=(e.maxSum-e._levelSum[h])*e.valueHeight/2-(d-n)*e.nodePadding/2;break}if(e.maxSum==0)switch(e.nodeAlign){case"bottom":p=o-d*(e.minNodeSize*o+e.nodePadding);break;case"middle":p=o/2-d/2*(e.minNodeSize*o+e.nodePadding);break}u.parent=t;var c,f,m,y=Math.max(u.totalIncoming,u.totalOutgoing);if(y/s<e.minNodeSize&&(y=s*e.minNodeSize),e.orientation=="horizontal"){c=(e.innerWidth-u.pixelWidth)/e._levelCount,f=c*u.level,m=r[h]||p;var v=y*e.valueHeight;s==0&&v==0&&(v=e.minNodeSize*o),u.height=v,u.minX=f,u.maxX=f,r[h]=m+v+e.nodePadding}else{c=(e.innerHeight-u.pixelHeight)/e._levelCount,f=r[h]||p,m=c*u.level;var b=y*e.valueHeight;s==0&&b==0&&(b=e.minNodeSize*o),u.width=b,u.minY=m,u.maxY=m,r[h]=f+b+e.nodePadding}u.x=f,u.y=m})},i.prototype.showReal=function(e){var t=this;if(!this.preventShow){if(this.interpolationDuration>0){var r=this.nodesContainer,n=0;I(this.links.iterator(),function(s){s.hide(0)}),I(this._sorted,function(s){var o=s[1],l;t.orientation=="horizontal"?(o.dx=-(r.pixelWidth-o.pixelWidth)/Math.max(t._levelCount,1),l="dx"):(o.dy=-(r.pixelHeight-o.pixelHeight)/Math.max(t._levelCount,1),l="dy");var u=0,h=t.interpolationDuration;t.sequencedInterpolation&&(u=t.sequencedInterpolationDelay*n+h*n/Xm(t.nodes.iterator())),o.opacity=0,o.invalidateLinks(),o.animate([{property:"opacity",from:0,to:1},{property:l,to:0}],t.interpolationDuration,t.interpolationEasing).delay(u),I(o.outgoingDataItems.iterator(),function(p){var d=p.link.show(t.interpolationDuration);d&&!d.isFinished()&&d.delay(u)}),I(o.incomingDataItems.iterator(),function(p){if(!p.fromNode){var d=p.link.show(t.interpolationDuration);d&&!d.isFinished()&&d.delay(u)}}),n++})}return a.prototype.showReal.call(this)}},i.prototype.changeSorting=function(){var e=this;this.sortNodes();var t={};I(this._sorted,function(r){var n=r[1],s=n.level,o=(e.maxSum-e._levelSum[s])*e.valueHeight/2,l,u;e.orientation=="horizontal"?(l="y",u=n.pixelHeight):(l="x",u=n.pixelWidth),n.animate({property:l,to:t[s]||o},e.interpolationDuration,e.interpolationEasing),t[s]=(t[s]||o)+u+e.nodePadding,n.invalidateLinks()})},i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Sankey diagram"))},i.prototype.createDataItem=function(){return new jy},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 eh;return this._disposers.push(e),e},i.prototype.createLink=function(){var e=new th;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(){a.prototype.disposeData.call(this),this._sorted=this.nodes.iterator()},i})(Ks);C.registeredClasses.SankeyDiagram=Ey;var ih=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="ChordNode";var t=e.createChild(kr);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(tr),e.slice.isMeasured=!1;var r=e.hiddenState;return r.properties.fill=new se().getFor("disabledBackground"),r.properties.opacity=.5,r.properties.visible=!0,e.setStateOnChildren=!1,e.slice.hiddenState.properties.visible=!0,e.adapter.add("tooltipX",function(n,s){return s.slice.ix*(s.slice.radius-(s.slice.radius-s.slice.pixelInnerRadius)/2)}),e.adapter.add("tooltipY",function(n,s){return s.slice.iy*(s.slice.radius-(s.slice.radius-s.slice.pixelInnerRadius)/2)}),e}return i.prototype.invalidateLinks=function(){var e=this;a.prototype.invalidateLinks.call(this);var t=this.label,r=this.slice,n=this.chart;if(n&&r){var s=this.total,o=r.arc,l=r.startAngle;this.children.each(function(p){if(p instanceof ui){var d=p.locationX;S(d)||(d=.5);var c=p.locationY;S(c)||(c=1);var f=l+o*d,m=c*r.radius;p.x=m*Y(f),p.y=m*X(f)}});var u=l+o*t.location,h=l+(1-s/this.adjustedTotal)*o*.5;Tt(h)&&(h=l),t.fixPosition(u,r.radius),this.nextAngle=h,this._outgoingSorted&&I(this._outgoingSorted,function(p){var d=p.link;d.parent=e.chart.linksContainer;var c=p.getWorkingValue("value");if(S(c)){if(n.nonRibbon){var f=d.percentWidth;S(f)||(f=5),f=f/100,d.startAngle=l+o/2-o/2*f,d.arc=o*f}else d.arc=c*n.valueAngle,d.startAngle=e.nextAngle,e.nextAngle+=d.arc;p.toNode||(d.endAngle=d.startAngle),d.radius=r.pixelInnerRadius}}),this._incomingSorted&&I(this._incomingSorted,function(p){var d=p.link;if(d.radius=r.pixelInnerRadius,n.nonRibbon){var c=d.percentWidth;S(c)||(c=5),c=c/100,d.endAngle=l+o/2-o/2*c,d.arc=o*c}else{d.endAngle=e.nextAngle;var f=p.getWorkingValue("value");S(f)&&(d.arc=f*n.valueAngle,e.nextAngle+=d.arc)}p.fromNode||(d.startAngle=d.endAngle)})}},i.prototype.updateRotation=function(){var e=this.slice,t=this.trueStartAngle+e.arc/2,r=e.radius,n=r*Y(t),s=r*X(t),o=ft({x:n+this.pixelX,y:s+this.pixelY});e.startAngle=this.trueStartAngle+(o-t),this.dx=-this.pixelX,this.dy=-this.pixelY},i.prototype.copyFrom=function(e){a.prototype.copyFrom.call(this,e),this.label.copyFrom(e.label),this.slice.copyFrom(e.slice)},i})(Za);C.registeredClasses.ChordNode=ih;var Wy=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="QuadraticCurve",e.element=e.paper.add("path"),e.pixelPerfect=!1,e.fill=ie(),e.applyTheme(),e}return i.prototype.draw=function(){if(S(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},r={x:this.cpx,y:this.cpy},n=W(e)+ea(t,r);this.path=n}},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},r={x:this.cpx,y:this.cpy},n={x:this.x2,y:this.y2},s=kp(t,n,r,e),o=kp(t,n,r,e+.001);return{x:s.x,y:s.y,angle:ft(s,o)}},i})(li);var rh=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="ChordLink",e.middleLine=e.createChild(Wy),e.middleLine.shouldClone=!1,e.middleLine.strokeOpacity=0,e.applyTheme(),e}return i.prototype.validate=function(){if(a.prototype.validate.call(this),!this.isTemplate){var e=this.startAngle,t=this.endAngle,r=this.arc,n=this.radius,s=this.dataItem.fromNode,o=this.dataItem.toNode,l=0,u=0;s&&(l=s.pixelX+s.dx,u=s.pixelY+s.dy);var h=0,p=0;if(o&&(h=o.pixelX+o.dx,p=o.pixelY+o.dy),n>0){var d=n*Y(e)+l,c=n*X(e)+u,f=n*Y(t)+h,m=n*X(t)+p,y={x:0,y:0},v=W({x:d,y:c});v+=bt(e,r,n),v+=ea({x:f,y:m},y),v+=bt(t,r,n),v+=ea({x:d,y:c},y),r>0?this.link.path=v:this.link.path="",this.maskBullets&&(this.bulletsMask.path=v,this.bulletsContainer.mask=this.bulletsMask);var b=e+r/2,x=t+r/2,_=this.middleLine;_.x1=n*Y(b)+l,_.y1=n*X(b)+u,_.x2=n*Y(x)+h,_.y2=n*X(x)+p,_.cpx=0,_.cpy=0,_.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})(Qa);C.registeredClasses.ChordLink=rh;var Hy=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="ChordDiagramDataItem",e.applyTheme(),e}return i})(Us);var zy=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.valueAngle=0,e.className="ChordDiagram",e.startAngle=-90,e.endAngle=270,e.radius=N(80),e.innerRadius=-15,e.nodePadding=5;var t=e.chartContainer.createChild(U);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 i.prototype.validate=function(){var e=this,t=this.chartContainer,r=this.endAngle,n=this.startAngle+this.nodePadding/2,s=wi(this.startAngle,this.endAngle,1),o={x:0,y:0,width:0,height:0};s=Gr([s,o]);var l=Math.min(t.innerWidth/s.width,t.innerHeight/s.height);S(l)||(l=0);var u=mt(this.radius,l),h=mt(this.innerRadius,u,!0),p=this.dataItem.values.value.sum,d=0,c=0;I(this._sorted,function(f){var m=f[1];e.getNodeValue(m),d++;var y=m.total;m.total/p<e.minNodeSize&&(y=p*e.minNodeSize),c+=y}),this.valueAngle=(r-this.startAngle-this.nodePadding*d)/c,I(this._sorted,function(f){var m=f[1],y=m.slice;y.radius=u,y.innerRadius=h;var v=m.total;m.total/p<e.minNodeSize&&(v=p*e.minNodeSize),m.adjustedTotal=v;var b;e.nonRibbon?b=(r-e.startAngle)/d-e.nodePadding:b=e.valueAngle*v,y.arc=b,y.startAngle=n,m.trueStartAngle=n,m.parent=e.nodesContainer,m.validate(),n+=b+e.nodePadding}),this.chordContainer.definedBBox={x:u*s.x,y:u*s.y,width:u*s.width,height:u*s.height},this.chordContainer.invalidateLayout(),a.prototype.validate.call(this)},i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Chord diagram"))},i.prototype.createDataItem=function(){return new Hy},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 ih;return this._disposers.push(e),e},i.prototype.createLink=function(){var e=new rh;return this._disposers.push(e),e},i})(Ks);C.registeredClasses.ChordDiagram=zy;var Ud=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="TreeMapSeriesDataItem",e.applyTheme(),e}return 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,r,n){var s=this.treeMapDataItem;return s&&s.hide(e),a.prototype.hide.call(this,e,t,r,n)},i.prototype.show=function(e,t,r){var n=this.treeMapDataItem;return n&&n.show(e,t,r),a.prototype.show.call(this,e,t,r)},i})(ei);var pl=(function(a){T(i,a);function i(){var e=a.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 se;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 i.prototype.processDataItem=function(e,t){t.seriesDataItem=e,a.prototype.processDataItem.call(this,e,t)},i.prototype.createDataItem=function(){return new Ud},i.prototype.show=function(e){if(!this.preventShow){var t=this.defaultState.transitionDuration;return S(e)&&(t=e),this.dataItems.each(function(r){r.show(e)}),a.prototype.showReal.call(this,t)}},i.prototype.hide=function(e){var t=this.defaultState.transitionDuration;S(e)&&(t=e);var r=a.prototype.hideReal.call(this,t);return this.dataItems.each(function(n){n.hide(e)}),r},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&&(!P(e.dataFields)||!Be(e.dataFields))&&(e.dataFields={}),a.prototype.processConfig.call(this,e)},i.prototype.createLegendMarker=function(e){var t=e.pixelWidth,r=e.pixelHeight;e.removeChildren();var n=e.createChild(Mt);n.shouldClone=!1,it(this,n,Ke),n.padding(0,0,0,0),n.width=t,n.height=r;var s=e.dataItem;s.color=n.fill,s.colorOrig=n.fill},i.prototype.disableUnusedColumns=function(e){a.prototype.disableUnusedColumns.call(this,e),e.column&&(e.column.__disabled=!1)},i})(pt);C.registeredClasses.TreeMapSeries=pl;C.registeredClasses.TreeMapSeriesDataItem=Ud;var Xy=(function(a){T(i,a);function i(){var e=a.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 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?e=this.values.value.workingValue:I(this.children.iterator(),function(t){var r=t.value;S(r)&&(e+=r)}),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,r,n){this.setWorkingValue("value",0),this.children&&this.children.each(function(o){o.hide(e,t,r,n)});var s=this.seriesDataItem;return s&&s.bullets.each(function(o,l){l.hide(),l.preventShow=!0}),a.prototype.hide.call(this,e,t,r,n)},i.prototype.show=function(e,t,r){this.setWorkingValue("value",this.values.value.value),this.children&&this.children.each(function(s){s.show(e,t,r)});var n=this.seriesDataItem;return n&&n.bullets.each(function(s,o){o.preventShow=!1}),a.prototype.show.call(this,e,t,r)},i})(Ln);var Yy=(function(a){T(i,a);function i(){var e=a.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 sa,e.sorting="descending";var t=e.xAxes.push(new re);t.title.disabled=!0,t.strictMinMax=!0;var r=t.renderer;r.inside=!0,r.labels.template.disabled=!0,r.ticks.template.disabled=!0,r.grid.template.disabled=!0,r.axisFills.template.disabled=!0,r.minGridDistance=100,r.line.disabled=!0,r.baseGrid.disabled=!0;var n=e.yAxes.push(new re);n.title.disabled=!0,n.strictMinMax=!0;var s=n.renderer;s.inside=!0,s.labels.template.disabled=!0,s.ticks.template.disabled=!0,s.grid.template.disabled=!0,s.axisFills.template.disabled=!0,s.minGridDistance=100,s.line.disabled=!0,s.baseGrid.disabled=!0,s.inversed=!0,e.xAxis=t,e.yAxis=n;var o=new pl;return e.seriesTemplates=new Kr(o),o.virtualParent=e,e._disposers.push(new Bi(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 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(r){var n=r.target.dataItem.dataContext;n.isDisposed()||(t.zoomToChartDataItem(n),t.createTreeSeries(n))},void 0,!0),this._disposers.push(e))},enumerable:!0,configurable:!0}),i.prototype.validateData=function(){this.series.clear(),this._tempSeries=[],a.prototype.validateData.call(this),this._homeDataItem&&this._homeDataItem.dispose();var e=this.dataItems.template.clone();this._homeDataItem=e,I(this.dataItems.iterator(),function(n){n.parent=e}),e.children=this.dataItems,e.x0=0,e.y0=0,e.name=this._homeText;var t=1e3,r=Math.round(t*this.pixelHeight/this.pixelWidth/10)*10||1e3;e.x1=t,e.y1=r,this.xAxis.min=0,this.xAxis.max=t,this.xAxis.getMinMax(),this.yAxis.min=0,this.yAxis.max=r,this.yAxis.getMinMax(),this.layoutItems(e),this.createTreeSeries(e),this.feedLegend()},i.prototype.layoutItems=function(e,t){if(e){var r=e.children;t||(t=this.sorting),t=="ascending"&&r.values.sort(function(l,u){return l.value-u.value}),t=="descending"&&r.values.sort(function(l,u){return u.value-l.value}),this._updateDataItemIndexes(0),this.layoutAlgorithm(e);for(var n=0,s=r.length;n<s;n++){var o=r.getIndex(n);o.children&&this.layoutItems(o)}}},i.prototype.createTreeSeries=function(e){var t=this;this._tempSeries=[];for(var r=[e],n=e.parent;n!=null;)this.initSeries(n),r.push(n),n=n.parent;r.reverse(),this.navigationBar&&(this.navigationBar.data=r),this.createTreeSeriesReal(e),H(this._tempSeries,function(s){t.series.indexOf(s)==-1&&t.series.push(s),s.zIndex=s.level})},i.prototype.createTreeSeriesReal=function(e){if(e.children){var t=e.level;if(t<this.currentLevel+this.maxLevels){this.initSeries(e);for(var r=0;r<e.children.length;r++){var n=e.children.getIndex(r);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,a.prototype.setData.call(this,e)},i.prototype.seriesAppeared=function(){return!0},i.prototype.initSeries=function(e){var t=this;if(!e.series){var r=void 0,n=this.seriesTemplates.getKey(e.level.toString());n?r=n.clone():r=this.series.create(),r.dataItem.dataContext=e,r.name=e.name,r.parentDataItem=e,e.series=r;var s=e.level;r.level=s;var o=e.dataContext;o&&(r.config=o.config),this.dataUsers.removeValue(r),r.data=e.children.values,r.fill=e.color,r.columnsContainer.hide(0),r.bulletsContainer.hide(0),r.columns.template.adapter.add("fill",function(l,u){var h=u.dataItem;if(h){var p=h.treeMapDataItem;if(p)return u.fill=p.color,u.adapter.remove("fill"),p.color}}),this.zoomable&&(e.level>this.currentLevel||e.children&&e.children.length>0)&&(r.columns.template.cursorOverStyle=We.pointer,this.zoomable&&r.columns.template.events.on("hit",function(l){var u=l.target.dataItem;e.level>t.currentLevel?t.zoomToChartDataItem(u.treeMapDataItem.parent):t.zoomToSeriesDataItem(u)},this,void 0))}this._tempSeries.push(e.series)},i.prototype.toggleBullets=function(e){var t=this;I(this.series.iterator(),function(r){t._tempSeries.indexOf(r)==-1?(r.columnsContainer.hide(),r.bulletsContainer.hide(e)):(r.columnsContainer.show(),r.bulletsContainer.show(e),r.dataItems.each(function(n){n.bullets.each(function(s,o){o.show()})}),r.level<t.currentLevel?(t.hideParentColumns&&r.columnsContainer.hide(),r.bulletsContainer.hide(e)):r.level==t.currentLevel&&t.maxLevels>1&&r.dataItems.each(function(n){n.treeMapDataItem.children&&n.bullets.each(function(s,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 r=this.zoomOutButton;if(r&&(e!=this._homeDataItem?r.show():r.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 n=this.xAxis.rangeChangeAnimation||this.yAxis.rangeChangeAnimation;n&&!n.isDisposed()&&!n.isFinished()?(this._dataDisposers.push(n),n.events.once("animationended",function(){t.toggleBullets()})):this.toggleBullets()}},i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("TreeMap chart"))},i.prototype.createDataItem=function(){return new Xy},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 pl},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(P(e.layoutAlgorithm)&&ce(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;break}P(e.navigationBar)&&!P(e.navigationBar.type)&&(e.navigationBar.type="NavigationBar"),a.prototype.processConfig.call(this,e)}},i.prototype.validateLayout=function(){a.prototype.validateLayout.call(this),this.layoutItems(this.currentlyZoomed)},i.prototype.validateDataItems=function(){a.prototype.validateDataItems.call(this),this.layoutItems(this._homeDataItem),I(this.series.iterator(),function(e){e.validateRawData()}),this.zoomToChartDataItem(this._homeDataItem)},i.prototype.binaryTree=function(e){var t=e.children,r,n=t.length,s,o=new Array(n+1);for(o[0]=s=r=0;r<n;++r)o[r+1]=s+=t.getIndex(r).value;n>0&&l(0,n,e.value,e.x0,e.y0,e.x1,e.y1);function l(u,h,p,d,c,f,m){if(u>=h-1){var y=t.getIndex(u);y.x0=d,y.y0=c,y.x1=f,y.y1=m;return}for(var v=o[u],b=p/2+v,x=u+1,_=h-1;x<_;){var $=x+_>>>1;o[$]<b?x=$+1:_=$}b-o[x-1]<o[x]-b&&u+1<x&&--x;var O=o[x]-v,F=p-O;if(p==0){var y=t.getIndex(u);y.x0=d,y.y0=c,y.x1=f,y.y1=m;return}if(f-d>m-c){var w=(d*F+f*O)/p;l(u,x,O,d,c,w,m),l(x,h,F,w,c,f,m)}else{var D=(c*F+m*O)/p;l(u,x,O,d,c,f,D),l(x,h,F,d,D,f,m)}}},i.prototype.slice=function(e){for(var t=e.x0,r=e.x1,n=e.y0,s=e.y1,o=e.children,l,u=-1,h=o.length,p=e.value&&(s-n)/e.value;++u<h;)l=o.getIndex(u),l.x0=t,l.x1=r,l.y0=n,n+=l.value*p,l.y1=n},i.prototype.dice=function(e){for(var t=e.x0,r=e.x1,n=e.y0,s=e.y1,o=e.children,l,u=-1,h=o.length,p=e.value&&(r-t)/e.value;++u<h;)l=o.getIndex(u),l.y0=n,l.y1=s,l.x0=t,t+=l.value*p,l.x1=t},i.prototype.sliceDice=function(e){e.level&1?this.slice(e):this.dice(e)},i.prototype.squarify=function(e){for(var t=(1+Math.sqrt(5))/2,r=e.x0,n=e.x1,s=e.y0,o=e.y1,l=e.children,u,h=0,p=0,d=l.length,c,f,m=e.value,y,v,b,x,_,$,O;h<d;){c=n-r,f=o-s;do y=l.getIndex(p++).value;while(!y&&p<d);for(v=b=y,$=Math.max(f/c,c/f)/(m*t),O=y*y*$,_=Math.max(b/O,O/v);p<d;++p){if(y+=u=l.getIndex(p).value,u<v&&(v=u),u>b&&(b=u),O=y*y*$,x=Math.max(b/O,O/v),x>_){y-=u;break}_=x}var F=this.dataItems.template.clone();F.value=y,F.dice=c<f,F.children=l.slice(h,p),F.x0=r,F.y0=s,F.x1=n,F.y1=o,F.dice?(F.y1=m?s+=f*y/m:o,this.dice(F)):(F.x1=m?r+=c*y/m:n,this.slice(F)),m-=y,h=p}},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}else 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 r=[];t.children.each(function(n){r.push(n)}),e.data=r}}},i.prototype.disposeData=function(){a.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=a.prototype.getExporting.call(this);return t.adapter.add("formatDataFields",function(r){return(r.format=="csv"||r.format=="xlsx")&&P(e.dataFields.children)&&delete r.dataFields[e.dataFields.children],r}),t},i})(rt);C.registeredClasses.TreeMap=Yy;var ah=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e._chart=new Ue,e.className="AxisRendererX3D",e._disposers.push(e._chart),e.applyTheme(),e}return i.prototype.updateGridElement=function(e,t,r){t=t+(r-t)*e.location;var n=this.positionToPoint(t);if(e.element){var s=this.chart.dx3D||0,o=this.chart.dy3D||0,l=this.getHeight();e.path=W({x:s,y:o})+k({x:s,y:l+o})+k({x:0,y:l})}this.positionItem(e,n),this.toggleVisibility(e,t,0,1)},i.prototype.updateBaseGridElement=function(){a.prototype.updateBaseGridElement.call(this);var e=this.getHeight(),t=this.chart.dx3D||0,r=this.chart.dy3D||0;this.baseGrid.path=W({x:t,y:r})+k({x:0,y:0})+k({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})(xt);C.registeredClasses.AxisRendererX3D=ah;var Kd=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e._chart=new Ue,e.className="AxisRendererY3D",e._disposers.push(e._chart),e.applyTheme(),e}return i.prototype.updateGridElement=function(e,t,r){t=t+(r-t)*e.location;var n=this.positionToPoint(t);if(e.element){var s=this.chart.dx3D||0,o=this.chart.dy3D||0,l=this.getWidth();e.path=W({x:0,y:0})+k({x:s,y:o})+k({x:l+s,y:o})}this.positionItem(e,n),this.toggleVisibility(e,t,0,1)},i.prototype.updateBaseGridElement=function(){a.prototype.updateBaseGridElement.call(this);var e=this.chart.dx3D||0,t=this.chart.dy3D||0,r=this.getWidth();this.baseGrid.path=W({x:0,y:0})+k({x:r,y:0})+k({x:r+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})(Ot);var Zd=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.angle=30,e.depth=30,e.className="Rectangle3D",e.layout="none";var t=e.createChild(ee);t.shouldClone=!1,t.setElement(e.paper.add("path")),t.isMeasured=!1,e.sideBack=t,e._disposers.push(e.sideBack);var r=e.createChild(ee);r.shouldClone=!1,r.setElement(e.paper.add("path")),r.isMeasured=!1,e.sideBottom=r,e._disposers.push(e.sideBottom);var n=e.createChild(ee);n.shouldClone=!1,n.setElement(e.paper.add("path")),n.isMeasured=!1,e.sideLeft=n,e._disposers.push(e.sideLeft);var s=e.createChild(ee);s.shouldClone=!1,s.setElement(e.paper.add("path")),s.isMeasured=!1,e.sideRight=s,e._disposers.push(e.sideRight);var o=e.createChild(ee);o.shouldClone=!1,o.setElement(e.paper.add("path")),o.isMeasured=!1,e.sideTop=o,e._disposers.push(e.sideTop);var l=e.createChild(ee);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 i.prototype.draw=function(){a.prototype.draw.call(this);var e=this.innerWidth,t=this.innerHeight,r=this.depth,n=this.angle,s=X(n),o=Y(n),l={x:0,y:0},u={x:e,y:0},h={x:e,y:t},p={x:0,y:t},d={x:r*o,y:-r*s},c={x:r*o+e,y:-r*s},f={x:r*o+e,y:-r*s+t},m={x:r*o,y:-r*s+t};this.sideFront.path=W(l)+k(u)+k(h)+k(p)+Ge(),this.sideBack.path=W(d)+k(c)+k(f)+k(m)+Ge(),this.sideLeft.path=W(l)+k(d)+k(m)+k(p)+Ge(),this.sideRight.path=W(u)+k(c)+k(f)+k(h)+Ge(),this.sideBottom.path=W(p)+k(m)+k(f)+k(h)+Ge(),this.sideTop.path=W(l)+k(d)+k(c)+k(u)+Ge()},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){a.prototype.setFill.call(this,e),(!Be(e)||"r"in e)&&(e=pi(e));var t;if(e instanceof be)t=e.hex;else if(e instanceof Ht||e instanceof ji)t=e.stops.getIndex(0).color.hex;else{var r=new Gs;r.lightness=-.2,this.sideBack.filters.push(r);var n=r.clone();n.lightness=-.4,this.sideLeft.filters.push(n);var s=r.clone();s.lightness=-.2,this.sideRight.filters.push(s);var o=r.clone();o.lightness=-.1,this.sideTop.filters.push(o);var l=r.clone();l.lightness=-.5,this.sideBottom.filters.push(l)}t&&(this.sideBack.fill=ie(t).lighten(-.2),this.sideLeft.fill=ie(t).lighten(-.4),this.sideRight.fill=ie(t).lighten(-.2),this.sideTop.fill=ie(t).lighten(-.1),this.sideBottom.fill=ie(t).lighten(-.5))},i.prototype.copyFrom=function(e){a.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})(U);var nh=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="Column3D",e}return i.prototype.createAssets=function(){this.column3D=this.createChild(Zd),this.column3D.shouldClone=!1,this.column3D.strokeOpacity=0,this.column=this.column3D},i.prototype.validate=function(){a.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){a.prototype.copyFrom.call(this,e),this.column3D&&this.column3D.copyFrom(e.column3D)},i.prototype.setFill=function(e){a.prototype.setFill.call(this,e),this.column.fill=e},i})(Xi);C.registeredClasses.Column3D=nh;var qy=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="ColumnSeries3DDataItem",e.applyTheme(),e}return i})(ei);var dl=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="ColumnSeries3D",e.columns.template.column3D.applyOnClones=!0,e.columns.template.hiddenState.properties.visible=!0,e.applyTheme(),e}return 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){a.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(){a.prototype.validateDataElements.call(this),this.chart&&this.chart.invalidateLayout()},i.prototype.createColumnTemplate=function(){return new nh},Object.defineProperty(i.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(e){this.setPropertyValue("depth",e,!0);var t=this.columns.template;t.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);var t=this.columns.template;t.column3D.angle=e},enumerable:!0,configurable:!0}),i})(pt);C.registeredClasses.ColumnSeries3D=dl;C.registeredClasses.ColumnSeries3DDataItem=qy;var $x=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="XYChart3DDataItem",e.applyTheme(),e}return i})(Ln);var Gy=(function(a){T(i,a);function i(){var e=a.call(this)||this;e._axisRendererX=ah,e._axisRendererY=Kd,e.className="XYChart3D",e.depth=30,e.angle=30;var t=e.seriesContainer.createChild(U);return t.shouldClone=!1,t.isMeasured=!1,t.layout="none",e.columnsContainer=t,e.columnsContainer.mask=e.createChild(ee),e.applyTheme(),e}return i.prototype.updateSeriesMasks=function(){if(a.prototype.updateSeriesMasks.call(this),Qr()){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 Y(this.angle)*this.depth},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dy3D",{get:function(){return-X(this.angle)*this.depth},enumerable:!0,configurable:!0}),i.prototype.validateLayout=function(){a.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(),a.prototype.fixLayout.call(this)},i.prototype.fixColumns=function(){var e=this,t=1,r=0;I(this.series.iterator(),function(s){s instanceof dl&&(!s.clustered&&r>0&&t++,s.depthIndex=t-1,r++)});var n=0;I(this.series.iterator(),function(s){if(s instanceof dl){s.depth=e.depth/t,s.angle=e.angle,s.columnsContainer==e.columnsContainer&&(s.dx=e.depth/t*Y(e.angle)*s.depthIndex,s.dy=-e.depth/t*X(e.angle)*s.depthIndex);var o=!1;(s.baseAxis==s.xAxis&&s.xAxis.renderer.inversed||s.baseAxis==s.yAxis&&s.yAxis.renderer.inversed)&&(o=!0);var l=1;s.dataItems.each(function(u){var h=u.column;h&&(o?h.zIndex=1e3*(1e3-l)+n-s.depthIndex*100:h.zIndex=1e3*l+n-s.depthIndex*100),l++}),o?n--:n++}}),this.maskColumns()},i.prototype.processConfig=function(e){if(e&&P(e.series)&&Xe(e.series))for(var t=0,r=e.series.length;t<r;t++)e.series[t].type=e.series[t].type||"ColumnSeries3D";a.prototype.processConfig.call(this,e)},i.prototype.maskColumns=function(){var e=this.plotContainer.pixelWidth,t=this.plotContainer.pixelHeight,r=this.dx3D,n=this.dy3D,s=W({x:0,y:0})+k({x:r,y:n})+k({x:e+r,y:n})+k({x:e+r,y:t+n})+k({x:e,y:t})+k({x:e,y:t})+k({x:0,y:t})+Ge(),o=this.columnsContainer;o&&o.mask&&(o.mask.path=s)},i})(rt);C.registeredClasses.XYChart3D=Gy;var Uy=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="HeatLegend",e.markerContainer=e.createChild(U),e.markerContainer.shouldClone=!1,e.markerCount=1;var t=new Mt;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 Le(t),e._disposers.push(new Pe(e.markers)),e._disposers.push(e.markers.template),e.applyTheme(),e}return i.prototype.getMinFromRules=function(e){var t=this.series;if(t){var r;return Dt(t.heatRules.iterator(),function(n){return n.property==e?(r=n.min,!1):!0}),r}},i.prototype.getMaxFromRules=function(e){var t=this.series;if(t){var r;return I(t.heatRules.iterator(),function(n){return n.property==e?(r=n.max,!1):!0}),r}},i.prototype.validate=function(){a.prototype.validate.call(this),this.valueAxis.renderer.inversed=this.reverseOrder;var e=this.series,t=this.minColor,r=this.maxColor;if(P(t)||(t=pi(this.getMinFromRules("fill"))),P(r)||(r=pi(this.getMaxFromRules("fill"))),e){var n=e.fill;!P(t)&&n instanceof be&&(t=n),!P(r)&&n instanceof be&&(r=n)}P(r)||(r=pi(this.getMaxFromRules("fill")));var s=ke(this.getMinFromRules("fillOpacity"));S(s)||(s=1);var o=ke(this.getMaxFromRules("fillOpacity"));S(o)||(o=1);var l=ke(this.getMinFromRules("strokeOpacity"));S(l)||(l=1);var u=ke(this.getMaxFromRules("strokeOpacity"));S(u)||(u=1);for(var h=pi(this.getMinFromRules("stroke")),p=pi(this.getMaxFromRules("stroke")),d=0;d<this.markerCount;d++){var c=this.markers.getIndex(d);if(c||(c=this.markers.create(),c.parent=this.markerContainer,c.height=N(100),c.width=N(100)),this.markerCount==1){var f=new Ht;if(this.reverseOrder?(f.addColor(r,o),f.addColor(t,s)):(f.addColor(t,s),f.addColor(r,o)),this.orientation=="vertical"&&(f.rotation=-90),c.fill=f,P(h)&&P(p)){var m=new Ht;this.reverseOrder?(m.addColor(p,u),m.addColor(h,l)):(m.addColor(h,l),m.addColor(p,u)),this.orientation=="vertical"&&(m.rotation=-90),c.stroke=m}}else{var y=d;this.reverseOrder&&(y=this.markerCount-d-1);var v=new be(mn(t.rgb,r.rgb,y/this.markerCount));c.fill=v;var b=s+(o-s)*y/this.markerCount;if(c.fillOpacity=b,P(h)&&P(p)){var x=new be(mn(h.rgb,p.rgb,y/this.markerCount));c.stroke=x;var _=l+(u-l)*y/this.markerCount;c.strokeOpacity=_}}}var $=this.valueAxis.renderer;this.markerCount>1&&(this.orientation=="horizontal"?$.minGridDistance=this.measuredWidth/this.markerCount:$.minGridDistance=this.measuredHeight/this.markerCount),this.valueAxis.invalidate();for(var d=this.markerCount,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 be||(e=pi(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 be||(e=pi(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,r=this.valueAxis;e=="horizontal"?(P(this.width)||(this.width=200),this.height=void 0,r.width=N(100),r.height=void 0,r.tooltip.pointerOrientation="vertical",this.layout="vertical",t.width=N(100),t.height=void 0,r.renderer instanceof xt||(r.renderer=new xt)):(P(this.height)||(this.height=200),this.width=void 0,this.layout="horizontal",t.width=void 0,t.height=N(100),r.height=N(100),r.width=void 0,r.tooltip.pointerOrientation="horizontal",r.renderer instanceof Ot||(r.renderer=new Ot),r.renderer.inside=!0,r.renderer.labels.template.inside=!0,this.markerContainer.reverseOrder=!0);var n=r.renderer;n.grid.template.disabled=!0,n.axisFills.template.disabled=!0,n.baseGrid.disabled=!0,n.labels.template.padding(2,3,2,3),n.minHeight=void 0,n.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(re),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 r="value";try{var n=e.heatRules.getIndex(0).dataField;n&&(r=n)}catch{}this.updateMinMax(e.dataItem.values[r].low,e.dataItem.values[r].high),e.dataItem.events.on("calculatedvaluechanged",function(s){t.updateMinMax(e.dataItem.values[r].low,e.dataItem.values[r].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 r=this.valueAxis;S(this.minValue)||(r.min=e,r.invalidate()),S(this.maxValue)||(r.max=t,r.invalidate())},i.prototype.processConfig=function(e){if(e&&P(e.series)&&ce(e.series)&&ce(e.series))if(this.map.hasKey(e.series))e.series=this.map.getKey(e.series);else{var t=e.series,r=this.map.events.on("insertKey",function(n){n.key==t&&(this.series=n.newValue,r.dispose())},this);this._disposers.push(r),delete e.series}a.prototype.processConfig.call(this,e)},i})(U);C.registeredClasses.HeatLegend=Uy;var cl=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="OHLC",e.layout="none",e}return i.prototype.createAssets=function(){this.openLine=this.createChild(li),this.openLine.shouldClone=!1,this.highLowLine=this.createChild(li),this.highLowLine.shouldClone=!1,this.closeLine=this.createChild(li),this.closeLine.shouldClone=!1},i.prototype.copyFrom=function(e){a.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})(kn);C.registeredClasses.OHLC=cl;var Qd=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="OHLCSeriesDataItem",e.applyTheme(),e}return i})(In);var Ky=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="OHLCSeries",e.applyTheme(),e}return i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("OHLC Series"))},i.prototype.createDataItem=function(){return new Qd},i.prototype.validateCandlestick=function(e){var t=e.column;if(t){var r=t.openLine,n=t.highLowLine,s=t.closeLine;if(this.baseAxis==this.xAxis){var o=t.pixelWidth/2;n.x=o,e.getWorkingValue(this.yOpenField),e.getWorkingValue(this.yField);var l=this.yAxis.getY(e,this.yOpenField),u=this.yAxis.getY(e,this.yField),h=this.yAxis.getY(e,this.yLowField),p=this.yAxis.getY(e,this.yHighField),d=t.pixelY;r.y1=l-d,r.y2=l-d,r.x1=0,r.x2=o,s.y1=u-d,s.y2=u-d,s.x1=o,s.x2=2*o,n.y1=p-d,n.y2=h-d}if(this.baseAxis==this.yAxis){var c=t.pixelHeight/2;n.y=c,e.getWorkingValue(this.xOpenField),e.getWorkingValue(this.xField);var f=this.xAxis.getX(e,this.xOpenField),m=this.xAxis.getX(e,this.xField),y=this.xAxis.getX(e,this.xLowField),v=this.xAxis.getX(e,this.xHighField),b=t.pixelX;r.x1=f-b,r.x2=f-b,r.y1=c,r.y2=2*c,s.x1=m-b,s.x2=m-b,s.y1=0,s.y2=c,n.x1=v-b,n.x2=y-b}I(this.axisRanges.iterator(),function(x){var _=e.rangesColumns.getKey(x.uid);if(_){var $=_.openLine;$.x=r.x,$.y=r.y,$.x1=r.x1,$.x2=r.x2,$.y1=r.y1,$.y2=r.y2;var O=_.closeLine;O.x=s.x,O.y=s.y,O.x1=s.x1,O.x2=s.x2,O.y1=s.y1,O.y2=s.y2;var F=_.highLowLine;F.x=n.x,F.y=n.y,F.x1=n.x1,F.x2=n.x2,F.y1=n.y1,F.y2=n.y2}})}},i.prototype.createLegendMarker=function(e){var t=e.pixelWidth,r=e.pixelHeight;e.removeChildren();var n=e.createChild(cl);n.shouldClone=!1,n.copyFrom(this.columns.template);var s,o,l=n.openLine,u=n.closeLine,h=n.highLowLine;this.baseAxis==this.yAxis?(s=t/3,o=r,h.y=r/2,h.x2=t,l.x=t/3*2,l.y2=r/2,u.x=t/3,u.y2=r,u.y1=r/2):(s=t,o=r/3,h.x=t/2,h.y2=r,l.y=r/3*2,l.x2=t/2,u.y=r/3,u.x2=t,u.x1=t/2),n.width=s,n.height=o,it(this,e,Ke),it(this.columns.template,n,Ke),n.stroke=this.riseFromOpenState.properties.stroke;var p=e.dataItem;p.color=n.stroke,p.colorOrig=n.stroke},i.prototype.createColumnTemplate=function(){return new cl},i})(wt);C.registeredClasses.OHLCSeries=Ky;C.registeredClasses.OHLCSeriesDataItem=Qd;var sh=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="RadarColumn",e}return i.prototype.createAssets=function(){this.radarColumn=this.createChild(tr),this.radarColumn.shouldClone=!1,this.radarColumn.strokeOpacity=void 0,this.column=this.radarColumn},i.prototype.copyFrom=function(e){a.prototype.copyFrom.call(this,e),this.radarColumn&&this.radarColumn.copyFrom(e.radarColumn)},i.prototype.getTooltipX=function(){var e=this.getPropertyValue("tooltipX");return S(e)?e:this.radarColumn.getTooltipX()},i.prototype.getTooltipY=function(){var e=this.getPropertyValue("tooltipX");return S(e)?e:this.radarColumn.getTooltipY()},i})(Xi);C.registeredClasses.RadarColumn=sh;var Zy=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="ColumnSeriesDataItem",e.applyTheme(),e}return i})(ei);var Qy=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="RadarColumnSeries",e.applyTheme(),e}return i.prototype.createColumnTemplate=function(){return new sh},i.prototype.validate=function(){this.chart.invalid&&this.chart.validate(),a.prototype.validate.call(this)},i.prototype.disableUnusedColumns=function(e){e&&(e.column&&(e.column.__disabled=!0),I(this.axisRanges.iterator(),function(t){var r=e.rangesColumns.getKey(t.uid);r&&(r.__disabled=!0)}))},i.prototype.validateDataElementReal=function(e){var t=this,r=this.chart.startAngle,n=this.chart.endAngle,s=this.yField,o=this.yOpenField,l=this.xField,u=this.xOpenField,h,p,d,c,f=this.getStartLocation(e),m=this.getEndLocation(e),y=(n-r)/(this.dataItems.length*(this.end-this.start)),v=e.column;v||(v=this.columns.create(),e.column=v,it(this,v,Ke),it(this.columns.template,v,Ke),e.addSprite(v),v.paper=this.paper,this.setColumnStates(v));var b=v.width,x=100;b instanceof de&&(x=b.percent);var _=E((m-f)*(1-x/100)/2,5);if(f+=_,m-=_,this.xAxis instanceof we&&this.yAxis instanceof we)d=_e({x:this.yAxis.getX(e,s,0,"valueY"),y:this.yAxis.getY(e,s,0,"valueY")}),c=_e({x:this.yAxis.getX(e,o,1,"valueY"),y:this.yAxis.getY(e,o,1,"valueY")}),h=this.xAxis.getAngle(e,u,0,"valueX"),p=this.xAxis.getAngle(e,l,1,"valueX"),r=r+f*y,n=n-(1-m)*y;else if(this.baseAxis==this.xAxis)d=_e({x:this.yAxis.getX(e,s,e.locations[s],"valueY"),y:this.yAxis.getY(e,s,e.locations[s],"valueY")}),c=_e({x:this.yAxis.getX(e,o,e.locations[o],"valueY"),y:this.yAxis.getY(e,o,e.locations[o],"valueY")}),h=this.xAxis.getAngle(e,u,f,"valueX"),p=this.xAxis.getAngle(e,l,m,"valueX"),r=r+f*y,n=n-(1-m)*y;else{if(d=_e({x:this.yAxis.getX(e,s,f,"valueY"),y:this.yAxis.getY(e,s,f,"valueY")}),c=_e({x:this.yAxis.getX(e,o,m,"valueY"),y:this.yAxis.getY(e,o,m,"valueY")}),S(b)){var $=Math.abs(d-c);if($>b){var O=($-b)/2;d+=O,c-=O}}h=this.xAxis.getAngle(e,l,e.locations[l],"valueX"),p=this.xAxis.getAngle(e,u,e.locations[u],"valueX")}if(p<h){var F=p;p=h,h=F}h=G(h,r,n),p=G(p,r,n);var w=v.radarColumn;w.startAngle=h;var D=p-h;D>0?(w.arc=D,w.radius=d,w.innerRadius=c,v.__disabled=!1,v.parent=this.columnsContainer,I(this.axisRanges.iterator(),function(B){var L=e.rangesColumns.getKey(B.uid);L||(L=t.columns.create(),zm(t.columns.template,L,Ke),it(B.contents,L,Ke),L.dataItem&&oe(L.dataItem.sprites,L),e.addSprite(L),L.paper=t.paper,t.setColumnStates(L),e.rangesColumns.setKey(B.uid,L));var M=L.radarColumn;M.startAngle=h,M.arc=D,M.radius=d,M.innerRadius=c,M.invalid&&(M.paper=t.paper,M.validate()),L.__disabled=!1,L.parent=B.contents})):this.disableUnusedColumns(e)},i.prototype.getPoint=function(e,t,r,n,s,o,l){o||(o="valueX"),l||(l="valueY");var u=this.yAxis.getX(e,r,s,l),h=this.yAxis.getY(e,r,s,l),p=_e({x:u,y:h});p==0&&(p=1e-5);var d=this.xAxis.getAngle(e,t,n,o);return{x:p*Y(d),y:p*X(d)}},i.prototype.getMaskPath=function(){var e=this.yAxis.renderer;return mr(e.startAngle,e.endAngle-e.startAngle,e.pixelRadius,e.pixelInnerRadius)},i.prototype.positionBulletReal=function(e,t,r){var n=this.xAxis,s=this.yAxis;(t<n.start||t>n.end||r<s.start||r>s.end)&&(e.visible=!1),e.moveTo(this.xAxis.renderer.positionToPoint(t,r))},i.prototype.setXAxis=function(e){a.prototype.setXAxis.call(this,e),this.updateRendererRefs()},i.prototype.setYAxis=function(e){a.prototype.setYAxis.call(this,e),this.updateRendererRefs()},i.prototype.updateRendererRefs=function(){var e=this.xAxis.renderer,t=this.yAxis.renderer;e.axisRendererY=t},i})(pt);C.registeredClasses.RadarColumnSeries=Qy;C.registeredClasses.RadarColumnSeriesDataItem=Zy;var fl=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.slice=e.createChild(ee),e.slice.shouldClone=!1,e.slice.setElement(e.paper.add("path")),e.slice.isMeasured=!1,e.orientation="vertical",e.bottomWidth=N(100),e.topWidth=N(100),e.isMeasured=!1,e.width=10,e.height=10,e.expandDistance=0,e.className="FunnelSlice",e.applyTheme(),e}return i.prototype.draw=function(){a.prototype.draw.call(this);var e=this.pixelPaddingTop,t=this.pixelPaddingBottom,r=this.pixelPaddingRight,n=this.pixelPaddingLeft,s=this.pixelWidth-r-n,o=this.pixelHeight-e-t,l=this.expandDistance,u="";if(this.orientation=="vertical"){var h=Ee(this.topWidth,s),p=Ee(this.bottomWidth,s),d={x:(s-h)/2+n,y:e},c={x:(s+h)/2+n,y:e},f={x:(s+p)/2+n,y:e+o},m={x:(s-p)/2+n,y:e+o},y={x:c.x+(f.x-c.x)/2+l*o,y:c.y+.5*o},v={x:d.x+(m.x-d.x)/2-l*o,y:d.y+.5*o},b=k(f),x=k(d);l!=0&&(b=ea(f,y),x=ea(d,v)),u=W(d)+k(c)+b+k(m)+x,this.tickPoint={x:c.x+(f.x-c.x)/2,y:c.y+(f.y-c.y)/2}}else{var h=Ee(this.topWidth,o),p=Ee(this.bottomWidth,o),_={x:n,y:(o-h)/2+e},$={x:n,y:(o+h)/2+e},O={x:n+s,y:(o-p)/2+e},F={x:n+s,y:(o+p)/2+e},y={y:_.y+(O.y-_.y)/2-l*s,x:_.x+.5*s},v={y:$.y+(F.y-$.y)/2+l*s,x:$.x+.5*s},b=k(O),x=k($);l!=0&&(b=ea(O,y),x=ea($,v)),u=W($)+k(_)+b+k(F)+x,this.tickPoint={y:$.y+(F.y-$.y)/2,x:$.x+(F.x-$.x)/2}}this.slice.path=u,this.invalidateLayout()},i.prototype.getPoint=function(e,t){var r=this.pixelPaddingTop,n=this.pixelPaddingBottom,s=this.pixelPaddingRight,o=this.pixelPaddingLeft,l=this.pixelWidth-s-o,u=this.pixelHeight-r-n;if(this.orientation=="vertical"){var h=Ee(this.topWidth,l),p=Ee(this.bottomWidth,l),d={x:(l-h)/2+o,y:r},c={x:(l+h)/2+o,y:r},f={x:(l+p)/2+o,y:r+u},m={x:(l-p)/2+o,y:r+u},y=d.x+(m.x-d.x)*t,v=c.x+(f.x-c.x)*t;return{x:y+(v-y)*e,y:c.y+(f.y-c.y)*t}}else{var h=Ee(this.topWidth,u),p=Ee(this.bottomWidth,u),b={x:o,y:(u-h)/2+r},x={x:o,y:(u+h)/2+r},_={x:o+l,y:(u-p)/2+r},$={x:o+l,y:(u+p)/2+r},O=b.y+(_.y-b.y)*e,F=x.y+($.y-x.y)*e;return{y:O+(F-O)*t,x:b.x+(_.x-b.x)*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){a.prototype.copyFrom.call(this,e),this.slice&&this.slice.copyFrom(e.slice)},i})(U);C.registeredClasses.FunnelSlice=fl;var Jd=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e._label=new Ue,e._slice=new Ue,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 i.prototype.draw=function(){a.prototype.draw.call(this);var e=this.slice,t=e.getPoint(this.locationX,this.locationY);if(t){var r=this.label,n=e.dataItem.component,s=void 0,o=void 0,l=void 0;if(n.orientation=="vertical"){var u=r.pixelX,h=r.pixelY;n.labelsOpposite||(u+=r.maxRight),s=It(t,e,this.parent),l=It({x:u,y:h},r.parent,this.parent),o={x:r.parent.pixelX-this.length,y:l.y},n.labelsOpposite||(o.x=r.parent.measuredWidth+this.length)}else{var u=r.pixelX,h=r.pixelY;n.labelsOpposite||(h+=r.maxBottom),s=It(t,e,this.parent),l=It({x:u,y:h},r.parent,this.parent),o={x:l.x,y:r.parent.pixelY-this.length},n.labelsOpposite||(o.y=r.parent.measuredHeight+this.length)}this.path=W(s)+k(o)+k(l)}},Object.defineProperty(i.prototype,"slice",{get:function(){return this._slice.get()},set:function(e){this._slice.set(e,new Fe([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})(ra);C.registeredClasses.FunnelTick=Jd;var ml=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="FunnelSeriesDataItem",e.events.on("visibilitychanged",function(){e.component&&e.component.invalidateDataItems()},e,!1),e.applyTheme(),e}return 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 Ce(function(){e.component&&e.component.sliceLinks.removeValue(t)})),this.addSprite(t),t.visible=this.visible}return this._sliceLink},enumerable:!0,configurable:!0}),i})(qs);var oh=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e._nextY=0,e.className="FunnelSeries",e.orientation="vertical",e.width=N(100),e.height=N(100),e.slicesContainer.width=N(100),e.slicesContainer.height=N(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 i.prototype.createSlice=function(){return new fl},i.prototype.createTick=function(){return new Jd},i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Funnel Series"))},i.prototype.createDataItem=function(){return new ml},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})";var t=e.states.create("hover");t.properties.expandDistance=.2},i.prototype.initLabel=function(e){a.prototype.initLabel.call(this,e),e.verticalCenter="middle",e.horizontalCenter="middle",e.isMeasured=!0,e.padding(5,5,5,5)},i.prototype.validate=function(){a.prototype.validate.call(this),this._nextY=0},i.prototype.validateDataElements=function(){var e=this,t=this.slicesContainer,r=this.labelsContainer,n=this.labels.template;this.alignLabels?(n.interactionsEnabled=!0,t.isMeasured=!0,r.isMeasured=!0):(n.interactionsEnabled=!1,t.isMeasured=!1,r.isMeasured=!1);var s=0,o=0;this.dataItems.each(function(l){P(l.value)&&(o++,l.value>0?s+=Math.abs(l.getWorkingValue("value")/l.value):e.ignoreZeroValues||!l.visible||l.__disabled||l.isHiding?o--:s+=1)}),this._total=1/o*s,this._count=o,a.prototype.validateDataElements.call(this),this.arrangeLabels()},i.prototype.getNextValue=function(e){var t=e.index,r=e.getWorkingValue("value");if(t<this.dataItems.length-1){var n=this.dataItems.getIndex(t+1);if(r=n.getWorkingValue("value"),!n.visible||n.isHiding||n.__disabled||n.value==0&&this.ignoreZeroValues)return this.getNextValue(n)}return r},i.prototype.formDataElement=function(){},i.prototype.validateDataElement=function(e){var t=this,r=e.slice;r.orientation=this.orientation;var n=e.sliceLink;n.orientation=this.orientation;var s=e.tick,o=e.label;s.slice=r,s.label=o,P(e.value)?(this.decorateSlice(e),H(e.sprites,function(l){e.value==0&&t.ignoreZeroValues?l.__disabled=!0:l.__disabled=!1})):H(e.sprites,function(l){l.__disabled=!0}),e.index==this.dataItems.length-1&&(n.disabled=!0),a.prototype.validateDataElement.call(this,e),n.fill=r.fill},i.prototype.decorateSlice=function(e){var t=e.slice,r=e.sliceLink,n=e.label,s=e.tick,o=this.slicesContainer.innerWidth,l=this.slicesContainer.innerHeight,u=this.getNextValue(e),h=Math.abs(e.getWorkingValue("value")),p=this.bottomRatio,d=1;if(e.value!=0?d=h/Math.abs(e.value):(e.__disabled||e.isHiding||!e.visible)&&(d=1e-6),this.ignoreZeroValues&&e.value==0){e.__disabled=!0;return}else e.__disabled=!1;if(this._nextY==1/0&&(this._nextY=0),this.orientation=="vertical"){var c=r.pixelHeight*d;l=l+c,t.topWidth=h/this.dataItem.values.value.high*o,t.bottomWidth=(h-(h-u)*p)/this.dataItem.values.value.high*o,r.topWidth=t.bottomWidth,r.bottomWidth=(h-(h-u))/this.dataItem.values.value.high*o,t.y=this._nextY,t.height=Math.min(1e5,he(0,l/this._count*d/this._total-c)),t.x=o/2,this.alignLabels?n.x=void 0:n.x=t.x,n.y=t.pixelY+t.pixelHeight*s.locationY,this._nextY+=t.pixelHeight+c,r.y=this._nextY-c,r.x=t.x}else{var f=r.pixelWidth*d;o=o+f,t.topWidth=h/this.dataItem.values.value.high*l,t.bottomWidth=(h-(h-u)*p)/this.dataItem.values.value.high*l,r.topWidth=t.bottomWidth,r.bottomWidth=(h-(h-u))/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?n.y=this.labelsContainer.measuredHeight:n.y=t.y,n.x=t.pixelX+t.pixelWidth*s.locationX,this._nextY+=t.pixelWidth+f,r.x=this._nextY-f,r.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 r=t.pixelY,n=t.pixelX;if(e>1){for(var s=e-2;s>=0;s--){var o=this.labels.getIndex(s);o.visible&&!o.__disabled&&(o.invalid&&o.validate(),this.orientation=="vertical"?o.pixelY+o.measuredHeight>r&&(o.y=Math.min(1e6,r-o.measuredHeight)):o.pixelX+o.measuredWidth>n&&(o.x=Math.min(1e6,n-o.measuredWidth)),r=o.pixelY,n=o.pixelX)}r=0,n=0;for(var s=0;s<e;s++){var o=this.labels.getIndex(s);o.visible&&!o.__disabled&&(o.invalid&&o.validate(),this.orientation=="vertical"?o.pixelY<r&&(o.y=Math.min(1e6,r)):o.pixelX<n&&(o.x=Math.min(1e6,n)),r+=o.measuredHeight,n+=o.measuredWidth)}}}}}},i.prototype.positionBullet=function(e){a.prototype.positionBullet.call(this,e);var t=e.dataItem,r=t.slice,n=e.locationX;S(n)||(n=.5);var s=e.locationY;S(s)||(s=1),e.x=r.pixelX+r.measuredWidth*n,e.y=r.pixelY+r.measuredHeight*s},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 fl;e.applyOnClones=!0,e.fillOpacity=.5,e.expandDistance=-.3,e.hiddenState.properties.opacity=0,this._disposers.push(e),this._sliceLinks=new Le(e),this._disposers.push(new Pe(this._sliceLinks))}return this._sliceLinks},enumerable:!0,configurable:!0}),i.prototype.show=function(e){var t=this,r=this.startIndex,n=this.endIndex,s=this.defaultState.transitionDuration;S(e)&&(s=e),ge.animationsEnabled||(s=0);var o=0;I(pr(this.dataItems.iterator()),function(u){var h=u[0],p=u[1];t.sequencedInterpolation&&(o=t.sequencedInterpolationDelay*h+s*(h-r)/(n-r)),p.show(s,o,["value"])});var l=a.prototype.show.call(this,e);return l},i.prototype.hide=function(e){var t=this,r=["value"],n=0,s=this.startIndex,o=this.endIndex,l=0,u=this.hiddenState.transitionDuration;S(e)&&(u=e),ge.animationsEnabled||(u=0),I(pr(this.dataItems.iterator()),function(p){var d=p[0],c=p[1];t.sequencedInterpolation&&(l=t.sequencedInterpolationDelay*d+u*(d-s)/(o-s)),c.hide(u,l,n,r)});var h=a.prototype.hide.call(this,e);return h&&!h.isFinished()&&h.delay(l),h},i.prototype.setAlignLabels=function(e){a.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=N(100),t.height=N(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,r="none",n="none";this.alignLabels?e?(this.labelsContainer.toFront(),this.orientation=="vertical"?(this.ticks.template.locationX=1,t.horizontalCenter="left",r="right"):(this.ticks.template.locationY=1,t.horizontalCenter="right",n="bottom")):(this.labelsContainer.toBack(),this.orientation=="vertical"?(this.ticks.template.locationX=0,r="left"):(n="top",this.ticks.template.locationY=0)):this.orientation=="vertical"?r="center":n="middle",t.align=r,t.valign=n,this.validateLayout(),this.ticks.each(function(s){s.invalidate()}),this.invalidateDataItems()},enumerable:!0,configurable:!0}),i})(Ka);C.registeredClasses.FunnelSeries=oh;C.registeredClasses.FunnelSeriesDataItem=ml;var yl=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="PyramidSeriesDataItem",e.applyTheme(),e}return i})(ml);var lh=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="PyramidSeries",e.topWidth=N(0),e.bottomWidth=N(100),e.pyramidHeight=N(100),e.valueIs="area",e.sliceLinks.template.width=0,e.sliceLinks.template.height=0,e.applyTheme(),e}return i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Pyramid Series"))},i.prototype.createDataItem=function(){return new yl},i.prototype.validate=function(){a.prototype.validate.call(this),this._nextWidth=void 0},i.prototype.getNextValue=function(e){var t=e.index,r=e.getWorkingValue("value");if(t<this.dataItems.length-1){var n=this.dataItems.getIndex(t+1);r=n.getWorkingValue("value")}return r==0&&(r=1e-6),r},i.prototype.validateDataElements=function(){var e=this,t=this.slicesContainer.innerWidth,r=this.slicesContainer.innerHeight;if(this.dataItems.each(function(o){if(o.value>0){var l=o.getWorkingValue("value")/o.value,u=o.sliceLink;e.orientation=="vertical"?r-=u.pixelHeight*l:t-=u.pixelWidth*l}}),this._pyramidHeight=Ee(this.pyramidHeight,r),this._pyramidWidth=Ee(this.pyramidHeight,t),this.orientation=="vertical"){var n=(r-this._pyramidHeight)/2;this.slicesContainer.y=n,this.labelsContainer.y=n,this.ticksContainer.y=n}else{var s=(t-this._pyramidWidth)/2;this.slicesContainer.x=s,this.labelsContainer.x=s,this.ticksContainer.x=s}a.prototype.validateDataElements.call(this)},i.prototype.decorateSlice=function(e){var t=this.dataItem.values.value.absoluteSum;if(t!=0){var r=e.slice,n=e.sliceLink,s=e.label,o=e.tick;this.getNextValue(e);var l=Math.abs(e.getWorkingValue("value")),u=this._pyramidWidth,h=this._pyramidHeight,p=this.slicesContainer.innerWidth,d=this.slicesContainer.innerHeight,c=n.pixelWidth,f=n.pixelHeight;if((e.value==0||e.value==null)&&this.ignoreZeroValues?e.__disabled=!0:e.__disabled=!1,this.orientation=="vertical"){var m=Ee(this.topWidth,p);S(this._nextWidth)||(this._nextWidth=m);var y=Ee(this.bottomWidth,p),v=this._nextWidth,b=Math.atan2(h,m-y),x=Math.tan(Math.PI/2-b);x==0&&(x=1e-8);var _=void 0,$=void 0;if(this.valueIs=="area"){var O=(m+y)/2*h,F=O*l/t,w=Math.abs(v*v-2*F*x);_=(v-Math.sqrt(w))/x,_>0?$=(2*F-_*v)/_:$=v}else _=h*l/t,$=v-_*x;r.height=_,r.width=p,r.bottomWidth=$,r.topWidth=v,n.topWidth=r.bottomWidth,n.bottomWidth=r.bottomWidth,r.y=this._nextY,this.alignLabels?s.x=0:s.x=p/2,s.y=r.pixelY+r.pixelHeight*o.locationY+r.dy,this._nextY+=r.pixelHeight+f*l/Math.max(Math.abs(e.value),1e-8),n.y=this._nextY-f,n.x=p/2}else{var m=Ee(this.topWidth,d);S(this._nextWidth)||(this._nextWidth=m);var y=Ee(this.bottomWidth,d),v=this._nextWidth,b=Math.atan2(u,m-y),x=Math.tan(Math.PI/2-b);x==0&&(x=1e-8);var D=void 0,$=void 0;if(this.valueIs=="area"){var O=(m+y)/2*u,F=O*l/t;D=(v-Math.sqrt(v*v-2*F*x))/x,$=(2*F-D*v)/D}else D=u*l/t,$=v-D*x;r.width=D,r.height=d,r.bottomWidth=$,r.topWidth=v,n.topWidth=r.bottomWidth,n.bottomWidth=r.bottomWidth,r.x=this._nextY,this.alignLabels?s.y=this.labelsContainer.measuredHeight:s.y=d/2,s.x=r.pixelX+r.pixelWidth*o.locationX+r.dx,this._nextY+=r.pixelWidth+c*l/Math.max(Math.abs(e.value),1e-8),n.x=this._nextY-c,n.y=d/2}this._nextWidth=r.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})(oh);C.registeredClasses.PyramidSeries=lh;C.registeredClasses.PyramidSeriesDataItem=yl;var ec=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="PictorialStackedSeriesDataItem",e.applyTheme(),e}return i})(yl);var Jy=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="PictorialStackedSeries",e.topWidth=N(100),e.bottomWidth=N(100),e.valueIs="height",e.applyTheme(),e.startLocation=0,e.endLocation=1,e.align="center",e.valign="middle",e._maskSprite=e.slicesContainer.createChild(ee),e._maskSprite.visible=!1,e._maskSprite.zIndex=100,e._maskSprite.shouldClone=!1,e}return i.prototype.validateDataElements=function(){var e=this.slicesContainer.maxWidth,t=this.slicesContainer.maxHeight,r=this._maskSprite,n=r.measuredWidth/r.scale,s=r.measuredHeight/r.scale,o=ye(t/s,e/n);o==1/0&&(o=1),o=he(.001,o);var l=this.startLocation,u=this.endLocation,h=ye(e,n*o),p=ye(t,s*o);r.scale=o,this.orientation=="vertical"?(this.topWidth=h+4,this.bottomWidth=h+4,this.pyramidHeight=p*(u-l),r.x=e/2,r.y=p/2):(this.topWidth=p+4,this.bottomWidth=p+4,this.pyramidHeight=h*(u-l),r.valign="middle",r.x=h/2,r.y=t/2),r.verticalCenter="middle",r.horizontalCenter="middle",a.prototype.validateDataElements.call(this);var d,c;this.orientation=="vertical"?(this.valign=="bottom"&&(d=t-p),this.valign=="middle"&&(d=(t-p)/2),this.valign=="top"&&(d=0),this.align=="left"&&(c=-(e-h)/2),this.align=="center"&&(c=0),this.align=="right"&&(c=(e-h)/2),this.slices.template.dy=l*p,this.alignLabels&&(this.slicesContainer.dx=c)):(this.valign=="bottom"&&(d=(t-p)/2),this.valign=="middle"&&(d=0),this.valign=="top"&&(d=-(t-p)/2),this.align=="left"&&(c=0),this.align=="center"&&(c=(e-h)/2),this.align=="right"&&(c=e-h),this.slices.template.dx=l*h,this.alignLabels&&(this.slicesContainer.dy=d)),this.slicesContainer.x=c,this.labelsContainer.x=c,this.ticksContainer.x=c,this.slicesContainer.y=d,this.labelsContainer.y=d,this.ticksContainer.y=d,h>0&&p>0&&(this.slicesContainer.mask=r)},i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Pyramid Series"))},i.prototype.createDataItem=function(){return new ec},Object.defineProperty(i.prototype,"maskSprite",{get:function(){return this._maskSprite},enumerable:!0,configurable:!0}),i.prototype.initSlice=function(e){a.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})(lh);C.registeredClasses.PictorialStackedSeries=Jy;C.registeredClasses.PictorialStackedSeriesDataItem=ec;var gl=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="Ellipse",e.element=e.paper.add("ellipse"),e.applyTheme(),e}return i.prototype.draw=function(){a.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=e*2,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.innerWidth/2},set:function(e){this.width=e*2,this.invalidate()},enumerable:!0,configurable:!0}),i})(zi);C.registeredClasses.Ellipse=gl;var tc=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="Cone",e.angle=30,e.radius=N(100),e.topRadius=N(100),e.top=e.createChild(gl),e.top.shouldClone=!1,e.bottom=e.createChild(gl),e.bottom.shouldClone=!1,e.body=e.createChild(ee),e.body.shouldClone=!1,e.body.setElement(e.paper.add("path")),e.layout="none",e.bodyFillModifier=new Mn,e.bodyFillModifier.lightnesses=[0,-.25,0],e.body.fillModifier=e.bodyFillModifier,e.applyTheme(),e}return i.prototype.draw=function(){a.prototype.draw.call(this),it(this,this.top,Ke),it(this,this.bottom,Ke),it(this,this.body,Ke);var e=this.innerWidth,t=this.innerHeight,r=this.bottom,n=this.top,s=this.angle,o,l,u;this.orientation=="horizontal"?(o=t/2,r.y=t/2,r.x=0,n.y=t/2,n.x=e,l=(90-s)/90,u=0,this.bodyFillModifier.gradient.rotation=90):(l=0,u=(90-s)/90,o=e/2,r.y=t,r.x=e/2,n.x=e/2,this.bodyFillModifier.gradient.rotation=0);var h=this.radius.value*o,p=this.topRadius.value*o;r.radius=h-h*l,r.radiusY=h-h*u,n.radius=p-p*l,n.radiusY=p-p*u;var d;this.orientation=="horizontal"?d=W({x:0,y:t/2-r.radiusY})+bt(-90,-180,r.radius,r.radiusY)+k({x:e,y:t/2+n.radiusY})+bt(90,180,n.radius,n.radiusY)+Ge():d=W({x:e/2-n.radius,y:0})+bt(180,-180,n.radius,n.radiusY)+k({x:e/2+r.radius,y:t})+bt(0,180,r.radius,r.radiusY)+Ge(),this.body.path=d},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})(U);var uh=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="ConeColumn",e}return i.prototype.createAssets=function(){this.coneColumn=this.createChild(tc),this.coneColumn.shouldClone=!1,this.column=this.coneColumn},i.prototype.copyFrom=function(e){a.prototype.copyFrom.call(this,e),this.coneColumn&&this.coneColumn.copyFrom(e.coneColumn)},i})(Xi);C.registeredClasses.ConeColumn=uh;var eg=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="ConeSeriesDataItem",e.applyTheme(),e}return i})(ei);var tg=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="ConeSeries",e.applyTheme(),e}return i.prototype.createColumnTemplate=function(){return new uh},i.prototype.getMaskPath=function(){var e=0,t=0,r=this.columns.getIndex(0);if(r)return this.baseAxis==this.xAxis?t=r.coneColumn.innerWidth/2+1:e=r.coneColumn.innerHeight/2+1,Zi({x:-e,y:0,width:this.xAxis.axisLength+e,height:this.yAxis.axisLength+t})},i.prototype.validateDataElementReal=function(e){a.prototype.validateDataElementReal.call(this,e);var t=e.column;if(t){var r=e.column.coneColumn;r.fill=e.column.fill,this.baseAxis==this.yAxis?r.orientation="horizontal":r.orientation="vertical"}},i})(pt);C.registeredClasses.ConeSeries=tg;C.registeredClasses.ConeSeriesDataItem=eg;var hh=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="CurvedColumn",e}return i.prototype.createAssets=function(){this.curvedColumn=this.createChild(ee),this.curvedColumn.shouldClone=!1,this.setPropertyValue("tension",.7),this.width=N(120),this.height=N(120),this.column=this.curvedColumn},i.prototype.draw=function(){a.prototype.draw.call(this);var e=this.realWidth,t=this.realHeight,r=this.realX-this.pixelX,n=this.realY-this.pixelY,s;this.width;var o=1,l=1;this.orientation=="vertical"?(o=this.tension,s=[{x:0,y:t+n},{x:e/2,y:n},{x:e,y:t+n}]):(l=this.tension,t=Math.abs(t),s=[{x:r,y:t},{x:r+e,y:t/2},{x:r,y:0}]);var u=W(s[0])+new Qi(o,l).smooth(s);this.column.path=u},i.prototype.copyFrom=function(e){a.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})(Xi);C.registeredClasses.CurvedColumn=hh;var ig=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="CurvedColumnSeriesDataItem",e.applyTheme(),e}return i})(ei);var rg=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="CurvedColumnSeries",e.applyTheme(),e}return i.prototype.createColumnTemplate=function(){return new hh},i.prototype.validateDataElementReal=function(e){a.prototype.validateDataElementReal.call(this,e);var t=e.column;if(t=e.column,t){var r=e.column.curvedColumn;r.fill=e.column.fill,this.baseAxis==this.yAxis?t.orientation="horizontal":t.orientation="vertical"}},i})(pt);C.registeredClasses.CurvedColumnSeries=rg;C.registeredClasses.CurvedColumnSeriesDataItem=ig;var ag=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="CircleBullet";var t=e.createChild(zi);return t.shouldClone=!1,t.radius=5,t.isMeasured=!1,e.circle=t,e.applyTheme(),e}return i.prototype.copyFrom=function(e){a.prototype.copyFrom.call(this,e),this.circle.copyFrom(e.circle)},i})(ui);C.registeredClasses.CircleBullet=ag;var ng=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="ErrorBullet",e.errorLine=e.createChild(ee),e.errorLine.shouldClone=!1,e.width=20,e.height=20,e.strokeOpacity=1,e.isDynamic=!0,e}return i.prototype.validatePosition=function(){a.prototype.validatePosition.call(this);var e=this.pixelWidth/2,t=this.pixelHeight/2;this.errorLine.path=W({x:-e,y:-t})+k({x:e,y:-t})+W({x:0,y:-t})+k({x:0,y:t})+W({x:-e,y:t})+k({x:e,y:t})},i.prototype.copyFrom=function(e){a.prototype.copyFrom.call(this,e),this.errorLine.copyFrom(e.errorLine)},i})(ui);C.registeredClasses.ErrorBullet=ng;var vl=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="TextLink",e.selectable=!0;var t=new se;e.fill=t.getFor("primaryButton").brighten(.3);var r=e.states.create("hover");r.properties.fill=t.getFor("primaryButtonHover").brighten(.3);var n=e.states.create("down");return n.properties.fill=t.getFor("primaryButtonDown").brighten(.3),e.cursorOverStyle=We.pointer,e.applyTheme(),e}return i})(lt);C.registeredClasses.TextLink=vl;var Zs=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="Triangle",e.element=e.paper.add("path"),e.direction="top",e.applyTheme(),e}return i.prototype.draw=function(){a.prototype.draw.call(this);var e=this.pixelWidth,t=this.pixelHeight,r;switch(this.direction){case"right":r=W({x:0,y:0})+k({x:e,y:t/2})+k({x:0,y:t})+Ge();break;case"left":r=W({x:e,y:0})+k({x:0,y:t/2})+k({x:e,y:t})+Ge();break;case"bottom":r=W({x:0,y:0})+k({x:e,y:0})+k({x:e/2,y:t})+Ge();break;case"top":r=W({x:e/2,y:0})+k({x:e,y:t})+k({x:0,y:t})+Ge();break}this.path=r},Object.defineProperty(i.prototype,"direction",{get:function(){return this.getPropertyValue("direction")},set:function(e){this.setPropertyValue("direction",e,!0)},enumerable:!0,configurable:!0}),i})(ee);C.registeredClasses.Triangle=Zs;var sg=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="NavigationBarDataItem",e.applyTheme(),e}return Object.defineProperty(i.prototype,"name",{get:function(){return this.properties.name},set:function(e){this.setProperty("name",e)},enumerable:!0,configurable:!0}),i})(Wi);var og=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="NavigationBar";var t=new se,r=new vl;r.valign="middle",r.paddingTop=8,r.paddingBottom=8,e.paddingBottom=2,e.links=new Le(r),e._disposers.push(new Pe(e.links)),e._disposers.push(r),e._linksIterator=new fn(e.links,function(){return e.links.create()}),e._linksIterator.createNewItems=!0;var n=new Zs;n.direction="right",n.width=8,n.height=12,n.fill=t.getFor("alternativeBackground"),n.fillOpacity=.5,n.valign="middle",n.marginLeft=10,n.marginRight=10,e.separators=new Le(n),e._disposers.push(new Pe(e.separators)),e._disposers.push(n);var s=new vl;return e.activeLink=s,s.copyFrom(r),s.valign="middle",s.fontWeight="bold",e.width=N(100),e.layout="grid",e.dataFields.name="name",e.applyTheme(),e}return i.prototype.validateDataElements=function(){this.removeChildren(),this._linksIterator.reset(),a.prototype.validateDataElements.call(this)},i.prototype.validateDataElement=function(e){a.prototype.validateDataElement.call(this,e);var t;if(e.index<this.dataItems.length-1){t=this._linksIterator.getLast(),t.parent=this;var r=this.separators.create();r.parent=this,r.valign="middle"}else t=this.activeLink,t.events.copyFrom(this.links.template.events),t.hide(0),t.show(),t.parent=this;t.dataItem=e,t.text=e.name,t.validate()},i})(Hi);C.registeredClasses.NavigationBar=og;C.registeredClasses.NavigationBarDataItem=sg;var Qs=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.point={x:0,y:0},e._stick="none",e.className="Cursor",e.width=N(100),e.height=N(100),e.shouldClone=!1,e.hide(0),e.trackable=!0,e.clickable=!0,e.isMeasured=!1;var t=pe();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 i.prototype.handleCursorMove=function(e){if(!(!this.interactionsEnabled||this.interactions.isTouchProtected&&e.touch)){if((this._generalBehavior!="zoom"&&this._generalBehavior!="pan"||!this.downPoint)&&!pe().isLocalElement(e.pointer,this.paper.svg,this.uid)){(!this.isHidden||!this.isHiding)&&this.hide();return}var t=Zr(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}},i.prototype.hideReal=function(e){if(!((this._stick=="hard"||this._stick=="soft")&&this._stickPoint))return a.prototype.hideReal.call(this,e)},i.prototype.triggerMove=function(e,t,r){e.x=E(e.x,1),e.y=E(e.y,1),t&&(this._stick=t),(t=="hard"||t=="soft")&&(this._stickPoint=e),this.triggerMoveReal(e,r)},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"),pe().setGlobalStyle(We.grabbing);break}},i.prototype.triggerUp=function(e){this.triggerUpReal(e)},i.prototype.triggerUpReal=function(e){Se.requestFrame(),this.updatePoint(this.upPoint);var t=pe();if(_e(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(We.default);break}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||!pe().isLocalElement(e.pointer,this.paper.svg,this.uid))){Pn();var t=Zr(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&&!pe().isLocalElement(e.pointer,this.paper.svg,this.uid))){var t=Zr(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,P(this._chart.plotContainer)&&pe().lockElement(this._chart.plotContainer.interactions)},enumerable:!0,configurable:!0}),i})(U);C.registeredClasses.Cursor=Qs;var Rn=(function(a){T(i,a);function i(){var e=a.call(this)||this;e._lineX=new Ue,e._lineY=new Ue,e._xAxis=new Ue,e._yAxis=new Ue,e._snapToDisposers=[],e.className="XYCursor",e.behavior="zoomX",e.maxPanOut=.1;var t=new se;e.snapOnPan=!0;var r=e.createChild(ee);r.shouldClone=!1,r.fillOpacity=.2,r.fill=t.getFor("alternativeBackground"),r.isMeasured=!1,r.visible=!1,r.interactionsEnabled=!1,e.selection=r,e._disposers.push(e.selection);var n=e.createChild(ee);n.shouldClone=!1,n.stroke=t.getFor("grid"),n.fill=ie(),n.strokeDasharray="3,3",n.isMeasured=!1,n.strokeOpacity=.4,n.interactionsEnabled=!1,n.y=0,e.lineX=n,e._disposers.push(e.lineX);var s=e.createChild(ee);return s.shouldClone=!1,s.stroke=t.getFor("grid"),s.fill=ie(),s.strokeDasharray="3,3",s.isMeasured=!1,s.strokeOpacity=.4,s.interactionsEnabled=!1,s.x=0,e.lineY=s,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 i.prototype.updateSize=function(){this.lineX&&(this.lineX.path=W({x:0,y:0})+k({x:0,y:this.innerHeight})),this.lineY&&(this.lineY.path=W({x:0,y:0})+k({x:this.innerWidth,y:0}))},i.prototype.updateSelection=function(){if(this._usesSelection){var e=this.downPoint,t=this.behavior;if(e){var r=this.point;this.lineX&&(r.x=this.lineX.pixelX),this.lineY&&(r.y=this.lineY.pixelY);var n=this.selection,s=Math.min(r.x,e.x),o=Math.min(r.y,e.y),l=E(Math.abs(e.x-r.x),this._positionPrecision),u=E(Math.abs(e.y-r.y),this._positionPrecision);switch(t){case"zoomX":o=0,u=this.pixelHeight;break;case"zoomY":s=0,l=this.pixelWidth;break;case"selectX":o=0,u=this.pixelHeight;break;case"selectY":s=0,l=this.pixelWidth;break}n.x=s,n.y=o,n.path=Nu(l,u),n.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){a.prototype.triggerMoveReal.call(this,e,t);var r=this.snapToSeries;if(r&&!this.downPoint)if(r instanceof Nt)r.isHidden&&this.updateLinePositions(e);else{var n=!0;H(r,function(s){s.isHidden||(n=!1)}),n&&this.updateLinePositions(e)}else this.updateLinePositions(e);this.downPoint&&_e(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,r=this.downPoint.x,n=this.downPoint.y;this._usesSelection&&(t.x=r,t.y=n,t.path="",t.show()),a.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){if(this.hasMoved())this.downPoint&&(this.upPoint=e,this.updatePoint(this.upPoint),this._generalBehavior!="pan"&&this.getRanges(),this._generalBehavior!="select"&&this.selection.hide(),a.prototype.triggerUpReal.call(this,e));else{if(this._generalBehavior!="select"?this.selection.hide(0):(this.xRange=void 0,this.yRange=void 0,this.dispatchImmediately("selectended")),this._generalBehavior=="pan"){var t=pe();t.setGlobalStyle(We.default)}this.dispatchImmediately("behaviorcanceled")}this.downPoint=void 0,this.dispatch("cursorpositionchanged")},i.prototype.hasMoved=function(){var e;return this.behavior=="zoomX"||this.behavior=="panX"?e=Dm(this._upPointOrig,this._downPointOrig):this.behavior=="zoomY"||this.behavior=="panY"?e=Am(this._upPointOrig,this._downPointOrig):e=_e(this._upPointOrig,this._downPointOrig),e>pe().getHitOption(this.interactions,"hitTolerance")},i.prototype.getPanningRanges=function(){var e=E(this.downPoint.x/this.innerWidth,5),t=1-E(this.downPoint.y/this.innerHeight,5),r=E(this.point.x/this.innerWidth,5),n=1-E(this.point.y/this.innerHeight,5),s=e-r,o=t-n;this.xRange={start:s,end:1+s},this.yRange={start:o,end:1+o},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=E(this.downPoint.x/this.innerWidth,5),t=E(this.upPoint.x/this.innerWidth,5),r=1-E(this.downPoint.y/this.innerHeight,5),n=1-E(this.upPoint.y/this.innerHeight,5);this.xRange={start:ye(e,t),end:he(e,t)},this.yRange={start:ye(r,n),end:he(r,n)}},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 Fe([e.tooltip.events.on("positionchanged",this.handleXTooltipPosition,this,!1),e.events.on("rangechangestarted",function(r){t.hide(0),t.preventShow=!0},void 0,!1),e.events.on("rangechangeended",function(r){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 Fe([e.tooltip.events.on("positionchanged",this.handleYTooltipPosition,this,!1),e.events.on("rangechangestarted",function(r){t.hide(0),t.__disabled=!0},void 0,!1),e.events.on("rangechangeended",function(r){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,r=Qt({x:t.pixelX,y:t.pixelY},this),n=r.x;if(r.y=1,this.lineX&&(this.lineX.x=n,this.fitsToBounds(r)||this.hide()),this.xAxis&&this.fullWidthLineX){var s=this.xAxis.currentItemStartPoint,o=this.xAxis.currentItemEndPoint;if(s&&o){this.lineX.x=n;var l=o.x-s.x;this.lineX.path=Nu(l,this.innerHeight,-l/2)}}},i.prototype.handleYTooltipPosition=function(e){var t=this.yAxis.tooltip,r=Qt({x:t.pixelX,y:t.pixelY},this),n=r.y;if(r.x=1,this.lineY&&(this.lineY.y=n,this.fitsToBounds(r)||this.hide()),this.yAxis&&this.fullWidthLineY){var s=this.yAxis.currentItemStartPoint,o=this.yAxis.currentItemEndPoint;if(s&&o){this.lineY.y=n;var l=o.y-s.y;this.lineY.path=Nu(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&&(P(e.xAxis)&&ce(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)),P(e.yAxis)&&ce(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)),P(e.snapToSeries))){var r=Xe(e.snapToSeries)?e.snapToSeries:[e.snapToSeries],n=!1;H(r,function(s,o){ce(s)&&(t.map.hasKey(s)?r[o]=t.map.getKey(s):(t.processingErrors.push('[XYCursor] No series with id "'+s+'" found for `series`'),n=!0))}),n?delete e.snapToSeries:e.snapToSeries=r}a.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 Nt&&(e=[e]),this._snapToDisposers&&H(this._snapToDisposers,function(r){r.dispose()}),this._snapToDisposers=[],e&&H(e,function(r){t._snapToDisposers.push(r.events.on("tooltipshownat",function(){t.handleSnap(r)},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,r=e.getTooltipY()+e.yAxis.pixelY,n=e.xAxis,s=e.yAxis;n&&n.renderer.opposite&&(r-=this.pixelHeight),this.point={x:t,y:r},this.getPositions();var o=t,l=r;t-=this.pixelWidth,s&&s.renderer.opposite&&(t+=this.pixelWidth);var u=e.tooltip,h=u.animationDuration,p=u.animationEasing;n instanceof re&&!(n instanceof xe)&&s instanceof re&&!(s instanceof xe)?(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=r,this.xAxis||this.lineX.animate([{property:"x",to:o}],h,p),this.yAxis||this.lineY.animate([{property:"y",to:l}],h,p)}},i.prototype.dispose=function(){this.hide(0),a.prototype.dispose.call(this)},i})(Qs);C.registeredClasses.XYCursor=Rn;var lg=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="RadarCursor",e.radius=N(100),e.innerRadius=N(0),e.applyTheme(),e.mask=void 0,e}return i.prototype.fitsToBounds=function(e){var t=_e(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(),a.prototype.triggerMoveReal.call(this,e,t)},i.prototype.updateLineX=function(e){var t=this.pixelRadius,r=this.startAngle,n=this.endAngle,s=this.pixelInnerRadius;if(t>0&&S(r)&&S(n)&&S(s)){var o=Ui(ft(e),r,n),l=void 0;if(this.lineX&&this.lineX.visible){if(this.lineX.moveTo({x:0,y:0}),this.xAxis&&this.fullWidthLineX){var u=this.xAxis.currentItemStartPoint,h=this.xAxis.currentItemEndPoint;if(u&&h){var p=Ui(ft(u),r,n),d=Ui(ft(h),r,n),c=d-p;r<n?c<0&&(c+=360):c>0&&(c-=360),o-=c/2,l=W({x:s*Y(o),y:s*X(o)})+k({x:t*Y(o),y:t*X(o)})+bt(o,c,t)+k({x:s*Y(o+c),y:s*X(o+c)})+bt(o+c,-c,s)}}l||(l=W({x:s*Y(o),y:s*X(o)})+k({x:t*Y(o),y:t*X(o)})),this.lineX.path=l}}},i.prototype.updateLineY=function(e){if(this.lineY&&this.lineY.visible){var t=this.startAngle,r=this.endAngle,n=this.truePixelRadius,s=G(_e(e),0,this.truePixelRadius);if(S(s)&&S(t)){this.lineY.moveTo({x:0,y:0});var o=void 0,l=r-t;if(this.yAxis&&this.fullWidthLineY){var u=this.yAxis.currentItemStartPoint,h=this.yAxis.currentItemEndPoint;if(u&&h){var p=G(_e(u),0,n);s=G(_e(h),0,n),o=W({x:s*Y(t),y:s*X(t)})+bt(t,l,s),o+=W({x:p*Y(r),y:p*X(r)})+bt(r,-l,p)}}o||(o=W({x:s*Y(t),y:s*X(t)})+bt(t,r-t,s)),this.lineY.path=o}}},i.prototype.updateSelection=function(){if(this._usesSelection){var e=this.downPoint;if(e){var t=this.point,r=this.pixelRadius,n=this.truePixelRadius,s=this.pixelInnerRadius,o=Math.min(this.startAngle,this.endAngle),l=Math.max(this.startAngle,this.endAngle),u=Ui(ft(e),o,l),h=Ui(ft(t),o,l),p=_e(e);if(p<n){var d=G(_e(t),0,n);this._prevAngle=h;var c=W({x:0,y:0}),f=X(u),m=Y(u),y=X(h),v=Y(h),b=this.behavior;b=="zoomX"||b=="selectX"?c+=k({x:r*m,y:r*f})+bt(u,h-u,r)+k({x:s*v,y:s*y})+bt(h,u-h,s):b=="zoomY"||b=="selectY"?c=W({x:d*Y(o),y:d*X(o)})+bt(o,l-o,d)+k({x:p*Y(l),y:p*X(l)})+bt(l,o-l,p)+Ge():b=="zoomXY"&&(c=W({x:d*Y(u),y:d*X(u)})+bt(u,h-u,d)+k({x:p*Y(h),y:p*X(h)})+bt(h,u-h,p)+Ge()),this.selection.path=c}this.selection.moveTo({x:0,y:0})}}},i.prototype.getPositions=function(){var e=this.chart;if(e){var t=this.pixelInnerRadius,r=this.truePixelRadius-t,n=this.startAngle,s=this.endAngle,o=Ui(ft(this.point),n,s),l=(o-n)/(s-n);this.xPosition=l,this.yPosition=G((_e(this.point)-t)/r,0,1)}},i.prototype.updatePoint=function(e){},i.prototype.handleXTooltipPosition=function(e){if(this.xAxis.cursorTooltipEnabled){var t=this.xAxis.tooltip;this.updateLineX(Qt({x:t.pixelX,y:t.pixelY},this))}},i.prototype.handleYTooltipPosition=function(e){if(this.yAxis.cursorTooltipEnabled){var t=this.yAxis.tooltip;this.updateLineY(Qt({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,r=this.chart;if(r){var n=this.pixelRadius,s=this.startAngle,o=this.endAngle,l=Ui(ft(e),this.startAngle,this.endAngle),u=Ui(ft(t),this.startAngle,this.endAngle),h=G(_e(e),0,n),p=G(_e(t),0,n),d=0,c=1,f=0,m=1,y=this.behavior;if(y=="zoomX"||y=="selectX"||y=="zoomXY"||y=="selectXY"){var v=o-s;d=E((l-s)/v,5),c=E((u-s)/v,5)}(y=="zoomY"||y=="selectY"||y=="zoomXY"||y=="selectXY")&&(f=E(h/n,5),m=E(p/n,5)),this.xRange={start:Math.min(d,c),end:Math.max(d,c)},this.yRange={start:Math.min(f,m),end:Math.max(f,m)},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 mt(this.radius,this.truePixelRadius)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"truePixelRadius",{get:function(){return Ee(N(100),ye(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 de&&(e=N(100*e.value*this.chart.innerRadiusModifyer)),mt(e,this.truePixelRadius)||0},enumerable:!0,configurable:!0}),i.prototype.fixPoint=function(e){return e},i})(Rn);C.registeredClasses.RadarCursor=lg;var Js=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.properties.gap=0,e._line=e.paper.add("path"),e.addElement(e._line),e}return i.prototype.draw=function(){if(a.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,r="";if(!this.gap)Math.round(this.rotation/90)!=this.rotation/90?(r=W({x:-e,y:t/2})+k({x:e*2,y:t/2}),this.properties.rotationX=this.width/2,this.properties.rotationY=this.height/2):r=W({x:0,y:0})+k({x:e,y:0});else for(var n=this.gap+this.strokeWidth,s=this.height/n,o=-s/2;o<s*1.5;o++)Math.round(this.rotation/90)!=this.rotation/90?(r+=W({x:-e,y:(o+.5)*n})+k({x:e*2,y:(o+.5)*n}),this.properties.rotationX=this.width/2,this.properties.rotationY=this.height/2):r+=W({x:-e,y:o*n})+k({x:e*2,y:o*n});this._line.attr({d:r})}},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})(Fr);C.registeredClasses.LinePattern=Js;var eo=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.rectHeight=1,e.rectWidth=1,e._rect=e.paper.add("rect"),e.addElement(e._rect),e}return i.prototype.draw=function(){a.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})(Fr);C.registeredClasses.RectPattern=eo;var ic=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="FocusFilter",e.feFlood=e.paper.add("feFlood"),e.feFlood.attr({"flood-color":new se().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 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"}),a.prototype.setSprite.call(this,e)},i})(Ji);var ph=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="Preloader",e.width=N(100),e.height=N(100);var t=new se,r=e.createChild(U);r.shouldClone=!1;var n=r.createChild(tr);n.shouldClone=!1,n.radius=53,n.arc=360,n.fill=t.getFor("fill"),n.fillOpacity=.8,n.innerRadius=42,n.isMeasured=!1,e.backgroundSlice=n;var s=r.createChild(tr);s.shouldClone=!1,s.radius=50,s.innerRadius=45,s.fill=t.getFor("alternativeBackground"),s.fillOpacity=.2,s.isMeasured=!1,e.progressSlice=s;var o=r.createChild(lt);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;var l=e.states.create("hidden");return l.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(r),e}return 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(e*100)+"%"),e>=1?(this._started&&(this._started=void 0),C.events.once("enterframe",function(){var r=t.hide();r&&!r.isFinished()?r.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})(U);C.registeredClasses.Preloader=ph;var ug=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="AmChartsLogo",e.valign="bottom";var t=.3;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=220*t,e.height=70*t,e.background.opacity=0;var r=ie("#474758");new se().getFor("background").alternative.hex=="#ffffff"&&(r=ie("#ffffff"));var n=new Ht;n.addColor(r),n.addColor(r,1,.75),n.addColor(ie("#3cabff"),1,.755),n.rotation=-10;var s=n,o=e.createChild(Nn);o.shouldClone=!1,o.isMeasured=!1,o.segments=[[{x:50*t,y:50*t},{x:90*t,y:50*t},{x:120*t,y:20*t},{x:135*t,y:35*t},{x:150*t,y:20*t},{x:180*t,y:50*t},{x:200*t,y:50*t}]],o.strokeWidth=6*t,o.tensionX=.8,o.tensionY=1,o.stroke=ie("#3cabff");var l=e.createChild(Nn);l.shouldClone=!1,l.isMeasured=!1,l.segments=[[{x:20*t,y:50*t},{x:50*t,y:50*t},{x:90*t,y:12*t},{x:133*t,y:50*t},{x:170*t,y:50*t},{x:200*t,y:50*t}]],l.strokeWidth=6*t,l.tensionX=.75,l.tensionY=1,l.stroke=s,e._disposers.push(l);var u=new Vn;e.filters.push(u);var h=new Vn;h.saturation=1;var p=e.states.create("hover");return p.properties.opacity=1,p.filters.push(h),e.applyTheme(),e}return i})(U);function _x(a,i){var e=zo(a),t=!1;if(e||(e=document.createElement("div"),e.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 r=new Zo(e),n=new Mu(r.SVGContainer,"svg-"+(Iu.length-1)),s=new U;s.htmlContainer=e,s.svgContainer=r,s.width=N(100),s.height=N(100),s.background.fillOpacity=0,s.paper=n,n.append(s.group),t&&_d(function(){s.moveHtmlContainer(a)}),s.relativeWidth=1,s.relativeHeight=1,r.container=s;var o=s.createChild(i);o.topParent=s;var l=o.uid;C.invalidSprites[l]=[],C.invalidDatas[l]=[],C.invalidPositions[l]=[],C.invalidLayouts[l]=[],s.baseId=l,o.isBaseSprite=!0,o.focusFilter=new ic,C.baseSprites.push(o),C.baseSpritesByUid[l]=o,o.maskRectangle={x:0,y:0,width:Math.max(r.width||0,0),height:Math.max(r.height||0,0)},s.events.on("maxsizechanged",function(x){(x.previousWidth==0||x.previousHeight==0)&&s.deepInvalidate(),o.maskRectangle&&(o.maskRectangle={x:0,y:0,width:Math.max(r.width||0,0),height:Math.max(r.height||0,0)})});var u=null,h=function(){o.isDisposed()?u=null:Du(o.dom)==null?(ge.autoDispose?(s.htmlContainer=void 0,r.htmlElement=void 0,o.dispose()):Bs("Chart was not disposed",o.uid),u=null):u=window.setTimeout(h,1e3)};h(),o.addDisposer(new Ce(function(){u!==null&&clearTimeout(u),oe(C.baseSprites,o),C.baseSpritesByUid[o.uid]=void 0})),o.addDisposer(s);var p=s.createChild(U);p.topParent=s,p.width=N(100),p.height=N(100),p.isMeasured=!1,s.tooltipContainer=p,o.tooltip=new Ar,o.tooltip.hide(0),o.tooltip.setBounds({x:0,y:0,width:p.maxWidth,height:p.maxHeight}),p.events.on("maxsizechanged",function(){ze(o.tooltip).setBounds({x:0,y:0,width:p.maxWidth,height:p.maxHeight})},void 0,!1);var d=new ph;if(d.events.on("inited",function(){d.__disabled=!0},void 0,!1),s.preloader=d,o instanceof U&&!o.hasLicense()){var c=p.createChild(ug);p.events.on("maxsizechanged",function(x){p.maxWidth<=100||p.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,s.isStandaloneInstance=!0,ge.onlyShowOnViewport)if(Au(e,ge.viewportTarget))ge.queue&&rc(o);else{o.__disabled=!0,o.tooltipContainer.__disabled=!0;var f=[ot(window,"DOMContentLoaded",function(){Bn(o)}),ot(window,"load",function(){Bn(o)}),ot(window,"resize",function(){Bn(o)}),ot(window,"scroll",function(){Bn(o)})];if(ge.viewportTarget)for(var m=Xe(ge.viewportTarget)?ge.viewportTarget:ge.viewportTarget?[ge.viewportTarget]:[],y=0;y<m.length;y++){var v=m[y];f.push(ot(v,"resize",function(){Bn(o)})),f.push(ot(v,"scroll",function(){Bn(o)}))}var b=new Fe(f);o.addDisposer(b),o.vpDisposer=b}else ge.queue&&rc(o);return o}else throw Se.log("html container not found"),new Error("html container not found")}function rc(a){C.queue.indexOf(a)==-1&&(a.__disabled=!0,a.tooltipContainer.__disabled=!0,a.events.disableType("appeared"),C.queue.length==0&&(C.events.once("exitframe",function(){hg(a)}),Se.requestFrame()),a.addDisposer(new Ce(function(){dh(a)})),C.queue.push(a))}function dh(a){var i=C.queue.indexOf(a);if(i>=0){C.queue.splice(C.queue.indexOf(a),1);var e=C.queue[i];e&&hg(e)}}function Bn(a){a.__disabled&&Au(a.htmlContainer,ge.viewportTarget)&&(a.vpDisposer&&a.vpDisposer.dispose(),rc(a))}function hg(a){a&&a.tooltipContainer&&(a.__disabled=!1,a.tooltipContainer.__disabled=!1,a.events.enableType("appeared"),a.dispatch("removedfromqueue"),a.showOnInit&&a.events.on("appeared",function(){dh(a)}),a.vpDisposer&&a.vpDisposer.dispose(),a instanceof U&&a.invalidateLabels(),a.tooltipContainer&&a.tooltipContainer.invalidateLayout(),a instanceof Hi?(a.invalidateData(),a.reinit(),a.events.once("datavalidated",function(){a.showOnInit?a.appear():dh(a)})):(a.reinit(),a.events.once("inited",function(){dh(a)}),a.showOnInit&&a.appear()))}function Tx(a,i){var e;ce(i)&&(P(C.registeredClasses[i])?i=C.registeredClasses[i]:(i=C.registeredClasses.Container,e=new Error("Class ["+i+"] is not loaded.")));var t=_x(a,i);return e&&t.raiseCriticalError(e),t}function Ox(a){C.themes.indexOf(a)===-1&&C.themes.push(a)}function wx(a){oe(C.themes,a)}var pg=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="Image",e.element=e.paper.add("image"),e.applyTheme(),e.width=50,e.height=50,e}return i.prototype.draw=function(){if(a.prototype.draw.call(this),this.href){var e=this.innerWidth,t=this.innerHeight;S(this.widthRatio)&&(e=t*this.widthRatio,this.width=e),S(this.heightRatio)&&(t=e*this.heightRatio,this.height=t),this.element.attr({width:e,height:t}),this.element.attrNS(ks,"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})(ee);C.registeredClasses.Image=pg;var dg=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="Polyarc",e.controlPointDistance=.5,e.controlPointPosition=.5,e.applyTheme(),e}return i.prototype.makePath=function(){this._distance=0;var e=this.segments;if(e&&e.length>0){var t="";this._realSegments=[];for(var r=0,n=e.length;r<n;r++){var s=e[r],o=[];if(this._realSegments.push(o),s.length>0){t+=W(s[0]);for(var l=1;l<s.length;l++){var u=s[l-1],h=s[l],p=_e(h,u),d=p*this.controlPointDistance,c=this.controlPointPosition,f=-ft(u,h),m=u.x+(h.x-u.x)*c*.5-d*X(f),y=u.y+(h.y-u.y)*c*.5-d*Y(f),v={x:m,y},b=u.x+(h.x-u.x)*c*1.5-d*X(f),x=u.y+(h.y-u.y)*c*1.5-d*Y(f),_={x:b,y:x};t+=xa(h,v,_);var $=Math.ceil(p),O=u;if($>0)for(var F=0;F<=$;F++){var w=$o(u,h,v,_,F/$);o.push(w),this._distance+=_e(O,w),O=w}else o.push(u)}}}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})(_a);C.registeredClasses.Polyarc=dg;var ac=(function(a){T(i,a);function i(e){var t=a.call(this)||this;return t._bboxes=[],t.morphDuration=800,t.morphEasing=cr,t.morphToSingle=!0,t.scaleRatio=1,t.className="Morpher",t.morphable=e,t.applyTheme(),t}return i.prototype.morphToPolygon=function(e,t,r){var n=this.morphable.currentPoints;if(n&&e){this.sortPoints(n),this.sortPoints(e),this._morphFromPointsReal=[],this._morphToPointsReal=[],P(t)||(t=this.morphDuration),P(r)||(r=this.morphEasing),this._morphFromPointsReal=this.normalizePoints(e,n),this._morphToPointsReal=this.normalizePoints(n,e),this.morphable.currentPoints=this._morphFromPointsReal;var s=new Gt(this,{property:"morphProgress",from:0,to:1},t,r);return this._disposers.push(s),s.start(),s}},i.prototype.normalizePoints=function(e,t){for(var r=0,n=e.length;r<n;r++){var s=e[r][0],o=e[r][1],l=ze(gs(s)),u=l.x+l.width,h=l.y+l.height;if(t[r]||(t[r]=[]),s&&!t[r][0]&&(t[r][0]=[{x:u,y:h},{x:u,y:h}]),t[r][0]){t[r][0]=this.addPoints(t[r][0],s.length);for(var p=1/0,d=0,c=0;c<t[r][0].length;c++){var f=_e(t[r][0][c],s[0]);f<p&&(d=c,p=f)}var m=t[r][0].slice(0,d),y=t[r][0].slice(d);t[r][0]=y.concat(m)}o&&(t[r][1]||(t[r][1]=[{x:u,y:h},{x:u,y:h}]),t[r][1]=this.addPoints(t[r][1],o.length))}return t},i.prototype.sortPoints=function(e){e.sort(function(o,l){var u=ze(gs(o[0])),h=ze(gs(l[0]));return u.width*u.height>h.width*h.height?-1:1});for(var t=[],r=0,n=e.length;r<n;r++){var s=e[r][0];s&&t.push(ze(gs(s)))}return Gr(t)},i.prototype.morphToCircle=function(e,t,r){var n=this.morphable.points,s=this.sortPoints(n);this._morphFromPointsReal=[],this._morphToPointsReal=[],P(t)||(t=this.morphDuration),P(r)||(r=this.morphEasing);for(var o=0,l=n.length;o<l;o++){var u=n[o][0],h=n[o][1];if(this._morphFromPointsReal[o]=[],this._morphToPointsReal[o]=[],u){var p=u,d=u,c=ze(gs(d));this.morphToSingle&&(c=ze(s));var f=c.x+c.width/2,m=c.y+c.height/2,y=e;S(y)||(y=Math.min(c.width/2,c.height/2)),p=[];var v=ft({x:f,y:m},u[0]),b=100;u.length>b&&(b=u.length),d=this.addPoints(u,b),b=d.length;for(var x=360/(b-1),_=0;_<b;_++){var $=x*_+v,O={x:f+y*Y($),y:m+y*X($)};p[_]=O}if(h&&h.length>0)for(var F=0,w=h.length;F<w;F++)p.push({x:f,y:m});this._morphFromPointsReal[o][0]=d,this._morphToPointsReal[o][0]=p}}this.morphable.currentPoints=this._morphFromPointsReal;var D=new Gt(this,{property:"morphProgress",from:0,to:1},t,r);return this._disposers.push(D),D.start(),D},i.prototype.addPoints=function(e,t){for(var r=Math.round(t/e.length),n=[],s=0,o=e.length;s<o;s++){var l=e[s],u=void 0;s==e.length-1?u=e[0]:u=e[s+1],n.push(l);for(var h=1;h<r;h++){var p=h/r,d={x:l.x+(u.x-l.x)*p,y:l.y+(u.y-l.y)*p};n.push(d)}n.length+e.length-s==t&&(r=0)}if(n.length<t&&e.length>0)for(var c=e[e.length-1],h=n.length;h<t;h++)n.push({x:c.x,y:c.y});return n},i.prototype.morphToRectangle=function(e,t,r,n){var s=this.morphable.points;this.sortPoints(s),this._morphFromPointsReal=[],this._morphToPointsReal=[],P(r)||(r=this.morphDuration),P(n)||(n=this.morphEasing);for(var o=0,l=s.length;o<l;o++){var u=s[o][0],h=s[o][1];if(this._morphFromPointsReal[o]=[],this._morphToPointsReal[o]=[],u){var p=u,d=u,c=this._bboxes[o];this.morphToSingle;var f=c.x,m=c.y,y=e,v=t;if(S(y)||(y=c.width),S(v)||(v=c.height),p=[{x:f,y:m},{x:f+y,y:m},{x:f+y,y:m+v},{x:f,y:m+v}],p=this.addPoints(p,u.length),u.length<4)for(var b=u.length;b<4;b++)p.push({x:u[b].x,y:u[b].y});if(h&&h.length>0)for(var x=c.x+c.width/2,_=c.y+c.height/2,$=0,O=h.length;$<O;$++)p.push({x,y:_});this._morphFromPointsReal[o][0]=d,this._morphToPointsReal[o][0]=p}}this.morphable.currentPoints=this._morphFromPointsReal;var F=new Gt(this,{property:"morphProgress",from:0,to:1},r,n);return this._disposers.push(F),F.start(),F},Object.defineProperty(i.prototype,"morphProgress",{get:function(){return this._morphProgress},set:function(e){this._morphProgress=e;var t=[];if(e!=null){var r=this._morphFromPointsReal,n=this._morphToPointsReal;if(r!=null&&n!=null)for(var s=0,o=r.length;s<o;s++){var l=[];t.push(l);var u=r[s][0],h=r[s][1],p=n[s][0],d=n[s][1];if(u&&u.length>0&&p&&p.length>0){for(var c=[],f=0,m=u.length;f<m;f++){var y=u[f],v=p[f],b={x:y.x+(v.x*this.scaleRatio-y.x)*e,y:y.y+(v.y*this.scaleRatio-y.y)*e};c.push(b)}l[0]=c}if(h&&h.length>0&&d&&d.length>0){for(var x=[],_=0,$=h.length;_<$;_++){var y=h[_],v=d[_],b={x:y.x+(v.x*this.scaleRatio-y.x)*e,y:y.y+(v.y*this.scaleRatio-y.y)*e};x.push(b)}l[1]=x}}}this.morphable.currentPoints=t},enumerable:!0,configurable:!0}),i.prototype.morphBack=function(e,t){this._morphToPointsReal=this._morphFromPointsReal,this._morphFromPointsReal=this.morphable.currentPoints,P(e)||(e=this.morphDuration),P(t)||(t=this.morphEasing);var r=new Gt(this,{property:"morphProgress",from:0,to:1},e,t);return this._disposers.push(r),r.start(),r},Object.defineProperty(i.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new fr(this._animations))),this._animations},enumerable:!0,configurable:!0}),i})(st);var cg=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="Polygon",e.element=e.paper.add("path"),e.shapeRendering="auto",e._currentPoints=[],e.applyTheme(),e}return Object.defineProperty(i.prototype,"points",{get:function(){var e=this.getPropertyValue("points"),t=this.path;if(t&&(!e||e.length==0)){for(var r=t.slice(1,t.length-1),n=r.split("ZM"),s=0;s<n.length;s++){var o=n[s];if(o.length>0){var l=o.split("M"),u=l[0],h=l[1];if(u&&u.length>0){var p=u.split("L");if(p.length>0){var d=[],c=[d];e.push(c);for(var f=0;f<p.length;f++){var m=p[f].split(",");d.push({x:+m[0],y:+m[1]})}if(h&&h.length>0){var y=h.split("L");if(y.length>0){var v=[];c.push(v);for(var f=y.length-1;f>=0;f--){var m=y[f].split(",");v.push({x:+m[0],y:+m[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=this._currentPoints,r,n,s,o;if(t.length>0){for(var l=0,u=t.length;l<u;l++){var h=t[l][0],p=t[l][1];if(h&&h.length>0){var d=h[0];e+=W(d);for(var c=0;c<h.length;c++)d=h[c],e+=k(d),(!S(n)||n<d.x)&&(n=d.x),(!S(r)||r>d.x)&&(r=d.x),(!S(s)||s>d.y)&&(s=d.y),(!S(o)||o<d.y)&&(o=d.y)}if(p&&p.length>0){var d=p[0];e+=W(d);for(var f=0,m=p.length;f<m;f++)d=p[f],e+=k(d)}}e&&(e+=Ge()),this.bbox.x=r,this.bbox.y=s,this.bbox.width=n-r,this.bbox.height=o-s,a.prototype.setPath.call(this,e)}},i.prototype.setPath=function(e){return a.prototype.setPath.call(this,e)?(this.points=[],this._bbox=this.group.getBBox(),!0):!1},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 ac(this),this._disposers.push(this._morpher)),this._morpher},enumerable:!0,configurable:!0}),i})(ee);C.registeredClasses.Polygon=cg;var fg=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="CloseButton",e.padding(8,8,8,8),e.showSystemTooltip=!0,e.width=30,e.height=30;var t=new se;e.cursorOverStyle=We.pointer;var r=e.background;r.cornerRadius(20,20,20,20);var n=t.getFor("background");r.fill=n,r.stroke=t.getFor("primaryButton"),r.strokeOpacity=1,r.strokeWidth=1;var s=t.getFor("primaryButtonActive"),o=r.states.getKey("hover");o.properties.strokeWidth=3,o.properties.fill=n;var l=r.states.getKey("down");l.properties.stroke=s,l.properties.fill=n;var u=new ee;return u.element=e.paper.add("path"),u.stroke=r.stroke,e.icon=u,e.applyTheme(),e}return i.prototype.validate=function(){a.prototype.validate.call(this);var e=this.pixelWidth/3,t=this.pixelHeight/3,r=W({x:-e/2,y:-t/2});r+=k({x:e/2,y:t/2}),r+=W({x:e/2,y:-t/2}),r+=k({x:-e/2,y:t/2}),this.icon.path=r,this.invalidateLayout()},i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Close"))},i})(Pi);C.registeredClasses.CloseButton=fg;var mg=(function(a){T(i,a);function i(){var e=a.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 se,r=new lt;r.fillOpacity=.3;var n=r.states.create("active");n.properties.fillOpacity=1,r.isActive=!0,e.leftLabel=r;var s=new Pi,o=new zi;s.contentValign="none",s.padding(0,0,0,0),o.radius=10,s.icon=o,s.icon.valign="middle",s.label=void 0;var l=N(100);s.background.cornerRadius(l,l,l,l),s.width=o.radius*3.5,s.height=o.radius*2.1,s.marginLeft=8,s.marginRight=8,s.togglable=!0,o.dx=-o.radius*.7,o.fill=t.getFor("primaryButton");var u=o.states.create("hover");u.properties.fill=t.getFor("primaryButtonHover");var h=o.states.create("active");h.properties.fill=t.getFor("primaryButtonActive"),h.properties.dx=o.radius*.7,e.switchButton=s,e.events.on("toggled",function(){e.leftLabel.isActive=!e.isActive,e.rightLabel.isActive=e.isActive});var p=new lt;p.fillOpacity=.3;var d=p.states.create("active");return d.properties.fillOpacity=1,e.rightLabel=p,e.role="button",e.focusable=!0,p.valign="middle",r.valign="middle",s.valign="middle",e.applyTheme(),e}return 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){a.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})(U);C.registeredClasses.SwitchButton=mg;var yg=(function(a){T(i,a);function i(){var e=a.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 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})(Ha);C.registeredClasses.Slider=yg;var gg=(function(a){T(i,a);function i(){var e=a.call(this)||this;e.className="PlayButton",e.padding(12,12,12,12),e.showSystemTooltip=!0;var t=new se,r=e.background;r.cornerRadius(25,25,25,25),r.fill=t.getFor("primaryButton"),r.stroke=t.getFor("primaryButtonStroke"),r.strokeOpacity=0,r.states.getKey("hover").properties.fill=t.getFor("primaryButtonHover"),r.states.getKey("down").properties.fill=t.getFor("primaryButtonActive");var n=new Zs;n.direction="right",n.width=9,n.height=11,n.marginLeft=1,n.marginRight=1,n.horizontalCenter="middle",n.verticalCenter="middle",n.stroke=t.getFor("primaryButtonText"),n.fill=n.stroke,e.icon=n;var s=new Mt;s.width=11,s.height=11,s.horizontalCenter="middle",s.verticalCenter="middle",s.cornerRadius(0,0,0,0),s.stroke=t.getFor("primaryButtonText"),s.fill=n.stroke,e.togglable=!0;var o=e.states.create("active");return o.transitionDuration=0,o.properties.icon=s,e.defaultState.transitionDuration=0,e.applyTheme(),e}return i.prototype.applyInternalDefaults=function(){a.prototype.applyInternalDefaults.call(this),P(this.readerTitle)||(this.readerTitle=this.language.translate("Play"))},i})(Pi);C.registeredClasses.PlayButton=gg;var vg=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.className="RadialGradientModifier",e.gradient=new ji,e.applyTheme(),e}return i.prototype.copyFrom=function(e){a.prototype.copyFrom.call(this,e),this.gradient=e.gradient.clone()},i})(ul);C.registeredClasses.RadialGradientModifier=vg;var ch=(function(a){T(i,a);function i(){var e=a.call(this)||this;return e.properties.radius=2,e._circle=e.paper.add("circle"),e.addElement(e._circle),e.shapeRendering="auto",e}return i.prototype.draw=function(){a.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})(Fr);C.registeredClasses.CirclePattern=ch;var bg=(function(a){T(i,a);function i(){var e=a.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 i.prototype.applyFilter=function(){var e=this.intensity,t=1-e,r,n,s,o=this.color;o&&o.rgb?(r=o.rgb.r/255*e,n=o.rgb.g/255*e,s=o.rgb.b/255*e):(r=0,n=0,s=0),this.feColorMatrix.attr({values:t+" 0 0 0 "+r+" 0 "+t+" 0 0 "+n+" 0 0 "+t+" 0 "+s+" 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})(Ji);C.registeredClasses.ColorizeFilter=bg;var xg=(function(a){T(i,a);function i(){var e=a.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 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})(Ji);C.registeredClasses.BlurFilter=xg;var Sg=(function(a){T(i,a);function i(){var e=a.call(this)||this;e._list=[],e._currentStep=0,e._startIndex=0,e._currentPass=0,e.baseColor=new be({r:103,g:183,b:220}),e.className="PatternSet";var t=new se;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 i.prototype.getLinePattern=function(e,t,r,n,s){var o=new Js;return o.width=e,o.height=e,o.stroke=this.baseColor,o.gap=n,o.strokeDasharray=s,o.strokeWidth=r,o.rotation=t,o},i.prototype.getRectPattern=function(e,t,r,n){var s=new eo;return s.width=e,s.height=e,s.rectWidth=r,s.rectHeight=r,n?(s.stroke=this.baseColor,s.strokeWidth=1,s.fillOpacity=0):(s.fill=this.baseColor,s.strokeWidth=0),t!=0&&(s.shapeRendering="auto"),s.rotation=t,s},i.prototype.getCirclePattern=function(e,t,r){var n=new ch;return n.width=e,n.height=e,n.shapeRendering="auto",n.radius=t,r?(n.stroke=this.baseColor,n.strokeWidth=1,n.fillOpacity=0):(n.fill=this.baseColor,n.strokeWidth=0),n},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(var t;this.list.length<=e;)this.generatePatterns();return t=this.list[e],t.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){a.prototype.processConfig.call(this,e)},i})(st);C.registeredClasses.PatternSet=Sg;var Fx=(function(){function a(){this._disposed=!1,this._disposers=[]}return a.prototype.init=function(){},a.prototype.isDisposed=function(){return this._disposed},a.prototype.dispose=function(){if(!this._disposed){this._disposed=!0;var i=this._disposers;for(this._disposers=null;i.length!==0;){var e=i.shift();e.dispose()}}},a})();var Cg=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Dx(a){return typeof a=="string"&&Cg.test(a)}var Pg=Dx;function Ax(a){if(!Pg(a))throw TypeError("Invalid UUID");let i;return Uint8Array.of((i=parseInt(a.slice(0,8),16))>>>24,i>>>16&255,i>>>8&255,i&255,(i=parseInt(a.slice(9,13),16))>>>8,i&255,(i=parseInt(a.slice(14,18),16))>>>8,i&255,(i=parseInt(a.slice(19,23),16))>>>8,i&255,(i=parseInt(a.slice(24,36),16))/1099511627776&255,i/4294967296&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255)}var nc=Ax;var fi=[];for(let a=0;a<256;++a)fi.push((a+256).toString(16).slice(1));function $g(a,i=0){return(fi[a[i+0]]+fi[a[i+1]]+fi[a[i+2]]+fi[a[i+3]]+"-"+fi[a[i+4]]+fi[a[i+5]]+"-"+fi[a[i+6]]+fi[a[i+7]]+"-"+fi[a[i+8]]+fi[a[i+9]]+"-"+fi[a[i+10]]+fi[a[i+11]]+fi[a[i+12]]+fi[a[i+13]]+fi[a[i+14]]+fi[a[i+15]]).toLowerCase()}function Vx(a){a=unescape(encodeURIComponent(a));let i=new Uint8Array(a.length);for(let e=0;e<a.length;++e)i[e]=a.charCodeAt(e);return i}var _g="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Tg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function sc(a,i,e,t,r,n){let s=typeof e=="string"?Vx(e):e,o=typeof t=="string"?nc(t):t;if(typeof t=="string"&&(t=nc(t)),t?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+s.length);if(l.set(o),l.set(s,o.length),l=i(l),l[6]=l[6]&15|a,l[8]=l[8]&63|128,r){n=n||0;for(let u=0;u<16;++u)r[n+u]=l[u];return r}return $g(l)}function Lx(a,i,e,t){switch(a){case 0:return i&e^~i&t;case 1:return i^e^t;case 2:return i&e^i&t^e&t;case 3:return i^e^t}}function oc(a,i){return a<<i|a>>>32-i}function kx(a){let i=[1518500249,1859775393,2400959708,3395469782],e=[1732584193,4023233417,2562383102,271733878,3285377520],t=new Uint8Array(a.length+1);t.set(a),t[a.length]=128,a=t;let r=a.length/4+2,n=Math.ceil(r/16),s=new Array(n);for(let o=0;o<n;++o){let l=new Uint32Array(16);for(let u=0;u<16;++u)l[u]=a[o*64+u*4]<<24|a[o*64+u*4+1]<<16|a[o*64+u*4+2]<<8|a[o*64+u*4+3];s[o]=l}s[n-1][14]=(a.length-1)*8/Math.pow(2,32),s[n-1][14]=Math.floor(s[n-1][14]),s[n-1][15]=(a.length-1)*8&4294967295;for(let o=0;o<n;++o){let l=new Uint32Array(80);for(let f=0;f<16;++f)l[f]=s[o][f];for(let f=16;f<80;++f)l[f]=oc(l[f-3]^l[f-8]^l[f-14]^l[f-16],1);let u=e[0],h=e[1],p=e[2],d=e[3],c=e[4];for(let f=0;f<80;++f){let m=Math.floor(f/20),y=oc(u,5)+Lx(m,h,p,d)+c+i[m]+l[f]>>>0;c=d,d=p,p=oc(h,30)>>>0,h=u,u=y}e[0]=e[0]+u>>>0,e[1]=e[1]+h>>>0,e[2]=e[2]+p>>>0,e[3]=e[3]+d>>>0,e[4]=e[4]+c>>>0}return Uint8Array.of(e[0]>>24,e[0]>>16,e[0]>>8,e[0],e[1]>>24,e[1]>>16,e[1]>>8,e[1],e[2]>>24,e[2]>>16,e[2]>>8,e[2],e[3]>>24,e[3]>>16,e[3]>>8,e[3],e[4]>>24,e[4]>>16,e[4]>>8,e[4])}var Og=kx;function lc(a,i,e,t){return sc(80,Og,a,i,e,t)}lc.DNS=_g;lc.URL=Tg;var fh=lc;var Ut={SelectXY:"selectXY",SelectX:"selectX",SelectY:"selectY",ZoomXY:"zoomXY",ZoomX:"zoomX",ZoomY:"zoomY",None:"none"},ar={Top:"top",Bottom:"bottom",Median:"median",Outliers:"outliers"};function Dg(a){let{orderBy:i,axisFormatOptions:e}=a;return i!==void 0&&e!==void 0&&(!Array.isArray(i)||e?.type===A.CategoryAxisFormat)}function Ag(a,i,e){let t=0;if(Array.isArray(e)){let r=a?.toString()??"",n=i?.toString()??"",s=e.indexOf(r),o=e.indexOf(n);s===-1&&(s=e.length),o===-1&&(o=e.length),t=s-o}else e===Fa.Descending?typeof a=="string"&&typeof i=="string"?t=i.localeCompare(a,void 0,{numeric:!0}):t=(Number(i)||0)-(Number(a)||0):e===Fa.Ascending&&(typeof a=="string"&&typeof i=="string"?t=a.localeCompare(i,void 0,{numeric:!0}):t=(Number(a)||0)-(Number(i)||0));return t}function Rx(a){let{arrayToSort:i,chartConfig:e,dataOrderParameters:t}=a,r,n,s=!1,o=!1,l=!1;t&&i.length>1&&([r,n]=t,s=r&&r.sortingField.length>0&&Dg({orderBy:r.orderBy,axisFormatOptions:e.axes?.[0]?.valueFormat}),o=n&&n.sortingField.length>0&&Dg({orderBy:n.orderBy,axisFormatOptions:e.axes?.[1]?.valueFormat}),l=s||o),l&&i.sort((u,h)=>{let p=0;if(s&&r?.sortingField){let d=r.orderBy;p=Ag(u[r.sortingField],h[r.sortingField],d)}if(p===0&&o&&n?.sortingField){let d=n.orderBy;p=Ag(u[n.sortingField],h[n.sortingField],d)}return p})}function xl(a){let{arrayToSort:i,chartConfig:e,fieldList:t,isTimeBinningSeries:r}=a;if(r!==!0&&i[0]!==void 0){let{series:n}=e,s=Ae(n),o=at(n),l=br(e),u=sm(e);if(rs(e)&&i!==void 0)Rx({arrayToSort:i,chartConfig:e,dataOrderParameters:u});else if(u?.[0]!==void 0&&i!==void 0&&i.length>1){let{orderBy:h}=u[0],{sortingField:p}=u[0],d=e.orderOptions?.data?.orderType===gi.Category,c=u[0].preferLabel!==!1,f=s===V.BarAndLineFromFields||s===V.PieFromFields||s===V.BoxPlotMultiFields||s===V.BoxPlotMultiFieldsAndSplitBy,m=f||o===A.PieSeries,y=s===V.PieNoAggregation||s===V.BarAndLineNoAggregation||s===V.BarAndLineSplitByNoAggregation;if(d&&m&&(!c||(o===A.LineSeries||o===A.RadarSeries)&&l===A.NumberAxisFormat)&&(p=R.originalCategoryValue),Array.isArray(h))vf({arrayToSort:i,orderBy:h,sortingField:p,fieldList:t,isByFieldsChart:f,preferLabel:c});else{let v=l===A.DateAxisFormat&&d;yo({arrayToSort:i,orderBy:h,sortingField:p,forceAscendingOrder:v,isNonAggregated:y,sortByCategory:d,preferLabel:c,isPieOrByFieldsChart:m})}}}}function i4(a){let{alteredConfig:i,dataInfo:e,fieldList:t,options:r,queryObject:n}=a,s=Kl(e.data);if(s&&xl({arrayToSort:s,chartConfig:i,fieldList:t,isTimeBinningSeries:da({seriesConfig:un(i),xAxisValueFormatType:br(i),setTimeBinningInfoWhenNotProvided:r?.setTimeBinningInfoWhenNotProvided,queryObject:n})}),Sr(i)){let o=e?.data&&"meanLines"in e.data?e.data.meanLines:void 0;o&&xl({arrayToSort:o,chartConfig:i})}}function r4(a){let{config:i,previousConfig:e,dataUpdateNeededProps:t,updatedProps:r,options:n,filterBySelection:s,previousSelectionOIDs:o,fieldList:l,queryObject:u}=a,h=Array.from(r.keys()).some(d=>{let c=!1;if(t.includes(d)){let{oldValue:f,newValue:m}=r.get(d)??{};c=!oo(f,m)}return c}),p;if(!h&&r.get("layer")){let{oldValue:d,newValue:c}=r.get("layer")??{};h=ln(d)!==ln(c)}if(r.get("layer")&&(p={common:{layerChanged:!0}}),i&&e){let d=am({previousConfig:e,newConfig:i,options:n,previousFilterBySelection:r.has("filterBySelection")?r.get("filterBySelection")?.oldValue:s,previousSelectionOIDs:o,fieldList:l,queryObject:u});p=d.dataUpdateDetails,h=h||d.dataUpdateNeeded}return{dataUpdateNeeded:h,dataUpdateDetails:p}}function Bx(a){return a?.type==="uniqueValue"&&(a.uniqueValueInfos=a.uniqueValueInfos.map(i=>{let e=i.value===null?R.nullValue:i.value;return{...i,value:e}})),a}async function a4(a){let{data:i,queryObject:e,chartConfig:t,allowColorMatch:r}=a,n=!1,s=[];if(r&&!Hr(e)){let{series:o,chartRenderer:l}=t,u=Bx(l),h=u?bo.ChartRenderer:bo.LayerRenderer,p=e?vi(e):void 0,d=u??p?.renderer,c;p&&h===bo.LayerRenderer?s=await pp(p):h===bo.ChartRenderer&&(s=Of(d));let f=Uh(u,p?.renderer),m=$f({chartRenderer:l,queryObject:e}),y=Ae(o),v=un(t),b=si(v.query?.where);c=new Map;for(let x=0;x<i.length;x+=1){let _=i[x],$=await _f({seriesConfig:t.series,dataItem:_,renderer:d,rendererType:f,rendererOrigin:h,chartSubType:y,splitByField:b,graphicTemplate:m,mapAttributesToSymbol:c,rendererFieldNames:s});n=n||$.colorMatchApplied}}return{dataItems:i,colorMatchApplied:n,rendererFieldNames:s}}function jx(a){let{dataContext:i,dataIndex:e,objectIdField:t}=a;return`${Qn.sliceIdPrefix}-${i[t??""]?.toString()??e}`}function Ex(a){let{chartConfig:i,chartData:e,fieldList:t}=a,r=Ae(i.series)===V.PieFromFields;if(i.orderOptions?.data!==void 0||r){xl({arrayToSort:e,chartConfig:i,fieldList:t});let{slices:n}=i.series[0];n!==void 0&&n.sort((s,o)=>{let l=e.findIndex(h=>h[R.pieChart.technicalFieldSliceId]===s.sliceId),u=e.findIndex(h=>h[R.pieChart.technicalFieldSliceId]===o.sliceId);return l-u})}}function n4(a){let{data:i,newChartConfig:e,pieSlicesSymbols:t,fieldList:r}=a,n=e.series[0],s=Ae(e.series)===V.PieFromFields?vr:n.x;i.forEach(o=>{let l=es(o),u=o[R.pieChart.technicalFieldSliceId],h=l?n.sliceGrouping?.label:Hx(t?.slices,u)?.label;Wx({dataContext:o,x:s,newLabel:h})}),Ex({chartConfig:e,chartData:i,fieldList:r})}function Wx(a){let{dataContext:i,newLabel:e,x:t}=a;e===void 0?i[R.originalCategoryValue]!==void 0&&(i[t]=i[R.originalCategoryValue]):i[t]!==e&&(i[R.originalCategoryValue]===void 0&&(i[R.originalCategoryValue]=i[t]),i[t]=e)}function Hx(a,i){let e;return a!==void 0&&i!==void 0&&(e=a.find(t=>t.sliceId===i)),e}function s4(a){let{dataContext:i,isNonAggregatedChart:e,x:t,dataIndex:r,objectIdField:n,isPieFromFields:s}=a,o="";return s===!0?o=i[R.originalCategoryValue]??i[vr]:e?o=jx({dataContext:i,dataIndex:r,objectIdField:n}):(o=i[R.originalCategoryValue],o===void 0||o===""?o=Qn.emptySliceId:o===null&&(o=Qn.nullSliceId),o=o??i[t]),o===void 0&&(o=Qn.undefinedSliceId),o.toString()}function o4(a){let{dataContext:i,sliceFromConfig:e,isGroupOfSlices:t,seriesConfig:r,fieldList:n,isPieFromFields:s,labelUpdateNeeded:o,colorMatch:l,utilsStrings:u}=a,{sliceGrouping:h}=r,{x:p}=r;s&&(p=vr);let d=i[p]??i[R.originalCategoryValue],c=i[R.originalCategoryValue]??d,f=d;return o&&(t?f=h?.label??h?.originalLabel?.toString()??u.pieChart.defaultSliceGroupingLabel:l&&i[R.rendererSymbolField]?.label!==void 0?f=i[R.rendererSymbolField].label:e!==void 0||n!==void 0?(e?.label&&e.label!==e?.sliceId&&(f=e?.label),f===c&&c!==void 0&&c!==null&&(f=kt(n,c))):e===void 0&&(f=c),f===R.nullValue?f="null":f!=null&&(f=f.toString())),f}function l4(a,i){return a?.[0]?.sliceGrouping?.percentageThreshold!==i?.[0]?.sliceGrouping?.percentageThreshold}function Cc(a){let{groupOfSlicesDataContext:i,chartData:e}=a;return(i??e?.find(t=>t[Qn.defaultGroupOfSlicesId]===!0))?.[R.pieChart.technicalFieldGroupedSlices]}function u4(a){let{dataContext:i,pieSlicesSymbols:e,seriesConfig:t}=a,r=t.fillSymbol?{...t.fillSymbol}:Hh();if(es(i))r={...R.pieChart.sliceGrouping.fillSymbol,...e?.groupOfSlices?.fillSymbol};else{let n=i[R.pieChart.technicalFieldSliceId],s=e?.slices?.find(o=>o.sliceId===n);r=pa(s?.fillSymbol??t.fillSymbol??Hh())}return r}var vh=new Map;function yr(a){a!==void 0&&vh.delete(a)}function Wn(a,i){let e=vh.get(a)??{};vh.set(a,{...e,...i})}function Hn(a,i){return vh.get(a)?.[i]}function zx(a,i){return Hn(a,i)}function Xx(a,i){Wn(a,i)}function Yx(a,i){return Hn(a,i)}function qx(a,i){Wn(a,i)}function Z(a,i){return Hn(a,i)}function ir(a,i){Wn(a,i)}function Vi(a,i){return Hn(a,i)}function nn(a,i){Wn(a,i)}function hi(a,i){return Hn(a,i)}function ti(a,i){Wn(a,i)}function Gx(a,i){return Hn(a,i)}function Ux(a,i){Wn(a,i)}function $i(a,i){return Hn(a,i)}function Sl(a,i){Wn(a,i)}var j={...R};async function Kx(a){let i=Xc(`assets/common/t9n/messages.${a}.json`),e=await fetch(i);if(!e.ok)throw new Error(`Failed to load t9n file: ${i}`);return await e.json()}async function h4(a=Gc(document.documentElement).t9nLocale){let i=await import("./H6G4K2SI.js");switch(a){case"ar":i=await import("./C32DLPO2.js");break;case"bs":i=await import("./ZGRLFOVN.js");break;case"bg":i=await import("./2MVU33EQ.js");break;case"ca":i=await import("./K7M5S6GY.js");break;case"cs":i=await import("./W5WI6CWC.js");break;case"da":i=await import("./A2SOXYD7.js");break;case"de":i=await import("./5WSLX3X6.js");break;case"el":i=await import("./INFEECC2.js");break;case"es":i=await import("./ANEY3G3T.js");break;case"et":i=await import("./UJ7GGLFA.js");break;case"fi":i=await import("./577EV2JF.js");break;case"fr":i=await import("./TLSTPQNA.js");break;case"he":i=await import("./XTWWNXCJ.js");break;case"hr":i=await import("./RRDNOR24.js");break;case"hu":i=await import("./SWQ7K4X5.js");break;case"id":i=await import("./FW27X6ZH.js");break;case"it":i=await import("./AGJRXDBI.js");break;case"ja":i=await import("./OLBJGP5C.js");break;case"ko":i=await import("./43SJZXD3.js");break;case"lt":i=await import("./PI6HSSQL.js");break;case"lv":i=await import("./VHOYFIGY.js");break;case"no":i=await import("./X5TUHBXH.js");break;case"nl":i=await import("./KSNCOD3U.js");break;case"pl":i=await import("./BHNYXBUZ.js");break;case"pt-BR":i=await import("./4VMTBYLY.js");break;case"pt-PT":i=await import("./2JPFAFHJ.js");break;case"ro":i=await import("./WQRZ7LGV.js");break;case"ru":i=await import("./RKXV44WI.js");break;case"sr":i=await import("./B3HEXSCX.js");break;case"sk":i=await import("./DF2JGSK4.js");break;case"sv":i=await import("./NXRLNLM4.js");break;case"th":i=await import("./WMSU5OWP.js");break;case"tr":i=await import("./MIVV22F3.js");break;case"uk":i=await import("./GBCL3LR7.js");break;case"vi":i=await import("./YZTAP3PR.js");break;case"zh-CN":i=await import("./PF6HSS3J.js");break;case"zh-HK":i=await import("./Z5L2GNFQ.js");break;case"zh-TW":i=await import("./Z5L2GNFQ.js");break}let e=(await Kx(a)).customAmchartsStrings;return{...i.default,...e}}function tn(a){let{type:i,iLocale:e,formatLocale:t=vp(document.documentElement)}=a,r;switch(i){case A.NumberAxisFormat:{r=new ba,r.language.locale=e,r.intlLocales=t;break}case A.DateAxisFormat:{r=new Ki,r.language!==void 0&&(r.language.locale=e),r.intlLocales=t;break}}return r}function Vg(a){let{axis:i,valueFormat:e,chartType:t}=a,r=fo({isXAxis:!0,chartType:t,valueFormat:e}),n=Da(e)&&i instanceof xe,s=Br(e)&&i instanceof re&&!(i instanceof xe),o=r&&i instanceof we;return!n&&!s&&!o}function Jg(a,i){let e=typeof i=="number"?`${i}`:i,t=hi(a.uid,"numberFormatter");return t!==void 0&&(e=t(i)),Zt(e)&&(e=j.htmlEmptyContent),Wr(e)}function Zx(a){a.renderer.labels.template.html=j.htmlEmptyContent,a.renderer.labels.template.adapter.add("htmlOutput",(i,e)=>Jg(a,e?.dataItem?.value??i),0)}function ev(a){let{axis:i,defaultOutput:e,dataItem:t}=a,r=e,n=hi(i.uid,"categoryFormatter"),s=hi(i.uid,"numberFormatter");if((s!==void 0||n!==void 0)&&t instanceof oa){let o=Z(i.chart.uid,"config"),l=Ae(o?.series),u=Z(i.chart.uid,"rendererFieldNames"),h=xr({value:t.category,dataContext:t.dataContext,useRendererLabel:Kh(o,u),specificField:tp(l,o?.series?.[0]),config:o});if(typeof h=="number"&&s!==void 0)r=s(h);else if(n!==void 0){if([V.BoxPlotMonoField,V.BoxPlotMultiFields,V.BoxPlotMonoFieldAndSplitBy,V.BoxPlotMultiFieldsAndSplitBy,V.BarAndLineFromFields].includes(l)&&typeof h=="string"){let d=Z(i.chart.uid,"fieldList");h=kt(d,h)}let p=ts(t.dataContext);p===void 0&&(p=h),r=n(h,p)}}return Zt(r)&&(r=j.htmlEmptyContent),Wr(r)}function Qx(a){a.renderer.labels.template.html=j.htmlEmptyContent,a.renderer.labels.template.adapter.add("htmlOutput",(i,e)=>ev({axis:a,defaultOutput:i,dataItem:e?.dataItem}),0)}function Jx(a){let{axis:i,defaultOutput:e,dataItem:t}=a,r=e,n=hi(i.uid,"dateFormatter");return n!==void 0&&t instanceof Ua&&(r=n(t.value??e)),Zt(r)&&(r=j.htmlEmptyContent),Wr(r)}function e0(a){a.renderer.labels.template.adapter.add("htmlOutput",(i,e)=>Jx({axis:a,dataItem:e?.dataItem,defaultOutput:i}),0),a.renderer.labels.template.adapter.disableKey("htmlOutput")}function t0(a){a.renderer.labels.template.adapter.add("htmlOutput",i=>{let e=i,t=hi(a.uid,"fontStyleCallback");return t!==void 0&&(e=t(e)),Wr(e)},1)}function i0(a){a instanceof re&&!(a instanceof xe)?Zx(a):a instanceof we?Qx(a):a instanceof xe&&e0(a),t0(a)}function r0(a){let{axis:i,formatOptions:e,dateAxisFormatter:t,isTimeOnlyField:r}=a;if(ti(i.uid,{dateFormatter:t}),t===void 0){i.renderer.labels.template.adapter.isEnabled("htmlOutput")&&(i.renderer.labels.template.adapter.disableKey("htmlOutput"),i.renderer.labels.each(o=>{o.element instanceof Go&&o.element.removeChildren()}));let n={hour:r?"numeric":void 0,minute:r?"numeric":void 0,...po(e)},s=["year","month","day","hour","minute","second"];i.timezone!==n.timeZone&&(i.setPropertyValue("timezone",n.timeZone),i.chart.validateData()),i.dateFormatter.timezone=n.timeZone,delete n.timeZone;for(let o=0;o<s.length;o+=1){let l=s[o],u=o===0?l:s[o-1],h=e?.formatPerDateTimeUnit?.[l]??n,p=e?.formatPerDateTimeUnit?.[u];wa(h)||(i.dateFormats.setKey(l,h),i.periodChangeDateFormats.setKey(l,p??h))}i.dateFormats.getKey("day")||i.dateFormats.setKey("day",j.dayDefaultFormat),i.periodChangeDateFormats.getKey("day")||i.periodChangeDateFormats.setKey("day",j.dayDefaultFormat),i.dateFormats.getKey("week")||i.dateFormats.setKey("week",i.dateFormats.getKey("day")??j.weekDefaultFormat),i.periodChangeDateFormats.getKey("week")||i.periodChangeDateFormats.setKey("week",i.periodChangeDateFormats.getKey("day")??j.weekDefaultFormat),i.invalidateLabels()}else i.renderer.labels.template.html=j.htmlEmptyContent,i.renderer.labels.template.adapter.enableKey("htmlOutput")}function a0(a,i,e,t){let r=tn({type:A.NumberAxisFormat,iLocale:i,formatLocale:e});return r.numberFormat=a,n=>{let s=0;return n instanceof Date?n.toLocaleString(void 0,a):(s=typeof n!="string"?n??0:cm(n,r.intlLocales),t===!0&&a.style==="percent"&&(s/=100),r.format(s))}}function Lg(a){let{axis:i,formatOptions:e,overridePercentMultiplication:t,valueAxisFormatter:r}=a,n=po(e),s=Z(i.chart.uid,"formatLocale");ti(i.uid,{numberFormatter:r??a0(n,i.chart.language.locale,s,t)})}function n0(a){let{axis:i,formatOptions:e,categoryAxisFormatter:t}=a,r=t!==void 0?t:Cf(e.characterLimit);ti(i.uid,{categoryFormatter:r})}function s0(a){let{axis:i,labelsTextSymbol:e,axisValueFormatter:t}=a,r=Z(i.chart.uid,"config")?.horizontalAxisLabelsBehavior;if(ti(i.uid,{axisLabelsBehavior:r}),t!==void 0)ti(i.uid,{fontStyleCallback:void 0});else if(hi(i.uid,"fontStyleCallback")===void 0){let n=s=>{let o=hi(i.uid,"axisLabelsBehavior");return vo({textSymbol:e,placeholderString:s,format:"html",axisLabelsBehavior:o,defaults:{maxWidth:i.renderer.labels.template.maxWidth}})};ti(i.uid,{fontStyleCallback:n})}}function o0(a){let{axis:i,isXAxis:e,formatOptions:t,labelsTextSymbol:r,overridePercentMultiplication:n,chartType:s,axisValueFormatter:o,isTimeOnlyField:l,errorStrings:u}=a,h=fo({isXAxis:e,chartType:s,valueFormat:t}),p=!1;!(i instanceof xe)&&Br(t)?Lg({axis:i,formatOptions:t,overridePercentMultiplication:n,valueAxisFormatter:o}):i instanceof xe&&Da(t)?r0({axis:i,formatOptions:t,dateAxisFormatter:o,isTimeOnlyField:l}):i instanceof we?co(t)||h?(n0({axis:i,formatOptions:t,categoryAxisFormatter:o}),ti(i.uid,{numberFormatter:void 0})):Br(t)?(Lg({axis:i,formatOptions:t,overridePercentMultiplication:n,valueAxisFormatter:o}),ti(i.uid,{categoryFormatter:void 0})):p=!0:p=!0,p&&Kc("mismatchAxisAndValueFormat",u),s0({axis:i,labelsTextSymbol:r,axisValueFormatter:o}),i.invalidateLabels()}function l0(a){let i=a;return a>=1?i=10**(a.toFixed(0).length-1):a<1&&a>0&&(i=10**-Math.abs(Math.floor(Math.log10(a)))),i}function u0(a){let{minimumFromConfig:i,maximumFromConfig:e,isLogarithmic:t}=a,r=t===!0&&i!==null&&i!==void 0&&i<=0,n=!Number.isFinite(i)||!Number.isFinite(e);return r||n}var h0="arcgis-charts-randomization-seed";fh(h0,fh.URL);var rr={XAxisTitle:"XAxisTitle",YAxisTitle:"YAxisTitle",ChartTitle:"ChartTitle",ChartSubTitle:"ChartSubTitle",ChartFooter:"ChartFooter",GuideLabel:"GuideLabel",LegendTitle:"LegendTitle"},le={Ready:"ready",Hidden:"hidden",Shown:"shown",Hit:"hit",DoubleHit:"doublehit",Up:"up",SelectEnded:"selectended",Over:"over",Out:"out",SizeChanged:"sizechanged",VisibilityChanged:"visibilitychanged",PositionChanged:"positionchanged",Validated:"validated",DataItemsValidated:"dataitemsvalidated",Inited:"inited",ChildAdded:"childadded",DataRangeChanged:"datarangechanged",LayoutValidated:"layoutvalidated"};function p0(a){let{actionMode:i,cursorRange:e,isRotated:t}=a,r=Ut.None;switch(e){case El.MultiAxes:i===Lt.MultiSelectionWithCtrlKey||i===Lt.MultiSelection?r=Ut.SelectXY:i===Lt.Zoom&&(r=Ut.ZoomXY);break;case El.XAxis:i===Lt.MultiSelectionWithCtrlKey||i===Lt.MultiSelection?r=t===!0?Ut.SelectY:Ut.SelectX:i===Lt.Zoom&&(r=t===!0?Ut.ZoomY:Ut.ZoomX);break;case El.YAxis:i===Lt.MultiSelectionWithCtrlKey||i===Lt.MultiSelection?r=t===!0?Ut.SelectX:Ut.SelectY:i===Lt.Zoom&&(r=t===!0?Ut.ZoomX:Ut.ZoomY);break}return r}function dt(a,i){i===!1&&!a.isHiding?(a.visible=!1,a.hide()):a.isShowing||(a.visible=!0,a.show())}function p4(a,i){for(let e=0;e<i.length;e+=1){let t=i[e][0],r=i[e][1],n=a.length;t>=0&&t<n&&r>=0&&r<n&&a.swap(i[e][0],i[e][1])}}function tv(a,i){let e;if(a!==void 0&&"rgb"in a&&a.rgb!==void 0){let t=a.rgb;if(t!==void 0){let{r,g:n,b:s}=t;e=[r,n,s,255]}}return e}function Cl(a){let i=a??[0,0,0,255];return new be({a:i[3]/255,b:i[2],g:i[1],r:i[0]})}function Rt(a){return a.bullets.values.find(i=>Gx(i.uid,"isBulletMarker"))}function Oa(a){return a!=null&&!a.isDisposed()}function bh(a){return(a.isShowing||a.visible)&&!a.isHidden&&!a.isHiding&&!a.disabled&&!a.__disabled}function iv(a,i){return a.pixelX<0||a.pixelX>i?.plotContainer?.measuredWidth||a.pixelY<0||a.pixelY>i?.plotContainer?.measuredHeight}function d0(a){let i;return a.baseSprite instanceof rt||a.baseSprite instanceof Vt?i=a.baseSprite:(a instanceof Ya||a instanceof Xs)&&(i=a.axis.chart),i}function c0(a){return tv(a.background.fill)}function f0(a){let{fill:i,rotation:e,isLinePattern:t,chartBackgroundColor:r}=a,n;return t!==!1?(n=new Js,n.width=j.patternLineProperties.width??Number.NaN,n.height=j.patternLineProperties.height??Number.NaN,n.strokeWidth=j.patternLineProperties.strokeWidth??Number.NaN,n.stroke=i,n.rotation=e??Number.NaN):(n=new eo,n.rectWidth=j.patternRectProperties.rectWidth??Number.NaN,n.rectHeight=j.patternRectProperties.rectHeight??Number.NaN,n.width=j.patternRectProperties.width??Number.NaN,n.height=j.patternRectProperties.height??Number.NaN,n.fillOpacity=j.patternRectProperties.fillOpacity??Number.NaN,n.strokeWidth=j.patternRectProperties.strokeWidth??Number.NaN,n.fill=Cl(r),n.stroke=i,n.rotation=e??Number.NaN),n}function kg(a){let i=Number.NaN;if(typeof a=="number")i=a;else if(a.includes("%")){let e=Number.parseFloat(a.trim().replace("%","").trim());Number.isFinite(e)&&(i=N(e))}return i}function m0(a){let{fill:i,style:e,chartBackgroundColor:t}=a,r,n,s=!0;switch(e){case Rr.Horizontal:{n=0;break}case Rr.Vertical:{n=90;break}case Rr.ForwardDiagonal:{n=45;break}case Rr.BackwardDiagonal:{n=135;break}case Rr.Cross:{n=0,s=!1;break}case Rr.DiagonalCross:{n=135,s=!1;break}case Rr.Solid:}return n!==void 0&&(r=f0({fill:i,rotation:n,isLinePattern:s,chartBackgroundColor:t})),r}function Mr(a,i){let e;i!==void 0&&(e=Cl(i));let t=e??new be({r:0,g:0,b:0,a:0});if(a!=null){let[r,n,s,o]=a;t=new be({r,g:n,b:s,a:o/255})}return t}function rv(a,i=0){return(a??i)%360}function y0(a,i){return i!==!0||a?.includes("Dot")===!0?"round":"square"}function av(a,i){let e="none";switch(a??i){case ai.Justify:case ai.Center:e="center";break;case ai.Left:e="left";break;case ai.Right:e="right";break}return e}function Pc(a,i){let e="middle";switch(a??i){case ai.Right:e="left";break;case ai.Left:e="right";break;case ai.Center:case ai.Justify:}return e}function g0(a,i){let e="none";switch(a??i){case Yi.Baseline:case Yi.Middle:e="middle";break;case Yi.Top:e="top";break;case Yi.Bottom:e="bottom";break}return e}function nv(a,i){let e=Yi.Middle;switch(a??i){case Yi.Top:e="bottom";break;case Yi.Bottom:e="top";break;case Yi.Baseline:case Yi.Middle:default:e="middle";break}return e}function v0(a,i){let e=a??Nr.Solid,t=i??j.lineWidth,r={[Nr.Solid]:"none",[Nr.Dot]:[1,t],[Nr.DashDotDot]:[4*t,t,1,t,1,t],[Nr.Dash]:[4*t,3*t],[Nr.DashDot]:[4*t,3*t,1,3*t],[Nr.Null]:"none"};return(r[e]??r[Nr.Null]).toString()}function sv(a,i){let e={stroke:Mr(),strokeWidth:j.lineWidth,strokeDasharray:"",strokeLinecap:i!==!0?"round":"square",strokeOpacity:Rh};return a!=null&&(e.stroke=Mr(a.color),e.strokeOpacity=1,a.width!==void 0&&(e.strokeWidth=a.width),a.style!==void 0&&a.style!==Nr.Null&&(e.strokeDasharray=v0(a.style,e.strokeWidth),e.strokeLinecap=y0(a.style,i))),e}function ov(a,i){let e=a,[t,r,n,s]=a?.color??i??j.color,o=[t,r,n,s];return e==null?e={type:ni.SLS,color:o}:e.color===void 0&&(e.color=o),sv(e,!1)}function b0(a,i){let{color:e,outline:t,style:r}=a,n=Mr(e);return{pattern:m0({fill:n,style:r,chartBackgroundColor:i}),fill:n,outline:ov(t,e)}}function x0(a){let{color:i,outline:e,xoffset:t,yoffset:r,style:n,size:s,angle:o}=a,l=n!==void 0?yf(n,s):"",u=rv(o);return{path:l,fill:Mr(i),outline:ov(e,i),xOffset:t??0,yOffset:r??0,angle:u}}function $c(a){let{symbol:i,defaultToColorFromRamp:e,colorRampIndex:t,isChartFillSymbol:r=!1,chartBackgroundColor:n}=a,s;if(e===!0){let o=r?Jc:Rh;if(i.color=i.color??jh({colorIndex:t,opacity:o}),bp(i)||xp(i)){let{outline:l}=i;l!==void 0&&(l.color=l?.color??jh({colorIndex:t}),i.outline={...l})}}return fm(i)?s=sv(i,!0):xp(i)?(i.style??=j.lineSeries.marker.markerStyle,i.size??=j.lineSeries.marker.markerBigSize,s=x0(i)):bp(i)&&(s=b0(i,n)),s}function xh(a,i,e){let t=Pc(a.horizontalAlignment,e?.horizontalCenter),r=av(a.horizontalAlignment,e?.align),n=nv(a.verticalAlignment,e?.verticalCenter),s=g0(a.verticalAlignment,e?.valign);return{fill:Mr(a.color,j.color),fontFamily:a.font?.family??"Arial, Helvetica, sans-serif",fontSize:a.font?.size??j.generalFontSize,fontWeight:a.font?.weight??"400",textDecoration:a.font?.decoration??"none",align:r,valign:s,verticalCenter:n,horizontalCenter:t,text:vo({textSymbol:a,format:"amChartsV4"}),angle:rv(a.angle,e?.rotation),xOffset:a.xoffset??e?.dx??0,yOffset:a.yoffset??e?.dy??0,backgroundFill:Mr(a.backgroundColor),borderFill:Mr(a.borderLineColor),borderWidth:a.borderLineSize??1,haloSize:a.haloSize??-1,haloColor:Mr(a.haloColor),rtl:a.rightToLeft??i,wrap:e?.wrap??!1,maxWidth:e?.maxWidth??Number.NaN}}function lv(a,i,e){e!==void 0&&a.tooltip!==void 0&&(a.tooltip.getFillFromObject=!1,a.tooltip.background.fill=i),a.fill=e??i,a.fillOpacity=ie(a.fill.toString()).alpha===0?0:1}function to(a,i){a.stroke=i.stroke,a.strokeOpacity=i.stroke.alpha===0?0:1,a.strokeDasharray=i.strokeDasharray,a.strokeLinecap=i.strokeLinecap,a.strokeWidth=i.strokeWidth}function Sh(a){let{element:i,markerSymbol:e,visible:t,defaultToColorFromRamp:r,colorRampIndex:n}=a,s;return e!==void 0?(s=$c({symbol:e,defaultToColorFromRamp:r,colorRampIndex:n}),s!==void 0&&(i.path=s.path,i.rotation=s.angle,i.dx=s.xOffset,i.dy=s.yOffset,lv(i,s.fill),to(i,s.outline)),dt(i,t),i.disabled=t===!1):i.disabled=!0,s}function io(a){let{element:i,lineSymbol:e,visible:t,defaultToColorFromRamp:r,colorRampIndex:n}=a,s;return e!==void 0?(s=$c({symbol:e,defaultToColorFromRamp:r,colorRampIndex:n}),s!==void 0&&to(i,s),dt(i,t)):dt(i,!1),s}function cc(a){let{element:i,fillSymbol:e,visible:t,defaultToColorFromRamp:r,colorRampIndex:n,isChartFillSymbol:s}=a,o,l;if(e!==void 0){if(e.style===Rr.Cross||e.style===Rr.DiagonalCross){let u=d0(i);u!==void 0&&(l=c0(u))}o=$c({symbol:e,defaultToColorFromRamp:r,colorRampIndex:n,isChartFillSymbol:s,chartBackgroundColor:l}),o!==void 0&&(lv(i,o.fill,o.pattern),to(i,o.outline)),i.disabled=t===!1}else i.disabled=!0;return o}function Ch(a){let{element:i,seriesIndex:e,colorMatch:t,seriesSymbol:r,isChartFillSymbol:n,rendererSymbol:s,seriesConfig:o}=a,l,u;t===!0&&s&&(l=Tf({rendererSymbol:s,seriesSymbol:r,colorIndex:e}));let h={element:i,defaultToColorFromRamp:!0,colorRampIndex:e,seriesConfig:o},p=l??{...r};switch(r.type){case ni.SLS:u=io({...h,lineSymbol:p});break;case ni.SFS:u=cc({...h,fillSymbol:p,isChartFillSymbol:n});break;case ni.SMS:u=Sh({...h,markerSymbol:p});break}return{symbolWithColorInfo:p,stylingInfo:u}}function Ig(a,i){if(i!==void 0){let e=a.properties,{elementColor:t,elementOutlineColor:r,elementOutlineWidth:n,rotation:s,transformation:o}=i,{opacity:l,scale:u}=o??{};t!==void 0&&(e.fill=Cl(t),e.fillOpacity=ie(e.fill.toString()).alpha===0?0:1),r!==void 0&&(e.stroke=Cl(r)),n!==void 0&&(e.strokeWidth=n),s!==void 0&&(e.rotation=s),u!==void 0&&(e.scale=u),l!==void 0&&(e.fillOpacity=(e.fillOpacity??1)*l,e.strokeOpacity=(e.strokeOpacity??1)*l)}}function S0(a,i){let e=j.cursorCrosshair.style,t={type:ni.SLS,style:i.style??e.style,color:i.color??e.color,width:i.width??e.width};io({element:a.cursor.lineX,lineSymbol:t}),io({element:a.cursor.lineY,lineSymbol:t})}function C0(a){!(a instanceof Ir)&&!(a instanceof Vt)&&(a.cursor=new Rn)}function d4(a,i){if(!(a instanceof Ir)&&!(a instanceof Vt)){let e=a,t=e.cursor??new Rn;i?.style!==void 0&&S0(e,i.style);let r=j.cursorCrosshair;t.lineX.disabled=r.verticalLineVisible?i?.verticalLineVisible===!1:i?.verticalLineVisible!==!0,t.lineY.disabled=r.horizontalLineVisible?i?.horizontalLineVisible===!1:i?.horizontalLineVisible!==!0,e.cursor=t}}function c4(a){return!(a instanceof Ir)&&a.cursor===void 0&&C0(a),a.cursor}function fc(a,i){let e=a.renderer.labels.template;e.events.hasListenersByType(le.Hit)&&(e.cursorOverStyle=i),a.renderer.labels.each(t=>{t.cursorOverStyle=i})}function P0(a){let{chart:i,chartType:e,showMean:t,enabled:r}=a,n=r?We.pointer:We.default;switch(e){case A.ComboLineAndBarSeries:case A.BarSeries:case A.PieSeries:i.series.each(s=>{(s instanceof pt||s instanceof ci)&&(s.cursorOverStyle=n)});break;case A.BoxPlotSeries:i.series.each(s=>{let o=n;if(s instanceof ut){let l=Rt(s);l!==void 0&&(t&&Vi(s.uid,"isBoxPlotOutliersSeries")&&(o=We.default),l.cursorOverStyle=o,l.clones.each(u=>{u.cursorOverStyle=o}))}else s.cursorOverStyle=t?We.default:n});break;case A.LineSeries:i.series.each(s=>{if(s instanceof ut){let o=Rt(s);o!==void 0&&(o.cursorOverStyle=n,o.clones.each(l=>{l.cursorOverStyle=n}))}});break}}function f4(a){let{chart:i,actionMode:e,cursorRange:t}=a,r=Z(i.uid,"isRotated"),n=Z(i.uid,"config"),s=qi(n),o=at(n?.series),l=o===A.LineSeries&&Br(n?.axes?.[0]?.valueFormat),u=o===A.LineSeries&&co(n?.axes?.[0]?.valueFormat),h=o===A.LineSeries&&Da(n?.axes?.[0]?.valueFormat),p,d=!1,c=e??Z(i.uid,"actionMode")??j.actionMode;if(Z(i.uid,"filterBySelection")===!0)p=Ut.None,d=!1;else if(t!==void 0)p=p0({actionMode:c,cursorRange:t,isRotated:r});else switch(c){case Lt.Zoom:l||h?p=Ut.ZoomXY:p=r===!0?Ut.ZoomY:Ut.ZoomX,d=!1;break;case Lt.MultiSelection:case Lt.MultiSelectionWithCtrlKey:u?p=r===!0?Ut.SelectY:Ut.SelectX:p=Ut.SelectXY,d=!0;break;case Lt.MonoSelection:p=Ut.None,d=!0;break;case Lt.None:p=Ut.None,d=!1;break}i instanceof rt&&i.cursor!==void 0&&p!==void 0&&(i.cursor.behavior=p),P0({chart:i,chartType:o,enabled:d,showMean:s})}function uv(a){let i="";return a instanceof Nt?i=a.dataFields?.categoryX??a.dataFields?.dateX??a.dataFields?.valueX??"":a instanceof ci&&(i=a.dataFields?.category??""),i}function hv(a){let i="";return a instanceof Nt?i=a.dataFields?.categoryY??a.dataFields?.dateY??a.dataFields?.valueY??"":a instanceof ci&&(i=a.dataFields?.value??""),i}function $0(a){return Z(a.chart.uid,"isRotated")===!0?hv(a):uv(a)}function zn(a){return Z(a.chart.uid,"isRotated")===!0?uv(a):hv(a)}function wh(a,i=0){let e=Z(a.chart.uid,"config");return at(e?.series,i)}function Ph(a){let{dataInfo:i,chartType:e,subError:t}=a;switch(i.valid=!1,e){case A.BarSeries:case A.ComboLineAndBarSeries:i.invalidType=Je.BarElementExceedsLimit;break;case A.LineSeries:i.invalidType=Je.LineChartExceedsLimit;break;case A.PieSeries:i.invalidType=Je.PieChartExceedsLimit;break;case A.GaugeSeries:i.invalidType=Je.GaugeExceedsLimit;break;case A.BoxPlotSeries:t?.outlierLimit===!0?i.invalidType=Je.BoxPlotOutliersExceedsLimit:i.invalidType=Je.BoxPlotExceedsLimit;break;case A.HeatSeries:i.invalidType=Je.HeatChartExceedsLimit;break}}function _0(a,i){a.valid=!1,a.invalidType=i}function m4(a){let{invalidType:i,chartLimits:e,elementCount:t,seriesCount:r,queryObject:n,filterBySelection:s,formatLocale:o=vp(document.documentElement),isTemporalChart:l,errorStrings:u}=a,h=u.errors.defaultInvalidChart,p,d=new Intl.NumberFormat(o),c=mo(e),{maxCategoryCount:f}=c,m=u.modalHeaders.invalidChart;switch(i){case Je.BarElementExceedsLimit:{m=u.modalHeaders.tooManyFeatures;let y=Number.NaN,v=Number.NaN,b="";r!==void 0&&(r<=c.maxBarChartSeriesCount?r===1?(b=u.errors.uniqueSeriesBarCountCannotExceedLimit,y=c.maxBarUniqueSeriesCountTotal):r===2?(b=u.errors.twoSeriesBarCountCannotExceedLimit,y=c.maxBarTwoSeriesCountTotal,v=c.maxBarTwoSeriesCountPerSeries):r>2&&(b=u.errors.threePlusSeriesBarCountCannotExceedLimit,y=c.maxBarThreePlusSeriesCountTotal,v=c.maxBarThreePlusSeriesCountPerSeries):(b=u.errors.barSeriesCountCannotExceedLimit,v=c.maxBarChartSeriesCount));let x=d.format(y),_=d.format(v),$=t!==void 0?d.format(t):"";h=Kt(b,{totalLimit:x,seriesLimit:_,elementCount:$}),p={actualCount:t??Number.NaN,totalLimit:y,seriesLimit:v};break}case Je.LineChartExceedsLimit:{m=u.modalHeaders.tooManyFeatures;let y=Number.NaN,v=Number.NaN,b="";r!==void 0&&(r<=c.maxLineChartSeriesCount?r===1?(b=l?u.errors.uniqueTemporalSeriesLineCountCannotExceedLimit:u.errors.uniqueSeriesLineCountCannotExceedLimit,y=c.maxLineUniqueSeriesCountTotal):r===2?(b=l?u.errors.twoTemporalSeriesLineCountCannotExceedLimit:u.errors.twoSeriesLineCountCannotExceedLimit,y=c.maxLineTwoSeriesCountTotal,v=c.maxLineTwoSeriesCountPerSeries):r>2&&(b=l?u.errors.threePlusTemporalSeriesLineCountCannotExceedLimit:u.errors.threePlusSeriesLineCountCannotExceedLimit,y=c.maxLineThreePlusSeriesCountTotal,v=c.maxLineThreePlusSeriesCountPerSeries):(b=u.errors.lineSeriesCountCannotExceedLimit,v=c.maxLineChartSeriesCount));let x=d.format(y),_=d.format(v),$=t!==void 0?d.format(t):"";h=Kt(b,{elementCount:$,seriesLimit:_,totalLimit:x}),p={actualCount:t??Number.NaN,totalLimit:y,seriesLimit:v}}break;case Je.BoxPlotExceedsLimit:{m=u.modalHeaders.tooManyFeatures;let y=Number.NaN,v=Number.NaN,b="";r!==void 0&&(r<=c.maxBoxPlotSeriesCount?r===1?(b=u.errors.uniqueSeriesBoxCountCannotExceedLimit,y=c.maxBoxUniqueSeriesCountTotal):r===2?(b=u.errors.twoSeriesBoxCountCannotExceedLimit,y=c.maxBoxTwoSeriesCountTotal,v=c.maxBoxTwoSeriesCountPerSeries):r>2&&(b=u.errors.threePlusBoxLineCountCannotExceedLimit,y=c.maxBoxThreePlusSeriesCountTotal,v=c.maxBoxThreePlusSeriesCountPerSeries):(b=u.errors.boxSeriesCountCannotExceedLimit,v=c.maxBoxPlotSeriesCount));let x=d.format(y),_=d.format(v),$=t!==void 0?d.format(t):"";h=Kt(b,{elementCount:$,seriesLimit:_,totalLimit:x}),p={actualCount:t??Number.NaN,totalLimit:y,seriesLimit:v}}break;case Je.BoxPlotOutliersExceedsLimit:{m=u.modalHeaders.tooManyFeatures;let y=u.errors.boxSeriesOutlierCannotExceedLimit,v=c.maxBoxPlotOutlierLimit,b=d.format(v);h=Kt(y,{totalLimit:b}),p={actualCount:t??Number.NaN,totalLimit:v}}break;case Je.HeatChartExceedsLimit:{m=u.modalHeaders.tooManyFeatures;let y=u.errors.heatChartCannotExceedLimit,v=c.maxHeatChartCellLimit,b=d.format(v),x=t!==void 0?d.format(t):"";h=Kt(y,{featureCount:x,totalLimit:b}),p={actualCount:t??Number.NaN,totalLimit:v}}break;case Je.PieChartExceedsLimit:{m=u.modalHeaders.tooManyFeatures;let y=u.errors.pieChartSlicesCannotExceedLimit,v=c.maxPieChartSliceCountTotal,b=d.format(v),x=t!==void 0?d.format(t):"";h=Kt(y,{sliceCount:x,totalLimit:b}),p={actualCount:t??Number.NaN,totalLimit:v}}break;case Je.GaugeExceedsLimit:{m=u.modalHeaders.tooManyFeatures;let y=u.errors.gaugeCannotExceedLimit,v=c.maxGaugeByFeaturesLimit,b=d.format(v),x=t!==void 0?d.format(t):"";h=Kt(y,{featureCount:x,totalLimit:b}),p={actualCount:t??Number.NaN,totalLimit:v}}break;case Je.PieChartMixOfNegativePositiveSlices:m=u.modalHeaders.cannotCombineNegativeAndPositiveSlices,h=u.errors.pieChartCannotHaveMixtureOfPositiveAndNegativeSlices;break;case Je.NegativeValueInSqrtCalculation:m=u.modalHeaders.invalidData,h=u.errors.negativeValueInDataForSqrtTransformation;break;case Je.NegativeValueInLogCalculation:m=u.modalHeaders.invalidData,h=u.errors.negativeValueInDataForLogTransformation;break;case Je.HistogramEmptyField:s===!0?(m=u.modalHeaders.noDataAvailable,h=u.errors.noDataFBSMessage):ln(n)?(m=u.modalHeaders.noDataAvailable,h=u.errors.noDataFBEMessage):(m=u.modalHeaders.invalidChart,h=u.errors.histogramEmptyField);break;case Je.EmptyDataSet:m=u.modalHeaders.noDataAvailable,s===!0?h=u.errors.noDataFBSMessage:ln(n)?h=u.errors.noDataFBEMessage:h=u.errors.noDataMessage;break;case Je.NegativeValueInXAxisLogScale:h=u.errors.logarithmicXAxisNotPossible;break;case Je.NegativeValueInYAxisLogScale:h=u.errors.logarithmicYAxisNotPossible;break;case Je.BadData:}if(h===u.errors.defaultInvalidChart&&(i===Je.BarElementExceedsLimit||i===Je.LineChartExceedsLimit||i===Je.HeatChartExceedsLimit||i===Je.PieChartExceedsLimit||i===Je.GaugeExceedsLimit||i===Je.BoxPlotExceedsLimit)&&typeof t=="number"&&typeof r=="number"&&t/r>f){let y=t/r;h=Kt(u.errors.categoryCountCannotExceedLimit,{categoryCount:d.format(y),maxCategoryCount:d.format(f)})}return{keyword:i??Je.BadData,header:m,message:h,params:p}}function ro(a,i){return`${i}_${a}`}function mc(a){let{value:i,mean:e,stdDev:t}=a;return(i-e)/t}function _c(a){let{dataItem:i,chartSubType:e,y:t,splitByValue:r,meanPerField:n,stdDevPerField:s}=a,o=i,l={chartSubType:e,y:t,splitByValue:r},u=He({...l,key:me.Average}),h=He({...l,key:me.StandardDeviation}),p=n??Number(i[u]),d=s??Number(i[h]);return Number.isFinite(p)&&Number.isFinite(d)&&Object.values(me).forEach(c=>{let f=He({key:c,y:t,chartSubType:e,splitByValue:r}),m=i[f];if(m!=null){let y=Number(m);if(Number.isFinite(y)){l={...l,key:c,showOutliers:!1,standardizeValues:!0};let v=He(l);if(o[v]=mc({mean:p,stdDev:d,value:y}),c===me.Min||c===me.Max){l={...l,key:c,showOutliers:!0,standardizeValues:!0},v=He(l),l={...l,standardizeValues:!1,splitByValue:r};let b=He(l);y=Number(i[b]),Number.isFinite(y)&&(o[v]=mc({mean:p,stdDev:d,value:y}))}}}}),o}function T0(a){let{data:i,yList:e,calculateZScore:t=!1}=a,r=i[0],n=new Map;return e.forEach(s=>{let o={};Object.keys(r).forEach(l=>{l.startsWith(s)?o[l.replace(`${s}_`,"")]=r[l]:l.includes(R.rendererSymbolField)&&(o[l]=r[l]),o[R.boxPlot.boxPlotCategory]=s,t&&(o=_c({dataItem:o,chartSubType:V.BoxPlotMultiFields}))}),n.set(s,o)}),Array.from(n.values())}function O0(a){let{data:i,splitByField:e,y:t}=a,r={[R.boxPlot.boxPlotCategory]:t};return i.forEach(n=>{let s=n[e];s!==void 0&&Object.keys(n).forEach(o=>{o===R.rendererSymbolField?r[`${o}_${s?.toString()}`]=n[o]:o===R.boxPlot.boxPlotMeanLineMarkerId?r[o]=n[o]:r[`${s?.toString()}_${o}`]=n[o]})}),[r]}function w0(a){let{splitByField:i,data:e,yList:t,calculateZScore:r=!1,meanAndStdDevPerField:n}=a,s=new Map;return e.forEach(o=>{let l=o[i];t.forEach(u=>{let h={[R.boxPlot.boxPlotCategory]:u};Object.entries(o).forEach(([p,d])=>{p.startsWith(`${u}_`)?h[`${l}_${p.replace(`${u}_`,"")}`]=d:p.includes(R.rendererSymbolField)?h[`${p}_${l}`]=d:p===R.boxPlot.boxPlotMeanLineMarkerId&&(h[p]=o[p])}),r&&(h=_c({dataItem:h,chartSubType:V.BoxPlotMultiFieldsAndSplitBy,splitByValue:l,meanPerField:n?.[ro(u,J.Average)],stdDevPerField:n?.[ro(u,J.StandardDeviation)]})),s.set(u,{...s.get(u)??{},...h})})}),Array.from(s.values())}function F0(a){let{data:i,yList:e,calculateZScore:t=!1,meanAndStdDevPerField:r}=a,n=i;return t&&n.forEach(s=>{e.forEach(o=>{_c({dataItem:s,chartSubType:V.BoxPlotMultiFieldsAndCategory,y:o,meanPerField:r?.[ro(o,J.Average)],stdDevPerField:r?.[ro(o,J.StandardDeviation)]})})}),n}function D0(a){let{splitByField:i,x:e,data:t}=a,r=new Map;return t.forEach(n=>{let s=n[e],o={[e]:s},l=n[i];Object.entries(n).forEach(([u,h])=>{if(u.includes(R.rendererSymbolField))o[`${R.rendererSymbolField}_${l?.toString()}`]=h;else if(u===R.boxPlot.boxPlotMeanLineMarkerId)o[u]=n[u];else if(u!==i&&u!==e){let p=u!==R.xAxisField&&u!==R.originalCategoryValue?`${l?.toString()}_${u}`:u;o[p]=h}}),r.set(s,{...r.get(s)??{},...o})}),Array.from(r.values())}function A0(a,i){let{series:e}=a,t=e[0],{y:r}=t,n=Ae(a.series),s={y:n===V.BoxPlotMultiFieldsAndCategory?r:void 0,chartSubType:n},o=a.series.map(l=>{let u=zr({where:l.query?.where,normalize:!1,escape:!0});return u!==null&&`${u}`.startsWith("'")&&`${u}`.endsWith("'")&&(u=u.substring(1,u.length-1)),u});o.length===0&&o.push(" "),i.forEach(l=>{o.forEach(u=>{s.splitByValue=u;let h=He({...s,key:me.Min,showOutliers:!0}),p=He({...s,key:me.Min,showOutliers:!1}),d=He({...s,key:me.Max,showOutliers:!0}),c=He({...s,key:me.Max,showOutliers:!1});l[d]===void 0&&l[c]!==void 0&&(l[d]=l[c]),l[h]===void 0&&l[p]!==void 0&&(l[h]=l[p])})})}function V0(a,i){let e,t,r=a[i[me.IQR]],n=a[i[me.FirstQuartile]],s=a[i[me.ThirdQuartile]];return Number.isFinite(r)&&Number.isFinite(n)&&Number.isFinite(s)&&(e=n-r*1.5,t=s+r*1.5),{outlierMinThreshold:e,outlierMaxThreshold:t}}function Mg(a){let{yField:i,xField:e,xValue:t,splitByField:r,splitByValue:n,outlierMaxThreshold:s,outlierMinThreshold:o,target:l}=a,u;if(e!==void 0&&t!==void 0){let d=typeof t!="string"?t:`'${ep(t)}'`;u=`${e}=${d.toString()}`}let h;if(r!==void 0&&n!==void 0){let d=typeof n!="string"?n:`'${ep(n)}'`;h=`${r}=${d.toString()}`}let p;return l==="outliers"&&o!==s?p=`(${i}<${o} OR ${i}>${s})`:l==="alternativeData"&&(o===s?p=`(${i}=${o})`:p=`(${i}>=${o} AND ${i}<=${s})`),[u,h,p].filter(d=>d!==void 0).join(" AND ")}function pv(a){let{data:i,yField:e,x:t,chartSubType:r,splitByField:n}=a,s=r===V.BoxPlotMonoField||r===V.BoxPlotMonoFieldAndCategory||r===V.BoxPlotMonoFieldAndSplitBy||r===V.BoxPlotMonoFieldAndCategoryAndSplitBy?void 0:e,o=hs(s),l=[],u=[],{maxOperandsPerWhereClause:h}=Jn(),p=[],d=[],c=1;return i.forEach((f,m)=>{let{outlierMinThreshold:y,outlierMaxThreshold:v}=V0(f,o);if(typeof y=="number"&&typeof v=="number"){let b={yField:e,outlierMinThreshold:y,outlierMaxThreshold:v};(r===V.BoxPlotMonoFieldAndCategory||r===V.BoxPlotMultiFieldsAndCategory||r===V.BoxPlotMonoFieldAndCategoryAndSplitBy)&&t!==void 0&&t in f&&(b.xField=t,b.xValue=xr({value:f[t],dataContext:f,keepNullValues:!0})),(r===V.BoxPlotMonoFieldAndSplitBy||r===V.BoxPlotMultiFieldsAndSplitBy||r===V.BoxPlotMonoFieldAndCategoryAndSplitBy)&&n!==void 0&&n in f&&(b.splitByField=n,b.splitByValue=f[n]),p.push(Mg({...b,target:"outliers"})),d.push(Mg({...b,target:"alternativeData"})),(c%h===0||m===i.length-1)&&(l.push(Pt(p,"OR")),u.push(Pt(d,"OR")),p=[],d=[])}c+=1}),{outliersFilterBatches:l,dataWithoutOutliersFilterBatches:u}}function L0(a){let{data:i,outlierDataItem:e,chartSubType:t,x:r,y:n,meanAndStdDevPerField:s,splitByField:o}=a,l=s?.[ro(n,J.Average)],u=s?.[ro(n,J.StandardDeviation)];if(l===void 0&&u===void 0)switch(t){case V.BoxPlotMultiFields:{let h=hs(n),p=i[0];l=Number(p[h[me.Average]]),u=Number(p[h[me.StandardDeviation]]);break}case V.BoxPlotMultiFieldsAndCategory:{let h=i.find(p=>p[r]===e[r]);if(h!==void 0){let p=hs(n);l=Number(h[p[me.Average]]),u=Number(h[p[me.StandardDeviation]])}break}case V.BoxPlotMultiFieldsAndSplitBy:{let h=i.find(p=>p[o]===e[o]);if(h!==void 0){let p=hs(n);l=Number(h[p[me.Average]]),u=Number(h[p[me.StandardDeviation]])}break}}return{mean:l,stdDev:u}}async function k0(a){let{seriesConfig:i,data:e,uniqueQuery:t,queryObject:r,meanAndStdDevPerField:n,abortKey:s}=a,o=Ae(i),l=i[0],{x:u}=l,h=si(l.query?.where),p=vi(r),d=Mi(p).idField,c=ur(i),f=[];for(let v=0;v<c.length;v+=1){let b=c[v],{outliersFilterBatches:x}=pv({data:e,yField:b,x:u,chartSubType:o,splitByField:h});for(let _=0;_<x.length;_+=1){let $=x[_];if($!==""){let O=[];u!==R.boxPlot.boxPlotCategory&&O.push(u),O.push(b),h!==""&&O.push(h),O.push(d);let F={...t,where:Pt([t.where,$]),groupByFieldsForStatistics:void 0,outStatistics:void 0,orderByFields:void 0,num:void 0,outFields:O};f.push(Cr({queryObject:r,queryConfig:F,featureCount:1,abortKey:s}))}}}let m=await Promise.all(f),y=new Map;for(let v=0;v<m.length;v+=1){let b=m[v],x=c[v];b.forEach(_=>{let $={..._.attributes};if($[x]!==void 0){u===R.boxPlot.boxPlotCategory&&($[R.boxPlot.boxPlotCategory]=x);let O={key:me.Outlier,chartSubType:o};switch(o){case V.BoxPlotMonoFieldAndSplitBy:case V.BoxPlotMultiFieldsAndSplitBy:case V.BoxPlotMonoFieldAndCategoryAndSplitBy:O={...O,splitByValue:$[h]};break;case V.BoxPlotMultiFieldsAndCategory:O={...O,y:x};break}let F=He(O),w=$[x];$[F]=w;let D=`${$[u]}-${$[h]}-${w}`,B=y.get(D);if($[Ct.uniqueIdsName]=[...B?.[Ct.uniqueIdsName]??[],$[d]],delete $[d],Zl(o)){let L=He({...O,standardizeValues:!0}),{mean:M,stdDev:Q}=L0({data:e,outlierDataItem:$,chartSubType:o,x:u,y:x,splitByField:h,meanAndStdDevPerField:n});M!==void 0&&Q!==void 0&&($[L]=mc({value:w,mean:M,stdDev:Q}))}delete $[x],$[R.boxPlot.boxPlotOutlierId]=!0,y.set(D,$)}})}return Array.from(y.values())}async function I0(a){let{data:i,queryObject:e,uniqueQuery:t,elementCount:r,chartConfig:n,chartLimits:s,abortKey:o}=a,l=[],{series:u,showMean:h}=n,p=Ql({showMean:h,seriesConfig:u}),d=Ae(u),c=un(n),{x:f}=c,m=si(c.query?.where),y=[];for(let b=0;b<p.length;b+=1){let x=p[b],{dataWithoutOutliersFilterBatches:_}=pv({data:i,yField:x,x:f,chartSubType:d,splitByField:m});for(let $=0;$<_.length;$+=1){let O=_[$],F={...t,where:Pt([t.where,O])};F.outStatistics!==void 0&&(F.outStatistics=F.outStatistics?.filter(w=>(w.statisticType===J.Minimum||w.statisticType===J.Maximum)&&w.onStatisticField===x).map(w=>({...w,outStatisticFieldName:`${w.outStatisticFieldName}${R.boxPlot.boxPlotOutliersSuffix}`}))),y.push(Fh({queryObject:e,uniqueQuery:F,chartConfig:n,elementCount:r,isTimeBinningSeries:!1,showMean:h,chartLimits:s,abortKey:o}))}}let v=await Promise.all(y);for(let b=0;b<v.length;b+=1)l.push(...v[b]);return d!==V.BoxPlotMonoFieldAndCategoryAndSplitBy&&(l=ao({data:l,x:m!==void 0&&m!==""?m:f})),l}async function M0(a){let{queryObject:i,uniqueQuery:e,chartConfig:t,abortKey:r}=a,n,{series:s,showMean:o}=t,l=Ae(s);if(l===V.BoxPlotMultiFieldsAndCategory||l===V.BoxPlotMultiFieldsAndSplitBy){let u=Ql({showMean:o,seriesConfig:s}),h={...e};delete h.outStatistics,delete h.groupByFieldsForStatistics,delete h.orderByFields;let p=[];for(let c=0;c<u.length;c+=1){let f=u[c];p.push({statisticType:J.Average,onStatisticField:f,outStatisticFieldName:`${J.Average}_${f}`},{statisticType:J.StandardDeviation,onStatisticField:f,outStatisticFieldName:`${J.StandardDeviation}_${f}`})}h.outStatistics=p;let d=await Cr({queryObject:i,queryConfig:h,featureCount:1,abortKey:r});d.length>0&&(n=d[0].attributes)}return n}function N0(a){let{data:i,additionalData:e,chartConfig:t}=a,r=t.series[0],{x:n}=r,s=si(r.query?.where);return i.map(o=>{let l=o,u=e.find(h=>h[n]===o[n]&&(s===""?!0:h[s]===o[s]));return u!==void 0&&(l={...o,...u}),l})}function dv(a){let{chartConfig:i,data:e,calculateZScore:t=!1,meanAndStdDevPerField:r}=a,{series:n,showMean:s}=i,o=un(i),l=Ae(i.series),{x:u}=o,h=Ql({showMean:s,seriesConfig:n}),p=e;if(e?.[0]!==void 0){let d=si(o.query?.where);switch(l){case V.BoxPlotMonoField:p[0][R.boxPlot.boxPlotCategory]=h[0];break;case V.BoxPlotMultiFields:p=T0({data:e,yList:h,calculateZScore:t});break;case V.BoxPlotMonoFieldAndSplitBy:p=O0({data:e,splitByField:d,y:h[0]});break;case V.BoxPlotMultiFieldsAndSplitBy:p=w0({splitByField:d,data:e,yList:h,meanAndStdDevPerField:r,calculateZScore:t});break;case V.BoxPlotMultiFieldsAndCategory:p=F0({data:e,yList:h,meanAndStdDevPerField:r,calculateZScore:t});break;case V.BoxPlotMonoFieldAndCategoryAndSplitBy:p=D0({splitByField:d,x:u,data:e});break;case V.BoxPlotMonoFieldAndCategory:}}return A0(i,p),p}async function R0(a){let{data:i,queryObject:e,uniqueQuery:t,fetchFullBoxPlotData:r,chartConfig:n,elementCount:s,chartLimits:o,abortKey:l}=a,u=i,h=[];if(u!==void 0){let{series:p}=n,d=await M0({queryObject:e,uniqueQuery:t,chartConfig:n,abortKey:l});if(r!==!1){h=await k0({queryObject:e,uniqueQuery:t,seriesConfig:p,data:u,abortKey:l});let c=await I0({queryObject:e,uniqueQuery:t,elementCount:s,data:i,chartConfig:n,chartLimits:o,abortKey:l});u=N0({data:u,additionalData:c,chartConfig:n})}u=dv({chartConfig:n,data:u,meanAndStdDevPerField:d,calculateZScore:!0})}return{dataItems:u,outliers:h}}function B0(a){let{whereValue:i,outStatistics:e,y:t}=a,r=Ct.outStatistics.outStatisticFieldName??"";return e?.outStatisticFieldName!==void 0?r=e.outStatisticFieldName:e?.onStatisticField!==void 0&&e.statisticType!==void 0?r=`${e.statisticType}_${e.onStatisticField}_${i}`:t!==void 0&&(r=[t].flat()[0]),r}function j0(a){let i=new Map;for(let e=0;e<a.length;e+=1){let t=a[e],r=t.query?.where;if(r!==void 0&&"y"in t){let n=zr({where:r,normalize:!0,escape:!1});if(n!==""){let s=B0({whereValue:n,outStatistics:t.query?.outStatistics?.[0],y:t.y});t.y=s,i.set(n,s)}}}return i}function E0(a){let{uniqueQuery:i,splitByField:e,x:t}=a,r=[...i.groupByFieldsForStatistics??[],t,e].filter(n=>n!==void 0&&n.trim()!==""&&n!==Bh);i.groupByFieldsForStatistics=Array.from(new Set(r))}function cv(a){return a.statisticType===J.ContinuousPercentile||a.statisticType===J.DiscretePercentile}function W0(a){let{uniqueQuery:i,y:e,useGenericOutStatFieldName:t,queryObject:r,chartSubType:n,isTimeBinningSeries:s,returnFeaturesExtent:o,splitByField:l}=a,u=Ct.outStatistics;if(i.outStatistics?.[0]!==void 0){n!==V.PieFromFields&&n!==V.BarAndLineFromFields&&(i.outStatistics[0].outStatisticFieldName=t?u.outStatisticFieldName:[e].flat()[0]);let{outStatistics:h}=i;for(let p=0;p<h.length;p+=1){let d=h[p];d!==void 0&&cv(d)&&(s&&!ss(r)?(h[p].statisticType=J.Count,delete h[p].statisticParameters):h[p]={...h[p],statisticParameters:h[p].statisticParameters??{value:R.defaultStatParameterValue}})}}else{let h=vi(r),{idField:p,isTraditionalTypeOID:d}=Mi(h),c=d?p:"*";i.outStatistics=[{statisticType:u.statisticType,onStatisticField:c,outStatisticFieldName:t?u.outStatisticFieldName:[e].flat()[0]}]}o===!0&&(!s||Zt(l))&&i.outStatistics?.push({statisticType:J.EnvelopeAggregate,onStatisticField:"1"})}function H0(a){let{chartConfig:i,fetchFullBoxPlotData:e}=a,{series:t}=i,r=qi(i),n=[{statisticType:J.Average,suffix:me.Average}];e===!0&&(n=[...n,{statisticType:J.Minimum,suffix:me.Min},{statisticType:J.ContinuousPercentile,statisticParameters:{value:.25},suffix:me.FirstQuartile},{statisticType:J.ContinuousPercentile,statisticParameters:{value:.5},suffix:me.Median},{statisticType:J.ContinuousPercentile,statisticParameters:{value:.75},suffix:me.ThirdQuartile},{statisticType:J.Maximum,suffix:me.Max},{statisticType:J.StandardDeviation,suffix:me.StandardDeviation}]);let s=new Set;return r&&"y"in t[0]?[t[0].y].flat().forEach(o=>s.add(o)):t.forEach(o=>{"y"in o&&[o.y].flat().forEach(l=>s.add(l))}),[...s].flatMap(o=>n.map(l=>{let u={onStatisticField:o,statisticType:l.statisticType,outStatisticFieldName:`${o}_${l.suffix}`};return l.statisticType===J.ContinuousPercentile&&(u.statisticParameters=l.statisticParameters),u}))}function z0(a,i){for(let e=1;e<i.length;e+=1){let t={...i[e].query?.outStatistics?.[0]};t!==void 0&&a.outStatistics!==void 0&&a.outStatistics.push(t)}}function X0(a){let{uniqueQuery:i,x:e,splitByField:t,unit:r,chartSubType:n,objectIdFields:s,runsOnClientQueryEngine:o}=a;if(r!==void 0){let l=Af({dateFieldName:e,unit:r,runsOnClientQueryEngine:o});i.orderByFields=l,i.groupByFieldsForStatistics=l,n===V.BarAndLineSplitBy&&!Zt(t)?i.groupByFieldsForStatistics.push(t):n===V.BarAndLineNoAggregation&&(i.groupByFieldsForStatistics=s,i.outStatistics=[{onStatisticField:s.length>1?"*":s[0],outStatisticFieldName:`COUNT_${s[0]}`,statisticType:J.Count}])}}function fv(a){let{chartConfig:i,options:e,uniqueQuery:t}=a;if(e?.chartLimits?.behaviorAfterLimit===Kn.RenderUpToTheLimit){let r=Yh(i,e?.chartLimits);if(r!==void 0){let n=Ae(i.series);if(n===V.PieFromFields||n===V.BarAndLineFromFields){if(t.outStatistics?.[0]!==void 0){let s=(u,h)=>u.statisticType===J.EnvelopeAggregate===h,o=t.outStatistics.filter(u=>s(u,!0)),l=t.outStatistics.filter(u=>s(u,!1));l.splice(r),t.outStatistics=[...l,...o]}}else t.num=r}}}function Pl(a){let{chartConfig:i,queryConfig:e,options:t,queryObject:r,timeIntervalInfo:n,fetchFullBoxPlotData:s}=a,{setTimeBinningInfoWhenNotProvided:o,returnFeaturesExtent:l}=t??{},u=i.series,h=Ae(u),p=un(i),{query:d,x:c}=p,f="y"in p?p.y:void 0,m=da({xAxisValueFormatType:br(i),setTimeBinningInfoWhenNotProvided:o,seriesConfig:p,queryObject:r}),y=new Map,v=!1,b=!1,x=!1,_=!1,$=!1,O={};if(d!==void 0){O=pa(d);let K=si(d.where),z="";switch(e.fetchNullValues!==!0&&(c!==R.boxPlot.boxPlotCategory&&(z=`${c} IS NOT NULL`),K.trim()!==""&&K!==c&&!us(d.where)&&(z=Pt([z,`${K} IS NOT NULL`]))),h){case V.BarAndLineSplitBy:{y=j0(u),_=!0,v=!0,b=!0;break}case V.BarAndLineMultiFields:z0(O,u),b=!0;break;case V.PieFromFields:case V.BarAndLineFromFields:z="",x=!0,b=!0;break;case V.BarAndLineMonoField:case V.PieFromCategory:b=!0;break;case V.BoxPlotMonoField:case V.BoxPlotMultiFields:x=!0,$=!0;break;case V.BoxPlotMonoFieldAndCategory:case V.BoxPlotMultiFieldsAndCategory:case V.BoxPlotMonoFieldAndSplitBy:case V.BoxPlotMonoFieldAndCategoryAndSplitBy:case V.BoxPlotMultiFieldsAndSplitBy:{$=!0,_=!0,x=!0;break}case V.PieNoAggregation:case V.BarAndLineNoAggregation:case V.BarAndLineSplitByNoAggregation:}if(b&&W0({uniqueQuery:O,y:f,useGenericOutStatFieldName:v,queryObject:r,chartSubType:h,isTimeBinningSeries:m,returnFeaturesExtent:l,splitByField:K}),_&&E0({uniqueQuery:O,splitByField:K,x:c}),Sr(i)&&$&&(O.outStatistics=H0({chartConfig:i,fetchFullBoxPlotData:s})),x?delete O.orderByFields:e.orderByFields!==void 0&&(O.orderByFields=e.orderByFields.filter(Te=>{let ue=Te.split(" ");return!Zt(ue[0])})),m&&Yt(u[0])){let Te=vi(r),{idFields:ue}=sp(Te);Pr(r).find(Me=>Me.name===c)?.type!==gr.DateOnly&&ue&&X0({uniqueQuery:O,x:c,splitByField:si(d.where),unit:n?.unit??u[0].temporalBinning?.unit,chartSubType:h,objectIdFields:ue,runsOnClientQueryEngine:ln(r)})}O.where=z}fv({chartConfig:i,options:t,uniqueQuery:O});let{gdbVersion:F,geometry:w,distance:D,units:B,timeExtent:L,where:M,objectIds:Q,spatialRelationship:ae}=e;return F!==void 0&&(O.gdbVersion=F),w!==void 0&&(O.geometry=w),D!==void 0&&(O.distance=D),B!==void 0&&(O.units=B),L!==void 0&&(O.timeExtent=L),Q!==void 0&&(O.objectIds=Q),ae!==void 0&&(O.spatialRelationship=ae),M!==void 0&&(O.where=Pt([O.where,M])),{uniqueQuery:O,mapToStatField:y}}async function Y0(a){let{queryObject:i,queryConfig:e,chartConfig:t,abortKey:r}=a,n=t.series[0],{x:s,valueConversion:o}=n,l=cp(t),u=await Cr({queryObject:i,queryConfig:e,featureCount:e.num??1,abortKey:r}),h=[{[s]:null}];if(l)h=u.map(p=>{Oc(p.attributes,s);let d=qh(p.attributes[s],o);return{...p.attributes,[s]:d}});else if(u.length>0){let p=u[0].attributes[s]??u[0].attributes[s.toUpperCase()]??u[0].attributes[s.toLowerCase()];p=qh(p,o),h=[{[s]:p}]}return h}async function q0(a){let{queryObject:i,chartConfig:e,queryConfig:t,options:r,abortKey:n}=a,{chartLimits:s}=r??{},o={valid:!0},{behaviorAfterLimit:l,maxGaugeByFeaturesLimit:u}=s??{},h=cp(e),p=!0,d;if(h&&(d=(await wc({chartConfig:e,queryObject:i,queryConfig:t,behaviorAfterLimit:l,numberMaxOfFeaturesToFetch:u,isGaugeByFeature:h})).elementCount,r?.chartLimits?.behaviorAfterLimit!==Kn.RenderUpToTheLimit&&(p=Er({count:d??0,seriesCount:e.series.length,chartType:A.GaugeSeries,chartLimits:s})),r&&(Number.isFinite(u)||Number.isFinite(d)))){let c=Math.min(u??Number.NaN,d??Number.NaN);Number.isFinite(c)&&(r.chartLimits={...s,maxGaugeByFeaturesLimit:c}),fv({chartConfig:e,options:r,uniqueQuery:t})}if(Number.isNaN(p)||p){let c=await Y0({queryObject:i,chartConfig:e,queryConfig:t,abortKey:n});o.data={dataItems:c},o.count=c.length}else o.count=d,Ph({dataInfo:o,chartType:A.GaugeSeries});return o}async function y4(a){let{queryObject:i,chartConfig:e,queryConfig:t}=a,{minimumFromField:r,maximumFromField:n}=e.axes[0],s=[],o="",l="";r!==void 0&&(typeof r=="string"?(o=`${J.Minimum}_${r}`,s.push({statisticType:J.Minimum,onStatisticField:r,outStatisticFieldName:o})):(o=`${r.statisticType}_${r.onStatisticField}`,s.push({...r,outStatisticFieldName:o}))),n!==void 0&&(typeof n=="string"?(l=`${J.Maximum}_${n}`,s.push({statisticType:J.Maximum,onStatisticField:n,outStatisticFieldName:l})):(l=`${n.statisticType}_${n.onStatisticField}`,s.push({...n,outStatisticFieldName:l})));let u={...t,outStatistics:s,orderByFields:void 0,groupByFieldsForStatistics:void 0,returnDistinctValues:void 0,fetchNullValues:void 0,num:void 0},h=await os({queryObject:i,queryConfig:u}),p=h.get(o),d=h.get(l);return{minimumFromData:p,maximumFromData:d}}function G0(a=ki.None,i){return a===ki.None||a===ki.Log&&i>0||a===ki.Sqrt&&i>=0}function mv(a,i){let e={valid:!1};return i===!0?e.invalidType=Je.HistogramEmptyField:a===ki.Log?e.invalidType=Je.NegativeValueInLogCalculation:a===ki.Sqrt&&(e.invalidType=Je.NegativeValueInSqrtCalculation),e}function U0(a,i){let e=a;switch(i){case ki.Log:e=Math.log(a);break;case ki.Sqrt:e=Math.sqrt(a);break}return e}function K0(a){let i=a;if(a){let e=a.toString().split(".");if(e[1]!==void 0){let t=10**-e[1].length;i=a-t}}return i}function yv(a){let i="field";switch(a){case ki.Log:i="natural-log";break;case ki.Sqrt:i="square-root";break;case ki.None:}return i}async function Z0(a){let{queryObject:i,fieldName:e,queryConfig:t,abortKey:r}=a,n=vi(i),{idField:s,isTraditionalTypeOID:o}=Mi(n),l=o?s:"*",u=`${J.Count}_${s}`,h=`${J.Count}_${e}`,p=`${J.Minimum}_${e}`,d=`${J.Maximum}_${e}`,c={...t,outStatistics:[{statisticType:J.Count,onStatisticField:l,outStatisticFieldName:u},{statisticType:J.Count,onStatisticField:e,outStatisticFieldName:h},{statisticType:J.Minimum,onStatisticField:e,outStatisticFieldName:p},{statisticType:J.Maximum,onStatisticField:e,outStatisticFieldName:d}]},f=await os({queryObject:i,queryConfig:c,abortKey:r}),m=f.get(u)??Number.NaN,y=f.get(h)??Number.NaN,v=f.get(p)??Number.NaN,b=f.get(d)??Number.NaN;return{countExcludingNulls:y,countIncludingNulls:m,min:v,max:b}}async function Q0(a){let{queryConfig:i,chartConfig:e,queryObject:t,abortKey:r}=a,n=e.series[0],{x:s,dataTransformationType:o}=n,l=[],{countIncludingNulls:u,countExcludingNulls:h,min:p,max:d}=await Z0({queryObject:t,queryConfig:i,fieldName:s,abortKey:r}),c=G0(o,p),f=h<2||p===d,m={...i};return m.where=Pt([m.where,`${s} is not null`]),{rawData:l,dataCompatibleWithTransformation:c,dataCountIncompatible:f,countExcludingNulls:h,countIncludingNulls:u}}function J0(a){let i={...a};return i.avg=i.avg??Number.NaN,i.count=i.count??Number.NaN,i.max=i.max??Number.NaN,i.min=i.min??Number.NaN,i.stddev=i.stddev??Number.NaN,i.sum=i.sum??Number.NaN,i.variance=i.variance??Number.NaN,i.median=i.median??Number.NaN,i}function eS(a){let{seriesConfig:i,layer:e,useFeaturesInView:t,view:r,queryConfig:n}=a,{x:s,dataTransformationType:o}=i,l={layer:e,view:r,field:s,sqlWhere:us(n.where)?void 0:n.where,useFeaturesInView:t};return o!==ki.None&&(l={...l,normalizationType:yv(o)}),l}function tS(a){let{seriesConfig:i,layer:e,useFeaturesInView:t,view:r,minValue:n,maxValue:s,queryConfig:o}=a,{x:l,binCount:u,dataTransformationType:h}=i,p={layer:e,view:r,field:l,minValue:n,maxValue:s,numBins:u??Zc,classificationMethod:"equal-interval",sqlWhere:us(o.where)?void 0:o.where,useFeaturesInView:t};return h!==ki.None&&(p={...p,normalizationType:yv(h)}),p}function iS(a,i){let e=Number.NaN;return a!==void 0&&i!==void 0&&(e=a-i),e}async function rS(a){let{chartConfig:i,queryConfig:e,queryObject:t,countExcludingNulls:r,countIncludingNulls:n,options:s,errorStrings:o}=a,l=i.series[0],{dataTransformationType:u}=l,h={valid:!0},p=vi(t),d=Xf(e?.geometry)?.extent?.toJSON()!==void 0,c=s?.view,f=eS({seriesConfig:l,layer:p,view:c,useFeaturesInView:d,queryConfig:e}),m;if(c!==void 0&&(m=new wg({geometry:c.extent}),c.extent!==void 0&&If(p))){let{distance:w,units:D}=e;w!==void 0&&(m.distance=w),D!==void 0&&(m.units=D)}if(e.timeExtent){let w={start:e.timeExtent[0],end:e.timeExtent[1]};m===void 0?m=new wg({timeExtent:w}):m.timeExtent=w}f.filter=m;let y;f.outStatisticTypes={exclude:["median"]};try{y=await Fg(f)}catch(w){throw new Yl(Qh.QueryFeaturesError,o.errors.queryError,w)}f.outStatisticTypes={include:["median"]};try{let w=await Fg(f);w?.median&&(y.median=w.median)}catch{}y=J0(y);let{avg:v,count:b,stddev:x,min:_,max:$,sum:O,median:F}=y;if(b===0)h={...mv(u)};else{let w=tS({seriesConfig:l,layer:p,view:c,useFeaturesInView:d,minValue:K0(_),maxValue:$,valueExpression:f.valueExpression,queryConfig:e});w.filter=m;let D;try{D=await Mx(w)}catch(L){throw new Yl(Qh.QueryFeaturesError,o.errors.queryError,L)}let B=iS(n,r);h.data={mean:v,stddev:x,min:_,max:$,median:Number(F),bins:D?.bins,count:r,nulls:B,sum:O??void 0},h.data.bins.length>0&&(h.data.bins[h.data.bins.length-1].isLastBin=!0)}return h}async function gv(a){let{chartConfig:i,queryConfig:e,queryObject:t,options:r,abortKey:n,errorStrings:s}=a,{series:o}=i,l=o[0],u;if(Hr(t))u=await Yf(a);else{let{rawData:h,dataCompatibleWithTransformation:p,dataCountIncompatible:d,countIncludingNulls:c,countExcludingNulls:f}=await Q0({queryObject:t,chartConfig:i,queryConfig:e,abortKey:n});u={valid:!0},!p||d?u=mv(l.dataTransformationType,d):u=await rS({chartConfig:i,queryObject:t,queryConfig:e,countIncludingNulls:c,countExcludingNulls:f,options:r,errorStrings:s})}return u}async function aS(a){let{queryObject:i,queryConfig:e,chartConfig:t,x:r}=a,{series:n}=t,{dataTransformationType:s}=n[0],o={...e,orderByFields:[r],outFields:[r]};return{valid:!0,data:{dataItems:(await Cr({queryObject:i,queryConfig:o})).map(l=>({[r]:U0(l.attributes[r],s)}))}}}var jn={groupByCaseBegin:"CASE",groupByOutKeyword:"OUT",groupByCaseEnd:"ELSE 'OUT' END"},nS="{ groupByFieldsForStatistics } WHEN ({ y } { yMinOperand } { yValue } AND { y } { yMaxOperand } { yValuePlusStep } AND { x } { xMinOperand } { xValue } AND { x } { xMaxOperand } { xValuePlusStep }) THEN '{ xValue }|{ xValuePlusStep}|{ yValue }|{ yValuePlusStep }'";async function sS(a){let{chartConfig:i,queryObject:e,queryConfig:t,abortKey:r}=a,n=i.series[0],{x:s,y:o}=n,{dataContextCountDistinctX:l,dataContextCountDistinctY:u}=R.scatterplotAggregationFields,h={...t,outStatistics:[{statisticType:J.Count,outStatisticFieldName:l,onStatisticField:s},{statisticType:J.Count,outStatisticFieldName:u,onStatisticField:o}],returnDistinctValues:!0};return await os({queryObject:e,queryConfig:h,abortKey:r})}async function oS(a){let{statsMap:i,chartConfig:e,queryObject:t,options:r,queryConfig:n,abortKey:s}=a,{dataContextXMinField:o,dataContextXMaxField:l,dataContextYMinField:u,dataContextYMaxField:h,dataContextCountDistinctX:p,dataContextCountDistinctY:d}=R.scatterplotAggregationFields,c,f,m,y,v,b=i.get(o),x=i.get(l),_=i.get(u),$=i.get(h);if(b!=null&&_!==void 0&&_!==null&&x!==void 0&&x!==null&&$!==void 0&&$!==null&&!Number.isNaN(b+x+_+$)){let{maxScatterPointsAfterAggregation:O}=mo(r?.chartLimits),F=Math.floor(Math.sqrt(O)),w=await sS({queryObject:t,chartConfig:e,queryConfig:n,abortKey:s});m=Math.min(w.get(d)??Number.NaN,F),y=Math.min(w.get(p)??Number.NaN,F),v=y*m,c=x===b?0:(x-b)/(y-1),f=$===_?0:($-_)/(m-1),i.set(R.scatterplotAggregationFields.xStep,c),i.set(R.scatterplotAggregationFields.yStep,f),i.set(R.scatterplotAggregationFields.rowCount,m),i.set(R.scatterplotAggregationFields.columnCount,y),i.set(R.scatterplotAggregationFields.realGridSize,v)}}function lS(a){let{groupByFieldsForStatistics:i,x:e,y:t,xValue:r,yValue:n,xStep:s,yStep:o,endOfRow:l,endOfColumn:u}=a,h=i===""?jn.groupByCaseBegin:i;return h=Kt(nS,{groupByFieldsForStatistics:h,x:e,y:t,xValue:`${r}`,yValue:`${n}`,xValuePlusStep:`${r+(u?0:s)}`,yValuePlusStep:`${n+(l?0:o)}`,xMinOperand:u?"=":">=",yMinOperand:l?"=":">=",xMaxOperand:u?"=":"<",yMaxOperand:l?"=":"<"}),h}async function uS(a){let{chartConfig:i,queryConfig:e,queryObject:t,xMin:r,xMax:n,yMin:s,yMax:o,abortKey:l}=a,u=i.series[0],{x:h,y:p}=u,d={...e};return d.where=Pt([d.where,`${h}>=${r}`,`${h}<=${n}`]),h!==p&&(d.where=Pt([d.where,`${p}>=${s}`,`${p}<=${o}`])),await Cr({queryObject:t,queryConfig:d,noBatch:!0,featureCount:1,abortKey:l})}async function hS(a){let{statsMap:i,chartConfig:e,queryObject:t,queryConfig:r,useQueryAttributeBins:n,errorStrings:s,abortKey:o}=a,l=e.series[0],{x:u,y:h}=l,{dataContextXMinField:p,dataContextXMaxField:d,dataContextYMinField:c,dataContextYMaxField:f,queryNumberOfFeatures:m,queryNumberOfAggregatedFeatures:y}=R.scatterplotAggregationFields,v,b=i?.get(p)??Number.NaN,x=i?.get(d)??Number.NaN,_=i?.get(m)??Number.NaN,$=i?.get(c)??b,O=i?.get(f)??x;if(b!=null&&$!==void 0&&$!==null&&x!==void 0&&x!==null&&O!==void 0&&O!==null&&!Number.isNaN(b+x+$+O)){let F=vi(t),{idField:w,isTraditionalTypeOID:D}=Mi(F),B=D?w:"*",L=i?.get(R.scatterplotAggregationFields.xStep),M=i?.get(R.scatterplotAggregationFields.yStep),Q=i?.get(R.scatterplotAggregationFields.realGridSize),ae=i?.get(R.scatterplotAggregationFields.rowCount),K=i?.get(R.scatterplotAggregationFields.columnCount),z=new Map,Te=Pr(t);if(Te?.forEach(ue=>{xo(ue)&&z.set(ue.name,{onStatisticField:ue.name,outStatisticFieldName:ue.name,statisticType:J.Maximum})}),(Te.filter(ue=>l?.additionalTooltipFields?.includes(ue.name))??[])?.forEach(ue=>{xo(ue)||z.set(ue.name,{onStatisticField:ue.name,outStatisticFieldName:ue.name,statisticType:J.Maximum})}),(await pp(F)).forEach(ue=>{z.set(ue,{onStatisticField:ue,outStatisticFieldName:ue,statisticType:J.Maximum})}),w!==""&&z.set(w,{onStatisticField:B,outStatisticFieldName:y,statisticType:J.Count}),z.set(u,{onStatisticField:u,outStatisticFieldName:u,statisticType:J.Maximum}).set(h,{onStatisticField:h,outStatisticFieldName:h,statisticType:J.Maximum}),L!==void 0&&M!==void 0){if(n){let ue={...r,outStatistics:[...z.values()]};v=await Ef({queryObject:t,queryConfig:ue,xStep:L,xMin:b,xMax:x,x:u,y:h,yStep:M,errorStrings:s})}else if(ae!==void 0&&K!==void 0){let ue=0,{maxScatterCellsPerQuery:Me,maxScatterCellsPerQueryForStandard:ct}=Jn(),qe=await rm(F)?ct:Me,ne=[],Ne=!0,Ze=b,zt=$,Xt="",Bt=1,ii=1,_i=Number.MAX_SAFE_INTEGER,mi=Number.MIN_SAFE_INTEGER,nr=Number.MAX_SAFE_INTEGER,sr=Number.MIN_SAFE_INTEGER;for(;ii<=K&&Ne;){for(zt=$,Bt=1;Bt<=ae&&Ne;){if(Xt=lS({groupByFieldsForStatistics:Xt,x:u,y:h,xValue:Ze,yValue:zt,xStep:L,yStep:M,endOfRow:Bt===ae,endOfColumn:ii===K}),Ze<_i&&(_i=Ze),Ze+L>mi&&(mi=Ze+L),zt<nr&&(nr=zt),zt+L>sr&&(sr=zt+M),ue+=1,ue%qe===0||ue===Q||ue===_){Xt=`${Xt} ${jn.groupByCaseEnd}`;let Yn={...r,groupByFieldsForStatistics:[Xt],outStatistics:[...z.values()]};ne.push(uS({chartConfig:e,queryConfig:Yn,queryObject:t,xMin:_i,xMax:mi,yMin:nr,yMax:sr,abortKey:o})),_i=Number.MAX_SAFE_INTEGER,mi=Number.MIN_SAFE_INTEGER,nr=Number.MAX_SAFE_INTEGER,sr=Number.MIN_SAFE_INTEGER,Xt="",ue===Q&&(Ne=!1)}zt+=M,Bt+=1}Ze+=L,ii+=1}v=(await Promise.all(ne)).flat()}}}return v}async function pS(a){let{chartConfig:i,queryConfig:e,queryObject:t,abortKey:r}=a,n=i.series[0],{x:s,y:o}=n,l=new Map,{dataContextXMinField:u,dataContextXMaxField:h,dataContextYMinField:p,dataContextYMaxField:d,queryNumberOfFeatures:c}=R.scatterplotAggregationFields,{idField:f,isTraditionalTypeOID:m}=Mi(vi(t)),y=m?f:"*",v=[{statisticType:J.Count,onStatisticField:y,outStatisticFieldName:c},{statisticType:J.Minimum,outStatisticFieldName:u,onStatisticField:s},{statisticType:J.Maximum,outStatisticFieldName:h,onStatisticField:s}];s!==o&&v.push({statisticType:J.Minimum,outStatisticFieldName:p,onStatisticField:o},{statisticType:J.Maximum,outStatisticFieldName:d,onStatisticField:o});let b={...e};return b.outStatistics=v,l=await os({queryObject:t,queryConfig:b,abortKey:r}),s===o&&(l.set(p,l.get(u)??Number.NaN),l.set(d,l.get(h)??Number.NaN)),l}function mh(a){let{value:i,valueMin:e,valueMax:t}=a;return i===e||i===t?i:Math.random()*(t-e)+e}function dS(a){let{useQueryAttributeBins:i,graphic:e,x:t,y:r,yStep:n}=a,{groupByOutKeyword:s}=jn,{dataContextXMinField:o,dataContextXMaxField:l,dataContextYMinField:u,dataContextYMaxField:h}=R.scatterplotAggregationFields,p=[];if(i&&"stackedAttributes"in e&&e.stackedAttributes){let d=Rf(t,r),c=e.attributes[d.lowerBoundaryAlias],f=e.attributes[d.upperBoundaryAlias];e.stackedAttributes.forEach(m=>{let y=m[d.stackAlias],v;typeof y=="number"&&typeof n=="number"&&(y*=n),typeof y=="number"&&typeof n=="number"&&(v=y+n);let b=m[t],x=m[r];typeof y=="number"&&typeof v=="number"&&typeof b=="number"&&typeof x=="number"&&p.push({...m,[t]:mh({value:b,valueMin:c,valueMax:f}),[r]:mh({value:x,valueMin:y,valueMax:v}),[o]:Math.min(c,f),[l]:Math.max(c,f),[u]:y,[h]:v})})}else{let{expr:d,isInItem:c}=Gl(e.attributes);if(c&&d&&e.attributes[d]!==s){let[f,m,y,v]=e.attributes[d].split("|");f=Math.min(f,m),m=Math.max(f,m),y=Math.min(y,v),v=Math.max(y,v);let b={...e.attributes,[o]:f,[l]:m,[u]:y,[h]:v};b[t]=mh({value:b[t],valueMin:f,valueMax:m}),b[r]=mh({value:b[r],valueMin:y,valueMax:v}),p=[b]}}return p}function cS(a){let{chartConfig:i,rawData:e,isAggregationMode:t,yStep:r,useQueryAttributeBins:n}=a,s=i.series[0],{x:o,y:l}=s,u=(Array.isArray(e)?e:e?.features)?.flatMap(h=>{let p=[{...h.attributes}];return Oc(p[0],[o,l]),t?p=dS({useQueryAttributeBins:n,graphic:h,x:o,y:l,yStep:r}):p[0][Ct.uniqueIdsName]=h.getObjectId(),p});return u=u?.filter(h=>{let{expr:p}=Gl(h);return Number.isFinite(h[o])&&Number.isFinite(h[l])&&(p===void 0||h[p]!==jn.groupByOutKeyword)}),u??[]}async function fS(a){let{queryObject:i,queryConfig:e,chartConfig:t,featureCount:r,abortKey:n}=a,s=t.series[0],{x:o,y:l}=s,u=vi(i),h=[],p=Pr(i),d=sp(u).idFields,c=(p?.filter(b=>xo(b)&&b.name!==o&&b.name!==l)??[]).map(b=>b.name)??[],f=s?.additionalTooltipFields??[],m=Array.from(new Set([o,l,...d??[],...c,...f])),y=kf(u);if(y&&!y.isTable){let{rendererField:b,rendererNormalizationField:x}=Jf(u?.renderer??void 0);Zt(b)||m.push(b),Zt(x)||m.push(x)}let v={...e,orderByFields:[`${o} ${Fa.Ascending}`],outFields:m};return h=await Cr({queryObject:i,queryConfig:v,featureCount:r,abortKey:n}),h}async function mS(a){let i,{chartConfig:e,queryConfig:t,queryObject:r,statsMap:n,numberOfFeatures:s,isAggregationMode:o,useQueryAttributeBins:l,errorStrings:u,abortKey:h}=a,p=e.series[0],{x:d,y:c}=p;if(!Number.isNaN(s)&&s>0){let f={...t};f.where=Pt([f.where,`${d} IS NOT NULL`,`${c} IS NOT NULL`]),o?i=await hS({chartConfig:e,queryObject:r,queryConfig:f,statsMap:n,useQueryAttributeBins:l,errorStrings:u,abortKey:h}):i=await fS({queryObject:r,chartConfig:e,queryConfig:f,featureCount:s,abortKey:h})}return i}async function vv(a){let{chartConfig:i,queryConfig:e,queryObject:t,sortData:r,calculateTrendLine:n,options:s,abortKey:o}=a,l;if(Hr(t))l=await Zf(a);else{let u=await pS({chartConfig:i,queryConfig:e,queryObject:t,abortKey:o}),{queryNumberOfFeatures:h,yStep:p}=R.scatterplotAggregationFields,{maxScatterPointsBeforeAggregation:d}=mo(s?.chartLimits),c=u?.get(h)??Number.NaN,f=c>=d,m=Mf(t);f&&await oS({statsMap:u,chartConfig:i,queryObject:t,options:s,queryConfig:e,abortKey:o});let y=await mS({...a,queryObject:t,statsMap:u,numberOfFeatures:c,isAggregationMode:f,useQueryAttributeBins:m}),v=cS({chartConfig:i,rawData:y,isAggregationMode:f,yStep:u.get(p),useQueryAttributeBins:m});r!==!1&&yo({arrayToSort:v,sortingField:i.series[0].x,orderBy:Fa.Ascending});let{r2:b,trendLinePoints:x}=n!==!1?await Kf({data:v,statsMap:u,queryConfig:e,options:s,queryObject:t,chartConfig:i}):R.scatterplotSeries;l={dataItems:v,r2:b,trendLinePoints:x,aggregated:f}}return l}function rn(a,i){let e="";if(a.trim()!==""&&i!==void 0)if(i===null)e=`${a} IS NULL`;else{let t=typeof i!="number"?"'":"";e=`${a}=${t}${i.toString()}${t}`}return e}function yS(a){let{dataContext:i,xAxisField:e,yAxisField:t,options:r}=a,n="",{dataContextXMinField:s,dataContextXMaxField:o,dataContextYMinField:l,dataContextYMaxField:u}=R.scatterplotAggregationFields;if(Xh({dataContext:i,chartLimits:r?.chartLimits})){let{[s]:h,[o]:p}=i,d=e!==t?i[l]:h,c=e!==t?i[u]:p;if(!Number.isNaN(h)&&!Number.isNaN(p)&&!Number.isNaN(d)&&!Number.isNaN(c)){let f=[];h===p?f.push(`${e}=${h?.toString()}`):(f.push(`${e}>=${h?.toString()}`),f.push(`${e}<=${p?.toString()}`)),d===c?f.push(`${t}=${d?.toString()}`):(f.push(`${t}>=${d?.toString()}`),f.push(`${t}<=${c?.toString()}`)),n=Pt(f)}}else n=Pt([Xr({where:rn(e,i[e])}),t!==void 0?Xr({where:rn(t,i[t])}):""]);return n}function Ng(a){let{fieldsIndex:i,fieldName:e,inputDate:t}=a,r=i.get(e),n=i.getTimeZone(e);return Nx(new Date(t),{type:"date"},{type:r,timeZone:n})}function bv(a){let{xAxisField:i,dataContext:e,queryObject:t}=a,r="",n=e[R.originalServerBinningRange]??e[R.dateBinningRange];if(Yc(n)&&n.length===2){let[s,o]=n,l=!0,u=ln(t);if(u){let h=vi(t),{fieldsIndex:p}=h;s=Ng({fieldsIndex:p,fieldName:i,inputDate:s}),o=Ng({fieldsIndex:p,fieldName:i,inputDate:o})}else typeof s=="number"&&typeof o=="number"?Number.isFinite(s)&&Number.isFinite(o)?(s=on(s),o=on(o)):l=!1:typeof s=="string"&&typeof o=="string"&&(s=new Date(s).toISOString(),o=new Date(o).toISOString());if(l){let h=u?"":"'",p=e[R.lastTemporalBin]===!0?"<=":"<";r=`${i}>=${h}${s}${h} AND ${i}${p}${h}${o}${h}`}}return r}function xv(a,i){let e="";if(Number.isFinite(a)){let t=1/10**R.queryMaxFloatPrecision;e=`${i}>=${a-t} AND ${i}<=${a+t}`}return e}function Sv(a){let{xAxisField:i,yAxisField:e,splitBy:t,dataContext:r,xAxisFieldType:n,chartConfig:s}=a,o="";if(i!==void 0&&i!==R.boxPlot.boxPlotCategory){let h=xr({value:r[i],dataContext:r,keepNullValues:!0});n===gr.Double?o=xv(h,i):(Da(s.axes?.[0].valueFormat)&&(h=on(h)),o=Xr({where:rn(i,h),normalize:!1,escape:!0}))}let l=Xr({where:t??"",normalize:!1,escape:!0}),u="";if(Aa(s)){let h=Ae(s.series)===V.BoxPlotMultiFieldsAndCategory?e:void 0,p=He({key:me.Min,showOutliers:!0,splitBy:t,y:h}),d=He({key:me.Max,showOutliers:!0,splitBy:t,y:h}),c=i===R.boxPlot.boxPlotCategory?r[i]:e;if(!Zt(c)){let f=r[p],m=r[d];Number.isFinite(f)&&Number.isFinite(m)&&(u=`${c?.toString()}>=${f?.toString()} AND ${c?.toString()}<=${m?.toString()}`)}}return Pt([o,l,u])}function gS(a){let{xAxisField:i,splitBy:e,dataContext:t,xAxisFieldType:r,chartConfig:n,queryObject:s}=a,o="";if(R.dateBinningRange in t)o=bv({xAxisField:i,dataContext:t,queryObject:s});else if(Ae(n.series)!==V.BarAndLineFromFields){let u=xr({value:t[i],dataContext:t,keepNullValues:!0});r===gr.Double?o=xv(u,i):(Da(n.axes?.[0].valueFormat)&&r!==gr.TimeOnly&&(u=on(u)),o=Xr({where:rn(i,u),normalize:!1,escape:!0}))}let l=Xr({where:e??"",normalize:!1,escape:!0});return Pt([o,l])}function vS(a){let{xAxisField:i,dataContext:e,chartConfig:t}=a,r=e[R.originalCategoryValue];return r===void 0&&(r=e[i]),Ae(t.series)===V.PieFromFields?"":Xr({where:rn(i,r),normalize:!1,escape:!0})}function Rg(a){let{field:i,fieldType:e,fieldValue:t,unit:r,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o}=a,l,{expression:u}=ap({field:i,fieldType:e,unit:r,addIntervalStatement:!0,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o});return u&&(l=`${u}=${t}`),l}function bS(a){let{xAxisFieldType:i,yAxisFieldType:e,dataContext:t,chartConfig:r,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o}=a,l=r.series[0],u="";if(l.type===A.HeatSeries){let h,p,d=t[nt.xField],c=t[R.originalCategoryValue],f=t[nt.yField],m=t[R.originalYCategoryValue],y=r.axes?.[0]?.valueFormat?.type,v=r.axes?.[1]?.valueFormat?.type;y===A.CategoryAxisFormat?h=Xr({where:rn(l.x,c??d),normalize:!1,escape:!0}):h=Rg({field:l.x,fieldType:i,fieldValue:d,unit:l.xTemporalBinning?.unit,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o}),v===A.CategoryAxisFormat?p=Xr({where:rn(l.y,m??f),normalize:!1,escape:!0}):p=Rg({field:l.y,fieldType:e,fieldValue:f,unit:l.yTemporalBinning?.unit,outTimeZone:n,dataTimeZone:s,runsOnClientQueryEngine:o}),h&&(u=h),p&&(u=Pt([u,p]))}return u}function xS(a){let{xAxisField:i,dataContext:e,chartConfig:t}=a,r="",n=t.series[0],{minValue:s,maxValue:o}=e;if(Number.isFinite(s)&&Number.isFinite(o)&&n.type===A.HistogramSeries){let l=xf(i,n.dataTransformationType),u=e.isLastBin?"<=":"<";r=Pt([`${l}>=${s?.toString()}`,`${l}${u}${o?.toString()}`])}return r}function SS(a){let{chartConfig:i}=a,e=at(i.series),t="";switch(e){case A.ScatterSeries:t=yS(a);break;case A.HeatSeries:t=bS(a);break;case A.RadarSeries:case A.BarSeries:case A.LineSeries:case A.ComboLineAndBarSeries:t=gS(a);break;case A.BoxPlotSeries:t=Sv(a);break;case A.HistogramSeries:t=xS(a);break;case A.PieSeries:t=vS(a);break}return t}async function CS(a){let{numberOfQueries:i,selectionOIDs:e,chartConfig:t,queryConfig:r,options:n,errorStrings:s,queryObject:o}=a,{setTimeBinningInfoWhenNotProvided:l}=n??{},{series:u}=t,h=at(u),p=[],{maxOIDsPerSelectionQuery:d}=Jn();for(let c=0;c<i;c+=1){let f=c*d,m=(c+1)*d-1,y=e.slice(f===0?0:f-1,m),v={...r};switch(v.objectIds=y,h){case A.HeatSeries:p.push(Fv({completeHeatChartDataset:!1,chartConfig:t,queryConfig:v,queryObject:o,errorStrings:s,options:n}));break;case A.PieSeries:case A.BarSeries:case A.LineSeries:case A.RadarSeries:case A.ComboLineAndBarSeries:if(da({xAxisValueFormatType:br(t),setTimeBinningInfoWhenNotProvided:l,seriesConfig:u[0],queryObject:o})){let b=t;"temporalBinning"in b.series[0]&&b.series[0].temporalBinning&&(b.series[0].temporalBinning.trimIncompleteTimeInterval=!1,ss(o)&&(delete b.series[0].temporalBinning.start,delete b.series[0].temporalBinning.end)),p.push(Fc({chartConfig:b,queryConfig:v,queryObject:o,options:n}))}else p.push(yC({queryObject:o,chartConfig:t,options:n,queryConfig:v}));break;case A.BoxPlotSeries:p.push(gC({queryObject:o,chartConfig:t,options:n,errorStrings:s,queryConfig:v}));break;case A.ScatterSeries:p.push(vv({queryObject:o,chartConfig:t,queryConfig:v,options:n,errorStrings:s,sortData:!1,calculateTrendLine:!1}));break;case A.HistogramSeries:p.push(aS({queryObject:o,queryConfig:v,chartConfig:t,x:u[0].x}));break}}return await Promise.all(p)}function PS(a){let{dataFetchingResults:i,numberOfQueries:e,series:t}=a,r=at(t),n=Ae(t),s=[],o=new Map;for(let l=0;l<e;l+=1){let u=i[l];if(u!==void 0){let h;if(r===A.ScatterSeries)h=u.dataItems;else if("data"in u&&u.data){let p=u.data;"dataItems"in p&&(h=p.dataItems),"outliers"in p&&p.outliers&&s.push(...p.outliers),"meanLines"in p&&p.meanLines&&s.push(...p.meanLines)}if(h)if(t[0].type===A.HeatSeries)e>0&&h.forEach(p=>{o.set(`${p[nt.xField]}-${p[nt.yField]}`,p)});else if(t[0].type===A.ScatterSeries){let{x:p,y:d}=t[0];s.push(...h.map(c=>({[p]:c[p],[d]:c[d]})))}else u.valid&&(n===V.PieFromFields?s=go({dataToConvert:h[0],x:vr,y:uo}):n===V.BarAndLineFromFields?s=go({dataToConvert:h[0],x:t[0].x,y:t[0].y}):s.push(...h))}}return o.size>0&&(s=Array.from(o.values())),s}async function Cv(a){let{chartConfig:i,queryConfig:e,chartData:t,currentSelectionOIDs:r,dataWasUpdated:n,queryObject:s,options:o,errorStrings:l}=a,{series:u}=i,{selectionData:h,viewExtentUpdated:p,returnSelectionOIDs:d,chartLimits:c}=o??{},{selectionItems:f,selectionOIDs:m}=h??{},y,v=at(u),b=v!==A.HistogramSeries&&v!==A.HeatSeries&&f!==void 0&&f.length>0&&!(u[0].x in f[0])&&!(vr in f[0])&&!(R.boxPlot.boxPlotCategory in f[0]);if(p!==!0&&d!==!1&&m!==void 0&&m.length>0&&(n===!0||b||m.length!==r?.length||!oo(m,r))){let x=Kl(t);if(x!==void 0&&!bf({dataContext:x[0],chartConfig:i,chartLimits:c}))y=x.filter(_=>{let $=_[Ct.uniqueIdsName];return typeof $=="number"||typeof $=="string"?m?.includes($):!1});else if(m?.[0]!==void 0&&e!==void 0){let{maxOIDsPerSelectionQuery:_}=Jn(),$=Math.ceil(m.length/_),O=await CS({numberOfQueries:$,selectionOIDs:m,queryConfig:e,queryObject:s,options:o,errorStrings:l,chartConfig:i});y=PS({dataFetchingResults:O,numberOfQueries:$,series:u})}}return y}function*$S(a){let{filterList:i,queryObject:e,queryConfig:t}=a;for(let r=0;r<i.length;r+=1){let n={...t};n.where=Pt([n.where,i[r]]),yield Hf({queryObject:e,queryConfig:n,uniqueFeature:!0})}}async function _S(a){let{whereList:i,queryObject:e,queryFilter:t,queryConfig:r}=a,n=[];if(i.length>0){let s=Jn().maxElementsPerSelectionQuery,o=[],l=Math.ceil(i.length/s);for(let h=0;h<l;h+=1){let p=h*s,d=(h+1)*s,c=i.slice(p===0?0:p-1,d),f=Pt(c,"OR");f=Pt([t,f]),o.push(f)}let u=$S({filterList:o,queryObject:e,queryConfig:r});n=(await Promise.all(u)).flat(),n=Array.from(new Set(n))}return n}async function TS(a){let{queryObject:i,queryConfig:e,chartConfig:t,currentSelectionDataItems:r,options:n,errorStrings:s,abortKey:o}=a,l=Ae(t.series),u={valid:!0,data:{dataItems:[]}};if(r!==void 0&&r.length>0){let h=un(t),{x:p}=h,d="y"in h?h.y:"",c=Pr(i).find(x=>x.name===p)?.type,f=[],m=r.reduce((x,_)=>{let $=[];if(Ct.uniqueIdsName in _)f.push(_[Ct.uniqueIdsName]);else{switch(l){case V.BoxPlotMonoFieldAndSplitBy:case V.BoxPlotMultiFieldsAndSplitBy:case V.BoxPlotMonoFieldAndCategoryAndSplitBy:{let w=si(h.query?.where??""),D=`_${me.Average}`;Object.keys(_).forEach(B=>{if(B.includes(D)){let L=B.replace(D,"");L.trim()!==""&&$.push(rn(w,L))}});break}}let O=[d].flat(),F=O.length===1?O[0]:"";if(l===V.BoxPlotMultiFieldsAndCategory){let w=`_${me.FirstQuartile}`,D=Object.keys(_).find(B=>B.includes(w));D!==void 0&&(F=D.replace(w,""))}$.length===0&&$.push(""),$.forEach(w=>{let D=Sv({chartConfig:t,xAxisField:p,yAxisField:F,splitBy:w,dataContext:_,xAxisFieldType:c});x.push(D)})}return x},[]),y=vi(i);if(y!==void 0&&f.length>0){let x=Mi(y).idField;m.push(`${x} IN (${f.join(",")})`)}let v=m.join(" OR "),b={...e};b.where=Pt([b.where,v]),u=await Tc({queryObject:i,chartConfig:t,queryConfig:b,options:n,errorStrings:s,abortKey:o})}return u}async function OS(a){let{queryObject:i,queryConfig:e,chartConfig:t,currentSelectionDataItems:r,currentSelectionOIDs:n,dataForFilterBySelectionChanged:s,fullDatasetBeforeFBS:o,options:l,errorStrings:u,abortKey:h}=a;Ul(i);let{series:p}=t,d=at(p),c=br(t),f={valid:!0},m;s?m=await Cv({chartConfig:t,queryConfig:e,chartData:o,currentSelectionOIDs:n,dataWasUpdated:!0,queryObject:i,options:l,errorStrings:u})??[]:m=vC({chartConfig:t,currentSelectionDataItems:r,options:l});let y=!1;switch(d){case A.HeatSeries:f.data={dataItems:m};break;case A.PieSeries:if(Ae(t.series)===V.PieFromFields){let{x:v,y:b}=t.series[0],x=pa(m);x.forEach(_=>{v in _&&(_[vr]=_[v],delete _[v]),b in _&&(_[uo]=_[b],delete _[b])}),f.data={dataItems:x}}else f.data={dataItems:m};f.count=m.length,y=!0;break;case A.BoxPlotSeries:Sr(t)&&(f=await TS({...a,chartConfig:t,queryObject:i}));break;case A.BarSeries:case A.ComboLineAndBarSeries:case A.RadarSeries:case A.LineSeries:if(m.length===0||!da({xAxisValueFormatType:c,setTimeBinningInfoWhenNotProvided:l?.setTimeBinningInfoWhenNotProvided,seriesConfig:p[0],queryObject:i}))f.data={dataItems:m},f.count=m.length*p.length,y=!0;else{let v={...e};if(r!==void 0&&r.length>0){let b=r.map(_=>bv({xAxisField:p[0].x,dataContext:_,queryObject:i})),x=Pt(b,"OR");v.where=Pt([v.where,x])}f=await Fc({queryObject:i,queryConfig:v,chartConfig:t,options:l})}break;case A.HistogramSeries:{if(m.length===0)f.data={mean:Number.NaN,median:Number.NaN,stddev:Number.NaN,max:Number.NaN,min:Number.NaN,bins:[]},f.count=0;else{let{x:v}=p[0],b=m.map(($,O)=>{let{minValue:F,maxValue:w}=$,D=O===m.length-1?"<=":"<";return`${v} >= ${F} AND ${v} ${D} ${w}`}),x=Pt(b,"OR"),_={...e};_.where=Pt([_.where,x]),f=await gv({queryObject:i,chartConfig:t,queryConfig:_,options:l,errorStrings:u,abortKey:h})}break}case A.ScatterSeries:{if(m.length===0){let{r2:v,trendLinePoints:b}=R.scatterplotSeries;f.data={dataItems:[],r2:v,trendLinePoints:b,count:0},f.count=0}else{let{r2:v,trendLinePoints:b}=Uf({data:m,chartConfig:t});f.data={dataItems:m,r2:v,trendLinePoints:b},f.count=m.length}break}}return y&&f.data!==void 0&&xl({arrayToSort:"dataItems"in f.data?f.data.dataItems:f.data,chartConfig:t}),f}async function Tc(a){let{queryObject:i,chartConfig:e,queryConfig:t,options:r,errorStrings:n,abortKey:s}=a,o={valid:!0},l=qi(e),u=await yc({queryObject:i,queryConfig:t,fetchFullBoxPlotData:!l,options:r,chartConfig:e,abortKey:s});if(!l)o=u;else{let h={dataItems:[]};h.meanLines=u.data.dataItems;let p=mp(e),d=(await yc({queryObject:i,queryConfig:t,fetchFullBoxPlotData:!0,options:r,chartConfig:p,abortKey:s})).data;h.dataItems=d.dataItems,h.outliers=d.outliers,o.data=h}return o}async function wS(a){let{queryObject:i,chartConfig:e,queryConfig:t,options:r,errorStrings:n,abortKey:s,fieldList:o,preFetchedQueryResponse:l}=a,{series:u}=e,{filterBySelection:h}=r??{},p=at(u),d={valid:!0};if(h===!0)d=await OS(a);else switch(p){case A.HeatSeries:Ul(i),d=await Fv({...a,queryObject:i});break;case A.BoxPlotSeries:Sr(e)&&(d=await Tc({...a,chartConfig:e,queryObject:i}));break;case A.BarSeries:case A.ComboLineAndBarSeries:case A.PieSeries:case A.RadarSeries:case A.LineSeries:{let c={queryObject:i,queryConfig:t,chartConfig:e,options:r,abortKey:s,fieldList:o,preFetchedQueryResponse:l};da({xAxisValueFormatType:br(e),setTimeBinningInfoWhenNotProvided:r?.setTimeBinningInfoWhenNotProvided,seriesConfig:u[0],queryObject:i})?d=await Fc(c):d=await yc(c);break}case A.ScatterSeries:d.data=await vv({queryObject:i,queryConfig:t,options:r,chartConfig:e,errorStrings:n,abortKey:s});break;case A.HistogramSeries:d=await gv({queryObject:i,queryConfig:t,chartConfig:e,options:r,abortKey:s,errorStrings:n});break;case A.GaugeSeries:Ul(i),d=await q0({queryObject:i,chartConfig:e,queryConfig:t,options:r,abortKey:s});break}return d}async function g4(a){let{queryObject:i,chartConfig:e,abortKey:t,currentSelectionDataItems:r,currentSelectionOIDs:n,dataForFilterBySelectionChanged:s,fullDatasetBeforeFBS:o,options:l,errorStrings:u,fieldList:h,preFetchedQueryResponse:p}=a,d={valid:!0},c=dp({queryObject:i,chartConfig:e,runtimeDataFilters:l?.runtimeDataFilters,ignoreViewExtent:l?.ignoreViewExtent,viewExtent:l?.view?.extent});return ip(t),d=await wS({chartConfig:e,queryObject:i,queryConfig:c,fullDatasetBeforeFBS:o,currentSelectionDataItems:r,currentSelectionOIDs:n,dataForFilterBySelectionChanged:s,options:l,abortKey:t,errorStrings:u,fieldList:h,preFetchedQueryResponse:p}),d.queryConfig=c,d}function FS(a,i,e){let t=new Map;for(let r=0;r<a.length;r+=1)t.set(a[r],{[e]:a[r]});for(let r=0;r<i.length;r+=1){let n=i[r][e];(typeof n=="string"||typeof n=="number")&&t.set(n,i[r])}return[...t.values()]}async function DS(a){let{seriesData:i,chartConfig:e,queryConfig:t,queryObject:r,categoryOrDateCount:n,behaviorAfterLimit:s,abortKey:o}=a,{series:l}=e,u=i,h=Ae(l),p=br(e);if(s!==Kn.RenderUpToTheLimit&&n!==void 0&&n>i.length&&h!==V.BarAndLineFromFields&&h!==V.BarAndLineNoAggregation&&h!==V.PieNoAggregation&&p===A.CategoryAxisFormat){let{x:d}=l[0],c={...t,returnDistinctValues:!0,outFields:[d]};delete c.outStatistics,delete c.orderByFields,delete c.groupByFieldsForStatistics;let f=(await Cr({queryObject:r,queryConfig:c,featureCount:n,abortKey:o})).map(m=>m.attributes[d]).filter(m=>m!=null);f.length>i.length&&(u=FS(f,i,d))}return u}function AS(a,i){let e=a,{series:t}=i;if(br(i)===A.CategoryAxisFormat&&t[0].query?.outStatistics?.[0].statisticType===J.Count){let r=t.reduce((n,s)=>{let o=s.query?.outStatistics?.[0].outStatisticFieldName??[s.y].flat()[0];return n[o]=0,n},{});for(let n=0;n<a.length;n+=1)a[n]={...r,...a[n]}}return e}var Pv=[V.BarAndLineMonoField,V.BarAndLineMultiFields,V.PieNoAggregation,V.PieFromCategory,V.BoxPlotMonoFieldAndCategory,V.BoxPlotMultiFieldsAndCategory,V.BoxPlotMonoFieldAndCategoryAndSplitBy],VS=8e3;function $v(a,i){let e=a;return i===De.Week?e/=7:i===De.Month?e/=30:i===De.Year&&(e/=365),e=Math.ceil(e),e}function an(a){let{date:i,unit:e,nextOrPrevious:t,size:r}=a;if(r!==void 0&&Number.isFinite(r)){let n=t==="next"?r:-r;switch(e){case De.Second:return lr.fromMillis(i).plus({seconds:n}).valueOf();case De.Minute:return lr.fromMillis(i).plus({minutes:n}).valueOf();case De.Hour:return lr.fromMillis(i).plus({hours:n}).valueOf();case De.Week:case De.Day:return lr.fromMillis(i).plus({days:n}).valueOf();case De.Month:return lr.fromMillis(i).plus({months:n}).valueOf();case De.Year:return lr.fromMillis(i).plus({years:n}).valueOf()}}return i}function LS(a){let{binFirstOrLastIndex:i,data:e,x:t,timeIntervalInfo:r}=a,{unit:n,size:s}=r,o=n===De.Week?(s??1)*7:s,l=e[i][t],u=i,h=an({date:l,unit:n,size:o,nextOrPrevious:"next"}),p=e[u][t];for(;u+1<e.length&&p<h;)u+=1,p=e[u]?.[t];let d=u+1>=e.length,c=u;d&&e[c]!==void 0&&(c+=1);let f=d?an({date:l,unit:n,size:o,nextOrPrevious:"next"}):e[u][t];return{binStartDate:l,binEndDate:f,last:d,nextBinFirstOrLastIndex:u,sliceStartIndex:i,sliceEndIndex:c}}function kS(a){let{binFirstOrLastIndex:i,data:e,x:t,timeIntervalInfo:r}=a,{unit:n,size:s}=r,o=n===De.Week?(s??1)*7:s,l=e[i][t],u=i,h=an({date:l,unit:n,size:o,nextOrPrevious:"previous"}),p=e[u][t];for(;u-1>=0&&p>h;)u-=1,p=e[u]?.[t];let d=u-1<=0,c=i;return d&&e[c]!==void 0&&(c-=1),d&&(u=0),{binStartDate:d?an({date:l,unit:n,size:o,nextOrPrevious:"previous"}):e[u][t],binEndDate:l,nextBinFirstOrLastIndex:u,sliceStartIndex:u,sliceEndIndex:c,last:d}}function IS(a){let{binsToRegroup:i,statisticType:e,y:t,nullPolicy:r}=a,n;r!==yi.Interpolate&&(n=r===yi.Zero?0:null);let s=i.filter(o=>Number.isFinite(o[t]));if(s.length>0)switch(e){case J.Count:case J.Sum:n=Gf(s,o=>o[t]);break;case J.Minimum:n=np(s,o=>o[t]).min;break;case J.Maximum:n=np(s,o=>o[t]).max;break;case J.Average:n=qf(s,o=>o[t]);break;case J.ContinuousPercentile:}return n}function MS(a){let{data:i,seriesConfig:e,timeIntervalInfo:t,dateMinTimestamp:r,dateMaxTimestamp:n}=a,s=[],{unit:o}=t,l=t.size??1,u=e[0],{x:h}=u,p,d;if(Yt(u)&&(d=u.temporalBinning?.nullPolicy,p=u.temporalBinning?.timeAggregationType),l>1||o===De.Week||o===De.Month||o===De.Year){let{query:c}=e[0],f=ur(e),{statisticType:m}=c?.outStatistics?.[0]??Un,y=!1,v=p===ri.End?i.length-1:0,b={binFirstOrLastIndex:v,data:i,x:h,timeIntervalInfo:t};for(;!y;){let x={},{binStartDate:_,binEndDate:$,last:O,nextBinFirstOrLastIndex:F,sliceStartIndex:w,sliceEndIndex:D}=p===ri.End?kS(b):LS(b);if(y=O,x=p===ri.End?x=i[D-1]:x=i[v],$>n&&_<n||_<r&&$>r||_>=r&&$<=n){let B=i.slice(w,D).filter(Q=>!(R.dateBinModel in Q));f.forEach(Q=>{x[Q]=IS({binsToRegroup:B,statisticType:m,y:Q,nullPolicy:d})});let L=B.map(Q=>Q[Zn]).filter(Q=>Q!==void 0),M=gf(L);M!==void 0&&(x[Zn]=M),x[h]=_,x[R.xAxisField]=_,x[R.dateBinningRange]=[_,$],delete x[R.dateBinModel],s.push(x)}else O&&p!==ri.End&&s.length>0&&(s[s.length-1][R.dateBinningRange][1]=s[s.length-1][R.dateBinningRange][1]+1);v=F,b.binFirstOrLastIndex=F}p===ri.End&&(s=s.reverse())}else l===1?s=i.map((c,f)=>{let m=c[h],y=i[f+1]?.[h];return y=typeof y=="number"?y-1:an({date:m,unit:o,size:l,nextOrPrevious:"next"}),{...c,[R.dateBinningRange]:[m,y]}}):s=i;return s}function _v(a){let{dateMinTimestamp:i,dateMaxTimestamp:e,timeIntervalInfo:t}=a,{size:r,unit:n}=t,s=0,o=0;if(r!==void 0&&Number.isFinite(r)&&Number.isFinite(i)&&Number.isFinite(e)){let l=-1,u=lr.fromMillis(i),h=lr.fromMillis(e);switch(n){case De.Second:l=h.diff(u,"seconds").get("seconds");break;case De.Minute:l=h.diff(u,"minutes").get("minutes");break;case De.Hour:l=h.diff(u,"hours").get("hours");break;case De.Day:case De.Month:case De.Year:l=h.diff(u,"days").get("days");break;case De.Week:l=h.diff(u,"weeks").get("weeks");break}Number.isFinite(l)&&(o=Math.ceil(l)+1,s=r===1?o:Math.ceil(o/r))}return{numberOfFinalBinsWithinDataRange:s,numberOfSingleBinsWithinDataRange:o}}function Tv(a){let i=a[0].temporalBinning?.nullPolicy;return a.reduce((e,t)=>{e[R.dateBinModel]=void 0;let r=t.query?.outStatistics?.[0].outStatisticFieldName??[t.y].flat()[0];return i!==yi.Interpolate&&(e[r]=i===yi.Zero?0:null),e},{})}function NS(a){let{dateMaxTimestamp:i,numberOfFinalBinsWithinDataRange:e,numberOfSingleBinsWithinDataRange:t,data:r,seriesConfig:n,timeIntervalInfo:s}=a,{size:o,unit:l}=s,{x:u}=n[0],h=n[0].temporalBinning?.timeAggregationType,p=r[0][u],d=i;if(o!==void 0&&Number.isFinite(o)&&t/e!==o){let c=Math.ceil(t/e)*e-t;l===De.Week&&(c*=7);let f=Tv(n);if(h===ri.End){let m=r[0][u];for(let y=0;y<c;y+=1)m=an({date:m,unit:l,size:1,nextOrPrevious:"previous"}),r.push({...f,[u]:m,[R.xAxisField]:m});c>0&&(p=r[r.length-1][u])}else{let m=r[r.length-1][u];for(let y=0;y<c;y+=1)m=an({date:m,unit:l,size:1,nextOrPrevious:"next"}),r.push({...f,[u]:m,[R.xAxisField]:m});d=r[r.length-1][u]}}return{newDateMin:p,newDateMax:d}}function RS(a){let{numberOfSingleBinsWithinDataRange:i,dataLength:e,unit:t}=a;return $v(e,t)>=i}async function BS(a){let{queryObject:i,queryConfig:e,x:t}=a,r=`MIN_${t}`,n=`MAX_${t}`,s=`COUNT_${t}`,o={...e,outStatistics:[{statisticType:J.Minimum,onStatisticField:t,outStatisticFieldName:r},{statisticType:J.Maximum,onStatisticField:t,outStatisticFieldName:n},{statisticType:J.Count,onStatisticField:t,outStatisticFieldName:s}]};delete o.groupByFieldsForStatistics,delete o.orderByFields;let l=await os({queryObject:i,queryConfig:o}),u=l.get(r),h=l.get(n),p=l.get(s);return typeof u=="string"&&(u=new Date(u).valueOf()),typeof h=="string"&&(h=new Date(h).valueOf()),{dateRange:{dateMinTimestamp:u,dateMaxTimestamp:h},numberOfFeatures:p}}function jS(a){let{newDateMin:i,newDateMax:e,seriesConfig:t,data:r,numberOfSingleBinsWithinDataRange:n,initialNumberOfBins:s,timeIntervalInfo:o}=a,{unit:l}=o,u=r;if(!RS({numberOfSingleBinsWithinDataRange:n,dataLength:s,unit:l})){let{x:h}=t[0],p=t[0].temporalBinning?.timeAggregationType,d=Tv(t),c=p===ri.End?e:i,f=p===ri.End?r.length-1:0;for(;f<r.length&&(p===ri.End&&c>i||p!==ri.End&&c<e);)c!==r[f][h]?u.push({...d,[h]:c,[R.xAxisField]:c}):f=p===ri.End?f-1:f+1,c=an({date:c,unit:l===De.Month||l===De.Year?De.Day:l,size:1,nextOrPrevious:p===ri.End?"previous":"next"})}return u}function ES(a){let{data:i,seriesConfig:e,dateMinTimestamp:t,dateMaxTimestamp:r}=a,n=i;if(e[0].temporalBinning?.trimIncompleteTimeInterval!==!1){let{timeAggregationType:s}=e[0].temporalBinning??{},o=i[0]?.[R.dateBinningRange]?.[0],l=i[i.length-1]?.[R.dateBinningRange]?.[1];if(s===ri.End?o<t:l>r)if(s===ri.End){let u=o;for(;u<t&&i.length>0;)i.shift(),i.length>0&&(u=i[0][R.dateBinningRange]?.[0])}else{let u=l;for(;u>r&&i.length>0;)i.pop(),i.length>0&&(u=i[i.length-1][R.dateBinningRange]?.[1])}}return n}function WS(a){let{groupByFieldsForStatistics:i,dateField:e,queryStartDate:t,queryEndDate:r,y:n,binIndex:s,lastBin:o}=a,l=i===""?jn.groupByCaseBegin:i;return l=Kt(dm,{groupByFieldsForStatistics:l,dateField:e,startDate:`${t}`,endDate:`${r}`,y:[n].flat()[0],binIndex:`${s}`,endDateOperand:o?"<=":"<"}),l}function*HS(a){let{queryObject:i,seriesConfig:e,queryConfig:t,completeData:r}=a;for(let n=0;n<e.length;n+=1){let s=e[n],{query:o,x:l,y:u}=s,h=[{onStatisticField:o?.outStatistics?.[0]?.onStatisticField??"",outStatisticFieldName:J.ContinuousPercentile,statisticType:J.ContinuousPercentile,statisticParameters:{value:.5}}],p=jn.groupByCaseBegin;for(let c=0;c<r.length;c+=1){let f=r[c],[m,y]=f[R.dateBinningRange],v=on(m),b=on(y);p=WS({groupByFieldsForStatistics:p,queryStartDate:v,queryEndDate:b,dateField:l,y:[u].flat()[0],binIndex:c,lastBin:c===r.length-1})}p=`${p} ${jn.groupByCaseEnd}`;let d={...t,groupByFieldsForStatistics:[p],outStatistics:h,orderByFields:void 0};yield Cr({queryObject:i,queryConfig:d,noBatch:!0})}}async function zS(a){let{queryObject:i,data:e,seriesConfig:t,queryConfig:r}=a,n=e,{statisticType:s}=t[0].query?.outStatistics?.[0]??Un;if(s===J.ContinuousPercentile&&n.length>0){let o=HS({queryObject:i,completeData:n,seriesConfig:t,queryConfig:r}),l=(await Promise.all(o)).flat();if(l.length>0){let{isInItem:u,expr:h}=Gl(l[0].attributes);u&&l.forEach(p=>{let d=p.attributes[`${h}`];if(d!==void 0){let[c,f]=d.split("|");if(f!==void 0){let m=p.attributes[J.ContinuousPercentile];n[f][`${c}`]=m}}})}}return n}function Bg(a){let{dataItem:i,nullPolicy:e,statField:t,aggregationType:r}=a;if(t){let n=i[t];if(r===J.Count&&n===0||n===void 0||n===null)switch(!0){case e===yi.Zero:i[t]=0;break;case e===yi.Null:i[t]=null;break;case e===yi.Interpolate:delete i[t];break}}}function XS(a){let{chartConfig:i,queryResults:e,mapToStatField:t,splitByField:r,x:n,y:s,nullPolicy:o,queryObject:l}=a,u=zf(n),h=Pr(l).find(m=>m.name===n)?.type,p=[],d=i.series[0],c="temporalBinning"in d?d.temporalBinning?.trimIncompleteTimeInterval:!1,f="temporalBinning"in d?d.temporalBinning?.timeAggregationType:!1;return e.forEach((m,y)=>{if(!(c&&(y===0&&f===ri.End||y===e.length-1&&f===ri.Start))){let{attributes:v,stackedAttributes:b}=m,x=v[u.lowerBoundaryAlias],_=v[u.upperBoundaryAlias],$=x,O=_,F=(D,B)=>{let L=D;if(B===gr.DateOnly&&(typeof D=="string"&&D.length===10||typeof D=="number"))if(typeof D=="string"){let M=D.split("-");M.length===3&&(L=lr.local(Number(M[0]),Number(M[1]),Number(M[2])).valueOf())}else L=new Date(D),L=new Date(L.valueOf()+L.getTimezoneOffset()*6e4),L=lr.local(L.getFullYear(),L.getMonth()+1,L.getDate()).valueOf();else typeof D=="string"&&["+","-"].forEach(M=>{M&&D.lastIndexOf(M)===D.length-6&&(L=new Date(D.slice(0,D.lastIndexOf(M))).valueOf())});return L};x=F(x,h),_=F(_,h);let w=d.query?.outStatistics?.[0].statisticType??Un.statisticType;if(typeof x=="number"&&typeof _=="number"){let D={...v};D[R.originalServerBinningRange]=[$,O],D[n]=x,D[R.xAxisField]=x,D[R.dateBinningRange]=[x,_],delete D[u.lowerBoundaryAlias],delete D[u.upperBoundaryAlias],b&&r&&!Zt(r)&&t?b.forEach(M=>{let Q=M[r];if(Q===null||typeof Q=="string"||typeof Q=="number"){let ae=t?.get(Q);ae!==void 0&&(D[ae]=M[Ct.outStatistics?.outStatisticFieldName??""],Bg({dataItem:D,statField:ae,nullPolicy:o,aggregationType:w}))}}):typeof s=="string"&&Bg({dataItem:D,statField:s,nullPolicy:o,aggregationType:w});let{featureExtent:B,featureExtentKey:L}=Ov({feature:m,splitByField:r});B&&(D[L]=B),p.push(D)}}}),p}async function YS(a){let{queryObject:i,queryResults:e,x:t,queryConfig:r,seriesConfig:n,dateRange:s,timeIntervalInfo:o}=a,l=e,{dateMinTimestamp:u,dateMaxTimestamp:h}=s;if(u&&h){let p=e.length;if(yo({arrayToSort:l,sortingField:t}),p>1){let{numberOfFinalBinsWithinDataRange:d,numberOfSingleBinsWithinDataRange:c}=_v({dateMinTimestamp:u,dateMaxTimestamp:h,timeIntervalInfo:o}),{newDateMin:f,newDateMax:m}=NS({dateMaxTimestamp:h,data:l,numberOfFinalBinsWithinDataRange:d,numberOfSingleBinsWithinDataRange:c,seriesConfig:n,timeIntervalInfo:o});l=jS({newDateMin:f,newDateMax:m,seriesConfig:n,data:l,initialNumberOfBins:p,numberOfSingleBinsWithinDataRange:c,timeIntervalInfo:o}),yo({arrayToSort:l,sortingField:t}),l=MS({data:l,seriesConfig:n,dateMinTimestamp:u,dateMaxTimestamp:h,timeIntervalInfo:o}),l=ES({data:l,seriesConfig:n,dateMinTimestamp:u,dateMaxTimestamp:h}),i&&(l=await zS({queryObject:i,data:l,seriesConfig:n,queryConfig:r}))}}return l}function qS(a){return Math.floor(Math.min(Math.max(8,Math.sqrt(a??8)),128)+.5)}function GS(a){let{dateRange:i,numberOfFeatures:e}=a,t,r,{dateMinTimestamp:n,dateMaxTimestamp:s}=i;if(n&&s){typeof n=="string"&&(n=new Date(n).valueOf()),typeof s=="string"&&(s=new Date(s).valueOf());let o=qS(e),l=(s-n)/o,u=gp.findIndex(v=>v.threshold>l),h=gp[u],{unitMs:p,preferredIntervalSize:d}=h;({unit:t}=h);let c=l/p,f=d.findIndex(v=>v>=c),m=d[f],y=f===0?d[0]:d[f-1];r=m-c<c-y?m:y}return{size:r,unit:t}}function US(a){let{series:i,isTimeBinningSeries:e,setTimeBinningInfoWhenNotProvided:t}=a,r=!1;if(Yt(i)&&e){let{unit:n,size:s}=i.temporalBinning??{};r=!wf(n,s)&&t===!0}return r}function KS(a){let i=[];for(let e=1;e<=6;e+=1){let t=a[`EXPR_${e}`]??a[`Expr${e}`]??a[`expr${e}`]??a[`EXPR${e}`];t!==null&&i.push(t)}return lr.local(Number(i[0]??1969),Number(i[1]??1),Number(i[2]??1),Number(i[3]??0),Number(i[4]??0),Number(i[5]??0)).valueOf()}function Ov(a){let{feature:i,splitByField:e,chartSubType:t}=a,r;if(i.aggregateGeometries&&"Extent"in i.aggregateGeometries)r=i.aggregateGeometries.Extent;else{let o=i.aggregateGeometries??i.geometry;o?.extent&&(r=o.extent)}let n=r?.toJSON(),s=Zn;return n!==void 0&&e!==void 0&&t!==void 0&&t===V.BarAndLineSplitBy&&(s=i.attributes[e]!==void 0?`${Zn}_${i.attributes[e]}`:Zn),{featureExtent:n,featureExtentKey:s}}function ZS(a){let{input:i,x:e,splitByField:t}=a;return i.reduce((r,n)=>(t!==void 0&&t!==e&&!(R.technicalFieldSplitByField in n)&&delete n[t],Object.assign(r,n)),{})}function ao(a){let{data:i,x:e,splitByField:t}=a,r=i;if(i!==void 0&&i.length>0){let n=new Map;for(let s of i){let o=s[e];if(o==null||o===void 0)continue;let l=n.get(o)??[];l.push(s),n.set(o,l)}r=Array.from(n.values(),s=>ZS({input:s,x:e,splitByField:t}))}return r}function QS(a,i){let e=a,t=at(i);if(t!==A.PieSeries&&t!==A.BoxPlotSeries){let r=ur(i),n=i[0].y;a.forEach(s=>{let o=0;if(r.forEach(l=>{let u=s[l];Number.isFinite(u)&&(o+=u)}),s[R.technicalSortingFieldBySum]=o,Number.isFinite(o)&&o>0){let l=s[n];if(Number.isFinite(l)){let u=l/o;s[R.technicalSortingFieldByPercent]=u}}})}return e}function JS(a,i){let e=i,t=ur(a),r=t.length===1;return t.forEach(n=>{let s=hs(r?void 0:n),o=e[s[me.FirstQuartile]],l=e[s[me.ThirdQuartile]];Number.isFinite(o)&&Number.isFinite(l)&&l>=o&&(e[s[me.IQR]]=l-o)}),e}function eC(a,i){let e=i.series[0],t=a;if(e.type===A.HeatSeries){let{x:r,y:n}=e;t[nt.xField]=t[r]?.toString(),delete t[r],t[nt.yField]=t[n]?.toString(),delete t[n];let s=e.query?.outStatistics?.[0]?.outStatisticFieldName;s&&(t[nt.valueField]=t[s],delete t[s])}return t}function Oc(a,i){[i].flat().forEach(e=>{e&&(a[e]===void 0&&(a[e]=a[e.toUpperCase()]!==void 0?a[e.toUpperCase()]:a[e.toLowerCase()]),a[e]!==void 0?(e!==e.toUpperCase()&&delete a[e.toUpperCase()],e!==e.toLowerCase()&&delete a[e.toLowerCase()]):delete a[e])})}function tC(a,i){let e=[];Ct.outStatistics.outStatisticFieldName&&Object.keys(a).includes(Ct.outStatistics.outStatisticFieldName)?e=[Ct.outStatistics.outStatisticFieldName]:e=Array.from(new Set(i.flatMap(t=>t.query?.outStatistics?.map(r=>r.outStatisticFieldName)))),Oc(a,e)}function iC(a,i){let e={...a};return a!==void 0&&i[0]!==void 0&&(e=Object.keys(a).reduce((t,r)=>{let n=i.find(s=>s.outStatisticFieldName?.toLowerCase()===r.toLowerCase())?.onStatisticField;return n!==void 0&&a[r]!==void 0&&n!==r?t[n]=a[r]:t[r]=a[r],t},{})),e}function rC(a){let{dataItem:i,splitByField:e,y:t,fieldOID:r}=a;if(i!==void 0&&!Zt(e)&&!Zt(t)){let n=i[e],s=`${t}_${n?.toString()}`;i[s]=i[t],r&&t!==r&&delete i[t]}}function aC(a,i){Object.keys(a).forEach(e=>{if(e.startsWith(`${i}_`)){let t=e.slice(i.length+1);a[t]=a[e],delete a[e]}})}function nC(a,i){let e=1;switch(a){case V.BarAndLineFromFields:case V.PieFromFields:e=i.series[0].query?.outStatistics?.length??1;break;case V.BoxPlotMultiFields:case V.BoxPlotMultiFieldsAndSplitBy:e=i.series[0].y.length;break;case V.BarAndLineNoAggregation:case V.BoxPlotMonoField:case V.BoxPlotMonoFieldAndCategory:case V.BoxPlotMultiFieldsAndCategory:case V.BoxPlotMonoFieldAndSplitBy:case V.BoxPlotMonoFieldAndCategoryAndSplitBy:case V.PieFromCategory:case V.BarAndLineSplitByNoAggregation:case V.PieNoAggregation:case V.BarAndLineSplitBy:case V.BarAndLineMonoField:case V.BarAndLineMultiFields:case V.NonSpecific:}return e}function sC(a){let{attributes:i,showMean:e,chartSubType:t}=a;e&&(t===V.BoxPlotMonoFieldAndSplitBy||t===V.BoxPlotMultiFieldsAndSplitBy||t===V.BoxPlotMonoFieldAndCategoryAndSplitBy)&&(i[R.boxPlot.boxPlotMeanLineMarkerId]=!0)}function oC(a){let{queryResponse:i,chartConfig:e,maxCategoryCount:t}=a,r=Ae(e.series);return t&&Number.isFinite(t)&&t<i.length&&Pv.includes(r)?i.slice(0,t):i}function lC(a){let{attributes:i,uniqueCategoryList:e,maxCategoryCount:t,x:r,chartSubType:n}=a,s=!1;if(r&&t&&Number.isFinite(t)&&!Pv.includes(n))if((n===V.BarAndLineFromFields||n===V.PieFromFields)&&Object.keys(i).length>t)Object.keys(i).filter(o=>o!==J.EnvelopeAggregate).forEach((o,l)=>{l>=t&&delete i[o]});else{let o=i[r];o!==void 0&&(e.size===t&&!e.has(o)?s=!0:e.add(o))}return s}function uC(a){let{attributes:i,xValue:e,yValue:t,x:r,y:n,xFieldDomain:s,yFieldDomain:o,chartType:l,chartSubType:u,xAxisValueFormat:h,yAxisValueFormat:p}=a,d,c;u!==V.PieFromFields&&(s&&(typeof e=="string"||typeof e=="number")&&(d=hp(e,s)),o&&l===A.HeatSeries&&typeof n=="string"&&(typeof t=="string"||typeof t=="number")&&(c=hp(t,o)),d!==void 0&&d!==e&&(typeof d!="string"||!Br(h))&&(i[R.originalCategoryValue]=i[r],i[r]=d),typeof n=="string"&&!Br(p)&&c!==void 0&&c!==t&&(i[R.originalYCategoryValue]=i[n],i[n]=c))}function hC(a){let i,[e,t,r]=a.split(":");return Number.isFinite(Number(e))&&Number.isFinite(Number(t))&&Number.isFinite(Number(r))&&(i=new Date(2e3,0,1,Number(e),Number(t),Number(r)).valueOf()),i}function wv(a){let{queryObject:i,queryResponse:e,chartConfig:t,mapToStatField:r,splitByField:n,isTimeBinningSeries:s,resultLimit:o,showMean:l,chartLimits:u,fieldList:h}=a,{series:p}=t,d=Ae(p),c=at(p),{x:f}=p[0],m="y"in p[0]?p[0].y:void 0,y=p[0].query?.outStatistics??[],v=co(t?.axes?.[0]?.valueFormat),{originalYCategoryValue:b,originalCategoryValue:x,originalDateValue:_}=R,$=up(i,f),O=typeof m=="string"?up(i,m):void 0,F=im(h??[]).includes(f),w=[],D=0,B=new Set,{maxCategoryCount:L}=mo(u),M=oC({queryResponse:e,chartConfig:t,maxCategoryCount:L});for(let Q=0;M[Q]&&Q<M.length&&!(o!==void 0&&D>=o);Q+=1){D+=nC(d,t);let ae=M[Q],K={...ae.attributes};if(lC({attributes:K,uniqueCategoryList:B,maxCategoryCount:L,x:f,chartSubType:d}))continue;if(tC(K,p),d===V.PieFromFields||d===V.BarAndLineFromFields)K=iC(K,y);else if(typeof m=="string"&&d===V.BarAndLineSplitByNoAggregation){let qe=vi(i),{idField:ne,isTraditionalTypeOID:Ne}=Mi(qe);rC({dataItem:K,splitByField:n,y:m,fieldOID:Ne?ne:void 0})}else m&&(d===V.BoxPlotMonoField||d===V.BoxPlotMonoFieldAndCategory||d===V.BoxPlotMonoFieldAndSplitBy||d===V.BoxPlotMonoFieldAndCategoryAndSplitBy)&&aC(K,typeof m=="string"?m:m[0]);sC({attributes:K,showMean:l,chartSubType:d});let z=K[f],Te=typeof m=="string"?K[m]:void 0;z===null&&p[0]?.query?.fetchNullValues===!0&&d!==V.PieFromFields&&(K[x]=null,z=R.nullValue),v||(F&&typeof z=="string"?z=new Date(z).valueOf():s&&(z=KS(K))),typeof z=="string"&&h?.find(qe=>qe.name===f)?.type===gr.TimeOnly&&(K[x]=z,z=hC(z));let{outStatisticFieldName:ue}=Ct.outStatistics??{},{featureExtent:Me,featureExtentKey:ct}=Ov({feature:ae,splitByField:n,chartSubType:d});if(Me&&(K[ct]=Me),d===V.BarAndLineSplitBy&&ue!==void 0){let qe=K[n],ne=r?.get(qe);ne!==void 0&&(qe===n&&(K[R.technicalFieldSplitByField]=K[ne]),K[ne]=K[ue]),delete K[ue]}else(d===V.PieNoAggregation||d===V.BarAndLineNoAggregation||d===V.BarAndLineSplitByNoAggregation)&&(F?K[_]=z:z!==R.nullValue&&(K[x]=z),fo({isXAxis:!0,chartType:c,valueFormat:t.axes?.[0]?.valueFormat})&&(K[R.xAxisField]=`${z}-${Q}`),K[Ct.uniqueIdsName]=ae.getObjectId());c===A.BoxPlotSeries&&(K=JS(p,K)),c===A.PieSeries&&typeof z=="number"&&(K[x]===void 0&&(K[x]=K[f]),z=`${z}`),z!==void 0&&(K[x]===void 0&&(K[x]=K[f]),K[f]===null?K[f]=c===A.HeatSeries?"null":R.nullValue:K[f]=z,uC({attributes:K,xValue:z,yValue:Te,x:f,y:m,xFieldDomain:$,yFieldDomain:O,chartType:c,chartSubType:d,xAxisValueFormat:t.axes?.[0].valueFormat,yAxisValueFormat:t.axes?.[1]?.valueFormat}),c===A.HeatSeries&&typeof m=="string"&&K[m]===null&&(K[m]="null",K[b]=null),K[R.xAxisField]===void 0&&(K[R.xAxisField]=K[f])),K=eC(K,t),w.push(K)}return w}async function Fh(a){let{queryObject:i,uniqueQuery:e,chartConfig:t,mapToStatField:r,abortKey:n,elementCount:s,isTimeBinningSeries:o,showMean:l,chartLimits:u,usePopupTemplateFieldsInfo:h,preFetchedQueryResponse:p}=a,{series:d}=t,c=Ae(d),f=[],m=c===V.BarAndLineSplitBy||c===V.BarAndLineSplitByNoAggregation?si(d[0].query?.where):"",y=p??await Cr({queryObject:i,queryConfig:e,featureCount:s,abortKey:n}),v=Pr(i,h),{x:b}=d[0];return f=wv({queryObject:i,queryResponse:y,chartConfig:t,mapToStatField:r,splitByField:m,isTimeBinningSeries:o,fieldList:v,resultLimit:e.num,showMean:l,chartLimits:u}),c!==V.BarAndLineSplitByNoAggregation&&c!==V.BarAndLineFromFields&&(m!==""&&(f=ao({data:f,x:b,splitByField:m})),f=QS(f,d)),f}async function wc(a){let{chartConfig:i,queryObject:e,queryConfig:t,numberMaxOfFeaturesToFetch:r,behaviorAfterLimit:n,isGaugeByFeature:s}=a,{series:o}=i,l=Ae(o),{x:u}=o[0],h=o.length,p,d;if(l===V.BoxPlotMonoField||l===V.BoxPlotMonoFieldAndSplitBy?(d=h,p=d):l===V.BoxPlotMultiFields||l===V.BoxPlotMultiFieldsAndSplitBy?(d=i.series[0].y.length,p=d):l===V.PieFromFields||l===V.BarAndLineFromFields?(d=o[0].query?.outStatistics?.filter(c=>c.statisticType!==J.EnvelopeAggregate).length??0,p=d):p=await Wf({queryObject:e,x:u,chartSubType:l,queryConfig:t,isGaugeByFeature:s}),p!==void 0){let c=l===V.BoxPlotMonoField||l===V.BoxPlotMonoFieldAndCategory||l===V.BoxPlotMonoFieldAndSplitBy;d=Xl(l)&&!c?p*h:p}return n===Kn.RenderUpToTheLimit&&d!==void 0&&r!==void 0&&r<d&&(d=r,p=Math.ceil(d/h)),{categoryOrDateCount:p,elementCount:d}}async function yc(a){let{chartConfig:i,queryConfig:e,fetchFullBoxPlotData:t,options:r,queryObject:n,abortKey:s,fieldList:o,preFetchedQueryResponse:l}=a,u=qi(i),{chartLimits:h,usePopupTemplateFieldsInfo:p}=r??{},d=r?.replaceNoValueCategoryWithZero??R.options.replaceNoValueCategoryWithZero,{behaviorAfterLimit:c}=h??{},f,m={valid:!0},y,v=!1,b=i.series,x=b[0],_=Ae(i.series);if(Hr(n))f=at(b)===A.BarSeries?await vm(a):m;else{if(x!==void 0){let $=at(b),{uniqueQuery:O,mapToStatField:F}=Pl({chartConfig:i,queryObject:n,queryConfig:e,fetchFullBoxPlotData:t,options:r}),{categoryOrDateCount:w,elementCount:D}=await wc({chartConfig:i,queryObject:n,queryConfig:e,behaviorAfterLimit:c,numberMaxOfFeaturesToFetch:O.num}),B=!Number.isFinite(D),L=B||Er({count:D??0,seriesCount:b.length,chartType:$,chartLimits:h});if(L&&(y=await Fh({queryObject:n,uniqueQuery:O,chartConfig:i,preFetchedQueryResponse:l,mapToStatField:F,elementCount:D,isTimeBinningSeries:!1,showMean:u,chartLimits:h,usePopupTemplateFieldsInfo:p,abortKey:s}),Sr(i)&&y!==void 0&&(m.data=await R0({data:y,queryObject:n,fetchFullBoxPlotData:t,uniqueQuery:O,chartConfig:i,elementCount:D,chartLimits:h,abortKey:s}),h?.maxBoxPlotOutlierLimit!==void 0&&(L=(m.data.outliers??[]).length<=h.maxBoxPlotOutlierLimit,v=!L)),B&&(w=y.length,D=Xl(_)?w*b.length:w,L=Er({count:D,seriesCount:b.length,chartType:$,chartLimits:h})),L)){if($===A.PieSeries){_===V.PieFromFields&&(y=go({dataToConvert:y[0],x:vr,y:uo,fieldList:o}));let M="";_===V.PieFromFields?M=uo:"y"in x&&typeof x.y=="string"&&(M=x.y),Sf(y,M)?m.data={dataItems:y}:_0(m,Je.PieChartMixOfNegativePositiveSlices)}else if(($===A.RadarSeries||$===A.BarSeries||$===A.LineSeries||$===A.ComboLineAndBarSeries)&&(_===V.BarAndLineFromFields&&"y"in x&&typeof x.y=="string"?y=go({dataToConvert:y[0],x:x.x,y:x.y,fieldList:o}):y=await DS({queryObject:n,seriesData:y,chartConfig:i,queryConfig:e,categoryOrDateCount:w,behaviorAfterLimit:c,abortKey:s}),D=Xl(_)?y.length*b.length:y.length,L=Er({count:D,seriesCount:b.length,chartType:$,chartLimits:h}),L)){d&&(y=AS(y,i));let M={};if(Yt(x)){let{size:Q,unit:ae}=x.temporalBinning??{};Q!==void 0&&ae!==void 0&&(M={size:Q,unit:ae})}m.data={dataItems:y,timeIntervalInfo:M}}}L||Ph({dataInfo:m,chartType:$,subError:{outlierLimit:v}}),m.count=D}f=m}return f}function pC(a){let i,{start:e,end:t}=ap({field:"",unit:a,addIntervalStatement:!1});return t&&(i=Array.from({length:t+(e===0?1:0)},(r,n)=>(n+(e??1)).toString())),i}function dC(a){return a.hideEmptyRowsAndColumns===!0&&(a.nullPolicy!==yi.Zero||a.series[0].query?.outStatistics?.[0].statisticType===J.Count)}function cC(a){let{dataItems:i,valueField:e,filterOutZero:t}=a,r=[null];t&&r.push(0);let n=new Set(i.filter(o=>!r.includes(o[e])).map(o=>o[nt.xField])),s=new Set(i.filter(o=>!r.includes(o[e])).map(o=>o[nt.yField]));return i.filter(o=>n.has(o[nt.xField])&&s.has(o[nt.yField]))}function fC(a){let{dataItems:i,xUniqueValues:e,yUniqueValues:t,valueField:r,emptyCellValue:n,x:s,y:o,queryObject:l}=a,u=[],h=new Set;for(let p of i){let d=p[R.originalCategoryValue]!==void 0?p[R.originalCategoryValue]:p[nt.xField],c=p[R.originalYCategoryValue]!==void 0?p[R.originalYCategoryValue]:p[nt.yField];h.add(`${d}|${c}`)}for(let p of e){let d=String(p);for(let c of t){let f=String(c);if(!h.has(`${d}|${f}`)){let m=l?ls({queryObject:l,fieldName:s,fieldValue:d})??p:p,y=l?ls({queryObject:l,fieldName:o,fieldValue:f})??c:c;u.push({[R.originalCategoryValue]:p===null?null:p,[R.originalYCategoryValue]:c===null?null:c,[nt.xField]:p===null?"null":m,[nt.yField]:c===null?"null":y,[r]:n})}}}return u}function jg(a){let{day:i,month:e,includeLeapDay:t}=a;return e===2&&i>(t?29:28)||[4,6,9,11].includes(e)&&i>30}async function Fv(a){let{chartConfig:i,queryConfig:e,queryObject:t,completeHeatChartDataset:r=!0,errorStrings:n,options:s,abortKey:o}=a,l={valid:!0},u;if(rs(i)){let{nullPolicy:h}=i,p=i.series[0],{x:d,y:c,query:f,xTemporalBinning:m,yTemporalBinning:y}=p,v=f?.outStatistics?.[0]?.outStatisticFieldName??"",b=f?.outStatistics?.[0]?.statisticType??J.Count;e?.outStatistics?.[0]&&cv(e.outStatistics[0])&&!("statisticParameters"in e?.outStatistics[0])&&(e.outStatistics[0].statisticParameters={value:R.defaultStatParameterValue});let x=dC(i),_=nt.valueField,$=h===yi.Zero?0:null;if(yp(i)){let O=await jf({chartConfig:i,queryObject:t,queryConfig:e,returnFeaturesExtent:s?.returnFeaturesExtent,errorStrings:n,abortKey:o});if(!Er({count:O?.length??0,seriesCount:1,chartType:A.HeatSeries,chartLimits:s?.chartLimits}))Ph({dataInfo:l,chartType:A.HeatSeries});else if(typeof O?.[0]=="object"){let F=Pr(t,s?.usePopupTemplateFieldsInfo);u=wv({queryObject:t,queryResponse:O,chartConfig:i,splitByField:"",isTimeBinningSeries:!1,chartLimits:s?.chartLimits,resultLimit:e.num,fieldList:F});let w=await Jl({queryObject:t,queryConfig:e,category:d,abortKey:o}),D=await Jl({queryObject:t,queryConfig:e,category:c,abortKey:o});u.length!==w?.length*D?.length&&(u=[...u,...fC({dataItems:u,xUniqueValues:w,yUniqueValues:D,valueField:_,emptyCellValue:$,x:d,y:c,queryObject:t})],x&&(u=cC({dataItems:u,valueField:_,filterOutZero:b===J.Count})))}}else{let O=await Bf({chartConfig:i,queryObject:t,queryConfig:e,options:s,errorStrings:n}),F=y?pC(y.unit):await Jl({queryObject:t,queryConfig:e,category:c,abortKey:o}),w=0;u=O?.features.flatMap(D=>{let B=[],{attributes:L,stackedAttributes:M}=D,Q=[];if(M?.forEach(ae=>{let K=`${ae[c]}`;Q.push(K),B.push({[nt.xField]:`${L[Ct.heatChartLowerBoundaryAlias]}`,[nt.yField]:K,[_]:ae[v]})}),r&&F&&Q.length!==F?.length){let ae=F.filter(K=>!Q.includes(K.toString()));x&&(ae.length!==F.length||Q.length===0)||ae.forEach(K=>{Number.isFinite(Number(L[Ct.heatChartLowerBoundaryAlias]))&&Number.isFinite(Number(K))&&(m?.unit===lo.DayOfMonth&&y?.unit===lo.MonthOfYear&&jg({day:Number(L[Ct.heatChartLowerBoundaryAlias]),month:Number(K),includeLeapDay:i.includeLeapDay})||y?.unit===lo.DayOfMonth&&m?.unit===lo.MonthOfYear&&jg({day:Number(K),month:Number(L[Ct.heatChartLowerBoundaryAlias]),includeLeapDay:i.includeLeapDay}))||B.push({[nt.xField]:`${L[Ct.heatChartLowerBoundaryAlias]}`,[nt.yField]:K,[_]:h===yi.Zero?0:null})})}return w+=B.length,B}),Er({count:w,seriesCount:1,chartType:A.HeatSeries,chartLimits:s?.chartLimits})||Ph({dataInfo:l,chartType:A.HeatSeries})}}return u&&(l.data={dataItems:u}),l}function mC(a){let{chartConfig:i,options:e,data:t}=a,r=i.series,n=t,s=Yh(i,e?.chartLimits);if(s!==void 0){let o=ur(r);if(o.length===1)n=t.filter(l=>Number.isFinite(l[o[0]])).slice(0,s);else if(t.length*o.length>s){let l=[],u=0,h=0;for(;u<=s&&h<t.length;){let p=t[h];if(l.push(p),u+=o.filter(d=>Number.isFinite(p[d])).length,u>s){let d=u-s,c=o.length-1;for(;d!==0&&c>=0;){let f=o[c];Number.isFinite(p[f])&&(delete p[f],d-=1),c-=1}}h+=1}n=l}}return n}async function Fc(a){let{chartConfig:i,queryConfig:e,queryObject:t,abortKey:r,options:n,preFetchedQueryResponse:s}=a,{chartLimits:o,usePopupTemplateFieldsInfo:l}=n??{},{behaviorAfterLimit:u}=o??{},h=i.series,p=h[0],{x:d}=p,c=si(p.query?.where),f={valid:!0},m;if(Yt(p)){let{temporalBinning:y}=p;if(t&&y){let{unit:v,size:b}=y,x=1,_={unit:v,size:b},$=!1,O=US({series:p,isTimeBinningSeries:!0,setTimeBinningInfoWhenNotProvided:n?.setTimeBinningInfoWhenNotProvided}),F=!ss(t)||O?await BS({queryObject:t,queryConfig:e,x:d}):void 0;O&&F&&F.numberOfFeatures>0&&F.dateRange.dateMaxTimestamp!==void 0&&F.dateRange.dateMinTimestamp!==void 0&&(_=GS(F),Pr(t).find(L=>L.name===d)?.type===gr.DateOnly&&_.unit!==void 0&&[De.Hour,De.Minute,De.Second].includes(_.unit)&&(_.unit=De.Day,_.size=1),y.size=_.size,y.unit=_.unit);let{uniqueQuery:w,mapToStatField:D}=Pl({chartConfig:i,queryConfig:e,queryObject:t,timeIntervalInfo:_,options:n}),B=Er({count:x??0,seriesCount:h.length,chartType:A.LineSeries,chartLimits:o});if(B){if(ss(t)){let L=s?.[0]instanceof Ix?s:await rp({queryObject:t,dateField:d,splitByField:c,queryConfig:w,temporalBinning:y}),M="y"in p&&typeof p.y=="string"?p.y:void 0;if(m=XS({chartConfig:i,queryResults:L,mapToStatField:D,splitByField:c,x:d,y:M,nullPolicy:y.nullPolicy,queryObject:t}),!Er({count:m.length,seriesCount:h.length,chartType:A.LineSeries,chartLimits:o})){let Q=ur(h),ae=m.filter(K=>Q.some(z=>z in K&&Number.isFinite(K[z]))).length;Er({count:ae,seriesCount:h.length,chartType:A.LineSeries,chartLimits:o})||(B=!1)}}else if(F?.dateRange.dateMinTimestamp&&F.dateRange.dateMaxTimestamp){let{numberOfFinalBinsWithinDataRange:L}=_v({dateMinTimestamp:F.dateRange.dateMinTimestamp,dateMaxTimestamp:F.dateRange.dateMaxTimestamp,timeIntervalInfo:_});x=L*h.length,x=$v(x,_.unit),m=await Fh({queryObject:t,uniqueQuery:w,chartConfig:i,mapToStatField:D,elementCount:x,chartLimits:o,isTimeBinningSeries:!0,usePopupTemplateFieldsInfo:l,abortKey:r}),m=await YS({queryObject:t,queryConfig:e,queryResults:m,x:d,seriesConfig:h,dateRange:F.dateRange,timeIntervalInfo:_})}Lf(t)&&m&&m?.length===VS&&($=!0),u===Kn.RenderUpToTheLimit&&m&&(m=mC({chartConfig:i,options:n,data:m}))}B||(f.valid=!1,f.invalidType=Je.LineChartExceedsLimit),m&&m.length>0&&(m[m.length-1][R.lastTemporalBin]=!0),f.data={dataItems:m,timeIntervalInfo:_,serverLimitReached:$},f.count=x}}return f}async function yC(a){let{chartConfig:i,queryConfig:e,queryObject:t,abortKey:r,options:n}=a,s=qi(i),{setTimeBinningInfoWhenNotProvided:o,chartLimits:l,usePopupTemplateFieldsInfo:u}=n??{},h={valid:!0},p=i.series,d=da({seriesConfig:p[0],xAxisValueFormatType:br(i),setTimeBinningInfoWhenNotProvided:o,queryObject:t}),{uniqueQuery:c,mapToStatField:f}=Pl({chartConfig:i,queryObject:t,queryConfig:e,fetchFullBoxPlotData:!s,options:n}),m=await Fh({queryObject:t,uniqueQuery:c,elementCount:1,chartConfig:i,mapToStatField:f,isTimeBinningSeries:d,showMean:s,chartLimits:l,usePopupTemplateFieldsInfo:u,abortKey:r});return Sr(i)&&(m=dv({chartConfig:i,data:m,calculateZScore:!1})),h.data={dataItems:m},h}async function gC(a){let{chartConfig:i,queryConfig:e,queryObject:t,abortKey:r,options:n,errorStrings:s}=a,o={valid:!0};if(Sr(i)){let l=Sr(i)?i.showMean:!1;o=await Tc({queryObject:t,chartConfig:i,queryConfig:e,options:n,errorStrings:s,abortKey:r}),l&&o.data&&"dataItems"in o.data&&"meanLines"in o.data&&o.data.meanLines&&(o.data.dataItems=[...o.data.dataItems,...o.data.meanLines])}return o}function Dv(a){let{itemsA:i,itemsB:e,isPieFromFields:t,x:r,y:n,outStatisticFieldName:s}=a,o=pa(i),l=pa(e),u=!1;if(o===void 0&&l!==void 0||o!==void 0&&l===void 0)u=!0;else if(!t){let h=[R.originalCategoryValue,R.originalYCategoryValue,R.originalDateValue,R.xAxisField,R.technicalSortingFieldBySum,R.technicalSortingFieldByPercent,R.pieChart.technicalFieldSlicePercent,R.pieChart.technicalFieldGroupedSlices,R.pieChart.technicalFieldSliceId,R.originalServerBinningRange,R.lastTemporalBin,R.technicalFieldSplitByField,Ct.uniqueIdsName,nt.valueField,...Qc],p=(m,y)=>{let v=y[R.originalCategoryValue];v!==void 0&&r&&(y[r]=v);let b=y[R.originalYCategoryValue];b!==void 0&&n&&(y[n]=b),r&&y[nt.xField]!==void 0&&(y[r]=y[R.originalCategoryValue]!==void 0?y[R.originalCategoryValue]:y[nt.xField],delete y[nt.xField]),n&&y[nt.yField]!==void 0&&(y[n]=y[R.originalYCategoryValue]!==void 0?y[R.originalYCategoryValue]:y[nt.yField],delete y[nt.yField]),s&&y[nt.valueField]!==void 0&&(y[s]=y[nt.valueField],delete y[nt.valueField]);let x={};return Object.keys(y).forEach(_=>{!h.includes(_)&&!_.includes(R.rendererSymbolField)&&(x[_]=y[_])}),m.push(x),m},d=(m,y)=>JSON.stringify(m).localeCompare(JSON.stringify(y)),c=o?.reduce(p,[])?.sort(d),f=l?.reduce(p,[])?.sort(d);c&&f&&r&&c.length!==f.length&&(c=ao({data:c,x:r}),f=ao({data:f,x:r})),u=c?.length!==f?.length||!oo(c,f)}return u}function vC(a){let{chartConfig:i,currentSelectionDataItems:e,options:t}=a,{selectionData:r}=t??{},n=[];if(i!==void 0){let s=i.series,o=Ae(s),{selectionItems:l}=r??{};if(l!==void 0&&Dv({itemsA:l,itemsB:e,isPieFromFields:Ae(i.series)===V.PieFromFields,x:i.series[0].x,y:"y"in i.series[0]?i.series[0].y.toString():void 0,outStatisticFieldName:i.series[0].query?.outStatistics?.[0]?.outStatisticFieldName})?n=l:n=e??[],s.length>1&&o!==V.BarAndLineNoAggregation&&o!==V.BarAndLineSplitByNoAggregation){let u=si(s[0].query?.where);n=ao({data:n,x:s[0].x,splitByField:u})}xl({arrayToSort:n,chartConfig:i})}return n??[]}var en={Outlier:"outlier",Box:"box",OutlierToOutlier:"outlier-outlier",OutlierToBox:"outlier-box",BoxToOutlier:"box-outlier",BoxToBox:"box-box"};function bC(a,i){let e=a[R.boxPlot.boxPlotOutlierId]===!0?en.Outlier:en.Box,t=typeof i=="number"?en.Outlier:en.Box;return`${e}-${t}`}function xC(a){let{oneSelectedItem:i,dataContext:e,selectedOutlierKey:t}=a;return i[t]===e[t]}function SC(a){let{elementMin:i,elementMax:e,selectedOutlierValue:t}=a,r;return typeof i=="number"&&typeof e=="number"&&typeof t=="number"&&(r=t>=i&&t<=e),r}function CC(a){let{selectedMin:i,selectedMax:e,elementOutlierValue:t,oneSelectedItem:r,iqrField:n}=a,s;typeof i=="number"&&typeof e=="number"&&typeof t=="number"&&(s=t>=i&&t<=e);let o=n in r;return s!==!1&&o}function PC(a){let{selectedMin:i,selectedMax:e,elementMin:t,oneSelectedItem:r,elementMax:n,iqrField:s}=a,o;typeof t=="number"&&typeof n=="number"&&typeof i=="number"&&typeof e=="number"&&(o=!(t>=e||n<=i));let l=s in r;return o!==!1&&l}function $C(a){let{oneSelectedItem:i,dataContext:e,xAxisField:t}=a,r=e[R.originalCategoryValue]??e[R.boxPlot.boxPlotCategory]??e[t],n=i[R.originalCategoryValue]??i[R.boxPlot.boxPlotCategory]??i[t];return r===n}function _C(a){let{chartSubType:i,yAxisField:e,splitBy:t,showOutliers:r}=a,n=i===V.BoxPlotMultiFieldsAndCategory?e:void 0,s={y:n,splitBy:t},o=He({...s,key:me.Outlier}),l=He({...s,key:me.Max,showOutliers:r}),u=He({...s,key:me.Min,showOutliers:r}),h=He({...s,key:me.Max,showOutliers:!1}),p=He({...s,key:me.Min,showOutliers:!1}),d=He({...s,key:me.Max,showOutliers:!0}),c=He({...s,key:me.Min,showOutliers:!0}),f=He({splitBy:t,y:n,key:me.IQR});return{selectedOutlierKey:o,maxField:l,minField:u,selectedMaxFieldWoOutliers:h,selectedMinFieldWoOutliers:p,selectedMaxFieldWithOutliers:d,selectedMinFieldWithOutliers:c,iqrField:f}}function TC(a){let{elementDataContext:i,layerOidField:e,xAxisField:t,splitBy:r,yAxisField:n,chartSubType:s,showOutliers:o}=a,l=i,u;if(l?.[R.boxPlot.boxPlotMeanLineMarkerId]===!0){let h=He({splitBy:r,key:me.Average});u=p=>{let d=!t||!(t in p&&t in l)||p[t]===l[t],c=h in p&&h in l;return d&&c}}else t!==void 0&&n!==void 0&&(u=h=>{let p;if(e!==void 0&&e in h&&e in l)p=h[e]===l[e];else{let{selectedOutlierKey:d,maxField:c,minField:f,selectedMaxFieldWoOutliers:m,selectedMinFieldWoOutliers:y,selectedMaxFieldWithOutliers:v,selectedMinFieldWithOutliers:b,iqrField:x}=_C({chartSubType:s,yAxisField:n,splitBy:r,showOutliers:o}),_=l[d],$=h[d],O=l[f],F=l[c],w=h[y]??h[b],D=h[m]??h[v],B=$C({oneSelectedItem:h,dataContext:l,xAxisField:t});if(B)switch(bC(h,_)){case en.OutlierToOutlier:B=xC({oneSelectedItem:h,dataContext:l,selectedOutlierKey:d});break;case en.OutlierToBox:B=SC({elementMin:O,elementMax:F,selectedOutlierValue:$});break;case en.BoxToOutlier:B=CC({selectedMin:w,selectedMax:D,elementOutlierValue:_,oneSelectedItem:h,iqrField:x});break;case en.BoxToBox:B=PC({selectedMin:w,selectedMax:D,elementMin:O,oneSelectedItem:h,elementMax:F,iqrField:x});break}p=B===!0}return p});return u}function Av(a){let{layerOidField:i,sliceDataContext:e,selectionDataContext:t,xAxisField:r}=a,n=!1;if(i!==void 0&&i in e&&i in t)n=t[i]?.toString()===e[i]?.toString();else{let s=e[R.originalCategoryValue];s===void 0&&(s=e[r]),s===void 0&&(s=e[vr]);let o=t[R.originalCategoryValue];o===void 0&&(o=t[r]),o===void 0&&(o=t[vr]),n=s!==void 0&&o!==void 0&&s===o}return n}function yh(a){let{dataContext:i,specificField:e,xOrY:t}=a,r=i[t==="x"?R.originalCategoryValue:R.originalYCategoryValue];return r===void 0&&e&&(r=i[e]),r===void 0&&(r=i[t==="x"?nt.xField:nt.yField]),r}function Vv(a){let{options:i,elementDataContext:e,selectionDataItems:t,layerOidField:r,xAxisField:n,yAxisField:s,chartType:o,splitBy:l,chartSubType:u}=a,h=!1,p;if(e!==void 0&&t!==void 0)switch(o){case A.HeatSeries:let d=e,c=yh({dataContext:d,specificField:n,xOrY:"x"}),f=yh({dataContext:d,specificField:s,xOrY:"y"});p=m=>{let y=yh({dataContext:m,specificField:n,xOrY:"x"}),v=yh({dataContext:m,specificField:s,xOrY:"y"});return c===y&&f===v};break;case A.RadarSeries:case A.BarSeries:case A.LineSeries:case A.ComboLineAndBarSeries:if(n!==void 0&&s!==void 0){let m=e;p=y=>{let v,b=r;if(u===V.BarAndLineSplitByNoAggregation){let x=zr({where:l,keepSurroundingQuotes:!1,escape:!1});b=`${r}_${x}`}if(r!==void 0&&r in y&&r in m)v=y[r]===m[r];else if(b!==void 0&&b in y&&b in m)v=y[b]===m[b];else if(R.dateBinningRange in m&&typeof y[n]=="number"){let x=y[n],_=y[R.dateBinningRange],$=Array.isArray(_)&&Number.isFinite(_[0])&&Number.isFinite(_[1]),[O,F]=$?_:[0,0],[w,D]=m[R.dateBinningRange],B=m[R.lastTemporalBin]===!0?x<=D:x<D;v=($?O<D&&w<F:x>=w&&B)&&s in y&&Number.isFinite(y[s])}else{let x=$=>{let O=$[R.originalCategoryValue];return O===void 0&&(O=$[n]),O=O===null?R.nullValue:O,O},_=x(m);v=x(y)===_&&s in y}return v}}break;case A.BoxPlotSeries:p=TC(a);break;case A.ScatterSeries:if(n!==void 0&&s!==void 0){let m=e;if(!Xh({dataContext:m,chartLimits:i?.chartLimits}))p=y=>{let v;return r!==void 0&&r in m&&r in y?v=y[r]===m[r]:v=y[n]===m[n]&&y[s]===m[s],v};else{let{dataContextXMinField:y,dataContextXMaxField:v,dataContextYMinField:b,dataContextYMaxField:x}=R.scatterplotAggregationFields,{[y]:_,[v]:$}=m,O=n!==s?m[b]:_,F=n!==s?m[x]:$,w=B=>{let L=B[n]??Number.NaN,M=_??Number.NaN,Q=$??Number.NaN;return _===$?L===M:(L??Number.NaN)>=M&&(L??Number.NaN)<Q},D=B=>{let L=B[s]??Number.NaN,M=O??Number.NaN,Q=F??Number.NaN;return O===F?L===M:L>=M&&L<Q};p=B=>w(B)&&D(B)}}break;case A.HistogramSeries:p=m=>{let y=!1,{minValue:v,maxValue:b}=e,{isLastBin:x}=e;if(n!==void 0&&n in m){let _=m[n];y=typeof _=="number"&&_>=v&&(x&&_<=b||!x&&_<b)}else if("minValue"in m&&"maxValue"in m){let{minValue:_,maxValue:$}=m;y=!(v>=$||b<=_)}return y};break;case A.PieSeries:n!==void 0&&(p=m=>{let y=e,v=es(y),b=[y];return v&&b.push(...Cc({groupOfSlicesDataContext:y})??[]),b.some(x=>Av({sliceDataContext:x,selectionDataContext:m,layerOidField:r,xAxisField:n}))});break}return p!==void 0&&(h=t.some(p)),h}function $l(a){let{isFeatureCollectionLayer:i,dataContext:e,yAxisField:t,yList:r,xAxisField:n,splitBy:s,chartType:o,chartSubType:l,showOutliers:u}=a,h={...e};if(e!==void 0){if(o===A.RadarSeries||o===A.BarSeries||o===A.LineSeries||o===A.ComboLineAndBarSeries||o===A.PieSeries){o!==A.PieSeries&&(i||l!==V.BarAndLineNoAggregation&&l!==V.BarAndLineSplitByNoAggregation)&&r.forEach(d=>{d!==t&&delete h[d]});let p=xr({value:e[n],dataContext:e,keepNullValues:!0});h[n]=p,!Zt(s)&&!us(s)&&(h[si(s)]=zr({where:s,escape:!1}))}else if(o===A.BoxPlotSeries){h={[n]:e[n]},[Ct.uniqueIdsName,R.boxPlot.boxPlotMeanLineMarkerId,R.boxPlot.boxPlotOutlierId,R.originalCategoryValue,R.originalYCategoryValue].forEach(d=>{e[d]&&(h[d]=e[d])});let p=l===V.BoxPlotMultiFieldsAndCategory?t:void 0;Object.values(me).forEach(d=>{let c=He({key:d,y:p,splitBy:s,showOutliers:u});e[c]!==void 0&&(h[c]=e[c])})}}return h}function OC(a){let{data:i,colorMatch:e,chartSubType:t,rendererType:r}=a;return i!==void 0&&e&&r!==void 0&&(t===V.BoxPlotMultiFields&&(r===jl.UniqueValue||r===jl.PieChart)||t===V.BoxPlotMonoFieldAndCategory&&r===jl.UniqueValue)&&i.some(n=>Object.keys(n).some(s=>s.includes(R.rendererSymbolField)))}function wC(a){return!!/^data:[a-z]+\/[a-z+.-]+;base64/u.test(a)}function FC(a,i=512){if(!wC(a))throw new Error("Cannot convert a string that is not a data uri to a blob");let e=a.split(",")[0].split(":")[1].split(";")[0],t=atob(a.split(",")[1]),r=[];for(let n=0;n<t.length;n+=i){let s=t.slice(n,n+i),o=new Array(s.length);for(let u=0;u<s.length;u++)o[u]=s.charCodeAt(u);let l=new Uint8Array(o);r.push(l)}return new Blob(r,{type:e})}function _l(a){let{value:i,valueFormat:e,iLocale:t,formatLocale:r}=a,n=i?.toString(),s=tn({type:e.type,iLocale:t,formatLocale:r});return typeof i=="number"&&e.type===A.NumberAxisFormat?n=s.format(i,po(e)):(typeof i=="number"||i instanceof Date)&&e.type===A.DateAxisFormat&&(n=s.format(i,po(e))),n}function En(a){let{chart:i,config:e}=a,t=e;return e===void 0&&i!==void 0&&(t=Z(i.uid,"config")),Jh(t)}function v4(a){a instanceof Ca&&a.series.each(i=>{yr(i.uid),i instanceof ut&&yr(Rt(i)?.uid),i.bullets.each(e=>{yr(e.uid)}),i instanceof pt&&i.columns.template.children.each(e=>{yr(e.uid)})}),a instanceof rt&&[a.xAxes.getIndex(0),a.xAxes.getIndex(1),a.yAxes.getIndex(0),a.yAxes.getIndex(1)].forEach(i=>{i!==void 0&&(yr(i.uid??""),i.axisRanges.each(e=>{yr(e.label?.uid)}))}),a instanceof Ir&&a.radarContainer.children.each(i=>{yr(i.uid)}),a instanceof Vt&&a.series.getIndex(0)?.slices.each(i=>{yr(i.uid)}),"cursor"in a&&a.cursor instanceof Qs&&yr(a.cursor?.uid),"legend"in a&&a.legend!==void 0&&(yr(a.legend.uid),yr(a.legend.valueLabels?.template?.uid)),yr(a.uid)}function b4(a){return typeof a=="number"?a:a.value}async function x4(a){let{chart:i,exportOptions:e}=a,{format:t,quality:r=1,...n}=e,s=r<0||r>1?1:r,o=await i.exporting.getImage(t,{quality:s,...n}),l=FC(o),u=t==="jpg"?"image/jpeg":"image/png";return new File([l],`chart.${t}`,{type:u})}function Dc(a,i){i!==void 0&&(i.marginBottom!==void 0&&(a.marginBottom=i.marginBottom),i.marginTop!==void 0&&(a.marginTop=i.marginTop),i.marginRight!==void 0&&(a.marginRight=i.marginRight),i.marginLeft!==void 0&&(a.marginLeft=i.marginLeft),i.verticalCenter!==void 0&&(a.verticalCenter=nv(i.verticalCenter)),i.horizontalCenter!==void 0&&(a.horizontalCenter=Pc(i.horizontalCenter)),i.strokeWidth!==void 0&&(a.strokeWidth=i.strokeWidth),i.wrap!==void 0&&(a.wrap=i.wrap),i.truncate!==void 0&&(a.truncate=i.truncate),i.maxWidth!==void 0&&(a.maxWidth=i.maxWidth),i.applyOnClones!==void 0&&(a.applyOnClones=i.applyOnClones,a.background.applyOnClones=i.applyOnClones))}function no(a,i){let e=i?.createChild(lt)??new lt;return Dc(e,a),e}function DC(a){let i=a.push(new Ws);i.dx=1,i.dy=1,i.opacity=1}function AC(a,i,e){if(e.alpha>0&&i>=0){a.length===0&&DC(a);let t=a.getIndex(0);t.blur=i,t.color=e}else a.clear()}function VC(a,i){let e=$i(a.uid,"isGuide"),t=i.visible===!1;return!t&&(e===!0||!(a instanceof ia))&&i.content.text===""&&(t=!0),t}function Eg(a){let{label:i,offset:e,offsetProperty:t}=a,r=99;if(i.adapter.remove(t,r),typeof e=="string"&&!Number.isFinite(Number(e))){let n=Gh(e);n!==void 0&&(n/=100,i.adapter.add(t,()=>(i.parent?.[t==="dx"?"measuredWidth":"measuredHeight"]??0)*n,r))}else i[t]=e}function Xn(a){let{label:i,labelConfig:e,defaults:t,skipSettingText:r}=a;if(e!==void 0){let n=xh(e.content,i.rtl,t);i.fill=n.fill,i.fontFamily=n.fontFamily,i.fontWeight=n.fontWeight,i.fontSize=n.fontSize,i.textDecoration=n.textDecoration,i.align=n.align,i.valign=n.valign,i.verticalCenter=n.verticalCenter,i.horizontalCenter=n.horizontalCenter,i.background.fill=n.backgroundFill,i.background.stroke=n.borderFill,i.background.strokeWidth=n.borderWidth,i.rotation=n.angle,Eg({label:i,offset:n.xOffset,offsetProperty:"dx"}),Eg({label:i,offset:n.yOffset,offsetProperty:"dy"}),i.rtl=n.rtl,i.wrap=n.wrap,i instanceof ia||(i.maxWidth=n.maxWidth),r||(i.text=n.text),AC(i.filters,n.haloSize,n.haloColor);let s=VC(i,e);i.disabled=s,dt(i,e.visible!==!1&&!s)}else i.disabled=!0}function Lv(a,i){i!==void 0&&(a===A.BarSeries||a===A.LineSeries)&&i.adapter.add("dy",(e,t)=>{let r=t.dataItem,{chart:n}=r?.component??{};return n instanceof rt&&(t.visible=!iv(t,n)),e??0})}function kv(a,i){i!==void 0&&(a===A.BarSeries&&i.adapter.add("dx",(e,t)=>{let r=e??0,n=t.dataItem,{chart:s}=n?.component??{};return(s!==void 0?Z(s.uid,"isRotated"):!1)===!0&&(n.valueX??n.valueY)<0&&(r-=t.measuredWidth+j.dataLabelNegative.paddingRight),r}),(a===A.BarSeries||a===A.LineSeries)&&i.adapter.add("dy",(e,t)=>{let r=e??0,n=t.dataItem,{chart:s}=n?.component??{};return(s!==void 0?Z(s.uid,"isRotated"):!1)!==!0&&(n.valueX??n.valueY)<0&&(r+=t.measuredHeight+j.dataLabelNegative.paddingTop),r}))}function gc(a){a.bulletsContainer.invalidateLabels(),a instanceof pt&&a.columns?.template.invalidateLabels()}function LC(a){let{dataValue:i,series:e,seriesType:t,stackedType:r,axisMin:n}=a,s=i===void 0;return i!==void 0&&(n!==void 0&&i<n?s=!0:e instanceof pt&&(t===A.BarSeries||t===A.ComboLineAndBarSeries)&&(s=i===0&&r!==void 0&&r!==Ti.Side)),s}function vc(a,i){let e,t=r=>$i(r.uid,"isDataLabel")??!1;return i==="bullets"?e=a.bullets.values.find(t):a instanceof pt&&(e=a.columns.template.children.values.find(t)),e}function bc(a,i){a.adapter.add("htmlOutput",(e,t)=>{let r=e,{dataItem:n}=t;if(bh(a)&&(i instanceof pt&&n instanceof ei||i instanceof ut&&n instanceof er)){let s=Vi(i.uid,i instanceof pt?"barSeriesDataLabelFormatter":"lineSeriesDataLabelFormatter");if(s!==void 0){let o=Z(i.chart.uid,"isRotated"),l=Vi(i.uid,"stackedType"),u=o===!0?n.valueX:n.valueY,h=o===!0?n.values?.valueX?.totalPercent:n.values?.valueY?.totalPercent,p=o===!0?(n.component?.xAxis).min:(n.component?.yAxis).min;r=LC({dataValue:u,series:i,seriesType:i instanceof pt?A.BarSeries:A.LineSeries,stackedType:l,axisMin:p})?"":s(u,h)}}return Wr(r)},0)}function Iv(a){let{numberFormatter:i,dataLabelsConfigContent:e,stackedType:t}=a;return(r,n)=>{let s=t===Ti.Stacked100&&n!==void 0?n:r;return i.numberFormat.style==="percent"&&(s/=100),vo({textSymbol:{...e,text:i.format(s)},format:"html"})}}function Mv(a){a.tabindex=-1}function Nv(a){let{series:i,seriesType:e,dataLabel:t,labelDefaults:r,dataLabelsConfig:n,yAxisValueFormat:s,stackedType:o,isRotated:l,defaultDataLabelFormatter:u,customDataLabelFormatter:h}=a;if(t!==void 0){let p=h,d=n?.content??{type:ni.TS};if(h===void 0&&u!==void 0&&s?.type===A.NumberAxisFormat){let f=Z(i.chart.uid,"formatLocale"),m=tn({type:s.type,iLocale:i.chart.language.locale,formatLocale:f});m.numberFormat=s.intlOptions,p=u({numberFormatter:m,dataLabelsConfigContent:d,stackedType:o})}let c;switch(e){case A.BarSeries:c="barSeriesDataLabelFormatter";break;case A.LineSeries:c="lineSeriesDataLabelFormatter";break}c!==void 0&&nn(i.uid,{[c]:p}),n!==void 0&&(n.content.text=l===!0?"{valueX}":"{valueY}",n.visible=n.visible!==!1),Xn({label:t,labelConfig:n,defaults:r??j.dataLabel}),gc(i)}}function Rv(a,i){let e=i;e===void 0&&(e=Z(a.uid,"config"));let t=Z(a.uid,"colorMatchApplied")??!1;return(e?.colorMatch??!1)&&t}function kC(a,i){let e;return a instanceof xe?e=i===!0?"dateY":"dateX":a instanceof we?e=i===!0?"categoryY":"categoryX":e=i===!0?"valueY":"valueX",e}function wl(a,i){a.name=i}function Ac(a){let{chart:i,lineSeries:e,applyPropertiesToClones:t}=a,r=e.bullets.push(new ee);return Ux(r.uid,{isBulletMarker:!0}),t!==!1&&(r.applyOnClones=!0),e.bulletsContainer.parent=i.seriesContainer,r}function IC(a){let{series:i,seriesConfig:e,rotationChanged:t,stackedType:r,isRotated:n}=a;switch(r){case Ti.Stacked:{i.stacked=!0,i instanceof ut&&(i.stackToNegative=e.stackNegativeValuesToBaseline??j.lineSeries.stackNegativeValuesToBaseline),t===n?i.dataFields.valueYShow=void 0:i.dataFields.valueXShow=void 0,i.updateStacking();break}case Ti.Stacked100:{i.stacked=!0,n?i.dataFields.valueXShow="totalPercent":i.dataFields.valueYShow="totalPercent",i.updateStacking();break}case Ti.Side:default:{i.stacked=!1,t===n?i.dataFields.valueYShow=void 0:i.dataFields.valueXShow=void 0;break}}}function MC(a){return()=>{let{chart:i,marker:e}=a;e.clones.each(t=>{dt(t,!iv(t,i))})}}function NC(a){let{chart:i,series:e,seriesType:t,marker:r,numberOfChartSeries:n,ignoreSmoothRenderingLimit:s}=a,o=MC({marker:r,chart:i}),l=n??1,u=i.data.length*l+l;s!==!0&&u>j.elementLimitForSmoothRendering&&(o=or(o,j.debounceTime)),i.xAxes.getIndex(0)?.events.on(le.Validated,o),i.yAxes.getIndex(0)?.events.on(le.Validated,o),t===A.LineSeries&&(i.xAxes.getIndex(0)?.events.on(le.Validated,()=>{gc(e)}),i.yAxes.getIndex(0)?.events.on(le.Validated,()=>{gc(e)}))}function Bv(a,i){a.series.each(e=>{let t=Vi(e.uid,i);t!==void 0&&!t.isDisposed()&&t.dispose()})}function RC(a){let i;return a!==void 0&&a.series.length>0&&(i=a.series.values.map(e=>e.visible?e.id:"").filter(e=>e!=="")),i}function uc(a){let{dataItem:i,y:e,splitBy:t,showOutliers:r}=a,n=He({key:me.Min,y:e,splitBy:t,showOutliers:r}),s=He({key:me.Max,y:e,splitBy:t,showOutliers:r}),o=He({key:me.FirstQuartile,y:e,splitBy:t,showOutliers:r}),l=He({key:me.ThirdQuartile,y:e,splitBy:t,showOutliers:r});return Number.isFinite(i[n])&&Number.isFinite(i[s])&&Number.isFinite(i[o])&&Number.isFinite(i[l])}function BC(a,i){let e=!1;if(i!==void 0){let t=He({key:me.Average,splitBy:i});e=Number.isFinite(a[t])}return e}function jC(a,i){let e=0;if(a!==void 0&&i!==void 0){let t=ur(i.series),r=Ae(i.series),n=Aa(i);a.data.forEach(s=>{switch(r){case V.BoxPlotMonoField:case V.BoxPlotMultiFields:case V.BoxPlotMonoFieldAndCategory:uc({dataItem:s,showOutliers:n})&&(e+=1);break;case V.BoxPlotMultiFieldsAndCategory:t.forEach(o=>{uc({dataItem:s,y:o,showOutliers:n})&&(e+=1)});break;case V.BoxPlotMonoFieldAndSplitBy:case V.BoxPlotMultiFieldsAndSplitBy:case V.BoxPlotMonoFieldAndCategoryAndSplitBy:i.series.forEach(o=>{uc({dataItem:s,splitBy:o.query?.where,showOutliers:n})&&(e+=1)});break}})}return e}function Wg(){return a=>{let i=Z(a.chart.uid,"config"),e=!1;if(i!==void 0&&a instanceof Nt){let t=jC(a.chart,i),r=0,n=0,s=0,o=0,l=0;a.chart.series.values.forEach(p=>{if(p instanceof wt)r+=p.columns.length;else if(p instanceof ut&&!(p instanceof Ai)){let d=Rt(p);if(d!==void 0&&!d.disabled){let c=d.clones.values.filter(f=>!(f.dataItem instanceof ta))?.length??0;if(Vi(p.uid,"isBoxPlotMeanLineSeries")===!0){o+=c;let f=p.data.filter(m=>Number.isFinite(m[p.dataFields.valueX??p.dataFields.valueY??""])).length;l+=f}else{let f=p.data.filter(m=>Number.isFinite(m[p.dataFields.valueX??p.dataFields.valueY??""])).length;s+=f,n+=c}}}});let u=s===0||n>=s,h=l===0||o>=l;e=r>=t&&u&&h&&a.chart.appeared&&a.isReady()&&a.chart.isReady()}return e}}function EC(a,i){let e;switch(a){case A.BarSeries:e=(t,r)=>{if(t instanceof pt){let n=En({chart:t.chart}),s=0;if(r.type===A.BarSeries){let o=(n?t.dataFields.valueX:t.dataFields.valueY)??r.y;s=t.chart?.data?.filter(l=>Number.isFinite(l[o])).length}return t.chart.isReady()&&t.columns.length===s}return!1};break;case A.LineSeries:i===!0?e=Wg():e=(t,r)=>{if(t instanceof ut){let n=En({chart:t.chart}),s=Rt(t),o=0;if(r.type===A.LineSeries){let{y:l}=r,u=(n?t.dataFields.valueX:t.dataFields.valueY)??[l].flat()[0];o=t.chart?.data?.filter(h=>Number.isFinite(h[u])).length}return t.chart.appeared&&t.chart.isReady()&&s!==void 0&&s.clones.values.length>=o}return!1};break;case A.PieSeries:e=t=>t instanceof ci&&t.slices.length>0;break;case A.BoxPlotSeries:e=Wg();break}return e}function jv(a){let{series:i,callbackInfo:e,seriesConfig:t,onReadyEvent:r}=a,{type:n}=e,s=at([t]),o=Vi(i.uid,"isBoxPlotMeanLineSeries"),l=n==="style"?"updateStyleCallbackDisposer":"updateSelectionCallbackDisposer",u=async d=>{let{type:c,callbackProps:f}=d;c==="selection"?y$(f):d.styleCallback!==void 0&&(dt(i,t.visible),await d.styleCallback(f))};r===!0&&i.events.once(le.Ready,async()=>await u(e));let h=Vi(i.uid,l);h!==void 0&&h.dispose();let p=EC(s,o);h=(s===A.PieSeries?i.chart:i).events.on(le.Validated,async()=>{p!==void 0&&p(i,t)&&(h!==void 0&&h.dispose(),await u(e))}),i.dispatchImmediately(le.Validated),nn(i.uid,{[l]:h})}function Ev(a){let{series:i,styleCallback:e,callbackProps:t,onReadyEvent:r,seriesConfig:n}=a;jv({callbackInfo:{styleCallback:e,callbackProps:t,type:"style"},series:i,seriesConfig:n,onReadyEvent:r})}function WC(a){let{series:i,callbackProps:e,seriesConfig:t,onReadyEvent:r}=a;jv({callbackInfo:{callbackProps:e,type:"selection"},series:i,seriesConfig:t,onReadyEvent:r})}function Fl(a){let{defaultChartItemRole:i}=j.aria;a instanceof wt||a instanceof pt?(a.columns.template.properties.role=i,a.columns.template.focusable=!0,a.columns.template.hoverOnFocus=!0,a.itemReaderText=Zh()):a instanceof Ai?a.segments.template.properties.role=i:a instanceof ut?a.bullets.values.forEach(e=>{e.focusable=!0,e.properties.role=i,e.readerTitle=Zh(),e.hoverOnFocus=!0}):a instanceof ci&&(a.slices.template.properties.role=i,a.slices.template.hoverOnFocus=!0,a.itemReaderText="{category} {value.formatNumber('#.#')} {value.percent.formatNumber('#.#')}%")}function HC(a){let i=Z(a.uid,"config");a.series.each(e=>{let t=i?.series?.find(r=>r.id===e.id);t!==void 0&&t.visible!==!1&&!e.visible&&dt(e)})}function Dh(a,i){let e=at(i?.series);return i?.series.find(t=>{let r=!1;return e!==A.BoxPlotSeries||a instanceof wt?r=a.id===t.id:a instanceof Ai?r=a.id.replace(`_${ar.Top}`,"")===t.id||a.id.replace(`_${ar.Median}`,"")===t.id||a.id.replace(`_${ar.Bottom}`,"")===t.id:a instanceof ut&&(r=a.id.replace(`_${ar.Outliers}`,"")===t.id),r})}var ua={CustomActive:"custom-active",CustomInactive:"custom-inactive",Default:"default",Active:"active"};function zC(a,i){let e=!1;if(i!==void 0&&bh(a)){let t=$e.spriteRectToSvg(a.bbox,a),r=i.x,n=i.y,s=i.x+i.width,o=i.y+i.height,l=t.x,u=t.y,h=t.x+t.width,p=t.y+t.height;e=!(l>s||h<r||u>o||p<n)}return e}function Dl(a){let{element:i,customSelectionTheme:e,useNativeState:t}=a,r=t===!0?ua.Active:ua.CustomActive,n=i.states.getKey(r)??i.states.create(r),s=i.states.getKey(ua.CustomInactive)??i.states.create(ua.CustomInactive),{selectedElementsTheme:o,nonSelectedElementsTheme:l}=e??j.selectionTheme??{};Ig(n,o),Ig(s,l)}function ha(a){let{element:i,selected:e,multiSelect:t,isDateOrCategoryAxis:r,useNativeState:n,backToDefaultState:s}=a;if(i!==void 0){let o=i.isActive;t!==!0?r===!0?o=i.isActive?!1:i.isActive!==e:o=e:o=i.isActive!==e,o!==i.isActive&&(i.isActive=o);let l=n===!0?ua.Active:ua.CustomActive,u=s===!0?ua.Default:ua.CustomInactive;i.setState(i.isActive?l:u,0),i.isActive&&(i.toFront(),i.dataItem?.component instanceof Lr&&i.dataItem.component.toFront())}return i?.isActive??!1}function Vc(a,i){let e=!1;if(i instanceof rt||i instanceof Vt){let t=Z(i.uid,"actionMode");t!==void 0&&(e=t===Lt.MultiSelection||t===Lt.MultiSelectionWithCtrlKey&&(a?.event?.ctrlKey||a?.event?.metaKey))}return e}function XC(a){let i=a instanceof rt&&a.zoomOutButton.isHover,e=a.legend.isHover,t=!1,r=!1,n=!1,s=!1;if(a instanceof rt){t=a.xAxes.values.some(l=>l.renderer.labels.template.events.has(le.Hit)&&l.renderer.isHover),r=a.yAxes.values.some(l=>l.renderer.labels.template.events.has(le.Hit)&&l.renderer.isHover),n=t||r;let o=Z(a.uid,"config");qi(o)&&(s=a.series.values.find(l=>l instanceof wt)?.isHover??!1)}return!i&&!e&&!n&&!s}function Lc(a,i){return a.values.filter(e=>{let t=!1,r=!e.isActive;if(!(e.dataItem instanceof ta)){e.isActive=!e.isActive;let n=Z(i.uid,"filterBySelection")!==!0&&r;ha({element:e,selected:n}),t=r}return t})}function Hg(a,i){let e=[],{columns:t,chart:r}=a,n=Z(r.uid,"config");if(n&&t!==void 0&&a.visible){let s=n?.series[0].x,o=a?.dataFields?.customValue??"",l=wh(a,i),u=Dh(a,n),h=l===A.BoxPlotSeries?u?.y:zn(a),p={element:{},yAxisField:h,xAxisField:s,splitBy:o,seriesIndex:i,chartConfig:n};e=Lc(t,r).map(d=>({...p,element:d,elementDataContext:d.dataItem?.dataContext,elementIndex:d.dataItem?.index}))}return e}function zg(a,i){let e=[];if(a.visible){let t=Rt(a)?.clones;if(t!==void 0){let{chart:r}=a,n=Z(r.uid,"config");if(n){let s=n.series[0].x??"",o=zn(a),l=a?.dataFields?.customValue??"",u={element:{},xAxisField:s,yAxisField:o,splitBy:l,seriesIndex:i,chartConfig:n};e=Lc(t,r).map(h=>({...u,element:h,elementDataContext:h.dataItem?.dataContext,elementIndex:h.dataItem?.index}))}}}return e}function YC(a){let i=[];if(a.visible){let{chart:e}=a,t=Z(e.uid,"config");if(t){let r=$0(a),n=zn(a),s={element:{},xAxisField:r,yAxisField:n,seriesIndex:0,chartConfig:t},o;i=Lc(a.slices,e).map(l=>{let u=l.dataItem?.dataContext??{};return es(u)&&(o=Cc({groupOfSlicesDataContext:u})),{...s,element:l,elementIndex:l.dataItem?.index,elementDataContext:u}}),o!==void 0&&o.forEach((l,u)=>{i.push({...s,elementIndex:u,elementDataContext:l})})}}return i}function qC(a){let{chart:i,selectionSource:e,chartConfig:t}=a,r=!1,n=[];if(Sr(t)){if(r=qi(t),n=i.series.values.filter(s=>!(s instanceof Ai)),e===jr.SelectionByClick){let s=new Set,o=n.find(l=>l instanceof wt&&l.isHover);o===void 0?n.forEach(l=>{l instanceof ut&&(l.id.includes(ar.Outliers)&&l.tooltip?.visible===!0||Vi(l.uid,"isBoxPlotMeanLineSeries"))&&s.add(l)}):s.add(o),n=Array.from(s)}}else n=i.series.values;return n=n.filter(s=>s.visible&&(!r||!(s instanceof wt||Vi(s.uid,"isBoxPlotOutliersSeries")))),n}async function Wv(a){let{chart:i,cursorSelectionRectangle:e,multiSelect:t,selectionSource:r,hitElement:n,queryObject:s}=a,o=Z(i.uid,"config"),l=o?.series[0]?.x??"",u=[];ir(i.uid,{pendingSelectionQueries:!0});let h=[],p=!0;qC({chart:i,selectionSource:r,chartConfig:o}).forEach((d,c)=>{let f=Dh(d,o);if(o&&d.visible&&d instanceof Nt){let m=wh(d,c)===A.BoxPlotSeries?f?.y:zn(d),y=d.dataFields?.customValue??"",v={element:{},yAxisField:m,xAxisField:l,splitBy:y,seriesIndex:c,chartConfig:o},b;d instanceof pt||d instanceof wt?b=d.columns?.values:d instanceof Ai?b=d.segments.values:d instanceof ut&&(b=Rt(d)?.clones?.values,v.uniqueFeature=!0),b!==void 0&&(h=[...h,...b],b.forEach((x,_)=>{if(!(x.dataItem instanceof ta)){let $=x.isActive,O=x===n||zC(x,e);O&&(p=!1);let F=!1;$?O?F=r!==jr.SelectionByClick:F=t===!0:F=O,F&&u.push({...v,element:x,elementDataContext:x.dataItem?.dataContext,elementIndex:_}),ha({element:x,selected:F})}}))}}),p&&(u=[]),await Nc({chart:i,listSelectedElements:u,selectionSource:r,queryObject:s})}function S4(a,i){let e=async t=>{let r=t.target.cursor;if(r.xRange!==void 0){r.selection.isMeasured=!0,r.validate(),r.selection.validate();let n=$e.spriteRectToSvg(r.selection.bbox,r.selection);if(r.selection.hide(),n.width>0||n.height>0){let s=Vc(t,a);await Wv({chart:a,cursorSelectionRectangle:n,multiSelect:s,selectionSource:jr.SelectionByRange,queryObject:i})}}r.selection.hide()};Oa(a)&&a.events.on(le.Up,async t=>{let r=t.target.cursor,n=zx(a.uid,"selectEndedCallbackDisposer");if(n!==void 0&&n.dispose(),r.xRange!==void 0&&t.event instanceof TouchEvent)await e(t);else{let s=r.events.once(le.SelectEnded,async()=>{await e(t)});Xx(a.uid,{selectEndedCallbackDisposer:s})}})}async function $h(a){let{hitEvent:i,chart:e,queryObject:t}=a,{target:r}=i,n=Z(e.uid,"actionMode");if(e!==void 0&&XC(e)&&n!==Lt.None&&n!==Lt.Zoom&&(r instanceof rt||i.point===void 0)){let s=i.svgPoint?{x:i.svgPoint.x,y:i.svgPoint.y,width:0,height:0}:void 0,o=Vc(i,e);await Wv({chart:e,cursorSelectionRectangle:s,multiSelect:o,selectionSource:jr.SelectionByClick,hitElement:r,queryObject:t})}}function C4(a,i){Oa(a)&&(a.zoomOutButton.hoverable=!0,a.events.on(le.Hit,async e=>await $h({hitEvent:e,chart:a,queryObject:i})),a.events.on(le.DoubleHit,async e=>await $h({hitEvent:e,chart:a,queryObject:i})))}function Ah(a){let{chart:i,element:e,queryObject:t}=a;e.events.on(le.Hit,async r=>await $h({hitEvent:r,chart:i,queryObject:t})),e.events.on(le.DoubleHit,async r=>await $h({hitEvent:r,chart:i,queryObject:t}))}async function P4(a,i){let{series:e}=a;if(e.length>0){ir(a.uid,{pendingSelectionQueries:!0});let t=Z(a.uid,"config"),r=e.values.map((n,s)=>{let o=[];if(n.visible){let l=at(t?.series,s);l===A.BarSeries?o=Hg(n,s):l===A.LineSeries?o=zg(n,s):l===A.PieSeries?o=YC(n):l===A.BoxPlotSeries&&(n instanceof wt?o=Hg(n,s):n instanceof ut&&!(n instanceof Ai)&&(o=zg(n,s)))}return o}).flat();await Nc({chart:a,listSelectedElements:r,selectionSource:jr.ProgrammaticSelection,queryObject:i}),a instanceof Vt&&a.feedLegend()}}function $4(a){if(Oa(a))if(a.events.disableType(le.Hit),a.events.disableType(le.DoubleHit),a instanceof Vt){let i=a.series.getIndex(0);i!==void 0&&(i.slices.template.clickable=!1,i.slices.template.togglable=!1,i.slices.template.events.disableType(le.Hit),i.slices.template.events.disableType(le.DoubleHit),i.labels.template.clickable=!1,i.labels.template.togglable=!1,i.labels.template.events.disableType(le.Hit),i.labels.template.events.disableType(le.DoubleHit))}else a instanceof rt&&(a.xAxes.each(i=>Th(i,!0)),a.yAxes.each(i=>Th(i,!0)),a.events.disableType(le.Up))}function _4(a){if(Oa(a))if(a.events.enableType(le.Hit),a.events.enableType(le.DoubleHit),a instanceof Vt){let i=a.series.getIndex(0);i!==void 0&&(i.slices.template.clickable=!0,i.slices.template.togglable=!0,i.slices.template.events.enableType(le.Hit),i.slices.template.events.enableType(le.DoubleHit),i.labels.template.clickable=!0,i.labels.template.togglable=!0,i.labels.template.events.enableType(le.Hit),i.labels.template.events.enableType(le.DoubleHit))}else a instanceof rt&&(a.xAxes.each(i=>Th(i,!1)),a.yAxes.each(i=>Th(i,!1)),a.events.enableType(le.Up))}function _h(a){let{element:i,stylingInfo:e,stateKey:t="default"}=a;if(i!==void 0&&e!==void 0){let r=i.states.getKey(t)?.properties??i.defaultState.properties;if(r.fill=e.pattern??e.fill,r.fillOpacity=ie(r.fill.toString()).alpha===0?0:1,e.outline!==void 0){let{outline:n}=e;r.stroke=n.stroke,r.strokeOpacity=n.stroke.alpha===0?0:1,r.strokeDasharray=n.strokeDasharray,r.strokeLinecap=n.strokeLinecap,r.strokeWidth=n.strokeWidth}}}function GC(a){return a.values.every(i=>i.isReady())}function Al(a,i){a.events.on(le.Ready,()=>{let{chart:e}=a;e!==void 0&&GC(a.chart.series)&&(HC(e),i(),cf(a.chart.htmlContainer))})}function kc(a,i){return i!=null&&i!==""?i:a}function Hv(a,i){let e;switch(a){case J.Average:{e=i.statistics.mean;break}case J.ContinuousPercentile:{e=i.statistics.median;break}case J.Sum:{e=i.statistics.sum;break}case J.Minimum:{e=i.statistics.minimum;break}case J.Maximum:{e=i.statistics.maximum;break}case J.Variance:{e=i.statistics.variance;break}case J.DiscretePercentile:{e=i.statistics.discretePercentile;break}case J.NoAggregation:{e=i.statistics.noAggregation;break}case J.Count:default:{e=i.statistics.count;break}}return e}function UC(a){let{config:i,fieldName:e="",utilsStrings:t}=a,r=i.series[0].query?.outStatistics?.[0].statisticType??Un.statisticType,n=Hv(r,t);return Kt(t.statistics.aggregation,{statistics:n,fieldName:e})}function KC(a){let{config:i,fieldList:e,objectIdField:t,seriesIndex:r,isStacked100:n,utilsStrings:s}=a,o="",l=i.series[r].name,u=i.series[r],h=[u.y].flat()[0],p=i.axes,d=Ae(i.series),c=t??Ct.outStatistics.onStatisticField,f=u.query?.outStatistics?.[0].onStatisticField??c,m=kt(e,f),y=u.query?.outStatistics?.[0].statisticType??Un.statisticType,v=Hv(y,s);return d===V.BarAndLineNoAggregation?o=l??kt(e,h):d===V.BarAndLineSplitByNoAggregation?o=kt(e,h):(o=y===J.Count&&f===c?s.statistics.count:Kt(s.statistics.aggregation,{statistics:v,fieldName:m??l}),d===V.BarAndLineMonoField&&!n&&(o=kc(o,p[1].title?.content?.text))),o}function zv(a,i){let{dataTooltipStyle:e,dataTooltipStyleReversed:t}=j;if(i===!0){let r=a.background.fill;if(r!==void 0){a.background.stroke=r,a.background.strokeWidth=t?.outline?.width??Number.NaN,a.background.fill=Mr(t?.color);let n=a.background.fill.rgb;if(n!==void 0){let s=a.label.fill;a.label.fill=gu(n)?s?.darkColor:s?.lightColor}}}else a.getStrokeFromObject=!0,a.getFillFromObject=!0,a.background.strokeWidth=e?.outline?.width??Number.NaN,a.background.stroke=Mr(e?.outline?.color)}function ZC(a){let i=a.tooltip??new Ar;i.pointerOrientation="vertical",a instanceof wt||a instanceof Ai?i.label.maxWidth=j.boxPlot.boxPlotTooltipLabelWidth:i.label.maxWidth=j.tooltipWidth,i.label.wrap=!0,i.events.on(le.Shown,e=>{let t=Z(a.chart.uid,"config");if(t!==void 0){let r=Dh(a,t),{dataTooltipReverseColor:n}=r??{};zv(e.target,n)}})}function T4(a){a instanceof Ir||a.series.each(i=>{ZC(i)})}function QC(a,i){a.tooltipHTML=j.htmlEmptyContent,a.adapter.add("tooltipHTML",(e,t)=>{let r=e??"",{chart:n}=i;if(n!==void 0){let s=Z(n.uid,"config"),{dataTooltipVisible:o}=s?.series[0]??{};if(o===!1)r="";else{let l=Vi(i.uid,"barAndLineTooltipFormatter");if(l!==void 0&&i.isReady()){let{dataItem:u}=t;if(u instanceof ei||u instanceof er){let h=s?.series.find(p=>p.id===i.id);if(h!==void 0){let p=En({config:s}),d=p?u.valueX:u.valueY,c=(p?u.values.valueX.totalPercent:u.values.valueY.totalPercent)/100,f=u.dataContext??{};if(f!==void 0){let m=Z(n.uid,"rendererFieldNames"),y=xr({value:f[h.x],dataContext:f,useRendererLabel:Kh(s,m),specificField:tp(Ae([h]),h)}),v=ts(f);v===void 0&&(v=y);let b=f[j.dateBinningRange];r=l({seriesName:i.name,xValue:y,originalXValue:v,dateBinningRange:b,statValue:d,percentValue:c})}}}}}}return Wr(r)}),a.tooltipPosition=i instanceof ut?j.markerTooltipPosition:j.columnTooltipPosition,i.cursorTooltipEnabled=!1}function JC(a){let{isStacked100:i,series:e,statValue:t,percentValue:r,yAxisValueFormat:n,dataTooltipValueFormat:s,dataTooltipPercentFormat:o}=a,l=s;l===void 0&&(Br(n)&&n?(l=n,i&&(l.intlOptions.style="decimal")):l=Wl());let u=Z(e.chart.uid,"formatLocale"),h=t!==void 0?_l({value:t,valueFormat:l,iLocale:e.chart.language.locale,formatLocale:u}):"",p="";if(i&&r!==void 0){let d=o;d===void 0&&(d=tf(),d.intlOptions.minimumFractionDigits=2,d.intlOptions.maximumFractionDigits=2),p=_l({value:r,valueFormat:d,iLocale:e.chart.language.locale,formatLocale:u})}return{formattedStatValue:h,formattedPercentValue:p}}function eP(a){let{series:i,dateRange:e,xAxisValueFormat:t}=a,r,n=Z(i.chart.uid,"timeIntervalInfo");if(e!==void 0&&e.length>0){let s={};switch(n?.unit){case De.Second:s={month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};break;case De.Minute:s={month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"};break;case De.Hour:s={month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"};break;case De.Day:case De.Week:case De.Month:case De.Year:s={month:"numeric",day:"numeric",year:"numeric"};break}s.timeZone=t.intlOptions.timeZone;let o=new Date(e[0]),l=new Date(e[1]);if(!Number.isNaN(o.valueOf())){let u=Z(i.chart.uid,"formatLocale"),h=tn({type:A.DateAxisFormat,iLocale:i.chart.language.locale,formatLocale:u}),p=h.format(o,s);if(r=p,!Number.isNaN(l.valueOf())){let d=h.format(l,s);d!==p&&(r=`${r} - ${d}`)}}}return r?.toString()??""}function Xv(a){let{seriesConfig:i,xAxisValueFormat:e,setTimeBinningInfoWhenNotProvided:t,dataTooltipValueFormat:r,dataTooltipDateFormat:n,series:s,xValue:o,dateBinningRange:l,isTimeOnlyField:u,queryObject:h}=a,p,d=Z(s.chart.uid,"formatLocale");return da({seriesConfig:i,xAxisValueFormatType:e?.type,setTimeBinningInfoWhenNotProvided:t,queryObject:h})&&l!==void 0&&e?.type===A.DateAxisFormat?p=eP({series:s,dateRange:l,xAxisValueFormat:e}):Da(e)?u&&typeof o=="number"?p=new Date(o).toLocaleTimeString(d):o instanceof Date&&(p=_l({value:o,valueFormat:n??e,iLocale:s.chart.language.locale,formatLocale:d})):typeof o=="number"&&Br(e)?p=_l({value:o,valueFormat:r??e,iLocale:s.chart.language.locale,formatLocale:d}):p=o,p?.toString()??""}function tP(a){let{series:i,fieldList:e,queryObject:t,setTimeBinningInfoWhenNotProvided:r,seriesIndex:n,seriesConfig:s,utilsStrings:o}=a,{dataTooltipValueFormat:l,dataTooltipPercentFormat:u,dataTooltipDateFormat:h}=s,p=()=>"",{chart:d}=i;if(d!==void 0){let c=Z(d.uid,"config");if(c!==void 0){let{dataTooltipVisible:f}=s,m=i instanceof ut?s.markerVisible:void 0;if(f===!1||m===!1)p=()=>"";else{let y=c.axes,v=y[0].valueFormat,b=y[1].valueFormat,x=Ae(c.series),_=e?.find(L=>L.name===s.x)?.type===gr.TimeOnly,$=as(c)===Ti.Stacked100,O=Mi(vi(t)).idField,F=kt(e,s.x),w=kc(F,y[0].title?.content.text),D=KC({config:c,fieldList:e,objectIdField:O,seriesIndex:n,utilsStrings:o,isStacked100:$}),B=is(d.rtl);p=L=>{let{statValue:M,percentValue:Q,xValue:ae,dateBinningRange:K}=L,z=Xv({seriesConfig:s,xAxisValueFormat:v,dataTooltipValueFormat:l,dataTooltipDateFormat:h,setTimeBinningInfoWhenNotProvided:r,series:i,xValue:ae,dateBinningRange:K,isTimeOnlyField:_,queryObject:t}),{formattedStatValue:Te,formattedPercentValue:ue}=JC({isStacked100:$,yAxisValueFormat:b,dataTooltipValueFormat:l,dataTooltipPercentFormat:u,series:i,statValue:M,percentValue:Q}),Me=[`<b>${w}${B} </b>${z}`];switch(x){case V.BarAndLineFromFields:{Me.pop();let ct=UC({config:c,fieldName:kt(e,z??""),utilsStrings:o});Me.push(`<b>${ct}${B} </b>${Te}`);break}case V.BarAndLineMonoField:case V.BarAndLineNoAggregation:case V.BarAndLineMultiFields:Me.push(`<b>${D}${B} </b>${Te}`);break;case V.BarAndLineSplitByNoAggregation:case V.BarAndLineSplitBy:{let ct=si(s.query?.where,!1),qe=Ff({value:kt(e,ct)});Me.push(`<b>${qe}${B} </b>${i.name}<br /><b>${D}${B} </b>${Te}`)}break}return $&&Me.push(`<b>${o.statistics.percent}${B} </b>${ue}`),Me.join("<br />")}}}}return p}function iP(a){let{series:i,tooltipFormatter:e}=a;nn(i.uid,{barAndLineTooltipFormatter:e??tP(a)})}function Ic(a){let{target:i,defaultTooltipHTML:e,candleStickSeries:t,meanLineSeries:r,outliersSeries:n,tooltipCallback:s}=a,o=e,l=t??r;if(l!==void 0){let{chart:u}=l;if(u!==void 0){let h=Z(u.uid,"config"),{dataTooltipVisible:p}=h?.series[0]??{};if(p===!1)o="";else{let d=Vi(l.uid,"boxPlotTooltipFormatter");d!==void 0&&l.isReady()&&h&&(o=s({target:i,defaultTooltipHTML:e,config:h,candleStickSeries:t,meanLineSeries:r,outliersSeries:n,boxPlotTooltipFormatter:d}))}}}return Wr(o)}function rP(a){let{target:i,defaultTooltipHTML:e,config:t,candleStickSeries:r,outliersSeries:n,boxPlotTooltipFormatter:s}=a,o=e;if(r!==void 0&&n!==void 0){let l=r.dataItems.values.find(h=>(h.categories.categoryX??h.categories.categoryY)===(i.dataItem?.categories.categoryX??i.dataItem?.categories.categoryY)),u=t.series.find(h=>h.id===r.id);if(u!==void 0){let h=l?.dataContext??{};if(h!==void 0){let p=xr({value:h[u.x],dataContext:h,useRendererLabel:ql(t),specificField:R.xAxisField}),d=ts(h);d===void 0&&(d=p),o=s({seriesName:n.name,xValue:p,originalXValue:d,dataContext:h})}}}return o}function aP(a){let{target:i,defaultTooltipHTML:e,config:t,meanLineSeries:r,boxPlotTooltipFormatter:n}=a,s=e;if(r!==void 0){let o=r.dataItems.values.find(l=>(l.categories.categoryX??l.categories.categoryY)===(i.dataItem?.categories.categoryX??i.dataItem?.categories.categoryY));if(o instanceof er){let l=t.series.find(u=>u.id===r.id);if(l!==void 0){let u=o.dataContext??{};if(u!==void 0){let h=xr({value:u[l.x],dataContext:u,useRendererLabel:ql(t),specificField:R.xAxisField}),p=ts(u);p===void 0&&(p=h),s=n({seriesName:r.name,xValue:h,originalXValue:p,dataContext:u})}}}}return s}function nP(a){let{target:i,defaultTooltipHTML:e,config:t,candleStickSeries:r,boxPlotTooltipFormatter:n}=a,s=e;if(r!==void 0){let o=i.dataItem;if(o instanceof In){let l=t.series.find(u=>u.id===r.id);if(l!==void 0){let u=o.dataContext??{};if(u!==void 0){let h=xr({value:u[l.x],dataContext:u,useRendererLabel:ql(t),specificField:R.xAxisField}),p=ts(u);p===void 0&&(p=h),s=n({seriesName:r.name,xValue:h,originalXValue:p,dataContext:u})}}}}return s}function sP(a){a.cursorTooltipEnabled=!1,a.tooltipPosition=j.columnTooltipPosition,a.columns.template.tooltipHTML=j.htmlEmptyContent,a.columns.template.adapter.add("tooltipHTML",(i,e)=>Ic({target:e,defaultTooltipHTML:i??"",candleStickSeries:a,tooltipCallback:nP}))}function oP(a,i){let e=Rt(a);e!==void 0&&(e.tooltipPosition=j.markerTooltipPosition,e.tooltipHTML=j.htmlEmptyContent,a.cursorTooltipEnabled=!1,e.adapter.add("tooltipHTML",(t,r)=>Ic({target:r,defaultTooltipHTML:t??"",candleStickSeries:i,outliersSeries:a,tooltipCallback:rP})))}function lP(a){let i=Rt(a);i!==void 0&&(a.cursorTooltipEnabled=!1,i.tooltipPosition=j.markerTooltipPosition,i.tooltipHTML=j.htmlEmptyContent,i.adapter.add("tooltipHTML",(e,t)=>Ic({target:t,defaultTooltipHTML:e??"",meanLineSeries:a,tooltipCallback:aP})))}function Ja(a){let{label:i,value:e,strongColon:t,useTable:r}=a,n=`<b>${i}${t}</b> ${e}`;return r!==!1?`<tr><td>${n}</td></tr>`:n}function uP(a){let{dataContext:i,series:e,dataTooltipValueFormat:t,y:r,splitBy:n,utilsStrings:s,useTable:o}=a,l=t??Wl(),u=Object.values(me),h=is(e.rtl),p=o!==!1?['<tr><td colspan="2"><hr style="border-top: solid black;"></td></tr>']:[""];return u.forEach(d=>{let c=He({key:d,y:r,splitBy:n}),f=i[c];if(f!=null&&typeof f=="number"){let m=Z(e.chart.uid,"formatLocale"),y=_l({value:f,valueFormat:l,iLocale:e.chart.language.locale,formatLocale:m}),v="";switch(d){case me.Min:v=s.statistics.minimum;break;case me.FirstQuartile:v=s.statistics.firstQuartile;break;case me.Median:v=s.statistics.median;break;case me.ThirdQuartile:v=s.statistics.thirdQuartile;break;case me.Max:v=s.statistics.maximum;break;case me.IQR:v=s.statistics.iqr;break;case me.Average:v=s.statistics.mean;break;case me.StandardDeviation:}wa(v)||p.push(Ja({label:v,value:y,strongColon:h,useTable:o}))}}),p}function hP(a){let{series:i,fieldList:e,seriesConfig:t,utilsStrings:r,queryObject:n}=a,{dataTooltipValueFormat:s}=t,o=()=>"",{chart:l}=i;if(l!==void 0){let u=Z(l.uid,"config");if(u!==void 0){let h=u.axes,p=h?.[0].valueFormat,{showMean:d}=u,c=Ae(u.series),f=si(t.query?.where),m=kt(e,f),y=zr({where:t.query?.where,escape:!1}),v=kt(e,t.x),b;t.x!==Bh&&(b=kc(v,h?.[0].title?.content.text));let x=is(l.rtl);o=_=>{let{dataContext:$,xValue:O}=_,F=Xv({seriesConfig:t,xAxisValueFormat:p,series:i,xValue:O,queryObject:n}),w=[],D=F!==void 0&&!wa(F)?kt(e,F):"",B=d===!0?[u.series[0].y].flat()[0]:[t.y].flat()[0],L=kt(e,B);switch(c){case V.BoxPlotMonoField:case V.BoxPlotMultiFields:case V.BoxPlotMonoFieldAndSplitBy:case V.BoxPlotMultiFieldsAndSplitBy:{if(F!==void 0&&!wa(F)){let z=c===V.BoxPlotMonoField?t.name??D:D;w.push(Ja({label:r.field,strongColon:x,value:z}))}Zt(m)||w.push(Ja({label:m,strongColon:x,value:t.name??y?.toString()}));break}case V.BoxPlotMonoFieldAndCategory:case V.BoxPlotMultiFieldsAndCategory:{w.push(Ja({label:r.field,strongColon:x,value:t.name??L})),F!==void 0&&!wa(F)&&w.push(Ja({label:b,strongColon:x,value:D}));break}case V.BoxPlotMonoFieldAndCategoryAndSplitBy:w.push(Ja({label:r.field,strongColon:x,value:L})),F!==void 0&&!wa(F)&&w.push(Ja({label:b,strongColon:x,value:D})),Zt(m)||w.push(Ja({label:m,strongColon:x,value:t.name??y?.toString()}));break}let M=[V.BoxPlotMultiFieldsAndCategory],Q=$[j.boxPlot.boxPlotMeanLineMarkerId]!==void 0,ae=w.length>0&&!Q,K=uP({dataContext:$,series:i,dataTooltipValueFormat:s,splitBy:t.query?.where,y:M.includes(c)?[t.y].flat()[0]:void 0,utilsStrings:r,useTable:ae});return ae?`${w.join("<br>")}<table>${K.join("")}</table>`:`${w.join("<br>")}${K.join("<br>")}`}}}return o}function pP(a){let{series:i,tooltipFormatter:e}=a;nn(i.uid,{boxPlotTooltipFormatter:e??hP(a)})}function dP(a){let i=no(j.dataLabelInitialize);return Sl(i.uid,{isDataLabel:!0}),a.bullets.push(i),Mv(i),Lv(A.LineSeries,i),kv(A.LineSeries,i),bc(i,a),i.html="{valueX}",i}function cP(a){let{series:i}=a,e=vc(i,"bullets");Nv({...a,dataLabel:e,defaultDataLabelFormatter:Iv})}var g={Rotated:0,NonRotated:1,RTL:2,LTR:3,Stacked:4,Stacked100:5,SideBySide:6,LegendTop:7,LegendBottom:8,LegendLeft:9,LegendRight:10,DateAxis:11,ValueAxis:12,CategoryAxis:13,OrderByFieldsASC:14,OrderByFieldsDESC:15},fP=new Set([`${g.NonRotated}-${g.LTR}-${g.SideBySide}-${g.LegendLeft}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.SideBySide}-${g.LegendRight}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.SideBySide}-${g.LegendTop}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.SideBySide}-${g.LegendBottom}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.SideBySide}-${g.LegendLeft}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.SideBySide}-${g.LegendRight}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.LTR}-${g.SideBySide}-${g.LegendRight}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.LTR}-${g.SideBySide}-${g.LegendLeft}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.LTR}-${g.SideBySide}-${g.LegendTop}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.LTR}-${g.SideBySide}-${g.LegendBottom}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.SideBySide}-${g.LegendRight}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.SideBySide}-${g.LegendLeft}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendLeft}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendRight}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendTop}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendBottom}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked}-${g.LegendLeft}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked}-${g.LegendRight}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.Stacked}-${g.LegendTop}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.Stacked}-${g.LegendBottom}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendLeft}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendRight}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendTop}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendBottom}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked100}-${g.LegendLeft}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked100}-${g.LegendRight}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.Stacked100}-${g.LegendTop}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.Stacked100}-${g.LegendBottom}-${g.DateAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.SideBySide}-${g.LegendTop}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.SideBySide}-${g.LegendBottom}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.SideBySide}-${g.LegendBottom}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.SideBySide}-${g.LegendTop}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendLeft}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendRight}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendTop}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendBottom}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked}-${g.LegendLeft}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked}-${g.LegendRight}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.Stacked}-${g.LegendTop}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.Stacked}-${g.LegendBottom}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendLeft}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendRight}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendTop}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendBottom}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked100}-${g.LegendLeft}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked100}-${g.LegendRight}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.Stacked100}-${g.LegendTop}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.Stacked100}-${g.LegendBottom}-${g.DateAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.SideBySide}-${g.LegendTop}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.SideBySide}-${g.LegendBottom}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.SideBySide}-${g.LegendTop}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.SideBySide}-${g.LegendBottom}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendRight}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendLeft}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendTop}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendBottom}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked}-${g.LegendLeft}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked}-${g.LegendRight}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.Stacked}-${g.LegendTop}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.Stacked}-${g.LegendBottom}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendRight}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendLeft}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendTop}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendBottom}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked100}-${g.LegendLeft}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked100}-${g.LegendRight}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.Stacked100}-${g.LegendTop}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.Stacked100}-${g.LegendBottom}-${g.CategoryAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.SideBySide}-${g.LegendTop}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.SideBySide}-${g.LegendBottom}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.SideBySide}-${g.LegendTop}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.SideBySide}-${g.LegendBottom}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendRight}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendLeft}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendTop}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendBottom}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked}-${g.LegendLeft}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked}-${g.LegendRight}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.Stacked}-${g.LegendTop}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.Stacked}-${g.LegendBottom}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendRight}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendLeft}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendTop}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendBottom}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked100}-${g.LegendLeft}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked100}-${g.LegendRight}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.Stacked100}-${g.LegendTop}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.Stacked100}-${g.LegendBottom}-${g.CategoryAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.SideBySide}-${g.LegendTop}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.SideBySide}-${g.LegendBottom}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.SideBySide}-${g.LegendTop}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.SideBySide}-${g.LegendBottom}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendRight}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendLeft}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendTop}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendBottom}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked}-${g.LegendLeft}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked}-${g.LegendRight}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.Stacked}-${g.LegendTop}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.Stacked}-${g.LegendBottom}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendRight}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendLeft}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendTop}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendBottom}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked100}-${g.LegendLeft}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked100}-${g.LegendRight}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.Stacked100}-${g.LegendTop}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.Rotated}-${g.RTL}-${g.Stacked100}-${g.LegendBottom}-${g.ValueAxis}-${g.OrderByFieldsASC}`,`${g.NonRotated}-${g.RTL}-${g.SideBySide}-${g.LegendTop}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.SideBySide}-${g.LegendBottom}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.SideBySide}-${g.LegendTop}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.SideBySide}-${g.LegendBottom}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendRight}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendLeft}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendTop}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked}-${g.LegendBottom}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked}-${g.LegendLeft}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked}-${g.LegendRight}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.Stacked}-${g.LegendTop}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.Stacked}-${g.LegendBottom}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendRight}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendLeft}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendTop}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.LTR}-${g.Stacked100}-${g.LegendBottom}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked100}-${g.LegendLeft}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.NonRotated}-${g.RTL}-${g.Stacked100}-${g.LegendRight}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.Stacked100}-${g.LegendTop}-${g.ValueAxis}-${g.OrderByFieldsDESC}`,`${g.Rotated}-${g.RTL}-${g.Stacked100}-${g.LegendBottom}-${g.ValueAxis}-${g.OrderByFieldsDESC}`]);function mP(a,i){i!==void 0&&(i.layout!==void 0&&(a.layout=i.layout),i.width!==void 0&&(a.width=kg(i.width)),i.height!==void 0&&(a.height=kg(i.height)),i.paddingTop!==void 0&&(a.paddingTop=i.paddingTop),i.paddingBottom!==void 0&&(a.paddingBottom=i.paddingBottom))}function yP(a){let i=!1,e=a.legend?.visible,t=a.legend?.title?.content.text,r=a.legend?.title?.visible;return i=e!==!1&&r!==!1&&t!==void 0&&t.length>0,i}function O4(a,i){let e=new U;return mP(e,a),e.parent=i,e}function w4(a,i){a.disabled=i}function F4(a,i){a.toBack()}function D4(a){if(a instanceof Ir){let{paddingTop:i,paddingRight:e,paddingBottom:t,paddingLeft:r}=j.gauge;a.padding(i,e,t,r)}else{let{paddingMinSize:i,marginMinSize:e,chartPaddingMinSize:t,chartContainer:r}=j;a.padding(t,t,t,t),a.chartAndLegendContainer.margin(e,e,e,e),a.chartAndLegendContainer.padding(i,i,i,i),a.chartContainer.margin(e,e,e,e),a.chartContainer.padding(r.paddingTop,i,i,i)}}function gP(a,i){let e=(t,r)=>{let{chartContainer:n,chartAndLegendContainer:s}=j,o=Z(t.uid,"config");if(o!==void 0){let l=yP(o),u=o.legend?.position;if(l)switch(u){case St.Top:t.chartAndLegendContainer.paddingTop=r.bbox.height??0,t.chartContainer.paddingBottom=n.paddingBottom??0;break;case St.Bottom:t.chartContainer.paddingBottom=r.bbox.height??0,t.chartAndLegendContainer.paddingTop=s.paddingTop??0;break;default:t.chartAndLegendContainer.paddingTop=s.paddingTop??0,t.chartContainer.paddingBottom=n.paddingBottom??0;break}else t.chartAndLegendContainer.paddingTop=s.paddingTop??0,t.chartContainer.paddingBottom=n.paddingBottom??0}};i.events.on(le.PositionChanged,()=>{e(a,i)})}function vP(a){let{iLocale:i,pieChart:e,valueIntlOptions:t,percentageIntlOptions:r,displayNumericValue:n,displayPercentage:s,valuePrefix:o,valueSuffix:l,percentagePrefix:u,percentageSuffix:h}=a,p=Z(e.uid,"formatLocale"),d=tn({type:A.NumberAxisFormat,iLocale:i,formatLocale:p}),c=tn({type:A.NumberAxisFormat,iLocale:i,formatLocale:p});d.numberFormat={...t},c.numberFormat={...r,style:"percent"};let f=is(e.rtl," ");return(m,y,v)=>{let b="";if(y!==void 0&&v!==void 0){let x=`${o??""}${d.format(y)}${l??""}`,_=`${u??""}${c.format(Math.abs(v/100))}${h??""}`;Number.isFinite(y)?n===!0&&s===!0?b=`${_}${f}(${x})`:n===!0?b=x:s===!0&&(b=_):b=""}return b}}function Yv(a){let i=!1;if(a.position===St.Right||a.position===St.Left)i=!0;else{let e=a.labels.getIndex(0)?.parent?.x;e!==void 0&&(i=!a.labels.values.some(t=>t.parent?.x!==e))}return i}function bP(a){let i=!1,e=a.labels.getIndex(0)?.parent?.y;return e!==void 0&&(i=!a.labels.values.some(t=>t.parent?.y!==e)),i}function xP(a){a.events.on(le.LayoutValidated,()=>{let i=Yv(a),e=bP(a),t=i||!e?ai.Right:ai.Center;a.valueLabels.template.horizontalCenter=Pc(t),a.valueLabels.template.align=av(t)})}function SP(a){Sl(a.valueLabels.template.uid,{isLegendValueLabel:!0}),a.valueLabels.template.adapter.add("htmlOutput",(i,e)=>{let t=i,r=Yx(a.uid,"pieChartLegendValueLabelsFormatter");if(r!==void 0&&(t=r(e.dataItem?.values?.value?.value??0,e.dataItem?.values?.value?.percent??0)),Zt(t)&&(t=j.htmlEmptyContent),a.baseSprite instanceof Ca){let n=Z(a.baseSprite.uid,"config");n?.legend?.body!==void 0&&(t=vo({textSymbol:{...n.legend.body,text:t},format:"html"}))}return Wr(t)}),a.valueLabels.template.html=j.htmlEmptyContent,xP(a)}function CP(a){let{legendElements:{legend:i},seriesConfig:e,webChartLegend:t,pieChartLegendValueLabelFormatter:r}=a,{visible:n,body:s,displayNumericValue:o,displayPercentage:l,displayCategory:u}=t??{};if(at(e)===A.PieSeries){let{numericValueFormat:h,percentValueFormat:p,valuePrefix:d,valueSuffix:c,percentagePrefix:f,percentageSuffix:m}=e[0],y=u??j.pieChart.displayCategoryOnLegend,v=o??j.pieChart.displayNumericValueOnLegend,b=l??j.pieChart.displayPercentageOnLegend,x=r;if(r===void 0){let O=vP({iLocale:i.language.locale,pieChart:i.baseSprite,valueIntlOptions:h?.intlOptions,percentageIntlOptions:p?.intlOptions,displayNumericValue:v,displayPercentage:b,valuePrefix:d,valueSuffix:c,percentagePrefix:f,percentageSuffix:m});x=(F,w)=>O("",F,w)}qx(i.uid,{pieChartLegendValueLabelsFormatter:x});let _=Yv(i),$={type:A.Text,visible:n,content:{...s,type:ni.TS,text:".",verticalAlignment:Yi.Middle,horizontalAlignment:_?ai.Right:ai.Center}};Xn({label:i.valueLabels.template,labelConfig:$,defaults:j.legendProperties.valueLabels}),i.labels.template.disabled=y===!1,i.valueLabels.template.disabled=v===!1&&b===!1}}function PP(a){let{dataContext:i}=a.target.dataItem??{};if(i instanceof la){let{component:e}=i;e instanceof ci&&e.showTooltip()}}function $P(a){let i=()=>{let e=a.children.values.find(t=>t.className==="Container");if(e?.children.length===3){let t=e.children.values.findIndex(r=>r.className==="Container");if(t!==-1){let r=t!==0?0:2,n=e.children.getIndex(r)?.clonedFrom;n!==void 0&&$i(n.uid,"isLegendValueLabel")!==!0&&a.children.each(s=>{s.className==="Container"&&s.children.swap(1,r)})}}};a.events.on(le.Validated,i),i()}function Xg(a,i){let{legendLabelReducedOpacity:e}=j.legendProperties;a!==void 0&&(a.fillOpacity=i===!1?e:1)}function bl(a){let{labels:i,seriesId:e,sliceCategory:t}=a;i.each(r=>{t!==void 0?t===r.dataItem.category&&Xg(r,r.dataItem.slice.visible??!0):e===r.dataItem?.component?.id&&Xg(r,r.dataItem?.component?.visible??!0)})}function _P(a){a instanceof ci?(a.slices.template.events.on(le.Shown,i=>{let e=i.target.dataItem.category;bl({labels:a.chart?.legend?.labels,sliceCategory:e}),bl({labels:a.chart?.legend?.valueLabels,sliceCategory:e})}),a.slices.template.events.on(le.Hidden,i=>{let e=i.target.dataItem.category;bl({labels:a.chart?.legend?.labels,sliceCategory:e}),bl({labels:a.chart?.legend?.valueLabels,sliceCategory:e})})):a.events.on(le.VisibilityChanged,i=>{let e=i.target.id;bl({labels:a.chart?.legend?.labels,seriesId:e})})}function qv(a){let{title:i,visible:e}=a;return i!==void 0&&e!==!1&&i?.visible!==!1}function TP(a,i){let{legendProperties:e}=j;if(a.position===St.Bottom)a.marginTop=e.marginTop??0,a.marginBottom=0,a.dy=0;else if(a.position===St.Top)a.marginBottom=e.marginBottom??0,a.marginTop=0,a.dy=0;else if(a.marginTop=0,a.marginBottom=0,!(a.baseSprite instanceof Vt)){let t=qv(i),r=i.title?.content?.font?.size??j.generalFontSize;a.dy=-(t?r:15)}}function OP(a){let i=a.baseSprite,e;if(i!==void 0){let t=Z(i?.uid,"config");e=i?.rtl&&(t?.legend?.position===St.Top||t?.legend?.position===St.Bottom)}return e??!1}function wP(a){let i=a.baseSprite,e="";if(i instanceof rt){let t=Z(i.uid,"config"),r=Jh(t),n=r?g.Rotated:g.NonRotated,s=as(t),o=g.SideBySide;s===Ti.Stacked?o=g.Stacked:s===Ti.Stacked100&&(o=g.Stacked100);let l=i.rtl?g.RTL:g.LTR,u;switch(t?.legend?.position){case St.Left:u=g.LegendLeft;break;case St.Top:u=g.LegendTop;break;case St.Bottom:u=g.LegendBottom;break;case St.Right:default:u=g.LegendRight;break}let h=r?i.yAxes.getIndex(0):i.xAxes.getIndex(0),p;h instanceof xe?p=g.DateAxis:h instanceof re?p=g.ValueAxis:p=g.CategoryAxis;let d=t?.orderOptions?.data&&"orderBy"in t.orderOptions.data&&t.orderOptions.data.orderBy===Fa.Descending?g.OrderByFieldsDESC:g.OrderByFieldsASC;e=`${n}-${l}-${o}-${u}-${p}-${d}`}return e}function FP(a){let i=wP(a);return fP.has(i)}function Gv(a,i){let{legend:e,legendTitle:t}=a??{};switch(i){case A.PieSeries:e.reverseOrder=OP(e);break;case A.BarSeries:case A.LineSeries:case A.ComboLineAndBarSeries:e.reverseOrder=FP(e);break}let r=e.reverseOrder===!0?e.children.length-1:0;e.children.moveValue(t,r)}function DP(a){if(a.visible){let i=Z(a.chart.uid,"config")?.series.find(e=>e.id===a.id);if(i!==void 0&&at([i])===A.LineSeries){let{markerVisible:e}=i;e!==!1&&a.bulletsContainer.show()}}}function AP(a,i){let e=a.target.dataItem,t=a.target.isActive;if(e?.dataContext!==void 0){let{dataContext:r}=e,n={visible:t};if(r instanceof la)Z(i.uid,"isNonAggregatedChart")===!0?n.sliceData=r.dataContext:n.sliceId=r.category;else if(r instanceof wt){let o=r.id,l=Vl(i,o);if(l!==void 0){let d=Z(i.uid,"config"),c=Mc(d?.showOutliers,t),f=Rt(l);f!==void 0&&(f.disabled=!c),dt(l,c)}let{topStepLineSeries:u,medianStepLineSeries:h,bottomStepLineSeries:p}=Vh(i,o);u!==void 0&&dt(u,t),h!==void 0&&dt(h,t),p!==void 0&&dt(p,t),n.seriesId=r.id}else n.seriesId=r.id;let s=r instanceof la?r.component:r;(s instanceof Nt||s instanceof ci)&&s.events.once(le.Validated,()=>{s instanceof Nt&&(v_(s),s.events.dispatchImmediately(le.Validated,{type:le.Validated,target:s}));let o=s instanceof ci,l=Z(i.uid,"currentSelectionDataItems"),u=l!==void 0&&l.length>0,h=Z(i.uid,"actionMode")??j.actionMode,p;s instanceof pt?p=s.columns:o?p=s.slices:s instanceof ut&&(DP(s),p=Rt(s)?.clones),p?.each(d=>{d.dataItem instanceof ta||(ha({element:d,selected:d.isActive,useNativeState:o,backToDefaultState:!u}),o&&h===Lt.None&&(d.clickable=!1))})}),df(n,i.htmlContainer)}}function VP(a){let{legendProperties:i,legendProperties:e}=j;a.adapter.add("paddingRight",()=>a.scrollbar.visible?e.legendPaddingRightWithScrollbarVisible:i.paddingRight),a.adapter.add("paddingLeft",()=>i.paddingLeft),a.adapter.add("paddingTop",()=>i.paddingTop),a.adapter.add("paddingBottom",()=>i.paddingBottom)}function LP(a){a.scrollable=!0}function kP(a){let i=no(void 0,a);return i.adapter.add("paddingTop",e=>{let t=e,r=i.bbox.height;return r>0&&(t=-r),t}),i.adapter.add("x",e=>{let t=e,{marginLeft:r,marginRight:n}=j.legendProperties.legendTitle;switch(Z(a.baseSprite.uid,"config")?.legend?.title?.content?.horizontalAlignment){case ai.Left:t=i.measuredWidth+(r??0);break;case ai.Right:t=a.measuredWidth-i.measuredWidth-(n??0);break;case ai.Center:case ai.Justify:default:t=a.measuredWidth/2;break}return t}),i.adapter.add("disabled",e=>(e===!1&&i.validate(),e)),i}function IP(a){let{legendConfig:i,legendTitle:e}=a,{title:t,position:r}=i,{legendTitle:n}=j.legendProperties,s=qv(i);if(t!==void 0){let o={...t,visible:s};Xn({label:e,labelConfig:o,defaults:n}),e.marginLeft=n.marginLeft??0}r===St.Top||r===St.Bottom?(e.maxWidth=Number.NaN,e.isMeasured=!1):(e.maxWidth=n.maxWidth??Number.NaN,e.marginTop=s?e.bbox?.height??t?.content?.font?.size??j.generalFontSize:0,e.isMeasured=!0)}function MP(a){let i=j.legendProperties;a.labels.template=no(i.legendLabels),a.valueLabels.template=no(i.legendLabels),a.markers.template.width=i.legendMarkersSize,a.markers.template.height=i.legendMarkersSize,a.labels.template.adapter.add("wrap",()=>!0),a.labels.template.adapter.add("maxWidth",e=>{let t=e,r;if(a.baseSprite instanceof Vt&&(r=Z(a.baseSprite.uid,"config")?.legend?.labelMaxWidth),a.position===St.Right||a.position===St.Left)t=r??j.legendProperties.legendLabels.maxWidth;else if(r!==void 0)t=r;else{let n=0;a.valueLabels.template.disabled||a.valueLabels.each(s=>{n=Math.max(n,s.measuredWidth)}),t=a.measuredWidth-n-45}return t}),a.labels.template.adapter.add("textOutput",(e,t)=>{let r=t.dataItem?.label?.currentText,n,s=Z(a.baseSprite.uid,"config");if(s!==void 0){let{series:o}=s;if(at(o)===A.PieSeries){let l=Ae(o)===V.PieFromFields?vr:o[0].x,u=t.dataItem?.dataContext?.[l];typeof u=="string"?n=u:u&&typeof u!="object"&&(n=u.toString())}else t.dataItem?.component instanceof Lr&&(n=t.dataItem.component.name)}return(n!==void 0&&!Zt(n)?Pf(n):n)??r}),a.valueLabels.template.adapter.add("maxWidth",e=>{let t=e,r;return a.baseSprite instanceof Vt&&(r=Z(a.baseSprite.uid,"config")?.legend?.valueLabelMaxWidth),a.position===St.Right||a.position===St.Left?t=r??j.legendProperties.valueLabels.maxWidth:t=r??Number.NaN,t})}function NP(a,i){a.itemContainers.template.events.on(le.Hit,e=>AP(e,i)),i instanceof Vt&&a.itemContainers.template.events.on(le.Over,e=>PP(e))}function RP(a){a.itemContainers.template.reverseOrder=a.rtl}function gh(a,i){a.adapter.keys().includes(i)||a.adapter.add(i,e=>{let t=e,r=a.dataItem?.dataContext;if(r!==void 0){let n=r instanceof la?r.component?.chart:r.chart;if(n!==void 0){let s=Z(n.uid,"config"),{rectangleMarkerRadius:o,roundedMarkerRadius:l}=j.legendProperties;t=s?.legend?.roundMarkers===!0?l:o}}return t})}function Yg(a){a.markers.each(i=>{let e=i.children.getIndex(0);e instanceof Mt&&(gh(e,"cornerRadiusBottomLeft"),gh(e,"cornerRadiusBottomRight"),gh(e,"cornerRadiusTopLeft"),gh(e,"cornerRadiusTopRight"),e.validate())})}function BP(a){a.markers.template.events.on(le.Inited,()=>{Yg(a)}),a.events.once(le.Validated,()=>{Yg(a)})}function jP(a){let{legendElements:{legend:i},seriesConfig:e,webChartLegend:t}=a,{visible:r,body:n}=t??{},s=at(e),o={type:A.Text,visible:r,content:{...n,type:ni.TS,text:" "}};Xn({label:i.labels.template,labelConfig:o,defaults:j.legendProperties.legendLabels}),i.labels.template.valign=Yi.Middle,i.valueLabels.template.valign=Yi.Middle,s===A.PieSeries&&CP(a),i.valueLabels.template.width=Number.NaN}function EP(a,i){i.chartContainer.events.on(le.SizeChanged,or(()=>{let e=Z(i.uid,"config")?.legend?.maxHeight??Number.NaN;Number.isFinite(e)||(a.position===St.Top||a.position===St.Bottom?e=j.legendProperties.maxHeight:e=i instanceof Vt?i.chartContainer.measuredHeight:i.seriesContainer.measuredHeight),a.maxHeight=e,a.invalidateLayout()}),j.debounceTime)}function WP(a,i){let{position:e}=i;e===St.Top||e===St.Bottom?a.contentAlign=ai.Center:a.contentAlign="none"}function HP(a,i){let{legend:e}=a;e.events.on(le.DataItemsValidated,()=>{e.dataItems.length>0&&Gv(a,i)})}function zP(a,i){i===St.Right||i===St.Left?a.width=Number.NaN:a.maxWidth=Number.MAX_SAFE_INTEGER}function Uv(a,i){let e=We.pointer;i===!0?(a.itemContainers.template.clickable=!1,a.itemContainers.template.focusable=!1,e=We.default):(a.itemContainers.template.clickable=!0,a.itemContainers.template.focusable=!0),a.itemContainers.values.forEach(t=>{t.cursorOverStyle=e})}function A4(a,i){let e=new On;a.legend=e,LP(e);let t=kP(e);return MP(e),SP(e),NP(e,a),RP(e),VP(e),HP({legend:e,legendTitle:t},at(i)),EP(e,a),gP(a,t),$P(e),a.legend.events.on(le.ChildAdded,()=>{let r=Z(a.uid,"options");Uv(e,r?.disableTogglingLegendItems)}),{legend:e,legendTitle:t}}function V4(a){let{legendElements:i,seriesConfig:e,webChartLegend:t}=a,{legend:r,legendTitle:n}=i,s=r.baseSprite,o=(s===void 0?!0:Df(e))&&t?.visible!==!1;if(s&&t&&o){let{position:l=j.legendProperties.position}=t;dt(r,!0),IP({legendConfig:t,legendTitle:n}),BP(r),jP(a),WP(r,t),Gv(i,at(e)),r.position=l,zP(r,l),TP(r,t),Uv(r,Z(s.uid,"options")?.disableTogglingLegendItems)}else r.position=St.Right,r.width=0,dt(r,!1)}function L4(a){let{chart:i,chartConfig:e,seriesIndex:t,axisList:r=[],queryObject:n,hideLoaderHandle:s,selectionTheme:o,ignoreSmoothRenderingLimit:l}=a,u=e.series.length,{rotated:h}=e,p=e.series[t],{y:d,name:c,id:f,assignToSecondValueAxis:m}=p,y=new ut;y.id=f,Al(y,s),wl(y,c);let v,b;h!==!0?(v=r[0],b=m===!0&&r[2]?r[2]:r[1]):(v=m===!0&&r[2]?r[2]:r[0],b=r[1]),v!==void 0&&(y.xAxis=v),b!==void 0&&(y.yAxis=b);let x=En({chart:i}),_=Ae(e.series),$=_===V.BarAndLineSplitByNoAggregation?`${d.toString()}_${zr({where:p.query?.where,keepSurroundingQuotes:!1,escape:!1})}`:[d].flat()[0];x?y.dataFields.valueX=$:y.dataFields.valueY=$;let O=x?r[1]:r[0];if(O!==void 0){let D=kC(O,x);y.dataFields[D]=j.xAxisField}y.dataFields.customValue=p?.query?.where;let F=vi(n);Kv({series:y,seriesConfig:p,seriesIndex:t,chartSubType:_,colorMatch:e.colorMatch===!0,rendererType:Uh(e.chartRenderer,F?.renderer)}),Zv(p,y);let w=Ac({chart:i,lineSeries:y,applyPropertiesToClones:!1});return QC(w,y),dP(y),Dl({element:w,customSelectionTheme:o}),Ah({chart:i,element:w,queryObject:n}),NC({chart:i,numberOfChartSeries:u,series:y,seriesType:A.LineSeries,marker:w,ignoreSmoothRenderingLimit:l}),_P(y),Fl(y),y}function XP(a){let{series:i,seriesIndex:e,chartSubType:t,seriesConfig:r,colorMatch:n,lineColor:s,rendererType:o}=a,l=Rt(i),u=!1,h;if(l!==void 0){r.markerVisible!==!1&&r.visible!==!1?i.bulletsContainer.show():i.bulletsContainer.hide();let{markerSymbol:p}=r;p===void 0&&(p=af(),p.color=s),n?p.color=s:p.color??=s;let d=new Set,c;Sh({element:l,markerSymbol:p}),l.clones.each(f=>{if(f.dataItem instanceof ta)Sh({element:f,markerSymbol:p}),f.states.getKey(ua.CustomActive)?.reset(),f.states.getKey(ua.CustomInactive)?.reset();else{let m=f.dataItem?.dataContext,y=zl({seriesConfig:r,dataItem:m,chartSubType:t,colorMatch:n,rendererType:o}),v=Ch({seriesConfig:r,seriesIndex:e,seriesSymbol:p,element:f,colorMatch:n,rendererSymbol:y});h=v.symbolWithColorInfo,c=v.stylingInfo,_h({element:f,stylingInfo:c}),d.add(JSON.stringify(c))}}),u=d.size>1,u||_h({element:l,stylingInfo:c})}return u?void 0:h}function YP(a){let{series:i,seriesConfig:e,chartSubType:t,colorMatch:r,rendererType:n}=a,s;return i.dataItems?.values.every(o=>{let l=!0,u=o.dataContext;return s=zl({seriesConfig:e,dataItem:u,chartSubType:t,colorMatch:r,rendererType:n}),s!==void 0&&(l=!1),l}),s}function Kv(a){let{series:i,seriesIndex:e,seriesConfig:t,chartSubType:r,colorMatch:n,rendererType:s}=a,o=i,l=YP({series:o,seriesConfig:t,chartSubType:r,colorMatch:n,rendererType:s}),u=Ch({seriesConfig:t,seriesIndex:e,seriesSymbol:t.lineSymbol??nf(e),element:o,colorMatch:n,rendererSymbol:l});return dt(o,t.visible),u.symbolWithColorInfo}function Zv(a,i){a.showArea===!0?a.areaColor!==void 0?(i.fill=Mr(a.areaColor),i.fillOpacity=i.fill.alpha===0?0:1):(i.fill=ie(i.stroke.hex,1),i.fillOpacity=j.lineSeries.areaOpacity):i.fillOpacity=0}function Qv(a){let{series:i,seriesIndexMapper:e,seriesSymbolMapForEvent:t,seriesIndex:r,colorMatch:n,rendererType:s}=a,o=a.seriesConfig,l=Z(i.chart.uid,"config"),u=l?.series.length??0,h=Ae(l?.series);dt(i,o.visible);let p=Kv({series:i,seriesConfig:o,seriesIndex:r,chartSubType:h,colorMatch:n,rendererType:s}),d=XP({series:i,seriesIndex:r,seriesConfig:o,chartSubType:h,colorMatch:n,lineColor:p.color,rendererType:s});t.set(e.get(o.id)??r,{lineSymbol:p,markerSymbol:d}),Zv(o,i),t.size===u&&(zh({data:t,htmlContainer:i.chart.htmlContainer,chartId:i.chart.id,colorMatchApplied:Rv(i.chart)}),i.chart.feedLegend())}function qP(a){let{seriesConfig:i,lineSeries:e,isRotated:t}=a;i.lineSmoothed===!0?e.smoothing=t?Nh.MonotoneY:Nh.MonotoneX:e.smoothing=j.lineSeries.lineSmoothedKind}function qg(a,i){let{connectLines:e,temporalBinning:t}=i,r=t?.nullPolicy;a.connect=e!==!1&&r!==yi.Null}function k4(a){let{seriesConfig:i,series:e,axes:t,rotationChanged:r,seriesIndex:n,fieldList:s,stackedType:o,queryObject:l,options:u,utilsStrings:h}=a,{visible:p,name:d}=i,c=t[1].valueFormat,f=Z(e.chart.uid,"config"),m=En({config:f}),y=Ae(f?.series);e.id=i.id,dt(e,p);let v=d,b=e.dataFields?.customValue??"";(y===V.BarAndLineSplitBy||y===V.BarAndLineSplitByNoAggregation)&&(v=ls({queryObject:l,fieldName:si(b),fieldValue:v})??v),wl(e,v),qg(e,i),IC({series:e,seriesConfig:i,rotationChanged:r,stackedType:o,isRotated:m}),qg(e,i),Ev({styleCallback:Qv,callbackProps:a,series:e,seriesConfig:i,onReadyEvent:!0}),qP({seriesConfig:i,lineSeries:e,isRotated:m}),iP({series:e,seriesConfig:i,fieldList:s,queryObject:l,seriesIndex:n,setTimeBinningInfoWhenNotProvided:u?.setTimeBinningInfoWhenNotProvided,utilsStrings:h,tooltipFormatter:u?.tooltipFormatter}),cP({series:e,seriesType:A.LineSeries,stackedType:o,dataLabelsConfig:i.dataLabels,yAxisValueFormat:c,customDataLabelFormatter:u?.dataLabelFormatter})}function Vh(a,i){let e=a.series.values.find(n=>n.id===`${i}_${ar.Top}`),t=a.series.values.find(n=>n.id===`${i}_${ar.Median}`),r=a.series.values.find(n=>n.id===`${i}_${ar.Bottom}`);return{topStepLineSeries:e,medianStepLineSeries:t,bottomStepLineSeries:r}}function Vl(a,i){return a.series.values.find(e=>e.id===`${i}_${ar.Outliers}`)}function Mc(a,i){return(a??j.boxPlot.boxPlotOutliersVisibility)&&i!==!1}function GP(a){let{chart:i,axisList:e=[],chartConfig:t,seriesIndex:r,hideLoaderHandle:n,selectionTheme:s,queryObject:o}=a,l=qi(t),u=t.series[r],[h,p]=e,d=new wt;return d.hoverable=!0,Al(d,n),l||(Dl({element:d.columns.template,customSelectionTheme:s}),Ah({chart:i,element:d.columns.template,queryObject:o})),d.id=u.id,h!==void 0&&(d.xAxis=h),p!==void 0&&(d.yAxis=p),d.simplifiedProcessing=!0,d.columns.template.applyOnClones=!0,d.riseFromOpenState.reset(),d.riseFromPreviousState.reset(),d.dropFromOpenState.reset(),d.dropFromPreviousState.reset(),wl(d,u.name),Fl(d),d}function hc(a){let{axisList:i=[],chartConfig:e,seriesIndex:t,type:r,hideLoaderHandle:n,selectionTheme:s}=a,o=e.series[t],[l,u]=i,h=new Ai;return h.hoverable=!0,Al(h,n),h.id=`${o.id}_${r}`,l!==void 0&&(h.xAxis=l),u!==void 0&&(h.yAxis=u),h.noRisers=!0,h.simplifiedProcessing=!0,Dl({element:h.segments.template,customSelectionTheme:s}),h.hiddenInLegend=!0,Fl(h),h}function UP(a){let{chart:i,axisList:e=[],chartConfig:t,hideLoaderHandle:r,seriesIndex:n,selectionTheme:s,queryObject:o}=a,l=t.series[n],u=qi(t),[h,p]=e,d=new ut;nn(d.uid,{isBoxPlotOutliersSeries:!0}),Al(d,r),d.id=`${l.id}_${ar.Outliers}`,h!==void 0&&(d.xAxis=h),p!==void 0&&(d.yAxis=p),d.simplifiedProcessing=!0,d.hiddenInLegend=!0,d.strokeOpacity=0;let c=Ac({chart:i,lineSeries:d});return u||(Dl({element:c,customSelectionTheme:s}),Ah({chart:i,element:c,queryObject:o})),Fl(d),d}function so(a){let{chartConfig:i,seriesConfig:e,meanLineSeries:t,candleStickSeries:r,topStepLineSeries:n,medianStepLineSeries:s,bottomStepLineSeries:o,outliersSeries:l,creation:u=!1,rotationChanged:h,outliersVisibilityChanged:p,standardizeValuesVisibilityChanged:d}=a,{x:c,y:f}=e,m=u||h===!0||d===!0,y=m||p===!0,v=m,b=m;if(i!==void 0){let{showOutliers:x,standardizeValues:_,showMean:$}=i,O=En({config:i});if(t instanceof ut&&b){let M=Ae(i.series),Q=e?.query?.where,ae=He({y:M===V.BoxPlotMultiFieldsAndCategory?f:void 0,chartSubType:M,splitBy:Q,showOutliers:x,standardizeValues:Zl(M)?_:!1,key:me.Average});O?(t.dataFields.valueX=ae,t.dataFields.categoryY=c):(t.dataFields.valueY=ae,t.dataFields.categoryX=c),t.dataFields.customValue=Q}let F=mp(i),w=Ae(F.series),D=$===!0?void 0:e?.query?.where,B={y:w===V.BoxPlotMultiFieldsAndCategory?f:void 0,chartSubType:w,splitBy:D,showOutliers:x,standardizeValues:Zl(w)?_:!1};if(y){if(r instanceof wt){let M=He({...B,key:me.Min}),Q=He({...B,key:me.FirstQuartile}),ae=He({...B,key:me.Max}),K=He({...B,key:me.ThirdQuartile});O?(r.dataFields.lowValueX=M,r.dataFields.openValueX=Q,r.dataFields.highValueX=ae,r.dataFields.valueX=K,r.dataFields.categoryY=c):(r.dataFields.lowValueY=M,r.dataFields.openValueY=Q,r.dataFields.highValueY=ae,r.dataFields.valueY=K,r.dataFields.categoryX=c),r.dataFields.customValue=D}if(n instanceof Ai&&s instanceof Ai&&o instanceof Ai){let M=He({key:me.Max,...B}),Q=He({key:me.Median,...B}),ae=He({key:me.Min,...B});O?(n.dataFields.valueX=M,s.dataFields.valueX=Q,o.dataFields.valueX=ae,n.dataFields.categoryY=c,s.dataFields.categoryY=c,o.dataFields.categoryY=c):(n.dataFields.valueY=M,s.dataFields.valueY=Q,o.dataFields.valueY=ae,n.dataFields.categoryX=c,s.dataFields.categoryX=c,o.dataFields.categoryX=c),n.dataFields.customValue=D,o.dataFields.customValue=D,s.dataFields.customValue=D}}if(l instanceof ut&&v){let M=He({...B,key:me.Outlier});O?(l.dataFields.valueX=M,l.dataFields.categoryY=c):(l.dataFields.valueY=M,l.dataFields.categoryX=c),l.dataFields.customValue=D,l.invalidateRawData()}let L=t?.chart??r?.chart;L!==void 0&&(y||b)&&L.invalidateRawData()}}function KP(a){let{chart:i,axisList:e=[],chartConfig:t,hideLoaderHandle:r,seriesIndex:n,selectionTheme:s,queryObject:o}=a,l=t.series[n],[u,h]=e,p=new ut;nn(p.uid,{isBoxPlotMeanLineSeries:!0}),Al(p,r),p.id=l.id,u!==void 0&&(p.xAxis=u),h!==void 0&&(p.yAxis=h),p.simplifiedProcessing=!0;let d=Ac({chart:i,lineSeries:p});return Dl({element:d,customSelectionTheme:s}),Ah({chart:i,element:d,queryObject:o}),Fl(p),lP(p),so({chartConfig:t,seriesConfig:l,meanLineSeries:p,creation:!0}),p}function I4(a){let{chartConfig:i,seriesIndex:e}=a,t=i.series[e],r=at([t]),n=[];if(r===A.BoxPlotSeries){let s=GP(a),o=hc({...a,type:ar.Top}),l=hc({...a,type:ar.Median}),u=hc({...a,type:ar.Bottom}),h=UP(a);sP(s),oP(h,s),so({chartConfig:i,seriesConfig:t,candleStickSeries:s,topStepLineSeries:o,medianStepLineSeries:l,bottomStepLineSeries:u,outliersSeries:h,creation:!0}),n.push(s,o,l,u,h)}else if(r===A.LineSeries){let s=KP(a);n.push(s)}return n}function ZP(a){let{candleStickSeries:i,seriesConfig:e,stylingInfo:t,chartSubType:r,colorMatch:n,rendererType:s}=a;if(t!==void 0){let o={...t},l=OC({data:i.chart.data,colorMatch:n,chartSubType:r,rendererType:s});t?.outline!==void 0&&l&&(o.outline.stroke=Cl(j.boxPlot.boxPlotWhiskersColor));let{topStepLineSeries:u,medianStepLineSeries:h,bottomStepLineSeries:p}=Vh(i.chart,i.id);if(u!==void 0&&h!==void 0&&p!==void 0&&o.outline!==void 0){o.outline.strokeWidth=j.boxPlot.boxPlotLineWidth,to(u,o.outline),to(h,o.outline),to(p,o.outline);let d=e.visible!==!1;dt(u,d),dt(h,d),dt(p,d)}}}function QP(a){let{candleStickSeries:i,seriesConfig:e,showOutliers:t,seriesSymbol:r}=a;if(r!==void 0){let n=Vl(i.chart,i.id);if(n!==void 0){let s=Rt(n);if(s!==void 0){let o=Mc(t,e.visible),l={type:ni.SMS,style:Uc.Circle,color:r.color,size:j.boxPlot.boxPlotOutliersSize};s.clones.each(u=>{let h=i.dataItems.values.find(p=>(p.categories.categoryX??p.categories.categoryY)===(u.dataItem?.categories.categoryX??u.dataItem?.categories.categoryY))?.column.fill;Sh({element:u,markerSymbol:{...l,color:tv(h)??l.color},visible:o})})}}}}function JP(a){let{series:i,seriesConfig:e,seriesIndex:t,numberOfSeries:r,chartSubType:n,colorMatch:s,showMean:o,rendererType:l}=a,u,h,p,d=new Set,c=!1,f=e.fillSymbol??rf(t);if(i.columns.length===0?(p=Ch({seriesConfig:e,seriesIndex:t,seriesSymbol:f,element:new ee,colorMatch:s,isChartFillSymbol:!0}),u=p.symbolWithColorInfo,h=p.stylingInfo):i.columns.each(m=>{p=Ch({seriesConfig:e,seriesIndex:t,seriesSymbol:f,element:m,colorMatch:s,isChartFillSymbol:!0,rendererSymbol:o?void 0:zl({dataItem:m.dataItem?.dataContext,seriesConfig:e,chartSubType:n,colorMatch:s,rendererType:l})}),u=p.symbolWithColorInfo,h=p.stylingInfo,d.add(JSON.stringify(u))}),c=d.size>1,r>1){let m=i.legendDataItem?.marker.children.getIndex(0);m!==void 0?_h({element:m,stylingInfo:h}):i.chart.legend.events.once(le.Validated,()=>{_h({element:i.legendDataItem?.marker.children.getIndex(0),stylingInfo:h}),i.chart.legend.invalidate()})}return{multipleSymbolsForOneSeries:c,seriesSymbol:u,stylingInfo:h}}function e$(a){let{series:i,showOutliers:e,colorMatch:t,seriesIndex:r,seriesIndexMapper:n,seriesSymbolMapForEvent:s,seriesConfig:o,rendererType:l,queryObject:u}=a,h=Z(i.chart.uid,"config"),p=qi(h),d=h?.series.length??0,c=Ae(h?.series),f=!1,m;if(i instanceof wt&&o.type===A.BoxPlotSeries){let y=JP({series:i,seriesConfig:o,seriesIndex:r,numberOfSeries:d,chartSubType:c,colorMatch:t,showMean:p,rendererType:l}),{stylingInfo:v}=y;({multipleSymbolsForOneSeries:f,seriesSymbol:m}=y),s.set(n.get(o.id)??r,f?void 0:{fillSymbol:m??o.fillSymbol}),ZP({candleStickSeries:i,seriesConfig:o,colorMatch:t,stylingInfo:v,chartSubType:c,rendererType:l}),QP({candleStickSeries:i,seriesConfig:o,showOutliers:e,seriesSymbol:m})}else i instanceof ut&&o.type===A.LineSeries&&Qv({series:i,seriesConfig:o,seriesIndexMapper:n,seriesSymbolMapForEvent:s,seriesIndex:r,colorMatch:t,rendererType:l});s.size===d&&zh({data:s,htmlContainer:i.chart.htmlContainer,chartId:i.chart.id,colorMatchApplied:Rv(i.chart)})}function t$(a){let{numberOfSeries:i,chart:e,showMean:t}=a,r=En({chart:e}),n=r?e.yAxes.getIndex(0)?.renderer:e.xAxes.getIndex(0)?.renderer;if(n!==void 0){let{cellStartLocation:s,cellEndLocation:o}=n,l=s/(t===!0?1:i),u=e.series.values.filter(h=>h instanceof wt);u.forEach((h,p)=>{let d=s+p/u.length*(o-s)+l,c=s+(p+1)/u.length*(o-s)-l,{topStepLineSeries:f,medianStepLineSeries:m,bottomStepLineSeries:y}=Vh(e,h.id);f!==void 0&&(f.startLocation=d,f.endLocation=c),m!==void 0&&(m.startLocation=d,m.endLocation=c),y!==void 0&&(y.startLocation=d,y.endLocation=c);let v=Vl(e,h.id);if(v!==void 0){let b=(d+c)/2;r?v.dataItems.template.locations.categoryY=b:v.dataItems.template.locations.categoryX=b}})}}function i$(a){let{outliersSeries:i,chartData:e,dataWasUpdated:t,rotationChanged:r,seriesReordered:n}=a;(r===!0||t===!0||n===!0)&&(i.data=e?.outliers??[])}function r$(a){let{meanLineSeries:i,chartData:e,rotationChanged:t,sortChanged:r,dataWasUpdated:n,seriesReordered:s}=a;(t===!0||n===!0||r===!0||s===!0)&&(i.data=e?.meanLines??[],i.invalidateData())}function a$(a){let{chart:i,chartConfig:e,seriesConfig:t,chartData:r,candleStickSeriesId:n,showOutliers:s,dataWasUpdated:o,rotationChanged:l,seriesReordered:u,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:p}=a,d=Vl(i,n);if(d!==void 0){let c=Rt(d);if(c!==void 0){let f=Mc(s,t.visible);c.disabled=!f,i$({outliersSeries:d,chartData:r,dataWasUpdated:o,rotationChanged:l,seriesReordered:u})}so({chartConfig:e,seriesConfig:t,outliersVisibilityChanged:h,standardizeValuesVisibilityChanged:p,rotationChanged:l,outliersSeries:d})}}function n$(a){let{meanLineSeries:i,seriesConfig:e,chartData:t,dataWasUpdated:r,seriesReordered:n,sortChanged:s,rotationChanged:o,chartConfig:l,outliersVisibilityChanged:u,standardizeValuesVisibilityChanged:h}=a;wl(i,e?.name),so({chartConfig:l,seriesConfig:e,meanLineSeries:i,outliersVisibilityChanged:u,standardizeValuesVisibilityChanged:h,rotationChanged:o}),r$({meanLineSeries:i,chartData:t,dataWasUpdated:r,seriesReordered:n,sortChanged:s,rotationChanged:o})}function s$(a){let{series:i,chartConfig:e,seriesConfig:t,rotationChanged:r,outliersVisibilityChanged:n,standardizeValuesVisibilityChanged:s}=a;wl(i,t?.name),i.hiddenInLegend=qi(e),so({chartConfig:e,seriesConfig:t,candleStickSeries:i,outliersVisibilityChanged:n,standardizeValuesVisibilityChanged:s,rotationChanged:r})}function o$(a){let{chart:i,chartConfig:e,seriesConfig:t,candleStickSeriesId:r,outliersVisibilityChanged:n,standardizeValuesVisibilityChanged:s,rotationChanged:o}=a,l=t.visible!==!1,{topStepLineSeries:u,medianStepLineSeries:h,bottomStepLineSeries:p}=Vh(i,r);u!==void 0&&dt(u,l),h!==void 0&&dt(h,l),p!==void 0&&dt(p,l),so({chartConfig:e,seriesConfig:t,outliersVisibilityChanged:n,standardizeValuesVisibilityChanged:s,rotationChanged:o,topStepLineSeries:u,medianStepLineSeries:h,bottomStepLineSeries:p})}function M4(a){let{chart:i,series:e,chartData:t,utilsStrings:r,dataWasUpdated:n,sortChanged:s,seriesReordered:o,fieldList:l,outliersVisibilityChanged:u,showMean:h,seriesConfig:p,showOutliers:d,standardizeValuesVisibilityChanged:c,rotationChanged:f,options:m,queryObject:y}=a,{tooltipFormatter:v}=m??{};t$({numberOfSeries:a.numberOfSeries,chart:i,showMean:h});let b=Z(i.uid,"config");if(b!==void 0){if(e instanceof wt&&p.type===A.BoxPlotSeries){let{id:x}=e;s$({series:e,chartConfig:b,seriesConfig:p,rotationChanged:f,outliersVisibilityChanged:u,standardizeValuesVisibilityChanged:c}),o$({chart:i,chartConfig:b,seriesConfig:p,candleStickSeriesId:x,outliersVisibilityChanged:u,standardizeValuesVisibilityChanged:c,rotationChanged:f}),a$({chart:i,chartConfig:b,seriesConfig:p,chartData:t,showOutliers:d,candleStickSeriesId:x,dataWasUpdated:n,rotationChanged:f,seriesReordered:o,outliersVisibilityChanged:u,standardizeValuesVisibilityChanged:c})}else e instanceof ut&&p.type===A.LineSeries&&n$({chartConfig:b,chartData:t,meanLineSeries:e,seriesConfig:p,dataWasUpdated:n,seriesReordered:o,sortChanged:s,rotationChanged:f,outliersVisibilityChanged:u,standardizeValuesVisibilityChanged:c});Ev({styleCallback:e$,callbackProps:a,series:e,seriesConfig:p,onReadyEvent:!0}),pP({series:e,seriesConfig:p,fieldList:l,tooltipFormatter:v,utilsStrings:r,queryObject:y})}}function l$(a){let i=a.series.getIndex(0);if(i!==void 0){let e=!1;i.slices.each(t=>{t.isActive&&(e=!0),ha({element:t,selected:!1,backToDefaultState:!0})}),e&&a.feedLegend()}}function u$(a,i=!0){let e;a.series.each((t,r)=>{if(!i||t.visible){e=wh(t,r);let n=[];if(e===A.BarSeries)n=t.columns?.values;else if(e===A.LineSeries)n=Rt(t)?.clones?.values;else if(e===A.BoxPlotSeries){if(t instanceof wt)n.push(...t.columns.values);else if(t instanceof Ai)n.push(...t.segments.values);else if(t instanceof ut){let s=Rt(t)?.clones?.values;s!==void 0&&n.push(...s)}}n!==void 0&&n.forEach(s=>{ha({element:s,selected:!1,backToDefaultState:!0})})}})}function Lh(a){let{chart:i,selectionSource:e,clearOnlyVisibleSeries:t,disposeStyleAndSelection:r}=a,n=Z(i.uid,"currentSelectionDataItems");r!==!1&&Bv(i,"updateSelectionCallbackDisposer"),ir(i.uid,{currentSelectionDataItems:void 0,currentSelectionOIDs:void 0,currentSelectionIndexes:void 0,computedSelectionDataItems:void 0,computedSelectionIndexes:void 0,pendingSelectionQueries:!1}),Oa(i)&&(i instanceof rt?u$(i,t??!0):i instanceof Vt&&l$(i)),n&&Hl({data:{selectionSource:e??jr.ClearSelection},htmlContainer:i.htmlContainer})}function h$(a){ip(),ff(a.htmlContainer),Lh({chart:a})}function p$(a){let{chart:i,chartType:e,showMean:t}=a;return i.series.values.filter(r=>e!==A.BoxPlotSeries||!t&&r instanceof wt||t&&Vi(r.uid,"isBoxPlotMeanLineSeries")).every(r=>Vi(r.uid,"isSelectionApplied")===!0)}function d$(a){a.series.each(i=>nn(i.uid,{isSelectionApplied:void 0}))}function Jv(a,i){let e=Z(a.uid,"actionMode");if((e===Lt.MonoSelection||e===Lt.None)&&i.length>1)Lh({chart:a});else{let t=a instanceof Vt;i.forEach(r=>{ha({element:r,useNativeState:t,selected:!0})})}}function c$(a){let{chart:i,chartConfig:e,series:t,options:r,elementsToApplySelectionTo:n,selectionDataItems:s,layerOidField:o,xAxisField:l,yAxisField:u,queryObject:h}=a,p=at(e.series),d=Ae(e.series),c=Aa(e),f=[],m=[],y=[],v=ur(e.series),b=t instanceof Nt?t.dataFields?.customValue??"":"";return n.forEach(x=>{if(!(x instanceof ta)){let _=x.dataItem?.dataContext;if(_!==void 0&&(p===A.BoxPlotSeries&&_[j.boxPlot.boxPlotOutlierId]!==!0||d===V.BarAndLineMultiFields)&&(_=$l({dataContext:_,yAxisField:u,yList:v,xAxisField:l,splitBy:b,chartType:p,chartSubType:d,showOutliers:c,isFeatureCollectionLayer:ns(h)})),Vv({elementDataContext:_,options:r,selectionDataItems:s,layerOidField:o,xAxisField:l,yAxisField:u,chartType:p,splitBy:b,chartSubType:d,showOutliers:c}))if(f.push(x),x.dataItem!==void 0&&m.push(x.dataItem.index),x?.dataItem instanceof er&&_!==void 0)y.push(_);else{let $=new Set;p===A.PieSeries&&es(_)?(Cc({groupOfSlicesDataContext:_})??[]).forEach(O=>{s.forEach(F=>{Av({layerOidField:o,sliceDataContext:O,selectionDataContext:F,xAxisField:l})&&$.add(O)})}):$.add(_),Array.from($)?.forEach(O=>{let F=$l({dataContext:O,yAxisField:u,yList:v,xAxisField:l,splitBy:b,chartType:p,chartSubType:d,showOutliers:c,isFeatureCollectionLayer:ns(h)});F!==void 0&&y.push(F)})}else ha({element:x,useNativeState:i instanceof Vt,selected:!1})}}),Jv(i,f),{selectedIndexes:m,newSelectionDataItems:y}}function f$(a){let{chart:i,selectionIndexes:e,queryObject:t}=a,r=[],n=[],s=Z(i.uid,"config"),o=Aa(s),l=ur(s?.series??[]),u=Ae(s?.series);return i.series.each((h,p)=>{if(s&&h.visible){let d=s.series[0].x,c=zn(h),f=h instanceof Nt?h.dataFields?.customValue??"":"",m=wh(h,p),y=e.get(p);if(y!==void 0){let v;if(h instanceof pt?v=h.columns:h instanceof ci?v=h.slices:v=Rt(h)?.clones,v!==void 0){let{indexesToSelect:b}=y;v.each((x,_)=>{if(x&&(b===void 0||b.includes(_))){let $;m===A.BoxPlotSeries&&x.dataItem instanceof er?$=x.dataItem.dataContext:x.dataItem instanceof ta||($=$l({dataContext:x.dataItem?.dataContext,yList:l,yAxisField:c,xAxisField:d,splitBy:f,chartType:m,chartSubType:u,showOutliers:o,isFeatureCollectionLayer:ns(t)})),$!==void 0&&r.push($),n.push(x)}else ha({element:x,useNativeState:i instanceof Vt,selected:!1})})}}}}),Jv(i,n),r}function m$(a){let{series:i,chartType:e,showMean:t}=a,r;switch(e){case A.ComboLineAndBarSeries:if(i instanceof pt)r=i.columns.values;else if(i instanceof ut){let n=Rt(i);n!==void 0&&(r=n.clones.values)}break;case A.BarSeries:i instanceof pt&&(r=i.columns.values);break;case A.LineSeries:if(i instanceof ut){let n=Rt(i);n!==void 0&&(r=n.clones.values)}break;case A.PieSeries:r=i.slices.values;break;case A.BoxPlotSeries:if(i.chart instanceof rt){if(i instanceof wt&&t!==!0){r=[...i.columns.values];let n=Vl(i.chart,i.id);if(n!==void 0&&n.visible){let s=Rt(n);s!==void 0&&r.push(...s.clones.values)}}else if(t===!0&&i instanceof ut&&Vi(i.uid,"isBoxPlotMeanLineSeries")){let n=Rt(i);n!==void 0&&(r=n.clones.values)}}break}return r}function y$(a){let{series:i,seriesIndex:e,queryObject:t,options:r,dataWasUpdated:n,sortChanged:s,groupOfSlicesWasUpdated:o,xAxisField:l,yAxisField:u,rotationChanged:h}=a,{filterBySelection:p,selectionData:d,returnSelectionIndexes:c,returnSelectionOIDs:f}=r??{},{selectionIndexes:m}=d??{},{chart:y}=i,v=Z(y.uid,"config"),b=Aa(v),x=qi(v),_=at(v?.series);if(p!==!0&&v!==void 0){let $=m$({series:i,chartType:_,showMean:x}),O=Ae(v?.series),F=vi(t),w=Mi(F).idField,D=Z(y.uid,"currentSelectionDataItems"),B=!1,L=!1,M,Q=!1;if($?.[0]!==void 0){if(r?.viewExtentUpdated!==!0){M=r?.selectionData?.selectionItems??D;let ae=Z(y.uid,"currentSelectionIndexes");Q=Dv({itemsA:M,itemsB:D,isPieFromFields:O===V.PieFromFields,x:v.series[0].x});let K=m?.keys.length!==ae?.keys.length||!oo(m,ae);B=s===!0||n===!0||o===!0||h===!0||M!==void 0&&Q;let z=!0;if(m!==void 0&&m.size>0){let{indexesToSelect:Te}=m.get(e??0)??{};z=Te!==void 0&&Te[0]===void 0}L=n===!0||o===!0||h===!0||!z&&K}if(B&&M!==void 0&&M.length>0){let{selectedIndexes:ae,newSelectionDataItems:K}=c$({chart:y,chartConfig:v,options:r,series:i,elementsToApplySelectionTo:$,selectionDataItems:M,layerOidField:w,xAxisField:l,yAxisField:u}),z=Z(y.uid,"computedSelectionDataItems")??[];if(z.push(...K),v.series.length>1&&O!==V.BarAndLineNoAggregation&&O!==V.BarAndLineSplitByNoAggregation&&(z=ao({data:z,x:v.series[0].x,splitByField:si(v.series[0].query?.where)})),ir(y.uid,{computedSelectionDataItems:z}),c===!0){let Te=Array.from(new Set(ae)),ue=Z(y.uid,"computedSelectionIndexes");ue===void 0&&(ue=new Map),Te.length===$.length?ue.set(e??0,{}):ue.set(e??0,{indexesToSelect:Te}),ir(y.uid,{computedSelectionIndexes:ue})}}else if(m!==void 0&&L)M=f$({chart:y,selectionIndexes:m,queryObject:t});else{let ae=M===void 0||M.length===0,K=i instanceof Nt?i.dataFields?.customValue??"":"",z=Te=>{let ue=Te.dataItem?.dataContext;return ue!==void 0&&_===A.BoxPlotSeries&&ue[j.boxPlot.boxPlotOutlierId]!==!0&&(ue=$l({dataContext:ue,yAxisField:u,yList:ur(v.series),xAxisField:l,splitBy:K,chartType:_,chartSubType:O,showOutliers:b,isFeatureCollectionLayer:ns(t)})),Vv({elementDataContext:ue,options:r,selectionDataItems:M??D??[],layerOidField:w,xAxisField:l,yAxisField:u,chartType:_,splitBy:K,chartSubType:O,showOutliers:b})};$.forEach(Te=>{let ue=Te.isActive||z(Te);ha({element:Te,selected:ue,useNativeState:y instanceof Vt,backToDefaultState:ae})})}}if(nn(i.uid,{isSelectionApplied:!0}),p$({chart:y,chartType:_,showMean:x})&&(d$(y),Q||L)){let ae=Z(y.uid,"computedSelectionDataItems")??M;ae=Array.from(new Set(ae?.map(z=>JSON.stringify(z)))).map(z=>JSON.parse(z)),M!==void 0&&ir(y.uid,{currentSelectionDataItems:ae}),d?.selectionOIDs!==void 0&&ir(y.uid,{currentSelectionOIDs:d.selectionOIDs});let K;if(c===!0&&(K=Z(y.uid,"computedSelectionIndexes")??m,K!==void 0&&ir(y.uid,{currentSelectionIndexes:K})),ae===void 0||ae.length===0)Lh({chart:y,selectionSource:jr.ProgrammaticSelection});else{let z={selectionItems:ae,selectionSource:jr.ProgrammaticSelection};c===!0&&(z.selectionIndexes=K),f!==!1&&(z.selectionOIDs=d?.selectionOIDs??Z(y.uid,"currentSelectionOIDs")),Hl({data:z,htmlContainer:y.htmlContainer})}ir(y.uid,{computedSelectionIndexes:void 0,computedSelectionDataItems:void 0})}}}async function N4(a){let{chart:i,options:e,dataWasUpdated:t,chartData:r,chartConfig:n,queryObject:s,rotationChanged:o,errorStrings:l}=a,u=Z(i.uid,"currentSelectionOIDs"),h=Z(i.uid,"queryConfig");if(!Hr(s)){let p=await Cv({chartConfig:n,queryConfig:h,chartData:r,currentSelectionOIDs:u,dataWasUpdated:t,queryObject:s,options:e,errorStrings:l});p!==void 0&&e!==void 0&&(e.selectionData={...e?.selectionData,selectionItems:p})}for(let p=0;p<i.series.length;p+=1){let d=i.series.getIndex(p);if(d){let c=Dh(d,n);if(c){let f=at([c]);if(f===A.BoxPlotSeries&&(d=i.series.values.find(m=>m.id===c.id)),d!==void 0){let m=c.x,y=f===A.BoxPlotSeries?c.y.toString():zn(d);WC({callbackProps:{...a,series:d,seriesIndex:p,xAxisField:m,yAxisField:y},series:d,seriesConfig:c,onReadyEvent:o===!0})}}}}}async function Nc(a){let{chart:i,listSelectedElements:e,selectionSource:t,queryObject:r}=a,n=Z(i.uid,"options"),s=Z(i.uid,"config"),o=Hr(r);if(s)if(e.length===0)Lh({chart:i,selectionSource:t,clearOnlyVisibleSeries:!1,disposeStyleAndSelection:!1});else try{Bv(i,"updateSelectionCallbackDisposer");let l=Aa(s),u=[],h=[],p=[],d=new Map,{xAxisField:c}=e[0]??{},f=at(s?.series),m=Ae(s?.series),y=ur(s?.series??[]),v=Pr(r).find(x=>x.name===c)?.type;if(e.forEach(x=>{let{elementDataContext:_,yAxisField:$,splitBy:O}=x,F=$l({dataContext:_,yAxisField:$,yList:y,xAxisField:c,splitBy:O,chartType:f,chartSubType:m,showOutliers:l,isFeatureCollectionLayer:ns(r)});F!==void 0&&h.push(F);let{seriesIndex:w,elementIndex:D}=x;if(D!==void 0){let B=d.get(w)?.indexesToSelect??[];B.push(D),d.set(w,{indexesToSelect:Array.from(new Set(B))})}if(!o&&_!==void 0){let B=_[Ct.uniqueIdsName]!==void 0?[_[Ct.uniqueIdsName]].flat():[];if(B.length>0)p.push(...B);else if(n?.returnSelectionOIDs!==!1){let L=SS({dataContext:_,options:n,xAxisField:c,yAxisField:$??"",splitBy:O,xAxisFieldType:v,chartConfig:s,queryObject:r});u.push(L)}}}),!o&&n?.returnSelectionOIDs!==!1&&u.length>0){let x={...Z(i.uid,"queryConfig")};delete x.groupByFieldsForStatistics,delete x.orderByFields,delete x.outStatistics;let _=await _S({whereList:u,queryObject:r,queryConfig:x});if(u.length===e.length)p=_;else for(let $=0;$<_.length;$+=1)p.push(_[$])}ir(i.uid,{currentSelectionDataItems:h,currentSelectionOIDs:p,currentSelectionIndexes:d});let b={selectionItems:h,selectionSource:t};n?.returnSelectionIndexes===!0&&(b.selectionIndexes=d),n?.returnSelectionOIDs!==!1&&(b.selectionOIDs=p),Hl({data:b,htmlContainer:i.htmlContainer})}catch(l){ir(i.uid,{pendingSelectionQueries:!1});let{httpStatus:u}=l instanceof Yl?l.details.details:l.details??{};if(u===429)h$(i);else throw l}ir(i.uid,{pendingSelectionQueries:!1})}function g$(a){let{axis:i}=a,e=i.chart;return{axis:i,chart:e}}async function v$(a,i){let e=a.target,{axis:t,chart:r}=g$(e),n=[],{seriesDataItems:s}=a.target.dataItem;Object.keys(s).forEach(p=>{if(Object.hasOwn(s,p)){let d=s[p];for(let c of d)if(c instanceof ei)n.push(c.column);else{let f=c.sprites.find(m=>!(m instanceof lt));f!==void 0&&n.push(f)}}});let o=Vc(a,r),l=t instanceof xe||t instanceof we,u=[],h=Z(r.uid,"config");if(h){let p=h.series[0].x??"";r.series.each((d,c)=>{let f;if(d instanceof pt?f=d.columns:f=Rt(d)?.clones,d.visible){let m=zn(d),y=d.dataFields?.customValue??"";f?.each((v,b)=>{let x=n.includes(v);ha({element:v,selected:x,multiSelect:o,isDateOrCategoryAxis:l})&&u.push({element:v,elementDataContext:v.dataItem?.dataContext,yAxisField:m,xAxisField:p,splitBy:y,seriesIndex:c,elementIndex:b,chartConfig:h})})}}),await Nc({chart:r,listSelectedElements:u,selectionSource:jr.SelectionByClick,queryObject:i})}}function b$(a,i){if(Oa(a.renderer.labels.template)){a.renderer.labels.template.events.on(le.Hit,async t=>{a.renderer.labels.template.events.isEnabled(le.Hit)&&await v$(t,i)});let e=Z(a.chart.uid,"filterBySelection")===!0?We.default:We.pointer;fc(a,e)}}function Th(a,i){if(Oa(a?.renderer?.labels?.template)&&(a instanceof we||a instanceof xe))if(i)a.renderer.labels.template.events.disableType(le.Hit),fc(a,We.default);else{a.renderer.labels.template.events.enableType(le.Hit);let e=Z(a.chart.uid,"filterBySelection")===!0?We.default:We.pointer;fc(a,e)}}var Ta={Guides:"guides",Ticks:"ticks",GaugeFirstAndLastGuides:"firstAndLast",GaugeTicksWithLabels:"gaugeTicksWithLabels"};function Oh(a){let{chart:i,label:e,labelType:t}=a,r=Number.NaN;switch(t){case rr.GuideLabel:!(i instanceof Ir)&&i instanceof rt&&(e.rotation===90||e.rotation===270?r=i.seriesContainer.measuredHeight:r=i.seriesContainer.measuredWidth);break;case rr.XAxisTitle:i instanceof rt&&(r=i.seriesContainer.measuredWidth);break;case rr.YAxisTitle:i instanceof rt&&(r=i.seriesContainer.measuredHeight);break;case rr.ChartTitle:case rr.ChartSubTitle:case rr.ChartFooter:r=i.measuredWidth-20;break}r>0&&(e.maxWidth=r,i.invalidateLabels(),i instanceof rt&&(i.xAxes.getIndex(0)?.invalidateLabels(),i.xAxes.getIndex(1)?.invalidateLabels(),i.yAxes.getIndex(0)?.invalidateLabels(),i.yAxes.getIndex(1)?.invalidateLabels()))}function eb(a){let{chart:i,labelType:e}=a;Oh(a);let t=e===rr.YAxisTitle?1:0;i.events.on(le.Validated,or(()=>Oh(a),j.debounceTime),t)}function x$(a,i){a.chart instanceof Ir||(i.adapter.add("dx",e=>{let t=e;return(i.rotation===90||i.rotation===270)&&(t=i.bbox.height,i.dataItem.value!==i.dataItem.endValue&&(t/=2)),t}),i.padding(0,10,0,10))}function S$(a,i){let e=a.renderer instanceof $a?new kr:new ia;return e.disabled=!0,e.axis=a,Dc(e),Sl(e.uid,{isGuide:i}),eb({chart:a.chart,label:e,labelType:rr.GuideLabel}),x$(a,e),e}function C$(a){let{label:i,labelConfig:e,guideType:t}=a,r=i.axis.renderer instanceof xt,n;i instanceof kr||(r?t===ni.SFS?n=j.verticalSurfaceGuideLabels:n=j.verticalLineGuideLabels:t===ni.SFS?n=j.horizontalSurfaceGuideLabels:n=j.horizontalLineGuideLabels);let s={...e};s.content.rightToLeft=i.axis.rtl,Xn({label:i,labelConfig:s,defaults:n}),i.axis.invalidateLabels()}function P$(a,i,e){let t=e.chart;a.axisFill.tooltip=new Ar,a.axisFill.interactionsEnabled=!0,a.axisFill.tooltipPosition=j.guideTooltipPosition,a.axisFill.tooltip.label.wrap=!0,a.axisFill.tooltip.adapter.add("maxWidth",()=>Math.min(j.tooltipWidth,t.seriesContainer.maxWidth)),a.axisFill.tooltip.boundingContainer=t.chartAndLegendContainer,a.axisFill.adapter.add("tooltipHTML",(r,n)=>{let s=r,{dataItem:o,axis:l}=n;if(!(l.renderer instanceof $a)){let u=hi(l.uid,"guideTooltipFormatter");if(u!==void 0){let h="",p;o instanceof Vr?(h=o.value,p=o.endValue):o instanceof oa?(h=o.category,p=o.endCategory):o instanceof Ua&&(h=o.date,p=o.endDate),s=u({guideName:o.id??"",start:h,end:p,guideIndex:i})}}return s}),a.axisFill.tooltip.events.on(le.Shown,r=>{let n=Z(a.axisFill.axis.chart.uid,"config");if(n!==void 0){let s=Z(a.axisFill.axis.chart.uid,"isRotated"),o=Ll(a.axisFill.axis.renderer,s)?0:1,l=n.axes?.[o]?.guides,{tooltipReverseColor:u}=l?.[i]??{};zv(r.target,u)}})}function $$(a,i){return e=>{let{guideName:t,start:r,end:n,guideIndex:s}=e,{chart:o}=a,l="";if(o!==void 0){let u=Z(o.uid,"config"),h=Z(o.uid,"isRotated"),p=Ll(a.renderer,h)?0:1,d=u?.axes?.[p]?.guides,c=r,f=n;if(a instanceof xe){let b=new Ki,x;if(o!==void 0){let _=Z(a.chart.uid,"formatLocale");b=tn({type:A.DateAxisFormat,iLocale:o.language.locale,formatLocale:_}),x=u?.axes?.[0]?.valueFormat?.intlOptions}c=b.format(r,x),n!==void 0&&(f=b.format(n,x))}else if(a instanceof re&&!(r instanceof Date)&&!(n instanceof Date)){let{start:b,end:x}=Rc(a,d?.[s]);Number.isFinite(b)&&(c=b),Number.isFinite(x)&&(f=x);let _=hi(a.uid,"numberFormatter")??($=>new ba().format($));c=_(c),f!==void 0&&(f=_(f))}else a instanceof we&&(c=r,f=n);let m=c.toString(),y=f?.toString()??"";!Zt(y)&&m!==y?l=Kt(i.guideTooltipLabel,{guideStart:m,guideEnd:y}):l=m;let v=is(o.rtl);l=`${t}${v} ${l}`}return l}}function _$(a){let{axis:i,guideTooltipFormatter:e,utilsStrings:t}=a;ti(i.uid,{guideTooltipFormatter:e??$$(i,t)})}function T$(a){let i=sn.Value;return a instanceof xe?i=sn.Date:a instanceof we&&(i=sn.Category),i}function Gg(a){let{inputValue:i,axisType:e,axisMin:t,axisMax:r}=a,n=i;if(i!=null)switch(e){case sn.Date:n=i instanceof Date?i:new Date(i);break;case sn.Category:n=i.toString();break;case sn.Value:if(typeof i!="number"){let s=i.toString().trim(),o=Gh(s);o!==void 0?t!==void 0&&r!==void 0?n=o/100*(r-t)+t:n=null:n=Number.parseFloat(s)}break}return n}function Rc(a,i){let{start:e,end:t}=i??{},r;if(i!==void 0&&e!==void 0&&e!==null){let n=T$(a),s=a instanceof re?a.min:void 0,o=a instanceof re?a.max:void 0,l=Gg({inputValue:e,axisType:n,axisMin:s,axisMax:o}),u=i.style?.type===ni.SFS&&t!==null&&t!==void 0?Gg({inputValue:t,axisType:n,axisMin:s,axisMax:o}):l;r={isValidGuide:l!=null&&u!=null,start:l,end:u}}else r={isValidGuide:!1,start:void 0,end:void 0};return r}function O$(a){let{axis:i,tickOrGuide:e,numberOfElementsToBeDeleted:t}=a,r=[],n=i.axisRanges.length-1,s=t;for(;s>0&&n>=0;){let o=i.axisRanges.getIndex(n);o!==void 0&&($i(o.label?.uid,"isGuide")??!1)===!0&&e===Ta.Guides&&(r.push(o),s-=1),n-=1}for(let o=0;o<r.length;o+=1)i.axisRanges.removeValue(r[o])}function Bc(a,i){return a.axisRanges?.values?.filter(e=>{let t=$i(e.label?.uid,"isGuide")??!1,r=$i(e.label?.uid,"isGaugeAxisLabel")??!1,n=!1;switch(i){case Ta.Ticks:n=t===!1;break;case Ta.Guides:n=t===!0;break;case Ta.GaugeTicksWithLabels:n=r===!0&&e.value!==void 0;break;case Ta.GaugeFirstAndLastGuides:n=t===!0&&(e.id===j.gaugeFirstLabelId||e.id===j.gaugeLastLabelId);break}return n})??[]}function w$(a,i){let e=a.axisRanges.length;{let r=a.axisRanges.values.findIndex(n=>n.id===j.gaugeFirstLabelId);r!==-1&&(e=r)}let t;return a instanceof we?t=new oa:a instanceof xe?t=new Ua:t=new Vr,a.axisRanges.insertIndex(e,t),t.label=S$(a,i),t.axisFill.fillOpacity=1,t.axisFill.disabled=!0,t.grid.strokeOpacity=1,t}function F$(a,i){let e=w$(a,!0);P$(e,i,a),e.tick!==void 0&&(e.tick.disabled=!0),e.label!==void 0&&(e.label.inside=!0),e.grid!==void 0&&(e.grid.disabled=!0)}function D$(a,i){let{start:e,end:t}=i,r=Z(a.uid,"config"),n=fp(r),s=e!==null?e:void 0;s=a.data.find(l=>l[j.originalCategoryValue]===e)?.[n]??s;let o=t!==null?t:void 0;if(o!==void 0)for(let l=a.data.length-1;l>=0;l-=1){let u=a.data[l];if(u[j.originalCategoryValue]===t){o=u[n];break}}return{modifiedStart:s,modifiedEnd:o}}function A$(a,i){let{start:e,end:t}=i;if(e!==void 0){let{chart:r}=a?.component??{},n;if(a instanceof oa&&r instanceof rt&&Z(r.uid,"isNonAggregatedChart")===!0){let{modifiedStart:s,modifiedEnd:o}=D$(r,i);n={isValidGuide:!0,start:s??e,end:o??t}}else n=Rc(a.axisFill.axis,i);n.isValidGuide&&(a instanceof oa?(a.category=`${n.start?.toString()}`,a.endCategory=`${n.end?.toString()}`):a instanceof Ua?(a.date=n.start,a.endDate=n.end):(a.value=n.start,a.endValue=n.end))}}function V$(a,i){a.axisFill.above=i??j.guideAbove,a.grid.above=i??j.guideAbove}function L$(a,i){let{axisFill:e,label:t}=a;if(i!==void 0){if(a.id=i.name,a.visible=i.visible!==void 0?i.visible:a.visible,A$(a,i),i.style.type===ni.SLS?cc({element:e,fillSymbol:{type:ni.SFS,color:i.style?.color,outline:i.style},visible:i.visible}):i.style.type===ni.SFS&&cc({element:e,fillSymbol:i.style,visible:i.visible}),V$(a,i.above),i.label!==void 0){let n={type:A.Text,visible:i.visible,content:i.label};C$({label:t,labelConfig:n,guideType:i.style.type})}let r=a.component?.chart;r!==void 0&&Oh({chart:r,label:t,labelType:rr.GuideLabel})}else e.disabled=!0,t.disabled=!0}function k$(a,i){let e=Bc(a,Ta.Guides).length,t=i?.length??e;for(let r=e;r<t;r+=1)F$(a,r)}function I$(a){let{axis:i,guides:e,guideTooltipFormatter:t,utilsStrings:r}=a;if(e!==void 0){for(let n=0;n<e.length;n+=1){let s=Bc(i,Ta.Guides)[n];s!==void 0&&L$(s,e[n])}_$({axis:i,guideTooltipFormatter:t,utilsStrings:r})}}function M$(a,i){let e=Bc(a,Ta.Guides).length,t=i?.length??0,r=e-t;O$({axis:a,numberOfElementsToBeDeleted:r,tickOrGuide:Ta.Guides})}function N$(a){let{axis:i,guides:e}=a;k$(i,e),I$(a),M$(i,e)}function R$(a){let{axis:i,labels:e,restoreLabelsVisibility:t=!0}=a;(e??i.renderer.labels.values).forEach(r=>{r.x instanceof de?r.x.value:r.x,t&&dt(r,!0)})}function tb(a){let i=a.renderer.labels.values.filter(e=>$i(e.uid,"isGuide")!==!0&&e.measuredWidth>0).length;return a.pixelWidth/i}function B$(a){let{target:i}=a;if((Z(i.chart.uid,"config")?.horizontalAxisLabelsBehavior??Ii.Rotate)===Ii.Wrap){let e=Number.MAX_SAFE_INTEGER;i.renderer.labels.each(r=>{$i(r.uid,"isGuide")!==!0&&r.measuredWidth>0&&(e=Math.min(e,r.bbox.width))});let t=i instanceof xe?i.pixelWidth/j.maxNumberOfXAxisLabelsInWrapModeForDateAxis:i.pixelWidth/j.maxNumberOfXAxisLabelsInWrapMode;i.renderer.minGridDistance=Math.max(e+1,t)}}function j$(a){let{axis:i,labelsConfig:e,horizontalAxisLabelsBehavior:t,isSecondValueAxis:r,tickSpacing:n}=a,s=i.renderer.minGridDistance;if(typeof n=="number"&&Number.isFinite(n))s=n;else if(i.renderer instanceof $a)s=j.gauge.gaugeMinGridDistance;else if(i instanceof re)s=i.renderer instanceof xt?j.xAxisMinGridDistance:j.yAxisMinGridDistance;else if(i.renderer instanceof xt)if(r===!0)s=j.secondRotatedValueAxisMinGridDistance;else if(t===void 0||t===Ii.Rotate){let o=e.content.font?.size??j.generalFontSize,l=i instanceof we?j.categoryAxisLabelPadding:j.axisLabelPadding;s=o*l}else if(t===Ii.Wrap){let o=or(B$,j.debounceTime);ti(i.uid,{debouncedUpdateMinGridDistanceForWrapBehavior:o}),i.events.on(le.SizeChanged,o),i.dispatchImmediately(le.SizeChanged)}else t===Ii.Stagger?s=j.staggerMinGridDistance:s=i instanceof we?j.xCategoryAxisMinGridDistance:j.xAxisMinGridDistance;else s=i instanceof we?j.yCategoryAxisMinGridDistance:j.yAxisMinGridDistance;i.renderer.minGridDistance=s}function E$(a){let i=a.renderer.labels.template;Oa(i)&&(i.adapter.add("rotation",(e,t)=>$i(t.uid,"isGuide")!==!0?hi(a.uid,"labelsSymbol")?.angle??e:e),i.adapter.add("verticalCenter",(e,t)=>$i(t.uid,"isGuide")!==!0?hi(a.uid,"labelsSymbol")?.verticalCenter??e:e),i.adapter.add("horizontalCenter",(e,t)=>$i(t.uid,"isGuide")!==!0?hi(a.uid,"labelsSymbol")?.horizontalCenter??e:e),i.adapter.add("dy",(e,t)=>{let r=j.axisLabel.dy??e??0;return t.dataItem?.tick?.length>j.axisTickLength?r=e??0:r=Number($i(t.uid,"isGuide")!==!0?hi(a.uid,"labelsSymbol")?.yOffset??r:r),r}))}function W$(a){let{target:i}=a;if(i.chart!==void 0){let e=Z(i.chart.uid,"config")?.axes?.[0].labels;if((e?.visible??!0)&&e!==void 0&&i.renderer.labels.length>1){let t=0;i.renderer.labels.each(s=>{if($i(s.uid,"isGuide")!==!0&&s.measuredWidth>0){let o=s.bbox.width;o>t&&(t=o)}});let r=hi(i.uid,"labelsSymbol")?.angle??0,n=tb(i)>=t+5;if(!n&&r===0||n&&r===j.rotatedAxisLabel.rotation){let s=n?xh(e.content,i.rtl,j.axisLabel):xh({type:ni.TS},i.rtl,j.rotatedAxisLabel);ti(i.uid,{labelsSymbol:s}),i.renderer.invalidateLabels()}}}}function H$(a,i=1){let{target:e}=a,t=tb(e);Number.isFinite(t)&&(e.renderer.labels.template.maxWidth=Math.min(t*i,e.renderer.minGridDistance))}function z$(a){let{target:i}=a;if(Z(i.chart.uid,"config")?.axes?.[0].labels?.visible!==!1){let e=0;i.dataItems.each(t=>{let{label:r,itemIndex:n}=t;$i(r.uid,"isGuide")!==!0&&r.currentText!==void 0&&r.measuredWidth>0&&n%2===0&&r.bbox.height>e&&(e=r.bbox.height)}),i.dataItems.each(t=>{let{tick:r,label:n,itemIndex:s}=t;if($i(n.uid,"isGuide")!==!0&&n.currentText!==void 0&&n.measuredWidth>0){let o=s%2===1;r.length=o?e+5:j.axisTickLength,r.dataItem.label.dy=j.axisLabel.dy+(o?e:0)}}),e!==void 0&&(i.renderer.labels.template.paddingBottom=e+5),i.validate()}}function X$(a){let{chart:i}=a;a.renderer.labels.template.paddingLeft=Number.NaN,a.renderer.labels.template.paddingRight=Number.NaN;let e=hi(a.uid,"debouncedAxisLabelRotationCallback");if(e!==void 0&&(a.events.off(le.Validated,e),ti(a.uid,{debouncedAxisLabelRotationCallback:void 0})),i!==void 0){let t=Z(i.uid,"config")?.axes?.[0].labels;if(t!==void 0){let r=xh(t.content,i.rtl,j.axisLabel),n=a.renderer.labels.template;n.rotation=r.angle,n.verticalCenter=r.verticalCenter,n.horizontalCenter=r.horizontalCenter,Number.isFinite(r.yOffset)&&(n.dy=r.yOffset)}ti(a.uid,{labelsSymbol:void 0})}}function ib(a){a.renderer.labels.template.wrap=!1,a.renderer.labels.template.textAlign="start"}function Y$(a){ib(a),a.renderer.labels.template.paddingLeft=Number.NaN,a.renderer.labels.template.paddingRight=Number.NaN;let i=hi(a.uid,"debouncedAxisLabelWrapCallback");i!==void 0&&(a.events.off(le.DataRangeChanged,i),ti(a.uid,{debouncedAxisLabelWrapCallback:void 0}))}function q$(a){ib(a);let i=hi(a.uid,"debouncedUpdateMinGridDistanceForWrapBehavior");i!==void 0&&(a.events.off(le.SizeChanged,i),ti(a.uid,{debouncedUpdateMinGridDistanceForWrapBehavior:void 0}))}function G$(a){let i=hi(a.uid,"debouncedAxisLabelStaggerCallback");i!==void 0&&(a.events.off(le.DataRangeChanged,i),ti(a.uid,{debouncedAxisLabelStaggerCallback:void 0})),a.renderer.ticks.each(e=>{e.length=j.axisTickLength,e.dataItem?.label&&(e.dataItem.label.dy=j.axisLabel.dy??0)})}function U$(a){X$(a),Y$(a),G$(a)}function Ug(a){E$(a),a.renderer.labels.template.paddingLeft=0,a.renderer.labels.template.paddingRight=0,a.renderer.labels.template.maxWidth=Number.NaN;let i=or(W$,j.debounceTime,{leading:!0});ti(a.uid,{debouncedAxisLabelRotationCallback:i}),a.events.on(le.Validated,i),a.dispatchImmediately(le.Validated)}function Kg(a,i=1){a.renderer.labels.template.wrap=!0,a.renderer.labels.template.paddingLeft=.5,a.renderer.labels.template.paddingRight=.5,a.renderer.labels.template.textAlign="middle";let e=or(t=>H$(t,i),j.debounceTime);ti(a.uid,{debouncedAxisLabelWrapCallback:e}),a.events.on(le.DataRangeChanged,e)}function K$(a){a.renderer.labels.template.maxWidth=j.yAxisLabelMaxWidth,a.renderer.labels.template.wrap=!0,a.renderer.labels.template.textAlign="end"}function Z$(a){let i=or(z$,j.debounceTime);ti(a.uid,{debouncedAxisLabelStaggerCallback:i}),a.events.on(le.DataRangeChanged,i)}function Q$(a){let{axis:i,horizontalAxisLabelsBehavior:e,verticalAxisLabelsBehavior:t,labelsConfig:r,axisLabelsBehaviorChanged:n,isSecondValueAxis:s}=a;if(i.renderer instanceof xt&&n?.[0]!==!1){if(U$(i),s!==!0)switch(e){case Ii.Hide:break;case Ii.Stagger:Z$(i),Kg(i,1.5);break;case Ii.Wrap:Kg(i);break;case Ii.Rotate:Ug(i);break;default:r.content.angle!==null&&r.content.angle===void 0&&Ug(i);break}}else i.renderer instanceof Ot&&(t!==Ii.Hide?K$(i):q$(i))}function J$(a){let{axis:i,axisConfig:e,horizontalAxisLabelsBehavior:t,verticalAxisLabelsBehavior:r,axisLabelsBehaviorChanged:n,isSecondValueAxis:s}=a,o=i.renderer.labels.template;o.axis=i;let{labels:l}=e,u=i.renderer instanceof xt&&o.rotation===j.rotatedAxisLabel.rotation,h=l,p;u?(h.content.angle=void 0,h.content.horizontalAlignment=void 0,h.content.verticalAlignment=void 0,h.content.yoffset=void 0,p=j.rotatedAxisLabel):i.renderer instanceof xt&&(t===Ii.Stagger||t===Ii.Wrap)&&(p={wrap:!0,dy:j.axisLabel.dy}),i.renderer instanceof Ot&&r!==Ii.Hide&&(p={wrap:!0}),Xn({label:o,labelConfig:h,defaults:p}),i.renderer.labels.template.paddingTop=i.renderer instanceof xt?0:j.axisLabel.dy,o.align="none",o.valign="none",Q$({axis:i,horizontalAxisLabelsBehavior:t,verticalAxisLabelsBehavior:r,labelsConfig:l,axisLabelsBehaviorChanged:n,isSecondValueAxis:s}),o.axis.invalidateLabels()}function jc(a){return(a??pf())===Ti.Side}function rb(a,i){let e,t,r=vc(a,"bullets"),n=vc(a,"columns"),s=jc(i);return s&&r!==void 0?(e=r,t=n):s||(e=n,t=r),{labelToRender:e,labelToHide:t}}function e_(a,i=!0){a.hideOversized=i}function t_(a,i){let e,t,r=no(j.dataLabelInitialize);Sl(r.uid,{isDataLabel:!0}),a.bullets.push(r);let n=no(j.dataLabelInitialize,a.columns.template);return Sl(n.uid,{isDataLabel:!0}),bc(n,a),bc(r,a),a.events.on(le.Validated,or(()=>{bh(n)&&n.clones.each(s=>{bh(s)&&s.validate()})},j.debounceTime)),n.html="{valueX}",r.html="{valueX}",Mv(r),jc(i)?(e=r,t=n):(e=n,t=r),Lv(A.BarSeries,r),kv(A.BarSeries,e),{newLabelToRender:e,newLabelToHide:t}}function R4(a){let{series:i,stackedType:e,isRotated:t,hideOversizedStackedLabels:r,hideOversizedSideBySideLabels:n}=a,{labelToRender:s,labelToHide:o}=rb(i,e);if(s===void 0){let{newLabelToRender:h,newLabelToHide:p}=t_(i,e);s=h,o=p}let l=j.dataLabel,u=!0;jc(e)?(l=t===!0?j.dataLabelRotated:j.dataLabel,u=n===!0):(l=t===!0?j.dataLabelStackedRotated:j.dataLabelStackedNonRotated,u=r!==!1),e_(s,u),o!==void 0&&(o.visible=!1,o.disabled=!0),s.html="{valueX}",Nv({...a,dataLabel:s,labelDefaults:l,defaultDataLabelFormatter:Iv})}function i_(a){let i=a.tooltip;i!==void 0&&!(a instanceof xe)&&(i.label.adapter.add("html",(e,t)=>{let r=e??"";return a instanceof re?r=Jg(a,t.properties?.text??e??""):a instanceof we&&(r=ev({axis:a,defaultOutput:e??"",dataItem:i.dataItem})),Wr(r)}),i.label.html=j.htmlEmptyContent)}function xc(a){let{axis:i,start:e,end:t}=a;i.zoom({start:e??0,end:t??1})}function Zg(a){a!==void 0&&(a.start=0,a.end=1)}function B4(a){a!==void 0&&(a.xAxes!==void 0&&a.xAxes.each(i=>xc({axis:i})),a.yAxes!==void 0&&a.yAxes.each(i=>xc({axis:i})),Zg(a.scrollbarX),Zg(a.scrollbarY),dt(a.zoomOutButton,!1))}function Ll(a,i){return a instanceof xt&&i!==!0||a instanceof Ot&&i===!0}function r_(a){Oa(a.labels.template)&&(a.labels.template.events.on(le.Over,i=>{let{axisLabelOveredOpacity:e}=j;i.target.fillOpacity=(i.target.fillOpacity??1)*e}),a.labels.template.events.on(le.Out,i=>{let{axisLabelOveredOpacity:e}=j;i.target.fillOpacity=(i.target.fillOpacity??.5)/e}))}function a_(a){let{axis:i,valueFormat:e,axisRenderer:t,queryObject:r}=a;t.grid.template.applyOnClones=!0,t.ticks.template.applyOnClones=!0,t.labels.template.applyOnClones=!0,t.hoverable=!0,t.line.strokeOpacity=1,t.grid.template.strokeOpacity=1,t.ticks.template.strokeOpacity=1,Dc(t.labels.template,j.axisLabel),t.ticks.template.disabled=!1,t.labels.template.disabled=!0,i_(i),co(e)&&(r_(t),b$(i,r)),eb({chart:i.chart,label:i.title,labelType:i.renderer instanceof xt?rr.XAxisTitle:rr.YAxisTitle}),i.renderer instanceof xt&&i.events.on(le.Validated,or(()=>{R$({axis:i,restoreLabelsVisibility:!0})},j.debounceTime))}function n_(a){let i=a.target,e=Z(i.chart.uid,"isRotated"),t=[];if(i instanceof re){if(i.renderer instanceof $a)t.push({isXAxis:!0,minimum:i.min,maximum:i.max});else if(i.renderer instanceof(e!==!0?Ot:xt)){i.maxZoomFactor=1;let r=a.target,n=r.chart,s=e!==!0?n.xAxes.getIndex(0):n.yAxes.getIndex(0),o=n.yAxes.getIndex(1)??n.xAxes.getIndex(1);t=[{isXAxis:!1,minimum:r.min,maximum:r.max},{isXAxis:!0,minimum:s instanceof re?s.min:void 0,maximum:s instanceof re?s.max:void 0}],o instanceof re&&t.push({isXAxis:!1,isSecondValueAxis:!0,minimum:o.min,maximum:o.max})}t.length>0&&t.every(r=>!Number.isNaN(r.minimum)&&!Number.isNaN(r.maximum))&&mf(t,i.chart.htmlContainer)}}function s_(a){a.events.on(le.Validated,or(n_,j.debounceTime))}function o_(a){let{axis:i,isNonAggregatedChart:e}=a,t,r,n,s=i.dataItems.values,o=i.axisRanges.values;if(i instanceof we)for(let l=0;l<o.length;l+=1){t=!1,r=!1,n=!1;let u=o[l],{category:h,endCategory:p,axisFill:d,grid:c,label:f}=u;if(u instanceof oa&&u.visible)for(let m=0;m<s.length;m+=1){let y;e===!0?y=xr({value:s[m].category,dataContext:s[m].dataContext}):y=s[m].category.toString(),h===y&&(r=!0),p===y&&(n=!0)}r&&n&&(t=!0),dt(d,t),dt(c,t),dt(f,t)}}function Qg(a){let{axis:i,axisMinimum:e,axisMaximum:t}=a,r;if(i instanceof re&&t!==void 0&&e!==void 0){let n=i.axisRanges.values,s=Z(i.chart.uid,"config"),o=Z(i.chart.uid,"isRotated"),l=Ll(i.renderer,o)?0:1,u=s?.axes?.[l]?.guides;for(let h=0;h<n.length;h+=1){let p=n[h],{value:d,endValue:c,axisFill:f,grid:m,label:y}=p;if($i(y?.uid,"isGuide")===!0){if(r=p.visible,r&&p instanceof Vr){let{start:v,end:b}=Rc(i,u?.[h]),x=Math.min(d,c,v??d,b??c),_=Math.max(d,c,v??d,b??c);x<e&&_<e||x>t&&_>t?r=!1:(p.value=x<e?e:x,p.endValue=_>t?t:_)}dt(f,r),dt(m,r),dt(y,r)}}}}function l_(a){a instanceof re?(a.adapter.add("min",i=>(Qg({axis:a,axisMinimum:i,axisMaximum:a.max}),i)),a.adapter.add("max",i=>(Qg({axis:a,axisMinimum:a.min,axisMaximum:i}),i))):a instanceof we&&a.events.on(le.Validated,()=>{let i=Z(a.chart.uid,"isNonAggregatedChart");o_({axis:a,isNonAggregatedChart:i})})}function pc(a){let{axes:i,isSecondValueAxis:e=!1,isXAxis:t,valueFormat:r,chartType:n,queryObject:s}=a,o;if(fo({isXAxis:t,chartType:n,valueFormat:r})&&!e)o=i.push(new we);else if(Da(r))o=i.push(new xe);else if(Br(r)){o=i.push(new re);let l=Z(o.chart.uid,"formatLocale");o.numberFormatter=tn({type:A.NumberAxisFormat,iLocale:o.chart.language.locale,formatLocale:l}),o.numberFormatter.numberFormat="#",e?(o.renderer.opposite=!0,o.renderer.grid.template.disabled=!0):s_(o)}o!==void 0&&(i0(o),a_({axis:o,valueFormat:r,axisRenderer:o.renderer,queryObject:s}),l_(o))}function ab(a){let{chart:i,axesConfig:e,isRotated:t,chartType:r,queryObject:n}=a;ir(i.uid,{isRotated:t===!0});let s=t===!0?e?.[1]:e?.[0],o=t===!0?e?.[0]:e?.[1],l=s?.valueFormat,u=o?.valueFormat;l!==void 0&&u!==void 0&&(i.xAxes.clear(),i.yAxes.clear(),pc({chartType:r,isXAxis:t!==!0,axes:i.xAxes,valueFormat:l,queryObject:n}),pc({chartType:r,isXAxis:t===!0,axes:i.yAxes,valueFormat:u,queryObject:n}),e?.[2]!==void 0&&pc({chartType:r,isXAxis:t===!0,axes:t===!0?i.xAxes:i.yAxes,valueFormat:e[2].valueFormat,isSecondValueAxis:!0,queryObject:n}))}function u_(a){let{axis:i,isLogarithmic:e,axisConfigIndex:t}=a,r=Z(i.chart.uid,"config"),n=e===!0&&pm({chartConfig:r,chartData:i.chart.data,axisConfigIndex:t});(i instanceof xe||i instanceof re)&&(i.logarithmic=n,i.treatZeroAs=n?j.treatZeroValueAs:0)}function h_(a,i){let{minimum:e,maximum:t,isLogarithmic:r}=i??{},{buffer:n}=i??{};return n??=j.buffer,a instanceof re&&!(a instanceof xe)&&!n&&(r!==!0||t!=null||e!=null)}function p_(a,i){let e=!1;return a instanceof re&&!(a instanceof xe)&&(e=h_(a,i),a.strictMinMax=e),e}function d_(a){let{axis:i,axisConfig:e,chartType:t,isSecondValueAxis:r}=a,n=e?.minimum,s=e?.maximum,o=e?.isLogarithmic??!1,l=n,u=s,{chart:h}=i,p=Z(h.uid,"isRotated"),d=Z(h.uid,"config"),c=0;if(h instanceof rt&&d!==void 0){let f=as(d),m=Ll(i.renderer,p),y=RC(h),v=hm({chartConfig:d,isSecondValueAxis:r,seriesIds:y}),b=um({chartConfig:d,chartData:h.data,filteredSeriesIds:v});if(f===Ti.Stacked100)l=Number.NaN,u=Number.NaN;else{let{minX:x,maxX:_,minY:$,maxY:O}=b,[F,w]=m?[x??Number.NaN,_??Number.NaN]:[$,O];c=F,t===A.BarSeries||t===A.ComboLineAndBarSeries||t===A.LineSeries&&f===Ti.Stacked&&!m?(l=Math.min(F,0),u=Math.max(w,0)):(l=F,u=w)}l=n??l,u=s??u}return o&&l!==void 0&&l!==null&&l<=0&&(l=l0(c)),{min:l,max:u}}function nb(a){let{axis:i,axisConfig:e,chartType:t,isSecondValueAxis:r}=a,{minimum:n,maximum:s,isLogarithmic:o}=e??{};if(i instanceof re||i instanceof xe)if(p_(i,e)){let l=n,u=s;if(u0({minimumFromConfig:n,maximumFromConfig:s,isLogarithmic:o})){let h=d_({axis:i,axisConfig:e,chartType:t,isSecondValueAxis:r});l=h.min,u=h.max}l=l??Number.NaN,u=u??Number.NaN,Number.isNaN(l)||Number.isNaN(u)||l<u?(i.min=l,i.max=u):(i.min=Number.NaN,i.max=Number.NaN),t===A.GaugeSeries&&i.validate()}else i.min=Number.NaN,i.max=Number.NaN}function c_(a){let{axis:i,timeIntervalInfo:e,dateBaseInterval:t}=a;if(i instanceof xe){let{size:r,unit:n}=e??{};if(n||({size:r,unit:n}=t??{}),r&&n!==void 0){let s;switch(n){case De.Second:s="second";break;case De.Minute:s="minute";break;case De.Hour:s="hour";break;case De.Day:s="day";break;case De.Week:s="week";break;case De.Month:s="month";break;case De.Year:s="year";break}s!==void 0&&(i.baseInterval={timeUnit:s,count:r})}}}function f_(a,i){a instanceof re&&(a.renderer.baseGrid.disabled=i!==!0)}function m_(a,i){a.cursorTooltipEnabled=i===!0}function y_(a,i){let e=a.renderer instanceof xt;a.events.once(le.Validated,()=>{let t=a.renderer instanceof Ot?j.yAxisTitleLabel:j.xAxisTitleLabel;e&&(t={...t,dy:t.dy??0}),Xn({label:a.title,labelConfig:i,defaults:t}),Oh({chart:a.chart,label:a.title,labelType:a.renderer instanceof xt?rr.XAxisTitle:rr.YAxisTitle})})}function g_(a,i){let e=!0;switch(i){case A.BoxPlotSeries:e=a instanceof wt;break}return e}function v_(a){let i=or(()=>{let{chart:e}=a,t=Z(e.uid,"config");if(e!==void 0&&t!==void 0){let r=at(t?.series);if(g_(a,r)){let n=Z(e.uid,"isRotated"),s=Vi(a.uid,"stackedType");s===Ti.Stacked100&&!a.visible&&dt(a,!1);let o=e.xAxes.getIndex(0),l=e.yAxes.getIndex(0),u=e.yAxes.getIndex(1),h=n===!0?1:0,p=t.axes?.[h],d=n===!0?0:1,c=t.axes?.[d],f=t.axes?.[2];[{axis:o,axisConfig:p,updateLabels:!1},{axis:l,axisConfig:c,updateLabels:!0},{axis:u,axisConfig:f,updateLabels:!0,isSecondValueAxis:!0}].forEach(m=>{let{axis:y,axisConfig:v,updateLabels:b,isSecondValueAxis:x}=m;y!==void 0&&(nb({axis:y,chartType:r,axisConfig:v,isSecondValueAxis:x}),b!==void 0&&y.events.once(le.Validated,()=>{let{labelToRender:_}=rb(a,s);_&&(_.html=n===!0?"{valueX}":"{valueY}")}))})}}},j.debounceTime);a.events.once(le.Validated,i)}function b_(a,i){if(a instanceof re){let{integerOnlyValues:e,valueFormat:t}=i,r=gm(t)?t.intlOptions.maximumFractionDigits:void 0;a.maxPrecision=e===!0||r===0?0:Number.NaN}}function dc(a){let{axis:i,axisConfig:e,axisConfigIndex:t,timeIntervalInfo:r,chartType:n,horizontalAxisLabelsBehavior:s,verticalAxisLabelsBehavior:o,axisLabelsBehaviorChanged:l,guideTooltipFormatter:u,stackedType:h,axisValueFormatter:p,isSecondValueAxis:d,isRotated:c,isTimeOnlyField:f,utilsStrings:m,errorStrings:y}=a,{visible:v,isLogarithmic:b,title:x,grid:_,lineSymbol:$,labels:O,guides:F,valueFormat:w,displayZeroLine:D,displayCursorTooltip:B,tickSpacing:L,dateBaseInterval:M}=e;c_({axis:i,timeIntervalInfo:r,dateBaseInterval:M}),io({element:i.renderer.grid.template,lineSymbol:_,visible:v}),io({element:i.renderer.line,lineSymbol:{color:[...j.color],...$??ef()},visible:v}),io({element:i.renderer.ticks.template,lineSymbol:$,visible:v}),J$({axis:i,axisConfig:e,horizontalAxisLabelsBehavior:s,verticalAxisLabelsBehavior:o,axisLabelsBehaviorChanged:l,isSecondValueAxis:d}),b_(i,e),j$({axis:i,labelsConfig:O,horizontalAxisLabelsBehavior:s,isSecondValueAxis:d,tickSpacing:L}),o0({axis:i,isXAxis:Ll(i.renderer,c),chartType:n,labelsTextSymbol:e.labels.content,formatOptions:w,overridePercentMultiplication:h===Ti.Stacked100,axisValueFormatter:p,isTimeOnlyField:f,errorStrings:y}),nb({axis:i,axisConfig:e,chartType:n,isSecondValueAxis:d}),u_({axis:i,isLogarithmic:b,axisConfigIndex:t}),y_(i,x),m_(i,B),d!==!0&&(N$({axis:i,guides:F,guideTooltipFormatter:u,utilsStrings:m}),f_(i,D))}function x_(a){let{chart:i,rotationChanged:e,isRotated:t,dualAxisChanged:r,timeIntervalInfoWasReset:n,timeIntervalInfo:s,guideTooltipFormatter:o,xAxisLabelFormatter:l,yAxisLabelFormatter:u,secondaryYAxisLabelFormatter:h,utilsStrings:p,errorStrings:d,queryObject:c}=a,{axisLabelsBehaviorChanged:f}=a,m=Z(i.uid,"config"),y=m.axes,{horizontalAxisLabelsBehavior:v,verticalAxisLabelsBehavior:b}=m,x=at(m.series),_=as(m),$=Z(i.uid,"fieldList")?.some(ct=>ct.name===m.series[0].x&&ct.type===gr.TimeOnly)??!1,O=t===!0?1:0,F=t===!0?0:1,w=y?.[O],D=y?.[F],B=i.xAxes.getIndex(0);S_({chart:i,dualAxisChanged:r,rotationChanged:e,timeIntervalInfoWasReset:n,axisLabelsBehaviorChanged:f})&&(ab({chart:i,axesConfig:y,isRotated:t,chartType:x,queryObject:c}),f=[!0,!0]),B=i.xAxes.getIndex(0);let L=i.yAxes.getIndex(0),M=i.xAxes.getIndex(1)??i.yAxes.getIndex(1),Q=B?.start,ae=B?.end,K=L?.start,z=L?.end,Te=M?.start,ue=M?.end,Me={timeIntervalInfo:s,chartType:x,horizontalAxisLabelsBehavior:v,verticalAxisLabelsBehavior:b,axisLabelsBehaviorChanged:f,guideTooltipFormatter:o,stackedType:_,isRotated:t,utilsStrings:p,errorStrings:d};B!==void 0&&w!==void 0&&dc({...Me,axis:B,axisConfig:w,axisConfigIndex:O,axisValueFormatter:O===0?l:u,isTimeOnlyField:$}),L!==void 0&&D!==void 0&&dc({...Me,axis:L,axisConfig:D,axisConfigIndex:F,axisValueFormatter:F===1?u:l,isTimeOnlyField:$}),M!==void 0&&y?.[2]!==void 0&&dc({...Me,axis:M,axisConfig:y[2],axisConfigIndex:2,axisValueFormatter:h,isSecondValueAxis:!0,isTimeOnlyField:$}),e===!0&&[{axis:B,start:Q,end:ae},{axis:L,start:K,end:z},{axis:M,start:Te,end:ue}].forEach(ct=>{let{axis:qe,start:ne,end:Ne}=ct;qe!==void 0&&qe.events.once(le.Validated,()=>{xc({axis:qe,start:ne,end:Ne})})}),B!==void 0&&B.ghostLabel.setPropertyValue("disabled",!0),L!==void 0&&L.ghostLabel.setPropertyValue("disabled",!0),M!==void 0&&M.ghostLabel.setPropertyValue("disabled",!0)}function S_(a){let{chart:i,dualAxisChanged:e,rotationChanged:t,timeIntervalInfoWasReset:r,axisLabelsBehaviorChanged:n}=a,s=Z(i.uid,"config"),{rotated:o,series:l}=s,u=s.axes,h=at(l),p=o===!0?1:0,d=o===!0?0:1,c=u?.[p]?.valueFormat,f=u?.[d]?.valueFormat,m=i.xAxes.getIndex(0),y=i.yAxes.getIndex(0),v=m===void 0||t||c!==void 0&&Vg({axis:m,valueFormat:c,chartType:h}),b=y===void 0||t||f!==void 0&&Vg({axis:y,valueFormat:f,chartType:h});return e===!0||t===!0||r===!0||n?.[0]||n?.[1]||v||b}function j4(a){ab(a)}function E4(a){let{chart:i,chartConfig:e,rotationChanged:t,axisLabelsBehaviorChanged:r,isRotated:n,dualAxisChanged:s,timeIntervalInfoWasReset:o,timeIntervalInfo:l,guideTooltipFormatter:u,xAxisLabelFormatter:h,yAxisLabelFormatter:p,secondaryYAxisLabelFormatter:d,utilsStrings:c,errorStrings:f,queryObject:m}=a,y=as(e);x_({chart:i,rotationChanged:t,axisLabelsBehaviorChanged:r,isRotated:n,dualAxisChanged:s,timeIntervalInfoWasReset:o,timeIntervalInfo:l,guideTooltipFormatter:u,xAxisLabelFormatter:h,yAxisLabelFormatter:p,secondaryYAxisLabelFormatter:d,utilsStrings:c,errorStrings:f,queryObject:m});let v=n===!0?i.yAxes.getIndex(0):i.xAxes.getIndex(0);if(v!==void 0){v instanceof we&&(v.dataFields.category=fp(e));let _=v.renderer,$=_.grid.template;$.location=0,_.cellStartLocation=.1,_.cellEndLocation=.9;let O=e.orderOptions?.data&&"orderBy"in e.orderOptions.data&&e.orderOptions.data.orderBy===Fa.Descending,F=n===!0;O&&v instanceof xe&&(F=!F),_.inversed=F}let b=n===!0?i.xAxes.getIndex(0):i.yAxes.getIndex(0),x=n===!0?i.xAxes.getIndex(1):i.yAxes.getIndex(1);y===Ti.Stacked100?(b instanceof re&&(b.calculateTotals=!0),x instanceof re&&(x.calculateTotals=!0)):(b instanceof re&&(b.calculateTotals=!1),x instanceof re&&(x.calculateTotals=!1))}function W4(a,i){let e;return i!==void 0&&(e={...i},e.legend!==void 0&&(e.legend.position=a)),e}function H4(a,i){let e;return i!==void 0&&(e={...i},e.legend!==void 0&&(e.legend.visible=a)),e}function z4(a,i){let e;return i!==void 0&&(e={...i,rotated:a}),e}function C_(a){let i;return a!==void 0&&(i={...a},delete i.axes?.[0]?.minimum,delete i.axes?.[0]?.maximum,delete i.axes?.[1]?.minimum,delete i.axes?.[1]?.maximum),i}function X4(a,i){return i!=null||Sp(a)}async function Y4(a,i){let e=!1;return Hr(i)||Vf(a)?a&&Hr(i)&&(e=await Qf(a,i)):e=!0,e}async function P_(a){let{queryObject:i,chartConfig:e,options:t,splitByField:r}=a,n=[],s,o=pa(e),l=o.series[0],u=dp({queryObject:i,chartConfig:o,runtimeDataFilters:t?.runtimeDataFilters,ignoreViewExtent:t?.ignoreViewExtent});if(u.outStatistics?.[0]?.outStatisticFieldName&&(u.outStatistics[0].outStatisticFieldName=Ct.outStatistics.outStatisticFieldName),Yt(l)&&da({xAxisValueFormatType:br(o),setTimeBinningInfoWhenNotProvided:t?.setTimeBinningInfoWhenNotProvided,seriesConfig:l,queryObject:i})&&ss(i)){let{temporalBinning:h,x:p}=l,{uniqueQuery:d}=Pl({chartConfig:o,queryConfig:u,queryObject:i,options:t});s=await rp({queryObject:i,dateField:p,splitByField:r,queryConfig:d,temporalBinning:h}),n=Array.from(new Set(s.flatMap(c=>{let{stackedAttributes:f}=c,m=[];return f&&(m=f.map(y=>y[r]).filter(y=>y!==void 0)),m})).values())}else{let{uniqueQuery:h}=Pl({chartConfig:o,queryObject:i,queryConfig:u,options:t}),{elementCount:p}=await wc({chartConfig:o,queryObject:i,queryConfig:u,behaviorAfterLimit:t?.chartLimits?.behaviorAfterLimit,numberMaxOfFeaturesToFetch:h.num});s=await Cr({queryObject:i,queryConfig:h,featureCount:p}),n=Array.from(new Set(s.map(d=>d.attributes[r]).filter(d=>d!==void 0)).values())}return{allValues:n,preFetchedQueryResponse:s}}function $_(a,i){let e=new Map;return a.series.forEach(t=>{let r=zr({where:t.query?.where,normalize:!0,escape:!1});i&&r!==null&&(r=Number(r));let n=at([t]);n!==void 0&&e.set(n,[...e.get(n)??[],r])}),e}function __(a){let{allValues:i,configUniqueValuesPerSeriesType:e,initialConfigWasEmpty:t}=a,r=new Map;return Array.from(e.keys()).forEach(n=>{let s=e.get(n)??[],o=[];t?o=i:i.forEach(l=>{s.includes(l)||o.push(l)}),r.set(n,o)}),r}function T_(a){let{chartConfig:i,missingValue:e,splitByField:t,seriesTemplate:r}=a,n=JSON.parse(JSON.stringify({...i.series[0],...r}));if(n.query){if(n.id=`${e}-${i.series.length}-${Date.now()}`,n.name=`${e}`,n.query.outStatistics?.[0]!==void 0){let o=n.id;n.query.outStatistics[0].outStatisticFieldName=o,"y"in n&&(n.y=o)}let s=typeof e=="number"||e===null?e:`'${e}'`;n.query.where=`${t}=${s}`}return n}async function O_(a){let{updateSplitBySeries:i,config:e,options:t,queryObject:r}=a,{seriesTemplate:n}=i??{},s;if(r&&!Hr(r)&&i!==void 0&&e!==void 0&&(e.series.length>0||n!==void 0)&&i.addMissingSeries){let o=e.series.length===0;e.series.length===0&&n!==void 0&&e.series.push(n);let l=Ae(e.series);if(l===V.BoxPlotMonoFieldAndSplitBy||l===V.BoxPlotMultiFieldsAndSplitBy||l===V.BoxPlotMonoFieldAndCategoryAndSplitBy||l===V.BarAndLineSplitBy||l===V.BarAndLineSplitByNoAggregation){let u=si(e.series[0]?.query?.where),h=Pr(r),p=em(u,h),d=p?xo(p):!1,c=await P_({queryObject:r,chartConfig:e,splitByField:u,options:t}),{allValues:f}=c;if({preFetchedQueryResponse:s}=c,f.length>0){let m=$_(e,d),y=__({allValues:f,configUniqueValuesPerSeriesType:m,initialConfigWasEmpty:o});Array.from(y.keys()).forEach(v=>{(y.get(v)??[]).forEach(b=>{e.series.push(T_({chartConfig:e,seriesTemplate:n,missingValue:b,splitByField:u}))}),o&&e.series.shift()})}}}return s}function w_(a,i){i&&!Sp(i)&&(i=Nf({chartConfig:i,queryObject:a}))}async function q4(a){let{configToAlter:i,layer:e,addMissingSeries:t,updateSplitBySeries:r,chartContainer:n,queryObject:s,options:o}=a,l=i,u;return l&&(w_(e,l),l=await Pm(l,e),t&&(u=await O_({updateSplitBySeries:r,config:l,options:o,queryObject:s})),l=nm(l,n)),{alteredConfig:l,preFetchedQueryResponse:u}}function G4(a){let{data:i,config:e,hideEmptySeries:t}=a,r=e.series.length,n=pa(e),s=!1;if(t&&r>1&&i){let o=Kl(i),l=at(e?.series),u=Ae(e?.series),h=new Set;switch(l){case A.ComboLineAndBarSeries:case A.BarSeries:case A.RadarSeries:case A.LineSeries:{n.series.forEach(d=>{if(Array.isArray(o)){let c="";"y"in d&&(c=Array.isArray(d.y)?d.y[0]:d.y,u===V.BarAndLineSplitByNoAggregation&&(c=`${c}_${zr({where:d.query?.where,keepSurroundingQuotes:!1,escape:!1})}`),o.some(f=>lm({dataItem:f,x:d.x,y:c}))&&h.add(d))}});break}case A.BoxPlotSeries:{if(Sr(e)){let d=Aa(e);e.series.forEach(c=>{let f,m;c.type===A.BoxPlotSeries?(f=i.dataItems,m=f?.some(y=>om({dataItem:y,splitBy:c.query?.where,showOutliers:d}))):c.type===A.LineSeries&&(f=i.meanLines,m=f?.some(y=>BC(y,c.query?.where))),m&&h.add(c)})}break}}let p=Array.from(h.values());s=p.length>0&&p.length<r,s&&(n.series=p)}return{seriesFilteredOut:s,filteredConfig:n}}var U4=a=>{let i,e=a.series[0];return Yt(e)&&(i=e.temporalBinning?.size),i},F_=a=>{let i,e=a.series[0];return Yt(e)&&(i=e.temporalBinning?.unit),i},K4=a=>{let i,e=a.series[0];return Yt(e)&&(i=e.temporalBinning?.timeAggregationType),i},Z4=a=>{let i,e=a.series[0];return Yt(e)&&(i=e.temporalBinning?.trimIncompleteTimeInterval),i},Q4=a=>{let i,e=a.series[0];return Yt(e)&&(i=e.temporalBinning?.nullPolicy),i},D_=(a,i)=>{i?.series?.forEach(e=>{Yt(e)&&(e.temporalBinning??={},e.temporalBinning.size=a)}),Oi({config:i,value:null,axisIndex:1,isMax:!1}),Oi({config:i,value:null,axisIndex:1,isMax:!0})},A_=(a,i)=>{i?.series?.forEach(e=>{Yt(e)&&(e.temporalBinning??={},e.temporalBinning.nullPolicy=a)}),Oi({config:i,value:null,axisIndex:1,isMax:!1}),Oi({config:i,value:null,axisIndex:1,isMax:!0})},J4=(a,i)=>{i.series?.forEach(e=>{Yt(e)&&(e.temporalBinning??={},e.temporalBinning.unit=a)}),Oi({config:i,value:null,axisIndex:1,isMax:!1}),Oi({config:i,value:null,axisIndex:1,isMax:!0})},e9=(a,i)=>{i.series?.forEach(e=>{Yt(e)&&(e.temporalBinning??={},e.temporalBinning.timeAggregationType=a)}),Oi({config:i,value:null,axisIndex:1,isMax:!1}),Oi({config:i,value:null,axisIndex:1,isMax:!0})},t9=(a,i)=>{i.series?.forEach(e=>{Yt(e)&&(e.temporalBinning??={},e.temporalBinning.trimIncompleteTimeInterval=a)}),Oi({config:i,value:null,axisIndex:1,isMax:!1}),Oi({config:i,value:null,axisIndex:1,isMax:!0})},i9=a=>{D_(0,a)},r9=a=>a.hideEmptyRowsAndColumns,a9=(a,i)=>{a.hideEmptyRowsAndColumns=i},n9=(a,i)=>{let e=a.series[0];e.heatRulesType=i},s9=a=>a.series[0].heatRulesType,o9=(a,i)=>{let e=a.series[0];e.gradientRules=i},l9=a=>a.series[0].gradientRules,u9=a=>{let{yField:i,config:e,layerInfo:t}=a,{layerFieldsInfo:r}=t,n=iu(1,e),s=V_(e),o=Co(e),l=e.series[0];if(typeof i=="string"&&s!==i&&l&&(l.y=i,C_(e),s===n||o)){let u=kt(r,i);ps(e,1,u)}},V_=a=>a.series[0].y??"",h9=a=>{let{binning:i,config:e,commonStrings:t}=a,r=e.series[0];if(r.xTemporalBinning=i,i?.unit!==void 0&&i.unit in t.utilsStrings.heatChartCalendarDatePartsUnits){let n=t.utilsStrings.heatChartCalendarDatePartsUnits[i.unit];ps(e,0,n)}},p9=a=>a.series[0].xTemporalBinning,d9=a=>{let{binning:i,config:e,commonStrings:t}=a,r=e.series[0];if(r.yTemporalBinning=i,i?.unit!==void 0&&i.unit in t.utilsStrings.heatChartCalendarDatePartsUnits){let n=t.utilsStrings.heatChartCalendarDatePartsUnits[i.unit];ps(e,1,n)}},c9=a=>a.series[0].yTemporalBinning,L_=(a,i)=>{i.orderOptions??={};let e=i.axes?.[0]?.valueFormat?.type==="category"?gi.Category:gi.YValue,t=Sc(i)[0],r=i.axes?.[1]?.valueFormat?.type==="category"?gi.Category:gi.YValue,n=Sc(i)[1],s={...i.orderOptions.data??{},orderType:gi.MultiAxes};t===eu.customSort&&e===gi.Category&&(s.orderByX=[...a]),n===eu.customSort&&r===gi.Category&&(s.orderByY=[...a]),Object.keys(s).length>1&&(i.orderOptions.data=s)},f9=(a,i)=>{let e=i.series[0];e.gridLine&&(e.gridLine.width=a)},m9=a=>a.series[0].gridLine?.width,y9=(a,i)=>{let e=i.series[0],t=a?.length===4&&a.every(r=>typeof r=="number");e.gridLine&&t&&(e.gridLine.color=a)},g9=a=>a.series[0].gridLine?.color,v9=(a,i)=>{let e=i.legend;e&&(e.position=a)},b9=a=>a.legend?.position??St.Bottom,x9=a=>a.series[0].query?.outStatistics?.[0]?.onStatisticField,S9=a=>{let{field:i,config:e,layerInfo:t,commonStrings:r}=a,n=e.series[0].query?.outStatistics?.[0],s=Hc(e,t,r);n?(n.onStatisticField=i,n.outStatisticFieldName=`${n.statisticType}_${i}`):e.series[0].query={outStatistics:[{onStatisticField:i,outStatisticFieldName:`${J.Count}_${i}`,statisticType:J.Count}]},e.title&&s&&(e.title.content.text=kh(e,t,r))},C9=a=>a.series[0].query?.outStatistics?.[0].statisticType??J.Count,P9=a=>{let{aggregationType:i,config:e,layerInfo:t,commonStrings:r}=a,n=e.series[0]?.query?.outStatistics?.[0],s=Hc(e,t,r);n&&i!==J.NoAggregation&&(n.statisticType=i,n.outStatisticFieldName=`${i}_${n.onStatisticField}`),(i===J.Count||i===J.Sum)&&k_(yi.Zero,e),e.title&&s&&(e.title.content.text=kh(e,t,r))},$9=a=>a.nullPolicy,k_=(a,i)=>{i.nullPolicy=a},_9=a=>a.series[0].emptyCells,T9=(a,i)=>{i.series[0].emptyCells=a},O9=a=>a.series[0].emptyCells?.text,w9=(a,i)=>{i.series[0].emptyCells?i.series[0].emptyCells.text=a:i.series[0].emptyCells={text:a}},F9=a=>a.includeLeapDay,D9=(a,i)=>{i.includeLeapDay=a},A9=a=>a.series[0].emptyCells?.symbol,V9=(a,i)=>{i.series[0].emptyCells?i.series[0].emptyCells.symbol=a:i.series[0].emptyCells={symbol:a}};function L9(a){return a.viewType}function k9(a,i){yp(i)||(i.viewType=a)}function I9(a){return a.series[0].classBreaksRules?.breaksCount??R.classBreaks.breaksCount}function M9(a,i){i.series[0].classBreaksRules!==void 0?i.series[0].classBreaksRules.breaksCount=a??R.classBreaks.breaksCount:i.series[0].classBreaksRules={breaksCount:a??R.classBreaks.breaksCount}}function N9(a){return a.series[0].classBreaksRules?.classificationMethod}function R9(a,i){i.series[0].classBreaksRules!==void 0?i.series[0].classBreaksRules.classificationMethod=a:i.series[0].classBreaksRules={classificationMethod:a},i.series[0].classBreaksRules.breaksCount=i.series[0].classBreaksRules.breaksCount??R.classBreaks.breaksCount}function B9(a,i){i.firstDayOfWeek=a}function j9(a){return a.firstDayOfWeek}function Tl(a){let{seriesIndex:i,xAxisField:e,aggregationType:t,config:r,layerInfo:n,commonStrings:s}=a,o=Mi(n?.layer).idField,l,u=r.series[i??0],h=!1,p=!1,d=!1;if(u===void 0){let m=r.series;h=m.slice(0,i).every(y=>$t(y)),p=m.slice(0,i).every(y=>_t(y)),d=m.slice(0,i).every(y=>Cp(y))}else h=$t(u),p=_t(u),d=Cp(u);h?l=of({commonStrings:s,seriesIndex:i,objectIDField:o}):p?l=lf({commonStrings:s,seriesIndex:i,objectIDField:o}):d?l=sf(s,o):l=uf({seriesIndex:i,objectIDField:o,commonStrings:s});let c=r.series[0]?.dataLabels,f={...l,x:e,y:"",dataLabels:{...l.dataLabels,type:l.dataLabels?.type??A.Text,content:{...l.dataLabels?.content,...c?.content,type:ni.TS},visible:c?.visible??!1}};if(f.query={groupByFieldsForStatistics:[e]},t!==J.NoAggregation&&o!==void 0){let m=`${t}_${o}_0`.toUpperCase();f.y=m,f.query.outStatistics=[{statisticType:t,onStatisticField:o,outStatisticFieldName:m}]}if(Yt(r.series[0])&&Yt(f)){let m;if(r?.series?.[0]!==void 0&&(m=Ae(r.series)),m!==V.BarAndLineNoAggregation&&m!==V.BarAndLineSplitByNoAggregation){let y=F_(r);y===De.Quarter&&(y=De.Month),f.temporalBinning={...r.series[0]?.temporalBinning,unit:y}}}return pa(f)}function kh(a,i,e){let{layerFieldsInfo:t}=i,{idField:r,isTraditionalTypeOID:n}=Mi(i.layer),s=ds(a),o=Wc(a),l=ob(a),u=Ec(a),h=n&&(o.length===0||o.includes(r)),p=hf(l,e),d=h?"":o.map(x=>kt(t??[],x)).join(", "),c=kt(t??[],s),f=kt(t??[],u),m=a.series.some(x=>Ni(x)),y=m?"category":"xAxisField",v=c,b="";if(Op({fieldName:s,numericFields:o,fieldList:t}))b=Kt(e.titleLabels.aggrTypeOfAggrFields,{aggregationType:p,aggregationFields:d});else if(l===J.NoAggregation){let x=h?r:d;if(u===""){let _=m?"aggrTypeCategory":"aggrTypeXAxisField";b=Kt(e.titleLabels[_],{aggregationType:x,[y]:v})}else{let _=m?"aggrTypeCategoryBySplitBy":"aggrTypeXAxisFieldBySplitBy";b=Kt(e.titleLabels[_],{aggregationType:x,[y]:v,splitByField:f})}}else if(l===J.Count)if(u===""){let x=m?"aggrTypeCategory":"aggrTypeXAxisField";b=Kt(e.titleLabels[x],{aggregationType:p,[y]:v})}else{let x=m?"aggrTypeCategoryBySplitBy":"aggrTypeXAxisFieldBySplitBy";b=Kt(e.titleLabels[x],{aggregationType:p,[y]:v,splitByField:f})}else if(u!==""){let x=m?"aggrTypeOfAggrFieldByCategoryBySplitByField":"aggrTypeOfAggrFieldByXAxisFieldBySplitByField";b=Kt(e.titleLabels[x],{aggregationType:p,aggregationField:d,[y]:v,splitByField:f})}else if(o.length>0){let x=m?"aggrTypeOfAggrFieldsByCategory":"aggrTypeOfAggrFieldsByXAxisField";b=Kt(e.titleLabels[x],{aggregationType:p,aggregationFields:d,[y]:v})}return b}var sb=a=>zr({where:a.query?.where,normalize:!1,escape:!1})??"",ob=a=>a?.series?.[0]?.query?.outStatistics?.[0]?.statisticType??J.NoAggregation,Ec=qc(a=>{let i=a?.series?.[0]?.query?.where?.split("=")[0].trim()??"";return us(a?.series?.[0]?.query?.where)?"":i},a=>a?.series?.[0]?.query?.where),Wc=a=>{let i=[];if(Ec(a)==="")i=a?.series.map(e=>{let t=e.query?.outStatistics?.map(r=>r.onStatisticField)??[];return t?.length>0?t:e.y}).flat()??[];else{let e=a?.series?.[0],t=e?.query?.outStatistics?.[0]?.onStatisticField??[e?.y].flat()[0];i=t!==void 0?[t]:[]}return i.filter(e=>e!=="")};function I_(a){let{numericFields:i,aggregationType:e,config:t,layerInfo:r}=a,n=!1;e===J.Count?n=!0:e===J.NoAggregation&&(n=i.every(l=>{let u=r.layerFieldsInfo.find(h=>h.name===l);return u!==void 0?lp(u):!1})),_p(t,1,n);let s=t.series.some(l=>$t(l)),o=t.series.some(l=>_t(l));if(s||o){let l=ds(t),u=r.layerFieldsInfo.find(p=>p.name===l),h=u!==void 0&&lp(u);_p(t,0,h)}}var Sc=a=>{let i;if(rs(a)){let e=a.orderOptions?.data?.orderByX??[""],t=a.orderOptions?.data?.orderByY??[""],r=a.axes?.[0]?.valueFormat?.type==="category"?gi.Category:gi.YValue,n=a.axes?.[1]?.valueFormat?.type==="category"?gi.Category:gi.YValue;i=[Tp(e,r),Tp(t,n)]}else{let e=a.orderOptions?.data?.orderType??gi.Category,t=a.orderOptions?.data&&"orderBy"in a.orderOptions.data?a.orderOptions.data.orderBy:Fa.Ascending;i=[Cm(t,e)]}return i};function M_(a){let{xAxisField:i,numericFields:e,aggregationType:t,config:r,layerInfo:n,commonStrings:s}=a,{layerFieldsInfo:o}=n,l=!1,u=Tl({config:r,xAxisField:i,aggregationType:t,layerInfo:n,seriesIndex:0,commonStrings:s}),h=tu({config:r,xAxisField:i,numericFields:e,aggregationType:t,layer:n.layer,fieldList:o}).name,p={...u,id:`series_${Date.now()}`,name:s.axisLabels.values,x:ho,y:h},d=[];for(let f of e)d.push({onStatisticField:f,outStatisticFieldName:`${f}_0`.toUpperCase(),statisticType:t});p.query={outStatistics:d};let c=r.series[0];return c!==void 0&&(p.id=c.id,($t(p)&&$t(c)||_t(p)&&_t(c))&&Ol(p,c),r.colorMatch||(Ni(c)&&Ni(p)?p.fillSymbol=c.fillSymbol:($t(p)&&$t(c)||_t(p)&&_t(c))&&(p.lineSymbol=c.lineSymbol,p.markerSymbol=c.markerSymbol),l=!0),p.id=c.id,c.name!==u.name&&(p.name=c.name)),r.series.length===1&&(($t(p)||_t(p))&&Ol(p,r.series[0]),r.colorMatch||(Ni(p)?p.fillSymbol=r.series[0].fillSymbol:($t(p)||_t(p))&&(p.lineSymbol=r.series[0].lineSymbol,p.markerSymbol=r.series[0].markerSymbol),l=!0)),r.colorMatch=!l,[p]}function lb(a){let{xAxisField:i,numericFields:e,aggregationType:t,config:r,layerInfo:n,commonStrings:s}=a,{layerFieldsInfo:o}=n,l=Mi(n.layer).idField,u=[],h=!1;for(let m=0;m<e.length;m+=1){let y=Tl({config:r,xAxisField:i,aggregationType:t,layerInfo:n,seriesIndex:m,commonStrings:s}),v=tu({config:r,xAxisField:i,numericFields:e,aggregationType:t,layer:n.layer,numericFieldIndex:m,fieldList:o}).name,b=e[m],x={...y,query:{...y.query}};e&&b!==l&&(x={...x,id:b,name:kt(o,b)});let _=b;x.query!==void 0&&(t!==J.NoAggregation?(_=v,x.query.outStatistics=[{...y.query?.outStatistics?.[0]??{},onStatisticField:b,outStatisticFieldName:v,statisticType:t}]):delete x.query.outStatistics),x.y=_;let $=r.series.find(O=>O.query?.outStatistics?.[0]?.onStatisticField===b&&O.query.where===void 0||O.query?.outStatistics===void 0&&(O.y===b||O.x===b));if($!==void 0&&typeof $.y=="string"&&$.y.trim()!==""){($t(x)&&$t($)||_t(x)&&_t($))&&Ol(x,$),r.colorMatch||(Ni(x)&&Ni($)?x.fillSymbol=$.fillSymbol:($t(x)&&$t($)||_t(x)&&_t($))&&(x.lineSymbol=$.lineSymbol,x.markerSymbol=$.markerSymbol),h=!0);let O=Tl({config:r,xAxisField:i,aggregationType:t,layerInfo:n,seriesIndex:m,commonStrings:s});x.id=$.id,$.id!==O.id&&$.name!==O.name&&(x.id=$.id,x.name=$.name),x.assignToSecondValueAxis=$.assignToSecondValueAxis,x.type===A.HeatSeries&&$.type===A.HeatSeries&&(x.y=$.y,x.heatRulesType=$.heatRulesType)}u.push(x)}let p=u.filter(m=>Ni(m)),d=u.filter(m=>$t(m)||_t(m)),c=r.series.filter(m=>Ni(m)),f=r.series.filter(m=>$t(m)||_t(m));return c.length===1&&p.length===1&&!r.colorMatch&&(Ni(c[0])&&Ni(p[0])&&(p[0].fillSymbol=c[0].fillSymbol),h=!0),f.length===1&&d.length===1&&(($t(f[0])&&$t(d[0])||_t(f[0])&&_t(d[0]))&&Ol(d[0],f[0]),r.colorMatch||(($t(f[0])&&$t(d[0])||_t(f[0])&&_t(d[0]))&&(d[0].lineSymbol=f[0].lineSymbol,d[0].markerSymbol=f[0].markerSymbol),h=!0)),r.colorMatch=!h,u}async function N_(a){let{splitByField:i,xAxisField:e,numericFields:t,aggregationType:r,config:n,layerInfo:s,commonStrings:o}=a,{layer:l,layerFieldsInfo:u}=s,{fetchNullValues:h}=n?.series?.[0]?.query??{},p=e!==ho?e:void 0,{categoriesArray:d,splitByFieldType:c,numericalField:f}=await xm({config:n,layer:l,layerFieldsInfo:u,xAxisField:p,aggregationFields:t,splitByField:i,fetchNullValues:h}),m=[],y=!1;if(d.length===0){m=lb({xAxisField:e,numericFields:t,aggregationType:r,config:n,layerInfo:s,commonStrings:o});for(let v of m)v.query&&(v.query.where=`${i}=''`)}else for(let v=0;v<d.length;v+=1){let b=d[v],x=tu({config:n,xAxisField:e,numericFields:t,aggregationType:r,layer:s.layer,seriesIndex:v,splitByField:i,fieldList:u}).name,_=Tl({config:n,xAxisField:e,aggregationType:r,layerInfo:s,seriesIndex:v,commonStrings:o}),$=ls({queryObject:s.layer,fieldName:i,fieldValue:b??""}),O=`${b}`,F={..._,id:O,name:$??O,y:x,query:{..._.query,where:`${i}=${c===gr.String&&b!==null?`'${b}'`:b}`,outStatistics:r!==J.NoAggregation?[{..._.query?.outStatistics?.[0]??{},onStatisticField:f,outStatisticFieldName:x,statisticType:r}]:void 0}};r===J.NoAggregation&&(F.query!==void 0&&(delete F.query.outStatistics,delete F.query.groupByFieldsForStatistics),F.y=f);let w=n.series.find(D=>String(sb(D)).trim().replace(/'/gu,"")===O);w!==void 0&&(($t(F)&&$t(w)||_t(F)&&_t(w))&&Ol(F,w),n.colorMatch||(Ni(F)&&Ni(w)?F.fillSymbol=w.fillSymbol:($t(F)&&$t(w)||_t(F)&&_t(w))&&(F.lineSymbol=w.lineSymbol,F.markerSymbol=w.markerSymbol),y=!0),F.id=w.id,F.name=w.name,F.assignToSecondValueAxis=w.assignToSecondValueAxis),F.query&&(F.query.fetchNullValues=n.series.some(D=>D.query?.fetchNullValues)),m.push(F)}return n.colorMatch=!y,m}var E9=async a=>{let{xAxisFieldName:i,splitByField:e,numericFields:t,aggregationType:r,config:n,layerInfo:s,commonStrings:o}=a,{layerFieldsInfo:l}=s??{},u=_m(n),h=ds(n),p=l.find(w=>w.name===h),d=n.series[0]?.query===void 0,c=l.find(w=>w.name===i),f=Hc(n,s,o),m=R_(n,s,o),y=B_(n,s),v=$p(n),b=n.series.some(w=>Ni(w)),x=mm(n.series),_=ym(n.series),$=rs(n),O={};$&&(O.classBreaksRules=n.series[0]?.classBreaksRules,O.xTemporalBinning=n.series[0]?.xTemporalBinning,O.yTemporalBinning=n.series[0]?.yTemporalBinning,O.emptyCells=n.series[0]?.emptyCells,O.nullPolicy=n.nullPolicy);let F=!1;if(tm(c)?v=Eh():!op(p)&&op(c)?v=Wh():!So(p)&&So(c)?(v=Wh(),F=!0):So(p)&&!So(c)&&(b?v=Eh():v=Wl(),F=!0),v!==void 0&&bm(n,o,v),u===0&&(n.series=[Tl({config:n,xAxisField:i,aggregationType:r,layerInfo:s,commonStrings:o})]),n.series.forEach(w=>{w.x=i,w.query!==void 0&&(w.query.groupByFieldsForStatistics=[i])}),e===""||t.length>1?Op({fieldName:i,numericFields:t,fieldList:l})?n.series=M_({config:n,layerInfo:s,xAxisField:i,numericFields:t,aggregationType:r,commonStrings:o}):n.series=lb({config:n,layerInfo:s,xAxisField:i,numericFields:t,aggregationType:r,commonStrings:o}):(await Promise.resolve(),n.series=await N_({config:n,layerInfo:s,splitByField:e,xAxisField:i,numericFields:t,aggregationType:r,commonStrings:o})),y&&n.series[0].type!==A.HeatSeries){let w=kt(l,i);ps(n,0,w)}if(m&&n.series[0].type!==A.HeatSeries){let w=Pp({config:n,layerInfo:s,commonStrings:o,numericFields:t,aggregationType:r});ps(n,1,w)}if(n.title&&f&&(n.title.content.text=kh(n,s,o)),Oi({config:n,value:null,axisIndex:1,isMax:!1}),Oi({config:n,value:null,axisIndex:1,isMax:!0}),I_({numericFields:t,aggregationType:r,config:n,layerInfo:s}),(x||_)&&(Oi({config:n,value:null,axisIndex:0,isMax:!1}),Oi({config:n,value:null,axisIndex:0,isMax:!0}),F)){let w=v?.type===A.DateAxisFormat?yi.Null:yi.Interpolate;A_(w,n)}$&&(n.series[0].classBreaksRules=O.classBreaksRules,n.series[0].xTemporalBinning=O.xTemporalBinning,n.series[0].yTemporalBinning=O.yTemporalBinning,n.series[0].emptyCells=O.emptyCells,n.nullPolicy=O.nullPolicy),d&&n.series.forEach(w=>{delete w.query})},Ol=(a,i)=>{a.markerVisible=i.markerVisible,a.lineSmoothed=i.lineSmoothed,a.showArea=i.showArea,a.areaColor=i.areaColor,a.stackNegativeValuesToBaseline=i.stackNegativeValuesToBaseline,i.lineSymbol&&(a.lineSymbol={...i.lineSymbol,color:a.lineSymbol?.color}),i.markerSymbol&&(a.markerSymbol={...i.markerSymbol,color:a.markerSymbol?.color})},W9=a=>{let{config:i,seriesIndex:e,layerInfo:t,commonStrings:r}=a,n=i.series?.[e],s=Ec(i),o;if(Ae(i.series)===V.BarAndLineFromFields)o=r.axisLabels.values;else if(wa(s)){let l=n.query?.outStatistics?.[0]?.onStatisticField;l!==void 0&&l!==Mi(t.layer).idField&&(o=kt(t.layerFieldsInfo,l))}else{let l=String(sb(n)).trim().replace(/'/gu,"");o=ls({queryObject:t.layer,fieldName:s,fieldValue:l??""})??l}return o??n.id},H9=(a,i)=>{if(rs(i))L_(a,i);else{i.orderOptions??={};let e=i.orderOptions?.data?.orderType;Sc(i)[0]===eu.customSort&&e===gi.Category&&(i.orderOptions.data={orderType:gi.Category,orderBy:[...a]})}},z9=async(a,i)=>{let e=ds(a),t=$p(a)?.type,r=Wc(a),n=Ae(a.series),s=[];return t===A.CategoryAxisFormat&&(n===V.BarAndLineFromFields||e===ho?s=r.map(o=>kt(i?.layerFieldsInfo,o)):e.trim()!==""&&e!==ho&&i!==void 0&&(s=await Sm({layerInfo:i,config:a,category:e}))),s};function Hc(a,i,e){let t=kh(a,i,e),r=$m(a),n=Co(a);return t===r||n}function R_(a,i,e){let t=Pp({config:a,layerInfo:i,commonStrings:e,numericFields:Wc(a),aggregationType:ob(a)}),r=iu(1,a),n=Co(a);return t===r||n}function B_(a,i){let e=kt(i.layerFieldsInfo,ds(a)),t=iu(0,a),r=Co(a);return e===t||r}function X9(a){return Yt(a.series[0])?a.series[0].binTemporalData??!0:!1}function Y9(a,i){i?.series.forEach(e=>{(e?.type===A.BarSeries||e?.type===A.LineSeries)&&(e.binTemporalData=a,a?e.temporalBinning={unit:De.Day,size:0,timeAggregationType:ri.Start,trimIncompleteTimeInterval:!0,nullPolicy:yi.Null}:delete e.temporalBinning)})}return{a:Qe,b:de,c:N,d:Hp,e:be,f:ge,g:ee,h:lt,i:Ha,j:ta,k:re,l:rt,m:er,n:ut,o:kr,p:Xu,q:Ir,r:tr,s:la,t:ci,u:Vt,v:pt,w:wt,x:Ai,y:Js,z:eo,A:Tx,B:Ox,C:wx,D:Ut,E:ar,F:xl,G:i4,H:r4,I:a4,J:n4,K:Hx,L:s4,M:o4,N:l4,O:Cc,P:u4,Q:Z,R:ir,S:Vi,T:nn,U:$i,V:Sl,W:j,X:Kx,Y:h4,Z:tn,_:Vg,$:u0,aa:rr,ba:le,ca:p0,da:dt,ea:p4,fa:Cl,ga:Oa,ha:bh,ia:Mr,ja:io,ka:cc,la:Ch,ma:C0,na:d4,oa:c4,pa:f4,qa:$0,ra:zn,sa:m4,ta:y4,ua:SS,va:Cv,wa:_S,xa:g4,ya:ao,za:Dv,Aa:Av,Ba:Vv,Ca:$l,Da:OC,Ea:FC,Fa:En,Ga:v4,Ha:b4,Ia:x4,Ja:Dc,Ka:no,La:Xn,Ma:Rv,Na:kC,Oa:wl,Pa:IC,Qa:Ev,Ra:Fl,Sa:ua,Ta:Dl,Ua:ha,Va:Vc,Wa:XC,Xa:S4,Ya:C4,Za:Ah,_a:P4,$a:$4,ab:_4,bb:_h,cb:GC,db:Al,eb:kc,fb:UC,gb:KC,hb:T4,ib:QC,jb:iP,kb:g,lb:fP,mb:O4,nb:w4,ob:F4,pb:D4,qb:vP,rb:_P,sb:A4,tb:V4,ub:L4,vb:k4,wb:I4,xb:M4,yb:Lh,zb:N4,Ab:Nc,Bb:Ta,Cb:Oh,Db:eb,Eb:Bc,Fb:R4,Gb:B4,Hb:pc,Ib:v_,Jb:dc,Kb:S_,Lb:j4,Mb:E4,Nb:W4,Ob:H4,Pb:z4,Qb:C_,Rb:X4,Sb:Y4,Tb:q4,Ub:G4,Vb:U4,Wb:F_,Xb:K4,Yb:Z4,Zb:Q4,_b:D_,$b:A_,ac:J4,bc:e9,cc:t9,dc:i9,ec:r9,fc:a9,gc:n9,hc:s9,ic:o9,jc:l9,kc:u9,lc:V_,mc:h9,nc:p9,oc:d9,pc:c9,qc:f9,rc:m9,sc:y9,tc:g9,uc:v9,vc:b9,wc:x9,xc:S9,yc:C9,zc:P9,Ac:$9,Bc:k_,Cc:_9,Dc:T9,Ec:O9,Fc:w9,Gc:F9,Hc:D9,Ic:A9,Jc:V9,Kc:L9,Lc:k9,Mc:I9,Nc:M9,Oc:N9,Pc:R9,Qc:B9,Rc:j9,Sc:kh,Tc:ob,Uc:Ec,Vc:Wc,Wc:Sc,Xc:E9,Yc:W9,Zc:H9,_c:z9,$c:X9,ad:Y9}},"intl","geometry/support/jsonUtils","rest/support/AttributeBinsQuery","rest/support/Query","rest/support/StatisticDefinition","time/TimeExtent","core/promiseUtils","request","applications/Components/imageryUtils","geometry/Extent","geometry/Point","Graphic","renderers/support/jsonUtils","symbols/support/symbolUtils","AttributeBinsGraphic","layers/support/CodedValueDomain","layers/support/FeatureFilter","smartMapping/statistics/histogram","smartMapping/statistics/summaryStatistics","core/sql",a,b,c,d,e,f,g)
|