@arcgis/map-components 6.0.0-next.2 → 6.0.0-next.3
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/{M7AFSV3C.js → 22I5XGTS.js} +1 -1
- package/dist/cdn/{SMVLPJDD.js → 24MLXKMZ.js} +1 -1
- package/dist/cdn/{UVJWDKLK.js → 36ZT6IRE.js} +1 -1
- package/dist/cdn/{Q4L65YE5.js → 42G6XTIG.js} +1 -1
- package/dist/cdn/{A6H4JIO7.js → 4657ONKJ.js} +1 -1
- package/dist/cdn/{MYLIX42T.js → 4HNRKSQ2.js} +1 -1
- package/dist/cdn/{XDU23V37.js → 4O6FFXUV.js} +1 -1
- package/dist/cdn/{ZDMSSGIM.js → 54GFXFK4.js} +1 -1
- package/dist/cdn/{AO6ONNIJ.js → 5WKEDXRT.js} +1 -1
- package/dist/cdn/{2DAGREZP.js → 75UV3NKU.js} +1 -1
- package/dist/cdn/{J6HOUEVT.js → 7FGOCFTQ.js} +1 -1
- package/dist/cdn/{JRCEICO2.js → A7SZYQDH.js} +1 -1
- package/dist/cdn/{HTC4LCZQ.js → ABOTJ6RE.js} +1 -1
- package/dist/cdn/AN7R3DP5.js +2 -0
- package/dist/cdn/BJWJ6E3L.js +2 -0
- package/dist/cdn/{IQEEQOMD.js → C5XAFXEL.js} +1 -1
- package/dist/cdn/CF54A7MK.js +2 -0
- package/dist/cdn/{HKVIWCPL.js → CUVRESLH.js} +1 -1
- package/dist/cdn/{SQEKT3GV.js → DNE47HSP.js} +1 -1
- package/dist/cdn/{YZJKSAQ5.js → ET4UP4EQ.js} +1 -1
- package/dist/cdn/{7DM32WQP.js → GUZCA62E.js} +1 -1
- package/dist/cdn/{W3TSTSES.js → H4LMELM2.js} +1 -1
- package/dist/cdn/{LYT35TNY.js → HJVHORPG.js} +1 -1
- package/dist/cdn/{VLPNB2Z3.js → I4AEBGQM.js} +1 -1
- package/dist/cdn/{EPAR65ZP.js → IBN4TKBI.js} +1 -1
- package/dist/cdn/{HBWEW6R7.js → JZHZCJTJ.js} +1 -1
- package/dist/cdn/LOOJWRCW.js +2 -0
- package/dist/cdn/{BM4TS2RT.js → LU22VNJ7.js} +1 -1
- package/dist/cdn/{WNWTWPV6.js → LUTUHOKB.js} +1 -1
- package/dist/cdn/{DSD2SY73.js → LW4IDPBB.js} +1 -1
- package/dist/cdn/{MQYTZX24.js → LY6LSUSY.js} +1 -1
- package/dist/cdn/LZVMUNZC.js +2 -0
- package/dist/cdn/{UUHCMLK6.js → M4D5WUVD.js} +1 -1
- package/dist/cdn/MBGCAZPS.js +4 -0
- package/dist/cdn/{CHL5VZJQ.js → NDCZFJEK.js} +2 -2
- package/dist/cdn/NWFGMNGG.js +2 -0
- package/dist/cdn/{MTFIK3F4.js → NWRWQZGL.js} +1 -1
- package/dist/cdn/{2ZMXUAQZ.js → OCFIQBYK.js} +1 -1
- package/dist/cdn/{2BUURGFL.js → OCQXPA57.js} +1 -1
- package/dist/cdn/{OJIYHIGC.js → ONFKLY6Q.js} +1 -1
- package/dist/cdn/{4IU5R6VO.js → OX3WBUBR.js} +1 -1
- package/dist/cdn/{D7FBQECJ.js → PS3KSP2J.js} +1 -1
- package/dist/cdn/{FACY5XHG.js → PY5VGH7F.js} +1 -1
- package/dist/cdn/QCVMDYJD.js +2 -0
- package/dist/cdn/{YQV2OMBS.js → QNBNH7ME.js} +1 -1
- package/dist/cdn/{CAC3OOFR.js → QVAB57VJ.js} +1 -1
- package/dist/cdn/{DN2EFA4T.js → R2D2TXL4.js} +1 -1
- package/dist/cdn/{M3FI4K44.js → R2P5JM7G.js} +1 -1
- package/dist/cdn/{JS3IKVKM.js → REGHMH6D.js} +1 -1
- package/dist/cdn/{R5TXJ5FN.js → RUW7CDCH.js} +1 -1
- package/dist/cdn/{B32GNMHD.js → UHI54OG6.js} +1 -1
- package/dist/cdn/{PZZU36OG.js → V62TVP3T.js} +1 -1
- package/dist/cdn/{HY2JY2TT.js → VKRAWBPC.js} +1 -1
- package/dist/cdn/{L2F4HQYY.js → VOBRCUIE.js} +1 -1
- package/dist/cdn/{PCOXR45L.js → WEOKELJE.js} +1 -1
- package/dist/cdn/XKCB2DEP.js +2 -0
- package/dist/cdn/{Z2WYULU3.js → XULIO6Y3.js} +1 -1
- package/dist/cdn/{RVIHQZ44.js → Y37UMTGV.js} +1 -1
- package/dist/cdn/{6MCDOI5M.js → YHPASRFL.js} +1 -1
- package/dist/cdn/{5TKSFDKY.js → ZBC5RBCD.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/dateUtils.js +1 -1
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.d.ts +10 -2
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +3 -0
- 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/loader.js +1 -1
- package/package.json +7 -7
- package/dist/cdn/4ZLIA5OM.js +0 -2
- package/dist/cdn/COCGWEUR.js +0 -2
- package/dist/cdn/E5L3MOIC.js +0 -2
- package/dist/cdn/KGUALNRF.js +0 -4
- package/dist/cdn/PMRI66RQ.js +0 -2
- package/dist/cdn/SK5CTCTZ.js +0 -2
- package/dist/cdn/TIBX6CCV.js +0 -2
- package/dist/cdn/UUNHAVGJ.js +0 -2
- package/dist/cdn/Z2ABUIL3.js +0 -2
- /package/dist/cdn/{ND3V4Z4F.js → EH4CBZNF.js} +0 -0
package/dist/cdn/E5L3MOIC.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{b as g}from"./IM6IDWYR.js";import{p as l}from"./3UMLR76Y.js";export default $arcgis.t(([c,{getZonedDateTimeParts:y,offsetDate:T,truncateDate:D}])=>{var f={count:10};function x(e){return b(e)&&e.interval.unit===g?(l("warn","arcgis-slider-time",'A stop interval with an "unknown" time unit is not supported. The default stop definition will be used.'),f):e}function F(e){return!!e&&"count"in e}function I(e){return!!e&&"dates"in e}function b(e){return!!e&&"interval"in e}var p=1e4;function w(e,r){let{start:t,end:n}=e;if(!t||!n||t.getTime()>n.getTime()||r<=0)return[];if(r>p)return w(e,f.count);let u=[],a=t.getTime(),i=n.getTime()-a;for(let s=0;s<=r;s++)u.push(new Date(a+s/r*i));return u}function Z(e,r){let{start:t,end:n}=e,{value:u,unit:a}=r;if(!t||!n||t.getTime()>n.getTime()||u<=0)return[];let i=n.getTime()-t.getTime(),s=r.toMilliseconds();if(s<=0||i/s>p)return w(e,f.count);let m=[],o=t;for(;o.getTime()<=n.getTime();)m.push(new Date(o)),o=T(o,u,a);return m}function j(e,r){let[t,n]=e;if(t)switch(r){case"time-window":return n?new c({start:t,end:n}):void 0;case"cumulative-from-start":return new c({start:null,end:t});case"cumulative-from-end":return new c({start:t,end:null});case"instant":return new c({start:t,end:t})}}function A(e,r,t,n){let{value:u,unit:a}=t;if(e.getTime()>r.getTime()||u<=0||a==="unknown")return[];let i=D(e,t,n),s=[];for(;i.getTime()<=r.getTime();)i.getTime()>=e.getTime()&&s.push(i),i=T(i,u,a,n);return s}function C(e,r){let t=new Intl.DateTimeFormat("en",{day:"2-digit",month:"2-digit",timeZone:r,year:"numeric"}).formatToParts(e),n=t.find(({type:i})=>i==="year")?.value??"1900",u=t.find(({type:i})=>i==="month")?.value??"01",a=t.find(({type:i})=>i==="day")?.value??"01";return`${n}-${u}-${a}`}function M(e,r){let t=new Intl.DateTimeFormat("en",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",timeZone:r}).formatToParts(e),n=t.find(({type:i})=>i==="hour")?.value??"00",u=t.find(({type:i})=>i==="minute")?.value??"00",a=t.find(({type:i})=>i==="second")?.value??"00";return`${n}:${u}:${a}`}function B(e,r,t){let n=/^(\d{4})-(\d{2})-(\d{2})$/u.exec(e),u=/^(\d{2}):(\d{2}):(\d{2})$/u.exec(r);if(!n||!u)return;let a=Number(n[1]),i=Number(n[2]),s=Number(n[3]),m=Number(u[1]),o=Number(u[2]),v=Number(u[3]),d=new Date(Date.UTC(a,i-1,s,m,o,v)),h=(y(d,t)?.offsetMinutes??0)*6e4;return new Date(d.getTime()-h)}return{a:f,b:x,c:F,d:I,e:b,f:w,g:Z,h:j,i:A,j:C,k:M,l:B}},"time/TimeExtent","core/timeUtils")
|
package/dist/cdn/KGUALNRF.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as Qe}from"./PZZU36OG.js";import{a as Pt,b as Ot,c as Ti,d as Je}from"./PMRI66RQ.js";import{A as X,C as xi,E as z,F as $t,H as bi,I as vi,J as wi,K as lt,L as ki,P,Q as Ci,R as mt,T as $s,c as Dt,e as Kt,ga as Ke,h as ot,i as K,k as J,l as Ts,m as Ss,o as Ae,qa as ti,r as Ms,s as Ds,u as Ft,y as Y,z as qe}from"./UUNHAVGJ.js";import{A as qt,B as pi,C as _s,D as ys,E as mi,F as xs,G as gi,H as _i,I as bs,J as vs,K as ws,L as Pe,M as Be,N as ks,P as at,S as ht,T as W,X as yi,c as ds,d as N,e as Ue,f as bt,h as je,i as us,j as Ze,l as Ee,m as fs,n as ui,o as ps,p as Rt,q as Mt,r as ms,s as Q,t as fi,u as vt,v as gs,w as q,x as $e}from"./4ZLIA5OM.js";import{a as nt,b as pt,d as F,e as At,f as ci}from"./ND3V4Z4F.js";import{D as jt,F as Me,G as Zt,I as hs,J as tt,K as ls,M as cs,N as yt,O as di,P as xt,R as De,S as Cs,T as Es,W as Et,b as rt,d as rs,f as Tt,g as L,h as Lt,i as ke,j as St,k as Nt,m as as,n as os,o as C,q as Ce,r as zt,s as Te,t as ns,u as Se,v as Ut}from"./MQYTZX24.js";import{a as Hs}from"./TAVTDQ6S.js";var Si=class{constructor(){this._targets=[],this._observer=new ResizeObserver(t=>{C(t,e=>{C(this._targets,i=>{i.target===e.target&&i.callback()})})})}addTarget(t,e){this._observer.observe(t,{box:"border-box"}),this._targets.push({target:t,callback:e})}removeTarget(t){this._observer.unobserve(t),jt(this._targets,e=>e.target!==t)}},ii=class g{constructor(){this._timer=null,this._targets=[]}addTarget(t,e){if(this._timer===null){let s=null,r=()=>{let a=Date.now();(s===null||a>s+g.delay)&&(s=a,C(this._targets,o=>{let n=o.target.getBoundingClientRect();(n.width!==o.size.width||n.height!==o.size.height)&&(o.size=n,o.callback())})),this._targets.length===0?this._timer=null:this._timer=requestAnimationFrame(r)};this._timer=requestAnimationFrame(r)}let i={width:0,height:0,left:0,right:0,top:0,bottom:0,x:0,y:0};this._targets.push({target:t,callback:e,size:i})}removeTarget(t){jt(this._targets,e=>e.target!==t),this._targets.length===0&&this._timer!==null&&(cancelAnimationFrame(this._timer),this._timer=null)}};ii.delay=200;var ei=null;function Is(){return ei===null&&(typeof ResizeObserver<"u"?ei=new Si:ei=new ii),ei}var si=class{constructor(t,e){this._disposed=!1,this._sensor=Is(),this._element=t,this._listener=Ue(e),this._sensor.addTarget(t,e)}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._sensor.removeTarget(this._element),this._listener.dispose())}get sensor(){return this._sensor}};var Ht=class extends Y{};Ht.className="InterfaceColors";Ht.classNames=Y.classNames.concat([Ht.className]);var wt=class extends z{_beforeChanged(){super._beforeChanged(),(this.isDirty("pointerBaseWidth")||this.isDirty("cornerRadius")||this.isDirty("pointerLength")||this.isDirty("pointerX")||this.isDirty("pointerY")||this.isDirty("width")||this.isDirty("height"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){this.markDirtyBounds();let t=this.width(),e=this.height();if(t>0&&e>0){let i=this.get("cornerRadius",8);i=ot(i,0,Math.min(t/2,e/2));let s=this.get("pointerX",0),r=this.get("pointerY",0),a=this.get("pointerBaseWidth",15)/2,o=0,n=0,l=t,d=0,f=t,h=e,c=0,p=e,_=(s-o)*(h-n)-(r-n)*(f-o),u=(s-c)*(d-p)-(r-p)*(l-c),m=this._display;if(m.moveTo(i,0),_>0&&u>0){let b=Math.round(ot(s,i+a,t-a-i));r=ot(r,-1/0,0),m.lineTo(b-a,0),m.lineTo(s,r),m.lineTo(b+a,0)}if(m.lineTo(t-i,0),m.arcTo(t,0,t,i,i),_>0&&u<0){let b=Math.round(ot(r,i+a,e-a-i));s=ot(s,t,1/0),m.lineTo(t,i),m.lineTo(t,Math.max(b-a,i)),m.lineTo(s,r),m.lineTo(t,b+a)}if(m.lineTo(t,e-i),m.arcTo(t,e,t-i,e,i),_<0&&u<0){let b=Math.round(ot(s,i+a,t-a-i));r=ot(r,e,1/0),m.lineTo(t-i,e),m.lineTo(b+a,e),m.lineTo(s,r),m.lineTo(b-a,e)}if(m.lineTo(i,e),m.arcTo(0,e,0,e-i,i),_<0&&u>0){let b=Math.round(ot(r,i+a,e-i-a));s=ot(s,-1/0,0),m.lineTo(0,e-i),m.lineTo(0,b+a),m.lineTo(s,r),m.lineTo(0,Math.max(b-a,i))}m.lineTo(0,i),m.arcTo(0,0,i,0,i),m.closePath()}}}};wt.className="PointedRectangle";wt.classNames=z.classNames.concat([wt.className]);var _t=class extends P{constructor(t,e,i,s=[]){super(t,e,i,s),this._fx=0,this._fy=0,this._w=0,this._h=0,this._htmlContentHovered=!1}_afterNew(){this._settings.themeTags=at(this._settings.themeTags,["tooltip"]),super._afterNew(),this._setDefaultTagged("background",["tooltip","background"],()=>wt.new(this._root,{})),this._label=this.children.push(mt.new(this._root,{})),this._disposers.push(this._label.events.on("boundschanged",()=>{this._updateBackground()})),this._disposers.push(this.on("bounds",()=>{this._updateBackground()})),this._updateTextColor(),this._root.tooltipContainer.children.push(this),this.hide(0),this._disposers.push(this.label.onPrivate("htmlElement",t=>{t&&(this._disposers.push(N(t,"pointerover",e=>{this._htmlContentHovered=!0})),this._disposers.push(N(t,"pointerout",e=>{this._htmlContentHovered=!1})))})),this.on("visible",t=>{this._handleReaderAnnouncement()}),this.label.events.on("dataitemchanged",t=>{this._handleReaderAnnouncement()}),this._root._tooltips.push(this)}_handleReaderAnnouncement(){this.get("readerAnnounce")&&this.isVisibleDeep()&&this._root.readerAlert(this.label.getAccessibleText())}get label(){return this._label}_dispose(){super._dispose(),zt(this._root._tooltips,this)}_updateChildren(){super._updateChildren(),(this.isDirty("pointerOrientation")||this.isPrivateDirty("minWidth")||this.isPrivateDirty("minHeight"))&&this.get("background")._markDirtyKey("width"),this.get("labelText")!=null&&this.label.set("text",this.get("labelText")),this.get("labelHTML")!=null&&this.label.set("html",this.get("labelHTML")),this.get("labelAriaLabel")!=null&&this.label.set("ariaLabel",this.get("labelAriaLabel"))}_changed(){if(super._changed(),(this.isDirty("pointTo")||this.isDirty("pointerOrientation"))&&this._updateBackground(),this.isDirty("tooltipTarget")&&this.updateBackgroundColor(),this.isDirty("keepTargetHover"))if(this.get("keepTargetHover")){let e=this.get("background");this._keepHoverDp=new xt([e.events.on("pointerover",i=>{let s=this.get("tooltipTarget");s&&(s.parent&&s.parent.getPrivate("tooltipTarget")==s&&(s=s.parent),s.hover())}),e.events.on("pointerout",i=>{let s=this.get("tooltipTarget");s&&(s.parent&&s.parent.getPrivate("tooltipTarget")==s&&(s=s.parent),this._htmlContentHovered||s.unhover())})]),this.label.onPrivate("htmlElement",i=>{this._keepHoverDp&&i&&this._keepHoverDp.disposers.push(N(i,"pointerleave",s=>{let r=this.root._renderer.getEvent(s);e.events.dispatch("pointerout",{type:"pointerout",originalEvent:r.event,point:r.point,simulated:!1,target:e})}))})}else this._keepHoverDp&&(this._keepHoverDp.dispose(),this._keepHoverDp=void 0)}_onShow(){super._onShow(),this.updateBackgroundColor()}updateBackgroundColor(){let t=this.get("tooltipTarget"),e=this.get("background"),i,s;if(t&&e){if(i=t.get("fill"),s=t.get("stroke"),i==null&&(i=s),this.get("getFillFromSprite")&&(this._fillDp&&this._fillDp.dispose(),i!=null&&e._setC("fill",i),this._fillDp=t.on("fill",r=>{r!=null&&(e._setC("fill",r),this._updateTextColor(r))}),this._disposers.push(this._fillDp)),this.get("getFillGradientFromSprite")){this._fillGrDp&&this._fillGrDp.dispose();let r=t.get("fillGradient");r!=null&&e._setC("fillGradient",r),this._fillGrDp=t.on("fillGradient",a=>{a!=null&&e._setC("fillGradient",a)}),this._disposers.push(this._fillGrDp)}this.get("getStrokeFromSprite")&&(this._strokeDp&&this._strokeDp.dispose(),i!=null&&e._setC("stroke",i),this._strokeDp=t.on("fill",r=>{r!=null&&e._setC("stroke",r)}),this._disposers.push(this._strokeDp)),this.get("getLabelFillFromSprite")&&(this._labelDp&&this._labelDp.dispose(),i!=null&&this.label._setC("fill",i),this._labelDp=t.on("fill",r=>{r!=null&&this.label._setC("fill",r)}),this._disposers.push(this._labelDp))}this._updateTextColor(i)}_updateTextColor(t){this.get("autoTextColor")&&(t==null&&(t=this.get("background").get("fill")),t==null&&(t=this._root.interfaceColors.get("background")),t instanceof W&&this.label._setC("fill",W.alternative(t,this._root.interfaceColors.get("alternativeText"),this._root.interfaceColors.get("text"))))}_setDataItem(t){super._setDataItem(t),this.label._setDataItem(t)}_updateBackground(){super.updateBackground();let t=this._root.container;if(t){let e=.5,i=.5,s=this.get("centerX");s instanceof nt&&(e=s.value);let r=this.get("centerY");r instanceof nt&&(i=r.value);let a=t.width(),o=t.height(),n=this.parent,l=0,d=0;if(n){l=n.x(),d=n.y();let T=n.get("layerMargin");T&&(l+=T.left||0,d+=T.top||0,a+=(T.left||0)+(T.right||0),o+=(T.top||0)+(T.bottom||0))}let f=this.get("bounds",{left:-l,top:-d,right:a-l,bottom:o-d});this._updateBounds();let h=this.width(),c=this.height();h===0&&(h=this._w),c===0&&(c=this._h);let p=this.get("pointTo",{x:a/2,y:o/2}),_=p.x,u=p.y,m=this.get("pointerOrientation"),b=this.get("background"),x=0,y=0,v=0;b instanceof wt&&(x=b.get("pointerLength",0),y=b.get("strokeWidth",0)/2,v=y,b._setC("width",h),b._setC("height",c));let w=0,k=0,M=f.right-f.left,D=f.bottom-f.top;m=="horizontal"||m=="left"||m=="right"?(y=0,m=="horizontal"?_>f.left+M/2?(_-=h*(1-e)+x,v*=-1):_+=h*e+x:m=="left"?_+=h*(1-e)+x:(_-=h*e+x,v*=-1)):(v=0,m=="vertical"?u>f.top+c/2+x?u-=c*(1-i)+x:(u+=c*i+x,y*=-1):m=="down"?u-=c*(1-i)+x:(u+=c*i+x,y*=-1)),_=ot(_,f.left+h*e,f.left+M-h*(1-e))+v,u=ot(u,f.top+c*i,f.top+D-c*(1-i))-y,w=p.x-_+h*e+v,k=p.y-u+c*i-y,this._fx=_,this._fy=u;let S=this.get("animationDuration",0);if(S>0&&this.get("visible")&&this.get("opacity")>.1){let T=this.get("animationEasing");this.animate({key:"x",to:_,duration:S,easing:T}),this.animate({key:"y",to:u,duration:S,easing:T})}else this._setC("x",_),this._setC("y",u);b instanceof wt&&(b._setC("pointerX",w),b._setC("pointerY",k)),h>0&&(this._w=h),c>0&&(this._h=c)}}};_t.className="Tooltip";_t.classNames=P.classNames.concat([_t.className]);var Le=class extends Y{_setDefaults(){this._setDefault("negativeBase",0),this._setDefault("numberFormat","#,###.#####"),this._setDefault("smallNumberThreshold",1);let t="_big_number_suffix_",e="_small_number_suffix_",i="_byte_suffix_";this._setDefault("bigNumberPrefixes",[{number:1e3,suffix:this._t(t+"3")},{number:1e6,suffix:this._t(t+"6")},{number:1e9,suffix:this._t(t+"9")},{number:1e12,suffix:this._t(t+"12")},{number:1e15,suffix:this._t(t+"15")},{number:1e18,suffix:this._t(t+"18")},{number:1e21,suffix:this._t(t+"21")},{number:1e24,suffix:this._t(t+"24")}]),this._setDefault("smallNumberPrefixes",[{number:1e-24,suffix:this._t(e+"24")},{number:1e-21,suffix:this._t(e+"21")},{number:1e-18,suffix:this._t(e+"18")},{number:1e-15,suffix:this._t(e+"15")},{number:1e-12,suffix:this._t(e+"12")},{number:1e-9,suffix:this._t(e+"9")},{number:1e-6,suffix:this._t(e+"6")},{number:.001,suffix:this._t(e+"3")}]),this._setDefault("bytePrefixes",[{number:1,suffix:this._t(i+"B")},{number:1024,suffix:this._t(i+"KB")},{number:1048576,suffix:this._t(i+"MB")},{number:1073741824,suffix:this._t(i+"GB")},{number:1099511627776,suffix:this._t(i+"TB")},{number:0x4000000000000,suffix:this._t(i+"PB")}]),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(t,e,i){(e==null||Tt(e)&&e.toLowerCase()==="number")&&(e=this.get("numberFormat",""));let s,r=Number(t);if(Lt(e))try{return this.get("intlLocales")?new Intl.NumberFormat(this.get("intlLocales"),e).format(r):new Intl.NumberFormat(void 0,e).format(r)}catch{return"Invalid"}else{e=qt(e);let a=this.parseFormat(e,this._root.language),o;r>this.get("negativeBase")?o=a.positive:r<this.get("negativeBase")?o=a.negative:o=a.zero,i!=null&&!o.mod&&(o=hs(o),o.decimals.active=r==0?0:i),s=o.template.split(St).join(this.applyFormat(r,o))}return this.get("forceLTR")===!0&&(s="\u200E"+s),s}parseFormat(t,e){let i=e.translateEmpty("_thousandSeparator"),s=e.translateEmpty("_decimalSeparator"),r={positive:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:s},template:"",source:"",parsed:!1},negative:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:s},template:"",source:"",parsed:!1},zero:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:s},template:"",source:"",parsed:!1}};t=t.replace("||",Nt);let a=t.split("|");return r.positive.source=a[0],typeof a[2]>"u"?r.zero=r.positive:r.zero.source=a[2],typeof a[1]>"u"?r.negative=r.positive:r.negative.source=a[1],tt(r,(o,n)=>{if(n.parsed)return;let l=n.source;l.toLowerCase()==="number"&&(l=this.get("numberFormat","#,###.#####"));let d=lt.chunk(l,!0);for(let f=0;f<d.length;f++){let h=d[f];if(h.text=h.text.replace(Nt,"|"),h.type==="value"){let c=h.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESP‰!]?/);if(c)if(c===null||c[0]==="")n.template+=h.text;else{let p=c[0].match(/[abespABESP%‰!]{2}|[abespABESP%‰]{1}$/);p&&(n.mod=p[0].toLowerCase(),n.modSpacing=!!c[0].match(/[ ]{1}[abespABESP%‰!]{1}$/));let _=c[0].split(".");if(_[0]!==""){n.thousands.active=(_[0].match(/0/g)||[]).length,n.thousands.passive=(_[0].match(/\#/g)||[]).length+n.thousands.active;let u=_[0].split(",");u.length===1||(n.thousands.interval=(u.pop()||"").length,n.thousands.interval===0&&(n.thousands.interval=-1))}typeof _[1]>"u"||(n.decimals.active=(_[1].match(/0/g)||[]).length,n.decimals.passive=(_[1].match(/\#/g)||[]).length+n.decimals.active),n.template+=h.text.split(c[0]).join(St)}}else n.template+=h.text}n.parsed=!0}),r}applyFormat(t,e){let i=t<0;t=Math.abs(t);let s="",r="",a=e.mod?e.mod.split(""):[];if(a.indexOf("b")!==-1){let f=this.applyPrefix(t,this.get("bytePrefixes"),a.indexOf("!")!==-1);t=f[0],s=f[1],r=f[2],e.modSpacing&&(r=" "+r)}else if(a.indexOf("a")!==-1){let f=this.applyPrefix(t,t<this.get("smallNumberThreshold")?this.get("smallNumberPrefixes"):this.get("bigNumberPrefixes"),a.indexOf("!")!==-1);t=f[0],s=f[1],r=f[2],e.modSpacing&&(r=" "+r)}else if(a.indexOf("p")!==-1){let f=Math.min(t.toString().length+2,21);t=parseFloat(t.toPrecision(f)),s=this._root.language.translate("_percentPrefix"),r=this._root.language.translate("_percentSuffix"),s==""&&r==""&&(r="%")}else if(a.indexOf("%")!==-1){let f=Math.min(t.toString().length+2,21);t*=100,t=parseFloat(t.toPrecision(f)),r="%"}else if(a.indexOf("\u2030")!==-1){let f=Math.min(t.toString().length+3,21);t*=1e3,t=parseFloat(t.toPrecision(f)),r="\u2030"}if(a.indexOf("e")!==-1){let f;e.decimals.passive>=0?f=t.toExponential(e.decimals.passive).split("e"):f=t.toExponential().split("e"),t=Number(f[0]),r="e"+f[1],e.modSpacing&&(r=" "+r)}else if(e.decimals.passive===0)t=Math.round(t);else if(e.decimals.passive>0){let f=gs(t);if(f>0){let h=Math.pow(10,e.decimals.passive);t=Math.round(parseFloat((t*h).toFixed(f)))/h}}let o="",n=rs(t).split("."),l=n[0];if(l.length<e.thousands.active&&(l=Array(e.thousands.active-l.length+1).join("0")+l),e.thousands.interval>0){let f=[],h=l.split("").reverse().join("");for(let c=0,p=l.length;c<=p;c+=e.thousands.interval){let _=h.substr(c,e.thousands.interval).split("").reverse().join("");_!==""&&f.unshift(_)}l=f.join(e.thousands.separator)}o+=l,n.length===1&&n.push("");let d=n[1];return d.length<e.decimals.active&&(d+=Array(e.decimals.active-d.length+1).join("0")),d!==""&&(o+=e.decimals.separator+d),o===""&&(o="0"),t!==0&&i&&a.indexOf("s")===-1&&(o="-"+o),s&&(o=s+o),r&&(o+=r),o}applyPrefix(t,e,i=!1){let s=t,r="",a="",o=!1,n=1;for(let l=0,d=e.length;l<d;l++)e[l].number<=t&&(e[l].number===0?s=0:(s=t/e[l].number,n=e[l].number),r=e[l].prefix,a=e[l].suffix,o=!0);return!o&&i&&e.length&&t!=0&&(s=t/e[0].number,r=e[0].prefix,a=e[0].suffix,o=!0),o&&(s=parseFloat(s.toPrecision(Math.min(n.toString().length+Math.floor(s).toString().replace(/[^0-9]*/g,"").length,21)))),[s,r,a]}escape(t){return t.replace("||",Nt)}unescape(t){return t.replace(Nt,"|")}};function Bs(g,t){let e=0,i=0,s=1,r=0,a=0,o=0,n=0,l=0;return g.formatToParts(t).forEach(d=>{switch(d.type){case"year":e=+d.value;break;case"month":i=+d.value-1;break;case"day":s=+d.value;break;case"hour":r=+d.value;break;case"minute":a=+d.value;break;case"second":o=+d.value;break;case"fractionalSecond":n=+d.value;break;case"weekday":switch(d.value){case"Sun":l=0;break;case"Mon":l=1;break;case"Tue":l=2;break;case"Wed":l=3;break;case"Thu":l=4;break;case"Fri":l=5;break;case"Sat":l=6;break}}}),r===24&&(r=0),{year:e,month:i,day:s,hour:r,minute:a,second:o,millisecond:n,weekday:l}}function Ps(g,t){let{year:e,month:i,day:s,hour:r,minute:a,second:o,millisecond:n}=Bs(g,t);return Date.UTC(e,i,s,r,a,o,n)}var Ne=class{constructor(t,e){if(!e)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this.name=t,this._utc=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",fractionalSecondDigits:3}),this._dtf=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",fractionalSecondDigits:3})}static new(t){return new this(t,!0)}convertLocal(t){let e=this.offsetUTC(t),i=t.getTimezoneOffset(),s=new Date(t);s.setUTCMinutes(s.getUTCMinutes()-(e-i));let r=s.getTimezoneOffset();return i!=r&&s.setUTCMinutes(s.getUTCMinutes()+r-i),s}offsetUTC(t){let e=Ps(this._utc,t),i=Ps(this._dtf,t);return(e-i)/6e4}parseDate(t){return Bs(this._dtf,t)}};var ze=class extends Y{_setDefaults(){this._setDefault("capitalize",!0),this._setDefault("dateFormat","yyyy-MM-dd"),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(t,e,i=!1){(typeof e>"u"||e==="")&&(e=this.get("dateFormat","yyyy-MM-dd"));let s,r=t;if(Lt(e))try{let l=this.get("intlLocales");return l?new Intl.DateTimeFormat(l,e).format(r):new Intl.DateTimeFormat(void 0,e).format(r)}catch{return"Invalid"}let a=this.parseFormat(e),o=this._root.timezone,n=r;return o&&!this._root.utc&&!i&&(r=o.convertLocal(r)),L(r.getTime())?(s=this.applyFormat(r,a,i,n),this.get("capitalize")&&(s=s.replace(/^.{1}/,s.substr(0,1).toUpperCase())),s):"Invalid date"}applyFormat(t,e,i=!1,s){let r=e.template,a,o,n,l,d,f,h,c,p=t.getTime();this._root.utc&&!i?(a=t.getUTCFullYear(),o=t.getUTCMonth(),n=t.getUTCDay(),l=t.getUTCDate(),d=t.getUTCHours(),f=t.getUTCMinutes(),h=t.getUTCSeconds(),c=t.getUTCMilliseconds()):(a=t.getFullYear(),o=t.getMonth(),n=t.getDay(),l=t.getDate(),d=t.getHours(),f=t.getMinutes(),h=t.getSeconds(),c=t.getMilliseconds());for(let _=0,u=e.parts.length;_<u;_++){let m="";switch(e.parts[_]){case"G":m=this._t(a<0?"_era_bc":"_era_ad");break;case"yyyy":m=Math.abs(a).toString(),a<0&&(m+=this._t("_era_bc"));break;case"yyy":case"yy":case"y":m=Math.abs(a).toString().substr(-e.parts[_].length),a<0&&(m+=this._t("_era_bc"));break;case"YYYY":case"YYY":case"YY":case"Y":let b=bs(t,this._root.utc);e.parts[_]=="YYYY"?m=Math.abs(b).toString():m=Math.abs(b).toString().substr(-e.parts[_].length),b<0&&(m+=this._t("_era_bc"));break;case"u":break;case"q":m=""+Math.ceil((t.getMonth()+1)/3);break;case"MMMMM":m=this._t(this._getMonth(o)).substr(0,1);break;case"MMMM":m=this._t(this._getMonth(o));break;case"MMM":m=this._t(this._getShortMonth(o));break;case"MM":m=q(o+1,2,"0");break;case"M":m=(o+1).toString();break;case"ww":m=q(_i(t,this._root.utc),2,"0");break;case"w":m=_i(t,this._root.utc).toString();break;case"W":m=vs(t,this._root.utc).toString();break;case"dd":m=q(l,2,"0");break;case"d":m=l.toString();break;case"DD":case"DDD":m=q(gi(t,this._root.utc).toString(),e.parts[_].length,"0");break;case"D":m=gi(t,this._root.utc).toString();break;case"F":break;case"g":break;case"t":m=this._root.language.translateFunc("_dateOrd").call(this,l);break;case"E":m=(n||7).toString();break;case"EE":m=q((n||7).toString(),2,"0");break;case"EEE":case"eee":m=this._t(this._getShortWeekday(n));break;case"EEEE":case"eeee":m=this._t(this._getWeekday(n));break;case"EEEEE":case"eeeee":m=this._t(this._getShortWeekday(n)).substr(0,1);break;case"e":case"ee":m=(n-(this._root.locale.firstDayOfWeek||1)+1).toString(),e.parts[_]=="ee"&&(m=q(m,2,"0"));break;case"a":d>=12?m=this._t("PM"):m=this._t("AM");break;case"aa":d>=12?m=this._t("P.M."):m=this._t("A.M.");break;case"aaa":d>=12?m=this._t("P"):m=this._t("A");break;case"h":m=Pe(d).toString();break;case"hh":m=q(Pe(d),2,"0");break;case"H":m=d.toString();break;case"HH":m=q(d,2,"0");break;case"K":m=Pe(d,0).toString();break;case"KK":m=q(Pe(d,0),2,"0");break;case"k":m=(d+1).toString();break;case"kk":m=q(d+1,2,"0");break;case"m":m=f.toString();break;case"mm":m=q(f,2,"0");break;case"s":m=h.toString();break;case"ss":m=q(h,2,"0");break;case"S":case"SS":case"SSS":m=Math.round(c/1e3*Math.pow(10,e.parts[_].length)).toString();break;case"x":m=p.toString();break;case"n":case"nn":case"nnn":m=q(c,e.parts[_].length,"0");break;case"z":m=Be(s||t,!1,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;case"zz":m=Be(s||t,!0,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case"zzz":m=Be(s||t,!1,!0,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;case"zzzz":m=Be(s||t,!0,!0,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case"Z":case"ZZ":let x=this._root.utc?"UTC":this._root.timezone;x instanceof Ne&&(x=x.name);let y=x?ks(x,s||t):t.getTimezoneOffset(),v=Math.abs(y)/60,w=Math.floor(v),k=v*60-w*60;this._root.utc&&(w=0,k=0),e.parts[_]=="Z"?(m="GMT",m+=y>0?"-":"+",m+=q(w,2)+":"+q(k,2)):(m=y>0?"-":"+",m+=q(w,2)+q(k,2));break;case"i":m=t.toISOString();break;case"I":m=t.toUTCString();break}r=r.replace(St,m)}return r}parseFormat(t){let e={template:"",parts:[]},i=lt.chunk(t,!0);for(let s=0;s<i.length;s++){let r=i[s];if(r.type==="value"){if(r.text.match(/^date$/i)){let o=this.get("dateFormat","yyyy-MM-dd");Tt(o)||(o="yyyy-MM-dd"),r.text=o}let a=r.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(a)for(let o=0;o<a.length;o++)e.parts.push(a[o]),r.text=r.text.replace(a[o],St)}e.template+=r.text}return e}_months(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}_getMonth(t){return this._months()[t]}_shortMonths(){return["Jan","Feb","Mar","Apr","May(short)","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}_getShortMonth(t){return this._shortMonths()[t]}_weekdays(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}_getWeekday(t){return this._weekdays()[t]}_shortWeekdays(){return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}_getShortWeekday(t){return this._shortWeekdays()[t]}parse(t,e,i){if(typeof i>"u"&&(i=this._root.utc),t instanceof Date)return t;if(L(t))return new Date(t);if(e=="x")return new Date(parseInt(t));Tt(t)||(t=t.toString());let s,r="";e=qt(e),e=e.substr(0,t.length);let a=this.parseFormat(e),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},n={year:1970,month:0,day:1,hour:0,minute:0,second:0,millisecond:0,timestamp:null,offset:0,utc:i},l=0,d=0;for(let c=0;c<a.parts.length;c++){switch(d=c+l+1,a.parts[c]){case"yyyy":case"YYYY":r+="([0-9]{4})",o.year=d;break;case"yyy":case"YYY":r+="([0-9]{3})",o.year3=d;break;case"yy":case"YY":r+="([0-9]{2})",o.year2=d;break;case"y":case"Y":r+="([0-9]{1})",o.year1=d;break;case"MMMM":r+="("+this.getStringList(this._months()).join("|")+")",o.monthLong=d;break;case"MMM":r+="("+this.getStringList(this._shortMonths()).join("|")+")",o.monthShort=d;break;case"MM":case"M":r+="([0-9]{2}|[0-9]{1})",o.month=d;break;case"ww":case"w":r+="([0-9]{2}|[0-9]{1})",o.week=d;break;case"dd":case"d":r+="([0-9]{2}|[0-9]{1})",o.day=d;break;case"DDD":case"DD":case"D":r+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.yearDay=d;break;case"dddd":r+="("+this.getStringList(this._weekdays()).join("|")+")",o.weekdayLong=d;break;case"ddd":r+="("+this.getStringList(this._shortWeekdays()).join("|")+")",o.weekdayShort=d;break;case"aaa":case"aa":case"a":r+="("+this.getStringList(["AM","PM","A.M.","P.M.","A","P"]).join("|")+")",o.am=d;break;case"hh":case"h":r+="([0-9]{2}|[0-9]{1})",o.hour12Base1=d;break;case"HH":case"H":r+="([0-9]{2}|[0-9]{1})",o.hourBase0=d;break;case"KK":case"K":r+="([0-9]{2}|[0-9]{1})",o.hour12Base0=d;break;case"kk":case"k":r+="([0-9]{2}|[0-9]{1})",o.hourBase1=d;break;case"mm":case"m":r+="([0-9]{2}|[0-9]{1})",o.minute=d;break;case"ss":case"s":r+="([0-9]{2}|[0-9]{1})",o.second=d;break;case"SSS":case"SS":case"S":r+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.millisecond=d,o.millisecondDigits=a.parts[c].length;break;case"nnn":case"nn":case"n":r+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.millisecond=d;break;case"x":r+="([0-9]{1,})",o.timestamp=d;break;case"Z":r+="GMT([-+]+[0-9]{2}:[0-9]{2})",o.zone=d;break;case"ZZ":r+="([\\-+]+[0-9]{2}[0-9]{2})",o.zone=d;break;case"i":r+="([0-9]{4})-?([0-9]{2})-?([0-9]{2})T?([0-9]{2}):?([0-9]{2}):?([0-9]{2})\\.?([0-9]{0,3})([zZ]|[+\\-][0-9]{2}:?[0-9]{2}|$)",o.iso=d,l+=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":l--;break}r+="[^0-9]*"}let f=new RegExp(r),h=t.match(f);if(h){if(o.year>-1&&(n.year=parseInt(h[o.year])),o.year3>-1){let c=parseInt(h[o.year3]);c+=1e3,n.year=c}if(o.year2>-1){let c=parseInt(h[o.year2]);c>50?c+=1e3:c+=2e3,n.year=c}if(o.year1>-1){let c=parseInt(h[o.year1]);c=Math.floor(new Date().getFullYear()/10)*10+c,n.year=c}if(o.monthLong>-1&&(n.month=this.resolveMonth(h[o.monthLong])),o.monthShort>-1&&(n.month=this.resolveShortMonth(h[o.monthShort])),o.month>-1&&(n.month=parseInt(h[o.month])-1),o.week>-1&&o.day===-1&&(n.month=0,n.day=ws(parseInt(h[o.week]),n.year,1,i)),o.day>-1&&(n.day=parseInt(h[o.day])),o.yearDay>-1&&(n.month=0,n.day=parseInt(h[o.yearDay])),o.hourBase0>-1&&(n.hour=parseInt(h[o.hourBase0])),o.hourBase1>-1&&(n.hour=parseInt(h[o.hourBase1])-1),o.hour12Base0>-1){let c=parseInt(h[o.hour12Base0]);c==11&&(c=0),o.am>-1&&!this.isAm(h[o.am])&&(c+=12),n.hour=c}if(o.hour12Base1>-1){let c=parseInt(h[o.hour12Base1]);c==12&&(c=0),o.am>-1&&!this.isAm(h[o.am])&&(c+=12),n.hour=c}if(o.minute>-1&&(n.minute=parseInt(h[o.minute])),o.second>-1&&(n.second=parseInt(h[o.second])),o.millisecond>-1){let c=parseInt(h[o.millisecond]);o.millisecondDigits==2?c*=10:o.millisecondDigits==1&&(c*=100),n.millisecond=c}if(o.timestamp>-1){n.timestamp=parseInt(h[o.timestamp]);let c=new Date(n.timestamp);n.year=c.getUTCFullYear(),n.month=c.getUTCMonth(),n.day=c.getUTCDate(),n.hour=c.getUTCHours(),n.minute=c.getUTCMinutes(),n.second=c.getUTCSeconds(),n.millisecond=c.getUTCMilliseconds()}o.zone>-1&&(n.offset=this.resolveTimezoneOffset(new Date(n.year,n.month,n.day),h[o.zone])),o.iso>-1&&(n.year=rt(h[o.iso+0]),n.month=rt(h[o.iso+1])-1,n.day=rt(h[o.iso+2]),n.hour=rt(h[o.iso+3]),n.minute=rt(h[o.iso+4]),n.second=rt(h[o.iso+5]),n.millisecond=rt(h[o.iso+6]),h[o.iso+7]=="Z"||h[o.iso+7]=="z"?n.utc=!0:h[o.iso+7]!=""&&(n.offset=this.resolveTimezoneOffset(new Date(n.year,n.month,n.day),h[o.iso+7]))),n.utc?s=new Date(Date.UTC(n.year,n.month,n.day,n.hour,n.minute,n.second,n.millisecond)):s=new Date(n.year,n.month,n.day,n.hour,n.minute+n.offset,n.second,n.millisecond)}else s=new Date(t);return s}resolveTimezoneOffset(t,e){if(e.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)){let s=e.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/),r=s[1],a=s[2],o=s[3],n=parseInt(a)*60+parseInt(o);r=="+"&&(n*=-1);let l=(t||new Date).getTimezoneOffset();return n-l}return 0}resolveMonth(t){let e=this._months().indexOf(t);return e>-1||!this._root.language.isDefault()&&(e=this._root.language.translateAll(this._months()).indexOf(t),e>-1)?e:0}resolveShortMonth(t){let e=this._shortMonths().indexOf(t);return e>-1||(e=this._months().indexOf(t),e>-1)||this._root.language&&!this._root.language.isDefault()&&(e=this._root.language.translateAll(this._shortMonths()).indexOf(t),e>-1)?e:0}isAm(t){return this.getStringList(["AM","A.M.","A"]).indexOf(t.toUpperCase())>-1}getStringList(t){let e=[];for(let i=0;i<t.length;i++)this._root.language?e.push(mi(this._t(t[i]))):e.push(mi(t[i]));return e}};var Re=class extends Y{constructor(){super(...arguments),this._unitAliases={Y:"y",D:"d",H:"h",K:"h",k:"h",n:"S"}}_setDefaults(){let t="_duration_millisecond",e="_duration_second",i="_duration_minute",s="_duration_hour",r="_duration_day",a="_duration_week",o="_duration_month",n="_duration_year",l="_second",d="_minute",f="_hour",h="_day",c="_week",p="_week",_="_year";this._setDefault("negativeBase",0),this._setDefault("baseUnit","second"),this._setDefault("durationFormats",{millisecond:{millisecond:this._t(t),second:this._t(t+l),minute:this._t(t+d),hour:this._t(t+f),day:this._t(t+h),week:this._t(t+c),month:this._t(t+p),year:this._t(t+_)},second:{second:this._t(e),minute:this._t(e+d),hour:this._t(e+f),day:this._t(e+h),week:this._t(e+c),month:this._t(e+p),year:this._t(e+_)},minute:{minute:this._t(i),hour:this._t(i+f),day:this._t(i+h),week:this._t(i+c),month:this._t(i+p),year:this._t(i+_)},hour:{hour:this._t(s),day:this._t(s+h),week:this._t(s+c),month:this._t(s+p),year:this._t(s+_)},day:{day:this._t(r),week:this._t(r+c),month:this._t(r+p),year:this._t(r+_)},week:{week:this._t(a),month:this._t(a+p),year:this._t(a+_)},month:{month:this._t(o),year:this._t(o+_)},year:{year:this._t(n)}}),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(t,e,i){let s=i||this.get("baseUnit");(typeof e>"u"||e==="")&&(this.get("durationFormat")!=null?e=this.get("durationFormat"):e=this.getFormat(rt(t),void 0,s)),e=qt(e);let r=this.parseFormat(e,s),a=Number(t),o;a>this.get("negativeBase")?o=r.positive:a<this.get("negativeBase")?o=r.negative:o=r.zero;let n=this.applyFormat(a,o);return o.color!==""&&(n="["+o.color+"]"+n+"[/]"),n}parseFormat(t,e){let i=e||this.get("baseUnit"),s={positive:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1},negative:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1},zero:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1}};t=t.replace("||",Nt);let r=t.split("|");return s.positive.source=r[0],typeof r[2]>"u"?s.zero=s.positive:s.zero.source=r[2],typeof r[1]>"u"?s.negative=s.positive:s.negative.source=r[1],tt(s,(a,o)=>{if(o.parsed)return;let n=o.source,l=[];l=o.source.match(/^\[([^\]]*)\]/),l&&l.length&&l[0]!==""&&(n=o.source.substr(l[0].length),o.color=l[1]);let d=lt.chunk(n,!0);for(let f=0;f<d.length;f++){let h=d[f];if(h.text=h.text.replace(Nt,"|"),h.type==="value"){h.text.match(/[yYMdDwhHKkmsSn]+a/)&&(o.absolute=!0,h.text=h.text.replace(/([yYMdDwhHKkmsSn]+)a/,"$1"));let c=h.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);if(c)for(let p=0;p<c.length;p++)c[p]==null&&(c[p]=this._unitAliases[c[p]]),o.parts.push(c[p]),h.text=h.text.replace(c[p],St)}o.template+=h.text}o.parsed=!0}),s}applyFormat(t,e){let i=!e.absolute&&t<this.get("negativeBase");t=Math.abs(t);let s=this.toTimeStamp(t,e.baseUnit),r=e.template,a={millisecond:0,second:0,minute:0,hour:0,day:0,week:0,month:0,year:0};for(let o=0,n=e.parts.length;o<n;o++){let l=e.parts[o],d=this._toTimeUnit(l.substr(0,1)),f,h=this._getUnitValue(d);o<n-1?f=Math.floor(s/h):f=Math.round(s/h),a[d]+=f,s-=f*h}tt(a,(o,n)=>{o=="millisecond"&&n==1e3?(a.second++,a.millisecond=0):o=="second"&&n==60?(a.minute++,a.second=0):o=="minute"&&n==60?(a.hour++,a.minute=0):o=="hour"&&n==24?(a.day++,a.hour=0):o=="day"&&n==7&&e.parts.indexOf("w")!==-1?(a.week++,a.day=0):o=="day"&&n==30?(a.month++,a.day=0):o=="month"&&n==12&&(a.year++,a.month=0)});for(let o=0,n=e.parts.length;o<n;o++){let l=e.parts[o],d=this._toTimeUnit(l.substr(0,1)),f=l.length;r=r.replace(St,q(a[d],f,"0"))}return i&&(r="-"+r),r}toTimeStamp(t,e){return t*this._getUnitValue(e)}_toTimeUnit(t){switch(t){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"}}getFormat(t,e,i){if(this.get("durationFormat")!=null)return this.get("durationFormat");if(i||(i=this.get("baseUnit")),e!=null&&t!=e){t=Math.abs(t),e=Math.abs(e);let s=this.getValueUnit(Math.max(t,e),i);return this.get("durationFormats")[i][s]}else{let s=this.getValueUnit(t,i);return this.get("durationFormats")[i][s]}}getValueUnit(t,e){e||(e=this.get("baseUnit"));let i,s=this.getMilliseconds(t,e);return ls(this._getUnitValues(),(r,a)=>{if(r==e||i){if(s/a<=1)return i||(i=r),!1;i=r}return!0}),i}getMilliseconds(t,e){return e||(e=this.get("baseUnit")),t*this._getUnitValue(e)}_getUnitValue(t){return this._getUnitValues()[t]}_getUnitValues(){return{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6}}};var ri={firstDayOfWeek:1,_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_millisecond_full:"HH:mm:ss SSS",_date_second:"HH:mm:ss",_date_second_full:"HH:mm:ss",_date_minute:"HH:mm",_date_minute_full:"HH:mm - MMM dd, yyyy",_date_hour:"HH:mm",_date_hour_short:"HH",_date_hour_full:"HH:mm - MMM dd, yyyy",_date_day:"MMM dd",_date_day_full:"MMM dd, yyyy",_date_week:"ww",_date_week_full:"MMM dd, yyyy",_date_month:"MMM",_date_month_full:"MMM, yyyy",_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(g){let t="th";if(g<11||g>13)switch(g%10){case 1:t="st";break;case 2:t="nd";break;case 3:t="rd";break}return t},"Zoom Out":"",Play:"",Stop:"",Legend:"","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":"","Press ENTER to open":"","Press ENTER to print.":"","Press ENTER to export as %1.":"","(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:"",HTML:"","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:"",Confirm:""};var ai=class extends Y{_setDefaults(){this.setPrivate("defaultLocale",ri),super._setDefaults()}translate(t,e,...i){e||(e=this._root.locale||this.getPrivate("defaultLocale"));let s=t,r=e[t];if(r===null)s="";else if(r!=null)r&&(s=r);else if(e!==this.getPrivate("defaultLocale"))return this.translate(t,this.getPrivate("defaultLocale"),...i);if(i.length)for(let a=i.length,o=0;o<a;++o)s=s.split("%"+(o+1)).join(i[o]);return s}translateAny(t,e,...i){return this.translate(t,e,...i)}setTranslationAny(t,e,i){let s=i||this._root.locale;s[t]=e}setTranslationsAny(t,e){tt(t,(i,s)=>{this.setTranslationAny(i,s,e)})}translateEmpty(t,e,...i){let s=this.translate(t,e,...i);return s==t?"":s}translateFunc(t,e){return this._root.locale[t]?this._root.locale[t]:e!==this.getPrivate("defaultLocale")?this.translateFunc(t,this.getPrivate("defaultLocale")):()=>""}translateAll(t,e){return this.isDefault()?t:os(t,i=>this.translate(i,e))}isDefault(){return this.getPrivate("defaultLocale")===this._root.locale}};var Jt=class{constructor(t=1,e=0,i=0,s=1,r=0,a=0){this.a=t,this.b=e,this.c=i,this.d=s,this.tx=r,this.ty=a}setTransform(t,e,i,s,r,a=1){this.a=Math.cos(r)*a,this.b=Math.sin(r)*a,this.c=-Math.sin(r)*a,this.d=Math.cos(r)*a,this.tx=t-(i*this.a+s*this.c),this.ty=e-(i*this.b+s*this.d)}apply(t){return{x:this.a*t.x+this.c*t.y+this.tx,y:this.b*t.x+this.d*t.y+this.ty}}applyInverse(t){let e=1/(this.a*this.d+this.c*-this.b);return{x:this.d*e*t.x+-this.c*e*t.y+(this.ty*this.c-this.tx*this.d)*e,y:this.a*e*t.y+-this.b*e*t.x+(-this.ty*this.a+this.tx*this.b)*e}}append(t){let e=this.a,i=this.b,s=this.c,r=this.d;this.a=t.a*e+t.b*s,this.b=t.a*i+t.b*r,this.c=t.c*e+t.d*s,this.d=t.c*i+t.d*r,this.tx=t.tx*e+t.ty*s+this.tx,this.ty=t.tx*i+t.ty*r+this.ty}prepend(t){let e=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){let i=this.a,s=this.c;this.a=i*t.a+this.b*t.c,this.b=i*t.b+this.b*t.d,this.c=s*t.a+this.d*t.c,this.d=s*t.b+this.d*t.d}this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty}copyFrom(t){this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty}};var Ys=(function(){function g(t,e){var i=[],s=!0,r=!1,a=void 0;try{for(var o=t[Symbol.iterator](),n;!(s=(n=o.next()).done)&&(i.push(n.value),!(e&&i.length===e));s=!0);}catch(l){r=!0,a=l}finally{try{!s&&o.return&&o.return()}finally{if(r)throw a}}return i}return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return g(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),Fe=Math.PI*2,Mi=function(t,e,i,s,r,a,o){var n=t.x,l=t.y;n*=e,l*=i;var d=s*n-r*l,f=r*n+s*l;return{x:d+a,y:f+o}},Ws=function(t,e){var i=e===1.5707963267948966?.551915024494:e===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(e/4),s=Math.cos(t),r=Math.sin(t),a=Math.cos(t+e),o=Math.sin(t+e);return[{x:s-r*i,y:r+s*i},{x:a+o*i,y:o-a*i},{x:a,y:o}]},As=function(t,e,i,s){var r=t*s-e*i<0?-1:1,a=t*i+e*s;return a>1&&(a=1),a<-1&&(a=-1),r*Math.acos(a)},Gs=function(t,e,i,s,r,a,o,n,l,d,f,h){var c=Math.pow(r,2),p=Math.pow(a,2),_=Math.pow(f,2),u=Math.pow(h,2),m=c*p-c*u-p*_;m<0&&(m=0),m/=c*u+p*_,m=Math.sqrt(m)*(o===n?-1:1);var b=m*r/a*h,x=m*-a/r*f,y=d*b-l*x+(t+i)/2,v=l*b+d*x+(e+s)/2,w=(f-b)/r,k=(h-x)/a,M=(-f-b)/r,D=(-h-x)/a,S=As(1,0,w,k),T=As(w,k,M,D);return n===0&&T>0&&(T-=Fe),n===1&&T<0&&(T+=Fe),[y,v,S,T]},Vs=function(t){var e=t.px,i=t.py,s=t.cx,r=t.cy,a=t.rx,o=t.ry,n=t.xAxisRotation,l=n===void 0?0:n,d=t.largeArcFlag,f=d===void 0?0:d,h=t.sweepFlag,c=h===void 0?0:h,p=[];if(a===0||o===0)return[];var _=Math.sin(l*Fe/360),u=Math.cos(l*Fe/360),m=u*(e-s)/2+_*(i-r)/2,b=-_*(e-s)/2+u*(i-r)/2;if(m===0&&b===0)return[];a=Math.abs(a),o=Math.abs(o);var x=Math.pow(m,2)/Math.pow(a,2)+Math.pow(b,2)/Math.pow(o,2);x>1&&(a*=Math.sqrt(x),o*=Math.sqrt(x));var y=Gs(e,i,s,r,a,o,f,c,_,u,m,b),v=Ys(y,4),w=v[0],k=v[1],M=v[2],D=v[3],S=Math.abs(D)/(Fe/4);Math.abs(1-S)<1e-7&&(S=1);var T=Math.max(Math.ceil(S),1);D/=T;for(var E=0;E<T;E++)p.push(Ws(M,D)),M+=D;return p.map(function($){var O=Mi($[0],a,o,u,_,w,k),B=O.x,U=O.y,A=Mi($[1],a,o,u,_,w,k),H=A.x,R=A.y,I=Mi($[2],a,o,u,_,w,k),it=I.x,G=I.y;return{x1:B,y1:U,x2:H,y2:R,x:it,y:G}})},Ls=Vs;function Xs(g,t,e){if(t!==e)throw new Error("Required "+e+" arguments for "+g+" but got "+t)}function Oe(g,t,e){if(t<e)throw new Error("Required at least "+e+" arguments for "+g+" but got "+t)}function dt(g,t,e){if(Oe(g,t,e),t%e!==0)throw new Error("Arguments for "+g+" must be in pairs of "+e)}function Us(g){for(let t=0;t<g.length;t+=7){let e=t+3,i=g[e];if(i.length>1){let s=/^([01])([01])(.*)$/.exec(i);s!==null&&(g.splice(e,0,s[1]),++e,g.splice(e,0,s[2]),++e,s[3].length>0?g[e]=s[3]:g.splice(e,1))}if(++e,i=g[e],i.length>1){let s=/^([01])(.+)$/.exec(i);s!==null&&(g.splice(e,0,s[1]),++e,g[e]=s[2])}}}function Ns(g){if(g===0||g===1)return g;throw new Error("Flag must be 0 or 1")}function js(g){let t=[0,0,0];for(let e=0;e<24;e++)t[e%3]<<=1,t[e%3]|=g&1,g>>=1;return(t[0]|0)+(t[1]<<8)+(t[2]<<16)}function oi(g,t){for(;!(g.interactive&&!t(g));)if(g._parent)g=g._parent;else break}function Zs(g,t,e){return N(g,Ze(t),i=>{let s=ui(i),r=i.touches;r?(r.length==0&&(r=i.changedTouches),e(Ut(r),s)):e([i],s)})}function zs(g){let t=document.createElement("canvas");t.width=1,t.height=1;let e=t.getContext("2d",{willReadFrequently:!0});e.drawImage(g,0,0,1,1);try{return e.getImageData(0,0,1,1),!1}catch{return console.warn('Image "'+g.src+'" is loaded from different host and is not covered by CORS policy. For more information about the implications read here: https://www.amcharts.com/docs/v5/concepts/cors'),!0}}function He(g){g.width=0,g.height=0,g.style.width="0px",g.style.height="0px"}function Di(g){return Math.floor(g)+.5}var Ei=class{constructor(){this._x=0,this._y=0}get x(){return this._x}get y(){return this._y}set x(t){this._x=t}set y(t){this._y=t}},Qt=class extends cs{constructor(t){super(),this.mask=null,this.visible=!0,this.exportable=!0,this.interactive=!1,this.inactive=null,this.wheelable=!1,this.cancelTouch=!1,this.isMeasured=!1,this.buttonMode=!1,this.alpha=1,this.compoundAlpha=1,this.angle=0,this.scale=1,this.x=0,this.y=0,this.crisp=!1,this.pivot=new Ei,this._localMatrix=new Jt,this._matrix=new Jt,this._uMatrix=new Jt,this._mx=NaN,this._my=NaN,this._mpx=NaN,this._mpy=NaN,this._mAngle=NaN,this._mScale=NaN,this._renderer=t}subStatus(t){return{inactive:this.inactive==null?t.inactive:this.inactive,layer:this._layer||t.layer}}_dispose(){this._renderer._removeObject(this),this.getLayer().dirty=!0}getCanvas(){return this.getLayer().view}getLayer(){let t=this;for(;;){if(t._layer)return t._layer;if(t._parent)t=t._parent;else return this._renderer.defaultLayer}}setLayer(t,e){t==null?this._layer=void 0:(this._layer=this._renderer.getLayer(t,!0),this._layer.visible=!0,this._layer.margin=e,e&&Rt(this._layer.view,!1),this._renderer._ghostLayer.setMargin(this._renderer.layers),this._parent&&this._parent.registerChildLayer(this._layer),this._layer.dirty=!0,this._renderer.resizeLayer(this._layer),this._renderer.resizeGhost())}markDirtyLayer(){this.getLayer().dirty=!0}clear(){this.invalidateBounds()}invalidateBounds(){this._localBounds=void 0}_addBounds(t){}_getColorId(){return this._colorId===void 0&&(this._colorId=this._renderer.paintId(this)),this._colorId}_isInteractive(t){return!t.inactive&&(this.interactive||this._renderer._forceInteractive>0)}_isInteractiveMask(t){return this._isInteractive(t)}contains(t){for(;;){if(t===this)return!0;if(t._parent)t=t._parent;else return!1}}toGlobal(t){return this._matrix.apply(t)}toLocal(t){return this._matrix.applyInverse(t)}getLocalMatrix(){return this._uMatrix.setTransform(0,0,this.pivot.x,this.pivot.y,this.angle*Math.PI/180,this.scale),this._uMatrix}getLocalBounds(){return this._localBounds||(this._localBounds={left:1e7,top:1e7,right:-1e7,bottom:-1e7},this._addBounds(this._localBounds)),this._localBounds}getAdjustedBounds(t){this._setMatrix();let e=this.getLocalMatrix(),i=e.apply({x:t.left,y:t.top}),s=e.apply({x:t.right,y:t.top}),r=e.apply({x:t.right,y:t.bottom}),a=e.apply({x:t.left,y:t.bottom});return{left:Math.min(i.x,s.x,r.x,a.x),top:Math.min(i.y,s.y,r.y,a.y),right:Math.max(i.x,s.x,r.x,a.x),bottom:Math.max(i.y,s.y,r.y,a.y)}}on(t,e,i){return this.interactive?this._renderer._addEvent(this,t,e,i):new yt(()=>{})}_setMatrix(){let t=this.pivot.x,e=this.pivot.y;(this.x!==this._mx||this.y!==this._my||t!==this._mpx||e!==this._mpy||this.angle!==this._mAngle||this.scale!==this._mScale)&&(this._localMatrix.setTransform(this.x,this.y,t,e,this.angle*Math.PI/180,this.scale),this._mx=this.x,this._my=this.y,this._mpx=t,this._mpy=e,this._mAngle=this.angle,this._mScale=this.scale),this._matrix.copyFrom(this._localMatrix),this._parent&&this._matrix.prepend(this._parent._matrix)}_transform(t,e){let i=this._matrix,s=i.tx*e,r=i.ty*e;this.crisp&&(s=Di(s),r=Di(r)),t.setTransform(i.a*e,i.b*e,i.c*e,i.d*e,s,r)}_transformMargin(t,e,i){let s=this._matrix;t.setTransform(s.a*e,s.b*e,s.c*e,s.d*e,(s.tx+i.left)*e,(s.ty+i.top)*e)}_transformLayer(t,e,i){i.margin?this._transformMargin(t,i.scale||e,i.margin):this._transform(t,i.scale||e)}render(t,e=0){if(this.visible&&(this.exportable!==!1||!this._renderer._omitTainted)){this._setMatrix();let i=this.subStatus(t),s=this._renderer.resolution,r=this._renderer._dirtyLayers,a=this._renderer._ghostLayer,o=a.context,n=this.mask;n&&n._setMatrix(),C(r,l=>{if(l){let d=l.context;d.save(),n&&(n._transformLayer(d,s,l),n._runPath(d),d.clip()),d.globalAlpha=this.compoundAlpha*this.alpha,this._transformLayer(d,s,l),this.filter&&(d.filter=this.filter)}}),o.save(),n&&this._isInteractiveMask(i)&&(n._transformMargin(o,s,a.margin),n._runPath(o),o.clip()),this._transformMargin(o,s,a.margin),i.layer.order>0&&!e&&ns(this._renderer._deferredGhostLayers,i.layer.order),this._render(i,e),o.restore(),C(r,l=>{l&&l.context.restore()})}}_render(t,e=0){this.exportable===!1&&(t.layer.tainted=!0)}_ghostOnly(t=0){return t>0}_drawGhost(t,e=0){let i=this._isInteractive(t),s=t.layer.order||0;return!!(i&&(s==0&&!this._ghostOnly(e)||s==e))}hovering(){return this._renderer._hovering.has(this)}dragging(){return this._renderer._dragging.some(t=>t.value===this)}shouldCancelTouch(){let t=this._renderer;return t.tapToActivate&&!t._touchActive?!1:this.cancelTouch?!0:this._parent?this._parent.shouldCancelTouch():!1}},$i=class extends Qt{constructor(){super(...arguments),this.interactiveChildren=!0,this._children=[]}_isInteractiveMask(t){return this.interactiveChildren||super._isInteractiveMask(t)}addChild(t){t._parent=this,this._children.push(t),t._layer&&this.registerChildLayer(t._layer)}addChildAt(t,e){t._parent=this,this._children.splice(e,0,t),t._layer&&this.registerChildLayer(t._layer)}removeChild(t){t._parent=void 0,Te(this._children,t)}_render(t,e){super._render(t);let i=this._renderer;this.interactive&&this.interactiveChildren&&++i._forceInteractive,C(this._children,s=>{s.compoundAlpha=this.compoundAlpha*this.alpha,s.render(t,e)}),this.interactive&&this.interactiveChildren&&--i._forceInteractive}registerChildLayer(t){this._childLayers||(this._childLayers=[]),Se(this._childLayers,t),this._parent&&this._parent.registerChildLayer(t)}markDirtyLayer(t=!1){super.markDirtyLayer(),t&&this._childLayers&&C(this._childLayers,e=>e.dirty=!0)}_dispose(){super._dispose(),this._childLayers&&C(this._childLayers,t=>{t.dirty=!0})}};function j(g,t){g.left=Math.min(g.left,t.x),g.top=Math.min(g.top,t.y),g.right=Math.max(g.right,t.x),g.bottom=Math.max(g.bottom,t.y)}var Z=class{colorize(t,e){}colorizeGhost(t,e){this.colorize(t,e)}path(t){}pathGhost(t){this.path(t)}addBounds(t){}},Pi=class extends Z{colorize(t,e){t.beginPath()}},Ie=class extends Z{constructor(t){super(),this.color=t}colorize(t,e){e!==void 0?t.fillStyle=e:t.fillStyle=this.color}},Bi=class extends Z{constructor(t){super(),this.clearShadow=t}colorize(t,e){t.fill(),this.clearShadow&&(t.shadowColor="",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}},Ai=class extends Z{colorize(t,e){t.stroke()}},Ye=class extends Z{constructor(t,e,i,s){super(),this.width=t,this.color=e,this.lineJoin=i,this.lineCap=s}colorize(t,e){e!==void 0?t.strokeStyle=e:t.strokeStyle=this.color,t.lineWidth=this.width,this.lineJoin&&(t.lineJoin=this.lineJoin),this.lineCap&&(t.lineCap=this.lineCap)}},Li=class extends Z{constructor(t){super(),this.dash=t}colorize(t,e){t.setLineDash(this.dash)}},Ni=class extends Z{constructor(t){super(),this.dashOffset=t}colorize(t,e){t.lineDashOffset=this.dashOffset}},zi=class extends Z{constructor(t,e,i,s){super(),this.x=t,this.y=e,this.width=i,this.height=s}path(t){t.rect(this.x,this.y,this.width,this.height)}addBounds(t){let e=this.x,i=this.y,s=e+this.width,r=i+this.height;j(t,{x:e,y:i}),j(t,{x:s,y:i}),j(t,{x:e,y:r}),j(t,{x:s,y:r})}},Ri=class extends Z{constructor(t,e,i){super(),this.x=t,this.y=e,this.radius=i}path(t){t.moveTo(this.x+this.radius,this.y),t.arc(this.x,this.y,this.radius,0,2*Math.PI)}addBounds(t){j(t,{x:this.x-this.radius,y:this.y-this.radius}),j(t,{x:this.x+this.radius,y:this.y+this.radius})}},Fi=class extends Z{constructor(t,e,i,s){super(),this.x=t,this.y=e,this.radiusX=i,this.radiusY=s}path(t){t.ellipse(0,0,this.radiusX,this.radiusY,0,0,Math.PI*2)}addBounds(t){j(t,{x:this.x-this.radiusX,y:this.y-this.radiusY}),j(t,{x:this.x+this.radiusX,y:this.y+this.radiusY})}},Oi=class extends Z{constructor(t,e,i,s,r,a){super(),this.cx=t,this.cy=e,this.radius=i,this.startAngle=s,this.endAngle=r,this.anticlockwise=a}path(t){this.radius>0&&t.arc(this.cx,this.cy,this.radius,this.startAngle,this.endAngle,this.anticlockwise)}addBounds(t){let e=Ss(this.cx,this.cy,this.startAngle*Kt,this.endAngle*Kt,this.radius);j(t,{x:e.left,y:e.top}),j(t,{x:e.right,y:e.bottom})}},Hi=class extends Z{constructor(t,e,i,s,r){super(),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.radius=r}path(t){this.radius>0&&t.arcTo(this.x1,this.y1,this.x2,this.y2,this.radius)}addBounds(t){}},Ii=class extends Z{constructor(t,e){super(),this.x=t,this.y=e}path(t){t.lineTo(this.x,this.y)}addBounds(t){j(t,{x:this.x,y:this.y})}},Yi=class extends Z{constructor(t,e){super(),this.x=t,this.y=e}path(t){t.moveTo(this.x,this.y)}addBounds(t){j(t,{x:this.x,y:this.y})}},Wi=class extends Z{path(t){t.closePath()}},Gi=class extends Z{constructor(t,e,i,s,r,a){super(),this.cpX=t,this.cpY=e,this.cpX2=i,this.cpY2=s,this.toX=r,this.toY=a}path(t){t.bezierCurveTo(this.cpX,this.cpY,this.cpX2,this.cpY2,this.toX,this.toY)}addBounds(t){j(t,{x:this.cpX,y:this.cpY}),j(t,{x:this.cpX2,y:this.cpY2}),j(t,{x:this.toX,y:this.toY})}},Vi=class extends Z{constructor(t,e,i,s){super(),this.cpX=t,this.cpY=e,this.toX=i,this.toY=s}path(t){t.quadraticCurveTo(this.cpX,this.cpY,this.toX,this.toY)}addBounds(t){j(t,{x:this.cpX,y:this.cpY}),j(t,{x:this.toX,y:this.toY})}},Xi=class extends Z{constructor(t,e,i,s,r){super(),this.color=t,this.blur=e,this.offsetX=i,this.offsetY=s,this.opacity=r}colorize(t,e){this.opacity&&(t.fillStyle=this.color),t.shadowColor=this.color,t.shadowBlur=this.blur,t.shadowOffsetX=this.offsetX,t.shadowOffsetY=this.offsetY}colorizeGhost(t,e){}},Ui=class extends Z{constructor(t,e,i,s,r){super(),this.image=t,this.width=e,this.height=i,this.x=s,this.y=r}path(t){t.drawImage(this.image,this.x,this.y,this.width,this.height)}addBounds(t){j(t,{x:this.x,y:this.y}),j(t,{x:this.width,y:this.height})}},ji=class extends Qt{constructor(){super(...arguments),this._operations=[],this.blendMode=xi.NORMAL,this._hasShadows=!1}clear(){super.clear(),this._operations.length=0}_pushOp(t){this._operations.push(t)}beginFill(t,e=1){this._fillAlpha=e,t?t instanceof W?this._pushOp(new Ie(t.toCSS(e))):(this.isMeasured=!0,this._pushOp(new Ie(t))):this._pushOp(new Ie("rgba(0, 0, 0, "+e+")"))}endFill(){this._pushOp(new Bi(this._hasShadows))}endStroke(){this._pushOp(new Ai)}beginPath(){this._pushOp(new Pi)}lineStyle(t=0,e,i=1,s,r){this._strokeAlpha=i,e?e instanceof W?this._pushOp(new Ye(t,e.toCSS(i),s,r)):this._pushOp(new Ye(t,e,s,r)):this._pushOp(new Ye(t,"rgba(0, 0, 0, "+i+")",s,r))}setLineDash(t){this._pushOp(new Li(t||[]))}setLineDashOffset(t=0){this._pushOp(new Ni(t))}drawRect(t,e,i,s){this._pushOp(new zi(t,e,i,s))}drawCircle(t,e,i){this._pushOp(new Ri(t,e,i))}drawEllipse(t,e,i,s){this._pushOp(new Fi(t,e,i,s))}arc(t,e,i,s,r,a=!1){this._pushOp(new Oi(t,e,i,s,r,a))}arcTo(t,e,i,s,r){this._pushOp(new Hi(t,e,i,s,r))}lineTo(t,e){this._pushOp(new Ii(t,e))}moveTo(t,e){this._pushOp(new Yi(t,e))}bezierCurveTo(t,e,i,s,r,a){this._pushOp(new Gi(t,e,i,s,r,a))}quadraticCurveTo(t,e,i,s){this._pushOp(new Vi(t,e,i,s))}closePath(){this._pushOp(new Wi)}shadow(t,e=0,i=0,s=0,r){this._hasShadows=!0,this._pushOp(new Xi(r?t.toCSS(r):t.toCSS(this._fillAlpha||this._strokeAlpha),e,i,s))}image(t,e,i,s,r){this._pushOp(new Ui(t,e,i,s,r))}svgPath(t){let e=0,i=0,s=null,r=null,a=null,o=null,n=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,l=/[\u0009\u0020\u000A\u000C\u000D]*([\+\-]?[0-9]*\.?[0-9]+(?:[eE][\+\-]?[0-9]+)?)[\u0009\u0020\u000A\u000C\u000D]*,?/g,d=this._operations.length;try{let f;for(;(f=n.exec(t))!==null;){let h=f[1],c=f[2],p=[];for(;(f=l.exec(c))!==null;)p.push(f[1]);switch(h!=="S"&&h!=="s"&&h!=="C"&&h!=="c"&&(s=null,r=null),h!=="Q"&&h!=="q"&&h!=="T"&&h!=="t"&&(a=null,o=null),h){case"M":dt(h,p.length,2),e=+p[0],i=+p[1],this.moveTo(e,i);for(let u=2;u<p.length;u+=2)e=+p[u],i=+p[u+1],this.lineTo(e,i);break;case"m":dt(h,p.length,2),e+=+p[0],i+=+p[1],this.moveTo(e,i);for(let u=2;u<p.length;u+=2)e+=+p[u],i+=+p[u+1],this.lineTo(e,i);break;case"L":dt(h,p.length,2);for(let u=0;u<p.length;u+=2)e=+p[u],i=+p[u+1],this.lineTo(e,i);break;case"l":dt(h,p.length,2);for(let u=0;u<p.length;u+=2)e+=+p[u],i+=+p[u+1],this.lineTo(e,i);break;case"H":Oe(h,p.length,1);for(let u=0;u<p.length;++u)e=+p[u],this.lineTo(e,i);break;case"h":Oe(h,p.length,1);for(let u=0;u<p.length;++u)e+=+p[u],this.lineTo(e,i);break;case"V":Oe(h,p.length,1);for(let u=0;u<p.length;++u)i=+p[u],this.lineTo(e,i);break;case"v":Oe(h,p.length,1);for(let u=0;u<p.length;++u)i+=+p[u],this.lineTo(e,i);break;case"C":dt(h,p.length,6);for(let u=0;u<p.length;u+=6){let m=+p[u],b=+p[u+1];s=+p[u+2],r=+p[u+3],e=+p[u+4],i=+p[u+5],this.bezierCurveTo(m,b,s,r,e,i)}break;case"c":dt(h,p.length,6);for(let u=0;u<p.length;u+=6){let m=+p[u]+e,b=+p[u+1]+i;s=+p[u+2]+e,r=+p[u+3]+i,e+=+p[u+4],i+=+p[u+5],this.bezierCurveTo(m,b,s,r,e,i)}break;case"S":dt(h,p.length,4),(s===null||r===null)&&(s=e,r=i);for(let u=0;u<p.length;u+=4){let m=2*e-s,b=2*i-r;s=+p[u],r=+p[u+1],e=+p[u+2],i=+p[u+3],this.bezierCurveTo(m,b,s,r,e,i)}break;case"s":dt(h,p.length,4),(s===null||r===null)&&(s=e,r=i);for(let u=0;u<p.length;u+=4){let m=2*e-s,b=2*i-r;s=+p[u]+e,r=+p[u+1]+i,e+=+p[u+2],i+=+p[u+3],this.bezierCurveTo(m,b,s,r,e,i)}break;case"Q":dt(h,p.length,4);for(let u=0;u<p.length;u+=4)a=+p[u],o=+p[u+1],e=+p[u+2],i=+p[u+3],this.quadraticCurveTo(a,o,e,i);break;case"q":dt(h,p.length,4);for(let u=0;u<p.length;u+=4)a=+p[u]+e,o=+p[u+1]+i,e+=+p[u+2],i+=+p[u+3],this.quadraticCurveTo(a,o,e,i);break;case"T":dt(h,p.length,2),(a===null||o===null)&&(a=e,o=i);for(let u=0;u<p.length;u+=2)a=2*e-a,o=2*i-o,e=+p[u],i=+p[u+1],this.quadraticCurveTo(a,o,e,i);break;case"t":dt(h,p.length,2),(a===null||o===null)&&(a=e,o=i);for(let u=0;u<p.length;u+=2)a=2*e-a,o=2*i-o,e+=+p[u],i+=+p[u+1],this.quadraticCurveTo(a,o,e,i);break;case"A":case"a":let _=h==="a";Us(p),dt(h,p.length,7);for(let u=0;u<p.length;u+=7){let m=+p[u+5],b=+p[u+6];_&&(m+=e,b+=i);let x=Ls({px:e,py:i,rx:+p[u],ry:+p[u+1],xAxisRotation:+p[u+2],largeArcFlag:Ns(+p[u+3]),sweepFlag:Ns(+p[u+4]),cx:m,cy:b});C(x,y=>{this.bezierCurveTo(y.x1,y.y1,y.x2,y.y2,y.x,y.y),e=y.x,i=y.y})}break;case"Z":case"z":Xs(h,p.length,0),this.closePath();break}}}catch(f){this._operations.length=d,console.warn(`Error when parsing svgPath:
|
|
3
|
-
`+f.message+`
|
|
4
|
-
`+t)}}_runPath(t){t.beginPath(),C(this._operations,e=>{e.path(t)})}_render(t,e=0){super._render(t);let i=t.layer.dirty,s=this._isInteractive(t),r=this._ghostOnly(e),a=this._drawGhost(t,e);if(i||s||r){let o=t.layer.context,n=this._renderer._ghostLayer.context;i&&!r&&(o.globalCompositeOperation=this.blendMode,o.beginPath());let l;a&&(n.beginPath(),l=this._getColorId()),C(this._operations,d=>{i&&!r&&(d.path(o),d.colorize(o,void 0)),a&&(d.pathGhost(n),d.colorizeGhost(n,l))})}}renderDetached(t){if(this.visible){this._setMatrix(),t.save();let e=this.mask;e&&(e._setMatrix(),e._transform(t,1),e._runPath(t),t.clip()),t.globalAlpha=this.compoundAlpha*this.alpha,this._transform(t,1),this.filter&&(t.filter=this.filter),t.globalCompositeOperation=this.blendMode,t.beginPath(),C(this._operations,i=>{i.path(t),i.colorize(t,void 0)}),t.restore()}}_addBounds(t){this.visible&&this.isMeasured&&C(this._operations,e=>{e.addBounds(t)})}},ni=class extends Qt{constructor(t,e,i){super(t),this.resolution=1,this.textVisible=!0,this._originalScale=1,this.text=e,this.style=i}invalidateBounds(){super.invalidateBounds(),this._textInfo=void 0}invalidateVisibility(){this.textVisible=!0,this.scale=this._originalScale||1}_shared(t){this.style.textAlign&&(t.textAlign=this.style.textAlign),this.style.direction&&(t.direction=this.style.direction),this.style.textBaseline&&(t.textBaseline=this.style.textBaseline)}_prerender(t,e=!1,i=!1,s=!1){super._render(t);let r=t.layer.context,a=this._renderer._ghostLayer.context,o=this.style,n=this._getFontStyle(void 0,i);s||(r.font=n,o.fill&&(o.fill instanceof W?r.fillStyle=o.fill.toCSS(o.fillOpacity!=null?o.fillOpacity:1):r.fillStyle=o.fill),o.shadowColor&&(r.shadowColor=o.shadowColor.toCSS(o.shadowOpacity||1)),o.shadowBlur&&(r.shadowBlur=o.shadowBlur),o.shadowOffsetX&&(r.shadowOffsetX=o.shadowOffsetX),o.shadowOffsetY&&(r.shadowOffsetY=o.shadowOffsetY),this._shared(r)),this._isInteractive(t)&&!e&&(a.font=n),this._isInteractive(t)&&!e&&(a.fillStyle=this._getColorId(),this._shared(a))}_getFontStyle(t,e=!1){let i=this.style,s=[];return t&&t.fontVariant?s.push(t.fontVariant):i.fontVariant&&s.push(i.fontVariant),e||(t&&t.fontWeight?s.push(t.fontWeight):i.fontWeight&&s.push(i.fontWeight)),t&&t.fontStyle?s.push(t.fontStyle):i.fontStyle&&s.push(i.fontStyle),t&&t.fontSize?(L(t.fontSize)&&(t.fontSize=t.fontSize+"px"),s.push(t.fontSize)):i.fontSize&&(L(i.fontSize)&&(i.fontSize=i.fontSize+"px"),s.push(i.fontSize)),i.fontFamily=="inherit"?s.push(getComputedStyle(this._renderer.view).getPropertyValue("font-family")):t&&t.fontFamily?s.push(t.fontFamily):i.fontFamily?s.push(i.fontFamily):s.length&&s.push("Arial"),s.join(" ")}_render(t,e=0){if(this._textInfo||this._measure(t),this.textVisible){let i=this._isInteractive(t),s=t.layer.context,r=t.layer.dirty,a=this._renderer._ghostLayer.context,o=this._ghostOnly(e),n=this._drawGhost(t,e),l=r&&!o;if(!l&&!(this.interactive&&n))return;l&&s.save(),a.save(),this._prerender(t,!1,!1,!l),C(this._textInfo,(d,f)=>{C(d.textChunks,(h,c)=>{if(h.style&&(l&&(s.save(),s.font=h.style),a.save(),this._isInteractive(t)&&(a.font=h.style)),h.fill&&l&&(s.save(),s.fillStyle=h.fill.toCSS()),l&&s.fillText(h.text,h.offsetX,d.offsetY+h.offsetY),l&&(h.textDecoration=="underline"||h.textDecoration=="line-through")){let p=1,_=1,u=h.height,m=this.style.oversizedBehavior||"";if(["truncate","wrap","wrap-no-break"].indexOf(m)>-1){let y=this._measureText(h.text,s);h.width=y.actualBoundingBoxLeft+y.actualBoundingBoxRight}let b=h.offsetX;switch(this.style.textAlign){case"right":case"end":b-=h.width;break;case"center":b-=h.width/2;break}if(h.style)switch(lt.getTextStyle(h.style).fontWeight){case"bolder":case"bold":case"700":case"800":case"900":p=2;break}u&&(_=u/20);let x;h.textDecoration=="line-through"?x=p+d.offsetY+h.offsetY-h.height/2:x=p+_*1.5+d.offsetY+h.offsetY,x=Di(x),s.save(),s.beginPath(),h.fill?s.strokeStyle=h.fill.toCSS():this.style.fill&&this.style.fill instanceof W&&(s.strokeStyle=this.style.fill.toCSS()),s.lineWidth=p*_,s.moveTo(b,x),s.lineTo(b+h.width,x),s.stroke(),s.restore()}i&&this.interactive&&n&&a.fillText(h.text,h.offsetX,d.offsetY+h.offsetY),h.fill&&l&&s.restore(),h.style&&(l&&s.restore(),a.restore())})}),l&&s.restore(),a.restore()}}_addBounds(t){if(this.visible&&this.isMeasured){let e=this._measure({inactive:this.inactive,layer:this.getLayer()});j(t,{x:e.left,y:e.top}),j(t,{x:e.right,y:e.bottom})}}_ignoreFontWeight(){return/apple/i.test(navigator.vendor)}_measure(t){let e=t.layer.context,i=this._renderer._ghostLayer.context,s=this.style.direction=="rtl";this._textInfo=[];let r=this.style.oversizedBehavior,a=this.style.maxWidth,o=L(a)&&r=="truncate",n=L(a)&&(r=="wrap"||r=="wrap-no-break");e.save(),i.save(),this._prerender(t,!0,this._ignoreFontWeight());let l="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",d=this.text.toString().replace(/\r/g,"").split(/\n/),f=!0,h=0,c=0,p=0,_;C(d,(m,b)=>{let x;for(m==""?x=[{type:"value",text:""}]:x=lt.chunk(m,!1,this.style.ignoreFormatting);x.length>0;){let y={offsetY:p,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},v=this._measureText(l,e),w=v.actualBoundingBoxAscent+v.actualBoundingBoxDescent;y.height=w,y.ascent=v.actualBoundingBoxAscent;let k,M=this.style.textDecoration,D,S,T=!1,E=!0,$=[],O;Ce(x,(B,U)=>{if(B.type=="format")if(B.text=="[/]")f||(e.restore(),i.restore(),f=!0),D=void 0,_=void 0,S=void 0,M=this.style.textDecoration,O=void 0,k=B.text;else{f||(e.restore(),i.restore());let A=lt.getTextStyle(B.text),H=this._getFontStyle(A);e.save(),i.save(),e.font=H,_=H,k=B.text,A.textDecoration&&(M=A.textDecoration),A.fill&&(D=A.fill),A.width&&(S=rt(A.width)),A.verticalAlign&&(O=A.verticalAlign),f=!1;let R=this._measureText(l,e),I=R.actualBoundingBoxAscent+R.actualBoundingBoxDescent;I>y.height&&(y.height=I),R.actualBoundingBoxAscent>y.ascent&&(y.ascent=R.actualBoundingBoxAscent)}else if(B.type=="value"&&!T){let A=this._measureText(B.text,e),H=A.actualBoundingBoxLeft+A.actualBoundingBoxRight;if(o){this.truncated=void 0;let G=E||this.style.breakWords||!1,V=this.style.ellipsis||"",st=this._measureText(V,e),we=st.actualBoundingBoxLeft+st.actualBoundingBoxRight;if(y.width+H>a){let Ge=a-y.width-we;B.text=this._truncateText(e,B.text,Ge,G),B.text+=V,T=!0,this.truncated=!0}}else if(n&&y.width+H>a){let G=a-y.width,V=this._truncateText(e,B.text,G,!1,E&&this.style.oversizedBehavior!="wrap-no-break");if(V=="")return this.textVisible=!0,!1;if(!E){let st=this._measureText($e(V),e);if(st.actualBoundingBoxLeft+st.actualBoundingBoxRight>G)return $=x.slice(U),k&&$.unshift({type:"format",text:k}),x=[],!1}$=x.slice(U+1),$e(V)!=$e(B.text)&&($.unshift({type:"value",text:B.text.substr(V.length)}),k&&$.unshift({type:"format",text:k})),B.text=$e(V),x=[],T=!0}let R=1,I=1;if(_&&S&&S>H){let G=H/S;switch(this.style.textAlign){case"right":case"end":R=G;break;case"center":R=G,I=G;break;default:I=G}H=S}let it=A.actualBoundingBoxAscent+A.actualBoundingBoxDescent;it>y.height&&(y.height=it),A.actualBoundingBoxAscent>y.ascent&&(y.ascent=A.actualBoundingBoxAscent),y.width+=H,y.left+=A.actualBoundingBoxLeft/R,y.right+=A.actualBoundingBoxRight/I,y.textChunks.push({style:_,fill:D,text:B.text,width:H,height:it,left:A.actualBoundingBoxLeft,right:A.actualBoundingBoxRight,ascent:A.actualBoundingBoxAscent,offsetX:0,offsetY:0,textDecoration:M,verticalAlign:O}),E=!1}return!0}),this.style.lineHeight instanceof nt?(y.height*=this.style.lineHeight.value,y.ascent*=this.style.lineHeight.value):(y.height*=this.style.lineHeight||1.2,y.ascent*=this.style.lineHeight||1.2),h<y.left&&(h=y.left),c<y.right&&(c=y.right),this._textInfo.push(y),p+=y.height,x=$||[]}}),f||(e.restore(),i.restore()),C(this._textInfo,(m,b)=>{let x=0;C(m.textChunks,y=>{if(y.offsetX=x+y.left-m.left,y.offsetY+=m.height-m.height*(this.style.baselineRatio||.19),x+=y.width*(s?-1:1),y.verticalAlign)switch(y.verticalAlign){case"super":y.offsetY-=m.height/2-y.height/2;break;case"sub":y.offsetY+=y.height/2;break}})});let u={left:s?-c:-h,top:0,right:s?h:c,bottom:p};if(r!=="none"){let m=this._fitRatio(u,r=="truncate");if(m<1)if(r=="fit")L(this.style.minScale)&&m<this.style.minScale?(this.textVisible=!1,u.left=0,u.top=0,u.right=0,u.bottom=0):(this._originalScale||(this._originalScale=this.scale),this.scale=m,this.textVisible=!0);else if(r=="hide")this.textVisible=!1,u.left=0,u.top=0,u.right=0,u.bottom=0;else{switch(this.style.textAlign){case"right":case"end":u.left=s?a:-a,u.right=0;break;case"center":u.left=-a/2,u.right=a/2;break;default:u.left=0,u.right=s?-a:a}this.scale=this._originalScale||1,this._originalScale=void 0,this.textVisible=!0}else this.scale=this._originalScale||1,this._originalScale=void 0,this.textVisible=!0}return e.restore(),i.restore(),u}_fitRatio(t,e=!1){let i=this.style.maxWidth,s=e?void 0:this.style.maxHeight;if(!L(i)&&!L(s))return 1;let r=t.right-t.left,a=t.bottom-t.top;return Math.min(i/r||1,s/a||1)}_truncateText(t,e,i,s=!1,r=!0){let a;do{if(s)e=e.slice(0,-1);else{let n=e.replace(/(?:[^,;:!?\\\/\s]|,(?=\d))+[,;:!?\\\/\s]*$/g,"");if((n==""||n===e)&&r)s=!0;else{if(n=="")return e;e=n}}let o=this._measureText(e,t);a=o.actualBoundingBoxLeft+o.actualBoundingBoxRight}while(a>i&&e!="");return e}_measureText(t,e){let i=e.measureText(t),s={};if(i.actualBoundingBoxAscent==null){let a=document.createElement("div");a.innerText=t,a.style.visibility="hidden",a.style.position="absolute",a.style.top="-1000000px;",a.style.fontFamily=this.style.fontFamily||"",a.style.fontSize=this.style.fontSize+"",document.body.appendChild(a);let o=a.getBoundingClientRect();document.body.removeChild(a);let n=o.height,l=i.width;s={actualBoundingBoxAscent:n,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:l,fontBoundingBoxAscent:n,fontBoundingBoxDescent:0,width:l}}else s={actualBoundingBoxAscent:i.actualBoundingBoxAscent,actualBoundingBoxDescent:i.actualBoundingBoxDescent,actualBoundingBoxLeft:i.actualBoundingBoxLeft,actualBoundingBoxRight:i.actualBoundingBoxRight,fontBoundingBoxAscent:i.actualBoundingBoxAscent,fontBoundingBoxDescent:i.actualBoundingBoxDescent,width:i.width};let r=i.width;switch(this.style.textAlign){case"right":case"end":s.actualBoundingBoxLeft=r,s.actualBoundingBoxRight=0;break;case"center":s.actualBoundingBoxLeft=r/2,s.actualBoundingBoxRight=r/2;break;default:s.actualBoundingBoxLeft=0,s.actualBoundingBoxRight=r}return s}},Zi=class{constructor(){this.lineHeight=pt(120),this.baselineRatio=.19,this.oversizedBehavior="none",this.breakWords=!1,this.ellipsis="\u2026",this.ignoreFormatting=!1}},qi=class extends ni{constructor(){super(...arguments),this.textType="circular",this.inside=!1,this.orientation="auto",this.kerning=0,this._textReversed=!1}_render(t,e=0){this.textType==="circular"?this._renderCircular(t,e):super._render(t,e)}_renderCircular(t,e=0){if(this.textVisible){let i=this._isInteractive(t),s=t.layer.context,r=t.layer.dirty,a=this._renderer._ghostLayer.context,o=this._ghostOnly(e),n=this._drawGhost(t,e),l=r&&!o;if(!l&&!n)return;l&&s.save(),i&&a.save(),this._prerender(t,!1,!1,!l),this._textInfo||this._measure(t);let d=this.radius||0,f=this.startAngle||0,h=0,c=this.orientation,p=c=="auto"?"auto":c=="inward",_=this.inside,u=this.style.textAlign||"left",m=this.kerning||0,b=u=="left"?1:-1,x=!this._textReversed;if(p=="auto"){let y=0,v=0;C(this._textInfo,(w,k)=>{let M=f+w.width/(d-w.height)/2*-b;M>y&&(y=M)}),u=="left"?v=(y+h/2)*Kt:u=="right"?v=(y-h/2)*Kt:v=f*Kt,v=Ts(v),p=v>=270||v<=90}p==!0&&x&&(this._textInfo.reverse(),this._textReversed=!0),C(this._textInfo,(y,v)=>{let w=y.height;_||(d+=w),(b==-1&&p||b==1&&!p)&&x&&y.textChunks.reverse();let k=f;h=0,u=="center"&&(k+=y.width/(d-w)/2*-b,h=k-f),k+=Math.PI*(p?0:1),l&&(s.save(),s.rotate(k)),i&&(a.save(),a.rotate(k));let M=0;C(y.textChunks,(D,S)=>{let T=D.text,E=D.width;M=E/2/(d-w)*b,l&&s.rotate(M),i&&a.rotate(M),D.style&&(l&&(s.save(),s.font=D.style),a.save(),i&&(a.font=D.style)),D.fill&&l&&(s.save(),s.fillStyle=D.fill.toCSS()),l&&(s.textBaseline="middle",s.textAlign="center"),i&&(a.textBaseline="middle",a.textAlign="center"),l&&s.fillText(T,0,(p?1:-1)*(0-d+w/2)),i&&n&&a.fillText(T,0,(p?1:-1)*(0-d+w/2)),D.fill&&l&&s.restore(),D.style&&(l&&s.restore(),a.restore()),M=(E/2+m)/(d-w)*b,l&&s.rotate(M),i&&a.rotate(M)}),l&&s.restore(),i&&a.restore(),_&&(d-=w)}),l&&s.restore(),i&&a.restore()}}_measure(t){return this.textType==="circular"?this._measureCircular(t):super._measure(t)}_measureCircular(t){let e=t.layer.context,i=this._renderer._ghostLayer.context,s=this.style.direction=="rtl",r=this.style.oversizedBehavior,a=this.style.maxWidth,o=L(a)&&r=="truncate",n=this.style.ellipsis||"",l;this.textVisible=!0,this._textInfo=[],this._textReversed=!1,e.save(),i.save(),this._prerender(t,!0);let d=this.text.toString().replace(/\r/g,"").split(/\n/),f=!0,h=0,c=0;return C(d,(p,_)=>{let u=lt.chunk(p,!1,this.style.ignoreFormatting),m={offsetY:c,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},b,x,y;C(u,(v,w)=>{if(v.type=="format"){if(v.text=="[/]")f||(e.restore(),i.restore(),f=!0),x=void 0,b=void 0,y=void 0;else{let k=lt.getTextStyle(v.text),M=this._getFontStyle(k);e.save(),i.save(),e.font=M,b=M,k.fill&&(x=k.fill),k.width&&(y=rt(k.width)),f=!1}o&&(l=this._measureText(n,e))}else if(v.type=="value"){let k=v.text.match(/./ug)||[];s&&(k=xs(v.text),k.reverse());for(let M=0;M<k.length;M++){let D=k[M],S=this._measureText(D,e),T=S.width;b&&y&&y>T&&(T=y);let E=S.actualBoundingBoxAscent+S.actualBoundingBoxDescent;if(E>m.height&&(m.height=E),S.actualBoundingBoxAscent>m.ascent&&(m.ascent=S.actualBoundingBoxAscent),h+=T,o){l||(l=this._measureText(n,e));let $=l.actualBoundingBoxLeft+l.actualBoundingBoxRight;if(h+$>a){m.textChunks.length==1?this.textVisible=!1:(m.width+=$,m.left+=l.actualBoundingBoxLeft,m.right+=l.actualBoundingBoxRight,m.textChunks.push({style:b,fill:x,text:n,width:$,height:E+l.actualBoundingBoxDescent,left:l.actualBoundingBoxLeft,right:l.actualBoundingBoxRight,ascent:l.actualBoundingBoxAscent,offsetX:0,offsetY:E,textDecoration:void 0}));break}}m.width+=T,m.left+=S.actualBoundingBoxLeft,m.right+=S.actualBoundingBoxRight,m.textChunks.push({style:b,fill:x,text:D,width:T,height:E+S.actualBoundingBoxDescent,left:S.actualBoundingBoxLeft,right:S.actualBoundingBoxRight,ascent:S.actualBoundingBoxAscent,offsetX:0,offsetY:E,textDecoration:void 0})}}}),this.style.lineHeight instanceof nt?m.height*=this.style.lineHeight.value:m.height*=this.style.lineHeight||1.2,this._textInfo.push(m),c+=m.height}),f||(e.restore(),i.restore()),r=="hide"&&h>a&&(this.textVisible=!1),C(this._textInfo,p=>{C(p.textChunks,_=>{_.offsetY+=Math.round((p.height-_.height+(p.ascent-_.ascent))/2)})}),e.restore(),i.restore(),{left:0,top:0,right:0,bottom:0}}},Ki=class extends Qt{constructor(t,e){super(t),this.image=e}_dispose(){super._dispose(),this._imageMask&&He(this._imageMask)}getLocalBounds(){if(!this._localBounds){let t=0,e=0;this.width&&(t=this.width),this.height&&(e=this.height),this._localBounds={left:0,top:0,right:t,bottom:e},this._addBounds(this._localBounds)}return this._localBounds}_render(t,e=0){if(super._render(t),this.image){if(this.tainted===void 0&&(this.tainted=zs(this.image),t.layer.tainted=!0),this.tainted&&this._renderer._omitTainted)return;let i=this._ghostOnly(e),s=this._drawGhost(t,e);if(t.layer.dirty&&!i){this.shadowColor&&(t.layer.context.shadowColor=this.shadowColor.toCSS(this.shadowOpacity||1)),this.shadowBlur&&(t.layer.context.shadowBlur=this.shadowBlur),this.shadowOffsetX&&(t.layer.context.shadowOffsetX=this.shadowOffsetX),this.shadowOffsetY&&(t.layer.context.shadowOffsetY=this.shadowOffsetY);let r=this.width||this.image.naturalWidth,a=this.height||this.image.naturalHeight;t.layer.context.drawImage(this.image,0,0,r,a)}if(this.interactive&&this._isInteractive(t)&&s){let r=this._getMask(this.image);this._renderer._ghostLayer.context.drawImage(r,0,0)}}}clear(){super.clear(),this.image=void 0,this._imageMask=void 0}_getMask(t){if(this._imageMask===void 0){let e=this.width||t.naturalWidth,i=this.height||t.naturalHeight,s=document.createElement("canvas");s.width=e,s.height=i;let r=s.getContext("2d");r.imageSmoothingEnabled=!1,r.fillStyle=this._getColorId(),r.fillRect(0,0,e,i),zs(t)||(r.globalCompositeOperation="destination-in",r.drawImage(t,0,0,e,i)),this._imageMask=s}return this._imageMask}},Ji=class{constructor(t,e,i,s){this.event=t,this.originalPoint=e,this.point=i,this.bbox=s,this.simulated=!1,this.native=!0,bt("touchevents")&&t instanceof Touch?this.id=t.identifier:this.id=null}},We=class extends di{constructor(t){if(super(),this.view=document.createElement("div"),this._layerDom=document.createElement("div"),this.layers=[],this._dirtyLayers=[],this.defaultLayer=this.getLayer(0),this._ghostLayer=new Qi,this._deferredGhostLayers=[],this._patternCanvas=document.createElement("canvas"),this._patternContext=this._patternCanvas.getContext("2d"),this._realWidth=0,this._realHeight=0,this._calculatedWidth=0,this._calculatedHeight=0,this.interactionsEnabled=!0,this._listeners={},this._events={},this._colorId=0,this._colorMap={},this._forceInteractive=0,this._omitTainted=!1,this._hovering=new Set,this._dragging=[],this._mousedown=[],this.tapToActivate=!1,this.tapToActivateTimeout=3e3,this._touchActive=!1,t==null?this.resolution=window.devicePixelRatio:this.resolution=t,this.view.style.position="absolute",this.view.setAttribute("aria-hidden","true"),this.view.appendChild(this._layerDom),this._disposers.push(new yt(()=>{tt(this._events,(e,i)=>{i.disposer.dispose()}),C(this.layers,e=>{He(e.view),e.exportableView&&He(e.exportableView)}),He(this._ghostLayer.view),He(this._patternCanvas)})),this._disposers.push(Ue(()=>{t==null&&(this.resolution=window.devicePixelRatio)})),bt("touchevents")){let e=i=>{this._dragging.length!==0&&Ce(this._dragging,s=>s.value.shouldCancelTouch()?(i.preventDefault(),!1):!0),this._touchActiveTimeout&&this._delayTouchDeactivate()};this._disposers.push(N(window,"touchstart",e,{passive:!1})),this._disposers.push(N(this.view,"touchstart",e,{passive:!1})),this._disposers.push(N(this.view,"touchmove",()=>{this._touchActiveTimeout&&this._delayTouchDeactivate()},{passive:!0})),this._disposers.push(N(window,"click",i=>{this._touchActive=!1},{passive:!0})),this._disposers.push(N(this.view,"click",i=>{window.setTimeout(()=>{this._touchActive=!0,this._delayTouchDeactivate()},100)},{passive:!0}))}bt("wheelevents")&&this._disposers.push(N(this.view,"wheel",e=>{let i=!1;this._hovering.forEach(s=>{if(s.wheelable)return i=!0,!1}),i&&e.preventDefault()},{passive:!1}))}resetImageArray(){this._ghostLayer.imageArray=void 0}_delayTouchDeactivate(){this._touchActiveTimeout&&clearTimeout(this._touchActiveTimeout),this.tapToActivateTimeout>0&&(this._touchActiveTimeout=window.setTimeout(()=>{this._touchActive=!1},this.tapToActivateTimeout))}get debugGhostView(){return!!this._ghostLayer.view.parentNode}set debugGhostView(t){t?this._ghostLayer.view.parentNode||this.view.appendChild(this._ghostLayer.view):this._ghostLayer.view.parentNode&&this._ghostLayer.view.parentNode.removeChild(this._ghostLayer.view)}createLinearGradient(t,e,i,s){return this.defaultLayer.context.createLinearGradient(t,e,i,s)}createRadialGradient(t,e,i,s,r,a){return this.defaultLayer.context.createRadialGradient(t,e,i,s,r,a)}createPattern(t,e,i,s,r){return this._patternCanvas.width=s,this._patternCanvas.height=r,this._patternContext.clearRect(0,0,s,r),e.renderDetached(this._patternContext),t.renderDetached(this._patternContext),this._patternContext.createPattern(this._patternCanvas,i)}makeContainer(){return new $i(this)}makeGraphics(){return new ji(this)}makeText(t,e){return new ni(this,t,e)}makeTextStyle(){return new Zi}makeRadialText(t,e){return new qi(this,t,e)}makePicture(t){return new Ki(this,t)}resizeLayer(t){t.resize(this._calculatedWidth,this._calculatedHeight,this._calculatedWidth,this._calculatedHeight,this.resolution)}resizeGhost(){this._ghostLayer.resize(this._calculatedWidth,this._calculatedHeight,this._calculatedWidth,this._calculatedHeight,this.resolution)}resize(t,e,i,s){this._realWidth=t,this._realHeight=e,this._calculatedWidth=i,this._calculatedHeight=s,C(this.layers,r=>{r&&(r.dirty=!0,this.resizeLayer(r))}),this.resizeGhost(),this.view.style.width=i+"px",this.view.style.height=s+"px"}createDetachedLayer(t=!1){let e=document.createElement("canvas"),i=e.getContext("2d",{willReadFrequently:t}),s=new hi(e,i);return e.style.position="absolute",e.style.top="0px",e.style.left="0px",s}getLayerByOrder(t){let e=this.layers,i=e.length;for(let s=0;s<i;s++){let r=e[s];if(r.order==t)return r}}getLayer(t,e=!0){let i=this.getLayerByOrder(t);if(i)return i;let s=this.createDetachedLayer(t==99);s.order=t,s.visible=e,s.view.className="am5-layer-"+t,s.visible&&this.resizeLayer(s);let r=this.layers;r.push(s),r.sort((l,d)=>l.order>d.order?1:l.order<d.order?-1:0);let a=r.length,o=as(r,s),n;for(let l=o+1;l<a;l++)if(r[l].visible){n=r[l];break}return s.visible&&(n===void 0?this._layerDom.appendChild(s.view):this._layerDom.insertBefore(s.view,n.view)),s}render(t){this._dirtyLayers.length=0,this._deferredGhostLayers=[],C(this.layers,i=>{i&&i.dirty&&i.visible&&(this._dirtyLayers.push(i),i.clear())}),this._ghostLayer.clear(),t.render({inactive:null,layer:this.defaultLayer});let e=this._deferredGhostLayers;if(e.length&&(e.sort((i,s)=>i-s),C(e,i=>{t.render({inactive:null,layer:this.defaultLayer},i)})),this._ghostLayer.context.restore(),C(this._dirtyLayers,i=>{i.context.restore(),i.dirty=!1}),this._hovering.size&&this._lastPointerMoveEvent){let{events:i,target:s,native:r}=this._lastPointerMoveEvent;C(i,a=>{this._dispatchGlobalMousemove(a,s,r)})}}paintId(t){let e=js(++this._colorId),i=W.fromHex(e).toCSS();return this._colorMap[i]=t,i}_removeObject(t){t._colorId!==void 0&&delete this._colorMap[t._colorId]}_adjustBoundingBox(t){let e=this._ghostLayer.margin;return new DOMRect(-e.left,-e.top,t.width+e.left+e.right,t.height+e.top+e.bottom)}getEvent(t,e=!0){let i=this.view.getBoundingClientRect(),s=t.clientX||0,r=t.clientY||0,a=this._calculatedWidth/this._realWidth,o=this._calculatedHeight/this._realHeight,n={x:s-i.left,y:r-i.top},l={x:(s-(e?i.left:0))*a,y:(r-(e?i.top:0))*o};return new Ji(t,n,l,this._adjustBoundingBox(i))}_getHitTarget(t,e,i){if(e.width===0||e.height===0||t.x<e.left||t.x>e.right||t.y<e.top||t.y>e.bottom||!i||!this._layerDom.contains(i))return;let s=this._ghostLayer.getImageData(t,e);if(s.data[0]===0&&s.data[1]===0&&s.data[2]===0)return!1;let r=W.fromRGB(s.data[0],s.data[1],s.data[2]).toCSS();return this._colorMap[r]}getObjectAtPoint(t){let e=this._ghostLayer.getImageArray(t);if(e[0]===0&&e[1]===0&&e[2]===0)return;let i=W.fromRGB(e[0],e[1],e[2]).toCSS();return this._colorMap[i]}_withEvents(t,e){let i=this._events[t];if(i!==void 0){i.dispatching=!0;try{e(i)}finally{i.dispatching=!1,i.cleanup&&(i.cleanup=!1,jt(i.callbacks,s=>!s.disposed),i.callbacks.length===0&&(i.disposer.dispose(),delete this._events[t]))}}}_dispatchEventAll(t,e){this.interactionsEnabled&&this._withEvents(t,i=>{C(i.callbacks,s=>{s.disposed||s.callback.call(s.context,e)})})}_dispatchEvent(t,e,i){if(!this.interactionsEnabled)return!1;let s=!1;return this._withEvents(t,r=>{C(r.callbacks,a=>{!a.disposed&&a.object===e&&(a.callback.call(a.context,i),s=!0)})}),s}_dispatchMousedown(t,e){let i=t.button;if(i!=0&&i!=2&&i!=1&&i!==void 0)return;let s=this.getEvent(t),r=this._getHitTarget(s.originalPoint,s.bbox,e);if(r){let a=s.id,o=!1;oi(r,n=>{let l={id:a,value:n};return this._mousedown.push(l),!o&&this._dispatchEvent("pointerdown",n,s)&&(o=!0,this._dragging.some(f=>f.value===n&&f.id===a)||this._dragging.push(l)),!0})}this._dispatchEventAll("globalpointerdown",s)}_dispatchGlobalMousemove(t,e,i){let s=this.getEvent(t),r=this._getHitTarget(s.originalPoint,s.bbox,e);s.native=i,r?(this._hovering.forEach(a=>{a.contains(r)||(this._hovering.delete(a),a.cursorOverStyle&&Ee(document.body,"cursor",a._replacedCursorStyle),this._dispatchEvent("pointerout",a,s))}),s.native&&oi(r,a=>(this._hovering.has(a)||(this._hovering.add(a),a.cursorOverStyle&&(a._replacedCursorStyle=fs(document.body,"cursor"),Ee(document.body,"cursor",a.cursorOverStyle)),this._dispatchEvent("pointerover",a,s)),!0))):(this._hovering.forEach(a=>{a.cursorOverStyle&&Ee(document.body,"cursor",a._replacedCursorStyle),this._dispatchEvent("pointerout",a,s)}),this._hovering.clear()),this._dispatchEventAll("globalpointermove",s)}removeHovering(t){this._hovering.delete(t),t.cursorOverStyle&&Ee(document.body,"cursor",t._replacedCursorStyle)}_dispatchGlobalMouseup(t,e){let i=this.getEvent(t);i.native=e,this._dispatchEventAll("globalpointerup",i)}_dispatchDragMove(t){if(this._dragging.length!==0){let e=this.getEvent(t),i=e.id;this._dragging.forEach(s=>{s.id===i&&this._dispatchEvent("pointermove",s.value,e)})}}_dispatchDragEnd(t,e){let i=t.button,s;if(i==0||i===void 0)s="click";else if(i==2)s="rightclick";else if(i==1)s="middleclick";else return;let r=this.getEvent(t),a=r.id;if(this._mousedown.length!==0){let o=this._getHitTarget(r.originalPoint,r.bbox,e);o&&this._mousedown.forEach(n=>{n.id===a&&n.value.contains(o)&&this._dispatchEvent(s,n.value,r)}),this._mousedown.length=0}this._dragging.length!==0&&(this._dragging.forEach(o=>{o.id===a&&this._dispatchEvent("pointerup",o.value,r)}),this._dragging.length=0)}_dispatchDoubleClick(t,e){let i=this.getEvent(t),s=this._getHitTarget(i.originalPoint,i.bbox,e);s&&oi(s,r=>!this._dispatchEvent("dblclick",r,i))}_dispatchWheel(t,e){let i=this.getEvent(t),s=this._getHitTarget(i.originalPoint,i.bbox,e);s&&oi(s,r=>!this._dispatchEvent("wheel",r,i))}_makeSharedEvent(t,e){if(this._listeners[t]===void 0){let i=e();this._listeners[t]=new De(()=>{delete this._listeners[t],i.dispose()})}return this._listeners[t].increment()}_onPointerEvent(t,e){let i=!1,s=null;function r(){s=null,i=!1}return new xt([new yt(()=>{s!==null&&clearTimeout(s),r()}),N(this.view,Ze(t),a=>{i=!0,s!==null&&clearTimeout(s),s=window.setTimeout(r,0)}),Zs(window,t,(a,o)=>{s!==null&&(clearTimeout(s),s=null),e(a,o,i),i=!1})])}_initEvent(t){switch(t){case"globalpointermove":case"pointerover":case"pointerout":return this._makeSharedEvent("pointermove",()=>{let e=(i,s,r)=>{this._lastPointerMoveEvent={events:i,target:s,native:r},C(i,a=>{this._dispatchGlobalMousemove(a,s,r)})};return new xt([this._onPointerEvent("pointerdown",e),this._onPointerEvent("pointermove",e)])});case"globalpointerup":return this._makeSharedEvent("pointerup",()=>{let e=this._onPointerEvent("pointerup",(s,r,a)=>{C(s,o=>{this._dispatchGlobalMouseup(o,a)}),this._lastPointerMoveEvent={events:s,target:r,native:a}}),i=this._onPointerEvent("pointercancel",(s,r,a)=>{C(s,o=>{this._dispatchGlobalMouseup(o,a)}),this._lastPointerMoveEvent={events:s,target:r,native:a}});return new yt(()=>{e.dispose(),i.dispose()})});case"click":case"rightclick":case"middleclick":case"pointerdown":case"globalpointerdown":case"pointermove":case"pointerup":return this._makeSharedEvent("pointerdown",()=>{let e=this._onPointerEvent("pointerdown",(a,o)=>{C(a,n=>{this._dispatchMousedown(n,o)})}),i=this._onPointerEvent("pointermove",a=>{C(a,o=>{this._dispatchDragMove(o)})}),s=this._onPointerEvent("pointerup",(a,o)=>{C(a,n=>{this._dispatchDragEnd(n,o)})}),r=this._onPointerEvent("pointercancel",(a,o)=>{C(a,n=>{this._dispatchDragEnd(n,o)})});return new yt(()=>{e.dispose(),i.dispose(),s.dispose(),r.dispose()})});case"dblclick":return this._makeSharedEvent("dblclick",()=>this._onPointerEvent("dblclick",(e,i)=>{C(e,s=>{this._dispatchDoubleClick(s,i)})}));case"wheel":return this._makeSharedEvent("wheel",()=>N(this.view,Ze("wheel"),e=>{this._dispatchWheel(e,ui(e))},{passive:!1}))}}_addEvent(t,e,i,s){let r=this._events[e];r===void 0&&(r=this._events[e]={disposer:this._initEvent(e),callbacks:[],dispatching:!1,cleanup:!1});let a={object:t,context:s,callback:i,disposed:!1};return r.callbacks.push(a),new yt(()=>{a.disposed=!0,r.dispatching?r.cleanup=!0:(Te(r.callbacks,a),r.callbacks.length===0&&(r.disposer.dispose(),delete this._events[e]))})}getCanvas(t,e){this.render(t),e||(e={});let i=this.resolution,s=Math.floor(this._calculatedWidth*this.resolution),r=Math.floor(this._calculatedHeight*this.resolution);if(e.minWidth&&e.minWidth>s){let c=e.minWidth/s;c>i&&(i=c*this.resolution)}if(e.minHeight&&e.minHeight>r){let c=e.minHeight/r;c>i&&(i=c*this.resolution)}if(e.maxWidth&&e.maxWidth<s){let c=e.maxWidth/s;c<i&&(i=c*this.resolution)}if(e.maxHeight&&e.maxHeight>r){let c=e.maxHeight/r;c<i&&(i=c*this.resolution)}e.maintainPixelRatio&&(i/=this.resolution);let a=[],o=!1,n=document.createElement("canvas");i!=this.resolution&&(o=!0,s=s*i/this.resolution,r=r*i/this.resolution),n.width=s,n.height=r,n.style.position="fixed",n.style.top="-10000px",this.view.appendChild(n),a.push(n);let l=n.getContext("2d"),d=0,f=0,h=!1;return C(this.layers,c=>{if(c&&c.visible&&(c.tainted||o)){h=!0,c.exportableView=c.view,c.exportableContext=c.context,c.view=document.createElement("canvas"),c.view.style.position="fixed",c.view.style.top="-10000px",this.view.appendChild(c.view),a.push(c.view);let p=0,_=0;c.margin&&(p+=c.margin.left||0+c.margin.right||0,_+=c.margin.top||0+c.margin.bottom||0),c.view.width=s+p,c.view.height=r+_,c.context=c.view.getContext("2d"),c.dirty=!0,c.scale=i}}),h&&(this._omitTainted=!0,this.render(t),this._omitTainted=!1),C(this.layers,c=>{if(c&&c.visible){let p=0,_=0;c.margin&&(p=-(c.margin.left||0)*this.resolution,_=-(c.margin.top||0)*this.resolution),l.drawImage(c.view,p,_),c.exportableView&&(c.view=c.exportableView,c.exportableView=void 0),c.exportableContext&&(c.context=c.exportableContext,c.exportableContext=void 0),d<c.view.clientWidth&&(d=c.view.clientWidth),f<c.view.clientHeight&&(f=c.view.clientHeight),c.scale=void 0}}),n.style.width=d+"px",n.style.height=f+"px",C(a,c=>{c.style.position="",c.style.top="",this.view.removeChild(c)}),n}},Qi=class{constructor(){this.margin={left:0,right:0,top:0,bottom:0},this._resolution=1,this._width=0,this._height=0,this.view=document.createElement("canvas"),this.context=this.view.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.context.imageSmoothingEnabled=!1,this.view.style.position="absolute",this.view.style.top="0px",this.view.style.left="0px"}resize(t,e,i,s,r){this._resolution=r,t+=this.margin.left+this.margin.right,e+=this.margin.top+this.margin.bottom,i+=this.margin.left+this.margin.right,s+=this.margin.top+this.margin.bottom,this.view.style.left=-this.margin.left+"px",this.view.style.top=-this.margin.top+"px",this._width=Math.floor(t*r),this._height=Math.floor(e*r),this.view.width=this._width,this.view.style.width=i+"px",this.view.height=this._height,this.view.style.height=s+"px"}getImageData(t,e){return this.context.getImageData(Math.round((t.x-e.left)/e.width*this._width),Math.round((t.y-e.top)/e.height*this._height),1,1)}getImageArray(t){this.imageArray||(this.imageArray=this.context.getImageData(0,0,this._width,this._height).data);let e=this.imageArray,i=Math.round(t.x*this._resolution),r=(Math.round(t.y*this._resolution)*this._width+i)*4;return[e[r],e[r+1],e[r+2],e[r+3]]}setMargin(t){this.margin.left=0,this.margin.right=0,this.margin.top=0,this.margin.bottom=0,C(t,e=>{e.margin&&(this.margin.left=Math.max(this.margin.left,e.margin.left),this.margin.right=Math.max(this.margin.right,e.margin.right),this.margin.top=Math.max(this.margin.top,e.margin.top),this.margin.bottom=Math.max(this.margin.bottom,e.margin.bottom))})}clear(){this.context.save(),this.context.fillStyle="#000",this.context.fillRect(0,0,this._width,this._height)}},hi=class{constructor(t,e){this.tainted=!0,this.order=0,this.visible=!0,this.dirty=!0,this._width=0,this._height=0,this.view=t,this.context=e}resize(t,e,i,s,r){this.width!=null&&(t=this.width,i=this.width),this.height!=null&&(e=this.height,s=this.height),this.margin?(t+=this.margin.left+this.margin.right,e+=this.margin.top+this.margin.bottom,i+=this.margin.left+this.margin.right,s+=this.margin.top+this.margin.bottom,this.view.style.left=-this.margin.left+"px",this.view.style.top=-this.margin.top+"px"):(this.view.style.left="0px",this.view.style.top="0px"),this._width=Math.floor(t*r),this._height=Math.floor(e*r),this.view.width=this._width,this.view.style.width=i+"px",this.view.height=this._height,this.view.style.height=s+"px"}clear(){this.context.save(),this.context.clearRect(0,0,this._width,this._height)}};function Rs(g,t){g==null?requestAnimationFrame(t):setTimeout(()=>{requestAnimationFrame(t)},1e3/g)}var ts=class g{constructor(t,e={},i){if(this._computedSettings={},this._isDirty=!1,this._isDirtyParents=!1,this._isDirtyAnimation=!1,this._dirty={},this._dirtyParents={},this._dirtyBounds={},this._dirtyPositions={},this._ticker=null,this._tickers=[],this._updateTick=!0,this.skipRenderFrame=!1,this.events=new Cs,this.animationTime=null,this._animations=[],this.language=ai.new(this,{}),this.locale=ri,this.utc=!1,this.numberFormatter=Le.new(this,{}),this.dateFormatter=ze.new(this,{}),this.durationFormatter=Re.new(this,{}),this.tabindex=0,this._tabindexes=[],this._a11yD=!1,this._focusElementDirty=!1,this._skipNextGroupJump=!0,this.verticalLayout=vi.new(this,{}),this.horizontalLayout=bi.new(this,{}),this.gridLayout=wi.new(this,{}),this._paused=!1,this.autoResize=!0,this._fontHash=[],this._isDisposed=!1,this._disposers=[],this._tooltips=[],this._htmlEnabledContainers=[],this.entitiesById={},!i)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._settings=e,e.accessible==!1&&(this._a11yD=!0),e.useSafeResolution==null&&(e.useSafeResolution=!0,this._computedSettings.useSafeResolution=!0),e.sanitizeHTML==null&&(e.sanitizeHTML=!0,this._computedSettings.sanitizeHTML=!0);let s;e.useSafeResolution&&(s=fi()),this._renderer=new We(s);let r;if(t instanceof HTMLElement?r=t:r=document.getElementById(t),C(Ft.rootElements,n=>{if(n.dom===r)if(Ft.autoDispose)n.dispose();else throw new Error("You cannot have multiple Roots on the same DOM node")}),this.interfaceColors=Ht.new(this,{}),r===null)throw new Error("Could not find HTML element with id `"+t+"`");this.dom=r;let a=document.createElement("div");a.style.position="relative",a.style.width="100%",a.style.height="100%",r.appendChild(a);let o=e.tooltipContainerBounds;o&&(this._tooltipContainerSettings=o),this._inner=a,this._updateComputedStyles(),Ft.rootElements.push(this)}static new(t,e){let i=new g(t,e,!0);return i._init(),i}moveDOM(t){let e;if(t instanceof HTMLElement?e=t:e=document.getElementById(t),e){for(;this.dom.childNodes.length>0;)e.appendChild(this.dom.childNodes[0]);this.dom=e,this._initResizeSensor(),this.resize()}}_handleLogo(){if(this._logo){let t=this.dom.offsetWidth,e=this.dom.offsetHeight;t<=150||e<=60?this._logo.hide():this._logo.show()}}_showBranding(){if(!this._logo){let t=this.tooltipContainer.children.push(P.new(this,{interactive:!0,interactiveChildren:!1,position:"absolute",setStateOnChildren:!0,paddingTop:9,paddingRight:9,paddingBottom:9,paddingLeft:9,scale:.6,y:pt(100),centerY:F,tooltipY:10,tooltipText:"Created using amCharts 5",tooltipX:F,cursorOverStyle:"pointer",background:$t.new(this,{fill:ht(4671320),fillOpacity:0,tooltipY:5})}));t.set("tooltip",this.systemTooltip),t.events.on("click",()=>{window.open("https://www.amcharts.com/","_blank")}),t.states.create("hover",{});let e=t.children.push(z.new(this,{stroke:ht(13421772),strokeWidth:3,svgPath:"M5 25 L13 25h13.6c3.4 0 6 0 10.3-4.3s5.2-12 8.6-12c3.4 0 4.3 8.6 7.7 8.6M83.4 25H79.8c-3.4 0-6 0-10.3-4.3s-5.2-12-8.6-12-4.3 8.6-7.7 8.6",dx:-50,strokeOpacity:0}));e.states._createC("hover",{stroke:ht(3976191)});let i=t.children.push(z.new(this,{stroke:ht(8947848),strokeWidth:3,svgPath:"M83.4 25h-31C37 25 39.5 4.4 28.4 4.4S18.9 24.2 4.3 25H0",dx:50,strokeOpacity:0})),s=Ds(Ms),r=1500;t.setTimeout(()=>{i.animate({key:"strokeOpacity",to:1,duration:r,easing:s}),i.animate({key:"dx",to:0,duration:r,easing:s}),e.animate({key:"dx",to:0,duration:r,easing:s}),e.animate({key:"strokeOpacity",to:1,duration:r,easing:s})},3e3),i.states.create("hover",{stroke:ht(4671320)}),this._logo=t,this._handleLogo()}}_getRealSize(){return this.dom.getBoundingClientRect()}_getCalculatedSize(t){return this._settings.calculateSize?this._settings.calculateSize(t):{width:t.width,height:t.height}}_init(){let t=this._settings;t.accessible!==!1&&(t.focusable&&(this._inner.setAttribute("focusable","true"),this._inner.setAttribute("tabindex",this.tabindex+"")),t.ariaLabel&&this._inner.setAttribute("aria-label",t.ariaLabel),t.role&&this._inner.setAttribute("role",t.role));let e=this._renderer,i=this._getRealSize(),s=this._getCalculatedSize(i),r=Math.floor(s.width),a=Math.floor(s.height),o=Math.floor(i.width),n=Math.floor(i.height),l=P.new(this,{visible:!0,width:r,height:a});this._rootContainer=l,this._rootContainer._defaultThemes.push($s.new(this));let d=l.children.push(P.new(this,{width:F,height:F}));d._setC("visible",!0),this.container=d,e.resize(o,n,r,a),this._inner.appendChild(e.view),this._initResizeSensor();let f=document.createElement("div");if(this._htmlElementContainer=f,f.className="am5-html-container",f.style.position="absolute",f.style.pointerEvents="none",this._tooltipContainerSettings||(f.style.overflow="hidden"),this._inner.appendChild(f),this._a11yD!==!0){let h=document.createElement("div");h.className="am5-reader-container",h.setAttribute("role","alert"),h.style.position="absolute",h.style.width="1px",h.style.height="1px",h.style.overflow="hidden",h.style.clip="rect(1px, 1px, 1px, 1px)",this._readerAlertElement=h,this._inner.appendChild(this._readerAlertElement);let c=document.createElement("div");c.className="am5-focus-container",c.style.position="absolute",c.style.pointerEvents="none",c.style.top="0px",c.style.left="0px",c.style.overflow="hidden",c.style.width=r+"px",c.style.height=a+"px",c.setAttribute("role","graphics-document"),t.ariaLabel&&c.setAttribute("aria-label",t.ariaLabel),Rt(c,!1),this._focusElementContainer=c,this._inner.appendChild(this._focusElementContainer);let p=document.createElement("div");this._tooltipElementContainer=p,p.className="am5-tooltip-container",this._inner.appendChild(p),bt("keyboardevents")&&(this._disposers.push(N(window,"keydown",_=>{let u=Mt(_);u=="Shift"?this._isShift=!0:u=="Tab"&&(this._isShift=_.shiftKey)})),this._disposers.push(N(window,"keyup",_=>{Mt(_)=="Shift"&&(this._isShift=!1)})),this._disposers.push(N(c,"click",()=>{let _=this._focusedSprite;if(_){let u=_.get("clickAnnounceText","");u!==""&&this.readerAlert(u);let m=e.getEvent(new MouseEvent("click"));_.events.dispatch("click",{type:"click",originalEvent:m.event,point:m.point,simulated:!0,target:_})}})),this._disposers.push(N(c,"keydown",_=>{let u=this._focusedSprite;if(u){_.key=="Escape"&&(je(),this._focusedSprite=void 0);let m=0,b=0,x=Mt(_);switch(x){case"Enter":case" ":let y=u.get("clickAnnounceText","");if(y!==""&&this.readerAlert(y),x==" "&&u.get("role")!="checkbox")return;_.preventDefault();let v=e.getEvent(new MouseEvent("mouse"));u.events.dispatch("click",{type:"click",originalEvent:v.event,point:v.point,simulated:!0,target:u});return;case"ArrowLeft":m=-6;break;case"ArrowRight":m=6;break;case"ArrowUp":b=-6;break;case"ArrowDown":b=6;break;default:return}if(m!=0||b!=0){if(_.preventDefault(),!u.isDragging()){this._keyboardDragPoint={x:0,y:0};let w=e.getEvent(new MouseEvent("mousedown",{clientX:0,clientY:0}));w.point={x:0,y:0},u.events.isEnabled("pointerdown")&&u.events.dispatch("pointerdown",{type:"pointerdown",originalEvent:w.event,point:w.point,simulated:!0,target:u})}let y=this._keyboardDragPoint;y.x+=m,y.y+=b;let v=e.getEvent(new MouseEvent("mousemove",{clientX:y.x,clientY:y.y}),!1);u.events.isEnabled("globalpointermove")&&u.events.dispatch("globalpointermove",{type:"globalpointermove",originalEvent:v.event,point:v.point,simulated:!0,target:u})}}})),this._disposers.push(N(c,"keyup",_=>{if(this._focusedSprite){let u=this._focusedSprite,m=Mt(_);switch(m){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":if(u.isDragging()){let x=this._keyboardDragPoint,y=e.getEvent(new MouseEvent("mouseup",{clientX:x.x,clientY:x.y}));u.events.isEnabled("globalpointerup")&&u.events.dispatch("globalpointerup",{type:"globalpointerup",originalEvent:y.event,point:y.point,simulated:!0,target:u}),this._keyboardDragPoint=void 0;return}else if(u.get("focusableGroup")){let x=u.get("focusableGroup"),y=this._tabindexes.filter(k=>!!(k.get("focusableGroup")==x&&k.getPrivate("focusable")!==!1&&k.isVisibleDeep())),v=y.indexOf(u),w=y.length-1;v+=m=="ArrowRight"||m=="ArrowDown"?1:-1,v<0?v=w:v>w&&(v=0),us(y[v].getPrivate("focusElement").dom)}break;case"Tab":let b=u.get("focusableGroup");if(b&&this._isShift){this._skipNextGroupJump||(this._focusNext(u.getPrivate("focusElement").dom,-1,b),this._skipNextGroupJump=!0);return}break}}})))}this._startTicker(),this.setThemes([]),this._addTooltip(),this._hasLicense()||this._showBranding()}get systemTooltip(){if(!this._systemTooltip){let t=_t.new(this,{themeTags:["system"]});this._systemTooltip=t}return this._systemTooltip}_initResizeSensor(){this._resizeSensorDisposer&&this._resizeSensorDisposer.dispose(),this._resizeSensorDisposer=new si(this.dom,()=>{this.autoResize&&this.resize()}),this._disposers.push(this._resizeSensorDisposer)}resize(){let t=this._getRealSize(),e=this._getCalculatedSize(t),i=Math.floor(e.width),s=Math.floor(e.height);if(i>0&&s>0){let r=Math.floor(t.width),a=Math.floor(t.height),o=this._htmlElementContainer;if(o.style.width=i+"px",o.style.height=s+"px",this._a11yD!==!0){let l=this._focusElementContainer;l.style.width=i+"px",l.style.height=s+"px"}this._renderer.resize(r,a,i,s);let n=this._rootContainer;n.setPrivate("width",i),n.setPrivate("height",s),this._render(),this._handleLogo()}}_reapplySettings(){let t=this._settings,e=fi();if(this._renderer.resolution=t.useSafeResolution&&e!=null?e:window.devicePixelRatio,t.tooltipContainerBounds&&(this._tooltipContainerSettings=t.tooltipContainerBounds),this._htmlElementContainer&&(this._htmlElementContainer.style.overflow=t.tooltipContainerBounds?"":"hidden"),t.accessible===!1&&(this._a11yD=!0),!this._a11yD){let i=this._inner;t.focusable?(i.setAttribute("focusable","true"),i.setAttribute("tabindex",this.tabindex+"")):(i.removeAttribute("focusable"),i.removeAttribute("tabindex")),t.ariaLabel!=null?i.setAttribute("aria-label",t.ariaLabel):i.removeAttribute("aria-label"),t.role!=null?i.setAttribute("role",t.role):i.removeAttribute("role")}this._rootContainer&&(this._rootContainer.markDirty(),this._rootContainer.walkChildren(i=>{i.markDirty()})),this._render()}get settings(){return this._settings}_render(){if(this.skipRenderFrame){this.skipRenderFrame=!1;return}this._renderer.render(this._rootContainer._display),this._focusElementDirty&&(this._updateCurrentFocus(),this._focusElementDirty=!1)}_runTickers(t){C(this._tickers,e=>{e(t)})}_runAnimations(t){let e=0;return jt(this._animations,i=>{let s=i._runAnimation(t);return s===yi.Stopped?!1:(s===yi.Playing&&++e,!0)}),this._isDirtyAnimation=!1,e===0}_runDirties(){let t={};for(;this._isDirtyParents;)this._isDirtyParents=!1,Zt(this._dirtyParents).forEach(([a,o])=>{delete this._dirtyParents[a],o.isDisposed()||(t[o.uid]=o,o._prepareChildren())});Zt(t).forEach(([a,o])=>{o._updateChildren()});let e=[];Zt(this._dirty).forEach(([a,o])=>{o.isDisposed()?delete this._dirty[a]:(e.push(o),o._beforeChanged())}),e.forEach(a=>{a._changed(),delete this._dirty[a.uid],a._clearDirty()}),this._isDirty=!1;let i={},s=[];Zt(this._dirtyBounds).forEach(([a,o])=>{delete this._dirtyBounds[a],o.isDisposed()||(i[o.uid]=o.depth(),s.push(o))}),this._positionHTMLElements(),s.sort((a,o)=>Es(i[o.uid],i[a.uid])),s.forEach(a=>{a._updateBounds()});let r=this._dirtyPositions;Zt(r).forEach(([a,o])=>{delete r[a],o.isDisposed()||o._updatePosition()}),e.forEach(a=>{a._afterChanged()}),Zt(t).forEach(([a,o])=>{o._childrenPrep=!1,o._childrenUpdt=!1})}_renderFrame(t){if(this._updateTick){this.events.isEnabled("framestarted")&&this.events.dispatch("framestarted",{type:"framestarted",target:this,timestamp:t}),this._checkComputedStyles(),this._runTickers(t);let e=this._runAnimations(t);return this._runDirties(),this._render(),this._renderer.resetImageArray(),this._positionHTMLElements(),this.events.isEnabled("frameended")&&this.events.dispatch("frameended",{type:"frameended",target:this,timestamp:t}),this._tickers.length===0&&e&&!this._isDirtyAnimation&&!this._isDirty}else return!0}_runTicker(t,e){this.isDisposed()||(this.animationTime=t,this._renderFrame(t)?(this._ticker=null,this.animationTime=null):this._paused||(e?this._ticker:Rs(this.fps,this._ticker)))}_runTickerNow(t=1e4){if(!this.isDisposed()){let e=performance.now()+t;for(;;){let i=performance.now();if(i>=e){this.animationTime=null;break}if(this.animationTime=i,this._renderFrame(i)){this.animationTime=null;break}}}}_startTicker(){this._ticker===null&&(this.animationTime=null,this._ticker=t=>{this._runTicker(t)},Rs(this.fps,this._ticker))}get updateTick(){return this._updateTick}set updateTick(t){this._updateTick=t,t&&this._startTicker()}_addDirtyEntity(t){this._isDirty=!0,this._dirty[t.uid]===void 0&&(this._dirty[t.uid]=t),this._startTicker()}_addDirtyParent(t){this._isDirty=!0,this._isDirtyParents=!0,this._dirtyParents[t.uid]===void 0&&(this._dirtyParents[t.uid]=t),this._startTicker()}_addDirtyBounds(t){this._isDirty=!0,this._dirtyBounds[t.uid]===void 0&&(this._dirtyBounds[t.uid]=t),this._startTicker()}_addDirtyPosition(t){this._isDirty=!0,this._dirtyPositions[t.uid]===void 0&&(this._dirtyPositions[t.uid]=t),this._startTicker()}_addAnimation(t){this._isDirtyAnimation=!0,this._animations.indexOf(t)===-1&&this._animations.push(t),this._startTicker()}_markDirty(){this._isDirty=!0}_markDirtyRedraw(){this.events.once("frameended",()=>{this._isDirty=!0,this._startTicker()})}eachFrame(t){return this._tickers.push(t),this._startTicker(),new yt(()=>{Te(this._tickers,t)})}markDirtyGlobal(t){t||(t=this.container),t.walkChildren(e=>{e instanceof P&&this.markDirtyGlobal(e),e.markDirty(),e.markDirtyBounds()})}width(){return Math.floor(this._getCalculatedSize(this._getRealSize()).width)}height(){return Math.floor(this._getCalculatedSize(this._getRealSize()).height)}dispose(){this._isDisposed||(this._isDisposed=!0,this._rootContainer.dispose(),this._renderer.dispose(),this.horizontalLayout.dispose(),this.verticalLayout.dispose(),this.interfaceColors.dispose(),C(this._disposers,t=>{t.dispose()}),this._inner&&ds(this._inner),zt(Ft.rootElements,this))}isDisposed(){return this._isDisposed}readerAlert(t){if(this._a11yD!==!0){let e=this._readerAlertElement;t=pi(t),e.innerHTML==t&&(e.innerHTML=""),e.innerHTML=t}}setThemes(t){this._rootContainer.set("themes",t);let e=this.tooltipContainer;e&&e._applyThemes();let i=this.interfaceColors;i&&i._applyThemes()}_addTooltip(){if(!this.tooltipContainer){let t=this._tooltipContainerSettings,e=this._rootContainer.children.push(P.new(this,{position:"absolute",isMeasured:!1,width:F,height:F,layer:t?35:30,layerMargin:t||void 0}));this.tooltipContainer=e;let i=_t.new(this,{});this.container._setC("tooltip",i),i.hide(0),this._tooltip=i}}_registerTabindexOrder(t){this._a11yD!=!0&&(t.get("focusable")?Se(this._tabindexes,t):zt(this._tabindexes,t),this._invalidateTabindexes())}_unregisterTabindexOrder(t){this._a11yD!=!0&&(zt(this._tabindexes,t),this._invalidateTabindexes())}_invalidateTabindexes(){if(this._a11yD==!0)return;this._tabindexes.sort((e,i)=>{let s=e.get("tabindexOrder",0),r=i.get("tabindexOrder",0);return s==r?0:s>r?1:-1});let t=[];C(this._tabindexes,(e,i)=>{e.getPrivate("focusElement")?this._moveFocusElement(i,e):this._makeFocusElement(i,e);let s=e.get("focusableGroup");s&&e.getPrivate("focusable")!==!1&&(t.indexOf(s)!==-1?e.getPrivate("focusElement").dom.setAttribute("tabindex","-1"):t.push(s))})}_updateCurrentFocus(){this._a11yD!=!0&&this._focusedSprite&&(this._decorateFocusElement(this._focusedSprite),this._positionFocusElement(this._focusedSprite))}_decorateFocusElement(t,e){if(this._a11yD==!0||(e||(e=t.getPrivate("focusElement").dom),!e))return;let i=t.get("role");i?e.setAttribute("role",i):e.removeAttribute("role");let s=t.get("ariaLabel");if(s){let _=ki(t,s);e.setAttribute("aria-label",_)}else e.removeAttribute("aria-label");let r=t.get("ariaLive");r?e.setAttribute("aria-live",r):e.removeAttribute("aria-live");let a=t.get("ariaChecked");a!=null&&i&&["checkbox","option","radio","menuitemcheckbox","menuitemradio","treeitem"].indexOf(i)!==-1?e.setAttribute("aria-checked",a?"true":"false"):e.removeAttribute("aria-checked");let o=t.get("ariaCurrent");o!=null?e.setAttribute("aria-current",o):e.removeAttribute("aria-current");let n=t.get("ariaSelected");n!=null&&i&&["gridcell","option","row","tab","columnheader","rowheader","treeitem"].indexOf(i)!==-1?e.setAttribute("aria-selected",n?"true":"false"):e.removeAttribute("aria-selected"),t.get("ariaHidden")?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden");let l=t.get("ariaOrientation");l?e.setAttribute("aria-orientation",l):e.removeAttribute("aria-orientation");let d=t.get("ariaValueNow");d?e.setAttribute("aria-valuenow",d):e.removeAttribute("aria-valuenow");let f=t.get("ariaValueMin");f?e.setAttribute("aria-valuemin",f):e.removeAttribute("aria-valuemin");let h=t.get("ariaValueMax");h?e.setAttribute("aria-valuemax",h):e.removeAttribute("aria-valuemax");let c=t.get("ariaValueText");c?e.setAttribute("aria-valuetext",c):e.removeAttribute("aria-valuetext");let p=t.get("ariaControls");p?e.setAttribute("aria-controls",p):e.removeAttribute("aria-controls"),t.get("visible")&&t.get("opacity")!==0&&t.get("role")!="tooltip"&&!t.isHidden()&&t.getPrivate("focusable")!==!1&&(t.height()||t.width())?(e.getAttribute("tabindex")!="-1"&&e.setAttribute("tabindex",""+this.tabindex),e.removeAttribute("aria-hidden")):(e.removeAttribute("tabindex"),e.setAttribute("aria-hidden","true"))}_makeFocusElement(t,e){if(e.getPrivate("focusElement")||this._a11yD==!0)return;let i=document.createElement("div");e.get("role")!="tooltip"&&(i.tabIndex=this.tabindex),i.style.position="absolute",Rt(i,!1);let s=[];e.setPrivate("focusElement",{dom:i,disposers:s}),this._decorateFocusElement(e),s.push(N(i,"focus",r=>{this._handleFocus(r)})),s.push(N(i,"blur",r=>{this._handleBlur(r)})),this._moveFocusElement(t,e)}_removeFocusElement(t){if(this._a11yD==!0)return;zt(this._tabindexes,t);let e=t.getPrivate("focusElement");e&&(this._focusElementContainer.removeChild(e.dom),C(e.disposers,s=>{s.dispose()}),t.removePrivate("focusElement"))}_hideFocusElement(t){if(this._a11yD==!0)return;let e=t.getPrivate("focusElement");e.dom.style.display="none"}_moveFocusElement(t,e){if(this._a11yD==!0)return;let i=this._focusElementContainer,s=e.getPrivate("focusElement").dom;if(s===this._focusElementContainer.children[t])return;let r=this._focusElementContainer.children[t+1];r?i.insertBefore(s,r):i.append(s)}_positionFocusElement(t){if(this._a11yD==!0||t==null)return;this._focusElementContainer.scrollTop=0;let e=t.globalBounds(),i=e.right==e.left?t.width():e.right-e.left,s=e.top==e.bottom?t.height():e.bottom-e.top,r=this._settings.focusPadding!==void 0?this._settings.focusPadding:2,a=e.left-r,o=e.top-r;i<0&&(a+=i,i=Math.abs(i)),s<0&&(o+=s,s=Math.abs(s));let n=t.getPrivate("focusElement").dom;n.style.top=o+"px",n.style.left=a+"px",n.style.width=i+r*2+"px",n.style.height=s+r*2+"px"}_getSpriteByFocusElement(t){let e;return Ce(this._tabindexes,(i,s)=>i.getPrivate("focusElement").dom===t?(e=i,!1):!0),e}_handleFocus(t){if(this._a11yD==!0)return;let e=this._getSpriteByFocusElement(t.target);if(e){if(!e.isVisibleDeep()){this._focusNext(t.target,this._isShift?-1:1);return}this._positionFocusElement(e),this._focusedSprite=e,e.events.isEnabled("focus")&&e.events.dispatch("focus",{type:"focus",originalEvent:t,target:e}),e.getPrivate("focusElement").dom.tabIndex==-1&&(this._skipNextGroupJump=!1)}}_focusNext(t,e,i){if(this._a11yD==!0)return;let s=this.dom.getRootNode?this.dom.getRootNode():null,r=this.dom.ownerDocument||document;s&&(typeof ShadowRoot<"u"&&s instanceof ShadowRoot||s instanceof Document)&&(r=s);let a=Array.from(r.querySelectorAll(["a[href]","area[href]","button:not([disabled])","details","input:not([disabled])","iframe:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[contentEditable=""]','[contentEditable="true"]','[contentEditable="TRUE"]','[tabindex]:not([tabindex^="-"])'].join(","))),o=a.indexOf(t)+e;o<0?o=a.length-1:o>=a.length&&(o=0);let n=a[o];if(i&&e==-1){let l=this._getSpriteByFocusElement(n);if(l&&l.get("focusableGroup")==i){this._focusNext(n,e);return}}n&&n.focus()}_handleBlur(t){if(this._a11yD==!0)return;let e=this._focusedSprite;e&&!e.isDisposed()&&e.events.isEnabled("blur")&&e.events.dispatch("blur",{type:"blur",originalEvent:t,target:e}),this._focusedSprite=void 0}updateTooltip(t){if(this._a11yD==!0)return;let e=_s(pi(t._getText())),i=t.getPrivate("tooltipElement");t.get("role")=="tooltip"&&e!=""?(i||(i=this._makeTooltipElement(t)),i.innerHTML!=e&&(i.innerHTML=e),i.setAttribute("aria-hidden",t.isVisibleDeep()?"false":"true")):i&&(i.remove(),t.removePrivate("tooltipElement"))}_makeTooltipElement(t){let e=this._tooltipElementContainer,i=document.createElement("div");return i.style.position="absolute",i.style.width="1px",i.style.height="1px",i.style.overflow="hidden",i.style.clip="rect(1px, 1px, 1px, 1px)",Rt(i,!1),this._decorateFocusElement(t,i),e.append(i),t.setPrivate("tooltipElement",i),i}_removeTooltipElement(t){if(this._a11yD==!0)return;let e=t.getPrivate("tooltipElement");if(e){let i=e.parentElement;i&&i.removeChild(e)}}_invalidateAccessibility(t){if(this._a11yD==!0)return;this._focusElementDirty=!0;let e=t.getPrivate("focusElement");t.get("focusable")?e&&(this._decorateFocusElement(t),this._focusedSprite===t&&this._positionFocusElement(t)):e&&this._removeFocusElement(t)}focused(t){return this._focusedSprite===t}documentPointToRoot(t){let e=this._getRealSize(),i=this._getCalculatedSize(e),s=i.width/e.width,r=i.height/e.height;return{x:(t.x-e.left)*s,y:(t.y-e.top)*r}}rootPointToDocument(t){let e=this._getRealSize(),i=this._getCalculatedSize(e),s=i.width/e.width,r=i.height/e.height;return{x:t.x/s+e.left,y:t.y/r+e.top}}addDisposer(t){return this._disposers.push(t),t}_updateComputedStyles(){let t=window.getComputedStyle(this.dom),e=this._fontHash,i=Me(t).flatMap(s=>{var r;return typeof s=="string"&&s.startsWith("font")?[(r=t[s])===null||r===void 0?void 0:r.toString()]:[]});if(e.length!==i.length)return this._fontHash=i,!0;for(let s=0;s<e.length;s++)if(e[s]!==i[s])return this._fontHash=i,!0;return!1}_checkComputedStyles(){this._updateComputedStyles()&&this._invalidateLabelBounds(this.container)}_invalidateLabelBounds(t){t instanceof P?t.children.each(e=>{this._invalidateLabelBounds(e)}):t instanceof Ci&&t.markDirtyBounds()}_hasLicense(){for(let t=0;t<Ft.licenses.length;t++)if(Ft.licenses[t].match(/^AM5C.{5,}/i))return!0;return!1}_licenseApplied(){this._logo&&this._logo.set("forceHidden",!0)}get debugGhostView(){return this._renderer.debugGhostView}set debugGhostView(t){this._renderer.debugGhostView=t}set tapToActivate(t){this._renderer.tapToActivate=t}get tapToActivate(){return this._renderer.tapToActivate}set tapToActivateTimeout(t){this._renderer.tapToActivateTimeout=t}get tapToActivateTimeout(){return this._renderer.tapToActivateTimeout}_makeHTMLElement(t){let e=this._htmlElementContainer,i=document.createElement("div");t.setPrivate("htmlElement",i);let s=!1,r;t._walkParents(o=>{if(o.get("verticalScrollbar"))return s=!0,r=o,!1});let a;return s&&(a=document.createElement("div"),t.setPrivate("htmlElementWrapper",a),t.setPrivate("wrapperContainer",r),a.style.position="absolute",a.style.overflow="hidden",a.style.boxSizing="border-box",a.style.top="0px",a.style.left="0px",a.style.width="100%",a.style.height="100%",r.events.on("boundschanged",()=>{this._positionHTMLElement(t)})),i.style.position="absolute",i.style.overflow="auto",i.style.boxSizing="border-box",Rt(i,t.get("interactive",!1)),t.events.isEnabled("click")&&(Rt(i,!0),this._disposers.push(N(i,"click",o=>{let n=this._renderer.getEvent(o);t.events.dispatch("click",{type:"click",originalEvent:n.event,point:n.point,simulated:!1,target:t})}))),this._positionHTMLElement(t),s?(a.append(i),e.append(a)):e.append(i),Se(this._htmlEnabledContainers,t),i}_positionHTMLElements(){C(this._htmlEnabledContainers,t=>{this._positionHTMLElement(t)})}_positionHTMLElement(t){let e=t.getPrivate("htmlElementWrapper");if(e){let s=t.getPrivate("wrapperContainer");if(s){let r=s.globalBounds();e.style.clipPath="rect("+r.top+"px "+r.right+"px "+r.bottom+"px "+r.left+"px)"}}let i=t.getPrivate("htmlElement");if(i){C(["paddingTop","paddingRight","paddingBottom","paddingLeft","minWidth","minHeight","maxWidth","maxHeight"],x=>{let y=t.get(x);y?i.style[x]=y+"px":i.style[x]=""}),C(["fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration"],x=>{let y=t.get(x);y?x=="fontSize"&&!Tt(y)?i.style[x]=y+"px":i.style[x]=y+"":i.style[x]=""});let a=t.compositeScale()||1,o=t.compositeRotation()||0;i.style.transform="",i.style.transformOrigin="";let n=t.compositeOpacity();setTimeout(()=>{i.style.opacity=n+""},10);let l=t.isVisibleDeep();l&&(i.style.display="block");let d={x:t.x()+t.get("dx",0),y:t.y()+t.get("dy",0)};t.parent&&(d=t.parent.toGlobal(d)),i.style.top=d.y+"px",i.style.left=d.x+"px";let f=t.get("width"),h=t.get("height"),c=0,p=0;if(f&&(c=t.width()),h&&(p=t.height()),!f||!h){i.style.position="fixed",i.style.width="",i.style.height="";let x=i.getBoundingClientRect();i.style.position="absolute",f||(c=x.width),h||(p=x.height);let y=c/a,v=p/a,w=t.get("centerX",0),k=t.get("centerY",0),M=0,D=0,S=0,T=0;w instanceof nt?(M=-w.value*y,D=(1-w.value)*y):(M=-w,D=y-w),k instanceof nt?(S=-k.value*v,T=(1-k.value)*v):(S=-k,T=v-k),t._localBounds={left:M,right:D,top:S,bottom:T};let E=t._adjustedLocalBounds,$=t._display.getAdjustedBounds(t._localBounds);t._adjustedLocalBounds=$,(E.left!==$.left||E.right!==$.right||E.top!==$.top||E.bottom!==$.bottom)&&t.markDirtyBounds()}c>0&&(i.style.minWidth=c+"px"),p>0&&(i.style.minHeight=p+"px"),(!l||n==0)&&(i.style.display="none");let _=t.get("centerX",0),u=ci(_)?_.percent+"%":_+"px",m=t.get("centerY",0),b=ci(m)?m.percent+"%":m+"px";(_||m)&&(i.style.transform="translate(-"+u+", -"+b+")"+i.style.transform),a!=1&&(i.style.transform+="scale("+a+")"),o!=0&&(i.style.transform+=" rotate("+o+"deg)"),i.style.transform!=""&&(i.style.transformOrigin=u+" "+b)}}_sanitizeHTML(t){return this._settings.sanitizeHTML?ys(t):t}_setHTMLContent(t,e){let i=t.getPrivate("htmlElement");i||(i=this._makeHTMLElement(t),this.autoResize||this.resize());let s=this._sanitizeHTML(e);i.innerHTML!=s&&(i.innerHTML=s)}_removeHTMLContent(t){let e=t.getPrivate("htmlElementWrapper"),i=t.getPrivate("htmlElement");e?(this._htmlElementContainer.removeChild(e),t.removePrivate("htmlElement"),t.removePrivate("htmlElementWrapper"),t.removePrivate("wrapperContainer")):i&&(this._htmlElementContainer.removeChild(i),t.removePrivate("htmlElement"),t.removePrivate("wrapperContainer")),zt(this._htmlEnabledContainers,t)}};var li;function Ks(g,t,e){let i=t.interfaceColors,s=i.get("secondaryButton").toCSS(),r=i.get("text").toCSS(),a=i.get("alternativeBackground").toCSS(.45);if(!li){let o=new xt([new Q(g,".am5-modal",{width:"100%",height:"100%",position:"absolute","z-index":"100000",top:"0",left:"0"},t.nonce),new Q(g,".am5-modal-curtain",{top:"0",left:"0",width:"100%",height:"100%",position:"absolute",background:i.get("background").toCSS(.5),"z-index":"100"},t.nonce),new Q(g,".am5-modal-wrapper",{top:"0",left:"0",width:"100%",height:"100%",position:"absolute","text-align":"center","white-space":"nowrap",background:i.get("background").toCSS(.5),"z-index":"101"},t.nonce),new Q(g,".am5-modal-wrapper:before",{content:"''",display:"inline-block",height:"100%","vertical-align":"middle","margin-right":"-0.25em"},t.nonce),new Q(g,".am5-modal-content",{display:"inline-block",padding:"1.2em","vertical-align":"middle","text-align":"start","white-space":"normal",background:i.get("background").toCSS(),"border-radius":"4px","-webkit-box-shadow":"0px 0px 36px 0px "+a,"box-shadow":"0px 0px 36px 0px "+a,color:r},t.nonce),new Q(g,".am5-modal-content h1",{"font-size":"1em",margin:"0 0 0.5em 0"},t.nonce),new Q(g,".am5-modal-table",{display:"table",margin:"1em 0"},t.nonce),new Q(g,".am5-modal-table-row",{display:"table-row"},t.nonce),new Q(g,".am5-modal-table-heading",{display:"table-heading",padding:"3px 10px 3px 0"},t.nonce),new Q(g,".am5-modal-table-cell",{display:"table-cell",padding:"3px 0 3px 0"},t.nonce),new Q(g,".am5-modal-table-cell > *",{"vertical-align":"middle"},t.nonce),new Q(g,".am5-modal-content input[type=text], .am5-modal-content input[type=number], .am5-modal-content select",{border:"1px solid "+s,"border-radius":"4px",padding:"3px 5px",margin:"2px"},t.nonce),new Q(g,".am5-modal-input-narrow",{width:"70px"},t.nonce),new Q(g,".am5-modal-button",{"font-weight":"400",color:i.get("secondaryButtonText").toCSS(),"line-height":"1.5","text-align":"center","text-decoration":"none","vertical-align":"middle",cursor:"pointer",padding:"0.2em 0.8em","font-size":"1em","border-radius":"0.25em",margin:"0 0.25em 0 0",border:"1px solid "+i.get("secondaryButtonStroke").toCSS(),background:i.get("secondaryButton").toCSS()},t.nonce),new Q(g,".am5-modal-button:hover",{background:i.get("secondaryButtonHover").toCSS()},t.nonce),new Q(g,".am5-modal-button.am5-modal-primary",{color:i.get("primaryButtonText").toCSS(),border:"1px solid "+i.get("primaryButtonStroke").toCSS(),background:i.get("primaryButton").toCSS()},t.nonce),new Q(g,".am5-modal-button.am5-modal-primary:hover",{background:i.get("primaryButtonHover").toCSS()},t.nonce)]);li=new De(()=>{li=void 0,o.dispose()})}return li.increment()}var te=class extends Y{_afterNew(){super._afterNewApplyThemes(),this._setRawDefault("deactivateRoot",!0),Ks(ms(this._root.dom),this._root);let t=document.createElement("div");t.className="am5-modal",t.style.display="none",this.root._inner.appendChild(t),this.setPrivate("container",t);let e=document.createElement("div");e.className="am5-modal-curtain",t.appendChild(e),this.setPrivate("curtain",e),this._disposers.push(N(e,"click",()=>{this.cancel()}));let i=document.createElement("div");i.className="am5-modal-wrapper",t.appendChild(i),this.setPrivate("wrapper",i);let s=document.createElement("div");s.className="am5-modal-content",i.appendChild(s),this.setPrivate("content",s);let r=this.get("content");r&&(s.innerHTML=this._root._sanitizeHTML(r)),bt("keyboardevents")&&this._disposers.push(N(document,"keydown",a=>{this.isOpen()&&Mt(a)=="Escape"&&this.cancel()}))}_beforeChanged(){super._beforeChanged(),this.isDirty("content")&&(this.getPrivate("content").innerHTML=this._root._sanitizeHTML(this.get("content","")))}isOpen(){return this.getPrivate("container").style.display!="none"}open(){this.getPrivate("container").style.display="block",this.get("deactivateRoot")&&this.setTimeout(()=>{this._root._renderer.interactionsEnabled=!1},10),this.events.dispatch("opened",{type:"opened",target:this})}close(){this.getPrivate("container").style.display="none",this.get("deactivateRoot")&&(this._root._renderer.interactionsEnabled=!0),this.events.dispatch("closed",{type:"closed",target:this})}cancel(){this.getPrivate("container").style.display="none",this.get("deactivateRoot")&&(this._root._renderer.interactionsEnabled=!0),this.events.dispatch("cancelled",{type:"cancelled",target:this})}_dispose(){super._dispose();let t=this.getPrivate("container");t.parentElement&&t.parentElement.removeChild(t)}};te.className="Modal";te.classNames=Y.classNames.concat([te.className]);var ee=class extends Y{_afterNew(){super._afterNewApplyThemes()}_beforeChanged(){if(super._beforeChanged(),this.isDirty("sprite")){let t=this.get("sprite");t&&(t.setAll({position:"absolute",role:"figure"}),this._disposers.push(t))}(this.isDirty("locationX")||this.isDirty("locationY"))&&this.series&&this.series._positionBullet(this)}};ee.className="Bullet";ee.classNames=Y.classNames.concat([ee.className]);var ie=class extends Ot{_afterNew(){super._afterNew(),this.addTag("confirm"),bt("keyboardevents")&&this._disposers.push(N(document,"keydown",t=>{let e=Mt(t);this.get("active")&&e=="Escape"&&this._cancel()})),this._disposers.push(N(document,"click",()=>{this._ignoreClick||this._cancel(),this._ignoreClick=!1})),this.events.on("click",()=>{this.get("active")||(this._ignoreClick=!0),this._confirm()})}_cancel(){this.get("active")&&(this.events.dispatch("cancelled",{type:"cancelled",target:this}),this.set("active",!1))}_confirm(){this.get("active")&&(this.events.dispatch("confirmed",{type:"confirmed",target:this}),this.set("active",!1),this.isFocus()&&this.setTimeout(()=>{this.set("active",!1),je()},10))}_prepareChildren(){super._prepareChildren()}};ie.className="ConfirmButton";ie.classNames=Ot.classNames.concat([ie.className]);var Yt=class extends z{_afterNew(){super._afterNew(),this._display.isMeasured=!0,this.setPrivateRaw("trustBounds",!0)}_beforeChanged(){super._beforeChanged(),this.isDirty("radius")&&(this._clear=!0)}_changed(){super._changed(),this._clear&&this._display.drawCircle(0,0,Math.abs(this.get("radius",10)))}};Yt.className="Circle";Yt.classNames=z.classNames.concat([Yt.className]);var se=class extends z{_beforeChanged(){if(super._beforeChanged(),this.isDirty("coordinates")){let t=[],e=this.get("coordinates");e&&C(e,i=>{t.push({x:i[0],y:i[1]})}),this.set("points",t)}if(this.isPrivateDirty("points")&&(this._clear=!0),this.isDirty("points")){this._clear=!0;let t=this.get("points"),e=this._prevSettings.points;if(e){if(t){let o=Ut(t),n=Ut(e),l=o.length,d=n.length;if(l>d){let f=Ut(o);for(let h=0;h<l;h++){let c=Math.floor(h/l*d);f[h]={x:n[c].x,y:n[c].y}}n=f}else if(d>l){let f=Ut(n);for(let h=0;h<d;h++){let c=Math.floor(h/d*l);f[h]={x:o[c].x,y:o[c].y}}o=f}this.setPrivateRaw("previousPoints",n),this.setPrivateRaw("points",o),this.morphAnimation=this.animatePrivate({key:"morphProgress",from:0,to:1,duration:this.get("animationDuration",0),easing:this.get("animationEasing")}),this._root.events.once("frameended",()=>{this._markDirtyPrivateKey("morphProgress")})}}else this.setPrivateRaw("previousPoints",t),this.setPrivateRaw("points",t);let i=1/0,s=-1/0,r=1/0,a=-1/0;if(t)for(let o=1,n=t.length;o<n;o++){let l=t[o];i=Math.min(i,l.x),s=Math.max(s,l.x),r=Math.min(r,l.y),a=Math.max(a,l.y)}this.setPrivate("minX",i),this.setPrivate("maxX",s),this.setPrivate("minY",r),this.setPrivate("maxY",r)}this.isPrivateDirty("morphProgress")&&(this._clear=!0)}_changed(){super._changed(),this._clear&&this._draw()}_draw(){let t=this.getPrivate("previousPoints"),e=this.getPrivate("points"),i=this.getPrivate("morphProgress",1);if(e&&t){let s=e[0],r=t[0];s&&this._display.moveTo(r.x+(s.x-r.x)*i,r.y+(s.y-r.y)*i);for(let a=1,o=e.length;a<o;a++){let n=e[a],l=t[a];this._display.lineTo(l.x+(n.x-l.x)*i,l.y+(n.y-l.y)*i)}this._display.closePath()}}_updateSize(){this.markDirty(),this._clear=!0}};se.className="Polygon";se.classNames=z.classNames.concat([se.className]);var re=class extends z{_beforeChanged(){super._beforeChanged(),(this.isDirty("radiusX")||this.isDirty("radiusY")||this.isDirty("rotation"))&&(this._clear=!0)}_changed(){super._changed(),this._clear&&this._display.drawEllipse(0,0,Math.abs(this.get("radiusX")),Math.abs(this.get("radiusY")))}};re.className="Ellipse";re.classNames=z.classNames.concat([re.className]);var ae=class extends z{_beforeChanged(){super._beforeChanged(),(this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("spikes"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let t=this._display,e=this.get("radius",0),i=vt(this.get("innerRadius",0),e),s=this.get("spikes",0),r=Math.PI/s,a=Math.PI/2*3;t.moveTo(0,-e);for(let o=0;o<s;o++)t.lineTo(Math.cos(a)*e,Math.sin(a)*e),a+=r,t.lineTo(Math.cos(a)*i,Math.sin(a)*i),a+=r;t.lineTo(0,-e),t.closePath()}}};ae.className="Star";ae.classNames=z.classNames.concat([ae.className]);var kt=class extends P{constructor(){super(...arguments),this._movePoints={},this._downScale=1,this._downX=0,this._downY=0,this.contents=this.children.push(P.new(this._root,{width:F,height:F,x:0,y:0,draggable:!0,background:$t.new(this._root,{fill:ht(16777215),fillOpacity:0})}))}_afterNew(){super._afterNew();let t=this.contents.events;this._disposers.push(t.on("pointerdown",s=>{this._handleThisDown(s)})),this._disposers.push(t.on("globalpointerup",s=>{this._handleThisUp(s)})),this._disposers.push(t.on("globalpointermove",s=>{this._handleThisMove(s)}));let e=this.contents.get("background");e&&(e.adapters.add("width",s=>Number(s)*20),e.adapters.add("height",s=>Number(s)*20),e.adapters.add("x",s=>Number(s)-e.width()/2),e.adapters.add("y",s=>Number(s)-e.height()/2));let i=this.contents;i.adapters.add("x",s=>{let r=i.get("scale",1);if(L(s)&&r>=1){let a=this.get("maxPanOut",.4),o=i.width();s=Math.min(o*a,s),s=Math.max(this.width()-o*r*(1+a),s)}return s}),i.adapters.add("y",s=>{let r=i.get("scale",1);if(L(s)&&r>=1){let a=this.get("maxPanOut",.4),o=i.height();s=Math.min(o*a,s),s=Math.max(this.height()-o*r*(1+a),s)}return s})}_prepareChildren(){super._prepareChildren(),this.isDirty("wheelable")&&this._handleSetWheel(),this.contents._display.cancelTouch=this.get("pinchZoom",!1)}_handleSetWheel(){this.get("wheelable")?(this._wheelDp&&this._wheelDp.dispose(),this._wheelDp=this.events.on("wheel",t=>{let e=t.originalEvent;if(ps(e,this))e.preventDefault();else return;let i=this.toLocal(t.point);this._handleWheelZoom(e.deltaY,i)}),this._disposers.push(this._wheelDp)):this._wheelDp&&this._wheelDp.dispose()}_handleWheelZoom(t,e){let i=this.get("zoomStep",2),s=this.contents.get("scale",1),r=s;t>0?r=s/i:t<0&&(r=s*i),r!=s&&this.zoomToPoint(e,r)}zoomToPoint(t,e){e&&(e=ot(e,this.get("minZoomLevel",1),this.get("maxZoomLevel",32)));let i=this.contents.get("scale",1),s=t.x,r=t.y,a=s,o=r,n=this.contents,l=n.x(),d=n.y(),f=a-(s-l)/i*e,h=o-(r-d)/i*e;return this._animateTo(f,h,e),this._za}zoomIn(){return this.zoomToPoint({x:this.width()/2,y:this.height()/2},this.contents.get("scale",1)*this.get("zoomStep",2))}zoomOut(){return this.zoomToPoint({x:this.width()/2,y:this.height()/2},this.contents.get("scale",1)/this.get("zoomStep",2))}goHome(){return this._animateTo(0,0,1)}_animateTo(t,e,i){let s=this.get("animationDuration",0),r=this.get("animationEasing"),a=this.contents;this._txa=a.animate({key:"x",to:t,duration:s,easing:r}),this._tya=a.animate({key:"y",to:e,duration:s,easing:r}),this._za=a.animate({key:"scale",to:i,duration:s,easing:r})}_handleThisUp(t){this._downPoints={}}_handleThisDown(t){let e=this.contents;this._downScale=e.get("scale",1);let i=e._downPoints,s=Me(i).length;if(s==1){let r=i[1];r||(r=i[0]),r&&r.x==t.point.x&&r.y==t.point.y&&(s=0)}if(s>0){this._downX=e.x(),this._downY=e.y();let r=e._getDownPointId();if(r){let a=this._movePoints[r];a&&(e._downPoints[r]=a)}}}_handleThisMove(t){let i=t.originalEvent.pointerId;if(this.get("pinchZoom")&&i&&(this._movePoints[i]=t.point,Me(this.contents._downPoints).length>1)){this._handlePinch();return}}_handlePinch(){let t=0,e=[],i=[];if(tt(this.contents._downPoints,(s,r)=>{e[t]=r;let a=this._movePoints[s];a&&(i[t]=a),t++}),e.length>1&&i.length>1){this.contents._isDragging=!1;let s=e[0],r=e[1],a=i[0],o=i[1];if(s&&r&&a&&o){s=this.toLocal(s),r=this.toLocal(r),a=this.toLocal(a),o=this.toLocal(o);let n=Math.hypot(r.x-s.x,r.y-s.y),d=Math.hypot(o.x-a.x,o.y-a.y)/n*this._downScale,f={x:a.x+(o.x-a.x)/2,y:a.y+(o.y-a.y)/2},h={x:s.x+(r.x-s.x)/2,y:s.y+(r.y-s.y)/2},c=this._downX||0,p=this._downY||0,_=this._downScale,u=f.x-(-c+h.x)/_*d,m=f.y-(-p+h.y)/_*d;this.contents.setAll({x:u,y:m,scale:d})}}}};kt.className="ZoomableContainer";kt.classNames=P.classNames.concat([kt.className]);var ut=class extends Y{_afterNew(){super._afterNewApplyThemes()}getFill(t){return{addColorStop:(e,i)=>{}}}_changed(){super._changed()}getBounds(t){let e=this.get("target");if(e){let i=e.globalBounds(),s=t.toLocal({x:i.left,y:i.top}),r=t.toLocal({x:i.right,y:i.top}),a=t.toLocal({x:i.right,y:i.bottom}),o=t.toLocal({x:i.left,y:i.bottom});return{left:Math.min(s.x,r.x,a.x,o.x),top:Math.min(s.y,r.y,a.y,o.y),right:Math.max(s.x,r.x,a.x,o.x),bottom:Math.max(s.y,r.y,a.y,o.y)}}return t._display.getLocalBounds()}};ut.className="Gradient";ut.classNames=Y.classNames.concat([ut.className]);var Wt=class extends ut{getFill(t){let e=this.get("rotation",0),i=this.getBounds(t),s=i.left||0,r=i.right||0,a=i.top||0,o=i.bottom||0,n=J(e),l=K(e),d=n*(r-s),f=l*(o-a);d==0&&(d=1),f==0&&(f=1);let h=Math.max(d,f),c=this._root._renderer.createLinearGradient(s,a,s+h*n,a+h*l),p=this.get("stops");if(p){let _=0;C(p,u=>{let m=u.offset;L(m)||(m=_/(p.length-1));let b=u.opacity;L(b)||(b=1);let x=u.color;if(x){let y=u.lighten;y&&(x=W.lighten(x,y));let v=u.brighten;v&&(x=W.brighten(x,v)),c.addColorStop(m,"rgba("+x.r+","+x.g+","+x.b+","+b+")")}_++})}return c}};Wt.className="LinearGradient";Wt.classNames=ut.classNames.concat([Wt.className]);var oe=class extends P{constructor(){super(...arguments),this.labelContainer=this.children.push(P.new(this._root,{})),this.markerContainer=this.children.push(P.new(this._root,{})),this.startLabel=this.labelContainer.children.push(mt.new(this._root,{themeTags:["start"]})),this.endLabel=this.labelContainer.children.push(mt.new(this._root,{themeTags:["end"]})),this.markers=this.addDisposer(new Dt(Et.new({}),()=>Pt._new(this._root,{themeTags:at(this.markers.template.get("themeTags",[]),[this.get("orientation"),"heatlegend","marker"])},[this.markers.template])))}_afterNew(){this._settings.themeTags=at(this._settings.themeTags,["heatlegend",this._settings.orientation]),super._afterNew(),this._setC("tooltip",_t.new(this._root,{themeTags:["heatlegend"]}))}makeMarker(){let t=this.markers.make();return t.states.create("disabled",{}),t}showValue(t,e,i){let s=this.getTooltip();if(s&&L(t)){let r=this.get("startValue",0),a=this.get("endValue",1),o=(t-r)/(a-r);(o==1/0||o==-1/0||isNaN(o))&&(o=.5);let n=this.get("startColor"),l=this.get("endColor");e||(e=this.getNumberFormatter().format(t)),i||(i=W.interpolate(o,n,l)),s.label.set("text",e);let d;this.get("orientation")=="vertical"?d=this.markerContainer.toGlobal({x:0,y:this.innerHeight()*(1-o)}):d=this.markerContainer.toGlobal({x:this.innerWidth()*o,y:0});let f=s.get("background");f&&f.set("fill",i),s.set("pointTo",d),s.show()}}_prepareChildren(){super._prepareChildren();let t=this.labelContainer,e=this.get("orientation"),i=this.startLabel,s=this.endLabel,r=this.getTooltip();if(this.isDirty("orientation")&&(e=="vertical"?(this.markerContainer._setCAll({layout:this._root.verticalLayout,height:F}),this._setC("layout",this._root.horizontalLayout),i._setCAll({y:F,x:void 0,centerY:F,centerX:F}),s._setCAll({y:0,x:void 0,centerY:0,centerX:F}),t._setCAll({height:F,width:void 0}),r&&r._setC("pointerOrientation","horizontal")):(this.markerContainer._setCAll({layout:this._root.horizontalLayout,width:F}),this._setC("layout",this._root.verticalLayout),i._setCAll({x:0,y:void 0,centerX:0,centerY:0}),s._setCAll({x:F,y:void 0,centerX:F,centerY:0}),t._setCAll({width:F,height:void 0}),r&&r._setC("pointerOrientation","vertical"))),this.isDirty("stepCount")||this.isDirty("startColor")||this.isDirty("endColor")||this.isDirty("startOpacity")||this.isDirty("endOpacity")||this.isDirty("orientation")){let a=this.get("stepCount",1),o=this.get("startColor"),n=this.get("endColor"),l=this.get("startOpacity",1),d=this.get("endOpacity",1);if(this.markerContainer.children.clear(),a>1)for(let f=0;f<a;f++){let h=this.makeMarker();e=="vertical"?this.markerContainer.children.moveValue(h,0):this.markerContainer.children.push(h),o&&n&&h._setCAll({fill:W.interpolate(f/a,o,n),fillOpacity:pt(f/a*100).interpolate(l,d)})}else if(a==1){let f=this.makeMarker();this.markerContainer.children.push(f);let h=Wt.new(this._root,{stops:[{color:o,opacity:l},{color:n,opacity:d}]});if(e=="vertical"){h.set("rotation",90);let c=h.get("stops");c&&c.reverse()}else h.set("rotation",0);o&&n&&f._setC("fillGradient",h)}}(this.isDirty("startText")||this.isDirty("startValue"))&&i._setC("text",this.get("startText",this.getNumberFormatter().format(this.get("startValue",0)))),(this.isDirty("endText")||this.isDirty("endValue"))&&s._setC("text",this.get("endText",this.getNumberFormatter().format(this.get("endValue",1))))}};oe.className="HeatLegend";oe.classNames=P.classNames.concat([oe.className]);var ne=class extends Ke{constructor(){super(...arguments),this.itemContainers=this.addDisposer(new Dt(Et.new({}),()=>P._new(this._root,{themeTags:at(this.itemContainers.template.get("themeTags",[]),["legend","item"]),themeTagsSelf:at(this.itemContainers.template.get("themeTagsSelf",[]),["itemcontainer"]),background:Pt.new(this._root,{themeTags:at(this.itemContainers.template.get("themeTags",[]),["legend","item","background"]),themeTagsSelf:at(this.itemContainers.template.get("themeTagsSelf",[]),["itemcontainer"])})},[this.itemContainers.template]))),this.markers=this.addDisposer(new Dt(Et.new({}),()=>P._new(this._root,{themeTags:at(this.markers.template.get("themeTags",[]),["legend","marker"])},[this.markers.template]))),this.labels=this.addDisposer(new Dt(Et.new({}),()=>mt._new(this._root,{themeTags:at(this.labels.template.get("themeTags",[]),["legend","label"])},[this.labels.template]))),this.valueLabels=this.addDisposer(new Dt(Et.new({}),()=>mt._new(this._root,{themeTags:at(this.valueLabels.template.get("themeTags",[]),["legend","label","value"])},[this.valueLabels.template]))),this.markerRectangles=this.addDisposer(new Dt(Et.new({}),()=>Pt._new(this._root,{themeTags:at(this.markerRectangles.template.get("themeTags",[]),["legend","marker","rectangle"])},[this.markerRectangles.template])))}_afterNew(){this._settings.themeTags=at(this._settings.themeTags,["legend"]),this.fields.push("name","stroke","fill"),super._afterNew()}makeItemContainer(t){let e=this.children.push(this.itemContainers.make());return e._setDataItem(t),this.itemContainers.push(e),e.states.create("disabled",{}),e}makeMarker(){let t=this.markers.make();return this.markers.push(t),t.states.create("disabled",{}),t}makeLabel(){let t=this.labels.make();return t.states.create("disabled",{}),t}makeValueLabel(){let t=this.valueLabels.make();return t.states.create("disabled",{}),t}makeMarkerRectangle(){let t=this.markerRectangles.make();return t.states.create("disabled",{}),t}processDataItem(t){super.processDataItem(t);let e=this.makeItemContainer(t),i=this.get("nameField"),s=this.get("fillField"),r=this.get("strokeField");if(e){let a=this.get("clickTarget","itemContainer"),o=t.dataContext;o&&o.set&&o.set("legendDataItem",t),e._setDataItem(t),t.set("itemContainer",e);let n=this.makeMarker();if(n){e.children.push(n),n._setDataItem(t),t.set("marker",n);let f=this.get("useDefaultMarker"),h=n.children.push(this.makeMarkerRectangle()),c=t.get("fill"),p=t.get("stroke");t.set("markerRectangle",h),o&&o.get&&(c=o.get(s,c),p=o.get(r,p)),p||(p=c),f?o&&o.on&&(o.on(s,()=>{h._setC("fill",o.get(s))}),o.on(r,()=>{h._setC("stroke",o.get(r))})):o&&o.createLegendMarker&&o.createLegendMarker(),h._setCAll({fill:c,stroke:p});let _=o&&o.component;_&&_.updateLegendMarker&&_.updateLegendMarker(o)}let l=this.makeLabel();if(l){e.children.push(l),l._setDataItem(t),t.set("label",l),l.text.on("text",()=>{e.setRaw("ariaLabel",l.text._getText()+(this.get("clickTarget")!=="none"?"; "+this._t("Press ENTER to toggle"):"")),e.markDirtyAccessibility()}),o&&o.get&&t.set("name",o.get(i));let f=t.get("name");f&&l.set("text",f)}let d=this.makeValueLabel();if(d&&(e.children.push(d),d._setDataItem(t),t.set("valueLabel",d)),o&&o.show&&(o.on("visible",f=>{e.set("disabled",!f)}),o.get("visible")||e.set("disabled",!0),a!="none")){let f=e;a=="marker"&&(f=n),this._addClickEvents(f,o,t)}this.children.values.sort((f,h)=>{let c=f.dataItem?f.dataItem.dataContext:void 0,p=h.dataItem?h.dataItem.dataContext:void 0;if(c&&p){let _=this.data.indexOf(c),u=this.data.indexOf(p);if(_>u)return 1;if(_<u)return-1}return 0}),o&&o.updateLegendValue&&o.updateLegendValue()}}_addClickEvents(t,e,i){t.set("cursorOverStyle","pointer"),t.events.on("pointerover",()=>{let s=e.component;s&&s.hoverDataItem&&s.hoverDataItem(e)}),t.events.on("pointerout",()=>{let s=e.component;s&&s.hoverDataItem&&s.unhoverDataItem(e)}),t.events.on("click",()=>{let s=i.get("label").text._getText();e.show&&e.isHidden&&(e.isHidden()||e.get("visible")===!1)?(e.show(),t.set("disabled",!1),this._root.readerAlert(this._t("%1 shown",this._root.locale,s))):e.hide&&(e.hide(),t.set("disabled",!0),this._root.readerAlert(this._t("%1 hidden",this._root.locale,s)))})}disposeDataItem(t){super.disposeDataItem(t);let e=t.dataContext;e&&e.get&&e.get("legendDataItem")==t&&e.set("legendDataItem",void 0);let i=t.get("itemContainer");i&&(this.itemContainers.removeValue(i),i.dispose());let s=t.get("marker");s&&(this.markers.removeValue(s),s.dispose());let r=t.get("markerRectangle");r&&(this.markerRectangles.removeValue(r),r.dispose());let a=t.get("label");a&&(this.labels.removeValue(a),a.dispose());let o=t.get("valueLabel");o&&(this.valueLabels.removeValue(o),o.dispose())}};ne.className="Legend";ne.classNames=Ke.classNames.concat([ne.className]);var ft=class extends z{_beforeChanged(){super._beforeChanged(),(this.isDirty("width")||this.isDirty("height")||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}_changed(){super._changed(),this._clear&&!this.get("draw")&&this._draw()}_draw(){let t=this.width(),e=this.height(),i=this._display;i.moveTo(-t/2,e/2),i.lineTo(0,-e/2),i.lineTo(t/2,e/2),i.lineTo(-t/2,e/2),i.closePath()}_updateSize(){this.markDirty(),this._clear=!0}};ft.className="Triangle";ft.classNames=z.classNames.concat([ft.className]);var Ct=class g extends z{_beforeChanged(){super._beforeChanged(),this.isDirty("points")&&(this._clear=!0)}static makeOrthogonal(t){if(t.length>1){let e=[];for(let i=0;i<t.length-1;i++){let s=t[i],r=t[i+1];e.push(s),s.x!==r.x&&s.y!==r.y&&e.push({x:r.x,y:s.y})}e.push(t[t.length-1]),t=e}return t}_changed(){if(super._changed(),this._clear){let t=this._display,e=this.get("points",[]);if(e.length===0)return;e=g.makeOrthogonal(e),t.moveTo(e[0].x,e[0].y);for(let i=1;i<e.length;i++){let s=this.get("cornerRadius",0),r=e[i-1],a=e[i],o=e[i+1],n=a.y===r.y&&a.x!==r.x,l=a.x===r.x&&a.y!==r.y,d=o&&(n&&o.y!==a.y||l&&o.x!==a.x);if(s>0&&o&&d){if(l){s=Math.min(s,Math.abs(a.x-o.x)/2,Math.abs(a.y-r.y)/2);let f=Math.sign(a.y-r.y);t.lineTo(a.x,a.y-s*f);let h=o.x<a.x?-1:1;t.arcTo(a.x,a.y,a.x+s*h,a.y,s)}else if(n){s=Math.min(s,Math.abs(a.y-o.y)/2,Math.abs(a.x-r.x)/2);let f=Math.sign(a.x-r.x);t.lineTo(a.x-s*f,a.y);let h=o.y<a.y?-1:1;t.arcTo(a.x,a.y,a.x,a.y+s*h,s)}}else t.lineTo(a.x,a.y)}}}};Ct.className="OrthogonalLine";Ct.classNames=z.classNames.concat([Ct.className]);var he=class extends P{constructor(){super(...arguments),this.line=this.children.push(Ct.new(this._root,{themeTags:["line"]})),this.hitLine=this.children.push(Ct.new(this._root,{themeTags:["hit"]})),this.startArrow=this.children.push(ft.new(this._root,{themeTags:["start","arrow"]})),this.endArrow=this.children.push(ft.new(this._root,{themeTags:["end","arrow"]}))}_afterNew(){this.addTag("link"),super._afterNew()}_updateChildren(){if(super._updateChildren(),this.isDirty("points")){let t=Ct.makeOrthogonal(this.get("points",[]));this.line.set("points",t),this.hitLine.set("points",t);let e=this.startArrow,i=this.endArrow,s=t.length;if(s>1){let[r,a]=t;e.setAll({x:r.x,y:r.y,rotation:Ae(r,a)-90});let o=t[s-1],n=t[s-2];i.setAll({x:o.x,y:o.y,rotation:Ae(n,o)+90})}else if(s===1){let[r]=t;e.setAll({x:r.x,y:r.y,rotation:0}),i.setAll({x:r.x,y:r.y,rotation:0})}}}};he.className="Link";he.classNames=P.classNames.concat([he.className]);var le=class extends qe{constructor(){super(...arguments),this._display=this._root._renderer.makePicture(void 0)}_changed(){if(super._changed(),this.isDirty("width")){let t=this.get("width");this._display.width=L(t)?t:void 0}if(this.isDirty("height")){let t=this.get("height");this._display.height=L(t)?t:void 0}if(this.isDirty("shadowColor")){this._display.clear();let t=this.get("shadowColor");this._display.shadowColor=t??void 0}this.isDirty("shadowBlur")&&(this._display.clear(),this._display.shadowBlur=this.get("shadowBlur")),this.isDirty("shadowOffsetX")&&(this._display.clear(),this._display.shadowOffsetX=this.get("shadowOffsetX")),this.isDirty("shadowOffsetY")&&(this._display.clear(),this._display.shadowOffsetY=this.get("shadowOffsetY")),this.isDirty("shadowOpacity")&&(this._display.clear(),this._display.shadowOpacity=this.get("shadowOpacity")),(this.isDirty("src")||this.isDirty("cors"))&&(this._display.clear(),this._load())}_load(){let t=this.get("src");if(t){let e=new Image;e.crossOrigin=this.get("cors","anonymous"),e.src=t;let i=this.events;e.decode().then(()=>{this._display.image=e,this._updateSize(),!i.isDisposed()&&i.isEnabled("loaded")&&i.dispatch("loaded",{type:"loaded",target:this})}).catch(s=>{!i.isDisposed()&&i.isEnabled("loaderror")&&i.dispatch("loaderror",{type:"loaderror",target:this})})}}_updateSize(){super._updateSize();let t=this._display.image;if(t){let e=this.getPrivate("width",this.get("width")),i=this.getPrivate("height",this.get("height")),s=t.width&&t.height?t.width/t.height:0;L(e)&&L(i)?(this._display.width=e,this._display.height=i):L(e)&&s?i=e/s:L(i)&&s?e=i*s:(e=t.width,i=t.height),L(e)&&(this._display.width=e),L(i)&&(this._display.height=i),this.markDirtyBounds(),this.markDirty()}}};le.className="Picture";le.classNames=qe.classNames.concat([le.className]);var ce=class extends Je{_afterNew(){this._addOrientationClass(),super._afterNew(),this.endGrip.setPrivate("visible",!1),this.thumb.setPrivate("visible",!1)}updateGrips(){super.updateGrips();let t=this.startGrip;this.endGrip.setAll({x:t.x(),y:t.y()}),this.setRaw("end",this.get("start"))}};ce.className="Slider";ce.classNames=Je.classNames.concat([ce.className]);var de=class extends ti{constructor(){super(...arguments),this.zoomableContainer=kt.new(this._root,{width:F,height:F,isMeasured:!1})._markC("width","height","isMeasured")}_afterNew(){super._afterNew(),this.addTag("serialchartcontainer"),this.zoomableContainer.contents.children.push(this.seriesContainer),this.zoomableContainer.contents.children.push(this.bulletsContainer),this.chartContainer.children.push(this.zoomableContainer)}_prepareChildren(){if(super._prepareChildren(),this.isDirty("zoomTools")){let t=this._prevSettings.zoomTools,e=this.get("zoomTools");e!==t&&(t&&t.dispose(),e&&(e.set("target",this.zoomableContainer),this.children.push(e)),this._prevSettings.zoomTools=e)}}};de.className="SerialChartContainer";de.classNames=ti.classNames.concat([de.className]);var ue=class extends P{constructor(){super(...arguments),this.homeButton=this.children.push(Ot.new(this._root,{width:35,height:35,themeTags:["home"]})._markC("width","height","themeTags")),this.plusButton=this.children.push(Ot.new(this._root,{width:35,height:35,themeTags:["plus"]})._markC("width","height","themeTags")),this.minusButton=this.children.push(Ot.new(this._root,{width:35,height:35,themeTags:["minus"]})._markC("width","height","themeTags"))}_afterNew(){super._afterNew(),this._setC("position","absolute"),this._setC("layout",this._root.verticalLayout),this.addTag("zoomtools"),this.plusButton._setCAll({icon:z.new(this._root,{themeTags:["icon"]}),layout:void 0}),this.minusButton._setCAll({icon:z.new(this._root,{themeTags:["icon"]}),layout:void 0}),this.homeButton._setCAll({icon:z.new(this._root,{themeTags:["icon"]}),layout:void 0})}_prepareChildren(){if(super._prepareChildren(),this.isDirty("target")){let t=this.get("target"),e=this._prevSettings.target;t&&(t instanceof kt&&(this._targetDisposer=this.addDisposer(t.contents.on("scale",i=>{i==t.get("minZoomLevel")?this.minusButton._setC("disabled",!0):this.minusButton._setC("disabled",!1),i==t.get("maxZoomLevel")?this.plusButton._setC("disabled",!0):this.plusButton._setC("disabled",!1)})),this.root.events.once("frameended",()=>{t.get("scale")==t.get("minZoomLevel")&&this.minusButton._setC("disabled",!0)})),this._disposer=new xt([this.plusButton.events.on("click",()=>{t.zoomIn()}),this.minusButton.events.on("click",()=>{t.zoomOut()}),this.homeButton.events.on("click",()=>{t.goHome()})])),e&&(this._disposer&&this._disposer.dispose(),this._targetDisposer&&this._targetDisposer.dispose())}}};ue.className="ZoomTools";ue.classNames=P.classNames.concat([ue.className]);var fe=class extends X{constructor(){super(...arguments),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this._clearGrain=!1}_beforeChanged(){let t=this.get("width",200),e=this.get("height",200);this.canvas.width!==t&&(this.canvas.width=t),this.canvas.height!==e&&(this.canvas.height=e),(this.isDirty("size")||this.isDirty("density")||this.isDirty("minOpacity")||this.isDirty("maxOpacity")||this.isDirty("colors")||this.isDirty("horizontalGap")||this.isDirty("verticalGap"))&&(this._clearGrain=!0),super._beforeChanged()}_changed(){if(super._changed(),this._clearGrain){let t=this.get("width",200),e=this.get("height",200),i=this.context.createImageData(t,e),s=Math.max(1,this.get("size",1)),r=this.get("minOpacity",0),a=this.get("maxOpacity",.3),o=this.get("colors",[this.get("color",W.fromHex(0))]),n=t/s,l=e/s,d=this.get("density",1),f=this.get("horizontalGap",0)+1,h=this.get("verticalGap",0)+1,c=o.length,p=a-r,_=new Array(c),u=new Array(c),m=new Array(c);for(let w=0;w<c;w++)_[w]=o[w].r,u[w]=o[w].g,m[w]=o[w].b;let b=new Uint32Array(i.data.buffer),x=d>=1,y=f>1?f:0,v=h>1?h:0;for(let w=0;w<l;w++)if(!(v&&w%v!==0)){for(let k=0;k<n;k++)if(!(y&&k%y!==0)&&(x||Math.random()<d)){let M=c>1?Math.random()*c|0:0,D=(r+Math.random()*p)*255|0,S=(_[M]|u[M]<<8|m[M]<<16|D<<24)>>>0;s===1?b[w*t+k]=S:this._setRectData(k,w,s,t,b,S)}}this.context.putImageData(i,0,0),this._pattern=this.context.createPattern(this.canvas,"repeat")}this._clearGrain=!1}_checkDirtyFill(){return!1}_setRectData(t,e,i,s,r,a){let o=t*i,n=e*i,l=o+i,d=n+i;for(var f=n;f<d;f++){let c=f*s+o;for(var h=o;h<l;h++)r[c]=a,c++}}};fe.className="GrainPattern";fe.classNames=X.classNames.concat([fe.className]);var pe=class extends ut{getFill(t){let e=this.getBounds(t),i=0,s=0,r=e.left||0,a=e.right||0,o=e.top||0,n=e.bottom||0,l=a-r,d=n-o,f=t.get("radius");L(f)?(i=0,s=0):(f=Math.min(l,d)/2,i=l/2,s=d/2);let h=this.get("x"),c=this.get("y");h!=null&&(i=vt(h,l)),c!=null&&(s=vt(c,d));let p=this._root._renderer.createRadialGradient(i,s,0,i,s,f),_=this.get("stops");if(_){let u=0;C(_,m=>{let b=m.offset;L(b)||(b=u/(_.length-1));let x=m.opacity;L(x)||(x=1);let y=m.color;if(y){let v=m.lighten;v&&(y=W.lighten(y,v));let w=m.brighten;w&&(y=W.brighten(y,w)),p.addColorStop(b,"rgba("+y.r+","+y.g+","+y.b+","+x+")")}u++})}return p}};pe.className="RadialGradient";pe.classNames=ut.classNames.concat([pe.className]);var Gt=class extends X{_beforeChanged(){super._beforeChanged(),(this.isDirty("gap")||this.isDirty("radius")||this.isDirty("checkered"))&&(this._clear=!0),this._optimizeTileSize()}_optimizeTileSize(){let t=this.get("repetition");if(t&&t!=="repeat"||this.get("rotation",0)!==0)return;let e=this.get("gap",0),i=this.get("radius",3)*2+e;if(i<=0)return;let s=this.get("checkered",!1)?2:1,r=Math.max(1,Math.round(i*s));this.get("width",100)!==r&&this.setRaw("width",r),this.get("height",100)!==r&&this.setRaw("height",r)}_draw(){super._draw();let t=this.get("checkered",!1),e=this.get("centered",!0),i=this.get("gap",0),s=this.get("rotation",0),r=this.get("width",100),a=this.get("height",100),o=this.get("radius",3),n=o*2+i,l=o*2+i,d=Math.round(r/n),f=Math.round(a/l);n=r/d,l=a/f,s!=0&&(this._display.x=n*J(s),this._display.y=l*K(s));let h=-2,c=d+2,p=-2,_=f+2;if(s!=0){let b=J(s),x=K(s),y=this._display.x,v=this._display.y,w=1/0,k=-1/0,M=1/0,D=-1/0,S=[[0,0],[r,0],[0,a],[r,a]];for(let T=0;T<S.length;T++){let E=S[T][0]-y,$=S[T][1]-v,O=b*E+x*$,B=-x*E+b*$;O<w&&(w=O),O>k&&(k=O),B<M&&(M=B),B>D&&(D=B)}h=Math.floor(w/n)-2,c=Math.ceil(k/n)+2,p=Math.floor(M/l)-2,_=Math.ceil(D/l)+2}let u=this.get("color"),m=this.get("colorOpacity");(u||m)&&this._display.beginFill(u,m);for(let b=p;b<_;b++)for(let x=h;x<c;x++)if(!t||(b&1)!=1&&(x&1)!=1||(b&1)==1&&(x&1)==1){let y=x*n,v=b*l;e&&(y+=n+i/2,v+=l+i/2),this._display.drawCircle(y-o,v-o,o)}(u||m)&&this._display.endFill()}};Gt.className="CirclePattern";Gt.classNames=X.classNames.concat([Gt.className]);var Vt=class extends X{_beforeChanged(){super._beforeChanged(),(this.isDirty("gap")||this.isDirty("angle"))&&(this._clear=!0),this._optimizeTileSize()}_optimizeTileSize(){let t=this.get("repetition");if(t&&t!=="repeat"||this.get("rotation"))return;let e=this.get("gap",0);if(!e)return;let i=e+this.get("strokeWidth",1),s=this.get("angle",0)*Math.PI/180,r=Math.abs(Math.sin(s)),a=Math.abs(Math.cos(s)),o=4,n=Math.max(1,Math.ceil((r>1e-6?i/r:1)*o)),l=Math.max(1,Math.ceil((a>1e-6?i/a:1)*o));this.get("width",100)>n&&this.setRaw("width",n),this.get("height",100)>l&&this.setRaw("height",l)}_draw(){super._draw();let t=this.get("width",100),e=this.get("height",100),i=this.get("gap",0),s=this.get("strokeWidth",1);if(!i)this._display.moveTo(0,0),this._display.lineTo(t,0);else{let o=i+s,n=e/o,l=this.get("angle",0)*Math.PI/180;if(l===0)for(let d=-n;d<n*2;d++){let f=Math.round(d*o-o/2)+.5;this._display.moveTo(-t,f),this._display.lineTo(t*2,f)}else{let d=Math.cos(l),f=Math.sin(l),h=Math.max(Math.abs(t*f),Math.abs(e*d));h>1e-6&&(o=h/Math.max(1,Math.round(h/o)));let c=Math.sqrt(t*t+e*e)*2,p=o/Math.max(Math.abs(d),Math.abs(f)),_=Math.ceil(c/p)*2;for(let u=-_;u<_;u++){let m=u*o,b=m*f-c*d,x=m*d+c*f,y=m*f+c*d,v=m*d-c*f;this._display.moveTo(b,x),this._display.lineTo(y,v)}}}this._display.lineStyle(s,this.get("color"),this.get("colorOpacity"));let r=this.get("strokeDasharray");L(r)&&(r<.5?r=[0]:r=[r]),this._display.setLineDash(r);let a=this.get("strokeDashoffset");a&&this._display.setLineDashOffset(a),this._display.endStroke()}};Vt.className="LinePattern";Vt.classNames=X.classNames.concat([Vt.className]);var Xt=class extends X{_beforeChanged(){super._beforeChanged(),(this.isDirty("gap")||this.isDirty("rotateShapes")||this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isDirty("checkered"))&&(this._clear=!0),this._optimizeTileSize()}_optimizeTileSize(){let t=this.get("repetition");if(t&&t!=="repeat"||this.get("rotation",0)!==0&&!this.get("rotateShapes",!1))return;let e=this.get("gap",0),i=this.get("maxWidth",5)+e,s=this.get("maxHeight",5)+e;if(i<=0||s<=0)return;let r=this.get("checkered",!1)?2:1,a=Math.max(1,Math.round(i*r)),o=Math.max(1,Math.round(s*r));this.get("width",100)!==a&&this.setRaw("width",a),this.get("height",100)!==o&&this.setRaw("height",o)}_draw(){super._draw();let t=this.get("checkered",!1),e=this.get("centered",!0),i=this.get("gap",0),s=this.get("rotation",0),r=this.get("rotateShapes",!1),a=this.get("width",100),o=this.get("height",100),n=this.get("maxWidth",5),l=this.get("maxHeight",5),d=this._display,f=n+i,h=l+i,c=Math.round(a/f),p=Math.round(o/h);f=a/c,h=o/p;let _=r?0:s,u=r?s:0;d.angle=_,_!=0?(d.x=f/2*J(_),d.y=-h/2*K(_)):(d.x=0,d.y=0);let m=0,b=c,x=0,y=p;if(u!=0)m=-1,b=c+1,x=-1,y=p+1;else if(_!=0){let B=J(_),U=K(_),A=d.x,H=d.y,R=1/0,I=-1/0,it=1/0,G=-1/0,V=[[0,0],[a,0],[0,o],[a,o]];for(let st=0;st<V.length;st++){let we=V[st][0]-A,Ge=V[st][1]-H,Ve=B*we+U*Ge,Xe=-U*we+B*Ge;Ve<R&&(R=Ve),Ve>I&&(I=Ve),Xe<it&&(it=Xe),Xe>G&&(G=Xe)}m=Math.floor(R/f)-2,b=Math.ceil(I/f)+2,x=Math.floor(it/h)-2,y=Math.ceil(G/h)+2}let v=J(u),w=K(u),k=n/2,M=l/2,D=k*v,S=k*w,T=M*v,E=M*w;for(let B=x;B<y;B++)for(let U=m;U<b;U++)if(!t||(B&1)!=1&&(U&1)!=1||(B&1)==1&&(U&1)==1){let A=U*f,H=B*h;if(e&&(A+=(f-n)/2,H+=(h-l)/2),u!=0){let R=A+k,I=H+M;d.moveTo(R-D+E,I-S-T),d.lineTo(R+D+E,I+S-T),d.lineTo(R+D-E,I+S+T),d.lineTo(R-D-E,I-S+T),d.closePath()}else d.drawRect(A,H,n,l)}let $=this.get("color"),O=this.get("colorOpacity");($||O)&&(d.beginFill($,O),d.endFill())}};Xt.className="RectanglePattern";Xt.classNames=X.classNames.concat([Xt.className]);var me=class extends X{_beforeChanged(){super._beforeChanged(),(this.isDirty("gap")||this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("spikes")||this.isDirty("checkered")||this.isDirty("rotateShapes"))&&(this._clear=!0),this._optimizeTileSize()}_optimizeTileSize(){let t=this.get("repetition");if(t&&t!=="repeat"||this.get("rotation",0)!==0&&!this.get("rotateShapes",!1))return;let e=this.get("gap",0),i=this.get("radius",5)*2+e;if(i<=0)return;let s=this.get("checkered",!1)?2:1,r=Math.max(1,Math.round(i*s));this.get("width",100)!==r&&this.setRaw("width",r),this.get("height",100)!==r&&this.setRaw("height",r)}_draw(){super._draw();let t=this.get("checkered",!1),e=this.get("centered",!0),i=this.get("gap",0),s=this.get("rotation",0),r=this.get("rotateShapes",!1),a=this.get("width",100),o=this.get("height",100),n=this.get("radius",5),l=vt(this.get("innerRadius",pt(50)),n),d=this.get("spikes",5),f=this._display,h=n*2+i,c=n*2+i,p=Math.round(a/h),_=Math.round(o/c);h=a/p,c=o/_;let u=r?0:s,m=r?s:0;f.angle=u,u!=0?(f.x=h/2*J(u),f.y=-c/2*K(u)):(f.x=0,f.y=0);let b=0,x=p,y=0,v=_;if(m!=0)b=-1,x=p+1,y=-1,v=_+1;else if(u!=0){let S=J(u),T=K(u),E=f.x,$=f.y,O=1/0,B=-1/0,U=1/0,A=-1/0,H=[[0,0],[a,0],[0,o],[a,o]];for(let R=0;R<H.length;R++){let I=H[R][0]-E,it=H[R][1]-$,G=S*I+T*it,V=-T*I+S*it;G<O&&(O=G),G>B&&(B=G),V<U&&(U=V),V>A&&(A=V)}b=Math.floor(O/h)-2,x=Math.ceil(B/h)+2,y=Math.floor(U/c)-2,v=Math.ceil(A/c)+2}let w=J(m),k=K(m);for(let S=y;S<v;S++)for(let T=b;T<x;T++)if(!t||(S&1)!=1&&(T&1)!=1||(S&1)==1&&(T&1)==1){let E=T*h,$=S*c;e?(E+=h/2,$+=c/2):(E+=n,$+=n),this._drawStar(E,$,n,l,d,w,k)}let M=this.get("color"),D=this.get("colorOpacity");(M||D)&&(f.beginFill(M,D),f.endFill())}_drawStar(t,e,i,s,r,a,o){let n=this._display,l=Math.PI/r,d=Math.PI/2*3,f=0,h=-i;n.moveTo(t+f*a-h*o,e+f*o+h*a);for(let c=0;c<r;c++)f=Math.cos(d)*i,h=Math.sin(d)*i,n.lineTo(t+f*a-h*o,e+f*o+h*a),d+=l,f=Math.cos(d)*s,h=Math.sin(d)*s,n.lineTo(t+f*a-h*o,e+f*o+h*a),d+=l;f=0,h=-i,n.lineTo(t+f*a-h*o,e+f*o+h*a),n.closePath()}};me.className="StarPattern";me.classNames=X.classNames.concat([me.className]);var ge=class extends X{_beforeChanged(){super._beforeChanged(),(this.isDirty("gap")||this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isDirty("checkered")||this.isDirty("rotateShapes"))&&(this._clear=!0),this._optimizeTileSize()}_optimizeTileSize(){let t=this.get("repetition");if(t&&t!=="repeat"||this.get("rotation",0)!==0&&!this.get("rotateShapes",!1))return;let e=this.get("gap",0),i=this.get("maxWidth",8)+e,s=this.get("maxHeight",8)+e;if(i<=0||s<=0)return;let r=this.get("checkered",!1)?2:1,a=Math.max(1,Math.round(i*r)),o=Math.max(1,Math.round(s*r));this.get("width",100)!==a&&this.setRaw("width",a),this.get("height",100)!==o&&this.setRaw("height",o)}_draw(){super._draw();let t=this.get("checkered",!1),e=this.get("centered",!0),i=this.get("gap",0),s=this.get("rotation",0),r=this.get("rotateShapes",!1),a=this.get("width",100),o=this.get("height",100),n=this.get("maxWidth",8),l=this.get("maxHeight",8),d=this._display,f=n+i,h=l+i,c=Math.round(a/f),p=Math.round(o/h);f=a/c,h=o/p;let _=r?0:s,u=r?s:0;d.angle=_,_!=0?(d.x=f/2*J(_),d.y=-h/2*K(_)):(d.x=0,d.y=0);let m=0,b=c,x=0,y=p;if(u!=0)m=-1,b=c+1,x=-1,y=p+1;else if(_!=0){let T=J(_),E=K(_),$=d.x,O=d.y,B=1/0,U=-1/0,A=1/0,H=-1/0,R=[[0,0],[a,0],[0,o],[a,o]];for(let I=0;I<R.length;I++){let it=R[I][0]-$,G=R[I][1]-O,V=T*it+E*G,st=-E*it+T*G;V<B&&(B=V),V>U&&(U=V),st<A&&(A=st),st>H&&(H=st)}m=Math.floor(B/f)-2,b=Math.ceil(U/f)+2,x=Math.floor(A/h)-2,y=Math.ceil(H/h)+2}let v=J(u),w=K(u),k=n/2,M=l/2;for(let T=x;T<y;T++)for(let E=m;E<b;E++)if(!t||(T&1)!=1&&(E&1)!=1||(T&1)==1&&(E&1)==1){let $=E*f,O=T*h;e?($+=f/2,O+=h/2):($+=k,O+=M),this._point($,O,-k,M,v,w,!0),this._point($,O,0,-M,v,w,!1),this._point($,O,k,M,v,w,!1),d.closePath()}let D=this.get("color"),S=this.get("colorOpacity");(D||S)&&(d.beginFill(D,S),d.endFill())}_point(t,e,i,s,r,a,o){let n=t+i*r-s*a,l=e+i*a+s*r;o?this._display.moveTo(n,l):this._display.lineTo(n,l)}};ge.className="TrianglePattern";ge.classNames=X.classNames.concat([ge.className]);var _e=class extends X{constructor(){super(...arguments),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this._clearPath=!1,this._bbox={x:0,y:0,w:1,h:1}}_beforeChanged(){this._optimizeTileSize(),super._beforeChanged();let t=this.get("width",100),e=this.get("height",100);this.canvas.width!==t&&(this.canvas.width=t),this.canvas.height!==e&&(this.canvas.height=e),(this._clear||this.isDirty("svgPath")||this.isDirty("gap")||this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isDirty("checkered")||this.isDirty("centered"))&&(this._clearPath=!0)}_optimizeTileSize(){let t=this.get("repetition");if(t&&t!=="repeat")return;let e=this.get("gap",0),i=this.get("maxWidth",10)+e,s=this.get("maxHeight",10)+e;if(i<=0||s<=0)return;let r=this.get("checkered",!1)?2:1,a=Math.max(1,Math.round(i*r)),o=Math.max(1,Math.round(s*r));this.get("width",100)!==a&&this.setRaw("width",a),this.get("height",100)!==o&&this.setRaw("height",o)}_changed(){if(super._changed(),this._clearPath){let t=this.get("svgPath");t!=null&&this._renderPattern(t)}this._clearPath=!1}_renderPattern(t){t!==this._bboxPath&&(this._bbox=this._getPathBounds(t),this._bboxPath=t);let e=this.get("width",100),i=this.get("height",100),s=this.get("gap",0),r=this.get("maxWidth",10),a=this.get("maxHeight",10),o=this.get("checkered",!1),n=this.get("centered",!0),l=this.get("rotation",0)*Math.PI/180,d=this.context;d.setTransform(1,0,0,1,0,0),d.clearRect(0,0,e,i);let f=this.get("fill"),h=this.get("fillOpacity",1);f&&h>0&&(d.fillStyle=f.toCSS(h),d.fillRect(0,0,e,i));let c=this.get("color");d.fillStyle=c?c.toCSS(this.get("colorOpacity",1)):"#000000";let p=new Path2D(t),_=this._bbox,u=Math.min(r/_.w,a/_.h),m=_.x+_.w/2,b=_.y+_.h/2,x=r+s,y=a+s,v=Math.max(1,Math.round(e/x)),w=Math.max(1,Math.round(i/y));x=e/v,y=i/w;for(let k=-1;k<=w;k++)for(let M=-1;M<=v;M++){if(o&&(k&1)!==(M&1))continue;let D=n?M*x+x/2:M*x+s/2+r/2,S=n?k*y+y/2:k*y+s/2+a/2;d.save(),d.translate(D,S),l!==0&&d.rotate(l),d.scale(u,u),d.translate(-m,-b),d.fill(p),d.restore()}this._pattern=d.createPattern(this.canvas,this.get("repetition","repeat"))}_getPathBounds(t){let e="http://www.w3.org/2000/svg",i=document.createElementNS(e,"svg");i.style.cssText="position:absolute;left:-10000px;top:-10000px;width:0;height:0;overflow:hidden;";let s=document.createElementNS(e,"path");s.setAttribute("d",t),i.appendChild(s),document.body.appendChild(i);let r=0,a=0,o=1,n=1;try{let l=s.getBBox();r=l.x,a=l.y,o=l.width||1,n=l.height||1}catch{}return document.body.removeChild(i),{x:r,y:a,w:o,h:n}}};_e.className="PathPattern";_e.classNames=X.classNames.concat([_e.className]);var ye=class extends Y{_afterNew(){if(super._afterNewApplyThemes(),this.get("patterns",[]).length===0){let t=this.get("color",this.root.interfaceColors.get("stroke"));this.set("patterns",[this.getLinePattern({width:1e3,height:1e3,angle:45,strokeWidth:1,color:t}),this.getRectanglePattern({width:10,height:10,rotation:0,maxWidth:4,maxHeight:4,color:t}),this.getLinePattern({width:1e3,height:1e3,angle:-45,strokeWidth:1,gap:6,color:t}),this.getCirclePattern({width:11,height:11,radius:2,color:t}),this.getLinePattern({width:6,height:6,angle:90,strokeWidth:1,color:t}),this.getRectanglePattern({width:14,height:14,rotation:45,rotateShapes:!0,gap:4,maxWidth:6,maxHeight:6,checkered:!0,color:t}),this.getLinePattern({width:6,height:6,angle:0,strokeWidth:1,color:t}),this.getRectanglePattern({width:15,height:15,rotation:0,gap:5,maxWidth:5,maxHeight:5,checkered:!0,color:t}),this.getLinePattern({width:1e3,height:1e3,angle:45,strokeWidth:2,gap:3,strokeDasharray:[4,2],color:t}),this.getCirclePattern({width:20,height:20,radius:3,gap:4,checkered:!0,color:t}),this.getLinePattern({width:1e3,height:1e3,angle:-45,strokeWidth:2,gap:3,strokeDasharray:[4,2],color:t}),this.getRectanglePattern({width:10,height:10,rotation:0,gap:1,maxWidth:9,maxHeight:9,color:t}),this.getLinePattern({width:1e3,height:1e3,angle:-45,strokeWidth:2,gap:1,color:t}),this.getLinePattern({width:1e3,height:1e3,angle:45,strokeWidth:2,gap:1,color:t}),this.getLinePattern({width:1e3,height:1e3,angle:0,strokeWidth:3,gap:1,color:t}),this.getLinePattern({width:1e3,height:1e3,angle:90,strokeWidth:3,gap:1,color:t})])}this._dirty.patterns=!1}_beforeChanged(){this.isDirty("patterns")&&this.reset()}getIndex(t){let e=this.get("patterns",[]);if(t<e.length&&e[t]!==null)return e[t];if(t>e.length-1){let i=t-Math.floor(t*(t/e.length));return e[i]}return e[t]}next(){let t=this.getPrivate("currentStep",this.get("startIndex",0));return this.setPrivate("currentStep",t+this.get("step",1)),this.getIndex(t)}reset(){this.setPrivate("currentStep",this.get("startIndex",0))}getLinePattern(t){return Vt.new(this.root,t)}getRectanglePattern(t){return Xt.new(this.root,t)}getCirclePattern(t){return Gt.new(this.root,t)}};ye.className="PatternSet";ye.classNames=Y.classNames.concat([ye.className]);var es=class{static parse(t,e){e=this._applyDefaults(e);try{if(Tt(t)){let i=JSON.parse(t);return e.reverse&&ke(i)&&i.reverse(),i}else{if(ke(t)||Lt(t))return t;throw"Unable to parse JSON data"}}catch{return}}static _applyDefaults(t){let e={},i={reverse:!1};return t||(t={}),tt(i,(s,r)=>{e[s]=t[s]||r}),e}},is=class{static parse(t,e){e=this._applyDefaults(e);let i=this.CSVToArray(t,e.delimiter),s=[],r=[],a,o;for(o=0;o<e.skipRows;o++)i.shift();if(e.useColumnNames){r=i.shift();for(let l=0;l<r.length;l++)a=r[l]!=null?r[l].replace(/^\s+|\s+$/gm,""):"",a===""&&(a="col"+l),r[l]=a}let n;for(;n=e.reverse?i.pop():i.shift(),!!n;){if(e.skipEmpty&&n.length===1&&n[0]==="")continue;let l={};for(o=0;o<n.length;o++)a=r[o]===void 0?"col"+o:r[o],l[a]=n[o];s.push(l)}return s}static CSVToArray(t,e){e=e||",";let i=new RegExp("(\\"+e+'|\\r?\\n|\\r|^)(?:"([^"]*(?:""[^"]*)*)"|([^"\\'+e+"\\r\\n]*))","gi"),s=[[]],r=null;for(;r=i.exec(t),!(!r||r[0].length===0);){let a=r[1];a.length&&a!==e&&s.push([]);let o;r[2]?o=r[2].replace(new RegExp('""',"g"),'"'):o=r[3],s[s.length-1].push(o)}return s}static _applyDefaults(t){let e={},i={delimiter:",",reverse:!1,skipRows:0,skipEmpty:!0,useColumnNames:!1};return t||(t={}),tt(i,(s,r)=>{e[s]=t[s]||r}),e}};var ss=class extends Y{constructor(){super(...arguments),this._checkDates=!1,this._checkNumbers=!1,this._checkColors=!1,this._checkEmpty=!1,this._checkDeep=!1}_afterNew(){super._afterNew(),this._checkFeatures(),this.on("dateFields",()=>this._checkFeatures()),this.on("dateFormat",()=>this._checkFeatures()),this.on("numericFields",()=>this._checkFeatures()),this.on("colorFields",()=>this._checkFeatures()),this.on("emptyAs",()=>this._checkFeatures())}_checkFeatures(){(this.isDirty("dateFields")||this.isDirty("dateFormat"))&&(this._checkDates=this.get("dateFields")&&this.get("dateFields").length>0),this.isDirty("numericFields")&&(this._checkNumbers=this.get("numericFields")&&this.get("numericFields").length>0),this.isDirty("colorFields")&&(this._checkColors=this.get("colorFields")&&this.get("colorFields").length>0),this.isDirty("emptyAs")&&(this._checkEmpty=this.get("emptyAs")!=null),this._checkDeepFeatures()}_checkDeepFeatures(){let t=[];C(["dateFields","numericFields","colorFields"],e=>{C(this.get(e,[]),i=>{let s=i.split(".");for(s.pop();s.length>0;)t.push(s.join(".")),s.pop()})}),this._checkDeep=t.length>0,this.setPrivate("deepFields",t)}processMany(t){ke(t)&&(this._checkDates||this._checkNumbers||this._checkColors||this._checkEmpty)&&C(t,e=>{this.processRow(e)})}processRow(t,e=""){tt(t,(i,s)=>{let r=e+i;this._checkEmpty&&(t[i]=this._maybeToEmpty(t[i])),this._checkNumbers&&(t[i]=this._maybeToNumber(r,t[i])),this._checkDates&&(t[i]=this._maybeToDate(r,t[i])),this._checkColors&&(t[i]=this._maybeToColor(r,t[i])),this._checkDeep&&this.getPrivate("deepFields",[]).indexOf(r)!==-1&&Lt(t[i])&&this.processRow(t[i],r+".")})}_maybeToNumber(t,e){return this.get("numericFields").indexOf(t)!==-1?rt(e):e}_maybeToDate(t,e){return this.get("dateFields").indexOf(t)!==-1?this._root.dateFormatter.parse(e,this.get("dateFormat","")).getTime():e}_maybeToEmpty(t){return(t==null||t=="")&&this.get("emptyAs")!=null?this.get("emptyAs"):t}_maybeToColor(t,e){return this.get("colorFields").indexOf(t)!==-1?W.fromAny(e):e}};var xe=class extends P{constructor(){super(...arguments),this.rectangle=this.children.push($t.new(this._root,{themeTags:["rectangle"],fillOpacity:0,fill:ht(16777215)})),this.gripL=this._createGrip("left"),this.gripR=this._createGrip("right"),this.gripT=this._createGrip("top"),this.gripB=this._createGrip("bottom"),this._is=1,this._ix=0,this._iw=0,this._isHover=!1}_afterNew(){super._afterNew(),this.addTag("resizer"),this.set("visible",!1),this.gripL.events.on("dragged",t=>{this._resize(t.target,-1)}),this.gripR.events.on("dragged",t=>{this._resize(t.target,1)}),this.gripL.events.on("dragstart",t=>{this._resizeStart(t.target)}),this.gripR.events.on("dragstart",t=>{this._resizeStart(t.target)}),this.gripT.events.on("dragged",t=>{this._rotate(t,90)}),this.gripB.events.on("dragged",t=>{this._rotate(t,-90)}),this.gripT.events.on("dragstart",t=>{this._resizeStart(t.target)}),this.gripB.events.on("dragstart",t=>{this._resizeStart(t.target)})}_resizeStart(t){let e=this.get("sprite");e&&(this._is=e.get("scale",1),this._ix=t.x(),this._iw=this.width()/2)}_resize(t,e){let i=this.get("sprite"),s=this.get("spriteTemplate");if(i){let r=Math.max(.01,this._is*(1+e*(t.x()-this._ix)/this._iw));s?s.set("scale",r):i.set("scale",r),i.states.lookup("default").set("scale",r),this._updatePositions()}}_rotate(t,e){let i=this.get("sprite"),s=this.get("spriteTemplate");if(i){let r=this.parent;if(r){let a=this.get("rotationStep",10),o=Math.round((Ae({x:this.x(),y:this.y()},r.toLocal(t.point))+e)/a)*a;s?s.set("rotation",o):i.set("rotation",o),i.states.lookup("default").set("rotation",o),this._updatePositions()}}}_createGrip(t){let e=this.children.push(P.new(this._root,{themeTags:["grip",t],setStateOnChildren:!0,draggable:!0}));return e.children.push(Pt.new(this._root,{themeTags:["outline"],centerX:At,centerY:At})),e.children.push(Pt.new(this._root,{centerX:At,centerY:At})),e}_updateChildren(){if(super._updateChildren(),this.isDirty("sprite")){let t=this.get("sprite");if(t){this.show(0),this.setPrivate("visible",!0),this._updatePositions();let e=t.parent;e&&e.children.moveValue(this,0),this._positionDP=t.events.on("positionchanged",()=>{this._updatePositions()}),this._positionDP=t.events.on("boundschanged",()=>{this._updatePositions()})}else this.hide(0),this.setPrivate("visible",!1),this._positionDP&&this._positionDP.dispose()}(this.isDirty("width")||this.isDirty("height")||this.isDirty("rotation"))&&this._updatePositions()}_updatePositions(){let t=this.get("sprite");if(t){let e=t.localBounds(),i=t.get("scale",1),s=20,r=(e.right-e.left)*i+s,a=(e.bottom-e.top)*i+s,o=t.get("rotation",0),n=this.rectangle,l=t.get("centerX",At),d=t.get("centerY",At),f=0;l instanceof nt&&(f=l.value);let h=0;d instanceof nt&&(h=d.value),n.setAll({centerX:l,centerY:d,width:r,height:a}),this.setAll({x:t.x()+s*(f-.5)*J(o)-s*(h-.5)*K(o),y:t.y()+s*(h-.5)*J(o)+s*(f-.5)*K(o),width:r,height:a,rotation:o}),this.gripT.setAll({x:(.5-f)*r,y:-h*a}),this.gripB.setAll({x:(.5-f)*r,y:(1-h)*a}),this.gripL.setAll({x:-f*r,y:(.5-h)*a}),this.gripR.setAll({x:(1-f)*r,y:(.5-h)*a}),this.rectangle.setAll({width:r,height:a})}}};xe.className="SpriteResizer";xe.classNames=P.classNames.concat([xe.className]);var be=class extends P{constructor(){super(...arguments),this.label=this.children.push(Ti.new(this._root,{})),this.buttonsContainer=this.children.push(P.new(this._root,{themeTags:["buttons"]})),this.upButton=this.buttonsContainer.children.push(ft.new(this._root,{themeTags:["upbutton"]})),this.downButton=this.buttonsContainer.children.push(ft.new(this._root,{themeTags:["downbutton"]}))}_afterNew(){this.addTag("numericstepper"),this.set("layout",this._root.horizontalLayout),this.label.adapters.add("text",t=>(t&&t.replace(/\D/g,""),t===""&&(t="0"),t)),this.set("background",$t.new(this._root,{fillOpacity:0,fill:ht(16777215)})),this.buttonsContainer.states._createC("hidden",{opacity:0,visible:!0}),this.events.on("pointerover",()=>{this.buttonsContainer.set("active",!0)}),this.events.on("pointerout",()=>{this.buttonsContainer.set("active",!1)}),this.label.on("text",t=>{if(t){let e=parseFloat(t);isNaN(e)||this.set("value",e)}}),this.upButton.events.on("click",()=>{this.set("value",this.get("value",0)+1)}),this.downButton.events.on("click",()=>{this.set("value",Math.max(0,this.get("value",0)-1))}),super._afterNew()}_updateChildren(){super._updateChildren();let t=this.get("value",0),e=this.label;if(this.isDirty("value")&&e.set("text",t.toString()),this.isDirty("disabled")){let i=this.get("disabled",!1);this.set("interactive",!i),this.upButton.set("interactive",!i),this.downButton.set("interactive",!i),i?(this.label.set("editOn","none"),this.buttonsContainer.hide(0)):(this.label.set("editOn","click"),this.buttonsContainer.show(0))}}};be.className="NumericStepper";be.classNames=P.classNames.concat([be.className]);var ve=class extends P{constructor(){super(...arguments),this.circle=this.children.push(Yt.new(this._root,{themeTags:["background"]})),this.label=this.children.push(mt.new(this._root,{})),this.slice=this.children.push(Qe.new(this._root,{isMeasured:!1})),this.backgroundSlice=this.children.push(Qe.new(this._root,{themeTags:["background"]}))}_afterNew(){this.addTag("progresspie"),super._afterNew()}_updateChildren(){if(super._updateChildren(),this.isDirty("width")||this.isDirty("height")||this.isDirty("radius")||this.isDirty("innerRadius")){let t=this.innerWidth(),e=this.innerHeight(),i=vt(this.get("radius",F),Math.min(t,e)/2),s=vt(this.get("innerRadius",pt(80)),i);this.slice.setAll({radius:i,innerRadius:s}),this.backgroundSlice.setAll({radius:i,innerRadius:s}),this.circle.set("radius",i)}if(this.isDirty("value")){let t=this.get("value",0);this.slice.set("arc",t*360),this.backgroundSlice.set("arc",360),this.label.setAll({text:this.getNumberFormatter().format(t*100,this.get("numberFormat","#'"))}),this.root.events.once("frameended",()=>{this.label.markDirtyKey("text")})}}};ve.className="ProgressPie";ve.classNames=P.classNames.concat([ve.className]);var Os={};Hs(Os,{load:()=>Js,readBlob:()=>Fs});function Js(g,t,e){return new Promise((i,s)=>{let r=e!=null&&e.responseType=="blob",a=new XMLHttpRequest;if(a.onload=()=>{if(a.status===200){let o,n;if(r){n=a.response,Fs(n).then(d=>{let f={xhr:a,error:!1,response:d,blob:n,type:a.getResponseHeader("Content-Type"),target:t};i(f)});return}else o=a.responseText||a.response;let l={xhr:a,error:!1,response:o,blob:n,type:a.getResponseHeader("Content-Type"),target:t};i(l)}else s({xhr:a,error:!0,type:a.getResponseHeader("Content-Type"),target:t})},a.onerror=()=>{s({xhr:a,error:!0,type:a.getResponseHeader("Content-Type"),target:t})},a.open("GET",g,!0),e&&e.withCredentials&&(a.withCredentials=!0),e!=null){if(e.requestHeaders!=null)for(let o=0;o<e.requestHeaders.length;o++){let n=e.requestHeaders[o];a.setRequestHeader(n.key,n.value)}e.responseType!=null&&(a.responseType=e.responseType)}a.send()})}function Fs(g){return new Promise((t,e)=>{let i=new FileReader;i.onload=s=>{t(i.result)},i.onerror=s=>{e(s)},i.readAsText(g)})}export{Ht as a,wt as b,_t as c,Le as d,Ne as e,ze as f,Re as g,We as h,hi as i,ts as j,te as k,ee as l,ie as m,Yt as n,se as o,re as p,ae as q,kt as r,ut as s,Wt as t,oe as u,ne as v,ft as w,Ct as x,he as y,le as z,ce as A,de as B,ue as C,fe as D,pe as E,Gt as F,Vt as G,Xt as H,me as I,ge as J,_e as K,ye as L,es as M,is as N,ss as O,xe as P,be as Q,ve as R,Os as S};
|
package/dist/cdn/PMRI66RQ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{E as L,F as $,P as y,R,h as x}from"./UUNHAVGJ.js";import{P as b,S as V,d as D,f as E,o as G,q as P,u as w}from"./4ZLIA5OM.js";import{a as S}from"./ND3V4Z4F.js";import{P as M,g as m,o as B}from"./MQYTZX24.js";var c=class extends ${_beforeChanged(){super._beforeChanged(),(this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL"))&&(this._clear=!0)}_draw(){let e=this.width(),t=this.height(),s=e/Math.abs(e),n=t/Math.abs(t),i=0,a=0,l=this.get("strokeWidth",0);this.get("containStroke",!1)&&(e-=s*l,t-=n*l,i+=s*l/2,a+=n*l/2);let r=e,h=t;if(m(r)&&m(h)){let o=Math.min(r,h)/2,u=w(this.get("cornerRadiusTL",8),o),d=w(this.get("cornerRadiusTR",8),o),g=w(this.get("cornerRadiusBR",8),o),_=w(this.get("cornerRadiusBL",8),o),f=Math.min(Math.abs(r/2),Math.abs(h/2));u=x(u,0,f),d=x(d,0,f),g=x(g,0,f),_=x(_,0,f);let p=this._display;p.moveTo(i+u*s,a),p.lineTo(i+r-d*s,a),d>0&&p.arcTo(i+r,a,i+r,a+d*n,d),p.lineTo(i+r,a+h-g*n),g>0&&p.arcTo(i+r,a+h,i+r-g*s,a+h,g),p.lineTo(i+_*s,a+h),_>0&&p.arcTo(i,a+h,i,a+h-_*n,_),p.lineTo(i,a+u*n),u>0&&p.arcTo(i,a,i+u*s,a,u),p.closePath()}}};c.className="RoundedRectangle";c.classNames=$.classNames.concat([c.className]);var v=class extends y{_afterNew(){this._settings.themeTags=b(this._settings.themeTags,["button"]),super._afterNew(),this._setDefaultTagged("background",b(this._settings.themeTags,["background"]),()=>c.new(this._root,{})),this.setPrivate("trustBounds",!0)}_prepareChildren(){if(super._prepareChildren(),this.isDirty("icon")){let e=this._prevSettings.icon,t=this.get("icon");t!==e&&(this._disposeProperty("icon"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.icon=t)}if(this.isDirty("label")){let e=this._prevSettings.label,t=this.get("label");t!==e&&(this._disposeProperty("label"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.label=t)}}};v.className="Button";v.classNames=y.classNames.concat([v.className]);var T=class extends R{_afterNew(){super._afterNew();let e=this.children.push(y.new(this._root,{html:'<textarea class="am5-editable-label"></textarea>',isMeasured:!1}));e.hide(),this.setPrivate("input",e),this._setDefaultTagged("background",["editablelabel","background"],()=>c.new(this._root,{}))}_beforeChanged(){if(super._beforeChanged(),this.isDirty("editOn")){this._editOnEvents&&this._editOnEvents.dispose();let e=this.get("editOn","click");e!="none"&&(this._editOnEvents=new M([this.getPrivate("input").events.on(e,t=>{}),this.events.on(e,t=>{this.set("active",!0)})]))}}_prepareChildren(){super._prepareChildren(),this._maybeInitTextarea()}_updateChildren(){if(super._updateChildren(),this.isDirty("active")){let e=this.get("active",!1);e?this._startEditing():this._stopEditing();let t=this.get("background");t&&t.set("active",e)}this._syncText(),this._syncStyle()}_maybeInitTextarea(){if(!this._isInited()){let e=this.getPrivate("input");if(e&&e.getPrivate("htmlElement")){let s=e.getPrivate("htmlElement").querySelector(".am5-editable-label");s&&(this.setPrivate("textarea",s),s.addEventListener("input",n=>{this.get("multiLine")===!1&&(s.value=s.value.replace(/\n/g," ")),this.set("text",s.value),this._syncStyle()}),s.addEventListener("blur",n=>this.set("active",!1)),E("keyboardevents")&&this._disposers.push(D(document,"keydown",n=>{P(n)=="Escape"&&this.set("active",!1)})),this._disposers.push(D(document,"keydown",n=>{P(n)=="Enter"&&this.get("multiLine")===!1&&(n.preventDefault(),this.set("active",!1))})),this.events.dispatch("inited",{type:"inited",target:this}))}}}_isInited(){return!!this.getPrivate("textarea")}_startEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._startEditing()});return}this._text.set("opacity",0);let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.get("text","")==""&&this.set("text"," "),e.show(0),this.setTimeout(()=>{this._syncStyle(),t.focus()},100))}_stopEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._stopEditing()});return}let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.set("text",t.value),e.hide(0),this._text.set("opacity",1))}_syncStyle(){let e=this.getPrivate("input"),t=this.getPrivate("textarea"),s=e.getPrivate("htmlElement");if(t&&s){let n=window.getComputedStyle(t);B(n,d=>{t.style[d]="initial"}),t.style.color=this.get("fill",V(0)).toCSS(this.get("fillOpacity",1)),t.style.backgroundColor="rgba(0, 0, 0, 0)",t.style.border="none",t.style.outline="none",t.style.padding="0",t.wrap="off",t.style.resize="none",t.style.overflow="hidden";let i=this.get("maxWidth",0)-this.get("paddingLeft",0)-this.get("paddingRight",0);i>0?t.style.maxWidth=i+"px":t.style.minWidth="",t.style.height="auto",t.style.minHeight=t.scrollHeight+"px",this.get("width")&&(t.style.width=this.width()-this.get("paddingLeft",0)-this.get("paddingRight",0)+"px",t.style.minWidth="");let a=this.get("lineHeight");a?a instanceof S?t.style.lineHeight=a.value+"":m(a)&&(t.style.lineHeight=a+""):t.style.lineHeight="1.2";let l=this.get("fontFamily");l||(l=getComputedStyle(s,"font-family").getPropertyValue("font-family")),t.style.fontFamily=l;let r=this.get("fontSize");r?m(r)?r=r+"px":r=r:r=getComputedStyle(s,"font-size").getPropertyValue("font-size"),t.style.fontSize=r;let h=this.get("fontWeight");h?h=h:h=getComputedStyle(s,"font-weight").getPropertyValue("font-weight"),t.style.fontWeight=h;let o=this.get("fontStyle");o?o=o:o=getComputedStyle(s,"font-style").getPropertyValue("font-style"),t.style.fontStyle=o,this.get("oversizedBehavior")=="wrap"?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="nowrap",this._root.events.on("frameended",()=>{t.style.minWidth==""&&(t.style.minWidth=t.scrollWidth+20+"px");let d=this.get("textAlign","start");d=="center"?(t.style.textAlign="center",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-50%)")):d=="end"?(t.style.textAlign="right",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-100%)")):t.style.textAlign=d})}}_syncText(){let e=this.getPrivate("textarea"),t=this.get("text","");t==" "&&(t=""),e&&(e.value=t)}};T.className="EditableLabel";T.classNames=R.classNames.concat([T.className]);var C=class extends y{constructor(){super(...arguments),this.thumb=this._makeThumb(),this.startGrip=this._makeButton(),this.endGrip=this._makeButton(),this._thumbBusy=!1,this._startDown=!1,this._endDown=!1,this._thumbDown=!1}_addOrientationClass(){this._settings.themeTags=b(this._settings.themeTags,["scrollbar",this._settings.orientation]),this._setDefaultTagged("background",b(this._settings.themeTags,["main","background"]),()=>c.new(this._root,{}))}_makeButton(){return this.children.push(v.new(this._root,{themeTags:["resize","button",this.get("orientation")],icon:L.new(this._root,{themeTags:["icon"]})._markC("themeTags")})._markC("themeTags","icon"))}_makeThumb(){return this.children.push(c.new(this._root,{themeTags:["thumb",this.get("orientation")]})._markC("themeTags"))}_handleAnimation(e){e&&this._disposers.push(e.events.on("stopped",()=>{this.setPrivateRaw("isBusy",!1),this._thumbBusy=!1}))}_afterNew(){this._addOrientationClass(),super._afterNew();let e=this.startGrip,t=this.endGrip,s=this.thumb,n=this.get("background");n&&this._disposers.push(n.events.on("click",i=>{this.setPrivateRaw("isBusy",!0);let a=this._display.toLocal(i.point),l=this.width(),r=this.height(),h=this.get("orientation"),o;h=="vertical"?o=(a.y-s.height()/2)/r:o=(a.x-s.width()/2)/l;let u,d;h=="vertical"?(u=o*r,d="y"):(u=o*l,d="x");let g=this.get("animationDuration",0);g>0?(this._thumbBusy=!0,this._handleAnimation(this.thumb.animate({key:d,to:u,duration:g,easing:this.get("animationEasing")}))):(this.thumb._setC(d,u),this._root.events.once("frameended",()=>{this.setPrivateRaw("isBusy",!1)}))})),this._disposers.push(s.events.on("dblclick",i=>{if(!G(i.originalEvent,this))return;let a=this.get("animationDuration",0),l=this.get("animationEasing");this.animate({key:"start",to:0,duration:a,easing:l}),this.animate({key:"end",to:1,duration:a,easing:l})})),this._disposers.push(e.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._startDown=!0,this._gripDown="start"})),this._disposers.push(t.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._endDown=!0,this._gripDown="end"})),this._disposers.push(s.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._thumbDown=!0,this._gripDown=void 0})),this._disposers.push(e.events.on("globalpointerup",()=>{this._startDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._startDown=!1})),this._disposers.push(t.events.on("globalpointerup",()=>{this._endDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._endDown=!1})),this._disposers.push(s.events.on("globalpointerup",()=>{this._thumbDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._thumbDown=!1})),this._disposers.push(e.on("x",()=>{this._updateThumb()})),this._disposers.push(t.on("x",()=>{this._updateThumb()})),this._disposers.push(e.on("y",()=>{this._updateThumb()})),this._disposers.push(t.on("y",()=>{this._updateThumb()})),this._disposers.push(s.events.on("positionchanged",()=>{this._updateGripsByThumb()})),this.get("orientation")=="vertical"?(e._setC("x",0),t._setC("x",0),this._disposers.push(s.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()-s.height()),0))),this._disposers.push(s.adapters.add("x",i=>this.width()/2)),this._disposers.push(e.adapters.add("x",i=>this.width()/2)),this._disposers.push(t.adapters.add("x",i=>this.width()/2)),this._disposers.push(e.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()),0))),this._disposers.push(t.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()),0)))):(e._setC("y",0),t._setC("y",0),this._disposers.push(s.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()-s.width()),0))),this._disposers.push(s.adapters.add("y",i=>this.height()/2)),this._disposers.push(e.adapters.add("y",i=>this.height()/2)),this._disposers.push(t.adapters.add("y",i=>this.height()/2)),this._disposers.push(e.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()),0))),this._disposers.push(t.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()),0))))}_updateChildren(){super._updateChildren(),(this.isDirty("end")||this.isDirty("start")||this._sizeDirty)&&this.updateGrips()}_changed(){if(super._changed(),this.isDirty("start")||this.isDirty("end")){let e="rangechanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,start:this.get("start",0),end:this.get("end",1),grip:this._gripDown})}}_released(){let e="released";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}updateGrips(){let e=this.startGrip,t=this.endGrip,s=this.get("orientation"),n=this.height(),i=this.width();s=="vertical"?(e._setC("y",n*this.get("start",0)),t._setC("y",n*this.get("end",1))):(e._setC("x",i*this.get("start",0)),t._setC("x",i*this.get("end",1)));let a=this.getPrivate("positionTextFunction"),l=Math.round(this.get("start",0)*100),r=Math.round(this.get("end",0)*100),h,o;a?(h=a.call(this,this.get("start",0)),o=a.call(this,this.get("end",0))):(h=l+"%",o=r+"%"),e._setC("ariaLabel",this._t("From %1",void 0,h)),e._setC("ariaValueNow",""+l),e._setC("ariaValueText",l+"%"),e._setC("ariaValueMin","0"),e._setC("ariaValueMax","100"),t._setC("ariaLabel",this._t("To %1",void 0,o)),t._setC("ariaValueNow",""+r),t._setC("ariaValueText",r+"%"),t._setC("ariaValueMin","0"),t._setC("ariaValueMax","100")}_updateThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip,n=this.height(),i=this.width(),a=t.x(),l=s.x(),r=t.y(),h=s.y(),o=0,u=1;this.get("orientation")=="vertical"?m(r)&&m(h)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("height",h-r),e._setC("y",r)),o=r/n,u=h/n):m(a)&&m(l)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("width",l-a),e._setC("x",a)),o=a/i,u=l/i),this.getPrivate("isBusy")&&(this.get("start")!=o||this.get("end")!=u)&&(this._setC("start",o),this._setC("end",u));let d=this.getPrivate("positionTextFunction"),g=Math.round(this.get("start",0)*100),_=Math.round(this.get("end",0)*100),f,p;d?(f=d.call(this,this.get("start",0)),p=d.call(this,this.get("end",0))):(f=g+"%",p=_+"%"),e._setC("ariaLabel",this._t("From %1 to %2",void 0,f,p)),e._setC("ariaValueNow",""+g),e._setC("ariaValueText",g+"%")}_updateGripsByThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip;if(this.get("orientation")=="vertical"){let n=e.height();t._setC("y",e.y()),s._setC("y",e.y()+n)}else{let n=e.width();t._setC("x",e.x()),s._setC("x",e.x()+n)}}};C.className="Scrollbar";C.classNames=y.classNames.concat([C.className]);export{c as a,v as b,T as c,C as d};
|