UNPKG

@arcgis/map-components

Version:
2 lines 160 kB
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */ import{a as Xe}from"./ACQRIVIF.js";import{a as kt,b as At,c as gi,d as Ve}from"./2AZXE2Y3.js";import{A as V,C as ci,E as B,F as wt,H as di,I as ui,J as fi,K as J,L as pi,P as C,Q as mi,R as at,T as vs,c as yt,e as jt,ga as We,h as j,i as xt,k as bt,l as gs,m as _s,o as Me,r as ys,s as xs,u as Lt,y as P,z as Ge}from"./ID7AT6M5.js";import{A as Ut,B as ai,C as ls,D as oi,E as cs,F as ni,G as hi,H as ds,I as us,J as fs,K as Se,L as De,M as ps,O as U,R as K,S as L,W as li,c as is,d as $,e as He,f as ct,h as Ye,i as ss,j as Ie,l as Te,m as rs,n as ri,o as as,p as Bt,q as _t,r as os,s as I,t as ns,u as Pt,v as hs,w as H,x as Ce}from"./XDQDTW2I.js";import{a as Z,b as pt,d as N,e as Dt,f as ii}from"./XENQYCEN.js";import{D as Wt,F as we,G as Vt,I as Qi,J as W,K as ts,M as es,N as ht,O as si,P as lt,R as ke,S as ms,T as bs,W as vt,b as X,d as qi,f as mt,g as M,h as Mt,i as ye,j as gt,k as Et,m as Zi,n as Ki,o as v,q as xe,r as $t,s as be,t as Ji,u as ve,v as Gt}from"./ZJXSHJF2.js";import{a as Ls}from"./3TTFCHAA.js";var _i=class{constructor(){this._targets=[],this._observer=new ResizeObserver(t=>{v(t,e=>{v(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),Wt(this._targets,e=>e.target!==t)}},je=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,v(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){Wt(this._targets,e=>e.target!==t),this._targets.length===0&&this._timer!==null&&(cancelAnimationFrame(this._timer),this._timer=null)}};je.delay=200;var Ue=null;function As(){return Ue===null&&(typeof ResizeObserver<"u"?Ue=new _i:Ue=new je),Ue}var qe=class{constructor(t,e){this._disposed=!1,this._sensor=As(),this._element=t,this._listener=He(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 Nt=class extends P{};Nt.className="InterfaceColors";Nt.classNames=P.classNames.concat([Nt.className]);var dt=class extends B{_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=j(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,c=t,m=0,l=t,d=e,h=0,p=e,_=(s-o)*(d-n)-(r-n)*(l-o),u=(s-h)*(m-p)-(r-p)*(c-h),f=this._display;if(f.moveTo(i,0),_>0&&u>0){let b=Math.round(j(s,i+a,t-a-i));r=j(r,-1/0,0),f.lineTo(b-a,0),f.lineTo(s,r),f.lineTo(b+a,0)}if(f.lineTo(t-i,0),f.arcTo(t,0,t,i,i),_>0&&u<0){let b=Math.round(j(r,i+a,e-a-i));s=j(s,t,1/0),f.lineTo(t,i),f.lineTo(t,Math.max(b-a,i)),f.lineTo(s,r),f.lineTo(t,b+a)}if(f.lineTo(t,e-i),f.arcTo(t,e,t-i,e,i),_<0&&u<0){let b=Math.round(j(s,i+a,t-a-i));r=j(r,e,1/0),f.lineTo(t-i,e),f.lineTo(b+a,e),f.lineTo(s,r),f.lineTo(b-a,e)}if(f.lineTo(i,e),f.arcTo(0,e,0,e-i,i),_<0&&u>0){let b=Math.round(j(r,i+a,e-i-a));s=j(s,-1/0,0),f.lineTo(0,e-i),f.lineTo(0,b+a),f.lineTo(s,r),f.lineTo(0,Math.max(b-a,i))}f.lineTo(0,i),f.arcTo(0,0,i,0,i),f.closePath()}}}};dt.className="PointedRectangle";dt.classNames=B.classNames.concat([dt.className]);var ot=class extends C{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=U(this._settings.themeTags,["tooltip"]),super._afterNew(),this._setDefaultFn("background",()=>dt.new(this._root,{})).set("themeTags",["tooltip","background"]),this._label=this.children.push(at.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",e=>{e&&(this._disposers.push($(e,"pointerover",i=>{this._htmlContentHovered=!0})),this._disposers.push($(e,"pointerout",i=>{this._htmlContentHovered=!1})))})),this.on("visible",e=>{this._handleReaderAnnouncement()}),this.label.events.on("dataitemchanged",e=>{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(),$t(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 lt([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($(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.set("fill",i),this._fillDp=t.on("fill",r=>{r!=null&&(e.set("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.set("fillGradient",r),this._fillGrDp=t.on("fillGradient",a=>{a!=null&&e.set("fillGradient",a)}),this._disposers.push(this._fillGrDp)}this.get("getStrokeFromSprite")&&(this._strokeDp&&this._strokeDp.dispose(),i!=null&&e.set("stroke",i),this._strokeDp=t.on("fill",r=>{r!=null&&e.set("stroke",r)}),this._disposers.push(this._strokeDp)),this.get("getLabelFillFromSprite")&&(this._labelDp&&this._labelDp.dispose(),i!=null&&this.label.set("fill",i),this._labelDp=t.on("fill",r=>{r!=null&&this.label.set("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 L&&this.label.set("fill",L.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 Z&&(e=s.value);let r=this.get("centerY");r instanceof Z&&(i=r.value);let a=t.width(),o=t.height(),n=this.parent,c=0,m=0;if(n){c=n.x(),m=n.y();let S=n.get("layerMargin");S&&(c+=S.left||0,m+=S.top||0,a+=(S.left||0)+(S.right||0),o+=(S.top||0)+(S.bottom||0))}let l=this.get("bounds",{left:-c,top:-m,right:a-c,bottom:o-m});this._updateBounds();let d=this.width(),h=this.height();d===0&&(d=this._w),h===0&&(h=this._h);let p=this.get("pointTo",{x:a/2,y:o/2}),_=p.x,u=p.y,f=this.get("pointerOrientation"),b=this.get("background"),x=0,y=0,w=0;b instanceof dt&&(x=b.get("pointerLength",0),y=b.get("strokeWidth",0)/2,w=y,b.set("width",d),b.set("height",h));let T=0,k=0,E=l.right-l.left,O=l.bottom-l.top;f=="horizontal"||f=="left"||f=="right"?(y=0,f=="horizontal"?_>l.left+E/2?(_-=d*(1-e)+x,w*=-1):_+=d*e+x:f=="left"?_+=d*(1-e)+x:(_-=d*e+x,w*=-1)):(w=0,f=="vertical"?u>l.top+h/2+x?u-=h*(1-i)+x:(u+=h*i+x,y*=-1):f=="down"?u-=h*(1-i)+x:(u+=h*i+x,y*=-1)),_=j(_,l.left+d*e,l.left+E-d*(1-e))+w,u=j(u,l.top+h*i,l.top+O-h*(1-i))-y,T=p.x-_+d*e+w,k=p.y-u+h*i-y,this._fx=_,this._fy=u;let D=this.get("animationDuration",0);if(D>0&&this.get("visible")&&this.get("opacity")>.1){let S=this.get("animationEasing");this.animate({key:"x",to:_,duration:D,easing:S}),this.animate({key:"y",to:u,duration:D,easing:S})}else this.set("x",_),this.set("y",u);b instanceof dt&&(b.set("pointerX",T),b.set("pointerY",k)),d>0&&(this._w=d),h>0&&(this._h=h)}}};ot.className="Tooltip";ot.classNames=C.classNames.concat([ot.className]);var Ee=class extends P{_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||mt(e)&&e.toLowerCase()==="number")&&(e=this.get("numberFormat",""));let s,r=Number(t);if(Mt(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=Ut(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=Qi(o),o.decimals.active=r==0?0:i),s=o.template.split(gt).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("||",Et);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],W(r,(o,n)=>{if(n.parsed)return;let c=n.source;c.toLowerCase()==="number"&&(c=this.get("numberFormat","#,###.#####"));let m=J.chunk(c,!0);for(let l=0;l<m.length;l++){let d=m[l];if(d.text=d.text.replace(Et,"|"),d.type==="value"){let h=d.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESP‰!]?/);if(h)if(h===null||h[0]==="")n.template+=d.text;else{let p=h[0].match(/[abespABESP%‰!]{2}|[abespABESP%‰]{1}$/);p&&(n.mod=p[0].toLowerCase(),n.modSpacing=!!h[0].match(/[ ]{1}[abespABESP%‰!]{1}$/));let _=h[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+=d.text.split(h[0]).join(gt)}}else n.template+=d.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 l=this.applyPrefix(t,this.get("bytePrefixes"),a.indexOf("!")!==-1);t=l[0],s=l[1],r=l[2],e.modSpacing&&(r=" "+r)}else if(a.indexOf("a")!==-1){let l=this.applyPrefix(t,t<this.get("smallNumberThreshold")?this.get("smallNumberPrefixes"):this.get("bigNumberPrefixes"),a.indexOf("!")!==-1);t=l[0],s=l[1],r=l[2],e.modSpacing&&(r=" "+r)}else if(a.indexOf("p")!==-1){let l=Math.min(t.toString().length+2,21);t=parseFloat(t.toPrecision(l)),s=this._root.language.translate("_percentPrefix"),r=this._root.language.translate("_percentSuffix"),s==""&&r==""&&(r="%")}else if(a.indexOf("%")!==-1){let l=Math.min(t.toString().length+2,21);t*=100,t=parseFloat(t.toPrecision(l)),r="%"}else if(a.indexOf("\u2030")!==-1){let l=Math.min(t.toString().length+3,21);t*=1e3,t=parseFloat(t.toPrecision(l)),r="\u2030"}if(a.indexOf("e")!==-1){let l;e.decimals.passive>=0?l=t.toExponential(e.decimals.passive).split("e"):l=t.toExponential().split("e"),t=Number(l[0]),r="e"+l[1],e.modSpacing&&(r=" "+r)}else if(e.decimals.passive===0)t=Math.round(t);else if(e.decimals.passive>0){let l=hs(t);if(l>0){let d=Math.pow(10,e.decimals.passive);t=Math.round(parseFloat((t*d).toFixed(l)))/d}}let o="",n=qi(t).split("."),c=n[0];if(c.length<e.thousands.active&&(c=Array(e.thousands.active-c.length+1).join("0")+c),e.thousands.interval>0){let l=[],d=c.split("").reverse().join("");for(let h=0,p=c.length;h<=p;h+=e.thousands.interval){let _=d.substr(h,e.thousands.interval).split("").reverse().join("");_!==""&&l.unshift(_)}c=l.join(e.thousands.separator)}o+=c,n.length===1&&n.push("");let m=n[1];return m.length<e.decimals.active&&(m+=Array(e.decimals.active-m.length+1).join("0")),m!==""&&(o+=e.decimals.separator+m),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 c=0,m=e.length;c<m;c++)e[c].number<=t&&(e[c].number===0?s=0:(s=t/e[c].number,n=e[c].number),r=e[c].prefix,a=e[c].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("||",Et)}unescape(t){return t.replace(Et,"|")}};function ks(g,t){let e=0,i=0,s=1,r=0,a=0,o=0,n=0,c=0;return g.formatToParts(t).forEach(m=>{switch(m.type){case"year":e=+m.value;break;case"month":i=+m.value-1;break;case"day":s=+m.value;break;case"hour":r=+m.value;break;case"minute":a=+m.value;break;case"second":o=+m.value;break;case"fractionalSecond":n=+m.value;break;case"weekday":switch(m.value){case"Sun":c=0;break;case"Mon":c=1;break;case"Tue":c=2;break;case"Wed":c=3;break;case"Thu":c=4;break;case"Fri":c=5;break;case"Sat":c=6;break}}}),r===24&&(r=0),{year:e,month:i,day:s,hour:r,minute:a,second:o,millisecond:n,weekday:c}}function ws(g,t){let{year:e,month:i,day:s,hour:r,minute:a,second:o,millisecond:n}=ks(g,t);return Date.UTC(e,i,s,r,a,o,n)}var $e=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=ws(this._utc,t),i=ws(this._dtf,t);return(e-i)/6e4}parseDate(t){return ks(this._dtf,t)}};var Be=class extends P{_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(Mt(e))try{let c=this.get("intlLocales");return c?new Intl.DateTimeFormat(c,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)),M(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,c,m,l,d,h,p=t.getTime();this._root.utc&&!i?(a=t.getUTCFullYear(),o=t.getUTCMonth(),n=t.getUTCDay(),c=t.getUTCDate(),m=t.getUTCHours(),l=t.getUTCMinutes(),d=t.getUTCSeconds(),h=t.getUTCMilliseconds()):(a=t.getFullYear(),o=t.getMonth(),n=t.getDay(),c=t.getDate(),m=t.getHours(),l=t.getMinutes(),d=t.getSeconds(),h=t.getMilliseconds());for(let _=0,u=e.parts.length;_<u;_++){let f="";switch(e.parts[_]){case"G":f=this._t(a<0?"_era_bc":"_era_ad");break;case"yyyy":f=Math.abs(a).toString(),a<0&&(f+=this._t("_era_bc"));break;case"yyy":case"yy":case"y":f=Math.abs(a).toString().substr(-e.parts[_].length),a<0&&(f+=this._t("_era_bc"));break;case"YYYY":case"YYY":case"YY":case"Y":let b=ds(t,this._root.utc);e.parts[_]=="YYYY"?f=Math.abs(b).toString():f=Math.abs(b).toString().substr(-e.parts[_].length),b<0&&(f+=this._t("_era_bc"));break;case"u":break;case"q":f=""+Math.ceil((t.getMonth()+1)/3);break;case"MMMMM":f=this._t(this._getMonth(o)).substr(0,1);break;case"MMMM":f=this._t(this._getMonth(o));break;case"MMM":f=this._t(this._getShortMonth(o));break;case"MM":f=H(o+1,2,"0");break;case"M":f=(o+1).toString();break;case"ww":f=H(hi(t,this._root.utc),2,"0");break;case"w":f=hi(t,this._root.utc).toString();break;case"W":f=us(t,this._root.utc).toString();break;case"dd":f=H(c,2,"0");break;case"d":f=c.toString();break;case"DD":case"DDD":f=H(ni(t,this._root.utc).toString(),e.parts[_].length,"0");break;case"D":f=ni(t,this._root.utc).toString();break;case"F":break;case"g":break;case"t":f=this._root.language.translateFunc("_dateOrd").call(this,c);break;case"E":f=(n||7).toString();break;case"EE":f=H((n||7).toString(),2,"0");break;case"EEE":case"eee":f=this._t(this._getShortWeekday(n));break;case"EEEE":case"eeee":f=this._t(this._getWeekday(n));break;case"EEEEE":case"eeeee":f=this._t(this._getShortWeekday(n)).substr(0,1);break;case"e":case"ee":f=(n-(this._root.locale.firstDayOfWeek||1)+1).toString(),e.parts[_]=="ee"&&(f=H(f,2,"0"));break;case"a":m>=12?f=this._t("PM"):f=this._t("AM");break;case"aa":m>=12?f=this._t("P.M."):f=this._t("A.M.");break;case"aaa":m>=12?f=this._t("P"):f=this._t("A");break;case"h":f=Se(m).toString();break;case"hh":f=H(Se(m),2,"0");break;case"H":f=m.toString();break;case"HH":f=H(m,2,"0");break;case"K":f=Se(m,0).toString();break;case"KK":f=H(Se(m,0),2,"0");break;case"k":f=(m+1).toString();break;case"kk":f=H(m+1,2,"0");break;case"m":f=l.toString();break;case"mm":f=H(l,2,"0");break;case"s":f=d.toString();break;case"ss":f=H(d,2,"0");break;case"S":case"SS":case"SSS":f=Math.round(h/1e3*Math.pow(10,e.parts[_].length)).toString();break;case"x":f=p.toString();break;case"n":case"nn":case"nnn":f=H(h,e.parts[_].length,"0");break;case"z":f=De(s||t,!1,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;case"zz":f=De(s||t,!0,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case"zzz":f=De(s||t,!1,!0,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;case"zzzz":f=De(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 $e&&(x=x.name);let y=x?ps(x,s||t):t.getTimezoneOffset(),w=Math.abs(y)/60,T=Math.floor(w),k=w*60-T*60;this._root.utc&&(T=0,k=0),e.parts[_]=="Z"?(f="GMT",f+=y>0?"-":"+",f+=H(T,2)+":"+H(k,2)):(f=y>0?"-":"+",f+=H(T,2)+H(k,2));break;case"i":f=t.toISOString();break;case"I":f=t.toUTCString();break}r=r.replace(gt,f)}return r}parseFormat(t){let e={template:"",parts:[]},i=J.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");mt(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],gt)}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(M(t))return new Date(t);if(e=="x")return new Date(parseInt(t));mt(t)||(t=t.toString());let s,r="";e=Ut(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},c=0,m=0;for(let h=0;h<a.parts.length;h++){switch(m=h+c+1,a.parts[h]){case"yyyy":case"YYYY":r+="([0-9]{4})",o.year=m;break;case"yyy":case"YYY":r+="([0-9]{3})",o.year3=m;break;case"yy":case"YY":r+="([0-9]{2})",o.year2=m;break;case"y":case"Y":r+="([0-9]{1})",o.year1=m;break;case"MMMM":r+="("+this.getStringList(this._months()).join("|")+")",o.monthLong=m;break;case"MMM":r+="("+this.getStringList(this._shortMonths()).join("|")+")",o.monthShort=m;break;case"MM":case"M":r+="([0-9]{2}|[0-9]{1})",o.month=m;break;case"ww":case"w":r+="([0-9]{2}|[0-9]{1})",o.week=m;break;case"dd":case"d":r+="([0-9]{2}|[0-9]{1})",o.day=m;break;case"DDD":case"DD":case"D":r+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.yearDay=m;break;case"dddd":r+="("+this.getStringList(this._weekdays()).join("|")+")",o.weekdayLong=m;break;case"ddd":r+="("+this.getStringList(this._shortWeekdays()).join("|")+")",o.weekdayShort=m;break;case"aaa":case"aa":case"a":r+="("+this.getStringList(["AM","PM","A.M.","P.M.","A","P"]).join("|")+")",o.am=m;break;case"hh":case"h":r+="([0-9]{2}|[0-9]{1})",o.hour12Base1=m;break;case"HH":case"H":r+="([0-9]{2}|[0-9]{1})",o.hourBase0=m;break;case"KK":case"K":r+="([0-9]{2}|[0-9]{1})",o.hour12Base0=m;break;case"kk":case"k":r+="([0-9]{2}|[0-9]{1})",o.hourBase1=m;break;case"mm":case"m":r+="([0-9]{2}|[0-9]{1})",o.minute=m;break;case"ss":case"s":r+="([0-9]{2}|[0-9]{1})",o.second=m;break;case"SSS":case"SS":case"S":r+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.millisecond=m,o.millisecondDigits=a.parts[h].length;break;case"nnn":case"nn":case"n":r+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.millisecond=m;break;case"x":r+="([0-9]{1,})",o.timestamp=m;break;case"Z":r+="GMT([-+]+[0-9]{2}:[0-9]{2})",o.zone=m;break;case"ZZ":r+="([\\-+]+[0-9]{2}[0-9]{2})",o.zone=m;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=m,c+=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":c--;break}r+="[^0-9]*"}let l=new RegExp(r),d=t.match(l);if(d){if(o.year>-1&&(n.year=parseInt(d[o.year])),o.year3>-1){let h=parseInt(d[o.year3]);h+=1e3,n.year=h}if(o.year2>-1){let h=parseInt(d[o.year2]);h>50?h+=1e3:h+=2e3,n.year=h}if(o.year1>-1){let h=parseInt(d[o.year1]);h=Math.floor(new Date().getFullYear()/10)*10+h,n.year=h}if(o.monthLong>-1&&(n.month=this.resolveMonth(d[o.monthLong])),o.monthShort>-1&&(n.month=this.resolveShortMonth(d[o.monthShort])),o.month>-1&&(n.month=parseInt(d[o.month])-1),o.week>-1&&o.day===-1&&(n.month=0,n.day=fs(parseInt(d[o.week]),n.year,1,i)),o.day>-1&&(n.day=parseInt(d[o.day])),o.yearDay>-1&&(n.month=0,n.day=parseInt(d[o.yearDay])),o.hourBase0>-1&&(n.hour=parseInt(d[o.hourBase0])),o.hourBase1>-1&&(n.hour=parseInt(d[o.hourBase1])-1),o.hour12Base0>-1){let h=parseInt(d[o.hour12Base0]);h==11&&(h=0),o.am>-1&&!this.isAm(d[o.am])&&(h+=12),n.hour=h}if(o.hour12Base1>-1){let h=parseInt(d[o.hour12Base1]);h==12&&(h=0),o.am>-1&&!this.isAm(d[o.am])&&(h+=12),n.hour=h}if(o.minute>-1&&(n.minute=parseInt(d[o.minute])),o.second>-1&&(n.second=parseInt(d[o.second])),o.millisecond>-1){let h=parseInt(d[o.millisecond]);o.millisecondDigits==2?h*=10:o.millisecondDigits==1&&(h*=100),n.millisecond=h}if(o.timestamp>-1){n.timestamp=parseInt(d[o.timestamp]);let h=new Date(n.timestamp);n.year=h.getUTCFullYear(),n.month=h.getUTCMonth(),n.day=h.getUTCDate(),n.hour=h.getUTCHours(),n.minute=h.getUTCMinutes(),n.second=h.getUTCSeconds(),n.millisecond=h.getUTCMilliseconds()}o.zone>-1&&(n.offset=this.resolveTimezoneOffset(new Date(n.year,n.month,n.day),d[o.zone])),o.iso>-1&&(n.year=X(d[o.iso+0]),n.month=X(d[o.iso+1])-1,n.day=X(d[o.iso+2]),n.hour=X(d[o.iso+3]),n.minute=X(d[o.iso+4]),n.second=X(d[o.iso+5]),n.millisecond=X(d[o.iso+6]),d[o.iso+7]=="Z"||d[o.iso+7]=="z"?n.utc=!0:d[o.iso+7]!=""&&(n.offset=this.resolveTimezoneOffset(new Date(n.year,n.month,n.day),d[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 c=(t||new Date).getTimezoneOffset();return n-c}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(oi(this._t(t[i]))):e.push(oi(t[i]));return e}};var Pe=class extends P{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",c="_second",m="_minute",l="_hour",d="_day",h="_week",p="_week",_="_year";this._setDefault("negativeBase",0),this._setDefault("baseUnit","second"),this._setDefault("durationFormats",{millisecond:{millisecond:this._t(t),second:this._t(t+c),minute:this._t(t+m),hour:this._t(t+l),day:this._t(t+d),week:this._t(t+h),month:this._t(t+p),year:this._t(t+_)},second:{second:this._t(e),minute:this._t(e+m),hour:this._t(e+l),day:this._t(e+d),week:this._t(e+h),month:this._t(e+p),year:this._t(e+_)},minute:{minute:this._t(i),hour:this._t(i+l),day:this._t(i+d),week:this._t(i+h),month:this._t(i+p),year:this._t(i+_)},hour:{hour:this._t(s),day:this._t(s+d),week:this._t(s+h),month:this._t(s+p),year:this._t(s+_)},day:{day:this._t(r),week:this._t(r+h),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(X(t),void 0,s)),e=Ut(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("||",Et);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],W(s,(a,o)=>{if(o.parsed)return;let n=o.source,c=[];c=o.source.match(/^\[([^\]]*)\]/),c&&c.length&&c[0]!==""&&(n=o.source.substr(c[0].length),o.color=c[1]);let m=J.chunk(n,!0);for(let l=0;l<m.length;l++){let d=m[l];if(d.text=d.text.replace(Et,"|"),d.type==="value"){d.text.match(/[yYMdDwhHKkmsSn]+a/)&&(o.absolute=!0,d.text=d.text.replace(/([yYMdDwhHKkmsSn]+)a/,"$1"));let h=d.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);if(h)for(let p=0;p<h.length;p++)h[p]==null&&(h[p]=this._unitAliases[h[p]]),o.parts.push(h[p]),d.text=d.text.replace(h[p],gt)}o.template+=d.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 c=e.parts[o],m=this._toTimeUnit(c.substr(0,1)),l,d=this._getUnitValue(m);o<n-1?l=Math.floor(s/d):l=Math.round(s/d),a[m]+=l,s-=l*d}W(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 c=e.parts[o],m=this._toTimeUnit(c.substr(0,1)),l=c.length;r=r.replace(gt,H(a[m],l,"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 ts(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 Ze={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 Ke=class extends P{_setDefaults(){this.setPrivate("defaultLocale",Ze),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){W(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:Ki(t,i=>this.translate(i,e))}isDefault(){return this.getPrivate("defaultLocale")===this._root.locale}};var qt=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 Ns=(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(c){r=!0,a=c}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")}})(),Le=Math.PI*2,yi=function(t,e,i,s,r,a,o){var n=t.x,c=t.y;n*=e,c*=i;var m=s*n-r*c,l=r*n+s*c;return{x:m+a,y:l+o}},Fs=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}]},Ts=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)},zs=function(t,e,i,s,r,a,o,n,c,m,l,d){var h=Math.pow(r,2),p=Math.pow(a,2),_=Math.pow(l,2),u=Math.pow(d,2),f=h*p-h*u-p*_;f<0&&(f=0),f/=h*u+p*_,f=Math.sqrt(f)*(o===n?-1:1);var b=f*r/a*d,x=f*-a/r*l,y=m*b-c*x+(t+i)/2,w=c*b+m*x+(e+s)/2,T=(l-b)/r,k=(d-x)/a,E=(-l-b)/r,O=(-d-x)/a,D=Ts(1,0,T,k),S=Ts(T,k,E,O);return n===0&&S>0&&(S-=Le),n===1&&S<0&&(S+=Le),[y,w,D,S]},Rs=function(t){var e=t.px,i=t.py,s=t.cx,r=t.cy,a=t.rx,o=t.ry,n=t.xAxisRotation,c=n===void 0?0:n,m=t.largeArcFlag,l=m===void 0?0:m,d=t.sweepFlag,h=d===void 0?0:d,p=[];if(a===0||o===0)return[];var _=Math.sin(c*Le/360),u=Math.cos(c*Le/360),f=u*(e-s)/2+_*(i-r)/2,b=-_*(e-s)/2+u*(i-r)/2;if(f===0&&b===0)return[];a=Math.abs(a),o=Math.abs(o);var x=Math.pow(f,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=zs(e,i,s,r,a,o,l,h,_,u,f,b),w=Ns(y,4),T=w[0],k=w[1],E=w[2],O=w[3],D=Math.abs(O)/(Le/4);Math.abs(1-D)<1e-7&&(D=1);var S=Math.max(Math.ceil(D),1);O/=S;for(var Y=0;Y<S;Y++)p.push(Fs(E,O)),E+=O;return p.map(function(F){var Xt=yi(F[0],a,o,u,_,T,k),G=Xt.x,Oe=Xt.y,A=yi(F[1],a,o,u,_,T,k),et=A.x,nt=A.y,ft=yi(F[2],a,o,u,_,T,k),ge=ft.x,rt=ft.y;return{x1:G,y1:Oe,x2:et,y2:nt,x:ge,y:rt}})},Cs=Rs;function Os(g,t,e){if(t!==e)throw new Error("Required "+e+" arguments for "+g+" but got "+t)}function Ae(g,t,e){if(t<e)throw new Error("Required at least "+e+" arguments for "+g+" but got "+t)}function tt(g,t,e){if(Ae(g,t,e),t%e!==0)throw new Error("Arguments for "+g+" must be in pairs of "+e)}function Hs(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 Ss(g){if(g===0||g===1)return g;throw new Error("Flag must be 0 or 1")}function Ys(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 Je(g,t){for(;!(g.interactive&&!t(g));)if(g._parent)g=g._parent;else break}function Is(g,t,e){return $(g,Ie(t),i=>{let s=ri(i),r=i.touches;r?(r.length==0&&(r=i.changedTouches),e(Gt(r),s)):e([i],s)})}function Ds(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 Ne(g){g.width=0,g.height=0,g.style.width="0px",g.style.height="0px"}function Ms(g){return Math.floor(g)+.5}var xi=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}},Zt=class extends es{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 xi,this._localMatrix=new qt,this._matrix=new qt,this._uMatrix=new qt,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&&Bt(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 ht(()=>{})}_setMatrix(){this._localMatrix.setTransform(this.x,this.y,this.pivot.x,this.pivot.y,this.angle*Math.PI/180,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=Ms(s),r=Ms(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.layers,a=this._renderer._ghostLayer,o=a.context,n=this.mask;n&&n._setMatrix(),v(r,c=>{if(c){let m=c.context;m.save(),n&&(n._transformLayer(m,s,c),n._runPath(m),m.clip()),m.globalAlpha=this.compoundAlpha*this.alpha,this._transformLayer(m,s,c),this.filter&&(m.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&&Ji(this._renderer._deferredGhostLayers,i.layer.order),this._render(i,e),o.restore(),v(r,c=>{c&&c.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}},bi=class extends Zt{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,be(this._children,t)}_render(t,e){super._render(t);let i=this._renderer;this.interactive&&this.interactiveChildren&&++i._forceInteractive,v(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=[]),ve(this._childLayers,t),this._parent&&this._parent.registerChildLayer(t)}markDirtyLayer(t=!1){super.markDirtyLayer(),t&&this._childLayers&&v(this._childLayers,e=>e.dirty=!0)}_dispose(){super._dispose(),this._childLayers&&v(this._childLayers,t=>{t.dirty=!0})}};function z(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 R=class{colorize(t,e){}colorizeGhost(t,e){this.colorize(t,e)}path(t){}pathGhost(t){this.path(t)}addBounds(t){}},vi=class extends R{colorize(t,e){t.beginPath()}},Fe=class extends R{constructor(t){super(),this.color=t}colorize(t,e){e!==void 0?t.fillStyle=e:t.fillStyle=this.color}},wi=class extends R{constructor(t){super(),this.clearShadow=t}colorize(t,e){t.fill(),this.clearShadow&&(t.shadowColor="",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}},ki=class extends R{colorize(t,e){t.stroke()}},ze=class extends R{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)}},Ti=class extends R{constructor(t){super(),this.dash=t}colorize(t,e){t.setLineDash(this.dash)}},Ci=class extends R{constructor(t){super(),this.dashOffset=t}colorize(t,e){t.lineDashOffset=this.dashOffset}},Si=class extends R{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;z(t,{x:e,y:i}),z(t,{x:s,y:i}),z(t,{x:e,y:r}),z(t,{x:s,y:r})}},Di=class extends R{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){z(t,{x:this.x-this.radius,y:this.y-this.radius}),z(t,{x:this.x+this.radius,y:this.y+this.radius})}},Mi=class extends R{constructor(t,e,i,s){super(),this.x=t,this.y=e,this.radiusX=i,thi