@arcgis/charts-components 5.2.0-next.85 → 5.2.0-next.87
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/{YAWW63A5.js → 2Y4OUUMJ.js} +1 -1
- package/dist/cdn/{MJHVSD5B.js → 32KKW2IG.js} +1 -1
- package/dist/cdn/{2MF442VT.js → 3N6RFNEA.js} +1 -1
- package/dist/cdn/{KG574LAE.js → 3ZF4RSY4.js} +1 -1
- package/dist/cdn/{XHZAAQMF.js → 5EU4GHSG.js} +1 -1
- package/dist/cdn/{R5VDQBUH.js → 5LKJE2PR.js} +1 -1
- package/dist/cdn/{LCTDNI27.js → 6AWJXWDQ.js} +1 -1
- package/dist/cdn/7U6OEWTI.js +2 -0
- package/dist/cdn/{KHJC5P5T.js → AL6VZ6UZ.js} +1 -1
- package/dist/cdn/{IVM37XFX.js → APU26Y2Z.js} +1 -1
- package/dist/cdn/AWN3K3IH.js +2 -0
- package/dist/cdn/DNHE5ZCA.js +2 -0
- package/dist/cdn/DV7I4E5D.js +2 -0
- package/dist/cdn/EHYBMIDH.js +2 -0
- package/dist/cdn/FF46DEA7.js +2 -0
- package/dist/cdn/HX4HUXZP.js +2 -0
- package/dist/cdn/{JQM5R6XW.js → IG43EKA6.js} +1 -1
- package/dist/cdn/{FRTPDJGW.js → KE4AIHA7.js} +1 -1
- package/dist/cdn/{4U2HIMOR.js → LYSF2KY5.js} +1 -1
- package/dist/cdn/{CFOB77PI.js → N634G5MT.js} +1 -1
- package/dist/cdn/{NH2A5QEU.js → OADNRXFH.js} +1 -1
- package/dist/cdn/OGGEEHV2.js +2 -0
- package/dist/cdn/{GX64OP3A.js → OWYKZMAE.js} +1 -1
- package/dist/cdn/{3SSQPYQA.js → PDHWZPY5.js} +1 -1
- package/dist/cdn/{NIDXK3GN.js → PK7GYSIR.js} +1 -1
- package/dist/cdn/{7JA63ENU.js → PTGBFACY.js} +2 -2
- package/dist/cdn/QJFHIO72.js +2 -0
- package/dist/cdn/{PMTNALXO.js → R3XOXHKQ.js} +1 -1
- package/dist/cdn/{7SIKOCYK.js → R6RFH2KK.js} +1 -1
- package/dist/cdn/{EYYTKCXM.js → T6OTQUMI.js} +1 -1
- package/dist/cdn/{FQKGQHVK.js → TMLVMG4C.js} +1 -1
- package/dist/cdn/{4KF7SUJE.js → TVW2GMA6.js} +1 -1
- package/dist/cdn/{CVWT6DGY.js → UOL7KBJK.js} +1 -1
- package/dist/cdn/{HOASAQAB.js → VNWPA5A2.js} +1 -1
- package/dist/cdn/XHSD437D.js +2 -0
- package/dist/cdn/{XU7TGV75.js → XQRGIPLK.js} +1 -1
- package/dist/cdn/{DW5NK2B3.js → ZG3WNUBC.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/model/shared/setup-utils.js +1 -1
- package/dist/chart-rendering/common/interfaces.d.ts +1 -5
- package/dist/chunks/bar-chart-model.js +8 -4
- package/dist/chunks/box-plot-data.js +138 -112
- package/dist/chunks/box-plot-model.js +131 -133
- package/dist/chunks/combo-bar-line-chart-model.js +115 -102
- package/dist/chunks/line-chart-model.js +33 -17
- package/dist/chunks/model-setter.js +43 -71
- package/dist/chunks/model-with-line-marker-styling.js +59 -43
- package/dist/chunks/negative-values-stacked-to-baseline.js +111 -64
- package/dist/chunks/radar-chart-model.js +26 -10
- package/dist/chunks/rounded-corners.js +47 -30
- package/dist/components/arcgis-chart/customElement.js +4 -3
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/model/bar-chart-model/bar-chart-model.d.ts +2 -2
- package/dist/model/box-plot-model/box-plot-model.d.ts +4 -4
- package/dist/model/combo-bar-line-chart-model/combo-bar-line-chart-model.d.ts +14 -14
- package/dist/model/mixins/model-with-line-marker-styling.d.ts +12 -12
- package/package.json +6 -6
- package/dist/cdn/72VGCAR5.js +0 -2
- package/dist/cdn/DE3CJJG3.js +0 -2
- package/dist/cdn/EZLKMWI5.js +0 -2
- package/dist/cdn/JMMNRCD4.js +0 -2
- package/dist/cdn/JUU3BZT7.js +0 -2
- package/dist/cdn/LMTSW3JM.js +0 -2
- package/dist/cdn/TBW6K2TY.js +0 -2
- package/dist/cdn/TSU6UVTL.js +0 -2
- package/dist/cdn/ZDUW3TBJ.js +0 -2
- package/dist/cdn/ZGIM53IQ.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as Sa}from"./3VMHKSYP.js";import{b as Vb}from"./L5JZ5COY.js";import o from"./
|
|
2
|
+
import{a as Sa}from"./3VMHKSYP.js";import{b as Vb}from"./L5JZ5COY.js";import o from"./R6RFH2KK.js";import{a as fP,g as mP}from"./OBPAQN4H.js";import n from"./ZG3WNUBC.js";import{c as wb,e as Vd,f as Pb,g as Tb,h as $b,i as Db,j as rc}from"./7NWEE7T2.js";import m from"./3YPGCLG4.js";import{a as Gw}from"./TENIFMA5.js";import{a as Ob}from"./3KDTVBIG.js";import l from"./32KKW2IG.js";import k from"./KE4AIHA7.js";import j from"./OGGEEHV2.js";import{a as pP}from"./N634G5MT.js";import"./2YDNWOWT.js";import i from"./OADNRXFH.js";import h from"./LYSF2KY5.js";import g from"./XVCBLLWW.js";import f from"./C7F4AVQU.js";import{a as Pr,b as uP,c as cP,d as dP,e as Mb,k as Ib,q as Rb}from"./RPUEIRTH.js";import e from"./6AWJXWDQ.js";import"./3ZKNY2GI.js";import d from"./EHYBMIDH.js";import c from"./SILDOKXS.js";import b from"./EMOHROY3.js";import a from"./2BA2QD2A.js";import{D as Pd,E as Td,a as vt,b as Xf,c as Ee,d as _e,e as Ti,f as zi,g as Io,h as zr,i as wd,j as rs,l as zv,n as tr,p as Hv,r as Ii,v as Xv,w as GC,x as wr}from"./VQU2TVX7.js";import{e as ss,h as gn}from"./BGOWDCTO.js";import{$ as HC,B as vl,Ba as Wv,C as $h,I as Cd,L as jf,M as Vv,N as Wf,Q as WC,S as zf,T as Nv,U as Ev,V as Bv,W as zC,aa as XC,da as jv,f as Mo,h as qu,ha as Hf,i as Nf,j as Iv,k as NC,l as Ef,o as Ca,p as Bf,q as Hi,r as Ku,t as Rv,u as Th,ua as YC,v as EC,y as BC,z as jC}from"./62GSQDTE.js";import{a as _d,b as Rr,c as Sd,d as Wr,e as Vf,f as Pt}from"./KX7KGXKQ.js";import{g as Wi,h as Ds,k as Ch,l as ea}from"./SP2IPHWF.js";import{a as RC,b as kv,c as Mf,d as Sh}from"./72KEQM4K.js";import{A as Dv,B as OC,C as Of,H as MC,I as IC,g as DC,h as kC,i as Gu,l as AC,n as fs,p as LC,z as FC}from"./KWN3N6VE.js";import"./P3AYFJRV.js";import"./QP5UAIC6.js";import{a as Ie,b as UC}from"./QYRHZJH3.js";import{a as M,b as Ha,e as ze,f as hi,h as xd,i as Av,j as Lv,k as Ir,l as If,m as wh,n as Fv,o as Rf,p as Ci,q as VC,r as Ph,t as Ov,u as Mv}from"./PWJBGZPW.js";import{a as bd,b as $F,c as $C,d as DF}from"./BYSUABOV.js";export default $arcgis.t(([Js,{substitute:Fu},lN,hN,{$:rw,$a:wi,Aa:Zf,Ac:Rw,B:QC,Ba:Jf,Bc:Vw,Ca:eb,Cc:yb,D:Ro,Da:ow,Dc:Nw,E:ew,Ea:Qf,Ec:Ew,F:yn,Fb:nm,Fc:vb,G:Ah,Ga:tb,Gc:Bw,Ha:lw,Hc:jw,Ib:_w,Ic:Ww,J:Gv,Jb:Ws,Jc:bb,K:qv,Ka:ib,Kc:zw,L:Dd,La:tc,Lb:bl,Lc:Hw,M:Kv,Ma:hw,Mb:Sw,Mc:um,N:tw,Na:em,Nb:Cw,Nc:Xw,O:ta,Oa:uw,Oc:xb,P:Gf,Pa:rb,Pb:ww,Pc:Yw,Q:Ju,Qa:cw,Qc:Uw,R:vn,Ra:sb,S:Vo,Sa:ab,Sc:Rd,T:kd,Ta:nb,Tb:om,Tc:cm,U:Zv,Ua:dw,Ub:Pw,V:iw,Va:Md,W:Ad,X:As,Xa:ob,Y:Kn,Ya:tm,Z:Ld,Za:Xa,Zb:Tw,_:No,_a:ic,_b:db,ac:pb,b:Y,ba:sw,bb:Zn,bc:Fh,c:Xi,ca:Qu,cc:Oh,d:$d,db:pw,dc:fb,e:qC,eb:fw,ec:Pa,f:Yn,fb:mw,fc:mb,g:Un,gb:lb,h:ks,ha:ec,hb:im,i:Yv,ia:Jv,ib:rm,ic:$w,j:Dh,ja:Fd,jb:gw,k:At,kb:yw,l:Gn,lb:vw,lc:Ya,m:Zu,mc:Jn,n:qn,nb:sm,nc:lm,o:kh,ob:bw,oc:pt,p:KC,pb:hb,pc:Dw,q:Yf,qb:am,qc:kw,r:Uf,rc:hm,sb:wa,sc:Mh,t:ZC,ta:qf,tb:ub,tc:Aw,u:ms,ub:Lh,uc:Lw,va:Qv,vb:xw,vc:Fw,w:JC,wa:aw,wb:bn,wc:gb,xa:Kf,xb:xn,xc:Ow,y:Uv,ya:nw,yb:cb,yc:Mw,za:Od,zb:Id,zc:Iw},,{g:qw,i:Kw},{b:Zw,c:Jw},{a:_b},{a:Sb,b:xl},,,{l:Qw,n:eP,o:tP,p:iP,q:rP,r:Cb,s:sP,t:aP,u:nP},,,,{q:vP},{b:gP,c:yP},{a:oP,b:lP,c:hP,d:kb,g:Ab,h:Lb,i:Fb}])=>{var YT=$F((XT,gx)=>{(function(s){typeof XT=="object"&&typeof gx<"u"?gx.exports=s():typeof define=="function"&&define.amd?define([],s):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).JSZip=s()})(function(){return(function s(t,e,i){function r(o,l){if(!e[o]){if(!t[o]){var h=typeof bd=="function"&&bd;if(!l&&h)return h(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=e[o]={exports:{}};t[o][0].call(c.exports,function(d){var p=t[o][1][d];return r(p||d)},c,c.exports,s,t,e,i)}return e[o].exports}for(var a=typeof bd=="function"&&bd,n=0;n<i.length;n++)r(i[n]);return r})({1:[function(s,t,e){"use strict";var i=s("./utils"),r=s("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.encode=function(n){for(var o,l,h,u,c,d,p,f=[],m=0,g=n.length,y=g,v=i.getTypeOf(n)!=="string";m<n.length;)y=g-m,h=v?(o=n[m++],l=m<g?n[m++]:0,m<g?n[m++]:0):(o=n.charCodeAt(m++),l=m<g?n.charCodeAt(m++):0,m<g?n.charCodeAt(m++):0),u=o>>2,c=(3&o)<<4|l>>4,d=1<y?(15&l)<<2|h>>6:64,p=2<y?63&h:64,f.push(a.charAt(u)+a.charAt(c)+a.charAt(d)+a.charAt(p));return f.join("")},e.decode=function(n){var o,l,h,u,c,d,p=0,f=0,m="data:";if(n.substr(0,m.length)===m)throw new Error("Invalid base64 input, it looks like a data url.");var g,y=3*(n=n.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(n.charAt(n.length-1)===a.charAt(64)&&y--,n.charAt(n.length-2)===a.charAt(64)&&y--,y%1!=0)throw new Error("Invalid base64 input, bad content length.");for(g=r.uint8array?new Uint8Array(0|y):new Array(0|y);p<n.length;)o=a.indexOf(n.charAt(p++))<<2|(u=a.indexOf(n.charAt(p++)))>>4,l=(15&u)<<4|(c=a.indexOf(n.charAt(p++)))>>2,h=(3&c)<<6|(d=a.indexOf(n.charAt(p++))),g[f++]=o,c!==64&&(g[f++]=l),d!==64&&(g[f++]=h);return g}},{"./support":30,"./utils":32}],2:[function(s,t,e){"use strict";var i=s("./external"),r=s("./stream/DataWorker"),a=s("./stream/Crc32Probe"),n=s("./stream/DataLengthProbe");function o(l,h,u,c,d){this.compressedSize=l,this.uncompressedSize=h,this.crc32=u,this.compression=c,this.compressedContent=d}o.prototype={getContentWorker:function(){var l=new r(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new n("data_length")),h=this;return l.on("end",function(){if(this.streamInfo.data_length!==h.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),l},getCompressedWorker:function(){return new r(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(l,h,u){return l.pipe(new a).pipe(new n("uncompressedSize")).pipe(h.compressWorker(u)).pipe(new n("compressedSize")).withStreamInfo("compression",h)},t.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(s,t,e){"use strict";var i=s("./stream/GenericWorker");e.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},e.DEFLATE=s("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(s,t,e){"use strict";var i=s("./utils"),r=(function(){for(var a,n=[],o=0;o<256;o++){a=o;for(var l=0;l<8;l++)a=1&a?3988292384^a>>>1:a>>>1;n[o]=a}return n})();t.exports=function(a,n){return a!==void 0&&a.length?i.getTypeOf(a)!=="string"?(function(o,l,h,u){var c=r,d=u+h;o^=-1;for(var p=u;p<d;p++)o=o>>>8^c[255&(o^l[p])];return-1^o})(0|n,a,a.length,0):(function(o,l,h,u){var c=r,d=u+h;o^=-1;for(var p=u;p<d;p++)o=o>>>8^c[255&(o^l.charCodeAt(p))];return-1^o})(0|n,a,a.length,0):0}},{"./utils":32}],5:[function(s,t,e){"use strict";e.base64=!1,e.binary=!1,e.dir=!1,e.createFolders=!0,e.date=null,e.compression=null,e.compressionOptions=null,e.comment=null,e.unixPermissions=null,e.dosPermissions=null},{}],6:[function(s,t,e){"use strict";var i=null;i=typeof Promise<"u"?Promise:s("lie"),t.exports={Promise:i}},{lie:37}],7:[function(s,t,e){"use strict";var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",r=s("pako"),a=s("./utils"),n=s("./stream/GenericWorker"),o=i?"uint8array":"array";function l(h,u){n.call(this,"FlateWorker/"+h),this._pako=null,this._pakoAction=h,this._pakoOptions=u,this.meta={}}e.magic="\b\0",a.inherits(l,n),l.prototype.processChunk=function(h){this.meta=h.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(o,h.data),!1)},l.prototype.flush=function(){n.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var h=this;this._pako.onData=function(u){h.push({data:u,meta:h.meta})}},e.compressWorker=function(h){return new l("Deflate",h)},e.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(s,t,e){"use strict";function i(c,d){var p,f="";for(p=0;p<d;p++)f+=String.fromCharCode(255&c),c>>>=8;return f}function r(c,d,p,f,m,g){var y,v,b=c.file,x=c.compression,_=g!==o.utf8encode,w=a.transformTo("string",g(b.name)),C=a.transformTo("string",o.utf8encode(b.name)),P=b.comment,D=a.transformTo("string",g(P)),$=a.transformTo("string",o.utf8encode(P)),A=C.length!==b.name.length,T=$.length!==P.length,I="",N="",B="",j=b.dir,z=b.date,K={crc32:0,compressedSize:0,uncompressedSize:0};d&&!p||(K.crc32=c.crc32,K.compressedSize=c.compressedSize,K.uncompressedSize=c.uncompressedSize);var V=0;d&&(V|=8),_||!A&&!T||(V|=2048);var E=0,re=0;j&&(E|=16),m==="UNIX"?(re=798,E|=(function(Z,ue){var Le=Z;return Z||(Le=ue?16893:33204),(65535&Le)<<16})(b.unixPermissions,j)):(re=20,E|=(function(Z){return 63&(Z||0)})(b.dosPermissions)),y=z.getUTCHours(),y<<=6,y|=z.getUTCMinutes(),y<<=5,y|=z.getUTCSeconds()/2,v=z.getUTCFullYear()-1980,v<<=4,v|=z.getUTCMonth()+1,v<<=5,v|=z.getUTCDate(),A&&(N=i(1,1)+i(l(w),4)+C,I+="up"+i(N.length,2)+N),T&&(B=i(1,1)+i(l(D),4)+$,I+="uc"+i(B.length,2)+B);var X="";return X+=`
|
|
3
3
|
\0`,X+=i(V,2),X+=x.magic,X+=i(y,2),X+=i(v,2),X+=i(K.crc32,4),X+=i(K.compressedSize,4),X+=i(K.uncompressedSize,4),X+=i(w.length,2),X+=i(I.length,2),{fileRecord:h.LOCAL_FILE_HEADER+X+w+I,dirRecord:h.CENTRAL_FILE_HEADER+i(re,2)+X+i(D.length,2)+"\0\0\0\0"+i(E,4)+i(f,4)+w+I+D}}var a=s("../utils"),n=s("../stream/GenericWorker"),o=s("../utf8"),l=s("../crc32"),h=s("../signature");function u(c,d,p,f){n.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=d,this.zipPlatform=p,this.encodeFileName=f,this.streamFiles=c,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,n),u.prototype.push=function(c){var d=c.meta.percent||0,p=this.entriesCount,f=this._sources.length;this.accumulate?this.contentBuffer.push(c):(this.bytesWritten+=c.data.length,n.prototype.push.call(this,{data:c.data,meta:{currentFile:this.currentFile,percent:p?(d+100*(p-f-1))/p:100}}))},u.prototype.openedSource=function(c){this.currentSourceOffset=this.bytesWritten,this.currentFile=c.file.name;var d=this.streamFiles&&!c.file.dir;if(d){var p=r(c,d,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(c){this.accumulate=!1;var d=this.streamFiles&&!c.file.dir,p=r(c,d,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),d)this.push({data:(function(f){return h.DATA_DESCRIPTOR+i(f.crc32,4)+i(f.compressedSize,4)+i(f.uncompressedSize,4)})(c),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var c=this.bytesWritten,d=0;d<this.dirRecords.length;d++)this.push({data:this.dirRecords[d],meta:{percent:100}});var p=this.bytesWritten-c,f=(function(m,g,y,v,b){var x=a.transformTo("string",b(v));return h.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(m,2)+i(m,2)+i(g,4)+i(y,4)+i(x.length,2)+x})(this.dirRecords.length,p,c,this.zipComment,this.encodeFileName);this.push({data:f,meta:{percent:100}})},u.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},u.prototype.registerPrevious=function(c){this._sources.push(c);var d=this;return c.on("data",function(p){d.processChunk(p)}),c.on("end",function(){d.closedSource(d.previous.streamInfo),d._sources.length?d.prepareNextSource():d.end()}),c.on("error",function(p){d.error(p)}),this},u.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},u.prototype.error=function(c){var d=this._sources;if(!n.prototype.error.call(this,c))return!1;for(var p=0;p<d.length;p++)try{d[p].error(c)}catch{}return!0},u.prototype.lock=function(){n.prototype.lock.call(this);for(var c=this._sources,d=0;d<c.length;d++)c[d].lock()},t.exports=u},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(s,t,e){"use strict";var i=s("../compressions"),r=s("./ZipFileWorker");e.generateWorker=function(a,n,o){var l=new r(n.streamFiles,o,n.platform,n.encodeFileName),h=0;try{a.forEach(function(u,c){h++;var d=(function(g,y){var v=g||y,b=i[v];if(!b)throw new Error(v+" is not a valid compression method !");return b})(c.options.compression,n.compression),p=c.options.compressionOptions||n.compressionOptions||{},f=c.dir,m=c.date;c._compressWorker(d,p).withStreamInfo("file",{name:u,dir:f,date:m,comment:c.comment||"",unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions}).pipe(l)}),l.entriesCount=h}catch(u){l.error(u)}return l}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(s,t,e){"use strict";function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var r=new i;for(var a in this)typeof this[a]!="function"&&(r[a]=this[a]);return r}}(i.prototype=s("./object")).loadAsync=s("./load"),i.support=s("./support"),i.defaults=s("./defaults"),i.version="3.10.1",i.loadAsync=function(r,a){return new i().loadAsync(r,a)},i.external=s("./external"),t.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(s,t,e){"use strict";var i=s("./utils"),r=s("./external"),a=s("./utf8"),n=s("./zipEntries"),o=s("./stream/Crc32Probe"),l=s("./nodejsUtils");function h(u){return new r.Promise(function(c,d){var p=u.decompressed.getContentWorker().pipe(new o);p.on("error",function(f){d(f)}).on("end",function(){p.streamInfo.crc32!==u.decompressed.crc32?d(new Error("Corrupted zip : CRC32 mismatch")):c()}).resume()})}t.exports=function(u,c){var d=this;return c=i.extend(c||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),l.isNode&&l.isStream(u)?r.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",u,!0,c.optimizedBinaryString,c.base64).then(function(p){var f=new n(c);return f.load(p),f}).then(function(p){var f=[r.Promise.resolve(p)],m=p.files;if(c.checkCRC32)for(var g=0;g<m.length;g++)f.push(h(m[g]));return r.Promise.all(f)}).then(function(p){for(var f=p.shift(),m=f.files,g=0;g<m.length;g++){var y=m[g],v=y.fileNameStr,b=i.resolve(y.fileNameStr);d.file(b,y.decompressed,{binary:!0,optimizedBinaryString:!0,date:y.date,dir:y.dir,comment:y.fileCommentStr.length?y.fileCommentStr:null,unixPermissions:y.unixPermissions,dosPermissions:y.dosPermissions,createFolders:c.createFolders}),y.dir||(d.file(b).unsafeOriginalName=v)}return f.zipComment.length&&(d.comment=f.zipComment),d})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(s,t,e){"use strict";var i=s("../utils"),r=s("../stream/GenericWorker");function a(n,o){r.call(this,"Nodejs stream input adapter for "+n),this._upstreamEnded=!1,this._bindStream(o)}i.inherits(a,r),a.prototype._bindStream=function(n){var o=this;(this._stream=n).pause(),n.on("data",function(l){o.push({data:l,meta:{percent:0}})}).on("error",function(l){o.isPaused?this.generatedError=l:o.error(l)}).on("end",function(){o.isPaused?o._upstreamEnded=!0:o.end()})},a.prototype.pause=function(){return!!r.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(s,t,e){"use strict";var i=s("readable-stream").Readable;function r(a,n,o){i.call(this,n),this._helper=a;var l=this;a.on("data",function(h,u){l.push(h)||l._helper.pause(),o&&o(u)}).on("error",function(h){l.emit("error",h)}).on("end",function(){l.push(null)})}s("../utils").inherits(r,i),r.prototype._read=function(){this._helper.resume()},t.exports=r},{"../utils":32,"readable-stream":16}],14:[function(s,t,e){"use strict";t.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,r){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,r);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,r)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var r=new Buffer(i);return r.fill(0),r},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(s,t,e){"use strict";function i(b,x,_){var w,C=a.getTypeOf(x),P=a.extend(_||{},l);P.date=P.date||new Date,P.compression!==null&&(P.compression=P.compression.toUpperCase()),typeof P.unixPermissions=="string"&&(P.unixPermissions=parseInt(P.unixPermissions,8)),P.unixPermissions&&16384&P.unixPermissions&&(P.dir=!0),P.dosPermissions&&16&P.dosPermissions&&(P.dir=!0),P.dir&&(b=m(b)),P.createFolders&&(w=f(b))&&g.call(this,w,!0);var D=C==="string"&&P.binary===!1&&P.base64===!1;_&&_.binary!==void 0||(P.binary=!D),(x instanceof h&&x.uncompressedSize===0||P.dir||!x||x.length===0)&&(P.base64=!1,P.binary=!0,x="",P.compression="STORE",C="string");var $=null;$=x instanceof h||x instanceof n?x:d.isNode&&d.isStream(x)?new p(b,x):a.prepareContent(b,x,P.binary,P.optimizedBinaryString,P.base64);var A=new u(b,$,P);this.files[b]=A}var r=s("./utf8"),a=s("./utils"),n=s("./stream/GenericWorker"),o=s("./stream/StreamHelper"),l=s("./defaults"),h=s("./compressedObject"),u=s("./zipObject"),c=s("./generate"),d=s("./nodejsUtils"),p=s("./nodejs/NodejsStreamInputAdapter"),f=function(b){b.slice(-1)==="/"&&(b=b.substring(0,b.length-1));var x=b.lastIndexOf("/");return 0<x?b.substring(0,x):""},m=function(b){return b.slice(-1)!=="/"&&(b+="/"),b},g=function(b,x){return x=x!==void 0?x:l.createFolders,b=m(b),this.files[b]||i.call(this,b,null,{dir:!0,createFolders:x}),this.files[b]};function y(b){return Object.prototype.toString.call(b)==="[object RegExp]"}var v={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(b){var x,_,w;for(x in this.files)w=this.files[x],(_=x.slice(this.root.length,x.length))&&x.slice(0,this.root.length)===this.root&&b(_,w)},filter:function(b){var x=[];return this.forEach(function(_,w){b(_,w)&&x.push(w)}),x},file:function(b,x,_){if(arguments.length!==1)return b=this.root+b,i.call(this,b,x,_),this;if(y(b)){var w=b;return this.filter(function(P,D){return!D.dir&&w.test(P)})}var C=this.files[this.root+b];return C&&!C.dir?C:null},folder:function(b){if(!b)return this;if(y(b))return this.filter(function(C,P){return P.dir&&b.test(C)});var x=this.root+b,_=g.call(this,x),w=this.clone();return w.root=_.name,w},remove:function(b){b=this.root+b;var x=this.files[b];if(x||(b.slice(-1)!=="/"&&(b+="/"),x=this.files[b]),x&&!x.dir)delete this.files[b];else for(var _=this.filter(function(C,P){return P.name.slice(0,b.length)===b}),w=0;w<_.length;w++)delete this.files[_[w].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(b){var x,_={};try{if((_=a.extend(b||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:r.utf8encode})).type=_.type.toLowerCase(),_.compression=_.compression.toUpperCase(),_.type==="binarystring"&&(_.type="string"),!_.type)throw new Error("No output type specified.");a.checkSupport(_.type),_.platform!=="darwin"&&_.platform!=="freebsd"&&_.platform!=="linux"&&_.platform!=="sunos"||(_.platform="UNIX"),_.platform==="win32"&&(_.platform="DOS");var w=_.comment||this.comment||"";x=c.generateWorker(this,_,w)}catch(C){(x=new n("error")).error(C)}return new o(x,_.type||"string",_.mimeType)},generateAsync:function(b,x){return this.generateInternalStream(b).accumulate(x)},generateNodeStream:function(b,x){return(b=b||{}).type||(b.type="nodebuffer"),this.generateInternalStream(b).toNodejsStream(x)}};t.exports=v},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(s,t,e){"use strict";t.exports=s("stream")},{stream:void 0}],17:[function(s,t,e){"use strict";var i=s("./DataReader");function r(a){i.call(this,a);for(var n=0;n<this.data.length;n++)a[n]=255&a[n]}s("../utils").inherits(r,i),r.prototype.byteAt=function(a){return this.data[this.zero+a]},r.prototype.lastIndexOfSignature=function(a){for(var n=a.charCodeAt(0),o=a.charCodeAt(1),l=a.charCodeAt(2),h=a.charCodeAt(3),u=this.length-4;0<=u;--u)if(this.data[u]===n&&this.data[u+1]===o&&this.data[u+2]===l&&this.data[u+3]===h)return u-this.zero;return-1},r.prototype.readAndCheckSignature=function(a){var n=a.charCodeAt(0),o=a.charCodeAt(1),l=a.charCodeAt(2),h=a.charCodeAt(3),u=this.readData(4);return n===u[0]&&o===u[1]&&l===u[2]&&h===u[3]},r.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var n=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,n},t.exports=r},{"../utils":32,"./DataReader":18}],18:[function(s,t,e){"use strict";var i=s("../utils");function r(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}r.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var n,o=0;for(this.checkOffset(a),n=this.index+a-1;n>=this.index;n--)o=(o<<8)+this.byteAt(n);return this.index+=a,o},readString:function(a){return i.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},t.exports=r},{"../utils":32}],19:[function(s,t,e){"use strict";var i=s("./Uint8ArrayReader");function r(a){i.call(this,a)}s("../utils").inherits(r,i),r.prototype.readData=function(a){this.checkOffset(a);var n=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,n},t.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(s,t,e){"use strict";var i=s("./DataReader");function r(a){i.call(this,a)}s("../utils").inherits(r,i),r.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},r.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},r.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},r.prototype.readData=function(a){this.checkOffset(a);var n=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,n},t.exports=r},{"../utils":32,"./DataReader":18}],21:[function(s,t,e){"use strict";var i=s("./ArrayReader");function r(a){i.call(this,a)}s("../utils").inherits(r,i),r.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var n=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,n},t.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(s,t,e){"use strict";var i=s("../utils"),r=s("../support"),a=s("./ArrayReader"),n=s("./StringReader"),o=s("./NodeBufferReader"),l=s("./Uint8ArrayReader");t.exports=function(h){var u=i.getTypeOf(h);return i.checkSupport(u),u!=="string"||r.uint8array?u==="nodebuffer"?new o(h):r.uint8array?new l(i.transformTo("uint8array",h)):new a(i.transformTo("array",h)):new n(h)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(s,t,e){"use strict";e.LOCAL_FILE_HEADER="PK",e.CENTRAL_FILE_HEADER="PK",e.CENTRAL_DIRECTORY_END="PK",e.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",e.ZIP64_CENTRAL_DIRECTORY_END="PK",e.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(s,t,e){"use strict";var i=s("./GenericWorker"),r=s("../utils");function a(n){i.call(this,"ConvertWorker to "+n),this.destType=n}r.inherits(a,i),a.prototype.processChunk=function(n){this.push({data:r.transformTo(this.destType,n.data),meta:n.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(s,t,e){"use strict";var i=s("./GenericWorker"),r=s("../crc32");function a(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}s("../utils").inherits(a,i),a.prototype.processChunk=function(n){this.streamInfo.crc32=r(n.data,this.streamInfo.crc32||0),this.push(n)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(s,t,e){"use strict";var i=s("../utils"),r=s("./GenericWorker");function a(n){r.call(this,"DataLengthProbe for "+n),this.propName=n,this.withStreamInfo(n,0)}i.inherits(a,r),a.prototype.processChunk=function(n){if(n){var o=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=o+n.data.length}r.prototype.processChunk.call(this,n)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(s,t,e){"use strict";var i=s("../utils"),r=s("./GenericWorker");function a(n){r.call(this,"DataWorker");var o=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,n.then(function(l){o.dataIsReady=!0,o.data=l,o.max=l&&l.length||0,o.type=i.getTypeOf(l),o.isPaused||o._tickAndRepeat()},function(l){o.error(l)})}i.inherits(a,r),a.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var n=null,o=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":n=this.data.substring(this.index,o);break;case"uint8array":n=this.data.subarray(this.index,o);break;case"array":case"nodebuffer":n=this.data.slice(this.index,o)}return this.index=o,this.push({data:n,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(s,t,e){"use strict";function i(r){this.name=r||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(r){this.emit("data",r)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(r){this.emit("error",r)}return!0},error:function(r){return!this.isFinished&&(this.isPaused?this.generatedError=r:(this.isFinished=!0,this.emit("error",r),this.previous&&this.previous.error(r),this.cleanUp()),!0)},on:function(r,a){return this._listeners[r].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(r,a){if(this._listeners[r])for(var n=0;n<this._listeners[r].length;n++)this._listeners[r][n].call(this,a)},pipe:function(r){return r.registerPrevious(this)},registerPrevious:function(r){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=r.streamInfo,this.mergeStreamInfo(),this.previous=r;var a=this;return r.on("data",function(n){a.processChunk(n)}),r.on("end",function(){a.end()}),r.on("error",function(n){a.error(n)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var r=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),r=!0),this.previous&&this.previous.resume(),!r},flush:function(){},processChunk:function(r){this.push(r)},withStreamInfo:function(r,a){return this.extraStreamInfo[r]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var r in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,r)&&(this.streamInfo[r]=this.extraStreamInfo[r])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var r="Worker "+this.name;return this.previous?this.previous+" -> "+r:r}},t.exports=i},{}],29:[function(s,t,e){"use strict";var i=s("../utils"),r=s("./ConvertWorker"),a=s("./GenericWorker"),n=s("../base64"),o=s("../support"),l=s("../external"),h=null;if(o.nodestream)try{h=s("../nodejs/NodejsStreamOutputAdapter")}catch{}function u(d,p){return new l.Promise(function(f,m){var g=[],y=d._internalType,v=d._outputType,b=d._mimeType;d.on("data",function(x,_){g.push(x),p&&p(_)}).on("error",function(x){g=[],m(x)}).on("end",function(){try{var x=(function(_,w,C){switch(_){case"blob":return i.newBlob(i.transformTo("arraybuffer",w),C);case"base64":return n.encode(w);default:return i.transformTo(_,w)}})(v,(function(_,w){var C,P=0,D=null,$=0;for(C=0;C<w.length;C++)$+=w[C].length;switch(_){case"string":return w.join("");case"array":return Array.prototype.concat.apply([],w);case"uint8array":for(D=new Uint8Array($),C=0;C<w.length;C++)D.set(w[C],P),P+=w[C].length;return D;case"nodebuffer":return Buffer.concat(w);default:throw new Error("concat : unsupported type '"+_+"'")}})(y,g),b);f(x)}catch(_){m(_)}g=[]}).resume()})}function c(d,p,f){var m=p;switch(p){case"blob":case"arraybuffer":m="uint8array";break;case"base64":m="string"}try{this._internalType=m,this._outputType=p,this._mimeType=f,i.checkSupport(m),this._worker=d.pipe(new r(m)),d.lock()}catch(g){this._worker=new a("error"),this._worker.error(g)}}c.prototype={accumulate:function(d){return u(this,d)},on:function(d,p){var f=this;return d==="data"?this._worker.on(d,function(m){p.call(f,m.data,m.meta)}):this._worker.on(d,function(){i.delay(p,arguments,f)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(d){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new h(this,{objectMode:this._outputType!=="nodebuffer"},d)}},t.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(s,t,e){"use strict";if(e.base64=!0,e.array=!0,e.string=!0,e.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",e.nodebuffer=typeof Buffer<"u",e.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")e.blob=!1;else{var i=new ArrayBuffer(0);try{e.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(i),e.blob=r.getBlob("application/zip").size===0}catch{e.blob=!1}}}try{e.nodestream=!!s("readable-stream").Readable}catch{e.nodestream=!1}},{"readable-stream":16}],31:[function(s,t,e){"use strict";for(var i=s("./utils"),r=s("./support"),a=s("./nodejsUtils"),n=s("./stream/GenericWorker"),o=new Array(256),l=0;l<256;l++)o[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;o[254]=o[254]=1;function h(){n.call(this,"utf-8 decode"),this.leftOver=null}function u(){n.call(this,"utf-8 encode")}e.utf8encode=function(c){return r.nodebuffer?a.newBufferFrom(c,"utf-8"):(function(d){var p,f,m,g,y,v=d.length,b=0;for(g=0;g<v;g++)(64512&(f=d.charCodeAt(g)))==55296&&g+1<v&&(64512&(m=d.charCodeAt(g+1)))==56320&&(f=65536+(f-55296<<10)+(m-56320),g++),b+=f<128?1:f<2048?2:f<65536?3:4;for(p=r.uint8array?new Uint8Array(b):new Array(b),g=y=0;y<b;g++)(64512&(f=d.charCodeAt(g)))==55296&&g+1<v&&(64512&(m=d.charCodeAt(g+1)))==56320&&(f=65536+(f-55296<<10)+(m-56320),g++),f<128?p[y++]=f:(f<2048?p[y++]=192|f>>>6:(f<65536?p[y++]=224|f>>>12:(p[y++]=240|f>>>18,p[y++]=128|f>>>12&63),p[y++]=128|f>>>6&63),p[y++]=128|63&f);return p})(c)},e.utf8decode=function(c){return r.nodebuffer?i.transformTo("nodebuffer",c).toString("utf-8"):(function(d){var p,f,m,g,y=d.length,v=new Array(2*y);for(p=f=0;p<y;)if((m=d[p++])<128)v[f++]=m;else if(4<(g=o[m]))v[f++]=65533,p+=g-1;else{for(m&=g===2?31:g===3?15:7;1<g&&p<y;)m=m<<6|63&d[p++],g--;1<g?v[f++]=65533:m<65536?v[f++]=m:(m-=65536,v[f++]=55296|m>>10&1023,v[f++]=56320|1023&m)}return v.length!==f&&(v.subarray?v=v.subarray(0,f):v.length=f),i.applyFromCharCode(v)})(c=i.transformTo(r.uint8array?"uint8array":"array",c))},i.inherits(h,n),h.prototype.processChunk=function(c){var d=i.transformTo(r.uint8array?"uint8array":"array",c.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var p=d;(d=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),d.set(p,this.leftOver.length)}else d=this.leftOver.concat(d);this.leftOver=null}var f=(function(g,y){var v;for((y=y||g.length)>g.length&&(y=g.length),v=y-1;0<=v&&(192&g[v])==128;)v--;return v<0||v===0?y:v+o[g[v]]>y?v:y})(d),m=d;f!==d.length&&(r.uint8array?(m=d.subarray(0,f),this.leftOver=d.subarray(f,d.length)):(m=d.slice(0,f),this.leftOver=d.slice(f,d.length))),this.push({data:e.utf8decode(m),meta:c.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=h,i.inherits(u,n),u.prototype.processChunk=function(c){this.push({data:e.utf8encode(c.data),meta:c.meta})},e.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(s,t,e){"use strict";var i=s("./support"),r=s("./base64"),a=s("./nodejsUtils"),n=s("./external");function o(p){return p}function l(p,f){for(var m=0;m<p.length;++m)f[m]=255&p.charCodeAt(m);return f}s("setimmediate"),e.newBlob=function(p,f){e.checkSupport("blob");try{return new Blob([p],{type:f})}catch{try{var m=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return m.append(p),m.getBlob(f)}catch{throw new Error("Bug : can't construct the Blob.")}}};var h={stringifyByChunk:function(p,f,m){var g=[],y=0,v=p.length;if(v<=m)return String.fromCharCode.apply(null,p);for(;y<v;)f==="array"||f==="nodebuffer"?g.push(String.fromCharCode.apply(null,p.slice(y,Math.min(y+m,v)))):g.push(String.fromCharCode.apply(null,p.subarray(y,Math.min(y+m,v)))),y+=m;return g.join("")},stringifyByChar:function(p){for(var f="",m=0;m<p.length;m++)f+=String.fromCharCode(p[m]);return f},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}})()}};function u(p){var f=65536,m=e.getTypeOf(p),g=!0;if(m==="uint8array"?g=h.applyCanBeUsed.uint8array:m==="nodebuffer"&&(g=h.applyCanBeUsed.nodebuffer),g)for(;1<f;)try{return h.stringifyByChunk(p,m,f)}catch{f=Math.floor(f/2)}return h.stringifyByChar(p)}function c(p,f){for(var m=0;m<p.length;m++)f[m]=p[m];return f}e.applyFromCharCode=u;var d={};d.string={string:o,array:function(p){return l(p,new Array(p.length))},arraybuffer:function(p){return d.string.uint8array(p).buffer},uint8array:function(p){return l(p,new Uint8Array(p.length))},nodebuffer:function(p){return l(p,a.allocBuffer(p.length))}},d.array={string:u,array:o,arraybuffer:function(p){return new Uint8Array(p).buffer},uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(p)}},d.arraybuffer={string:function(p){return u(new Uint8Array(p))},array:function(p){return c(new Uint8Array(p),new Array(p.byteLength))},arraybuffer:o,uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(new Uint8Array(p))}},d.uint8array={string:u,array:function(p){return c(p,new Array(p.length))},arraybuffer:function(p){return p.buffer},uint8array:o,nodebuffer:function(p){return a.newBufferFrom(p)}},d.nodebuffer={string:u,array:function(p){return c(p,new Array(p.length))},arraybuffer:function(p){return d.nodebuffer.uint8array(p).buffer},uint8array:function(p){return c(p,new Uint8Array(p.length))},nodebuffer:o},e.transformTo=function(p,f){if(f=f||"",!p)return f;e.checkSupport(p);var m=e.getTypeOf(f);return d[m][p](f)},e.resolve=function(p){for(var f=p.split("/"),m=[],g=0;g<f.length;g++){var y=f[g];y==="."||y===""&&g!==0&&g!==f.length-1||(y===".."?m.pop():m.push(y))}return m.join("/")},e.getTypeOf=function(p){return typeof p=="string"?"string":Object.prototype.toString.call(p)==="[object Array]"?"array":i.nodebuffer&&a.isBuffer(p)?"nodebuffer":i.uint8array&&p instanceof Uint8Array?"uint8array":i.arraybuffer&&p instanceof ArrayBuffer?"arraybuffer":void 0},e.checkSupport=function(p){if(!i[p.toLowerCase()])throw new Error(p+" is not supported by this platform")},e.MAX_VALUE_16BITS=65535,e.MAX_VALUE_32BITS=-1,e.pretty=function(p){var f,m,g="";for(m=0;m<(p||"").length;m++)g+="\\x"+((f=p.charCodeAt(m))<16?"0":"")+f.toString(16).toUpperCase();return g},e.delay=function(p,f,m){setImmediate(function(){p.apply(m||null,f||[])})},e.inherits=function(p,f){function m(){}m.prototype=f.prototype,p.prototype=new m},e.extend=function(){var p,f,m={};for(p=0;p<arguments.length;p++)for(f in arguments[p])Object.prototype.hasOwnProperty.call(arguments[p],f)&&m[f]===void 0&&(m[f]=arguments[p][f]);return m},e.prepareContent=function(p,f,m,g,y){return n.Promise.resolve(f).then(function(v){return i.blob&&(v instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(v))!==-1)&&typeof FileReader<"u"?new n.Promise(function(b,x){var _=new FileReader;_.onload=function(w){b(w.target.result)},_.onerror=function(w){x(w.target.error)},_.readAsArrayBuffer(v)}):v}).then(function(v){var b=e.getTypeOf(v);return b?(b==="arraybuffer"?v=e.transformTo("uint8array",v):b==="string"&&(y?v=r.decode(v):m&&g!==!0&&(v=(function(x){return l(x,i.uint8array?new Uint8Array(x.length):new Array(x.length))})(v))),v):n.Promise.reject(new Error("Can't read the data of '"+p+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(s,t,e){"use strict";var i=s("./reader/readerFor"),r=s("./utils"),a=s("./signature"),n=s("./zipEntry"),o=s("./support");function l(h){this.files=[],this.loadOptions=h}l.prototype={checkSignature:function(h){if(!this.reader.readAndCheckSignature(h)){this.reader.index-=4;var u=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+r.pretty(u)+", expected "+r.pretty(h)+")")}},isSignature:function(h,u){var c=this.reader.index;this.reader.setIndex(h);var d=this.reader.readString(4)===u;return this.reader.setIndex(c),d},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var h=this.reader.readData(this.zipCommentLength),u=o.uint8array?"uint8array":"array",c=r.transformTo(u,h);this.zipComment=this.loadOptions.decodeFileName(c)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var h,u,c,d=this.zip64EndOfCentralSize-44;0<d;)h=this.reader.readInt(2),u=this.reader.readInt(4),c=this.reader.readData(u),this.zip64ExtensibleData[h]={id:h,length:u,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var h,u;for(h=0;h<this.files.length;h++)u=this.files[h],this.reader.setIndex(u.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),u.readLocalPart(this.reader),u.handleUTF8(),u.processAttributes()},readCentralDir:function(){var h;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(h=new n({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(h);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var h=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(h<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(h);var u=h;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===r.MAX_VALUE_16BITS||this.diskWithCentralDirStart===r.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===r.MAX_VALUE_16BITS||this.centralDirRecords===r.MAX_VALUE_16BITS||this.centralDirSize===r.MAX_VALUE_32BITS||this.centralDirOffset===r.MAX_VALUE_32BITS){if(this.zip64=!0,(h=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(h),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var c=this.centralDirOffset+this.centralDirSize;this.zip64&&(c+=20,c+=12+this.zip64EndOfCentralSize);var d=u-c;if(0<d)this.isSignature(u,a.CENTRAL_FILE_HEADER)||(this.reader.zero=d);else if(d<0)throw new Error("Corrupted zip: missing "+Math.abs(d)+" bytes.")},prepareReader:function(h){this.reader=i(h)},load:function(h){this.prepareReader(h),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(s,t,e){"use strict";var i=s("./reader/readerFor"),r=s("./utils"),a=s("./compressedObject"),n=s("./crc32"),o=s("./utf8"),l=s("./compressions"),h=s("./support");function u(c,d){this.options=c,this.loadOptions=d}u.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(c){var d,p;if(c.skip(22),this.fileNameLength=c.readInt(2),p=c.readInt(2),this.fileName=c.readData(this.fileNameLength),c.skip(p),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((d=(function(f){for(var m in l)if(Object.prototype.hasOwnProperty.call(l,m)&&l[m].magic===f)return l[m];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+r.pretty(this.compressionMethod)+" unknown (inner file : "+r.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,d,c.readData(this.compressedSize))},readCentralPart:function(c){this.versionMadeBy=c.readInt(2),c.skip(2),this.bitFlag=c.readInt(2),this.compressionMethod=c.readString(2),this.date=c.readDate(),this.crc32=c.readInt(4),this.compressedSize=c.readInt(4),this.uncompressedSize=c.readInt(4);var d=c.readInt(2);if(this.extraFieldsLength=c.readInt(2),this.fileCommentLength=c.readInt(2),this.diskNumberStart=c.readInt(2),this.internalFileAttributes=c.readInt(2),this.externalFileAttributes=c.readInt(4),this.localHeaderOffset=c.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");c.skip(d),this.readExtraFields(c),this.parseZIP64ExtraField(c),this.fileComment=c.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var c=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),c==0&&(this.dosPermissions=63&this.externalFileAttributes),c==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var c=i(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=c.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=c.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=c.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=c.readInt(4))}},readExtraFields:function(c){var d,p,f,m=c.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});c.index+4<m;)d=c.readInt(2),p=c.readInt(2),f=c.readData(p),this.extraFields[d]={id:d,length:p,value:f};c.setIndex(m)},handleUTF8:function(){var c=h.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else{var d=this.findExtraFieldUnicodePath();if(d!==null)this.fileNameStr=d;else{var p=r.transformTo(c,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(p)}var f=this.findExtraFieldUnicodeComment();if(f!==null)this.fileCommentStr=f;else{var m=r.transformTo(c,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(m)}}},findExtraFieldUnicodePath:function(){var c=this.extraFields[28789];if(c){var d=i(c.value);return d.readInt(1)!==1||n(this.fileName)!==d.readInt(4)?null:o.utf8decode(d.readData(c.length-5))}return null},findExtraFieldUnicodeComment:function(){var c=this.extraFields[25461];if(c){var d=i(c.value);return d.readInt(1)!==1||n(this.fileComment)!==d.readInt(4)?null:o.utf8decode(d.readData(c.length-5))}return null}},t.exports=u},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(s,t,e){"use strict";function i(d,p,f){this.name=d,this.dir=f.dir,this.date=f.date,this.comment=f.comment,this.unixPermissions=f.unixPermissions,this.dosPermissions=f.dosPermissions,this._data=p,this._dataBinary=f.binary,this.options={compression:f.compression,compressionOptions:f.compressionOptions}}var r=s("./stream/StreamHelper"),a=s("./stream/DataWorker"),n=s("./utf8"),o=s("./compressedObject"),l=s("./stream/GenericWorker");i.prototype={internalStream:function(d){var p=null,f="string";try{if(!d)throw new Error("No output type specified.");var m=(f=d.toLowerCase())==="string"||f==="text";f!=="binarystring"&&f!=="text"||(f="string"),p=this._decompressWorker();var g=!this._dataBinary;g&&!m&&(p=p.pipe(new n.Utf8EncodeWorker)),!g&&m&&(p=p.pipe(new n.Utf8DecodeWorker))}catch(y){(p=new l("error")).error(y)}return new r(p,f,"")},async:function(d,p){return this.internalStream(d).accumulate(p)},nodeStream:function(d,p){return this.internalStream(d||"nodebuffer").toNodejsStream(p)},_compressWorker:function(d,p){if(this._data instanceof o&&this._data.compression.magic===d.magic)return this._data.getCompressedWorker();var f=this._decompressWorker();return this._dataBinary||(f=f.pipe(new n.Utf8EncodeWorker)),o.createWorkerFrom(f,d,p)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof l?this._data:new a(this._data)}};for(var h=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],u=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},c=0;c<h.length;c++)i.prototype[h[c]]=u;t.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(s,t,e){(function(i){"use strict";var r,a,n=i.MutationObserver||i.WebKitMutationObserver;if(n){var o=0,l=new n(d),h=i.document.createTextNode("");l.observe(h,{characterData:!0}),r=function(){h.data=o=++o%2}}else if(i.setImmediate||i.MessageChannel===void 0)r="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var p=i.document.createElement("script");p.onreadystatechange=function(){d(),p.onreadystatechange=null,p.parentNode.removeChild(p),p=null},i.document.documentElement.appendChild(p)}:function(){setTimeout(d,0)};else{var u=new i.MessageChannel;u.port1.onmessage=d,r=function(){u.port2.postMessage(0)}}var c=[];function d(){var p,f;a=!0;for(var m=c.length;m;){for(f=c,c=[],p=-1;++p<m;)f[p]();m=c.length}a=!1}t.exports=function(p){c.push(p)!==1||a||r()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(s,t,e){"use strict";var i=s("immediate");function r(){}var a={},n=["REJECTED"],o=["FULFILLED"],l=["PENDING"];function h(m){if(typeof m!="function")throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,m!==r&&p(this,m)}function u(m,g,y){this.promise=m,typeof g=="function"&&(this.onFulfilled=g,this.callFulfilled=this.otherCallFulfilled),typeof y=="function"&&(this.onRejected=y,this.callRejected=this.otherCallRejected)}function c(m,g,y){i(function(){var v;try{v=g(y)}catch(b){return a.reject(m,b)}v===m?a.reject(m,new TypeError("Cannot resolve promise with itself")):a.resolve(m,v)})}function d(m){var g=m&&m.then;if(m&&(typeof m=="object"||typeof m=="function")&&typeof g=="function")return function(){g.apply(m,arguments)}}function p(m,g){var y=!1;function v(_){y||(y=!0,a.reject(m,_))}function b(_){y||(y=!0,a.resolve(m,_))}var x=f(function(){g(b,v)});x.status==="error"&&v(x.value)}function f(m,g){var y={};try{y.value=m(g),y.status="success"}catch(v){y.status="error",y.value=v}return y}(t.exports=h).prototype.finally=function(m){if(typeof m!="function")return this;var g=this.constructor;return this.then(function(y){return g.resolve(m()).then(function(){return y})},function(y){return g.resolve(m()).then(function(){throw y})})},h.prototype.catch=function(m){return this.then(null,m)},h.prototype.then=function(m,g){if(typeof m!="function"&&this.state===o||typeof g!="function"&&this.state===n)return this;var y=new this.constructor(r);return this.state!==l?c(y,this.state===o?m:g,this.outcome):this.queue.push(new u(y,m,g)),y},u.prototype.callFulfilled=function(m){a.resolve(this.promise,m)},u.prototype.otherCallFulfilled=function(m){c(this.promise,this.onFulfilled,m)},u.prototype.callRejected=function(m){a.reject(this.promise,m)},u.prototype.otherCallRejected=function(m){c(this.promise,this.onRejected,m)},a.resolve=function(m,g){var y=f(d,g);if(y.status==="error")return a.reject(m,y.value);var v=y.value;if(v)p(m,v);else{m.state=o,m.outcome=g;for(var b=-1,x=m.queue.length;++b<x;)m.queue[b].callFulfilled(g)}return m},a.reject=function(m,g){m.state=n,m.outcome=g;for(var y=-1,v=m.queue.length;++y<v;)m.queue[y].callRejected(g);return m},h.resolve=function(m){return m instanceof this?m:a.resolve(new this(r),m)},h.reject=function(m){var g=new this(r);return a.reject(g,m)},h.all=function(m){var g=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var y=m.length,v=!1;if(!y)return this.resolve([]);for(var b=new Array(y),x=0,_=-1,w=new this(r);++_<y;)C(m[_],_);return w;function C(P,D){g.resolve(P).then(function($){b[D]=$,++x!==y||v||(v=!0,a.resolve(w,b))},function($){v||(v=!0,a.reject(w,$))})}},h.race=function(m){var g=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var y=m.length,v=!1;if(!y)return this.resolve([]);for(var b=-1,x=new this(r);++b<y;)_=m[b],g.resolve(_).then(function(w){v||(v=!0,a.resolve(x,w))},function(w){v||(v=!0,a.reject(x,w))});var _;return x}},{immediate:36}],38:[function(s,t,e){"use strict";var i={};(0,s("./lib/utils/common").assign)(i,s("./lib/deflate"),s("./lib/inflate"),s("./lib/zlib/constants")),t.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(s,t,e){"use strict";var i=s("./zlib/deflate"),r=s("./utils/common"),a=s("./utils/strings"),n=s("./zlib/messages"),o=s("./zlib/zstream"),l=Object.prototype.toString,h=0,u=-1,c=0,d=8;function p(m){if(!(this instanceof p))return new p(m);this.options=r.assign({level:u,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},m||{});var g=this.options;g.raw&&0<g.windowBits?g.windowBits=-g.windowBits:g.gzip&&0<g.windowBits&&g.windowBits<16&&(g.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var y=i.deflateInit2(this.strm,g.level,g.method,g.windowBits,g.memLevel,g.strategy);if(y!==h)throw new Error(n[y]);if(g.header&&i.deflateSetHeader(this.strm,g.header),g.dictionary){var v;if(v=typeof g.dictionary=="string"?a.string2buf(g.dictionary):l.call(g.dictionary)==="[object ArrayBuffer]"?new Uint8Array(g.dictionary):g.dictionary,(y=i.deflateSetDictionary(this.strm,v))!==h)throw new Error(n[y]);this._dict_set=!0}}function f(m,g){var y=new p(g);if(y.push(m,!0),y.err)throw y.msg||n[y.err];return y.result}p.prototype.push=function(m,g){var y,v,b=this.strm,x=this.options.chunkSize;if(this.ended)return!1;v=g===~~g?g:g===!0?4:0,typeof m=="string"?b.input=a.string2buf(m):l.call(m)==="[object ArrayBuffer]"?b.input=new Uint8Array(m):b.input=m,b.next_in=0,b.avail_in=b.input.length;do{if(b.avail_out===0&&(b.output=new r.Buf8(x),b.next_out=0,b.avail_out=x),(y=i.deflate(b,v))!==1&&y!==h)return this.onEnd(y),!(this.ended=!0);b.avail_out!==0&&(b.avail_in!==0||v!==4&&v!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(r.shrinkBuf(b.output,b.next_out))):this.onData(r.shrinkBuf(b.output,b.next_out)))}while((0<b.avail_in||b.avail_out===0)&&y!==1);return v===4?(y=i.deflateEnd(this.strm),this.onEnd(y),this.ended=!0,y===h):v!==2||(this.onEnd(h),!(b.avail_out=0))},p.prototype.onData=function(m){this.chunks.push(m)},p.prototype.onEnd=function(m){m===h&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},e.Deflate=p,e.deflate=f,e.deflateRaw=function(m,g){return(g=g||{}).raw=!0,f(m,g)},e.gzip=function(m,g){return(g=g||{}).gzip=!0,f(m,g)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(s,t,e){"use strict";var i=s("./zlib/inflate"),r=s("./utils/common"),a=s("./utils/strings"),n=s("./zlib/constants"),o=s("./zlib/messages"),l=s("./zlib/zstream"),h=s("./zlib/gzheader"),u=Object.prototype.toString;function c(p){if(!(this instanceof c))return new c(p);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},p||{});var f=this.options;f.raw&&0<=f.windowBits&&f.windowBits<16&&(f.windowBits=-f.windowBits,f.windowBits===0&&(f.windowBits=-15)),!(0<=f.windowBits&&f.windowBits<16)||p&&p.windowBits||(f.windowBits+=32),15<f.windowBits&&f.windowBits<48&&(15&f.windowBits)==0&&(f.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var m=i.inflateInit2(this.strm,f.windowBits);if(m!==n.Z_OK)throw new Error(o[m]);this.header=new h,i.inflateGetHeader(this.strm,this.header)}function d(p,f){var m=new c(f);if(m.push(p,!0),m.err)throw m.msg||o[m.err];return m.result}c.prototype.push=function(p,f){var m,g,y,v,b,x,_=this.strm,w=this.options.chunkSize,C=this.options.dictionary,P=!1;if(this.ended)return!1;g=f===~~f?f:f===!0?n.Z_FINISH:n.Z_NO_FLUSH,typeof p=="string"?_.input=a.binstring2buf(p):u.call(p)==="[object ArrayBuffer]"?_.input=new Uint8Array(p):_.input=p,_.next_in=0,_.avail_in=_.input.length;do{if(_.avail_out===0&&(_.output=new r.Buf8(w),_.next_out=0,_.avail_out=w),(m=i.inflate(_,n.Z_NO_FLUSH))===n.Z_NEED_DICT&&C&&(x=typeof C=="string"?a.string2buf(C):u.call(C)==="[object ArrayBuffer]"?new Uint8Array(C):C,m=i.inflateSetDictionary(this.strm,x)),m===n.Z_BUF_ERROR&&P===!0&&(m=n.Z_OK,P=!1),m!==n.Z_STREAM_END&&m!==n.Z_OK)return this.onEnd(m),!(this.ended=!0);_.next_out&&(_.avail_out!==0&&m!==n.Z_STREAM_END&&(_.avail_in!==0||g!==n.Z_FINISH&&g!==n.Z_SYNC_FLUSH)||(this.options.to==="string"?(y=a.utf8border(_.output,_.next_out),v=_.next_out-y,b=a.buf2string(_.output,y),_.next_out=v,_.avail_out=w-v,v&&r.arraySet(_.output,_.output,y,v,0),this.onData(b)):this.onData(r.shrinkBuf(_.output,_.next_out)))),_.avail_in===0&&_.avail_out===0&&(P=!0)}while((0<_.avail_in||_.avail_out===0)&&m!==n.Z_STREAM_END);return m===n.Z_STREAM_END&&(g=n.Z_FINISH),g===n.Z_FINISH?(m=i.inflateEnd(this.strm),this.onEnd(m),this.ended=!0,m===n.Z_OK):g!==n.Z_SYNC_FLUSH||(this.onEnd(n.Z_OK),!(_.avail_out=0))},c.prototype.onData=function(p){this.chunks.push(p)},c.prototype.onEnd=function(p){p===n.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},e.Inflate=c,e.inflate=d,e.inflateRaw=function(p,f){return(f=f||{}).raw=!0,d(p,f)},e.ungzip=d},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(s,t,e){"use strict";var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";e.assign=function(n){for(var o=Array.prototype.slice.call(arguments,1);o.length;){var l=o.shift();if(l){if(typeof l!="object")throw new TypeError(l+"must be non-object");for(var h in l)l.hasOwnProperty(h)&&(n[h]=l[h])}}return n},e.shrinkBuf=function(n,o){return n.length===o?n:n.subarray?n.subarray(0,o):(n.length=o,n)};var r={arraySet:function(n,o,l,h,u){if(o.subarray&&n.subarray)n.set(o.subarray(l,l+h),u);else for(var c=0;c<h;c++)n[u+c]=o[l+c]},flattenChunks:function(n){var o,l,h,u,c,d;for(o=h=0,l=n.length;o<l;o++)h+=n[o].length;for(d=new Uint8Array(h),o=u=0,l=n.length;o<l;o++)c=n[o],d.set(c,u),u+=c.length;return d}},a={arraySet:function(n,o,l,h,u){for(var c=0;c<h;c++)n[u+c]=o[l+c]},flattenChunks:function(n){return[].concat.apply([],n)}};e.setTyped=function(n){n?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,a))},e.setTyped(i)},{}],42:[function(s,t,e){"use strict";var i=s("./common"),r=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var n=new i.Buf8(256),o=0;o<256;o++)n[o]=252<=o?6:248<=o?5:240<=o?4:224<=o?3:192<=o?2:1;function l(h,u){if(u<65537&&(h.subarray&&a||!h.subarray&&r))return String.fromCharCode.apply(null,i.shrinkBuf(h,u));for(var c="",d=0;d<u;d++)c+=String.fromCharCode(h[d]);return c}n[254]=n[254]=1,e.string2buf=function(h){var u,c,d,p,f,m=h.length,g=0;for(p=0;p<m;p++)(64512&(c=h.charCodeAt(p)))==55296&&p+1<m&&(64512&(d=h.charCodeAt(p+1)))==56320&&(c=65536+(c-55296<<10)+(d-56320),p++),g+=c<128?1:c<2048?2:c<65536?3:4;for(u=new i.Buf8(g),p=f=0;f<g;p++)(64512&(c=h.charCodeAt(p)))==55296&&p+1<m&&(64512&(d=h.charCodeAt(p+1)))==56320&&(c=65536+(c-55296<<10)+(d-56320),p++),c<128?u[f++]=c:(c<2048?u[f++]=192|c>>>6:(c<65536?u[f++]=224|c>>>12:(u[f++]=240|c>>>18,u[f++]=128|c>>>12&63),u[f++]=128|c>>>6&63),u[f++]=128|63&c);return u},e.buf2binstring=function(h){return l(h,h.length)},e.binstring2buf=function(h){for(var u=new i.Buf8(h.length),c=0,d=u.length;c<d;c++)u[c]=h.charCodeAt(c);return u},e.buf2string=function(h,u){var c,d,p,f,m=u||h.length,g=new Array(2*m);for(c=d=0;c<m;)if((p=h[c++])<128)g[d++]=p;else if(4<(f=n[p]))g[d++]=65533,c+=f-1;else{for(p&=f===2?31:f===3?15:7;1<f&&c<m;)p=p<<6|63&h[c++],f--;1<f?g[d++]=65533:p<65536?g[d++]=p:(p-=65536,g[d++]=55296|p>>10&1023,g[d++]=56320|1023&p)}return l(g,d)},e.utf8border=function(h,u){var c;for((u=u||h.length)>h.length&&(u=h.length),c=u-1;0<=c&&(192&h[c])==128;)c--;return c<0||c===0?u:c+n[h[c]]>u?c:u}},{"./common":41}],43:[function(s,t,e){"use strict";t.exports=function(i,r,a,n){for(var o=65535&i|0,l=i>>>16&65535|0,h=0;a!==0;){for(a-=h=2e3<a?2e3:a;l=l+(o=o+r[n++]|0)|0,--h;);o%=65521,l%=65521}return o|l<<16|0}},{}],44:[function(s,t,e){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(s,t,e){"use strict";var i=(function(){for(var r,a=[],n=0;n<256;n++){r=n;for(var o=0;o<8;o++)r=1&r?3988292384^r>>>1:r>>>1;a[n]=r}return a})();t.exports=function(r,a,n,o){var l=i,h=o+n;r^=-1;for(var u=o;u<h;u++)r=r>>>8^l[255&(r^a[u])];return-1^r}},{}],46:[function(s,t,e){"use strict";var i,r=s("../utils/common"),a=s("./trees"),n=s("./adler32"),o=s("./crc32"),l=s("./messages"),h=0,u=4,c=0,d=-2,p=-1,f=4,m=2,g=8,y=9,v=286,b=30,x=19,_=2*v+1,w=15,C=3,P=258,D=P+C+1,$=42,A=113,T=1,I=2,N=3,B=4;function j(O,le){return O.msg=l[le],le}function z(O){return(O<<1)-(4<O?9:0)}function K(O){for(var le=O.length;0<=--le;)O[le]=0}function V(O){var le=O.state,oe=le.pending;oe>O.avail_out&&(oe=O.avail_out),oe!==0&&(r.arraySet(O.output,le.pending_buf,le.pending_out,oe,O.next_out),O.next_out+=oe,le.pending_out+=oe,O.total_out+=oe,O.avail_out-=oe,le.pending-=oe,le.pending===0&&(le.pending_out=0))}function E(O,le){a._tr_flush_block(O,0<=O.block_start?O.block_start:-1,O.strstart-O.block_start,le),O.block_start=O.strstart,V(O.strm)}function re(O,le){O.pending_buf[O.pending++]=le}function X(O,le){O.pending_buf[O.pending++]=le>>>8&255,O.pending_buf[O.pending++]=255&le}function Z(O,le){var oe,H,W=O.max_chain_length,J=O.strstart,ve=O.prev_length,be=O.nice_match,ie=O.strstart>O.w_size-D?O.strstart-(O.w_size-D):0,Pe=O.window,je=O.w_mask,$e=O.prev,ot=O.strstart+P,si=Pe[J+ve-1],It=Pe[J+ve];O.prev_length>=O.good_match&&(W>>=2),be>O.lookahead&&(be=O.lookahead);do if(Pe[(oe=le)+ve]===It&&Pe[oe+ve-1]===si&&Pe[oe]===Pe[J]&&Pe[++oe]===Pe[J+1]){J+=2,oe++;do;while(Pe[++J]===Pe[++oe]&&Pe[++J]===Pe[++oe]&&Pe[++J]===Pe[++oe]&&Pe[++J]===Pe[++oe]&&Pe[++J]===Pe[++oe]&&Pe[++J]===Pe[++oe]&&Pe[++J]===Pe[++oe]&&Pe[++J]===Pe[++oe]&&J<ot);if(H=P-(ot-J),J=ot-P,ve<H){if(O.match_start=le,be<=(ve=H))break;si=Pe[J+ve-1],It=Pe[J+ve]}}while((le=$e[le&je])>ie&&--W!=0);return ve<=O.lookahead?ve:O.lookahead}function ue(O){var le,oe,H,W,J,ve,be,ie,Pe,je,$e=O.w_size;do{if(W=O.window_size-O.lookahead-O.strstart,O.strstart>=$e+($e-D)){for(r.arraySet(O.window,O.window,$e,$e,0),O.match_start-=$e,O.strstart-=$e,O.block_start-=$e,le=oe=O.hash_size;H=O.head[--le],O.head[le]=$e<=H?H-$e:0,--oe;);for(le=oe=$e;H=O.prev[--le],O.prev[le]=$e<=H?H-$e:0,--oe;);W+=$e}if(O.strm.avail_in===0)break;if(ve=O.strm,be=O.window,ie=O.strstart+O.lookahead,Pe=W,je=void 0,je=ve.avail_in,Pe<je&&(je=Pe),oe=je===0?0:(ve.avail_in-=je,r.arraySet(be,ve.input,ve.next_in,je,ie),ve.state.wrap===1?ve.adler=n(ve.adler,be,je,ie):ve.state.wrap===2&&(ve.adler=o(ve.adler,be,je,ie)),ve.next_in+=je,ve.total_in+=je,je),O.lookahead+=oe,O.lookahead+O.insert>=C)for(J=O.strstart-O.insert,O.ins_h=O.window[J],O.ins_h=(O.ins_h<<O.hash_shift^O.window[J+1])&O.hash_mask;O.insert&&(O.ins_h=(O.ins_h<<O.hash_shift^O.window[J+C-1])&O.hash_mask,O.prev[J&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=J,J++,O.insert--,!(O.lookahead+O.insert<C)););}while(O.lookahead<D&&O.strm.avail_in!==0)}function Le(O,le){for(var oe,H;;){if(O.lookahead<D){if(ue(O),O.lookahead<D&&le===h)return T;if(O.lookahead===0)break}if(oe=0,O.lookahead>=C&&(O.ins_h=(O.ins_h<<O.hash_shift^O.window[O.strstart+C-1])&O.hash_mask,oe=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart),oe!==0&&O.strstart-oe<=O.w_size-D&&(O.match_length=Z(O,oe)),O.match_length>=C)if(H=a._tr_tally(O,O.strstart-O.match_start,O.match_length-C),O.lookahead-=O.match_length,O.match_length<=O.max_lazy_match&&O.lookahead>=C){for(O.match_length--;O.strstart++,O.ins_h=(O.ins_h<<O.hash_shift^O.window[O.strstart+C-1])&O.hash_mask,oe=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart,--O.match_length!=0;);O.strstart++}else O.strstart+=O.match_length,O.match_length=0,O.ins_h=O.window[O.strstart],O.ins_h=(O.ins_h<<O.hash_shift^O.window[O.strstart+1])&O.hash_mask;else H=a._tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++;if(H&&(E(O,!1),O.strm.avail_out===0))return T}return O.insert=O.strstart<C-1?O.strstart:C-1,le===u?(E(O,!0),O.strm.avail_out===0?N:B):O.last_lit&&(E(O,!1),O.strm.avail_out===0)?T:I}function we(O,le){for(var oe,H,W;;){if(O.lookahead<D){if(ue(O),O.lookahead<D&&le===h)return T;if(O.lookahead===0)break}if(oe=0,O.lookahead>=C&&(O.ins_h=(O.ins_h<<O.hash_shift^O.window[O.strstart+C-1])&O.hash_mask,oe=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart),O.prev_length=O.match_length,O.prev_match=O.match_start,O.match_length=C-1,oe!==0&&O.prev_length<O.max_lazy_match&&O.strstart-oe<=O.w_size-D&&(O.match_length=Z(O,oe),O.match_length<=5&&(O.strategy===1||O.match_length===C&&4096<O.strstart-O.match_start)&&(O.match_length=C-1)),O.prev_length>=C&&O.match_length<=O.prev_length){for(W=O.strstart+O.lookahead-C,H=a._tr_tally(O,O.strstart-1-O.prev_match,O.prev_length-C),O.lookahead-=O.prev_length-1,O.prev_length-=2;++O.strstart<=W&&(O.ins_h=(O.ins_h<<O.hash_shift^O.window[O.strstart+C-1])&O.hash_mask,oe=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart),--O.prev_length!=0;);if(O.match_available=0,O.match_length=C-1,O.strstart++,H&&(E(O,!1),O.strm.avail_out===0))return T}else if(O.match_available){if((H=a._tr_tally(O,0,O.window[O.strstart-1]))&&E(O,!1),O.strstart++,O.lookahead--,O.strm.avail_out===0)return T}else O.match_available=1,O.strstart++,O.lookahead--}return O.match_available&&(H=a._tr_tally(O,0,O.window[O.strstart-1]),O.match_available=0),O.insert=O.strstart<C-1?O.strstart:C-1,le===u?(E(O,!0),O.strm.avail_out===0?N:B):O.last_lit&&(E(O,!1),O.strm.avail_out===0)?T:I}function Te(O,le,oe,H,W){this.good_length=O,this.max_lazy=le,this.nice_length=oe,this.max_chain=H,this.func=W}function Ze(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=g,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(2*_),this.dyn_dtree=new r.Buf16(2*(2*b+1)),this.bl_tree=new r.Buf16(2*(2*x+1)),K(this.dyn_ltree),K(this.dyn_dtree),K(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(w+1),this.heap=new r.Buf16(2*v+1),K(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(2*v+1),K(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ve(O){var le;return O&&O.state?(O.total_in=O.total_out=0,O.data_type=m,(le=O.state).pending=0,le.pending_out=0,le.wrap<0&&(le.wrap=-le.wrap),le.status=le.wrap?$:A,O.adler=le.wrap===2?0:1,le.last_flush=h,a._tr_init(le),c):j(O,d)}function kt(O){var le=Ve(O);return le===c&&(function(oe){oe.window_size=2*oe.w_size,K(oe.head),oe.max_lazy_match=i[oe.level].max_lazy,oe.good_match=i[oe.level].good_length,oe.nice_match=i[oe.level].nice_length,oe.max_chain_length=i[oe.level].max_chain,oe.strstart=0,oe.block_start=0,oe.lookahead=0,oe.insert=0,oe.match_length=oe.prev_length=C-1,oe.match_available=0,oe.ins_h=0})(O.state),le}function Wt(O,le,oe,H,W,J){if(!O)return d;var ve=1;if(le===p&&(le=6),H<0?(ve=0,H=-H):15<H&&(ve=2,H-=16),W<1||y<W||oe!==g||H<8||15<H||le<0||9<le||J<0||f<J)return j(O,d);H===8&&(H=9);var be=new Ze;return(O.state=be).strm=O,be.wrap=ve,be.gzhead=null,be.w_bits=H,be.w_size=1<<be.w_bits,be.w_mask=be.w_size-1,be.hash_bits=W+7,be.hash_size=1<<be.hash_bits,be.hash_mask=be.hash_size-1,be.hash_shift=~~((be.hash_bits+C-1)/C),be.window=new r.Buf8(2*be.w_size),be.head=new r.Buf16(be.hash_size),be.prev=new r.Buf16(be.w_size),be.lit_bufsize=1<<W+6,be.pending_buf_size=4*be.lit_bufsize,be.pending_buf=new r.Buf8(be.pending_buf_size),be.d_buf=1*be.lit_bufsize,be.l_buf=3*be.lit_bufsize,be.level=le,be.strategy=J,be.method=oe,kt(O)}i=[new Te(0,0,0,0,function(O,le){var oe=65535;for(oe>O.pending_buf_size-5&&(oe=O.pending_buf_size-5);;){if(O.lookahead<=1){if(ue(O),O.lookahead===0&&le===h)return T;if(O.lookahead===0)break}O.strstart+=O.lookahead,O.lookahead=0;var H=O.block_start+oe;if((O.strstart===0||O.strstart>=H)&&(O.lookahead=O.strstart-H,O.strstart=H,E(O,!1),O.strm.avail_out===0)||O.strstart-O.block_start>=O.w_size-D&&(E(O,!1),O.strm.avail_out===0))return T}return O.insert=0,le===u?(E(O,!0),O.strm.avail_out===0?N:B):(O.strstart>O.block_start&&(E(O,!1),O.strm.avail_out),T)}),new Te(4,4,8,4,Le),new Te(4,5,16,8,Le),new Te(4,6,32,32,Le),new Te(4,4,16,16,we),new Te(8,16,32,32,we),new Te(8,16,128,128,we),new Te(8,32,128,256,we),new Te(32,128,258,1024,we),new Te(32,258,258,4096,we)],e.deflateInit=function(O,le){return Wt(O,le,g,15,8,0)},e.deflateInit2=Wt,e.deflateReset=kt,e.deflateResetKeep=Ve,e.deflateSetHeader=function(O,le){return O&&O.state?O.state.wrap!==2?d:(O.state.gzhead=le,c):d},e.deflate=function(O,le){var oe,H,W,J;if(!O||!O.state||5<le||le<0)return O?j(O,d):d;if(H=O.state,!O.output||!O.input&&O.avail_in!==0||H.status===666&&le!==u)return j(O,O.avail_out===0?-5:d);if(H.strm=O,oe=H.last_flush,H.last_flush=le,H.status===$)if(H.wrap===2)O.adler=0,re(H,31),re(H,139),re(H,8),H.gzhead?(re(H,(H.gzhead.text?1:0)+(H.gzhead.hcrc?2:0)+(H.gzhead.extra?4:0)+(H.gzhead.name?8:0)+(H.gzhead.comment?16:0)),re(H,255&H.gzhead.time),re(H,H.gzhead.time>>8&255),re(H,H.gzhead.time>>16&255),re(H,H.gzhead.time>>24&255),re(H,H.level===9?2:2<=H.strategy||H.level<2?4:0),re(H,255&H.gzhead.os),H.gzhead.extra&&H.gzhead.extra.length&&(re(H,255&H.gzhead.extra.length),re(H,H.gzhead.extra.length>>8&255)),H.gzhead.hcrc&&(O.adler=o(O.adler,H.pending_buf,H.pending,0)),H.gzindex=0,H.status=69):(re(H,0),re(H,0),re(H,0),re(H,0),re(H,0),re(H,H.level===9?2:2<=H.strategy||H.level<2?4:0),re(H,3),H.status=A);else{var ve=g+(H.w_bits-8<<4)<<8;ve|=(2<=H.strategy||H.level<2?0:H.level<6?1:H.level===6?2:3)<<6,H.strstart!==0&&(ve|=32),ve+=31-ve%31,H.status=A,X(H,ve),H.strstart!==0&&(X(H,O.adler>>>16),X(H,65535&O.adler)),O.adler=1}if(H.status===69)if(H.gzhead.extra){for(W=H.pending;H.gzindex<(65535&H.gzhead.extra.length)&&(H.pending!==H.pending_buf_size||(H.gzhead.hcrc&&H.pending>W&&(O.adler=o(O.adler,H.pending_buf,H.pending-W,W)),V(O),W=H.pending,H.pending!==H.pending_buf_size));)re(H,255&H.gzhead.extra[H.gzindex]),H.gzindex++;H.gzhead.hcrc&&H.pending>W&&(O.adler=o(O.adler,H.pending_buf,H.pending-W,W)),H.gzindex===H.gzhead.extra.length&&(H.gzindex=0,H.status=73)}else H.status=73;if(H.status===73)if(H.gzhead.name){W=H.pending;do{if(H.pending===H.pending_buf_size&&(H.gzhead.hcrc&&H.pending>W&&(O.adler=o(O.adler,H.pending_buf,H.pending-W,W)),V(O),W=H.pending,H.pending===H.pending_buf_size)){J=1;break}J=H.gzindex<H.gzhead.name.length?255&H.gzhead.name.charCodeAt(H.gzindex++):0,re(H,J)}while(J!==0);H.gzhead.hcrc&&H.pending>W&&(O.adler=o(O.adler,H.pending_buf,H.pending-W,W)),J===0&&(H.gzindex=0,H.status=91)}else H.status=91;if(H.status===91)if(H.gzhead.comment){W=H.pending;do{if(H.pending===H.pending_buf_size&&(H.gzhead.hcrc&&H.pending>W&&(O.adler=o(O.adler,H.pending_buf,H.pending-W,W)),V(O),W=H.pending,H.pending===H.pending_buf_size)){J=1;break}J=H.gzindex<H.gzhead.comment.length?255&H.gzhead.comment.charCodeAt(H.gzindex++):0,re(H,J)}while(J!==0);H.gzhead.hcrc&&H.pending>W&&(O.adler=o(O.adler,H.pending_buf,H.pending-W,W)),J===0&&(H.status=103)}else H.status=103;if(H.status===103&&(H.gzhead.hcrc?(H.pending+2>H.pending_buf_size&&V(O),H.pending+2<=H.pending_buf_size&&(re(H,255&O.adler),re(H,O.adler>>8&255),O.adler=0,H.status=A)):H.status=A),H.pending!==0){if(V(O),O.avail_out===0)return H.last_flush=-1,c}else if(O.avail_in===0&&z(le)<=z(oe)&&le!==u)return j(O,-5);if(H.status===666&&O.avail_in!==0)return j(O,-5);if(O.avail_in!==0||H.lookahead!==0||le!==h&&H.status!==666){var be=H.strategy===2?(function(ie,Pe){for(var je;;){if(ie.lookahead===0&&(ue(ie),ie.lookahead===0)){if(Pe===h)return T;break}if(ie.match_length=0,je=a._tr_tally(ie,0,ie.window[ie.strstart]),ie.lookahead--,ie.strstart++,je&&(E(ie,!1),ie.strm.avail_out===0))return T}return ie.insert=0,Pe===u?(E(ie,!0),ie.strm.avail_out===0?N:B):ie.last_lit&&(E(ie,!1),ie.strm.avail_out===0)?T:I})(H,le):H.strategy===3?(function(ie,Pe){for(var je,$e,ot,si,It=ie.window;;){if(ie.lookahead<=P){if(ue(ie),ie.lookahead<=P&&Pe===h)return T;if(ie.lookahead===0)break}if(ie.match_length=0,ie.lookahead>=C&&0<ie.strstart&&($e=It[ot=ie.strstart-1])===It[++ot]&&$e===It[++ot]&&$e===It[++ot]){si=ie.strstart+P;do;while($e===It[++ot]&&$e===It[++ot]&&$e===It[++ot]&&$e===It[++ot]&&$e===It[++ot]&&$e===It[++ot]&&$e===It[++ot]&&$e===It[++ot]&&ot<si);ie.match_length=P-(si-ot),ie.match_length>ie.lookahead&&(ie.match_length=ie.lookahead)}if(ie.match_length>=C?(je=a._tr_tally(ie,1,ie.match_length-C),ie.lookahead-=ie.match_length,ie.strstart+=ie.match_length,ie.match_length=0):(je=a._tr_tally(ie,0,ie.window[ie.strstart]),ie.lookahead--,ie.strstart++),je&&(E(ie,!1),ie.strm.avail_out===0))return T}return ie.insert=0,Pe===u?(E(ie,!0),ie.strm.avail_out===0?N:B):ie.last_lit&&(E(ie,!1),ie.strm.avail_out===0)?T:I})(H,le):i[H.level].func(H,le);if(be!==N&&be!==B||(H.status=666),be===T||be===N)return O.avail_out===0&&(H.last_flush=-1),c;if(be===I&&(le===1?a._tr_align(H):le!==5&&(a._tr_stored_block(H,0,0,!1),le===3&&(K(H.head),H.lookahead===0&&(H.strstart=0,H.block_start=0,H.insert=0))),V(O),O.avail_out===0))return H.last_flush=-1,c}return le!==u?c:H.wrap<=0?1:(H.wrap===2?(re(H,255&O.adler),re(H,O.adler>>8&255),re(H,O.adler>>16&255),re(H,O.adler>>24&255),re(H,255&O.total_in),re(H,O.total_in>>8&255),re(H,O.total_in>>16&255),re(H,O.total_in>>24&255)):(X(H,O.adler>>>16),X(H,65535&O.adler)),V(O),0<H.wrap&&(H.wrap=-H.wrap),H.pending!==0?c:1)},e.deflateEnd=function(O){var le;return O&&O.state?(le=O.state.status)!==$&&le!==69&&le!==73&&le!==91&&le!==103&&le!==A&&le!==666?j(O,d):(O.state=null,le===A?j(O,-3):c):d},e.deflateSetDictionary=function(O,le){var oe,H,W,J,ve,be,ie,Pe,je=le.length;if(!O||!O.state||(J=(oe=O.state).wrap)===2||J===1&&oe.status!==$||oe.lookahead)return d;for(J===1&&(O.adler=n(O.adler,le,je,0)),oe.wrap=0,je>=oe.w_size&&(J===0&&(K(oe.head),oe.strstart=0,oe.block_start=0,oe.insert=0),Pe=new r.Buf8(oe.w_size),r.arraySet(Pe,le,je-oe.w_size,oe.w_size,0),le=Pe,je=oe.w_size),ve=O.avail_in,be=O.next_in,ie=O.input,O.avail_in=je,O.next_in=0,O.input=le,ue(oe);oe.lookahead>=C;){for(H=oe.strstart,W=oe.lookahead-(C-1);oe.ins_h=(oe.ins_h<<oe.hash_shift^oe.window[H+C-1])&oe.hash_mask,oe.prev[H&oe.w_mask]=oe.head[oe.ins_h],oe.head[oe.ins_h]=H,H++,--W;);oe.strstart=H,oe.lookahead=C-1,ue(oe)}return oe.strstart+=oe.lookahead,oe.block_start=oe.strstart,oe.insert=oe.lookahead,oe.lookahead=0,oe.match_length=oe.prev_length=C-1,oe.match_available=0,O.next_in=be,O.input=ie,O.avail_in=ve,oe.wrap=J,c},e.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(s,t,e){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(s,t,e){"use strict";t.exports=function(i,r){var a,n,o,l,h,u,c,d,p,f,m,g,y,v,b,x,_,w,C,P,D,$,A,T,I;a=i.state,n=i.next_in,T=i.input,o=n+(i.avail_in-5),l=i.next_out,I=i.output,h=l-(r-i.avail_out),u=l+(i.avail_out-257),c=a.dmax,d=a.wsize,p=a.whave,f=a.wnext,m=a.window,g=a.hold,y=a.bits,v=a.lencode,b=a.distcode,x=(1<<a.lenbits)-1,_=(1<<a.distbits)-1;e:do{y<15&&(g+=T[n++]<<y,y+=8,g+=T[n++]<<y,y+=8),w=v[g&x];t:for(;;){if(g>>>=C=w>>>24,y-=C,(C=w>>>16&255)===0)I[l++]=65535&w;else{if(!(16&C)){if((64&C)==0){w=v[(65535&w)+(g&(1<<C)-1)];continue t}if(32&C){a.mode=12;break e}i.msg="invalid literal/length code",a.mode=30;break e}P=65535&w,(C&=15)&&(y<C&&(g+=T[n++]<<y,y+=8),P+=g&(1<<C)-1,g>>>=C,y-=C),y<15&&(g+=T[n++]<<y,y+=8,g+=T[n++]<<y,y+=8),w=b[g&_];i:for(;;){if(g>>>=C=w>>>24,y-=C,!(16&(C=w>>>16&255))){if((64&C)==0){w=b[(65535&w)+(g&(1<<C)-1)];continue i}i.msg="invalid distance code",a.mode=30;break e}if(D=65535&w,y<(C&=15)&&(g+=T[n++]<<y,(y+=8)<C&&(g+=T[n++]<<y,y+=8)),c<(D+=g&(1<<C)-1)){i.msg="invalid distance too far back",a.mode=30;break e}if(g>>>=C,y-=C,(C=l-h)<D){if(p<(C=D-C)&&a.sane){i.msg="invalid distance too far back",a.mode=30;break e}if(A=m,($=0)===f){if($+=d-C,C<P){for(P-=C;I[l++]=m[$++],--C;);$=l-D,A=I}}else if(f<C){if($+=d+f-C,(C-=f)<P){for(P-=C;I[l++]=m[$++],--C;);if($=0,f<P){for(P-=C=f;I[l++]=m[$++],--C;);$=l-D,A=I}}}else if($+=f-C,C<P){for(P-=C;I[l++]=m[$++],--C;);$=l-D,A=I}for(;2<P;)I[l++]=A[$++],I[l++]=A[$++],I[l++]=A[$++],P-=3;P&&(I[l++]=A[$++],1<P&&(I[l++]=A[$++]))}else{for($=l-D;I[l++]=I[$++],I[l++]=I[$++],I[l++]=I[$++],2<(P-=3););P&&(I[l++]=I[$++],1<P&&(I[l++]=I[$++]))}break}}break}}while(n<o&&l<u);n-=P=y>>3,g&=(1<<(y-=P<<3))-1,i.next_in=n,i.next_out=l,i.avail_in=n<o?o-n+5:5-(n-o),i.avail_out=l<u?u-l+257:257-(l-u),a.hold=g,a.bits=y}},{}],49:[function(s,t,e){"use strict";var i=s("../utils/common"),r=s("./adler32"),a=s("./crc32"),n=s("./inffast"),o=s("./inftrees"),l=1,h=2,u=0,c=-2,d=1,p=852,f=592;function m($){return($>>>24&255)+($>>>8&65280)+((65280&$)<<8)+((255&$)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function y($){var A;return $&&$.state?(A=$.state,$.total_in=$.total_out=A.total=0,$.msg="",A.wrap&&($.adler=1&A.wrap),A.mode=d,A.last=0,A.havedict=0,A.dmax=32768,A.head=null,A.hold=0,A.bits=0,A.lencode=A.lendyn=new i.Buf32(p),A.distcode=A.distdyn=new i.Buf32(f),A.sane=1,A.back=-1,u):c}function v($){var A;return $&&$.state?((A=$.state).wsize=0,A.whave=0,A.wnext=0,y($)):c}function b($,A){var T,I;return $&&$.state?(I=$.state,A<0?(T=0,A=-A):(T=1+(A>>4),A<48&&(A&=15)),A&&(A<8||15<A)?c:(I.window!==null&&I.wbits!==A&&(I.window=null),I.wrap=T,I.wbits=A,v($))):c}function x($,A){var T,I;return $?(I=new g,($.state=I).window=null,(T=b($,A))!==u&&($.state=null),T):c}var _,w,C=!0;function P($){if(C){var A;for(_=new i.Buf32(512),w=new i.Buf32(32),A=0;A<144;)$.lens[A++]=8;for(;A<256;)$.lens[A++]=9;for(;A<280;)$.lens[A++]=7;for(;A<288;)$.lens[A++]=8;for(o(l,$.lens,0,288,_,0,$.work,{bits:9}),A=0;A<32;)$.lens[A++]=5;o(h,$.lens,0,32,w,0,$.work,{bits:5}),C=!1}$.lencode=_,$.lenbits=9,$.distcode=w,$.distbits=5}function D($,A,T,I){var N,B=$.state;return B.window===null&&(B.wsize=1<<B.wbits,B.wnext=0,B.whave=0,B.window=new i.Buf8(B.wsize)),I>=B.wsize?(i.arraySet(B.window,A,T-B.wsize,B.wsize,0),B.wnext=0,B.whave=B.wsize):(I<(N=B.wsize-B.wnext)&&(N=I),i.arraySet(B.window,A,T-I,N,B.wnext),(I-=N)?(i.arraySet(B.window,A,T-I,I,0),B.wnext=I,B.whave=B.wsize):(B.wnext+=N,B.wnext===B.wsize&&(B.wnext=0),B.whave<B.wsize&&(B.whave+=N))),0}e.inflateReset=v,e.inflateReset2=b,e.inflateResetKeep=y,e.inflateInit=function($){return x($,15)},e.inflateInit2=x,e.inflate=function($,A){var T,I,N,B,j,z,K,V,E,re,X,Z,ue,Le,we,Te,Ze,Ve,kt,Wt,O,le,oe,H,W=0,J=new i.Buf8(4),ve=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!$||!$.state||!$.output||!$.input&&$.avail_in!==0)return c;(T=$.state).mode===12&&(T.mode=13),j=$.next_out,N=$.output,K=$.avail_out,B=$.next_in,I=$.input,z=$.avail_in,V=T.hold,E=T.bits,re=z,X=K,le=u;e:for(;;)switch(T.mode){case d:if(T.wrap===0){T.mode=13;break}for(;E<16;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}if(2&T.wrap&&V===35615){J[T.check=0]=255&V,J[1]=V>>>8&255,T.check=a(T.check,J,2,0),E=V=0,T.mode=2;break}if(T.flags=0,T.head&&(T.head.done=!1),!(1&T.wrap)||(((255&V)<<8)+(V>>8))%31){$.msg="incorrect header check",T.mode=30;break}if((15&V)!=8){$.msg="unknown compression method",T.mode=30;break}if(E-=4,O=8+(15&(V>>>=4)),T.wbits===0)T.wbits=O;else if(O>T.wbits){$.msg="invalid window size",T.mode=30;break}T.dmax=1<<O,$.adler=T.check=1,T.mode=512&V?10:12,E=V=0;break;case 2:for(;E<16;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}if(T.flags=V,(255&T.flags)!=8){$.msg="unknown compression method",T.mode=30;break}if(57344&T.flags){$.msg="unknown header flags set",T.mode=30;break}T.head&&(T.head.text=V>>8&1),512&T.flags&&(J[0]=255&V,J[1]=V>>>8&255,T.check=a(T.check,J,2,0)),E=V=0,T.mode=3;case 3:for(;E<32;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}T.head&&(T.head.time=V),512&T.flags&&(J[0]=255&V,J[1]=V>>>8&255,J[2]=V>>>16&255,J[3]=V>>>24&255,T.check=a(T.check,J,4,0)),E=V=0,T.mode=4;case 4:for(;E<16;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}T.head&&(T.head.xflags=255&V,T.head.os=V>>8),512&T.flags&&(J[0]=255&V,J[1]=V>>>8&255,T.check=a(T.check,J,2,0)),E=V=0,T.mode=5;case 5:if(1024&T.flags){for(;E<16;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}T.length=V,T.head&&(T.head.extra_len=V),512&T.flags&&(J[0]=255&V,J[1]=V>>>8&255,T.check=a(T.check,J,2,0)),E=V=0}else T.head&&(T.head.extra=null);T.mode=6;case 6:if(1024&T.flags&&(z<(Z=T.length)&&(Z=z),Z&&(T.head&&(O=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),i.arraySet(T.head.extra,I,B,Z,O)),512&T.flags&&(T.check=a(T.check,I,Z,B)),z-=Z,B+=Z,T.length-=Z),T.length))break e;T.length=0,T.mode=7;case 7:if(2048&T.flags){if(z===0)break e;for(Z=0;O=I[B+Z++],T.head&&O&&T.length<65536&&(T.head.name+=String.fromCharCode(O)),O&&Z<z;);if(512&T.flags&&(T.check=a(T.check,I,Z,B)),z-=Z,B+=Z,O)break e}else T.head&&(T.head.name=null);T.length=0,T.mode=8;case 8:if(4096&T.flags){if(z===0)break e;for(Z=0;O=I[B+Z++],T.head&&O&&T.length<65536&&(T.head.comment+=String.fromCharCode(O)),O&&Z<z;);if(512&T.flags&&(T.check=a(T.check,I,Z,B)),z-=Z,B+=Z,O)break e}else T.head&&(T.head.comment=null);T.mode=9;case 9:if(512&T.flags){for(;E<16;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}if(V!==(65535&T.check)){$.msg="header crc mismatch",T.mode=30;break}E=V=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0),$.adler=T.check=0,T.mode=12;break;case 10:for(;E<32;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}$.adler=T.check=m(V),E=V=0,T.mode=11;case 11:if(T.havedict===0)return $.next_out=j,$.avail_out=K,$.next_in=B,$.avail_in=z,T.hold=V,T.bits=E,2;$.adler=T.check=1,T.mode=12;case 12:if(A===5||A===6)break e;case 13:if(T.last){V>>>=7&E,E-=7&E,T.mode=27;break}for(;E<3;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}switch(T.last=1&V,E-=1,3&(V>>>=1)){case 0:T.mode=14;break;case 1:if(P(T),T.mode=20,A!==6)break;V>>>=2,E-=2;break e;case 2:T.mode=17;break;case 3:$.msg="invalid block type",T.mode=30}V>>>=2,E-=2;break;case 14:for(V>>>=7&E,E-=7&E;E<32;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}if((65535&V)!=(V>>>16^65535)){$.msg="invalid stored block lengths",T.mode=30;break}if(T.length=65535&V,E=V=0,T.mode=15,A===6)break e;case 15:T.mode=16;case 16:if(Z=T.length){if(z<Z&&(Z=z),K<Z&&(Z=K),Z===0)break e;i.arraySet(N,I,B,Z,j),z-=Z,B+=Z,K-=Z,j+=Z,T.length-=Z;break}T.mode=12;break;case 17:for(;E<14;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}if(T.nlen=257+(31&V),V>>>=5,E-=5,T.ndist=1+(31&V),V>>>=5,E-=5,T.ncode=4+(15&V),V>>>=4,E-=4,286<T.nlen||30<T.ndist){$.msg="too many length or distance symbols",T.mode=30;break}T.have=0,T.mode=18;case 18:for(;T.have<T.ncode;){for(;E<3;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}T.lens[ve[T.have++]]=7&V,V>>>=3,E-=3}for(;T.have<19;)T.lens[ve[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,oe={bits:T.lenbits},le=o(0,T.lens,0,19,T.lencode,0,T.work,oe),T.lenbits=oe.bits,le){$.msg="invalid code lengths set",T.mode=30;break}T.have=0,T.mode=19;case 19:for(;T.have<T.nlen+T.ndist;){for(;Te=(W=T.lencode[V&(1<<T.lenbits)-1])>>>16&255,Ze=65535&W,!((we=W>>>24)<=E);){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}if(Ze<16)V>>>=we,E-=we,T.lens[T.have++]=Ze;else{if(Ze===16){for(H=we+2;E<H;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}if(V>>>=we,E-=we,T.have===0){$.msg="invalid bit length repeat",T.mode=30;break}O=T.lens[T.have-1],Z=3+(3&V),V>>>=2,E-=2}else if(Ze===17){for(H=we+3;E<H;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}E-=we,O=0,Z=3+(7&(V>>>=we)),V>>>=3,E-=3}else{for(H=we+7;E<H;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}E-=we,O=0,Z=11+(127&(V>>>=we)),V>>>=7,E-=7}if(T.have+Z>T.nlen+T.ndist){$.msg="invalid bit length repeat",T.mode=30;break}for(;Z--;)T.lens[T.have++]=O}}if(T.mode===30)break;if(T.lens[256]===0){$.msg="invalid code -- missing end-of-block",T.mode=30;break}if(T.lenbits=9,oe={bits:T.lenbits},le=o(l,T.lens,0,T.nlen,T.lencode,0,T.work,oe),T.lenbits=oe.bits,le){$.msg="invalid literal/lengths set",T.mode=30;break}if(T.distbits=6,T.distcode=T.distdyn,oe={bits:T.distbits},le=o(h,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,oe),T.distbits=oe.bits,le){$.msg="invalid distances set",T.mode=30;break}if(T.mode=20,A===6)break e;case 20:T.mode=21;case 21:if(6<=z&&258<=K){$.next_out=j,$.avail_out=K,$.next_in=B,$.avail_in=z,T.hold=V,T.bits=E,n($,X),j=$.next_out,N=$.output,K=$.avail_out,B=$.next_in,I=$.input,z=$.avail_in,V=T.hold,E=T.bits,T.mode===12&&(T.back=-1);break}for(T.back=0;Te=(W=T.lencode[V&(1<<T.lenbits)-1])>>>16&255,Ze=65535&W,!((we=W>>>24)<=E);){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}if(Te&&(240&Te)==0){for(Ve=we,kt=Te,Wt=Ze;Te=(W=T.lencode[Wt+((V&(1<<Ve+kt)-1)>>Ve)])>>>16&255,Ze=65535&W,!(Ve+(we=W>>>24)<=E);){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}V>>>=Ve,E-=Ve,T.back+=Ve}if(V>>>=we,E-=we,T.back+=we,T.length=Ze,Te===0){T.mode=26;break}if(32&Te){T.back=-1,T.mode=12;break}if(64&Te){$.msg="invalid literal/length code",T.mode=30;break}T.extra=15&Te,T.mode=22;case 22:if(T.extra){for(H=T.extra;E<H;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}T.length+=V&(1<<T.extra)-1,V>>>=T.extra,E-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=23;case 23:for(;Te=(W=T.distcode[V&(1<<T.distbits)-1])>>>16&255,Ze=65535&W,!((we=W>>>24)<=E);){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}if((240&Te)==0){for(Ve=we,kt=Te,Wt=Ze;Te=(W=T.distcode[Wt+((V&(1<<Ve+kt)-1)>>Ve)])>>>16&255,Ze=65535&W,!(Ve+(we=W>>>24)<=E);){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}V>>>=Ve,E-=Ve,T.back+=Ve}if(V>>>=we,E-=we,T.back+=we,64&Te){$.msg="invalid distance code",T.mode=30;break}T.offset=Ze,T.extra=15&Te,T.mode=24;case 24:if(T.extra){for(H=T.extra;E<H;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}T.offset+=V&(1<<T.extra)-1,V>>>=T.extra,E-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){$.msg="invalid distance too far back",T.mode=30;break}T.mode=25;case 25:if(K===0)break e;if(Z=X-K,T.offset>Z){if((Z=T.offset-Z)>T.whave&&T.sane){$.msg="invalid distance too far back",T.mode=30;break}ue=Z>T.wnext?(Z-=T.wnext,T.wsize-Z):T.wnext-Z,Z>T.length&&(Z=T.length),Le=T.window}else Le=N,ue=j-T.offset,Z=T.length;for(K<Z&&(Z=K),K-=Z,T.length-=Z;N[j++]=Le[ue++],--Z;);T.length===0&&(T.mode=21);break;case 26:if(K===0)break e;N[j++]=T.length,K--,T.mode=21;break;case 27:if(T.wrap){for(;E<32;){if(z===0)break e;z--,V|=I[B++]<<E,E+=8}if(X-=K,$.total_out+=X,T.total+=X,X&&($.adler=T.check=T.flags?a(T.check,N,X,j-X):r(T.check,N,X,j-X)),X=K,(T.flags?V:m(V))!==T.check){$.msg="incorrect data check",T.mode=30;break}E=V=0}T.mode=28;case 28:if(T.wrap&&T.flags){for(;E<32;){if(z===0)break e;z--,V+=I[B++]<<E,E+=8}if(V!==(4294967295&T.total)){$.msg="incorrect length check",T.mode=30;break}E=V=0}T.mode=29;case 29:le=1;break e;case 30:le=-3;break e;case 31:return-4;default:return c}return $.next_out=j,$.avail_out=K,$.next_in=B,$.avail_in=z,T.hold=V,T.bits=E,(T.wsize||X!==$.avail_out&&T.mode<30&&(T.mode<27||A!==4))&&D($,$.output,$.next_out,X-$.avail_out)?(T.mode=31,-4):(re-=$.avail_in,X-=$.avail_out,$.total_in+=re,$.total_out+=X,T.total+=X,T.wrap&&X&&($.adler=T.check=T.flags?a(T.check,N,X,$.next_out-X):r(T.check,N,X,$.next_out-X)),$.data_type=T.bits+(T.last?64:0)+(T.mode===12?128:0)+(T.mode===20||T.mode===15?256:0),(re==0&&X===0||A===4)&&le===u&&(le=-5),le)},e.inflateEnd=function($){if(!$||!$.state)return c;var A=$.state;return A.window&&(A.window=null),$.state=null,u},e.inflateGetHeader=function($,A){var T;return $&&$.state?(2&(T=$.state).wrap)==0?c:((T.head=A).done=!1,u):c},e.inflateSetDictionary=function($,A){var T,I=A.length;return $&&$.state?(T=$.state).wrap!==0&&T.mode!==11?c:T.mode===11&&r(1,A,I,0)!==T.check?-3:D($,A,I,I)?(T.mode=31,-4):(T.havedict=1,u):c},e.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(s,t,e){"use strict";var i=s("../utils/common"),r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],n=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],o=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(l,h,u,c,d,p,f,m){var g,y,v,b,x,_,w,C,P,D=m.bits,$=0,A=0,T=0,I=0,N=0,B=0,j=0,z=0,K=0,V=0,E=null,re=0,X=new i.Buf16(16),Z=new i.Buf16(16),ue=null,Le=0;for($=0;$<=15;$++)X[$]=0;for(A=0;A<c;A++)X[h[u+A]]++;for(N=D,I=15;1<=I&&X[I]===0;I--);if(I<N&&(N=I),I===0)return d[p++]=20971520,d[p++]=20971520,m.bits=1,0;for(T=1;T<I&&X[T]===0;T++);for(N<T&&(N=T),$=z=1;$<=15;$++)if(z<<=1,(z-=X[$])<0)return-1;if(0<z&&(l===0||I!==1))return-1;for(Z[1]=0,$=1;$<15;$++)Z[$+1]=Z[$]+X[$];for(A=0;A<c;A++)h[u+A]!==0&&(f[Z[h[u+A]]++]=A);if(_=l===0?(E=ue=f,19):l===1?(E=r,re-=257,ue=a,Le-=257,256):(E=n,ue=o,-1),$=T,x=p,j=A=V=0,v=-1,b=(K=1<<(B=N))-1,l===1&&852<K||l===2&&592<K)return 1;for(;;){for(w=$-j,P=f[A]<_?(C=0,f[A]):f[A]>_?(C=ue[Le+f[A]],E[re+f[A]]):(C=96,0),g=1<<$-j,T=y=1<<B;d[x+(V>>j)+(y-=g)]=w<<24|C<<16|P|0,y!==0;);for(g=1<<$-1;V&g;)g>>=1;if(g!==0?(V&=g-1,V+=g):V=0,A++,--X[$]==0){if($===I)break;$=h[u+f[A]]}if(N<$&&(V&b)!==v){for(j===0&&(j=N),x+=T,z=1<<(B=$-j);B+j<I&&!((z-=X[B+j])<=0);)B++,z<<=1;if(K+=1<<B,l===1&&852<K||l===2&&592<K)return 1;d[v=V&b]=N<<24|B<<16|x-p|0}}return V!==0&&(d[x+V]=$-j<<24|64<<16|0),m.bits=N,0}},{"../utils/common":41}],51:[function(s,t,e){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(s,t,e){"use strict";var i=s("../utils/common"),r=0,a=1;function n(W){for(var J=W.length;0<=--J;)W[J]=0}var o=0,l=29,h=256,u=h+1+l,c=30,d=19,p=2*u+1,f=15,m=16,g=7,y=256,v=16,b=17,x=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],w=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],D=new Array(2*(u+2));n(D);var $=new Array(2*c);n($);var A=new Array(512);n(A);var T=new Array(256);n(T);var I=new Array(l);n(I);var N,B,j,z=new Array(c);function K(W,J,ve,be,ie){this.static_tree=W,this.extra_bits=J,this.extra_base=ve,this.elems=be,this.max_length=ie,this.has_stree=W&&W.length}function V(W,J){this.dyn_tree=W,this.max_code=0,this.stat_desc=J}function E(W){return W<256?A[W]:A[256+(W>>>7)]}function re(W,J){W.pending_buf[W.pending++]=255&J,W.pending_buf[W.pending++]=J>>>8&255}function X(W,J,ve){W.bi_valid>m-ve?(W.bi_buf|=J<<W.bi_valid&65535,re(W,W.bi_buf),W.bi_buf=J>>m-W.bi_valid,W.bi_valid+=ve-m):(W.bi_buf|=J<<W.bi_valid&65535,W.bi_valid+=ve)}function Z(W,J,ve){X(W,ve[2*J],ve[2*J+1])}function ue(W,J){for(var ve=0;ve|=1&W,W>>>=1,ve<<=1,0<--J;);return ve>>>1}function Le(W,J,ve){var be,ie,Pe=new Array(f+1),je=0;for(be=1;be<=f;be++)Pe[be]=je=je+ve[be-1]<<1;for(ie=0;ie<=J;ie++){var $e=W[2*ie+1];$e!==0&&(W[2*ie]=ue(Pe[$e]++,$e))}}function we(W){var J;for(J=0;J<u;J++)W.dyn_ltree[2*J]=0;for(J=0;J<c;J++)W.dyn_dtree[2*J]=0;for(J=0;J<d;J++)W.bl_tree[2*J]=0;W.dyn_ltree[2*y]=1,W.opt_len=W.static_len=0,W.last_lit=W.matches=0}function Te(W){8<W.bi_valid?re(W,W.bi_buf):0<W.bi_valid&&(W.pending_buf[W.pending++]=W.bi_buf),W.bi_buf=0,W.bi_valid=0}function Ze(W,J,ve,be){var ie=2*J,Pe=2*ve;return W[ie]<W[Pe]||W[ie]===W[Pe]&&be[J]<=be[ve]}function Ve(W,J,ve){for(var be=W.heap[ve],ie=ve<<1;ie<=W.heap_len&&(ie<W.heap_len&&Ze(J,W.heap[ie+1],W.heap[ie],W.depth)&&ie++,!Ze(J,be,W.heap[ie],W.depth));)W.heap[ve]=W.heap[ie],ve=ie,ie<<=1;W.heap[ve]=be}function kt(W,J,ve){var be,ie,Pe,je,$e=0;if(W.last_lit!==0)for(;be=W.pending_buf[W.d_buf+2*$e]<<8|W.pending_buf[W.d_buf+2*$e+1],ie=W.pending_buf[W.l_buf+$e],$e++,be===0?Z(W,ie,J):(Z(W,(Pe=T[ie])+h+1,J),(je=_[Pe])!==0&&X(W,ie-=I[Pe],je),Z(W,Pe=E(--be),ve),(je=w[Pe])!==0&&X(W,be-=z[Pe],je)),$e<W.last_lit;);Z(W,y,J)}function Wt(W,J){var ve,be,ie,Pe=J.dyn_tree,je=J.stat_desc.static_tree,$e=J.stat_desc.has_stree,ot=J.stat_desc.elems,si=-1;for(W.heap_len=0,W.heap_max=p,ve=0;ve<ot;ve++)Pe[2*ve]!==0?(W.heap[++W.heap_len]=si=ve,W.depth[ve]=0):Pe[2*ve+1]=0;for(;W.heap_len<2;)Pe[2*(ie=W.heap[++W.heap_len]=si<2?++si:0)]=1,W.depth[ie]=0,W.opt_len--,$e&&(W.static_len-=je[2*ie+1]);for(J.max_code=si,ve=W.heap_len>>1;1<=ve;ve--)Ve(W,Pe,ve);for(ie=ot;ve=W.heap[1],W.heap[1]=W.heap[W.heap_len--],Ve(W,Pe,1),be=W.heap[1],W.heap[--W.heap_max]=ve,W.heap[--W.heap_max]=be,Pe[2*ie]=Pe[2*ve]+Pe[2*be],W.depth[ie]=(W.depth[ve]>=W.depth[be]?W.depth[ve]:W.depth[be])+1,Pe[2*ve+1]=Pe[2*be+1]=ie,W.heap[1]=ie++,Ve(W,Pe,1),2<=W.heap_len;);W.heap[--W.heap_max]=W.heap[1],(function(It,Mr){var li,fr,or,er,xh,Xu,es=Mr.dyn_tree,yd=Mr.max_code,Pv=Mr.stat_desc.static_tree,Yu=Mr.stat_desc.has_stree,Tv=Mr.stat_desc.extra_bits,vd=Mr.stat_desc.extra_base,_h=Mr.stat_desc.max_length,Uu=0;for(er=0;er<=f;er++)It.bl_count[er]=0;for(es[2*It.heap[It.heap_max]+1]=0,li=It.heap_max+1;li<p;li++)_h<(er=es[2*es[2*(fr=It.heap[li])+1]+1]+1)&&(er=_h,Uu++),es[2*fr+1]=er,yd<fr||(It.bl_count[er]++,xh=0,vd<=fr&&(xh=Tv[fr-vd]),Xu=es[2*fr],It.opt_len+=Xu*(er+xh),Yu&&(It.static_len+=Xu*(Pv[2*fr+1]+xh)));if(Uu!==0){do{for(er=_h-1;It.bl_count[er]===0;)er--;It.bl_count[er]--,It.bl_count[er+1]+=2,It.bl_count[_h]--,Uu-=2}while(0<Uu);for(er=_h;er!==0;er--)for(fr=It.bl_count[er];fr!==0;)yd<(or=It.heap[--li])||(es[2*or+1]!==er&&(It.opt_len+=(er-es[2*or+1])*es[2*or],es[2*or+1]=er),fr--)}})(W,J),Le(Pe,si,W.bl_count)}function O(W,J,ve){var be,ie,Pe=-1,je=J[1],$e=0,ot=7,si=4;for(je===0&&(ot=138,si=3),J[2*(ve+1)+1]=65535,be=0;be<=ve;be++)ie=je,je=J[2*(be+1)+1],++$e<ot&&ie===je||($e<si?W.bl_tree[2*ie]+=$e:ie!==0?(ie!==Pe&&W.bl_tree[2*ie]++,W.bl_tree[2*v]++):$e<=10?W.bl_tree[2*b]++:W.bl_tree[2*x]++,Pe=ie,si=($e=0)===je?(ot=138,3):ie===je?(ot=6,3):(ot=7,4))}function le(W,J,ve){var be,ie,Pe=-1,je=J[1],$e=0,ot=7,si=4;for(je===0&&(ot=138,si=3),be=0;be<=ve;be++)if(ie=je,je=J[2*(be+1)+1],!(++$e<ot&&ie===je)){if($e<si)for(;Z(W,ie,W.bl_tree),--$e!=0;);else ie!==0?(ie!==Pe&&(Z(W,ie,W.bl_tree),$e--),Z(W,v,W.bl_tree),X(W,$e-3,2)):$e<=10?(Z(W,b,W.bl_tree),X(W,$e-3,3)):(Z(W,x,W.bl_tree),X(W,$e-11,7));Pe=ie,si=($e=0)===je?(ot=138,3):ie===je?(ot=6,3):(ot=7,4)}}n(z);var oe=!1;function H(W,J,ve,be){X(W,(o<<1)+(be?1:0),3),(function(ie,Pe,je,$e){Te(ie),$e&&(re(ie,je),re(ie,~je)),i.arraySet(ie.pending_buf,ie.window,Pe,je,ie.pending),ie.pending+=je})(W,J,ve,!0)}e._tr_init=function(W){oe||((function(){var J,ve,be,ie,Pe,je=new Array(f+1);for(ie=be=0;ie<l-1;ie++)for(I[ie]=be,J=0;J<1<<_[ie];J++)T[be++]=ie;for(T[be-1]=ie,ie=Pe=0;ie<16;ie++)for(z[ie]=Pe,J=0;J<1<<w[ie];J++)A[Pe++]=ie;for(Pe>>=7;ie<c;ie++)for(z[ie]=Pe<<7,J=0;J<1<<w[ie]-7;J++)A[256+Pe++]=ie;for(ve=0;ve<=f;ve++)je[ve]=0;for(J=0;J<=143;)D[2*J+1]=8,J++,je[8]++;for(;J<=255;)D[2*J+1]=9,J++,je[9]++;for(;J<=279;)D[2*J+1]=7,J++,je[7]++;for(;J<=287;)D[2*J+1]=8,J++,je[8]++;for(Le(D,u+1,je),J=0;J<c;J++)$[2*J+1]=5,$[2*J]=ue(J,5);N=new K(D,_,h+1,u,f),B=new K($,w,0,c,f),j=new K(new Array(0),C,0,d,g)})(),oe=!0),W.l_desc=new V(W.dyn_ltree,N),W.d_desc=new V(W.dyn_dtree,B),W.bl_desc=new V(W.bl_tree,j),W.bi_buf=0,W.bi_valid=0,we(W)},e._tr_stored_block=H,e._tr_flush_block=function(W,J,ve,be){var ie,Pe,je=0;0<W.level?(W.strm.data_type===2&&(W.strm.data_type=(function($e){var ot,si=4093624447;for(ot=0;ot<=31;ot++,si>>>=1)if(1&si&&$e.dyn_ltree[2*ot]!==0)return r;if($e.dyn_ltree[18]!==0||$e.dyn_ltree[20]!==0||$e.dyn_ltree[26]!==0)return a;for(ot=32;ot<h;ot++)if($e.dyn_ltree[2*ot]!==0)return a;return r})(W)),Wt(W,W.l_desc),Wt(W,W.d_desc),je=(function($e){var ot;for(O($e,$e.dyn_ltree,$e.l_desc.max_code),O($e,$e.dyn_dtree,$e.d_desc.max_code),Wt($e,$e.bl_desc),ot=d-1;3<=ot&&$e.bl_tree[2*P[ot]+1]===0;ot--);return $e.opt_len+=3*(ot+1)+5+5+4,ot})(W),ie=W.opt_len+3+7>>>3,(Pe=W.static_len+3+7>>>3)<=ie&&(ie=Pe)):ie=Pe=ve+5,ve+4<=ie&&J!==-1?H(W,J,ve,be):W.strategy===4||Pe===ie?(X(W,2+(be?1:0),3),kt(W,D,$)):(X(W,4+(be?1:0),3),(function($e,ot,si,It){var Mr;for(X($e,ot-257,5),X($e,si-1,5),X($e,It-4,4),Mr=0;Mr<It;Mr++)X($e,$e.bl_tree[2*P[Mr]+1],3);le($e,$e.dyn_ltree,ot-1),le($e,$e.dyn_dtree,si-1)})(W,W.l_desc.max_code+1,W.d_desc.max_code+1,je+1),kt(W,W.dyn_ltree,W.dyn_dtree)),we(W),be&&Te(W)},e._tr_tally=function(W,J,ve){return W.pending_buf[W.d_buf+2*W.last_lit]=J>>>8&255,W.pending_buf[W.d_buf+2*W.last_lit+1]=255&J,W.pending_buf[W.l_buf+W.last_lit]=255&ve,W.last_lit++,J===0?W.dyn_ltree[2*ve]++:(W.matches++,J--,W.dyn_ltree[2*(T[ve]+h+1)]++,W.dyn_dtree[2*E(J)]++),W.last_lit===W.lit_bufsize-1},e._tr_align=function(W){X(W,2,3),Z(W,y,D),(function(J){J.bi_valid===16?(re(J,J.bi_buf),J.bi_buf=0,J.bi_valid=0):8<=J.bi_valid&&(J.pending_buf[J.pending++]=255&J.bi_buf,J.bi_buf>>=8,J.bi_valid-=8)})(W)}},{"../utils/common":41}],53:[function(s,t,e){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(s,t,e){(function(i){(function(r,a){"use strict";if(!r.setImmediate){var n,o,l,h,u=1,c={},d=!1,p=r.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(r);f=f&&f.setTimeout?f:r,n={}.toString.call(r.process)==="[object process]"?function(v){process.nextTick(function(){g(v)})}:(function(){if(r.postMessage&&!r.importScripts){var v=!0,b=r.onmessage;return r.onmessage=function(){v=!1},r.postMessage("","*"),r.onmessage=b,v}})()?(h="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",y,!1):r.attachEvent("onmessage",y),function(v){r.postMessage(h+v,"*")}):r.MessageChannel?((l=new MessageChannel).port1.onmessage=function(v){g(v.data)},function(v){l.port2.postMessage(v)}):p&&"onreadystatechange"in p.createElement("script")?(o=p.documentElement,function(v){var b=p.createElement("script");b.onreadystatechange=function(){g(v),b.onreadystatechange=null,o.removeChild(b),b=null},o.appendChild(b)}):function(v){setTimeout(g,0,v)},f.setImmediate=function(v){typeof v!="function"&&(v=new Function(""+v));for(var b=new Array(arguments.length-1),x=0;x<b.length;x++)b[x]=arguments[x+1];var _={callback:v,args:b};return c[u]=_,n(u),u++},f.clearImmediate=m}function m(v){delete c[v]}function g(v){if(d)setTimeout(g,0,v);else{var b=c[v];if(b){d=!0;try{(function(x){var _=x.callback,w=x.args;switch(w.length){case 0:_();break;case 1:_(w[0]);break;case 2:_(w[0],w[1]);break;case 3:_(w[0],w[1],w[2]);break;default:_.apply(a,w)}})(b)}finally{m(v),d=!1}}}}function y(v){v.source===r&&typeof v.data=="string"&&v.data.indexOf(h)===0&&g(+v.data.slice(h.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})});var dm={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},bP=Symbol(),_n=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,e)=>{this.o=t,this.h=e})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,e,i){this.p=0,this.i=0,(this._=t).addController(this);let r=typeof e=="object"?e:{task:e,args:i};this.v=r.task,this.j=r.args,this.m=r.argsEqual??xP,this.k=r.onComplete,this.A=r.onError,this.autoRun=r.autoRun??!0,"initialValue"in r&&(this.u=r.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),e=this.O;this.O=t,t===e||t===void 0||e!==void 0&&this.m(e,t)||await this.run(t)}async run(t){let e,i;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let r=++this.p;this.q=new AbortController;let a=!1;try{e=await this.v(t,{signal:this.q.signal})}catch(n){a=!0,i=n}if(this.p===r){if(e===bP)this.i=0;else{if(a===!1){try{this.k?.(e)}catch{}this.i=2,this.o?.(e)}else{try{this.A?.(i)}catch{}this.i=3,this.h?.(i)}this.u=e,this.l=i}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},xP=(s,t)=>s===t||s.length===t.length&&s.every(((e,i)=>!kC(e,t[i])));var kF=Object.defineProperty,Ta=(s,t,e)=>()=>{if(e)throw e[0];try{return s&&(t=s(s=0)),t}catch(i){throw e=[i],i}},zd=(s,t)=>{for(var e in t)kF(s,e,{get:t[e],enumerable:!0})};function AF(s){if(s===!0)return"soft";if(s===!1)return"disabled";if(typeof s=="string"){let t=s.toLowerCase().trim();if(t==="auto")return"auto";if(t==="full")return"full";if(t==="soft"||t==="disabled")return t}return"soft"}function LF(s="soft"){switch(s){case"auto":{Se.session.styleMap=new Map,Se.session.nodeMap=new Map;return}case"soft":{Se.session.styleMap=new Map,Se.session.nodeMap=new Map,Se.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{Se.session.styleMap=new Map,Se.session.nodeMap=new Map,Se.session.styleCache=new WeakMap,Se.computedStyle=new WeakMap,Se.measureHints=new WeakMap,Se.baseStyle=new ia(50),Se.defaultStyle=new ia(30),Se.image=new ia(100),Se.background=new ia(100),Se.resource=new ia(150),Se.compress=new ia(50),Se.font=new Set;return}default:{Se.session.styleMap=new Map,Se.session.nodeMap=new Map,Se.session.styleCache=new WeakMap;return}}}var ia,Se,ra=Ta(()=>{"use strict";ia=class extends Map{constructor(s=100,...t){super(...t),this._maxSize=s}set(s,t){if(this.size>=this._maxSize&&!this.has(s)){let e=this.keys().next().value;e!==void 0&&this.delete(e)}return super.set(s,t)}},Se={image:new ia(100),background:new ia(100),resource:new ia(150),defaultStyle:new ia(30),baseStyle:new ia(50),compress:new ia(50),computedStyle:new WeakMap,measureHints:new WeakMap,burstAdvice:new WeakMap,warnedReconcile:!1,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}}});function ox(s){let t=s.match(/url\((['"]?)(.*?)(\1)\)/);if(!t)return null;let e=t[2].trim();return e.startsWith("#")?null:e}function eT(s,t=1){let e=s.match(/^\s*-?(?:webkit-)?image-set\(([\s\S]*)\)\s*$/i);if(!e)return null;let i=[];for(let r of e[1].split(",")){let a=r.match(/url\((['"]?)(.*?)(\1)\)/);if(!a)continue;let n=r.match(/type\(\s*["']([^"']+)["']\s*\)/i);if(n&&!tT.test(n[1].trim()))continue;let o=r.match(/(\d+(?:\.\d+)?)\s*(x|dpi|dppx)/i),l=1;if(o){let h=parseFloat(o[1]);l=/dpi/i.test(o[2])?h/96:h}i.push({url:a[2].trim(),dppx:l})}return i.length?(i.sort((r,a)=>r.dppx-a.dppx),(i.find(r=>r.dppx>=t)||i[i.length-1]).url):null}function FF(s){if(!s||s==="none")return"";let t=s.replace(/translate[XY]?\([^)]*\)/g,"");return t=t.replace(/matrix\(([^)]+)\)/g,(e,i)=>{let r=i.split(",").map(a=>a.trim());return r.length!==6?`matrix(${i})`:(r[4]="0",r[5]="0",`matrix(${r.join(", ")})`)}),t=t.replace(/matrix3d\(([^)]+)\)/g,(e,i)=>{let r=i.split(",").map(a=>a.trim());return r.length!==16?`matrix3d(${i})`:(r[12]="0",r[13]="0",`matrix3d(${r.join(", ")})`)}),t.trim().replace(/\s{2,}/g," ")}function $m(s){if(/%[0-9A-Fa-f]{2}/.test(s))return s;try{return encodeURI(s)}catch{return s}}function OF(s,t){if(!s||/^(data|blob|about|#)/i.test(s.trim()))return s;try{let e=t||typeof document<"u"&&(document.baseURI||document.location?.href)||"http://localhost/";return new URL(s,e).href}catch{return s}}var tT,Om=Ta(()=>{"use strict";tT=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i});function MF(s="[snapDOM]",{ttlMs:t=5*6e4,maxEntries:e=12}={}){let i=new Map,r=0;function a(n,o,l){if(r>=e)return;let h=Date.now();(i.get(o)||0)>h||(i.set(o,h+t),r++,n==="warn"&&console&&console.warn?console.warn(`${s} ${l}`):console&&console.error&&console.error(`${s} ${l}`))}return{warnOnce(n,o){a("warn",n,o)},errorOnce(n,o){a("error",n,o)},reset(){i.clear(),r=0}}}function IF(s){return/^data:|^blob:|^about:blank$/i.test(s)}function RF(s,t){try{let e=typeof location<"u"&&location.href?location.href:"http://localhost/",i=t.includes("{url}")?t.split("{url}")[0]:t,r=new URL(i||".",e),a=new URL(s,e);if(a.origin===r.origin)return!0;let n=a.searchParams;if(n&&(n.has("url")||n.has("target")))return!0}catch{}return!1}function VF(s,t){if(!t||IF(s)||RF(s,t))return!1;try{let e=typeof location<"u"&&location.href?location.href:"http://localhost/",i=new URL(s,e);return typeof location<"u"?i.origin!==location.origin:!0}catch{return!!t}}function NF(s,t){if(!t)return s;if(t.includes("{url}"))return t.replace("{urlRaw}",$m(s)).replace("{url}",encodeURIComponent(s));if(/[?&]url=?$/.test(t))return`${t}${encodeURIComponent(s)}`;if(t.endsWith("?"))return`${t}url=${encodeURIComponent(s)}`;if(t.endsWith("/"))return`${t}${$m(s)}`;let e=t.includes("?")?"&":"?";return`${t}${e}url=${encodeURIComponent(s)}`}function _P(s){return new Promise((t,e)=>{let i=new FileReader;i.onload=()=>t(String(i.result||"")),i.onerror=()=>e(new Error("read_failed")),i.readAsDataURL(s)})}function EF(s,t){return[t.as||"blob",t.timeout??3e3,t.useProxy||"",t.errorTTL??8e3,s].join("|")}async function Ga(s,t={}){let e=t.as??"blob",i=t.timeout??3e3,r=t.useProxy||"",a=t.errorTTL??8e3,n=t.headers||{},o=!!t.silent;if(/^data:/i.test(s))try{if(e==="text")return{ok:!0,data:String(s),status:200,url:s,fromCache:!1};if(e==="dataURL")return{ok:!0,data:String(s),status:200,url:s,fromCache:!1,mime:String(s).slice(5).split(";")[0]||""};let[,g="",y=""]=String(s).match(/^data:([^,]*),(.*)$/)||[],v=/;base64/i.test(g)?atob(y):decodeURIComponent(y),b=new Uint8Array([...v].map(_=>_.charCodeAt(0))),x=new Blob([b],{type:(g||"").split(";")[0]||""});return{ok:!0,data:x,status:200,url:s,fromCache:!1,mime:x.type||""}}catch{return{ok:!1,data:null,status:0,url:s,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(s))try{let g=await fetch(s);if(!g.ok)return{ok:!1,data:null,status:g.status,url:s,fromCache:!1,reason:"http_error"};let y=await g.blob(),v=y.type||g.headers.get("content-type")||"";return e==="dataURL"?{ok:!0,data:await _P(y),status:g.status,url:s,fromCache:!1,mime:v}:e==="text"?{ok:!0,data:await y.text(),status:g.status,url:s,fromCache:!1,mime:v}:{ok:!0,data:y,status:g.status,url:s,fromCache:!1,mime:v}}catch{return{ok:!1,data:null,status:0,url:s,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(s))return e==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:s,fromCache:!1,mime:"image/png"}:{ok:!0,data:e==="text"?"":new Blob([]),status:200,url:s,fromCache:!1};let l=EF(s,{as:e,timeout:i,useProxy:r,errorTTL:a}),h=Ed.get(l);if(h&&h.until>Date.now())return{...h.result,fromCache:!0};h&&Ed.delete(l);let u=ym.get(l);if(u)return u;let c=VF(s,r)?NF(s,r):s,d=t.credentials;if(!d)try{let g=typeof location<"u"&&location.href?location.href:"http://localhost/",y=new URL(s,g);d=typeof location<"u"&&y.origin===location.origin?"include":"omit"}catch{d="omit"}let p=new AbortController,f=setTimeout(()=>p.abort("timeout"),i),m=(async()=>{try{let g=await fetch(c,{signal:p.signal,credentials:d,headers:n});if(!g.ok){let b={ok:!1,data:null,status:g.status,url:c,fromCache:!1,reason:"http_error"};if(a>0&&Ed.set(l,{until:Date.now()+a,result:b}),!o){let x=`${g.status} ${g.statusText||""}`.trim();zb.warnOnce(`http:${g.status}:${e}:${new URL(s,location?.href??"http://localhost/").origin}`,`HTTP error ${x} while fetching ${e} ${s}`)}return t.onError&&t.onError(b),b}if(e==="text")return{ok:!0,data:await g.text(),status:g.status,url:c,fromCache:!1};let y=await g.blob(),v=y.type||g.headers.get("content-type")||"";return e==="dataURL"?{ok:!0,data:await _P(y),status:g.status,url:c,fromCache:!1,mime:v}:{ok:!0,data:y,status:g.status,url:c,fromCache:!1,mime:v}}catch(g){let y=g&&typeof g=="object"&&"name"in g&&g.name==="AbortError"?String(g.message||"").includes("timeout")?"timeout":"abort":"network",v={ok:!1,data:null,status:0,url:c,fromCache:!1,reason:y};if(!/^blob:/i.test(s)&&a>0&&Ed.set(l,{until:Date.now()+a,result:v}),!o){let b=`${y}:${e}:${new URL(s,location?.href??"http://localhost/").origin}`,x=y==="timeout"?`Timeout after ${i}ms. Consider increasing timeout or using a proxy for ${s}`:y==="abort"?`Request aborted while fetching ${e} ${s}`:`Network/CORS issue while fetching ${e} ${s}. A proxy may be required`;zb.errorOnce(b,x)}return t.onError&&t.onError(v),v}finally{clearTimeout(f),ym.delete(l)}})();return ym.set(l,m),m}var zb,ym,Ed,Rh=Ta(()=>{"use strict";Om(),zb=MF("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),ym=new Map,Ed=new Map});async function iT(s,t={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(s)||s.trim()==="none")return s;let e=eT(s,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??ox(s);if(!e)return s;let i=OF(e),r=$m(i),a=(t.useProxy||"")+"|"+r;if(Se.background.has(a)){let n=Se.background.get(a);return n?`url("${n}")`:"none"}try{let n=await Ga(r,{as:"dataURL",useProxy:t.useProxy});return n.ok?(Se.background.set(a,n.data),`url("${n.data}")`):(Se.background.set(a,null),"none")}catch{return Se.background.set(a,null),"none"}}var BF=Ta(()=>{"use strict";ra(),Om(),Rh()});function rT(s){if(s=String(s).toLowerCase(),hx.has(s)){let a={};return Se.defaultStyle.set(s,a),a}if(Se.defaultStyle.has(s))return Se.defaultStyle.get(s);let t=document.getElementById("snapdom-sandbox");t||(t=document.createElement("div"),t.id="snapdom-sandbox",t.setAttribute("data-snapdom-sandbox","true"),t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.width="0px",t.style.height="0px",t.style.overflow="hidden",document.body.appendChild(t));let e=document.createElement(s);e.style.all="initial",t.appendChild(e);let i=getComputedStyle(e),r={};for(let a of i){if(lx(a))continue;let n=i.getPropertyValue(a);r[a]=n}return t.removeChild(e),Se.defaultStyle.set(s,r),r}function lx(s){let t=Yb.get(s);if(t===void 0){let e=String(s).toLowerCase();t=lT.has(e)||oT.test(e)||nT.test(e),Yb.set(s,t)}return t}function sT(s,t){return!cT.has(s)&&(t==="inline"||hT.has(s)||uT.has(s))}function Hb(s,t,e=!0,i=!1){if(t=String(t||"").toLowerCase(),hx.has(t))return"";let r=[],a=rT(t),n=(s.display||"").toLowerCase(),o=n==="inline",l=sT(t,n),h=s["text-wrap-mode"]||s["white-space"]||"",u=l&&e&&!o&&(h==="nowrap"||h==="pre"),c=l&&e&&!u,d=!1;for(let p in s){if(lx(p))continue;let f=s[p];if(c){if(dT.has(p))continue;if(pT.has(p)){f&&f!==a[p]&&(r.push(`${p}:${f}`),f!=="auto"&&(d=!0));continue}}if(f&&f!==a[p]){if(!u&&(p==="width"||p==="inline-size")&&f.endsWith("px")&&f.includes(".")){let m=parseFloat(f);if(Number.isFinite(m)){r.push(`${p}:${Math.ceil(m*16)/16}px`);continue}}r.push(`${p}:${f}`)}}if(c&&!o&&!i&&!d){let p=s.width;p&&p!=="auto"&&p!==a.width&&r.push(`min-width:${p}`)}return r.sort(),r.join(";")}function jF(s){let t=new Set;return s.nodeType!==Node.ELEMENT_NODE&&s.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(s.tagName&&t.add(s.tagName.toLowerCase()),typeof s.querySelectorAll=="function"&&s.querySelectorAll("*").forEach(e=>t.add(e.tagName.toLowerCase())),Array.from(t))}function WF(s){let t=new Map;for(let i of s){let r=rT(i);if(!r)continue;let a=Object.entries(r).map(([n,o])=>`${n}:${o};`).sort().join("");a&&(t.has(a)||t.set(a,[]),t.get(a).push(i))}let e="";for(let[i,r]of t.entries())e+=`${r.join(",")} { ${i} }
|
|
4
4
|
`;return e}function zF(s){let t=Array.from(new Set(s.values())).filter(Boolean).sort(),e=new Map,i=1;for(let r of t)e.set(r,`c${i++}`);return e}function HF(s){try{let t=s?.ownerDocument;if(!t)return typeof window<"u"?window:null;let e=t.defaultView;if(e&&typeof e.getComputedStyle=="function")return e;if(typeof window<"u"&&window.frames)for(let i=0;i<window.frames.length;i++)try{if(window.frames[i]?.document===t)return window.frames[i]}catch{}}catch{}return typeof window<"u"?window:null}function qi(s,t=null){let e=()=>{let a={length:0,getPropertyValue:()=>"",item:()=>""};return a[Symbol.iterator]=function*(){},a};if(s?.nodeType!==1){let a=typeof window<"u"?window:null;if(a&&typeof a.getComputedStyle=="function")try{return a.getComputedStyle(s,t)||e()}catch{return e()}return e()}let i=Se.computedStyle.get(s);i||(i=new Map,Se.computedStyle.set(s,i));let r=i.get(t);if(!r){let a=HF(s),n=null;try{n=a&&typeof a.getComputedStyle=="function"?a.getComputedStyle(s,t):null}catch{}if(!n&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{s.ownerDocument===document&&(n=window.getComputedStyle(s,t))}catch{}r=n||e(),i.set(t,r)}return r}function SP(s){let t={};for(let e of s)t[e]=s.getPropertyValue(e);for(let e of fT){let i=t[`border-${e}-style`],r=t[`border-${e}-width`];(i==="none"||i==="hidden"||r==="0px")&&(delete t[`border-${e}-style`],delete t[`border-${e}-width`],delete t[`border-${e}-color`])}return t}function Xb(s){let t=[],e=0,i=0;for(let r=0;r<s.length;r++){let a=s[r];a==="("&&e++,a===")"&&e--,a===","&&e===0&&(t.push(s.slice(i,r).trim()),i=r+1)}return t.push(s.slice(i).trim()),t}var aT,hx,XF,nT,oT,lT,Yb,hT,uT,cT,dT,pT,fT,Mm=Ta(()=>{"use strict";ra(),aT=new Set(["meta","script","noscript","title","link","template"]),hx=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),XF=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"],nT=/(?:^|-)(animation|transition)(?:-|$)/i,oT=/^(--.+|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,lT=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope","zoom","stroke-color"]),Yb=new Map,hT=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),uT=new Set(["table","thead","tbody","tfoot","tr","td","th"]),cT=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),dT=new Set(["width","max-width","inline-size","max-inline-size"]),pT=new Set(["min-width","min-inline-size"]),fT=["top","right","bottom","left"]});function vm(s,{fast:t=!1}={}){if(t)return s();"requestIdleCallback"in window?requestIdleCallback(s,{timeout:50}):setTimeout(s,1)}function YF(){if(typeof navigator>"u")return!1;if(navigator.userAgentData)return navigator.userAgentData.platform==="iOS";let s=navigator.userAgent||"",t=/iPhone|iPad|iPod/.test(s),e=navigator.maxTouchPoints>2&&/Macintosh/.test(s);return t||e}function jo(){if(typeof navigator>"u")return!1;let s=navigator.userAgent||"",t=s.toLowerCase(),e=t.includes("safari")&&!t.includes("chrome")&&!t.includes("crios")&&!t.includes("fxios")&&!t.includes("android"),i=/applewebkit/i.test(s),r=/mobile/i.test(s),a=!/safari/i.test(s),n=i&&r&&a,o=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(s),l=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(t),h=/ipad|iphone|ipod/.test(t)&&i;return e||n||o||l||h}function UF(){if(typeof navigator>"u")return!1;let s=(navigator.userAgent||"").toLowerCase();return s.includes("firefox")||s.includes("fxios")}var Hd=Ta(()=>{"use strict"});function Yi(s,t,e){let i=s&&typeof s=="object"&&(s.options||s);i&&i.debug&&(e!==void 0?console.warn("[snapdom]",t,e):console.warn("[snapdom]",t))}var mT=Ta(()=>{"use strict"}),Sn=Ta(()=>{"use strict";BF(),Mm(),Hd(),Om(),mT()}),gT={};zd(gT,{decodeSvgFromDataURL:()=>ux,encodeSvgToDataURL:()=>cx,fixSafariShadows:()=>dx,toCanvas:()=>Im});function GF(s){try{let t=s.match(/<svg\b[^>]*>/i);if(!t)return s;let e=t[0],i=parseFloat((e.match(/\bwidth="([\d.]+)/i)||[])[1]),r=parseFloat((e.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(i)||!Number.isFinite(r)||i<=0||r<=0)return s;let a=Math.min(1,Bo/i,Bo/r,Math.sqrt(Dm/(i*r)));if(a>=1)return s;let n=Math.max(1,Math.floor(i*a)),o=Math.max(1,Math.floor(r*a));return console.warn(`[snapDOM] Capture ${Math.round(i)}\xD7${Math.round(r)}px exceeds the browser image-decode limit (${Bo}px/side); downscaling to ${n}\xD7${o}px. Lower \`scale\` or set \`width\`/\`height\` to control output size.`),s.replace(e,e.replace(/(\bwidth=")[\d.]+/i,`$1${n}`).replace(/(\bheight=")[\d.]+/i,`$1${o}`))}catch{return s}}function qF(s,t){let e=["x","y","width","height"].map(w=>Number(t?.[w]));if(!e.every(Number.isFinite)||e[2]<=0||e[3]<=0)throw new RangeError("[snapdom] canvas crop requires finite x/y and positive width/height");let i=s.match(/<svg\b[^>]*>/i);if(!i)throw new Error("[snapdom] cannot crop a non-SVG capture");let r=i[0],a=(r.match(/\bviewBox="([^"]+)"/i)||[])[1],n=String(a||"").trim().split(/[\s,]+/).map(Number);if(n.length!==4||!n.every(Number.isFinite)||n[2]<=0||n[3]<=0)throw new Error("[snapdom] cannot crop an SVG without a finite viewBox");let[o,l,h,u]=n,c=Math.max(o,e[0]),d=Math.max(l,e[1]),p=Math.min(o+h,e[0]+e[2]),f=Math.min(l+u,e[1]+e[3]);if(!(p>c)||!(f>d))throw new RangeError("[snapdom] canvas crop does not intersect the SVG viewBox");let m=parseFloat((r.match(/\bwidth="([\d.]+)/i)||[])[1]),g=parseFloat((r.match(/\bheight="([\d.]+)/i)||[])[1]),y=Number.isFinite(m)&&m>0?m/h:1,v=Number.isFinite(g)&&g>0?g/u:1,b=Math.max(1,(p-c)*y),x=Math.max(1,(f-d)*v),_=r.replace(/(\bwidth=")[^"]*/i,`$1${b}`).replace(/(\bheight=")[^"]*/i,`$1${x}`).replace(/(\bviewBox=")[^"]*/i,`$1${c} ${d} ${p-c} ${f-d}`);return s.replace(r,_)}function CP(s){return typeof s=="string"&&/^data:image\/svg\+xml/i.test(s)}function ux(s){let t=s.indexOf(",");return t>=0?decodeURIComponent(s.slice(t+1)):""}function KF(s){let t=s.indexOf(",");if(t<0)return"";let e=s.slice(t+1,t+1201).replace(/%[0-9A-Fa-f]?$/,"");try{return decodeURIComponent(e)}catch{return""}}function cx(s){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(s)}`}function yT(s){let t=[],e="",i=0;for(let r=0;r<s.length;r++){let a=s[r];a==="("&&i++,a===")"&&(i=Math.max(0,i-1)),a===";"&&i===0?(t.push(e),e=""):e+=a}return e.trim()&&t.push(e),t.map(r=>r.trim()).filter(Boolean)}function ZF(s){let t=[],e="",i=0;for(let a=0;a<s.length;a++){let n=s[a];n==="("&&i++,n===")"&&(i=Math.max(0,i-1)),n===","&&i===0?(t.push(e.trim()),e=""):e+=n}e.trim()&&t.push(e.trim());let r=[];for(let a of t){if(/\binset\b/i.test(a))continue;let n=a.match(/-?\d+(?:\.\d+)?px/gi)||[],[o="0px",l="0px",h="0px"]=n;h=`${parseFloat(h)/2}px`;let u=a.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),c=!!u&&u!==",";r.push(`drop-shadow(${o} ${l} ${h}${c?` ${u}`:""})`)}return r.join(" ")}function vT(s){let t=yT(s),e=null,i=null,r=null,a=[];for(let o of t){let l=o.indexOf(":");if(l<0)continue;let h=o.slice(0,l).trim().toLowerCase(),u=o.slice(l+1).trim();h==="box-shadow"?r=u:h==="filter"?e=u:h==="-webkit-filter"?i=u:a.push([h,u])}if(r){let o=ZF(r);o&&(e=e?`${e} ${o}`:o,i=i?`${i} ${o}`:o)}let n=[...a];return e&&n.push(["filter",e]),i&&n.push(["-webkit-filter",i]),n.map(([o,l])=>`${o}:${l}`).join(";")}function JF(s){return s.replace(/([^{}]+)\{([^}]*)\}/g,(t,e,i)=>`${e}{${vT(i)}}`)}function QF(s){return s=s.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(t,e)=>t.replace(e,JF(e))),s=s.replace(/style=(['"])([\s\S]*?)\1/gi,(t,e,i)=>`style=${e}${vT(i)}${e}`),s}function eO(){return bm||(bm=(async()=>{try{let s='<svg xmlns="http://www.w3.org/2000/svg" width="8" height="20"><foreignObject width="8" height="20"><div xmlns="http://www.w3.org/1999/xhtml" style="width:4px;height:4px;margin-top:8px;background:#000;box-shadow:0 8px 0 0 #000"></div></foreignObject></svg>',t=new Image;t.decoding="sync",t.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(s)}`,await t.decode();let e=document.createElement("canvas");e.width=8,e.height=20;let i=e.getContext("2d",{willReadFrequently:!0});i.drawImage(t,0,0);let r=i.getImageData(2,18,1,1).data[3]>128,a=i.getImageData(2,2,1,1).data[3]>128;return{native:r||a,flippedY:a&&!r}}catch{return{native:!1,flippedY:!1}}})(),bm)}function tO(s){let t=[],e=0,i=0;for(let r=0;r<s.length;r++){let a=s[r];a==="("?e++:a===")"?e=Math.max(0,e-1):a===","&&e===0&&(t.push(s.slice(i,r)),i=r+1)}return t.push(s.slice(i)),t.map(r=>{let a=0,n=0,o="",l=0;for(;l<r.length;){let h=r[l];if(h==="("?a++:h===")"&&(a=Math.max(0,a-1)),a===0&&(l===0||r[l-1]===" ")){let u=/^-?\d*\.?\d+px/.exec(r.slice(l));if(u){n++,o+=n===2?`${-parseFloat(u[0])}px`:u[0],l+=u[0].length;continue}}o+=h,l++}return o}).join(",")}function iO(s,t){let e=i=>yT(i).map(r=>{let a=r.indexOf(":");if(a<0)return r;let n=r.slice(0,a).trim().toLowerCase();return n==="text-shadow"||t&&n==="box-shadow"?`${n}:${tO(r.slice(a+1))}`:r}).join(";");return s=s.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(i,r)=>i.replace(r,r.replace(/([^{}]+)\{([^}]*)\}/g,(a,n,o)=>`${n}{${e(o)}}`))),s=s.replace(/style=(['"])([\s\S]*?)\1/gi,(i,r,a)=>`style=${r}${e(a)}${r}`),s}async function dx(s){if(!/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(s))return{svg:s,naturalOnly:!1};let{native:t,flippedY:e}=await eO();try{let i=s;return t||(i=QF(i)),e&&(i=iO(i,t)),{svg:i,naturalOnly:!0}}catch{return{svg:s,naturalOnly:!0}}}async function rO(s,t){s.setAttribute("data-snapdom-internal",""),s.style.cssText="position:fixed;left:-99999px;top:-99999px;pointer-events:none",document.body.appendChild(s);try{let e=document.createElement("canvas");e.width=16,e.height=16;let i=()=>new Promise(n=>{requestAnimationFrame(n),setTimeout(n,50)}),r=e.getContext("2d",{willReadFrequently:!0});if(!r){await i(),await i();return}let a=performance.now()+(t?600:150);for(;;){r.clearRect(0,0,16,16);try{r.drawImage(s,0,0,16,16)}catch{return}let n=r.getImageData(0,0,16,16).data,o=!1;for(let l=3;l<n.length;l+=4)if(n[l]>0){o=!0;break}if(o||performance.now()>a)return;await i()}}finally{try{s.remove()}catch{}}}async function Im(s,t){let{width:e,height:i,scale:r=1,dpr:a=1,meta:n={},backgroundColor:o,crop:l=null}=t,h=s,u=!1,c=!1;if(l&&!CP(s))throw new RangeError("[snapdom] canvas crop requires an SVG capture payload");if(CP(s)){let $=(KF(s).match(/<svg\b[^>]*>/i)||[])[0]||"",A=parseFloat(($.match(/\bwidth="([\d.]+)/i)||[])[1]),T=parseFloat(($.match(/\bheight="([\d.]+)/i)||[])[1]),I=Number.isFinite(A)&&Number.isFinite(T)&&A>0&&T>0&&Math.min(1,Bo/A,Bo/T,Math.sqrt(Dm/(A*T)))<1;if(l||I||jo())try{let N=ux(s);if(l&&(N=qF(N,l)),jo()){let B=await dx(N);N=B.svg,u=B.naturalOnly,c=/@font-face|data:image\//i.test(N)}(I||l)&&(N=GF(N)),h=cx(N)}catch(N){if(l)throw N;h=s}}let d=new Image;d.loading="eager",d.decoding="sync",d.crossOrigin="anonymous",d.src=h,await d.decode(),jo()&&await rO(d,c);let p=d.naturalWidth,f=d.naturalHeight,m=l?p:Number.isFinite(n.vbW)?n.vbW:Number.isFinite(n.w0)?n.w0:p,g=l?f:Number.isFinite(n.vbH)?n.vbH:Number.isFinite(n.h0)?n.h0:f,y,v,b=Number.isFinite(e),x=Number.isFinite(i);if(b&&x)y=Math.max(1,e),v=Math.max(1,i);else if(b){let $=e/Math.max(1,m);y=e,v=g*$}else if(x){let $=i/Math.max(1,g);v=i,y=m*$}else y=p,v=f;y=y*r,v=v*r;let _=y*a,w=v*a,C=Math.max(_/Bo,w/Bo,Math.sqrt(_*w/Dm));C>1&&(console.warn(`[snapDOM] Output ${Math.round(_)}\xD7${Math.round(w)}px exceeds the browser canvas limit (${Bo}px/side); downscaling. Lower \`scale\`/\`dpr\` or set \`width\`/\`height\`.`),y/=C,v/=C);let P=document.createElement("canvas");P.width=y*a,P.height=v*a,P.style.width=`${y}px`,P.style.height=`${v}px`;let D=P.getContext("2d");if(a!==1&&D.scale(a,a),o&&(D.save(),D.fillStyle=o,D.fillRect(0,0,y,v),D.restore()),u&&(Math.round(y*a)!==p||Math.round(v*a)!==f)){let $=document.createElement("canvas");$.width=p,$.height=f,$.getContext("2d").drawImage(d,0,0),D.drawImage($,0,0,y,v)}else D.drawImage(d,0,0,y,v);return P}var Bo,Dm,bm,Xd=Ta(()=>{"use strict";Hd(),Bo=16384,Dm=16384*16384,bm=null}),xm={};zd(xm,{rasterize:()=>bT});async function bT(s,t){let e=await Im(s,t),i=await new Promise(a=>{let n=()=>a(e.toDataURL(`image/${t.format}`,t.quality));try{e.toBlob(o=>{if(!o)return n();let l=new FileReader;l.onload=()=>a(String(l.result||"")),l.onerror=n,l.readAsDataURL(o)},`image/${t.format}`,t.quality)}catch{n()}}),r=new Image;return r.src=i,await r.decode(),r.style.width=`${e.width/t.dpr}px`,r.style.height=`${e.height/t.dpr}px`,r}var _m=Ta(()=>{"use strict";Xd()}),Ub={};zd(Ub,{toImg:()=>wP,toSvg:()=>wP});async function wP(s,t){let{scale:e=1,width:i,height:r,meta:a={}}=t,n=Number.isFinite(i),o=Number.isFinite(r),l=Number.isFinite(e)&&e!==1||n||o;if(jo()&&l)try{let{svg:u}=await dx(ux(s)),c=(u.match(/<svg\b[^>]*>/i)||[])[0]||"",d=parseFloat((c.match(/\bwidth="([\d.]+)/i)||[])[1]),p=parseFloat((c.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(d)||!Number.isFinite(p))throw new Error("svg without dimensions");let f=Number.isFinite(a.vbW)?a.vbW:Number.isFinite(a.w0)?a.w0:d,m=Number.isFinite(a.vbH)?a.vbH:Number.isFinite(a.h0)?a.h0:p,g,y;n&&o?(g=i,y=r):n?(g=i,y=Math.round(m*(i/Math.max(1,f)))):o?(y=r,g=Math.round(f*(r/Math.max(1,m)))):(g=Math.round(d*e),y=Math.round(p*e));let v=u.replace(/width="[^"]*"/,`width="${g}"`).replace(/height="[^"]*"/,`height="${y}"`),b=new Image;return b.decoding="sync",b.loading="eager",b.src=cx(v),await b.decode(),b.style.width=`${g}px`,b.style.height=`${y}px`,b}catch(u){return Yi(t,"safari vector toImg failed, falling back to PNG",u),bT(s,{...t,format:"png",quality:1,meta:a})}let h=new Image;if(h.decoding="sync",h.loading="eager",h.src=s,await h.decode(),n&&o)h.style.width=`${i}px`,h.style.height=`${r}px`;else if(n){let u=Number.isFinite(a.vbW)?a.vbW:Number.isFinite(a.w0)?a.w0:h.naturalWidth,c=Number.isFinite(a.vbH)?a.vbH:Number.isFinite(a.h0)?a.h0:h.naturalHeight,d=i/Math.max(1,u);h.style.width=`${i}px`,h.style.height=`${Math.round(c*d)}px`}else if(o){let u=Number.isFinite(a.vbW)?a.vbW:Number.isFinite(a.w0)?a.w0:h.naturalWidth,c=Number.isFinite(a.vbH)?a.vbH:Number.isFinite(a.h0)?a.h0:h.naturalHeight,d=r/Math.max(1,c);h.style.height=`${r}px`,h.style.width=`${Math.round(u*d)}px`}else{let u=Math.round(h.naturalWidth*e),c=Math.round(h.naturalHeight*e);if(h.style.width=`${u}px`,h.style.height=`${c}px`,typeof s=="string"&&s.startsWith("data:image/svg+xml"))try{let d=decodeURIComponent(s.split(",")[1]).replace(/width="[^"]*"/,`width="${u}"`).replace(/height="[^"]*"/,`height="${c}"`);s=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(d)}`,h.src=s}catch(d){Yi(t,"SVG width/height patch in toImg failed",d)}}return h}var PP=Ta(()=>{"use strict";Sn(),_m(),Xd()}),xT={};zd(xT,{toBlob:()=>_T});async function _T(s,t){let e=t.type;if(e==="svg"){let r=decodeURIComponent(s.split(",")[1]);return new Blob([r],{type:"image/svg+xml"})}let i=await Im(s,t);return new Promise(r=>i.toBlob(a=>r(a),`image/${e}`,t.quality))}var ST=Ta(()=>{"use strict";Xd()}),CT={};zd(CT,{download:()=>sO});async function TP(s,t){let e=new File([s],t,{type:s.type});if(!navigator.canShare?.({files:[e]}))return!1;try{await navigator.share({files:[e],title:t})}catch(i){if(i.name!=="AbortError")return!1}return!0}async function sO(s,t){let e=new Set(["png","jpeg","jpg","webp","svg"]),i=(t?.type||"").toLowerCase(),r=e.has(i)?i:"",a=(t?.format||r||"").toLowerCase(),n=a==="jpg"?"jpeg":a||"png",o=t?.filename||`snapdom.${n}`,l={...t||{},format:n,type:n};l.dpr=1;let h=YF();if(n==="svg"){let d=await _T(s,{...l,type:"svg"});if(h&&await TP(d,o))return;let p=URL.createObjectURL(d),f=document.createElement("a");f.href=p,f.download=o,document.body.appendChild(f),f.click(),URL.revokeObjectURL(p),f.remove();return}let u=await Im(s,l);if(h){let d=`image/${n}`,p=await new Promise(f=>u.toBlob(f,d,t?.quality));if(p&&await TP(p,o))return}let c=document.createElement("a");c.href=u.toDataURL(`image/${n}`,t?.quality),c.download=o,document.body.appendChild(c),c.click(),c.remove()}var aO=Ta(()=>{"use strict";ST(),Xd(),Hd()});Sn();Sn();ra();var Gb=new WeakMap,jd=new Map,nO=2e3,km=0;function Sm(){km++,jd.size>nO&&jd.clear()}var oO="[data-snapdom-sandbox],[data-snapdom-internal],[data-snapdom]";function Nb(s){let t=s&&(s.nodeType===1?s:s.parentElement);return!!(t&&t.closest&&t.closest(oO))}function wT(s){for(let t of s)if(!Nb(t.target)){if(t.type==="childList"){let e=!0;for(let i of t.addedNodes)if(!Nb(i)){e=!1;break}if(e){for(let i of t.removedNodes)if(!Nb(i)){e=!1;break}}if(e)continue}return!0}return!1}var $P=!1;function lO(s=document.documentElement){if($P)return;$P=!0;let t=e=>{wT(e)&&Sm()};try{new MutationObserver(t).observe(s,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{new MutationObserver(t).observe(document.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{let e=document.fonts;e&&(e.addEventListener?.("loadingdone",Sm),e.ready?.then(()=>Sm()).catch(()=>{}))}catch{}}var hO=["mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"];function DP(s){let t=Gb.get(s);if(t&&t.epoch===km){let e=t.snapshot&&t.snapshot.__needsBgInline;if(e!==void 0)return e}return!0}function uO(s,t={}){let e={},i=t.excludeStyleProps;for(let c=0;c<s.length;c++){let d=s[c];if(lx(d)||i&&(i instanceof RegExp&&i.test(d)||typeof i=="function"&&i(d)))continue;let p=s.getPropertyValue(d);(d==="background-image"||d==="content")&&p.includes("url(")&&!p.includes("data:")&&(p="none"),e[d]=p}let r=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let c of r)if(!e[c])try{let d=s.getPropertyValue(c);d&&(e[c]=d)}catch{}let a=["-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order"];for(let c of a)if(!e[c])try{let d=s.getPropertyValue(c);d&&(e[c]=d)}catch{}if(t.embedFonts){let c=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let d of c)if(!e[d])try{let p=s.getPropertyValue(d);p&&(e[d]=p)}catch{}}try{(e["content-visibility"]||s.getPropertyValue("content-visibility"))==="hidden"&&(e["content-visibility"]="hidden")}catch{}let n=!1;{let c=s.getPropertyValue("background-image");if(c&&c!=="none"&&(n=!0),!n){let d=s.getPropertyValue("background-color");d&&d!=="rgba(0, 0, 0, 0)"&&d!=="transparent"&&(n=!0)}if(!n)for(let d of hO){let p=s.getPropertyValue(d);if(p&&p!=="none"){n=!0;break}}if(!n){let d=s.getPropertyValue("background");d&&/url\s*\(/i.test(d)&&(n=!0)}}Object.defineProperty(e,"__needsBgInline",{value:n,enumerable:!1});let o=parseFloat(s.getPropertyValue("border-top-width")||0)||0,l=parseFloat(s.getPropertyValue("border-right-width")||0)||0,h=parseFloat(s.getPropertyValue("border-bottom-width")||0)||0,u=parseFloat(s.getPropertyValue("border-left-width")||0)||0;if(o===0&&l===0&&h===0&&u===0){let c=(s.getPropertyValue("border-image-source")||"").trim(),d=c&&c!=="none",p=["border","border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-top-width","border-top-style","border-top-color","border-right-width","border-right-style","border-right-color","border-bottom-width","border-bottom-style","border-bottom-color","border-left-width","border-left-style","border-left-color","border-block","border-block-width","border-block-style","border-block-color","border-inline","border-inline-width","border-inline-style","border-inline-color"];for(let f of p)delete e[f];d||(e.border="none")}return e}function cO(s){for(let t=s.firstChild;t;t=t.nextSibling){if(t.nodeType===3&&/\S/.test(t.nodeValue||""))return!0;if(t.nodeType===1){let e=qi(t).position;if(e!=="absolute"&&e!=="fixed")return!0}}return!1}var kP=new WeakMap;function dO(s){let t=kP.get(s);return t||(t=Object.entries(s).sort((e,i)=>e[0]<i[0]?-1:e[0]>i[0]?1:0).map(([e,i])=>`${e}:${i}`).join(";"),kP.set(s,t),t)}function pO(s,t=null,e={}){let i=Gb.get(s),r=!!(e&&e.embedFonts),a=e&&e.excludeStyleProps||null;if(i&&i.epoch===km&&i.embedFonts===r&&i.excludeStyleProps===a)return i.snapshot;let n=t||getComputedStyle(s),o=uO(n,e);return bO(s,n,o),Gb.set(s,{epoch:km,snapshot:o,embedFonts:r,excludeStyleProps:a}),o}function fO(s,t){return s&&s.session&&s.persist?s:s&&(s.styleMap||s.styleCache||s.nodeMap)?{session:s,persist:{snapshotKeyCache:jd,defaultStyle:Se.defaultStyle,baseStyle:Se.baseStyle,image:Se.image,resource:Se.resource,background:Se.background,font:Se.font},options:t||{}}:{session:Se.session,persist:{snapshotKeyCache:jd,defaultStyle:Se.defaultStyle,baseStyle:Se.baseStyle,image:Se.image,resource:Se.resource,background:Se.background,font:Se.font},options:s||t||{}}}function mO(s,t,e){if(!(!s.style||s.style.length===0))for(let i=0;i<s.style.length;i++){let r=s.style[i],a=e.getPropertyValue(r);a&&t.style.setProperty(r,a)}}async function Qn(s,t,e,i){if(s.tagName==="STYLE")return;let r=fO(e,i),a=r.options&&r.options.cache||"auto";a!=="disabled"&&lO(document.documentElement),a==="disabled"&&!r.session.__bumpedForDisabled&&(Sm(),jd.clear(),r.session.__bumpedForDisabled=!0);let{session:n,persist:o}=r;if(!n.styleCache.has(s)){let g=null;try{g=getComputedStyle(s)}catch{}n.styleCache.set(s,g||getComputedStyle(document.documentElement))}let l=n.styleCache.get(s);s.getAttribute?.("style")&&mO(s,t,l);let h=l.getPropertyValue("animation-name");t&&t.style&&h&&h!=="none"&&t.style.setProperty("animation","none","important");let u=pO(s,l,r.options),c=PT(s);if(c){let g=l.getPropertyValue("min-width");(!g||g==="auto"||g==="0px")&&(u["min-width"]="0px")}let d=s.tagName?.toLowerCase()||"div",p=dO(u),f=!0;if(sT(d,(u.display||"").toLowerCase())){f=cO(s),p=`${p}|${d}${f?"|c":""}${c?"|f":""}`;let g=u["text-wrap-mode"]||u["white-space"]||"";f&&g!=="nowrap"&&g!=="pre"&&(n.reconcileRisk=(n.reconcileRisk||0)+1)}let m=o.snapshotKeyCache.get(p);m===void 0&&(m=Hb(u,d,f,c),o.snapshotKeyCache.set(p,m)),n.styleMap.set(t,m)}function gO(s){return s.backgroundImage&&s.backgroundImage!=="none"||s.backgroundColor&&s.backgroundColor!=="rgba(0, 0, 0, 0)"&&s.backgroundColor!=="transparent"||(parseFloat(s.borderTopWidth)||0)>0||(parseFloat(s.borderBottomWidth)||0)>0||(parseFloat(s.paddingTop)||0)>0||(parseFloat(s.paddingBottom)||0)>0?!0:(s.overflowBlock||s.overflowY||"visible")!=="visible"}function PT(s){let t=s.parentElement;if(!t)return!1;let e=qi(t).display||"";return e.includes("flex")||e.includes("grid")}function yO(s){for(let i=s.firstChild;i;i=i.nextSibling)if(i.nodeType===3&&/\S/.test(i.nodeValue))return!0;let t=s.firstElementChild,e=s.lastElementChild;if(t&&t.tagName==="BR"||e&&e.tagName==="BR")return!0;for(let i=s.firstElementChild;i;i=i.nextElementSibling){let r=qi(i);if(r.display==="none")continue;let a=r.position;if(a!=="absolute"&&a!=="fixed")return!0}return!1}function vO(s){let t=s.getBoundingClientRect().top,e=-1/0,i=null;for(let r=s.firstChild;r;r=r.nextSibling){if(r.nodeType===3){if(!/\S/.test(r.nodeValue||""))continue;i=i||document.createRange(),i.selectNode(r);let o=i.getBoundingClientRect();(o.width||o.height)&&(e=Math.max(e,o.bottom));continue}if(r.nodeType!==1)continue;let a=qi(r);if(a.display==="none")continue;let n=a.position;n==="absolute"||n==="fixed"||a.float&&a.float!=="none"||(e=Math.max(e,r.getBoundingClientRect().bottom))}return e===-1/0?NaN:e-t}function bO(s,t,e){if(s instanceof HTMLElement&&s.style&&s.style.height)return;let i=s.tagName&&s.tagName.toLowerCase();if(!i||!["div","section","article","main","aside","header","footer","nav"].includes(i)||t.aspectRatio&&t.aspectRatio!=="none"&&t.aspectRatio!=="auto")return;let r=t.display||"";if(r.includes("flex")||r.includes("grid"))return;let a=t.position;if(a==="absolute"||a==="fixed"||a==="sticky"||t.transform!=="none"||gO(t)||PT(s))return;let n=t.overflowX||t.overflow||"visible",o=t.overflowY||t.overflow||"visible";if(n!=="visible"||o!=="visible")return;let l=t.clip;if(l&&l!=="auto"&&l!=="rect(auto, auto, auto, auto)"||t.visibility==="hidden"||t.opacity==="0"||!yO(s))return;let h=parseFloat(t.height),u=vO(s);Number.isFinite(h)&&Number.isFinite(u)&&Math.abs(h-u)>2||(delete e.height,delete e["block-size"])}Mm();var TT=["fill","stroke","color","background-color","stop-color"],xO=new Set(["symbol","defs","pattern","marker","linearGradient","radialGradient","filter"]);function qb(s){let t=s;for(;t&&t.nodeType===1;){if(t.namespaceURI==="http://www.w3.org/2000/svg"){if(t.localName==="mask"||t.localName==="clipPath")return!1;if(xO.has(t.localName))return!0}t=t.parentNode}return!1}var AP=new Map;function _O(s,t){let e=t+"::"+s.toLowerCase(),i=AP.get(e);if(i)return i;let r=document,a=t==="http://www.w3.org/2000/svg"?r.createElementNS(t,s):r.createElement(s),n=r.createElement("div");n.setAttribute("data-snapdom-internal",""),n.style.cssText="position:absolute;left:-99999px;top:-99999px;contain:strict;display:block;",n.appendChild(a),r.documentElement.appendChild(n);let o=getComputedStyle(a),l={};for(let h of TT)l[h]=o.getPropertyValue(h)||"";return n.remove(),AP.set(e,l),l}function SO(s,t){if(s?.nodeType!==1||t?.nodeType!==1||qb(s))return;let e=s.getAttribute?.("style"),i=!!(e&&e.includes("var("));if(!i&&s.attributes?.length){let a=s.attributes;for(let n=0;n<a.length;n++){let o=a[n];if(o&&typeof o.value=="string"&&o.value.includes("var(")){i=!0;break}}}let r=null;if(i)try{r=getComputedStyle(s)}catch{}if(i){let a=s.style;if(a&&a.length){let n=new Set;for(let o=0;o<a.length;o++){let l=a[o];if(n.has(l))continue;n.add(l);let h=a.getPropertyValue(l);if(!h||!h.includes("var("))continue;let u=r&&r.getPropertyValue(l);if(u)try{t.style.setProperty(l,u.trim(),a.getPropertyPriority(l))}catch{}}}}if(i&&s.attributes?.length){let a=s.attributes;for(let n=0;n<a.length;n++){let o=a[n];if(!o||typeof o.value!="string"||!o.value.includes("var("))continue;let l=o.name,h=r&&r.getPropertyValue(l);if(h)try{t.style.setProperty(l,h.trim())}catch{}}}if(!i){if(!r)try{r=getComputedStyle(s)}catch{r=null}if(!r)return;let a=s.namespaceURI||"html",n=_O(s.tagName,a);for(let o of TT){let l=r.getPropertyValue(o)||"",h=n[o]||"";if(l&&l!==h)try{t.style.setProperty(o,l.trim())}catch{}}}}Sn();Sn();ra();Rh();Rh();function Ih(s){return!!(!s||s.startsWith("data:")||s.startsWith("blob:")||/^data:image\/(gif|png|svg)/.test(s)&&s.length<200)}var LP="img[data-src], img[data-lazy-src], img[data-original], img[data-hi-res-src], img[data-srcset], img[data-lazy-srcset]";function CO(s,t){return!s||s?.nodeType!==1?!1:s.matches?.("picture")||s.querySelector("picture")?!0:t?!!(s.matches?.(LP)||s.querySelector(LP)):!1}var wO=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i;function Am(s,t){if(!s)return null;let e=0;try{e=t?t.getBoundingClientRect().width||t.width:0}catch{}e||(e=window.innerWidth||1e3);let i=[];for(let a of s.split(",")){let n=a.trim().split(/\s+/);if(!n[0])continue;let o=n[1]||"",l=1;/^\d*\.?\d+x$/i.test(o)?l=parseFloat(o):/^\d+w$/i.test(o)&&(l=parseInt(o,10)/e),i.push({url:n[0],d:l})}if(!i.length)return null;i.sort((a,n)=>a.d-n.d);let r=window.devicePixelRatio||1;return(i.find(a=>a.d>=r)||i[i.length-1]).url}function $T(s,t){let e=s.currentSrc||"";if(e&&!Ih(e))return e;let i=t.querySelectorAll("source[srcset]"),r=null;for(let a of i){let n=a.getAttribute("srcset");if(!n||Ih(n))continue;let o=a.getAttribute("type");if(o&&!wO.test(o.trim()))continue;let l=a.getAttribute("media");if(l)try{if(window.matchMedia(l).matches)return Am(n,s)}catch{}r||(r=Am(n,s))}return r}function PO(s){let t=[s.getAttribute("data-src"),s.getAttribute("data-lazy-src"),s.getAttribute("data-original"),s.getAttribute("data-hi-res-src")];for(let i of t)if(i&&!Ih(i))return i;let e=s.getAttribute("data-srcset")||s.getAttribute("data-lazy-srcset");if(e){let i=e.split(",")[0].trim().split(/\s+/)[0];if(i&&!Ih(i))return i}return null}function TO(s={}){let t=s.pictureResolver&&typeof s.pictureResolver=="object"?s.pictureResolver:{};return{timeout:t.timeout??5e3,concurrency:t.concurrency??4,resolveLazySrc:t.resolveLazySrc!==!1,silent:t.silent??!1,useProxy:typeof s.useProxy=="string"?s.useProxy:""}}async function $O(s,t={}){if(!s||s?.nodeType!==1||t.resolvePicturePlaceholders===!1)return null;let{timeout:e,concurrency:i,resolveLazySrc:r,silent:a,useProxy:n}=TO(t);if(!CO(s,r))return null;let o=[],l=[];async function h(d){let p=await Ga(d,{as:"dataURL",timeout:e,useProxy:n,silent:!0});return p.ok?p.data:null}async function u(d){for(let p=0;p<d.length;p+=i){let f=d.slice(p,p+i);await Promise.allSettled(f.map(m=>m()))}}let c=Array.from(s.querySelectorAll("picture"));s.matches?.("picture")&&c.unshift(s);for(let d of c){let p=d.querySelector("img");if(!p)continue;let f=p.getAttribute("src")||"";if(!Ih(f))continue;let m=$T(p,d);m&&l.push(async()=>{let g=await h(m);if(!g){a||console.warn(`[snapdom:picture-resolver] Failed to fetch: ${m.slice(0,60)}`);return}let y=p.getAttribute("src"),v=p.getAttribute("srcset"),b=p.getAttribute("sizes"),x=[];p.src=g,p.setAttribute("src",g),p.removeAttribute("srcset"),p.removeAttribute("sizes");let _=d.querySelectorAll("source");for(let w of _)x.push({el:w,parent:w.parentElement,next:w.nextSibling}),w.remove();o.push(()=>{y!==null?p.setAttribute("src",y):p.removeAttribute("src"),v!==null&&p.setAttribute("srcset",v),b!==null&&p.setAttribute("sizes",b);for(let{el:w,parent:C,next:P}of x)C&&C.insertBefore(w,P)})})}if(r){let d=Array.from(s.querySelectorAll("img"));s.localName==="img"&&d.unshift(s);for(let p of d){if(p.closest("picture")&&Ih(p.getAttribute("src")||""))continue;let f=p.getAttribute("src")||"",m=PO(p);m&&Ih(f)&&l.push(async()=>{let g=await h(m);if(!g)return;let y=p.getAttribute("src");p.src=g,p.setAttribute("src",g),p.removeAttribute("srcset"),p.removeAttribute("sizes"),o.push(()=>{y!==null?p.setAttribute("src",y):p.removeAttribute("src")})})}}return l.length===0?null:(await u(l),async function(){for(let d of o)try{d()}catch{}})}function Eb(s,t,e){return e?Promise.all(s.map(i=>new Promise(r=>t(i,r)))):Promise.all(s.map(i=>new Promise(r=>{function a(){vm(n=>{!(n&&typeof n.timeRemaining=="function")||n.timeRemaining()>0?t(i,r):a()},{fast:e})}a()})))}function DO(s){return s=s.trim(),!s||/:not\(\s*\[data-sd-slotted\]\s*\)\s*$/.test(s)?s:`${s}:not([data-sd-slotted])`}function kO(s,t,e=!0){return s.split(",").map(i=>i.trim()).filter(Boolean).map(i=>{if(i.startsWith(":where(")||i.startsWith("@"))return i;let r=e?DO(i):i;return`:where(${t} ${r})`}).join(", ")}function AO(s,t){return s?(s=s.replace(/:host\(([^)]+)\)/g,(e,i)=>`:where(${t}:is(${i.trim()}))`),s=s.replace(/:host\b/g,`:where(${t})`),s=s.replace(/:host-context\(([^)]+)\)/g,(e,i)=>`:where(:where(${i.trim()}) ${t})`),s=s.replace(/::slotted\(([^)]+)\)/g,(e,i)=>`:where(${t} ${i.trim()})`),s=s.replace(/(^|})(\s*)([^@}{]+){/g,(e,i,r,a)=>{let n=kO(a,t,!0);return`${i}${r}${n}{`}),s):""}function LO(s){return s.shadowScopeSeq=(s.shadowScopeSeq||0)+1,`s${s.shadowScopeSeq}`}function FO(s){let t="";try{s.querySelectorAll("style").forEach(i=>{t+=(i.textContent||"")+`
|
|
5
5
|
`});let e=s.adoptedStyleSheets||[];for(let i of e)try{if(i&&i.cssRules)for(let r of i.cssRules)t+=r.cssText+`
|
|
@@ -42,4 +42,4 @@ ${A}[bold]${P}${h} [/]`:`
|
|
|
42
42
|
`)}}}}return d}function fC(s){let{series:t,tooltipFormatter:e}=s;Sr(t.uid,{barAndLineTooltipFormatter:e??Wz(s)})}function zz(s){let{chartType:t,series:e,tooltipFormatter:i}=s;switch(!0){case(t===M.HistogramSeries&&e instanceof Zt):{SL(e,i);break}case(t===M.PieSeries&&e instanceof Gi):{let r=Jt(e.uid,"tooltipCallback");r&&r.dispose();let a=e.events.on(_i.DataValidated,()=>{vL(e,i)});Sr(e.uid,{tooltipCallback:a});break}case(t===M.HeatSeries&&e instanceof Zt):{bL(e,i);break}case((t===M.ComboLineAndBarSeries||t===M.BarSeries)&&e instanceof Zt):{yL(e,i);break}case(e instanceof yt&&(t===M.ComboLineAndBarSeries||t===M.LineSeries||t===M.RadarSeries||t===M.ScatterSeries)):{let r=Jt(e.uid,"bulletTemplate");r&&yv({series:e,element:r,tooltipFormatter:i});break}}}function Hz(s){let{axes:t,seriesConfig:e,series:i,fieldList:r,utilsStrings:a}=s,{dataTooltipVisible:n}=e,o,l=se(i.chart?.uid??0,"rtl")??!1,h=ta(l);return n===!1?o=(u,c,d)=>"":o=(u,c,d)=>{let p=tr(r,e.x),f=ad(p,t?.[0].title?.content?.text),m=ad(a?.statistics.count??"",t?.[1]?.title?.content?.text??""),g=Jt(i.uid,"tooltipValueXNumberFormatCallback"),y=Jt(i.uid,"tooltipValueYNumberFormatCallback"),v=g?g(c):c,b=g?g(d):d,x=y?y(u):u;return`[bold]${f}${h} [/]${v} - ${b}
|
|
43
43
|
[bold]${m}${h} [/]${x}`},o}function Xz(s){let{seriesConfig:t,series:e,tooltip:i}=s,{dataTooltipVisible:r}=t;if(r!==!1){let a=Jt(e.uid,"histogramTooltipFormatter");if(a!==void 0){let n=i.dataItem;if(n!==void 0){let o=n.dataContext;return a(n.get("valueY")??0,o.minValue,o.maxValue)}}}return""}function SL(s,t){let e=Df(s);s.columns.template.set("tooltip",e);let i=t!==void 0?"tooltipHTML":"tooltipText";s.columns.template.setAll({tooltipPosition:Y.columnTooltipPosition}),s.columns.template.adapters.remove(i),s.columns.template.adapters.add(i,(r,a)=>kf({element:a,series:s,isHTML:t!==void 0}))}function Yz(s){let{series:t,tooltipFormatter:e,axesConfig:i,seriesConfig:r}=s;gL({axesConfig:i,currentSeries:t,tooltipValueFormat:r.dataTooltipValueFormat}),Sr(t.uid,{histogramTooltipFormatter:e??Hz(s)})}function zu(s){return[Y.overlayId.histogramMean,Y.overlayId.histogramMedian,Y.overlayId.histogramStdDev,Y.overlayId.histogramNormalDistribution].includes(s.get("id")??"")}function Uz(s){let t="";switch(s){case zi.Mean:t=Y.overlayId.histogramMean;break;case zi.Median:t=Y.overlayId.histogramMedian;break;case zi.StdDev:t=Y.overlayId.histogramStdDev;break;case zi.Normal:t=Y.overlayId.histogramNormalDistribution;break}return t}function Gz(s){let{series:t,seriesConfig:e,colorMatch:i,rendererSymbol:r}=s,{root:a}=t,n=t.chart;if(n){let o=e.fillSymbol??YC(),l=va({root:t.root,element:t.columns.template,seriesSymbol:o,rendererSymbol:r,colorMatch:i,isChartFillSymbol:!0}).symbolWithColorInfo;if(l!==void 0){let h=new Map;h.set(0,l),Pa({data:h,htmlContainer:a.dom,chartId:n.get("id"),colorMatchApplied:gd(n)})}}}function qz(s){let{series:t,data:e,dataWasUpdated:i,seriesWereReinitialized:r}=s;e&&(i===!0||r===!0)&&t.data.setAll(e.bins)}function Ny(s){let{root:t,xAxis:e,yAxis:i,type:r,utilsStrings:a}=s,n=yt.new(t,{id:Uz(r),valueXField:"x",valueYField:"y",xAxis:e,yAxis:i,visible:!1});return r===zi.Normal&&md(n,a.overlays.normal),Sr(n.uid,{isOverlay:!0,type:r}),n.set("connect",!1),n.appear(),n}function Kz(s){let{root:t,seriesConfig:e,xAxis:i,yAxis:r,options:a,chartConfig:n,queryObject:o,errorStrings:l}=s,{id:h,name:u}=e,c=Zt.new(t,{id:h,name:u,xAxis:i,yAxis:r,categoryXField:Qu.Start,valueYField:Qu.Count,maskBullets:!1});return Or(c.columns.template,a?.selectionTheme),Hn({element:c.columns.template,series:c,queryObject:o,errorStrings:l}),c.columns.template.setAll({width:ne}),mL({series:c,seriesConfig:e,seriesType:M.HistogramSeries,dataLabelsConfig:e.dataLabels,externalDataLabelFormatter:a?.dataLabelFormatter}),vv(c,n),c.appear(),c}function Zz(s){let{root:t,seriesConfig:e,xAxis:i,xAxisForOverlaySeries:r,yAxis:a,utilsStrings:n,options:o,chartConfig:l,queryObject:h,errorStrings:u}=s,c=[],d=Kz({root:t,seriesConfig:e,xAxis:i,yAxis:a,options:o,chartConfig:l,queryObject:h,errorStrings:u});return c.push(d),SL(d,o?.tooltipFormatter),r&&(c.push(Ny({root:t,xAxis:r,yAxis:a,type:zi.Mean,utilsStrings:n})),c.push(Ny({root:t,xAxis:r,yAxis:a,type:zi.Median,utilsStrings:n})),c.push(Ny({root:t,xAxis:r,yAxis:a,type:zi.StdDev,utilsStrings:n})),c.push(Ny({root:t,xAxis:r,yAxis:a,type:zi.Normal,utilsStrings:n}))),c}function Jz(s){let{lineSeries:t,overlayConfig:e,data:i,utilsStrings:r}=s;if(!e)ri(t,!1);else{let{symbol:a,created:n,visible:o}=e,l=Jt(t.uid,"type"),h=a??{type:Pt.SLS},u=n===!0&&o!==!1;if(ri(t,u),e.symbol?.color===void 0&&(h.color=vl({colorIndex:Xv(l),histogramOverlays:!0})),Wn({element:t,lineSymbol:h,visible:u}),i&&"bins"in i){let d=i.bins.map(x=>x.count),p=Math.max(...d),{mean:f,stddev:m,median:g}=i,y=f-m,v=f+m,b=[];switch(l){case zi.Mean:b=[{x:f,y:0},{x:f,y:p}];break;case zi.Median:b=[{x:g,y:0},{x:g,y:p}];break;case zi.StdDev:b=[{x:y,y:0},{x:y,y:p},{x:null,y:null},{x:v,y:0},{x:v,y:p}];break}t.data.setAll(b)}let c=t.data.getIndex(0)?.x;if(l===zi.StdDev&&(c=i?.stddev??Jt(t.uid,"stddev"),Sr(t.uid,{stddev:c})),typeof c=="number"){let d=l;switch(l){case zi.Mean:d=r.overlays.mean;break;case zi.Median:d=r.overlays.median;break;case zi.StdDev:d=r.overlays.stdDev;break}let p=se(t.chart?.uid??Number.NaN,"formatLocale"),f=od({root:t.root,value:c,valueFormat:Vv(),formatLocale:p}),m=`${d}: ${f}`;md(t,m)}}}function Qz(s){let{lineSeries:t,overlayConfig:e,data:i,numberOfPoints:r}=s;if(!e)ri(t,!1);else{let{symbol:a,created:n,visible:o}=e,l=a??{type:Pt.SLS},h=n===!0&&o!==!1;if(ri(t,h),e?.symbol?.color===void 0&&(l.color=vl({colorIndex:Xv(zi.Normal),histogramOverlays:!0})),Wn({element:t,lineSymbol:l,visible:h}),i&&"bins"in i){let{mean:u,stddev:c,min:d,max:p}=i,f=mz(i.bins),m=pz(d,p,r??Y.histogramSeries.normalDistribNumberOfPoints).map(g=>({x:g,y:fz({x:g,mean:u,stddev:c,scalingFactor:f})}));t.data.setAll(m)}}}function eH(s){let{series:t,seriesConfig:e,seriesWereReinitialized:i,dataWasUpdated:r,data:a,options:n}=s;t.set("id",e.id),ri(t,e.visible),Or(t.columns.template,n?.selectionTheme),md(t,e.name);let o=a?.bins.find(l=>"symbol"in l)?.symbol;ml(s)&&gl({styleCallback:()=>Gz({...s,rendererSymbol:o}),series:t,seriesConfig:e}),qz({series:t,seriesWereReinitialized:i,dataWasUpdated:r,data:a})}function tH(s){let{allChartSeries:t,seriesConfig:e,data:i,utilsStrings:r,fieldList:a,axes:n,options:o,dataLabelFormatter:l,chartConfig:h}=s,{tooltipFormatter:u}=o??{};for(let c=0;c<t.length;c++){let d=t[c];if(d instanceof yt&&Jt(d.uid,"isOverlay")){let p=Jt(d.uid,"type");if(p===zi.Normal)Qz({lineSeries:d,overlayConfig:e.overlays?.comparisonDistribution,data:i});else{let f;switch(p){case zi.Mean:f=e.overlays?.mean;break;case zi.Median:f=e.overlays?.median;break;case zi.StdDev:f=e.overlays?.standardDeviation;break}Jz({lineSeries:d,overlayConfig:f,data:i,utilsStrings:r})}}else d instanceof Zt&&(eH({...s,series:d}),mL({series:d,seriesConfig:e,seriesType:M.HistogramSeries,dataLabelsConfig:e.dataLabels,externalDataLabelFormatter:l}),Yz({axes:n,series:d,seriesConfig:e,fieldList:a,tooltipFormatter:u,utilsStrings:r,axesConfig:h.axes}))}}function Sf(s,t){if(s!==void 0&&t!==void 0&&(s.states.lookup("default")?.setAll({fill:t.fill,fillOpacity:t.fillOpacity}),t.outline!==void 0)){let{outline:e}=t;s.states.lookup("default")?.setAll({stroke:e.stroke,strokeOpacity:e.strokeOpacity,strokeDasharray:e.strokeDasharray,lineCap:e.linecap,strokeWidth:e.strokeWidth})}}function iH(s){let{seriesConfig:t,series:e,sizePolicyChanged:i}=s,{sizePolicy:r}=t,a=e.get("heatRules")?.[0],n=Jt(e.uid,"bulletTemplate");if(n!==void 0)if(r!==void 0){let{scaleType:o,field:l,minSize:h,maxSize:u}=r,c=zC(),d=t.markerSymbol?.size??Bv().size??1,p=(h??c.minSize)/d,f=(u??c.maxSize)/d;a!==void 0?i&&(a.min=p,a.max=f,a.logarithmic=o===Ov.Logarithmic,e.set("valueField",l),e.markDirtySize()):e.setAll({valueField:l,calculateAggregates:!0,heatRules:[{target:n,key:"scale",min:p,max:f,dataField:"value",logarithmic:o===Ov.Logarithmic}]})}else e.get("heatRules")?.pop(),e.setAll({valueField:void 0,calculateAggregates:!1})}function zn(s){return s.get("id")===Y.overlayId.scatterplotTrendLine}function rH(s){return s.series.values.find(t=>!zn(t))}function CL(s){return s.series.values.find(t=>zn(t))}function sH(s){let{root:t,xAxis:e,yAxis:i,seriesConfig:r}=s,{x:a,y:n}=r,o=yt.new(t,{xAxis:e,yAxis:i,valueXField:a,valueYField:n,layer:Y.zIndexes.defaultLayer30});return o.set("id",Y.overlayId.scatterplotTrendLine),Sr(o.uid,{type:zi.Trendline}),o}function aH(s){let{markerSeries:t,options:e,queryObject:i,errorStrings:r}=s,a=dt.new({});Sr(t.uid,{bulletTemplate:a}),Or(a,e?.selectionTheme),t.bullets.push(n=>{let o=Ke.new(n,{role:Y.aria.defaultChartItemRole,ariaLabel:No(),hoverOnFocus:!0,nonScalingStroke:!0,tooltip:yv({series:t,tooltipFormatter:e?.tooltipFormatter}),layer:Y.zIndexes.customLayer5},a);return Hn({element:o,series:t,queryObject:i,errorStrings:r}),AL(o,t),Ns.new(n,{sprite:o})})}function nH(s){let{root:t,seriesConfig:e,xAxis:i,yAxis:r,options:a,queryObject:n,errorStrings:o}=s,{x:l,y:h,id:u}=e,c=[],d=yt.new(t,{xAxis:i,yAxis:r,valueXField:l,valueYField:h,id:u,opacity:0,valueField:"value",maskBullets:!1});d.strokes.template.set("forceHidden",!0),aH({markerSeries:d,options:a,queryObject:n,errorStrings:o}),c.push(d);let p=sH({root:t,xAxis:i,yAxis:r,seriesConfig:e});return c.push(p),d.appear(),c}function oH(s){let{root:t,trendLineSeries:e,data:i,dataWasUpdated:r,seriesWereReinitialized:a,valueFormat:n,defaultR2Value:o,chartConfig:l}=s,{chart:h}=e,u=l.series[0],c=u.overlays?.trendLine,d=c?.symbol??{type:Pt.SLS},p=c?.created===!0&&c.visible!==!1;if(i&&(r||a)){let f=Y.scatterplotSeries,m=h!==void 0?se(h.uid,"formatLocale"):void 0,{x:g,y}=u;e.setAll({valueXField:g,valueYField:y}),e.data.setAll(i.trendLinePoints??Y.scatterplotSeries.trendLinePoints);let v=Number.isFinite(i.r2)?od({root:t,value:i.r2??f.r2,valueFormat:n,formatLocale:m}):void 0,b=v!==void 0?`R\xB2 = ${v}`:o;e.set("name",b)}d.color===void 0&&(d.color=vl({colorIndex:1})),Wn({element:e,lineSymbol:d,visible:p})}function lH(s){let{root:t,chartConfig:e,markerSeries:i}=s,r=i.chart;if(r){let a=e.series[0],n=Io(e),o,l,h=Bv(),u=new Set;i.dataItems.forEach(d=>{let p=d.bullets?.[0]?.get("sprite");if(p!==void 0){let f=wa({dataItem:d?.dataContext,seriesConfig:a,chartSubType:_e.NonSpecific,colorMatch:n}),m=va({root:t,element:p,seriesSymbol:a.markerSymbol??h,rendererSymbol:f,colorMatch:n});o=m.symbolWithColorInfo,l=m.stylingInfo,Sf(p,l),u.add(JSON.stringify(l))}}),o=u.size>1?void 0:o;let c=new Map;c.set(0,o),Pa({data:c,htmlContainer:t.dom,chartId:i.chart?.get("id"),colorMatchApplied:gd(r)})}}function hH(s){let{dataWasUpdated:t,seriesWereReinitialized:e,data:i,series:r,chartConfig:a}=s;if((t||e)&&i){let{x:n,y:o}=a.series[0];if(r.setAll({valueXField:n,valueYField:o}),a.series[0].type===M.ScatterSeries&&a.series[0].sizePolicy){let{field:l}=a.series[0].sizePolicy;i.dataItems=i.dataItems.sort((h,u)=>typeof u[l]=="number"&&typeof h[l]=="number"?u[l]-h[l]:0)}r.data.setAll(i.dataItems)}}function uH(s){let{root:t,chartConfig:e,seriesConfig:i,options:r,fieldList:a,series:n,trendLineSeries:o,data:l,dataWasUpdated:h,seriesWereReinitialized:u,sizePolicyChanged:c,utilsStrings:d}=s,{axes:p}=e,{tooltipFormatter:f}=r??{};n.set("id",i.id);let m=Jt(n.uid,"bulletTemplate");m&&Or(m,r?.selectionTheme),ri(n.bulletsContainer,i.visible),oH({root:t,trendLineSeries:o,chartConfig:e,data:l,dataWasUpdated:h,seriesWereReinitialized:u,valueFormat:Vv(),defaultR2Value:d.notAvailable}),iH({seriesConfig:i,series:n,sizePolicyChanged:c}),ml(s)&&gl({styleCallback:()=>lH({root:t,chartConfig:e,markerSeries:n}),series:n,seriesConfig:i}),Mz({axesConfig:p,seriesConfig:i,series:n,fieldList:a,tooltipFormatter:f}),hH({dataWasUpdated:h,seriesWereReinitialized:u,data:l,series:n,chartConfig:e})}function cH(s){s.series.each(t=>{t instanceof yt?t.dataItems.forEach(e=>{let i=e.bullets?.[0];i&&pr({element:i.get("sprite"),selected:!1,backToDefaultState:!0})}):t instanceof Zt?t.columns.each(e=>{pr({element:e,selected:!1,backToDefaultState:!0})}):t instanceof Gi&&t.slices.each(e=>{pr({element:e,selected:!1,backToDefaultState:!0})})})}function bh(s){let{chart:t,selectionSource:e}=s,i=se(t.uid,"currentSelectionDataItems");Fr(t.uid,{currentSelectionDataItems:void 0,currentSelectionOIDs:void 0,currentSelectionIndexes:void 0,computedSelectionDataItems:void 0,computedSelectionIndexes:void 0,pendingSelectionQueries:!1}),cC(t)&&cH(t),i&&Oh({data:{selectionSource:e??Ti.ClearSelection},htmlContainer:t.root.dom})}function dH(s){Uv(),fb(s.root.dom),bh({chart:s})}function pH(s){let{chart:t,chartType:e,showMean:i}=s;return t.series.values.filter(r=>{let a=!0;return zn(r)||zu(r)||Jt(r.uid,"isOverlay")===!0?a=!1:e===M.BoxPlotSeries&&(i?a=Jt(r.uid,"isBoxPlotMeanLineSeries")===!0:a=r instanceof Zs),a}).every(r=>Jt(r.uid,"isSelectionApplied")===!0)}function fH(s){s.series.each(t=>Sr(t.uid,{isSelectionApplied:void 0}))}function mH(s){let t=[];if(!zn(s)&&!zu(s))switch(!0){case s instanceof Gi:t=s.slices.values;break;case s instanceof Zt:let{chart:e}=s;if(e){let i=se(e.uid,"config");if(i){let r=Ie(i?.series),a=[];r===M.HistogramSeries?a=[Qu.Count]:r===M.HeatSeries?a=[Hi.valueField]:a=Zn(i?.series,[s.get("id")??""]),t=s.columns.values.filter(n=>{let o=!1,l=n.dataItem?.dataContext;return l&&(o=r===M.HeatSeries||a.some(h=>h in l&&Number.isFinite(l[h]))),o})}}break;case s instanceof yt:t=Array.from(s.dataItems.values());break}return t}function wL(s,t){let e=se(s.uid,"actionMode");(e===vt.MonoSelection||e===vt.None)&&t.length>1?bh({chart:s}):t.forEach(i=>{pr({element:i,selected:!0})})}function gH(s){let{chart:t,selectionIndexes:e,queryObject:i}=s,r=[],a=[],n=se(t.uid,"config"),o=Kn(n),l=Zn(n?.series??[]),h=pt(n?.series),u=Ie(n?.series);return t.series.each((c,d)=>{if(n&&c.get("visible")===!0&&c.get("id")!==Y.overlayId.scatterplotTrendLine){let p=n.series[0].x,f=pd(c),m=e.get(d);if(m!==void 0){let g;if(c instanceof yt&&(g=c.dataItems.map(y=>y?.bullets?.[0]?.get("sprite")).filter(y=>y!==void 0)),g!==void 0){let{indexesToSelect:y}=m;g.forEach((v,b)=>{if(y===void 0||y.includes(b)){let x=dl({dataContext:v.dataItem?.dataContext,yList:l,yAxisField:f,xAxisField:p,chartType:u,chartSubType:h,showOutliers:o,isFeatureCollectionLayer:qn(i)});x!==void 0&&r.push(x),a.push(v)}else pr({element:v,selected:!1})})}}}}),wL(t,a),r}function yH(s){let{chart:t,chartConfig:e,options:i,elementsToApplySelectionTo:r,selectionDataItems:a,layerOidField:n,xAxisField:o,yAxisField:l,splitBy:h,queryObject:u}=s,c=Ie(e.series),d=pt(e.series),p=Kn(e),f=Ld(e),m=[],g=[],y=[],v=Zn(e.series);return r.forEach((b,x)=>{let _=b instanceof Fi||b instanceof Es?b:b.bullets?.[0]?.get("sprite");if(_!==void 0){let w=b instanceof Fi||b instanceof Es?_.dataItem?.dataContext:b.dataContext;if(w!==void 0&&c===M.BoxPlotSeries&&w[Y.boxPlot.boxPlotOutlierId]!==!0&&(w=dl({dataContext:w,yAxisField:l,yList:v,xAxisField:o,splitBy:h,chartType:c,chartSubType:d,showOutliers:p,isFeatureCollectionLayer:qn(u)})),rv({elementDataContext:w,options:i,selectionDataItems:a,layerOidField:n,xAxisField:o,yAxisField:l,chartType:c,splitBy:h,chartSubType:d,showOutliers:p,timeAggregationType:f}))if(m.push(_),g.push(x),_?.dataItem instanceof ua&&w!==void 0)y.push(w);else{let C=new Set;c===M.PieSeries&&fl(w)?(Cf({groupOfSlicesDataContext:w})??[]).forEach(P=>{a.forEach(D=>{XS({layerOidField:n,sliceDataContext:P,selectionDataContext:D,xAxisField:o})&&C.add(P)})}):C.add(w),Array.from(C)?.forEach(P=>{let D=dl({dataContext:P,yAxisField:l,yList:v,xAxisField:o,splitBy:h,chartType:c,chartSubType:d,showOutliers:p,isFeatureCollectionLayer:qn(u)});D!==void 0&&y.push(D)})}else pr({element:_,selected:!1})}}),wL(t,m),{selectedIndexes:g,newSelectionDataItems:y}}function vH(s){let{series:t,seriesIndex:e,queryObject:i,dataWasUpdated:r,sortChanged:a,groupOfSlicesWasUpdated:n,xAxisField:o,yAxisField:l,splitBy:h,rotationChanged:u}=s,{chart:c}=t;if(c instanceof Kr){let d=se(c.uid,"options"),{filterBySelection:p,selectionData:f,returnSelectionIndexes:m,returnSelectionOIDs:g}=d??{},{selectionIndexes:y,selectionFilters:v}=f??{},b=se(c.uid,"config"),x=As(b),_=Ld(b),w=Ie(b?.series),C=pt(b?.series),P=mH(t);if(p!==!0&&b!==void 0){let D=ms(i),$=bl(D).idField,A=se(c.uid,"currentSelectionDataItems"),T=!1,I=!1,N,B=!1;if(P?.[0]!==void 0){if(d?.viewExtentUpdated!==!0){N=d?.selectionData?.selectionItems??A;let j=se(c.uid,"currentSelectionIndexes");B=ab({itemsA:N,itemsB:A,isPieFromFields:C===_e.PieFromFields,x:o,y:l,outStatisticFieldName:b.series[0].query?.outStatistics?.[0]?.outStatisticFieldName});let z=y?.keys.length!==j?.keys.length||!ea(y,j);T=a===!0||r===!0||n===!0||u===!0||N!==void 0&&B;let K=!0;if(y!==void 0&&y.size>0){let{indexesToSelect:V}=y.get(e??0)??{};K=V!==void 0&&V[0]===void 0}I=r===!0||n===!0||u===!0||!K&&z}if(T&&N!==void 0&&N.length>0){let{selectedIndexes:j,newSelectionDataItems:z}=yH({chart:c,chartConfig:b,options:d,elementsToApplySelectionTo:P,selectionDataItems:N,layerOidField:$,xAxisField:o,yAxisField:l,splitBy:h,queryObject:i}),K=se(c.uid,"computedSelectionDataItems")??[];if(K.push(...z),b.series.length>1&&C!==_e.BarAndLineNoAggregation&&C!==_e.BarAndLineSplitByNoAggregation&&(K=Md({data:K,x:b.series[0].x,splitByField:Ya(b.series[0].query?.where)})),Fr(c.uid,{computedSelectionDataItems:K}),m===!0){let V=Array.from(new Set(j)),E=se(c.uid,"computedSelectionIndexes");E===void 0&&(E=new Map),V.length===P.length?E.set(e??0,{}):E.set(e??0,{indexesToSelect:V}),Fr(c.uid,{computedSelectionIndexes:E})}}else if(y!==void 0&&I)N=gH({chart:c,selectionIndexes:y,queryObject:i});else{let j=z=>{let K=z.dataItem?.dataContext;return rv({elementDataContext:K,options:d,selectionDataItems:N??A??[],layerOidField:$,xAxisField:o,yAxisField:l,chartType:w,splitBy:h,chartSubType:C,timeAggregationType:_})};P.forEach(z=>{let K=z instanceof Fi||z instanceof Es?z:z.bullets?.[0]?.get("sprite");K!==void 0&&pr({element:K,selected:fn(K.uid,"selected")===!0||j(K),backToDefaultState:N===void 0||N.length===0})})}}if(Sr(t.uid,{isSelectionApplied:!0}),pH({chart:c,chartType:w,showMean:x})&&(fH(c),B||I)){let j=se(c.uid,"computedSelectionDataItems")??N;j=Array.from(new Set(j?.map(K=>JSON.stringify(K)))).map(K=>JSON.parse(K)),N!==void 0&&Fr(c.uid,{currentSelectionDataItems:j}),f?.selectionOIDs!==void 0&&Fr(c.uid,{currentSelectionOIDs:f.selectionOIDs});let z;if(m===!0&&(z=se(c.uid,"computedSelectionIndexes")??y,z!==void 0&&Fr(c.uid,{currentSelectionIndexes:z})),j===void 0||j.length===0)bh({chart:c,selectionSource:Ti.ProgrammaticSelection});else{let K={selectionItems:j,selectionSource:Ti.ProgrammaticSelection,selectionFilters:v};v?.[0]&&(K.selectionFilters=v),m===!0&&(K.selectionIndexes=z),g!==!1&&(K.selectionOIDs=f?.selectionOIDs??se(c.uid,"currentSelectionOIDs")),Oh({data:K,htmlContainer:c.root.dom})}Fr(c.uid,{computedSelectionIndexes:void 0,computedSelectionDataItems:void 0})}}}}function bH(s){let{chart:t,chartConfig:e,queryObject:i}=s;!se(t.uid,"filterBySelection")&&!ss(i)&&t.series.values.filter(r=>!zn(r)&&!zu(r)).forEach(r=>{let{seriesConfig:a,seriesIndex:n}=Lf(r,e);if(a){let o=a.x,l=a.type===M.BoxPlotSeries||a.type===M.HeatSeries?a.y.toString():pd(r),h=a.query?.where??"";TH({callbackProps:{...s,series:r,seriesIndex:n,xAxisField:o,yAxisField:l,splitBy:h},series:r,seriesConfig:a})}})}async function Af(s){let{chart:t,selectionSource:e,queryObject:i,errorStrings:r}=s,a=se(t.uid,"config"),n=ss(i);if(a){let o=se(t.uid,"options"),l=Ie(a.series),h=pt(a.series),u=Kn(a),c=Zn(a.series),d=a.series[0].x,p=kh(i),f=n?void 0:Yf(ms(i))?.dateFieldsTimeZone,m;vn(a)?m=a.outTimeZone:Mh(a.series[0])&&(m=a.series[0].temporalBinning?.outTimeZone);let g=ms(i),y="objectIdField"in g?g.objectIdField:void 0,v=Ws(i).find(b=>b.name===d)?.type;try{let b=new Set,x=[],_=new Map,w=[],C=[],P=[],D=0;if(t.series.each(($,A)=>{let{seriesConfig:T}=Lf($,a),I=T?.query?.where??"",N=T?.type===M.BoxPlotSeries?T.y.toString():pd($),B;$ instanceof yt?B=$.dataItems:$ instanceof Zt?B=$.columns.values:$ instanceof Gi&&(B=$.slices.values),B?.forEach((j,z)=>{let K=j instanceof Fi||j instanceof Es?j:j.bullets?.[0]?.get("sprite");if(K!==void 0&&fn(K.uid,"selected")===!0){D+=1;let V=j instanceof Fi||j instanceof Es?j.dataItem?.dataContext:j.dataContext;if(!n&&V!==void 0){if(V=dl({dataContext:V,yAxisField:N,yList:c,xAxisField:d,splitBy:I,chartType:l,chartSubType:h,showOutliers:u,isFeatureCollectionLayer:qn(i)}),b.has(JSON.stringify(V))||(b.add(JSON.stringify(V)),x.push(V)),z!==void 0){let E=_.get(A)?.indexesToSelect??[];E.push(z),_.set(A,{indexesToSelect:Array.from(new Set(E))})}if(y&&V[y]!==void 0&&(typeof V[y]=="number"||typeof V[y]=="string"))P.push(V[y]);else{let E=lm(I)?Mo.uniqueIds:`${Mo.uniqueIds}_${l===M.BoxPlotSeries?Jn({where:I}):N}`,re=V[E]??V[Mo.uniqueIds]??[],X=nb({dataContext:V,options:o,xAxisField:d,yAxisField:N??"",splitBy:I,xAxisFieldType:v,chartConfig:a,outTimeZone:m,dataTimeZone:f,runsOnClientQueryEngine:p,queryObject:i});C.push(X),Array.isArray(re)&&re.length>0?P.push(...re):o?.returnSelectionOIDs!==!1&&w.push(X)}}}})}),D===0)bh({chart:t,selectionSource:e});else{if(!n&&o?.returnSelectionOIDs!==!1&&w.length>0){let A={...se(t.uid,"queryConfig")};delete A.groupByFieldsForStatistics,delete A.orderByFields,delete A.outStatistics;let T=await ob({whereList:w,queryObject:i,queryConfig:A,errorStrings:r});if(w.length===D)P=T;else for(let I=0;I<T.length;I+=1)P.push(T[I])}P=Array.from(new Set(P)),a.series.length>1&&h!==_e.BarAndLineNoAggregation&&h!==_e.BarAndLineSplitByNoAggregation&&(x=Md({data:x,x:a.series[0].x,splitByField:Ya(a.series[0].query?.where)})),Fr(t.uid,{currentSelectionDataItems:x,currentSelectionOIDs:P,currentSelectionIndexes:_});let $={selectionItems:x,selectionSource:e};C?.[0]&&($.selectionFilters=C),o?.returnSelectionIndexes===!0&&($.selectionIndexes=_),o?.returnSelectionOIDs!==!1&&($.selectionOIDs=P),n&&($.selectionPixelTarget=nm({chartConfig:a,layer:i,selectionDataItems:x})),Oh({data:$,htmlContainer:t.root.dom})}}catch(b){Fr(t.uid,{pendingSelectionQueries:!1});let{httpStatus:x}=b instanceof Gn?b.details.details:b.details??{};if(x===429)dH(t);else throw b}Fr(t.uid,{pendingSelectionQueries:!1})}}function PL(s){let t=s?.selection.width();return t!==void 0&&t>0&&t!==2e7}function TL(s){let t=se(s,"actionMode");return t!==vt.None&&t!==vt.Zoom}function mC(s){let t=se(s,"filterBySelection");return TL(s)&&t!==!0}async function mA(s){let{event:t,series:e,queryObject:i,errorStrings:r}=s,{chart:a}=e;if(a){let n=a instanceof Ut?a.get("cursor"):void 0;if(!PL(n)&&mC(a.uid)){let o=t.target,l=lL(t,e);o.dataItem?.dataContext?.[Ku]?bh({chart:a,selectionSource:Ti.SelectionByClick}):(pr({element:o,selected:fn(o.uid,"selected")!==!0}),l&&a.series.each(h=>{h instanceof yt?h.dataItems.forEach(u=>{let c=u.bullets?.[0]?.get("sprite");c!==o&&pr({element:c,selected:!1})}):h instanceof Zt?h.columns.each(u=>{u!==o&&pr({element:u,selected:!1})}):h instanceof Gi&&h.slices.each(u=>{u!==o&&pr({element:u,selected:!1})})}),await Af({chart:a,selectionSource:Ti.SelectionByClick,queryObject:i,errorStrings:r}))}}}function Hn(s){let{element:t,series:e,queryObject:i,errorStrings:r}=s;t.events.on(_i.PointerUp,async a=>{await mA({event:a,series:e,queryObject:i,errorStrings:r})}),t.events.on(_i.Click,async a=>{a.simulated&&await mA({event:a,series:e,queryObject:i,errorStrings:r})})}function gA(s,t){let e=Number.NaN,i=Number.NaN;if(s instanceof ko){let r=t.get("renderer")instanceof us,a=s.getPrivate(r?"downPositionX":"downPositionY"),n=s.getPrivate(r?"positionX":"positionY");if(a!==void 0&&n!==void 0)if(t instanceof Bi)e=t.axisPositionToIndex(t.toAxisPosition(a)),i=t.axisPositionToIndex(t.toAxisPosition(n));else if(t instanceof Mi){e=t.positionToDate(t.toAxisPosition(a)).getTime(),i=t.positionToDate(t.toAxisPosition(n)).getTime();let o=t.getPrivate("baseInterval"),l=wu.getDuration(o.timeUnit,o.count)*(t.chart?.series.getIndex(0)?.get("locationX")??1);e-=l,i-=l}else t instanceof Nt&&(e=t.positionToValue(t.toAxisPosition(a)),i=t.positionToValue(t.toAxisPosition(n)))}else{let r=t.get("renderer")instanceof xr,a=s.getPrivate(r?"downPositionX":"downPositionY"),n=s.getPrivate(r?"positionX":"positionY");a!==void 0&&n!==void 0&&(e=a*(r?t.width():t.height()),i=n*(r?t.width():t.height()))}return{value1:e,value2:i}}function xH(s){let t=()=>{let e=s instanceof Ut?s.get("cursor"):void 0,i=se(s.uid,"filterBySelection");(e===void 0||!PL(e))&&!i&&bh({chart:s})};s.get("background")?.events.on(_i.Click,t),s instanceof Ut&&s.plotContainer.events.on(_i.PointerUp,t)}function _H(s){let{series:t,cursorBounds:e,multiSelect:i}=s,r=se(t.chart?.uid??NaN,"config"),a=Ie(r?.series);t.columns.each(n=>{if(!n.dataItem?.dataContext?.[Ku]){let o=n.get("x"),l=n.get("y"),h=n.height()<0&&a!==M.HeatSeries,u=h?Math.abs(n.height()):n.height();if(typeof o=="number"&&typeof l=="number"){let c=h?l-u:l,d={left:o,right:o+n.width(),top:c,bottom:c+u};if(a===M.HeatSeries){let f=d.top;d.top=d.bottom,d.bottom=f}let p=!(d.left>e.right||d.right<e.left||d.top>e.bottom||d.bottom<e.top)||i&&fn(n.uid,"selected")===!0;pr({element:n,selected:p})}}})}function SH(s){let{series:t,cursorBounds:e,multiSelect:i}=s;t.dataItems.forEach(r=>{let a=r.bullets?.[0]?.get("sprite");if(a){let n=r.bullets?.[0]?.get("sprite").get("x"),o=r.bullets?.[0]?.get("sprite").get("y"),l=typeof n=="number"&&typeof o=="number"&&n>=e.left&&n<=e.right&&o>=e.top&&o<=e.bottom||i&&fn(a.uid,"selected")===!0;pr({element:a,selected:l})}})}function CH(s){let{xAxis:t,series:e,cursorBounds:i,multiSelect:r}=s;e.dataItems.forEach(a=>{let n=a.bullets?.[0]?.get("sprite");if(n){let o=a.dataContext,l=a.get("valueX"),h=a.get("valueY");if(t instanceof Bi){let p=o?.[Y.xAxisField];typeof p=="string"&&(l=t.categoryToIndex(p))}let u=typeof l=="number"&&l>=i.left&&l<=i.right,c=typeof h=="number"&&h>=i.top&&h<=i.bottom,d=u&&c||r&&fn(n.uid,"selected")===!0;pr({element:n,selected:d})}})}function wH(s){let{cursor:t,xAxis:e,yAxis:i}=s,r=t.get("behavior"),{value1:a,value2:n}=gA(t,e),{value1:o,value2:l}=gA(t,i),h={left:a>n?n:a,right:a>n?a:n,top:o<l?o:l,bottom:o<l?l:o};return r==="selectX"?(h.top=Number.NEGATIVE_INFINITY,h.bottom=Number.POSITIVE_INFINITY):r==="selectY"&&(h.right=Number.POSITIVE_INFINITY,h.left=Number.NEGATIVE_INFINITY),h}function PH(s){let{chart:t,queryObject:e,errorStrings:i}=s;t.get("cursor")?.events.on(_i.SelectEnded,async r=>{let a=se(t.uid,"actionMode");if(a===vt.MultiSelection||a===vt.MultiSelectionWithCtrlKey){let n=t.xAxes.getIndex(0),o=t.yAxes.getIndex(0);if(n&&o){let l=se(t.uid,"config"),h=Ie(l?.series),u=t.get("cursor"),c=wH({cursor:u,xAxis:n,yAxis:o}),d=oL(r);t.series.each(p=>{!zn(p)&&!zu(p)&&(p instanceof Zt?_H({series:p,cursorBounds:c,multiSelect:d}):p instanceof yt&&(h===M.RadarSeries?CH({xAxis:n,series:p,cursorBounds:c,multiSelect:d}):SH({series:p,cursorBounds:c,multiSelect:d})))}),ri(u.selection,!1),await Af({chart:t,selectionSource:Ti.SelectionByRange,queryObject:e,errorStrings:i})}}})}function fd(s,t){let{y:e,query:i}=t,r=pt(s.series)===_e.BarAndLineSplitByNoAggregation?`${e.toString()}_${Jn({where:i?.where,keepSurroundingQuotes:!1,escape:!1})}`:[e].flat()[0],a=Y.xAxisField,n=s.rotated===!0?"categoryYField":"categoryXField",o=s.rotated===!0?"valueYField":"valueXField",l=s.axes?.[0]?.valueFormat?.type===M.CategoryAxisFormat?n:o,h=s.rotated===!0?"valueXField":"valueYField";return{xField:a,yField:r,xAxisField:l,yAxisField:h}}function ml(s){let{chartConfig:t,seriesWereReinitialized:e,dataWasUpdated:i,colorMatchChanged:r,seriesStyleChanged:a,sortChanged:n,groupOfSlicesUpdateNeeded:o,stackedTypeChanged:l}=s,h=t.series.length===1,u=Ie(t.series),c=!!(e||i||r||a||l),d=!1;switch(u){case M.BarSeries:d=!!(h&&n);break;case M.PieSeries:d=!!(o||n);break}return c||d}function $L(s){let{series:t,callbackInfo:e,seriesConfig:i}=s,r=n=>{let{type:o}=n;o==="selection"?vH(n.callbackProps):(ri(t,i.visible),n.styleCallback())},a=se(t.chart?.uid??Number.NaN,"config");a&&K1({series:t,chartConfig:a,whenReadyCallback:()=>r(e)})}function TH(s){let{series:t,callbackProps:e,seriesConfig:i}=s;$L({callbackInfo:{callbackProps:e,type:"selection"},series:t,seriesConfig:i})}function gl(s){let{series:t,styleCallback:e,seriesConfig:i}=s;$L({callbackInfo:{styleCallback:e,type:"style"},series:t,seriesConfig:i})}function DL(s){let t;return s&&s.series.length>0&&(t=s.series.values.map(e=>e.get("visible")!==!1?`${e.get("id")}`:"").filter(e=>e!=="")),t}function gC(s){let{series:t,chartConfig:e,isRotated:i}=s,r=rs(e),a=e.series[0],n=t.chart?.xAxes.getIndex(0),o=t.chart?.yAxes.getIndex(0),l=i&&(r===hi.Stacked||r===hi.Stacked100)?o:n;switch(r){case hi.Stacked:{t.setAll({stacked:!0,valueYShow:"valueYWorking",valueXShow:"valueXWorking",baseAxis:l}),t instanceof yt&&t.set("stackToNegative",a.stackNegativeValuesToBaseline??Y.lineSeries.stackNegativeValuesToBaseline);break}case hi.Stacked100:{t.setAll({stacked:!0,baseAxis:l}),i===!0?(t.setAll({valueXShow:"valueXTotalPercent"}),n instanceof Nt&&n.set("calculateTotals",!0)):(t.setAll({valueYShow:"valueYTotalPercent"}),o instanceof Nt&&o.set("calculateTotals",!0));break}case hi.Side:default:{t.setAll({stacked:!1,valueYShow:"valueYWorking",valueXShow:"valueXWorking"});break}}}function md(s,t){s.set("name",t)}function $H(s){let{chart:t,chartType:e,rotated:i,assignToSecondValueAxis:r}=s,a=t.xAxes.getIndex(0),n=t.yAxes.getIndex(0),o=[a,n,t.xAxes.getIndex(1)??t.yAxes.getIndex(1)],l,h;i!==!0?(l=o[0],h=r===!0&&o[2]?o[2]:o[1]):(l=r===!0&&o[2]?o[2]:o[0],h=o[1]);let u=e===M.HistogramSeries?t.xAxes.getIndex(1):void 0;return{xAxis:l,xAxisForHistogramOverlaySeries:u,yAxis:h}}function vv(s,t){let{series:e}=t,i=Ie(e);switch(!0){case s instanceof Zt:s.columns.template.setAll({hoverOnFocus:!0}),i===M.HeatSeries?s.columns.template.set("ariaLabel",OH()):s.columns.template.set("ariaLabel",No());break;case s instanceof Gi:s.slices.template.setAll({role:Y.aria.defaultChartItemRole,ariaLabel:rw(),hoverOnFocus:!0,isMeasured:!0});break}}function DH(s){let{element:t,numberOfItems:e,chartUid:i}=s,r=e<Y.focusableThreshold,a=i===void 0||TL(i);t.setAll({focusable:r&&a})}function kL(s){let t=0,e=[];s.series.each(i=>{if(t+=i.dataItems.length,i instanceof Zt)e.push(i.columns.template);else if(i instanceof yt){let r=Jt(i.uid,"bulletTemplate");r&&e.push(r)}else i instanceof Gi&&e.push(i.slices.template)}),e.forEach(i=>{DH({element:i,numberOfItems:t,chartUid:s.uid})})}function kH(s){let{currentChartSeriesCount:t,chartConfig:e,dataUpdateDetails:i,seriesCompositionChanged:r,seriesFilteredOut:a,sizePolicyChangesRequireSeriesReinit:n}=s,o=!1,l=Ie(e.series);switch(l){case M.BarSeries:case M.LineSeries:case M.RadarSeries:case M.ComboLineAndBarSeries:case M.BoxPlotSeries:let h=e.series.length;l===M.BoxPlotSeries&&(As(e)?h+=4:h*=5),o=a||r||i?.common?.numberOfSeriesChanged===!0||t!==h;break;case M.ScatterSeries:o=n===!0;break}return o}function yC(s){let{chartConfig:t,series:e,seriesIndex:i,queryObject:r}=s,a=t.series[i];if(a){let n=pt(t.series),o=a.name;if(n===_e.BarAndLineSplitBy||n===_e.BarAndLineSplitByNoAggregation){let l=Ya(a.query?.where);o=om({queryObject:r,fieldName:l,fieldValue:o})??o}md(e,o)}}function Lf(s,t){let e=Ie(t?.series),i,r;return t?.series.forEach((a,n)=>{let o=!1;e!==M.BoxPlotSeries||s instanceof Zs?o=s.get("id")===a.id:s instanceof Bn?o=s.get("id")?.replace(`_${vi.Top}`,"")===a.id||s.get("id")?.replace(`_${vi.Median}`,"")===a.id||s.get("id")?.replace(`_${vi.Bottom}`,"")===a.id:s instanceof yt&&(o=s.get("id")?.replace(`_${vi.Outliers}`,"")===a.id),o&&(i=a,r=n)}),{seriesConfig:i,seriesIndex:r}}function yA(s,t){let e=t==="x"?s.x():s.y();return typeof e=="number"?e:void 0}function AH(s,t){let e=yA(s,"x"),i=yA(s,"y"),r=t.plotContainer.width(),a=t.plotContainer.height(),n=!1;return typeof e=="number"&&r>0&&(e<0||e>r)&&(n=!0),!n&&typeof i=="number"&&a>0&&(i<0||i>a)&&(n=!0),n}function LH(s,t){t.seriesContainer.children.moveValue(s.bulletsContainer)}function FH(s,t){let{chart:e}=t;e instanceof Ut&&s.set("forceHidden",AH(s,e))}function AL(s,t){let e=(i,r)=>{r!==void 0&&FH(r,t)};s.on("x",e),s.on("y",e)}function gd(s,t){let e=t;e===void 0&&(e=se(s.uid,"config"));let i=se(s.uid,"colorMatchApplied")??!1;return(e?.colorMatch??!1)&&i}function ld(s,t){s.set("turboMode",t===!0)}function OH(){return`{${Hi.xField}} {${Hi.yField}} {${Hi.valueField}}`}function LL(s){let{root:t,intlOptions:e,formatLocale:i,overridePercentMultiplication:r}=s,a=dn({root:t,intlOptions:e,type:M.NumberAxisFormat,formatLocale:i});return n=>{let o=`${n}`;if(a!==void 0&&n!==null&&!(n instanceof Date)){let l=typeof n=="number"?n:ib(n,a.get("intlLocales"));r===!0&&e.style==="percent"&&(l/=100),o=a.format(l)}else n instanceof Date&&(o=n.toLocaleString(void 0,e));return o}}function MH(s){let{axis:t,intlOptions:e,overridePercentMultiplication:i,valueAxisFormatter:r}=s,{chart:a,root:n}=t,o=a!==void 0?se(a.uid,"formatLocale"):void 0,l=r??LL({root:n,intlOptions:e,formatLocale:o,overridePercentMultiplication:i});return dd(t.uid,{numberFormatter:l}),l}function IH(s){let{chart:t,formatOptions:e,isNonAggregatedChart:i}=s,{root:r}=t;return a=>{let n=a??"",o=se(t.uid,"formatLocale"),l=se(t.uid,"config");if(typeof a=="number"&&e.type===M.NumberAxisFormat)n=LL({root:r,intlOptions:e.intlOptions,formatLocale:o})(a);else if(i===!0&&e.type===M.DateAxisFormat)n=dn({root:r,type:M.DateAxisFormat,intlOptions:e.intlOptions,formatLocale:o}).format(n,e.intlOptions);else if(e.type===M.CategoryAxisFormat){let h=pt(l?.series);if([_e.BoxPlotMonoField,_e.BoxPlotMultiFields,_e.BoxPlotMonoFieldAndSplitBy,_e.BoxPlotMultiFieldsAndSplitBy,_e.BarAndLineFromFields].includes(h)&&typeof a=="string"){let c=se(t.uid,"fieldList");a=tr(c,a)}let{characterLimit:u}=e;n=a?.toString()??"",!Ii(n)&&n!==Y.htmlEmptyContent&&(n=Kv({stringToTruncate:n,characterLimit:u}))}return n.toString()}}function RH(s){let{chart:t,isXAxis:e=!0,formatOptions:i}=s,{root:r}=t;return a=>{let n=a??"",o=se(t.uid,"formatLocale"),l=se(t.uid,"config");if(vn(l)){let h=UC(l.series[0],e);if(h&&a!==void 0&&a!==""){if(i.type===M.DateAxisFormat&&i.intlOptions)switch(h.unit){case If.DayOfWeek:n=lP({weekdayNumber:Number(a),format:i.intlOptions,firstDayOfWeek:l.firstDayOfWeek,locale:o});break;case If.MonthOfYear:n=hP({monthNumber:Number(a),format:i.intlOptions,locale:o});break;case If.HourOfDay:n=oP({hour:Number(a),format:i.intlOptions,locale:o});break}}else if(a!==void 0&&a!==""){if(i.type===M.DateAxisFormat)n=dn({root:r,type:M.DateAxisFormat,intlOptions:i.intlOptions,formatLocale:o}).format(n,i.intlOptions);else if(i.type===M.CategoryAxisFormat&&(n=a?.toString()??"",!Ii(n)&&n!==Y.htmlEmptyContent)){let{characterLimit:u}=i;n=Kv({stringToTruncate:n,characterLimit:u})}}}return n.toString()}}function VH(s){let{axis:t,formatOptions:e,isTimeOnlyField:i,setTimeZone:r,outTimeZone:a}=s,n={...Yn(e)},o=["year","month","day","hour","minute","second"],l={hour:{hour:"numeric",minute:"numeric"},minute:{hour:"numeric",minute:"numeric"},second:{hour:"numeric",minute:"numeric",second:"numeric"}},h={week:{month:"short",day:"numeric"},day:{month:"short",day:"numeric"}},u=i?l:h,c=i?l:h;if(r){let d=Su.new(a??n.timeZone??Intl.DateTimeFormat().resolvedOptions().timeZone);r&&t.root.timezone?.name!==d.name&&(t.root.timezone=d),delete n.timeZone;for(let p=0;p<o.length;p+=1){let f=o[p],m=p===0?f:o[p-1],g=e?.formatPerDateTimeUnit?.[f]??n,y=e?.formatPerDateTimeUnit?.[m];g&&Object.values(g).find(v=>v!==void 0&&(typeof v!="string"||!Ii(v)))&&(u[f]=g,c[f]=y??g)}Object.keys(u).length>0&&t.set("dateFormats",u),Object.keys(c).length>0&&t.set("periodChangeDateFormats",c)}}function vA(s){let{axis:t,valueFormat:e,chartType:i}=s,r=Dh({isXAxis:!0,chartType:i,valueFormat:e}),a=ks(e)&&t instanceof Mi,n=Xi(e)&&t instanceof Nt&&!(t instanceof Mi),o=r&&t instanceof Bi;return!a&&!n&&!o}function FL(s){let{dataContext:t,defaultValue:e,chartUID:i}=s,r=xn(t),a=se(i,"config"),n=se(i,"rendererFieldNames"),o=Ie(a?.series),l=pt(a?.series),h=xn(t)??r;if(l===_e.BarAndLineFromFields&&typeof r=="string"){let u=se(i,"fieldList");r=tr(u,r)}else o===M.BoxPlotSeries&&(l===_e.BoxPlotMonoField||l===_e.BoxPlotMultiFields||l===_e.BoxPlotMonoFieldAndSplitBy||l===_e.BoxPlotMultiFieldsAndSplitBy)?r=t?.[Bf]:o===M.HistogramSeries?r=t?.[Qu.Start]:(o===M.BarSeries||o===M.LineSeries||o===M.RadarSeries||o===M.ComboLineAndBarSeries)&&a!==void 0?r=bn({value:Pd(l,a?.series?.[0]),dataContext:t,useRendererLabel:Lh(a,n),config:a}):r=bn({value:e??"",dataContext:t,useRendererLabel:Lh(a,n),specificField:Ee.xAxisField});return{labelValue:r,originalLabelValue:h}}function NH(s,t){let{chart:e}=s;if(e!==void 0){let i=s.get("renderer").labels.template;i.adapters.remove("text"),i.adapters.remove("html");let r=t!==void 0?"html":"text";i.adapters.add(r,(a,n)=>{let o=a,l=mh(s.uid,"labelFormatter");if(!xa(n.uid,"isGuide")&&l!==void 0){let h,u;switch(!0){case s instanceof Mi:case s instanceof Nt:h=n.dataItem?._settings?.value,u=h;break;case s instanceof Bi:{let c=a,d=n.dataItem?.dataContext,p=se(s.chart?.uid??Number.NaN,"config");if(Ie(p?.series)===M.HeatSeries){let m=Hu(s.get("renderer"))?d?.[Hi.xField]:d?.[Hi.yField];typeof m=="string"&&(c=m)}let f=FL({dataContext:d,defaultValue:c,chartUID:e.uid});h=f.labelValue,u=f.originalLabelValue}break}h!==void 0&&(o=l(h,u),r==="html"&&(o=wr(o)))}return o}),r==="html"&&i.set("html",Y.htmlEmptyContent)}}function EH(s){let{axis:t,isRotated:e,chartConfig:i}=s,r=t.get("renderer");if(r===void 0)return;let a=t instanceof Bi||t instanceof Mi,n=t instanceof Nt&&!(t instanceof Mi)&&e===!0&&Hu(r,e);if(a||n){let o=i.orderOptions?.data&&"orderBy"in i.orderOptions.data?i.orderOptions.data.orderBy===xd.Descending:!1,l=e===!0;o&&t instanceof Mi&&(l=!l),r.set("inversed",l)}}function BH(s){let{axis:t,isXAxis:e,chartType:i,formatOptions:r,isNonAggregatedChart:a,overridePercentMultiplication:n,externalAxisLabelFormatter:o,isTimeOnlyField:l,setTimeZone:h,outTimeZone:u,errorStrings:c}=s,{chart:d}=t;if(d!==void 0){let p=Dh({isXAxis:e,chartType:i,valueFormat:r}),f=t instanceof Nt&&!(t instanceof Mi)&&Xi(r),m=t instanceof Mi&&ks(r),g=t instanceof Bi&&p;if(!(f||m||g))tv("mismatchAxisAndValueFormat",c);else{NH(t,o);let y=o;o===void 0&&(i===M.HeatSeries?y=RH({chart:d,isXAxis:e,formatOptions:r}):g?y=IH({chart:d,formatOptions:r,isNonAggregatedChart:a}):f?y=MH({axis:t,intlOptions:r.intlOptions,overridePercentMultiplication:n,valueAxisFormatter:o}):m&&VH({axis:t,formatOptions:r,isTimeOnlyField:l,setTimeZone:h,outTimeZone:u})),dd(t.uid,{labelFormatter:y})}}}function jH(s){let{chart:t,chartConfig:{axes:e,series:i},rotationChanged:r,axisLabelsBehaviorChanged:a,timeIntervalInfoWasReset:n}=s,o=Ie(i),l=zr(s.chartConfig),h=l?1:0,u=l?0:1,c=e?.[h]?.valueFormat,d=e?.[u]?.valueFormat,p=t.xAxes.getIndex(0),f=t.yAxes.getIndex(0),m=p===void 0||r||c!==void 0&&vA({axis:p,valueFormat:c,chartType:o}),g=f===void 0||r||d!==void 0&&vA({axis:f,valueFormat:d,chartType:o});return n||a?.[0]||a?.[1]||m||g}function Hu(s,t){return s instanceof xr&&!t||s instanceof js&&t||s instanceof us}function bv(s){return s instanceof xr}function WH(s){return s instanceof js}function zH(s){let{axis:t,isLogarithmic:e,axisConfigIndex:i}=s,r=se(t.chart?.uid??Number.NaN,"config"),a=e===!0&&rm({chartConfig:r,axisConfigIndex:i,chartData:t.chart?.series.getIndex(0)?.data.values});(t instanceof Mi||t instanceof Nt)&&t.setAll({logarithmic:a,treatZeroAs:a?Y.treatZeroValueAs:0,maxPrecision:a?0:void 0})}function HH(s,t){if(s instanceof Nt){let{integerOnlyValues:e,valueFormat:i}=t,r=Qv(i)?i.intlOptions.maximumFractionDigits:void 0;s.set("maxPrecision",e===!0||r===0?0:Number.NaN)}}function OL(s,t){let{chart:e}=t,i=Br.new(s,{forceHidden:!0});return t.set("tooltip",i),i.adapters.add("labelText",(r,a)=>{let n=r??"",o=mh(t.uid,"labelFormatter");if(!a.isHidden()&&o&&e){let{label:l}=a,h=l.get("text")??"";if(t instanceof Nt){let u=Number.parseFloat(h.replace(/,/gu,""));n=o(Number.isNaN(u)?h:u,r)}else if(t instanceof Bi){let u=l.dataItem?.dataContext,c=FL({dataContext:u,defaultValue:r,chartUID:e.uid});n=o(c.labelValue??h,r??c.originalLabelValue)}}return n}),i}function XH(s){let{root:t,axis:e,displayCursorTooltip:i}=s;(e.get("tooltip")??OL(t,e)).set("forceHidden",i!==!0)}function YH(s){let{axis:t,timeIntervalInfo:e,dateBaseInterval:i,xFieldIsTimeOnly:r}=s;if(t instanceof Mi){let a,n=1,{size:o,unit:l}=e??{};if(l||({size:o,unit:l}=i??{}),o&&l!==void 0){switch(l){case Ir.Second:a="second";break;case Ir.Minute:a="minute";break;case Ir.Hour:a="hour";break;case Ir.Day:a="day";break;case Ir.Week:a="week";break;case Ir.Month:a="month";break;case Ir.Year:a="year";break}n=o}a===void 0&&r&&(a="second",n=1),a!==void 0&&t.set("baseInterval",{timeUnit:a,count:n})}}function UH(s,t){let{buffer:e}=t??{};return e??=Y.buffer,s instanceof Nt&&!(s instanceof Mi)&&!e}function GH(s,t){let e=!1;return s instanceof Nt&&!(s instanceof Mi)&&(e=UH(s,t),s.set("strictMinMax",e)),e}function bA(s,t){let e=s;if(s){let i=(t?Math.ceil:Math.floor)(Math.log10(s));e=Math.pow(10,i)}return e}function qH(s){let{axis:t,xAxis:e,isSecondaryYAxis:i,chartType:r,stackedType:a,isLogarithmic:n}=s,o=!1,l=[M.BarSeries,M.LineSeries,M.RadarSeries];if(r!==void 0&&l.includes(r)&&a===hi.Stacked100&&!n&&t instanceof Nt&&!e){let h=se(t.chart?.uid??Number.NaN,"config"),u=t.chart?.series.getIndex(0)?.data.values;if(h&&u){let c=DL(t.chart),d=im({chartConfig:h,isSecondaryYAxis:i,seriesIds:c});o=!mw({seriesConfig:h.series,filteredData:u,filteredSeriesIds:d}).dataHasNegativeValues}}return o}function KH(s){let{dataMinMax:t,chartType:e,stackedType:i,isXAxis:r,minimumFromConfig:a,maximumFromConfig:n,isLogarithmic:o}=s,{minX:l,maxX:h,minY:u,maxY:c}=t,[d,p]=r?[l??Number.NaN,h??Number.NaN]:[u,c],f=d,m=p;return i===hi.Stacked100?(f=Number.NaN,m=Number.NaN):((e===M.BarSeries||e===M.ComboLineAndBarSeries||e===M.HistogramSeries&&!r||(e===M.LineSeries||e===M.RadarSeries)&&i===hi.Stacked&&!r)&&(f=Math.min(d,0),m=Math.max(p,0)),f=a??f,m=n??m),o===!0&&(f=Number.isFinite(f)?bA(f,!1):f,m=Number.isFinite(m)?bA(m,!0):m),{min:f??Number.NaN,max:m??Number.NaN}}function ZH(s){let{axis:t,xAxis:e,isSecondaryYAxis:i,data:r,minimumFromConfig:a,maximumFromConfig:n}=s,o=a,l=n,{chart:h}=t;if(h){let u=se(h.uid,"config");if(h instanceof Ut&&u){let c=Ie(u.series),d=rs(u)??hi.Side,p=DL(h),f=im({chartConfig:u,isSecondaryYAxis:i,seriesIds:p}),m=Xa(r),g=lb({chartConfig:u,chartData:m??h.series.getIndex(0)?.data.values??[],filteredSeriesIds:f}),y=KH({dataMinMax:g,chartType:c,stackedType:d,isXAxis:e,minimumFromConfig:a,maximumFromConfig:n});o=y.min,l=y.max}}return{min:o,max:l}}function JH(s){let{axis:t,axisConfig:e,minimumFromConfig:i,maximumFromConfig:r,isLogarithmic:a,chartType:n,stackedType:o,isRotated:l,data:h,isSecondaryYAxis:u}=s,{chart:c}=t;if(c&&(t instanceof Nt||t instanceof Mi))if(GH(t,e)){let d=i,p=r,f=Hu(t.get("renderer"),l);if(qH({chartType:n,stackedType:o,isLogarithmic:a,axis:t,xAxis:f}))d=d??0,p=p??100;else if(KA({minimumFromConfig:i,maximumFromConfig:r,isLogarithmic:a})){let m=ZH({axis:t,xAxis:f,data:h,minimumFromConfig:d,maximumFromConfig:p,isSecondaryYAxis:u});d=m.min,p=m.max}p=p??Number.NaN,d=d??Number.NaN,a&&d!==void 0&&d!==null&&(d=Number.isNaN(d)||d===0?Y.treatZeroValueAs:d),Number.isNaN(d)||Number.isNaN(p)||d<p?t.setAll({min:d,max:p}):t.setAll({min:Number.NaN,max:Number.NaN}),n===M.GaugeSeries&&t.markDirty()}else t.setAll({min:Number.NaN,max:Number.NaN})}function Zy(s,t){if(s!==void 0){let e=se(s.uid,"config");if(e!==void 0){let i=Ie(e?.series),r=rs(e)??hi.Side,a=zr(e),n=s.xAxes.getIndex(0),o=e.axes?.[0],l=e.axes?.[1],h=e.axes?.[2],u=s.yAxes.getIndex(0),c=s.xAxes.getIndex(1)??s.yAxes.getIndex(1);[{axis:n,axisConfig:o},{axis:u,axisConfig:l},{axis:c,axisConfig:i===M.HistogramSeries?o:h,isSecondaryYAxis:i!==M.HistogramSeries}].forEach(d=>{let{axis:p,axisConfig:f,isSecondaryYAxis:m}=d;if(p!==void 0){let{minimum:g,maximum:y,buffer:v,isLogarithmic:b}=f??{};JH({axis:p,axisConfig:f,data:t,chartType:i,stackedType:r,isRotated:a,minimumFromConfig:g,maximumFromConfig:y,isLogarithmic:b,isSecondaryYAxis:m})}})}}}function QH(s){s.get("renderer").grid.template.adapters.add("strokeWidth",(t,e)=>{let i=mh(s.uid,"zeroGridLine"),r=i?.displayZeroLine===!0,a=i?.strokeWidth??Y.lineWidth;return e.get("themeTags")?.includes("base")&&r&&(a=(a===0?1:a)*1.5),a}),s.get("renderer").grid.template.adapters.add("strokeOpacity",(t,e)=>{let i=mh(s.uid,"zeroGridLine"),r=i?.displayZeroLine===!0,a=i?.visible===!0?t:0;return e.get("themeTags")?.includes("base")&&r&&(a=1),a})}function vC(s){s.on("visible",()=>{s.chart instanceof Ut&&Zy(s.chart)}),s.events.on(_i.DataValidated,()=>{s.chart instanceof Ut&&Zy(s.chart)})}function eX(s){let t=0;return s.dataItems.forEach(e=>{let i=e.get("label");i!==void 0&&xa(i.uid,"isGuide")!==!0&&i.getText()!==void 0&&i.height()>t&&i.isVisible()&&(t=i.height())}),t}function xA(s,t){if(t){let{chart:e}=t;if(e){let i=se(e.uid,"isRotated"),r=se(e.uid,"config"),a=Ie(r?.series),n=[],o=(l,h)=>{if(l instanceof Nt){let u=l.get("renderer")instanceof us;n.push({isXAxis:Hu(l.get("renderer"),i),isSecondValueAxis:h===1&&a!==M.HistogramSeries,minimum:u?l.get("min"):l.getPrivate("min"),maximum:u?l.get("max"):l.getPrivate("max")})}};e.xAxes.each(o),e.yAxes.each(o),n.length>0&&n.every(l=>!Number.isNaN(l.minimum)&&!Number.isNaN(l.maximum))&&mb(n,e.root.dom)}}}function ML(s){s.ghostLabel?.set("forceHidden",!0)}function _A(s){let{axis:t,start:e,end:i}=s;t.zoom(e??0,i??1)}function SA(s){s!==void 0&&s.setAll({start:0,end:1})}function tX(s){s instanceof Ut&&(s.xAxes.each(t=>_A({axis:t})),s.yAxes.each(t=>_A({axis:t})),SA(s.get("scrollbarX")),SA(s.get("scrollbarY")))}function iX(s){let{axis:t,guide:e,guideIndex:i}=s,{root:r,chart:a}=t,n=e.get("axisFill");n?.set("tooltip",Br.new(r,{autoTextColor:!1}));let o=n?.get("tooltip");if(o!==void 0&&a!==void 0){o.label.setAll({oversizedBehavior:"wrap"}),o.label.adapters.add("maxWidth",()=>Math.min(Y.tooltipWidth,a.seriesContainer.width())),o.get("background")?.set("fillOpacity",Nf);let l=se(a.uid,"rtl");o.label.set("direction",l?"rtl":"ltr")}if(n!==void 0){n.setAll({tooltipPosition:Y.guideTooltipPosition}),n.adapters.add("tooltipText",(h,u)=>{let c=h,{dataItem:d}=u;if(!(t.get("renderer")instanceof us)){let p=mh(t.uid,"guideTooltipFormatter");if(p!==void 0&&d instanceof cr){let f,m;switch(!0){case t instanceof Mi:case t instanceof Nt:f=d.get("value"),m=d.get("endValue");break;case t instanceof Bi:f=d.get("category"),m=d.get("endCategory");break}c=p({guideName:WW(d.uid,"name")??"",start:f??"",end:m,guideIndex:i})}}return c??""});let l=n.getTooltip();l&&(xL(l),l.adapters.add("x",(h,u)=>{let{chart:c}=t;if(c&&u){let d=se(c.uid,"config"),p=se(c.uid,"isRotated");if(d){let f=Hu(t.get("renderer"),p)?0:1,m=d?.axes?.[f]?.guides?.[i];if(m){let{tooltipReverseColor:g}=m;_L(u,g)}}}return h}))}}function rX(s,t){return e=>{let{guideName:i,start:r,end:a}=e,{chart:n,root:o}=s,l="";if(n!==void 0){let h=se(n.uid,"config"),u=se(n.uid,"isRotated"),c=Hu(s.get("renderer"),u)?0:1,d=h?.axes?.[c]?.guides,p=r,f=a;if(s instanceof Mi){let b;if(n!==void 0){let x=se(s.chart?.uid??Number.NaN,"formatLocale");b=dn({root:s.root,type:M.DateAxisFormat,formatLocale:x});let _=h?.axes?.[0]?.valueFormat?.type===M.DateAxisFormat?h.axes[0].valueFormat.intlOptions:void 0;p=b.format(r,_),a!==void 0&&(f=b.format(a,_))}}else if(s instanceof Nt&&!(r instanceof Date)&&!(a instanceof Date)){let b=d?.find(C=>C.name===i),{start:x,end:_}=IL(s,b);Number.isFinite(x)&&(p=x),Number.isFinite(_)&&(f=_);let w=mh(s.uid,"numberFormatter")??(C=>Kl.new(o,{}).format(C));p=w(p),f!==void 0&&(f=w(f))}else s instanceof Bi&&(p=r,f=a);let m=p.toString(),g=f?.toString()??"";!Ii(g)&&m!==g?l=Fu(t.guideTooltipLabel,{guideStart:m,guideEnd:g}):l=m;let y=se(n.uid,"rtl"),v=ta(y??!1);l=`${i}${v} ${l}`}return l}}function sX(s){let{axis:t,guideTooltipFormatter:e,utilsStrings:i}=s;dd(t.uid,{guideTooltipFormatter:e??rX(t,i)})}function CA(s){let{inputValue:t,axis:e,axisMin:i,axisMax:r}=s,a=t;if(t!=null)switch(!0){case e instanceof Mi:a=t;break;case e instanceof Bi:a=t.toString();break;case e instanceof Nt:if(typeof t!="number"){let n=t.toString().trim(),o=Id(n);o!==void 0?i!==void 0&&r!==void 0?a=o/100*(r-i)+i:a=null:a=Number.parseFloat(n)}break}return a}function bC(s,t){return s.axisRanges?.values?.filter(e=>{let i=e.get("label"),r=xa(i?.uid??Number.NaN,"isGuide")??!1,a=xa(i?.uid??Number.NaN,"isGaugeAxisLabel")??!1,n=!1;switch(t){case ji.Ticks:n=!r;break;case ji.Guides:n=r;break;case ji.GaugeTicksWithLabels:n=a&&"value"in e&&e.value!==void 0;break}return n})??[]}function aX(s){let{axis:t,guideConfig:e,above:i}=s,r=e!==void 0,a=t.axisRanges.length,n=t.axisRanges.insertIndex(a,t.makeDataItem({above:i}));r&&(i===!0&&n.get("axisFill")?.setAll({layer:Y.zIndexes.customLayer10}),lz({guide:n,axis:t,guideLabelConfig:e?.label}));let o=n.get("axisFill");o!==void 0&&o.setAll({disabled:!0,fillOpacity:1});let l=n.get("grid");return l!==void 0&&r&&l.set("strokeOpacity",0),n}function nX(s){let{axis:t,guideIndex:e,guideConfig:i}=s,r=aX({axis:t,guideConfig:i,above:i?.above});iX({axis:t,guide:r,guideIndex:e});let a=r.get("tick"),n=r.get("label"),o=r.get("grid");a!==void 0&&a.set("disabled",!0),n!==void 0&&n.set("inside",!0),o!==void 0&&o.set("disabled",!0)}function oX(s,t){let e=bC(s,ji.Guides).length,i=(t?.length??e)-e;for(let r=0;r<i;r+=1)nX({axis:s,guideIndex:r,guideConfig:t?.[r]})}function lX(s,t){let{start:e,end:i}=t,r=e!==null?e:void 0,a=i!==null?i:void 0,{chart:n}=s,o=se(n?.uid??Number.NaN,"config");if(o!==void 0){let l=Zf(o),h=s.data.values,u=h.find(c=>c[Y.originalXValue]===e)?.[l];if((typeof u=="string"||typeof u=="number"||u instanceof Date)&&(r=u),a!==void 0)for(let c=h.length-1;c>=0;c-=1){let d=h[c],p=d[l];if(d[Y.originalXValue]===i&&(typeof p=="string"||typeof p=="number"||p instanceof Date)){a=p;break}}}return{modifiedStart:r,modifiedEnd:a}}function IL(s,t){let{start:e,end:i}=t??{},r;if(t!==void 0&&e!==void 0&&e!==null){let a=s instanceof Nt?s.get("min"):void 0,n=s instanceof Nt?s.get("max"):void 0,o=CA({inputValue:e,axis:s,axisMin:a,axisMax:n}),l=t.style?.type===Pt.SFS&&i!==null&&i!==void 0?CA({inputValue:i,axis:s,axisMin:a,axisMax:n}):o;r={isValidGuide:o!=null&&(i===void 0||l!=null),start:o,end:l}}else r={isValidGuide:!1,start:void 0,end:void 0};return r}function hX(s){let{axis:t,guide:e,guideConfig:i}=s,{start:r,end:a}=i;if(r!==void 0){let{chart:n}=t,o;if(t instanceof Bi&&n instanceof Ut&&se(n.uid,"isNonAggregatedChart")===!0){let{modifiedStart:l,modifiedEnd:h}=lX(t,i);o={isValidGuide:!0,start:l??r,end:h??a}}else o=IL(t,i);if(o.isValidGuide){let l,h;switch(!0){case t instanceof Mi:case t instanceof Nt:l="value",h="endValue";break;case t instanceof Bi:l="category",h="endCategory";break}l!==void 0&&o.start!==void 0&&e.setAll({[l]:o.start}),h!==void 0&&o.end!==void 0&&e.setAll({[h]:o.end})}}}function uX(s){let{axis:t,guide:e,guideConfig:i}=s;if(e){let r=e.get("axisFill"),a=e.get("label");if(i!==void 0){zW(e.uid,{name:i.name}),ri(e,i.visible),hX({axis:t,guide:e,guideConfig:i}),i.style.type===Pt.SLS?gh({root:t.root,element:r,fillSymbol:{type:Pt.SFS,color:i.style?.color,outline:i.style},visible:i.visible}):i.style.type===Pt.SFS&&gh({root:t.root,element:r,fillSymbol:i.style,visible:i.visible}),hz({axis:t,guide:e,guideConfig:i,guideType:i.style.type}),e.get("axisFill")?.setAll({layer:i.above?Y.zIndexes.customLayer10:0});let{chart:n}=t}else r!==void 0&&r.set("disabled",!0),a!==void 0&&a.set("disabled",!0)}}function cX(s){let{axis:t,guideConfigs:e,guideTooltipFormatter:i,utilsStrings:r}=s;if(e!==void 0){let a=bC(t,ji.Guides);e.forEach((n,o)=>{uX({axis:t,guide:a[o],guideConfig:n})}),sX({axis:t,guideTooltipFormatter:i,utilsStrings:r})}}function dX(s){let{axis:t,tickOrGuide:e,numberOfElementsToBeDeleted:i}=s,r=[],a=t.axisRanges.length-1,n=i;for(;n>0&&a>=0;){let o=t.axisRanges.getIndex(a);o!==void 0&&(xa(o.get("label")?.uid??Number.NaN,"isGuide")??!1)===!0&&e===ji.Guides&&(r.push(o),n-=1),a-=1}for(let o=0;o<r.length;o+=1)t.axisRanges.removeValue(r[o])}function wA(s,t){let e=bC(s,ji.Guides).length,i=t?.length??0,r=e-i;dX({axis:s,numberOfElementsToBeDeleted:r,tickOrGuide:ji.Guides})}function pX(s){let{axis:t,guideConfigs:e,anyGuideAboveChanged:i}=s;i&&wA(t),oX(t,e),cX(s),wA(t,e)}function RL(s){return s.getCellWidthPosition()*s.width()}function fX(s,t){let e=s.get("renderer");if(s!==void 0){let i=Number.NaN;if(t===Ci.Wrap){let r=Number.MAX_SAFE_INTEGER;e.labels.each(n=>{xa(n.uid,"isGuide")!==!0&&n.width()>0&&(r=Math.min(r,n.innerWidth()))});let a=s instanceof Mi?s.width()/Y.maxNumberOfXAxisLabelsInWrapModeForDateAxis:s.width()/Y.maxNumberOfXAxisLabelsInWrapMode;i=Math.max(r,a)}else if(t===Ci.Hide){let r=Number.MIN_SAFE_INTEGER;e.labels.each(a=>{xa(a.uid,"isGuide")!==!0&&a.width()>0&&(r=Math.max(r,a.innerWidth()))}),i=r+2}Number.isFinite(i)&&i>Y.shortestMinGridDistance&&e.set("minGridDistance",i)}}function mX(s){let{axis:t,chartType:e,labelConfig:i,isSecondaryYAxis:r,tickSpacing:a}=s,{horizontalAxisLabelsBehavior:n}=s;n===void 0&&(n=e!==M.HistogramSeries?Ci.Rotate:Ci.Hide);let o=t.get("renderer"),l=o.get("minGridDistance");if(typeof a=="number"&&Number.isFinite(a))l=a;else if(e!==M.RadarSeries)if(o instanceof us)l=Y.gauge.gaugeMinGridDistance;else if(t instanceof Nt)l=o instanceof xr?Y.xAxisMinGridDistance:Y.yAxisMinGridDistance;else if(o instanceof xr)if(r===!0)l=Y.secondRotatedValueAxisMinGridDistance;else if(n===Ci.Rotate){let h=i.content.font?.size??Y.generalFontSize,u=t instanceof Bi?Y.categoryAxisLabelPadding:Y.axisLabelPadding;l=h*u}else if(n===Ci.Wrap||n===Ci.Hide){n===Ci.Hide&&(l=t instanceof Bi?Y.xCategoryAxisMinGridDistance:Y.xAxisMinGridDistance);let h=mh(t.uid,"minGridDistanceCallbackDisposer");h!==void 0&&h.dispose(),h=t.events.on(_i.BoundsChanged,()=>{fX(t,n)}),dd(t.uid,{minGridDistanceCallbackDisposer:h})}else n===Ci.Stagger?l=Y.staggerMinGridDistance:l=t instanceof Bi?Y.xCategoryAxisMinGridDistance:Y.xAxisMinGridDistance;else l=t instanceof Bi?Y.yCategoryAxisMinGridDistance:Y.yAxisMinGridDistance;o.set("minGridDistance",l)}function PA(s=1,t){let e=t.get("renderer"),i=RL(t),r=0;e.labels.each(o=>{xa(o.uid,"isGuide")!==!0&&o.getText()!==void 0&&o.width()>0&&(r+=1)});let a=r>0?t.width()/r:0,n=Math.max(i,a)*s;if(Number.isFinite(n)&&n>0){let o=e.labels.template;o.get("maxWidth")!==n&&(o.set("maxWidth",n),o.get("html")!==void 0&&(o.set("html",void 0),o.set("html",Y.htmlEmptyContent)))}}function TA(s,t=1){s.get("renderer").labels.template.setAll({oversizedBehavior:"wrap",paddingLeft:.5,paddingRight:.5,textAlign:"center"}),s.events.on(_i.BoundsChanged,()=>PA(t,s)),PA(t,s)}function gX(s){let t=s.get("renderer").labels.template;t.adapters.add("rotation",(e,i)=>{let r=xa(i.uid,"isGuide")!==!0?mh(s.uid,"rotation")??0:e??0;return t.set("centerX",r===0?Oe:ne),r})}function mS(s){if(s?.chart!==void 0){let t=s.get("renderer");if(se(s.chart.uid,"config")?.axes?.[0].labels!==void 0&&t.labels.length>1){let e=t.labels.getIndex(0)?.get("rotation"),i=0;t.labels.each(a=>{if(xa(a.uid,"isGuide")!==!0&&a.width()>0){let n=e===Y.rotatedAxisLabel.rotation?Math.sqrt(a.innerHeight()**2+a.innerWidth()**2):a.innerWidth();n>i&&(i=n)}});let r=RL(s)>=i+5;if(!r&&e===0||r&&e===Y.rotatedAxisLabel.rotation){let a=r?Y.axisLabel.rotation:Y.rotatedAxisLabel.rotation;t.labels.template.setAll({rotation:a,centerX:r?Oe:ne,centerY:vr,paddingTop:r?Y.axisLabel.paddingTop:Y.rotatedAxisLabel.paddingTop,paddingLeft:r?Y.axisLabel.paddingLeft:Y.rotatedAxisLabel.paddingLeft,paddingRight:r?Y.axisLabel.paddingRight:Y.rotatedAxisLabel.paddingRight}),dd(s.uid,{rotation:a})}}}}function $A(s){let t=s.get("renderer");gX(s),t.labels.template.setAll({oversizedBehavior:"hide"}),s instanceof Mi||(t.labels.template.setAll({multiLocation:.5}),t.ticks.template.setAll({multiLocation:.5})),s.events.on(_i.BoundsChanged,()=>mS(s)),s.events.on(_i.DataValidated,()=>mS(s)),mS()}function DA(s){if(s&&se(s.chart?.uid??Number.NaN,"config")?.axes?.[0].labels?.visible!==!1){let t=0;s.dataItems.forEach((e,i)=>{let r=e.get("label");r!==void 0&&xa(r.uid,"isGuide")!==!0&&r.getText()!==void 0&&r.width()>0&&i%2===0&&r.innerHeight()>t&&(t=r.innerHeight())}),t=Math.round(t),t>0&&(s.dataItems.filter(e=>{let i=e.get("tick"),r=e.get("label");return i!==void 0&&r!==void 0&&xa(r.uid,"isGuide")!==!0&&r.getText()!==void 0&&r.width()>0}).forEach((e,i)=>{let r=e.get("tick"),a=e.get("label"),n=i%2===1;r&&r.set("length",n?t+5:Y.axisTickLength),a&&a.set("dy",n?t:0)}),t&&s.get("renderer").labels.template.get("paddingBottom")!==t+5&&s.get("renderer").labels.template.set("paddingBottom",t+5))}}function yX(s){s.get("renderer").labels.template.set("oversizedBehavior","wrap"),s.events.on(_i.BoundsChanged,()=>DA(s)),DA(s)}function vX(s){s.get("renderer").labels.template.setAll({oversizedBehavior:"wrap",maxWidth:Y.yAxisLabelMaxWidth,textAlign:"end"})}function bX(s){let{axis:t,horizontalAxisLabelsBehavior:e,verticalAxisLabelsBehavior:i,axisLabelsBehaviorChanged:r,labelConfig:a,chartType:n}=s,o=t.get("renderer");if(!(o instanceof us))if(bv(o)&&r?.[0]===!0)switch(n===M.HistogramSeries&&e===void 0?Ci.Hide:e){case Ci.Hide:break;case Ci.Stagger:yX(t),TA(t,2);break;case Ci.Wrap:TA(t);break;case Ci.Rotate:$A(t);break;default:a.content.angle!==null&&a.content.angle===void 0&&$A(t);break}else WH(o)&&i!==Ci.Hide&&vX(t)}function xX(s){let{renderer:t,axisConfig:e,labelConfig:i}=s;switch(e.labelsOrientation){case Mv.Horizontal:t.labels.template.setAll({textType:"adjusted"}),t.labels.template.remove("radius");break;case Mv.Radial:t.labels.template.setAll({textType:"radial",radius:35}),i.content.verticalAlignment="middle";break;default:t.labels.template.setAll({textType:"circular"}),t.labels.template.remove("radius")}}function _X(s){let{axis:t,axisConfig:{labels:e},horizontalAxisLabelsBehavior:i,verticalAxisLabelsBehavior:r,axisLabelsBehaviorChanged:a,chartType:n}=s,o={...e},l=t.get("renderer"),h=l?.get("opposite");bv(l)?(o.content.horizontalAlignment="center",o.content.verticalAlignment=h?"bottom":"top"):(o.content.horizontalAlignment=h?"left":"right",o.content.verticalAlignment="middle"),l instanceof us?xX({renderer:l,axisConfig:s.axisConfig,labelConfig:e}):o.content.angle=o.content.angle??l.labels.template.get("rotation"),Wa({label:l.labels.template,labelConfig:o}),bX({axis:t,horizontalAxisLabelsBehavior:i,verticalAxisLabelsBehavior:r,labelConfig:e,axisLabelsBehaviorChanged:a,chartType:n})}function SX(s){let{axis:t,isHorizontalAxis:e,label:i}=s,{chart:r}=t;if(r){let a=e?"width":"height",n=e?wt.XAxisTitle:wt.YAxisTitle;Oo({chart:r,label:i,labelType:n}),t.onPrivateDebounced(a,()=>Oo({chart:r,label:i,labelType:n}),Y.debounceTime)}}var xv="arcgis_charts_title_container",xC="arcgis_charts_subtitle_container",_v="arcgis_charts_footer_container",VL="arcgis_charts_title",NL="arcgis_charts_subtitle",EL="arcgis_charts_footer",Qs="arcgis_charts_legend_container",mn="arcgis_charts_legend_title",AS="arcgis_charts_axis_title_id";function CX(s,t){let e=t??null;if(t!=null){let i=s.xAxes.getIndex(0),r=se(s.uid,"config"),a=i.get("min")??r?.axes?.[0].minimum??Y.gauge.axisMinimum,n=i.get("max")??r?.axes?.[0].maximum??Y.gauge.axisMaximum;t<a?e=a:t>n&&(e=n)}return e??void 0}function wX(s){let{root:t}=s,e=Do.new(t,{radius:nt(100)}),i=s.makeDataItem({value:0,bullet:nh.new(t,{sprite:e})});return s.createAxisRange(i),i.get("grid")?.set("visible",!1),i.get("tick")?.set("visible",!1),e}function PX(s){let{chart:t,axis:e,needleConfig:i,gaugeValue:r}=s,a=e.axisRanges.values.find(o=>o.get("bullet")?.get("sprite")instanceof Do),n=a?.get("bullet")?.get("sprite");if(a&&n instanceof Do){let{startWidth:o,endWidth:l,innerRadius:h}=Y.gaugeNeedle;gh({root:e.root,element:n.hand,fillSymbol:i?.symbol}),gh({root:e.root,element:n.pin,fillSymbol:i?.symbol}),a.set("value",CX(t,r)),n.pin.set("visible",i?.displayPin===!0),n.setAll({visible:i?.visible??!0,innerRadius:nt(i?.innerRadius??h),bottomWidth:i?.startWidth??o,topWidth:i?.endWidth??l})}}function TX(s,t){let e=Number.isFinite(t?.innerRadius)?t?.innerRadius:Y.gauge.innerRadius;typeof e=="number"&&Number.isFinite(e)&&s.set("innerRadius",nt(e))}function $X(s,t){let e=Number.isFinite(t?.startAngle)?t?.startAngle:Y.gauge.startAngle,i=Number.isFinite(t?.endAngle)?t?.endAngle:Y.gauge.endAngle;typeof e=="number"&&Number.isFinite(e)&&s.set("startAngle",e),typeof i=="number"&&Number.isFinite(i)&&s.set("endAngle",i)}function DX(s){let{chart:t,chartConfig:e,queryObject:i,data:r,xAxisLabelFormatter:a,utilsStrings:n,errorStrings:o}=s,{axes:l}=e,h=l?.[0],u=t.xAxes.getIndex(0);if(u instanceof Nt&&u.get("renderer")instanceof us&&h!==void 0){let c=u,{needle:d}=h;TX(t,e),$X(t,e),E1(h),_C({chartConfig:e,axis:u,axisConfig:h,axisConfigIndex:0,externalAxisLabelFormatter:a,utilsStrings:n,errorStrings:o,queryObject:i});let p=sb({chartData:r!==void 0&&"dataItems"in r?r.dataItems:void 0,chartConfig:e});PX({chart:t,axis:c,needleConfig:d,gaugeValue:p})}}function kX(s){let{chart:t,axesConfig:e,errorStrings:i}=s,{root:r}=t;yh({chartType:M.GaugeSeries,axesConfig:e,errorStrings:i});let a=t.xAxes.push(Nt.new(r,{min:0,max:100,renderer:us.new(r,{})}));wX(a),ML(a)}function AX(s){let{chart:t,chartConfig:e,axisLabelsBehaviorChanged:i,sortChanged:r,data:a,dataWasUpdated:n,axesInitializationNeeded:o,yAxisLabelFormatter:l,xAxisLabelFormatter:h,guideTooltipFormatter:u,utilsStrings:c,errorStrings:d,queryObject:p}=s,{horizontalAxisLabelsBehavior:f,verticalAxisLabelsBehavior:m,axes:g}=e,y=M.HistogramSeries,v=t.xAxes.getIndex(0),b=t.yAxes.getIndex(0);yh({chartType:y,axesConfig:g,errorStrings:d}),[{axis:v,axisConfig:g?.[0],externalAxisLabelFormatter:h},{axis:b,axisConfig:g?.[1],externalAxisLabelFormatter:l}].forEach((x,_)=>{let{axis:w,axisConfig:C,externalAxisLabelFormatter:P}=x;w!==void 0&&!w.isDisposed()&&C!==void 0&&_C({axis:w,data:a,dataWasUpdated:n,axesInitializationNeeded:o,sortChanged:r,axisConfig:C,axisConfigIndex:_,horizontalAxisLabelsBehavior:f,verticalAxisLabelsBehavior:m,axisLabelsBehaviorChanged:i,utilsStrings:c,chartConfig:e,externalAxisLabelFormatter:P,guideTooltipFormatter:u,errorStrings:d,queryObject:p})}),Zy(t,a)}function LX(s){let{chart:t,axesConfig:e,x:i,errorStrings:r,queryObject:a}=s,{root:n}=t,o=M.HistogramSeries;yh({chartType:o,axesConfig:e,errorStrings:r});let l={root:n,x:i,chartType:o,queryObject:a,errorStrings:r},h=e?.[0]?.valueFormat,u=e?.[1]?.valueFormat;if(h!==void 0&&u!==void 0){let c=dh({...l,axes:t.xAxes,valueFormat:h,axisRenderer:xr.new(n,{}),isXAxis:!0,x:i}),d=dh({...l,axes:t.xAxes,valueFormat:h,axisRenderer:xr.new(n,{}),isAxisForHistogramOverlaySeries:!0,isXAxis:!0,x:i});dh({...l,axes:t.yAxes,valueFormat:u,axisRenderer:js.new(n,{}),isXAxis:!1,x:i}),c&&(c.get("renderer").grid.template.set("location",0),c.get("renderer").ticks.template.set("location",0),c.get("renderer").labels.template.set("location",0)),d&&(d.set("visible",!1),d.get("renderer").grid.template.set("visible",!1),d.get("renderer").ticks.template.set("visible",!1),d.get("renderer").labels.template.set("visible",!1))}}function FX(s){return s.component instanceof Bi}function BL(s){return s.component instanceof yt||s.component instanceof Zt}function Jy(s,t){return s===t||s!=null&&t!=null&&String(s)===String(t)}function OX(s){let t;return s instanceof Nn?t=s:s.parent instanceof Nn&&(t=s.parent),t}function MX(s){let{originalEvent:t}=s,e="ctrlKey"in t?t.ctrlKey:!1,i="metaKey"in t?t.metaKey:!1;return!!(e||i)}function Qy(s,t){return s.get(t)}function jL(s){let t=s.get("graphics");return t instanceof Fi?t:void 0}function IX(s){let{dataContext:t}=s.dataItem??{};return t!=null&&typeof t=="object"?t:void 0}function Ey(s){return s!==void 0&&(fn(s.uid,"selected")??!1)}function WL(s){return IX(s)?.[Ku]===!0}function RX(s){let{chart:t,selectionField:e,selectionKey:i}=s,r=!1,a=!0,n=!1;return t.series.each(o=>{!o.isHidden()&&!zu(o)&&!zn(o)&&(o instanceof yt?o.dataItems.forEach(l=>{if(BL(l)){let h=Jy(Qy(l,e),i),u=l.bullets?.[0]?.get("sprite");h?(r=!0,Ey(u)||(a=!1)):Ey(u)&&(n=!0)}}):o instanceof Zt&&o.dataItems.forEach(l=>{let h=jL(l);h!==void 0&&!WL(h)&&(Jy(Qy(l,e),i)?(r=!0,Ey(h)||(a=!1)):Ey(h)&&(n=!0))}))}),{hasMatching:r,allMatchingSelected:a,hasNonMatchingSelected:n}}function VX(s){s?.selection!==void 0&&ri(s.selection,!1)}function NX(s){s.labels.template.setAll({cursorOverStyle:"pointer",interactive:!0}),s.labels.template.setup=t=>{t.set("background",xi.new(t.root,{fill:t.root.interfaceColors.get("alternativeBackground"),fillOpacity:0}))}}function EX(s,t){NX(s),s.labels.template.events.on(_i.Click,t)}function BX(s){let{axis:t,queryObject:e,errorStrings:i}=s,r=t.get("renderer");EX(r,a=>{let{chart:n}=t,o=OX(a.target),l,h;if(o?.dataItem instanceof cr&&FX(o.dataItem)){let u=o.dataItem.get("category");u!==void 0&&(l=r instanceof xr?"categoryX":"categoryY",h=u)}if(l!==void 0&&h!==void 0&&n instanceof Ut&&mC(n.uid)){let u=MX(a),c=RX({chart:n,selectionField:l,selectionKey:h}),d=c.hasMatching&&c.allMatchingSelected,p=!u&&d&&!c.hasNonMatchingSelected;n.series.each(f=>{!f.isHidden()&&!zu(f)&&!zn(f)&&(f instanceof yt?f.dataItems.forEach(m=>{if(BL(m)){let g=Jy(Qy(m,l),h),y=m.bullets?.[0]?.get("sprite");u?g&&pr({element:y,selected:!d}):pr(p?{element:y,selected:!1}:{element:y,selected:g})}}):f instanceof Zt&&f.dataItems.forEach(m=>{let g=jL(m);if(g!==void 0&&!WL(g)){let y=Jy(Qy(m,l),h);u?y&&pr({element:g,selected:!d}):pr(p?{element:g,selected:!1}:{element:g,selected:y})}}))}),VX(n.get("cursor")),Af({chart:n,selectionSource:Ti.SelectionByClick,queryObject:e,errorStrings:i})}})}function zL(s,t){return t?`${AS}_x_${s.uid}`:`${AS}_y_${s.uid}`}function LS(s,t){let e=se(s.chart?.uid??Number.NaN,"config"),i=zr(e)?1:0,r=e?.axes?.[i]?.title?.content?.verticalAlignment,a=eX(s),n=a;switch(r){case"baseline":case"middle":n=a/2;break;case"bottom":n=Math.min(a,0);break}t?.set("dy",n)}function jX(s){s instanceof Nt&&(s.onPrivate("min",xA),s.onPrivate("max",xA))}function WX(s){let{axis:t,isHorizontalAxis:e,isSecondaryYAxis:i}=s,{root:r}=t,a=e?{...Y.xAxisTitleLabel,verticalCenter:"top"}:Y.yAxisTitleLabel,n=nd({root:r,id:zL(t,e),defaults:a});return t.get("renderer")instanceof js&&i!==!0||t.get("renderer")instanceof xr&&i===!0?t.children.unshift(n):t.children.push(n),e&&i!==!0&&(t.events.onDebounced(_i.BoundsChanged,()=>LS(t,n),Y.debounceTime),t.events.onDebounced(_i.DataValidated,()=>LS(t,n),Y.debounceTime),SX({axis:t,isHorizontalAxis:e,label:n})),!e&&t.chart&&Iu({chart:t.chart,label:n,labelType:wt.YAxisTitle}),n}function dh(s){let{root:t,axes:e,isXAxis:i,valueFormat:r,axisRenderer:a,isSecondaryYAxis:n=!1,chartType:o,x:l,isAxisForHistogramOverlaySeries:h,queryObject:u,errorStrings:c}=s,d;if(Dh({isXAxis:i,chartType:o,valueFormat:r,isAxisForHistogramOverlaySeries:h})&&!n){let p;switch(o){case M.HeatSeries:p=i?Hi.xField:Hi.yField;break;case M.HistogramSeries:p=Qu.Start;break;case M.BoxPlotSeries:p=l;break;default:p=Y.xAxisField;break}p&&(d=e.push(Bi.new(t,{categoryField:p,renderer:a})))}else if(ks(r))d=e.push(Mi.new(t,{strictMinMax:!0,baseInterval:{timeUnit:"day",count:1},renderer:a}));else if(Xi(r)&&(d=e.push(Nt.new(t,{strictMinMax:!0,renderer:a})),n&&d instanceof Nt)){let p=e.getIndex(0);p instanceof Nt&&d.set("syncWithAxis",p)}if(d!==void 0&&!h){QH(d),OL(t,d);let p=o===M.HistogramSeries||o===M.HeatSeries?0:.1,f=o===M.HistogramSeries||o===M.HeatSeries?1:.9;d.get("renderer").setAll({cellStartLocation:p,cellEndLocation:f}),o===M.HeatSeries&&(a instanceof xr||a instanceof js)&&a.setAll({layer:Y.zIndexes.defaultLayer30}),ML(d),jX(d),bv(d.get("renderer"))?d.get("renderer").labels.template.set(n?"paddingBottom":"paddingTop",Y.axisLabelSpacing.horizontalAxisLabelPaddingTop):a instanceof js&&d.get("renderer").labels.template.set(n?"paddingLeft":"paddingRight",Y.axisLabelSpacing.verticalAxisLabelSidePadding);let m=d.get("renderer").labels.template;d instanceof Bi&&o!==M.HistogramSeries?BX({axis:d,queryObject:u,errorStrings:c}):m.set("cursorOverStyle","default")}return d}function zX(s){let{axis:t,data:e,chartConfig:i,dataWasUpdated:r,axesInitializationNeeded:a,sortChanged:n,heatChartHideEmptyRowsAndColumnsChanged:o}=s;if(e&&(r||a||n||o)){let l=Xa(e);if(vn(i)){let h=XW(t),u=e?.heatChartAxesData,c=h===Hi.xField?u?.xAxisData:u?.yAxisData;t.data.setAll(c??[])}else t.data.setAll(l??[])}}function HX(s){let{axis:t,axisTitleConfig:e,isSecondaryYAxis:i}=s,r=t.get("renderer"),{chart:a}=t,n=bv(r),o=pi({childId:zL(t,n),parent:t,useChildId:!0})??WX({axis:t,isHorizontalAxis:n,isSecondaryYAxis:i});if(o instanceof Lt){let l=n?{...Y.xAxisTitleLabel,verticalCenter:"top"}:Y.yAxisTitleLabel;if(Wa({label:o,labelConfig:e,defaults:l}),n&&i!==!0&&LS(t,o),a){let h={chart:a,label:o,labelType:n?wt.XAxisTitle:wt.YAxisTitle};Oo(h)}}}function _C(s){let{axis:t,data:e,dataWasUpdated:i,axesInitializationNeeded:r,sortChanged:a,heatChartHideEmptyRowsAndColumnsChanged:n,axisConfig:o,axisConfigIndex:l,timeIntervalInfo:h,horizontalAxisLabelsBehavior:u,verticalAxisLabelsBehavior:c,axisLabelsBehaviorChanged:d,anyGuideAboveChanged:p,isNonAggregatedChart:f,isSecondaryYAxis:m,chartConfig:g,externalAxisLabelFormatter:y,guideTooltipFormatter:v,utilsStrings:b,errorStrings:x,queryObject:_}=s,{visible:w,lineSymbol:C,title:P,labels:D,isLogarithmic:$,grid:A,displayCursorTooltip:T,displayZeroLine:I,valueFormat:N,guides:B,tickSpacing:j,dateBaseInterval:z}=o,{root:K}=t,V=Ie(g.series),E=rs(g),re=zr(g),{chart:X}=t,Z=X?se(X.uid,"config"):void 0,ue=X?se(X.uid,"options"):void 0,Le=ms(_),we=Ws(Le).find(Wt=>Wt.name===Z?.series?.[0]?.x),Te=ww(we),Ze=Uf({chartConfig:g,queryObject:_,options:ue}),Ve=Mh(g.series[0])?g.series[0].temporalBinning?.outTimeZone:void 0,kt=t.get("renderer");dd(t.uid,{zeroGridLine:{displayZeroLine:I,strokeWidth:A?.width??Y.lineWidth,visible:A!==void 0}}),zH({axis:t,isLogarithmic:$,axisConfigIndex:l}),BH({axis:t,isXAxis:Hu(t.get("renderer"),re),chartType:V,formatOptions:N,isNonAggregatedChart:f,overridePercentMultiplication:E===hi.Stacked100,externalAxisLabelFormatter:y,isTimeOnlyField:Te,setTimeZone:Ze,outTimeZone:Ve,errorStrings:x}),EH({axis:t,isRotated:re,chartConfig:g}),YH({axis:t,timeIntervalInfo:h,dateBaseInterval:z,xFieldIsTimeOnly:Te}),Wn({element:kt,lineSymbol:{color:[...Y.color],...C??Cd()},visible:w}),Wn({element:kt.ticks.template,lineSymbol:C,visible:w}),Wn({element:kt.grid.template,lineSymbol:A,visible:w}),A===void 0&&(t.get("renderer").grid.template.set("strokeWidth",Y.lineWidth),t.markDirtyValues()),_X({axis:t,axisConfig:o,chartType:V,horizontalAxisLabelsBehavior:u,verticalAxisLabelsBehavior:c,axisLabelsBehaviorChanged:d}),HX({axis:t,axisTitleConfig:P,isSecondaryYAxis:m}),HH(t,o),mX({axis:t,chartType:V,labelConfig:D,horizontalAxisLabelsBehavior:u,isSecondaryYAxis:m,tickSpacing:j}),XH({root:K,axis:t,displayCursorTooltip:T}),pX({axis:t,guideConfigs:B,guideTooltipFormatter:v,anyGuideAboveChanged:p,utilsStrings:b}),zX({axis:t,data:e,chartConfig:g,dataWasUpdated:i,axesInitializationNeeded:r,heatChartHideEmptyRowsAndColumnsChanged:n,sortChanged:a})}function XX(s){let{chart:t,errorStrings:e,queryObject:i}=s,{root:r}=t,a=se(t.uid,"config");if(a){let{x:n}=a.series[0],o=zr(a),{axes:l}=a,h=Ie(a.series);yh({chartType:h,axesConfig:l,errorStrings:e});let u={root:r,x:n,chartType:h,queryObject:i,errorStrings:e},c=o?l?.[1]:l?.[0],d=o?l?.[0]:l?.[1],p=c?.valueFormat,f=d?.valueFormat;if(p!==void 0&&f!==void 0&&(dh({...u,axes:t.xAxes,valueFormat:p,axisRenderer:xr.new(r,{}),isXAxis:!o,x:n}),dh({...u,axes:t.yAxes,valueFormat:f,axisRenderer:js.new(r,{}),isXAxis:o,x:n}),l?.[2]!==void 0)){let m=o?xr:js;dh({...u,axes:o?t.xAxes:t.yAxes,valueFormat:l[2]?.valueFormat,axisRenderer:m.new(r,{opposite:!0}),isSecondaryYAxis:!0,isXAxis:o,x:n})}}}function YX(s){let{chart:t,chartType:e,axesConfig:i,x:r,errorStrings:a,queryObject:n}=s,{root:o}=t,l=i?.[0],h=i?.[1];if(yh({chartType:e,axesConfig:i,errorStrings:a}),l?.valueFormat!==void 0&&h?.valueFormat!==void 0){let u={root:o,x:r,chartType:e,queryObject:n,errorStrings:a};dh({...u,axes:t.xAxes,valueFormat:l.valueFormat,axisRenderer:us.new(o,{}),isXAxis:!0,x:r}),dh({...u,axes:t.yAxes,valueFormat:h.valueFormat,axisRenderer:sh.new(o,{}),isXAxis:!1,x:r})}}function HL(s){let{chart:t,chartConfig:e,errorStrings:i,queryObject:r}=s,{axes:a}=e,{x:n}=e.series[0],o=Ie(e.series);switch(t.xAxes.clear(),t.yAxes.clear(),o){case M.GaugeSeries:t instanceof Ks&&kX({chart:t,axesConfig:a,errorStrings:i});break;case M.HistogramSeries:LX({chart:t,axesConfig:a,x:n,errorStrings:i,queryObject:r});break;case M.HeatSeries:case M.BarSeries:case M.ComboLineAndBarSeries:case M.ScatterSeries:case M.LineSeries:case M.BoxPlotSeries:XX({chart:t,errorStrings:i,queryObject:r});break;case M.RadarSeries:t instanceof Ks&&YX({chart:t,axesConfig:a,chartType:o,x:n,errorStrings:i,queryObject:r});break}}function UX(s){let{chart:t,chartConfig:e,axisLabelsBehaviorChanged:i,sortChanged:r,anyGuideAboveChanged:a,data:n,dataWasUpdated:o,axesInitializationNeeded:l,heatChartHideEmptyRowsAndColumnsChanged:h,timeIntervalInfo:u,xAxisLabelFormatter:c,yAxisLabelFormatter:d,secondaryYAxisLabelFormatter:p,guideTooltipFormatter:f,utilsStrings:m,errorStrings:g,queryObject:y}=s,{horizontalAxisLabelsBehavior:v,verticalAxisLabelsBehavior:b,axes:x}=e,_=zr(e),w=Ie(e.series),C=se(t.uid,"isNonAggregatedChart"),P=t.xAxes.getIndex(0),D=t.yAxes.getIndex(0),$=t.xAxes.getIndex(1)??t.yAxes.getIndex(1);yh({chartType:w,axesConfig:x,errorStrings:g});let A=_?1:0,T=_?0:1,I=x?.[A],N=x?.[T];[{axis:P,axisConfig:I,externalAxisLabelFormatter:_?d:c,axisConfigIndex:A},{axis:D,axisConfig:N,externalAxisLabelFormatter:_?c:d,axisConfigIndex:T},{axis:$,axisConfig:x?.[2],externalAxisLabelFormatter:p,isSecondaryYAxis:!0,axisConfigIndex:2}].forEach(B=>{let{axis:j,axisConfig:z,axisConfigIndex:K,externalAxisLabelFormatter:V,isSecondaryYAxis:E}=B;j!==void 0&&!j.isDisposed()&&z!==void 0&&_C({axis:j,data:n,dataWasUpdated:o,axesInitializationNeeded:l,heatChartHideEmptyRowsAndColumnsChanged:h,sortChanged:r,timeIntervalInfo:u,axisConfig:z,axisConfigIndex:K,horizontalAxisLabelsBehavior:v,verticalAxisLabelsBehavior:b,axisLabelsBehaviorChanged:i,anyGuideAboveChanged:a,isNonAggregatedChart:C,isSecondaryYAxis:E,utilsStrings:m,chartConfig:e,externalAxisLabelFormatter:V,guideTooltipFormatter:f,errorStrings:g,queryObject:y})}),Zy(t,n)}function XL(s){let{chart:t,chartConfig:e}=s,i=Ie(e.series);i===M.GaugeSeries&&t instanceof Ks?DX(s):i===M.HistogramSeries?AX(s):UX(s)}function GX(s,t){let e=_t(Y.backgroundColor);t.set("background",xi.new(s,{fill:e.color,fillOpacity:e.opacity}))}function YL(s,t){let e=_t(t??Y.backgroundColor);s.get("background")?.setAll({fill:e.color,fillOpacity:e.opacity})}function UL(s,t){let e=Ie(t.series);return s instanceof Ut&&e!==M.GaugeSeries}function qX(s,t){let e=Y.cursorCrosshair.style,i={type:Pt.SLS,style:t?.style??e.style,color:t?.color??e.color,width:t?.width??e.width},r=s.get("cursor")?.lineX,a=s.get("cursor")?.lineY;Wn({element:r,lineSymbol:i}),Wn({element:a,lineSymbol:i})}function GL(s){let{root:t,chart:e,config:i,queryObject:r,errorStrings:a}=s,n;return UL(e,i)&&(e instanceof Ks?n=e.set("cursor",ko.new(t,{})):n=e.set("cursor",hn.new(t,{clickTolerance:70})),PH({chart:e,queryObject:r,errorStrings:a})),n}function qL(s){let{root:t,chart:e,cursorCrosshair:i,config:r,queryObject:a,errorStrings:n}=s;if(UL(e,r)){let o=e.get("cursor")??GL({root:t,chart:e,config:r,queryObject:a,errorStrings:n});o&&(qX(e,i?.style),o.lineX.set("visible",i?.verticalLineVisible??Y.cursorCrosshair.verticalLineVisible),o.lineY.set("visible",i?.horizontalLineVisible??Y.cursorCrosshair.horizontalLineVisible))}}function KX(s){let{chart:t,enabled:e}=s,i=e?"pointer":"default";t instanceof Kr&&t.series.each(r=>{switch(!0){case r instanceof Zt:r.columns.template.set("cursorOverStyle",i);break;case r instanceof yt:let a=Jt(r.uid,"bulletTemplate");a!==void 0&&!zn(r)&&a.set("cursorOverStyle",i);break;case r instanceof Gi:r.slices.template.setAll({cursorOverStyle:i});break}})}function ZX(s){let{chart:t,actionMode:e,cursorRange:i}=s,r=se(t.uid,"isRotated"),a=se(t.uid,"config"),n=Ie(a?.series),o=n===M.ScatterSeries,l=(n===M.LineSeries||n===M.RadarSeries)&&Xi(a?.axes?.[0]?.valueFormat),h=(n===M.LineSeries||n===M.RadarSeries)&&Un(a?.axes?.[0]?.valueFormat),u=(n===M.LineSeries||n===M.RadarSeries)&&ks(a?.axes?.[0]?.valueFormat),c,d=!1,p=e??se(t.uid,"actionMode")??Y.actionMode;if(se(t.uid,"filterBySelection")===!0)c=yi.None,d=!1;else if(i!==void 0)c=ZA({actionMode:p,cursorRange:i,isRotated:r});else switch(p){case vt.Zoom:o||l||u?c=yi.ZoomXY:c=r===!0?yi.ZoomY:yi.ZoomX,d=!1;break;case vt.MultiSelection:case vt.MultiSelectionWithCtrlKey:h?c=r===!0?yi.SelectY:yi.SelectX:c=yi.SelectXY,d=!0;break;case vt.MonoSelection:c=yi.None,d=!0;break;case vt.None:c=yi.None,d=!1;break}t instanceof Ut&&t.get("cursor")!==void 0&&c!==void 0&&t.get("cursor")?.set("behavior",c),KX({chart:t,enabled:d})}function JX(s,t){t!==void 0&&(t.width!==void 0&&s.set("width",hA(t.width)),t.height!==void 0&&s.set("height",hA(t.height)),t.paddingTop!==void 0&&s.set("paddingTop",t.paddingTop),t.paddingBottom!==void 0&&s.set("paddingBottom",t.paddingBottom))}function FS(s){let{root:t,defaults:e,parent:i,id:r,index:a}=s,n=De.new(t,{});return JX(n,e),i!==void 0&&i.children.insertIndex(a??i.children.length,n),r!==void 0&&n.set("id",r),n}function OS(s,t){t?s.hide():s.show()}function QX(s,t){let e=FS({root:s,defaults:Y.headerContainer,parent:t,id:ds(xv,t.uid),index:0}),i=FS({root:s,defaults:Y.headerContainer,parent:t,id:ds(xC,t.uid),index:1}),r=nd({root:s,parent:e,defaults:Y.titleLabel,id:ds(VL,e.uid)}),a=nd({root:s,parent:i,defaults:Y.subtitleLabel,id:ds(NL,i.uid)});Iu({chart:t,label:r,labelType:wt.ChartTitle}),Iu({chart:t,label:a,labelType:wt.ChartSubTitle})}function KL(s,t){let{title:e,subtitle:i}=t??{},r=se(s.uid,"config"),a=r?.legend?.visible!==!1&&r?.legend?.position===ze.Top?0:Y.headerContainer.paddingBottom??0,n=pi({childId:xv,parent:s});if(n!==void 0){n.set("paddingBottom",a);let l=pi({childId:VL,parent:n});l!==void 0&&(Wa({label:l,labelConfig:e,defaults:Y.titleLabel}),Oo({chart:s,label:l,labelType:wt.ChartTitle}),OS(n,l.get("disabled")===!0||(e?.content.text??"")===""))}let o=pi({childId:xC,parent:s});if(o!==void 0){o.set("paddingBottom",a),n!==void 0&&n.set("paddingBottom",Y.titleAndSubtitlePaddingBottom);let l=pi({childId:NL,parent:o});l!==void 0&&(Wa({label:l,labelConfig:i,defaults:Y.subtitleLabel}),Oo({chart:s,label:l,labelType:wt.ChartSubTitle}),OS(o,l.get("disabled")===!0||(i?.content.text??"")===""))}}function e5(s){let{root:t}=s,e=FS({root:t,defaults:Y.footerContainer,parent:s,id:ds(_v,s.uid)}),i=nd({root:t,parent:e,id:ds(EL,e.uid)});Iu({chart:s,label:i,labelType:wt.ChartFooter})}function ZL(s,t){let e=pi({childId:_v,parent:s});if(e!==void 0){let i=pi({childId:EL,parent:e});i!==void 0&&(Wa({label:i,labelConfig:t,defaults:Y.footer}),Oo({chart:s,label:i,labelType:wt.ChartFooter}),OS(e,i.get("disabled")||(t?.content.text??"")===""))}}function t5(s){let{dataLabel:t,series:e,externalDataLabelFormatter:i}=s;t.adapters.remove("text"),t.adapters.remove("html");let r=i!==void 0?"html":"text";t.adapters.add(r,(a,n)=>{let o=a??"",l=n.dataItem,h=Jt(e.uid,"heatChartDataLabelFormatter"),u=se(e.chart?.uid??NaN,"config");if(h!==void 0&&l){let c=l.get("value"),d=l.get("categoryX"),p=l.get("categoryY");c===null?o=u?.series[0].emptyCells?.text??Y.heatChart.emptyCells?.text??"":c!==void 0&&(o=h(c,d,p))}return r==="html"?wr(o):o})}function i5(s){let{numberFormatter:t}=s;return e=>t.format(e)}function r5(s){let{series:t,externalDataLabelFormatter:e}=s;t.bullets.push(()=>{let i=se(t.chart?.uid??Number.NaN,"config")?.series?.[0]?.dataLabels??s.dataLabelsConfig,r=Ns.new(t.root,{sprite:Lt.new(t.root,{text:"{value}",populateText:!0,centerY:ne,centerX:vr,paddingBottom:0,paddingTop:0,paddingRight:0,paddingLeft:0,fill:_t(i?.content.color).color,fontSize:i?.content.font?.size,oversizedBehavior:"hide"})}),a=r.get("sprite");if(a){let n=a;t5({dataLabel:n,series:t,externalDataLabelFormatter:e}),dL({...s,dataLabelsConfig:i,dataLabel:n,isHeatChart:!0,dataLabelFormatter:i5}),n.set("oversizedBehavior","hide"),n.set("maxWidth",void 0),n.set("maxHeight",void 0)}return r})}function s5(s){let{series:t,dataLabelsConfig:e}=s,i=e&&e?.visible!==!1;t.bullets.hasIndex(0)&&dC(t,0),i&&r5(s)}var Zr={nameField:"name",fillField:"fill",strokeField:"stroke",fillOpacityField:"fillOpacity",strokeOpacityField:"strokeOpacity"};function ev(s){let t={type:Pt.SLS,color:[0,0,0,0],width:0},e=s?.color?s:t,i=s?.color?_t(s.color).color:void 0,r=s?.color?_t(s.color).opacity:void 0;return{outlineSymbol:e,outlineColor:i,outlineOpacity:r}}function a5(s){let{root:t,xAxis:e,yAxis:i,options:r,chartConfig:a,queryObject:n,errorStrings:o}=s,l=Zt.new(t,{calculateAggregates:!0,stroke:_t(Y.backgroundColor).color,clustered:!1,turboMode:!0,xAxis:e,yAxis:i,categoryXField:Hi.xField,categoryYField:Hi.yField,valueField:Hi.valueField});return l.columns.template.setAll({tooltipText:`x: {${Hi.xField}}
|
|
44
44
|
y: {${Hi.yField}}
|
|
45
|
-
Value: {${Hi.valueField}}`,width:ne,height:ne}),l.columns.template.adapters.add("cursorOverStyle",(h,u)=>u.dataItem?.dataContext?.[Ku]?"auto":h),bL(l,r?.tooltipFormatter),vv(l,a),Or(l.columns.template,r?.selectionTheme),Hn({element:l.columns.template,series:l,queryObject:n,errorStrings:o}),l}function n5(s,t){t?.dataItems&&s.data.setAll(t.dataItems)}function o5(s){let{columnSeries:t,seriesConfig:e}=s,{gradientHeatRules:i}=Y.heatChart,{gradientRules:r,heatRulesType:a,gridLine:n}=e,o=e.emptyCells?.symbol??Y.heatChart.emptyCells?.symbol,l=r?.colorList?.[0]??i.minColor,h=r?.colorList?.[1]??i.maxColor,u=r?.outsideRangeLowerColor??i.outsideRangeLowerColor,c=r?.outsideRangeUpperColor??i.outsideRangeUpperColor,{minValue:d,maxValue:p}=r??{},{color:f,opacity:m}=_t(l),{color:g,opacity:y}=_t(h),v=_t(u),b=_t(c);t.set("heatRules",[{target:t.columns.template,dataField:"value",key:"fill",customFunction:(x,_,w,C)=>{let P=x.dataItem?.dataContext;if(x instanceof Ke){let D,$,A,T=!1;if(a===wh.Renderer){let I=P?.[Ee.rendererSymbolField];if(ec(I)){A=Wi(I);let{outlineSymbol:N}=ev(n);A.outline=N}else T=!0}if((!Number.isFinite(C)||T)&&o){A=Wi(o);let{outlineSymbol:I}=ev(n);A.outline=I}if(A){let I=gh({root:t.root,element:x,fillSymbol:A});Sf(x,I)}else typeof d=="number"&&C<d?{color:D,opacity:$}=v:typeof p=="number"&&C>p?{color:D,opacity:$}=b:_===w?(D=f,$=m):(D=qe.interpolate((C-_)/(w-_),f,g,"rgb"),$=m+(C-_)/(w-_)*(y-m)),D&&x.set("fill",D),$!==void 0&&x.set("fillOpacity",$)}}}])}function l5(s,t){t?.color?Wn({element:s.columns.template,lineSymbol:t}):s.columns.template.setAll({strokeOpacity:0,strokeWidth:0})}function h5(s){let{series:t,data:e,dataWasUpdated:i,sortChanged:r,timeZoneChanged:a,seriesWereReinitialized:n,seriesConfig:o,autoInverseDataLabelTextColor:l,options:h,queryObject:u,chartConfig:c}=s,d=i===!0||r===!0||a||n===!0;t.set("id",o.id),ri(t,o.visible),ld(t,!1),Or(t.columns.template,h?.selectionTheme),Lz(s),l5(t,o.gridLine),o5({columnSeries:t,seriesConfig:o}),d&&n5(t,e),s5({seriesType:M.HeatSeries,series:t,seriesConfig:o,dataLabelsConfig:o.dataLabels,autoInverseDataLabelTextColor:l,externalDataLabelFormatter:h?.dataLabelFormatter});let{chart:p}=t;p&&u5({seriesConfig:o,queryObject:u,chartConfig:c,chart:p}),h?.interactionsDisabled&&ld(t,!0)}function u5(s){let{seriesConfig:t,queryObject:e,chartConfig:i,chart:r}=s,a;if(t.heatRulesType===wh.Renderer)a={heatRulesType:wh.Renderer,seriesColors:QL({queryObject:e,chartConfig:i,forLegend:!1})};else{let{gradientHeatRules:n}=Y.heatChart,{gradientRules:o}=t;a={heatRulesType:wh.Gradient,seriesColors:{startColor:o?.colorList?.[0]??n.minColor,endColor:o?.colorList?.[1]??n.maxColor}}}Pa({chartId:r.get("id"),data:a,colorMatchApplied:!1,htmlContainer:r.root.dom})}function JL(s,t){let e="",i,r,a;return s&&typeof s=="object"&&(e="label"in s&&typeof s.label=="string"?s.label:"",i="symbol"in s&&s.symbol&&typeof s.symbol=="object"&&"color"in s.symbol&&Array.isArray(s.symbol.color)?s.symbol.color:void 0,a="symbol"in s&&s.symbol&&typeof s.symbol=="object"&&"outline"in s.symbol&&Array.isArray(s.symbol.outline)?s.symbol.outline:void 0,t&&(Array.isArray(i)&&({color:i,opacity:r}=_t(i)),Array.isArray(a)&&(a=_t(a).color))),{legendItemLabel:e,legendItemColor:i,legendItemColorOpacity:r,legendItemStrokeColor:a}}function c5(s){let t,{outlineColor:e,outlineOpacity:i,dataItems:r,valueField:a,classBreakInfo:n,classBreakIndex:o,numberOfClassBreaks:l,evaluateUpTo:h}=s,{legendItemLabel:u,legendItemColor:c,legendItemColorOpacity:d}=JL(n,!0);if(n&&typeof n=="object"&&c&&!Array.isArray(c)){let p=!0;if(r&&a){let f="classMinValue"in n&&typeof n.classMinValue=="number"?n.classMinValue:-1/0,m="classMaxValue"in n&&typeof n.classMaxValue=="number"?n.classMaxValue:1/0,g=o===l-1;p=r.some(y=>{let v=y[a];return g||h?typeof v=="number"&&v>=f&&v<=m:typeof v=="number"&&v>=f&&v<m})}p&&(t={[Zr.nameField]:u,[Zr.fillField]:c,[Zr.strokeField]:e,[Zr.fillOpacityField]:d,[Zr.strokeOpacityField]:i})}return t}function d5(s){let t,{legendItemLabel:e,legendItemColor:i,legendItemStrokeColor:r}=JL(s,!1);return Array.isArray(i)&&(!r||Array.isArray(r))&&(t={label:e,symbol:{type:Pt.SFS,style:Wr.Solid,color:i,outline:{type:Pt.SLS,color:r??i}}}),t}function QL(s){let{queryObject:t,chartConfig:e,forLegend:i,series:r}=s,a,n=ms(t),o=e.series?.[0],l=e.chartRenderer??n?.renderer?.toJSON(),{outlineColor:h,outlineOpacity:u}=ev(o?.gridLine);if((l?.type==="classBreaks"||l?.type==="class-breaks")&&"classBreakInfos"in l){let c=r?.data.values,d=r?.get("valueField")??Hi.valueField,p=l.classBreakInfos?.[0],f=p?p.classMinValue===p.classMaxValue:!1;a=l.classBreakInfos.map((m,g)=>{let y;return i?y=c5({outlineColor:h,outlineOpacity:u,dataItems:c,valueField:d,classBreakInfo:m,classBreakIndex:g,numberOfClassBreaks:l.classBreakInfos.length,evaluateUpTo:f}):y=d5(m),y}).filter(Boolean)}return a}function p5(s){let t=s.yAxes.getIndex(0);if(t){let e=pi({childId:`${AS}_y_${t.uid}`,parent:t});e instanceof Lt&&e.set("dx",0)}}function f5(s,t){let e=Y.axisLabelSpacing.verticalAxisLabelSidePadding,i=Y.heatChart.legend.legendPadding+e;t.set("marginRight",i),s.leftAxesContainer.setAll({paddingLeft:e});let r=s.leftAxesContainer.children.values[0];r instanceof Bi&&r.set("paddingLeft",e)}function eF(s,t){let{root:e}=s,i=se(s.uid,"rtl")??!1,r=se(s.uid,"config")??t,a=r?.series[0],{start:n,end:o}=Sv(i,a),l=r?.legend?.position??Y.heatChart.legend.position,h=l===ze.Top||l===ze.Bottom;return In.new(e,{orientation:h?"horizontal":"vertical",startColor:n.color,endColor:o.color,visible:r?.legend?.visible,startOpacity:n.opacity,endOpacity:o.opacity})}function m5(s,t){let e=se(t.uid,"rtl")??!1,i=se(t.uid,"config");if(i?.series[0].type===M.HeatSeries){let r=i?.series[0],{start:a,end:n}=Sv(e,r);s.setAll({startColor:a.color,endColor:n.color,startOpacity:a.opacity,endOpacity:n.opacity})}}function Sv(s=!1,t){let e=Y.heatChart.gradientHeatRules,i=t.gradientRules?.colorList??[...s?[e.maxColor,e.minColor]:[e.minColor,e.maxColor]],{color:r,opacity:a}=_t(i[0]),{color:n,opacity:o}=_t(i[1]);return{start:{color:r,opacity:a},end:{color:n,opacity:o}}}function kA(s,t){let e=se(s.uid,"rtl")??!1,i=se(s.uid,"config")?.series[0],{start:r,end:a}=Sv(e,i);t.setAll({startColor:r.color,endColor:a.color})}function tF(s){let t=se(s.uid,"config");if(t?.series?.[0]?.type===M.HeatSeries&&t?.legend?.visible!==!1){let e=Y.heatChart.legend,i=t?.legend?.position??e.position,r=ds(Qs,s.uid),a,n=!1;switch(i){case ze.Top:a=s.topAxesContainer,n=!0;break;case ze.Bottom:a=s.bottomAxesContainer,n=!1;break;case ze.Left:a=s.leftAxesContainer,n=!0;break;case ze.Right:a=s.rightAxesContainer,n=!1;break;default:a=void 0}if(a!==void 0){let o=pi({childId:r,parent:a,useChildId:!0});if(o!==void 0){let{children:l}=a,h=l.indexOf(o);h!==-1&&(n&&h!==0?(l.removeValue(o),l.unshift(o),a.markDirty()):!n&&h!==l.length-1&&(l.removeValue(o),l.push(o),a.markDirty()))}}}}function iF(s){let{chart:t,legend:e,legendContainer:i}=s,{root:r}=t,a=se(t.uid,"config"),n=Y.heatChart.legend,o=a?.legend?.position??n.position,l,h,u,c=o===ze.Left||o===ze.Top,d=pi({childId:mn,parent:i}),p=a?.legend?a.legend.visible??!0:!1,f=a?.legend?.title?a.legend.title.visible??!0:!1,m=d instanceof Lt&&p&&f?d.height()>0?d.height():n.titleHeight:0,g=o===ze.Left||o===ze.Right;switch(e.setAll({orientation:g?"vertical":"horizontal",width:ne}),o){case ze.Left:i.setAll({layout:r.verticalLayout,paddingRight:n.legendPadding,width:n.width}),f5(t,i),l=t.leftAxesContainer;break;case ze.Right:i.setAll({layout:r.verticalLayout,paddingLeft:n.legendPadding,paddingRight:n.legendPadding,width:n.width}),t.rightAxesContainer.setAll({paddingRight:n.chartPadding}),l=t.rightAxesContainer;break;case ze.Top:u=n.chartPadding,i.setAll({layout:r.verticalLayout,paddingBottom:n.legendPadding,paddingTop:n.legendPadding,width:ne}),l=t.topAxesContainer;break;case ze.Bottom:{h=n.chartPadding,i.setAll({layout:r.verticalLayout,paddingTop:n.legendPadding,width:ne}),t.bottomAxesContainer.setAll({paddingBottom:n.legendPadding+m});let y=pi({childId:_v,parent:t});y instanceof De&&y.set("paddingBottom",n.chartPadding+m),l=t.bottomAxesContainer}break}p5(t),e.markDirty(),rF(t,{chartPaddingTop:u,chartPaddingBottom:h}),pl(()=>{l&&(c?l.children.unshift(i):l.children.push(i),t.markDirty(),e.markDirty(),l.markDirty())})}function rF(s,t){let{chartPaddingTop:e,chartPaddingLeft:i,chartPaddingRight:r,chartPaddingBottom:a}=t;s.setAll({paddingTop:e,paddingLeft:i,paddingRight:r,paddingBottom:a})}function sF(s,t){let e=s.root.events.on(_i.FrameEnded,()=>{s.markerContainer.children.length>0&&(t(),e.dispose())})}function aF(s){let{series:t,legend:e,chart:i}=s,r=se(i.uid,"config"),a=n=>{let o=n.getPrivate("valueLow"),l=n.getPrivate("valueHigh");o!==void 0&&l!==void 0&&(e.get("orientation")==="vertical"?(e.set("startValue",l),e.set("endValue",o)):(e.set("startValue",o),e.set("endValue",l))),pl(()=>{sF(e,()=>{nF({legend:e,series:n,chartConfig:r})})})};t!==void 0&&(t.events.on("datavalidated",()=>{a(t)}),a(t)),oF(e,r?.legend)}function nF(s){let{legend:t,series:e,chartConfig:i}=s,r=i?.series[0],a=r?.gradientRules;if(a&&(a.minValue!==void 0||a.maxValue!==void 0)){let n=e.getPrivate("valueLow"),o=e.getPrivate("valueHigh");if(n!==void 0&&o!==void 0&&o>n){let l=n,h=o,u=h-l,c=a.minValue??l,d=a.maxValue??h,p=(c-l)/u,f=(d-l)/u;p=Math.max(0,Math.min(1,p)),f=Math.max(0,Math.min(1,f));let{start:m,end:g}=Sv(!1,r),{color:y,opacity:v}=_t(a.outsideRangeLowerColor??Y.heatChart.gradientHeatRules.outsideRangeLowerColor),{color:b,opacity:x}=_t(a.outsideRangeUpperColor??Y.heatChart.gradientHeatRules.outsideRangeUpperColor),_=[{color:y,opacity:v,offset:0},{color:y,opacity:v,offset:p},{color:m.color,opacity:m.opacity,offset:p},{color:g.color,opacity:g.opacity,offset:f},{color:b,opacity:x,offset:f},{color:b,opacity:x,offset:1}],w=(P,D,$)=>{let A=ds(`heatLegendLabel${$}`,t.uid),T=t.markerContainer.children.values.find(B=>B instanceof Lt&&B.get("id")===A),I=T&&!T.isDisposed()?T:void 0,N=t.startLabel;if(I||(I=Lt.new(t.root,{id:A,position:"absolute",isMeasured:!1,centerX:Oe,centerY:Oe,paddingLeft:0}),t.markerContainer.children.push(I)),I.setAll({fill:N.get("fill"),fontSize:N.get("fontSize"),fontFamily:N.get("fontFamily")}),I.set("text",P.toString()),t.get("orientation")==="vertical"){let B=N.localBounds().top,j=N.get("fontSize")??0;if(typeof j=="number"){let z=Y.heatChart.legend.minMaxLabelPadding;I.set("x",B-j*2-z)}else I.set("x",B);I.set("y",nt(D*100)),I.set("centerY",Oe)}else{I.set("x",nt(D*100));let B=t.startLabel.localBounds().bottom,j=Y.heatChart.legend.minMaxLabelPadding;I.set("y",-B-j),I.set("centerX",vr)}};p>0&&p<1&&w(c,p,"Min"),f>0&&f<1&&w(d,f,"Max");let C=()=>{let P;if(t.markerContainer.children.length>0&&t.markerContainer.children.each(D=>{D instanceof xi&&(P=D)}),P){let D=0;t.get("orientation")==="vertical"&&(D=90),P.set("fillGradient",So.new(t.root,{stops:_,rotation:D}))}};if(t.markerContainer.children.length>0)C();else{let P=t.markerContainer.children.events.once("push",()=>{t.markerContainer.children.length>0&&(P.dispose(),C())})}}}else{let n=()=>{if(t.get("orientation")==="vertical"){let o;t.markerContainer.children.length>0&&t.markerContainer.children.each(l=>{l instanceof xi&&(o=l)}),o&&o.set("rotation",180)}};if(t.markerContainer.children.length>0)n();else{let o=t.markerContainer.children.events.once("push",()=>{t.markerContainer.children.length>0&&(o.dispose(),n())})}}}function oF(s,t){if(s!==void 0){let e={type:M.Text,visible:t?.visible,content:{...t?.body,type:Pt.TS,text:" "}};[s.startLabel,s.endLabel].forEach(i=>{Wa({label:i,labelConfig:e,skipSettingText:!0,skipSettingXAndY:!0})})}}function SC(s){let t=ds(Qs,s.uid);[s.bottomAxesContainer,s.rightAxesContainer,s.leftAxesContainer,s.topAxesContainer].forEach(e=>{let i=pi({childId:t,parent:e,useChildId:!0});i&&(i.children.values.filter(r=>r instanceof In).forEach(r=>{r.dispose()}),e.children.removeValue(i),i.dispose()),e.markDirty()}),rF(s,{}),y5(s)}function CC(s,t){let e=nd({root:t.root,parent:t,index:0,id:ds(mn,t.uid)});return e.set("paddingTop",Y.heatChart.legend.titlePadding),Iu({chart:s,label:e,labelType:wt.LegendTitle}),e}function MS(s){let{chart:t,legendConfig:e,container:i}=s,r=ds(Qs,t.uid),a=i;if(a||[t.bottomAxesContainer,t.rightAxesContainer,t.leftAxesContainer,t.topAxesContainer].forEach(n=>{let o=pi({childId:r,parent:n,useChildId:!0});o&&(a=o)}),a!==void 0){let n=pi({childId:mn,parent:a})??CC(t,a);if(e!==void 0){let{title:o,visible:l}=e,{legendTitle:h}=Y.legendProperties;if(o!==void 0){Wa({label:n,labelConfig:{...o,visible:l!==!1&&o.visible!==!1},defaults:{...h,verticalCenter:"top"}});let u=se(t.uid,"config")?.legend?.position??Y.heatChart.legend.position;u===ze.Left||u===ze.Right?(n.set("maxWidth",250),Oo({chart:t,label:n,labelType:wt.LegendTitle})):n.set("maxWidth",void 0),lF({legendContainer:a,chart:t})}else ri(n,!1)}}}function g5(s,t){let{root:e}=s,i=se(s.uid,"config"),r=i?.legend,a=s.series.values[0];SC(s);let n=eF(s,i??t),o=De.new(e,{id:ds(Qs,s.uid),layout:e.verticalLayout});return o.children.push(n),CC(s,o),MS({chart:s,legendConfig:r,container:o}),aF({series:a,legend:n,chart:s}),r!==void 0&&r.visible!==!1&&(iF({chart:s,legend:n,legendContainer:o}),IS({legend:n,chart:s,legendContainer:o})),n}function IS(s){let{legend:t,chart:e,legendContainer:i}=s,r=se(e.uid,"config"),a=Y.heatChart.legend,n=r?.legend?.position??a.position;if(n===ze.Left||n===ze.Right)t.set("height",ne),i.set("height",ne),lF({legendContainer:i,chart:e});else{let o=pi({childId:mn,parent:i}),l=r?.legend?r.legend.visible??!0:!1,h=r?.legend?.title?r.legend.title.visible??!0:!1,u=o instanceof Lt&&l&&h?o.height()>0?o.height():a.titleHeight+a.titlePadding:0,c=n===ze.Top?a.topHeight:a.bottomHeight;t.set("height",c),i.set("height",c+u+20)}}function lF(s){let{legendContainer:t,chart:e}=s,i=se(e.uid,"config"),r=Y.heatChart.legend,a=i?.legend?.position??r.position;if(a!==ze.Left&&a!==ze.Right)return;let n=pi({childId:mn,parent:t}),o=i?.legend?.title?i.legend.title.visible??!0:!1;if(n instanceof Lt&&o){let l=()=>{let h=n.width(),u=r.width,c=Math.max(h+r.legendPadding*2,u);t.set("width",c)};n.width()>0?l():n.events.once("boundschanged",l)}else t.set("width",r.width)}function y5(s){let t=pi({childId:xv,parent:s});t instanceof De&&t.set("marginTop",0)}function v5(s){let t,e=ds(Qs,s.uid);return[s.bottomAxesContainer,s.rightAxesContainer,s.leftAxesContainer,s.topAxesContainer].forEach(i=>{let r=pi({childId:e,parent:i,useChildId:!0});if(r){let n=r.children.values.find(o=>o instanceof In);if(n){t=n;return}}let a=i.children.values.find(n=>n instanceof In);if(a){t=a;return}}),t}function b5(s){let{chart:t,chartConfig:e,heatLegendPositionChanged:i,heatRulesTypeChanged:r}=s,{legend:a}=e,n=a!==void 0&&a.visible!==!1,o=t.series.values[0];if(i||r)SC(t),n&&o instanceof Zt&&pl(()=>{let l=eF(t),h=De.new(t.root,{id:ds(Qs,t.uid),layout:t.root.verticalLayout});h.children.push(l),CC(t,h),MS({chart:t,legendConfig:a,container:h}),kA(t,l),iF({chart:t,legend:l,legendContainer:h}),aF({series:o,legend:l,chart:t}),IS({legend:l,chart:t,legendContainer:h})});else if(o instanceof Zt){let l=v5(t);if(l){kA(t,l),MS({chart:t,legendConfig:a}),oF(l,a);let h=l.parent;h?.get("id")===ds(Qs,t.uid)&&ri(h,n),ri(l,n),m5(l,t),h&&IS({legend:l,chart:t,legendContainer:h}),pl(()=>{sF(l,()=>{nF({legend:l,series:o,chartConfig:e})})})}}}function x5(s,t){let e=!1;if(t===ze.Right||t===ze.Left)e=!0;else{let i=s.dataItems[0]?.get("itemContainer").bounds().left;i!==void 0&&(e=!s.dataItems.some(r=>r.get("itemContainer").bounds().left!==i))}return e}function _5(s){let t=!1,e=s.dataItems[0]?.get("itemContainer").bounds().bottom;return e!==void 0&&(t=!s.dataItems.some(i=>i.get("itemContainer").bounds().bottom!==e)),t}function S5(s){hC(s.uid,{isLegendValueLabel:!0}),s.valueLabels.template.adapters.add("text",(t,e)=>{let i=t??"",r=EW(s.uid,"pieChartLegendValueLabelsFormatter");return r!==void 0&&(i=r(e.dataItem?.get("value")??0,e.dataItem?.get("valuePercentTotal")??0)),i}),s.valueLabels.template.set("text","")}function hF(s){let{legend:t,seriesConfig:e,webChartLegend:i,pieChartLegendValueLabelFormatter:r,chart:a}=s,{visible:n,body:o,displayNumericValue:l,displayPercentage:h}=i??{};if(Ie(e)===M.PieSeries){let{numericValueFormat:u,percentValueFormat:c,valuePrefix:d,valueSuffix:p,percentagePrefix:f,percentageSuffix:m}=e[0],g=l??Y.pieChart.displayNumericValueOnLegend,y=h??Y.pieChart.displayPercentageOnLegend,v=r;if(r===void 0){let D=pC({pieChart:a,valueIntlOptions:u?.intlOptions,percentageIntlOptions:c?.intlOptions,displayNumericValue:g,displayPercentage:y,valuePrefix:d,valueSuffix:p,percentagePrefix:f,percentageSuffix:m});v=($,A)=>D("",$,A)}BW(t.uid,{pieChartLegendValueLabelsFormatter:v});let b=se(a?.uid??0,"config")?.legend?.position??Y.legendProperties.position,x=i?.valueLabelMaxWidth,_=x5(t,b),w={type:M.Text,visible:n,content:{...o,type:Pt.TS,text:".",verticalAlignment:"middle",horizontalAlignment:_?"right":"center"}};Wa({label:t.valueLabels.template,labelConfig:w,defaults:Y.legendProperties.valueLabels});let C=se(a?.uid??0,"rtl")??!1,P=x!==void 0&&!Number.isNaN(x);t.valueLabels.template.setAll({x:void 0,y:void 0,paddingRight:5,textAlign:C?"right":"left",disabled:g===!1&&y===!1,width:P?x:null,oversizedBehavior:P?"wrap":"none"})}}function C5(s,t){s.labels.template.adapters.add("maxWidth",e=>{let i=e,r=se(t.uid,"config"),a=r?.legend?.labelMaxWidth,n=r?.legend?.position??Y.legendProperties.position;if(n===ze.Right||n===ze.Left)i=a??Y.legendProperties.legendLabels.maxWidth;else if(a!==void 0)i=a;else{let o=0;s.valueLabels.template.get("forceHidden")||s.valueLabels.each(h=>{let u=h.get("width",0);typeof u=="number"&&(o=Math.max(o,u))});let l=s.get("width",200);typeof l=="number"&&(i=l+o)}return i}),s.valueLabels.template.adapters.add("maxWidth",e=>{let i=e,r=se(t.uid,"config"),a=r?.legend?.valueLabelMaxWidth,n=r?.legend?.position??Y.legendProperties.position;return n===ze.Right||n===ze.Left?i=a??Y.legendProperties.valueLabels.maxWidth:i=a??Number.NaN,i})}function uF(s,t){let e=0;for(let i of s.dataItems){let r=i.get("label")?._contentWidth??0;e=Math.max(e,r)}return t&&e>t?t:e}function w5(s,t){for(let e of s.dataItems)e.get("label")?.set("width",t)}function P5(s,t){let e=0;for(let i of s.dataItems){let r=i.get("marker")?._contentWidth??0,a=i.get("valueLabel")?._contentWidth??0,n=r+t+a;e=Math.max(e,n)}return Math.ceil(e)+Y.legendPadding}function cF(s,t){pl(()=>{let e=_5(s),i=t===ze.Right||t===ze.Left||!e;w5(s,i?uF(s):void 0)})}function T5(s){let{legend:t,chart:e,seriesConfig:i,legendConfig:r}=s,{displayCategory:a}=r??{},n=a??Y.pieChart.displayCategoryOnLegend,o=se(e?.uid??0,"rtl")??!1;t.labels.template.setAll({forceHidden:n===!1,direction:o?"rtl":"ltr",oversizedBehavior:r?.labelMaxWidth!==void 0&&!Number.isNaN(r.labelMaxWidth)?"wrap":"none"}),pl(()=>{let l=uF(t,r?.labelMaxWidth),h=P5(t,l);t.itemContainers.template.setAll({width:h,layout:e.root.horizontalLayout}),C5(t,e),hF({legend:t,seriesConfig:i,webChartLegend:r,chart:e});let u=r.position??Y.legendProperties.position;cF(t,u),t.markDirty()})}function dF(s){return s?.[0].type===M.HeatSeries&&s[0].heatRulesType!==wh.Renderer}function $5(s){let t=s.target.dataItem;if(t?.dataContext!==void 0){let{dataContext:e}=t,i=typeof e=="object"&&e!==null&&"component"in e?e.component:e;if(i instanceof br){let r={visible:!i.get("visible")};zn(i)||zu(i)?r.overlayType=Jt(i.uid,"type"):r.seriesId=i.get("id"),pb(r,i.root.dom)}}}function D5(s){s.itemContainers.template.events.on(_i.Click,$5)}function k5(s,t){let e=se(t.uid,"rtl")??!1;s.itemContainers.template.setAll({reverseChildren:e})}function A5(s){let{chart:t,legend:e,chartConfig:i,showEmptySeries:r,queryObject:a}=s,n=Ie(i.series);if(t.series.length>1||n===M.PieSeries||n===M.HeatSeries){let o=[],l=pt(i.series);switch(n){case M.BoxPlotSeries:{let h=As(i);o=t.series.values.filter(u=>{let c=!1;return h?c=u instanceof yt&&!(u instanceof Bn):c=u instanceof Zs,c});break}case M.HistogramSeries:{o=t.series.values.filter(h=>{let u=!1;if(Jt(h.uid,"isOverlay")){let c=i.series[0].type===M.HistogramSeries?i.series[0].overlays:void 0,d=Jt(h.uid,"type"),p;switch(d){case zi.Mean:p=c?.mean?.created;break;case zi.Median:p=c?.median?.created;break;case zi.Normal:p=c?.comparisonDistribution?.created;break;case zi.StdDev:p=c?.standardDeviation?.created;break}u=p===!0}return u});break}case M.PieSeries:{o=t.series.getIndex(0)?.dataItems??[];break}case M.ComboLineAndBarSeries:case M.LineSeries:case M.RadarSeries:case M.BarSeries:o=t.series.values.filter(h=>{let u=!0;if(!r){let c=i.series.find(d=>d.id===h.get("id"));if(c!==void 0&&"y"in c&&typeof c.y=="string"){let{x:d,y:p}=c,f=l===_e.BarAndLineSplitByNoAggregation?`${p}_${Jn({where:c.query?.where,keepSurroundingQuotes:!1,escape:!1})}`:p;u=h.data.values.some(m=>pw({dataItem:m,x:d,y:f,aggregationType:i.series[0].query?.outStatistics?.[0]?.statisticType}))}}return u});break;case M.ScatterSeries:{let h=CL(t);h!==void 0&&(o=[h]);break}case M.HeatSeries:{let h=t.series.getIndex(0);if(h instanceof Zt&&vn(i)&&!ss(a)){let u=QL({queryObject:a,chartConfig:i,forLegend:!0,series:h});if(u){o=[...u];let c=z5(t);c!==void 0&&o.push(c)}}break}}e.data.setAll(o)}}function AA(s){let t=0;return s.dataItems.forEach(e=>{let i=e.get("itemContainer").width();t=Math.max(i,t)}),Math.ceil(t)}function LA(s){let t=0;if(s instanceof Lt&&s.get("visible")!==!1&&s.get("forceHidden")!==!0){let e=s.width();Number.isFinite(e)&&(t=e)}return t}function FA(s){let t=0;return s.series.values.forEach(e=>{let i=e.bulletsContainer;i&&i.children.values.forEach(r=>{t=Math.max(t,LA(r))}),t===0&&e.dataItems.forEach(r=>{let a=r.bullets;if(a)for(let n of a)t=Math.max(t,LA(n.get("sprite")))})}),Math.ceil(t)}function Lu(s,t){let{root:e}=s,i=pi({childId:Qs,parent:s});if(i!==void 0){let r=se(s.uid,"config"),a=se(s.uid,"rtl"),n=zr(r),o=Ie(r?.series),l=rs(r),h=r?.series?.some(we=>we.dataLabels&&we.dataLabels?.visible!==!1)??!1,u=r?.title?r.title.visible??!0:!1,c=r?.subtitle?r.subtitle.visible??!0:!1,d=r?.footer?r.footer.visible??!0:!1,p=r?.legend?r.legend.visible??!0:!1,f=r?.legend?.title?r.legend.title.visible??!0:!1,m=pi({childId:xv,parent:s}),g=m instanceof De&&u?m.height():0,y=pi({childId:xC,parent:s}),v=y instanceof De&&c?y.height():0,b=pi({childId:_v,parent:s}),x=b instanceof De&&d?b.height():0,_=pi({childId:mn,parent:i}),w=_ instanceof Lt&&p&&f?_?.height():0,C=r?.legend?.position??Y.legendProperties.position,P,D=t.get("verticalScrollbar"),$=Oe,A=Oe,T=e.verticalLayout,I=Oe,N=Oe,B=Oe,j=Oe,z=0,K,V=t.height()+w,E=0,re=0,X=h&&!n?Y.chartContainer.paddingTop??0:0,Z=0,ue,Le;switch(C){case ze.Left:T=e.verticalLayout,I=vr,B=vr,N=vr,j=vr,K=void 0,$=vr,A=vr,E=i.width(),z=g+v,V<s.seriesContainer.height()&&(z+=s.seriesContainer.height()/2-V/2),P=AA(t),D?.width()!==void 0&&P&&D.isVisible()&&(P+=D.width()+Y.scrollbarPadding),a&&(ue=ne,Le=P);break;case ze.Right:T=e.verticalLayout,I=ne,B=ne,N=vr,j=vr,K=void 0,$=vr,A=vr,re=i.width(),z=g+v,V<s.seriesContainer.height()&&(z+=s.seriesContainer.height()/2-V/2),P=AA(t),D?.width()!==void 0&&P&&D.isVisible()&&(P+=D.width()+Y.scrollbarPadding),a&&(ue=ne,Le=P);break;case ze.Top:T=e.gridLayout,I=Oe,B=Oe,N=vr,j=vr,K=ne,$=Oe,A=Oe,X+=V,z+=g+v,P=void 0,a&&(ue=void 0);break;case ze.Bottom:T=e.gridLayout,I=Oe,B=Oe,N=ne,j=ne,K=ne,$=Oe,A=Oe,Z=V,z=-Z-x,P=void 0,a&&(ue=void 0);break}if(n&&h&&(o===M.LineSeries||o===M.ComboLineAndBarSeries||o===M.BarSeries&&l===hi.Side)){let we=FA(s);if(we>0)re+=we;else if(s.series.length>0){let Te=t.root.events.on(_i.FrameEnded,()=>{let Ze=FA(s);Ze>0&&(a?E+=Ze:re+=Ze,Te.dispose(),Lu(s,t))})}}(P===void 0||P>0)&&(t.setPrivate("width",P),a&&t.itemContainers.template.setAll({centerX:ue,dx:Le})),t.setAll({layout:T,x:$,centerX:A}),i.setAll({x:I,y:N,centerX:B,centerY:j,dy:z,width:K,height:0}),s.chartContainer.setAll({paddingBottom:Z,paddingTop:X,paddingLeft:E,paddingRight:re}),K===void 0&&(i.setPrivate("width",void 0),i.markDirty()),s instanceof hs&&cF(t,C)}}function L5(s){let{chart:t,legend:e,legendContainer:i}=s,r=pi({childId:mn,parent:i});r&&r.on("visible",()=>{e.root.events.once(_i.FrameEnded,()=>{Lu(t,e)})}),i.events.on(_i.BoundsChanged,()=>{Lu(t,e)}),e.events.on(_i.BoundsChanged,()=>{Lu(t,e)}),t.seriesContainer.onPrivate("height",()=>{Lu(t,e)}),t.series.each(a=>{a.events.on(_i.DataValidated,()=>{Lu(t,e)})})}function pF(s,t){let e=nd({root:t.root,parent:t,index:0,id:ds(mn,t.uid)});return e.set("paddingTop",10),Iu({chart:s,label:e,labelType:wt.LegendTitle}),e}function F5(s,t){t.markers.template.setAll({width:Y.legendProperties.legendMarkersSize,height:Y.legendProperties.legendMarkersSize}),t.markerRectangles.template.adapters.add("fillOpacity",(e,i)=>{let r=i.parent?.dataItem?.dataContext,a=r&&Zr.fillOpacityField in r?r[Zr.fillOpacityField]:e;return typeof a=="number"?a:e}),t.markerRectangles.template.adapters.add("strokeOpacity",(e,i)=>{let r=i.parent?.dataItem?.dataContext,a=r&&Zr.strokeOpacityField in r?r[Zr.strokeOpacityField]:e;return typeof a=="number"?a:e}),t.labels.template.adapters.add("text",(e,i)=>{let r=e,a=se(s.uid,"config");if(Ie(a?.series)!==M.HeatSeries){let n=i.dataItem?.component;if(n instanceof Gi){let o=n.get("categoryField")??"",l=i.dataItem,h=l?.get("category"),u=l?.dataContext;r=h??(u?.[o]??e)?.toString()}else n instanceof br&&(r=n.get("name"))}return r})}function O5(s,t){t.seriesContainer.onPrivate("height",e=>{let i=0,r=se(t.uid,"config"),a=r?.legend,n=pi({childId:Qs,parent:t});if(n!==void 0){let l=pi({childId:mn,parent:n});l!==void 0&&a?.visible!==!1&&a?.title?.visible!==!1&&(i=l.height())}let o=r?.legend?.maxHeight??Number.NaN;Number.isFinite(o)||(r?.legend?.position===ze.Top||r?.legend?.position===ze.Bottom?o=Y.legendProperties.maxHeight:typeof e=="number"&&(o=e-i)),s.set("maxHeight",o)})}function M5(s,t,e){s.events.on(_i.DataValidated,()=>{s.dataItems.length>0&&fF(s,t,e)})}function I5(s){let t;if(s!==void 0){let e=se(s?.uid,"config");t=se(s.uid,"rtl")&&(e?.legend?.position===ze.Top||e?.legend?.position===ze.Bottom)}return t??!1}function R5(s){let t="";if(s instanceof Ut){let e=se(s.uid,"config"),i=zr(e),r=i?S.Rotated:S.NonRotated,a=rs(e),n=S.SideBySide;a===hi.Stacked?n=S.Stacked:a===hi.Stacked100&&(n=S.Stacked100);let o=se(s.uid,"rtl")?S.RTL:S.LTR,l;switch(e?.legend?.position){case ze.Left:l=S.LegendLeft;break;case ze.Top:l=S.LegendTop;break;case ze.Bottom:l=S.LegendBottom;break;case ze.Right:default:l=S.LegendRight;break}let h=i?s.yAxes.getIndex(0):s.xAxes.getIndex(0),u;h instanceof Mi?u=S.DateAxis:h instanceof Nt?u=S.ValueAxis:u=S.CategoryAxis;let c=e?.orderOptions?.data&&"orderBy"in e.orderOptions.data&&e.orderOptions.data.orderBy===xd.Descending?S.OrderByFieldsDESC:S.OrderByFieldsASC;t=`${r}-${o}-${n}-${l}-${u}-${c}`}return t}function V5(s){let t=R5(s);return _1.has(t)}function fF(s,t,e){switch(e){case M.HistogramSeries:case M.PieSeries:s.set("reverseChildren",I5(t));break;case M.BarSeries:case M.LineSeries:case M.RadarSeries:case M.ComboLineAndBarSeries:s.set("reverseChildren",V5(t));break}}function N5(s,t){let e=pi({childId:Qs,parent:s});if(e!==void 0){let i=pi({childId:mn,parent:e})??pF(s,e);if(t!==void 0){let{title:r,visible:a}=t,{legendTitle:n}=Y.legendProperties;r!==void 0?(Wa({label:i,labelConfig:{...r,visible:a!==!1&&r.visible!==!1},defaults:{...n,verticalCenter:"top"}}),Oo({chart:s,label:i,labelType:wt.LegendTitle})):ri(i,!1)}}}function E5(s,t=!1){let e=t?Y.legendProperties.roundedMarkerRadius:Y.legendProperties.rectangleMarkerRadius;s.markerRectangles.template.setAll({cornerRadiusTL:e,cornerRadiusTR:e,cornerRadiusBL:e,cornerRadiusBR:e})}function B5(s){let{legend:t,legendConfig:e,chartType:i,seriesConfig:r,chart:a}=s;if(t!==void 0){let n={type:M.Text,visible:e?.visible,content:{...e?.body,type:Pt.TS,text:" "}};if(i===M.PieSeries){let o=pi({childId:Qs,parent:a});o!==void 0&&pi({childId:mn,parent:o})!==void 0&&hF({legend:t,seriesConfig:r,webChartLegend:e,chart:a})}Wa({label:t.labels.template,labelConfig:n}),t.labels.template.setAll({x:void 0,y:void 0,paddingRight:5})}}function j5(s,t){t===!0&&s.itemContainers.each(e=>{e.events.disableType(_i.Click)})}function W5(s){let{legend:t,chart:e,seriesConfig:i}=s;i?.[0].type!==M.HeatSeries&&t.itemContainers.template.adapters.add("cursorOverStyle",()=>se(e.uid,"options")?.togglingLegendItemsDisabled===!0?"default":"pointer")}function OA(s,t){let{root:e}=s,i;if(dF(t?.series))i=g5(s,t);else{let r=De.new(e,{id:ds(Qs,s.uid),layout:e.verticalLayout}),a=t?.series?.[0].type===M.HeatSeries?{nameField:Zr.nameField,fillField:Zr.fillField,strokeField:Zr.strokeField,fillOpacityField:Zr.fillOpacityField,strokeOpacityField:Zr.strokeOpacityField}:{};i=hl.new(e,{...a,verticalScrollbar:wo.new(e,{orientation:"vertical"})}),s instanceof hs?S5(i):i.valueLabels.template.setAll({forceHidden:!0,textAlign:"left"}),F5(s,i),pF(s,r),D5(i),k5(i,s),L5({chart:s,legend:i,legendContainer:r}),O5(i,s),M5(i,s,Ie(t?.series)),W5({legend:i,chart:s,seriesConfig:t?.series}),r.children.push(i),s.children.push(r)}return i}function z5(s){let t=se(s.uid??NaN,"config"),e=t?.series[0].heatRulesType===wh.Renderer,i=s.series.values[0].data.values.some(a=>a[Hi.valueField]===null||e&&!a[Ee.rendererSymbolField]),r;if(i){let a=t?.series[0].emptyCells,n=a?.symbol?.color??Y.heatChart.emptyCells?.symbol?.color,{outlineColor:o,outlineOpacity:l}=ev(t?.series[0].gridLine);r={[Zr.nameField]:a?.text??Y.heatChart.emptyCells?.text??"",[Zr.fillField]:_t(n).color,[Zr.fillOpacityField]:_t(n).opacity,[Zr.strokeField]:o,[Zr.strokeOpacityField]:l}}return r}function MA(s){let{chart:t,legend:e,showLegend:i}=s,r=pi({childId:Qs,parent:t});r&&(ri(r,i),ri(e,i))}function IA(s){let{chart:t,showLegend:e,legendConfig:i}=s;if(i){let{title:r,visible:a}=i,n=r!==void 0&&a!==!1&&r.visible!==!1,o=pi({childId:Qs,parent:t});if(o){let l=pi({childId:mn,parent:o});l&&(r?ri(l,n):ri(l,e))}}}function mF(s){let{chart:t,chartConfig:e,legend:i,heatChartLegendUpdatedNeeded:r,showEmptySeries:a,seriesConfig:n,queryObject:o,heatRulesTypeChanged:l,heatLegendPositionChanged:h}=s,{legend:u,series:c}=e;if(dF(n)&&r)l&&i&&(MA({chart:t,legend:i,showLegend:!1}),IA({chart:t,showLegend:!1,legendConfig:u})),b5({chart:t,chartConfig:e,heatLegendPositionChanged:h,heatRulesTypeChanged:l});else if(i instanceof hl&&(n?.[0].type===M.HeatSeries&&SC(t),pi({childId:Qs,parent:t})!==void 0)){let d=Hv(c)&&u!==void 0&&u.visible!==!1;if(MA({chart:t,legend:i,showLegend:d}),IA({chart:t,showLegend:d,legendConfig:u}),d){E5(i,u?.roundMarkers),B5({legend:i,legendConfig:u,chartType:Ie(c),seriesConfig:n,chart:t}),fF(i,t,Ie(c)),A5({chart:t,legend:i,chartConfig:e,showEmptySeries:a,queryObject:o}),N5(t,u),Lu(t,i);let p=se(t.uid,"options");j5(i,p?.togglingLegendItemsDisabled),t instanceof hs&&T5({legend:i,chart:t,seriesConfig:n,legendConfig:u})}}}function gF(s){if(!(s instanceof Ks)&&s instanceof Ut){let{root:t}=s,e=wo.new(t,{orientation:"horizontal",visible:!1,marginTop:0}),i=wo.new(t,{orientation:"vertical",visible:!1});s.setAll({scrollbarX:e,scrollbarY:i})}}function H5(s,t){if(t!==void 0){let e=_t(t),i=t[3]/255,r=i/2;[{element:s.get("background"),specificOpacity:r},{element:s.startGrip.get("background")},{element:s.endGrip.get("background")},{element:s.thumb}].forEach(a=>{let{element:n,specificOpacity:o}=a;n!==void 0&&n.setAll({fill:e.color,fillOpacity:o??i})}),[{element:s.get("background"),stateName:"default",specificOpacity:r},{element:s.startGrip.get("background"),stateName:"default"},{element:s.startGrip.get("background"),stateName:"hover"},{element:s.startGrip.get("background"),stateName:"down"},{element:s.endGrip.get("background"),stateName:"default"},{element:s.endGrip.get("background"),stateName:"hover"},{element:s.endGrip.get("background"),stateName:"down"},{element:s.thumb,stateName:"default"},{element:s.thumb,stateName:"hover"},{element:s.thumb,stateName:"down"}].forEach(a=>{let{element:n,stateName:o,specificOpacity:l}=a;(n?.states.lookup(o)??n?.states.create(o,{}))?.setAll({fill:e.color,fillOpacity:l??i})})}}function X5(s,t){typeof t=="number"&&Number.isFinite(t)&&(s.get("orientation")==="horizontal"?s.setAll({height:t,minHeight:t}):s.setAll({width:t,minWidth:t}))}function Y5(s,t){if(typeof t=="number"&&Number.isFinite(t)){let e=t/30;s.startGrip.set("scale",e),s.endGrip.set("scale",e)}}function RA(s,t){typeof t=="number"&&Number.isFinite(t)&&(s.get("orientation")==="horizontal"?s.set("marginBottom",t):s.set("marginLeft",t),s.markDirtyBounds())}function yF(s){let{chart:t,scrollbarXConfig:e,scrollbarYConfig:i}=s;if(!(t instanceof Ks)&&t instanceof Ut){let r=se(t.uid,"isRotated");(t.get("scrollbarX")===void 0||t.get("scrollbarY")===void 0)&&gF(t);let a=t.get("scrollbarX"),n=t.get("scrollbarY");[a,n].forEach(o=>{if(o!==void 0){let l=o.get("orientation")==="horizontal"&&r!==!0||o.get("orientation")==="vertical"&&r===!0?e:i,h=l?.visible!==!0;if(ri(o,!h),l!==void 0&&!h){let{width:u,color:c,gripSize:d,margin:p}=l;RA(o,p??u??Y.scrollbarPadding),H5(o,c),Y5(o,d),X5(o,u)}else RA(o,0)}})}}function U5(s){pL(s)}function G5(s,t){s.columns.each(e=>{(e.dataItem?.dataContext)[t]===0&&e.set("strokeOpacity",0)})}function wC(s,t){let e=pd(t);return Number(s.dataContext?.[e])}function q5(s){let t=[],e=s.component,i=e.chart,r=e.dataItems.indexOf(s);return r>=0&&i.series.each(a=>{let n=a;if(n.get("visible")!==!1){let o=n.dataItems[r];if(o){let l=wC(o,n);Number.isFinite(l)&&l!==0&&(l>0?t.push(o):t.unshift(o))}}}),t}function K5(s){let t=!1;if(s){let e=q5(s),i=wC(s,s.component),r=e.indexOf(s);t=i>0?r===e.length-1:r===0}return t}function Z5(s){let t=["cornerRadiusTL","cornerRadiusTR","cornerRadiusBL","cornerRadiusBR"];s.columns.template.setAll({cornerRadiusTL:0,cornerRadiusTR:0,cornerRadiusBL:0,cornerRadiusBR:0}),t.forEach(e=>{s.columns.template.adapters.remove(e),s.columns.template.adapters.add(e,(i,r)=>{let a=r.dataItem,n=s.chart,o=0;if(n){let l=se(n.uid,"config"),h=l?.roundCorners,u=a?wC(a,s):Number.NaN;if(h?.rounded===!0&&Number.isFinite(u)&&u!==0&&(l===void 0||!Jf(l)||K5(a))){let c=h?.cornerRadius??0;o=(l?.rotated===!0?["cornerRadiusTR","cornerRadiusBR"]:["cornerRadiusTL","cornerRadiusTR"]).includes(e)?c:0}}return o})})}function J5(s){let{root:t,chartConfig:e,seriesConfig:i,xAxis:r,yAxis:a,options:n,queryObject:o,errorStrings:l}=s,{id:h,name:u}=i,{xField:c,yField:d,xAxisField:p,yAxisField:f}=fd(e,i),m=Jf(e),g=Zt.new(t,{id:h,name:u,stacked:m,turboMode:!0,xAxis:r,yAxis:a,[p]:c,[f]:d,maskBullets:!1});Or(g.columns.template,n?.selectionTheme);let y=dt.new({});return Sr(g.uid,{bulletTemplate:y}),Hn({element:g.columns.template,series:g,queryObject:o,errorStrings:l}),g.bullets.push(v=>{let b=Ke.new(v,{},y);return Ns.new(v,{sprite:b})}),g.columns.template.set("width",nt(100)),Z5(g),vC(g),yL(g,n?.tooltipFormatter),vv(g,e),g.appear(),g}function Q5(s){let{series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,chartSubType:a,colorMatch:n,rendererType:o}=s,l=t.root,h=pd(t),u=new Set,c,d,p=e.fillSymbol,f={root:l,seriesConfig:e,seriesIndex:i,seriesSymbol:p,isChartFillSymbol:!0},m={},g={},y=jv(i),v=Jt(t.uid,"bulletTemplate");if(v&&p?.style&&p.style!==Wr.Solid&&gh({root:l,element:v,fillSymbol:p,defaultToColorFromRamp:!0,colorRampIndex:i,isChartFillSymbol:!0,chartBackgroundColor:rL(t.chart)??[...Y.backgroundColor]}),t.columns.length===0?m=va({root:l,seriesIndex:i,colorMatch:n,seriesSymbol:p??y,element:Ke.new(l,{}),isChartFillSymbol:!0}):t.columns.each(b=>{let x=b.dataItem?.dataContext;if(Number.isFinite(x?.[h])){d=wa({dataItem:x,seriesConfig:e,chartSubType:a,colorMatch:n,rendererType:o});let _=x[Y.xAxisField]===Y.nullValue,w=cm(e.nullCategory);m=va({...f,seriesSymbol:(_&&w!==void 0?w:p)??y,element:b,colorMatch:n,rendererSymbol:d}),Sf(b,m.stylingInfo),_||(u.add(JSON.stringify(m.symbolWithColorInfo)),g=m)}}),r>1){let b=t.get("legendDataItem")?.get("marker").children.getIndex(0);b!==void 0&&(va({...f,seriesSymbol:p??y,element:b,colorMatch:n,rendererSymbol:d}),Sf(b,g.stylingInfo),b.states.apply(t.isVisible()?"default":"disabled")),va({...f,seriesSymbol:g.symbolWithColorInfo??p??y,element:t,colorMatch:n,rendererSymbol:d,keepCurrentVisibility:!0}),va({...f,seriesSymbol:g.symbolWithColorInfo??p??y,element:t.columns.template,colorMatch:n,rendererSymbol:d})}return u.size<=1&&(c=g.symbolWithColorInfo??p),G5(t,h),c}function eY(s){let{series:t,seriesConfig:e,seriesSymbolMapForEvent:i,seriesIndexMapper:r,seriesIndex:a,colorMatch:n,rendererType:o,interactionsDisabled:l}=s,h=t.chart;if(h!==void 0){let u=se(h.uid,"config"),c=u?.series.length??0,d=pt(u?.series);ld(t,!1);let p=Q5({series:t,seriesConfig:e,seriesIndex:a,numberOfSeries:c,chartSubType:d,colorMatch:n,rendererType:o});l&&ld(t,!0),i.set(r?.get(e.id)??a,p),i.size===c&&Pa({data:i,htmlContainer:t.root.dom,chartId:h.get("id"),colorMatchApplied:gd(h)})}}function tY(s){let{columnSeries:t,data:e,seriesIndex:i,chartConfig:r,dataWasUpdated:a,seriesWereReinitialized:n,rotationChanged:o,stackedTypeChanged:l,timeZoneChanged:h,sortChanged:u}=s,c=r.series[i];if(e&&c?.type===M.BarSeries&&(o===!0||a===!0||u===!0||l===!0||h||n===!0)){let{xField:d,yField:p,xAxisField:f,yAxisField:m}=fd(r,c);t.setAll({[f]:d,[m]:p}),t.data.setAll(e.dataItems)}}function iY(s){let{series:t,data:e,chartConfig:i,options:r,seriesIndex:a,dataWasUpdated:n,rotationChanged:o,timeZoneChanged:l,queryObject:h,utilsStrings:u,seriesWereReinitialized:c,autoInverseDataLabelTextColor:d,fieldList:p,sortChanged:f,stackedTypeChanged:m,colorMatch:g,seriesIndexMapper:y,seriesSymbolMapForEvent:v,rendererType:b}=s,x=i.series[a],_=i.rotated;if(t.set("id",x.id),ri(t,x.visible),Or(t.columns.template,r?.selectionTheme),gC({series:t,chartConfig:i,isRotated:_}),U5({seriesType:M.BarSeries,series:t,seriesConfig:x,isRotated:_,dataLabelsConfig:x.dataLabels,autoInverseDataLabelTextColor:d,externalDataLabelFormatter:r?.dataLabelFormatter}),tY({columnSeries:t,data:e,seriesIndex:a,chartConfig:i,dataWasUpdated:n,timeZoneChanged:l,seriesWereReinitialized:c,rotationChanged:o,stackedTypeChanged:m,sortChanged:f}),fC({series:t,seriesConfig:x,fieldList:p,queryObject:h,seriesIndex:a,tooltipFormatter:r?.tooltipFormatter,utilsStrings:u}),ml(s)){let w={series:t,seriesConfig:x,seriesIndex:a,colorMatch:g,seriesIndexMapper:y,seriesSymbolMapForEvent:v,rendererType:b,interactionsDisabled:r?.interactionsDisabled};gl({styleCallback:()=>eY(w),series:t,seriesConfig:x})}yC({chartConfig:i,series:t,seriesIndex:a,queryObject:h})}function rY(s){let{chartConfig:t,seriesConfig:e}=s,i=zr(t),r=t.showOutliers,a=t.standardizeValues,n=As(t),{y:o}=e,l=Qf(t),h=pt(l.series),u=n?void 0:e?.query?.where,c={y:h===_e.BoxPlotMultiFieldsAndCategory&&typeof o=="string"?o:void 0,chartSubType:h,splitBy:u,showOutliers:r,standardizeValues:ic(h)?a:!1},d=Cv({chartConfig:t,seriesConfig:e,key:At.ThirdQuartile});return{properties:{...d.properties,low:wi({...c,key:At.Min}),open:wi({...c,key:At.FirstQuartile}),high:wi({...c,key:At.Max})},dataFields:{...d.dataFields,low:i?"lowValueXField":"lowValueYField",open:i?"openValueXField":"openValueYField",high:i?"highValueXField":"highValueYField"}}}function sY(s){let{candleStickSeries:t,data:e,rotationChanged:i,sortChanged:r,dataWasUpdated:a,seriesWereReinitialized:n}=s;(i===!0||a===!0||r===!0||n===!0)&&t.data.setAll(e?.dataItems??[])}function aY(s){let{candleStickSeries:t,seriesConfig:e,seriesIndex:i,chartSubType:r,colorMatch:a,showMean:n,rendererType:o,options:l}=s,{root:h}=t,u=e.fillSymbol??zf(i),c={},d={root:h,seriesConfig:e,seriesIndex:i,colorMatch:a,isChartFillSymbol:!0};ld(t,!1),t.columns.length===0?c=va({...d,seriesSymbol:u,element:Ke.new(h,{})}):t.columns.each(p=>{c=va({...d,seriesSymbol:u,element:p,rendererSymbol:n?void 0:wa({dataItem:p.dataItem?.dataContext,seriesConfig:e,chartSubType:r,colorMatch:a,rendererType:o})})}),va({...d,seriesSymbol:c?.symbolWithColorInfo??u,element:t.columns.template,colorMatch:a}),l?.interactionsDisabled&&ld(t,!0)}function nY(s){let{candleStickSeries:t,seriesConfig:e,options:i}=s;Or(t.columns.template,i?.selectionTheme),md(t,e.name),sY(s),ml(s)&&gl({styleCallback:()=>aY(s),series:t,seriesConfig:e})}function oY(s){let{root:t,xAxis:e,yAxis:i,chartConfig:r,seriesIndex:a,options:n,queryObject:o,errorStrings:l}=s,h=r.series[a],u;if(h.type===M.BoxPlotSeries){let c=rY({chartConfig:r,seriesConfig:h});u=Zs.new(t,{id:h.id,turboMode:!0,xAxis:e,yAxis:i,[c.dataFields.low]:c.properties.low,[c.dataFields.open]:c.properties.open,[c.dataFields.high]:c.properties.high,[c.dataFields.value]:c.properties.value,[c.dataFields.category]:c.properties.category}),u.columns.template.setAll({themeTags:[],width:nt(80)}),Or(u.columns.template,n?.selectionTheme),Hn({element:u.columns.template,series:u,queryObject:o,errorStrings:l})}return u}function lY(s){let{chartConfig:t,seriesConfig:e}=s,i=pt(t.series),{showOutliers:r,standardizeValues:a}=t,{y:n}=e,o=e?.query?.where,l=Qf(t),h=Cv({chartConfig:l,seriesConfig:e,key:At.Average}),u=wi({y:i===_e.BoxPlotMultiFieldsAndCategory&&typeof n=="string"?n:void 0,chartSubType:i,splitBy:o,showOutliers:r,standardizeValues:ic(i)?a:!1,key:At.Average});return h.properties.value=u,h}function hY(s){let{meanLineSeries:t,data:e,rotationChanged:i,sortChanged:r,dataWasUpdated:a,seriesWereReinitialized:n}=s;(i===!0||a===!0||r===!0||n===!0)&&t.data.setAll(e?.meanLines??[])}function uY(s){let{meanLineSeries:t,seriesConfig:e,data:i,dataWasUpdated:r,sortChanged:a,rotationChanged:n,seriesWereReinitialized:o,options:l}=s,h=Jt(t.uid,"bulletTemplate");h&&Or(h,l?.selectionTheme),md(t,e?.name),hY({meanLineSeries:t,data:i,dataWasUpdated:r,sortChanged:a,rotationChanged:n,seriesWereReinitialized:o})}function cY(s){let{root:t,xAxis:e,yAxis:i,chartConfig:r,seriesIndex:a,options:n,queryObject:o,errorStrings:l}=s,h=r.series[a],u;if(h.type===M.LineSeries){let c=lY({chartConfig:r,seriesConfig:h});u=yt.new(t,{id:h.id,xAxis:e,yAxis:i,[c.dataFields.value]:c.properties.value,[c.dataFields.category]:c.properties.category}),u.appear();let d=dt.new({});Sr(u.uid,{isBoxPlotMeanLineSeries:!0,bulletTemplate:d}),Or(d,n?.selectionTheme),u.bullets.push(p=>{let f=Ke.new(p,{role:Y.aria.defaultChartItemRole,ariaLabel:No(),hoverOnFocus:!0},d),m=Ns.new(p,{sprite:f});return u&&Hn({element:f,series:u,queryObject:o,errorStrings:l}),m}),u.strokes.template.set("lineJoin",Y.lineJoin)}return u}function dY(s,t){return s.get("id")===`${t}_${vi.Outliers}`}function pY(s){let{chartConfig:t,seriesConfig:e}=s;return Cv({chartConfig:t,seriesConfig:e,key:At.Outlier})}function fY(s){let{outlierSeries:t,data:e,rotationChanged:i,sortChanged:r,dataWasUpdated:a,seriesWereReinitialized:n}=s;(i===!0||a===!0||r===!0||n===!0)&&t.data.setAll(e?.outliers??[])}function mY(s,t){return(s??Y.boxPlot.boxPlotOutliersVisibility)&&t!==!1}function gY(s){let{outlierSeries:t,chartSubType:e,seriesConfig:i,colorMatch:r,showOutliers:a}=s;if(Jt(t.uid,"bulletTemplate")&&i.type===M.BoxPlotSeries){let o=i.fillSymbol,l={type:Pt.SMS,style:Sd.Circle,color:o?.color,size:Y.boxPlot.boxPlotOutliersSize};t.dataItems.forEach(h=>{let u=h.bullets?.[0]?.get("sprite");if(u!==void 0){let c=wa({dataItem:h.dataContext,seriesConfig:i,chartSubType:e,colorMatch:r});va({root:t.root,seriesSymbol:l,element:u,colorMatch:r,rendererSymbol:c})}})}let n=mY(a,i.visible);ri(t,n)}function yY(s){let{outlierSeries:t,data:e,seriesConfig:i,sortChanged:r,dataWasUpdated:a,rotationChanged:n,seriesWereReinitialized:o,options:l}=s;if(t&&i.type===M.BoxPlotSeries){let h=Jt(t.uid,"bulletTemplate");h&&Or(h,l?.selectionTheme),fY({outlierSeries:t,data:e,rotationChanged:n,sortChanged:r,dataWasUpdated:a,seriesWereReinitialized:o}),ml(s)&&gl({styleCallback:()=>gY(s),series:t,seriesConfig:i})}}function vY(s){let{root:t,xAxis:e,yAxis:i,chartConfig:r,seriesIndex:a,options:n,queryObject:o,errorStrings:l}=s,h=r.series[a],u;if(h.type===M.BoxPlotSeries){let c=pY({chartConfig:r,seriesConfig:h});u=yt.new(t,{id:`${h.id}_${vi.Outliers}`,xAxis:e,yAxis:i,[c.dataFields.value]:c.properties.value,[c.dataFields.category]:c.properties.category}),u.strokes.template.set("forceHidden",!0);let d=dt.new({});Sr(u.uid,{isBoxPlotOutliersSeries:!0,bulletTemplate:d}),Or(d,n?.selectionTheme),u.bullets.push(p=>{let f=Ke.new(p,{role:Y.aria.defaultChartItemRole,ariaLabel:No(),hoverOnFocus:!0},d),m=Ns.new(p,{sprite:f});return u&&Hn({element:f,series:u,queryObject:o,errorStrings:l}),wY({outlierSeries:u,bullet:m,seriesConfigId:h.id}),m}),u.appear()}return u}function bY(s){let{chartConfig:t,seriesConfig:e,type:i}=s,r="";switch(i){case vi.Top:r=At.Max;break;case vi.Median:r=At.Median;break;case vi.Bottom:r=At.Min;break}return Cv({chartConfig:t,seriesConfig:e,key:r})}function xY(s){let{stepLineSeries:t,data:e,rotationChanged:i,sortChanged:r,dataWasUpdated:a,seriesWereReinitialized:n}=s;(i===!0||a===!0||r===!0||n===!0)&&t.data.setAll(e?.dataItems??[])}function _Y(s){let{stepLineSeries:t,data:e,seriesConfig:i,seriesIndex:r,colorMatch:a,chartSubType:n,rendererType:o}=s;if(i.type===M.BoxPlotSeries){let{root:l}=t,h=r1({data:e.dataItems,colorMatch:a,chartSubType:n,rendererType:o}),u=(i.fillSymbol??zf(r)).color,c={type:Pt.SLS,width:Y.boxPlot.boxPlotLineWidth,color:h?Y.boxPlot.boxPlotWhiskersColor:u};va({root:l,seriesIndex:r,seriesSymbol:c,element:t,colorMatch:a})}}function SY(s){let{stepLineSeries:t,data:e,seriesConfig:i,rotationChanged:r,sortChanged:a,dataWasUpdated:n,seriesWereReinitialized:o}=s,l=i.visible!==!1;t!==void 0&&i.type===M.BoxPlotSeries&&(ri(t,l),ml(s)&&gl({styleCallback:()=>_Y(s),series:t,seriesConfig:i}),xY({stepLineSeries:t,data:e,rotationChanged:r,sortChanged:a,dataWasUpdated:n,seriesWereReinitialized:o}))}function gS(s){let{root:t,xAxis:e,yAxis:i,chartConfig:r,seriesIndex:a,type:n,options:o,queryObject:l,errorStrings:h}=s,u=r.series[a],c;if(u.type===M.BoxPlotSeries){let d=bY({chartConfig:r,seriesConfig:u,type:n});c=Bn.new(t,{id:`${u.id}_${n}`,xAxis:e,yAxis:i,noRisers:!0,[d.dataFields.value]:d.properties.value,[d.dataFields.category]:d.properties.category}),Or(c.strokes.template,o?.selectionTheme),Hn({element:c.strokes.template,series:c,queryObject:l,errorStrings:h})}return c}function Cv(s){let{chartConfig:t,seriesConfig:e,key:i}=s,r=zr(t),a=t.showOutliers,n=t.standardizeValues,o=As(t),l=pt(t.series),{x:h,y:u}=e,c=o?void 0:e?.query?.where,d={y:l===_e.BoxPlotMultiFieldsAndCategory&&typeof u=="string"?u:void 0,chartSubType:l,splitBy:c,showOutliers:a,standardizeValues:ic(l)?n:!1},p=l===_e.BoxPlotMonoField||l===_e.BoxPlotMultiFields||l===_e.BoxPlotMonoFieldAndSplitBy||l===_e.BoxPlotMultiFieldsAndSplitBy?Bf:h;return{dataFields:{value:r?"valueXField":"valueYField",category:r?"categoryYField":"categoryXField"},properties:{value:wi({key:i,...d}),category:p}}}function CY(s,t){return s.series.values.find(e=>dY(e,t))}function vF(s,t){let e=s.series.values.find(a=>a.get("id")===`${t}_${vi.Top}`),i=s.series.values.find(a=>a.get("id")===`${t}_${vi.Median}`),r=s.series.values.find(a=>a.get("id")===`${t}_${vi.Bottom}`);return{topStepLineSeries:e,medianStepLineSeries:i,bottomStepLineSeries:r}}function bF(s){return s!==_e.BoxPlotMonoField&&s!==_e.BoxPlotMultiFields&&s!==_e.BoxPlotMonoFieldAndCategory}function xF(s){let{chart:t,candleSeriesIndex:e,numberOfCandleStickSeries:i}=s,r,a,n=se(t.uid,"config");if(n){let o=zr(n),l=As(n),h=o?t.yAxes.getIndex(0)?.get("renderer"):t.xAxes.getIndex(0)?.get("renderer"),u=h?.get("cellStartLocation"),c=h?.get("cellEndLocation");if(u&&c){let d=u/(l?1:n.series.length);r=u+e/i*(c-u)+d,a=u+(e+1)/i*(c-u)-d}}return{startLocation:r,endLocation:a}}function wY(s){let{outlierSeries:t,bullet:e,seriesConfigId:i}=s;if(t){let{chart:r}=t;if(r){let a=se(r.uid,"config");if(a){let n=pt(a.series);if(bF(n)){let o=r.series.values.filter(h=>h instanceof Zs),l=o?.findIndex(h=>h.get("id")===i);if(l&&l!==-1&&o[l]){let{startLocation:h,endLocation:u}=xF({chart:r,candleSeriesIndex:l,numberOfCandleStickSeries:o.length});h!==void 0&&u!==void 0&&e.set("locationX",(h+u)/2)}}}}}}function PY(s){let t=se(s.uid,"config");if(t){let e=pt(t.series),i=t.series.length,r=zr(t)?s.yAxes.getIndex(0)?.get("renderer"):s.xAxes.getIndex(0)?.get("renderer"),a=r?.get("cellStartLocation"),n=r?.get("cellEndLocation");if(a&&n){let o=s.series.values.filter(l=>l instanceof Zs);o.forEach((l,h)=>{let{topStepLineSeries:u,medianStepLineSeries:c,bottomStepLineSeries:d}=vF(s,l.get("id")??"");if(bF(e)){let{startLocation:p,endLocation:f}=xF({chart:s,candleSeriesIndex:h,numberOfCandleStickSeries:o.length});[u,c,d].forEach(m=>{m!==void 0&&(m.set("stepWidth",nt(60/i)),p&&f&&m.set("locationX",(p+f)/2))})}else[u,c,d].forEach(p=>{p!==void 0&&p.setAll({stepWidth:nt(60/i)})})})}}}function TY(s){let{chartConfig:t,seriesIndex:e}=s,i=t.series[e],r=Ie([i]),a=[];if(r===M.BoxPlotSeries)[oY(s),gS({...s,type:vi.Top}),gS({...s,type:vi.Median}),gS({...s,type:vi.Bottom}),vY(s)].forEach(n=>{n&&a.push(n)});else if(r===M.LineSeries){let n=cY(s);n&&a.push(n)}return a}function $Y(s){let{chart:t,chartConfig:e,series:i,seriesConfig:r}=s;if(t&&e)if(PY(t),i instanceof Zs&&r.type===M.BoxPlotSeries){i.set("id",r.id);let a=i.get("id")??"";nY({...s,seriesConfig:r,candleStickSeries:i});let{topStepLineSeries:n,medianStepLineSeries:o,bottomStepLineSeries:l}=vF(t,a),h=[vi.Top,vi.Median,vi.Bottom];[n,o,l].forEach((c,d)=>{c&&(c.set("id",`${r.id}_${h[d]}`),SY({...s,stepLineSeries:c}))});let u=CY(t,a);u&&(u.set("id",`${r.id}_${vi.Outliers}`),yY({...s,outlierSeries:u}))}else i instanceof yt&&r.type===M.LineSeries&&uY({...s,meanLineSeries:i})}function DY(s){pL(s)}function PC(s){let{isLineSmoothed:t,isRadarLineSeries:e,isRotated:i}=s,r=e?aS:ku;return t&&(r=e?sS:i?lS:oS),r}function kY(s){let{series:t,seriesConfig:e,chartSubType:i,colorMatch:r,rendererType:a}=s,n;for(let o of t.dataItems){let l=o.dataContext;if(n=wa({seriesConfig:e,dataItem:l,chartSubType:i,colorMatch:r,rendererType:a}),n!==void 0)break}return n}function AY(s){let{series:t,seriesConfig:e,seriesIndex:i,chartSubType:r,colorMatch:a,rendererType:n}=s,o=t.root,l=kY({series:t,seriesConfig:e,chartSubType:r,colorMatch:a,rendererType:n});return va({root:o,visible:e.visible,seriesIndex:i,seriesSymbol:e.lineSymbol??Ev(i),element:t,colorMatch:a,rendererSymbol:l}).symbolWithColorInfo}function LY(s){let{series:t,seriesIndex:e,chartSubType:i,seriesConfig:r,colorMatch:a,lineColor:n}=s,o=!1,l,h,u=Jt(t.uid,"bulletTemplate");if(u!==void 0){ri(t.bulletsContainer,r.markerVisible!==!1&&r.visible!==!1);let{markerSymbol:c}=r;c===void 0&&(c=Nv(),c.color=n),a?c.color=n:c.color??=n;let d=wa({dataItem:t.dataItems[0]?.dataContext,seriesConfig:r,chartSubType:i,colorMatch:a});d?.outline&&(c.outline??=d.outline,c.outline.color=d.outline.color),nL({element:u,markerSymbol:c});let p=new Set,f;t.dataItems.forEach(m=>{let g=m.bullets?.[0]?.get("sprite");if(g!==void 0){let y=m?.dataContext,v=y[Y.xAxisField]===Y.nullValue,b=r.nullCategory?.markerSymbol,x=v&&b!==void 0?b:c,_=wa({dataItem:y,seriesConfig:r,chartSubType:i,colorMatch:a}),w=va({root:t.root,seriesIndex:e,seriesSymbol:x,element:g,colorMatch:a,rendererSymbol:_});l=w.symbolWithColorInfo,f=w.stylingInfo,Sf(g,f),v||(p.add(JSON.stringify(f)),h=w.symbolWithColorInfo)}}),o=p.size>1,l=h??l}return o?void 0:l}function FY(s,t){if(s.showArea===!0){let{color:e,opacity:i}=s.areaColor?_t(s.areaColor):{color:t.get("stroke"),opacity:Y.lineSeries.areaOpacity};t.set("fill",e),t.fills.template.set("fillOpacity",i)}t.fills.template.set("visible",s.showArea===!0)}function _F(s){let{series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,colorMatch:a,rendererType:n,chartSubType:o,seriesIndexMapper:l,seriesSymbolMapForEvent:h,isRotated:u}=s,{chart:c,root:d}=t;if(c){let p=t instanceof Ao;ri(t,e.visible);let f=PC({isRadarLineSeries:p,isLineSmoothed:e.lineSmoothed,isRotated:u});t.set("curveFactory",f);let m=AY({series:t,seriesConfig:e,seriesIndex:i,chartSubType:o,colorMatch:a,rendererType:n}),g=LY({series:t,seriesConfig:e,seriesIndex:i,chartSubType:o,colorMatch:a,lineColor:m.color});FY(e,t),h.set(l?.get(e.id)??i,{lineSymbol:m,markerSymbol:g}),h.size===r&&(Pa({data:Wi(h),htmlContainer:d.dom,chartId:t.chart?.get("id"),colorMatchApplied:gd(c)}),h.clear())}}function OY(s){let{root:t,chartConfig:e,xAxis:i,yAxis:r,seriesConfig:a,options:n,queryObject:o,errorStrings:l}=s,{id:h,name:u}=a,{xField:c,yField:d,xAxisField:p,yAxisField:f}=fd(e,a),m=yt.new(t,{id:h,name:u,xAxis:i,yAxis:r,[p]:c,[f]:d,maskBullets:!1,curveFactory:PC({isRadarLineSeries:!1,isLineSmoothed:a.lineSmoothed,isRotated:e.rotated}),layer:Y.zIndexes.customLayer5});m.appear();let g=dt.new({});return Or(g,n?.selectionTheme),Sr(m.uid,{bulletTemplate:g}),m.bullets.push((y,v,b)=>{let x=b?.dataContext?.legend===!0,_=Ke.new(y,{role:Y.aria.defaultChartItemRole,ariaLabel:No(),hoverOnFocus:!0,tooltip:yv({series:m,tooltipFormatter:n?.tooltipFormatter}),...x?{}:{layer:Y.zIndexes.customLayer5}},g);return x||(Hn({element:_,series:m,queryObject:o,errorStrings:l}),AL(_,m)),Ns.new(y,{sprite:_})}),m.strokes.template.set("lineJoin",Y.lineJoin),vC(m),m}function MY(s){let{lineSeries:t,data:e,seriesIndex:i,chartConfig:r,dataWasUpdated:a,seriesWereReinitialized:n,rotationChanged:o,stackedTypeChanged:l,timeZoneChanged:h,sortChanged:u}=s,c=r.series[i];if(e!==void 0&&i>=0&&i<r.series.length&&c.type===M.LineSeries&&(o===!0||a===!0||l===!0||h||n===!0||u===!0)){let{xField:d,yField:p,xAxisField:f,yAxisField:m}=fd(r,c);t.setAll({[f]:d,[m]:p}),t.data.setAll(e.dataItems)}}function IY(s){let{series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,colorMatch:a,rendererType:n,seriesIndexMapper:o,seriesSymbolMapForEvent:l}=s,{chart:h}=t;if(h!==void 0){let u=se(h.uid,"config"),c=se(h.uid,"isRotated")??!1,d=pt(u?.series);_F({series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,colorMatch:a,chartSubType:d,rendererType:n,seriesIndexMapper:o,seriesSymbolMapForEvent:l,isRotated:c})}}function RY(s,t){let{connectLines:e,temporalBinning:i}=t,r=i?.nullPolicy;s.set("connect",e!==!1&&r!==Fv.Null)}function VY(s){let{series:t,data:e,chartConfig:i,options:r,seriesIndex:a,dataWasUpdated:n,queryObject:o,fieldList:l,utilsStrings:h,rotationChanged:u,seriesWereReinitialized:c,timeZoneChanged:d,sortChanged:p,stackedTypeChanged:f}=s,m=i.series[a],g=i.rotated;t.set("id",m.id),ri(t,m.visible),ri(t.bulletsContainer,m.markerVisible!==!1&&m.visible!==!1);let y=Jt(t.uid,"bulletTemplate");y&&Or(y,r?.selectionTheme),gC({series:t,chartConfig:i,isRotated:g}),DY({seriesType:M.LineSeries,series:t,seriesConfig:m,isRotated:g,dataLabelsConfig:m.dataLabels,externalDataLabelFormatter:r?.dataLabelFormatter}),RY(t,m),MY({lineSeries:t,seriesIndex:a,data:e,chartConfig:i,dataWasUpdated:n,rotationChanged:u,stackedTypeChanged:f,seriesWereReinitialized:c,timeZoneChanged:d,sortChanged:p}),fC({series:t,seriesConfig:m,fieldList:l,queryObject:o,seriesIndex:a,tooltipFormatter:r?.tooltipFormatter,utilsStrings:h}),ml(s)&&gl({styleCallback:()=>IY(s),series:t,seriesConfig:m}),yC({chartConfig:i,series:t,seriesIndex:a,queryObject:o})}function NY(s){return s.component instanceof Gi}function EY(s){let{series:t,queryObject:e,errorStrings:i}=s,r=t.labels.template;r.set("cursorOverStyle","pointer"),r.setup=a=>{a.set("background",xi.new(a.root,{fill:a.root.interfaceColors.get("alternativeBackground"),fillOpacity:0}))},r.events.on(_i.Click,a=>{let{chart:n}=t,{dataItem:o}=a.target,l=(o instanceof cr&&NY(o)?o:void 0)?.get("slice");if(n&&l&&mC(n.uid)){let h=lL(a,t);pr({element:l,selected:fn(l.uid,"selected")!==!0}),h&&t.slices.each(u=>{u!==l&&pr({element:u,selected:!1})}),Af({chart:n,selectionSource:Ti.SelectionByClick,queryObject:e,errorStrings:i})}})}function BY(s,t){let e=s.labels.template;e.adapters.remove("text"),e.adapters.remove("html");let i=t!==void 0?"html":"text";e.adapters.add(i,(r,a)=>{let n=r??"",o=Jt(s.uid,"pieChartDataLabelFormatter");if(o){let l=a.dataItem;if(l){let h=l?.get("valuePercentTotal"),u=l?.get("value"),c=l?.get("category")??r??"",d=l.dataContext?.[Ee.originalXValue];n=o(c,u,h,d)}}return i==="html"?wr(n):n})}function jY(s){let t=s.dataItem?.component,e;if(t instanceof Gi){let i=se(t.chart?.uid??Number.NaN,"config");if(i?.series[0].type===M.PieSeries){let r=i.series[0].dataLabelsInside??Y.pieChart.dataLabelsInside,a=_t(i?.series[0].dataLabels?.content?.color).color,n=t.chart?.get("background")?.get("fill")??_t(Y.backgroundColor).color,o=se(t.chart?.uid??Number.NaN,"options")?.autoInverseDataLabelTextColor??Ee.options.autoInverseDataLabelTextColor,l=s.dataItem?.dataContext?.[Ee.pieChart.technicalFieldSliceId],h=t.slices.values.find(c=>(c.dataItem?.dataContext)[Ee.pieChart.technicalFieldSliceId]===l)?.get("fill")??_t(i.series[0].fillSymbol?.color).color,u=a??s.text.get("fill");e=u,u&&h&&o&&r&&(e=cL({textBackgroundColor:h,chartBackgroundColor:n}))}}return e}function WY(s){let{pieSeries:t,externalDataLabelFormatter:e,queryObject:i,errorStrings:r}=s,a=t.labels.template;a.set("cursorOverStyle","pointer"),a.setAll({cursorOverStyle:"pointer",maxWidth:Y.pieChart.dataLabels.maxWidth??Number.NaN,oversizedBehavior:Y.pieChart.dataLabels.wrap??!0?"wrap":"none",centerX:Oe,centerY:Oe}),EY({series:t,queryObject:i,errorStrings:r}),BY(t,e),a.adapters.add("fill",(n,o,l)=>jY(o))}function zY(s,t){let{numericValueFormat:e,percentValueFormat:i,displayNumericValueOnDataLabel:r,displayCategoryOnDataLabel:a,displayPercentageOnDataLabel:n,valuePrefix:o,valueSuffix:l,percentagePrefix:h,percentageSuffix:u,dataLabelsCharacterLimit:c}=t,{chart:d}=s,p;if(d){let f=pC({pieChart:d,valueIntlOptions:e?.intlOptions,percentageIntlOptions:i?.intlOptions,displayNumericValue:r??Y.pieChart.displayNumericValueOnDataLabel,displayPercentage:n??Y.pieChart.displayPercentageOnDataLabel,valuePrefix:o,valueSuffix:l,percentagePrefix:h,percentageSuffix:u}),m=Gf(c),g=ta(se(s.chart?.uid??Number.NaN,"rtl")??!1," ");p=(y,v,b)=>{let x=f(y,v,b),_=a??Y.pieChart.displayCategoryOnDataLabel?m(y):"",w=Ii(_)?"":`${_}${g}`;return w=`${w}${x}`,w}}return p}function HY(s){let{pieSeries:t,seriesConfig:e,dataLabelFormatter:i}=s,{dataLabels:r}=e,a=e.dataLabelsOffset??Y.pieChart.dataLabelsOffset,n=e.dataLabelsInside??Y.pieChart.dataLabelsInside;Sr(t.uid,{pieChartDataLabelFormatter:i??zY(t,e)}),Wa({label:t.labels.template,labelConfig:r,defaults:{...Y.pieChart.dataLabels,wrap:e.optimizeDataLabelsOverlapping??Y.pieChart.alignDataLabels}});let o=se(t.chart?.uid??0,"rtl"),l=!n&&(e.alignDataLabels??Y.pieChart.alignDataLabels),h=e.optimizeDataLabelsOverlapping===!0;t.set("alignLabels",l),t.labels.template.setAll({forceHidden:!(r&&r?.visible!==!1),breakWords:h?!1:void 0,textAlign:o?"right":"left"});let u=t.labels.template.get("radius"),c=t.labels.template.get("baseRadius");n&&c!==nt(60)?t.labels.template.setAll({radius:void 0,baseRadius:nt(60),textType:"regular"}):!n&&!h&&!l&&(t.labels.template.setAll({baseRadius:ne,textType:"adjusted"}),a!==void 0&&Number.isFinite(a)&&u!==a&&t.labels.template.set("radius",a))}var yS;function XY(s,t){let{ticks:e}=t,i=e?.visible===!1||t.dataLabelsInside===!0||t.dataLabels===void 0||t.dataLabels?.visible===!1||t.dataLabelsOffset!==void 0&&t.dataLabelsOffset<=0;s.ticks.template.setAll({visible:!i,crisp:!1});let r=e?.lineSymbol??Cd({color:Ef});i&&(r.width=0),Wn({element:s.ticks.template,lineSymbol:r,visible:!i})}function YY(s){let{series:t,pieSlicesSymbols:e,seriesConfig:i}=s;t.slices.each((r,a)=>{let n=r.dataItem?.dataContext,o=HS({dataContext:n,pieSlicesSymbols:e,seriesConfig:i});gh({root:t.root,element:r,fillSymbol:o,defaultToColorFromRamp:!0,colorRampIndex:a,isChartFillSymbol:!0})})}function UY(s,t){let{originalXValue:e}=Ee,i=new Map(s.map((r,a)=>[r[e],a]));return[...t].sort((r,a)=>(i.get(r[e])??1/0)-(i.get(a[e])??1/0))}function GY(s){let{series:t,data:e,seriesConfig:i,dataWasUpdated:r,sortChanged:a,seriesWereReinitialized:n,labelUpdateNeeded:o,groupOfSlicesUpdateNeeded:l}=s,{x:h,y:u}=i,c=pt([i]),d=c===_e.PieFromFields?yn:h;if(e&&(r===!0||n===!0||a===!0||l===!0))t.setAll({categoryField:d,valueField:c===_e.PieFromFields?Ah:u}),t.data.setAll(e.dataItems);else if(e&&o){let p=t.dataItems,f=p.map(g=>g.dataContext),m=UY(f,e.dataItems);p.forEach((g,y)=>{let v=m[y];if(typeof v[d]=="string"){let b=v[d];g.set("category",b);let x=g.dataContext;x&&(x[d]=b)}}),t.markDirty()}}function qY(s,t){let{innerRadius:e}=t;s.set("innerRadius",e?nt(e):0)}function KY(s,t){let{startAngle:e,endAngle:i}=t;s.setAll({startAngle:e??Y.pieChart.min,endAngle:i??360+(s.get("startAngle")??0)})}function ZY(s){let{root:t,seriesConfig:e,options:i,chart:r,chartConfig:a,queryObject:n,errorStrings:o}=s,{id:l,name:h,x:u,y:c}=e,d=pt([e]),p=Gi.new(t,{id:l,name:h,categoryField:d===_e.PieFromFields?yn:u,valueField:d===_e.PieFromFields?Ah:c});return WY({pieSeries:p,externalDataLabelFormatter:i?.dataLabelFormatter,queryObject:n,errorStrings:o}),vL(p,i?.tooltipFormatter),p.slices.template.states.create("hover",{scale:1,stateAnimationDuration:0}),Or(p.slices.template,i?.selectionTheme),Hn({element:p.slices.template,series:p,queryObject:n,errorStrings:o}),vv(p,a),p.appear(),r instanceof hs&&CF(r,p),p}function JY(s){let{series:t,seriesConfig:e,seriesWereReinitialized:i,dataWasUpdated:r,sortChanged:a,data:n,options:o,labelUpdateNeeded:l,utilsStrings:h,groupOfSlicesUpdateNeeded:u}=s,{dataLabelFormatter:c,tooltipFormatter:d}=o??{};t.set("id",e.id),ri(t,e.visible),Or(t.slices.template,o?.selectionTheme),GY({series:t,seriesConfig:e,seriesWereReinitialized:i,dataWasUpdated:r,sortChanged:a,data:n,labelUpdateNeeded:l,groupOfSlicesUpdateNeeded:u}),ml(s)&&gl({styleCallback:()=>YY(s),series:t,seriesConfig:e}),HY({pieSeries:t,seriesConfig:e,dataLabelFormatter:c}),qY(t,e),KY(t,e),XY(t,e),Dz({series:t,seriesConfig:e,tooltipFormatter:d});let{chart:p}=t;p instanceof hs&&CF(p,t)}function SF(s,t){let e=nt(se(s.uid,"pieChartRadius")??Y.pieChart.chartOptimizedRadius),i=e,r=s.series?.values?.[0]??t,a=se(s.uid,"config");if(a!==void 0){let{series:n}=a,{innerRadius:o,optimizeDataLabelsOverlapping:l,alignDataLabels:h,dataLabelsOffset:u=Y.pieChart.dataLabelsOffset,dataLabels:c,dataLabelsInside:d}=n[0];if(c?.visible===!0&&h===!0&&l===!0&&d!==!0){let p=Y.pieChart.chartOptimizedRadius/100,f=500,m=150,g=.6,y=.5,v=1,b=s.seriesContainer.width()-u*2,x=Math.max(b-m,0)/(f-m),_=x<1?Math.max(x**v*g,.4):Math.min(x**y*g,p);i=nt(_*100)}else i=nt(Y.pieChart.chartRadius);e.value.toFixed(1)!==i.value.toFixed(1)&&(Fr(s.uid,{pieChartRadius:i.percent}),yS&&clearTimeout(yS),yS=pl(()=>{let p=s.chartContainer.height();if(s.chartContainer.set("height",p+.1),s.set("radius",i),o&&!Number.isNaN(o)&&o>0){let f=(o??Y.pieChart.innerRadius)*i.value;s.set("innerRadius",nt(f))}s.markDirty(),r?.markDirty(),s.root.resize(),eU(s)})),r instanceof Gi&&r.labels.template.setAll({maxWidth:tU({seriesConfig:a?.series[0],chart:s,newChartRadius:i})})}}function QY(s){s.isDisposed()||s.events.onDebounced(_i.BoundsChanged,()=>SF(s),Y.debounceTime)}function CF(s,t){if(!s.isDisposed()){let e=s.radius();Fr(s.uid,{pieChartRadius:e}),SF(s,t)}}function eU(s){pl(()=>{s.chartContainer.set("height",nt(100)),s.root.resize()})}function tU(s){let{seriesConfig:t,chart:e,newChartRadius:i}=s,r=Y.pieChart.dataLabels.maxWidth??100;if(t!=null){let{alignDataLabels:a,dataLabelsOffset:n=Y.pieChart.dataLabelsOffset,optimizeDataLabelsOverlapping:o,dataLabels:l,dataLabelsInside:h}=t;if(l?.visible===!0&&a===!0&&h!==!0&&o===!0){let u=e.seriesContainer.width(),c=e.seriesContainer.height(),d=i.value*Math.min(u,c),p=5,f=Math.floor((u-d)/2)-p-n;r=Math.min(f,r-p);let m=Y.pieChartDataLabel.minWidth;r<m&&(r=m)}}return r}function iU(s){let{root:t,chartConfig:e,xAxis:i,yAxis:r,seriesConfig:a,options:n,queryObject:o,errorStrings:l}=s,{id:h,name:u}=a,{xField:c,yField:d,xAxisField:p,yAxisField:f}=fd(e,a),m=Ao.new(t,{id:h,name:u,xAxis:i,yAxis:r,[p]:c,[f]:d,curveFactory:PC({isRadarLineSeries:!0,isLineSmoothed:a.lineSmoothed,isRotated:e.rotated}),layer:Y.zIndexes.customLayer5});m.appear();let g=dt.new({});return Sr(m.uid,{bulletTemplate:g}),Or(g,n?.selectionTheme),m.bullets.push(y=>{let v=Ke.new(y,{role:Y.aria.defaultChartItemRole,ariaLabel:No(),hoverOnFocus:!0,tooltip:yv({series:m,tooltipFormatter:n?.tooltipFormatter}),layer:Y.zIndexes.customLayer5},g);return Hn({element:v,series:m,queryObject:o,errorStrings:l}),Ns.new(y,{sprite:v})}),m.strokes.template.set("lineJoin",Y.lineJoin),vC(m),m}function rU(s){let{radarLineSeries:t,data:e,seriesIndex:i,chartConfig:r,dataWasUpdated:a,seriesWereReinitialized:n,stackedTypeChanged:o,timeZoneChanged:l}=s,h=r.series[i];if(e!==void 0&&h?.type===M.RadarSeries&&(a||l||n||o)){let{xField:u,yField:c,xAxisField:d,yAxisField:p}=fd(r,h);t.setAll({[d]:u,[p]:c}),t.data.setAll(e.dataItems)}}function sU(s){let{series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,colorMatch:a,rendererType:n,seriesIndexMapper:o,seriesSymbolMapForEvent:l}=s,{chart:h}=t;if(h!==void 0){let u=se(h.uid,"config"),c=se(h.uid,"isRotated")??!1,d=pt(u?.series);_F({series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,colorMatch:a,chartSubType:d,rendererType:n,seriesIndexMapper:o,seriesSymbolMapForEvent:l,isRotated:c})}}function aU(s){let{series:t,data:e,seriesWereReinitialized:i,chartConfig:r,options:a,seriesIndex:n,dataWasUpdated:o,timeZoneChanged:l,stackedTypeChanged:h,fieldList:u,queryObject:c,utilsStrings:d}=s,p=r.series[n];t.set("id",p.id),ri(t,p.visible),ri(t.bulletsContainer,p.markerVisible!==!1&&p.visible!==!1);let f=Jt(t.uid,"bulletTemplate");f&&Or(f,a?.selectionTheme),gC({series:t,chartConfig:r,isRotated:!1}),fC({series:t,seriesConfig:p,fieldList:u,queryObject:c,seriesIndex:n,tooltipFormatter:a?.tooltipFormatter,utilsStrings:d}),ml(s)&&gl({styleCallback:()=>sU(s),series:t,seriesConfig:p}),yC({chartConfig:r,series:t,seriesIndex:n,queryObject:c}),rU({radarLineSeries:t,data:e,seriesIndex:n,chartConfig:r,dataWasUpdated:o,timeZoneChanged:l,stackedTypeChanged:h,seriesWereReinitialized:i})}function TC(s){let{chart:t,chartConfig:e,options:i,utilsStrings:r,queryObject:a,errorStrings:n}=s,{rotated:o}=e,{root:l}=t,h=Ie(e.series);t.series.clear();let u={root:l,chartConfig:e,options:i,chart:t,utilsStrings:r,queryObject:a,errorStrings:n},c=[];for(let d=0;d<e.series.length;d+=1){let p=e.series[d],{assignToSecondValueAxis:f,type:m}=p,g=t instanceof Ut?$H({chart:t,chartType:h,rotated:o,assignToSecondValueAxis:f}):void 0,{xAxis:y,xAxisForHistogramOverlaySeries:v,yAxis:b}=g??{};switch(!0){case m===M.HeatSeries:{gn(a),y&&b&&c.push(a5({...u,queryObject:a,xAxis:y,yAxis:b}));break}case h===M.BoxPlotSeries:{y&&b&&Vo(e)&&c.push(...TY({...u,xAxis:y,yAxis:b,seriesIndex:d,seriesConfig:e.series[d],chartConfig:e}));break}case m===M.HistogramSeries:{y&&b&&c.push(...Zz({...u,seriesConfig:p,xAxis:y,xAxisForOverlaySeries:v,yAxis:b}));break}case m===M.PieSeries:{c.push(ZY({...u,seriesConfig:p}));break}case(h===M.ComboLineAndBarSeries||h===M.BarSeries||h===M.LineSeries):{y&&b&&(m===M.BarSeries?c.push(J5({...u,seriesConfig:p,xAxis:y,yAxis:b})):m===M.LineSeries&&c.push(OY({...u,seriesConfig:p,xAxis:y,yAxis:b})));break}case m===M.RadarSeries:{y&&b&&c.push(iU({...u,seriesConfig:p,xAxis:y,yAxis:b}));break}case m===M.ScatterSeries:{y&&b&&c.push(...nH({...u,seriesConfig:p,xAxis:y,yAxis:b}));break}}}c.forEach(d=>{d instanceof Bs&&d.setPrivate("doNotUpdateLegend",!0)}),t.series.pushAll(c),t instanceof Ut&&c.forEach(d=>{d instanceof yt&&d.get("maskBullets")===!1&&LH(d,t)})}function wv(s){let{chart:t,chartConfig:e,options:i,data:r,seriesIndexMapper:a,dataWasUpdated:n,sortChanged:o,seriesWereReinitialized:l,rotationChanged:h,colorMatchChanged:u,stackedTypeChanged:c,seriesStyleChanged:d,timeZoneChanged:p,sizePolicyChanged:f,pieSlicesSymbols:m,queryObject:g,utilsStrings:y,errorStrings:v,groupOfSlicesUpdateNeeded:b,labelUpdateNeeded:x}=s,{chartRenderer:_}=e,{root:w}=t,{series:C}=e,P=Ie(e.series),D=pt(e.series),$=t.series.values,A=Io(e),T=e.series.length,I=new Map,N=Ws(g,i?.popupTemplateFieldInfosEnabled),B=ms(g),j=ss(B)?void 0:am(_,B.renderer),z=l||n||o||h||c,K={root:w,chartConfig:e,queryObject:g,options:i,colorMatch:A,dataWasUpdated:n,sortChanged:o,seriesWereReinitialized:l,fieldList:N,rendererType:j,dataLabelFormatter:i?.dataLabelFormatter,utilsStrings:y,chartSubType:D,autoInverseDataLabelTextColor:i?.autoInverseDataLabelTextColor??Y.options.autoInverseDataLabelTextColor},V={...K,numberOfSeries:T,rotationChanged:h,colorMatchChanged:u,stackedTypeChanged:c,seriesStyleChanged:d,seriesIndexMapper:a,seriesSymbolMapForEvent:I,timeZoneChanged:p};for(let E=0;E<C.length;E++){let re=C[E],X=$[E],Z=re.type;switch(!0){case P===M.HeatSeries:{X instanceof Zt&&t instanceof Ut&&vn(e)&&h5({...V,series:X,data:r,seriesConfig:e.series[E],chartConfig:e});break}case P===M.BoxPlotSeries:{X=$.find(ue=>ue.get("id")===re.id),t instanceof Ut&&Vo(e)&&(X instanceof Zs||X instanceof yt)&&(Z===M.BoxPlotSeries||Z===M.LineSeries)&&$Y({...V,chart:t,series:X,data:r,seriesIndex:E,seriesConfig:re,chartConfig:e,showMean:As(e),showOutliers:Kn(e)});break}case Z===M.HistogramSeries:{X instanceof Zt&&t instanceof Ut&&aw(r)&&tH({...V,series:X,allChartSeries:$,data:r,seriesIndex:E,seriesConfig:re,axes:e.axes});break}case Z===M.PieSeries:{X instanceof Gi&&t instanceof hs&&Kf(r)&&JY({...K,series:X,seriesConfig:re,data:r,pieSlicesSymbols:m,groupOfSlicesUpdateNeeded:b,seriesStyleChanged:d,colorMatchChanged:u,labelUpdateNeeded:x});break}case(P===M.ComboLineAndBarSeries||P===M.BarSeries||P===M.LineSeries):t instanceof Ut&&Kf(r)&&(Z===M.BarSeries&&X instanceof Zt?iY({...V,series:X,data:r,seriesIndex:E}):Z===M.LineSeries&&X instanceof yt&&VY({...V,series:X,seriesIndex:E,seriesConfig:re,data:r}));break;case Z===M.ScatterSeries:{X=rH(t);let ue=CL(t);X instanceof yt&&ue instanceof yt&&nw(r)&&uH({...V,series:X,seriesConfig:re,trendLineSeries:ue,sizePolicyChanged:f,data:r});break}case Z===M.RadarSeries:{X instanceof Ao&&t instanceof Ks&&Kf(r)&&aU({...V,series:X,data:r,seriesIndex:E,seriesConfig:re,chartConfig:e});break}}z&&P&&X&&zz({chartType:P,series:X,tooltipFormatter:i?.tooltipFormatter})}bH({chart:t,options:i,dataWasUpdated:n,data:r,chartConfig:e,queryObject:g,errorStrings:v})}function nU(s){zn(s)||s.dataItems.forEach(t=>{let e=t.bullets?.[0];if(e){let i=e.get("sprite"),r=fn(i.uid,"selected")!==!0;pr({element:i,selected:r})}})}function oU(s){s.columns.each(t=>{if(!t.dataItem?.dataContext?.[Ku]){let e=fn(t.uid,"selected")!==!0;pr({element:t,selected:e})}})}function lU(s){s.slices.each(t=>{let e=fn(t.uid,"selected")!==!0;pr({element:t,selected:e})})}async function hU(s){let{chart:t,queryObject:e,errorStrings:i}=s;if(cC(t)){let r=se(t.uid,"actionMode");r!==vt.MonoSelection&&r!==vt.None&&(t.series.each(a=>{switch(!0){case a instanceof Zt:oU(a);break;case a instanceof yt:nU(a);break;case a instanceof Gi:lU(a);break}}),await Af({chart:t,selectionSource:Ti.ProgrammaticSelection,queryObject:e,errorStrings:i}))}}function uU(s,t){let e=!1,i=s.series,r=t.series,a=Ie(r),n=(d,p)=>d.filter(f=>f.type===p).flatMap(f=>{let m=[];switch(p){case M.BarSeries:case M.HistogramSeries:m.push(f.fillSymbol);break;case M.LineSeries:case M.RadarSeries:m.push(f.lineSymbol,f.markerSymbol);break;case M.ScatterSeries:m.push(f.markerSymbol);break;case M.PieSeries:let g=f;m.push(g.fillSymbol),g.slices?.forEach(y=>{m.push(y.fillSymbol)}),g.sliceGrouping&&m.push(g.sliceGrouping.fillSymbol);break}return f.type===M.BarSeries?m.push(cm(f.nullCategory)):(f.type===M.LineSeries||f.type===M.RadarSeries)&&m.push(f.nullCategory?.markerSymbol),m}),o,l;a===M.ComboLineAndBarSeries?(o=n(i,M.BarSeries).concat(n(i,M.LineSeries)),l=n(r,M.BarSeries).concat(n(r,M.LineSeries))):(o=n(i,i[0].type),l=n(r,r[0].type));let h=!ea(o,l),u=!ea(s.roundCorners,t.roundCorners),c=!1;switch(a){case M.LineSeries:case M.RadarSeries:case M.ComboLineAndBarSeries:c=r.filter(d=>d.type===M.LineSeries||d.type===M.RadarSeries).some(d=>{let p=i.find(f=>f.id===d.id);return(d.showArea??Y.lineSeries.showArea)!==(p?.showArea??Y.lineSeries.showArea)||(d.lineSmoothed??Y.lineSeries.lineSmoothed)!==(p?.lineSmoothed??Y.lineSeries.lineSmoothed)||(d.markerVisible??Y.lineSeries.markerVisible)!==(p?.markerVisible??Y.lineSeries.markerVisible)||d.showArea&&!ea(d.areaColor,p?.areaColor)}),a===M.ComboLineAndBarSeries&&(c=c||u);break;case M.BarSeries:c=u;break;case M.ScatterSeries:c=xb(s,t);break}return e=h||c,e}function cU(){p_(NW)}function dU(s){s.dispose()}function pU(s){let{chart:t,chartContainer:e,chartLocale:i}=s,{root:r}=t,{t9nLocale:a}=Sh(e??document.documentElement),n=tc(e??document.documentElement);r.locale=i,Fr(t.uid,{locale:a,formatLocale:n,rtl:Mf(e??document.documentElement)==="rtl"})}function RS(s){let{chart:t,actionMode:e,cursorRange:i}=s;if(cC(t)){let r=se(t.uid,"actionMode"),a=e??r??Y.actionMode;Fr(t.uid,{actionMode:a}),a===vt.None&&bh({chart:t,selectionSource:Ti.ClearSelection}),ZX({chart:t,actionMode:a,cursorRange:i})}}function fU(s){return Gs.rootElements.find(t=>t.dom===s)?.dispose(),hf.new(s)}function mU(s,t){s.container.children.clear();let e=Ie(t?.series),i;switch(e){case M.RadarSeries:case M.GaugeSeries:i=Ks;break;case M.PieSeries:i=hs;break;default:i=Ut;break}return s.container.children.push(i.new(s,{id:`${t?.id}`,layout:s.verticalLayout,paddingBottom:Y.chartPadding,paddingTop:Y.chartPadding,paddingRight:Y.chartPadding,paddingLeft:Y.chartPadding}))}function gU(s){let{chart:t,chartConfig:e,data:i,dataWasUpdated:r,sortChanged:a,slicesConfigChangedSinceLastUpdate:n,chartRendererChanged:o,colorMatchChanged:l,pieSlicesSymbols:h,options:u,queryObject:c,utilsStrings:d,errorStrings:p,groupOfSlicesUpdateNeeded:f,seriesStyleChanged:m}=s;wv({chart:t,chartConfig:e,options:u,data:i,dataWasUpdated:r,sortChanged:a,queryObject:c,pieSlicesSymbols:h,utilsStrings:d,errorStrings:p,groupOfSlicesUpdateNeeded:f,seriesStyleChanged:m,colorMatchChanged:l,labelUpdateNeeded:r||n||o||l}),Pa({data:h,htmlContainer:t.root.dom,chartId:t.get("id"),colorMatchApplied:gd(t)})}function yU(s){let{chart:t,chartConfig:e,data:i,anyGuideAboveChanged:r,dataWasUpdated:a,dataUpdateDetails:n,seriesIndexMapper:o,seriesFilteredOut:l,sortChanged:h,options:u,queryObject:c,rotationChanged:d,colorMatchChanged:p,stackedTypeChanged:f,seriesCompositionChanged:m,heatChartHideEmptyRowsAndColumnsChanged:g,seriesStyleChanged:y,timeZoneChanged:v,timeIntervalInfoWasReset:b,sizePolicyChanged:x,sizePolicyChangesRequireSeriesReinit:_,utilsStrings:w,errorStrings:C}=s,{axisLabelsBehaviorChanged:P}=s,D=jH({chart:t,chartConfig:e,rotationChanged:d,axisLabelsBehaviorChanged:P,timeIntervalInfoWasReset:b}),$=D||kH({currentChartSeriesCount:t.series.length,chartConfig:e,dataUpdateDetails:n,seriesFilteredOut:l,sizePolicyChangesRequireSeriesReinit:_,seriesCompositionChanged:m});return D&&(HL({chart:t,chartConfig:e,errorStrings:C,queryObject:c}),P=[!0,!0]),$&&(t.series.clear(),TC({chart:t,chartConfig:e,options:u,utilsStrings:w,queryObject:c,errorStrings:C}),t.gridContainer?.toBack?.()),XL({chart:t,chartConfig:e,queryObject:c,data:i,dataWasUpdated:a,axesInitializationNeeded:D,heatChartHideEmptyRowsAndColumnsChanged:g,sortChanged:h,timeIntervalInfo:i?.timeIntervalInfo??se(t.uid,"timeIntervalInfo"),axisLabelsBehaviorChanged:P,anyGuideAboveChanged:r,xAxisLabelFormatter:u?.xAxisLabelFormatter,yAxisLabelFormatter:u?.yAxisLabelFormatter,secondaryYAxisLabelFormatter:u?.secondaryYAxisLabelFormatter,guideTooltipFormatter:u?.guideTooltipFormatter,gaugeInnerLabelFormatter:u?.gaugeInnerLabelFormatter,utilsStrings:w,errorStrings:C}),wv({chart:t,chartConfig:e,options:u,data:i,dataWasUpdated:a,sortChanged:h,seriesIndexMapper:o,seriesWereReinitialized:$,rotationChanged:d,colorMatchChanged:p,stackedTypeChanged:f,seriesStyleChanged:y,timeZoneChanged:v,sizePolicyChanged:x,queryObject:c,utilsStrings:w,errorStrings:C}),Ie(e.series)===M.HeatSeries&&tF(t),yF({chart:t,scrollbarXConfig:e.axes?.[0]?.scrollbar,scrollbarYConfig:e.axes?.[1]?.scrollbar}),$}function vU(s){let{chart:t,legend:e,updateProps:i}=s,{chartConfig:r,options:a,dataWasUpdated:n,dataUpdateDetails:o,hasSeriesFilteredOut:l,pieSlicesSymbols:h,colorMatchApplied:u,rendererFieldNames:c,configWithAllSeries:d,t9nStrings:p,queryObject:f,dataInfo:m}=i,{data:g}=m,{utilsStrings:y,errorStrings:v}=p,{root:b}=t,{popupTemplateFieldInfosEnabled:x}=a??{};if(r===void 0)throw new Error;let _=se(t.uid,"config");if(t.isDisposed()||!Zv(_,r))throw new Gn(Zu.ChartDisposed);_??=r,Fr(t.uid,{queryObject:f});let w=pt(r.series),C=zr(r);Fr(t.uid,{config:Wi(r),options:a,isNonAggregatedChart:!Ad(w),isRotated:C,filterBySelection:a?.filterBySelection,colorMatchApplied:u,rendererFieldNames:c});let P=Ws(f,x),D=Ww(_,r),$=bb(_,r),A=gb(_,r),T=Ow(_,r),I=uU(_,r),N=JSON.stringify(wd(_.series))!==JSON.stringify(wd(r.series)),B=um(_,r),j=Xw(_,r),z=vb(_,r),K=xb(_,r),V=Yw(_,r),E=Rd({oldConfig:l?d:_,newConfig:r,dataWasUpdated:n}),re=!1,X=!1,Z=!1,ue=!1;vn(_)&&vn(r)&&(re=Vw(_,r),X=Iw(_,r),Z=Mw(_,r)||Rw(_,r)||re,ue=Fw(_,r));let Le=Yv({oldConfig:_,newConfig:r,rotationChanged:$}),we=_.series,Te=r.series;if(n){let{queryConfig:le,count:oe}=m??{};Fr(t.uid,{fieldList:P,queryConfig:le,elementCount:oe,timeIntervalInfo:g!==void 0&&"timeIntervalInfo"in g?g.timeIntervalInfo:void 0})}t instanceof Kr&&HW({chartSeries:t.series,oldSeries:we,newSeries:Te});let Ze=t instanceof hs?zS(we,Te):!1,Ve=yb({oldConfig:_,newConfig:r}),kt=new Map;(d??r).series.forEach((le,oe)=>{kt.set(le.id,oe)}),YL(t,r.background),KL(t,{title:r.title,subtitle:r.subtitle}),ZL(t,r.footer),qL({root:b,chart:t,cursorCrosshair:r.cursorCrosshair,config:r,queryObject:f,errorStrings:v});let Wt=Ie(r.series),O=!1;switch(Wt){case M.PieSeries:{t instanceof hs&&(gn(f),gU({chart:t,chartConfig:r,options:a,data:g,dataWasUpdated:n,slicesConfigChangedSinceLastUpdate:Ve,pieSlicesSymbols:h,chartRendererChanged:B,sortChanged:E,queryObject:f,colorMatchChanged:A,utilsStrings:y,errorStrings:v,groupOfSlicesUpdateNeeded:Ze,seriesStyleChanged:I}));break}case M.HeatSeries:case M.BarSeries:case M.LineSeries:case M.ComboLineAndBarSeries:case M.ScatterSeries:case M.RadarSeries:case M.GaugeSeries:case M.HistogramSeries:case M.BoxPlotSeries:t instanceof Ut&&(O=yU({chart:t,chartConfig:r,options:a,data:g,dataWasUpdated:n,seriesIndexMapper:kt,dataUpdateDetails:o,seriesFilteredOut:l,heatChartHideEmptyRowsAndColumnsChanged:ue,sortChanged:E,axisLabelsBehaviorChanged:Le,anyGuideAboveChanged:D,rotationChanged:$,colorMatchChanged:A,stackedTypeChanged:T,seriesStyleChanged:I,seriesCompositionChanged:N,timeZoneChanged:j,timeIntervalInfoWasReset:z,sizePolicyChanged:K,sizePolicyChangesRequireSeriesReinit:V,queryObject:f,utilsStrings:y,errorStrings:v}));break}if(t instanceof Kr){let le=()=>{mF({chart:t,chartConfig:r,legend:e,showEmptySeries:a?.showEmptySeries??a?.hideEmptySeries===!1,seriesConfig:r.series,heatChartLegendUpdatedNeeded:Z,heatRulesTypeChanged:re,heatLegendPositionChanged:X,queryObject:f})};O?pl(le):le()}RS({chart:t,actionMode:a?.actionMode,cursorRange:a?.cursorRange}),kL(t),Z1({chart:t,chartConfig:r,delayCallback:n})}function bU(s){let{chart:t,data:e,chartConfig:i,pieSlicesSymbols:r,options:a,queryObject:n,utilsStrings:o,errorStrings:l}=s;QY(t),TC({chart:t,chartConfig:i,options:a,utilsStrings:o,queryObject:n,errorStrings:l}),wv({chart:t,chartConfig:i,options:a,data:e,dataWasUpdated:!0,pieSlicesSymbols:r,queryObject:n,utilsStrings:o,errorStrings:l}),Pa({data:r,htmlContainer:t.root.dom,chartId:t.get("id"),colorMatchApplied:gd(t)})}function xU(s){let{chart:t,data:e,chartConfig:i,options:r,queryObject:a,seriesIndexMapper:n,utilsStrings:o,errorStrings:l}=s;gF(t),yF({chart:t,scrollbarXConfig:i.axes?.[0]?.scrollbar,scrollbarYConfig:i.axes?.[1]?.scrollbar}),HL({chart:t,chartConfig:i,errorStrings:l,queryObject:a}),XL({chart:t,chartConfig:i,queryObject:a,axisLabelsBehaviorChanged:[!0,!0],data:e,dataWasUpdated:!0,timeIntervalInfo:e?.timeIntervalInfo,xAxisLabelFormatter:r?.xAxisLabelFormatter,yAxisLabelFormatter:r?.yAxisLabelFormatter,secondaryYAxisLabelFormatter:r?.secondaryYAxisLabelFormatter,guideTooltipFormatter:r?.guideTooltipFormatter,gaugeInnerLabelFormatter:r?.gaugeInnerLabelFormatter,utilsStrings:o,errorStrings:l}),TC({chart:t,chartConfig:i,options:r,utilsStrings:o,queryObject:a,errorStrings:l}),t.gridContainer?.toBack?.(),wv({chart:t,chartConfig:i,seriesIndexMapper:n,options:r,data:e,dataWasUpdated:!0,timeZoneChanged:!0,queryObject:a,utilsStrings:o,errorStrings:l}),Ie(i.series)===M.HeatSeries&&tF(t)}function _U(s){let{chartContainer:t,chartConfig:e,options:i,colorMatchApplied:r,rendererFieldNames:a,pieSlicesSymbols:n,globalOptions:o,t9nStrings:l,queryObject:h,dataInfo:u}=s,{errorStrings:c,utilsStrings:d,amChartsStrings:p}=l,{data:f,queryConfig:m,count:g}=u??{};cU();let y=fU(t);qW(y,o?.animationEnabled),GW(y,o?.enableResponsiveFeatures);let v=mU(y,e);pU({chart:v,chartContainer:t,chartLocale:p});let b;if(!v.isDisposed()){let _=pt(e.series),w=zr(e);Fr(v.uid,{options:i,filterBySelection:i?.filterBySelection,config:e,queryObject:h,isNonAggregatedChart:!Ad(_),isRotated:w,colorMatchApplied:r,rendererFieldNames:a}),GL({root:y,chart:v,config:e,queryObject:h,errorStrings:c}),qL({root:y,chart:v,cursorCrosshair:e.cursorCrosshair,config:e,queryObject:h,errorStrings:c});let{title:C,subtitle:P,footer:D}=e;QX(y,v),KL(v,{title:C,subtitle:P}),e5(v),ZL(v,D),GX(y,v),YL(v,e.background);let $=Ws(h,i?.popupTemplateFieldInfosEnabled);Fr(v.uid,{fieldList:$}),Fr(v.uid,{options:i,queryConfig:m,elementCount:g,timeIntervalInfo:f!==void 0&&"timeIntervalInfo"in f?f.timeIntervalInfo:void 0});let A=new Map;e.series.forEach((T,I)=>{A.set(T.id,I)}),Fr(v.uid,{queryConfig:m,elementCount:g}),v instanceof Ut?xU({chart:v,data:f,chartConfig:e,options:i,queryObject:h,utilsStrings:d,errorStrings:c}):v instanceof hs&&f&&"dataItems"in f&&(gn(h),bU({chart:v,data:f,chartConfig:e,pieSlicesSymbols:n,options:i,queryObject:h,utilsStrings:d,errorStrings:c})),v instanceof Kr&&(b=OA(v,e),mF({chart:v,chartConfig:e,legend:b,showEmptySeries:i?.showEmptySeries??i?.hideEmptySeries===!1,seriesConfig:e.series,queryObject:h})),RS({chart:v,actionMode:i?.actionMode,cursorRange:i?.cursorRange}),kL(v),xH(v),Z1({chart:v,chartConfig:e,delayCallback:!0})}function x(){tX(v)}return{update:_=>{b===void 0&&(b=OA(v,_.chartConfig)),vU({chart:v,legend:b,updateProps:_})},dispose:()=>dU(y),resetZoom:x,clearSelection:()=>bh({chart:v}),switchSelection:async()=>await hU({chart:v,queryObject:h,errorStrings:l.errorStrings}),setActionMode:(_,w)=>RS({chart:v,actionMode:_,cursorRange:w})}}function VA(s){let t="";for(let i=0;i<s.length;i+=1){let r=s[i];if(r.message&&r.message.trim()!==""){let a=s.length>1?"li":"p";t+=`<${a}>${r.message}</${a}>`}}let e=s.length>1?"ol":"div";return`<${e}>${t}</${e}>`}function SU(s){let{chartConfig:t,createMessage:e,status:i,errorStrings:r}=s,{schemaErrors:a,customErrors:n,warnings:o}=i,l="",h="";return t===void 0?(h=e===void 0?r.modalHeaders.newChart:"",l=e??r.errors.newChartRequest):a.length>0?(h=r.modalHeaders.error,l=r.errors.simpleError):n.length>0?(h=r.modalHeaders.error,l=VA(n)):o.length>0&&(h=r.modalHeaders.warning,l=`<p>${r.errors.warningRequest}</p>${VA(o)}`),{title:h,message:l}}function CU(s,t){let e;switch(s){case M.PieSeries:e=t?.placeholders.pieChartCreateMsg;break;case M.BarSeries:e=t?.placeholders.barChartCreateMsg;break;case M.BoxPlotSeries:e=t?.placeholders.boxPlotCreateMsg;break;case M.LineSeries:e=t?.placeholders.lineChartCreateMsg;break;case M.HistogramSeries:e=t?.placeholders.histogramCreateMsg;break;case M.ScatterSeries:e=t?.placeholders.scatterplotCreateMsg;break;case M.HeatSeries:e=t?.placeholders.calendarHeatChartCreateMsg;break;case M.ComboLineAndBarSeries:e=t?.placeholders.comboBarLineChartCreateMsg;break;case M.RadarSeries:e=t?.placeholders.radarChartCreateMsg;break;case M.GaugeSeries:e=t?.placeholders.gaugeCreateMsg;break}return e}function mf(s){let t;if(s){let e=sL(s);e&&(t=[e.r,e.g,e.b,255])}return t}function wU(s,t){let e=window.getComputedStyle(s);return{backgroundColor:mf(e.getPropertyValue(t.background)),textColor:mf(e.getPropertyValue(t.text)),lineColor:mf(e.getPropertyValue(t.line)),secondaryLineColor:mf(e.getPropertyValue(t.secondaryLine)),spinnerColor:mf(e.getPropertyValue(t.spinner))}}function PU(s){let{config:t,themeColors:e}=s,i=$h().toString();t?.axes?.forEach(r=>{e.textColor&&(r?.title?.content&&(!r.title.content.color||r.title.content.color.toString()===i)&&(r.title.content.color=e.textColor),r?.labels?.content&&(!r.labels.content.color||r.labels.content.color.toString()===i)&&(r.labels.content.color=e.textColor));let a=$h();a[3]=Iv,r?.grid&&e.secondaryLineColor&&(!r.grid.color||r.grid.color.toString()===a.toString())&&(r.grid.color=e.secondaryLineColor,r.grid.color[3]=Iv),r?.lineSymbol&&e.lineColor&&(!r.lineSymbol.color||r.lineSymbol.color.toString()===NC.toString())&&(r.lineSymbol.color=e.lineColor),r?.guides?.forEach(n=>{n.label&&e.textColor&&(!n.label.color||n.label.color.toString()===i)&&(n.label.color=e.textColor),e.lineColor&&(n.style?.type===Pt.SLS&&(!n.style.color||n.style.color.toString()===Vb.style.color?.toString())?n.style.color=e.lineColor:n.style?.type===Pt.SFS&&n.style?.outline&&(!n.style.outline.color||n.style.outline.color.toString()===Vb.style.color?.toString())&&(n.style.outline.color=e.lineColor))})})}function TU(s){let{config:t,themeColors:e}=s;t&&e.backgroundColor&&(!t.background||t.background.toString()===WC().toString())&&(t.background=e.backgroundColor)}function $U(s){let{config:t,themeColors:e}=s,i=$h().toString();e.textColor&&(t?.title?.content&&(!t.title.content.color||t.title.content.color.toString()===i)&&(t.title.content.color=e.textColor),t?.subtitle?.content&&(!t.subtitle.content.color||t.subtitle.content.color.toString()===i)&&(t.subtitle.content.color=e.textColor),t?.footer?.content&&(!t.footer.content.color||t.footer.content.color.toString()===i)&&(t.footer.content.color=e.textColor))}function DU(s){let{config:t,themeColors:e}=s;t&&e.textColor&&t.series.forEach(i=>{i.dataLabels?.content&&(!i.dataLabels.content.color||i.dataLabels.content.color.toString()===$h().toString())&&(i.dataLabels.content.color=e.textColor)})}function kU(s){let{config:t,themeColors:e}=s,i=t?.series[0];i?.type===M.PieSeries&&i.ticks?.lineSymbol&&e.secondaryLineColor&&(!i.ticks.lineSymbol.color||i.ticks.lineSymbol.color.toString()===Ef.toString())&&(i.ticks.lineSymbol.color=e.secondaryLineColor)}function AU(s){let{config:t,themeColors:e}=s,i=$h().toString();t?.legend&&e.textColor&&(t.legend.title?.content&&(!t.legend.title.content.color||t.legend.title.content.color.toString()===i)&&(t.legend.title.content.color=e.textColor),t.legend.body&&(!t.legend.body.color||t.legend.body.color.toString()===i)&&(t.legend.body.color=e.textColor))}function LU(s){let{config:t,themeColors:e}=s;if(kd(t)&&e.textColor){let i=$h().toString();t.axes?.forEach(r=>{r.innerLabel?.content&&(!r.innerLabel.content.color||r.innerLabel.content.color.toString()===i)&&(r.innerLabel.content.color=e.textColor),r.needle?.symbol&&(!r.needle.symbol.color||r.needle.symbol.color.toString()===i)&&(r.needle.symbol.color=e.textColor)})}}function FU(s){let{config:t,themeColors:e}=s;vn(t)&&e.lineColor&&t.series.forEach(i=>{i.gridLine&&!i.gridLine.color&&(i.gridLine.color=e.lineColor)})}function OU(s,t){let e=Wi(s),i={config:e,themeColors:t};return TU(i),$U(i),PU(i),DU(i),AU(i),LU(i),kU(i),FU(i),e}function MU(){return!0}function IU(s,t){let e,i=Yf(t);return i!==void 0&&"definitionExpression"in i&&s.layerFilterChangePolicy===Pb.Refresh&&(e=Js.watch(()=>i.definitionExpression,()=>{s.refresh({updateData:!0,resetAxesBounds:!0})})),e}function RU(s,t){let e;return t&&(e=Js.watch(()=>t.renderer,()=>{let{model:i}=s,r=Pr(i)?i.config:i;if(Io(r)&&s.layerRendererChangePolicy===Tb.Refresh){let a=MU();s.refresh({updateData:a})}})),e}function VU(s,t){let{view:e,model:i}=s,r=Pr(i)?i.config:i,a;if(e&&r&&t){let n=async()=>{(s.filterByExtent||s.filterByViewExtent)&&e.stationary&&(t.updating&&await Js.whenOnce(()=>!t.updating),await s.refresh({updateData:!0,resetAxesBounds:!0}))};a=[],kh(t)?(a.push(Js.when(()=>e.stationary,n)),a.push(Js.when(()=>!t.dataUpdating,n))):a.push(Js.when(()=>e.stationary,n)),n()}return a}function NU(s){let{view:t}=s,e;return t&&(e=Js.watch(()=>t.timeExtent,()=>{let{model:i}=s,r=Pr(i)?i.config:i,a=Ie(r?.series);(s.viewTimeExtentChangePolicy===Db.Refresh||s.syncViewTimeExtent)&&a!==M.HistogramSeries&&s.refresh({updateData:!0})})),e}function VS(s){let{syncViewTimeZone:t,syncViewTimeZoneInclusionList:e,chartConfig:i}=s,r=Ie(i?.series);return(t||(r&&e.includes(r))===!0)&&(vn(i)||Mh(i?.series[0])&&i.axes?.[0].valueFormat?.type===M.DateAxisFormat)}function EU(s){let{view:t,syncViewTimeZone:e,syncViewTimeZoneInclusionList:i}=s,r;return t&&"timeZone"in t&&(r=Js.watch(()=>t.timeZone,()=>{let{model:a}=s,n=Pr(a)?a.config:a;VS({syncViewTimeZone:e,syncViewTimeZoneInclusionList:i,chartConfig:n})&&(s.timeZone=t.timeZone,s.refresh({updateData:!0}))})),r}function BU(s,t){let e,i=Yf(t);return i!==void 0&&"fields"in i&&(e=Js.watch(()=>[i.fields],()=>{s.layerFieldsChangePolicy===$b.Refresh&&s.refresh({updateData:!0})})),e}function wF(s,t){return Js.watch(()=>t.selections,e=>{(s.syncViewSelection||s.syncSelectionsBetweenChartAndLayerViewPolicy===rc.Enabled)&&(Array.isArray(e)&&e?.length===0?s.clearSelection():s.applySelectionFromSelectionManager())})}function jU(s){let{view:t}=s,e;return t?.selectionManager&&(e=wF(s,t.selectionManager)),e}function WU(s){let{selectionManager:t}=s,e;return t&&(e=wF(s,t)),e}async function zU(s){let t=IC(`assets/common/t9n/messages.${s}.json`),e=await fetch(t);if(!e.ok)throw new Error(`Failed to load t9n file: ${t}`);return await e.json()}async function HU(s=Sh(document.documentElement).t9nLocale){let t=(await import("./64B7ILJI.js")).default;switch(s){case"ar":t=(await import("./SSOL6PCL.js")).default;break;case"bs":t=(await import("./KOY5DWSR.js")).default;break;case"bg":t=(await import("./ZLCRTIQH.js")).default;break;case"ca":t=(await import("./IDAOLPMA.js")).default;break;case"cs":t=(await import("./NKPZCF5U.js")).default;break;case"da":t=(await import("./24MSASQQ.js")).default;break;case"de":t=(await import("./VLCUXTLC.js")).default;break;case"el":t=(await import("./BK7DHYA7.js")).default;break;case"es":t=(await import("./4DXGXATO.js")).default;break;case"et":t=(await import("./OISERMTF.js")).default;break;case"fi":t=(await import("./7C2LVFNV.js")).default;break;case"fr":t=(await import("./TB7JE5XK.js")).default;break;case"he":t=(await import("./P37JASN4.js")).default;break;case"hr":t=(await import("./LAEUROZM.js")).default;break;case"hu":t=(await import("./OD2NWPCL.js")).default;break;case"id":t=(await import("./CYGMXV56.js")).default;break;case"it":t=(await import("./TRAVRA3M.js")).default;break;case"ja":t=(await import("./UD724V36.js")).default;break;case"ko":t=(await import("./EQZBQP5A.js")).default;break;case"lt":t=(await import("./B2SUC7VR.js")).default;break;case"lv":t=(await import("./ADI63OO7.js")).default;break;case"no":t=(await import("./5D2QRMC6.js")).default;break;case"nl":t=(await import("./NRXCKYYY.js")).default;break;case"pl":t=(await import("./5WIR3JWC.js")).default;break;case"pt-BR":t=(await import("./6WKTHJQK.js")).default;break;case"pt-PT":t=(await import("./7COM5REK.js")).default;break;case"ro":t=(await import("./QIG5H6WA.js")).default;break;case"ru":t=(await import("./P5I5RQTN.js")).default;break;case"sr":t=(await import("./I2BM5KSH.js")).default;break;case"sk":t=(await import("./YCQLYXH4.js")).default;break;case"sv":t=(await import("./WTF2PFHV.js")).default;break;case"th":t=(await import("./OKAZOAYZ.js")).default;break;case"tr":t=(await import("./BDEDEGCZ.js")).default;break;case"uk":t=(await import("./ZZHKDFTA.js")).default;break;case"vi":t=(await import("./NWLNHFHJ.js")).default;break;case"zh-CN":t=(await import("./QKZK6MTN.js")).default;break;case"zh-HK":t=(await import("./PIZPF2BH.js")).default;break;case"zh-TW":t=(await import("./PIZPF2BH.js")).default;break}return t}async function XU(s=Sh(document.documentElement).t9nLocale){let t=(await import("./TOCBEPNS.js")).default;switch(s){case"ar":t=(await import("./P7FI5QUW.js")).default;break;case"bs":t=(await import("./EQTI5Z4G.js")).default;break;case"bg":t=(await import("./SVLOD3HQ.js")).default;break;case"ca":t=(await import("./RMIIDRGC.js")).default;break;case"cs":t=(await import("./C2ZX67U4.js")).default;break;case"da":t=(await import("./B7J5YIWF.js")).default;break;case"de":t=(await import("./A2KSCV2I.js")).default;break;case"el":t=(await import("./AS3QP77N.js")).default;break;case"es":t=(await import("./DDNOUE2T.js")).default;break;case"et":t=(await import("./LXZXXY7V.js")).default;break;case"fi":t=(await import("./6U6VAS2O.js")).default;break;case"fr":t=(await import("./OMU647X3.js")).default;break;case"he":t=(await import("./TJ2NRLF6.js")).default;break;case"hr":t=(await import("./6AXYQGBN.js")).default;break;case"hu":t=(await import("./PCFEAGXP.js")).default;break;case"id":t=(await import("./FFJTVPE4.js")).default;break;case"it":t=(await import("./PZP57FJ2.js")).default;break;case"ja":t=(await import("./B5Z7FBO7.js")).default;break;case"ko":t=(await import("./AF2GUPVE.js")).default;break;case"lt":t=(await import("./ZVOX72AF.js")).default;break;case"lv":t=(await import("./KTYFDFMQ.js")).default;break;case"no":t=(await import("./OXPXA3PS.js")).default;break;case"nl":t=(await import("./Q466K37N.js")).default;break;case"pl":t=(await import("./J3BB5KXD.js")).default;break;case"pt-BR":t=(await import("./NNHJ75EA.js")).default;break;case"pt-PT":t=(await import("./HABS63VB.js")).default;break;case"ro":t=(await import("./JUFBIV44.js")).default;break;case"ru":t=(await import("./S4NQCINT.js")).default;break;case"sr":t=(await import("./NWQ2L7IJ.js")).default;break;case"sk":t=(await import("./3FFCWEMV.js")).default;break;case"sl":t=(await import("./Z5EJIWAY.js")).default;break;case"sv":t=(await import("./R5LIRRMK.js")).default;break;case"th":t=(await import("./H2DUFQAG.js")).default;break;case"tr":t=(await import("./RHUEVXMR.js")).default;break;case"uk":t=(await import("./BWR5ONE2.js")).default;break;case"vi":t=(await import("./XR4O3AQ6.js")).default;break;case"zh-CN":t=(await import("./ZARYZFJ4.js")).default;break;case"zh-HK":t=(await import("./26DDVOQ7.js")).default;break;case"zh-TW":t=(await import("./26DDVOQ7.js")).default;break}return t}async function YU(s=Sh(document.documentElement).t9nLocale,t){let e=t?await XU(s):await HU(s),i=(await zU(s)).customAmchartsStrings;return{...e,...i}}var UU=({message:s,heading:t,options:e})=>Gu`<calcite-alert .icon=${e?.icon??"exclamationMarkTriangle"} .open=${e?.active===!0} .autoClose=${e?.autoClose??!1} .autoCloseDuration=${e?.duration??"medium"} scale=m .kind=${e?.kind??"danger"} .ariaHidden=${e?.active!==!0} dir=ltr role=alertdialog label="arcgis charts notify panel">${t!==void 0?Gu`<div slot=title>${t}</div>`:null}${s!==void 0?Gu`<div slot=message>${s}</div>`:null}</calcite-alert>`,GU=DC`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}.chart{flex-grow:1}.chart>div{justify-content:center;align-items:center}.chart{overflow-y:hidden}:host{width:var(--chart-width, var(--arcgis-charts-default-width));height:var(--chart-height, var(--arcgis-charts-default-height));display:flex;flex-direction:row;position:relative;overflow:hidden}.chart-wrapper{position:relative;width:100%}.chart-container{height:100%;overflow:hidden}`,NS=class extends LC{constructor(t){super(t)}addLayerWatchHandlers(t){this.removeLayerWatchHandlers(),this.layerFilterWatchHandler=IU(this.component,t),this.layerRendererWatchHandler=RU(this.component,t),this.layerFieldsWatchHandler=BU(this.component,t)}setViewExtentChangeWatchHandler(t,e){(t??(this.component.filterByExtent||this.component.filterByViewExtent))&&(this.removeViewExtentChangeWatchHandlers(),this.viewExtentChangeWatchHandlers=VU(this.component,e))}setViewTimeZoneWatchHandler(){this.removeViewTimeZoneChangeWatchHandler(),this.viewTimeZoneChangeWatchHandler=EU(this.component)}setViewTimeExtentChangeWatchHandler(){this.removeViewTimeExtentChangeWatchHandler(),this.viewTimeExtentChangeWatchHandler=NU(this.component)}setViewSelectionsChangeWatchHandler(){this.removeViewSelectionsChangeWatchHandler(),this.viewSelectionsChangeWatchHandler=jU(this.component)}setSelectionManagerChangeWatchHandler(){this.removeSelectionManagerChangeWatchHandler(),this.selectionManagerChangeWatchHandler=WU(this.component)}removeLayerWatchHandlers(){this.removeLayerFilterWatchHandler(),this.removeLayerRendererWatchHandler(),this.removeLayerFieldsWatchHandler()}removeViewWatchHandlers(){this.removeViewSelectionsChangeWatchHandler(),this.removeViewTimeZoneChangeWatchHandler(),this.removeViewTimeExtentChangeWatchHandler()}removeViewExtentChangeWatchHandlers(){this.viewExtentChangeWatchHandlers?.forEach(t=>t.remove()),this.viewExtentChangeWatchHandlers=[]}removeViewSelectionsChangeWatchHandler(){this.viewSelectionsChangeWatchHandler?.remove()}removeSelectionManagerChangeWatchHandler(){this.selectionManagerChangeWatchHandler?.remove()}removeLayerFilterWatchHandler(){this.layerFilterWatchHandler?.remove()}removeLayerRendererWatchHandler(){this.layerRendererWatchHandler?.remove()}removeLayerFieldsWatchHandler(){this.layerFieldsWatchHandler?.remove()}removeViewTimeZoneChangeWatchHandler(){this.viewTimeZoneChangeWatchHandler?.remove()}removeViewTimeExtentChangeWatchHandler(){this.viewTimeExtentChangeWatchHandler?.remove(),this.component.runtimeDataFilters?.timeExtent&&delete this.component.runtimeDataFilters.timeExtent}},ES=class extends EventTarget{constructor(t){super(),this._configHistory=[void 0],this._revision=0,this.asyncUpdatesPromise=Promise.resolve(),this.config=t}get layer(){}get config(){return this._config}set config(t){this._config=t,this._revision+=1,this._configHistory.push(Wi(this._config)),this._configHistory.length>Zw&&this._configHistory.shift(),this.dispatchEvent(new CustomEvent("arcgisChartsModelConfigChange",{detail:{config:this._config,setterName:"config"}}))}get revision(){return this._revision}recall(t){return Jw(this._revision,this._config,this._configHistory,t)}},BS=class extends OC{constructor(){super(),this._messages=Ob(),this._chartRef=FC(),this._commonStrings=Ob({name:"common",blocking:!0}),this._watchHandlersController=new NS(this),this._rotated=!1,this._legendVisibility=!1,this._showLoader=!1,this._lastDataCheckRevision=0,this._noRenderingUpdateProps=["_messages","showLoader","infoModalMessage","notifyMessage","disableInteractions","interactionsDisabled"],this._loadQueryObject=new _n(this,{args:()=>[this.internalModel?.config?.iLayer,this.layer,this.view,this.filterByExtent,this.filterByViewExtent,this.layerItemId,this.chartIndex,this.model,Pr(this._model)?this._model.layer:void 0],task:async([t,e,i,r,a,n,o,l,h],{signal:u})=>{let c;if(e||t||h)c=await _w({iLayer:t,layer:e??h,view:i,filterByViewExtent:r||a,abortSignal:u});else if(n!==void 0&&this._model===void 0&&this.internalModel===void 0){if(n&&n.trim()!==""&&!Tw({view:i,portalItemId:n})){let p=await lN.fromPortalItem({portalItem:new hN({id:n})});await db(p,u),(KC(p)||ss(p))&&(await this._createModelFromLayer(p,o),c=p)}}else Pr(l)&&(await l?.update(),c=l?.layer);let d=ms(c);return d&&await db(d,u),this._watchHandlersController.addLayerWatchHandlers(d),c},onComplete:()=>{this.taskCompletionTick++},onError:async t=>{this._handleRuntimeError(t)}}),this._loadLayerView=new _n(this,{args:()=>[this.loadedQueryObject,this.view,this.filterByExtent||this.filterByViewExtent],task:async([t,e,i],{signal:r})=>{let a;return kh(t)?(a=t,await Js.whenOnce(()=>!t.updating,{signal:r})):ss(t)&&(a=await e?.whenLayerView(t)),a&&await Js.whenOnce(()=>!a.updating),i?this._watchHandlersController.setViewExtentChangeWatchHandler(i,a):(this._watchHandlersController.removeViewExtentChangeWatchHandlers(),await this.refresh({updateData:!0,resetAxesBounds:!0})),a},onComplete:()=>{this.taskCompletionTick++},onError:async t=>{this._handleRuntimeError(t)}}),this._checkIfDataUpdateIsNeeded=new _n(this,{args:()=>{let t=[this.forceDataUpdateTick,this.runtimeDataFilters,this.returnFeaturesExtent,this.chartLimits,this.updateSplitBySeries];return[this._chart,this.internalModel?.revision,this.usePopupTemplateFieldsInfo,this.filterBySelection,this.selectionData,this.setTimeBinningInfoWhenNotProvided,this.chartLimits,this.timeZone,this.loadedQueryObject,...t]},task:([t,e,i,r,a,n,o,l,h])=>{if(h){let u=this.internalModel?.config,c=t===void 0,d=Ws(h,i),p=this._lastRenderedProps?.options?.selectionData?.selectionOIDs,f=this._lastRenderedProps?.dataUpdateNeededProps,m=this._lastRenderedProps?.extraProps?.layer,g=this._lastRenderedProps?.extraProps?.filterBySelection,y=c,v;f&&Object.keys(f).forEach(_=>{let w=f?f[_]:void 0,C=this[_];y=y||!ea(w,C)});let b=kh(m)!==kh(h);y=y||b,v={common:{layerChanged:b}};let x=this.internalModel?.recall(this._lastDataCheckRevision);if(this._lastDataCheckRevision=e??0,u&&x){y=y||Aw(x,u);let _=this.getEffectiveTimeZone(u,l);Qw(_,u);let w=Uw({previousConfig:x,newConfig:u,previousFilterBySelection:g,previousSelectionOIDs:p,fieldList:d,queryObject:h,filterBySelection:r,selectionData:a,setTimeBinningInfoWhenNotProvided:n,chartLimits:o});v={...v,...w.dataUpdateDetails},y=y||w.dataUpdateNeeded}return{dataUpdateNeeded:y,dataUpdateDetails:v}}else return this._checkIfDataUpdateIsNeeded.value??{dataUpdateNeeded:!1,dataUpdateDetails:void 0}},onComplete:()=>{this.taskCompletionTick++},onError:async t=>{this._handleRuntimeError(t)}}),this._prepareConfigForRendering=new _n(this,{args:()=>[this.internalModel?.revision,this._chart,this.updateSplitBySeries,this.updateSplitBySeries?.addMissingSeries,this.runtimeDataFilters,this.view,this.viewTimeExtentChangePolicy,this.syncViewTimeExtent,this.ignoreViewExtent,this.setTimeBinningInfoWhenNotProvided,this.returnFeaturesExtent,this.returnSelectionOIDs,this.chartLimits,this._commonStrings?.errorStrings,this.timeZone,this.loadedQueryObject,this._checkIfDataUpdateIsNeeded.value?.dataUpdateNeeded],task:async([t,e,i,r,a,n,o,l,h,u,c,d,p,f,m,g,y],{signal:v})=>{let b=this.internalModel?.config,x=e===void 0,_=g!==this._lastRenderedProps?.extraProps?.layer,w=this.filterByExtent!==this._lastRenderedProps?.extraProps?.filterByExtent||this.filterByViewExtent!==this._lastRenderedProps?.extraProps?.filterByViewExtent,C=r===!0&&(x||y||_||w),P=Fb({runtimeDataFilters:a,view:n,viewTimeExtentChangePolicy:o,syncViewTimeExtent:l}),D=this.getEffectiveTimeZone(b,m),{alteredConfig:$,preFetchedQueryResponse:A}=await aP({configToAlter:b,updateSplitBySeries:i,addMissingSeries:C,chartContainer:this.el,queryObject:g,layer:g,abortSignal:v,runtimeDataFilters:P,ignoreViewExtent:h,setTimeBinningInfoWhenNotProvided:u,returnFeaturesExtent:c,returnStatisticsAggregatedIds:d!==!1,timeZone:D,chartLimits:p,errorStrings:f});return JSON.stringify(this.internalModel?.config?.series)!==JSON.stringify($?.series)&&this.internalModel?.config&&(this.internalModel.config={...this.internalModel.config,series:$?Wi($.series):this.internalModel.config.series}),{alteredConfig:$,preFetchedQueryResponse:A}},onComplete:()=>{this.taskCompletionTick++},onError:async t=>{this._handleRuntimeError(t)}}),this._isChartSupportedByDataSource=new _n(this,{args:()=>[this.internalModel?.revision,this.loadedLayer],task:async([t,e],{signal:i})=>{let r=this.internalModel?.config;return await sP({config:r,layer:e,abortSignal:i})},onComplete:()=>{this.taskCompletionTick++},onError:async t=>{this._handleRuntimeError(t)}}),this._validateWebChart=new _n(this,{args:()=>[this._prepareConfigForRendering.value?.alteredConfig,this.allowUsingObjectIdStat,this._commonStrings?.errorStrings,this.loadedLayer],task:async([t,e,i,r])=>await Sb({input:t,queryObject:r,allowUsingObjectIdStat:e,errorStrings:i}),onComplete:()=>{this.taskCompletionTick++},onError:async t=>{this._handleRuntimeError(t)}}),this._getData=new _n(this,{args:()=>[this._unsanitizedSelectionDataItems,this._commonStrings?.errorStrings,this.usePopupTemplateFieldsInfo,this.popupTemplateFieldInfosEnabled,this.runtimeDataFilters,this.ignoreViewExtent,this.filterBySelection,this.selectionData,this.setTimeBinningInfoWhenNotProvided,this.returnFeaturesExtent,this.returnSelectionOIDs,this.chartLimits,this.hideZeroCountCategories,this.replaceNoValueCategoryWithZero,this._gatherComponentOptions().view,this.filterByExtent||this.filterByViewExtent,this.syncViewTimeZone,this.syncViewTimeZoneInclusionList,this.loadedQueryObject,this.forceDataUpdateTick,this.internalModel,this._prepareConfigForRendering.value?.alteredConfig,this._prepareConfigForRendering.value?.preFetchedQueryResponse],task:async([t,e,i,r,a,n,o,l,h,u,c,d,p,f,m,g,y,v,b,x,_,w,C],{signal:P})=>{let D,{dataUpdateNeeded:$,dataUpdateDetails:A}=await this._checkIfDataUpdateIsNeeded.taskComplete;if(w&&b&&!xl(w)){if($){let T=Ws(b,i||r),I=VS({syncViewTimeZone:y,syncViewTimeZoneInclusionList:v,chartConfig:w});D=await dw({chartConfig:w,preFetchedQueryResponse:C,queryObject:b,runtimeDataFilters:a,ignoreViewExtent:n,filterBySelection:o,selectionData:l,setTimeBinningInfoWhenNotProvided:h,returnFeaturesExtent:u,returnStatisticsAggregatedIds:c!==!1,chartLimits:d,popupTemplateFieldInfosEnabled:r,hideZeroCountCategories:p,replaceNoValueCategoryWithZero:f,view:m,filterByViewExtent:g,syncViewTimeZone:I,fieldList:T,currentSelectionDataItems:t,dataForFilterBySelectionChanged:A?.common?.dataForFilterBySelectionChanged,errorStrings:e,abortSignal:P}),Ib(_)&&mP(fP,D.data)}else if(tm(w)&&w.series[0].type===M.GaugeSeries&&w.series[0].featureIndex!==void 0&&this._processedChartData){let T="dataItems"in this._processedChartData?this._processedChartData.dataItems:[],I=cw({featureIndex:w.series[0].featureIndex,chartData:T,x:w.series[0].x});D={valid:!Number.isNaN(I),data:{...this._processedChartData}},Number.isNaN(I)&&T.length>0&&(D.invalidType=Ro.NoValue,D.count=T.length)}}return{dataInfo:D,dataWasUpdated:!!D}},onComplete:()=>{this.taskCompletionTick++},onError:async t=>{this._handleRuntimeError(t)}}),this.forceDataUpdateTick=0,this.taskCompletionTick=0,this.enableBetaFeatures=!1,this.enableConfiguration=!1,this.configurationEnabled=!1,this.calciteThemingCSSVariables={background:"--calcite-color-foreground-1",text:"--calcite-color-text-1",line:"--calcite-color-border-1",secondaryLine:"--calcite-color-text-3",spinner:"--calcite-color-brand-hover"},this.allowUsingObjectIdStat=!1,this.nullAsValid=!1,this.zeroCountAsValid=!1,this.hideUIMessages=!1,this.showEmptySeries=!1,this.autoInverseDataLabelTextColor=!1,this.hideZeroCountCategories=!1,this.ignoreSmoothRenderingLimit=!1,this.returnSelectionIndexes=!1,this.returnFeaturesExtent=!1,this.filterBySelection=!1,this.filterByExtent=!1,this.filterByViewExtent=!1,this.disableInteractions=!1,this.interactionsDisabled=!1,this.skipChartCreationQueue=!1,this.useAnimatedCharts=!1,this.showLicenseWatermark=!1,this.enableResponsiveFeatures=!1,this.autoDisposeChart=!1,this.setTimeBinningInfoWhenNotProvided=!1,this.errorPolicy=Vd.Throw,this.disableTogglingLegendItems=!1,this.hideLoaderAnimation=!1,this.usePopupTemplateFieldsInfo=!1,this.syncViewTimeZoneInclusionList=[M.HeatSeries],this.syncViewTimeZone=!1,this.layerFilterChangePolicy=Pb.Refresh,this.viewTimeExtentChangePolicy=Db.Ignore,this.syncViewTimeExtent=!1,this.layerRendererChangePolicy=Tb.Refresh,this.layerFieldsChangePolicy=$b.Refresh,this.syncSelectionsBetweenChartAndLayerViewPolicy=rc.Disabled,this.syncViewSelection=!1,this.syncSelection=!1,this.syncChartsSelection=!1,this.ignoreViewExtent=!1,this.autoDestroyDisabled=!1,this.arcgisAxesMinMaxChange=fs(),this.arcgisBadDataWarningRaise=fs(),this.arcgisChartNotFoundWarning=fs(),this.arcgisConfigChange=fs(),this.arcgisDataFetchComplete=fs(),this.arcgisDataProcessComplete=fs(),this.arcgisDataProcessError=fs(),this.arcgisInvalidConfigWarningRaise=fs(),this.arcgisLegendItemVisibilityChange=fs(),this.arcgisNoRenderPropChange=fs(),this.arcgisRenderingComplete=fs(),this.arcgisRuntimeError=fs(),this.arcgisSelectionComplete=fs(),this.arcgisSeriesColorChange=fs(),this.arcgisSeriesOrder=fs(),this.arcgisUpdateComplete=fs(),this.listen("arcgisChartsJSLegendItemVisibilityChange",this._handleLegendItemVisibilityChanged),this.listen("arcgisChartsJSInvalidConfigWarningRaise",this._handleInvalidConfigWarningRaise),this.listen("arcgisChartsJSSeriesColorChange",this._handleSeriesColorsChange),this.listen("arcgisChartsJSSelectionComplete",this._handleSelection),this.listen("arcgisChartsJSTooManySelectedElements",this._handleTooManySelectedElements),this.listen("calciteAlertClose",this._handleAlertClosed),this.listen("arcgisChartsJSAxesMinMaxChange",this._handleAxesMinMaxChange),this.listen("arcgisChartsJSSeriesOrder",this._handleSeriesOrder),this.listen("arcgisChartsJSRenderingComplete",this._handleRenderingComplete),this._addConfigListeners(),this.listenOn(document,"arcgisSelectionComplete",this._handleExternalSelection)}static{this.properties={internalModel:16,forceDataUpdateTick:16,taskCompletionTick:16,infoModalMessage:16,notifyMessage:16,showLoader:16,enableBetaFeatures:5,model:0,enableConfiguration:5,configurationEnabled:5,calciteThemingCSSVariables:0,rotation:[5,{hasChanged:()=>!1}],rotated:[5,{hasChanged:()=>!1}],actionMode:1,cursorRange:1,legendPosition:[1,{hasChanged:()=>!1}],legendVisibility:[5,{hasChanged:()=>!1}],allowUsingObjectIdStat:5,nullAsValid:5,zeroCountAsValid:5,showUIMessages:5,hideUIMessages:5,hideEmptySeries:5,showEmptySeries:5,autoInverseDataLabelTextColor:5,replaceNoValueCategoryWithZero:5,hideZeroCountCategories:5,ignoreSmoothRenderingLimit:5,chartWillRender:0,legendValueLabelFormatter:0,timeZone:1,view:[0,{hasChanged:()=>!1}],layer:0,layerItemId:1,chartIndex:9,selectionData:0,returnSelectionOIDs:5,returnSelectionIndexes:5,returnFeaturesExtent:5,filterBySelection:5,filterByExtent:5,filterByViewExtent:5,disableInteractions:5,interactionsDisabled:5,queueChartCreation:5,skipChartCreationQueue:5,useAnimatedCharts:5,animationEnabled:5,hideLicenseWatermark:5,showLicenseWatermark:5,enableResponsiveFeatures:5,autoDisposeChart:5,featureIndex:[9,{hasChanged:()=>!1}],placeholder:1,selectionTheme:0,setTimeBinningInfoWhenNotProvided:5,chartLimits:0,aria:0,tooltipFormatter:0,dataLabelFormatter:0,guideTooltipFormatter:0,xAxisLabelFormatter:0,yAxisLabelFormatter:0,secondaryYAxisLabelFormatter:0,gaugeInnerLabelFormatter:0,errorPolicy:1,disableTogglingLegendItems:5,togglingLegendItemsDisabled:5,hideLoaderAnimation:5,loaderColors:0,runtimeDataFilters:0,usePopupTemplateFieldsInfo:5,syncViewTimeZoneInclusionList:0,syncViewTimeZone:5,popupTemplateFieldInfosEnabled:5,layerFilterChangePolicy:1,viewTimeExtentChangePolicy:1,syncViewTimeExtent:5,layerRendererChangePolicy:1,layerFieldsChangePolicy:1,syncSelectionsBetweenChartAndLayerViewPolicy:1,syncViewSelection:5,syncSelection:5,syncChartsSelection:5,ignoreViewExtent:5,updateSplitBySeries:0,messageOverrides:0,autoDestroyDisabled:5,selectionManager:0}}static{this.styles=GU}get loadedQueryObject(){return this._loadQueryObject.value}get loadedLayer(){return this.loadedQueryObject?ZC(this.loadedQueryObject):void 0}get _isAnyTaskPending(){return[this._loadQueryObject,this._loadLayerView,this._checkIfDataUpdateIsNeeded,this._prepareConfigForRendering,this._isChartSupportedByDataSource,this._validateWebChart,this._getData].some(t=>t.status===dm.PENDING)}get showLoader(){return this._showLoader}set showLoader(t){t||(clearTimeout(this._loaderTimer),this._loaderTimer=void 0),this._showLoader=!this.hideLoaderAnimation&&t}get model(){let t=this._model;return t||(Pr(this.internalModel)?t=this.internalModel:t=this.internalModel?.config),t}set model(t){this._model=t,this.internalModel=Pr(t)?t:new ES(t)}get rotation(){return this._rotated}set rotation(t){this.rotated=t}get rotated(){return this._rotated}set rotated(t){this._rotatedChange(t),this._handleNoRenderPropChange("rotated",t),this._rotated=t}get legendPosition(){return this._legendPosition}set legendPosition(t){this._legendPositionChange(t),this._handleNoRenderPropChange("legendPosition",t),this._legendPosition=t}get legendVisibility(){return this._legendVisibility}set legendVisibility(t){this._legendVisibilityChange(t),this._handleNoRenderPropChange("legendVisibility",t),this._legendVisibility=t}get view(){return this._view}set view(t){let e=this._view;this._view=t,this._viewChange(t,e),this._handleNoRenderPropChange("view",t)}get featureIndex(){return this._featureIndex}set featureIndex(t){let e=this.featureIndex;this._featureIndexChange(t,e),this._handleNoRenderPropChange("featureIndex",t),this._featureIndex=t}async clearSelection(){this._chart!==void 0&&(this._unsanitizedSelectionDataItems=void 0,this._chart.clearSelection(),this.filterBySelection&&await this.refresh())}async destroy(){this._chart?.dispose()}async errorAlert(t){this.errorPolicy===Vd.Throw&&(this._actionBarElement&&(this._actionBarElement.forceDisableActions=!0),this.notify(t,this._commonStrings?.errorStrings.errorHeading))}async exportAsCSV(t){let e,i,r={xAxisLabelFormatter:this.xAxisLabelFormatter,yAxisLabelFormatter:this.yAxisLabelFormatter,secondaryYAxisLabelFormatter:this.secondaryYAxisLabelFormatter};if(this._sanitizedChartData){let a=await this._loadQueryObject.taskComplete,n=a?Ws(a,this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled):void 0,o=this.internalModel?.config,l=lw(this.getEffectiveTimeZone(o)),h=this._processedChartData??this._sanitizedChartData,u=await Pw(ms(a)),c=o?.chartRenderer?xw(o.chartRenderer):[],d=[...new Set([...u,...c])],p=Lh(o,d),f=Pr(this.internalModel)?this.internalModel?.titleText:this.internalModel?.config?_b(this.internalModel.config):this._commonStrings.utilsStrings.chartType.chart;if(Object.values(h).filter(m=>Array.isArray(m)&&m.length>0).length>1){let m=new NA.default;Object.entries(h).forEach(([y,v])=>{if(Array.isArray(v)&&v.length>0){let b=Lb({rawData:v,config:o,layer:a,fieldList:n,formatters:r,useRendererLabel:p,timeZone:l,formatLocale:t?.locale,utilsStrings:this._commonStrings.utilsStrings}),x=Ab(b,t),_=`${f}-${y}.csv`;m.file(_,x)}});let g=await m.generateAsync({type:"blob"});e=URL.createObjectURL(g),i=`${f}.zip`}else{let m;if("bins"in h?m=h.bins:"dataItems"in h&&(m=h.dataItems),m){let g=Lb({rawData:m,config:o,layer:a,fieldList:n,formatters:r,useRendererLabel:p,timeZone:l,formatLocale:t?.locale,utilsStrings:this._commonStrings.utilsStrings}),y=Ab(g,t);e=URL.createObjectURL(new Blob([y],{type:"text/csv;charset=utf-8;"})),i=`${f}.csv`}}e!==void 0&&i!==void 0&&vP(e,i)}}async exportAsImage(t=sw.PNG){let e=this._chartRef.value;if(e){let i=await Ui(e,{scale:2}),r=`${Pr(this.internalModel)?this.internalModel.titleText:this.internalModel?.config?_b(this.internalModel.config):this._commonStrings.utilsStrings.chartType.chart}.${t}`;await i.download({format:t,filename:r})}else this.notify(this._commonStrings?.errorStrings.errors.exportImageChartNotReady)}async loadModel(){return this.internalModel?await this.internalModel.asyncUpdatesPromise:await new Promise(t=>{this._resolveModelSetup=t})}async notify(t,e){this.infoModalMessage=t,this._infoModalHeading=e,this.showLoader=!1}async refresh(t){let{updateData:e=!0,resetAxesBounds:i=!1}=t??{};if(e&&this.forceDataUpdateTick++,i&&this.internalModel){let r=this.internalModel.config;delete r?.axes?.[0]?.minimum,delete r?.axes?.[0]?.maximum,delete r?.axes?.[1]?.minimum,delete r?.axes?.[1]?.maximum,this.internalModel.config=r}this.requestUpdate("refresh")}async resetZoom(){this._chart!==void 0&&this._chart.resetZoom()}async switchSelection(){let t=await this._loadQueryObject.taskComplete;this._chart!==void 0&&!this.filterBySelection&&t&&await this._chart.switchSelection(t)}load(){if(this.syncViewSelection||this.syncSelectionsBetweenChartAndLayerViewPolicy===rc.Enabled){let t=this._getSelectionFromSelectionManager();t&&(this.selectionData={selectionOIDs:t,selectionSource:Ti.ProgrammaticSelection})}}willUpdate(t){t.has("internalModel")&&this._internalModelChange(),t.has("layerItemId")&&(this.internalModel=void 0),t.has("selectionData")&&!ea(t.get("selectionData")?.selectionOIDs,this.selectionData?.selectionOIDs)&&this._selectionDataChange(),t.has("filterBySelection")&&t.get("filterBySelection")!==void 0&&this._filterBySelectionChanged(),t.has("selectionManager")&&(this._setSelectionManagerChangeWatchHandler(),this.applySelectionFromSelectionManager())}updated(t){Array.from(t.keys()).filter(e=>!this._noRenderingUpdateProps.includes(e)).length>0&&this._updatedAsync(),this._actionBarElement!==void 0&&yP({actionBar:this._actionBarElement,chartComponent:this.el,config:this.internalModel?.config,isInfoModalDisplayed:this.infoModalMessage!==void 0}),t.has("aria")&&this.aria&&this._chartRef.value&&(this._chartRef.value.ariaLabel=this.aria.label??this._chartRef.value.ariaLabel,this._chartRef.value.ariaDescription=this.aria.description??this._chartRef.value.ariaDescription,this._chartRef.value.ariaLabelledByElements=this.aria.labelledByElements??this._chartRef.value.ariaLabelledByElements,this._chartRef.value.ariaDescribedByElements=this.aria.describedByElements??this._chartRef.value.ariaDescribedByElements)}disconnectedCallback(){super.disconnectedCallback(),this._removeLayerWatchHandlers(),this._watchHandlersController.removeViewExtentChangeWatchHandlers(),this._removeViewWatchHandlers(),this._removeSelectionManagerChangeWatchHandler(),this.autoDestroyDisabled||this._chart?.dispose()}applySelectionFromView(){this.applySelectionFromSelectionManager()}applySelectionFromSelectionManager(){let t=this._getSelectionFromSelectionManager();if(t&&!ea(t,this.selectionData?.selectionOIDs)){this.selectionData={selectionOIDs:t,selectionSource:Ti.ProgrammaticSelection};let e=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisSelectionComplete.emit({selectionData:this.selectionData,model:e})}}_handleRuntimeError(t){if(t instanceof Gn&&t.name===Zu.QueryFeaturesError?this.arcgisDataProcessError.emit(t.details):t instanceof Gn&&this.arcgisRuntimeError.emit(t.details??t),typeof t=="object"&&t&&"message"in t){let e=t instanceof Gn?t.message:this._commonStrings?.errorStrings.errors.simpleError;this.notify(e,this._commonStrings?.errorStrings.errorHeading)}}getEffectiveTimeZone(t,e){let i=this.view&&"timeZone"in this.view&&this.view.timeZone?this.view.timeZone:void 0,r=VS({syncViewTimeZone:this.syncViewTimeZone,syncViewTimeZoneInclusionList:this.syncViewTimeZoneInclusionList,chartConfig:t});return e??this.timeZone??(r?i:void 0)}_hideInfoModal(){this.infoModalMessage=void 0}async _generateHeatChartClassBreaks(t){if(!ss(this.loadedLayer)&&Ib(this.internalModel)&&t?.data&&"dataItems"in t.data){let e=await qw({data:t.data,classificationMethod:this.internalModel.classificationMethod,breaksCount:this.internalModel.breaksCount,xAxisField:this.internalModel.xAxisField,colorRampName:this.internalModel.colorRampName,existingClassBreakInfos:this.internalModel.chartRenderer?.classBreakInfos,isColorRampFlipped:this.internalModel.isColorRampFlipped});Kw({currentBreaks:e,configBreaks:this.internalModel.chartRenderer?.classBreakInfos??[]})&&(this.internalModel.chartRenderer={...this.internalModel.chartRenderer,classBreakInfos:e,type:"classBreaks",field:Hi.valueField})}}async _updatedAsync(){let t=this.internalModel?.config;if(this._chart===void 0&&(this.showLoader=!0),!this.showLoader&&!this._loaderTimer&&(this._loaderTimer=setTimeout(()=>{this.showLoader||(this.showLoader=!0)},300)),!this._isAnyTaskPending){if(t!==void 0&&this._chart!==void 0)try{(!t&&!this.loadedLayer||Cb(t,this.loadedLayer)&&!xl(t)&&await this._isChartSupportedByDataSource.taskComplete)&&await this._renderChart()}catch(e){this._chartRef.value!==void 0&&(e instanceof Gn&&e.name===Zu.ChartDisposed?(this._chart?.dispose(),this._chart=void 0,this._chartRef.value.innerHTML="",await this._createChartInstance(!1)):this._handleRuntimeError(e))}else this._chart===void 0&&await this._createChartInstance();this.placeholder!==void 0?await this.notify(this.placeholder):(this.enableConfiguration||this.configurationEnabled)&&xl(t)&&this._applyPlaceholderForPartialConfig(t)}}_useAmCharts5(){let t=Ie(this.internalModel?.config?.series);return this.enableBetaFeatures||t===M.ScatterSeries||t===M.HistogramSeries||t===M.RadarSeries||t===M.HeatSeries}_handleNoRenderPropChange(t,e){let i=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisNoRenderPropChange.emit({propName:t,value:e,model:i})}_handleExternalSelection(t){if(!ss(this.loadedLayer)){let e=t,{selectionData:i,model:r}=e.detail,a=this.loadedLayer&&r?.layer?.id===this.loadedLayer.id;if((this.syncSelection||this.syncChartsSelection)&&a&&t.target!==this.el&&(!ea(i.selectionOIDs,this.selectionData?.selectionOIDs)||!ea(i.selectionFilters,this.selectionData?.selectionFilters)))if(i.selectionOIDs||i.selectionFilters?.[0]){this.selectionData={selectionOIDs:i.selectionOIDs,selectionFilters:i.selectionFilters,selectionSource:Ti.ProgrammaticSelection};let n=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisSelectionComplete.emit({selectionData:this.selectionData,model:n})}else this.clearSelection()}}_configPanelNumberChange(t){let e=t,{panelNumber:i,modelList:r}=e.detail;this._actionBarElement&&(this.enableConfiguration||this.configurationEnabled)&&this._ourModelExistsIn(r)&&(this._actionBarElement.editChartToggle=i===1?wb.Active:wb.Inactive)}_configDataChangeError(t){let e=t,{error:i,model:r}=e.detail;(this.enableConfiguration||this.configurationEnabled)&&Pr(this.internalModel)&&r?.isSameChartAs(this.internalModel)&&this.notify(i.message)}_modelConfigChange(t){let e=t,{config:i,setterName:r}=e.detail,a=this.internalModel?.recall();JSON.stringify(a)!==JSON.stringify(i)&&this.requestUpdate("config",a),this.arcgisConfigChange.emit({newConfig:i,oldConfig:a,functionCalled:r}),this._actionBarElement&&!xl(i)&&(this._actionBarElement.forceDisableActions=!1)}_modelDataChange(){this.setTimeBinningInfoWhenNotProvided&&Rb(this.internalModel)&&this.internalModel?.resetTimeInterval()}_actionBarSlotRef(t){this._actionBarElement=t&&"assignedElements"in t?t.assignedElements().find(e=>e.tagName.toLowerCase()==="arcgis-charts-action-bar"):void 0}_checkForInvalidContainer(){this._chartRef.value||tv("divNode",this._commonStrings?.errorStrings)}_handleRenderingComplete(t){this.arcgisRenderingComplete.emit(t.detail),this.showLoader=!1}_handleLegendItemVisibilityChanged(t){if(this.internalModel){let i=Wi(this.internalModel?.config);GC(t,i),this.internalModel.config=i}let e=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisLegendItemVisibilityChange.emit({legendItemVisibility:t.detail,model:e})}_handleUpdateCompleted(t){if(this.enableConfiguration||this.configurationEnabled){let e=this._commonStrings?.errorStrings.notifications;if(this.placeholder===void 0){let i=this.internalModel?.config;if(t.schemaErrors.length>0&&!xl(i))this.notify(e?.invalidConfig,void 0);else if(t.customErrors.length>0&&!xl(i)){let r=t.customErrors.find(a=>a.keyword===Zu.LayerFieldsNotFound);if(ss(this.loadedLayer)&&r){let a=Fu(e?.invalidConfigForRaster??"",{errorMessage:r.message});this.notify(a,e?.invalidConfigTitle)}else this.notify(e?.invalidConfig,void 0)}else t.warnings.length>0&&t.warnings.some(r=>r.keyword===QC.NonNumericAggregation)&&this.notify(e?.validateAggregationTypeMsg,e?.missingNumericFields)}if((uP(this.internalModel)||cP(this.internalModel)||Mb(this.internalModel)||dP(this.internalModel))&&this.internalModel.aggregationType===Ha.NoAggregation&&this.internalModel.numericFields.length===1&&this.loadedLayer){let i=bl(this.loadedLayer).idField;i&&this.internalModel.numericFields.includes(i)&&this.notify(e?.noAggregationRequiresNumericFields,e?.missingNumericFields)}}this.showLoader&&(this.showLoader=!1),this.arcgisUpdateComplete.emit(t)}_handleInvalidConfigWarningRaise(t){this.arcgisInvalidConfigWarningRaise.emit(t.detail),this.notify(t.detail.message,t.detail.header)}_handleSeriesColorsChange(t){let e=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisSeriesColorChange.emit({data:t.detail.data,colorMatchApplied:t.detail.colorMatchApplied,model:e})}_handleSelection(t){let e={...t.detail};this._unsanitizedSelectionDataItems=e.selectionItems;let i={...e},r=Wi(e.selectionItems);if(r){let a=this.internalModel?.config;r=yw(r,a?.series),r=r.map(vw),r=gw(r,a?.series),i.selectionItems=r}if(!ea(i,this.selectionData)){this.selectionData=i;let a=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisSelectionComplete.emit({selectionData:i,model:a})}}_handleTooManySelectedElements(){this.errorPolicy===Vd.Throw&&(this._infoModalHeading=this._commonStrings?.errorStrings.tooManySelectedElements?.title,this.infoModalMessage=this._commonStrings?.errorStrings.tooManySelectedElements?.message,this._notifyOptions={kind:"warning",autoClose:!0,duration:"fast",active:!0})}_handleAlertClosed(t){t.target===this.el&&(this._notifyHeading=void 0,this.notifyMessage=void 0)}_handleAxesMinMaxChange(t){let e=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisAxesMinMaxChange.emit({bounds:t.detail,model:e})}_handleSeriesOrder(t){this.arcgisSeriesOrder.emit(t.detail)}_internalModelChange(){if(this._addModelListeners(),this.enableBetaFeatures===void 0){let t=Ie(this.internalModel?.config?.series);this.enableBetaFeatures=t===M.ScatterSeries||t===M.HistogramSeries}this.internalModel?.asyncUpdatesPromise.then(()=>{typeof this._resolveModelSetup=="function"&&this._resolveModelSetup(),this.internalModel&&(this.internalModel.config=this.internalModel.config)})}_selectionDataChange(){this.loadedLayer!==void 0&&(this.syncViewSelection||this.syncSelectionsBetweenChartAndLayerViewPolicy===rc.Enabled)&&this.view!==void 0&&this._setSelectionInSelectionManager()}async _viewChange(t,e){this._setViewTimeExtentChangeWatchHandler(),this._setViewTimeZoneWatchHandler(),e!==void 0&&t===void 0&&await this.refresh(),this.view?this._setViewSelectionsChangeWatchHandler():this._removeViewSelectionsChangeWatchHandler()}_featureIndexChange(t,e){e===void 0&&typeof t=="number"&&this.forceDataUpdateTick++}_rotatedChange(t){if(t!==void 0&&this.internalModel){let e=iP(t,Wi(this.internalModel.config));this.internalModel.config=e}}_legendPositionChange(t){if(t!==void 0&&this.internalModel){let e=eP(t,Wi(this.internalModel.config));this.internalModel.config=e}}_legendVisibilityChange(t){if(t!==void 0&&this.internalModel){let e=tP(t,Wi(this.internalModel.config));this.internalModel.config=e}}_filterBySelectionChanged(){if(this.internalModel){this.setTimeBinningInfoWhenNotProvided&&Rb(this.internalModel)&&this.internalModel.resetTimeInterval();let t=rP(Wi(this.internalModel.config));this.internalModel.config=t}}_addConfigListeners(){this.listenOn(document,"arcgisChartsConfigPanelNumberChange",this._configPanelNumberChange),this.listenOn(document,"arcgisChartsConfigDataChangeError",this._configDataChangeError)}_getSelectionFromSelectionManager(){let t;return(this.view||this.selectionManager)&&this.loadedLayer&&!ss(this.loadedLayer)&&(t=(this.selectionManager??this.view?.selectionManager)?.getSelection(this.loadedLayer)),t}_setSelectionInSelectionManager(){let t=this.selectionManager??this.view?.selectionManager;if(this.loadedLayer&&t&&!ss(this.loadedLayer)&&(this.syncViewSelection||this.syncSelectionsBetweenChartAndLayerViewPolicy===rc.Enabled)){let e,i=this.selectionData?.selectionOIDs?.length===0||this.selectionData?.selectionOIDs===void 0||this.selectionData?.selectionSource===Ti.ClearSelection,r=(this.selectionData?.selectionOIDs?.length??0)>0;i?e=[]:r&&this.selectionData&&(e=this.selectionData.selectionOIDs),e&&t.replace(this.loadedLayer,e)}}_addModelListeners(){this.listenOn(this.internalModel??null,"arcgisChartsModelConfigChange",this._modelConfigChange),this.listenOn(this.internalModel??null,"arcgisChartsModelDataChange",this._modelDataChange)}_setViewTimeZoneWatchHandler(){this._watchHandlersController.setViewTimeZoneWatchHandler()}_setViewTimeExtentChangeWatchHandler(){this._watchHandlersController.setViewTimeExtentChangeWatchHandler()}_setViewSelectionsChangeWatchHandler(){this._watchHandlersController.setViewSelectionsChangeWatchHandler()}_setSelectionManagerChangeWatchHandler(){this._watchHandlersController.setSelectionManagerChangeWatchHandler()}_removeLayerWatchHandlers(){this._watchHandlersController.removeLayerWatchHandlers()}_removeViewWatchHandlers(){this._watchHandlersController.removeViewWatchHandlers()}_removeViewSelectionsChangeWatchHandler(){this._watchHandlersController.removeViewSelectionsChangeWatchHandler()}_removeSelectionManagerChangeWatchHandler(){this._watchHandlersController.removeSelectionManagerChangeWatchHandler()}async _createModelFromLayer(t,e){if(t){let i=e??0,r="charts"in t?t?.charts?.[i]:void 0;if(r)this.internalModel=await pP({layer:t,config:r,commonStrings:this._commonStrings});else{let a=Fu(this._messages?.chartNotFoundWarning??"",{chartIndex:i.toString(),layerTitle:t.title});this.arcgisChartNotFoundWarning.emit(a),AC("warn",this,a)}}}_applyPlaceholderForPartialConfig(t){let e=Mb(this.internalModel)?M.ComboLineAndBarSeries:Ie(t?.series),i=CU(e,this._commonStrings?.errorStrings);this.notify(i)}_checkForIncompatibleChartVersion(){let t=this.internalModel?.config?.version;this.errorPolicy===Vd.Throw&&$w(t).versionStatus===VC.Newer&&(this._notifyHeading=this._commonStrings?.errorStrings.incompatibleChartVersion?.title,this.notifyMessage=this._commonStrings?.errorStrings.incompatibleChartVersion?.message?Fu(this._commonStrings?.errorStrings.incompatibleChartVersion?.message,{chartVersion:t??""}):"",this._notifyOptions={kind:"warning",autoClose:!0,active:!0})}_ourModelExistsIn(t){return t.some(e=>Pr(this.internalModel)&&this.internalModel?.isSameChartAs(e))}_gatherComponentGlobalOptions(){return{queueChartCreation:this.queueChartCreation,skipChartCreationQueue:this.skipChartCreationQueue,hideLicenseWatermark:this.hideLicenseWatermark,showLicenseWatermark:this.showLicenseWatermark,enableResponsiveFeatures:this.enableResponsiveFeatures,autoDisposeChart:this.autoDisposeChart,animationEnabled:this.animationEnabled||this.useAnimatedCharts}}_addMutationObserverForCalciteTheme(){RC(this.el,["class"],()=>{let t=kv(this.el);t!==this._calciteThemeApplied&&(this._calciteThemeApplied=t,this.refresh({updateData:!1}))})}_gatherComponentOptions(t=!0){let e=this.filterByExtent||this.filterByViewExtent,i=this.internalModel?.config,r=Ie(i?.series),a=e||r!==M.HistogramSeries?this.view:void 0;return{layer:this.loadedQueryObject,view:a,viewExtentUpdated:t&&e&&(this.view!==void 0||kh(this.loadedQueryObject)),ignoreViewExtent:this.ignoreViewExtent,chartLimits:this.chartLimits,guideTooltipFormatter:this.guideTooltipFormatter,xAxisLabelFormatter:this.xAxisLabelFormatter,yAxisLabelFormatter:this.yAxisLabelFormatter,secondaryYAxisLabelFormatter:this.secondaryYAxisLabelFormatter,tooltipFormatter:this.tooltipFormatter,dataLabelFormatter:this.dataLabelFormatter,selectionData:this.selectionData,filterBySelection:this.filterBySelection,actionMode:this.actionMode,cursorRange:this.cursorRange,selectionTheme:this.selectionTheme,setTimeBinningInfoWhenNotProvided:this.setTimeBinningInfoWhenNotProvided,returnSelectionOIDs:ss(this.loadedLayer)?!1:this.returnSelectionOIDs,returnSelectionIndexes:this.returnSelectionIndexes,hideEmptySeries:this.hideEmptySeries,autoInverseDataLabelTextColor:this.autoInverseDataLabelTextColor,replaceNoValueCategoryWithZero:this.replaceNoValueCategoryWithZero,gaugeInnerLabelFormatter:this.gaugeInnerLabelFormatter,ignoreSmoothRenderingLimit:this.ignoreSmoothRenderingLimit,pieChartLegendValueLabelFormatter:this.legendValueLabelFormatter,interactionsDisabled:this.interactionsDisabled||this.disableInteractions,togglingLegendItemsDisabled:this.togglingLegendItemsDisabled||this.disableTogglingLegendItems}}_raiseLogScaleNotCompatibleWarning(t,e){let i=!0;return this.internalModel?.config?.axes?.forEach((r,a)=>{rm({chartConfig:this.internalModel?.config,axisConfigIndex:a,chartData:Xa(e?.data??this._sanitizedChartData)})||(i=!1,this._raiseInvalidDataWarning({invalidType:a===0?Ro.NegativeValueInXAxisLogScale:Ro.NegativeValueInYAxisLogScale,queryObject:t}))}),i}_raiseNoDataWarning(t){let{dataInfo:e,config:i,queryObject:r}=t,a=!1;if(e?.data){let n=Xa(e.data),o=Ro.EmptyDataSet;fw({chartConfig:i,nullAsValid:this.nullAsValid,zeroCountAsValid:this.zeroCountAsValid,dataSet:n})&&(kd(this.internalModel?.config)&&tm(this.internalModel?.config)&&e.count&&e.count>0&&(o=Ro.NoValue),a=!0,this._raiseInvalidDataWarning({invalidType:o,elementCount:e.count,queryObject:r}))}return a}_raiseInvalidDataWarning(t){let{invalidType:e,elementCount:i,queryObject:r}=t,a=this.internalModel?.config,n=a!==void 0&&hm({seriesConfig:a.series[0],xAxisValueFormatType:qC(a),queryObject:r}),o=kd(a)&&tm(a),l=hw({invalidType:e,elementCount:i,seriesCount:a?.series?.length,chartLimits:this.chartLimits,filterBySelection:this.filterBySelection,queryObject:r,formatLocale:tc(this.el),isTemporalChart:n,isByFeatureGauge:o,errorStrings:this._commonStrings?.errorStrings});(l.keyword!==Ro.EmptyDataSet||this.infoModalMessage===void 0||l.keyword===Ro.EmptyDataSet&&o)&&(this.arcgisBadDataWarningRaise.emit(l),this.notify(l.message,l.header))}_processInvalidConfigStatus(t,e){if(this.enableConfiguration||this.configurationEnabled)this._handleUpdateCompleted(t);else{this.showLoader=!1;let{title:i,message:r}=SU({chartConfig:e,createMessage:this.placeholder,status:t,errorStrings:this._commonStrings?.errorStrings});this.arcgisInvalidConfigWarningRaise.emit({keyword:Ro.InvalidConfig,header:i,message:r}),this.notify(r,i)}}async _createChartInstance(t=!0){if(this.internalModel?.config)try{this._addMutationObserverForCalciteTheme(),await this._renderChart(),t&&this._chart&&(this._setViewTimeExtentChangeWatchHandler(),this._setViewTimeZoneWatchHandler(),this._setViewSelectionsChangeWatchHandler(),this._setSelectionManagerChangeWatchHandler())}catch(e){this._handleRuntimeError(e),this._chart?.dispose(),this._chart=void 0}}_notifyDataProcessComplete(t){let e=this.internalModel?.config;if(t&&e){let i=sm({data:t,seriesConfig:e.series});if(i){this._sanitizedChartData=i;let r=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisDataProcessComplete.emit({chartData:i,model:r})}}}_notifyDataFetchComplete(t){let e=this.internalModel?.config;if(t&&"dataItems"in t&&e&&Ie(e?.series)===M.PieSeries){let i=Wi(t);i.dataItems=WN(i.dataItems,e),this.arcgisDataFetchComplete.emit(i)}}async _renderChart(){let t=this.internalModel?.config;if(xl(t))this._applyPlaceholderForPartialConfig(t);else if(t){let e=this._chart===void 0;this._checkForInvalidContainer(),e&&this._checkForIncompatibleChartVersion();let i=await this._loadQueryObject.taskComplete;if(i){let r=this._gatherComponentOptions(),a=Ws(i,this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled),n=await this._checkIfDataUpdateIsNeeded.taskComplete,{dataUpdateDetails:o}=n,l=n.dataUpdateNeeded,h=await this._prepareConfigForRendering.taskComplete,u=h?.alteredConfig?{...h.alteredConfig}:void 0,c=this._lastRenderedProps?.chartConfig;if(o?.common&&c?.series&&u?.series&&(o.common.numberOfSeriesChanged=Lw(c.series,u.series)),!u&&!this.loadedLayer||Cb(u,this.loadedLayer)&&await this._isChartSupportedByDataSource.taskComplete){let d=await this._validateWebChart.taskComplete;if(!d.valid)this._processInvalidConfigStatus(d,u);else if(u){await this._loadLayerView.taskComplete;let p=await this._getData.taskComplete,f=p.dataInfo??{valid:!0,data:this._processedChartData??this._sanitizedChartData},m=p.dataWasUpdated;if(Ie(u.series)===M.PieSeries){let g=Uk({creation:e,previousConfig:c,newConfig:u,dataInfo:f,dataUpdateNeeded:m,utilsStrings:this._commonStrings.utilsStrings});m=m||g}if(!f.valid)this._raiseInvalidDataWarning({invalidType:f.invalidType,elementCount:f.count,queryObject:i});else{if(Ie(u.series)===M.PieSeries){let v=Uk({creation:e,previousConfig:c,newConfig:u,dataInfo:f,dataUpdateNeeded:m,utilsStrings:this._commonStrings.utilsStrings});m=m||v}let g,y=Wi(u);if({filteredConfig:u,seriesFilteredOut:g}=nP({showEmptySeries:this.showEmptySeries??this.hideEmptySeries===!1,config:u,data:f?.data}),this._getData.status===dm.COMPLETE&&!this._raiseNoDataWarning({dataInfo:f,config:u,queryObject:i})&&this._raiseLogScaleNotCompatibleWarning(i,f)){let v=Rd({oldConfig:g?y:c,newConfig:u,dataWasUpdated:m});v&&uw({alteredConfig:u,dataInfo:f,fieldList:a,options:r,queryObject:i}),um(c,u)&&(m=!0);let b=Vo(u)?u.showMean:void 0,x=f?.data??this._sanitizedChartData,_=x&&b&&"meanLines"in x?x.meanLines:Xa(x);_&&(e||m)&&({colorMatchApplied:this._colorMatchApplied,rendererFieldNames:this._rendererFieldNames}=await rb({data:_,queryObject:i,chartConfig:u,allowColorMatch:hb({chartConfig:u,queryObject:i})})),this._calciteThemeColors&&(u=OU(u,this._calciteThemeColors),this._calciteThemeApplied=kv(this.el));let w=!1,C;if(u.series[0].type===M.PieSeries){let D=Xa(this._processedChartData),$=Xa(f.data);w=UA(D,$),C=YA({creation:e,dataInfo:f,pieChartDataActuallyChanged:w,chartConfig:u,previousConfig:c,queryObject:i,popupTemplateFieldInfosEnabled:this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled,utilsStrings:this._commonStrings.utilsStrings})}let P=await LN({creation:e,dataInfo:f,pieChartDataActuallyChanged:w,chartConfig:u,previousConfig:c,pieSlicesSymbols:C,queryObject:i,chartWillRenderCallback:this.chartWillRender,popupTemplateFieldInfosEnabled:this.popupTemplateFieldInfosEnabled,utilsStrings:this._commonStrings?.utilsStrings});if(P?.changesApplied&&(d=await Sb({input:P?.alteredConfig,queryObject:i,allowUsingObjectIdStat:this.allowUsingObjectIdStat,errorStrings:this._commonStrings?.errorStrings}),d.valid&&(u=P.alteredConfig,C=P.alteredPieSlicesSymbols,this._colorMatchApplied=P.colorMatchApplied,this._rendererFieldNames=P.rendererFieldNames)),u.series[0]?.type===M.PieSeries&&f.data&&"dataItems"in f.data&&HN({data:f.data.dataItems,newChartConfig:u,pieSlicesSymbols:C,fieldList:a}),this._processedChartData=Wi(f.data),!d.valid)this._processInvalidConfigStatus(d,u);else{if((l||v)&&(this._notifyDataProcessComplete(f.data),this._notifyDataFetchComplete(f.data)),!this.filterBySelection&&!o?.common?.filterBySelectionChanged&&!ss(i)){let T=Fb({runtimeDataFilters:this.runtimeDataFilters,view:this.view,viewTimeExtentChangePolicy:this.viewTimeExtentChangePolicy,syncViewTimeExtent:this.syncViewTimeExtent}),I=this._lastRenderedProps?.options?.selectionData,N=this.selectionData?.selectionSource!==Ti.SelectionByClick&&this.selectionData?.selectionSource!==Ti.SelectionByRange&&!ea(I?.selectionOIDs,this.selectionData?.selectionOIDs),B=await bw({chartConfig:u,chartData:this._processedChartData,dataWasUpdated:l,queryObject:i,selectionData:this.selectionData,replaceNoValueCategoryWithZero:this.replaceNoValueCategoryWithZero,hideZeroCountCategories:this.hideZeroCountCategories,chartLimits:this.chartLimits,setTimeBinningInfoWhenNotProvided:this.setTimeBinningInfoWhenNotProvided,returnFeaturesExtent:this.returnFeaturesExtent,popupTemplateFieldInfosEnabled:this.popupTemplateFieldInfosEnabled,view:r?.view,viewExtentUpdated:r?.viewExtentUpdated,returnSelectionOIDs:r?.returnSelectionOIDs,runtimeDataFilters:T,ignoreViewExtent:r?.ignoreViewExtent,errorStrings:this._commonStrings?.errorStrings,selectionIDsChanged:N});B&&r&&(r.selectionData={...this.selectionData,selectionItems:B})}this._hideInfoModal();let{t9nLocale:D}=Sh(this._chartRef.value??document.documentElement),$=await YU(D,this._useAmCharts5());kd(u)&&IN({chartConfig:u,chartData:f.data});let A={chartConfig:u,options:r,globalOptions:this._gatherComponentGlobalOptions(),dataUpdateDetails:o,configWithAllSeries:y,dataWasUpdated:m,chartContainer:this._chartRef.value,queryObject:i,dataInfo:f,colorMatchApplied:this._colorMatchApplied,rendererFieldNames:this._rendererFieldNames,pieSlicesSymbols:C,hasSeriesFilteredOut:g,uniqueInternalID:this.el.id,t9nStrings:{errorStrings:this._commonStrings?.errorStrings,utilsStrings:this._commonStrings?.utilsStrings,amChartsStrings:$},dataUpdateNeededProps:{forceDataUpdateTick:this.forceDataUpdateTick,runtimeDataFilters:this.runtimeDataFilters,returnFeaturesExtent:this.returnFeaturesExtent,chartLimits:this.chartLimits,updateSplitBySeries:this.updateSplitBySeries},extraProps:{layer:this.loadedQueryObject,filterBySelection:this.filterBySelection,filterByExtent:this.filterByExtent,filterByViewExtent:this.filterByViewExtent}};if(this.showLoader||(this.showLoader=!0),e){let T=this._useAmCharts5()?_U:VW;this._chart=T(A)}else this._chart?.update(A),this._handleUpdateCompleted(d);this._lastRenderedProps=A,await this._generateHeatChartClassBreaks(f)}}}}}}}}render(){this._calciteThemeColors=wU(this.el,this.calciteThemingCSSVariables);let t=this.notifyMessage?UU({heading:this._notifyHeading,message:this.notifyMessage,options:this._notifyOptions}):null,e=this.infoModalMessage!==void 0&&this.showUIMessages!==!1&&!this.hideUIMessages||this.showLoader,i=this.notifyMessage&&this._notifyOptions?.kind==="danger"||e,r={[Sa.ChartWrapper]:!0,[Sa.Hide]:i,[Sa.Show]:!i,[Sa.Chart]:!i},a={[Sa.ChartContainer]:!0,[Sa.Hide]:i,[Sa.Show]:!i,[Sa.Chart]:!i,[Sa.DisableInteractions]:this.interactionsDisabled||this.disableInteractions},n=this.notifyMessage!==void 0?{[Sa.NotifyPanel]:!0,[Sa.Show]:!0}:{[Sa.Hide]:!0};return Gu`<slot name=${Gw.actionBar} @slotchange=${o=>{this._actionBarElement=gP(o,this.el,this.internalModel?.config)}} ${Dv(this._actionBarSlotRef)}></slot>${e?Gu`<arcgis-charts-info-modal .heading=${this._infoModalHeading} .message=${this.infoModalMessage} .showLoader=${this.showLoader} .loaderColors=${this.loaderColors} .calciteThemeColors=${this._calciteThemeColors}></arcgis-charts-info-modal>`:null}<div class=${Of(r)}><div class=${Of(a)} ${Dv(this._chartRef)}></div></div><div class=${Of(n)}>${t}</div>`}};MC("arcgis-chart",BS);return BS},"core/reactiveUtils","intl","layers/Layer","portal/PortalItem",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o)
|
|
45
|
+
Value: {${Hi.valueField}}`,width:ne,height:ne}),l.columns.template.adapters.add("cursorOverStyle",(h,u)=>u.dataItem?.dataContext?.[Ku]?"auto":h),bL(l,r?.tooltipFormatter),vv(l,a),Or(l.columns.template,r?.selectionTheme),Hn({element:l.columns.template,series:l,queryObject:n,errorStrings:o}),l}function n5(s,t){t?.dataItems&&s.data.setAll(t.dataItems)}function o5(s){let{columnSeries:t,seriesConfig:e}=s,{gradientHeatRules:i}=Y.heatChart,{gradientRules:r,heatRulesType:a,gridLine:n}=e,o=e.emptyCells?.symbol??Y.heatChart.emptyCells?.symbol,l=r?.colorList?.[0]??i.minColor,h=r?.colorList?.[1]??i.maxColor,u=r?.outsideRangeLowerColor??i.outsideRangeLowerColor,c=r?.outsideRangeUpperColor??i.outsideRangeUpperColor,{minValue:d,maxValue:p}=r??{},{color:f,opacity:m}=_t(l),{color:g,opacity:y}=_t(h),v=_t(u),b=_t(c);t.set("heatRules",[{target:t.columns.template,dataField:"value",key:"fill",customFunction:(x,_,w,C)=>{let P=x.dataItem?.dataContext;if(x instanceof Ke){let D,$,A,T=!1;if(a===wh.Renderer){let I=P?.[Ee.rendererSymbolField];if(ec(I)){A=Wi(I);let{outlineSymbol:N}=ev(n);A.outline=N}else T=!0}if((!Number.isFinite(C)||T)&&o){A=Wi(o);let{outlineSymbol:I}=ev(n);A.outline=I}if(A){let I=gh({root:t.root,element:x,fillSymbol:A});Sf(x,I)}else typeof d=="number"&&C<d?{color:D,opacity:$}=v:typeof p=="number"&&C>p?{color:D,opacity:$}=b:_===w?(D=f,$=m):(D=qe.interpolate((C-_)/(w-_),f,g,"rgb"),$=m+(C-_)/(w-_)*(y-m)),D&&x.set("fill",D),$!==void 0&&x.set("fillOpacity",$)}}}])}function l5(s,t){t?.color?Wn({element:s.columns.template,lineSymbol:t}):s.columns.template.setAll({strokeOpacity:0,strokeWidth:0})}function h5(s){let{series:t,data:e,dataWasUpdated:i,sortChanged:r,timeZoneChanged:a,seriesWereReinitialized:n,seriesConfig:o,autoInverseDataLabelTextColor:l,options:h,queryObject:u,chartConfig:c}=s,d=i===!0||r===!0||a||n===!0;t.set("id",o.id),ri(t,o.visible),ld(t,!1),Or(t.columns.template,h?.selectionTheme),Lz(s),l5(t,o.gridLine),o5({columnSeries:t,seriesConfig:o}),d&&n5(t,e),s5({seriesType:M.HeatSeries,series:t,seriesConfig:o,dataLabelsConfig:o.dataLabels,autoInverseDataLabelTextColor:l,externalDataLabelFormatter:h?.dataLabelFormatter});let{chart:p}=t;p&&u5({seriesConfig:o,queryObject:u,chartConfig:c,chart:p}),h?.interactionsDisabled&&ld(t,!0)}function u5(s){let{seriesConfig:t,queryObject:e,chartConfig:i,chart:r}=s,a;if(t.heatRulesType===wh.Renderer)a={heatRulesType:wh.Renderer,seriesColors:QL({queryObject:e,chartConfig:i,forLegend:!1})};else{let{gradientHeatRules:n}=Y.heatChart,{gradientRules:o}=t;a={heatRulesType:wh.Gradient,seriesColors:{startColor:o?.colorList?.[0]??n.minColor,endColor:o?.colorList?.[1]??n.maxColor}}}Pa({chartId:r.get("id"),data:a,colorMatchApplied:!1,htmlContainer:r.root.dom})}function JL(s,t){let e="",i,r,a;return s&&typeof s=="object"&&(e="label"in s&&typeof s.label=="string"?s.label:"",i="symbol"in s&&s.symbol&&typeof s.symbol=="object"&&"color"in s.symbol&&Array.isArray(s.symbol.color)?s.symbol.color:void 0,a="symbol"in s&&s.symbol&&typeof s.symbol=="object"&&"outline"in s.symbol&&Array.isArray(s.symbol.outline)?s.symbol.outline:void 0,t&&(Array.isArray(i)&&({color:i,opacity:r}=_t(i)),Array.isArray(a)&&(a=_t(a).color))),{legendItemLabel:e,legendItemColor:i,legendItemColorOpacity:r,legendItemStrokeColor:a}}function c5(s){let t,{outlineColor:e,outlineOpacity:i,dataItems:r,valueField:a,classBreakInfo:n,classBreakIndex:o,numberOfClassBreaks:l,evaluateUpTo:h}=s,{legendItemLabel:u,legendItemColor:c,legendItemColorOpacity:d}=JL(n,!0);if(n&&typeof n=="object"&&c&&!Array.isArray(c)){let p=!0;if(r&&a){let f="classMinValue"in n&&typeof n.classMinValue=="number"?n.classMinValue:-1/0,m="classMaxValue"in n&&typeof n.classMaxValue=="number"?n.classMaxValue:1/0,g=o===l-1;p=r.some(y=>{let v=y[a];return g||h?typeof v=="number"&&v>=f&&v<=m:typeof v=="number"&&v>=f&&v<m})}p&&(t={[Zr.nameField]:u,[Zr.fillField]:c,[Zr.strokeField]:e,[Zr.fillOpacityField]:d,[Zr.strokeOpacityField]:i})}return t}function d5(s){let t,{legendItemLabel:e,legendItemColor:i,legendItemStrokeColor:r}=JL(s,!1);return Array.isArray(i)&&(!r||Array.isArray(r))&&(t={label:e,symbol:{type:Pt.SFS,style:Wr.Solid,color:i,outline:{type:Pt.SLS,color:r??i}}}),t}function QL(s){let{queryObject:t,chartConfig:e,forLegend:i,series:r}=s,a,n=ms(t),o=e.series?.[0],l=e.chartRenderer??n?.renderer?.toJSON(),{outlineColor:h,outlineOpacity:u}=ev(o?.gridLine);if((l?.type==="classBreaks"||l?.type==="class-breaks")&&"classBreakInfos"in l){let c=r?.data.values,d=r?.get("valueField")??Hi.valueField,p=l.classBreakInfos?.[0],f=p?p.classMinValue===p.classMaxValue:!1;a=l.classBreakInfos.map((m,g)=>{let y;return i?y=c5({outlineColor:h,outlineOpacity:u,dataItems:c,valueField:d,classBreakInfo:m,classBreakIndex:g,numberOfClassBreaks:l.classBreakInfos.length,evaluateUpTo:f}):y=d5(m),y}).filter(Boolean)}return a}function p5(s){let t=s.yAxes.getIndex(0);if(t){let e=pi({childId:`${AS}_y_${t.uid}`,parent:t});e instanceof Lt&&e.set("dx",0)}}function f5(s,t){let e=Y.axisLabelSpacing.verticalAxisLabelSidePadding,i=Y.heatChart.legend.legendPadding+e;t.set("marginRight",i),s.leftAxesContainer.setAll({paddingLeft:e});let r=s.leftAxesContainer.children.values[0];r instanceof Bi&&r.set("paddingLeft",e)}function eF(s,t){let{root:e}=s,i=se(s.uid,"rtl")??!1,r=se(s.uid,"config")??t,a=r?.series[0],{start:n,end:o}=Sv(i,a),l=r?.legend?.position??Y.heatChart.legend.position,h=l===ze.Top||l===ze.Bottom;return In.new(e,{orientation:h?"horizontal":"vertical",startColor:n.color,endColor:o.color,visible:r?.legend?.visible,startOpacity:n.opacity,endOpacity:o.opacity})}function m5(s,t){let e=se(t.uid,"rtl")??!1,i=se(t.uid,"config");if(i?.series[0].type===M.HeatSeries){let r=i?.series[0],{start:a,end:n}=Sv(e,r);s.setAll({startColor:a.color,endColor:n.color,startOpacity:a.opacity,endOpacity:n.opacity})}}function Sv(s=!1,t){let e=Y.heatChart.gradientHeatRules,i=t.gradientRules?.colorList??[...s?[e.maxColor,e.minColor]:[e.minColor,e.maxColor]],{color:r,opacity:a}=_t(i[0]),{color:n,opacity:o}=_t(i[1]);return{start:{color:r,opacity:a},end:{color:n,opacity:o}}}function kA(s,t){let e=se(s.uid,"rtl")??!1,i=se(s.uid,"config")?.series[0],{start:r,end:a}=Sv(e,i);t.setAll({startColor:r.color,endColor:a.color})}function tF(s){let t=se(s.uid,"config");if(t?.series?.[0]?.type===M.HeatSeries&&t?.legend?.visible!==!1){let e=Y.heatChart.legend,i=t?.legend?.position??e.position,r=ds(Qs,s.uid),a,n=!1;switch(i){case ze.Top:a=s.topAxesContainer,n=!0;break;case ze.Bottom:a=s.bottomAxesContainer,n=!1;break;case ze.Left:a=s.leftAxesContainer,n=!0;break;case ze.Right:a=s.rightAxesContainer,n=!1;break;default:a=void 0}if(a!==void 0){let o=pi({childId:r,parent:a,useChildId:!0});if(o!==void 0){let{children:l}=a,h=l.indexOf(o);h!==-1&&(n&&h!==0?(l.removeValue(o),l.unshift(o),a.markDirty()):!n&&h!==l.length-1&&(l.removeValue(o),l.push(o),a.markDirty()))}}}}function iF(s){let{chart:t,legend:e,legendContainer:i}=s,{root:r}=t,a=se(t.uid,"config"),n=Y.heatChart.legend,o=a?.legend?.position??n.position,l,h,u,c=o===ze.Left||o===ze.Top,d=pi({childId:mn,parent:i}),p=a?.legend?a.legend.visible??!0:!1,f=a?.legend?.title?a.legend.title.visible??!0:!1,m=d instanceof Lt&&p&&f?d.height()>0?d.height():n.titleHeight:0,g=o===ze.Left||o===ze.Right;switch(e.setAll({orientation:g?"vertical":"horizontal",width:ne}),o){case ze.Left:i.setAll({layout:r.verticalLayout,paddingRight:n.legendPadding,width:n.width}),f5(t,i),l=t.leftAxesContainer;break;case ze.Right:i.setAll({layout:r.verticalLayout,paddingLeft:n.legendPadding,paddingRight:n.legendPadding,width:n.width}),t.rightAxesContainer.setAll({paddingRight:n.chartPadding}),l=t.rightAxesContainer;break;case ze.Top:u=n.chartPadding,i.setAll({layout:r.verticalLayout,paddingBottom:n.legendPadding,paddingTop:n.legendPadding,width:ne}),l=t.topAxesContainer;break;case ze.Bottom:{h=n.chartPadding,i.setAll({layout:r.verticalLayout,paddingTop:n.legendPadding,width:ne}),t.bottomAxesContainer.setAll({paddingBottom:n.legendPadding+m});let y=pi({childId:_v,parent:t});y instanceof De&&y.set("paddingBottom",n.chartPadding+m),l=t.bottomAxesContainer}break}p5(t),e.markDirty(),rF(t,{chartPaddingTop:u,chartPaddingBottom:h}),pl(()=>{l&&(c?l.children.unshift(i):l.children.push(i),t.markDirty(),e.markDirty(),l.markDirty())})}function rF(s,t){let{chartPaddingTop:e,chartPaddingLeft:i,chartPaddingRight:r,chartPaddingBottom:a}=t;s.setAll({paddingTop:e,paddingLeft:i,paddingRight:r,paddingBottom:a})}function sF(s,t){let e=s.root.events.on(_i.FrameEnded,()=>{s.markerContainer.children.length>0&&(t(),e.dispose())})}function aF(s){let{series:t,legend:e,chart:i}=s,r=se(i.uid,"config"),a=n=>{let o=n.getPrivate("valueLow"),l=n.getPrivate("valueHigh");o!==void 0&&l!==void 0&&(e.get("orientation")==="vertical"?(e.set("startValue",l),e.set("endValue",o)):(e.set("startValue",o),e.set("endValue",l))),pl(()=>{sF(e,()=>{nF({legend:e,series:n,chartConfig:r})})})};t!==void 0&&(t.events.on("datavalidated",()=>{a(t)}),a(t)),oF(e,r?.legend)}function nF(s){let{legend:t,series:e,chartConfig:i}=s,r=i?.series[0],a=r?.gradientRules;if(a&&(a.minValue!==void 0||a.maxValue!==void 0)){let n=e.getPrivate("valueLow"),o=e.getPrivate("valueHigh");if(n!==void 0&&o!==void 0&&o>n){let l=n,h=o,u=h-l,c=a.minValue??l,d=a.maxValue??h,p=(c-l)/u,f=(d-l)/u;p=Math.max(0,Math.min(1,p)),f=Math.max(0,Math.min(1,f));let{start:m,end:g}=Sv(!1,r),{color:y,opacity:v}=_t(a.outsideRangeLowerColor??Y.heatChart.gradientHeatRules.outsideRangeLowerColor),{color:b,opacity:x}=_t(a.outsideRangeUpperColor??Y.heatChart.gradientHeatRules.outsideRangeUpperColor),_=[{color:y,opacity:v,offset:0},{color:y,opacity:v,offset:p},{color:m.color,opacity:m.opacity,offset:p},{color:g.color,opacity:g.opacity,offset:f},{color:b,opacity:x,offset:f},{color:b,opacity:x,offset:1}],w=(P,D,$)=>{let A=ds(`heatLegendLabel${$}`,t.uid),T=t.markerContainer.children.values.find(B=>B instanceof Lt&&B.get("id")===A),I=T&&!T.isDisposed()?T:void 0,N=t.startLabel;if(I||(I=Lt.new(t.root,{id:A,position:"absolute",isMeasured:!1,centerX:Oe,centerY:Oe,paddingLeft:0}),t.markerContainer.children.push(I)),I.setAll({fill:N.get("fill"),fontSize:N.get("fontSize"),fontFamily:N.get("fontFamily")}),I.set("text",P.toString()),t.get("orientation")==="vertical"){let B=N.localBounds().top,j=N.get("fontSize")??0;if(typeof j=="number"){let z=Y.heatChart.legend.minMaxLabelPadding;I.set("x",B-j*2-z)}else I.set("x",B);I.set("y",nt(D*100)),I.set("centerY",Oe)}else{I.set("x",nt(D*100));let B=t.startLabel.localBounds().bottom,j=Y.heatChart.legend.minMaxLabelPadding;I.set("y",-B-j),I.set("centerX",vr)}};p>0&&p<1&&w(c,p,"Min"),f>0&&f<1&&w(d,f,"Max");let C=()=>{let P;if(t.markerContainer.children.length>0&&t.markerContainer.children.each(D=>{D instanceof xi&&(P=D)}),P){let D=0;t.get("orientation")==="vertical"&&(D=90),P.set("fillGradient",So.new(t.root,{stops:_,rotation:D}))}};if(t.markerContainer.children.length>0)C();else{let P=t.markerContainer.children.events.once("push",()=>{t.markerContainer.children.length>0&&(P.dispose(),C())})}}}else{let n=()=>{if(t.get("orientation")==="vertical"){let o;t.markerContainer.children.length>0&&t.markerContainer.children.each(l=>{l instanceof xi&&(o=l)}),o&&o.set("rotation",180)}};if(t.markerContainer.children.length>0)n();else{let o=t.markerContainer.children.events.once("push",()=>{t.markerContainer.children.length>0&&(o.dispose(),n())})}}}function oF(s,t){if(s!==void 0){let e={type:M.Text,visible:t?.visible,content:{...t?.body,type:Pt.TS,text:" "}};[s.startLabel,s.endLabel].forEach(i=>{Wa({label:i,labelConfig:e,skipSettingText:!0,skipSettingXAndY:!0})})}}function SC(s){let t=ds(Qs,s.uid);[s.bottomAxesContainer,s.rightAxesContainer,s.leftAxesContainer,s.topAxesContainer].forEach(e=>{let i=pi({childId:t,parent:e,useChildId:!0});i&&(i.children.values.filter(r=>r instanceof In).forEach(r=>{r.dispose()}),e.children.removeValue(i),i.dispose()),e.markDirty()}),rF(s,{}),y5(s)}function CC(s,t){let e=nd({root:t.root,parent:t,index:0,id:ds(mn,t.uid)});return e.set("paddingTop",Y.heatChart.legend.titlePadding),Iu({chart:s,label:e,labelType:wt.LegendTitle}),e}function MS(s){let{chart:t,legendConfig:e,container:i}=s,r=ds(Qs,t.uid),a=i;if(a||[t.bottomAxesContainer,t.rightAxesContainer,t.leftAxesContainer,t.topAxesContainer].forEach(n=>{let o=pi({childId:r,parent:n,useChildId:!0});o&&(a=o)}),a!==void 0){let n=pi({childId:mn,parent:a})??CC(t,a);if(e!==void 0){let{title:o,visible:l}=e,{legendTitle:h}=Y.legendProperties;if(o!==void 0){Wa({label:n,labelConfig:{...o,visible:l!==!1&&o.visible!==!1},defaults:{...h,verticalCenter:"top"}});let u=se(t.uid,"config")?.legend?.position??Y.heatChart.legend.position;u===ze.Left||u===ze.Right?(n.set("maxWidth",250),Oo({chart:t,label:n,labelType:wt.LegendTitle})):n.set("maxWidth",void 0),lF({legendContainer:a,chart:t})}else ri(n,!1)}}}function g5(s,t){let{root:e}=s,i=se(s.uid,"config"),r=i?.legend,a=s.series.values[0];SC(s);let n=eF(s,i??t),o=De.new(e,{id:ds(Qs,s.uid),layout:e.verticalLayout});return o.children.push(n),CC(s,o),MS({chart:s,legendConfig:r,container:o}),aF({series:a,legend:n,chart:s}),r!==void 0&&r.visible!==!1&&(iF({chart:s,legend:n,legendContainer:o}),IS({legend:n,chart:s,legendContainer:o})),n}function IS(s){let{legend:t,chart:e,legendContainer:i}=s,r=se(e.uid,"config"),a=Y.heatChart.legend,n=r?.legend?.position??a.position;if(n===ze.Left||n===ze.Right)t.set("height",ne),i.set("height",ne),lF({legendContainer:i,chart:e});else{let o=pi({childId:mn,parent:i}),l=r?.legend?r.legend.visible??!0:!1,h=r?.legend?.title?r.legend.title.visible??!0:!1,u=o instanceof Lt&&l&&h?o.height()>0?o.height():a.titleHeight+a.titlePadding:0,c=n===ze.Top?a.topHeight:a.bottomHeight;t.set("height",c),i.set("height",c+u+20)}}function lF(s){let{legendContainer:t,chart:e}=s,i=se(e.uid,"config"),r=Y.heatChart.legend,a=i?.legend?.position??r.position;if(a!==ze.Left&&a!==ze.Right)return;let n=pi({childId:mn,parent:t}),o=i?.legend?.title?i.legend.title.visible??!0:!1;if(n instanceof Lt&&o){let l=()=>{let h=n.width(),u=r.width,c=Math.max(h+r.legendPadding*2,u);t.set("width",c)};n.width()>0?l():n.events.once("boundschanged",l)}else t.set("width",r.width)}function y5(s){let t=pi({childId:xv,parent:s});t instanceof De&&t.set("marginTop",0)}function v5(s){let t,e=ds(Qs,s.uid);return[s.bottomAxesContainer,s.rightAxesContainer,s.leftAxesContainer,s.topAxesContainer].forEach(i=>{let r=pi({childId:e,parent:i,useChildId:!0});if(r){let n=r.children.values.find(o=>o instanceof In);if(n){t=n;return}}let a=i.children.values.find(n=>n instanceof In);if(a){t=a;return}}),t}function b5(s){let{chart:t,chartConfig:e,heatLegendPositionChanged:i,heatRulesTypeChanged:r}=s,{legend:a}=e,n=a!==void 0&&a.visible!==!1,o=t.series.values[0];if(i||r)SC(t),n&&o instanceof Zt&&pl(()=>{let l=eF(t),h=De.new(t.root,{id:ds(Qs,t.uid),layout:t.root.verticalLayout});h.children.push(l),CC(t,h),MS({chart:t,legendConfig:a,container:h}),kA(t,l),iF({chart:t,legend:l,legendContainer:h}),aF({series:o,legend:l,chart:t}),IS({legend:l,chart:t,legendContainer:h})});else if(o instanceof Zt){let l=v5(t);if(l){kA(t,l),MS({chart:t,legendConfig:a}),oF(l,a);let h=l.parent;h?.get("id")===ds(Qs,t.uid)&&ri(h,n),ri(l,n),m5(l,t),h&&IS({legend:l,chart:t,legendContainer:h}),pl(()=>{sF(l,()=>{nF({legend:l,series:o,chartConfig:e})})})}}}function x5(s,t){let e=!1;if(t===ze.Right||t===ze.Left)e=!0;else{let i=s.dataItems[0]?.get("itemContainer").bounds().left;i!==void 0&&(e=!s.dataItems.some(r=>r.get("itemContainer").bounds().left!==i))}return e}function _5(s){let t=!1,e=s.dataItems[0]?.get("itemContainer").bounds().bottom;return e!==void 0&&(t=!s.dataItems.some(i=>i.get("itemContainer").bounds().bottom!==e)),t}function S5(s){hC(s.uid,{isLegendValueLabel:!0}),s.valueLabels.template.adapters.add("text",(t,e)=>{let i=t??"",r=EW(s.uid,"pieChartLegendValueLabelsFormatter");return r!==void 0&&(i=r(e.dataItem?.get("value")??0,e.dataItem?.get("valuePercentTotal")??0)),i}),s.valueLabels.template.set("text","")}function hF(s){let{legend:t,seriesConfig:e,webChartLegend:i,pieChartLegendValueLabelFormatter:r,chart:a}=s,{visible:n,body:o,displayNumericValue:l,displayPercentage:h}=i??{};if(Ie(e)===M.PieSeries){let{numericValueFormat:u,percentValueFormat:c,valuePrefix:d,valueSuffix:p,percentagePrefix:f,percentageSuffix:m}=e[0],g=l??Y.pieChart.displayNumericValueOnLegend,y=h??Y.pieChart.displayPercentageOnLegend,v=r;if(r===void 0){let D=pC({pieChart:a,valueIntlOptions:u?.intlOptions,percentageIntlOptions:c?.intlOptions,displayNumericValue:g,displayPercentage:y,valuePrefix:d,valueSuffix:p,percentagePrefix:f,percentageSuffix:m});v=($,A)=>D("",$,A)}BW(t.uid,{pieChartLegendValueLabelsFormatter:v});let b=se(a?.uid??0,"config")?.legend?.position??Y.legendProperties.position,x=i?.valueLabelMaxWidth,_=x5(t,b),w={type:M.Text,visible:n,content:{...o,type:Pt.TS,text:".",verticalAlignment:"middle",horizontalAlignment:_?"right":"center"}};Wa({label:t.valueLabels.template,labelConfig:w,defaults:Y.legendProperties.valueLabels});let C=se(a?.uid??0,"rtl")??!1,P=x!==void 0&&!Number.isNaN(x);t.valueLabels.template.setAll({x:void 0,y:void 0,paddingRight:5,textAlign:C?"right":"left",disabled:g===!1&&y===!1,width:P?x:null,oversizedBehavior:P?"wrap":"none"})}}function C5(s,t){s.labels.template.adapters.add("maxWidth",e=>{let i=e,r=se(t.uid,"config"),a=r?.legend?.labelMaxWidth,n=r?.legend?.position??Y.legendProperties.position;if(n===ze.Right||n===ze.Left)i=a??Y.legendProperties.legendLabels.maxWidth;else if(a!==void 0)i=a;else{let o=0;s.valueLabels.template.get("forceHidden")||s.valueLabels.each(h=>{let u=h.get("width",0);typeof u=="number"&&(o=Math.max(o,u))});let l=s.get("width",200);typeof l=="number"&&(i=l+o)}return i}),s.valueLabels.template.adapters.add("maxWidth",e=>{let i=e,r=se(t.uid,"config"),a=r?.legend?.valueLabelMaxWidth,n=r?.legend?.position??Y.legendProperties.position;return n===ze.Right||n===ze.Left?i=a??Y.legendProperties.valueLabels.maxWidth:i=a??Number.NaN,i})}function uF(s,t){let e=0;for(let i of s.dataItems){let r=i.get("label")?._contentWidth??0;e=Math.max(e,r)}return t&&e>t?t:e}function w5(s,t){for(let e of s.dataItems)e.get("label")?.set("width",t)}function P5(s,t){let e=0;for(let i of s.dataItems){let r=i.get("marker")?._contentWidth??0,a=i.get("valueLabel")?._contentWidth??0,n=r+t+a;e=Math.max(e,n)}return Math.ceil(e)+Y.legendPadding}function cF(s,t){pl(()=>{let e=_5(s),i=t===ze.Right||t===ze.Left||!e;w5(s,i?uF(s):void 0)})}function T5(s){let{legend:t,chart:e,seriesConfig:i,legendConfig:r}=s,{displayCategory:a}=r??{},n=a??Y.pieChart.displayCategoryOnLegend,o=se(e?.uid??0,"rtl")??!1;t.labels.template.setAll({forceHidden:n===!1,direction:o?"rtl":"ltr",oversizedBehavior:r?.labelMaxWidth!==void 0&&!Number.isNaN(r.labelMaxWidth)?"wrap":"none"}),pl(()=>{let l=uF(t,r?.labelMaxWidth),h=P5(t,l);t.itemContainers.template.setAll({width:h,layout:e.root.horizontalLayout}),C5(t,e),hF({legend:t,seriesConfig:i,webChartLegend:r,chart:e});let u=r.position??Y.legendProperties.position;cF(t,u),t.markDirty()})}function dF(s){return s?.[0].type===M.HeatSeries&&s[0].heatRulesType!==wh.Renderer}function $5(s){let t=s.target.dataItem;if(t?.dataContext!==void 0){let{dataContext:e}=t,i=typeof e=="object"&&e!==null&&"component"in e?e.component:e;if(i instanceof br){let r={visible:!i.get("visible")};zn(i)||zu(i)?r.overlayType=Jt(i.uid,"type"):r.seriesId=i.get("id"),pb(r,i.root.dom)}}}function D5(s){s.itemContainers.template.events.on(_i.Click,$5)}function k5(s,t){let e=se(t.uid,"rtl")??!1;s.itemContainers.template.setAll({reverseChildren:e})}function A5(s){let{chart:t,legend:e,chartConfig:i,showEmptySeries:r,queryObject:a}=s,n=Ie(i.series);if(t.series.length>1||n===M.PieSeries||n===M.HeatSeries){let o=[],l=pt(i.series);switch(n){case M.BoxPlotSeries:{let h=As(i);o=t.series.values.filter(u=>{let c=!1;return h?c=u instanceof yt&&!(u instanceof Bn):c=u instanceof Zs,c});break}case M.HistogramSeries:{o=t.series.values.filter(h=>{let u=!1;if(Jt(h.uid,"isOverlay")){let c=i.series[0].type===M.HistogramSeries?i.series[0].overlays:void 0,d=Jt(h.uid,"type"),p;switch(d){case zi.Mean:p=c?.mean?.created;break;case zi.Median:p=c?.median?.created;break;case zi.Normal:p=c?.comparisonDistribution?.created;break;case zi.StdDev:p=c?.standardDeviation?.created;break}u=p===!0}return u});break}case M.PieSeries:{o=t.series.getIndex(0)?.dataItems??[];break}case M.ComboLineAndBarSeries:case M.LineSeries:case M.RadarSeries:case M.BarSeries:o=t.series.values.filter(h=>{let u=!0;if(!r){let c=i.series.find(d=>d.id===h.get("id"));if(c!==void 0&&"y"in c&&typeof c.y=="string"){let{x:d,y:p}=c,f=l===_e.BarAndLineSplitByNoAggregation?`${p}_${Jn({where:c.query?.where,keepSurroundingQuotes:!1,escape:!1})}`:p;u=h.data.values.some(m=>pw({dataItem:m,x:d,y:f,aggregationType:i.series[0].query?.outStatistics?.[0]?.statisticType}))}}return u});break;case M.ScatterSeries:{let h=CL(t);h!==void 0&&(o=[h]);break}case M.HeatSeries:{let h=t.series.getIndex(0);if(h instanceof Zt&&vn(i)&&!ss(a)){let u=QL({queryObject:a,chartConfig:i,forLegend:!0,series:h});if(u){o=[...u];let c=z5(t);c!==void 0&&o.push(c)}}break}}e.data.setAll(o)}}function AA(s){let t=0;return s.dataItems.forEach(e=>{let i=e.get("itemContainer").width();t=Math.max(i,t)}),Math.ceil(t)}function LA(s){let t=0;if(s instanceof Lt&&s.get("visible")!==!1&&s.get("forceHidden")!==!0){let e=s.width();Number.isFinite(e)&&(t=e)}return t}function FA(s){let t=0;return s.series.values.forEach(e=>{let i=e.bulletsContainer;i&&i.children.values.forEach(r=>{t=Math.max(t,LA(r))}),t===0&&e.dataItems.forEach(r=>{let a=r.bullets;if(a)for(let n of a)t=Math.max(t,LA(n.get("sprite")))})}),Math.ceil(t)}function Lu(s,t){let{root:e}=s,i=pi({childId:Qs,parent:s});if(i!==void 0){let r=se(s.uid,"config"),a=se(s.uid,"rtl"),n=zr(r),o=Ie(r?.series),l=rs(r),h=r?.series?.some(we=>we.dataLabels&&we.dataLabels?.visible!==!1)??!1,u=r?.title?r.title.visible??!0:!1,c=r?.subtitle?r.subtitle.visible??!0:!1,d=r?.footer?r.footer.visible??!0:!1,p=r?.legend?r.legend.visible??!0:!1,f=r?.legend?.title?r.legend.title.visible??!0:!1,m=pi({childId:xv,parent:s}),g=m instanceof De&&u?m.height():0,y=pi({childId:xC,parent:s}),v=y instanceof De&&c?y.height():0,b=pi({childId:_v,parent:s}),x=b instanceof De&&d?b.height():0,_=pi({childId:mn,parent:i}),w=_ instanceof Lt&&p&&f?_?.height():0,C=r?.legend?.position??Y.legendProperties.position,P,D=t.get("verticalScrollbar"),$=Oe,A=Oe,T=e.verticalLayout,I=Oe,N=Oe,B=Oe,j=Oe,z=0,K,V=t.height()+w,E=0,re=0,X=h&&!n?Y.chartContainer.paddingTop??0:0,Z=0,ue,Le;switch(C){case ze.Left:T=e.verticalLayout,I=vr,B=vr,N=vr,j=vr,K=void 0,$=vr,A=vr,E=i.width(),z=g+v,V<s.seriesContainer.height()&&(z+=s.seriesContainer.height()/2-V/2),t.setPrivate("width",void 0),P=AA(t),D?.width()!==void 0&&P&&D.isVisible()&&(P+=D.width()+Y.scrollbarPadding),a&&(ue=ne,Le=P);break;case ze.Right:T=e.verticalLayout,I=ne,B=ne,N=vr,j=vr,K=void 0,$=vr,A=vr,re=i.width(),z=g+v,V<s.seriesContainer.height()&&(z+=s.seriesContainer.height()/2-V/2),t.setPrivate("width",void 0),P=AA(t),D?.width()!==void 0&&P&&D.isVisible()&&(P+=D.width()+Y.scrollbarPadding),a&&(ue=ne,Le=P);break;case ze.Top:T=e.gridLayout,I=Oe,B=Oe,N=vr,j=vr,K=ne,$=Oe,A=Oe,X+=V,z+=g+v,P=void 0,a&&(ue=void 0);break;case ze.Bottom:T=e.gridLayout,I=Oe,B=Oe,N=ne,j=ne,K=ne,$=Oe,A=Oe,Z=V,z=-Z-x,P=void 0,a&&(ue=void 0);break}if(n&&h&&(o===M.LineSeries||o===M.ComboLineAndBarSeries||o===M.BarSeries&&l===hi.Side)){let we=FA(s);if(we>0)re+=we;else if(s.series.length>0){let Te=t.root.events.on(_i.FrameEnded,()=>{let Ze=FA(s);Ze>0&&(a?E+=Ze:re+=Ze,Te.dispose(),Lu(s,t))})}}(P===void 0||P>0)&&(t.setPrivate("width",P),a&&t.itemContainers.template.setAll({centerX:ue,dx:Le})),t.setAll({layout:T,x:$,centerX:A}),i.setAll({x:I,y:N,centerX:B,centerY:j,dy:z,width:K,height:0}),s.chartContainer.setAll({paddingBottom:Z,paddingTop:X,paddingLeft:E,paddingRight:re}),K===void 0&&(i.setPrivate("width",void 0),i.markDirty()),s instanceof hs&&cF(t,C)}}function L5(s){let{chart:t,legend:e,legendContainer:i}=s,r=pi({childId:mn,parent:i});r&&r.on("visible",()=>{e.root.events.once(_i.FrameEnded,()=>{Lu(t,e)})}),i.events.on(_i.BoundsChanged,()=>{Lu(t,e)}),e.events.on(_i.BoundsChanged,()=>{Lu(t,e)}),t.seriesContainer.onPrivate("height",()=>{Lu(t,e)}),t.series.each(a=>{a.events.on(_i.DataValidated,()=>{Lu(t,e)})})}function pF(s,t){let e=nd({root:t.root,parent:t,index:0,id:ds(mn,t.uid)});return e.set("paddingTop",10),Iu({chart:s,label:e,labelType:wt.LegendTitle}),e}function F5(s,t){t.markers.template.setAll({width:Y.legendProperties.legendMarkersSize,height:Y.legendProperties.legendMarkersSize}),t.markerRectangles.template.adapters.add("fillOpacity",(e,i)=>{let r=i.parent?.dataItem?.dataContext,a=r&&Zr.fillOpacityField in r?r[Zr.fillOpacityField]:e;return typeof a=="number"?a:e}),t.markerRectangles.template.adapters.add("strokeOpacity",(e,i)=>{let r=i.parent?.dataItem?.dataContext,a=r&&Zr.strokeOpacityField in r?r[Zr.strokeOpacityField]:e;return typeof a=="number"?a:e}),t.labels.template.adapters.add("text",(e,i)=>{let r=e,a=se(s.uid,"config");if(Ie(a?.series)!==M.HeatSeries){let n=i.dataItem?.component;if(n instanceof Gi){let o=n.get("categoryField")??"",l=i.dataItem,h=l?.get("category"),u=l?.dataContext;r=h??(u?.[o]??e)?.toString()}else n instanceof br&&(r=n.get("name"))}return r})}function O5(s,t){t.seriesContainer.onPrivate("height",e=>{let i=0,r=se(t.uid,"config"),a=r?.legend,n=pi({childId:Qs,parent:t});if(n!==void 0){let l=pi({childId:mn,parent:n});l!==void 0&&a?.visible!==!1&&a?.title?.visible!==!1&&(i=l.height())}let o=r?.legend?.maxHeight??Number.NaN;Number.isFinite(o)||(r?.legend?.position===ze.Top||r?.legend?.position===ze.Bottom?o=Y.legendProperties.maxHeight:typeof e=="number"&&(o=e-i)),s.set("maxHeight",o)})}function M5(s,t,e){s.events.on(_i.DataValidated,()=>{s.dataItems.length>0&&fF(s,t,e)})}function I5(s){let t;if(s!==void 0){let e=se(s?.uid,"config");t=se(s.uid,"rtl")&&(e?.legend?.position===ze.Top||e?.legend?.position===ze.Bottom)}return t??!1}function R5(s){let t="";if(s instanceof Ut){let e=se(s.uid,"config"),i=zr(e),r=i?S.Rotated:S.NonRotated,a=rs(e),n=S.SideBySide;a===hi.Stacked?n=S.Stacked:a===hi.Stacked100&&(n=S.Stacked100);let o=se(s.uid,"rtl")?S.RTL:S.LTR,l;switch(e?.legend?.position){case ze.Left:l=S.LegendLeft;break;case ze.Top:l=S.LegendTop;break;case ze.Bottom:l=S.LegendBottom;break;case ze.Right:default:l=S.LegendRight;break}let h=i?s.yAxes.getIndex(0):s.xAxes.getIndex(0),u;h instanceof Mi?u=S.DateAxis:h instanceof Nt?u=S.ValueAxis:u=S.CategoryAxis;let c=e?.orderOptions?.data&&"orderBy"in e.orderOptions.data&&e.orderOptions.data.orderBy===xd.Descending?S.OrderByFieldsDESC:S.OrderByFieldsASC;t=`${r}-${o}-${n}-${l}-${u}-${c}`}return t}function V5(s){let t=R5(s);return _1.has(t)}function fF(s,t,e){switch(e){case M.HistogramSeries:case M.PieSeries:s.set("reverseChildren",I5(t));break;case M.BarSeries:case M.LineSeries:case M.RadarSeries:case M.ComboLineAndBarSeries:s.set("reverseChildren",V5(t));break}}function N5(s,t){let e=pi({childId:Qs,parent:s});if(e!==void 0){let i=pi({childId:mn,parent:e})??pF(s,e);if(t!==void 0){let{title:r,visible:a}=t,{legendTitle:n}=Y.legendProperties;r!==void 0?(Wa({label:i,labelConfig:{...r,visible:a!==!1&&r.visible!==!1},defaults:{...n,verticalCenter:"top"}}),Oo({chart:s,label:i,labelType:wt.LegendTitle})):ri(i,!1)}}}function E5(s,t=!1){let e=t?Y.legendProperties.roundedMarkerRadius:Y.legendProperties.rectangleMarkerRadius;s.markerRectangles.template.setAll({cornerRadiusTL:e,cornerRadiusTR:e,cornerRadiusBL:e,cornerRadiusBR:e})}function B5(s){let{legend:t,legendConfig:e,chartType:i,seriesConfig:r,chart:a}=s;if(t!==void 0){let n={type:M.Text,visible:e?.visible,content:{...e?.body,type:Pt.TS,text:" "}};if(i===M.PieSeries){let o=pi({childId:Qs,parent:a});o!==void 0&&pi({childId:mn,parent:o})!==void 0&&hF({legend:t,seriesConfig:r,webChartLegend:e,chart:a})}Wa({label:t.labels.template,labelConfig:n}),t.labels.template.setAll({x:void 0,y:void 0,paddingRight:5})}}function j5(s,t){t===!0&&s.itemContainers.each(e=>{e.events.disableType(_i.Click)})}function W5(s){let{legend:t,chart:e,seriesConfig:i}=s;i?.[0].type!==M.HeatSeries&&t.itemContainers.template.adapters.add("cursorOverStyle",()=>se(e.uid,"options")?.togglingLegendItemsDisabled===!0?"default":"pointer")}function OA(s,t){let{root:e}=s,i;if(dF(t?.series))i=g5(s,t);else{let r=De.new(e,{id:ds(Qs,s.uid),layout:e.verticalLayout}),a=t?.series?.[0].type===M.HeatSeries?{nameField:Zr.nameField,fillField:Zr.fillField,strokeField:Zr.strokeField,fillOpacityField:Zr.fillOpacityField,strokeOpacityField:Zr.strokeOpacityField}:{};i=hl.new(e,{...a,verticalScrollbar:wo.new(e,{orientation:"vertical"})}),s instanceof hs?S5(i):i.valueLabels.template.setAll({forceHidden:!0,textAlign:"left"}),F5(s,i),pF(s,r),D5(i),k5(i,s),L5({chart:s,legend:i,legendContainer:r}),O5(i,s),M5(i,s,Ie(t?.series)),W5({legend:i,chart:s,seriesConfig:t?.series}),r.children.push(i),s.children.push(r)}return i}function z5(s){let t=se(s.uid??NaN,"config"),e=t?.series[0].heatRulesType===wh.Renderer,i=s.series.values[0].data.values.some(a=>a[Hi.valueField]===null||e&&!a[Ee.rendererSymbolField]),r;if(i){let a=t?.series[0].emptyCells,n=a?.symbol?.color??Y.heatChart.emptyCells?.symbol?.color,{outlineColor:o,outlineOpacity:l}=ev(t?.series[0].gridLine);r={[Zr.nameField]:a?.text??Y.heatChart.emptyCells?.text??"",[Zr.fillField]:_t(n).color,[Zr.fillOpacityField]:_t(n).opacity,[Zr.strokeField]:o,[Zr.strokeOpacityField]:l}}return r}function MA(s){let{chart:t,legend:e,showLegend:i}=s,r=pi({childId:Qs,parent:t});r&&(ri(r,i),ri(e,i))}function IA(s){let{chart:t,showLegend:e,legendConfig:i}=s;if(i){let{title:r,visible:a}=i,n=r!==void 0&&a!==!1&&r.visible!==!1,o=pi({childId:Qs,parent:t});if(o){let l=pi({childId:mn,parent:o});l&&(r?ri(l,n):ri(l,e))}}}function mF(s){let{chart:t,chartConfig:e,legend:i,heatChartLegendUpdatedNeeded:r,showEmptySeries:a,seriesConfig:n,queryObject:o,heatRulesTypeChanged:l,heatLegendPositionChanged:h}=s,{legend:u,series:c}=e;if(dF(n)&&r)l&&i&&(MA({chart:t,legend:i,showLegend:!1}),IA({chart:t,showLegend:!1,legendConfig:u})),b5({chart:t,chartConfig:e,heatLegendPositionChanged:h,heatRulesTypeChanged:l});else if(i instanceof hl&&(n?.[0].type===M.HeatSeries&&SC(t),pi({childId:Qs,parent:t})!==void 0)){let d=Hv(c)&&u!==void 0&&u.visible!==!1;if(MA({chart:t,legend:i,showLegend:d}),IA({chart:t,showLegend:d,legendConfig:u}),d){E5(i,u?.roundMarkers),B5({legend:i,legendConfig:u,chartType:Ie(c),seriesConfig:n,chart:t}),fF(i,t,Ie(c)),A5({chart:t,legend:i,chartConfig:e,showEmptySeries:a,queryObject:o}),N5(t,u),Lu(t,i);let p=se(t.uid,"options");j5(i,p?.togglingLegendItemsDisabled),t instanceof hs&&T5({legend:i,chart:t,seriesConfig:n,legendConfig:u})}}}function gF(s){if(!(s instanceof Ks)&&s instanceof Ut){let{root:t}=s,e=wo.new(t,{orientation:"horizontal",visible:!1,marginTop:0}),i=wo.new(t,{orientation:"vertical",visible:!1});s.setAll({scrollbarX:e,scrollbarY:i})}}function H5(s,t){if(t!==void 0){let e=_t(t),i=t[3]/255,r=i/2;[{element:s.get("background"),specificOpacity:r},{element:s.startGrip.get("background")},{element:s.endGrip.get("background")},{element:s.thumb}].forEach(a=>{let{element:n,specificOpacity:o}=a;n!==void 0&&n.setAll({fill:e.color,fillOpacity:o??i})}),[{element:s.get("background"),stateName:"default",specificOpacity:r},{element:s.startGrip.get("background"),stateName:"default"},{element:s.startGrip.get("background"),stateName:"hover"},{element:s.startGrip.get("background"),stateName:"down"},{element:s.endGrip.get("background"),stateName:"default"},{element:s.endGrip.get("background"),stateName:"hover"},{element:s.endGrip.get("background"),stateName:"down"},{element:s.thumb,stateName:"default"},{element:s.thumb,stateName:"hover"},{element:s.thumb,stateName:"down"}].forEach(a=>{let{element:n,stateName:o,specificOpacity:l}=a;(n?.states.lookup(o)??n?.states.create(o,{}))?.setAll({fill:e.color,fillOpacity:l??i})})}}function X5(s,t){typeof t=="number"&&Number.isFinite(t)&&(s.get("orientation")==="horizontal"?s.setAll({height:t,minHeight:t}):s.setAll({width:t,minWidth:t}))}function Y5(s,t){if(typeof t=="number"&&Number.isFinite(t)){let e=t/30;s.startGrip.set("scale",e),s.endGrip.set("scale",e)}}function RA(s,t){typeof t=="number"&&Number.isFinite(t)&&(s.get("orientation")==="horizontal"?s.set("marginBottom",t):s.set("marginLeft",t),s.markDirtyBounds())}function yF(s){let{chart:t,scrollbarXConfig:e,scrollbarYConfig:i}=s;if(!(t instanceof Ks)&&t instanceof Ut){let r=se(t.uid,"isRotated");(t.get("scrollbarX")===void 0||t.get("scrollbarY")===void 0)&&gF(t);let a=t.get("scrollbarX"),n=t.get("scrollbarY");[a,n].forEach(o=>{if(o!==void 0){let l=o.get("orientation")==="horizontal"&&r!==!0||o.get("orientation")==="vertical"&&r===!0?e:i,h=l?.visible!==!0;if(ri(o,!h),l!==void 0&&!h){let{width:u,color:c,gripSize:d,margin:p}=l;RA(o,p??u??Y.scrollbarPadding),H5(o,c),Y5(o,d),X5(o,u)}else RA(o,0)}})}}function U5(s){pL(s)}function G5(s,t){s.columns.each(e=>{(e.dataItem?.dataContext)[t]===0&&e.set("strokeOpacity",0)})}function wC(s,t){let e=pd(t);return Number(s.dataContext?.[e])}function q5(s){let t=[],e=s.component,i=e.chart,r=e.dataItems.indexOf(s);return r>=0&&i.series.each(a=>{let n=a;if(n.get("visible")!==!1){let o=n.dataItems[r];if(o){let l=wC(o,n);Number.isFinite(l)&&l!==0&&(l>0?t.push(o):t.unshift(o))}}}),t}function K5(s){let t=!1;if(s){let e=q5(s),i=wC(s,s.component),r=e.indexOf(s);t=i>0?r===e.length-1:r===0}return t}function Z5(s){let t=["cornerRadiusTL","cornerRadiusTR","cornerRadiusBL","cornerRadiusBR"];s.columns.template.setAll({cornerRadiusTL:0,cornerRadiusTR:0,cornerRadiusBL:0,cornerRadiusBR:0}),t.forEach(e=>{s.columns.template.adapters.remove(e),s.columns.template.adapters.add(e,(i,r)=>{let a=r.dataItem,n=s.chart,o=0;if(n){let l=se(n.uid,"config"),h=l?.roundCorners,u=a?wC(a,s):Number.NaN;if(h?.rounded===!0&&Number.isFinite(u)&&u!==0&&(l===void 0||!Jf(l)||K5(a))){let c=h?.cornerRadius??0;o=(l?.rotated===!0?["cornerRadiusTR","cornerRadiusBR"]:["cornerRadiusTL","cornerRadiusTR"]).includes(e)?c:0}}return o})})}function J5(s){let{root:t,chartConfig:e,seriesConfig:i,xAxis:r,yAxis:a,options:n,queryObject:o,errorStrings:l}=s,{id:h,name:u}=i,{xField:c,yField:d,xAxisField:p,yAxisField:f}=fd(e,i),m=Jf(e),g=Zt.new(t,{id:h,name:u,stacked:m,turboMode:!0,xAxis:r,yAxis:a,[p]:c,[f]:d,maskBullets:!1});Or(g.columns.template,n?.selectionTheme);let y=dt.new({});return Sr(g.uid,{bulletTemplate:y}),Hn({element:g.columns.template,series:g,queryObject:o,errorStrings:l}),g.bullets.push(v=>{let b=Ke.new(v,{},y);return Ns.new(v,{sprite:b})}),g.columns.template.set("width",nt(100)),Z5(g),vC(g),yL(g,n?.tooltipFormatter),vv(g,e),g.appear(),g}function Q5(s){let{series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,chartSubType:a,colorMatch:n,rendererType:o}=s,l=t.root,h=pd(t),u=new Set,c,d,p=e.fillSymbol,f={root:l,seriesConfig:e,seriesIndex:i,seriesSymbol:p,isChartFillSymbol:!0},m={},g={},y=jv(i),v=Jt(t.uid,"bulletTemplate");if(v&&p?.style&&p.style!==Wr.Solid&&gh({root:l,element:v,fillSymbol:p,defaultToColorFromRamp:!0,colorRampIndex:i,isChartFillSymbol:!0,chartBackgroundColor:rL(t.chart)??[...Y.backgroundColor]}),t.columns.length===0?m=va({root:l,seriesIndex:i,colorMatch:n,seriesSymbol:p??y,element:Ke.new(l,{}),isChartFillSymbol:!0}):t.columns.each(b=>{let x=b.dataItem?.dataContext;if(Number.isFinite(x?.[h])){d=wa({dataItem:x,seriesConfig:e,chartSubType:a,colorMatch:n,rendererType:o});let _=x[Y.xAxisField]===Y.nullValue,w=cm(e.nullCategory);m=va({...f,seriesSymbol:(_&&w!==void 0?w:p)??y,element:b,colorMatch:n,rendererSymbol:d}),Sf(b,m.stylingInfo),_||(u.add(JSON.stringify(m.symbolWithColorInfo)),g=m)}}),r>1){let b=t.get("legendDataItem")?.get("marker").children.getIndex(0);b!==void 0&&(va({...f,seriesSymbol:p??y,element:b,colorMatch:n,rendererSymbol:d}),Sf(b,g.stylingInfo),b.states.apply(t.isVisible()?"default":"disabled")),va({...f,seriesSymbol:g.symbolWithColorInfo??p??y,element:t,colorMatch:n,rendererSymbol:d,keepCurrentVisibility:!0}),va({...f,seriesSymbol:g.symbolWithColorInfo??p??y,element:t.columns.template,colorMatch:n,rendererSymbol:d})}return u.size<=1&&(c=g.symbolWithColorInfo??p),G5(t,h),c}function eY(s){let{series:t,seriesConfig:e,seriesSymbolMapForEvent:i,seriesIndexMapper:r,seriesIndex:a,colorMatch:n,rendererType:o,interactionsDisabled:l}=s,h=t.chart;if(h!==void 0){let u=se(h.uid,"config"),c=u?.series.length??0,d=pt(u?.series);ld(t,!1);let p=Q5({series:t,seriesConfig:e,seriesIndex:a,numberOfSeries:c,chartSubType:d,colorMatch:n,rendererType:o});l&&ld(t,!0),i.set(r?.get(e.id)??a,p),i.size===c&&Pa({data:i,htmlContainer:t.root.dom,chartId:h.get("id"),colorMatchApplied:gd(h)})}}function tY(s){let{columnSeries:t,data:e,seriesIndex:i,chartConfig:r,dataWasUpdated:a,seriesWereReinitialized:n,rotationChanged:o,stackedTypeChanged:l,timeZoneChanged:h,sortChanged:u}=s,c=r.series[i];if(e&&c?.type===M.BarSeries&&(o===!0||a===!0||u===!0||l===!0||h||n===!0)){let{xField:d,yField:p,xAxisField:f,yAxisField:m}=fd(r,c);t.setAll({[f]:d,[m]:p}),t.data.setAll(e.dataItems)}}function iY(s){let{series:t,data:e,chartConfig:i,options:r,seriesIndex:a,dataWasUpdated:n,rotationChanged:o,timeZoneChanged:l,queryObject:h,utilsStrings:u,seriesWereReinitialized:c,autoInverseDataLabelTextColor:d,fieldList:p,sortChanged:f,stackedTypeChanged:m,colorMatch:g,seriesIndexMapper:y,seriesSymbolMapForEvent:v,rendererType:b}=s,x=i.series[a],_=i.rotated;if(t.set("id",x.id),ri(t,x.visible),Or(t.columns.template,r?.selectionTheme),gC({series:t,chartConfig:i,isRotated:_}),U5({seriesType:M.BarSeries,series:t,seriesConfig:x,isRotated:_,dataLabelsConfig:x.dataLabels,autoInverseDataLabelTextColor:d,externalDataLabelFormatter:r?.dataLabelFormatter}),tY({columnSeries:t,data:e,seriesIndex:a,chartConfig:i,dataWasUpdated:n,timeZoneChanged:l,seriesWereReinitialized:c,rotationChanged:o,stackedTypeChanged:m,sortChanged:f}),fC({series:t,seriesConfig:x,fieldList:p,queryObject:h,seriesIndex:a,tooltipFormatter:r?.tooltipFormatter,utilsStrings:u}),ml(s)){let w={series:t,seriesConfig:x,seriesIndex:a,colorMatch:g,seriesIndexMapper:y,seriesSymbolMapForEvent:v,rendererType:b,interactionsDisabled:r?.interactionsDisabled};gl({styleCallback:()=>eY(w),series:t,seriesConfig:x})}yC({chartConfig:i,series:t,seriesIndex:a,queryObject:h})}function rY(s){let{chartConfig:t,seriesConfig:e}=s,i=zr(t),r=t.showOutliers,a=t.standardizeValues,n=As(t),{y:o}=e,l=Qf(t),h=pt(l.series),u=n?void 0:e?.query?.where,c={y:h===_e.BoxPlotMultiFieldsAndCategory&&typeof o=="string"?o:void 0,chartSubType:h,splitBy:u,showOutliers:r,standardizeValues:ic(h)?a:!1},d=Cv({chartConfig:t,seriesConfig:e,key:At.ThirdQuartile});return{properties:{...d.properties,low:wi({...c,key:At.Min}),open:wi({...c,key:At.FirstQuartile}),high:wi({...c,key:At.Max})},dataFields:{...d.dataFields,low:i?"lowValueXField":"lowValueYField",open:i?"openValueXField":"openValueYField",high:i?"highValueXField":"highValueYField"}}}function sY(s){let{candleStickSeries:t,data:e,rotationChanged:i,sortChanged:r,dataWasUpdated:a,seriesWereReinitialized:n}=s;(i===!0||a===!0||r===!0||n===!0)&&t.data.setAll(e?.dataItems??[])}function aY(s){let{candleStickSeries:t,seriesConfig:e,seriesIndex:i,chartSubType:r,colorMatch:a,showMean:n,rendererType:o,options:l}=s,{root:h}=t,u=e.fillSymbol??zf(i),c={},d={root:h,seriesConfig:e,seriesIndex:i,colorMatch:a,isChartFillSymbol:!0};ld(t,!1),t.columns.length===0?c=va({...d,seriesSymbol:u,element:Ke.new(h,{})}):t.columns.each(p=>{c=va({...d,seriesSymbol:u,element:p,rendererSymbol:n?void 0:wa({dataItem:p.dataItem?.dataContext,seriesConfig:e,chartSubType:r,colorMatch:a,rendererType:o})})}),va({...d,seriesSymbol:c?.symbolWithColorInfo??u,element:t.columns.template,colorMatch:a}),l?.interactionsDisabled&&ld(t,!0)}function nY(s){let{candleStickSeries:t,seriesConfig:e,options:i}=s;Or(t.columns.template,i?.selectionTheme),md(t,e.name),sY(s),ml(s)&&gl({styleCallback:()=>aY(s),series:t,seriesConfig:e})}function oY(s){let{root:t,xAxis:e,yAxis:i,chartConfig:r,seriesIndex:a,options:n,queryObject:o,errorStrings:l}=s,h=r.series[a],u;if(h.type===M.BoxPlotSeries){let c=rY({chartConfig:r,seriesConfig:h});u=Zs.new(t,{id:h.id,turboMode:!0,xAxis:e,yAxis:i,[c.dataFields.low]:c.properties.low,[c.dataFields.open]:c.properties.open,[c.dataFields.high]:c.properties.high,[c.dataFields.value]:c.properties.value,[c.dataFields.category]:c.properties.category}),u.columns.template.setAll({themeTags:[],width:nt(80)}),Or(u.columns.template,n?.selectionTheme),Hn({element:u.columns.template,series:u,queryObject:o,errorStrings:l})}return u}function lY(s){let{chartConfig:t,seriesConfig:e}=s,i=pt(t.series),{showOutliers:r,standardizeValues:a}=t,{y:n}=e,o=e?.query?.where,l=Qf(t),h=Cv({chartConfig:l,seriesConfig:e,key:At.Average}),u=wi({y:i===_e.BoxPlotMultiFieldsAndCategory&&typeof n=="string"?n:void 0,chartSubType:i,splitBy:o,showOutliers:r,standardizeValues:ic(i)?a:!1,key:At.Average});return h.properties.value=u,h}function hY(s){let{meanLineSeries:t,data:e,rotationChanged:i,sortChanged:r,dataWasUpdated:a,seriesWereReinitialized:n}=s;(i===!0||a===!0||r===!0||n===!0)&&t.data.setAll(e?.meanLines??[])}function uY(s){let{meanLineSeries:t,seriesConfig:e,data:i,dataWasUpdated:r,sortChanged:a,rotationChanged:n,seriesWereReinitialized:o,options:l}=s,h=Jt(t.uid,"bulletTemplate");h&&Or(h,l?.selectionTheme),md(t,e?.name),hY({meanLineSeries:t,data:i,dataWasUpdated:r,sortChanged:a,rotationChanged:n,seriesWereReinitialized:o})}function cY(s){let{root:t,xAxis:e,yAxis:i,chartConfig:r,seriesIndex:a,options:n,queryObject:o,errorStrings:l}=s,h=r.series[a],u;if(h.type===M.LineSeries){let c=lY({chartConfig:r,seriesConfig:h});u=yt.new(t,{id:h.id,xAxis:e,yAxis:i,[c.dataFields.value]:c.properties.value,[c.dataFields.category]:c.properties.category}),u.appear();let d=dt.new({});Sr(u.uid,{isBoxPlotMeanLineSeries:!0,bulletTemplate:d}),Or(d,n?.selectionTheme),u.bullets.push(p=>{let f=Ke.new(p,{role:Y.aria.defaultChartItemRole,ariaLabel:No(),hoverOnFocus:!0},d),m=Ns.new(p,{sprite:f});return u&&Hn({element:f,series:u,queryObject:o,errorStrings:l}),m}),u.strokes.template.set("lineJoin",Y.lineJoin)}return u}function dY(s,t){return s.get("id")===`${t}_${vi.Outliers}`}function pY(s){let{chartConfig:t,seriesConfig:e}=s;return Cv({chartConfig:t,seriesConfig:e,key:At.Outlier})}function fY(s){let{outlierSeries:t,data:e,rotationChanged:i,sortChanged:r,dataWasUpdated:a,seriesWereReinitialized:n}=s;(i===!0||a===!0||r===!0||n===!0)&&t.data.setAll(e?.outliers??[])}function mY(s,t){return(s??Y.boxPlot.boxPlotOutliersVisibility)&&t!==!1}function gY(s){let{outlierSeries:t,chartSubType:e,seriesConfig:i,colorMatch:r,showOutliers:a}=s;if(Jt(t.uid,"bulletTemplate")&&i.type===M.BoxPlotSeries){let o=i.fillSymbol,l={type:Pt.SMS,style:Sd.Circle,color:o?.color,size:Y.boxPlot.boxPlotOutliersSize};t.dataItems.forEach(h=>{let u=h.bullets?.[0]?.get("sprite");if(u!==void 0){let c=wa({dataItem:h.dataContext,seriesConfig:i,chartSubType:e,colorMatch:r});va({root:t.root,seriesSymbol:l,element:u,colorMatch:r,rendererSymbol:c})}})}let n=mY(a,i.visible);ri(t,n)}function yY(s){let{outlierSeries:t,data:e,seriesConfig:i,sortChanged:r,dataWasUpdated:a,rotationChanged:n,seriesWereReinitialized:o,options:l}=s;if(t&&i.type===M.BoxPlotSeries){let h=Jt(t.uid,"bulletTemplate");h&&Or(h,l?.selectionTheme),fY({outlierSeries:t,data:e,rotationChanged:n,sortChanged:r,dataWasUpdated:a,seriesWereReinitialized:o}),ml(s)&&gl({styleCallback:()=>gY(s),series:t,seriesConfig:i})}}function vY(s){let{root:t,xAxis:e,yAxis:i,chartConfig:r,seriesIndex:a,options:n,queryObject:o,errorStrings:l}=s,h=r.series[a],u;if(h.type===M.BoxPlotSeries){let c=pY({chartConfig:r,seriesConfig:h});u=yt.new(t,{id:`${h.id}_${vi.Outliers}`,xAxis:e,yAxis:i,[c.dataFields.value]:c.properties.value,[c.dataFields.category]:c.properties.category}),u.strokes.template.set("forceHidden",!0);let d=dt.new({});Sr(u.uid,{isBoxPlotOutliersSeries:!0,bulletTemplate:d}),Or(d,n?.selectionTheme),u.bullets.push(p=>{let f=Ke.new(p,{role:Y.aria.defaultChartItemRole,ariaLabel:No(),hoverOnFocus:!0},d),m=Ns.new(p,{sprite:f});return u&&Hn({element:f,series:u,queryObject:o,errorStrings:l}),wY({outlierSeries:u,bullet:m,seriesConfigId:h.id}),m}),u.appear()}return u}function bY(s){let{chartConfig:t,seriesConfig:e,type:i}=s,r="";switch(i){case vi.Top:r=At.Max;break;case vi.Median:r=At.Median;break;case vi.Bottom:r=At.Min;break}return Cv({chartConfig:t,seriesConfig:e,key:r})}function xY(s){let{stepLineSeries:t,data:e,rotationChanged:i,sortChanged:r,dataWasUpdated:a,seriesWereReinitialized:n}=s;(i===!0||a===!0||r===!0||n===!0)&&t.data.setAll(e?.dataItems??[])}function _Y(s){let{stepLineSeries:t,data:e,seriesConfig:i,seriesIndex:r,colorMatch:a,chartSubType:n,rendererType:o}=s;if(i.type===M.BoxPlotSeries){let{root:l}=t,h=r1({data:e.dataItems,colorMatch:a,chartSubType:n,rendererType:o}),u=(i.fillSymbol??zf(r)).color,c={type:Pt.SLS,width:Y.boxPlot.boxPlotLineWidth,color:h?Y.boxPlot.boxPlotWhiskersColor:u};va({root:l,seriesIndex:r,seriesSymbol:c,element:t,colorMatch:a})}}function SY(s){let{stepLineSeries:t,data:e,seriesConfig:i,rotationChanged:r,sortChanged:a,dataWasUpdated:n,seriesWereReinitialized:o}=s,l=i.visible!==!1;t!==void 0&&i.type===M.BoxPlotSeries&&(ri(t,l),ml(s)&&gl({styleCallback:()=>_Y(s),series:t,seriesConfig:i}),xY({stepLineSeries:t,data:e,rotationChanged:r,sortChanged:a,dataWasUpdated:n,seriesWereReinitialized:o}))}function gS(s){let{root:t,xAxis:e,yAxis:i,chartConfig:r,seriesIndex:a,type:n,options:o,queryObject:l,errorStrings:h}=s,u=r.series[a],c;if(u.type===M.BoxPlotSeries){let d=bY({chartConfig:r,seriesConfig:u,type:n});c=Bn.new(t,{id:`${u.id}_${n}`,xAxis:e,yAxis:i,noRisers:!0,[d.dataFields.value]:d.properties.value,[d.dataFields.category]:d.properties.category}),Or(c.strokes.template,o?.selectionTheme),Hn({element:c.strokes.template,series:c,queryObject:l,errorStrings:h})}return c}function Cv(s){let{chartConfig:t,seriesConfig:e,key:i}=s,r=zr(t),a=t.showOutliers,n=t.standardizeValues,o=As(t),l=pt(t.series),{x:h,y:u}=e,c=o?void 0:e?.query?.where,d={y:l===_e.BoxPlotMultiFieldsAndCategory&&typeof u=="string"?u:void 0,chartSubType:l,splitBy:c,showOutliers:a,standardizeValues:ic(l)?n:!1},p=l===_e.BoxPlotMonoField||l===_e.BoxPlotMultiFields||l===_e.BoxPlotMonoFieldAndSplitBy||l===_e.BoxPlotMultiFieldsAndSplitBy?Bf:h;return{dataFields:{value:r?"valueXField":"valueYField",category:r?"categoryYField":"categoryXField"},properties:{value:wi({key:i,...d}),category:p}}}function CY(s,t){return s.series.values.find(e=>dY(e,t))}function vF(s,t){let e=s.series.values.find(a=>a.get("id")===`${t}_${vi.Top}`),i=s.series.values.find(a=>a.get("id")===`${t}_${vi.Median}`),r=s.series.values.find(a=>a.get("id")===`${t}_${vi.Bottom}`);return{topStepLineSeries:e,medianStepLineSeries:i,bottomStepLineSeries:r}}function bF(s){return s!==_e.BoxPlotMonoField&&s!==_e.BoxPlotMultiFields&&s!==_e.BoxPlotMonoFieldAndCategory}function xF(s){let{chart:t,candleSeriesIndex:e,numberOfCandleStickSeries:i}=s,r,a,n=se(t.uid,"config");if(n){let o=zr(n),l=As(n),h=o?t.yAxes.getIndex(0)?.get("renderer"):t.xAxes.getIndex(0)?.get("renderer"),u=h?.get("cellStartLocation"),c=h?.get("cellEndLocation");if(u&&c){let d=u/(l?1:n.series.length);r=u+e/i*(c-u)+d,a=u+(e+1)/i*(c-u)-d}}return{startLocation:r,endLocation:a}}function wY(s){let{outlierSeries:t,bullet:e,seriesConfigId:i}=s;if(t){let{chart:r}=t;if(r){let a=se(r.uid,"config");if(a){let n=pt(a.series);if(bF(n)){let o=r.series.values.filter(h=>h instanceof Zs),l=o?.findIndex(h=>h.get("id")===i);if(l&&l!==-1&&o[l]){let{startLocation:h,endLocation:u}=xF({chart:r,candleSeriesIndex:l,numberOfCandleStickSeries:o.length});h!==void 0&&u!==void 0&&e.set("locationX",(h+u)/2)}}}}}}function PY(s){let t=se(s.uid,"config");if(t){let e=pt(t.series),i=t.series.length,r=zr(t)?s.yAxes.getIndex(0)?.get("renderer"):s.xAxes.getIndex(0)?.get("renderer"),a=r?.get("cellStartLocation"),n=r?.get("cellEndLocation");if(a&&n){let o=s.series.values.filter(l=>l instanceof Zs);o.forEach((l,h)=>{let{topStepLineSeries:u,medianStepLineSeries:c,bottomStepLineSeries:d}=vF(s,l.get("id")??"");if(bF(e)){let{startLocation:p,endLocation:f}=xF({chart:s,candleSeriesIndex:h,numberOfCandleStickSeries:o.length});[u,c,d].forEach(m=>{m!==void 0&&(m.set("stepWidth",nt(60/i)),p&&f&&m.set("locationX",(p+f)/2))})}else[u,c,d].forEach(p=>{p!==void 0&&p.setAll({stepWidth:nt(60/i)})})})}}}function TY(s){let{chartConfig:t,seriesIndex:e}=s,i=t.series[e],r=Ie([i]),a=[];if(r===M.BoxPlotSeries)[oY(s),gS({...s,type:vi.Top}),gS({...s,type:vi.Median}),gS({...s,type:vi.Bottom}),vY(s)].forEach(n=>{n&&a.push(n)});else if(r===M.LineSeries){let n=cY(s);n&&a.push(n)}return a}function $Y(s){let{chart:t,chartConfig:e,series:i,seriesConfig:r}=s;if(t&&e)if(PY(t),i instanceof Zs&&r.type===M.BoxPlotSeries){i.set("id",r.id);let a=i.get("id")??"";nY({...s,seriesConfig:r,candleStickSeries:i});let{topStepLineSeries:n,medianStepLineSeries:o,bottomStepLineSeries:l}=vF(t,a),h=[vi.Top,vi.Median,vi.Bottom];[n,o,l].forEach((c,d)=>{c&&(c.set("id",`${r.id}_${h[d]}`),SY({...s,stepLineSeries:c}))});let u=CY(t,a);u&&(u.set("id",`${r.id}_${vi.Outliers}`),yY({...s,outlierSeries:u}))}else i instanceof yt&&r.type===M.LineSeries&&uY({...s,meanLineSeries:i})}function DY(s){pL(s)}function PC(s){let{isLineSmoothed:t,isRadarLineSeries:e,isRotated:i}=s,r=e?aS:ku;return t&&(r=e?sS:i?lS:oS),r}function kY(s){let{series:t,seriesConfig:e,chartSubType:i,colorMatch:r,rendererType:a}=s,n;for(let o of t.dataItems){let l=o.dataContext;if(n=wa({seriesConfig:e,dataItem:l,chartSubType:i,colorMatch:r,rendererType:a}),n!==void 0)break}return n}function AY(s){let{series:t,seriesConfig:e,seriesIndex:i,chartSubType:r,colorMatch:a,rendererType:n}=s,o=t.root,l=kY({series:t,seriesConfig:e,chartSubType:r,colorMatch:a,rendererType:n});return va({root:o,visible:e.visible,seriesIndex:i,seriesSymbol:e.lineSymbol??Ev(i),element:t,colorMatch:a,rendererSymbol:l}).symbolWithColorInfo}function LY(s){let{series:t,seriesIndex:e,chartSubType:i,seriesConfig:r,colorMatch:a,lineColor:n}=s,o=!1,l,h,u=Jt(t.uid,"bulletTemplate");if(u!==void 0){ri(t.bulletsContainer,r.markerVisible!==!1&&r.visible!==!1);let{markerSymbol:c}=r;c===void 0&&(c=Nv(),c.color=n),a?c.color=n:c.color??=n;let d=wa({dataItem:t.dataItems[0]?.dataContext,seriesConfig:r,chartSubType:i,colorMatch:a});d?.outline&&(c.outline??=d.outline,c.outline.color=d.outline.color),nL({element:u,markerSymbol:c});let p=new Set,f;t.dataItems.forEach(m=>{let g=m.bullets?.[0]?.get("sprite");if(g!==void 0){let y=m?.dataContext,v=y[Y.xAxisField]===Y.nullValue,b=r.nullCategory?.markerSymbol,x=v&&b!==void 0?b:c,_=wa({dataItem:y,seriesConfig:r,chartSubType:i,colorMatch:a}),w=va({root:t.root,seriesIndex:e,seriesSymbol:x,element:g,colorMatch:a,rendererSymbol:_});l=w.symbolWithColorInfo,f=w.stylingInfo,Sf(g,f),v||(p.add(JSON.stringify(f)),h=w.symbolWithColorInfo)}}),o=p.size>1,l=h??l}return o?void 0:l}function FY(s,t){if(s.showArea===!0){let{color:e,opacity:i}=s.areaColor?_t(s.areaColor):{color:t.get("stroke"),opacity:Y.lineSeries.areaOpacity};t.set("fill",e),t.fills.template.set("fillOpacity",i)}t.fills.template.set("visible",s.showArea===!0)}function _F(s){let{series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,colorMatch:a,rendererType:n,chartSubType:o,seriesIndexMapper:l,seriesSymbolMapForEvent:h,isRotated:u}=s,{chart:c,root:d}=t;if(c){let p=t instanceof Ao;ri(t,e.visible);let f=PC({isRadarLineSeries:p,isLineSmoothed:e.lineSmoothed,isRotated:u});t.set("curveFactory",f);let m=AY({series:t,seriesConfig:e,seriesIndex:i,chartSubType:o,colorMatch:a,rendererType:n}),g=LY({series:t,seriesConfig:e,seriesIndex:i,chartSubType:o,colorMatch:a,lineColor:m.color});FY(e,t),h.set(l?.get(e.id)??i,{lineSymbol:m,markerSymbol:g}),h.size===r&&(Pa({data:Wi(h),htmlContainer:d.dom,chartId:t.chart?.get("id"),colorMatchApplied:gd(c)}),h.clear())}}function OY(s){let{root:t,chartConfig:e,xAxis:i,yAxis:r,seriesConfig:a,options:n,queryObject:o,errorStrings:l}=s,{id:h,name:u}=a,{xField:c,yField:d,xAxisField:p,yAxisField:f}=fd(e,a),m=yt.new(t,{id:h,name:u,xAxis:i,yAxis:r,[p]:c,[f]:d,maskBullets:!1,curveFactory:PC({isRadarLineSeries:!1,isLineSmoothed:a.lineSmoothed,isRotated:e.rotated}),layer:Y.zIndexes.customLayer5});m.appear();let g=dt.new({});return Or(g,n?.selectionTheme),Sr(m.uid,{bulletTemplate:g}),m.bullets.push((y,v,b)=>{let x=b?.dataContext?.legend===!0,_=Ke.new(y,{role:Y.aria.defaultChartItemRole,ariaLabel:No(),hoverOnFocus:!0,tooltip:yv({series:m,tooltipFormatter:n?.tooltipFormatter}),...x?{}:{layer:Y.zIndexes.customLayer5}},g);return x||(Hn({element:_,series:m,queryObject:o,errorStrings:l}),AL(_,m)),Ns.new(y,{sprite:_})}),m.strokes.template.set("lineJoin",Y.lineJoin),vC(m),m}function MY(s){let{lineSeries:t,data:e,seriesIndex:i,chartConfig:r,dataWasUpdated:a,seriesWereReinitialized:n,rotationChanged:o,stackedTypeChanged:l,timeZoneChanged:h,sortChanged:u}=s,c=r.series[i];if(e!==void 0&&i>=0&&i<r.series.length&&c.type===M.LineSeries&&(o===!0||a===!0||l===!0||h||n===!0||u===!0)){let{xField:d,yField:p,xAxisField:f,yAxisField:m}=fd(r,c);t.setAll({[f]:d,[m]:p}),t.data.setAll(e.dataItems)}}function IY(s){let{series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,colorMatch:a,rendererType:n,seriesIndexMapper:o,seriesSymbolMapForEvent:l}=s,{chart:h}=t;if(h!==void 0){let u=se(h.uid,"config"),c=se(h.uid,"isRotated")??!1,d=pt(u?.series);_F({series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,colorMatch:a,chartSubType:d,rendererType:n,seriesIndexMapper:o,seriesSymbolMapForEvent:l,isRotated:c})}}function RY(s,t){let{connectLines:e,temporalBinning:i}=t,r=i?.nullPolicy;s.set("connect",e!==!1&&r!==Fv.Null)}function VY(s){let{series:t,data:e,chartConfig:i,options:r,seriesIndex:a,dataWasUpdated:n,queryObject:o,fieldList:l,utilsStrings:h,rotationChanged:u,seriesWereReinitialized:c,timeZoneChanged:d,sortChanged:p,stackedTypeChanged:f}=s,m=i.series[a],g=i.rotated;t.set("id",m.id),ri(t,m.visible),ri(t.bulletsContainer,m.markerVisible!==!1&&m.visible!==!1);let y=Jt(t.uid,"bulletTemplate");y&&Or(y,r?.selectionTheme),gC({series:t,chartConfig:i,isRotated:g}),DY({seriesType:M.LineSeries,series:t,seriesConfig:m,isRotated:g,dataLabelsConfig:m.dataLabels,externalDataLabelFormatter:r?.dataLabelFormatter}),RY(t,m),MY({lineSeries:t,seriesIndex:a,data:e,chartConfig:i,dataWasUpdated:n,rotationChanged:u,stackedTypeChanged:f,seriesWereReinitialized:c,timeZoneChanged:d,sortChanged:p}),fC({series:t,seriesConfig:m,fieldList:l,queryObject:o,seriesIndex:a,tooltipFormatter:r?.tooltipFormatter,utilsStrings:h}),ml(s)&&gl({styleCallback:()=>IY(s),series:t,seriesConfig:m}),yC({chartConfig:i,series:t,seriesIndex:a,queryObject:o})}function NY(s){return s.component instanceof Gi}function EY(s){let{series:t,queryObject:e,errorStrings:i}=s,r=t.labels.template;r.set("cursorOverStyle","pointer"),r.setup=a=>{a.set("background",xi.new(a.root,{fill:a.root.interfaceColors.get("alternativeBackground"),fillOpacity:0}))},r.events.on(_i.Click,a=>{let{chart:n}=t,{dataItem:o}=a.target,l=(o instanceof cr&&NY(o)?o:void 0)?.get("slice");if(n&&l&&mC(n.uid)){let h=lL(a,t);pr({element:l,selected:fn(l.uid,"selected")!==!0}),h&&t.slices.each(u=>{u!==l&&pr({element:u,selected:!1})}),Af({chart:n,selectionSource:Ti.SelectionByClick,queryObject:e,errorStrings:i})}})}function BY(s,t){let e=s.labels.template;e.adapters.remove("text"),e.adapters.remove("html");let i=t!==void 0?"html":"text";e.adapters.add(i,(r,a)=>{let n=r??"",o=Jt(s.uid,"pieChartDataLabelFormatter");if(o){let l=a.dataItem;if(l){let h=l?.get("valuePercentTotal"),u=l?.get("value"),c=l?.get("category")??r??"",d=l.dataContext?.[Ee.originalXValue];n=o(c,u,h,d)}}return i==="html"?wr(n):n})}function jY(s){let t=s.dataItem?.component,e;if(t instanceof Gi){let i=se(t.chart?.uid??Number.NaN,"config");if(i?.series[0].type===M.PieSeries){let r=i.series[0].dataLabelsInside??Y.pieChart.dataLabelsInside,a=_t(i?.series[0].dataLabels?.content?.color).color,n=t.chart?.get("background")?.get("fill")??_t(Y.backgroundColor).color,o=se(t.chart?.uid??Number.NaN,"options")?.autoInverseDataLabelTextColor??Ee.options.autoInverseDataLabelTextColor,l=s.dataItem?.dataContext?.[Ee.pieChart.technicalFieldSliceId],h=t.slices.values.find(c=>(c.dataItem?.dataContext)[Ee.pieChart.technicalFieldSliceId]===l)?.get("fill")??_t(i.series[0].fillSymbol?.color).color,u=a??s.text.get("fill");e=u,u&&h&&o&&r&&(e=cL({textBackgroundColor:h,chartBackgroundColor:n}))}}return e}function WY(s){let{pieSeries:t,externalDataLabelFormatter:e,queryObject:i,errorStrings:r}=s,a=t.labels.template;a.set("cursorOverStyle","pointer"),a.setAll({cursorOverStyle:"pointer",maxWidth:Y.pieChart.dataLabels.maxWidth??Number.NaN,oversizedBehavior:Y.pieChart.dataLabels.wrap??!0?"wrap":"none",centerX:Oe,centerY:Oe}),EY({series:t,queryObject:i,errorStrings:r}),BY(t,e),a.adapters.add("fill",(n,o,l)=>jY(o))}function zY(s,t){let{numericValueFormat:e,percentValueFormat:i,displayNumericValueOnDataLabel:r,displayCategoryOnDataLabel:a,displayPercentageOnDataLabel:n,valuePrefix:o,valueSuffix:l,percentagePrefix:h,percentageSuffix:u,dataLabelsCharacterLimit:c}=t,{chart:d}=s,p;if(d){let f=pC({pieChart:d,valueIntlOptions:e?.intlOptions,percentageIntlOptions:i?.intlOptions,displayNumericValue:r??Y.pieChart.displayNumericValueOnDataLabel,displayPercentage:n??Y.pieChart.displayPercentageOnDataLabel,valuePrefix:o,valueSuffix:l,percentagePrefix:h,percentageSuffix:u}),m=Gf(c),g=ta(se(s.chart?.uid??Number.NaN,"rtl")??!1," ");p=(y,v,b)=>{let x=f(y,v,b),_=a??Y.pieChart.displayCategoryOnDataLabel?m(y):"",w=Ii(_)?"":`${_}${g}`;return w=`${w}${x}`,w}}return p}function HY(s){let{pieSeries:t,seriesConfig:e,dataLabelFormatter:i}=s,{dataLabels:r}=e,a=e.dataLabelsOffset??Y.pieChart.dataLabelsOffset,n=e.dataLabelsInside??Y.pieChart.dataLabelsInside;Sr(t.uid,{pieChartDataLabelFormatter:i??zY(t,e)}),Wa({label:t.labels.template,labelConfig:r,defaults:{...Y.pieChart.dataLabels,wrap:e.optimizeDataLabelsOverlapping??Y.pieChart.alignDataLabels}});let o=se(t.chart?.uid??0,"rtl"),l=!n&&(e.alignDataLabels??Y.pieChart.alignDataLabels),h=e.optimizeDataLabelsOverlapping===!0;t.set("alignLabels",l),t.labels.template.setAll({forceHidden:!(r&&r?.visible!==!1),breakWords:h?!1:void 0,textAlign:o?"right":"left"});let u=t.labels.template.get("radius"),c=t.labels.template.get("baseRadius");n&&c!==nt(60)?t.labels.template.setAll({radius:void 0,baseRadius:nt(60),textType:"regular"}):!n&&!h&&!l&&(t.labels.template.setAll({baseRadius:ne,textType:"adjusted"}),a!==void 0&&Number.isFinite(a)&&u!==a&&t.labels.template.set("radius",a))}var yS;function XY(s,t){let{ticks:e}=t,i=e?.visible===!1||t.dataLabelsInside===!0||t.dataLabels===void 0||t.dataLabels?.visible===!1||t.dataLabelsOffset!==void 0&&t.dataLabelsOffset<=0;s.ticks.template.setAll({visible:!i,crisp:!1});let r=e?.lineSymbol??Cd({color:Ef});i&&(r.width=0),Wn({element:s.ticks.template,lineSymbol:r,visible:!i})}function YY(s){let{series:t,pieSlicesSymbols:e,seriesConfig:i}=s;t.slices.each((r,a)=>{let n=r.dataItem?.dataContext,o=HS({dataContext:n,pieSlicesSymbols:e,seriesConfig:i});gh({root:t.root,element:r,fillSymbol:o,defaultToColorFromRamp:!0,colorRampIndex:a,isChartFillSymbol:!0})})}function UY(s,t){let{originalXValue:e}=Ee,i=new Map(s.map((r,a)=>[r[e],a]));return[...t].sort((r,a)=>(i.get(r[e])??1/0)-(i.get(a[e])??1/0))}function GY(s){let{series:t,data:e,seriesConfig:i,dataWasUpdated:r,sortChanged:a,seriesWereReinitialized:n,labelUpdateNeeded:o,groupOfSlicesUpdateNeeded:l}=s,{x:h,y:u}=i,c=pt([i]),d=c===_e.PieFromFields?yn:h;if(e&&(r===!0||n===!0||a===!0||l===!0))t.setAll({categoryField:d,valueField:c===_e.PieFromFields?Ah:u}),t.data.setAll(e.dataItems);else if(e&&o){let p=t.dataItems,f=p.map(g=>g.dataContext),m=UY(f,e.dataItems);p.forEach((g,y)=>{let v=m[y];if(typeof v[d]=="string"){let b=v[d];g.set("category",b);let x=g.dataContext;x&&(x[d]=b)}}),t.markDirty()}}function qY(s,t){let{innerRadius:e}=t;s.set("innerRadius",e?nt(e):0)}function KY(s,t){let{startAngle:e,endAngle:i}=t;s.setAll({startAngle:e??Y.pieChart.min,endAngle:i??360+(s.get("startAngle")??0)})}function ZY(s){let{root:t,seriesConfig:e,options:i,chart:r,chartConfig:a,queryObject:n,errorStrings:o}=s,{id:l,name:h,x:u,y:c}=e,d=pt([e]),p=Gi.new(t,{id:l,name:h,categoryField:d===_e.PieFromFields?yn:u,valueField:d===_e.PieFromFields?Ah:c});return WY({pieSeries:p,externalDataLabelFormatter:i?.dataLabelFormatter,queryObject:n,errorStrings:o}),vL(p,i?.tooltipFormatter),p.slices.template.states.create("hover",{scale:1,stateAnimationDuration:0}),Or(p.slices.template,i?.selectionTheme),Hn({element:p.slices.template,series:p,queryObject:n,errorStrings:o}),vv(p,a),p.appear(),r instanceof hs&&CF(r,p),p}function JY(s){let{series:t,seriesConfig:e,seriesWereReinitialized:i,dataWasUpdated:r,sortChanged:a,data:n,options:o,labelUpdateNeeded:l,utilsStrings:h,groupOfSlicesUpdateNeeded:u}=s,{dataLabelFormatter:c,tooltipFormatter:d}=o??{};t.set("id",e.id),ri(t,e.visible),Or(t.slices.template,o?.selectionTheme),GY({series:t,seriesConfig:e,seriesWereReinitialized:i,dataWasUpdated:r,sortChanged:a,data:n,labelUpdateNeeded:l,groupOfSlicesUpdateNeeded:u}),ml(s)&&gl({styleCallback:()=>YY(s),series:t,seriesConfig:e}),HY({pieSeries:t,seriesConfig:e,dataLabelFormatter:c}),qY(t,e),KY(t,e),XY(t,e),Dz({series:t,seriesConfig:e,tooltipFormatter:d});let{chart:p}=t;p instanceof hs&&CF(p,t)}function SF(s,t){let e=nt(se(s.uid,"pieChartRadius")??Y.pieChart.chartOptimizedRadius),i=e,r=s.series?.values?.[0]??t,a=se(s.uid,"config");if(a!==void 0){let{series:n}=a,{innerRadius:o,optimizeDataLabelsOverlapping:l,alignDataLabels:h,dataLabelsOffset:u=Y.pieChart.dataLabelsOffset,dataLabels:c,dataLabelsInside:d}=n[0];if(c?.visible===!0&&h===!0&&l===!0&&d!==!0){let p=Y.pieChart.chartOptimizedRadius/100,f=500,m=150,g=.6,y=.5,v=1,b=s.seriesContainer.width()-u*2,x=Math.max(b-m,0)/(f-m),_=x<1?Math.max(x**v*g,.4):Math.min(x**y*g,p);i=nt(_*100)}else i=nt(Y.pieChart.chartRadius);e.value.toFixed(1)!==i.value.toFixed(1)&&(Fr(s.uid,{pieChartRadius:i.percent}),yS&&clearTimeout(yS),yS=pl(()=>{let p=s.chartContainer.height();if(s.chartContainer.set("height",p+.1),s.set("radius",i),o&&!Number.isNaN(o)&&o>0){let f=(o??Y.pieChart.innerRadius)*i.value;s.set("innerRadius",nt(f))}s.markDirty(),r?.markDirty(),s.root.resize(),eU(s)})),r instanceof Gi&&r.labels.template.setAll({maxWidth:tU({seriesConfig:a?.series[0],chart:s,newChartRadius:i})})}}function QY(s){s.isDisposed()||s.events.onDebounced(_i.BoundsChanged,()=>SF(s),Y.debounceTime)}function CF(s,t){if(!s.isDisposed()){let e=s.radius();Fr(s.uid,{pieChartRadius:e}),SF(s,t)}}function eU(s){pl(()=>{s.chartContainer.set("height",nt(100)),s.root.resize()})}function tU(s){let{seriesConfig:t,chart:e,newChartRadius:i}=s,r=Y.pieChart.dataLabels.maxWidth??100;if(t!=null){let{alignDataLabels:a,dataLabelsOffset:n=Y.pieChart.dataLabelsOffset,optimizeDataLabelsOverlapping:o,dataLabels:l,dataLabelsInside:h}=t;if(l?.visible===!0&&a===!0&&h!==!0&&o===!0){let u=e.seriesContainer.width(),c=e.seriesContainer.height(),d=i.value*Math.min(u,c),p=5,f=Math.floor((u-d)/2)-p-n;r=Math.min(f,r-p);let m=Y.pieChartDataLabel.minWidth;r<m&&(r=m)}}return r}function iU(s){let{root:t,chartConfig:e,xAxis:i,yAxis:r,seriesConfig:a,options:n,queryObject:o,errorStrings:l}=s,{id:h,name:u}=a,{xField:c,yField:d,xAxisField:p,yAxisField:f}=fd(e,a),m=Ao.new(t,{id:h,name:u,xAxis:i,yAxis:r,[p]:c,[f]:d,curveFactory:PC({isRadarLineSeries:!0,isLineSmoothed:a.lineSmoothed,isRotated:e.rotated}),layer:Y.zIndexes.customLayer5});m.appear();let g=dt.new({});return Sr(m.uid,{bulletTemplate:g}),Or(g,n?.selectionTheme),m.bullets.push(y=>{let v=Ke.new(y,{role:Y.aria.defaultChartItemRole,ariaLabel:No(),hoverOnFocus:!0,tooltip:yv({series:m,tooltipFormatter:n?.tooltipFormatter}),layer:Y.zIndexes.customLayer5},g);return Hn({element:v,series:m,queryObject:o,errorStrings:l}),Ns.new(y,{sprite:v})}),m.strokes.template.set("lineJoin",Y.lineJoin),vC(m),m}function rU(s){let{radarLineSeries:t,data:e,seriesIndex:i,chartConfig:r,dataWasUpdated:a,seriesWereReinitialized:n,stackedTypeChanged:o,timeZoneChanged:l}=s,h=r.series[i];if(e!==void 0&&h?.type===M.RadarSeries&&(a||l||n||o)){let{xField:u,yField:c,xAxisField:d,yAxisField:p}=fd(r,h);t.setAll({[d]:u,[p]:c}),t.data.setAll(e.dataItems)}}function sU(s){let{series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,colorMatch:a,rendererType:n,seriesIndexMapper:o,seriesSymbolMapForEvent:l}=s,{chart:h}=t;if(h!==void 0){let u=se(h.uid,"config"),c=se(h.uid,"isRotated")??!1,d=pt(u?.series);_F({series:t,seriesConfig:e,seriesIndex:i,numberOfSeries:r,colorMatch:a,chartSubType:d,rendererType:n,seriesIndexMapper:o,seriesSymbolMapForEvent:l,isRotated:c})}}function aU(s){let{series:t,data:e,seriesWereReinitialized:i,chartConfig:r,options:a,seriesIndex:n,dataWasUpdated:o,timeZoneChanged:l,stackedTypeChanged:h,fieldList:u,queryObject:c,utilsStrings:d}=s,p=r.series[n];t.set("id",p.id),ri(t,p.visible),ri(t.bulletsContainer,p.markerVisible!==!1&&p.visible!==!1);let f=Jt(t.uid,"bulletTemplate");f&&Or(f,a?.selectionTheme),gC({series:t,chartConfig:r,isRotated:!1}),fC({series:t,seriesConfig:p,fieldList:u,queryObject:c,seriesIndex:n,tooltipFormatter:a?.tooltipFormatter,utilsStrings:d}),ml(s)&&gl({styleCallback:()=>sU(s),series:t,seriesConfig:p}),yC({chartConfig:r,series:t,seriesIndex:n,queryObject:c}),rU({radarLineSeries:t,data:e,seriesIndex:n,chartConfig:r,dataWasUpdated:o,timeZoneChanged:l,stackedTypeChanged:h,seriesWereReinitialized:i})}function TC(s){let{chart:t,chartConfig:e,options:i,utilsStrings:r,queryObject:a,errorStrings:n}=s,{rotated:o}=e,{root:l}=t,h=Ie(e.series);t.series.clear();let u={root:l,chartConfig:e,options:i,chart:t,utilsStrings:r,queryObject:a,errorStrings:n},c=[];for(let d=0;d<e.series.length;d+=1){let p=e.series[d],{assignToSecondValueAxis:f,type:m}=p,g=t instanceof Ut?$H({chart:t,chartType:h,rotated:o,assignToSecondValueAxis:f}):void 0,{xAxis:y,xAxisForHistogramOverlaySeries:v,yAxis:b}=g??{};switch(!0){case m===M.HeatSeries:{gn(a),y&&b&&c.push(a5({...u,queryObject:a,xAxis:y,yAxis:b}));break}case h===M.BoxPlotSeries:{y&&b&&Vo(e)&&c.push(...TY({...u,xAxis:y,yAxis:b,seriesIndex:d,seriesConfig:e.series[d],chartConfig:e}));break}case m===M.HistogramSeries:{y&&b&&c.push(...Zz({...u,seriesConfig:p,xAxis:y,xAxisForOverlaySeries:v,yAxis:b}));break}case m===M.PieSeries:{c.push(ZY({...u,seriesConfig:p}));break}case(h===M.ComboLineAndBarSeries||h===M.BarSeries||h===M.LineSeries):{y&&b&&(m===M.BarSeries?c.push(J5({...u,seriesConfig:p,xAxis:y,yAxis:b})):m===M.LineSeries&&c.push(OY({...u,seriesConfig:p,xAxis:y,yAxis:b})));break}case m===M.RadarSeries:{y&&b&&c.push(iU({...u,seriesConfig:p,xAxis:y,yAxis:b}));break}case m===M.ScatterSeries:{y&&b&&c.push(...nH({...u,seriesConfig:p,xAxis:y,yAxis:b}));break}}}c.forEach(d=>{d instanceof Bs&&d.setPrivate("doNotUpdateLegend",!0)}),t.series.pushAll(c),t instanceof Ut&&c.forEach(d=>{d instanceof yt&&d.get("maskBullets")===!1&&LH(d,t)})}function wv(s){let{chart:t,chartConfig:e,options:i,data:r,seriesIndexMapper:a,dataWasUpdated:n,sortChanged:o,seriesWereReinitialized:l,rotationChanged:h,colorMatchChanged:u,stackedTypeChanged:c,seriesStyleChanged:d,timeZoneChanged:p,sizePolicyChanged:f,pieSlicesSymbols:m,queryObject:g,utilsStrings:y,errorStrings:v,groupOfSlicesUpdateNeeded:b,labelUpdateNeeded:x}=s,{chartRenderer:_}=e,{root:w}=t,{series:C}=e,P=Ie(e.series),D=pt(e.series),$=t.series.values,A=Io(e),T=e.series.length,I=new Map,N=Ws(g,i?.popupTemplateFieldInfosEnabled),B=ms(g),j=ss(B)?void 0:am(_,B.renderer),z=l||n||o||h||c,K={root:w,chartConfig:e,queryObject:g,options:i,colorMatch:A,dataWasUpdated:n,sortChanged:o,seriesWereReinitialized:l,fieldList:N,rendererType:j,dataLabelFormatter:i?.dataLabelFormatter,utilsStrings:y,chartSubType:D,autoInverseDataLabelTextColor:i?.autoInverseDataLabelTextColor??Y.options.autoInverseDataLabelTextColor},V={...K,numberOfSeries:T,rotationChanged:h,colorMatchChanged:u,stackedTypeChanged:c,seriesStyleChanged:d,seriesIndexMapper:a,seriesSymbolMapForEvent:I,timeZoneChanged:p};for(let E=0;E<C.length;E++){let re=C[E],X=$[E],Z=re.type;switch(!0){case P===M.HeatSeries:{X instanceof Zt&&t instanceof Ut&&vn(e)&&h5({...V,series:X,data:r,seriesConfig:e.series[E],chartConfig:e});break}case P===M.BoxPlotSeries:{X=$.find(ue=>ue.get("id")===re.id),t instanceof Ut&&Vo(e)&&(X instanceof Zs||X instanceof yt)&&(Z===M.BoxPlotSeries||Z===M.LineSeries)&&$Y({...V,chart:t,series:X,data:r,seriesIndex:E,seriesConfig:re,chartConfig:e,showMean:As(e),showOutliers:Kn(e)});break}case Z===M.HistogramSeries:{X instanceof Zt&&t instanceof Ut&&aw(r)&&tH({...V,series:X,allChartSeries:$,data:r,seriesIndex:E,seriesConfig:re,axes:e.axes});break}case Z===M.PieSeries:{X instanceof Gi&&t instanceof hs&&Kf(r)&&JY({...K,series:X,seriesConfig:re,data:r,pieSlicesSymbols:m,groupOfSlicesUpdateNeeded:b,seriesStyleChanged:d,colorMatchChanged:u,labelUpdateNeeded:x});break}case(P===M.ComboLineAndBarSeries||P===M.BarSeries||P===M.LineSeries):t instanceof Ut&&Kf(r)&&(Z===M.BarSeries&&X instanceof Zt?iY({...V,series:X,data:r,seriesIndex:E}):Z===M.LineSeries&&X instanceof yt&&VY({...V,series:X,seriesIndex:E,seriesConfig:re,data:r}));break;case Z===M.ScatterSeries:{X=rH(t);let ue=CL(t);X instanceof yt&&ue instanceof yt&&nw(r)&&uH({...V,series:X,seriesConfig:re,trendLineSeries:ue,sizePolicyChanged:f,data:r});break}case Z===M.RadarSeries:{X instanceof Ao&&t instanceof Ks&&Kf(r)&&aU({...V,series:X,data:r,seriesIndex:E,seriesConfig:re,chartConfig:e});break}}z&&P&&X&&zz({chartType:P,series:X,tooltipFormatter:i?.tooltipFormatter})}bH({chart:t,options:i,dataWasUpdated:n,data:r,chartConfig:e,queryObject:g,errorStrings:v})}function nU(s){zn(s)||s.dataItems.forEach(t=>{let e=t.bullets?.[0];if(e){let i=e.get("sprite"),r=fn(i.uid,"selected")!==!0;pr({element:i,selected:r})}})}function oU(s){s.columns.each(t=>{if(!t.dataItem?.dataContext?.[Ku]){let e=fn(t.uid,"selected")!==!0;pr({element:t,selected:e})}})}function lU(s){s.slices.each(t=>{let e=fn(t.uid,"selected")!==!0;pr({element:t,selected:e})})}async function hU(s){let{chart:t,queryObject:e,errorStrings:i}=s;if(cC(t)){let r=se(t.uid,"actionMode");r!==vt.MonoSelection&&r!==vt.None&&(t.series.each(a=>{switch(!0){case a instanceof Zt:oU(a);break;case a instanceof yt:nU(a);break;case a instanceof Gi:lU(a);break}}),await Af({chart:t,selectionSource:Ti.ProgrammaticSelection,queryObject:e,errorStrings:i}))}}function uU(s,t){let e=!1,i=s.series,r=t.series,a=Ie(r),n=(d,p)=>d.filter(f=>f.type===p).flatMap(f=>{let m=[];switch(p){case M.BarSeries:case M.HistogramSeries:m.push(f.fillSymbol);break;case M.LineSeries:case M.RadarSeries:m.push(f.lineSymbol,f.markerSymbol);break;case M.ScatterSeries:m.push(f.markerSymbol);break;case M.PieSeries:let g=f;m.push(g.fillSymbol),g.slices?.forEach(y=>{m.push(y.fillSymbol)}),g.sliceGrouping&&m.push(g.sliceGrouping.fillSymbol);break}return f.type===M.BarSeries?m.push(cm(f.nullCategory)):(f.type===M.LineSeries||f.type===M.RadarSeries)&&m.push(f.nullCategory?.markerSymbol),m}),o,l;a===M.ComboLineAndBarSeries?(o=n(i,M.BarSeries).concat(n(i,M.LineSeries)),l=n(r,M.BarSeries).concat(n(r,M.LineSeries))):(o=n(i,i[0].type),l=n(r,r[0].type));let h=!ea(o,l),u=!ea(s.roundCorners,t.roundCorners),c=!1;switch(a){case M.LineSeries:case M.RadarSeries:case M.ComboLineAndBarSeries:c=r.filter(d=>d.type===M.LineSeries||d.type===M.RadarSeries).some(d=>{let p=i.find(f=>f.id===d.id);return(d.showArea??Y.lineSeries.showArea)!==(p?.showArea??Y.lineSeries.showArea)||(d.lineSmoothed??Y.lineSeries.lineSmoothed)!==(p?.lineSmoothed??Y.lineSeries.lineSmoothed)||(d.markerVisible??Y.lineSeries.markerVisible)!==(p?.markerVisible??Y.lineSeries.markerVisible)||d.showArea&&!ea(d.areaColor,p?.areaColor)}),a===M.ComboLineAndBarSeries&&(c=c||u);break;case M.BarSeries:c=u;break;case M.ScatterSeries:c=xb(s,t);break}return e=h||c,e}function cU(){p_(NW)}function dU(s){s.dispose()}function pU(s){let{chart:t,chartContainer:e,chartLocale:i}=s,{root:r}=t,{t9nLocale:a}=Sh(e??document.documentElement),n=tc(e??document.documentElement);r.locale=i,Fr(t.uid,{locale:a,formatLocale:n,rtl:Mf(e??document.documentElement)==="rtl"})}function RS(s){let{chart:t,actionMode:e,cursorRange:i}=s;if(cC(t)){let r=se(t.uid,"actionMode"),a=e??r??Y.actionMode;Fr(t.uid,{actionMode:a}),a===vt.None&&bh({chart:t,selectionSource:Ti.ClearSelection}),ZX({chart:t,actionMode:a,cursorRange:i})}}function fU(s){return Gs.rootElements.find(t=>t.dom===s)?.dispose(),hf.new(s)}function mU(s,t){s.container.children.clear();let e=Ie(t?.series),i;switch(e){case M.RadarSeries:case M.GaugeSeries:i=Ks;break;case M.PieSeries:i=hs;break;default:i=Ut;break}return s.container.children.push(i.new(s,{id:`${t?.id}`,layout:s.verticalLayout,paddingBottom:Y.chartPadding,paddingTop:Y.chartPadding,paddingRight:Y.chartPadding,paddingLeft:Y.chartPadding}))}function gU(s){let{chart:t,chartConfig:e,data:i,dataWasUpdated:r,sortChanged:a,slicesConfigChangedSinceLastUpdate:n,chartRendererChanged:o,colorMatchChanged:l,pieSlicesSymbols:h,options:u,queryObject:c,utilsStrings:d,errorStrings:p,groupOfSlicesUpdateNeeded:f,seriesStyleChanged:m}=s;wv({chart:t,chartConfig:e,options:u,data:i,dataWasUpdated:r,sortChanged:a,queryObject:c,pieSlicesSymbols:h,utilsStrings:d,errorStrings:p,groupOfSlicesUpdateNeeded:f,seriesStyleChanged:m,colorMatchChanged:l,labelUpdateNeeded:r||n||o||l}),Pa({data:h,htmlContainer:t.root.dom,chartId:t.get("id"),colorMatchApplied:gd(t)})}function yU(s){let{chart:t,chartConfig:e,data:i,anyGuideAboveChanged:r,dataWasUpdated:a,dataUpdateDetails:n,seriesIndexMapper:o,seriesFilteredOut:l,sortChanged:h,options:u,queryObject:c,rotationChanged:d,colorMatchChanged:p,stackedTypeChanged:f,seriesCompositionChanged:m,heatChartHideEmptyRowsAndColumnsChanged:g,seriesStyleChanged:y,timeZoneChanged:v,timeIntervalInfoWasReset:b,sizePolicyChanged:x,sizePolicyChangesRequireSeriesReinit:_,utilsStrings:w,errorStrings:C}=s,{axisLabelsBehaviorChanged:P}=s,D=jH({chart:t,chartConfig:e,rotationChanged:d,axisLabelsBehaviorChanged:P,timeIntervalInfoWasReset:b}),$=D||kH({currentChartSeriesCount:t.series.length,chartConfig:e,dataUpdateDetails:n,seriesFilteredOut:l,sizePolicyChangesRequireSeriesReinit:_,seriesCompositionChanged:m});return D&&(HL({chart:t,chartConfig:e,errorStrings:C,queryObject:c}),P=[!0,!0]),$&&(t.series.clear(),TC({chart:t,chartConfig:e,options:u,utilsStrings:w,queryObject:c,errorStrings:C}),t.gridContainer?.toBack?.()),XL({chart:t,chartConfig:e,queryObject:c,data:i,dataWasUpdated:a,axesInitializationNeeded:D,heatChartHideEmptyRowsAndColumnsChanged:g,sortChanged:h,timeIntervalInfo:i?.timeIntervalInfo??se(t.uid,"timeIntervalInfo"),axisLabelsBehaviorChanged:P,anyGuideAboveChanged:r,xAxisLabelFormatter:u?.xAxisLabelFormatter,yAxisLabelFormatter:u?.yAxisLabelFormatter,secondaryYAxisLabelFormatter:u?.secondaryYAxisLabelFormatter,guideTooltipFormatter:u?.guideTooltipFormatter,gaugeInnerLabelFormatter:u?.gaugeInnerLabelFormatter,utilsStrings:w,errorStrings:C}),wv({chart:t,chartConfig:e,options:u,data:i,dataWasUpdated:a,sortChanged:h,seriesIndexMapper:o,seriesWereReinitialized:$,rotationChanged:d,colorMatchChanged:p,stackedTypeChanged:f,seriesStyleChanged:y,timeZoneChanged:v,sizePolicyChanged:x,queryObject:c,utilsStrings:w,errorStrings:C}),Ie(e.series)===M.HeatSeries&&tF(t),yF({chart:t,scrollbarXConfig:e.axes?.[0]?.scrollbar,scrollbarYConfig:e.axes?.[1]?.scrollbar}),$}function vU(s){let{chart:t,legend:e,updateProps:i}=s,{chartConfig:r,options:a,dataWasUpdated:n,dataUpdateDetails:o,hasSeriesFilteredOut:l,pieSlicesSymbols:h,colorMatchApplied:u,rendererFieldNames:c,configWithAllSeries:d,t9nStrings:p,queryObject:f,dataInfo:m}=i,{data:g}=m,{utilsStrings:y,errorStrings:v}=p,{root:b}=t,{popupTemplateFieldInfosEnabled:x}=a??{};if(r===void 0)throw new Error;let _=se(t.uid,"config");if(t.isDisposed()||!Zv(_,r))throw new Gn(Zu.ChartDisposed);_??=r,Fr(t.uid,{queryObject:f});let w=pt(r.series),C=zr(r);Fr(t.uid,{config:Wi(r),options:a,isNonAggregatedChart:!Ad(w),isRotated:C,filterBySelection:a?.filterBySelection,colorMatchApplied:u,rendererFieldNames:c});let P=Ws(f,x),D=Ww(_,r),$=bb(_,r),A=gb(_,r),T=Ow(_,r),I=uU(_,r),N=JSON.stringify(wd(_.series))!==JSON.stringify(wd(r.series)),B=um(_,r),j=Xw(_,r),z=vb(_,r),K=xb(_,r),V=Yw(_,r),E=Rd({oldConfig:l?d:_,newConfig:r,dataWasUpdated:n}),re=!1,X=!1,Z=!1,ue=!1;vn(_)&&vn(r)&&(re=Vw(_,r),X=Iw(_,r),Z=Mw(_,r)||Rw(_,r)||re,ue=Fw(_,r));let Le=Yv({oldConfig:_,newConfig:r,rotationChanged:$}),we=_.series,Te=r.series;if(n){let{queryConfig:le,count:oe}=m??{};Fr(t.uid,{fieldList:P,queryConfig:le,elementCount:oe,timeIntervalInfo:g!==void 0&&"timeIntervalInfo"in g?g.timeIntervalInfo:void 0})}t instanceof Kr&&HW({chartSeries:t.series,oldSeries:we,newSeries:Te});let Ze=t instanceof hs?zS(we,Te):!1,Ve=yb({oldConfig:_,newConfig:r}),kt=new Map;(d??r).series.forEach((le,oe)=>{kt.set(le.id,oe)}),YL(t,r.background),KL(t,{title:r.title,subtitle:r.subtitle}),ZL(t,r.footer),qL({root:b,chart:t,cursorCrosshair:r.cursorCrosshair,config:r,queryObject:f,errorStrings:v});let Wt=Ie(r.series),O=!1;switch(Wt){case M.PieSeries:{t instanceof hs&&(gn(f),gU({chart:t,chartConfig:r,options:a,data:g,dataWasUpdated:n,slicesConfigChangedSinceLastUpdate:Ve,pieSlicesSymbols:h,chartRendererChanged:B,sortChanged:E,queryObject:f,colorMatchChanged:A,utilsStrings:y,errorStrings:v,groupOfSlicesUpdateNeeded:Ze,seriesStyleChanged:I}));break}case M.HeatSeries:case M.BarSeries:case M.LineSeries:case M.ComboLineAndBarSeries:case M.ScatterSeries:case M.RadarSeries:case M.GaugeSeries:case M.HistogramSeries:case M.BoxPlotSeries:t instanceof Ut&&(O=yU({chart:t,chartConfig:r,options:a,data:g,dataWasUpdated:n,seriesIndexMapper:kt,dataUpdateDetails:o,seriesFilteredOut:l,heatChartHideEmptyRowsAndColumnsChanged:ue,sortChanged:E,axisLabelsBehaviorChanged:Le,anyGuideAboveChanged:D,rotationChanged:$,colorMatchChanged:A,stackedTypeChanged:T,seriesStyleChanged:I,seriesCompositionChanged:N,timeZoneChanged:j,timeIntervalInfoWasReset:z,sizePolicyChanged:K,sizePolicyChangesRequireSeriesReinit:V,queryObject:f,utilsStrings:y,errorStrings:v}));break}if(t instanceof Kr){let le=()=>{mF({chart:t,chartConfig:r,legend:e,showEmptySeries:a?.showEmptySeries??a?.hideEmptySeries===!1,seriesConfig:r.series,heatChartLegendUpdatedNeeded:Z,heatRulesTypeChanged:re,heatLegendPositionChanged:X,queryObject:f})};O?pl(le):le()}RS({chart:t,actionMode:a?.actionMode,cursorRange:a?.cursorRange}),kL(t),Z1({chart:t,chartConfig:r,delayCallback:n})}function bU(s){let{chart:t,data:e,chartConfig:i,pieSlicesSymbols:r,options:a,queryObject:n,utilsStrings:o,errorStrings:l}=s;QY(t),TC({chart:t,chartConfig:i,options:a,utilsStrings:o,queryObject:n,errorStrings:l}),wv({chart:t,chartConfig:i,options:a,data:e,dataWasUpdated:!0,pieSlicesSymbols:r,queryObject:n,utilsStrings:o,errorStrings:l}),Pa({data:r,htmlContainer:t.root.dom,chartId:t.get("id"),colorMatchApplied:gd(t)})}function xU(s){let{chart:t,data:e,chartConfig:i,options:r,queryObject:a,seriesIndexMapper:n,utilsStrings:o,errorStrings:l}=s;gF(t),yF({chart:t,scrollbarXConfig:i.axes?.[0]?.scrollbar,scrollbarYConfig:i.axes?.[1]?.scrollbar}),HL({chart:t,chartConfig:i,errorStrings:l,queryObject:a}),XL({chart:t,chartConfig:i,queryObject:a,axisLabelsBehaviorChanged:[!0,!0],data:e,dataWasUpdated:!0,timeIntervalInfo:e?.timeIntervalInfo,xAxisLabelFormatter:r?.xAxisLabelFormatter,yAxisLabelFormatter:r?.yAxisLabelFormatter,secondaryYAxisLabelFormatter:r?.secondaryYAxisLabelFormatter,guideTooltipFormatter:r?.guideTooltipFormatter,gaugeInnerLabelFormatter:r?.gaugeInnerLabelFormatter,utilsStrings:o,errorStrings:l}),TC({chart:t,chartConfig:i,options:r,utilsStrings:o,queryObject:a,errorStrings:l}),t.gridContainer?.toBack?.(),wv({chart:t,chartConfig:i,seriesIndexMapper:n,options:r,data:e,dataWasUpdated:!0,timeZoneChanged:!0,queryObject:a,utilsStrings:o,errorStrings:l}),Ie(i.series)===M.HeatSeries&&tF(t)}function _U(s){let{chartContainer:t,chartConfig:e,options:i,colorMatchApplied:r,rendererFieldNames:a,pieSlicesSymbols:n,globalOptions:o,t9nStrings:l,queryObject:h,dataInfo:u}=s,{errorStrings:c,utilsStrings:d,amChartsStrings:p}=l,{data:f,queryConfig:m,count:g}=u??{};cU();let y=fU(t);qW(y,o?.animationEnabled),GW(y,o?.enableResponsiveFeatures);let v=mU(y,e);pU({chart:v,chartContainer:t,chartLocale:p});let b;if(!v.isDisposed()){let _=pt(e.series),w=zr(e);Fr(v.uid,{options:i,filterBySelection:i?.filterBySelection,config:e,queryObject:h,isNonAggregatedChart:!Ad(_),isRotated:w,colorMatchApplied:r,rendererFieldNames:a}),GL({root:y,chart:v,config:e,queryObject:h,errorStrings:c}),qL({root:y,chart:v,cursorCrosshair:e.cursorCrosshair,config:e,queryObject:h,errorStrings:c});let{title:C,subtitle:P,footer:D}=e;QX(y,v),KL(v,{title:C,subtitle:P}),e5(v),ZL(v,D),GX(y,v),YL(v,e.background);let $=Ws(h,i?.popupTemplateFieldInfosEnabled);Fr(v.uid,{fieldList:$}),Fr(v.uid,{options:i,queryConfig:m,elementCount:g,timeIntervalInfo:f!==void 0&&"timeIntervalInfo"in f?f.timeIntervalInfo:void 0});let A=new Map;e.series.forEach((T,I)=>{A.set(T.id,I)}),Fr(v.uid,{queryConfig:m,elementCount:g}),v instanceof Ut?xU({chart:v,data:f,chartConfig:e,options:i,queryObject:h,utilsStrings:d,errorStrings:c}):v instanceof hs&&f&&"dataItems"in f&&(gn(h),bU({chart:v,data:f,chartConfig:e,pieSlicesSymbols:n,options:i,queryObject:h,utilsStrings:d,errorStrings:c})),v instanceof Kr&&(b=OA(v,e),mF({chart:v,chartConfig:e,legend:b,showEmptySeries:i?.showEmptySeries??i?.hideEmptySeries===!1,seriesConfig:e.series,queryObject:h})),RS({chart:v,actionMode:i?.actionMode,cursorRange:i?.cursorRange}),kL(v),xH(v),Z1({chart:v,chartConfig:e,delayCallback:!0})}function x(){tX(v)}return{update:_=>{b===void 0&&(b=OA(v,_.chartConfig)),vU({chart:v,legend:b,updateProps:_})},dispose:()=>dU(y),resetZoom:x,clearSelection:()=>bh({chart:v}),switchSelection:async()=>await hU({chart:v,queryObject:h,errorStrings:l.errorStrings}),setActionMode:(_,w)=>RS({chart:v,actionMode:_,cursorRange:w})}}function VA(s){let t="";for(let i=0;i<s.length;i+=1){let r=s[i];if(r.message&&r.message.trim()!==""){let a=s.length>1?"li":"p";t+=`<${a}>${r.message}</${a}>`}}let e=s.length>1?"ol":"div";return`<${e}>${t}</${e}>`}function SU(s){let{chartConfig:t,createMessage:e,status:i,errorStrings:r}=s,{schemaErrors:a,customErrors:n,warnings:o}=i,l="",h="";return t===void 0?(h=e===void 0?r.modalHeaders.newChart:"",l=e??r.errors.newChartRequest):a.length>0?(h=r.modalHeaders.error,l=r.errors.simpleError):n.length>0?(h=r.modalHeaders.error,l=VA(n)):o.length>0&&(h=r.modalHeaders.warning,l=`<p>${r.errors.warningRequest}</p>${VA(o)}`),{title:h,message:l}}function CU(s,t){let e;switch(s){case M.PieSeries:e=t?.placeholders.pieChartCreateMsg;break;case M.BarSeries:e=t?.placeholders.barChartCreateMsg;break;case M.BoxPlotSeries:e=t?.placeholders.boxPlotCreateMsg;break;case M.LineSeries:e=t?.placeholders.lineChartCreateMsg;break;case M.HistogramSeries:e=t?.placeholders.histogramCreateMsg;break;case M.ScatterSeries:e=t?.placeholders.scatterplotCreateMsg;break;case M.HeatSeries:e=t?.placeholders.calendarHeatChartCreateMsg;break;case M.ComboLineAndBarSeries:e=t?.placeholders.comboBarLineChartCreateMsg;break;case M.RadarSeries:e=t?.placeholders.radarChartCreateMsg;break;case M.GaugeSeries:e=t?.placeholders.gaugeCreateMsg;break}return e}function mf(s){let t;if(s){let e=sL(s);e&&(t=[e.r,e.g,e.b,255])}return t}function wU(s,t){let e=window.getComputedStyle(s);return{backgroundColor:mf(e.getPropertyValue(t.background)),textColor:mf(e.getPropertyValue(t.text)),lineColor:mf(e.getPropertyValue(t.line)),secondaryLineColor:mf(e.getPropertyValue(t.secondaryLine)),spinnerColor:mf(e.getPropertyValue(t.spinner))}}function PU(s){let{config:t,themeColors:e}=s,i=$h().toString();t?.axes?.forEach(r=>{e.textColor&&(r?.title?.content&&(!r.title.content.color||r.title.content.color.toString()===i)&&(r.title.content.color=e.textColor),r?.labels?.content&&(!r.labels.content.color||r.labels.content.color.toString()===i)&&(r.labels.content.color=e.textColor));let a=$h();a[3]=Iv,r?.grid&&e.secondaryLineColor&&(!r.grid.color||r.grid.color.toString()===a.toString())&&(r.grid.color=e.secondaryLineColor,r.grid.color[3]=Iv),r?.lineSymbol&&e.lineColor&&(!r.lineSymbol.color||r.lineSymbol.color.toString()===NC.toString())&&(r.lineSymbol.color=e.lineColor),r?.guides?.forEach(n=>{n.label&&e.textColor&&(!n.label.color||n.label.color.toString()===i)&&(n.label.color=e.textColor),e.lineColor&&(n.style?.type===Pt.SLS&&(!n.style.color||n.style.color.toString()===Vb.style.color?.toString())?n.style.color=e.lineColor:n.style?.type===Pt.SFS&&n.style?.outline&&(!n.style.outline.color||n.style.outline.color.toString()===Vb.style.color?.toString())&&(n.style.outline.color=e.lineColor))})})}function TU(s){let{config:t,themeColors:e}=s;t&&e.backgroundColor&&(!t.background||t.background.toString()===WC().toString())&&(t.background=e.backgroundColor)}function $U(s){let{config:t,themeColors:e}=s,i=$h().toString();e.textColor&&(t?.title?.content&&(!t.title.content.color||t.title.content.color.toString()===i)&&(t.title.content.color=e.textColor),t?.subtitle?.content&&(!t.subtitle.content.color||t.subtitle.content.color.toString()===i)&&(t.subtitle.content.color=e.textColor),t?.footer?.content&&(!t.footer.content.color||t.footer.content.color.toString()===i)&&(t.footer.content.color=e.textColor))}function DU(s){let{config:t,themeColors:e}=s;t&&e.textColor&&t.series.forEach(i=>{i.dataLabels?.content&&(!i.dataLabels.content.color||i.dataLabels.content.color.toString()===$h().toString())&&(i.dataLabels.content.color=e.textColor)})}function kU(s){let{config:t,themeColors:e}=s,i=t?.series[0];i?.type===M.PieSeries&&i.ticks?.lineSymbol&&e.secondaryLineColor&&(!i.ticks.lineSymbol.color||i.ticks.lineSymbol.color.toString()===Ef.toString())&&(i.ticks.lineSymbol.color=e.secondaryLineColor)}function AU(s){let{config:t,themeColors:e}=s,i=$h().toString();t?.legend&&e.textColor&&(t.legend.title?.content&&(!t.legend.title.content.color||t.legend.title.content.color.toString()===i)&&(t.legend.title.content.color=e.textColor),t.legend.body&&(!t.legend.body.color||t.legend.body.color.toString()===i)&&(t.legend.body.color=e.textColor))}function LU(s){let{config:t,themeColors:e}=s;if(kd(t)&&e.textColor){let i=$h().toString();t.axes?.forEach(r=>{r.innerLabel?.content&&(!r.innerLabel.content.color||r.innerLabel.content.color.toString()===i)&&(r.innerLabel.content.color=e.textColor),r.needle?.symbol&&(!r.needle.symbol.color||r.needle.symbol.color.toString()===i)&&(r.needle.symbol.color=e.textColor)})}}function FU(s){let{config:t,themeColors:e}=s;vn(t)&&e.lineColor&&t.series.forEach(i=>{i.gridLine&&!i.gridLine.color&&(i.gridLine.color=e.lineColor)})}function OU(s,t){let e=Wi(s),i={config:e,themeColors:t};return TU(i),$U(i),PU(i),DU(i),AU(i),LU(i),kU(i),FU(i),e}function MU(){return!0}function IU(s,t){let e,i=Yf(t);return i!==void 0&&"definitionExpression"in i&&s.layerFilterChangePolicy===Pb.Refresh&&(e=Js.watch(()=>i.definitionExpression,()=>{s.refresh({updateData:!0,resetAxesBounds:!0})})),e}function RU(s,t){let e;return t&&(e=Js.watch(()=>t.renderer,()=>{let{model:i}=s,r=Pr(i)?i.config:i;if(Io(r)&&s.layerRendererChangePolicy===Tb.Refresh){let a=MU();s.refresh({updateData:a})}})),e}function VU(s,t){let{view:e,model:i}=s,r=Pr(i)?i.config:i,a;if(e&&r&&t){let n=async()=>{(s.filterByExtent||s.filterByViewExtent)&&e.stationary&&(t.updating&&await Js.whenOnce(()=>!t.updating),await s.refresh({updateData:!0,resetAxesBounds:!0}))};a=[],kh(t)?(a.push(Js.when(()=>e.stationary,n)),a.push(Js.when(()=>!t.dataUpdating,n))):a.push(Js.when(()=>e.stationary,n)),n()}return a}function NU(s){let{view:t}=s,e;return t&&(e=Js.watch(()=>t.timeExtent,()=>{let{model:i}=s,r=Pr(i)?i.config:i,a=Ie(r?.series);(s.viewTimeExtentChangePolicy===Db.Refresh||s.syncViewTimeExtent)&&a!==M.HistogramSeries&&s.refresh({updateData:!0})})),e}function VS(s){let{syncViewTimeZone:t,syncViewTimeZoneInclusionList:e,chartConfig:i}=s,r=Ie(i?.series);return(t||(r&&e.includes(r))===!0)&&(vn(i)||Mh(i?.series[0])&&i.axes?.[0].valueFormat?.type===M.DateAxisFormat)}function EU(s){let{view:t,syncViewTimeZone:e,syncViewTimeZoneInclusionList:i}=s,r;return t&&"timeZone"in t&&(r=Js.watch(()=>t.timeZone,()=>{let{model:a}=s,n=Pr(a)?a.config:a;VS({syncViewTimeZone:e,syncViewTimeZoneInclusionList:i,chartConfig:n})&&(s.timeZone=t.timeZone,s.refresh({updateData:!0}))})),r}function BU(s,t){let e,i=Yf(t);return i!==void 0&&"fields"in i&&(e=Js.watch(()=>[i.fields],()=>{s.layerFieldsChangePolicy===$b.Refresh&&s.refresh({updateData:!0})})),e}function wF(s,t){return Js.watch(()=>t.selections,e=>{(s.syncViewSelection||s.syncSelectionsBetweenChartAndLayerViewPolicy===rc.Enabled)&&(Array.isArray(e)&&e?.length===0?s.clearSelection():s.applySelectionFromSelectionManager())})}function jU(s){let{view:t}=s,e;return t?.selectionManager&&(e=wF(s,t.selectionManager)),e}function WU(s){let{selectionManager:t}=s,e;return t&&(e=wF(s,t)),e}async function zU(s){let t=IC(`assets/common/t9n/messages.${s}.json`),e=await fetch(t);if(!e.ok)throw new Error(`Failed to load t9n file: ${t}`);return await e.json()}async function HU(s=Sh(document.documentElement).t9nLocale){let t=(await import("./64B7ILJI.js")).default;switch(s){case"ar":t=(await import("./SSOL6PCL.js")).default;break;case"bs":t=(await import("./KOY5DWSR.js")).default;break;case"bg":t=(await import("./ZLCRTIQH.js")).default;break;case"ca":t=(await import("./IDAOLPMA.js")).default;break;case"cs":t=(await import("./NKPZCF5U.js")).default;break;case"da":t=(await import("./24MSASQQ.js")).default;break;case"de":t=(await import("./VLCUXTLC.js")).default;break;case"el":t=(await import("./BK7DHYA7.js")).default;break;case"es":t=(await import("./4DXGXATO.js")).default;break;case"et":t=(await import("./OISERMTF.js")).default;break;case"fi":t=(await import("./7C2LVFNV.js")).default;break;case"fr":t=(await import("./TB7JE5XK.js")).default;break;case"he":t=(await import("./P37JASN4.js")).default;break;case"hr":t=(await import("./LAEUROZM.js")).default;break;case"hu":t=(await import("./OD2NWPCL.js")).default;break;case"id":t=(await import("./CYGMXV56.js")).default;break;case"it":t=(await import("./TRAVRA3M.js")).default;break;case"ja":t=(await import("./UD724V36.js")).default;break;case"ko":t=(await import("./EQZBQP5A.js")).default;break;case"lt":t=(await import("./B2SUC7VR.js")).default;break;case"lv":t=(await import("./ADI63OO7.js")).default;break;case"no":t=(await import("./5D2QRMC6.js")).default;break;case"nl":t=(await import("./NRXCKYYY.js")).default;break;case"pl":t=(await import("./5WIR3JWC.js")).default;break;case"pt-BR":t=(await import("./6WKTHJQK.js")).default;break;case"pt-PT":t=(await import("./7COM5REK.js")).default;break;case"ro":t=(await import("./QIG5H6WA.js")).default;break;case"ru":t=(await import("./P5I5RQTN.js")).default;break;case"sr":t=(await import("./I2BM5KSH.js")).default;break;case"sk":t=(await import("./YCQLYXH4.js")).default;break;case"sv":t=(await import("./WTF2PFHV.js")).default;break;case"th":t=(await import("./OKAZOAYZ.js")).default;break;case"tr":t=(await import("./BDEDEGCZ.js")).default;break;case"uk":t=(await import("./ZZHKDFTA.js")).default;break;case"vi":t=(await import("./NWLNHFHJ.js")).default;break;case"zh-CN":t=(await import("./QKZK6MTN.js")).default;break;case"zh-HK":t=(await import("./PIZPF2BH.js")).default;break;case"zh-TW":t=(await import("./PIZPF2BH.js")).default;break}return t}async function XU(s=Sh(document.documentElement).t9nLocale){let t=(await import("./TOCBEPNS.js")).default;switch(s){case"ar":t=(await import("./P7FI5QUW.js")).default;break;case"bs":t=(await import("./EQTI5Z4G.js")).default;break;case"bg":t=(await import("./SVLOD3HQ.js")).default;break;case"ca":t=(await import("./RMIIDRGC.js")).default;break;case"cs":t=(await import("./C2ZX67U4.js")).default;break;case"da":t=(await import("./B7J5YIWF.js")).default;break;case"de":t=(await import("./A2KSCV2I.js")).default;break;case"el":t=(await import("./AS3QP77N.js")).default;break;case"es":t=(await import("./DDNOUE2T.js")).default;break;case"et":t=(await import("./LXZXXY7V.js")).default;break;case"fi":t=(await import("./6U6VAS2O.js")).default;break;case"fr":t=(await import("./OMU647X3.js")).default;break;case"he":t=(await import("./TJ2NRLF6.js")).default;break;case"hr":t=(await import("./6AXYQGBN.js")).default;break;case"hu":t=(await import("./PCFEAGXP.js")).default;break;case"id":t=(await import("./FFJTVPE4.js")).default;break;case"it":t=(await import("./PZP57FJ2.js")).default;break;case"ja":t=(await import("./B5Z7FBO7.js")).default;break;case"ko":t=(await import("./AF2GUPVE.js")).default;break;case"lt":t=(await import("./ZVOX72AF.js")).default;break;case"lv":t=(await import("./KTYFDFMQ.js")).default;break;case"no":t=(await import("./OXPXA3PS.js")).default;break;case"nl":t=(await import("./Q466K37N.js")).default;break;case"pl":t=(await import("./J3BB5KXD.js")).default;break;case"pt-BR":t=(await import("./NNHJ75EA.js")).default;break;case"pt-PT":t=(await import("./HABS63VB.js")).default;break;case"ro":t=(await import("./JUFBIV44.js")).default;break;case"ru":t=(await import("./S4NQCINT.js")).default;break;case"sr":t=(await import("./NWQ2L7IJ.js")).default;break;case"sk":t=(await import("./3FFCWEMV.js")).default;break;case"sl":t=(await import("./Z5EJIWAY.js")).default;break;case"sv":t=(await import("./R5LIRRMK.js")).default;break;case"th":t=(await import("./H2DUFQAG.js")).default;break;case"tr":t=(await import("./RHUEVXMR.js")).default;break;case"uk":t=(await import("./BWR5ONE2.js")).default;break;case"vi":t=(await import("./XR4O3AQ6.js")).default;break;case"zh-CN":t=(await import("./ZARYZFJ4.js")).default;break;case"zh-HK":t=(await import("./26DDVOQ7.js")).default;break;case"zh-TW":t=(await import("./26DDVOQ7.js")).default;break}return t}async function YU(s=Sh(document.documentElement).t9nLocale,t){let e=t?await XU(s):await HU(s),i=(await zU(s)).customAmchartsStrings;return{...e,...i}}var UU=({message:s,heading:t,options:e})=>Gu`<calcite-alert .icon=${e?.icon??"exclamationMarkTriangle"} .open=${e?.active===!0} .autoClose=${e?.autoClose??!1} .autoCloseDuration=${e?.duration??"medium"} scale=m .kind=${e?.kind??"danger"} .ariaHidden=${e?.active!==!0} dir=ltr role=alertdialog label="arcgis charts notify panel">${t!==void 0?Gu`<div slot=title>${t}</div>`:null}${s!==void 0?Gu`<div slot=message>${s}</div>`:null}</calcite-alert>`,GU=DC`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}.chart{flex-grow:1}.chart>div{justify-content:center;align-items:center}.chart{overflow-y:hidden}:host{width:var(--chart-width, var(--arcgis-charts-default-width));height:var(--chart-height, var(--arcgis-charts-default-height));display:flex;flex-direction:row;position:relative;overflow:hidden}.chart-wrapper{position:relative;width:100%}.chart-container{height:100%;overflow:hidden}`,NS=class extends LC{constructor(t){super(t)}addLayerWatchHandlers(t){this.removeLayerWatchHandlers(),this.layerFilterWatchHandler=IU(this.component,t),this.layerRendererWatchHandler=RU(this.component,t),this.layerFieldsWatchHandler=BU(this.component,t)}setViewExtentChangeWatchHandler(t,e){(t??(this.component.filterByExtent||this.component.filterByViewExtent))&&(this.removeViewExtentChangeWatchHandlers(),this.viewExtentChangeWatchHandlers=VU(this.component,e))}setViewTimeZoneWatchHandler(){this.removeViewTimeZoneChangeWatchHandler(),this.viewTimeZoneChangeWatchHandler=EU(this.component)}setViewTimeExtentChangeWatchHandler(){this.removeViewTimeExtentChangeWatchHandler(),this.viewTimeExtentChangeWatchHandler=NU(this.component)}setViewSelectionsChangeWatchHandler(){this.removeViewSelectionsChangeWatchHandler(),this.viewSelectionsChangeWatchHandler=jU(this.component)}setSelectionManagerChangeWatchHandler(){this.removeSelectionManagerChangeWatchHandler(),this.selectionManagerChangeWatchHandler=WU(this.component)}removeLayerWatchHandlers(){this.removeLayerFilterWatchHandler(),this.removeLayerRendererWatchHandler(),this.removeLayerFieldsWatchHandler()}removeViewWatchHandlers(){this.removeViewSelectionsChangeWatchHandler(),this.removeViewTimeZoneChangeWatchHandler(),this.removeViewTimeExtentChangeWatchHandler()}removeViewExtentChangeWatchHandlers(){this.viewExtentChangeWatchHandlers?.forEach(t=>t.remove()),this.viewExtentChangeWatchHandlers=[]}removeViewSelectionsChangeWatchHandler(){this.viewSelectionsChangeWatchHandler?.remove()}removeSelectionManagerChangeWatchHandler(){this.selectionManagerChangeWatchHandler?.remove()}removeLayerFilterWatchHandler(){this.layerFilterWatchHandler?.remove()}removeLayerRendererWatchHandler(){this.layerRendererWatchHandler?.remove()}removeLayerFieldsWatchHandler(){this.layerFieldsWatchHandler?.remove()}removeViewTimeZoneChangeWatchHandler(){this.viewTimeZoneChangeWatchHandler?.remove()}removeViewTimeExtentChangeWatchHandler(){this.viewTimeExtentChangeWatchHandler?.remove(),this.component.runtimeDataFilters?.timeExtent&&delete this.component.runtimeDataFilters.timeExtent}},ES=class extends EventTarget{constructor(t){super(),this._configHistory=[void 0],this._revision=0,this.asyncUpdatesPromise=Promise.resolve(),this.config=t}get layer(){}get config(){return this._config}set config(t){this._config=t,this._revision+=1,this._configHistory.push(Wi(this._config)),this._configHistory.length>Zw&&this._configHistory.shift(),this.dispatchEvent(new CustomEvent("arcgisChartsModelConfigChange",{detail:{config:this._config,setterName:"config"}}))}get revision(){return this._revision}recall(t){return Jw(this._revision,this._config,this._configHistory,t)}},BS=class extends OC{constructor(){super(),this._messages=Ob(),this._chartRef=FC(),this._commonStrings=Ob({name:"common",blocking:!0}),this._watchHandlersController=new NS(this),this._rotated=!1,this._legendVisibility=!1,this._showLoader=!1,this._lastDataCheckRevision=0,this._noRenderingUpdateProps=["_messages","showLoader","infoModalMessage","notifyMessage","disableInteractions","interactionsDisabled"],this._loadQueryObject=new _n(this,{args:()=>[this.internalModel?.config?.iLayer,this.layer,this.view,this.filterByExtent,this.filterByViewExtent,this.layerItemId,this.chartIndex,this.model,Pr(this._model)?this._model.layer:void 0],task:async([t,e,i,r,a,n,o,l,h],{signal:u})=>{let c;if(e||t||h)c=await _w({iLayer:t,layer:e??h,view:i,filterByViewExtent:r||a,abortSignal:u});else if(n!==void 0&&this._model===void 0&&this.internalModel===void 0){if(n&&n.trim()!==""&&!Tw({view:i,portalItemId:n})){let p=await lN.fromPortalItem({portalItem:new hN({id:n})});await db(p,u),(KC(p)||ss(p))&&(await this._createModelFromLayer(p,o),c=p)}}else Pr(l)&&(await l?.update(),c=l?.layer);let d=ms(c);return d&&await db(d,u),this._watchHandlersController.addLayerWatchHandlers(d),c},onComplete:()=>{this.taskCompletionTick++},onError:async t=>{this._handleRuntimeError(t)}}),this._loadLayerView=new _n(this,{args:()=>[this.loadedQueryObject,this.view,this.filterByExtent||this.filterByViewExtent],task:async([t,e,i],{signal:r})=>{let a;return kh(t)?(a=t,await Js.whenOnce(()=>!t.updating,{signal:r})):ss(t)&&(a=await e?.whenLayerView(t)),a&&await Js.whenOnce(()=>!a.updating),i?this._watchHandlersController.setViewExtentChangeWatchHandler(i,a):(this._watchHandlersController.removeViewExtentChangeWatchHandlers(),await this.refresh({updateData:!0,resetAxesBounds:!0})),a},onComplete:()=>{this.taskCompletionTick++},onError:async t=>{this._handleRuntimeError(t)}}),this._checkIfDataUpdateIsNeeded=new _n(this,{args:()=>{let t=[this.forceDataUpdateTick,this.runtimeDataFilters,this.returnFeaturesExtent,this.chartLimits,this.updateSplitBySeries];return[this._chart,this.internalModel?.revision,this.usePopupTemplateFieldsInfo,this.filterBySelection,this.selectionData,this.setTimeBinningInfoWhenNotProvided,this.chartLimits,this.timeZone,this.loadedQueryObject,...t]},task:([t,e,i,r,a,n,o,l,h])=>{if(h){let u=this.internalModel?.config,c=t===void 0,d=Ws(h,i),p=this._lastRenderedProps?.options?.selectionData?.selectionOIDs,f=this._lastRenderedProps?.dataUpdateNeededProps,m=this._lastRenderedProps?.extraProps?.layer,g=this._lastRenderedProps?.extraProps?.filterBySelection,y=c,v;f&&Object.keys(f).forEach(_=>{let w=f?f[_]:void 0,C=this[_];y=y||!ea(w,C)});let b=kh(m)!==kh(h);y=y||b,v={common:{layerChanged:b}};let x=this.internalModel?.recall(this._lastDataCheckRevision);if(this._lastDataCheckRevision=e??0,u&&x){y=y||Aw(x,u);let _=this.getEffectiveTimeZone(u,l);Qw(_,u);let w=Uw({previousConfig:x,newConfig:u,previousFilterBySelection:g,previousSelectionOIDs:p,fieldList:d,queryObject:h,filterBySelection:r,selectionData:a,setTimeBinningInfoWhenNotProvided:n,chartLimits:o});v={...v,...w.dataUpdateDetails},y=y||w.dataUpdateNeeded}return{dataUpdateNeeded:y,dataUpdateDetails:v}}else return this._checkIfDataUpdateIsNeeded.value??{dataUpdateNeeded:!1,dataUpdateDetails:void 0}},onComplete:()=>{this.taskCompletionTick++},onError:async t=>{this._handleRuntimeError(t)}}),this._prepareConfigForRendering=new _n(this,{args:()=>[this.internalModel?.revision,this._chart,this.updateSplitBySeries,this.updateSplitBySeries?.addMissingSeries,this.runtimeDataFilters,this.view,this.viewTimeExtentChangePolicy,this.syncViewTimeExtent,this.ignoreViewExtent,this.setTimeBinningInfoWhenNotProvided,this.returnFeaturesExtent,this.returnSelectionOIDs,this.chartLimits,this._commonStrings?.errorStrings,this.timeZone,this.loadedQueryObject,this._checkIfDataUpdateIsNeeded.value?.dataUpdateNeeded],task:async([t,e,i,r,a,n,o,l,h,u,c,d,p,f,m,g,y],{signal:v})=>{let b=this.internalModel?.config,x=e===void 0,_=g!==this._lastRenderedProps?.extraProps?.layer,w=this.filterByExtent!==this._lastRenderedProps?.extraProps?.filterByExtent||this.filterByViewExtent!==this._lastRenderedProps?.extraProps?.filterByViewExtent,C=r===!0&&(x||y||_||w),P=Fb({runtimeDataFilters:a,view:n,viewTimeExtentChangePolicy:o,syncViewTimeExtent:l}),D=this.getEffectiveTimeZone(b,m),{alteredConfig:$,preFetchedQueryResponse:A}=await aP({configToAlter:b,updateSplitBySeries:i,addMissingSeries:C,chartContainer:this.el,queryObject:g,layer:g,abortSignal:v,runtimeDataFilters:P,ignoreViewExtent:h,setTimeBinningInfoWhenNotProvided:u,returnFeaturesExtent:c,returnStatisticsAggregatedIds:d!==!1,timeZone:D,chartLimits:p,errorStrings:f});return JSON.stringify(this.internalModel?.config?.series)!==JSON.stringify($?.series)&&this.internalModel?.config&&(this.internalModel.config={...this.internalModel.config,series:$?Wi($.series):this.internalModel.config.series}),{alteredConfig:$,preFetchedQueryResponse:A}},onComplete:()=>{this.taskCompletionTick++},onError:async t=>{this._handleRuntimeError(t)}}),this._isChartSupportedByDataSource=new _n(this,{args:()=>[this.internalModel?.revision,this.loadedLayer],task:async([t,e],{signal:i})=>{let r=this.internalModel?.config;return await sP({config:r,layer:e,abortSignal:i})},onComplete:()=>{this.taskCompletionTick++},onError:async t=>{this._handleRuntimeError(t)}}),this._validateWebChart=new _n(this,{args:()=>[this._prepareConfigForRendering.value?.alteredConfig,this.allowUsingObjectIdStat,this._commonStrings?.errorStrings,this.loadedLayer],task:async([t,e,i,r])=>await Sb({input:t,queryObject:r,allowUsingObjectIdStat:e,errorStrings:i}),onComplete:()=>{this.taskCompletionTick++},onError:async t=>{this._handleRuntimeError(t)}}),this._getData=new _n(this,{args:()=>[this._unsanitizedSelectionDataItems,this._commonStrings?.errorStrings,this.usePopupTemplateFieldsInfo,this.popupTemplateFieldInfosEnabled,this.runtimeDataFilters,this.ignoreViewExtent,this.filterBySelection,this.selectionData,this.setTimeBinningInfoWhenNotProvided,this.returnFeaturesExtent,this.returnSelectionOIDs,this.chartLimits,this.hideZeroCountCategories,this.replaceNoValueCategoryWithZero,this._gatherComponentOptions().view,this.filterByExtent||this.filterByViewExtent,this.syncViewTimeZone,this.syncViewTimeZoneInclusionList,this.loadedQueryObject,this.forceDataUpdateTick,this.internalModel,this._prepareConfigForRendering.value?.alteredConfig,this._prepareConfigForRendering.value?.preFetchedQueryResponse],task:async([t,e,i,r,a,n,o,l,h,u,c,d,p,f,m,g,y,v,b,x,_,w,C],{signal:P})=>{let D,{dataUpdateNeeded:$,dataUpdateDetails:A}=await this._checkIfDataUpdateIsNeeded.taskComplete;if(w&&b&&!xl(w)){if($){let T=Ws(b,i||r),I=VS({syncViewTimeZone:y,syncViewTimeZoneInclusionList:v,chartConfig:w});D=await dw({chartConfig:w,preFetchedQueryResponse:C,queryObject:b,runtimeDataFilters:a,ignoreViewExtent:n,filterBySelection:o,selectionData:l,setTimeBinningInfoWhenNotProvided:h,returnFeaturesExtent:u,returnStatisticsAggregatedIds:c!==!1,chartLimits:d,popupTemplateFieldInfosEnabled:r,hideZeroCountCategories:p,replaceNoValueCategoryWithZero:f,view:m,filterByViewExtent:g,syncViewTimeZone:I,fieldList:T,currentSelectionDataItems:t,dataForFilterBySelectionChanged:A?.common?.dataForFilterBySelectionChanged,errorStrings:e,abortSignal:P}),Ib(_)&&mP(fP,D.data)}else if(tm(w)&&w.series[0].type===M.GaugeSeries&&w.series[0].featureIndex!==void 0&&this._processedChartData){let T="dataItems"in this._processedChartData?this._processedChartData.dataItems:[],I=cw({featureIndex:w.series[0].featureIndex,chartData:T,x:w.series[0].x});D={valid:!Number.isNaN(I),data:{...this._processedChartData}},Number.isNaN(I)&&T.length>0&&(D.invalidType=Ro.NoValue,D.count=T.length)}}return{dataInfo:D,dataWasUpdated:!!D}},onComplete:()=>{this.taskCompletionTick++},onError:async t=>{this._handleRuntimeError(t)}}),this.forceDataUpdateTick=0,this.taskCompletionTick=0,this.enableBetaFeatures=!1,this.enableConfiguration=!1,this.configurationEnabled=!1,this.calciteThemingCSSVariables={background:"--calcite-color-foreground-1",text:"--calcite-color-text-1",line:"--calcite-color-border-1",secondaryLine:"--calcite-color-text-3",spinner:"--calcite-color-brand-hover"},this.allowUsingObjectIdStat=!1,this.nullAsValid=!1,this.zeroCountAsValid=!1,this.hideUIMessages=!1,this.showEmptySeries=!1,this.autoInverseDataLabelTextColor=!1,this.hideZeroCountCategories=!1,this.ignoreSmoothRenderingLimit=!1,this.returnSelectionIndexes=!1,this.returnFeaturesExtent=!1,this.filterBySelection=!1,this.filterByExtent=!1,this.filterByViewExtent=!1,this.disableInteractions=!1,this.interactionsDisabled=!1,this.skipChartCreationQueue=!1,this.useAnimatedCharts=!1,this.showLicenseWatermark=!1,this.enableResponsiveFeatures=!1,this.autoDisposeChart=!1,this.setTimeBinningInfoWhenNotProvided=!1,this.errorPolicy=Vd.Throw,this.disableTogglingLegendItems=!1,this.hideLoaderAnimation=!1,this.usePopupTemplateFieldsInfo=!1,this.syncViewTimeZoneInclusionList=[M.HeatSeries],this.syncViewTimeZone=!1,this.layerFilterChangePolicy=Pb.Refresh,this.viewTimeExtentChangePolicy=Db.Ignore,this.syncViewTimeExtent=!1,this.layerRendererChangePolicy=Tb.Refresh,this.layerFieldsChangePolicy=$b.Refresh,this.syncSelectionsBetweenChartAndLayerViewPolicy=rc.Disabled,this.syncViewSelection=!1,this.syncSelection=!1,this.syncChartsSelection=!1,this.ignoreViewExtent=!1,this.autoDestroyDisabled=!1,this.arcgisAxesMinMaxChange=fs(),this.arcgisBadDataWarningRaise=fs(),this.arcgisChartNotFoundWarning=fs(),this.arcgisConfigChange=fs(),this.arcgisDataFetchComplete=fs(),this.arcgisDataProcessComplete=fs(),this.arcgisDataProcessError=fs(),this.arcgisInvalidConfigWarningRaise=fs(),this.arcgisLegendItemVisibilityChange=fs(),this.arcgisNoRenderPropChange=fs(),this.arcgisRenderingComplete=fs(),this.arcgisRuntimeError=fs(),this.arcgisSelectionComplete=fs(),this.arcgisSeriesColorChange=fs(),this.arcgisSeriesOrder=fs(),this.arcgisUpdateComplete=fs(),this.listen("arcgisChartsJSLegendItemVisibilityChange",this._handleLegendItemVisibilityChanged),this.listen("arcgisChartsJSInvalidConfigWarningRaise",this._handleInvalidConfigWarningRaise),this.listen("arcgisChartsJSSeriesColorChange",this._handleSeriesColorsChange),this.listen("arcgisChartsJSSelectionComplete",this._handleSelection),this.listen("arcgisChartsJSTooManySelectedElements",this._handleTooManySelectedElements),this.listen("calciteAlertClose",this._handleAlertClosed),this.listen("arcgisChartsJSAxesMinMaxChange",this._handleAxesMinMaxChange),this.listen("arcgisChartsJSSeriesOrder",this._handleSeriesOrder),this.listen("arcgisChartsJSRenderingComplete",this._handleRenderingComplete),this._addConfigListeners(),this.listenOn(document,"arcgisSelectionComplete",this._handleExternalSelection)}static{this.properties={internalModel:16,forceDataUpdateTick:16,taskCompletionTick:16,infoModalMessage:16,notifyMessage:16,showLoader:16,enableBetaFeatures:5,model:0,enableConfiguration:5,configurationEnabled:5,calciteThemingCSSVariables:0,rotation:[5,{hasChanged:()=>!1}],rotated:[5,{hasChanged:()=>!1}],actionMode:1,cursorRange:1,legendPosition:[1,{hasChanged:()=>!1}],legendVisibility:[5,{hasChanged:()=>!1}],allowUsingObjectIdStat:5,nullAsValid:5,zeroCountAsValid:5,showUIMessages:5,hideUIMessages:5,hideEmptySeries:5,showEmptySeries:5,autoInverseDataLabelTextColor:5,replaceNoValueCategoryWithZero:5,hideZeroCountCategories:5,ignoreSmoothRenderingLimit:5,chartWillRender:0,legendValueLabelFormatter:0,timeZone:1,view:[0,{hasChanged:()=>!1}],layer:0,layerItemId:1,chartIndex:9,selectionData:0,returnSelectionOIDs:5,returnSelectionIndexes:5,returnFeaturesExtent:5,filterBySelection:5,filterByExtent:5,filterByViewExtent:5,disableInteractions:5,interactionsDisabled:5,queueChartCreation:5,skipChartCreationQueue:5,useAnimatedCharts:5,animationEnabled:5,hideLicenseWatermark:5,showLicenseWatermark:5,enableResponsiveFeatures:5,autoDisposeChart:5,featureIndex:[9,{hasChanged:()=>!1}],placeholder:1,selectionTheme:0,setTimeBinningInfoWhenNotProvided:5,chartLimits:0,aria:0,tooltipFormatter:0,dataLabelFormatter:0,guideTooltipFormatter:0,xAxisLabelFormatter:0,yAxisLabelFormatter:0,secondaryYAxisLabelFormatter:0,gaugeInnerLabelFormatter:0,errorPolicy:1,disableTogglingLegendItems:5,togglingLegendItemsDisabled:5,hideLoaderAnimation:5,loaderColors:0,runtimeDataFilters:0,usePopupTemplateFieldsInfo:5,syncViewTimeZoneInclusionList:0,syncViewTimeZone:5,popupTemplateFieldInfosEnabled:5,layerFilterChangePolicy:1,viewTimeExtentChangePolicy:1,syncViewTimeExtent:5,layerRendererChangePolicy:1,layerFieldsChangePolicy:1,syncSelectionsBetweenChartAndLayerViewPolicy:1,syncViewSelection:5,syncSelection:5,syncChartsSelection:5,ignoreViewExtent:5,updateSplitBySeries:0,messageOverrides:0,autoDestroyDisabled:5,selectionManager:0}}static{this.styles=GU}get loadedQueryObject(){return this._loadQueryObject.value}get loadedLayer(){return this.loadedQueryObject?ZC(this.loadedQueryObject):void 0}get _isAnyTaskPending(){return[this._loadQueryObject,this._loadLayerView,this._checkIfDataUpdateIsNeeded,this._prepareConfigForRendering,this._isChartSupportedByDataSource,this._validateWebChart,this._getData].some(t=>t.status===dm.PENDING)}get showLoader(){return this._showLoader}set showLoader(t){t||(clearTimeout(this._loaderTimer),this._loaderTimer=void 0),this._showLoader=!this.hideLoaderAnimation&&t}get model(){let t=this._model;return t||(Pr(this.internalModel)?t=this.internalModel:t=this.internalModel?.config),t}set model(t){this._model=t,this.internalModel=Pr(t)?t:new ES(t)}get rotation(){return this._rotated}set rotation(t){this.rotated=t}get rotated(){return this._rotated}set rotated(t){this._rotatedChange(t),this._handleNoRenderPropChange("rotated",t),this._rotated=t}get legendPosition(){return this._legendPosition}set legendPosition(t){this._legendPositionChange(t),this._handleNoRenderPropChange("legendPosition",t),this._legendPosition=t}get legendVisibility(){return this._legendVisibility}set legendVisibility(t){this._legendVisibilityChange(t),this._handleNoRenderPropChange("legendVisibility",t),this._legendVisibility=t}get view(){return this._view}set view(t){let e=this._view;this._view=t,this._viewChange(t,e),this._handleNoRenderPropChange("view",t)}get featureIndex(){return this._featureIndex}set featureIndex(t){let e=this.featureIndex;this._featureIndexChange(t,e),this._handleNoRenderPropChange("featureIndex",t),this._featureIndex=t}async clearSelection(){this._chart!==void 0&&(this._unsanitizedSelectionDataItems=void 0,this._chart.clearSelection(),this.filterBySelection&&await this.refresh())}async destroy(){this._chart?.dispose()}async errorAlert(t){this.errorPolicy===Vd.Throw&&(this._actionBarElement&&(this._actionBarElement.forceDisableActions=!0),this.notify(t,this._commonStrings?.errorStrings.errorHeading))}async exportAsCSV(t){let e,i,r={xAxisLabelFormatter:this.xAxisLabelFormatter,yAxisLabelFormatter:this.yAxisLabelFormatter,secondaryYAxisLabelFormatter:this.secondaryYAxisLabelFormatter};if(this._sanitizedChartData){let a=await this._loadQueryObject.taskComplete,n=a?Ws(a,this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled):void 0,o=this.internalModel?.config,l=lw(this.getEffectiveTimeZone(o)),h=this._processedChartData??this._sanitizedChartData,u=await Pw(ms(a)),c=o?.chartRenderer?xw(o.chartRenderer):[],d=[...new Set([...u,...c])],p=Lh(o,d),f=Pr(this.internalModel)?this.internalModel?.titleText:this.internalModel?.config?_b(this.internalModel.config):this._commonStrings.utilsStrings.chartType.chart;if(Object.values(h).filter(m=>Array.isArray(m)&&m.length>0).length>1){let m=new NA.default;Object.entries(h).forEach(([y,v])=>{if(Array.isArray(v)&&v.length>0){let b=Lb({rawData:v,config:o,layer:a,fieldList:n,formatters:r,useRendererLabel:p,timeZone:l,formatLocale:t?.locale,utilsStrings:this._commonStrings.utilsStrings}),x=Ab(b,t),_=`${f}-${y}.csv`;m.file(_,x)}});let g=await m.generateAsync({type:"blob"});e=URL.createObjectURL(g),i=`${f}.zip`}else{let m;if("bins"in h?m=h.bins:"dataItems"in h&&(m=h.dataItems),m){let g=Lb({rawData:m,config:o,layer:a,fieldList:n,formatters:r,useRendererLabel:p,timeZone:l,formatLocale:t?.locale,utilsStrings:this._commonStrings.utilsStrings}),y=Ab(g,t);e=URL.createObjectURL(new Blob([y],{type:"text/csv;charset=utf-8;"})),i=`${f}.csv`}}e!==void 0&&i!==void 0&&vP(e,i)}}async exportAsImage(t=sw.PNG){let e=this._chartRef.value;if(e){let i=await Ui(e,{scale:2}),r=`${Pr(this.internalModel)?this.internalModel.titleText:this.internalModel?.config?_b(this.internalModel.config):this._commonStrings.utilsStrings.chartType.chart}.${t}`;await i.download({format:t,filename:r})}else this.notify(this._commonStrings?.errorStrings.errors.exportImageChartNotReady)}async loadModel(){return this.internalModel?await this.internalModel.asyncUpdatesPromise:await new Promise(t=>{this._resolveModelSetup=t})}async notify(t,e){this.infoModalMessage=t,this._infoModalHeading=e,this.showLoader=!1}async refresh(t){let{updateData:e=!0,resetAxesBounds:i=!1}=t??{};if(e&&this.forceDataUpdateTick++,i&&this.internalModel){let r=this.internalModel.config;delete r?.axes?.[0]?.minimum,delete r?.axes?.[0]?.maximum,delete r?.axes?.[1]?.minimum,delete r?.axes?.[1]?.maximum,this.internalModel.config=r}this.requestUpdate("refresh")}async resetZoom(){this._chart!==void 0&&this._chart.resetZoom()}async switchSelection(){let t=await this._loadQueryObject.taskComplete;this._chart!==void 0&&!this.filterBySelection&&t&&await this._chart.switchSelection(t)}load(){if(this.syncViewSelection||this.syncSelectionsBetweenChartAndLayerViewPolicy===rc.Enabled){let t=this._getSelectionFromSelectionManager();t&&(this.selectionData={selectionOIDs:t,selectionSource:Ti.ProgrammaticSelection})}}willUpdate(t){t.has("internalModel")&&this._internalModelChange(),t.has("layerItemId")&&(this.internalModel=void 0),t.has("selectionData")&&!ea(t.get("selectionData")?.selectionOIDs,this.selectionData?.selectionOIDs)&&this._selectionDataChange(),t.has("filterBySelection")&&t.get("filterBySelection")!==void 0&&this._filterBySelectionChanged(),t.has("selectionManager")&&(this._setSelectionManagerChangeWatchHandler(),this.applySelectionFromSelectionManager())}updated(t){Array.from(t.keys()).filter(e=>!this._noRenderingUpdateProps.includes(e)).length>0&&this._updatedAsync(),this._actionBarElement!==void 0&&yP({actionBar:this._actionBarElement,chartComponent:this.el,config:this.internalModel?.config,isInfoModalDisplayed:this.infoModalMessage!==void 0}),t.has("aria")&&this.aria&&this._chartRef.value&&(this._chartRef.value.ariaLabel=this.aria.label??this._chartRef.value.ariaLabel,this._chartRef.value.ariaDescription=this.aria.description??this._chartRef.value.ariaDescription,this._chartRef.value.ariaLabelledByElements=this.aria.labelledByElements??this._chartRef.value.ariaLabelledByElements,this._chartRef.value.ariaDescribedByElements=this.aria.describedByElements??this._chartRef.value.ariaDescribedByElements)}disconnectedCallback(){super.disconnectedCallback(),this._removeLayerWatchHandlers(),this._watchHandlersController.removeViewExtentChangeWatchHandlers(),this._removeViewWatchHandlers(),this._removeSelectionManagerChangeWatchHandler(),this.autoDestroyDisabled||this._chart?.dispose()}applySelectionFromView(){this.applySelectionFromSelectionManager()}applySelectionFromSelectionManager(){let t=this._getSelectionFromSelectionManager();if(t&&!ea(t,this.selectionData?.selectionOIDs)){this.selectionData={selectionOIDs:t,selectionSource:Ti.ProgrammaticSelection};let e=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisSelectionComplete.emit({selectionData:this.selectionData,model:e})}}_handleRuntimeError(t){if(t instanceof Gn&&t.name===Zu.QueryFeaturesError?this.arcgisDataProcessError.emit(t.details):t instanceof Gn&&this.arcgisRuntimeError.emit(t.details??t),typeof t=="object"&&t&&"message"in t){let e=t instanceof Gn?t.message:this._commonStrings?.errorStrings.errors.simpleError;this.notify(e,this._commonStrings?.errorStrings.errorHeading)}}getEffectiveTimeZone(t,e){let i=this.view&&"timeZone"in this.view&&this.view.timeZone?this.view.timeZone:void 0,r=VS({syncViewTimeZone:this.syncViewTimeZone,syncViewTimeZoneInclusionList:this.syncViewTimeZoneInclusionList,chartConfig:t});return e??this.timeZone??(r?i:void 0)}_hideInfoModal(){this.infoModalMessage=void 0}async _generateHeatChartClassBreaks(t){if(!ss(this.loadedLayer)&&Ib(this.internalModel)&&t?.data&&"dataItems"in t.data){let e=await qw({data:t.data,classificationMethod:this.internalModel.classificationMethod,breaksCount:this.internalModel.breaksCount,xAxisField:this.internalModel.xAxisField,colorRampName:this.internalModel.colorRampName,existingClassBreakInfos:this.internalModel.chartRenderer?.classBreakInfos,isColorRampFlipped:this.internalModel.isColorRampFlipped});Kw({currentBreaks:e,configBreaks:this.internalModel.chartRenderer?.classBreakInfos??[]})&&(this.internalModel.chartRenderer={...this.internalModel.chartRenderer,classBreakInfos:e,type:"classBreaks",field:Hi.valueField})}}async _updatedAsync(){let t=this.internalModel?.config;if(this._chart===void 0&&(this.showLoader=!0),!this.showLoader&&!this._loaderTimer&&(this._loaderTimer=setTimeout(()=>{this.showLoader||(this.showLoader=!0)},300)),!this._isAnyTaskPending){if(t!==void 0&&this._chart!==void 0)try{(!t&&!this.loadedLayer||Cb(t,this.loadedLayer)&&!xl(t)&&await this._isChartSupportedByDataSource.taskComplete)&&await this._renderChart()}catch(e){this._chartRef.value!==void 0&&(e instanceof Gn&&e.name===Zu.ChartDisposed?(this._chart?.dispose(),this._chart=void 0,this._chartRef.value.innerHTML="",await this._createChartInstance(!1)):this._handleRuntimeError(e))}else this._chart===void 0&&await this._createChartInstance();this.placeholder!==void 0?await this.notify(this.placeholder):(this.enableConfiguration||this.configurationEnabled)&&xl(t)&&this._applyPlaceholderForPartialConfig(t)}}_useAmCharts5(){let t=Ie(this.internalModel?.config?.series);return this.enableBetaFeatures||t===M.ScatterSeries||t===M.HistogramSeries||t===M.RadarSeries||t===M.HeatSeries}_handleNoRenderPropChange(t,e){let i=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisNoRenderPropChange.emit({propName:t,value:e,model:i})}_handleExternalSelection(t){if(!ss(this.loadedLayer)){let e=t,{selectionData:i,model:r}=e.detail,a=this.loadedLayer&&r?.layer?.id===this.loadedLayer.id;if((this.syncSelection||this.syncChartsSelection)&&a&&t.target!==this.el&&(!ea(i.selectionOIDs,this.selectionData?.selectionOIDs)||!ea(i.selectionFilters,this.selectionData?.selectionFilters)))if(i.selectionOIDs||i.selectionFilters?.[0]){this.selectionData={selectionOIDs:i.selectionOIDs,selectionFilters:i.selectionFilters,selectionSource:Ti.ProgrammaticSelection};let n=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisSelectionComplete.emit({selectionData:this.selectionData,model:n})}else this.clearSelection()}}_configPanelNumberChange(t){let e=t,{panelNumber:i,modelList:r}=e.detail;this._actionBarElement&&(this.enableConfiguration||this.configurationEnabled)&&this._ourModelExistsIn(r)&&(this._actionBarElement.editChartToggle=i===1?wb.Active:wb.Inactive)}_configDataChangeError(t){let e=t,{error:i,model:r}=e.detail;(this.enableConfiguration||this.configurationEnabled)&&Pr(this.internalModel)&&r?.isSameChartAs(this.internalModel)&&this.notify(i.message)}_modelConfigChange(t){let e=t,{config:i,setterName:r}=e.detail,a=this.internalModel?.recall();JSON.stringify(a)!==JSON.stringify(i)&&this.requestUpdate("config",a),this.arcgisConfigChange.emit({newConfig:i,oldConfig:a,functionCalled:r}),this._actionBarElement&&!xl(i)&&(this._actionBarElement.forceDisableActions=!1)}_modelDataChange(){this.setTimeBinningInfoWhenNotProvided&&Rb(this.internalModel)&&this.internalModel?.resetTimeInterval()}_actionBarSlotRef(t){this._actionBarElement=t&&"assignedElements"in t?t.assignedElements().find(e=>e.tagName.toLowerCase()==="arcgis-charts-action-bar"):void 0}_checkForInvalidContainer(){this._chartRef.value||tv("divNode",this._commonStrings?.errorStrings)}_handleRenderingComplete(t){this.arcgisRenderingComplete.emit(t.detail),this.showLoader=!1}_handleLegendItemVisibilityChanged(t){if(this.internalModel){let i=Wi(this.internalModel?.config);GC(t,i),this.internalModel.config=i}let e=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisLegendItemVisibilityChange.emit({legendItemVisibility:t.detail,model:e})}_handleUpdateCompleted(t){if(this.enableConfiguration||this.configurationEnabled){let e=this._commonStrings?.errorStrings.notifications;if(this.placeholder===void 0){let i=this.internalModel?.config;if(t.schemaErrors.length>0&&!xl(i))this.notify(e?.invalidConfig,void 0);else if(t.customErrors.length>0&&!xl(i)){let r=t.customErrors.find(a=>a.keyword===Zu.LayerFieldsNotFound);if(ss(this.loadedLayer)&&r){let a=Fu(e?.invalidConfigForRaster??"",{errorMessage:r.message});this.notify(a,e?.invalidConfigTitle)}else this.notify(e?.invalidConfig,void 0)}else t.warnings.length>0&&t.warnings.some(r=>r.keyword===QC.NonNumericAggregation)&&this.notify(e?.validateAggregationTypeMsg,e?.missingNumericFields)}if((uP(this.internalModel)||cP(this.internalModel)||Mb(this.internalModel)||dP(this.internalModel))&&this.internalModel.aggregationType===Ha.NoAggregation&&this.internalModel.numericFields.length===1&&this.loadedLayer){let i=bl(this.loadedLayer).idField;i&&this.internalModel.numericFields.includes(i)&&this.notify(e?.noAggregationRequiresNumericFields,e?.missingNumericFields)}}this.showLoader&&(this.showLoader=!1),this.arcgisUpdateComplete.emit(t)}_handleInvalidConfigWarningRaise(t){this.arcgisInvalidConfigWarningRaise.emit(t.detail),this.notify(t.detail.message,t.detail.header)}_handleSeriesColorsChange(t){let e=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisSeriesColorChange.emit({data:t.detail.data,colorMatchApplied:t.detail.colorMatchApplied,model:e})}_handleSelection(t){let e={...t.detail};this._unsanitizedSelectionDataItems=e.selectionItems;let i={...e},r=Wi(e.selectionItems);if(r){let a=this.internalModel?.config;r=yw(r,a?.series),r=r.map(vw),r=gw(r,a?.series),i.selectionItems=r}if(!ea(i,this.selectionData)){this.selectionData=i;let a=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisSelectionComplete.emit({selectionData:i,model:a})}}_handleTooManySelectedElements(){this.errorPolicy===Vd.Throw&&(this._infoModalHeading=this._commonStrings?.errorStrings.tooManySelectedElements?.title,this.infoModalMessage=this._commonStrings?.errorStrings.tooManySelectedElements?.message,this._notifyOptions={kind:"warning",autoClose:!0,duration:"fast",active:!0})}_handleAlertClosed(t){t.target===this.el&&(this._notifyHeading=void 0,this.notifyMessage=void 0)}_handleAxesMinMaxChange(t){let e=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisAxesMinMaxChange.emit({bounds:t.detail,model:e})}_handleSeriesOrder(t){this.arcgisSeriesOrder.emit(t.detail)}_internalModelChange(){if(this._addModelListeners(),this.enableBetaFeatures===void 0){let t=Ie(this.internalModel?.config?.series);this.enableBetaFeatures=t===M.ScatterSeries||t===M.HistogramSeries}this.internalModel?.asyncUpdatesPromise.then(()=>{typeof this._resolveModelSetup=="function"&&this._resolveModelSetup(),this.internalModel&&(this.internalModel.config=this.internalModel.config)})}_selectionDataChange(){this.loadedLayer!==void 0&&(this.syncViewSelection||this.syncSelectionsBetweenChartAndLayerViewPolicy===rc.Enabled)&&this.view!==void 0&&this._setSelectionInSelectionManager()}async _viewChange(t,e){this._setViewTimeExtentChangeWatchHandler(),this._setViewTimeZoneWatchHandler(),e!==void 0&&t===void 0&&await this.refresh(),this.view?this._setViewSelectionsChangeWatchHandler():this._removeViewSelectionsChangeWatchHandler()}_featureIndexChange(t,e){e===void 0&&typeof t=="number"&&this.forceDataUpdateTick++}_rotatedChange(t){if(t!==void 0&&this.internalModel){let e=iP(t,Wi(this.internalModel.config));this.internalModel.config=e}}_legendPositionChange(t){if(t!==void 0&&this.internalModel){let e=eP(t,Wi(this.internalModel.config));this.internalModel.config=e}}_legendVisibilityChange(t){if(t!==void 0&&this.internalModel){let e=tP(t,Wi(this.internalModel.config));this.internalModel.config=e}}_filterBySelectionChanged(){if(this.internalModel){this.setTimeBinningInfoWhenNotProvided&&Rb(this.internalModel)&&this.internalModel.resetTimeInterval();let t=rP(Wi(this.internalModel.config));this.internalModel.config=t}}_addConfigListeners(){this.listenOn(document,"arcgisChartsConfigPanelNumberChange",this._configPanelNumberChange),this.listenOn(document,"arcgisChartsConfigDataChangeError",this._configDataChangeError)}_getSelectionFromSelectionManager(){let t;return(this.view||this.selectionManager)&&this.loadedLayer&&!ss(this.loadedLayer)&&(t=(this.selectionManager??this.view?.selectionManager)?.getSelection(this.loadedLayer)),t}_setSelectionInSelectionManager(){let t=this.selectionManager??this.view?.selectionManager;if(this.loadedLayer&&t&&!ss(this.loadedLayer)&&(this.syncViewSelection||this.syncSelectionsBetweenChartAndLayerViewPolicy===rc.Enabled)){let e,i=this.selectionData?.selectionOIDs?.length===0||this.selectionData?.selectionOIDs===void 0||this.selectionData?.selectionSource===Ti.ClearSelection,r=(this.selectionData?.selectionOIDs?.length??0)>0;i?e=[]:r&&this.selectionData&&(e=this.selectionData.selectionOIDs),e&&t.replace(this.loadedLayer,e)}}_addModelListeners(){this.listenOn(this.internalModel??null,"arcgisChartsModelConfigChange",this._modelConfigChange),this.listenOn(this.internalModel??null,"arcgisChartsModelDataChange",this._modelDataChange)}_setViewTimeZoneWatchHandler(){this._watchHandlersController.setViewTimeZoneWatchHandler()}_setViewTimeExtentChangeWatchHandler(){this._watchHandlersController.setViewTimeExtentChangeWatchHandler()}_setViewSelectionsChangeWatchHandler(){this._watchHandlersController.setViewSelectionsChangeWatchHandler()}_setSelectionManagerChangeWatchHandler(){this._watchHandlersController.setSelectionManagerChangeWatchHandler()}_removeLayerWatchHandlers(){this._watchHandlersController.removeLayerWatchHandlers()}_removeViewWatchHandlers(){this._watchHandlersController.removeViewWatchHandlers()}_removeViewSelectionsChangeWatchHandler(){this._watchHandlersController.removeViewSelectionsChangeWatchHandler()}_removeSelectionManagerChangeWatchHandler(){this._watchHandlersController.removeSelectionManagerChangeWatchHandler()}async _createModelFromLayer(t,e){if(t){let i=e??0,r="charts"in t?t?.charts?.[i]:void 0;if(r)this.internalModel=await pP({layer:t,config:r,commonStrings:this._commonStrings});else{let a=Fu(this._messages?.chartNotFoundWarning??"",{chartIndex:i.toString(),layerTitle:t.title});this.arcgisChartNotFoundWarning.emit(a),AC("warn",this,a)}}}_applyPlaceholderForPartialConfig(t){let e=Mb(this.internalModel)?M.ComboLineAndBarSeries:Ie(t?.series),i=CU(e,this._commonStrings?.errorStrings);this.notify(i)}_checkForIncompatibleChartVersion(){let t=this.internalModel?.config?.version;this.errorPolicy===Vd.Throw&&$w(t).versionStatus===VC.Newer&&(this._notifyHeading=this._commonStrings?.errorStrings.incompatibleChartVersion?.title,this.notifyMessage=this._commonStrings?.errorStrings.incompatibleChartVersion?.message?Fu(this._commonStrings?.errorStrings.incompatibleChartVersion?.message,{chartVersion:t??""}):"",this._notifyOptions={kind:"warning",autoClose:!0,active:!0})}_ourModelExistsIn(t){return t.some(e=>Pr(this.internalModel)&&this.internalModel?.isSameChartAs(e))}_gatherComponentGlobalOptions(){return{queueChartCreation:this.queueChartCreation,skipChartCreationQueue:this.skipChartCreationQueue,hideLicenseWatermark:this.hideLicenseWatermark,showLicenseWatermark:this.showLicenseWatermark,enableResponsiveFeatures:this.enableResponsiveFeatures,autoDisposeChart:this.autoDisposeChart,animationEnabled:this.animationEnabled||this.useAnimatedCharts}}_addMutationObserverForCalciteTheme(){RC(this.el,["class"],()=>{let t=kv(this.el);t!==this._calciteThemeApplied&&(this._calciteThemeApplied=t,this.refresh({updateData:!1}))})}_gatherComponentOptions(t=!0){let e=this.filterByExtent||this.filterByViewExtent,i=this.internalModel?.config,r=Ie(i?.series),a=e||r!==M.HistogramSeries?this.view:void 0;return{layer:this.loadedQueryObject,view:a,viewExtentUpdated:t&&e&&(this.view!==void 0||kh(this.loadedQueryObject)),ignoreViewExtent:this.ignoreViewExtent,chartLimits:this.chartLimits,guideTooltipFormatter:this.guideTooltipFormatter,xAxisLabelFormatter:this.xAxisLabelFormatter,yAxisLabelFormatter:this.yAxisLabelFormatter,secondaryYAxisLabelFormatter:this.secondaryYAxisLabelFormatter,tooltipFormatter:this.tooltipFormatter,dataLabelFormatter:this.dataLabelFormatter,selectionData:this.selectionData,filterBySelection:this.filterBySelection,actionMode:this.actionMode,cursorRange:this.cursorRange,selectionTheme:this.selectionTheme,setTimeBinningInfoWhenNotProvided:this.setTimeBinningInfoWhenNotProvided,returnSelectionOIDs:ss(this.loadedLayer)?!1:this.returnSelectionOIDs,returnSelectionIndexes:this.returnSelectionIndexes,hideEmptySeries:this.hideEmptySeries,autoInverseDataLabelTextColor:this.autoInverseDataLabelTextColor,replaceNoValueCategoryWithZero:this.replaceNoValueCategoryWithZero,gaugeInnerLabelFormatter:this.gaugeInnerLabelFormatter,ignoreSmoothRenderingLimit:this.ignoreSmoothRenderingLimit,pieChartLegendValueLabelFormatter:this.legendValueLabelFormatter,interactionsDisabled:this.interactionsDisabled||this.disableInteractions,togglingLegendItemsDisabled:this.togglingLegendItemsDisabled||this.disableTogglingLegendItems,popupTemplateFieldInfosEnabled:this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled}}_raiseLogScaleNotCompatibleWarning(t,e){let i=!0;return this.internalModel?.config?.axes?.forEach((r,a)=>{rm({chartConfig:this.internalModel?.config,axisConfigIndex:a,chartData:Xa(e?.data??this._sanitizedChartData)})||(i=!1,this._raiseInvalidDataWarning({invalidType:a===0?Ro.NegativeValueInXAxisLogScale:Ro.NegativeValueInYAxisLogScale,queryObject:t}))}),i}_raiseNoDataWarning(t){let{dataInfo:e,config:i,queryObject:r}=t,a=!1;if(e?.data){let n=Xa(e.data),o=Ro.EmptyDataSet;fw({chartConfig:i,nullAsValid:this.nullAsValid,zeroCountAsValid:this.zeroCountAsValid,dataSet:n})&&(kd(this.internalModel?.config)&&tm(this.internalModel?.config)&&e.count&&e.count>0&&(o=Ro.NoValue),a=!0,this._raiseInvalidDataWarning({invalidType:o,elementCount:e.count,queryObject:r}))}return a}_raiseInvalidDataWarning(t){let{invalidType:e,elementCount:i,queryObject:r}=t,a=this.internalModel?.config,n=a!==void 0&&hm({seriesConfig:a.series[0],xAxisValueFormatType:qC(a),queryObject:r}),o=kd(a)&&tm(a),l=hw({invalidType:e,elementCount:i,seriesCount:a?.series?.length,chartLimits:this.chartLimits,filterBySelection:this.filterBySelection,queryObject:r,formatLocale:tc(this.el),isTemporalChart:n,isByFeatureGauge:o,errorStrings:this._commonStrings?.errorStrings});(l.keyword!==Ro.EmptyDataSet||this.infoModalMessage===void 0||l.keyword===Ro.EmptyDataSet&&o)&&(this.arcgisBadDataWarningRaise.emit(l),this.notify(l.message,l.header))}_processInvalidConfigStatus(t,e){if(this.enableConfiguration||this.configurationEnabled)this._handleUpdateCompleted(t);else{this.showLoader=!1;let{title:i,message:r}=SU({chartConfig:e,createMessage:this.placeholder,status:t,errorStrings:this._commonStrings?.errorStrings});this.arcgisInvalidConfigWarningRaise.emit({keyword:Ro.InvalidConfig,header:i,message:r}),this.notify(r,i)}}async _createChartInstance(t=!0){if(this.internalModel?.config)try{this._addMutationObserverForCalciteTheme(),await this._renderChart(),t&&this._chart&&(this._setViewTimeExtentChangeWatchHandler(),this._setViewTimeZoneWatchHandler(),this._setViewSelectionsChangeWatchHandler(),this._setSelectionManagerChangeWatchHandler())}catch(e){this._handleRuntimeError(e),this._chart?.dispose(),this._chart=void 0}}_notifyDataProcessComplete(t){let e=this.internalModel?.config;if(t&&e){let i=sm({data:t,seriesConfig:e.series});if(i){this._sanitizedChartData=i;let r=Pr(this.internalModel)?this.internalModel:void 0;this.arcgisDataProcessComplete.emit({chartData:i,model:r})}}}_notifyDataFetchComplete(t){let e=this.internalModel?.config;if(t&&"dataItems"in t&&e&&Ie(e?.series)===M.PieSeries){let i=Wi(t);i.dataItems=WN(i.dataItems,e),this.arcgisDataFetchComplete.emit(i)}}async _renderChart(){let t=this.internalModel?.config;if(xl(t))this._applyPlaceholderForPartialConfig(t);else if(t){let e=this._chart===void 0;this._checkForInvalidContainer(),e&&this._checkForIncompatibleChartVersion();let i=await this._loadQueryObject.taskComplete;if(i){let r=this._gatherComponentOptions(),a=Ws(i,this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled),n=await this._checkIfDataUpdateIsNeeded.taskComplete,{dataUpdateDetails:o}=n,l=n.dataUpdateNeeded,h=await this._prepareConfigForRendering.taskComplete,u=h?.alteredConfig?{...h.alteredConfig}:void 0,c=this._lastRenderedProps?.chartConfig;if(o?.common&&c?.series&&u?.series&&(o.common.numberOfSeriesChanged=Lw(c.series,u.series)),!u&&!this.loadedLayer||Cb(u,this.loadedLayer)&&await this._isChartSupportedByDataSource.taskComplete){let d=await this._validateWebChart.taskComplete;if(!d.valid)this._processInvalidConfigStatus(d,u);else if(u){await this._loadLayerView.taskComplete;let p=await this._getData.taskComplete,f=p.dataInfo??{valid:!0,data:this._processedChartData??this._sanitizedChartData},m=p.dataWasUpdated;if(Ie(u.series)===M.PieSeries){let g=Uk({creation:e,previousConfig:c,newConfig:u,dataInfo:f,dataUpdateNeeded:m,utilsStrings:this._commonStrings.utilsStrings});m=m||g}if(!f.valid)this._raiseInvalidDataWarning({invalidType:f.invalidType,elementCount:f.count,queryObject:i});else{if(Ie(u.series)===M.PieSeries){let v=Uk({creation:e,previousConfig:c,newConfig:u,dataInfo:f,dataUpdateNeeded:m,utilsStrings:this._commonStrings.utilsStrings});m=m||v}let g,y=Wi(u);if({filteredConfig:u,seriesFilteredOut:g}=nP({showEmptySeries:this.showEmptySeries??this.hideEmptySeries===!1,config:u,data:f?.data}),this._getData.status===dm.COMPLETE&&!this._raiseNoDataWarning({dataInfo:f,config:u,queryObject:i})&&this._raiseLogScaleNotCompatibleWarning(i,f)){let v=Rd({oldConfig:g?y:c,newConfig:u,dataWasUpdated:m});v&&uw({alteredConfig:u,dataInfo:f,fieldList:a,options:r,queryObject:i}),um(c,u)&&(m=!0);let b=Vo(u)?u.showMean:void 0,x=f?.data??this._sanitizedChartData,_=x&&b&&"meanLines"in x?x.meanLines:Xa(x);_&&(e||m)&&({colorMatchApplied:this._colorMatchApplied,rendererFieldNames:this._rendererFieldNames}=await rb({data:_,queryObject:i,chartConfig:u,allowColorMatch:hb({chartConfig:u,queryObject:i})})),this._calciteThemeColors&&(u=OU(u,this._calciteThemeColors),this._calciteThemeApplied=kv(this.el));let w=!1,C;if(u.series[0].type===M.PieSeries){let D=Xa(this._processedChartData),$=Xa(f.data);w=UA(D,$),C=YA({creation:e,dataInfo:f,pieChartDataActuallyChanged:w,chartConfig:u,previousConfig:c,queryObject:i,popupTemplateFieldInfosEnabled:this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled,utilsStrings:this._commonStrings.utilsStrings})}let P=await LN({creation:e,dataInfo:f,pieChartDataActuallyChanged:w,chartConfig:u,previousConfig:c,pieSlicesSymbols:C,queryObject:i,chartWillRenderCallback:this.chartWillRender,popupTemplateFieldInfosEnabled:this.popupTemplateFieldInfosEnabled,utilsStrings:this._commonStrings?.utilsStrings});if(P?.changesApplied&&(d=await Sb({input:P?.alteredConfig,queryObject:i,allowUsingObjectIdStat:this.allowUsingObjectIdStat,errorStrings:this._commonStrings?.errorStrings}),d.valid&&(u=P.alteredConfig,C=P.alteredPieSlicesSymbols,this._colorMatchApplied=P.colorMatchApplied,this._rendererFieldNames=P.rendererFieldNames)),u.series[0]?.type===M.PieSeries&&f.data&&"dataItems"in f.data&&HN({data:f.data.dataItems,newChartConfig:u,pieSlicesSymbols:C,fieldList:a}),this._processedChartData=Wi(f.data),!d.valid)this._processInvalidConfigStatus(d,u);else{if((l||v)&&(this._notifyDataProcessComplete(f.data),this._notifyDataFetchComplete(f.data)),!this.filterBySelection&&!o?.common?.filterBySelectionChanged&&!ss(i)){let T=Fb({runtimeDataFilters:this.runtimeDataFilters,view:this.view,viewTimeExtentChangePolicy:this.viewTimeExtentChangePolicy,syncViewTimeExtent:this.syncViewTimeExtent}),I=this._lastRenderedProps?.options?.selectionData,N=this.selectionData?.selectionSource!==Ti.SelectionByClick&&this.selectionData?.selectionSource!==Ti.SelectionByRange&&!ea(I?.selectionOIDs,this.selectionData?.selectionOIDs),B=await bw({chartConfig:u,chartData:this._processedChartData,dataWasUpdated:l,queryObject:i,selectionData:this.selectionData,replaceNoValueCategoryWithZero:this.replaceNoValueCategoryWithZero,hideZeroCountCategories:this.hideZeroCountCategories,chartLimits:this.chartLimits,setTimeBinningInfoWhenNotProvided:this.setTimeBinningInfoWhenNotProvided,returnFeaturesExtent:this.returnFeaturesExtent,popupTemplateFieldInfosEnabled:this.popupTemplateFieldInfosEnabled,view:r?.view,viewExtentUpdated:r?.viewExtentUpdated,returnSelectionOIDs:r?.returnSelectionOIDs,runtimeDataFilters:T,ignoreViewExtent:r?.ignoreViewExtent,errorStrings:this._commonStrings?.errorStrings,selectionIDsChanged:N});B&&r&&(r.selectionData={...this.selectionData,selectionItems:B})}this._hideInfoModal();let{t9nLocale:D}=Sh(this._chartRef.value??document.documentElement),$=await YU(D,this._useAmCharts5());kd(u)&&IN({chartConfig:u,chartData:f.data});let A={chartConfig:u,options:r,globalOptions:this._gatherComponentGlobalOptions(),dataUpdateDetails:o,configWithAllSeries:y,dataWasUpdated:m,chartContainer:this._chartRef.value,queryObject:i,dataInfo:f,colorMatchApplied:this._colorMatchApplied,rendererFieldNames:this._rendererFieldNames,pieSlicesSymbols:C,hasSeriesFilteredOut:g,uniqueInternalID:this.el.id,t9nStrings:{errorStrings:this._commonStrings?.errorStrings,utilsStrings:this._commonStrings?.utilsStrings,amChartsStrings:$},dataUpdateNeededProps:{forceDataUpdateTick:this.forceDataUpdateTick,runtimeDataFilters:this.runtimeDataFilters,returnFeaturesExtent:this.returnFeaturesExtent,chartLimits:this.chartLimits,updateSplitBySeries:this.updateSplitBySeries},extraProps:{layer:this.loadedQueryObject,filterBySelection:this.filterBySelection,filterByExtent:this.filterByExtent,filterByViewExtent:this.filterByViewExtent}};if(this.showLoader||(this.showLoader=!0),e){let T=this._useAmCharts5()?_U:VW;this._chart=T(A)}else this._chart?.update(A),this._handleUpdateCompleted(d);this._lastRenderedProps=A,await this._generateHeatChartClassBreaks(f)}}}}}}}}render(){this._calciteThemeColors=wU(this.el,this.calciteThemingCSSVariables);let t=this.notifyMessage?UU({heading:this._notifyHeading,message:this.notifyMessage,options:this._notifyOptions}):null,e=this.infoModalMessage!==void 0&&this.showUIMessages!==!1&&!this.hideUIMessages||this.showLoader,i=this.notifyMessage&&this._notifyOptions?.kind==="danger"||e,r={[Sa.ChartWrapper]:!0,[Sa.Hide]:i,[Sa.Show]:!i,[Sa.Chart]:!i},a={[Sa.ChartContainer]:!0,[Sa.Hide]:i,[Sa.Show]:!i,[Sa.Chart]:!i,[Sa.DisableInteractions]:this.interactionsDisabled||this.disableInteractions},n=this.notifyMessage!==void 0?{[Sa.NotifyPanel]:!0,[Sa.Show]:!0}:{[Sa.Hide]:!0};return Gu`<slot name=${Gw.actionBar} @slotchange=${o=>{this._actionBarElement=gP(o,this.el,this.internalModel?.config)}} ${Dv(this._actionBarSlotRef)}></slot>${e?Gu`<arcgis-charts-info-modal .heading=${this._infoModalHeading} .message=${this.infoModalMessage} .showLoader=${this.showLoader} .loaderColors=${this.loaderColors} .calciteThemeColors=${this._calciteThemeColors}></arcgis-charts-info-modal>`:null}<div class=${Of(r)}><div class=${Of(a)} ${Dv(this._chartRef)}></div></div><div class=${Of(n)}>${t}</div>`}};MC("arcgis-chart",BS);return BS},"core/reactiveUtils","intl","layers/Layer","portal/PortalItem",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o)
|