towerops/vendor/oban_web/priv/static/app.js

187 lines
338 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(()=>{var Qw=Object.create;var Co=Object.defineProperty;var t1=Object.getOwnPropertyDescriptor;var e1=Object.getOwnPropertyNames;var n1=Object.getPrototypeOf,i1=Object.prototype.hasOwnProperty;var r1=(e,t,n)=>t in e?Co(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Yn=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,n)=>(typeof require!="undefined"?require:t)[n]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var p=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var s1=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of e1(t))!i1.call(e,r)&&r!==n&&Co(e,r,{get:()=>t[r],enumerable:!(i=t1(t,r))||i.enumerable});return e};var Ec=(e,t,n)=>(n=e!=null?Qw(n1(e)):{},s1(t||!e||!e.__esModule?Co(n,"default",{value:e,enumerable:!0}):n,e));var F=(e,t,n)=>(r1(e,typeof t!="symbol"?t+"":t,n),n);var Cc=p((Oc,Zr)=>{(function(e,t){"use strict";(function(){for(var u=0,d=["ms","moz","webkit","o"],h=0;h<d.length&&!e.requestAnimationFrame;++h)e.requestAnimationFrame=e[d[h]+"RequestAnimationFrame"],e.cancelAnimationFrame=e[d[h]+"CancelAnimationFrame"]||e[d[h]+"CancelRequestAnimationFrame"];e.requestAnimationFrame||(e.requestAnimationFrame=function(f,g){var m=new Date().getTime(),b=Math.max(0,16-(m-u)),y=e.setTimeout(function(){f(m+b)},b);return u=m+b,y}),e.cancelAnimationFrame||(e.cancelAnimationFrame=function(f){clearTimeout(f)})})();function n(){i.width=e.innerWidth,i.height=5*l.barThickness;var u=i.getContext("2d");u.shadowBlur=l.shadowBlur,u.shadowColor=l.shadowColor;var d,h=u.createLinearGradient(0,0,i.width,0);for(d in l.barColors)h.addColorStop(d,l.barColors[d]);u.lineWidth=l.barThickness,u.beginPath(),u.moveTo(0,l.barThickness/2),u.lineTo(Math.ceil(o*i.width),l.barThickness/2),u.strokeStyle=h,u.stroke()}var i,r,s,o,a,l={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},c={config:function(u){for(var d in u)l.hasOwnProperty(d)&&(l[d]=u[d])},show:function(){var u,d,h;a||(a=!0,s!==null&&e.cancelAnimationFrame(s),i||((h=(i=t.createElement("canvas")).style).position="fixed",h.top=h.left=h.right=h.margin=h.padding=0,h.zIndex=100001,h.display="none",l.className&&i.classList.add(l.className),t.body.appendChild(i),u="resize",d=n,(h=e).addEventListener?h.addEventListener(u,d,!1):h.attachEvent?h.attachEvent("on"+u,d):h["on"+u]=d),i.style.opacity=1,i.style.display="block",c.progress(0),l.autoRun&&function f(){r=e.requestAnimationFrame(f),c.progress("+"+.05*Math.pow(1-Math.sqrt(o),2))}())},progress:function(u){return u===void 0||(typeof u=="string"&&(u=(0<=u.indexOf("+")||0<=u.indexOf("-")?o:0)+parseFloat(u)),o=1<u?1:u,n()),o},hide:function(){a&&(a=!1,r!=null&&(e.cancelAnimationFrame(r),r=null),function u(){return 1<=c.progress("+.1")&&(i.style.opacity-=.05,i.style.opacity<=.05)?(i.style.display="none",void(s=null)):void(s=e.requestAnimationFrame(u))}())}};typeof Zr=="object"&&typeof Zr.exports=="object"?Zr.exports=c:typeof define=="function"&&define.amd?define(function(){return c}):this.topbar=c}).call(Oc,window,document)});var Gh=p((jU,Yh)=>{function TO(){this.__data__=[],this.size=0}Yh.exports=TO});var In=p(($U,Xh)=>{function AO(e,t){return e===t||e!==e&&t!==t}Xh.exports=AO});var hr=p((WU,Kh)=>{var PO=In();function LO(e,t){for(var n=e.length;n--;)if(PO(e[n][0],t))return n;return-1}Kh.exports=LO});var Jh=p((VU,Zh)=>{var DO=hr(),qO=Array.prototype,IO=qO.splice;function RO(e){var t=this.__data__,n=DO(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():IO.call(t,n,1),--this.size,!0}Zh.exports=RO});var tf=p((HU,Qh)=>{var NO=hr();function FO(e){var t=this.__data__,n=NO(t,e);return n<0?void 0:t[n][1]}Qh.exports=FO});var nf=p((UU,ef)=>{var BO=hr();function zO(e){return BO(this.__data__,e)>-1}ef.exports=zO});var sf=p((YU,rf)=>{var jO=hr();function $O(e,t){var n=this.__data__,i=jO(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}rf.exports=$O});var fr=p((GU,of)=>{var WO=Gh(),VO=Jh(),HO=tf(),UO=nf(),YO=sf();function bi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}bi.prototype.clear=WO;bi.prototype.delete=VO;bi.prototype.get=HO;bi.prototype.has=UO;bi.prototype.set=YO;of.exports=bi});var lf=p((XU,af)=>{var GO=fr();function XO(){this.__data__=new GO,this.size=0}af.exports=XO});var uf=p((KU,cf)=>{function KO(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}cf.exports=KO});var hf=p((ZU,df)=>{function ZO(e){return this.__data__.get(e)}df.exports=ZO});var pf=p((JU,ff)=>{function JO(e){return this.__data__.has(e)}ff.exports=JO});var Ja=p((QU,gf)=>{var QO=typeof global=="object"&&global&&global.Object===Object&&global;gf.exports=QO});var ee=p((t9,mf)=>{var tC=Ja(),eC=typeof self=="object"&&self&&self.Object===Object&&self,nC=tC||eC||Function("return this")();mf.exports=nC});var Rn=p((e9,bf)=>{var iC=ee(),rC=iC.Symbol;bf.exports=rC});var _f=p((n9,xf)=>{var vf=Rn(),yf=Object.prototype,sC=yf.hasOwnProperty,oC=yf.toString,pr=vf?vf.toStringTag:void 0;function aC(e){var t=sC.call(e,pr),n=e[pr];try{e[pr]=void 0;var i=!0}catch{}var r=oC.call(e);return i&&(t?e[pr]=n:delete e[pr]),r}xf.exports=aC});var kf=p((i9,wf)=>{var lC=Object.prototype,cC=lC.toString;function uC(e){return cC.call(e)}wf.exports=uC});var sn=p((r9,Ef)=>{var Sf=Rn(),dC=_f(),hC=kf(),fC="[object Null]",pC="[object Undefined]",Mf=Sf?Sf.toStringTag:void 0;function gC(e){return e==null?e===void 0?pC:fC:Mf&&Mf in Object(e)?dC(e):hC(e)}Ef.exports=gC});var $t=p((s9,Of)=>{function mC(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}Of.exports=mC});var vi=p((o9,Cf)=>{var bC=sn(),vC=$t(),yC="[object AsyncFunction]",xC="[object Function]",_C="[object GeneratorFunction]",wC="[object Proxy]";function kC(e){if(!vC(e))return!1;var t=bC(e);return t==xC||t==_C||t==yC||t==wC}Cf.exports=kC});var Af=p((a9,Tf)=>{var SC=ee(),MC=SC["__core-js_shared__"];Tf.exports=MC});var Df=p((l9,Lf)=>{var Qa=Af(),Pf=function(){var e=/[^.]+$/.exec(Qa&&Qa.keys&&Qa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function EC(e){return!!Pf&&Pf in e}Lf.exports=EC});var tl=p((c9,qf)=>{var OC=Function.prototype,CC=OC.toString;function TC(e){if(e!=null){try{return CC.call(e)}catch{}try{return e+""}catch{}}return""}qf.exports=TC});var Rf=p((u9,If)=>{var AC=vi(),PC=Df(),LC=$t(),DC=tl(),qC=/[\\^$.*+?()[\]{}|]/g,IC=/^\[object .+?Constructor\]$/,RC=Function.prototype,NC=Object.prototype,FC=RC.toString,BC=NC.hasOwnProperty,zC=RegExp("^"+FC.call(BC).replace(qC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jC(e){if(!LC(e)||PC(e))return!1;var t=AC(e)?zC:IC;return t.test(DC(e))}If.exports=jC});var Ff=p((d9,Nf)=>{function $C(e,t){return e?.[t]}Nf.exports=$C});var on=p((h9,Bf)=>{var WC=Rf(),VC=Ff();function HC(e,t){var n=VC(e,t);return WC(n)?n:void 0}Bf.exports=HC});var Us=p((f9,zf)=>{var UC=on(),YC=ee(),GC=UC(YC,"Map");zf.exports=GC});var gr=p((p9,jf)=>{var XC=on(),KC=XC(Object,"create");jf.exports=KC});var Vf=p((g9,Wf)=>{var $f=gr();function ZC(){this.__data__=$f?$f(null):{},this.size=0}Wf.exports=ZC});var Uf=p((m9,Hf)=>{function JC(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}Hf.exports=JC});var Gf=p((b9,Yf)=>{var QC=gr(),tT="__lodash_hash_undefined__",eT=Object.prototype,nT=eT.hasOwnProperty;function iT(e){var t=this.__data__;if(QC){var n=t[e];return n===tT?void 0:n}return nT.call(t,e)?t[e]:void 0}Yf.exports=iT});var Kf=p((v9,Xf)=>{var rT=gr(),sT=Object.prototype,oT=sT.hasOwnProperty;function aT(e){var t=this.__data__;return rT?t[e]!==void 0:oT.call(t,e)}Xf.exports=aT});var Jf=p((y9,Zf)=>{var lT=gr(),cT="__lodash_hash_undefined__";function uT(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=lT&&t===void 0?cT:t,this}Zf.exports=uT});var tp=p((x9,Qf)=>{var dT=Vf(),hT=Uf(),fT=Gf(),pT=Kf(),gT=Jf();function yi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}yi.prototype.clear=dT;yi.prototype.delete=hT;yi.prototype.get=fT;yi.prototype.has=pT;yi.prototype.set=gT;Qf.exports=yi});var ip=p((_9,np)=>{var ep=tp(),mT=fr(),bT=Us();function vT(){this.size=0,this.__data__={hash:new ep,map:new(bT||mT),string:new ep}}np.exports=vT});var sp=p((w9,rp)=>{function yT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}rp.exports=yT});var mr=p((k9,op)=>{var xT=sp();function _T(e,t){var n=e.__data__;return xT(t)?n[typeof t=="string"?"string":"hash"]:n.map}op.exports=_T});var lp=p((S9,ap)=>{var wT=mr();function kT(e){var t=wT(this,e).delete(e);return this.size-=t?1:0,t}ap.exports=kT});var up=p((M9,cp)=>{var ST=mr();function MT(e){return ST(this,e).get(e)}cp.exports=MT});var hp=p((E9,dp)=>{var ET=mr();function OT(e){return ET(this,e).has(e)}dp.exports=OT});var pp=p((O9,fp)=>{var CT=mr();function TT(e,t){var n=CT(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}fp.exports=TT});var Ys=p((C9,gp)=>{var AT=ip(),PT=lp(),LT=up(),DT=hp(),qT=pp();function xi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}xi.prototype.clear=AT;xi.prototype.delete=PT;xi.prototype.get=LT;xi.prototype.has=DT;xi.prototype.set=qT;gp.exports=xi});var bp=p((T9,mp)=>{var IT=fr(),RT=Us(),NT=Ys(),FT=200;function BT(e,t){var n=this.__data__;if(n instanceof IT){var i=n.__data__;if(!RT||i.length<FT-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new NT(i)}return n.set(e,t),this.size=n.size,this}mp.exports=BT});var br=p((A9,vp)=>{var zT=fr(),jT=lf(),$T=uf(),WT=hf(),VT=pf(),HT=bp();function _i(e){var t=this.__data__=new zT(e);this.size=t.size}_i.prototype.clear=jT;_i.prototype.delete=$T;_i.prototype.get=WT;_i.prototype.has=VT;_i.prototype.set=HT;vp.exports=_i});var Gs=p((P9,yp)=>{function UT(e,t){for(var n=-1,i=e==null?0:e.length;++n<i&&t(e[n],n,e)!==!1;);return e}yp.exports=UT});var el=p((L9,xp)=>{var YT=on(),GT=function(){try{var e=YT(Object,"defineProperty");return e({},"",{}),e}catch{}}();xp.exports=GT});var vr=p((D9,wp)=>{var _p=el();function XT(e,t,n){t=="__proto__"&&_p?_p(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}wp.exports=XT});var yr=p((q9,kp)=>{var KT=vr(),ZT=In(),JT=Object.prototype,QT=JT.hasOwnProperty;function tA(e,t,n){var i=e[t];(!(QT.call(e,t)&&ZT(i,n))||n===void 0&&!(t in e))&&KT(e,t,n)}kp.exports=tA});var wi=p((I9,Sp)=>{var eA=yr(),nA=vr();function iA(e,t,n,i){var r=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=i?i(n[a],e[a],a,n,e):void 0;l===void 0&&(l=e[a]),r?nA(n,a,l):eA(n,a,l)}return n}Sp.exports=iA});var Ep=p((R9,Mp)=>{function rA(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}Mp.exports=rA});var de=p((N9,Op)=>{function sA(e){return e!=null&&typeof e=="object"}Op.exports=sA});var Tp=p((F9,Cp)=>{var oA=sn(),aA=de(),lA="[object Arguments]";function cA(e){return aA(e)&&oA(e)==lA}Cp.exports=cA});var ki=p((B9,Lp)=>{var Ap=Tp(),uA=de(),Pp=Object.prototype,dA=Pp.hasOwnProperty,hA=Pp.propertyIsEnumerable,fA=Ap(function(){return arguments}())?Ap:function(e){return uA(e)&&dA.call(e,"callee")&&!hA.call(e,"callee")};Lp.exports=fA});var pt=p((z9,Dp)=>{var pA=Array.isArray;Dp.exports=pA});var Ip=p((j9,qp)=>{function gA(){return!1}qp.exports=gA});var Nn=p((xr,Si)=>{var mA=ee(),bA=Ip(),Fp=typeof xr=="object"&&xr&&!xr.nodeType&&xr,Rp=Fp&&typeof Si=="object"&&Si&&!Si.nodeType&&Si,vA=Rp&&Rp.exports===Fp,Np=vA?mA.Buffer:void 0,yA=Np?Np.isBuffer:void 0,xA=yA||bA;Si.exports=xA});var _r=p(($9,Bp)=>{var _A=9007199254740991,wA=/^(?:0|[1-9]\d*)$/;function kA(e,t){var n=typeof e;return t=t??_A,!!t&&(n=="number"||n!="symbol"&&wA.test(e))&&e>-1&&e%1==0&&e<t}Bp.exports=kA});var Xs=p((W9,zp)=>{var SA=9007199254740991;function MA(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=SA}zp.exports=MA});var $p=p((V9,jp)=>{var EA=sn(),OA=Xs(),CA=de(),TA="[object Arguments]",AA="[object Array]",PA="[object Boolean]",LA="[object Date]",DA="[object Error]",qA="[object Function]",IA="[object Map]",RA="[object Number]",NA="[object Object]",FA="[object RegExp]",BA="[object Set]",zA="[object String]",jA="[object WeakMap]",$A="[object ArrayBuffer]",WA="[object DataView]",VA="[object Float32Array]",HA="[object Float64Array]",UA="[object Int8Array]",YA="[object Int16Array]",GA="[object Int32Array]",XA="[object Uint8Array]",KA="[object Uint8ClampedArray]",ZA="[object Uint16Array]",JA="[object Uint32Array]",rt={};rt[VA]=rt[HA]=rt[UA]=rt[YA]=rt[GA]=rt[XA]=rt[KA]=rt[ZA]=rt[JA]=!0;rt[TA]=rt[AA]=rt[$A]=rt[PA]=rt[WA]=rt[LA]=rt[DA]=rt[qA]=rt[IA]=rt[RA]=rt[NA]=rt[FA]=rt[BA]=rt[zA]=rt[jA]=!1;function QA(e){return CA(e)&&OA(e.length)&&!!rt[EA(e)]}jp.exports=QA});var wr=p((H9,Wp)=>{function tP(e){return function(t){return e(t)}}Wp.exports=tP});var Ks=p((kr,Mi)=>{var eP=Ja(),Vp=typeof kr=="object"&&kr&&!kr.nodeType&&kr,Sr=Vp&&typeof Mi=="object"&&Mi&&!Mi.nodeType&&Mi,nP=Sr&&Sr.exports===Vp,nl=nP&&eP.process,iP=function(){try{var e=Sr&&Sr.require&&Sr.require("util").types;return e||nl&&nl.binding&&nl.binding("util")}catch{}}();Mi.exports=iP});var Ei=p((U9,Yp)=>{var rP=$p(),sP=wr(),Hp=Ks(),Up=Hp&&Hp.isTypedArray,oP=Up?sP(Up):rP;Yp.exports=oP});var il=p((Y9,Gp)=>{var aP=Ep(),lP=ki(),cP=pt(),uP=Nn(),dP=_r(),hP=Ei(),fP=Object.prototype,pP=fP.hasOwnProperty;function gP(e,t){var n=cP(e),i=!n&&lP(e),r=!n&&!i&&uP(e),s=!n&&!i&&!r&&hP(e),o=n||i||r||s,a=o?aP(e.length,String):[],l=a.length;for(var c in e)(t||pP.call(e,c))&&!(o&&(c=="length"||r&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||dP(c,l)))&&a.push(c);return a}Gp.exports=gP});var Mr=p((G9,Xp)=>{var mP=Object.prototype;function bP(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||mP;return e===n}Xp.exports=bP});var rl=p((X9,Kp)=>{function vP(e,t){return function(n){return e(t(n))}}Kp.exports=vP});var Jp=p((K9,Zp)=>{var yP=rl(),xP=yP(Object.keys,Object);Zp.exports=xP});var Zs=p((Z9,Qp)=>{var _P=Mr(),wP=Jp(),kP=Object.prototype,SP=kP.hasOwnProperty;function MP(e){if(!_P(e))return wP(e);var t=[];for(var n in Object(e))SP.call(e,n)&&n!="constructor"&&t.push(n);return t}Qp.exports=MP});var ye=p((J9,tg)=>{var EP=vi(),OP=Xs();function CP(e){return e!=null&&OP(e.length)&&!EP(e)}tg.exports=CP});var Ie=p((Q9,eg)=>{var TP=il(),AP=Zs(),PP=ye();function LP(e){return PP(e)?TP(e):AP(e)}eg.exports=LP});var ig=p((t4,ng)=>{var DP=wi(),qP=Ie();function IP(e,t){return e&&DP(t,qP(t),e)}ng.exports=IP});var sg=p((e4,rg)=>{function RP(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}rg.exports=RP});var ag=p((n4,og)=>{var NP=$t(),FP=Mr(),BP=sg(),zP=Object.prototype,jP=zP.hasOwnProperty;function $P(e){if(!NP(e))return BP(e);var t=FP(e),n=[];for(var i in e)i=="constructor"&&(t||!jP.call(e,i))||n.push(i);return n}og.exports=$P});var an=p((i4,lg)=>{var WP=il(),VP=ag(),HP=ye();function UP(e){return HP(e)?WP(e,!0):VP(e)}lg.exports=UP});var ug=p((r4,cg)=>{var YP=wi(),GP=an();function XP(e,t){return e&&YP(t,GP(t),e)}cg.exports=XP});var sl=p((Er,Oi)=>{var KP=ee(),pg=typeof Er=="object"&&Er&&!Er.nodeType&&Er,dg=pg&&typeof Oi=="object"&&Oi&&!Oi.nodeType&&Oi,ZP=dg&&dg.exports===pg,hg=ZP?KP.Buffer:void 0,fg=hg?hg.allocUnsafe:void 0;function JP(e,t){if(t)return e.slice();var n=e.length,i=fg?fg(n):new e.constructor(n);return e.copy(i),i}Oi.exports=JP});var ol=p((s4,gg)=>{function QP(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}gg.exports=QP});var al=p((o4,mg)=>{function t2(e,t){for(var n=-1,i=e==null?0:e.length,r=0,s=[];++n<i;){var o=e[n];t(o,n,e)&&(s[r++]=o)}return s}mg.exports=t2});var ll=p((a4,bg)=>{function e2(){return[]}bg.exports=e2});var Js=p((l4,yg)=>{var n2=al(),i2=ll(),r2=Object.prototype,s2=r2.propertyIsEnumerable,vg=Object.getOwnPropertySymbols,o2=vg?function(e){return e==null?[]:(e=Object(e),n2(vg(e),function(t){return s2.call(e,t)}))}:i2;yg.exports=o2});var _g=p((c4,xg)=>{var a2=wi(),l2=Js();function c2(e,t){return a2(e,l2(e),t)}xg.exports=c2});var Qs=p((u4,wg)=>{function u2(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}wg.exports=u2});var Or=p((d4,kg)=>{var d2=rl(),h2=d2(Object.getPrototypeOf,Object);kg.exports=h2});var cl=p((h4,Sg)=>{var f2=Qs(),p2=Or(),g2=Js(),m2=ll(),b2=Object.getOwnPropertySymbols,v2=b2?function(e){for(var t=[];e;)f2(t,g2(e)),e=p2(e);return t}:m2;Sg.exports=v2});var Eg=p((f4,Mg)=>{var y2=wi(),x2=cl();function _2(e,t){return y2(e,x2(e),t)}Mg.exports=_2});var ul=p((p4,Og)=>{var w2=Qs(),k2=pt();function S2(e,t,n){var i=t(e);return k2(e)?i:w2(i,n(e))}Og.exports=S2});var dl=p((g4,Cg)=>{var M2=ul(),E2=Js(),O2=Ie();function C2(e){return M2(e,O2,E2)}Cg.exports=C2});var Ag=p((m4,Tg)=>{var T2=ul(),A2=cl(),P2=an();function L2(e){return T2(e,P2,A2)}Tg.exports=L2});var Lg=p((b4,Pg)=>{var D2=on(),q2=ee(),I2=D2(q2,"DataView");Pg.exports=I2});var qg=p((v4,Dg)=>{var R2=on(),N2=ee(),F2=R2(N2,"Promise");Dg.exports=F2});var hl=p((y4,Ig)=>{var B2=on(),z2=ee(),j2=B2(z2,"Set");Ig.exports=j2});var Ng=p((x4,Rg)=>{var $2=on(),W2=ee(),V2=$2(W2,"WeakMap");Rg.exports=V2});var Bn=p((_4,Vg)=>{var fl=Lg(),pl=Us(),gl=qg(),ml=hl(),bl=Ng(),Wg=sn(),Ci=tl(),Fg="[object Map]",H2="[object Object]",Bg="[object Promise]",zg="[object Set]",jg="[object WeakMap]",$g="[object DataView]",U2=Ci(fl),Y2=Ci(pl),G2=Ci(gl),X2=Ci(ml),K2=Ci(bl),Fn=Wg;(fl&&Fn(new fl(new ArrayBuffer(1)))!=$g||pl&&Fn(new pl)!=Fg||gl&&Fn(gl.resolve())!=Bg||ml&&Fn(new ml)!=zg||bl&&Fn(new bl)!=jg)&&(Fn=function(e){var t=Wg(e),n=t==H2?e.constructor:void 0,i=n?Ci(n):"";if(i)switch(i){case U2:return $g;case Y2:return Fg;case G2:return Bg;case X2:return zg;case K2:return jg}return t});Vg.exports=Fn});var Ug=p((w4,Hg)=>{var Z2=Object.prototype,J2=Z2.hasOwnProperty;function Q2(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&J2.call(e,"index")&&(n.index=e.index,n.input=e.input),n}Hg.exports=Q2});var vl=p((k4,Yg)=>{var tL=ee(),eL=tL.Uint8Array;Yg.exports=eL});var to=p((S4,Xg)=>{var Gg=vl();function nL(e){var t=new e.constructor(e.byteLength);return new Gg(t).set(new Gg(e)),t}Xg.exports=nL});var Zg=p((M4,Kg)=>{var iL=to();function rL(e,t){var n=t?iL(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}Kg.exports=rL});var Qg=p((E4,Jg)=>{var sL=/\w*$/;function oL(e){var t=new e.constructor(e.source,sL.exec(e));return t.lastIndex=e.lastIndex,t}Jg.exports=oL});var rm=p((O4,im)=>{var tm=Rn(),em=tm?tm.prototype:void 0,nm=em?em.valueOf:void 0;function aL(e){return nm?Object(nm.call(e)):{}}im.exports=aL});var yl=p((C4,sm)=>{var lL=to();function cL(e,t){var n=t?lL(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}sm.exports=cL});var am=p((T4,om)=>{var uL=to(),dL=Zg(),hL=Qg(),fL=rm(),pL=yl(),gL="[object Boolean]",mL="[object Date]",bL="[object Map]",vL="[object Number]",yL="[object RegExp]",xL="[object Set]",_L="[object String]",wL="[object Symbol]",kL="[object ArrayBuffer]",SL="[object DataView]",ML="[object Float32Array]",EL="[object Float64Array]",OL="[object Int8Array]",CL="[object Int16Array]",TL="[object Int32Array]",AL="[object Uint8Array]",PL="[object Uint8ClampedArray]",LL="[object Uint16Array]",DL="[object Uint32Array]";function qL(e,t,n){var i=e.constructor;switch(t){case kL:return uL(e);case gL:case mL:return new i(+e);case SL:return dL(e,n);case ML:case EL:case OL:case CL:case TL:case AL:case PL:case LL:case DL:return pL(e,n);case bL:return new i;case vL:case _L:return new i(e);case yL:return hL(e);case xL:return new i;case wL:return fL(e)}}om.exports=qL});var xl=p((A4,cm)=>{var IL=$t(),lm=Object.create,RL=function(){function e(){}return function(t){if(!IL(t))return{};if(lm)return lm(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();cm.exports=RL});var _l=p((P4,um)=>{var NL=xl(),FL=Or(),BL=Mr();function zL(e){return typeof e.constructor=="function"&&!BL(e)?NL(FL(e)):{}}um.exports=zL});var hm=p((L4,dm)=>{var jL=Bn(),$L=de(),WL="[object Map]";function VL(e){return $L(e)&&jL(e)==WL}dm.exports=VL});var mm=p((D4,gm)=>{var HL=hm(),UL=wr(),fm=Ks(),pm=fm&&fm.isMap,YL=pm?UL(pm):HL;gm.exports=YL});var vm=p((q4,bm)=>{var GL=Bn(),XL=de(),KL="[object Set]";function ZL(e){return XL(e)&&GL(e)==KL}bm.exports=ZL});var wm=p((I4,_m)=>{var JL=vm(),QL=wr(),ym=Ks(),xm=ym&&ym.isSet,tD=xm?QL(xm):JL;_m.exports=tD});var wl=p((R4,Em)=>{var eD=br(),nD=Gs(),iD=yr(),rD=ig(),sD=ug(),oD=sl(),aD=ol(),lD=_g(),cD=Eg(),uD=dl(),dD=Ag(),hD=Bn(),fD=Ug(),pD=am(),gD=_l(),mD=pt(),bD=Nn(),vD=mm(),yD=$t(),xD=wm(),_D=Ie(),wD=an(),kD=1,SD=2,MD=4,km="[object Arguments]",ED="[object Array]",OD="[object Boolean]",CD="[object Date]",TD="[object Error]",Sm="[object Function]",AD="[object GeneratorFunction]",PD="[object Map]",LD="[object Number]",Mm="[object Object]",DD="[object RegExp]",qD="[object Set]",ID="[object String]",RD="[object Symbol]",ND="[object WeakMap]",FD="[object ArrayBuffer]",BD="[object DataView]",zD="[object Float32Array]",jD="[object Float64Array]",$D="[object Int8Array]",WD="[object Int16Array]",VD="[object Int32Array]",HD="[object Uint8Array]",UD="[object Uint8ClampedArray]",YD="[object Uint16Array]",GD="[object Uint32Array]",nt={};nt[km]=nt[ED]=nt[FD]=nt[BD]=nt[OD]=nt[CD]=nt[zD]=nt[jD]=nt[$D]=nt[WD]=nt[VD]=nt[PD]=nt[LD]=nt[Mm]=nt[DD]=nt[qD]=nt[ID]=nt[RD]=nt[HD]=nt[UD]=nt[YD]=nt[GD]=!0;nt[TD]=nt[Sm]=nt[ND]=!1;function eo(e,t,n,i,r,s){var o,a=t&kD,l=t&SD,c=t&MD;if(n&&(o=r?n(e,i,r,s):n(e)),o!==void 0)return o;if(!yD(e))return e;var u=mD(e);if(u){if(o=fD(e),!a)return aD(e,o)}else{var d=hD(e),h=d==Sm||d==AD;if(bD(e))return oD(e,a);if(d==Mm||d==km||h&&!r){if(o=l||h?{}:gD(e),!a)return l?cD(e,sD(o,e)):lD(e,rD(o,e))}else{if(!nt[d])return r?e:{};o=pD(e,d,a)}}s||(s=new eD);var f=s.get(e);if(f)return f;s.set(e,o),xD(e)?e.forEach(function(b){o.add(eo(b,t,n,b,e,s))}):vD(e)&&e.forEach(function(b,y){o.set(y,eo(b,t,n,y,e,s))});var g=c?l?dD:uD:l?wD:_D,m=u?void 0:g(e);return nD(m||e,function(b,y){m&&(y=b,b=e[y]),iD(o,y,eo(b,t,n,y,e,s))}),o}Em.exports=eo});var Cm=p((N4,Om)=>{var XD=wl(),KD=4;function ZD(e){return XD(e,KD)}Om.exports=ZD});var no=p((F4,Tm)=>{function JD(e){return function(){return e}}Tm.exports=JD});var Pm=p((B4,Am)=>{function QD(e){return function(t,n,i){for(var r=-1,s=Object(t),o=i(t),a=o.length;a--;){var l=o[e?a:++r];if(n(s[l],l,s)===!1)break}return t}}Am.exports=QD});var io=p((z4,Lm)=>{var tq=Pm(),eq=tq();Lm.exports=eq});var ro=p((j4,Dm)=>{var nq=io(),iq=Ie();function rq(e,t){return e&&nq(e,t,iq)}Dm.exports=rq});var Im=p(($4,qm)=>{var sq=ye();function oq(e,t){return function(n,i){if(n==null)return n;if(!sq(n))return e(n,i);for(var r=n.length,s=t?r:-1,o=Object(n);(t?s--:++s<r)&&i(o[s],s,o)!==!1;);return n}}qm.exports=oq});var Cr=p((W4,Rm)=>{var aq=ro(),lq=Im(),cq=lq(aq);Rm.exports=cq});var ln=p((V4,Nm)=>{function uq(e){return e}Nm.exports=uq});var kl=p((H4,Fm)=>{var dq=ln();function hq(e){return typeof e=="function"?e:dq}Fm.exports=hq});var Sl=p((U4,Bm)=>{var fq=Gs(),pq=Cr(),gq=kl(),mq=pt();function bq(e,t){var n=mq(e)?fq:pq;return n(e,gq(t))}Bm.exports=bq});var Ml=p((Y4,zm)=>{zm.exports=Sl()});var $m=p((G4,jm)=>{var vq=Cr();function yq(e,t){var n=[];return vq(e,function(i,r,s){t(i,r,s)&&n.push(i)}),n}jm.exports=yq});var Vm=p((X4,Wm)=>{var xq="__lodash_hash_undefined__";function _q(e){return this.__data__.set(e,xq),this}Wm.exports=_q});var Um=p((K4,Hm)=>{function wq(e){return this.__data__.has(e)}Hm.exports=wq});var El=p((Z4,Ym)=>{var kq=Ys(),Sq=Vm(),Mq=Um();function so(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new kq;++t<n;)this.add(e[t])}so.prototype.add=so.prototype.push=Sq;so.prototype.has=Mq;Ym.exports=so});var Xm=p((J4,Gm)=>{function Eq(e,t){for(var n=-1,i=e==null?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}Gm.exports=Eq});var Ol=p((Q4,Km)=>{function Oq(e,t){return e.has(t)}Km.exports=Oq});var Cl=p((tY,Zm)=>{var Cq=El(),Tq=Xm(),Aq=Ol(),Pq=1,Lq=2;function Dq(e,t,n,i,r,s){var o=n&Pq,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&Lq?new Cq:void 0;for(s.set(e,t),s.set(t,e);++d<a;){var g=e[d],m=t[d];if(i)var b=o?i(m,g,d,t,e,s):i(g,m,d,e,t,s);if(b!==void 0){if(b)continue;h=!1;break}if(f){if(!Tq(t,function(y,_){if(!Aq(f,_)&&(g===y||r(g,y,n,i,s)))return f.push(_)})){h=!1;break}}else if(!(g===m||r(g,m,n,i,s))){h=!1;break}}return s.delete(e),s.delete(t),h}Zm.exports=Dq});var Qm=p((eY,Jm)=>{function qq(e){var t=-1,n=Array(e.size);return e.forEach(function(i,r){n[++t]=[r,i]}),n}Jm.exports=qq});var oo=p((nY,tb)=>{function Iq(e){var t=-1,n=Array(e.size);return e.forEach(function(i){n[++t]=i}),n}tb.exports=Iq});var sb=p((iY,rb)=>{var eb=Rn(),nb=vl(),Rq=In(),Nq=Cl(),Fq=Qm(),Bq=oo(),zq=1,jq=2,$q="[object Boolean]",Wq="[object Date]",Vq="[object Error]",Hq="[object Map]",Uq="[object Number]",Yq="[object RegExp]",Gq="[object Set]",Xq="[object String]",Kq="[object Symbol]",Zq="[object ArrayBuffer]",Jq="[object DataView]",ib=eb?eb.prototype:void 0,Tl=ib?ib.valueOf:void 0;function Qq(e,t,n,i,r,s,o){switch(n){case Jq:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Zq:return!(e.byteLength!=t.byteLength||!s(new nb(e),new nb(t)));case $q:case Wq:case Uq:return Rq(+e,+t);case Vq:return e.name==t.name&&e.message==t.message;case Yq:case Xq:return e==t+"";case Hq:var a=Fq;case Gq:var l=i&zq;if(a||(a=Bq),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;i|=jq,o.set(e,t);var u=Nq(a(e),a(t),i,r,s,o);return o.delete(e),u;case Kq:if(Tl)return Tl.call(e)==Tl.call(t)}return!1}rb.exports=Qq});var lb=p((rY,ab)=>{var ob=dl(),tI=1,eI=Object.prototype,nI=eI.hasOwnProperty;function iI(e,t,n,i,r,s){var o=n&tI,a=ob(e),l=a.length,c=ob(t),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var h=a[d];if(!(o?h in t:nI.call(t,h)))return!1}var f=s.get(e),g=s.get(t);if(f&&g)return f==t&&g==e;var m=!0;s.set(e,t),s.set(t,e);for(var b=o;++d<l;){h=a[d];var y=e[h],_=t[h];if(i)var x=o?i(_,y,h,t,e,s):i(y,_,h,e,t,s);if(!(x===void 0?y===_||r(y,_,n,i,s):x)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var v=e.constructor,w=t.constructor;v!=w&&"constructor"in e&&"constructor"in t&&!(typeof v=="function"&&v instanceof v&&typeof w=="function"&&w instanceof w)&&(m=!1)}return s.delete(e),s.delete(t),m}ab.exports=iI});var mb=p((sY,gb)=>{var Al=br(),rI=Cl(),sI=sb(),oI=lb(),cb=Bn(),ub=pt(),db=Nn(),aI=Ei(),lI=1,hb="[object Arguments]",fb="[object Array]",ao="[object Object]",cI=Object.prototype,pb=cI.hasOwnProperty;function uI(e,t,n,i,r,s){var o=ub(e),a=ub(t),l=o?fb:cb(e),c=a?fb:cb(t);l=l==hb?ao:l,c=c==hb?ao:c;var u=l==ao,d=c==ao,h=l==c;if(h&&db(e)){if(!db(t))return!1;o=!0,u=!1}if(h&&!u)return s||(s=new Al),o||aI(e)?rI(e,t,n,i,r,s):sI(e,t,l,n,i,r,s);if(!(n&lI)){var f=u&&pb.call(e,"__wrapped__"),g=d&&pb.call(t,"__wrapped__");if(f||g){var m=f?e.value():e,b=g?t.value():t;return s||(s=new Al),r(m,b,n,i,s)}}return h?(s||(s=new Al),oI(e,t,n,i,r,s)):!1}gb.exports=uI});var Pl=p((oY,yb)=>{var dI=mb(),bb=de();function vb(e,t,n,i,r){return e===t?!0:e==null||t==null||!bb(e)&&!bb(t)?e!==e&&t!==t:dI(e,t,n,i,vb,r)}yb.exports=vb});var _b=p((aY,xb)=>{var hI=br(),fI=Pl(),pI=1,gI=2;function mI(e,t,n,i){var r=n.length,s=r,o=!i;if(e==null)return!s;for(e=Object(e);r--;){var a=n[r];if(o&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++r<s;){a=n[r];var l=a[0],c=e[l],u=a[1];if(o&&a[2]){if(c===void 0&&!(l in e))return!1}else{var d=new hI;if(i)var h=i(c,u,l,e,t,d);if(!(h===void 0?fI(u,c,pI|gI,i,d):h))return!1}}return!0}xb.exports=mI});var Ll=p((lY,wb)=>{var bI=$t();function vI(e){return e===e&&!bI(e)}wb.exports=vI});var Sb=p((cY,kb)=>{var yI=Ll(),xI=Ie();function _I(e){for(var t=xI(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,yI(r)]}return t}kb.exports=_I});var Dl=p((uY,Mb)=>{function wI(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}Mb.exports=wI});var Ob=p((dY,Eb)=>{var kI=_b(),SI=Sb(),MI=Dl();function EI(e){var t=SI(e);return t.length==1&&t[0][2]?MI(t[0][0],t[0][1]):function(n){return n===e||kI(n,e,t)}}Eb.exports=EI});var zn=p((hY,Cb)=>{var OI=sn(),CI=de(),TI="[object Symbol]";function AI(e){return typeof e=="symbol"||CI(e)&&OI(e)==TI}Cb.exports=AI});var lo=p((fY,Tb)=>{var PI=pt(),LI=zn(),DI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qI=/^\w*$/;function II(e,t){if(PI(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||LI(e)?!0:qI.test(e)||!DI.test(e)||t!=null&&e in Object(t)}Tb.exports=II});var Lb=p((pY,Pb)=>{var Ab=Ys(),RI="Expected a function";function ql(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(RI);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=e.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(ql.Cache||Ab),n}ql.Cache=Ab;Pb.exports=ql});var qb=p((gY,Db)=>{var NI=Lb(),FI=500;function BI(e){var t=NI(e,function(i){return n.size===FI&&n.clear(),i}),n=t.cache;return t}Db.exports=BI});var Rb=p((mY,Ib)=>{var zI=qb(),jI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$I=/\\(\\)?/g,WI=zI(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(jI,function(n,i,r,s){t.push(r?s.replace($I,"$1"):i||n)}),t});Ib.exports=WI});var Tr=p((bY,Nb)=>{function VI(e,t){for(var n=-1,i=e==null?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}Nb.exports=VI});var Wb=p((vY,$b)=>{var Fb=Rn(),HI=Tr(),UI=pt(),YI=zn(),GI=1/0,Bb=Fb?Fb.prototype:void 0,zb=Bb?Bb.toString:void 0;function jb(e){if(typeof e=="string")return e;if(UI(e))return HI(e,jb)+"";if(YI(e))return zb?zb.call(e):"";var t=e+"";return t=="0"&&1/e==-GI?"-0":t}$b.exports=jb});var Il=p((yY,Vb)=>{var XI=Wb();function KI(e){return e==null?"":XI(e)}Vb.exports=KI});var Ar=p((xY,Hb)=>{var ZI=pt(),JI=lo(),QI=Rb(),tR=Il();function eR(e,t){return ZI(e)?e:JI(e,t)?[e]:QI(tR(e))}Hb.exports=eR});var Ti=p((_Y,Ub)=>{var nR=zn(),iR=1/0;function rR(e){if(typeof e=="string"||nR(e))return e;var t=e+"";return t=="0"&&1/e==-iR?"-0":t}Ub.exports=rR});var Pr=p((wY,Yb)=>{var sR=Ar(),oR=Ti();function aR(e,t){t=sR(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[oR(t[n++])];return n&&n==i?e:void 0}Yb.exports=aR});var Xb=p((kY,Gb)=>{var lR=Pr();function cR(e,t,n){var i=e==null?void 0:lR(e,t);return i===void 0?n:i}Gb.exports=cR});var Zb=p((SY,Kb)=>{function uR(e,t){return e!=null&&t in Object(e)}Kb.exports=uR});var Rl=p((MY,Jb)=>{var dR=Ar(),hR=ki(),fR=pt(),pR=_r(),gR=Xs(),mR=Ti();function bR(e,t,n){t=dR(t,e);for(var i=-1,r=t.length,s=!1;++i<r;){var o=mR(t[i]);if(!(s=e!=null&&n(e,o)))break;e=e[o]}return s||++i!=r?s:(r=e==null?0:e.length,!!r&&gR(r)&&pR(o,r)&&(fR(e)||hR(e)))}Jb.exports=bR});var Nl=p((EY,Qb)=>{var vR=Zb(),yR=Rl();function xR(e,t){return e!=null&&yR(e,t,vR)}Qb.exports=xR});var ev=p((OY,tv)=>{var _R=Pl(),wR=Xb(),kR=Nl(),SR=lo(),MR=Ll(),ER=Dl(),OR=Ti(),CR=1,TR=2;function AR(e,t){return SR(e)&&MR(t)?ER(OR(e),t):function(n){var i=wR(n,e);return i===void 0&&i===t?kR(n,e):_R(t,i,CR|TR)}}tv.exports=AR});var Fl=p((CY,nv)=>{function PR(e){return function(t){return t?.[e]}}nv.exports=PR});var rv=p((TY,iv)=>{var LR=Pr();function DR(e){return function(t){return LR(t,e)}}iv.exports=DR});var ov=p((AY,sv)=>{var qR=Fl(),IR=rv(),RR=lo(),NR=Ti();function FR(e){return RR(e)?qR(NR(e)):IR(e)}sv.exports=FR});var xe=p((PY,av)=>{var BR=Ob(),zR=ev(),jR=ln(),$R=pt(),WR=ov();function VR(e){return typeof e=="function"?e:e==null?jR:typeof e=="object"?$R(e)?zR(e[0],e[1]):BR(e):WR(e)}av.exports=VR});var Bl=p((LY,lv)=>{var HR=al(),UR=$m(),YR=xe(),GR=pt();function XR(e,t){var n=GR(e)?HR:UR;return n(e,YR(t,3))}lv.exports=XR});var uv=p((DY,cv)=>{var KR=Object.prototype,ZR=KR.hasOwnProperty;function JR(e,t){return e!=null&&ZR.call(e,t)}cv.exports=JR});var zl=p((qY,dv)=>{var QR=uv(),tN=Rl();function eN(e,t){return e!=null&&tN(e,t,QR)}dv.exports=eN});var fv=p((IY,hv)=>{var nN=Zs(),iN=Bn(),rN=ki(),sN=pt(),oN=ye(),aN=Nn(),lN=Mr(),cN=Ei(),uN="[object Map]",dN="[object Set]",hN=Object.prototype,fN=hN.hasOwnProperty;function pN(e){if(e==null)return!0;if(oN(e)&&(sN(e)||typeof e=="string"||typeof e.splice=="function"||aN(e)||cN(e)||rN(e)))return!e.length;var t=iN(e);if(t==uN||t==dN)return!e.size;if(lN(e))return!nN(e).length;for(var n in e)if(fN.call(e,n))return!1;return!0}hv.exports=pN});var jl=p((RY,pv)=>{function gN(e){return e===void 0}pv.exports=gN});var $l=p((NY,gv)=>{var mN=Cr(),bN=ye();function vN(e,t){var n=-1,i=bN(e)?Array(e.length):[];return mN(e,function(r,s,o){i[++n]=t(r,s,o)}),i}gv.exports=vN});var Wl=p((FY,mv)=>{var yN=Tr(),xN=xe(),_N=$l(),wN=pt();function kN(e,t){var n=wN(e)?yN:_N;return n(e,xN(t,3))}mv.exports=kN});var vv=p((BY,bv)=>{function SN(e,t,n,i){var r=-1,s=e==null?0:e.length;for(i&&s&&(n=e[++r]);++r<s;)n=t(n,e[r],r,e);return n}bv.exports=SN});var xv=p((zY,yv)=>{function MN(e,t,n,i,r){return r(e,function(s,o,a){n=i?(i=!1,s):t(n,s,o,a)}),n}yv.exports=MN});var Vl=p((jY,_v)=>{var EN=vv(),ON=Cr(),CN=xe(),TN=xv(),AN=pt();function PN(e,t,n){var i=AN(e)?EN:TN,r=arguments.length<3;return i(e,CN(t,4),n,r,ON)}_v.exports=PN});var kv=p(($Y,wv)=>{var LN=sn(),DN=pt(),qN=de(),IN="[object String]";function RN(e){return typeof e=="string"||!DN(e)&&qN(e)&&LN(e)==IN}wv.exports=RN});var Mv=p((WY,Sv)=>{var NN=Fl(),FN=NN("length");Sv.exports=FN});var Ov=p((VY,Ev)=>{var BN="\\ud800-\\udfff",zN="\\u0300-\\u036f",jN="\\ufe20-\\ufe2f",$N="\\u20d0-\\u20ff",WN=zN+jN+$N,VN="\\ufe0e\\ufe0f",HN="\\u200d",UN=RegExp("["+HN+BN+WN+VN+"]");function YN(e){return UN.test(e)}Ev.exports=YN});var Rv=p((HY,Iv)=>{var Tv="\\ud800-\\udfff",GN="\\u0300-\\u036f",XN="\\ufe20-\\ufe2f",KN="\\u20d0-\\u20ff",ZN=GN+XN+KN,JN="\\ufe0e\\ufe0f",QN="["+Tv+"]",Hl="["+ZN+"]",Ul="\\ud83c[\\udffb-\\udfff]",tF="(?:"+Hl+"|"+Ul+")",Av="[^"+Tv+"]",Pv="(?:\\ud83c[\\udde6-\\uddff]){2}",Lv="[\\ud800-\\udbff][\\udc00-\\udfff]",eF="\\u200d",Dv=tF+"?",qv="["+JN+"]?",nF="(?:"+eF+"(?:"+[Av,Pv,Lv].join("|")+")"+qv+Dv+")*",iF=qv+Dv+nF,rF="(?:"+[Av+Hl+"?",Hl,Pv,Lv,QN].join("|")+")",Cv=RegExp(Ul+"(?="+Ul+")|"+rF+iF,"g");function sF(e){for(var t=Cv.lastIndex=0;Cv.test(e);)++t;return t}Iv.exports=sF});var Fv=p((UY,Nv)=>{var oF=Mv(),aF=Ov(),lF=Rv();function cF(e){return aF(e)?lF(e):oF(e)}Nv.exports=cF});var zv=p((YY,Bv)=>{var uF=Zs(),dF=Bn(),hF=ye(),fF=kv(),pF=Fv(),gF="[object Map]",mF="[object Set]";function bF(e){if(e==null)return 0;if(hF(e))return fF(e)?pF(e):e.length;var t=dF(e);return t==gF||t==mF?e.size:uF(e).length}Bv.exports=bF});var $v=p((GY,jv)=>{var vF=Gs(),yF=xl(),xF=ro(),_F=xe(),wF=Or(),kF=pt(),SF=Nn(),MF=vi(),EF=$t(),OF=Ei();function CF(e,t,n){var i=kF(e),r=i||SF(e)||OF(e);if(t=_F(t,4),n==null){var s=e&&e.constructor;r?n=i?new s:[]:EF(e)?n=MF(s)?yF(wF(e)):{}:n={}}return(r?vF:xF)(e,function(o,a,l){return t(n,o,a,l)}),n}jv.exports=CF});var Uv=p((XY,Hv)=>{var Wv=Rn(),TF=ki(),AF=pt(),Vv=Wv?Wv.isConcatSpreadable:void 0;function PF(e){return AF(e)||TF(e)||!!(Vv&&e&&e[Vv])}Hv.exports=PF});var co=p((KY,Gv)=>{var LF=Qs(),DF=Uv();function Yv(e,t,n,i,r){var s=-1,o=e.length;for(n||(n=DF),r||(r=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?Yv(a,t-1,n,i,r):LF(r,a):i||(r[r.length]=a)}return r}Gv.exports=Yv});var Kv=p((ZY,Xv)=>{function qF(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}Xv.exports=qF});var Yl=p((JY,Jv)=>{var IF=Kv(),Zv=Math.max;function RF(e,t,n){return t=Zv(t===void 0?e.length-1:t,0),function(){for(var i=arguments,r=-1,s=Zv(i.length-t,0),o=Array(s);++r<s;)o[r]=i[t+r];r=-1;for(var a=Array(t+1);++r<t;)a[r]=i[r];return a[t]=n(o),IF(e,this,a)}}Jv.exports=RF});var ey=p((QY,ty)=>{var NF=no(),Qv=el(),FF=ln(),BF=Qv?function(e,t){return Qv(e,"toString",{configurable:!0,enumerable:!1,value:NF(t),writable:!0})}:FF;ty.exports=BF});var iy=p((t7,ny)=>{var zF=800,jF=16,$F=Date.now;function WF(e){var t=0,n=0;return function(){var i=$F(),r=jF-(i-n);if(n=i,r>0){if(++t>=zF)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}ny.exports=WF});var Gl=p((e7,ry)=>{var VF=ey(),HF=iy(),UF=HF(VF);ry.exports=UF});var Lr=p((n7,sy)=>{var YF=ln(),GF=Yl(),XF=Gl();function KF(e,t){return XF(GF(e,t,YF),e+"")}sy.exports=KF});var Xl=p((i7,oy)=>{function ZF(e,t,n,i){for(var r=e.length,s=n+(i?1:-1);i?s--:++s<r;)if(t(e[s],s,e))return s;return-1}oy.exports=ZF});var ly=p((r7,ay)=>{function JF(e){return e!==e}ay.exports=JF});var uy=p((s7,cy)=>{function QF(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}cy.exports=QF});var hy=p((o7,dy)=>{var t5=Xl(),e5=ly(),n5=uy();function i5(e,t,n){return t===t?n5(e,t,n):t5(e,e5,n)}dy.exports=i5});var py=p((a7,fy)=>{var r5=hy();function s5(e,t){var n=e==null?0:e.length;return!!n&&r5(e,t,0)>-1}fy.exports=s5});var my=p((l7,gy)=>{function o5(e,t,n){for(var i=-1,r=e==null?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}gy.exports=o5});var vy=p((c7,by)=>{function a5(){}by.exports=a5});var xy=p((u7,yy)=>{var Kl=hl(),l5=vy(),c5=oo(),u5=1/0,d5=Kl&&1/c5(new Kl([,-0]))[1]==u5?function(e){return new Kl(e)}:l5;yy.exports=d5});var wy=p((d7,_y)=>{var h5=El(),f5=py(),p5=my(),g5=Ol(),m5=xy(),b5=oo(),v5=200;function y5(e,t,n){var i=-1,r=f5,s=e.length,o=!0,a=[],l=a;if(n)o=!1,r=p5;else if(s>=v5){var c=t?null:m5(e);if(c)return b5(c);o=!1,r=g5,l=new h5}else l=t?[]:a;t:for(;++i<s;){var u=e[i],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue t;t&&l.push(d),a.push(u)}else r(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}_y.exports=y5});var Zl=p((h7,ky)=>{var x5=ye(),_5=de();function w5(e){return _5(e)&&x5(e)}ky.exports=w5});var My=p((f7,Sy)=>{var k5=co(),S5=Lr(),M5=wy(),E5=Zl(),O5=S5(function(e){return M5(k5(e,1,E5,!0))});Sy.exports=O5});var Oy=p((p7,Ey)=>{var C5=Tr();function T5(e,t){return C5(t,function(n){return e[n]})}Ey.exports=T5});var Jl=p((g7,Cy)=>{var A5=Oy(),P5=Ie();function L5(e){return e==null?[]:A5(e,P5(e))}Cy.exports=L5});var Wt=p((m7,Ty)=>{var uo;if(typeof Yn=="function")try{uo={clone:Cm(),constant:no(),each:Ml(),filter:Bl(),has:zl(),isArray:pt(),isEmpty:fv(),isFunction:vi(),isUndefined:jl(),keys:Ie(),map:Wl(),reduce:Vl(),size:zv(),transform:$v(),union:My(),values:Jl()}}catch{}uo||(uo=window._);Ty.exports=uo});var ho=p((b7,Dy)=>{"use strict";var R=Wt();Dy.exports=j;var D5="\0",jn="\0",Ay="";function j(e){this._isDirected=R.has(e,"directed")?e.directed:!0,this._isMultigraph=R.has(e,"multigraph")?e.multigraph:!1,this._isCompound=R.has(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=R.constant(void 0),this._defaultEdgeLabelFn=R.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[jn]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}j.prototype._nodeCount=0;j.prototype._edgeCount=0;j.prototype.isDirected=function(){return this._isDirected};j.prototype.isMultigraph=function(){return this._isMultigraph};j.prototype.isCompound=function(){return this._isCompound};j.prototype.setGraph=function(e){return this._label=e,this};j.prototype.graph=function(){return this._label};j.prototype.setDefaultNodeLabel=function(e){return R.isFunction(e)||(e=R.constant(e)),this._defaultNodeLabelFn=e,this};j.prototype.nodeCount=function(){return this._nodeCount};j.prototype.nodes=function(){return R.keys(this._nodes)};j.prototype.sources=function(){var e=this;return R.filter(this.nodes(),function(t){return R.isEmpty(e._in[t])})};j.prototype.sinks=function(){var e=this;return R.filter(this.nodes(),function(t){return R.isEmpty(e._out[t])})};j.prototype.setNodes=function(e,t){var n=arguments,i=this;return R.each(e,function(r){n.length>1?i.setNode(r,t):i.setNode(r)}),this};j.prototype.setNode=function(e,t){return R.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=jn,this._children[e]={},this._children[jn][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)};j.prototype.node=function(e){return this._nodes[e]};j.prototype.hasNode=function(e){return R.has(this._nodes,e)};j.prototype.removeNode=function(e){var t=this;if(R.has(this._nodes,e)){var n=function(i){t.removeEdge(t._edgeObjs[i])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],R.each(this.children(e),function(i){t.setParent(i)}),delete this._children[e]),R.each(R.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],R.each(R.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this};j.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(R.isUndefined(t))t=jn;else{t+="";for(var n=t;!R.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this};j.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]};j.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==jn)return t}};j.prototype.children=function(e){if(R.isUndefined(e)&&(e=jn),this._isCompound){var t=this._children[e];if(t)return R.keys(t)}else{if(e===jn)return this.nodes();if(this.hasNode(e))return[]}};j.prototype.predecessors=function(e){var t=this._preds[e];if(t)return R.keys(t)};j.prototype.successors=function(e){var t=this._sucs[e];if(t)return R.keys(t)};j.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return R.union(t,this.successors(e))};j.prototype.isLeaf=function(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0};j.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;R.each(this._nodes,function(s,o){e(o)&&t.setNode(o,s)}),R.each(this._edgeObjs,function(s){t.hasNode(s.v)&&t.hasNode(s.w)&&t.setEdge(s,n.edge(s))});var i={};function r(s){var o=n.parent(s);return o===void 0||t.hasNode(o)?(i[s]=o,o):o in i?i[o]:r(o)}return this._isCompound&&R.each(t.nodes(),function(s){t.setParent(s,r(s))}),t};j.prototype.setDefaultEdgeLabel=function(e){return R.isFunction(e)||(e=R.constant(e)),this._defaultEdgeLabelFn=e,this};j.prototype.edgeCount=function(){return this._edgeCount};j.prototype.edges=function(){return R.values(this._edgeObjs)};j.prototype.setPath=function(e,t){var n=this,i=arguments;return R.reduce(e,function(r,s){return i.length>1?n.setEdge(r,s,t):n.setEdge(r,s),s}),this};j.prototype.setEdge=function(){var e,t,n,i,r=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(e=s.v,t=s.w,n=s.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,R.isUndefined(n)||(n=""+n);var o=Dr(this._isDirected,e,t,n);if(R.has(this._edgeLabels,o))return r&&(this._edgeLabels[o]=i),this;if(!R.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[o]=r?i:this._defaultEdgeLabelFn(e,t,n);var a=q5(this._isDirected,e,t,n);return e=a.v,t=a.w,Object.freeze(a),this._edgeObjs[o]=a,Py(this._preds[t],e),Py(this._sucs[e],t),this._in[t][o]=a,this._out[e][o]=a,this._edgeCount++,this};j.prototype.edge=function(e,t,n){var i=arguments.length===1?Ql(this._isDirected,arguments[0]):Dr(this._isDirected,e,t,n);return this._edgeLabels[i]};j.prototype.hasEdge=function(e,t,n){var i=arguments.length===1?Ql(this._isDirected,arguments[0]):Dr(this._isDirected,e,t,n);return R.has(this._edgeLabels,i)};j.prototype.removeEdge=function(e,t,n){var i=arguments.length===1?Ql(this._isDirected,arguments[0]):Dr(this._isDirected,e,t,n),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],Ly(this._preds[t],e),Ly(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this};j.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var i=R.values(n);return t?R.filter(i,function(r){return r.v===t}):i}};j.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var i=R.values(n);return t?R.filter(i,function(r){return r.w===t}):i}};j.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))};function Py(e,t){e[t]?e[t]++:e[t]=1}function Ly(e,t){--e[t]||delete e[t]}function Dr(e,t,n,i){var r=""+t,s=""+n;if(!e&&r>s){var o=r;r=s,s=o}return r+Ay+s+Ay+(R.isUndefined(i)?D5:i)}function q5(e,t,n,i){var r=""+t,s=""+n;if(!e&&r>s){var o=r;r=s,s=o}var a={v:r,w:s};return i&&(a.name=i),a}function Ql(e,t){return Dr(e,t.v,t.w,t.name)}});var Iy=p((v7,qy)=>{qy.exports="2.1.8"});var Ny=p((y7,Ry)=>{Ry.exports={Graph:ho(),version:Iy()}});var By=p((x7,Fy)=>{var _e=Wt(),I5=ho();Fy.exports={write:R5,read:B5};function R5(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:N5(e),edges:F5(e)};return _e.isUndefined(e.graph())||(t.value=_e.clone(e.graph())),t}function N5(e){return _e.map(e.nodes(),function(t){var n=e.node(t),i=e.parent(t),r={v:t};return _e.isUndefined(n)||(r.value=n),_e.isUndefined(i)||(r.parent=i),r})}function F5(e){return _e.map(e.edges(),function(t){var n=e.edge(t),i={v:t.v,w:t.w};return _e.isUndefined(t.name)||(i.name=t.name),_e.isUndefined(n)||(i.value=n),i})}function B5(e){var t=new I5(e.options).setGraph(e.value);return _e.each(e.nodes,function(n){t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),_e.each(e.edges,function(n){t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}});var jy=p((_7,zy)=>{var fo=Wt();zy.exports=z5;function z5(e){var t={},n=[],i;function r(s){fo.has(t,s)||(t[s]=!0,i.push(s),fo.each(e.successors(s),r),fo.each(e.predecessors(s),r))}return fo.each(e.nodes(),function(s){i=[],r(s),i.length&&n.push(i)}),n}});var tc=p((w7,Wy)=>{var $y=Wt();Wy.exports=ne;function ne(){this._arr=[],this._keyIndices={}}ne.prototype.size=function(){return this._arr.length};ne.prototype.keys=function(){return this._arr.map(function(e){return e.key})};ne.prototype.has=function(e){return $y.has(this._keyIndices,e)};ne.prototype.priority=function(e){var t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority};ne.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};ne.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!$y.has(n,e)){var i=this._arr,r=i.length;return n[e]=r,i.push({key:e,priority:t}),this._decrease(r),!0}return!1};ne.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key};ne.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)};ne.prototype._heapify=function(e){var t=this._arr,n=2*e,i=n+1,r=e;n<t.length&&(r=t[n].priority<t[r].priority?n:r,i<t.length&&(r=t[i].priority<t[r].priority?i:r),r!==e&&(this._swap(e,r),this._heapify(r)))};ne.prototype._decrease=function(e){for(var t=this._arr,n=t[e].priority,i;e!==0&&(i=e>>1,!(t[i].priority<n));)this._swap(e,i),e=i};ne.prototype._swap=function(e,t){var n=this._arr,i=this._keyIndices,r=n[e],s=n[t];n[e]=s,n[t]=r,i[s.key]=e,i[r.key]=t}});var ec=p((k7,Vy)=>{var j5=Wt(),$5=tc();Vy.exports=V5;var W5=j5.constant(1);function V5(e,t,n,i){return H5(e,String(t),n||W5,i||function(r){return e.outEdges(r)})}function H5(e,t,n,i){var r={},s=new $5,o,a,l=function(c){var u=c.v!==o?c.v:c.w,d=r[u],h=n(c),f=a.distance+h;if(h<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+c+" Weight: "+h);f<d.distance&&(d.distance=f,d.predecessor=o,s.decrease(u,f))};for(e.nodes().forEach(function(c){var u=c===t?0:Number.POSITIVE_INFINITY;r[c]={distance:u},s.add(c,u)});s.size()>0&&(o=s.removeMin(),a=r[o],a.distance!==Number.POSITIVE_INFINITY);)i(o).forEach(l);return r}});var Uy=p((S7,Hy)=>{var U5=ec(),Y5=Wt();Hy.exports=G5;function G5(e,t,n){return Y5.transform(e.nodes(),function(i,r){i[r]=U5(e,r,t,n)},{})}});var nc=p((M7,Gy)=>{var Yy=Wt();Gy.exports=X5;function X5(e){var t=0,n=[],i={},r=[];function s(o){var a=i[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),e.successors(o).forEach(function(u){Yy.has(i,u)?i[u].onStack&&(a.lowlink=Math.min(a.lowlink,i[u].index)):(s(u),a.lowlink=Math.min(a.lowlink,i[u].lowlink))}),a.lowlink===a.index){var l=[],c;do c=n.pop(),i[c].onStack=!1,l.push(c);while(o!==c);r.push(l)}}return e.nodes().forEach(function(o){Yy.has(i,o)||s(o)}),r}});var Ky=p((E7,Xy)=>{var K5=Wt(),Z5=nc();Xy.exports=J5;function J5(e){return K5.filter(Z5(e),function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}});var Jy=p((O7,Zy)=>{var Q5=Wt();Zy.exports=eB;var tB=Q5.constant(1);function eB(e,t,n){return nB(e,t||tB,n||function(i){return e.outEdges(i)})}function nB(e,t,n){var i={},r=e.nodes();return r.forEach(function(s){i[s]={},i[s][s]={distance:0},r.forEach(function(o){s!==o&&(i[s][o]={distance:Number.POSITIVE_INFINITY})}),n(s).forEach(function(o){var a=o.v===s?o.w:o.v,l=t(o);i[s][a]={distance:l,predecessor:s}})}),r.forEach(function(s){var o=i[s];r.forEach(function(a){var l=i[a];r.forEach(function(c){var u=l[s],d=o[c],h=l[c],f=u.distance+d.distance;f<h.distance&&(h.distance=f,h.predecessor=d.predecessor)})})}),i}});var ic=p((C7,tx)=>{var qr=Wt();tx.exports=Qy;Qy.CycleException=po;function Qy(e){var t={},n={},i=[];function r(s){if(qr.has(n,s))throw new po;qr.has(t,s)||(n[s]=!0,t[s]=!0,qr.each(e.predecessors(s),r),delete n[s],i.push(s))}if(qr.each(e.sinks(),r),qr.size(t)!==e.nodeCount())throw new po;return i}function po(){}po.prototype=new Error});var ix=p((T7,nx)=>{var ex=ic();nx.exports=iB;function iB(e){try{ex(e)}catch(t){if(t instanceof ex.CycleException)return!1;throw t}return!0}});var rc=p((A7,sx)=>{var go=Wt();sx.exports=rB;function rB(e,t,n){go.isArray(t)||(t=[t]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),r=[],s={};return go.each(t,function(o){if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);rx(e,o,n==="post",s,i,r)}),r}function rx(e,t,n,i,r,s){go.has(i,t)||(i[t]=!0,n||s.push(t),go.each(r(t),function(o){rx(e,o,n,i,r,s)}),n&&s.push(t))}});var ax=p((P7,ox)=>{var sB=rc();ox.exports=oB;function oB(e,t){return sB(e,t,"post")}});var cx=p((L7,lx)=>{var aB=rc();lx.exports=lB;function lB(e,t){return aB(e,t,"pre")}});var hx=p((D7,dx)=>{var ux=Wt(),cB=ho(),uB=tc();dx.exports=dB;function dB(e,t){var n=new cB,i={},r=new uB,s;function o(l){var c=l.v===s?l.w:l.v,u=r.priority(c);if(u!==void 0){var d=t(l);d<u&&(i[c]=s,r.decrease(c,d))}}if(e.nodeCount()===0)return n;ux.each(e.nodes(),function(l){r.add(l,Number.POSITIVE_INFINITY),n.setNode(l)}),r.decrease(e.nodes()[0],0);for(var a=!1;r.size()>0;){if(s=r.removeMin(),ux.has(i,s))n.setEdge(s,i[s]);else{if(a)throw new Error("Input graph is not connected: "+e);a=!0}e.nodeEdges(s).forEach(o)}return n}});var px=p((q7,fx)=>{fx.exports={components:jy(),dijkstra:ec(),dijkstraAll:Uy(),findCycles:Ky(),floydWarshall:Jy(),isAcyclic:ix(),postorder:ax(),preorder:cx(),prim:hx(),tarjan:nc(),topsort:ic()}});var bx=p((I7,mx)=>{var gx=Ny();mx.exports={Graph:gx.Graph,json:By(),alg:px(),version:gx.version}});var ie=p((R7,vx)=>{var mo;if(typeof Yn=="function")try{mo=bx()}catch{}mo||(mo=window.graphlib);vx.exports=mo});var xx=p((N7,yx)=>{var hB=wl(),fB=1,pB=4;function gB(e){return hB(e,fB|pB)}yx.exports=gB});var Ir=p((F7,_x)=>{var mB=In(),bB=ye(),vB=_r(),yB=$t();function xB(e,t,n){if(!yB(n))return!1;var i=typeof t;return(i=="number"?bB(n)&&vB(t,n.length):i=="string"&&t in n)?mB(n[t],e):!1}_x.exports=xB});var Sx=p((B7,kx)=>{var _B=Lr(),wB=In(),kB=Ir(),SB=an(),wx=Object.prototype,MB=wx.hasOwnProperty,EB=_B(function(e,t){e=Object(e);var n=-1,i=t.length,r=i>2?t[2]:void 0;for(r&&kB(t[0],t[1],r)&&(i=1);++n<i;)for(var s=t[n],o=SB(s),a=-1,l=o.length;++a<l;){var c=o[a],u=e[c];(u===void 0||wB(u,wx[c])&&!MB.call(e,c))&&(e[c]=s[c])}return e});kx.exports=EB});var Ex=p((z7,Mx)=>{var OB=xe(),CB=ye(),TB=Ie();function AB(e){return function(t,n,i){var r=Object(t);if(!CB(t)){var s=OB(n,3);t=TB(t),n=function(a){return s(r[a],a,r)}}var o=e(t,n,i);return o>-1?r[s?t[o]:o]:void 0}}Mx.exports=AB});var Cx=p((j7,Ox)=>{var PB=/\s/;function LB(e){for(var t=e.length;t--&&PB.test(e.charAt(t)););return t}Ox.exports=LB});var Ax=p(($7,Tx)=>{var DB=Cx(),qB=/^\s+/;function IB(e){return e&&e.slice(0,DB(e)+1).replace(qB,"")}Tx.exports=IB});var qx=p((W7,Dx)=>{var RB=Ax(),Px=$t(),NB=zn(),Lx=0/0,FB=/^[-+]0x[0-9a-f]+$/i,BB=/^0b[01]+$/i,zB=/^0o[0-7]+$/i,jB=parseInt;function $B(e){if(typeof e=="number")return e;if(NB(e))return Lx;if(Px(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Px(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=RB(e);var n=BB.test(e);return n||zB.test(e)?jB(e.slice(2),n?2:8):FB.test(e)?Lx:+e}Dx.exports=$B});var sc=p((V7,Rx)=>{var WB=qx(),Ix=1/0,VB=17976931348623157e292;function HB(e){if(!e)return e===0?e:0;if(e=WB(e),e===Ix||e===-Ix){var t=e<0?-1:1;return t*VB}return e===e?e:0}Rx.exports=HB});var Fx=p((H7,Nx)=>{var UB=sc();function YB(e){var t=UB(e),n=t%1;return t===t?n?t-n:t:0}Nx.exports=YB});var zx=p((U7,Bx)=>{var GB=Xl(),XB=xe(),KB=Fx(),ZB=Math.max;function JB(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var r=n==null?0:KB(n);return r<0&&(r=ZB(i+r,0)),GB(e,XB(t,3),r)}Bx.exports=JB});var $x=p((Y7,jx)=>{var QB=Ex(),tz=zx(),ez=QB(tz);jx.exports=ez});var oc=p((G7,Wx)=>{var nz=co();function iz(e){var t=e==null?0:e.length;return t?nz(e,1):[]}Wx.exports=iz});var Hx=p((X7,Vx)=>{var rz=io(),sz=kl(),oz=an();function az(e,t){return e==null?e:rz(e,sz(t),oz)}Vx.exports=az});var Yx=p((K7,Ux)=>{function lz(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}Ux.exports=lz});var Xx=p((Z7,Gx)=>{var cz=vr(),uz=ro(),dz=xe();function hz(e,t){var n={};return t=dz(t,3),uz(e,function(i,r,s){cz(n,r,t(i,r,s))}),n}Gx.exports=hz});var bo=p((J7,Kx)=>{var fz=zn();function pz(e,t,n){for(var i=-1,r=e.length;++i<r;){var s=e[i],o=t(s);if(o!=null&&(a===void 0?o===o&&!fz(o):n(o,a)))var a=o,l=s}return l}Kx.exports=pz});var Jx=p((Q7,Zx)=>{function gz(e,t){return e>t}Zx.exports=gz});var t0=p((tG,Qx)=>{var mz=bo(),bz=Jx(),vz=ln();function yz(e){return e&&e.length?mz(e,vz,bz):void 0}Qx.exports=yz});var ac=p((eG,e0)=>{var xz=vr(),_z=In();function wz(e,t,n){(n!==void 0&&!_z(e[t],n)||n===void 0&&!(t in e))&&xz(e,t,n)}e0.exports=wz});var r0=p((nG,i0)=>{var kz=sn(),Sz=Or(),Mz=de(),Ez="[object Object]",Oz=Function.prototype,Cz=Object.prototype,n0=Oz.toString,Tz=Cz.hasOwnProperty,Az=n0.call(Object);function Pz(e){if(!Mz(e)||kz(e)!=Ez)return!1;var t=Sz(e);if(t===null)return!0;var n=Tz.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&n0.call(n)==Az}i0.exports=Pz});var lc=p((iG,s0)=>{function Lz(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}s0.exports=Lz});var a0=p((rG,o0)=>{var Dz=wi(),qz=an();function Iz(e){return Dz(e,qz(e))}o0.exports=Iz});var f0=p((sG,h0)=>{var l0=ac(),Rz=sl(),Nz=yl(),Fz=ol(),Bz=_l(),c0=ki(),u0=pt(),zz=Zl(),jz=Nn(),$z=vi(),Wz=$t(),Vz=r0(),Hz=Ei(),d0=lc(),Uz=a0();function Yz(e,t,n,i,r,s,o){var a=d0(e,n),l=d0(t,n),c=o.get(l);if(c){l0(e,n,c);return}var u=s?s(a,l,n+"",e,t,o):void 0,d=u===void 0;if(d){var h=u0(l),f=!h&&jz(l),g=!h&&!f&&Hz(l);u=l,h||f||g?u0(a)?u=a:zz(a)?u=Fz(a):f?(d=!1,u=Rz(l,!0)):g?(d=!1,u=Nz(l,!0)):u=[]:Vz(l)||c0(l)?(u=a,c0(a)?u=Uz(a):(!Wz(a)||$z(a))&&(u=Bz(l))):d=!1}d&&(o.set(l,u),r(u,l,i,s,o),o.delete(l)),l0(e,n,u)}h0.exports=Yz});var m0=p((oG,g0)=>{var Gz=br(),Xz=ac(),Kz=io(),Zz=f0(),Jz=$t(),Qz=an(),tj=lc();function p0(e,t,n,i,r){e!==t&&Kz(t,function(s,o){if(r||(r=new Gz),Jz(s))Zz(e,t,o,n,p0,i,r);else{var a=i?i(tj(e,o),s,o+"",e,t,r):void 0;a===void 0&&(a=s),Xz(e,o,a)}},Qz)}g0.exports=p0});var v0=p((aG,b0)=>{var ej=Lr(),nj=Ir();function ij(e){return ej(function(t,n){var i=-1,r=n.length,s=r>1?n[r-1]:void 0,o=r>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(r--,s):void 0,o&&nj(n[0],n[1],o)&&(s=r<3?void 0:s,r=1),t=Object(t);++i<r;){var a=n[i];a&&e(t,a,i,s)}return t})}b0.exports=ij});var x0=p((lG,y0)=>{var rj=m0(),sj=v0(),oj=sj(function(e,t,n){rj(e,t,n)});y0.exports=oj});var cc=p((cG,_0)=>{function aj(e,t){return e<t}_0.exports=aj});var k0=p((uG,w0)=>{var lj=bo(),cj=cc(),uj=ln();function dj(e){return e&&e.length?lj(e,uj,cj):void 0}w0.exports=dj});var M0=p((dG,S0)=>{var hj=bo(),fj=xe(),pj=cc();function gj(e,t){return e&&e.length?hj(e,fj(t,2),pj):void 0}S0.exports=gj});var O0=p((hG,E0)=>{var mj=ee(),bj=function(){return mj.Date.now()};E0.exports=bj});var A0=p((fG,T0)=>{var vj=yr(),yj=Ar(),xj=_r(),C0=$t(),_j=Ti();function wj(e,t,n,i){if(!C0(e))return e;t=yj(t,e);for(var r=-1,s=t.length,o=s-1,a=e;a!=null&&++r<s;){var l=_j(t[r]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(r!=o){var u=a[l];c=i?i(u,l,a):void 0,c===void 0&&(c=C0(u)?u:xj(t[r+1])?[]:{})}vj(a,l,c),a=a[l]}return e}T0.exports=wj});var L0=p((pG,P0)=>{var kj=Pr(),Sj=A0(),Mj=Ar();function Ej(e,t,n){for(var i=-1,r=t.length,s={};++i<r;){var o=t[i],a=kj(e,o);n(a,o)&&Sj(s,Mj(o,e),a)}return s}P0.exports=Ej});var q0=p((gG,D0)=>{var Oj=L0(),Cj=Nl();function Tj(e,t){return Oj(e,t,function(n,i){return Cj(e,i)})}D0.exports=Tj});var R0=p((mG,I0)=>{var Aj=oc(),Pj=Yl(),Lj=Gl();function Dj(e){return Lj(Pj(e,void 0,Aj),e+"")}I0.exports=Dj});var F0=p((bG,N0)=>{var qj=q0(),Ij=R0(),Rj=Ij(function(e,t){return e==null?{}:qj(e,t)});N0.exports=Rj});var z0=p((vG,B0)=>{var Nj=Math.ceil,Fj=Math.max;function Bj(e,t,n,i){for(var r=-1,s=Fj(Nj((t-e)/(n||1)),0),o=Array(s);s--;)o[i?s:++r]=e,e+=n;return o}B0.exports=Bj});var $0=p((yG,j0)=>{var zj=z0(),jj=Ir(),uc=sc();function $j(e){return function(t,n,i){return i&&typeof i!="number"&&jj(t,n,i)&&(n=i=void 0),t=uc(t),n===void 0?(n=t,t=0):n=uc(n),i=i===void 0?t<n?1:-1:uc(i),zj(t,n,i,e)}}j0.exports=$j});var V0=p((xG,W0)=>{var Wj=$0(),Vj=Wj();W0.exports=Vj});var U0=p((_G,H0)=>{function Hj(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}H0.exports=Hj});var X0=p((wG,G0)=>{var Y0=zn();function Uj(e,t){if(e!==t){var n=e!==void 0,i=e===null,r=e===e,s=Y0(e),o=t!==void 0,a=t===null,l=t===t,c=Y0(t);if(!a&&!c&&!s&&e>t||s&&o&&l&&!a&&!c||i&&o&&l||!n&&l||!r)return 1;if(!i&&!s&&!c&&e<t||c&&n&&r&&!i&&!s||a&&n&&r||!o&&r||!l)return-1}return 0}G0.exports=Uj});var Z0=p((kG,K0)=>{var Yj=X0();function Gj(e,t,n){for(var i=-1,r=e.criteria,s=t.criteria,o=r.length,a=n.length;++i<o;){var l=Yj(r[i],s[i]);if(l){if(i>=a)return l;var c=n[i];return l*(c=="desc"?-1:1)}}return e.index-t.index}K0.exports=Gj});var Q0=p((SG,J0)=>{var dc=Tr(),Xj=Pr(),Kj=xe(),Zj=$l(),Jj=U0(),Qj=wr(),t$=Z0(),e$=ln(),n$=pt();function i$(e,t,n){t.length?t=dc(t,function(s){return n$(s)?function(o){return Xj(o,s.length===1?s[0]:s)}:s}):t=[e$];var i=-1;t=dc(t,Qj(Kj));var r=Zj(e,function(s,o,a){var l=dc(t,function(c){return c(s)});return{criteria:l,index:++i,value:s}});return Jj(r,function(s,o){return t$(s,o,n)})}J0.exports=i$});var n_=p((MG,e_)=>{var r$=co(),s$=Q0(),o$=Lr(),t_=Ir(),a$=o$(function(e,t){if(e==null)return[];var n=t.length;return n>1&&t_(e,t[0],t[1])?t=[]:n>2&&t_(t[0],t[1],t[2])&&(t=[t[0]]),s$(e,r$(t,1),[])});e_.exports=a$});var r_=p((EG,i_)=>{var l$=Il(),c$=0;function u$(e){var t=++c$;return l$(e)+t}i_.exports=u$});var o_=p((OG,s_)=>{function d$(e,t,n){for(var i=-1,r=e.length,s=t.length,o={};++i<r;){var a=i<s?t[i]:void 0;n(o,e[i],a)}return o}s_.exports=d$});var l_=p((CG,a_)=>{var h$=yr(),f$=o_();function p$(e,t){return f$(e||[],t||[],h$)}a_.exports=p$});var st=p((TG,c_)=>{var vo;if(typeof Yn=="function")try{vo={cloneDeep:xx(),constant:no(),defaults:Sx(),each:Ml(),filter:Bl(),find:$x(),flatten:oc(),forEach:Sl(),forIn:Hx(),has:zl(),isUndefined:jl(),last:Yx(),map:Wl(),mapValues:Xx(),max:t0(),merge:x0(),min:k0(),minBy:M0(),now:O0(),pick:F0(),range:V0(),reduce:Vl(),sortBy:n_(),uniqueId:r_(),values:Jl(),zipObject:l_()}}catch{}vo||(vo=window._);c_.exports=vo});var h_=p((AG,d_)=>{d_.exports=yo;function yo(){var e={};e._next=e._prev=e,this._sentinel=e}yo.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return u_(t),t};yo.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&u_(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};yo.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,g$)),n=n._prev;return"["+e.join(", ")+"]"};function u_(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function g$(e,t){if(e!=="_next"&&e!=="_prev")return t}});var p_=p((PG,f_)=>{var Re=st(),m$=ie().Graph,b$=h_();f_.exports=y$;var v$=Re.constant(1);function y$(e,t){if(e.nodeCount()<=1)return[];var n=_$(e,t||v$),i=x$(n.graph,n.buckets,n.zeroIdx);return Re.flatten(Re.map(i,function(r){return e.outEdges(r.v,r.w)}),!0)}function x$(e,t,n){for(var i=[],r=t[t.length-1],s=t[0],o;e.nodeCount();){for(;o=s.dequeue();)hc(e,t,n,o);for(;o=r.dequeue();)hc(e,t,n,o);if(e.nodeCount()){for(var a=t.length-2;a>0;--a)if(o=t[a].dequeue(),o){i=i.concat(hc(e,t,n,o,!0));break}}}return i}function hc(e,t,n,i,r){var s=r?[]:void 0;return Re.forEach(e.inEdges(i.v),function(o){var a=e.edge(o),l=e.node(o.v);r&&s.push({v:o.v,w:o.w}),l.out-=a,fc(t,n,l)}),Re.forEach(e.outEdges(i.v),function(o){var a=e.edge(o),l=o.w,c=e.node(l);c.in-=a,fc(t,n,c)}),e.removeNode(i.v),s}function _$(e,t){var n=new m$,i=0,r=0;Re.forEach(e.nodes(),function(a){n.setNode(a,{v:a,in:0,out:0})}),Re.forEach(e.edges(),function(a){var l=n.edge(a.v,a.w)||0,c=t(a),u=l+c;n.setEdge(a.v,a.w,u),r=Math.max(r,n.node(a.v).out+=c),i=Math.max(i,n.node(a.w).in+=c)});var s=Re.range(r+i+3).map(function(){return new b$}),o=i+1;return Re.forEach(n.nodes(),function(a){fc(s,o,n.node(a))}),{graph:n,buckets:s,zeroIdx:o}}function fc(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}});var m_=p((LG,g_)=>{"use strict";var $n=st(),w$=p_();g_.exports={run:k$,undo:M$};function k$(e){var t=e.graph().acyclicer==="greedy"?w$(e,n(e)):S$(e);$n.forEach(t,function(i){var r=e.edge(i);e.removeEdge(i),r.forwardName=i.name,r.reversed=!0,e.setEdge(i.w,i.v,r,$n.uniqueId("rev"))});function n(i){return function(r){return i.edge(r).weight}}}function S$(e){var t=[],n={},i={};function r(s){$n.has(i,s)||(i[s]=!0,n[s]=!0,$n.forEach(e.outEdges(s),function(o){$n.has(n,o.w)?t.push(o):r(o.w)}),delete n[s])}return $n.forEach(e.nodes(),r),t}function M$(e){$n.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var i=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,i)}})}});var Pt=p((DG,x_)=>{"use strict";var G=st(),b_=ie().Graph;x_.exports={addDummyNode:v_,simplify:E$,asNonCompoundGraph:O$,successorWeights:C$,predecessorWeights:T$,intersectRect:A$,buildLayerMatrix:P$,normalizeRanks:L$,removeEmptyRanks:D$,addBorderNode:q$,maxRank:y_,partition:I$,time:R$,notime:N$};function v_(e,t,n,i){var r;do r=G.uniqueId(i);while(e.hasNode(r));return n.dummy=t,e.setNode(r,n),r}function E$(e){var t=new b_().setGraph(e.graph());return G.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),G.forEach(e.edges(),function(n){var i=t.edge(n.v,n.w)||{weight:0,minlen:1},r=e.edge(n);t.setEdge(n.v,n.w,{weight:i.weight+r.weight,minlen:Math.max(i.minlen,r.minlen)})}),t}function O$(e){var t=new b_({multigraph:e.isMultigraph()}).setGraph(e.graph());return G.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),G.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function C$(e){var t=G.map(e.nodes(),function(n){var i={};return G.forEach(e.outEdges(n),function(r){i[r.w]=(i[r.w]||0)+e.edge(r).weight}),i});return G.zipObject(e.nodes(),t)}function T$(e){var t=G.map(e.nodes(),function(n){var i={};return G.forEach(e.inEdges(n),function(r){i[r.v]=(i[r.v]||0)+e.edge(r).weight}),i});return G.zipObject(e.nodes(),t)}function A$(e,t){var n=e.x,i=e.y,r=t.x-n,s=t.y-i,o=e.width/2,a=e.height/2;if(!r&&!s)throw new Error("Not possible to find intersection inside of the rectangle");var l,c;return Math.abs(s)*o>Math.abs(r)*a?(s<0&&(a=-a),l=a*r/s,c=a):(r<0&&(o=-o),l=o,c=o*s/r),{x:n+l,y:i+c}}function P$(e){var t=G.map(G.range(y_(e)+1),function(){return[]});return G.forEach(e.nodes(),function(n){var i=e.node(n),r=i.rank;G.isUndefined(r)||(t[r][i.order]=n)}),t}function L$(e){var t=G.min(G.map(e.nodes(),function(n){return e.node(n).rank}));G.forEach(e.nodes(),function(n){var i=e.node(n);G.has(i,"rank")&&(i.rank-=t)})}function D$(e){var t=G.min(G.map(e.nodes(),function(s){return e.node(s).rank})),n=[];G.forEach(e.nodes(),function(s){var o=e.node(s).rank-t;n[o]||(n[o]=[]),n[o].push(s)});var i=0,r=e.graph().nodeRankFactor;G.forEach(n,function(s,o){G.isUndefined(s)&&o%r!==0?--i:i&&G.forEach(s,function(a){e.node(a).rank+=i})})}function q$(e,t,n,i){var r={width:0,height:0};return arguments.length>=4&&(r.rank=n,r.order=i),v_(e,"border",r,t)}function y_(e){return G.max(G.map(e.nodes(),function(t){var n=e.node(t).rank;if(!G.isUndefined(n))return n}))}function I$(e,t){var n={lhs:[],rhs:[]};return G.forEach(e,function(i){t(i)?n.lhs.push(i):n.rhs.push(i)}),n}function R$(e,t){var n=G.now();try{return t()}finally{console.log(e+" time: "+(G.now()-n)+"ms")}}function N$(e,t){return t()}});var k_=p((qG,w_)=>{"use strict";var __=st(),F$=Pt();w_.exports={run:B$,undo:j$};function B$(e){e.graph().dummyChains=[],__.forEach(e.edges(),function(t){z$(e,t)})}function z$(e,t){var n=t.v,i=e.node(n).rank,r=t.w,s=e.node(r).rank,o=t.name,a=e.edge(t),l=a.labelRank;if(s!==i+1){e.removeEdge(t);var c,u,d;for(d=0,++i;i<s;++d,++i)a.points=[],u={width:0,height:0,edgeLabel:a,edgeObj:t,rank:i},c=F$.addDummyNode(e,"edge",u,"_d"),i===l&&(u.width=a.width,u.height=a.height,u.dummy="edge-label",u.labelpos=a.labelpos),e.setEdge(n,c,{weight:a.weight},o),d===0&&e.graph().dummyChains.push(c),n=c;e.setEdge(n,r,{weight:a.weight},o)}}function j$(e){__.forEach(e.graph().dummyChains,function(t){var n=e.node(t),i=n.edgeLabel,r;for(e.setEdge(n.edgeObj,i);n.dummy;)r=e.successors(t)[0],e.removeNode(t),i.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(i.x=n.x,i.y=n.y,i.width=n.width,i.height=n.height),t=r,n=e.node(t)})}});var Rr=p((IG,S_)=>{"use strict";var xo=st();S_.exports={longestPath:$$,slack:W$};function $$(e){var t={};function n(i){var r=e.node(i);if(xo.has(t,i))return r.rank;t[i]=!0;var s=xo.min(xo.map(e.outEdges(i),function(o){return n(o.w)-e.edge(o).minlen}));return(s===Number.POSITIVE_INFINITY||s===void 0||s===null)&&(s=0),r.rank=s}xo.forEach(e.sources(),n)}function W$(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}});var pc=p((RG,M_)=>{"use strict";var _o=st(),V$=ie().Graph,wo=Rr().slack;M_.exports=H$;function H$(e){var t=new V$({directed:!1}),n=e.nodes()[0],i=e.nodeCount();t.setNode(n,{});for(var r,s;U$(t,e)<i;)r=Y$(t,e),s=t.hasNode(r.v)?wo(e,r):-wo(e,r),G$(t,e,s);return t}function U$(e,t){function n(i){_o.forEach(t.nodeEdges(i),function(r){var s=r.v,o=i===s?r.w:s;!e.hasNode(o)&&!wo(t,r)&&(e.setNode(o,{}),e.setEdge(i,o,{}),n(o))})}return _o.forEach(e.nodes(),n),e.nodeCount()}function Y$(e,t){return _o.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return wo(t,n)})}function G$(e,t,n){_o.forEach(e.nodes(),function(i){t.node(i).rank+=n})}});var D_=p((NG,L_)=>{"use strict";var Ne=st(),X$=pc(),K$=Rr().slack,Z$=Rr().longestPath,J$=ie().alg.preorder,Q$=ie().alg.postorder,tW=Pt().simplify;L_.exports=Wn;Wn.initLowLimValues=mc;Wn.initCutValues=gc;Wn.calcCutValue=O_;Wn.leaveEdge=T_;Wn.enterEdge=A_;Wn.exchangeEdges=P_;function Wn(e){e=tW(e),Z$(e);var t=X$(e);mc(t),gc(t,e);for(var n,i;n=T_(t);)i=A_(t,e,n),P_(t,e,n,i)}function gc(e,t){var n=Q$(e,e.nodes());n=n.slice(0,n.length-1),Ne.forEach(n,function(i){eW(e,t,i)})}function eW(e,t,n){var i=e.node(n),r=i.parent;e.edge(n,r).cutvalue=O_(e,t,n)}function O_(e,t,n){var i=e.node(n),r=i.parent,s=!0,o=t.edge(n,r),a=0;return o||(s=!1,o=t.edge(r,n)),a=o.weight,Ne.forEach(t.nodeEdges(n),function(l){var c=l.v===n,u=c?l.w:l.v;if(u!==r){var d=c===s,h=t.edge(l).weight;if(a+=d?h:-h,iW(e,n,u)){var f=e.edge(n,u).cutvalue;a+=d?-f:f}}}),a}function mc(e,t){arguments.length<2&&(t=e.nodes()[0]),C_(e,{},1,t)}function C_(e,t,n,i,r){var s=n,o=e.node(i);return t[i]=!0,Ne.forEach(e.neighbors(i),function(a){Ne.has(t,a)||(n=C_(e,t,n,a,i))}),o.low=s,o.lim=n++,r?o.parent=r:delete o.parent,n}function T_(e){return Ne.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function A_(e,t,n){var i=n.v,r=n.w;t.hasEdge(i,r)||(i=n.w,r=n.v);var s=e.node(i),o=e.node(r),a=s,l=!1;s.lim>o.lim&&(a=o,l=!0);var c=Ne.filter(t.edges(),function(u){return l===E_(e,e.node(u.v),a)&&l!==E_(e,e.node(u.w),a)});return Ne.minBy(c,function(u){return K$(t,u)})}function P_(e,t,n,i){var r=n.v,s=n.w;e.removeEdge(r,s),e.setEdge(i.v,i.w,{}),mc(e),gc(e,t),nW(e,t)}function nW(e,t){var n=Ne.find(e.nodes(),function(r){return!t.node(r).parent}),i=J$(e,n);i=i.slice(1),Ne.forEach(i,function(r){var s=e.node(r).parent,o=t.edge(r,s),a=!1;o||(o=t.edge(s,r),a=!0),t.node(r).rank=t.node(s).rank+(a?o.minlen:-o.minlen)})}function iW(e,t,n){return e.hasEdge(t,n)}function E_(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}});var N_=p((FG,R_)=>{"use strict";var rW=Rr(),I_=rW.longestPath,sW=pc(),oW=D_();R_.exports=aW;function aW(e){switch(e.graph().ranker){case"network-simplex":q_(e);break;case"tight-tree":cW(e);break;case"longest-path":lW(e);break;default:q_(e)}}var lW=I_;function cW(e){I_(e),sW(e)}function q_(e){oW(e)}});var B_=p((BG,F_)=>{var bc=st();F_.exports=uW;function uW(e){var t=hW(e);bc.forEach(e.graph().dummyChains,function(n){for(var i=e.node(n),r=i.edgeObj,s=dW(e,t,r.v,r.w),o=s.path,a=s.lca,l=0,c=o[l],u=!0;n!==r.w;){if(i=e.node(n),u){for(;(c=o[l])!==a&&e.node(c).maxRank<i.rank;)l++;c===a&&(u=!1)}if(!u){for(;l<o.length-1&&e.node(c=o[l+1]).minRank<=i.rank;)l++;c=o[l]}e.setParent(n,c),n=e.successors(n)[0]}})}function dW(e,t,n,i){var r=[],s=[],o=Math.min(t[n].low,t[i].low),a=Math.max(t[n].lim,t[i].lim),l,c;l=n;do l=e.parent(l),r.push(l);while(l&&(t[l].low>o||a>t[l].lim));for(c=l,l=i;(l=e.parent(l))!==c;)s.push(l);return{path:r.concat(s.reverse()),lca:c}}function hW(e){var t={},n=0;function i(r){var s=n;bc.forEach(e.children(r),i),t[r]={low:s,lim:n++}}return bc.forEach(e.children(),i),t}});var $_=p((zG,j_)=>{var Fe=st(),vc=Pt();j_.exports={run:fW,cleanup:mW};function fW(e){var t=vc.addDummyNode(e,"root",{},"_root"),n=pW(e),i=Fe.max(Fe.values(n))-1,r=2*i+1;e.graph().nestingRoot=t,Fe.forEach(e.edges(),function(o){e.edge(o).minlen*=r});var s=gW(e)+1;Fe.forEach(e.children(),function(o){z_(e,t,r,s,i,n,o)}),e.graph().nodeRankFactor=r}function z_(e,t,n,i,r,s,o){var a=e.children(o);if(!a.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}var l=vc.addBorderNode(e,"_bt"),c=vc.addBorderNode(e,"_bb"),u=e.node(o);e.setParent(l,o),u.borderTop=l,e.setParent(c,o),u.borderBottom=c,Fe.forEach(a,function(d){z_(e,t,n,i,r,s,d);var h=e.node(d),f=h.borderTop?h.borderTop:d,g=h.borderBottom?h.borderBottom:d,m=h.borderTop?i:2*i,b=f!==g?1:r-s[o]+1;e.setEdge(l,f,{weight:m,minlen:b,nestingEdge:!0}),e.setEdge(g,c,{weight:m,minlen:b,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,l,{weight:0,minlen:r+s[o]})}function pW(e){var t={};function n(i,r){var s=e.children(i);s&&s.length&&Fe.forEach(s,function(o){n(o,r+1)}),t[i]=r}return Fe.forEach(e.children(),function(i){n(i,1)}),t}function gW(e){return Fe.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function mW(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,Fe.forEach(e.edges(),function(n){var i=e.edge(n);i.nestingEdge&&e.removeEdge(n)})}});var H_=p((jG,V_)=>{var yc=st(),bW=Pt();V_.exports=vW;function vW(e){function t(n){var i=e.children(n),r=e.node(n);if(i.length&&yc.forEach(i,t),yc.has(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var s=r.minRank,o=r.maxRank+1;s<o;++s)W_(e,"borderLeft","_bl",n,r,s),W_(e,"borderRight","_br",n,r,s)}}yc.forEach(e.children(),t)}function W_(e,t,n,i,r,s){var o={width:0,height:0,rank:s,borderType:t},a=r[t][s-1],l=bW.addDummyNode(e,"border",o,n);r[t][s]=l,e.setParent(l,i),a&&e.setEdge(a,l,{weight:1})}});var X_=p(($G,G_)=>{"use strict";var we=st();G_.exports={adjust:yW,undo:xW};function yW(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Y_(e)}function xW(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&_W(e),(t==="lr"||t==="rl")&&(wW(e),Y_(e))}function Y_(e){we.forEach(e.nodes(),function(t){U_(e.node(t))}),we.forEach(e.edges(),function(t){U_(e.edge(t))})}function U_(e){var t=e.width;e.width=e.height,e.height=t}function _W(e){we.forEach(e.nodes(),function(t){xc(e.node(t))}),we.forEach(e.edges(),function(t){var n=e.edge(t);we.forEach(n.points,xc),we.has(n,"y")&&xc(n)})}function xc(e){e.y=-e.y}function wW(e){we.forEach(e.nodes(),function(t){_c(e.node(t))}),we.forEach(e.edges(),function(t){var n=e.edge(t);we.forEach(n.points,_c),we.has(n,"x")&&_c(n)})}function _c(e){var t=e.x;e.x=e.y,e.y=t}});var Z_=p((WG,K_)=>{"use strict";var Be=st();K_.exports=kW;function kW(e){var t={},n=Be.filter(e.nodes(),function(a){return!e.children(a).length}),i=Be.max(Be.map(n,function(a){return e.node(a).rank})),r=Be.map(Be.range(i+1),function(){return[]});function s(a){if(!Be.has(t,a)){t[a]=!0;var l=e.node(a);r[l.rank].push(a),Be.forEach(e.successors(a),s)}}var o=Be.sortBy(n,function(a){return e.node(a).rank});return Be.forEach(o,s),r}});var Q_=p((VG,J_)=>{"use strict";var cn=st();J_.exports=SW;function SW(e,t){for(var n=0,i=1;i<t.length;++i)n+=MW(e,t[i-1],t[i]);return n}function MW(e,t,n){for(var i=cn.zipObject(n,cn.map(n,function(c,u){return u})),r=cn.flatten(cn.map(t,function(c){return cn.sortBy(cn.map(e.outEdges(c),function(u){return{pos:i[u.w],weight:e.edge(u).weight}}),"pos")}),!0),s=1;s<n.length;)s<<=1;var o=2*s-1;s-=1;var a=cn.map(new Array(o),function(){return 0}),l=0;return cn.forEach(r.forEach(function(c){var u=c.pos+s;a[u]+=c.weight;for(var d=0;u>0;)u%2&&(d+=a[u+1]),u=u-1>>1,a[u]+=c.weight;l+=c.weight*d})),l}});var nw=p((HG,ew)=>{var tw=st();ew.exports=EW;function EW(e,t){return tw.map(t,function(n){var i=e.inEdges(n);if(i.length){var r=tw.reduce(i,function(s,o){var a=e.edge(o),l=e.node(o.v);return{sum:s.sum+a.weight*l.order,weight:s.weight+a.weight}},{sum:0,weight:0});return{v:n,barycenter:r.sum/r.weight,weight:r.weight}}else return{v:n}})}});var rw=p((UG,iw)=>{"use strict";var Vt=st();iw.exports=OW;function OW(e,t){var n={};Vt.forEach(e,function(r,s){var o=n[r.v]={indegree:0,in:[],out:[],vs:[r.v],i:s};Vt.isUndefined(r.barycenter)||(o.barycenter=r.barycenter,o.weight=r.weight)}),Vt.forEach(t.edges(),function(r){var s=n[r.v],o=n[r.w];!Vt.isUndefined(s)&&!Vt.isUndefined(o)&&(o.indegree++,s.out.push(n[r.w]))});var i=Vt.filter(n,function(r){return!r.indegree});return CW(i)}function CW(e){var t=[];function n(s){return function(o){o.merged||(Vt.isUndefined(o.barycenter)||Vt.isUndefined(s.barycenter)||o.barycenter>=s.barycenter)&&TW(s,o)}}function i(s){return function(o){o.in.push(s),--o.indegree===0&&e.push(o)}}for(;e.length;){var r=e.pop();t.push(r),Vt.forEach(r.in.reverse(),n(r)),Vt.forEach(r.out,i(r))}return Vt.map(Vt.filter(t,function(s){return!s.merged}),function(s){return Vt.pick(s,["vs","i","barycenter","weight"])})}function TW(e,t){var n=0,i=0;e.weight&&(n+=e.barycenter*e.weight,i+=e.weight),t.weight&&(n+=t.barycenter*t.weight,i+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/i,e.weight=i,e.i=Math.min(t.i,e.i),t.merged=!0}});var aw=p((YG,ow)=>{var Nr=st(),AW=Pt();ow.exports=PW;function PW(e,t){var n=AW.partition(e,function(u){return Nr.has(u,"barycenter")}),i=n.lhs,r=Nr.sortBy(n.rhs,function(u){return-u.i}),s=[],o=0,a=0,l=0;i.sort(LW(!!t)),l=sw(s,r,l),Nr.forEach(i,function(u){l+=u.vs.length,s.push(u.vs),o+=u.barycenter*u.weight,a+=u.weight,l=sw(s,r,l)});var c={vs:Nr.flatten(s,!0)};return a&&(c.barycenter=o/a,c.weight=a),c}function sw(e,t,n){for(var i;t.length&&(i=Nr.last(t)).i<=n;)t.pop(),e.push(i.vs),n++;return n}function LW(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}});var uw=p((GG,cw)=>{var un=st(),DW=nw(),qW=rw(),IW=aw();cw.exports=lw;function lw(e,t,n,i){var r=e.children(t),s=e.node(t),o=s?s.borderLeft:void 0,a=s?s.borderRight:void 0,l={};o&&(r=un.filter(r,function(g){return g!==o&&g!==a}));var c=DW(e,r);un.forEach(c,function(g){if(e.children(g.v).length){var m=lw(e,g.v,n,i);l[g.v]=m,un.has(m,"barycenter")&&NW(g,m)}});var u=qW(c,n);RW(u,l);var d=IW(u,i);if(o&&(d.vs=un.flatten([o,d.vs,a],!0),e.predecessors(o).length)){var h=e.node(e.predecessors(o)[0]),f=e.node(e.predecessors(a)[0]);un.has(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+h.order+f.order)/(d.weight+2),d.weight+=2}return d}function RW(e,t){un.forEach(e,function(n){n.vs=un.flatten(n.vs.map(function(i){return t[i]?t[i].vs:i}),!0)})}function NW(e,t){un.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}});var hw=p((XG,dw)=>{var Fr=st(),FW=ie().Graph;dw.exports=BW;function BW(e,t,n){var i=zW(e),r=new FW({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(s){return e.node(s)});return Fr.forEach(e.nodes(),function(s){var o=e.node(s),a=e.parent(s);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(r.setNode(s),r.setParent(s,a||i),Fr.forEach(e[n](s),function(l){var c=l.v===s?l.w:l.v,u=r.edge(c,s),d=Fr.isUndefined(u)?0:u.weight;r.setEdge(c,s,{weight:e.edge(l).weight+d})}),Fr.has(o,"minRank")&&r.setNode(s,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),r}function zW(e){for(var t;e.hasNode(t=Fr.uniqueId("_root")););return t}});var pw=p((KG,fw)=>{var jW=st();fw.exports=$W;function $W(e,t,n){var i={},r;jW.forEach(n,function(s){for(var o=e.parent(s),a,l;o;){if(a=e.parent(o),a?(l=i[a],i[a]=o):(l=r,r=o),l&&l!==o){t.setEdge(l,o);return}o=a}})}});var yw=p((ZG,vw)=>{"use strict";var dn=st(),WW=Z_(),VW=Q_(),HW=uw(),UW=hw(),YW=pw(),GW=ie().Graph,gw=Pt();vw.exports=XW;function XW(e){var t=gw.maxRank(e),n=mw(e,dn.range(1,t+1),"inEdges"),i=mw(e,dn.range(t-1,-1,-1),"outEdges"),r=WW(e);bw(e,r);for(var s=Number.POSITIVE_INFINITY,o,a=0,l=0;l<4;++a,++l){KW(a%2?n:i,a%4>=2),r=gw.buildLayerMatrix(e);var c=VW(e,r);c<s&&(l=0,o=dn.cloneDeep(r),s=c)}bw(e,o)}function mw(e,t,n){return dn.map(t,function(i){return UW(e,i,n)})}function KW(e,t){var n=new GW;dn.forEach(e,function(i){var r=i.graph().root,s=HW(i,r,n,t);dn.forEach(s.vs,function(o,a){i.node(o).order=a}),YW(i,n,s.vs)})}function bw(e,t){dn.forEach(t,function(n){dn.forEach(n,function(i,r){e.node(i).order=r})})}});var Tw=p((JG,Cw)=>{"use strict";var N=st(),ZW=ie().Graph,JW=Pt();Cw.exports={positionX:eV,findType1Conflicts:xw,findType2Conflicts:_w,addConflict:wc,hasConflict:ww,verticalAlignment:kw,horizontalCompaction:Sw,alignCoordinates:Ew,findSmallestWidthAlignment:Mw,balance:Ow};function xw(e,t){var n={};function i(r,s){var o=0,a=0,l=r.length,c=N.last(s);return N.forEach(s,function(u,d){var h=QW(e,u),f=h?e.node(h).order:l;(h||u===c)&&(N.forEach(s.slice(a,d+1),function(g){N.forEach(e.predecessors(g),function(m){var b=e.node(m),y=b.order;(y<o||f<y)&&!(b.dummy&&e.node(g).dummy)&&wc(n,m,g)})}),a=d+1,o=f)}),s}return N.reduce(t,i),n}function _w(e,t){var n={};function i(s,o,a,l,c){var u;N.forEach(N.range(o,a),function(d){u=s[d],e.node(u).dummy&&N.forEach(e.predecessors(u),function(h){var f=e.node(h);f.dummy&&(f.order<l||f.order>c)&&wc(n,h,u)})})}function r(s,o){var a=-1,l,c=0;return N.forEach(o,function(u,d){if(e.node(u).dummy==="border"){var h=e.predecessors(u);h.length&&(l=e.node(h[0]).order,i(o,c,d,a,l),c=d,a=l)}i(o,c,o.length,l,s.length)}),o}return N.reduce(t,r),n}function QW(e,t){if(e.node(t).dummy)return N.find(e.predecessors(t),function(n){return e.node(n).dummy})}function wc(e,t,n){if(t>n){var i=t;t=n,n=i}var r=e[t];r||(e[t]=r={}),r[n]=!0}function ww(e,t,n){if(t>n){var i=t;t=n,n=i}return N.has(e[t],n)}function kw(e,t,n,i){var r={},s={},o={};return N.forEach(t,function(a){N.forEach(a,function(l,c){r[l]=l,s[l]=l,o[l]=c})}),N.forEach(t,function(a){var l=-1;N.forEach(a,function(c){var u=i(c);if(u.length){u=N.sortBy(u,function(m){return o[m]});for(var d=(u.length-1)/2,h=Math.floor(d),f=Math.ceil(d);h<=f;++h){var g=u[h];s[c]===c&&l<o[g]&&!ww(n,c,g)&&(s[g]=c,s[c]=r[c]=r[g],l=o[g])}}})}),{root:r,align:s}}function Sw(e,t,n,i,r){var s={},o=tV(e,t,n,r),a=r?"borderLeft":"borderRight";function l(d,h){for(var f=o.nodes(),g=f.pop(),m={};g;)m[g]?d(g):(m[g]=!0,f.push(g),f=f.concat(h(g))),g=f.pop()}function c(d){s[d]=o.inEdges(d).reduce(function(h,f){return Math.max(h,s[f.v]+o.edge(f))},0)}function u(d){var h=o.outEdges(d).reduce(function(g,m){return Math.min(g,s[m.w]-o.edge(m))},Number.POSITIVE_INFINITY),f=e.node(d);h!==Number.POSITIVE_INFINITY&&f.borderType!==a&&(s[d]=Math.max(s[d],h))}return l(c,o.predecessors.bind(o)),l(u,o.successors.bind(o)),N.forEach(i,function(d){s[d]=s[n[d]]}),s}function tV(e,t,n,i){var r=new ZW,s=e.graph(),o=nV(s.nodesep,s.edgesep,i);return N.forEach(t,function(a){var l;N.forEach(a,function(c){var u=n[c];if(r.setNode(u),l){var d=n[l],h=r.edge(d,u);r.setEdge(d,u,Math.max(o(e,c,l),h||0))}l=c})}),r}function Mw(e,t){return N.minBy(N.values(t),function(n){var i=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;return N.forIn(n,function(s,o){var a=iV(e,o)/2;i=Math.max(s+a,i),r=Math.min(s-a,r)}),i-r})}function Ew(e,t){var n=N.values(t),i=N.min(n),r=N.max(n);N.forEach(["u","d"],function(s){N.forEach(["l","r"],function(o){var a=s+o,l=e[a],c;if(l!==t){var u=N.values(l);c=o==="l"?i-N.min(u):r-N.max(u),c&&(e[a]=N.mapValues(l,function(d){return d+c}))}})})}function Ow(e,t){return N.mapValues(e.ul,function(n,i){if(t)return e[t.toLowerCase()][i];var r=N.sortBy(N.map(e,i));return(r[1]+r[2])/2})}function eV(e){var t=JW.buildLayerMatrix(e),n=N.merge(xw(e,t),_w(e,t)),i={},r;N.forEach(["u","d"],function(o){r=o==="u"?t:N.values(t).reverse(),N.forEach(["l","r"],function(a){a==="r"&&(r=N.map(r,function(d){return N.values(d).reverse()}));var l=(o==="u"?e.predecessors:e.successors).bind(e),c=kw(e,r,n,l),u=Sw(e,r,c.root,c.align,a==="r");a==="r"&&(u=N.mapValues(u,function(d){return-d})),i[o+a]=u})});var s=Mw(e,i);return Ew(i,s),Ow(i,e.graph().align)}function nV(e,t,n){return function(i,r,s){var o=i.node(r),a=i.node(s),l=0,c;if(l+=o.width/2,N.has(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":c=-o.width/2;break;case"r":c=o.width/2;break}if(c&&(l+=n?c:-c),c=0,l+=(o.dummy?t:e)/2,l+=(a.dummy?t:e)/2,l+=a.width/2,N.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":c=a.width/2;break;case"r":c=-a.width/2;break}return c&&(l+=n?c:-c),c=0,l}}function iV(e,t){return e.node(t).width}});var Lw=p((QG,Pw)=>{"use strict";var Br=st(),Aw=Pt(),rV=Tw().positionX;Pw.exports=sV;function sV(e){e=Aw.asNonCompoundGraph(e),oV(e),Br.forEach(rV(e),function(t,n){e.node(n).x=t})}function oV(e){var t=Aw.buildLayerMatrix(e),n=e.graph().ranksep,i=0;Br.forEach(t,function(r){var s=Br.max(Br.map(r,function(o){return e.node(o).height}));Br.forEach(r,function(o){e.node(o).y=i+s/2}),i+=s+n})}});var Fw=p((tX,Nw)=>{"use strict";var z=st(),Dw=m_(),qw=k_(),aV=N_(),lV=Pt().normalizeRanks,cV=B_(),uV=Pt().removeEmptyRanks,Iw=$_(),dV=H_(),Rw=X_(),hV=yw(),fV=Lw(),hn=Pt(),pV=ie().Graph;Nw.exports=gV;function gV(e,t){var n=t&&t.debugTiming?hn.time:hn.notime;n("layout",function(){var i=n(" buildLayoutGraph",function(){return EV(e)});n(" runLayout",function(){mV(i,n)}),n(" updateInputGraph",function(){bV(e,i)})})}function mV(e,t){t(" makeSpaceForEdgeLabels",function(){OV(e)}),t(" removeSelfEdges",function(){RV(e)}),t(" acyclic",function(){Dw.run(e)}),t(" nestingGraph.run",function(){Iw.run(e)}),t(" rank",function(){aV(hn.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){CV(e)}),t(" removeEmptyRanks",function(){uV(e)}),t(" nestingGraph.cleanup",function(){Iw.cleanup(e)}),t(" normalizeRanks",function(){lV(e)}),t(" assignRankMinMax",function(){TV(e)}),t(" removeEdgeLabelProxies",function(){AV(e)}),t(" normalize.run",function(){qw.run(e)}),t(" parentDummyChains",function(){cV(e)}),t(" addBorderSegments",function(){dV(e)}),t(" order",function(){hV(e)}),t(" insertSelfEdges",function(){NV(e)}),t(" adjustCoordinateSystem",function(){Rw.adjust(e)}),t(" position",function(){fV(e)}),t(" positionSelfEdges",function(){FV(e)}),t(" removeBorderNodes",function(){IV(e)}),t(" normalize.undo",function(){qw.undo(e)}),t(" fixupEdgeLabelCoords",function(){DV(e)}),t(" undoCoordinateSystem",function(){Rw.undo(e)}),t(" translateGraph",function(){PV(e)}),t(" assignNodeIntersects",function(){LV(e)}),t(" reversePoints",function(){qV(e)}),t(" acyclic.undo",function(){Dw.undo(e)})}function bV(e,t){z.forEach(e.nodes(),function(n){var i=e.node(n),r=t.node(n);i&&(i.x=r.x,i.y=r.y,t.children(n).length&&(i.width=r.width,i.height=r.height))}),z.forEach(e.edges(),function(n){var i=e.edge(n),r=t.edge(n);i.points=r.points,z.has(r,"x")&&(i.x=r.x,i.y=r.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var vV=["nodesep","edgesep","ranksep","marginx","marginy"],yV={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},xV=["acyclicer","ranker","rankdir","align"],_V=["width","height"],wV={width:0,height:0},kV=["minlen","weight","width","height","labeloffset"],SV={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},MV=["labelpos"];function EV(e){var t=new pV({multigraph:!0,compound:!0}),n=Sc(e.graph());return t.setGraph(z.merge({},yV,kc(n,vV),z.pick(n,xV))),z.forEach(e.nodes(),function(i){var r=Sc(e.node(i));t.setNode(i,z.defaults(kc(r,_V),wV)),t.setParent(i,e.parent(i))}),z.forEach(e.edges(),function(i){var r=Sc(e.edge(i));t.setEdge(i,z.merge({},SV,kc(r,kV),z.pick(r,MV)))}),t}function OV(e){var t=e.graph();t.ranksep/=2,z.forEach(e.edges(),function(n){var i=e.edge(n);i.minlen*=2,i.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function CV(e){z.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var i=e.node(t.v),r=e.node(t.w),s={rank:(r.rank-i.rank)/2+i.rank,e:t};hn.addDummyNode(e,"edge-proxy",s,"_ep")}})}function TV(e){var t=0;z.forEach(e.nodes(),function(n){var i=e.node(n);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=z.max(t,i.maxRank))}),e.graph().maxRank=t}function AV(e){z.forEach(e.nodes(),function(t){var n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function PV(e){var t=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,r=0,s=e.graph(),o=s.marginx||0,a=s.marginy||0;function l(c){var u=c.x,d=c.y,h=c.width,f=c.height;t=Math.min(t,u-h/2),n=Math.max(n,u+h/2),i=Math.min(i,d-f/2),r=Math.max(r,d+f/2)}z.forEach(e.nodes(),function(c){l(e.node(c))}),z.forEach(e.edges(),function(c){var u=e.edge(c);z.has(u,"x")&&l(u)}),t-=o,i-=a,z.forEach(e.nodes(),function(c){var u=e.node(c);u.x-=t,u.y-=i}),z.forEach(e.edges(),function(c){var u=e.edge(c);z.forEach(u.points,function(d){d.x-=t,d.y-=i}),z.has(u,"x")&&(u.x-=t),z.has(u,"y")&&(u.y-=i)}),s.width=n-t+o,s.height=r-i+a}function LV(e){z.forEach(e.edges(),function(t){var n=e.edge(t),i=e.node(t.v),r=e.node(t.w),s,o;n.points?(s=n.points[0],o=n.points[n.points.length-1]):(n.points=[],s=r,o=i),n.points.unshift(hn.intersectRect(i,s)),n.points.push(hn.intersectRect(r,o))})}function DV(e){z.forEach(e.edges(),function(t){var n=e.edge(t);if(z.has(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function qV(e){z.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function IV(e){z.forEach(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),i=e.node(n.borderTop),r=e.node(n.borderBottom),s=e.node(z.last(n.borderLeft)),o=e.node(z.last(n.borderRight));n.width=Math.abs(o.x-s.x),n.height=Math.abs(r.y-i.y),n.x=s.x+n.width/2,n.y=i.y+n.height/2}}),z.forEach(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function RV(e){z.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function NV(e){var t=hn.buildLayerMatrix(e);z.forEach(t,function(n){var i=0;z.forEach(n,function(r,s){var o=e.node(r);o.order=s+i,z.forEach(o.selfEdges,function(a){hn.addDummyNode(e,"selfedge",{width:a.label.width,height:a.label.height,rank:o.rank,order:s+ ++i,e:a.e,label:a.label},"_se")}),delete o.selfEdges})})}function FV(e){z.forEach(e.nodes(),function(t){var n=e.node(t);if(n.dummy==="selfedge"){var i=e.node(n.e.v),r=i.x+i.width/2,s=i.y,o=n.x-r,a=i.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:r+2*o/3,y:s-a},{x:r+5*o/6,y:s-a},{x:r+o,y:s},{x:r+5*o/6,y:s+a},{x:r+2*o/3,y:s+a}],n.label.x=n.x,n.label.y=n.y}})}function kc(e,t){return z.mapValues(z.pick(e,t),Number)}function Sc(e){var t={};return z.forEach(e,function(n,i){t[i.toLowerCase()]=n}),t}});var zw=p((eX,Bw)=>{var ko=st(),BV=Pt(),zV=ie().Graph;Bw.exports={debugOrdering:jV};function jV(e){var t=BV.buildLayerMatrix(e),n=new zV({compound:!0,multigraph:!0}).setGraph({});return ko.forEach(e.nodes(),function(i){n.setNode(i,{label:i}),n.setParent(i,"layer"+e.node(i).rank)}),ko.forEach(e.edges(),function(i){n.setEdge(i.v,i.w,{},i.name)}),ko.forEach(t,function(i,r){var s="layer"+r;n.setNode(s,{rank:"same"}),ko.reduce(i,function(o,a){return n.setEdge(o,a,{style:"invis"}),a})}),n}});var $w=p((nX,jw)=>{jw.exports="0.8.5"});var Vw=p((iX,Ww)=>{Ww.exports={graphlib:ie(),layout:Fw(),debug:zw(),util:{time:Pt().time,notime:Pt().notime},version:$w()}});var Mo=Ec(Cc());var To="oban:";function Tc(){let e={};for(let[t,n]of Object.entries(localStorage))t.startsWith(To)&&(e[t]=JSON.parse(n));return e}function Gn(e){let t=localStorage.getItem(To+e);if(t)return JSON.parse(t)}function fe(e,t){localStorage.setItem(To+e,JSON.stringify(t))}var o1={mounted(){let e=document.querySelector("#search-input");e.addEventListener("keydown",t=>{if(t.key==="Tab"&&(t.preventDefault(),this.pushEventTo("#search","complete",{})),t.key==="Escape"){e.blur();let n=document.querySelector("#search-suggest"),i=n.getAttribute("phx-click-away");this.liveSocket.execJS(n,i,"click")}}),this.handleEvent("completed",({buffer:t})=>{e.value=t})}},Ac=o1;function Bi(e){return e+.5|0}var je=(e,t,n)=>Math.max(Math.min(e,n),t);function Fi(e){return je(Bi(e*2.55),0,255)}function $e(e){return je(Bi(e*255),0,255)}function Se(e){return je(Bi(e/2.55)/100,0,1)}function Pc(e){return je(Bi(e*100),0,100)}var Gt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Po=[..."0123456789ABCDEF"],a1=e=>Po[e&15],l1=e=>Po[(e&240)>>4]+Po[e&15],Jr=e=>(e&240)>>4===(e&15),c1=e=>Jr(e.r)&&Jr(e.g)&&Jr(e.b)&&Jr(e.a);function u1(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Gt[e[1]]*17,g:255&Gt[e[2]]*17,b:255&Gt[e[3]]*17,a:t===5?Gt[e[4]]*17:255}:(t===7||t===9)&&(n={r:Gt[e[1]]<<4|Gt[e[2]],g:Gt[e[3]]<<4|Gt[e[4]],b:Gt[e[5]]<<4|Gt[e[6]],a:t===9?Gt[e[7]]<<4|Gt[e[8]]:255})),n}var d1=(e,t)=>e<255?t(e):"";function h1(e){var t=c1(e)?a1:l1;return e?"#"+t(e.r)+t(e.g)+t(e.b)+d1(e.a,t):void 0}var f1=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ic(e,t,n){let i=t*Math.min(n,1-n),r=(s,o=(s+e/30)%12)=>n-i*Math.max(Math.min(o-3,9-o,1),-1);return[r(0),r(8),r(4)]}function p1(e,t,n){let i=(r,s=(r+e/60)%6)=>n-n*t*Math.max(Math.min(s,4-s,1),0);return[i(5),i(3),i(1)]}function g1(e,t,n){let i=Ic(e,1,.5),r;for(t+n>1&&(r=1/(t+n),t*=r,n*=r),r=0;r<3;r++)i[r]*=1-t-n,i[r]+=t;return i}function m1(e,t,n,i,r){return e===r?(t-n)/i+(t<n?6:0):t===r?(n-e)/i+2:(e-t)/i+4}function Lo(e){let n=e.r/255,i=e.g/255,r=e.b/255,s=Math.max(n,i,r),o=Math.min(n,i,r),a=(s+o)/2,l,c,u;return s!==o&&(u=s-o,c=a>.5?u/(2-s-o):u/(s+o),l=m1(n,i,r,u,s),l=l*60+.5),[l|0,c||0,a]}function Do(e,t,n,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,i)).map($e)}function qo(e,t,n){return Do(Ic,e,t,n)}function b1(e,t,n){return Do(g1,e,t,n)}function v1(e,t,n){return Do(p1,e,t,n)}function Rc(e){return(e%360+360)%360}function y1(e){let t=f1.exec(e),n=255,i;if(!t)return;t[5]!==i&&(n=t[6]?Fi(+t[5]):$e(+t[5]));let r=Rc(+t[2]),s=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?i=b1(r,s,o):t[1]==="hsv"?i=v1(r,s,o):i=qo(r,s,o),{r:i[0],g:i[1],b:i[2],a:n}}function x1(e,t){var n=Lo(e);n[0]=Rc(n[0]+t),n=qo(n),e.r=n[0],e.g=n[1],e.b=n[2]}function _1(e){if(!e)return;let t=Lo(e),n=t[0],i=Pc(t[1]),r=Pc(t[2]);return e.a<255?`hsla(${n}, ${i}%, ${r}%, ${Se(e.a)})`:`hsl(${n}, ${i}%, ${r}%)`}var Lc={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Dc={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function w1(){let e={},t=Object.keys(Dc),n=Object.keys(Lc),i,r,s,o,a;for(i=0;i<t.length;i++){for(o=a=t[i],r=0;r<n.length;r++)s=n[r],a=a.replace(s,Lc[s]);s=parseInt(Dc[o],16),e[a]=[s>>16&255,s>>8&255,s&255]}return e}var Qr;function k1(e){Qr||(Qr=w1(),Qr.transparent=[0,0,0,0]);let t=Qr[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var S1=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function M1(e){let t=S1.exec(e),n=255,i,r,s;if(!!t){if(t[7]!==i){let o=+t[7];n=t[8]?Fi(o):je(o*255,0,255)}return i=+t[1],r=+t[3],s=+t[5],i=255&(t[2]?Fi(i):je(i,0,255)),r=255&(t[4]?Fi(r):je(r,0,255)),s=255&(t[6]?Fi(s):je(s,0,255)),{r:i,g:r,b:s,a:n}}}function E1(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Se(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}var Ao=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Xn=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function O1(e,t,n){let i=Xn(Se(e.r)),r=Xn(Se(e.g)),s=Xn(Se(e.b));return{r:$e(Ao(i+n*(Xn(Se(t.r))-i))),g:$e(Ao(r+n*(Xn(Se(t.g))-r))),b:$e(Ao(s+n*(Xn(Se(t.b))-s))),a:e.a+n*(t.a-e.a)}}function ts(e,t,n){if(e){let i=Lo(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*n,t===0?360:1)),i=qo(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function Nc(e,t){return e&&Object.assign(t||{},e)}function qc(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=$e(e[3]))):(t=Nc(e,{r:0,g:0,b:0,a:1}),t.a=$e(t.a)),t}function C1(e){return e.charAt(0)==="r"?M1(e):y1(e)}var We=class{constructor(t){if(t instanceof We)return t;let n=typeof t,i;n==="object"?i=qc(t):n==="string"&&(i=u1(t)||k1(t)||C1(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Nc(this._rgb);return t&&(t.a=Se(t.a)),t}set rgb(t){this._rgb=qc(t)}rgbString(){return this._valid?E1(this._rgb):void 0}hexString(){return this._valid?h1(this._rgb):void 0}hslString(){return this._valid?_1(this._rgb):void 0}mix(t,n){if(t){let i=this.rgb,r=t.rgb,s,o=n===s?.5:n,a=2*o-1,l=i.a-r.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;s=1-c,i.r=255&c*i.r+s*r.r+.5,i.g=255&c*i.g+s*r.g+.5,i.b=255&c*i.b+s*r.b+.5,i.a=o*i.a+(1-o)*r.a,this.rgb=i}return this}interpolate(t,n){return t&&(this._rgb=O1(this._rgb,t._rgb,n)),this}clone(){return new We(this.rgb)}alpha(t){return this._rgb.a=$e(t),this}clearer(t){let n=this._rgb;return n.a*=1-t,this}greyscale(){let t=this._rgb,n=Bi(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){let n=this._rgb;return n.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return ts(this._rgb,2,t),this}darken(t){return ts(this._rgb,2,-t),this}saturate(t){return ts(this._rgb,1,t),this}desaturate(t){return ts(this._rgb,1,-t),this}rotate(t){return x1(this._rgb,t),this}};function ge(){}var Gc=(()=>{let e=0;return()=>e++})();function X(e){return e==null}function at(e){if(Array.isArray&&Array.isArray(e))return!0;let t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function H(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function vt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function qt(e,t){return vt(e)?e:t}function W(e,t){return typeof e>"u"?t:e}var Xc=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function et(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function K(e,t,n,i){let r,s,o;if(at(e))if(s=e.length,i)for(r=s-1;r>=0;r--)t.call(n,e[r],r);else for(r=0;r<s;r++)t.call(n,e[r],r);else if(H(e))for(o=Object.keys(e),s=o.length,r=0;r<s;r++)t.call(n,e[o[r]],o[r])}function $i(e,t){let n,i,r,s;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(r=e[n],s=t[n],r.datasetIndex!==s.datasetIndex||r.index!==s.index)return!1;return!0}function rs(e){if(at(e))return e.map(rs);if(H(e)){let t=Object.create(null),n=Object.keys(e),i=n.length,r=0;for(;r<i;++r)t[n[r]]=rs(e[n[r]]);return t}return e}function Kc(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function T1(e,t,n,i){if(!Kc(e))return;let r=t[e],s=n[e];H(r)&&H(s)?Zn(r,s,i):t[e]=rs(s)}function Zn(e,t,n){let i=at(t)?t:[t],r=i.length;if(!H(e))return e;n=n||{};let s=n.merger||T1,o;for(let a=0;a<r;++a){if(o=i[a],!H(o))continue;let l=Object.keys(o);for(let c=0,u=l.length;c<u;++c)s(l[c],e,o,n)}return e}function Qn(e,t){return Zn(e,t,{merger:A1})}function A1(e,t,n){if(!Kc(e))return;let i=t[e],r=n[e];H(i)&&H(r)?Qn(i,r):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=rs(r))}var Fc={"":e=>e,x:e=>e.x,y:e=>e.y};function P1(e){let t=e.split("."),n=[],i="";for(let r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function L1(e){let t=P1(e);return n=>{for(let i of t){if(i==="")break;n=n&&n[i]}return n}}function vn(e,t){return(Fc[t]||(Fc[t]=L1(t)))(e)}function ls(e){return e.charAt(0).toUpperCase()+e.slice(1)}var ti=e=>typeof e<"u",Me=e=>typeof e=="function",Fo=(e,t)=>{if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0};function Zc(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}var bt=Math.PI,Bt=2*bt,D1=Bt+bt,ss=Number.POSITIVE_INFINITY,q1=bt/180,Lt=bt/2,gn=bt/4,Bc=bt*2/3,Ee=Math.log10,re=Math.sign;function ei(e,t,n){return Math.abs(e-t)<n}function Bo(e){let t=Math.round(e);e=ei(e,t,e/1e3)?t:e;let n=Math.pow(10,Math.floor(Ee(e))),i=e/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function Jc(e){let t=[],n=Math.sqrt(e),i;for(i=1;i<n;i++)e%i===0&&(t.push(i),t.push(e/i));return n===(n|0)&&t.push(n),t.sort((r,s)=>r-s).pop(),t}function ni(e){return!isNaN(parseFloat(e))&&isFinite(e)}function Qc(e,t){let n=Math.round(e);return n-t<=e&&n+t>=e}function zo(e,t,n){let i,r,s;for(i=0,r=e.length;i<r;i++)s=e[i][n],isNaN(s)||(t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))}function Oe(e){return e*(bt/180)}function cs(e){return e*(180/bt)}function jo(e){if(!vt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function tu(e,t){let n=t.x-e.x,i=t.y-e.y,r=Math.sqrt(n*n+i*i),s=Math.atan2(i,n);return s<-.5*bt&&(s+=Bt),{angle:s,distance:r}}function os(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function I1(e,t){return(e-t+D1)%Bt-bt}function Xt(e){return(e%Bt+Bt)%Bt}function $o(e,t,n,i){let r=Xt(e),s=Xt(t),o=Xt(n),a=Xt(s-r),l=Xt(o-r),c=Xt(r-s),u=Xt(r-o);return r===s||r===o||i&&s===o||a>l&&c<u}function Dt(e,t,n){return Math.max(t,Math.min(n,e))}function eu(e){return Dt(e,-32768,32767)}function Ue(e,t,n,i=1e-6){return e>=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function us(e,t,n){n=n||(o=>e[o]<t);let i=e.length-1,r=0,s;for(;i-r>1;)s=r+i>>1,n(s)?r=s:i=s;return{lo:r,hi:i}}var He=(e,t,n,i)=>us(e,n,i?r=>{let s=e[r][t];return s<n||s===n&&e[r+1][t]===n}:r=>e[r][t]<n),nu=(e,t,n)=>us(e,n,i=>e[i][t]>=n);function iu(e,t,n){let i=0,r=e.length;for(;i<r&&e[i]<t;)i++;for(;r>i&&e[r-1]>n;)r--;return i>0||r<e.length?e.slice(i,r):e}var ru=["push","pop","shift","splice","unshift"];function su(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),ru.forEach(n=>{let i="_onData"+ls(n),r=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...s){let o=r.apply(this,s);return e._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...s)}),o}})})}function Wo(e,t){let n=e._chartjs;if(!n)return;let i=n.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(ru.forEach(s=>{delete e[s]}),delete e._chartjs)}function Vo(e){let t=new Set(e);return t.size===e.length?e:Array.from(t)}var Ho=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function Uo(e,t){let n=[],i=!1;return function(...r){n=r,i||(i=!0,Ho.call(window,()=>{i=!1,e.apply(t,n)}))}}function ou(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}var Yo=e=>e==="start"?"left":e==="end"?"right":"center",It=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,au=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t;function lu(e,t,n){let i=t.length,r=0,s=i;if(e._sorted){let{iScale:o,_parsed:a}=e,l=o.axis,{min:c,max:u,minDefined:d,maxDefined:h}=o.getUserBounds();d&&(r=Dt(Math.min(He(a,l,c).lo,n?i:He(t,l,o.getPixelForValue(c)).lo),0,i-1)),h?s=Dt(Math.max(He(a,o.axis,u,!0).hi+1,n?0:He(t,l,o.getPixelForValue(u),!0).hi+1),r,i)-r:s=i-r}return{start:r,count:s}}function cu(e){let{xScale:t,yScale:n,_scaleRanges:i}=e,r={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!i)return e._scaleRanges=r,!0;let s=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,r),s}var es=e=>e===0||e===1,zc=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Bt/n)),jc=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Bt/n)+1,Kn={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Lt)+1,easeOutSine:e=>Math.sin(e*Lt),easeInOutSine:e=>-.5*(Math.cos(bt*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>es(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>es(e)?e:zc(e,.075,.3),easeOutElastic:e=>es(e)?e:jc(e,.075,.3),easeInOutElastic(e){return es(e)?e:e<.5?.5*zc(e*2,.1125,.45):.5+.5*jc(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Kn.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Kn.easeInBounce(e*2)*.5:Kn.easeOutBounce(e*2-1)*.5+.5};function Go(e){if(e&&typeof e=="object"){let t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Xo(e){return Go(e)?e:new We(e)}function Io(e){return Go(e)?e:new We(e).saturate(.5).darken(.1).hexString()}var R1=["x","y","borderWidth","radius","tension"],N1=["color","borderColor","backgroundColor"];function F1(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:N1},numbers:{type:"number",properties:R1}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function B1(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var $c=new Map;function z1(e,t){t=t||{};let n=e+JSON.stringify(t),i=$c.get(n);return i||(i=new Intl.NumberFormat(e,t),$c.set(n,i)),i}function ds(e,t,n){return z1(t,n).format(e)}var uu={values(e){return at(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";let i=this.chart.options.locale,r,s=e;if(n.length>1){let c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(r="scientific"),s=j1(e,n)}let o=Ee(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),ds(e,i,l)},logarithmic(e,t,n){if(e===0)return"0";let i=n[t].significand||e/Math.pow(10,Math.floor(Ee(e)));return[1,2,3,5,10,15].includes(i)||t>.8*n.length?uu.numeric.call(this,e,t,n):""}};function j1(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Wi={formatters:uu};function $1(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Wi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}var Ye=Object.create(null),hs=Object.create(null);function zi(e,t){if(!t)return e;let n=t.split(".");for(let i=0,r=n.length;i<r;++i){let s=n[i];e=e[s]||(e[s]=Object.create(null))}return e}function Ro(e,t,n){return typeof t=="string"?Zn(zi(e,t),n):Zn(zi(e,""),t)}var No=class{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,r)=>Io(r.backgroundColor),this.hoverBorderColor=(i,r)=>Io(r.borderColor),this.hoverColor=(i,r)=>Io(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Ro(this,t,n)}get(t){return zi(this,t)}describe(t,n){return Ro(hs,t,n)}override(t,n){return Ro(Ye,t,n)}route(t,n,i,r){let s=zi(this,t),o=zi(this,i),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){let l=this[a],c=o[r];return H(l)?Object.assign({},c,l):W(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}},ct=new No({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[F1,B1,$1]);function W1(e){return!e||X(e.size)||X(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function ji(e,t,n,i,r){let s=t[r];return s||(s=t[r]=e.measureText(r).width,n.push(r)),s>i&&(i=s),i}function du(e,t,n,i){i=i||{};let r=i.data=i.data||{},s=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(r=i.data={},s=i.garbageCollect=[],i.font=t),e.save(),e.font=t;let o=0,a=n.length,l,c,u,d,h;for(l=0;l<a;l++)if(d=n[l],d!=null&&!at(d))o=ji(e,r,s,o,d);else if(at(d))for(c=0,u=d.length;c<u;c++)h=d[c],h!=null&&!at(h)&&(o=ji(e,r,s,o,h));e.restore();let f=s.length/2;if(f>n.length){for(l=0;l<f;l++)delete r[s[l]];s.splice(0,f)}return o}function Ge(e,t,n){let i=e.currentDevicePixelRatio,r=n!==0?Math.max(n/2,.5):0;return Math.round((t-r)*i)/i+r}function Ko(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function fs(e,t,n,i){Zo(e,t,n,i,null)}function Zo(e,t,n,i,r){let s,o,a,l,c,u,d,h,f=t.pointStyle,g=t.rotation,m=t.radius,b=(g||0)*q1;if(f&&typeof f=="object"&&(s=f.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){e.save(),e.translate(n,i),e.rotate(b),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),e.restore();return}if(!(isNaN(m)||m<=0)){switch(e.beginPath(),f){default:r?e.ellipse(n,i,r/2,m,0,0,Bt):e.arc(n,i,m,0,Bt),e.closePath();break;case"triangle":u=r?r/2:m,e.moveTo(n+Math.sin(b)*u,i-Math.cos(b)*m),b+=Bc,e.lineTo(n+Math.sin(b)*u,i-Math.cos(b)*m),b+=Bc,e.lineTo(n+Math.sin(b)*u,i-Math.cos(b)*m),e.closePath();break;case"rectRounded":c=m*.516,l=m-c,o=Math.cos(b+gn)*l,d=Math.cos(b+gn)*(r?r/2-c:l),a=Math.sin(b+gn)*l,h=Math.sin(b+gn)*(r?r/2-c:l),e.arc(n-d,i-a,c,b-bt,b-Lt),e.arc(n+h,i-o,c,b-Lt,b),e.arc(n+d,i+a,c,b,b+Lt),e.arc(n-h,i+o,c,b+Lt,b+bt),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*m,u=r?r/2:l,e.rect(n-u,i-l,2*u,2*l);break}b+=gn;case"rectRot":d=Math.cos(b)*(r?r/2:m),o=Math.cos(b)*m,a=Math.sin(b)*m,h=Math.sin(b)*(r?r/2:m),e.moveTo(n-d,i-a),e.lineTo(n+h,i-o),e.lineTo(n+d,i+a),e.lineTo(n-h,i+o),e.closePath();break;case"crossRot":b+=gn;case"cross":d=Math.cos(b)*(r?r/2:m),o=Math.cos(b)*m,a=Math.sin(b)*m,h=Math.sin(b)*(r?r/2:m),e.moveTo(n-d,i-a),e.lineTo(n+d,i+a),e.moveTo(n+h,i-o),e.lineTo(n-h,i+o);break;case"star":d=Math.cos(b)*(r?r/2:m),o=Math.cos(b)*m,a=Math.sin(b)*m,h=Math.sin(b)*(r?r/2:m),e.moveTo(n-d,i-a),e.lineTo(n+d,i+a),e.moveTo(n+h,i-o),e.lineTo(n-h,i+o),b+=gn,d=Math.cos(b)*(r?r/2:m),o=Math.cos(b)*m,a=Math.sin(b)*m,h=Math.sin(b)*(r?r/2:m),e.moveTo(n-d,i-a),e.lineTo(n+d,i+a),e.moveTo(n+h,i-o),e.lineTo(n-h,i+o);break;case"line":o=r?r/2:Math.cos(b)*m,a=Math.sin(b)*m,e.moveTo(n-o,i-a),e.lineTo(n+o,i+a);break;case"dash":e.moveTo(n,i),e.lineTo(n+Math.cos(b)*(r?r/2:m),i+Math.sin(b)*m);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function pe(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function ps(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function gs(e){e.restore()}function hu(e,t,n,i,r){if(!t)return e.lineTo(n.x,n.y);if(r==="middle"){let s=(t.x+n.x)/2;e.lineTo(s,t.y),e.lineTo(s,n.y)}else r==="after"!=!!i?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function fu(e,t,n,i){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function V1(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),X(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function H1(e,t,n,i,r){if(r.strikethrough||r.underline){let s=e.measureText(i),o=t-s.actualBoundingBoxLeft,a=t+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,c=n+s.actualBoundingBoxDescent,u=r.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=r.decorationWidth||2,e.moveTo(o,u),e.lineTo(a,u),e.stroke()}}function U1(e,t){let n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function yn(e,t,n,i,r,s={}){let o=at(t)?t:[t],a=s.strokeWidth>0&&s.strokeColor!=="",l,c;for(e.save(),e.font=r.string,V1(e,s),l=0;l<o.length;++l)c=o[l],s.backdrop&&U1(e,s.backdrop),a&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),X(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(c,n,i,s.maxWidth)),e.fillText(c,n,i,s.maxWidth),H1(e,n,i,c,s),i+=Number(r.lineHeight);e.restore()}function ii(e,t){let{x:n,y:i,w:r,h:s,radius:o}=t;e.arc(n+o.topLeft,i+o.topLeft,o.topLeft,1.5*bt,bt,!0),e.lineTo(n,i+s-o.bottomLeft),e.arc(n+o.bottomLeft,i+s-o.bottomLeft,o.bottomLeft,bt,Lt,!0),e.lineTo(n+r-o.bottomRight,i+s),e.arc(n+r-o.bottomRight,i+s-o.bottomRight,o.bottomRight,Lt,0,!0),e.lineTo(n+r,i+o.topRight),e.arc(n+r-o.topRight,i+o.topRight,o.topRight,0,-Lt,!0),e.lineTo(n+o.topLeft,i)}var Y1=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,G1=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function X1(e,t){let n=(""+e).match(Y1);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}var K1=e=>+e||0;function Jo(e,t){let n={},i=H(t),r=i?Object.keys(t):t,s=H(e)?i?o=>W(e[o],e[t[o]]):o=>e[o]:()=>e;for(let o of r)n[o]=K1(s(o));return n}function Qo(e){return Jo(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Xe(e){return Jo(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Ot(e){let t=Qo(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function kt(e,t){e=e||{},t=t||ct.font;let n=W(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=W(e.style,t.style);i&&!(""+i).match(G1)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);let r={family:W(e.family,t.family),lineHeight:X1(W(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:W(e.weight,t.weight),string:""};return r.string=W1(r),r}function Vi(e,t,n,i){let r=!0,s,o,a;for(s=0,o=e.length;s<o;++s)if(a=e[s],a!==void 0&&(t!==void 0&&typeof a=="function"&&(a=a(t),r=!1),n!==void 0&&at(a)&&(a=a[n%a.length],r=!1),a!==void 0))return i&&!r&&(i.cacheable=!1),a}function pu(e,t,n){let{min:i,max:r}=e,s=Xc(t,(r-i)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(i,-Math.abs(s)),max:o(r,s)}}function Ce(e,t){return Object.assign(Object.create(e),t)}function ms(e,t=[""],n,i,r=()=>e[0]){let s=n||e;typeof i>"u"&&(i=bu("_fallback",e));let o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:i,_getTarget:r,override:a=>ms([a,...e],t,s,i)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return gu(a,l,()=>rk(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return Vc(a).includes(l)},ownKeys(a){return Vc(a)},set(a,l,c){let u=a._storage||(a._storage=r());return a[l]=u[l]=c,delete a._keys,!0}})}function bn(e,t,n,i){let r={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:ta(e,i),setContext:s=>bn(e,s,n,i),override:s=>bn(e.override(s),t,n,i)};return new Proxy(r,{deleteProperty(s,o){return delete s[o],delete e[o],!0},get(s,o,a){return gu(s,o,()=>J1(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(s,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(s,o,a){return e[o]=a,delete s[o],!0}})}function ta(e,t={scriptable:!0,indexable:!0}){let{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=e;return{allKeys:r,scriptable:n,indexable:i,isScriptable:Me(n)?n:()=>n,isIndexable:Me(i)?i:()=>i}}var Z1=(e,t)=>e?e+ls(t):t,ea=(e,t)=>H(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function gu(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];let i=n();return e[t]=i,i}function J1(e,t,n){let{_proxy:i,_context:r,_subProxy:s,_descriptors:o}=e,a=i[t];return Me(a)&&o.isScriptable(t)&&(a=Q1(t,a,e,n)),at(a)&&a.length&&(a=tk(t,a,e,o.isIndexable)),ea(t,a)&&(a=bn(a,r,s&&s[t],o)),a}function Q1(e,t,n,i){let{_proxy:r,_context:s,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(s,o||i);return a.delete(e),ea(e,l)&&(l=na(r._scopes,r,e,l)),l}function tk(e,t,n,i){let{_proxy:r,_context:s,_subProxy:o,_descriptors:a}=n;if(typeof s.index<"u"&&i(e))return t[s.index%t.length];if(H(t[0])){let l=t,c=r._scopes.filter(u=>u!==l);t=[];for(let u of l){let d=na(c,r,e,u);t.push(bn(d,s,o&&o[e],a))}}return t}function mu(e,t,n){return Me(e)?e(t,n):e}var ek=(e,t)=>e===!0?t:typeof e=="string"?vn(t,e):void 0;function nk(e,t,n,i,r){for(let s of t){let o=ek(n,s);if(o){e.add(o);let a=mu(o._fallback,n,r);if(typeof a<"u"&&a!==n&&a!==i)return a}else if(o===!1&&typeof i<"u"&&n!==i)return null}return!1}function na(e,t,n,i){let r=t._rootScopes,s=mu(t._fallback,n,i),o=[...e,...r],a=new Set;a.add(i);let l=Wc(a,o,n,s||n,i);return l===null||typeof s<"u"&&s!==n&&(l=Wc(a,o,s,l,i),l===null)?!1:ms(Array.from(a),[""],r,s,()=>ik(t,n,i))}function Wc(e,t,n,i,r){for(;n;)n=nk(e,t,n,i,r);return n}function ik(e,t,n){let i=e._getTarget();t in i||(i[t]={});let r=i[t];return at(r)&&H(n)?n:r||{}}function rk(e,t,n,i){let r;for(let s of t)if(r=bu(Z1(s,e),n),typeof r<"u")return ea(e,r)?na(n,i,e,r):r}function bu(e,t){for(let n of t){if(!n)continue;let i=n[e];if(typeof i<"u")return i}}function Vc(e){let t=e._keys;return t||(t=e._keys=sk(e._scopes)),t}function sk(e){let t=new Set;for(let n of e)for(let i of Object.keys(n).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}var ok=Number.EPSILON||1e-14,Jn=(e,t)=>t<e.length&&!e[t].skip&&e[t],vu=e=>e==="x"?"y":"x";function ak(e,t,n,i){let r=e.skip?t:e,s=t,o=n.skip?t:n,a=os(s,r),l=os(o,s),c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;let d=i*c,h=i*u;return{previous:{x:s.x-d*(o.x-r.x),y:s.y-d*(o.y-r.y)},next:{x:s.x+h*(o.x-r.x),y:s.y+h*(o.y-r.y)}}}function lk(e,t,n){let i=e.length,r,s,o,a,l,c=Jn(e,0);for(let u=0;u<i-1;++u)if(l=c,c=Jn(e,u+1),!(!l||!c)){if(ei(t[u],0,ok)){n[u]=n[u+1]=0;continue}r=n[u]/t[u],s=n[u+1]/t[u],a=Math.pow(r,2)+Math.pow(s,2),!(a<=9)&&(o=3/Math.sqrt(a),n[u]=r*o*t[u],n[u+1]=s*o*t[u])}}function ck(e,t,n="x"){let i=vu(n),r=e.length,s,o,a,l=Jn(e,0);for(let c=0;c<r;++c){if(o=a,a=l,l=Jn(e,c+1),!a)continue;let u=a[n],d=a[i];o&&(s=(u-o[n])/3,a[`cp1${n}`]=u-s,a[`cp1${i}`]=d-s*t[c]),l&&(s=(l[n]-u)/3,a[`cp2${n}`]=u+s,a[`cp2${i}`]=d+s*t[c])}}function uk(e,t="x"){let n=vu(t),i=e.length,r=Array(i).fill(0),s=Array(i),o,a,l,c=Jn(e,0);for(o=0;o<i;++o)if(a=l,l=c,c=Jn(e,o+1),!!l){if(c){let u=c[t]-l[t];r[o]=u!==0?(c[n]-l[n])/u:0}s[o]=a?c?re(r[o-1])!==re(r[o])?0:(r[o-1]+r[o])/2:r[o-1]:r[o]}lk(e,r,s),ck(e,s,t)}function ns(e,t,n){return Math.max(Math.min(e,n),t)}function dk(e,t){let n,i,r,s,o,a=pe(e[0],t);for(n=0,i=e.length;n<i;++n)o=s,s=a,a=n<i-1&&pe(e[n+1],t),s&&(r=e[n],o&&(r.cp1x=ns(r.cp1x,t.left,t.right),r.cp1y=ns(r.cp1y,t.top,t.bottom)),a&&(r.cp2x=ns(r.cp2x,t.left,t.right),r.cp2y=ns(r.cp2y,t.top,t.bottom)))}function yu(e,t,n,i,r){let s,o,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")uk(e,r);else{let c=i?e[e.length-1]:e[0];for(s=0,o=e.length;s<o;++s)a=e[s],l=ak(c,a,e[Math.min(s+1,o-(i?0:1))%o],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&dk(e,n)}function bs(){return typeof window<"u"&&typeof document<"u"}function vs(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function as(e,t,n){let i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*t.parentNode[n])):i=e,i}var ys=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function hk(e,t){return ys(e).getPropertyValue(t)}var fk=["top","right","bottom","left"];function mn(e,t,n){let i={};n=n?"-"+n:"";for(let r=0;r<4;r++){let s=fk[r];i[s]=parseFloat(e[t+"-"+s+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}var pk=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function gk(e,t){let n=e.touches,i=n&&n.length?n[0]:e,{offsetX:r,offsetY:s}=i,o=!1,a,l;if(pk(r,s,e.target))a=r,l=s;else{let c=t.getBoundingClientRect();a=i.clientX-c.left,l=i.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function Ke(e,t){if("native"in e)return e;let{canvas:n,currentDevicePixelRatio:i}=t,r=ys(n),s=r.boxSizing==="border-box",o=mn(r,"padding"),a=mn(r,"border","width"),{x:l,y:c,box:u}=gk(e,n),d=o.left+(u&&a.left),h=o.top+(u&&a.top),{width:f,height:g}=t;return s&&(f-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-d)/f*n.width/i),y:Math.round((c-h)/g*n.height/i)}}function mk(e,t,n){let i,r;if(t===void 0||n===void 0){let s=e&&vs(e);if(!s)t=e.clientWidth,n=e.clientHeight;else{let o=s.getBoundingClientRect(),a=ys(s),l=mn(a,"border","width"),c=mn(a,"padding");t=o.width-c.width-l.width,n=o.height-c.height-l.height,i=as(a.maxWidth,s,"clientWidth"),r=as(a.maxHeight,s,"clientHeight")}}return{width:t,height:n,maxWidth:i||ss,maxHeight:r||ss}}var is=e=>Math.round(e*10)/10;function xu(e,t,n,i){let r=ys(e),s=mn(r,"margin"),o=as(r.maxWidth,e,"clientWidth")||ss,a=as(r.maxHeight,e,"clientHeight")||ss,l=mk(e,t,n),{width:c,height:u}=l;if(r.boxSizing==="content-box"){let h=mn(r,"border","width"),f=mn(r,"padding");c-=f.width+h.width,u-=f.height+h.height}return c=Math.max(0,c-s.width),u=Math.max(0,i?c/i:u-s.height),c=is(Math.min(c,o,l.maxWidth)),u=is(Math.min(u,a,l.maxHeight)),c&&!u&&(u=is(c/2)),(t!==void 0||n!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=is(Math.floor(u*i))),{width:c,height:u}}function ia(e,t,n){let i=t||1,r=Math.floor(e.height*i),s=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);let o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==i||o.height!==r||o.width!==s?(e.currentDevicePixelRatio=i,o.height=r,o.width=s,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}var _u=function(){let e=!1;try{let t={get passive(){return e=!0,!1}};bs()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function ra(e,t){let n=hk(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Ve(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function wu(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:i==="middle"?n<.5?e.y:t.y:i==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function ku(e,t,n,i){let r={x:e.cp2x,y:e.cp2y},s={x:t.cp1x,y:t.cp1y},o=Ve(e,r,n),a=Ve(r,s,n),l=Ve(s,t,n),c=Ve(o,a,n),u=Ve(a,l,n);return Ve(c,u,n)}var bk=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},vk=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function xn(e,t,n){return e?bk(t,n):vk()}function sa(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function oa(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Su(e){return e==="angle"?{between:$o,compare:I1,normalize:Xt}:{between:Ue,compare:(t,n)=>t-n,normalize:t=>t}}function Hc({start:e,end:t,count:n,loop:i,style:r}){return{start:e%n,end:t%n,loop:i&&(t-e+1)%n===0,style:r}}function yk(e,t,n){let{property:i,start:r,end:s}=n,{between:o,normalize:a}=Su(i),l=t.length,{start:c,end:u,loop:d}=e,h,f;if(d){for(c+=l,u+=l,h=0,f=l;h<f&&o(a(t[c%l][i]),r,s);++h)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function Mu(e,t,n){if(!n)return[e];let{property:i,start:r,end:s}=n,o=t.length,{compare:a,between:l,normalize:c}=Su(i),{start:u,end:d,loop:h,style:f}=yk(e,t,n),g=[],m=!1,b=null,y,_,x,v=()=>l(r,x,y)&&a(r,x)!==0,w=()=>a(s,y)===0||l(s,x,y),k=()=>m||v(),E=()=>!m||w();for(let M=u,C=u;M<=d;++M)_=t[M%o],!_.skip&&(y=c(_[i]),y!==x&&(m=l(y,r,s),b===null&&k()&&(b=a(y,r)===0?M:C),b!==null&&E()&&(g.push(Hc({start:b,end:M,loop:h,count:o,style:f})),b=null),C=M,x=y));return b!==null&&g.push(Hc({start:b,end:d,loop:h,count:o,style:f})),g}function Eu(e,t){let n=[],i=e.segments;for(let r=0;r<i.length;r++){let s=Mu(i[r],e.points,t);s.length&&n.push(...s)}return n}function xk(e,t,n,i){let r=0,s=t-1;if(n&&!i)for(;r<t&&!e[r].skip;)r++;for(;r<t&&e[r].skip;)r++;for(r%=t,n&&(s+=r);s>r&&e[s%t].skip;)s--;return s%=t,{start:r,end:s}}function _k(e,t,n,i){let r=e.length,s=[],o=t,a=e[t],l;for(l=t+1;l<=n;++l){let c=e[l%r];c.skip||c.stop?a.skip||(i=!1,s.push({start:t%r,end:(l-1)%r,loop:i}),t=o=c.stop?l:null):(o=l,a.skip&&(t=l)),a=c}return o!==null&&s.push({start:t%r,end:o%r,loop:i}),s}function Ou(e,t){let n=e.points,i=e.options.spanGaps,r=n.length;if(!r)return[];let s=!!e._loop,{start:o,end:a}=xk(n,r,s,i);if(i===!0)return Uc(e,[{start:o,end:a,loop:s}],n,t);let l=a<o?a+r:a,c=!!e._fullLoop&&o===0&&a===r-1;return Uc(e,_k(n,o,l,c),n,t)}function Uc(e,t,n,i){return!i||!i.setContext||!n?t:wk(e,t,n,i)}function wk(e,t,n,i){let r=e._chart.getContext(),s=Yc(e.options),{_datasetIndex:o,options:{spanGaps:a}}=e,l=n.length,c=[],u=s,d=t[0].start,h=d;function f(g,m,b,y){let _=a?-1:1;if(g!==m){for(g+=l;n[g%l].skip;)g-=_;for(;n[m%l].skip;)m+=_;g%l!==m%l&&(c.push({start:g%l,end:m%l,loop:b,style:y}),u=y,d=m%l)}}for(let g of t){d=a?d:g.start;let m=n[d%l],b;for(h=d+1;h<=g.end;h++){let y=n[h%l];b=Yc(i.setContext(Ce(r,{type:"segment",p0:m,p1:y,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:o}))),kk(b,u)&&f(d,h-1,g.loop,u),m=y,u=b}d<h-1&&f(d,h-1,g.loop,u)}return c}function Yc(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function kk(e,t){if(!t)return!1;let n=[],i=function(r,s){return Go(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(e,i)!==JSON.stringify(t,i)}var ma=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,i,r){let s=n.listeners[r],o=n.duration;s.forEach(a=>a({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Ho.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;let s=i.items,o=s.length-1,a=!1,l;for(;o>=0;--o)l=s[o],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),a=!0):(s[o]=s[s.length-1],s.pop());a&&(r.draw(),this._notify(r,i,t,"progress")),s.length||(i.running=!1,this._notify(r,i,t,"complete"),i.initial=!1),n+=s.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){let n=this._charts,i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){let n=this._charts.get(t);!n||(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;let n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){let n=this._charts.get(t);if(!n||!n.items.length)return;let i=n.items,r=i.length-1;for(;r>=0;--r)i[r].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},Te=new ma,Cu="transparent",Sk={boolean(e,t,n){return n>.5?t:e},color(e,t,n){let i=Xo(e||Cu),r=i.valid&&Xo(t||Cu);return r&&r.valid?r.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}},ba=class{constructor(t,n,i,r){let s=n[i];r=Vi([t.to,r,s,t.from]);let o=Vi([t.from,s,r]);this._active=!0,this._fn=t.fn||Sk[t.type||typeof o],this._easing=Kn[t.easing]||Kn.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(t,n,i){if(this._active){this._notify(!1);let r=this._target[this._prop],s=i-this._start,o=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=Vi([t.to,n,r,t.from]),this._from=Vi([t.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let n=t-this._start,i=this._duration,r=this._prop,s=this._from,o=this._loop,a=this._to,l;if(this._active=s!==a&&(o||n<i),!this._active){this._target[r]=a,this._notify(!0);return}if(n<0){this._target[r]=s;return}l=n/i%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(s,a,l)}wait(){let t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){let n=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][n]()}},As=class{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!H(t))return;let n=Object.keys(ct.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{let s=t[r];if(!H(s))return;let o={};for(let a of n)o[a]=s[a];(at(s.properties)&&s.properties||[r]).forEach(a=>{(a===r||!i.has(a))&&i.set(a,o)})})}_animateOptions(t,n){let i=n.options,r=Ek(t,i);if(!r)return[];let s=this._createAnimations(r,i);return i.$shared&&Mk(t.options.$animations,i).then(()=>{t.options=i},()=>{}),s}_createAnimations(t,n){let i=this._properties,r=[],s=t.$animations||(t.$animations={}),o=Object.keys(n),a=Date.now(),l;for(l=o.length-1;l>=0;--l){let c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){r.push(...this._animateOptions(t,n));continue}let u=n[c],d=s[c],h=i.get(c);if(d)if(h&&d.active()){d.update(h,u,a);continue}else d.cancel();if(!h||!h.duration){t[c]=u;continue}s[c]=d=new ba(h,t,c,u),r.push(d)}return r}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}let i=this._createAnimations(t,n);if(i.length)return Te.add(this._chart,i),!0}};function Mk(e,t){let n=[],i=Object.keys(t);for(let r=0;r<i.length;r++){let s=e[i[r]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function Ek(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Tu(e,t){let n=e&&e.options||{},i=n.reverse,r=n.min===void 0?t:0,s=n.max===void 0?t:0;return{start:i?s:r,end:i?r:s}}function Ok(e,t,n){if(n===!1)return!1;let i=Tu(e,n),r=Tu(t,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function Ck(e){let t,n,i,r;return H(e)?(t=e.top,n=e.right,i=e.bottom,r=e.left):t=n=i=r=e,{top:t,right:n,bottom:i,left:r,disabled:e===!1}}function yd(e,t){let n=[],i=e._getSortedDatasetMetas(t),r,s;for(r=0,s=i.length;r<s;++r)n.push(i[r].index);return n}function Au(e,t,n,i={}){let r=e.keys,s=i.mode==="single",o,a,l,c;if(t===null)return;let u=!1;for(o=0,a=r.length;o<a;++o){if(l=+r[o],l===n){if(u=!0,i.all)continue;break}c=e.values[l],vt(c)&&(s||t===0||re(t)===re(c))&&(t+=c)}return!u&&!i.all?0:t}function Tk(e,t){let{iScale:n,vScale:i}=t,r=n.axis==="x"?"x":"y",s=i.axis==="x"?"x":"y",o=Object.keys(e),a=new Array(o.length),l,c,u;for(l=0,c=o.length;l<c;++l)u=o[l],a[l]={[r]:u,[s]:e[u]};return a}function aa(e,t){let n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Ak(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Pk(e){let{min:t,max:n,minDefined:i,maxDefined:r}=e.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}function Lk(e,t,n){let i=e[t]||(e[t]={});return i[n]||(i[n]={})}function Pu(e,t,n,i){for(let r of t.getMatchingVisibleMetas(i).reverse()){let s=e[r.index];if(n&&s>0||!n&&s<0)return r.index}return null}function Lu(e,t){let{chart:n,_cachedMeta:i}=e,r=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=i,l=s.axis,c=o.axis,u=Ak(s,o,i),d=t.length,h;for(let f=0;f<d;++f){let g=t[f],{[l]:m,[c]:b}=g,y=g._stacks||(g._stacks={});h=y[c]=Lk(r,u,m),h[a]=b,h._top=Pu(h,o,!0,i.type),h._bottom=Pu(h,o,!1,i.type);let _=h._visualValues||(h._visualValues={});_[a]=b}}function la(e,t){let n=e.scales;return Object.keys(n).filter(i=>n[i].axis===t).shift()}function Dk(e,t){return Ce(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function qk(e,t,n){return Ce(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Hi(e,t){let n=e.controller.index,i=e.vScale&&e.vScale.axis;if(!!i){t=t||e._parsed;for(let r of t){let s=r._stacks;if(!s||s[i]===void 0||s[i][n]===void 0)return;delete s[i][n],s[i]._visualValues!==void 0&&s[i]._visualValues[n]!==void 0&&delete s[i]._visualValues[n]}}}var ca=e=>e==="reset"||e==="none",Du=(e,t)=>t?e:Object.assign({},e),Ik=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:yd(n,!0),values:null},Je=class{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=aa(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Hi(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,n=this._cachedMeta,i=this.getDataset(),r=(d,h,f,g)=>d==="x"?h:d==="r"?g:f,s=n.xAxisID=W(i.xAxisID,la(t,"x")),o=n.yAxisID=W(i.yAxisID,la(t,"y")),a=n.rAxisID=W(i.rAxisID,la(t,"r")),l=n.indexAxis,c=n.iAxisID=r(l,s,o,a),u=n.vAxisID=r(l,o,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Wo(this._data,this),t._stacked&&Hi(t)}_dataCheck(){let t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(H(n)){let r=this._cachedMeta;this._data=Tk(n,r)}else if(i!==n){if(i){Wo(i,this);let r=this._cachedMeta;Hi(r),r._parsed=[]}n&&Object.isExtensible(n)&&su(n,this),this._syncList=[],this._data=n}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let n=this._cachedMeta,i=this.getDataset(),r=!1;this._dataCheck();let s=n._stacked;n._stacked=aa(n.vScale,n),n.stack!==i.stack&&(r=!0,Hi(n),n.stack=i.stack),this._resyncElements(t),(r||s!==n._stacked)&&(Lu(this,n._parsed),n._stacked=aa(n.vScale,n))}configure(){let t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){let{_cachedMeta:i,_data:r}=this,{iScale:s,_stacked:o}=i,a=s.axis,l=t===0&&n===r.length?!0:i._sorted,c=t>0&&i._parsed[t-1],u,d,h;if(this._parsing===!1)i._parsed=r,i._sorted=!0,h=r;else{at(r[t])?h=this.parseArrayData(i,r,t,n):H(r[t])?h=this.parseObjectData(i,r,t,n):h=this.parsePrimitiveData(i,r,t,n);let f=()=>d[a]===null||c&&d[a]<c[a];for(u=0;u<n;++u)i._parsed[u+t]=d=h[u],l&&(f()&&(l=!1),c=d);i._sorted=l}o&&Lu(this,h)}parsePrimitiveData(t,n,i,r){let{iScale:s,vScale:o}=t,a=s.axis,l=o.axis,c=s.getLabels(),u=s===o,d=new Array(r),h,f,g;for(h=0,f=r;h<f;++h)g=h+i,d[h]={[a]:u||s.parse(c[g],g),[l]:o.parse(n[g],g)};return d}parseArrayData(t,n,i,r){let{xScale:s,yScale:o}=t,a=new Array(r),l,c,u,d;for(l=0,c=r;l<c;++l)u=l+i,d=n[u],a[l]={x:s.parse(d[0],u),y:o.parse(d[1],u)};return a}parseObjectData(t,n,i,r){let{xScale:s,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(r),u,d,h,f;for(u=0,d=r;u<d;++u)h=u+i,f=n[h],c[u]={x:s.parse(vn(f,a),h),y:o.parse(vn(f,l),h)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,i){let r=this.chart,s=this._cachedMeta,o=n[t.axis],a={keys:yd(r,!0),values:n._stacks[t.axis]._visualValues};return Au(a,o,s.index,{mode:i})}updateRangeFromParsed(t,n,i,r){let s=i[n.axis],o=s===null?NaN:s,a=r&&i._stacks[n.axis];r&&a&&(r.values=a,o=Au(r,s,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){let i=this._cachedMeta,r=i._parsed,s=i._sorted&&t===i.iScale,o=r.length,a=this._getOtherScale(t),l=Ik(n,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=Pk(a),h,f;function g(){f=r[h];let m=f[a.axis];return!vt(f[t.axis])||u>m||d<m}for(h=0;h<o&&!(!g()&&(this.updateRangeFromParsed(c,t,f,l),s));++h);if(s){for(h=o-1;h>=0;--h)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){let n=this._cachedMeta._parsed,i=[],r,s,o;for(r=0,s=n.length;r<s;++r)o=n[r][t.axis],vt(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){let n=this._cachedMeta,i=n.iScale,r=n.vScale,s=this.getParsed(t);return{label:i?""+i.getLabelForValue(s[i.axis]):"",value:r?""+r.getLabelForValue(s[r.axis]):""}}_update(t){let n=this._cachedMeta;this.update(t||"default"),n._clip=Ck(W(this.options.clip,Ok(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,n=this.chart,i=this._cachedMeta,r=i.data||[],s=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||r.length-a,c=this.options.drawActiveElementsOnTop,u;for(i.dataset&&i.dataset.draw(t,s,a,l),u=a;u<a+l;++u){let d=r[u];d.hidden||(d.active&&c?o.push(d):d.draw(t,s))}for(u=0;u<o.length;++u)o[u].draw(t,s)}getStyle(t,n){let i=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,n,i){let r=this.getDataset(),s;if(t>=0&&t<this._cachedMeta.data.length){let o=this._cachedMeta.data[t];s=o.$context||(o.$context=qk(this.getContext(),t,o)),s.parsed=this.getParsed(t),s.raw=r.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=Dk(this.chart.getContext(),this.index)),s.dataset=r,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",i){let r=n==="active",s=this._cachedDataOpts,o=t+"-"+n,a=s[o],l=this.enableOptionSharing&&ti(i);if(a)return Du(a,l);let c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=r?[`${t}Hover`,"hover",t,""]:[t,""],h=c.getOptionScopes(this.getDataset(),u),f=Object.keys(ct.elements[t]),g=()=>this.getContext(i,r,n),m=c.resolveNamedOptions(h,f,g,d);return m.$shared&&(m.$shared=l,s[o]=Object.freeze(Du(m,l))),m}_resolveAnimations(t,n,i){let r=this.chart,s=this._cachedDataOpts,o=`animation-${n}`,a=s[o];if(a)return a;let l;if(r.options.animation!==!1){let u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(t,i,n))}let c=new As(r,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(c)),c}getSharedOptions(t){if(!!t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||ca(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){let i=this.resolveDataElementOptions(t,n),r=this._sharedOptions,s=this.getSharedOptions(i),o=this.includeOptions(n,s)||s!==r;return this.updateSharedOptions(s,n,i),{sharedOptions:s,includeOptions:o}}updateElement(t,n,i,r){ca(r)?Object.assign(t,i):this._resolveAnimations(n,r).update(t,i)}updateSharedOptions(t,n,i){t&&!ca(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,r){t.active=r;let s=this.getStyle(n,r);this._resolveAnimations(n,i,r).update(t,{options:!r&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let n=this._data,i=this._cachedMeta.data;for(let[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];let r=i.length,s=n.length,o=Math.min(s,r);o&&this.parse(0,o),s>r?this._insertElements(r,s-r,t):s<r&&this._removeElements(s,r-s)}_insertElements(t,n,i=!0){let r=this._cachedMeta,s=r.data,o=t+n,a,l=c=>{for(c.length+=n,a=c.length-1;a>=o;a--)c[a]=c[a-n]};for(l(s),a=t;a<o;++a)s[a]=new this.dataElementType;this._parsing&&l(r._parsed),this.parse(t,n),i&&this.updateElements(s,t,n,"reset")}updateElements(t,n,i,r){}_removeElements(t,n){let i=this._cachedMeta;if(this._parsing){let r=i._parsed.splice(t,n);i._stacked&&Hi(i,r)}i.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[n,i,r]=t;this[n](i,r)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);let i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}};F(Je,"defaults",{}),F(Je,"datasetElementType",null),F(Je,"dataElementType",null);function Rk(e,t){if(!e._cache.$bar){let n=e.getMatchingVisibleMetas(t),i=[];for(let r=0,s=n.length;r<s;r++)i=i.concat(n[r].controller.getAllParsedValues(e));e._cache.$bar=Vo(i.sort((r,s)=>r-s))}return e._cache.$bar}function Nk(e){let t=e.iScale,n=Rk(t,e.type),i=t._length,r,s,o,a,l=()=>{o===32767||o===-32768||(ti(a)&&(i=Math.min(i,Math.abs(o-a)||i)),a=o)};for(r=0,s=n.length;r<s;++r)o=t.getPixelForValue(n[r]),l();for(a=void 0,r=0,s=t.ticks.length;r<s;++r)o=t.getPixelForTick(r),l();return i}function Fk(e,t,n,i){let r=n.barThickness,s,o;return X(r)?(s=t.min*n.categoryPercentage,o=n.barPercentage):(s=r*i,o=1),{chunk:s/i,ratio:o,start:t.pixels[e]-s/2}}function Bk(e,t,n,i){let r=t.pixels,s=r[e],o=e>0?r[e-1]:null,a=e<r.length-1?r[e+1]:null,l=n.categoryPercentage;o===null&&(o=s-(a===null?t.end-t.start:a-s)),a===null&&(a=s+s-o);let c=s-(s-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/i,ratio:n.barPercentage,start:c}}function zk(e,t,n,i){let r=n.parse(e[0],i),s=n.parse(e[1],i),o=Math.min(r,s),a=Math.max(r,s),l=o,c=a;Math.abs(o)>Math.abs(a)&&(l=a,c=o),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:r,end:s,min:o,max:a}}function xd(e,t,n,i){return at(e)?zk(e,t,n,i):t[n.axis]=n.parse(e,i),t}function qu(e,t,n,i){let r=e.iScale,s=e.vScale,o=r.getLabels(),a=r===s,l=[],c,u,d,h;for(c=n,u=n+i;c<u;++c)h=t[c],d={},d[r.axis]=a||r.parse(o[c],c),l.push(xd(h,d,s,c));return l}function ua(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function jk(e,t,n){return e!==0?re(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function $k(e){let t,n,i,r,s;return e.horizontal?(t=e.base>e.x,n="left",i="right"):(t=e.base<e.y,n="bottom",i="top"),t?(r="end",s="start"):(r="start",s="end"),{start:n,end:i,reverse:t,top:r,bottom:s}}function Wk(e,t,n,i){let r=t.borderSkipped,s={};if(!r){e.borderSkipped=s;return}if(r===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:o,end:a,reverse:l,top:c,bottom:u}=$k(e);r==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===i?r=c:(n._bottom||0)===i?r=u:(s[Iu(u,o,a,l)]=!0,r=c)),s[Iu(r,o,a,l)]=!0,e.borderSkipped=s}function Iu(e,t,n,i){return i?(e=Vk(e,t,n),e=Ru(e,n,t)):e=Ru(e,t,n),e}function Vk(e,t,n){return e===t?n:e===n?t:e}function Ru(e,t,n){return e==="start"?t:e==="end"?n:e}function Hk(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}var zt=class extends Je{parsePrimitiveData(t,n,i,r){return qu(t,n,i,r)}parseArrayData(t,n,i,r){return qu(t,n,i,r)}parseObjectData(t,n,i,r){let{iScale:s,vScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=s.axis==="x"?a:l,u=o.axis==="x"?a:l,d=[],h,f,g,m;for(h=i,f=i+r;h<f;++h)m=n[h],g={},g[s.axis]=s.parse(vn(m,c),h),d.push(xd(vn(m,u),g,o,h));return d}updateRangeFromParsed(t,n,i,r){super.updateRangeFromParsed(t,n,i,r);let s=i._custom;s&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let n=this._cachedMeta,{iScale:i,vScale:r}=n,s=this.getParsed(t),o=s._custom,a=ua(o)?"["+o.start+", "+o.end+"]":""+r.getLabelForValue(s[r.axis]);return{label:""+i.getLabelForValue(s[i.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();let t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){let n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,i,r){let s=r==="reset",{index:o,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(n,r);for(let f=n;f<n+i;f++){let g=this.getParsed(f),m=s||X(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),b=this._calculateBarIndexPixels(f,u),y=(g._stacks||{})[a.axis],_={horizontal:c,base:m.base,enableBorderRadius:!y||ua(g._custom)||o===y._top||o===y._bottom,x:c?m.head:b.center,y:c?b.center:m.head,height:c?b.size:Math.abs(m.size),width:c?Math.abs(m.size):b.size};h&&(_.options=d||this.resolveDataElementOptions(f,t[f].active?"active":r));let x=_.options||t[f].options;Wk(_,x,y,o),Hk(_,x,u.ratio),this.updateElement(t[f],f,_,r)}}_getStacks(t,n){let{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),s=i.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[i.axis],c=u=>{let d=u._parsed.find(f=>f[i.axis]===l),h=d&&d[u.vScale.axis];if(X(h)||isNaN(h))return!0};for(let u of r)if(!(n!==void 0&&c(u))&&((s===!1||o.indexOf(u.stack)===-1||s===void 0&&u.stack===void 0)&&o.push(u.stack),u.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,i){let r=this._getStacks(t,i),s=n!==void 0?r.indexOf(n):-1;return s===-1?r.length-1:s}_getRuler(){let t=this.options,n=this._cachedMeta,i=n.iScale,r=[],s,o;for(s=0,o=n.data.length;s<o;++s)r.push(i.getPixelForValue(this.getParsed(s)[i.axis],s));let a=t.barThickness;return{min:a||Nk(n),pixels:r,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:n,_stacked:i,index:r},options:{base:s,minBarLength:o}}=this,a=s||0,l=this.getParsed(t),c=l._custom,u=ua(c),d=l[n.axis],h=0,f=i?this.applyStack(n,l,i):d,g,m;f!==d&&(h=f-d,f=d),u&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&re(d)!==re(c.barEnd)&&(h=0),h+=d);let b=!X(s)&&!u?s:h,y=n.getPixelForValue(b);if(this.chart.getDataVisibility(t)?g=n.getPixelForValue(h+f):g=y,m=g-y,Math.abs(m)<o){m=jk(m,n,a)*o,d===a&&(y-=m/2);let _=n.getPixelForDecimal(0),x=n.getPixelForDecimal(1),v=Math.min(_,x),w=Math.max(_,x);y=Math.max(Math.min(y,w),v),g=y+m,i&&!u&&(l._stacks[n.axis]._visualValues[r]=n.getValueForPixel(g)-n.getValueForPixel(y))}if(y===n.getPixelForValue(a)){let _=re(m)*n.getLineWidthForValue(a)/2;y+=_,m-=_}return{size:m,base:y,head:g,center:g+m/2}}_calculateBarIndexPixels(t,n){let i=n.scale,r=this.options,s=r.skipNull,o=W(r.maxBarThickness,1/0),a,l;if(n.grouped){let c=s?this._getStackCount(t):n.stackCount,u=r.barThickness==="flex"?Bk(t,n,r,c):Fk(t,n,r,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0);a=u.start+u.chunk*d+u.chunk/2,l=Math.min(o,u.chunk*u.ratio)}else a=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(o,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){let t=this._cachedMeta,n=t.vScale,i=t.data,r=i.length,s=0;for(;s<r;++s)this.getParsed(s)[n.axis]!==null&&!i[s].hidden&&i[s].draw(this._ctx)}};F(zt,"id","bar"),F(zt,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),F(zt,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});var kn=class extends Je{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let n=this._cachedMeta,{dataset:i,data:r=[],_dataset:s}=n,o=this.chart._animationsDisabled,{start:a,count:l}=lu(n,r,o);this._drawStart=a,this._drawCount=l,cu(n)&&(a=0,l=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!s._decimated,i.points=r;let c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:c},t),this.updateElements(r,a,l,t)}updateElements(t,n,i,r){let s=r==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,r),h=o.axis,f=a.axis,{spanGaps:g,segment:m}=this.options,b=ni(g)?g:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||s||r==="none",_=n+i,x=t.length,v=n>0&&this.getParsed(n-1);for(let w=0;w<x;++w){let k=t[w],E=y?k:{};if(w<n||w>=_){E.skip=!0;continue}let M=this.getParsed(w),C=X(M[f]),T=E[h]=o.getPixelForValue(M[h],w),O=E[f]=s||C?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,M,l):M[f],w);E.skip=isNaN(T)||isNaN(O)||C,E.stop=w>0&&Math.abs(M[h]-v[h])>b,m&&(E.parsed=M,E.raw=c.data[w]),d&&(E.options=u||this.resolveDataElementOptions(w,k.active?"active":r)),y||this.updateElement(k,w,E,r),v=M}}getMaxOverflow(){let t=this._cachedMeta,n=t.dataset,i=n.options&&n.options.borderWidth||0,r=t.data||[];if(!r.length)return i;let s=r[0].size(this.resolveDataElementOptions(0)),o=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,s,o)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}};F(kn,"id","line"),F(kn,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),F(kn,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function _n(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var Qi=class{static override(t){Object.assign(Qi.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return _n()}parse(){return _n()}format(){return _n()}add(){return _n()}diff(){return _n()}startOf(){return _n()}endOf(){return _n()}},Uk={_date:Qi};function Yk(e,t,n,i){let{controller:r,data:s,_sorted:o}=e,a=r._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&o&&s.length){let l=a._reversePixels?nu:He;if(i){if(r._sharedOptions){let c=s[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){let d=l(s,t,n-u),h=l(s,t,n+u);return{lo:d.lo,hi:h.hi}}}}else return l(s,t,n)}return{lo:0,hi:s.length-1}}function nr(e,t,n,i,r){let s=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=s.length;a<l;++a){let{index:c,data:u}=s[a],{lo:d,hi:h}=Yk(s[a],t,o,r);for(let f=d;f<=h;++f){let g=u[f];g.skip||i(g,c,f)}}}function Gk(e){let t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(i,r){let s=t?Math.abs(i.x-r.x):0,o=n?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function da(e,t,n,i,r){let s=[];return!r&&!e.isPointInArea(t)||nr(e,n,t,function(a,l,c){!r&&!pe(a,e.chartArea,0)||a.inRange(t.x,t.y,i)&&s.push({element:a,datasetIndex:l,index:c})},!0),s}function Xk(e,t,n,i){let r=[];function s(o,a,l){let{startAngle:c,endAngle:u}=o.getProps(["startAngle","endAngle"],i),{angle:d}=tu(o,{x:t.x,y:t.y});$o(d,c,u)&&r.push({element:o,datasetIndex:a,index:l})}return nr(e,n,t,s),r}function Kk(e,t,n,i,r,s){let o=[],a=Gk(n),l=Number.POSITIVE_INFINITY;function c(u,d,h){let f=u.inRange(t.x,t.y,r);if(i&&!f)return;let g=u.getCenterPoint(r);if(!(!!s||e.isPointInArea(g))&&!f)return;let b=a(t,g);b<l?(o=[{element:u,datasetIndex:d,index:h}],l=b):b===l&&o.push({element:u,datasetIndex:d,index:h})}return nr(e,n,t,c),o}function ha(e,t,n,i,r,s){return!s&&!e.isPointInArea(t)?[]:n==="r"&&!i?Xk(e,t,n,r):Kk(e,t,n,i,r,s)}function Nu(e,t,n,i,r){let s=[],o=n==="x"?"inXRange":"inYRange",a=!1;return nr(e,n,t,(l,c,u)=>{l[o]&&l[o](t[n],r)&&(s.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,r))}),i&&!a?[]:s}var Zk={evaluateInteractionItems:nr,modes:{index(e,t,n,i){let r=Ke(t,e),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?da(e,r,s,i,o):ha(e,r,s,!1,i,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{let u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,i){let r=Ke(t,e),s=n.axis||"xy",o=n.includeInvisible||!1,a=n.intersect?da(e,r,s,i,o):ha(e,r,s,!1,i,o);if(a.length>0){let l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(e,t,n,i){let r=Ke(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return da(e,r,s,i,o)},nearest(e,t,n,i){let r=Ke(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return ha(e,r,s,n.intersect,i,o)},x(e,t,n,i){let r=Ke(t,e);return Nu(e,r,"x",n.intersect,i)},y(e,t,n,i){let r=Ke(t,e);return Nu(e,r,"y",n.intersect,i)}}},_d=["left","top","right","bottom"];function Ui(e,t){return e.filter(n=>n.pos===t)}function Fu(e,t){return e.filter(n=>_d.indexOf(n.pos)===-1&&n.box.axis===t)}function Yi(e,t){return e.sort((n,i)=>{let r=t?i:n,s=t?n:i;return r.weight===s.weight?r.index-s.index:r.weight-s.weight})}function Jk(e){let t=[],n,i,r,s,o,a;for(n=0,i=(e||[]).length;n<i;++n)r=e[n],{position:s,options:{stack:o,stackWeight:a=1}}=r,t.push({index:n,box:r,pos:s,horizontal:r.isHorizontal(),weight:r.weight,stack:o&&s+o,stackWeight:a});return t}function Qk(e){let t={};for(let n of e){let{stack:i,pos:r,stackWeight:s}=n;if(!i||!_d.includes(r))continue;let o=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return t}function tS(e,t){let n=Qk(e),{vBoxMaxWidth:i,hBoxMaxHeight:r}=t,s,o,a;for(s=0,o=e.length;s<o;++s){a=e[s];let{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*i:l&&t.availableWidth,a.height=r):(a.width=i,a.height=u?u*r:l&&t.availableHeight)}return n}function eS(e){let t=Jk(e),n=Yi(t.filter(c=>c.box.fullSize),!0),i=Yi(Ui(t,"left"),!0),r=Yi(Ui(t,"right")),s=Yi(Ui(t,"top"),!0),o=Yi(Ui(t,"bottom")),a=Fu(t,"x"),l=Fu(t,"y");return{fullSize:n,leftAndTop:i.concat(s),rightAndBottom:r.concat(l).concat(o).concat(a),chartArea:Ui(t,"chartArea"),vertical:i.concat(r).concat(l),horizontal:s.concat(o).concat(a)}}function Bu(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function wd(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function nS(e,t,n,i){let{pos:r,box:s}=n,o=e.maxPadding;if(!H(r)){n.size&&(e[r]-=n.size);let d=i[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?s.height:s.width),n.size=d.size/d.count,e[r]+=n.size}s.getPadding&&wd(o,s.getPadding());let a=Math.max(0,t.outerWidth-Bu(o,e,"left","right")),l=Math.max(0,t.outerHeight-Bu(o,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function iS(e){let t=e.maxPadding;function n(i){let r=Math.max(t[i]-e[i],0);return e[i]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function rS(e,t){let n=t.maxPadding;function i(r){let s={left:0,top:0,right:0,bottom:0};return r.forEach(o=>{s[o]=Math.max(t[o],n[o])}),s}return i(e?["left","right"]:["top","bottom"])}function Ki(e,t,n,i){let r=[],s,o,a,l,c,u;for(s=0,o=e.length,c=0;s<o;++s){a=e[s],l=a.box,l.update(a.width||t.w,a.height||t.h,rS(a.horizontal,t));let{same:d,other:h}=nS(t,n,a,i);c|=d&&r.length,u=u||h,l.fullSize||r.push(a)}return c&&Ki(r,t,n,i)||u}function xs(e,t,n,i,r){e.top=n,e.left=t,e.right=t+i,e.bottom=n+r,e.width=i,e.height=r}function zu(e,t,n,i){let r=n.padding,{x:s,y:o}=t;for(let a of e){let l=a.box,c=i[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){let d=t.w*u,h=c.size||l.height;ti(c.start)&&(o=c.start),l.fullSize?xs(l,r.left,o,n.outerWidth-r.right-r.left,h):xs(l,t.left+c.placed,o,d,h),c.start=o,c.placed+=d,o=l.bottom}else{let d=t.h*u,h=c.size||l.width;ti(c.start)&&(s=c.start),l.fullSize?xs(l,s,r.top,h,n.outerHeight-r.bottom-r.top):xs(l,s,t.top+c.placed,h,d),c.start=s,c.placed+=d,s=l.right}}t.x=s,t.y=o}var Qe={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){let n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,i){if(!e)return;let r=Ot(e.options.layout.padding),s=Math.max(t-r.width,0),o=Math.max(n-r.height,0),a=eS(e.boxes),l=a.vertical,c=a.horizontal;K(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});let u=l.reduce((m,b)=>b.box.options&&b.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:r,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/u,hBoxMaxHeight:o/2}),h=Object.assign({},r);wd(h,Ot(i));let f=Object.assign({maxPadding:h,w:s,h:o,x:r.left,y:r.top},r),g=tS(l.concat(c),d);Ki(a.fullSize,f,d,g),Ki(l,f,d,g),Ki(c,f,d,g)&&Ki(l,f,d,g),iS(f),zu(a.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,zu(a.rightAndBottom,f,d,g),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},K(a.chartArea,m=>{let b=m.box;Object.assign(b,e.chartArea),b.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},Ps=class{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,r){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,r?Math.floor(n/r):i)}}isAttached(t){return!0}updateConfig(t){}},va=class extends Ps{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},Cs="$chartjs",sS={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ju=e=>e===null||e==="";function oS(e,t){let n=e.style,i=e.getAttribute("height"),r=e.getAttribute("width");if(e[Cs]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",ju(r)){let s=ra(e,"width");s!==void 0&&(e.width=s)}if(ju(i))if(e.style.height==="")e.height=e.width/(t||2);else{let s=ra(e,"height");s!==void 0&&(e.height=s)}return e}var kd=_u?{passive:!0}:!1;function aS(e,t,n){e&&e.addEventListener(t,n,kd)}function lS(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,kd)}function cS(e,t){let n=sS[e.type]||e.type,{x:i,y:r}=Ke(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:r!==void 0?r:null}}function Ls(e,t){for(let n of e)if(n===t||n.contains(t))return!0}function uS(e,t,n){let i=e.canvas,r=new MutationObserver(s=>{let o=!1;for(let a of s)o=o||Ls(a.addedNodes,i),o=o&&!Ls(a.removedNodes,i);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function dS(e,t,n){let i=e.canvas,r=new MutationObserver(s=>{let o=!1;for(let a of s)o=o||Ls(a.removedNodes,i),o=o&&!Ls(a.addedNodes,i);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}var tr=new Map,$u=0;function Sd(){let e=window.devicePixelRatio;e!==$u&&($u=e,tr.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function hS(e,t){tr.size||window.addEventListener("resize",Sd),tr.set(e,t)}function fS(e){tr.delete(e),tr.size||window.removeEventListener("resize",Sd)}function pS(e,t,n){let i=e.canvas,r=i&&vs(i);if(!r)return;let s=Uo((a,l)=>{let c=r.clientWidth;n(a,l),c<r.clientWidth&&n()},window),o=new ResizeObserver(a=>{let l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||s(c,u)});return o.observe(r),hS(e,s),o}function fa(e,t,n){n&&n.disconnect(),t==="resize"&&fS(e)}function gS(e,t,n){let i=e.canvas,r=Uo(s=>{e.ctx!==null&&n(cS(s,e))},e);return aS(i,t,r),r}var ya=class extends Ps{acquireContext(t,n){let i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(oS(t,n),i):null}releaseContext(t){let n=t.canvas;if(!n[Cs])return!1;let i=n[Cs].initial;["height","width"].forEach(s=>{let o=i[s];X(o)?n.removeAttribute(s):n.setAttribute(s,o)});let r=i.style||{};return Object.keys(r).forEach(s=>{n.style[s]=r[s]}),n.width=n.width,delete n[Cs],!0}addEventListener(t,n,i){this.removeEventListener(t,n);let r=t.$proxies||(t.$proxies={}),o={attach:uS,detach:dS,resize:pS}[n]||gS;r[n]=o(t,n,i)}removeEventListener(t,n){let i=t.$proxies||(t.$proxies={}),r=i[n];if(!r)return;({attach:fa,detach:fa,resize:fa}[n]||lS)(t,n,r),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,r){return xu(t,n,i,r)}isAttached(t){let n=t&&vs(t);return!!(n&&n.isConnected)}};function mS(e){return!bs()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?va:ya}var se=class{x;y;active=!1;options;$animations;tooltipPosition(t){let{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return ni(this.x)&&ni(this.y)}getProps(t,n){let i=this.$animations;if(!n||!i)return this;let r={};return t.forEach(s=>{r[s]=i[s]&&i[s].active()?i[s]._to:this[s]}),r}};F(se,"defaults",{}),F(se,"defaultRoutes");function bS(e,t){let n=e.options.ticks,i=vS(e),r=Math.min(n.maxTicksLimit||i,i),s=n.major.enabled?xS(t):[],o=s.length,a=s[0],l=s[o-1],c=[];if(o>r)return _S(t,c,s,o/r),c;let u=yS(s,t,r);if(o>0){let d,h,f=o>1?Math.round((l-a)/(o-1)):null;for(_s(t,c,u,X(f)?0:a-f,a),d=0,h=o-1;d<h;d++)_s(t,c,u,s[d],s[d+1]);return _s(t,c,u,l,X(f)?t.length:l+f),c}return _s(t,c,u),c}function vS(e){let t=e.options.offset,n=e._tickSize(),i=e._length/n+(t?0:1),r=e._maxLength/n;return Math.floor(Math.min(i,r))}function yS(e,t,n){let i=wS(e),r=t.length/n;if(!i)return Math.max(r,1);let s=Jc(i);for(let o=0,a=s.length-1;o<a;o++){let l=s[o];if(l>r)return l}return Math.max(r,1)}function xS(e){let t=[],n,i;for(n=0,i=e.length;n<i;n++)e[n].major&&t.push(n);return t}function _S(e,t,n,i){let r=0,s=n[0],o;for(i=Math.ceil(i),o=0;o<e.length;o++)o===s&&(t.push(e[o]),r++,s=n[r*i])}function _s(e,t,n,i,r){let s=W(i,0),o=Math.min(W(r,e.length),e.length),a=0,l,c,u;for(n=Math.ceil(n),r&&(l=r-i,n=l/Math.floor(l/n)),u=s;u<0;)a++,u=Math.round(s+a*n);for(c=Math.max(s,0);c<o;c++)c===u&&(t.push(e[c]),a++,u=Math.round(s+a*n))}function wS(e){let t=e.length,n,i;if(t<2)return!1;for(i=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==i)return!1;return i}var kS=e=>e==="left"?"right":e==="right"?"left":e,Wu=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Vu=(e,t)=>Math.min(t||e,e);function Hu(e,t){let n=[],i=e.length/t,r=e.length,s=0;for(;s<r;s+=i)n.push(e[Math.floor(s)]);return n}function SS(e,t,n){let i=e.ticks.length,r=Math.min(t,i-1),s=e._startPixel,o=e._endPixel,a=1e-6,l=e.getPixelForTick(r),c;if(!(n&&(i===1?c=Math.max(l-s,o-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(r-1))/2,l+=r<t?c:-c,l<s-a||l>o+a)))return l}function MS(e,t){K(e,n=>{let i=n.gc,r=i.length/2,s;if(r>t){for(s=0;s<r;++s)delete n.data[i[s]];i.splice(0,r)}})}function Gi(e){return e.drawTicks?e.tickLength:0}function Uu(e,t){if(!e.display)return 0;let n=kt(e.font,t),i=Ot(e.padding);return(at(e.text)?e.text.length:1)*n.lineHeight+i.height}function ES(e,t){return Ce(e,{scale:t,type:"scale"})}function OS(e,t,n){return Ce(e,{tick:n,index:t,type:"tick"})}function CS(e,t,n){let i=Yo(e);return(n&&t!=="right"||!n&&t==="right")&&(i=kS(i)),i}function TS(e,t,n,i){let{top:r,left:s,bottom:o,right:a,chart:l}=e,{chartArea:c,scales:u}=l,d=0,h,f,g,m=o-r,b=a-s;if(e.isHorizontal()){if(f=It(i,s,a),H(n)){let y=Object.keys(n)[0],_=n[y];g=u[y].getPixelForValue(_)+m-t}else n==="center"?g=(c.bottom+c.top)/2+m-t:g=Wu(e,n,t);h=a-s}else{if(H(n)){let y=Object.keys(n)[0],_=n[y];f=u[y].getPixelForValue(_)-b+t}else n==="center"?f=(c.left+c.right)/2-b+t:f=Wu(e,n,t);g=It(i,o,r),d=n==="left"?-Lt:Lt}return{titleX:f,titleY:g,maxWidth:h,rotation:d}}var Pe=class extends se{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:i,_suggestedMax:r}=this;return t=qt(t,Number.POSITIVE_INFINITY),n=qt(n,Number.NEGATIVE_INFINITY),i=qt(i,Number.POSITIVE_INFINITY),r=qt(r,Number.NEGATIVE_INFINITY),{min:qt(t,i),max:qt(n,r),minDefined:vt(t),maxDefined:vt(n)}}getMinMax(t){let{min:n,max:i,minDefined:r,maxDefined:s}=this.getUserBounds(),o;if(r&&s)return{min:n,max:i};let a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)o=a[l].controller.getMinMax(this,t),r||(n=Math.min(n,o.min)),s||(i=Math.max(i,o.max));return n=s&&n>i?i:n,i=r&&n>i?n:i,{min:qt(n,qt(i,n)),max:qt(i,qt(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){et(this.options.beforeUpdate,[this])}update(t,n,i){let{beginAtZero:r,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=pu(this,s,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=a<this.ticks.length;this._convertTicksToLabels(l?Hu(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=bS(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,t=!t),this._startPixel=n,this._endPixel=i,this._reversePixels=t,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){et(this.options.afterUpdate,[this])}beforeSetDimensions(){et(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){et(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),et(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){et(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){let n=this.options.ticks,i,r,s;for(i=0,r=t.length;i<r;i++)s=t[i],s.label=et(n.callback,[s.value,i,t],this)}afterTickToLabelConversion(){et(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){et(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let t=this.options,n=t.ticks,i=Vu(this.ticks.length,t.ticks.maxTicksLimit),r=n.minRotation||0,s=n.maxRotation,o=r,a,l,c;if(!this._isVisible()||!n.display||r>=s||i<=1||!this.isHorizontal()){this.labelRotation=r;return}let u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,f=Dt(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/i:f/(i-1),d+6>a&&(a=f/(i-(t.offset?.5:1)),l=this.maxHeight-Gi(t.grid)-n.padding-Uu(t.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),o=cs(Math.min(Math.asin(Dt((u.highest.height+6)/a,-1,1)),Math.asin(Dt(l/c,-1,1))-Math.asin(Dt(h/c,-1,1)))),o=Math.max(r,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){et(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){et(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:n,options:{ticks:i,title:r,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){let l=Uu(r,n.options.font);if(a?(t.width=this.maxWidth,t.height=Gi(s)+l):(t.height=this.maxHeight,t.width=Gi(s)+l),i.display&&this.ticks.length){let{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),f=i.padding*2,g=Oe(this.labelRotation),m=Math.cos(g),b=Math.sin(g);if(a){let y=i.mirror?0:b*d.width+m*h.height;t.height=Math.min(this.maxHeight,t.height+y+f)}else{let y=i.mirror?0:m*d.width+b*h.height;t.width=Math.min(this.maxWidth,t.width+y+f)}this._calculatePadding(c,u,b,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,i,r){let{ticks:{align:s,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){let u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),h=0,f=0;l?c?(h=r*t.width,f=i*n.height):(h=i*t.height,f=r*n.width):s==="start"?f=n.width:s==="end"?h=t.width:s!=="inner"&&(h=t.width/2,f=n.width/2),this.paddingLeft=Math.max((h-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-d+o)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;s==="start"?(u=0,d=t.height):s==="end"&&(u=n.height,d=0),this.paddingTop=u+o,this.paddingBottom=d+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){et(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,i;for(n=0,i=t.length;n<i;n++)X(t[n].label)&&(t.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){let n=this.options.ticks.sampleSize,i=this.ticks;n<i.length&&(i=Hu(i,n)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,i){let{ctx:r,_longestTextCache:s}=this,o=[],a=[],l=Math.floor(n/Vu(n,i)),c=0,u=0,d,h,f,g,m,b,y,_,x,v,w;for(d=0;d<n;d+=l){if(g=t[d].label,m=this._resolveTickFontOptions(d),r.font=b=m.string,y=s[b]=s[b]||{data:{},gc:[]},_=m.lineHeight,x=v=0,!X(g)&&!at(g))x=ji(r,y.data,y.gc,x,g),v=_;else if(at(g))for(h=0,f=g.length;h<f;++h)w=g[h],!X(w)&&!at(w)&&(x=ji(r,y.data,y.gc,x,w),v+=_);o.push(x),a.push(v),c=Math.max(x,c),u=Math.max(v,u)}MS(s,n);let k=o.indexOf(c),E=a.indexOf(u),M=C=>({width:o[C]||0,height:a[C]||0});return{first:M(0),last:M(n-1),widest:M(k),highest:M(E),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){let n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let n=this._startPixel+t*this._length;return eu(this._alignToPixels?Ge(this.chart,n,0):n)}getDecimalForPixel(t){let n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){let n=this.ticks||[];if(t>=0&&t<n.length){let i=n[t];return i.$context||(i.$context=OS(this.getContext(),t,i))}return this.$context||(this.$context=ES(this.chart.getContext(),this))}_tickSize(){let t=this.options.ticks,n=Oe(this.labelRotation),i=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,a=s?s.widest.width+o:0,l=s?s.highest.height+o:0;return this.isHorizontal()?l*i>a*r?a/i:l/r:l*r<a*i?l/i:a/r}_isVisible(){let t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){let n=this.axis,i=this.chart,r=this.options,{grid:s,position:o,border:a}=r,l=s.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=Gi(s),f=[],g=a.setContext(this.getContext()),m=g.display?g.width:0,b=m/2,y=function($){return Ge(i,$,m)},_,x,v,w,k,E,M,C,T,O,A,D;if(o==="top")_=y(this.bottom),E=this.bottom-h,C=_-b,O=y(t.top)+b,D=t.bottom;else if(o==="bottom")_=y(this.top),O=t.top,D=y(t.bottom)-b,E=_+b,C=this.top+h;else if(o==="left")_=y(this.right),k=this.right-h,M=_-b,T=y(t.left)+b,A=t.right;else if(o==="right")_=y(this.left),T=t.left,A=y(t.right)-b,k=_+b,M=this.left+h;else if(n==="x"){if(o==="center")_=y((t.top+t.bottom)/2+.5);else if(H(o)){let $=Object.keys(o)[0],q=o[$];_=y(this.chart.scales[$].getPixelForValue(q))}O=t.top,D=t.bottom,E=_+b,C=E+h}else if(n==="y"){if(o==="center")_=y((t.left+t.right)/2);else if(H(o)){let $=Object.keys(o)[0],q=o[$];_=y(this.chart.scales[$].getPixelForValue(q))}k=_-b,M=k-h,T=t.left,A=t.right}let Z=W(r.ticks.maxTicksLimit,d),B=Math.max(1,Math.ceil(d/Z));for(x=0;x<d;x+=B){let $=this.getContext(x),q=s.setContext($),L=a.setContext($),U=q.lineWidth,Y=q.color,_t=L.dash||[],it=L.dashOffset,dt=q.tickWidth,Q=q.tickColor,tt=q.tickBorderDash||[],ot=q.tickBorderDashOffset;v=SS(this,x,l),v!==void 0&&(w=Ge(i,v,U),c?k=M=T=A=w:E=C=O=D=w,f.push({tx1:k,ty1:E,tx2:M,ty2:C,x1:T,y1:O,x2:A,y2:D,width:U,color:Y,borderDash:_t,borderDashOffset:it,tickWidth:dt,tickColor:Q,tickBorderDash:tt,tickBorderDashOffset:ot}))}return this._ticksLength=d,this._borderValue=_,f}_computeLabelItems(t){let n=this.axis,i=this.options,{position:r,ticks:s}=i,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=s,h=Gi(i.grid),f=h+u,g=d?-u:f,m=-Oe(this.labelRotation),b=[],y,_,x,v,w,k,E,M,C,T,O,A,D="middle";if(r==="top")k=this.bottom-g,E=this._getXAxisLabelAlignment();else if(r==="bottom")k=this.top+g,E=this._getXAxisLabelAlignment();else if(r==="left"){let B=this._getYAxisLabelAlignment(h);E=B.textAlign,w=B.x}else if(r==="right"){let B=this._getYAxisLabelAlignment(h);E=B.textAlign,w=B.x}else if(n==="x"){if(r==="center")k=(t.top+t.bottom)/2+f;else if(H(r)){let B=Object.keys(r)[0],$=r[B];k=this.chart.scales[B].getPixelForValue($)+f}E=this._getXAxisLabelAlignment()}else if(n==="y"){if(r==="center")w=(t.left+t.right)/2-f;else if(H(r)){let B=Object.keys(r)[0],$=r[B];w=this.chart.scales[B].getPixelForValue($)}E=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(l==="start"?D="top":l==="end"&&(D="bottom"));let Z=this._getLabelSizes();for(y=0,_=a.length;y<_;++y){x=a[y],v=x.label;let B=s.setContext(this.getContext(y));M=this.getPixelForTick(y)+s.labelOffset,C=this._resolveTickFontOptions(y),T=C.lineHeight,O=at(v)?v.length:1;let $=O/2,q=B.color,L=B.textStrokeColor,U=B.textStrokeWidth,Y=E;o?(w=M,E==="inner"&&(y===_-1?Y=this.options.reverse?"left":"right":y===0?Y=this.options.reverse?"right":"left":Y="center"),r==="top"?c==="near"||m!==0?A=-O*T+T/2:c==="center"?A=-Z.highest.height/2-$*T+T:A=-Z.highest.height+T/2:c==="near"||m!==0?A=T/2:c==="center"?A=Z.highest.height/2-$*T:A=Z.highest.height-O*T,d&&(A*=-1),m!==0&&!B.showLabelBackdrop&&(w+=T/2*Math.sin(m))):(k=M,A=(1-O)*T/2);let _t;if(B.showLabelBackdrop){let it=Ot(B.backdropPadding),dt=Z.heights[y],Q=Z.widths[y],tt=A-it.top,ot=0-it.left;switch(D){case"middle":tt-=dt/2;break;case"bottom":tt-=dt;break}switch(E){case"center":ot-=Q/2;break;case"right":ot-=Q;break;case"inner":y===_-1?ot-=Q:y>0&&(ot-=Q/2);break}_t={left:ot,top:tt,width:Q+it.width,height:dt+it.height,color:B.backdropColor}}b.push({label:v,font:C,textOffset:A,options:{rotation:m,color:q,strokeColor:L,strokeWidth:U,textAlign:Y,textBaseline:D,translation:[w,k],backdrop:_t}})}return b}_getXAxisLabelAlignment(){let{position:t,ticks:n}=this.options;if(-Oe(this.labelRotation))return t==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){let{position:n,ticks:{crossAlign:i,mirror:r,padding:s}}=this.options,o=this._getLabelSizes(),a=t+s,l=o.widest.width,c,u;return n==="left"?r?(u=this.right+s,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?r?(u=this.left+s,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){let{ctx:t,options:{backgroundColor:n},left:i,top:r,width:s,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,r,s,o),t.restore())}getLineWidthForValue(t){let n=this.options.grid;if(!this._isVisible()||!n.display)return 0;let r=this.ticks.findIndex(s=>s.value===t);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){let n=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),s,o,a=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(n.display)for(s=0,o=r.length;s<o;++s){let l=r[s];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){let{chart:t,ctx:n,options:{border:i,grid:r}}=this,s=i.setContext(this.getContext()),o=i.display?s.width:0;if(!o)return;let a=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue,c,u,d,h;this.isHorizontal()?(c=Ge(t,this.left,o)-o/2,u=Ge(t,this.right,a)+a/2,d=h=l):(d=Ge(t,this.top,o)-o/2,h=Ge(t,this.bottom,a)+a/2,c=u=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,h),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;let i=this.ctx,r=this._computeLabelArea();r&&ps(i,r);let s=this.getLabelItems(t);for(let o of s){let a=o.options,l=o.font,c=o.label,u=o.textOffset;yn(i,c,0,u,l,a)}r&&gs(i)}drawTitle(){let{ctx:t,options:{position:n,title:i,reverse:r}}=this;if(!i.display)return;let s=kt(i.font),o=Ot(i.padding),a=i.align,l=s.lineHeight/2;n==="bottom"||n==="center"||H(n)?(l+=o.bottom,at(i.text)&&(l+=s.lineHeight*(i.text.length-1))):l+=o.top;let{titleX:c,titleY:u,maxWidth:d,rotation:h}=TS(this,l,n,a);yn(t,i.text,0,0,s,{color:i.color,maxWidth:d,rotation:h,textAlign:CS(a,n,r),textBaseline:"middle",translation:[c,u]})}draw(t){!this._isVisible()||(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){let t=this.options,n=t.ticks&&t.ticks.z||0,i=W(t.grid&&t.grid.z,-1),r=W(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Pe.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(t){let n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[],s,o;for(s=0,o=n.length;s<o;++s){let a=n[s];a[i]===this.id&&(!t||a.type===t)&&r.push(a)}return r}_resolveTickFontOptions(t){let n=this.options.ticks.setContext(this.getContext(t));return kt(n.font)}_maxDigits(){let t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}},si=class{constructor(t,n,i){this.type=t,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){let n=Object.getPrototypeOf(t),i;LS(n)&&(i=this.register(n));let r=this.items,s=t.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in r||(r[s]=t,AS(t,o,i),this.override&&ct.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){let n=this.items,i=t.id,r=this.scope;i in n&&delete n[i],r&&i in ct[r]&&(delete ct[r][i],this.override&&delete Ye[i])}};function AS(e,t,n){let i=Zn(Object.create(null),[n?ct.get(n):{},ct.get(t),e.defaults]);ct.set(t,i),e.defaultRoutes&&PS(t,e.defaultRoutes),e.descriptors&&ct.describe(t,e.descriptors)}function PS(e,t){Object.keys(t).forEach(n=>{let i=n.split("."),r=i.pop(),s=[e].concat(i).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");ct.route(s,r,l,a)})}function LS(e){return"id"in e&&"defaults"in e}var xa=class{constructor(){this.controllers=new si(Je,"datasets",!0),this.elements=new si(se,"elements"),this.plugins=new si(Object,"plugins"),this.scales=new si(Pe,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,i){[...n].forEach(r=>{let s=i||this._getRegistryForType(r);i||s.isForType(r)||s===this.plugins&&r.id?this._exec(t,s,r):K(r,o=>{let a=i||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,i){let r=ls(t);et(i["before"+r],[],i),n[t](i),et(i["after"+r],[],i)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){let i=this._typedRegistries[n];if(i.isForType(t))return i}return this.plugins}_get(t,n,i){let r=n.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return r}},be=new xa,_a=class{constructor(){this._init=[]}notify(t,n,i,r){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));let s=r?this._descriptors(t).filter(r):this._descriptors(t),o=this._notify(s,t,n,i);return n==="afterDestroy"&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,n,i,r){r=r||{};for(let s of t){let o=s.plugin,a=o[i],l=[n,r,s.options];if(et(a,l,o)===!1&&r.cancelable)return!1}return!0}invalidate(){X(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){let i=t&&t.config,r=W(i.options&&i.options.plugins,{}),s=DS(i);return r===!1&&!n?[]:IS(t,s,r,n)}_notifyStateChanges(t){let n=this._oldCache||[],i=this._cache,r=(s,o)=>s.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(r(n,i),t,"stop"),this._notify(r(i,n),t,"start")}};function DS(e){let t={},n=[],i=Object.keys(be.plugins.items);for(let s=0;s<i.length;s++)n.push(be.getPlugin(i[s]));let r=e.plugins||[];for(let s=0;s<r.length;s++){let o=r[s];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function qS(e,t){return!t&&e===!1?null:e===!0?{}:e}function IS(e,{plugins:t,localIds:n},i,r){let s=[],o=e.getContext();for(let a of t){let l=a.id,c=qS(i[l],r);c!==null&&s.push({plugin:a,options:RS(e.config,{plugin:a,local:n[l]},c,o)})}return s}function RS(e,{plugin:t,local:n},i,r){let s=e.pluginScopeKeys(t),o=e.getOptionScopes(i,s);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function wa(e,t){let n=ct.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function NS(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function FS(e,t){return e===t?"_index_":"_value_"}function Yu(e){if(e==="x"||e==="y"||e==="r")return e}function BS(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function ka(e,...t){if(Yu(e))return e;for(let n of t){let i=n.axis||BS(n.position)||e.length>1&&Yu(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Gu(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function zS(e,t){if(t.data&&t.data.datasets){let n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return Gu(e,"x",n[0])||Gu(e,"y",n[0])}return{}}function jS(e,t){let n=Ye[e.type]||{scales:{}},i=t.scales||{},r=wa(e.type,t),s=Object.create(null);return Object.keys(i).forEach(o=>{let a=i[o];if(!H(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);let l=ka(o,a,zS(o,e),ct.scales[a.type]),c=FS(l,r),u=n.scales||{};s[o]=Qn(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(o=>{let a=o.type||e.type,l=o.indexAxis||wa(a,t),u=(Ye[a]||{}).scales||{};Object.keys(u).forEach(d=>{let h=NS(d,l),f=o[h+"AxisID"]||h;s[f]=s[f]||Object.create(null),Qn(s[f],[{axis:h},i[f],u[d]])})}),Object.keys(s).forEach(o=>{let a=s[o];Qn(a,[ct.scales[a.type],ct.scale])}),s}function Md(e){let t=e.options||(e.options={});t.plugins=W(t.plugins,{}),t.scales=jS(e,t)}function Ed(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function $S(e){return e=e||{},e.data=Ed(e.data),Md(e),e}var Xu=new Map,Od=new Set;function ws(e,t){let n=Xu.get(e);return n||(n=t(),Xu.set(e,n),Od.add(n)),n}var Xi=(e,t,n)=>{let i=vn(t,n);i!==void 0&&e.add(i)},Sa=class{constructor(t){this._config=$S(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Ed(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),Md(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ws(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return ws(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return ws(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){let n=t.id,i=this.type;return ws(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){let i=this._scopeCache,r=i.get(t);return(!r||n)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,n,i){let{options:r,type:s}=this,o=this._cachedScopes(t,i),a=o.get(n);if(a)return a;let l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>Xi(l,t,d))),u.forEach(d=>Xi(l,r,d)),u.forEach(d=>Xi(l,Ye[s]||{},d)),u.forEach(d=>Xi(l,ct,d)),u.forEach(d=>Xi(l,hs,d))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Od.has(n)&&o.set(n,c),c}chartOptionScopes(){let{options:t,type:n}=this;return[t,Ye[n]||{},ct.datasets[n]||{},{type:n},ct,hs]}resolveNamedOptions(t,n,i,r=[""]){let s={$shared:!0},{resolver:o,subPrefixes:a}=Ku(this._resolverCache,t,r),l=o;if(VS(o,n)){s.$shared=!1,i=Me(i)?i():i;let c=this.createResolver(t,i,a);l=bn(o,i,c)}for(let c of n)s[c]=l[c];return s}createResolver(t,n,i=[""],r){let{resolver:s}=Ku(this._resolverCache,t,i);return H(n)?bn(s,n,void 0,r):s}};function Ku(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));let r=n.join(),s=i.get(r);return s||(s={resolver:ms(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(r,s)),s}var WS=e=>H(e)&&Object.getOwnPropertyNames(e).some(t=>Me(e[t]));function VS(e,t){let{isScriptable:n,isIndexable:i}=ta(e);for(let r of t){let s=n(r),o=i(r),a=(o||s)&&e[r];if(s&&(Me(a)||WS(a))||o&&at(a))return!0}return!1}var HS="4.4.7",US=["top","bottom","left","right","chartArea"];function Zu(e,t){return e==="top"||e==="bottom"||US.indexOf(e)===-1&&t==="x"}function Ju(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function Qu(e){let t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),et(n&&n.onComplete,[e],t)}function YS(e){let t=e.chart,n=t.options.animation;et(n&&n.onProgress,[e],t)}function Cd(e){return bs()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var Ts={},td=e=>{let t=Cd(e);return Object.values(Ts).filter(n=>n.canvas===t).pop()};function GS(e,t,n){let i=Object.keys(e);for(let r of i){let s=+r;if(s>=t){let o=e[r];delete e[r],(n>0||s>t)&&(e[s+n]=o)}}}function XS(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}function ks(e,t,n){return e.options.clip?e[n]:t[n]}function KS(e,t){let{xScale:n,yScale:i}=e;return n&&i?{left:ks(n,t,"left"),right:ks(n,t,"right"),top:ks(i,t,"top"),bottom:ks(i,t,"bottom")}:t}var lt=class{static register(...t){be.add(...t),ed()}static unregister(...t){be.remove(...t),ed()}constructor(t,n){let i=this.config=new Sa(n),r=Cd(t),s=td(r);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");let o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||mS(r)),this.platform.updateConfig(i);let a=this.platform.acquireContext(r,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=Gc(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new _a,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=ou(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Ts[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Te.listen(this,"complete",Qu),Te.listen(this,"progress",YS),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:r,_aspectRatio:s}=this;return X(t)?n&&s?s:r?i/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return be}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ia(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ko(this.canvas,this.ctx),this}stop(){return Te.stop(this),this}resize(t,n){Te.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){let i=this.options,r=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,t,n,s),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,ia(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),et(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let n=this.options.scales||{};K(n,(i,r)=>{i.id=r})}buildOrUpdateScales(){let t=this.options,n=t.scales,i=this.scales,r=Object.keys(i).reduce((o,a)=>(o[a]=!1,o),{}),s=[];n&&(s=s.concat(Object.keys(n).map(o=>{let a=n[o],l=ka(o,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),K(s,o=>{let a=o.options,l=a.id,c=ka(l,a),u=W(a.type,o.dtype);(a.position===void 0||Zu(a.position,c)!==Zu(o.dposition))&&(a.position=o.dposition),r[l]=!0;let d=null;if(l in i&&i[l].type===u)d=i[l];else{let h=be.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(a,t)}),K(r,(o,a)=>{o||delete i[a]}),K(i,o=>{Qe.configure(this,o,o.options),Qe.addBox(this,o)})}_updateMetasets(){let t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((r,s)=>r.index-s.index),i>n){for(let r=n;r<i;++r)this._destroyDatasetMeta(r);t.splice(n,i-n)}this._sortedMetasets=t.slice(0).sort(Ju("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((i,r)=>{n.filter(s=>s===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){let t=[],n=this.data.datasets,i,r;for(this._removeUnreferencedMetasets(),i=0,r=n.length;i<r;i++){let s=n[i],o=this.getDatasetMeta(i),a=s.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=a,o.indexAxis=s.indexAxis||wa(a,this.options),o.order=s.order||0,o.index=i,o.label=""+s.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{let l=be.getController(a),{datasetElementType:c,dataElementType:u}=ct.datasets[a];Object.assign(l,{dataElementType:be.getElement(u),datasetElementType:c&&be.getElement(c)}),o.controller=new l(this,i),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){K(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let n=this.config;n.update();let i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c<u;c++){let{controller:d}=this.getDatasetMeta(c),h=!r&&s.indexOf(d)===-1;d.buildOrUpdateElements(h),o=Math.max(+d.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),r||K(s,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ju("z","_idx"));let{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){K(this.scales,t=>{Qe.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Fo(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(let{method:i,start:r,count:s}of n){let o=i==="_removeElements"?-s:s;GS(t,r,o)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let n=this.data.datasets.length,i=s=>new Set(t.filter(o=>o[0]===s).map((o,a)=>a+","+o.splice(1).join(","))),r=i(0);for(let s=1;s<n;s++)if(!Fo(r,i(s)))return;return Array.from(r).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Qe.update(this,this.width,this.height,t);let n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],K(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,s)=>{r._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,Me(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){let i=this.getDatasetMeta(t),r={meta:i,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(n),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Te.has(this)?this.attached&&!Te.running(this)&&Te.start(this):(this.draw(),Qu({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:i,height:r}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,r)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let n=this._sortedMetasets,i=[],r,s;for(r=0,s=n.length;r<s;++r){let o=n[r];(!t||o.visible)&&i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let n=this.ctx,i=t._clip,r=!i.disabled,s=KS(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&ps(n,{left:i.left===!1?0:s.left-i.left,right:i.right===!1?this.width:s.right+i.right,top:i.top===!1?0:s.top-i.top,bottom:i.bottom===!1?this.height:s.bottom+i.bottom}),t.controller.draw(),r&&gs(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return pe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,r){let s=Zk.modes[n];return typeof s=="function"?s(this,t,i,r):[]}getDatasetMeta(t){let n=this.data.datasets[t],i=this._metasets,r=i.filter(s=>s&&s._dataset===n).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=Ce(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let n=this.data.datasets[t];if(!n)return!1;let i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){let i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){let r=i?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,r);ti(n)?(s.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(s,{visible:i}),this.update(a=>a.datasetIndex===t?r:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){let n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Te.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ko(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Ts[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,n=this.platform,i=(s,o)=>{n.addEventListener(this,s,o),t[s]=o},r=(s,o,a)=>{s.offsetX=o,s.offsetY=a,this._eventHandler(s)};K(this.options.events,s=>i(s,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,n=this.platform,i=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},r=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},s=(l,c)=>{this.canvas&&this.resize(l,c)},o,a=()=>{r("attach",a),this.attached=!0,this.resize(),i("resize",s),i("detach",o)};o=()=>{this.attached=!1,r("resize",s),this._stop(),this._resize(0,0),i("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){K(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},K(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){let r=i?"set":"remove",s,o,a,l;for(n==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+r+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){o=t[a];let c=o&&this.getDatasetMeta(o.datasetIndex).controller;c&&c[r+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let n=this._active||[],i=t.map(({datasetIndex:s,index:o})=>{let a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[o],index:o}});!$i(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,i){let r=this.options.hover,s=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),o=s(n,t),a=i?t:s(t,n);o.length&&this.updateHoverStyle(o,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(t,n){let i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},r=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,r)===!1)return;let s=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(s||i.changed)&&this.render(),this}_handleEvent(t,n,i){let{_active:r=[],options:s}=this,o=n,a=this._getActiveElements(t,r,i,o),l=Zc(t),c=XS(t,this._lastEvent,i,l);i&&(this._lastEvent=null,et(s.onHover,[t,a,this],this),l&&et(s.onClick,[t,a,this],this));let u=!$i(a,r);return(u||n)&&(this._active=a,this._updateHoverStyles(a,r,n)),this._lastEvent=c,u}_getActiveElements(t,n,i,r){if(t.type==="mouseout")return[];if(!i)return n;let s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,r)}};F(lt,"defaults",ct),F(lt,"instances",Ts),F(lt,"overrides",Ye),F(lt,"registry",be),F(lt,"version",HS),F(lt,"getChart",td);function ed(){return K(lt.instances,e=>e._plugins.invalidate())}function Td(e,t,n=t){e.lineCap=W(n.borderCapStyle,t.borderCapStyle),e.setLineDash(W(n.borderDash,t.borderDash)),e.lineDashOffset=W(n.borderDashOffset,t.borderDashOffset),e.lineJoin=W(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=W(n.borderWidth,t.borderWidth),e.strokeStyle=W(n.borderColor,t.borderColor)}function ZS(e,t,n){e.lineTo(n.x,n.y)}function JS(e){return e.stepped?hu:e.tension||e.cubicInterpolationMode==="monotone"?fu:ZS}function Ad(e,t,n={}){let i=e.length,{start:r=0,end:s=i-1}=n,{start:o,end:a}=t,l=Math.max(r,o),c=Math.min(s,a),u=r<o&&s<o||r>a&&s>a;return{count:i,start:l,loop:t.loop,ilen:c<l&&!u?i+c-l:c-l}}function QS(e,t,n,i){let{points:r,options:s}=t,{count:o,start:a,loop:l,ilen:c}=Ad(r,n,i),u=JS(s),{move:d=!0,reverse:h}=i||{},f,g,m;for(f=0;f<=c;++f)g=r[(a+(h?c-f:f))%o],!g.skip&&(d?(e.moveTo(g.x,g.y),d=!1):u(e,m,g,h,s.stepped),m=g);return l&&(g=r[(a+(h?c:0))%o],u(e,m,g,h,s.stepped)),!!l}function tM(e,t,n,i){let r=t.points,{count:s,start:o,ilen:a}=Ad(r,n,i),{move:l=!0,reverse:c}=i||{},u=0,d=0,h,f,g,m,b,y,_=v=>(o+(c?a-v:v))%s,x=()=>{m!==b&&(e.lineTo(u,b),e.lineTo(u,m),e.lineTo(u,y))};for(l&&(f=r[_(0)],e.moveTo(f.x,f.y)),h=0;h<=a;++h){if(f=r[_(h)],f.skip)continue;let v=f.x,w=f.y,k=v|0;k===g?(w<m?m=w:w>b&&(b=w),u=(d*u+v)/++d):(x(),e.lineTo(v,w),g=k,d=0,m=b=w),y=w}x()}function Ma(e){let t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?tM:QS}function eM(e){return e.stepped?wu:e.tension||e.cubicInterpolationMode==="monotone"?ku:Ve}function nM(e,t,n,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,n,i)&&r.closePath()),Td(e,t.options),e.stroke(r)}function iM(e,t,n,i){let{segments:r,options:s}=t,o=Ma(t);for(let a of r)Td(e,s,a.style),e.beginPath(),o(e,t,a,{start:n,end:n+i-1})&&e.closePath(),e.stroke()}var rM=typeof Path2D=="function";function sM(e,t,n,i){rM&&!t.options.segment?nM(e,t,n,i):iM(e,t,n,i)}var Ze=class extends se{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){let i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){let r=i.spanGaps?this._loop:this._fullLoop;yu(this._points,i,t,r,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Ou(this,this.options.segment))}first(){let t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){let t=this.segments,n=this.points,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){let i=this.options,r=t[n],s=this.points,o=Eu(this,{property:n,start:r,end:r});if(!o.length)return;let a=[],l=eM(i),c,u;for(c=0,u=o.length;c<u;++c){let{start:d,end:h}=o[c],f=s[d],g=s[h];if(f===g){a.push(f);continue}let m=Math.abs((r-f[n])/(g[n]-f[n])),b=l(f,g,m,i.stepped);b[n]=t[n],a.push(b)}return a.length===1?a[0]:a}pathSegment(t,n,i){return Ma(this)(t,this,n,i)}path(t,n,i){let r=this.segments,s=Ma(this),o=this._loop;n=n||0,i=i||this.points.length-n;for(let a of r)o&=s(t,this,a,{start:n,end:n+i-1});return!!o}draw(t,n,i,r){let s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),sM(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}};F(Ze,"id","line"),F(Ze,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),F(Ze,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),F(Ze,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function nd(e,t,n,i){let r=e.options,{[n]:s}=e.getProps([n],i);return Math.abs(t-s)<r.radius+r.hitRadius}var Sn=class extends se{parsed;skip;stop;constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,i){let r=this.options,{x:s,y:o}=this.getProps(["x","y"],i);return Math.pow(t-s,2)+Math.pow(n-o,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(t,n){return nd(this,t,"x",n)}inYRange(t,n){return nd(this,t,"y",n)}getCenterPoint(t){let{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);let i=n&&t.borderWidth||0;return(n+i)*2}draw(t,n){let i=this.options;this.skip||i.radius<.1||!pe(this,n,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,fs(t,i,this.x,this.y))}getRange(){let t=this.options||{};return t.radius+t.hitRadius}};F(Sn,"id","point"),F(Sn,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),F(Sn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Pd(e,t){let{x:n,y:i,base:r,width:s,height:o}=e.getProps(["x","y","base","width","height"],t),a,l,c,u,d;return e.horizontal?(d=o/2,a=Math.min(n,r),l=Math.max(n,r),c=i-d,u=i+d):(d=s/2,a=n-d,l=n+d,c=Math.min(i,r),u=Math.max(i,r)),{left:a,top:c,right:l,bottom:u}}function tn(e,t,n,i){return e?0:Dt(t,n,i)}function oM(e,t,n){let i=e.options.borderWidth,r=e.borderSkipped,s=Qo(i);return{t:tn(r.top,s.top,0,n),r:tn(r.right,s.right,0,t),b:tn(r.bottom,s.bottom,0,n),l:tn(r.left,s.left,0,t)}}function aM(e,t,n){let{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),r=e.options.borderRadius,s=Xe(r),o=Math.min(t,n),a=e.borderSkipped,l=i||H(r);return{topLeft:tn(!l||a.top||a.left,s.topLeft,0,o),topRight:tn(!l||a.top||a.right,s.topRight,0,o),bottomLeft:tn(!l||a.bottom||a.left,s.bottomLeft,0,o),bottomRight:tn(!l||a.bottom||a.right,s.bottomRight,0,o)}}function lM(e){let t=Pd(e),n=t.right-t.left,i=t.bottom-t.top,r=oM(e,n/2,i/2),s=aM(e,n/2,i/2);return{outer:{x:t.left,y:t.top,w:n,h:i,radius:s},inner:{x:t.left+r.l,y:t.top+r.t,w:n-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,s.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(r.b,r.r))}}}}function pa(e,t,n,i){let r=t===null,s=n===null,a=e&&!(r&&s)&&Pd(e,i);return a&&(r||Ue(t,a.left,a.right))&&(s||Ue(n,a.top,a.bottom))}function cM(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function uM(e,t){e.rect(t.x,t.y,t.w,t.h)}function ga(e,t,n={}){let i=e.x!==n.x?-t:0,r=e.y!==n.y?-t:0,s=(e.x+e.w!==n.x+n.w?t:0)-i,o=(e.y+e.h!==n.y+n.h?t:0)-r;return{x:e.x+i,y:e.y+r,w:e.w+s,h:e.h+o,radius:e.radius}}var jt=class extends se{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){let{inflateAmount:n,options:{borderColor:i,backgroundColor:r}}=this,{inner:s,outer:o}=lM(this),a=cM(o.radius)?ii:uM;t.save(),(o.w!==s.w||o.h!==s.h)&&(t.beginPath(),a(t,ga(o,n,s)),t.clip(),a(t,ga(s,-n,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,ga(s,n)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,n,i){return pa(this,t,n,i)}inXRange(t,n){return pa(this,t,null,n)}inYRange(t,n){return pa(this,null,t,n)}getCenterPoint(t){let{x:n,y:i,base:r,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(n+r)/2:n,y:s?i:(i+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}};F(jt,"id","bar"),F(jt,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),F(jt,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var id=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},dM=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index,Ds=class extends se{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,i){this.maxWidth=t,this.maxHeight=n,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},n=et(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,r)=>t.sort(i,r,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){let{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}let i=t.labels,r=kt(i.font),s=r.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=id(i,s),c,u;n.font=r.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,s,a,l)+10):(u=this.maxHeight,c=this._fitCols(o,r,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,i,r){let{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=r+a,d=t;s.textAlign="left",s.textBaseline="middle";let h=-1,f=-u;return this.legendItems.forEach((g,m)=>{let b=i+n/2+s.measureText(g.text).width;(m===0||c[c.length-1]+b+2*a>o)&&(d+=u,c[c.length-(m>0?0:1)]=0,f+=u,h++),l[m]={left:0,top:f,row:h,width:b,height:r},c[c.length-1]+=b+a}),d}_fitCols(t,n,i,r){let{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-t,d=a,h=0,f=0,g=0,m=0;return this.legendItems.forEach((b,y)=>{let{itemWidth:_,itemHeight:x}=hM(i,n,s,b,r);y>0&&f+x+2*a>u&&(d+=h+a,c.push({width:h,height:f}),g+=h+a,m++,h=f=0),l[y]={left:g,top:f,col:m,width:_,height:x},h=Math.max(h,_),f+=x+a}),d+=h,c.push({width:h,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:r},rtl:s}}=this,o=xn(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=It(i,this.left+r,this.right-this.lineWidths[a]);for(let c of n)a!==c.row&&(a=c.row,l=It(i,this.left+r,this.right-this.lineWidths[a])),c.top+=this.top+t+r,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+r}else{let a=0,l=It(i,this.top+t+r,this.bottom-this.columnSizes[a].height);for(let c of n)c.col!==a&&(a=c.col,l=It(i,this.top+t+r,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+r,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;ps(t,this),this._draw(),gs(t)}}_draw(){let{options:t,columnSizes:n,lineWidths:i,ctx:r}=this,{align:s,labels:o}=t,a=ct.color,l=xn(t.rtl,this.left,this.width),c=kt(o.font),{padding:u}=o,d=c.size,h=d/2,f;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;let{boxWidth:g,boxHeight:m,itemHeight:b}=id(o,d),y=function(k,E,M){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;r.save();let C=W(M.lineWidth,1);if(r.fillStyle=W(M.fillStyle,a),r.lineCap=W(M.lineCap,"butt"),r.lineDashOffset=W(M.lineDashOffset,0),r.lineJoin=W(M.lineJoin,"miter"),r.lineWidth=C,r.strokeStyle=W(M.strokeStyle,a),r.setLineDash(W(M.lineDash,[])),o.usePointStyle){let T={radius:m*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:C},O=l.xPlus(k,g/2),A=E+h;Zo(r,T,O,A,o.pointStyleWidth&&g)}else{let T=E+Math.max((d-m)/2,0),O=l.leftForLtr(k,g),A=Xe(M.borderRadius);r.beginPath(),Object.values(A).some(D=>D!==0)?ii(r,{x:O,y:T,w:g,h:m,radius:A}):r.rect(O,T,g,m),r.fill(),C!==0&&r.stroke()}r.restore()},_=function(k,E,M){yn(r,M.text,k,E+b/2,c,{strikethrough:M.hidden,textAlign:l.textAlign(M.textAlign)})},x=this.isHorizontal(),v=this._computeTitleHeight();x?f={x:It(s,this.left+u,this.right-i[0]),y:this.top+u+v,line:0}:f={x:this.left+u,y:It(s,this.top+v+u,this.bottom-n[0].height),line:0},sa(this.ctx,t.textDirection);let w=b+u;this.legendItems.forEach((k,E)=>{r.strokeStyle=k.fontColor,r.fillStyle=k.fontColor;let M=r.measureText(k.text).width,C=l.textAlign(k.textAlign||(k.textAlign=o.textAlign)),T=g+h+M,O=f.x,A=f.y;l.setWidth(this.width),x?E>0&&O+T+u>this.right&&(A=f.y+=w,f.line++,O=f.x=It(s,this.left+u,this.right-i[f.line])):E>0&&A+w>this.bottom&&(O=f.x=O+n[f.line].width+u,f.line++,A=f.y=It(s,this.top+v+u,this.bottom-n[f.line].height));let D=l.x(O);if(y(D,A,k),O=au(C,O+g+h,x?O+T:this.right,t.rtl),_(l.x(O),A,k),x)f.x+=T+u;else if(typeof k.text!="string"){let Z=c.lineHeight;f.y+=Ld(k,Z)+u}else f.y+=w}),oa(this.ctx,t.textDirection)}drawTitle(){let t=this.options,n=t.title,i=kt(n.font),r=Ot(n.padding);if(!n.display)return;let s=xn(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=i.size/2,c=r.top+l,u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,d=It(t.align,d,this.right-h);else{let g=this.columnSizes.reduce((m,b)=>Math.max(m,b.height),0);u=c+It(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}let f=It(a,d,d+h);o.textAlign=s.textAlign(Yo(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=i.string,yn(o,n.text,f,u,i)}_computeTitleHeight(){let t=this.options.title,n=kt(t.font),i=Ot(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,r,s;if(Ue(t,this.left,this.right)&&Ue(n,this.top,this.bottom)){for(s=this.legendHitBoxes,i=0;i<s.length;++i)if(r=s[i],Ue(t,r.left,r.left+r.width)&&Ue(n,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){let n=this.options;if(!gM(t.type,n))return;let i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){let r=this._hoveredItem,s=dM(r,i);r&&!s&&et(n.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!s&&et(n.onHover,[t,i,this],this)}else i&&et(n.onClick,[t,i,this],this)}};function hM(e,t,n,i,r){let s=fM(i,e,t,n),o=pM(r,i,t.lineHeight);return{itemWidth:s,itemHeight:o}}function fM(e,t,n,i){let r=e.text;return r&&typeof r!="string"&&(r=r.reduce((s,o)=>s.length>o.length?s:o)),t+n.size/2+i.measureText(r).width}function pM(e,t,n){let i=e;return typeof t.text!="string"&&(i=Ld(t,n)),i}function Ld(e,t){let n=e.text?e.text.length:0;return t*n}function gM(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Dd={id:"legend",_element:Ds,start(e,t,n){let i=e.legend=new Ds({ctx:e.ctx,options:n,chart:e});Qe.configure(e,i,n),Qe.addBox(e,i)},stop(e){Qe.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){let i=e.legend;Qe.configure(e,i,n),i.options=n},afterUpdate(e){let t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){let i=t.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:r,color:s,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(n?0:void 0),u=Ot(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:r||c.textAlign,borderRadius:o&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};var Zi={average(e){if(!e.length)return!1;let t,n,i=new Set,r=0,s=0;for(t=0,n=e.length;t<n;++t){let a=e[t].element;if(a&&a.hasValue()){let l=a.tooltipPosition();i.add(l.x),r+=l.y,++s}}return s===0||i.size===0?!1:{x:[...i].reduce((a,l)=>a+l)/i.size,y:r/s}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,r=Number.POSITIVE_INFINITY,s,o,a;for(s=0,o=e.length;s<o;++s){let l=e[s].element;if(l&&l.hasValue()){let c=l.getCenterPoint(),u=os(t,c);u<r&&(r=u,a=l)}}if(a){let l=a.tooltipPosition();n=l.x,i=l.y}return{x:n,y:i}}};function me(e,t){return t&&(at(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Ae(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
`)>-1?e.split(`
`):e}function mM(e,t){let{element:n,datasetIndex:i,index:r}=t,s=e.getDatasetMeta(i).controller,{label:o,value:a}=s.getLabelAndValue(r);return{chart:e,label:o,parsed:s.getParsed(r),raw:e.data.datasets[i].data[r],formattedValue:a,dataset:s.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function rd(e,t){let n=e.chart.ctx,{body:i,footer:r,title:s}=e,{boxWidth:o,boxHeight:a}=t,l=kt(t.bodyFont),c=kt(t.titleFont),u=kt(t.footerFont),d=s.length,h=r.length,f=i.length,g=Ot(t.padding),m=g.height,b=0,y=i.reduce((v,w)=>v+w.before.length+w.lines.length+w.after.length,0);if(y+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),y){let v=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=f*v+(y-f)*l.lineHeight+(y-1)*t.bodySpacing}h&&(m+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let _=0,x=function(v){b=Math.max(b,n.measureText(v).width+_)};return n.save(),n.font=c.string,K(e.title,x),n.font=l.string,K(e.beforeBody.concat(e.afterBody),x),_=t.displayColors?o+2+t.boxPadding:0,K(i,v=>{K(v.before,x),K(v.lines,x),K(v.after,x)}),_=0,n.font=u.string,K(e.footer,x),n.restore(),b+=g.width,{width:b,height:m}}function bM(e,t){let{y:n,height:i}=t;return n<i/2?"top":n>e.height-i/2?"bottom":"center"}function vM(e,t,n,i){let{x:r,width:s}=i,o=n.caretSize+n.caretPadding;if(e==="left"&&r+s+o>t.width||e==="right"&&r-s-o<0)return!0}function yM(e,t,n,i){let{x:r,width:s}=n,{width:o,chartArea:{left:a,right:l}}=e,c="center";return i==="center"?c=r<=(a+l)/2?"left":"right":r<=s/2?c="left":r>=o-s/2&&(c="right"),vM(c,e,t,n)&&(c="center"),c}function sd(e,t,n){let i=n.yAlign||t.yAlign||bM(e,n);return{xAlign:n.xAlign||t.xAlign||yM(e,t,n,i),yAlign:i}}function xM(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function _M(e,t,n){let{y:i,height:r}=e;return t==="top"?i+=n:t==="bottom"?i-=r+n:i-=r/2,i}function od(e,t,n,i){let{caretSize:r,caretPadding:s,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,c=r+s,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=Xe(o),g=xM(t,a),m=_M(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(u,h)+r:a==="right"&&(g+=Math.max(d,f)+r),{x:Dt(g,0,i.width-t.width),y:Dt(m,0,i.height-t.height)}}function Ss(e,t,n){let i=Ot(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function ad(e){return me([],Ae(e))}function wM(e,t,n){return Ce(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function ld(e,t){let n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}var qd={beforeTitle:ge,title(e){if(e.length>0){let t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return n[t.dataIndex]}return""},afterTitle:ge,beforeBody:ge,beforeLabel:ge,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");let n=e.formattedValue;return X(n)||(t+=n),t},labelColor(e){let n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){let n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:ge,afterBody:ge,beforeFooter:ge,footer:ge,afterFooter:ge};function Rt(e,t,n,i){let r=e[t].call(n,i);return typeof r>"u"?qd[t].call(n,i):r}var Ji=class extends se{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let n=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&n.options.animation&&i.animations,s=new As(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=wM(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){let{callbacks:i}=n,r=Rt(i,"beforeTitle",this,t),s=Rt(i,"title",this,t),o=Rt(i,"afterTitle",this,t),a=[];return a=me(a,Ae(r)),a=me(a,Ae(s)),a=me(a,Ae(o)),a}getBeforeBody(t,n){return ad(Rt(n.callbacks,"beforeBody",this,t))}getBody(t,n){let{callbacks:i}=n,r=[];return K(t,s=>{let o={before:[],lines:[],after:[]},a=ld(i,s);me(o.before,Ae(Rt(a,"beforeLabel",this,s))),me(o.lines,Rt(a,"label",this,s)),me(o.after,Ae(Rt(a,"afterLabel",this,s))),r.push(o)}),r}getAfterBody(t,n){return ad(Rt(n.callbacks,"afterBody",this,t))}getFooter(t,n){let{callbacks:i}=n,r=Rt(i,"beforeFooter",this,t),s=Rt(i,"footer",this,t),o=Rt(i,"afterFooter",this,t),a=[];return a=me(a,Ae(r)),a=me(a,Ae(s)),a=me(a,Ae(o)),a}_createItems(t){let n=this._active,i=this.chart.data,r=[],s=[],o=[],a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(mM(this.chart,n[l]));return t.filter&&(a=a.filter((u,d,h)=>t.filter(u,d,h,i))),t.itemSort&&(a=a.sort((u,d)=>t.itemSort(u,d,i))),K(a,u=>{let d=ld(t.callbacks,u);r.push(Rt(d,"labelColor",this,u)),s.push(Rt(d,"labelPointStyle",this,u)),o.push(Rt(d,"labelTextColor",this,u))}),this.labelColors=r,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=a,a}update(t,n){let i=this.options.setContext(this.getContext()),r=this._active,s,o=[];if(!r.length)this.opacity!==0&&(s={opacity:0});else{let a=Zi[i.position].call(this,r,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);let l=this._size=rd(this,i),c=Object.assign({},a,l),u=sd(this.chart,i,c),d=od(i,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,s={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,r){let s=this.getCaretPosition(t,i,r);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(t,n,i){let{xAlign:r,yAlign:s}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Xe(a),{x:h,y:f}=t,{width:g,height:m}=n,b,y,_,x,v,w;return s==="center"?(v=f+m/2,r==="left"?(b=h,y=b-o,x=v+o,w=v-o):(b=h+g,y=b+o,x=v-o,w=v+o),_=b):(r==="left"?y=h+Math.max(l,u)+o:r==="right"?y=h+g-Math.max(c,d)-o:y=this.caretX,s==="top"?(x=f,v=x-o,b=y-o,_=y+o):(x=f+m,v=x+o,b=y+o,_=y-o),w=x),{x1:b,x2:y,x3:_,y1:x,y2:v,y3:w}}drawTitle(t,n,i){let r=this.title,s=r.length,o,a,l;if(s){let c=xn(i.rtl,this.x,this.width);for(t.x=Ss(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",o=kt(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,l=0;l<s;++l)n.fillText(r[l],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===s&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,n,i,r,s){let o=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:l,boxWidth:c}=s,u=kt(s.bodyFont),d=Ss(this,"left",s),h=r.x(d),f=l<u.lineHeight?(u.lineHeight-l)/2:0,g=n.y+f;if(s.usePointStyle){let m={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},b=r.leftForLtr(h,c)+c/2,y=g+l/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,fs(t,m,b,y),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,fs(t,m,b,y)}else{t.lineWidth=H(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;let m=r.leftForLtr(h,c),b=r.leftForLtr(r.xPlus(h,1),c-2),y=Xe(o.borderRadius);Object.values(y).some(_=>_!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,ii(t,{x:m,y:g,w:c,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),ii(t,{x:b,y:g+1,w:c-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(m,g,c,l),t.strokeRect(m,g,c,l),t.fillStyle=o.backgroundColor,t.fillRect(b,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){let{body:r}=this,{bodySpacing:s,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=i,d=kt(i.bodyFont),h=d.lineHeight,f=0,g=xn(i.rtl,this.x,this.width),m=function(M){n.fillText(M,g.x(t.x+f),t.y+h/2),t.y+=h+s},b=g.textAlign(o),y,_,x,v,w,k,E;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=Ss(this,b,i),n.fillStyle=i.bodyColor,K(this.beforeBody,m),f=a&&b!=="right"?o==="center"?c/2+u:c+2+u:0,v=0,k=r.length;v<k;++v){for(y=r[v],_=this.labelTextColors[v],n.fillStyle=_,K(y.before,m),x=y.lines,a&&x.length&&(this._drawColorBox(n,t,v,g,i),h=Math.max(d.lineHeight,l)),w=0,E=x.length;w<E;++w)m(x[w]),h=d.lineHeight;K(y.after,m)}f=0,h=d.lineHeight,K(this.afterBody,m),t.y-=s}drawFooter(t,n,i){let r=this.footer,s=r.length,o,a;if(s){let l=xn(i.rtl,this.x,this.width);for(t.x=Ss(this,i.footerAlign,i),t.y+=i.footerMarginTop,n.textAlign=l.textAlign(i.footerAlign),n.textBaseline="middle",o=kt(i.footerFont),n.fillStyle=i.footerColor,n.font=o.string,a=0;a<s;++a)n.fillText(r[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,n,i,r){let{xAlign:s,yAlign:o}=this,{x:a,y:l}=t,{width:c,height:u}=i,{topLeft:d,topRight:h,bottomLeft:f,bottomRight:g}=Xe(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(a+d,l),o==="top"&&this.drawCaret(t,n,i,r),n.lineTo(a+c-h,l),n.quadraticCurveTo(a+c,l,a+c,l+h),o==="center"&&s==="right"&&this.drawCaret(t,n,i,r),n.lineTo(a+c,l+u-g),n.quadraticCurveTo(a+c,l+u,a+c-g,l+u),o==="bottom"&&this.drawCaret(t,n,i,r),n.lineTo(a+f,l+u),n.quadraticCurveTo(a,l+u,a,l+u-f),o==="center"&&s==="left"&&this.drawCaret(t,n,i,r),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){let n=this.chart,i=this.$animations,r=i&&i.x,s=i&&i.y;if(r||s){let o=Zi[t.position].call(this,this._active,this._eventPosition);if(!o)return;let a=this._size=rd(this,t),l=Object.assign({},o,this._size),c=sd(n,t,l),u=od(t,l,c,n);(r._to!==u.x||s._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){let n=this.options.setContext(this.getContext()),i=this.opacity;if(!i)return;this._updateAnimationTarget(n);let r={width:this.width,height:this.height},s={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;let o=Ot(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(s,t,r,n),sa(t,n.textDirection),s.y+=o.top,this.drawTitle(s,t,n),this.drawBody(s,t,n),this.drawFooter(s,t,n),oa(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){let i=this._active,r=t.map(({datasetIndex:a,index:l})=>{let c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),s=!$i(i,r),o=this._positionChanged(r,n);(s||o)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let r=this.options,s=this._active||[],o=this._getActiveElements(t,s,n,i),a=this._positionChanged(o,t),l=n||!$i(o,s)||a;return l&&(this._active=o,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,i,r){let s=this.options;if(t.type==="mouseout")return[];if(!r)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);let o=this.chart.getElementsAtEventForMode(t,s.mode,s,i);return s.reverse&&o.reverse(),o}_positionChanged(t,n){let{caretX:i,caretY:r,options:s}=this,o=Zi[s.position].call(this,t,n);return o!==!1&&(i!==o.x||r!==o.y)}};F(Ji,"positioners",Zi);var en={id:"tooltip",_element:Ji,positioners:Zi,afterInit(e,t,n){n&&(e.tooltip=new Ji({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){let t=e.tooltip;if(t&&t._willRender()){let n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){let n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:qd},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};var kM=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function SM(e,t,n,i){let r=e.indexOf(t);if(r===-1)return kM(e,t,n,i);let s=e.lastIndexOf(t);return r!==s?n:r}var MM=(e,t)=>e===null?null:Dt(Math.round(e),0,t);function cd(e){let t=this.getLabels();return e>=0&&e<t.length?t[e]:e}var Kt=class extends Pe{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let n=this._addedLabels;if(n.length){let i=this.getLabels();for(let{index:r,label:s}of n)i[r]===s&&i.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(X(t))return null;let i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:SM(i,t,W(n,t),this._addedLabels),MM(n,i.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){let t=this.min,n=this.max,i=this.options.offset,r=[],s=this.getLabels();s=t===0&&n===s.length-1?s:s.slice(t,n+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=t;o<=n;o++)r.push({value:o});return r}getLabelForValue(t){return cd.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}};F(Kt,"id","category"),F(Kt,"defaults",{ticks:{callback:cd}});function EM(e,t){let n=[],{bounds:r,step:s,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=e,f=s||1,g=u-1,{min:m,max:b}=t,y=!X(o),_=!X(a),x=!X(c),v=(b-m)/(d+1),w=Bo((b-m)/g/f)*f,k,E,M,C;if(w<1e-14&&!y&&!_)return[{value:m},{value:b}];C=Math.ceil(b/w)-Math.floor(m/w),C>g&&(w=Bo(C*w/g/f)*f),X(l)||(k=Math.pow(10,l),w=Math.ceil(w*k)/k),r==="ticks"?(E=Math.floor(m/w)*w,M=Math.ceil(b/w)*w):(E=m,M=b),y&&_&&s&&Qc((a-o)/s,w/1e3)?(C=Math.round(Math.min((a-o)/w,u)),w=(a-o)/C,E=o,M=a):x?(E=y?o:E,M=_?a:M,C=c-1,w=(M-E)/C):(C=(M-E)/w,ei(C,Math.round(C),w/1e3)?C=Math.round(C):C=Math.ceil(C));let T=Math.max(jo(w),jo(E));k=Math.pow(10,X(l)?T:l),E=Math.round(E*k)/k,M=Math.round(M*k)/k;let O=0;for(y&&(h&&E!==o?(n.push({value:o}),E<o&&O++,ei(Math.round((E+O*w)*k)/k,o,ud(o,v,e))&&O++):E<o&&O++);O<C;++O){let A=Math.round((E+O*w)*k)/k;if(_&&A>a)break;n.push({value:A})}return _&&h&&M!==a?n.length&&ei(n[n.length-1].value,a,ud(a,v,e))?n[n.length-1].value=a:n.push({value:a}):(!_||M===a)&&n.push({value:M}),n}function ud(e,t,{horizontal:n,minRotation:i}){let r=Oe(i),s=(n?Math.sin(r):Math.cos(r))||.001,o=.75*t*(""+e).length;return Math.min(t/s,o)}var ai=class extends Pe{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return X(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds(),{min:r,max:s}=this,o=l=>r=n?r:l,a=l=>s=i?s:l;if(t){let l=re(r),c=re(s);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(r===s){let l=s===0?1:Math.abs(s*.05);a(s+l),t||o(r-l)}this.min=r,this.max=s}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:n,stepSize:i}=t,r;return i?(r=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,n=t.ticks,i=this.getTickLimit();i=Math.max(2,i);let r={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,o=EM(r,s);return t.bounds==="ticks"&&zo(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){let t=this.ticks,n=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){let r=(i-n)/Math.max(t.length-1,1)/2;n-=r,i+=r}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return ds(t,this.chart.options.locale,this.options.ticks.format)}},Zt=class extends ai{determineDataLimits(){let{min:t,max:n}=this.getMinMax(!0);this.min=vt(t)?t:0,this.max=vt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),n=t?this.width:this.height,i=Oe(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/r))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}};F(Zt,"id","linear"),F(Zt,"defaults",{ticks:{callback:Wi.formatters.numeric}});var er=e=>Math.floor(Ee(e)),wn=(e,t)=>Math.pow(10,er(e)+t);function dd(e){return e/Math.pow(10,er(e))===1}function hd(e,t,n){let i=Math.pow(10,n),r=Math.floor(e/i);return Math.ceil(t/i)-r}function OM(e,t){let n=t-e,i=er(n);for(;hd(e,t,i)>10;)i++;for(;hd(e,t,i)<10;)i--;return Math.min(i,er(e))}function CM(e,{min:t,max:n}){t=qt(e.min,t);let i=[],r=er(t),s=OM(t,n),o=s<0?Math.pow(10,Math.abs(s)):1,a=Math.pow(10,s),l=r>s?Math.pow(10,r):0,c=Math.round((t-l)*o)/o,u=Math.floor((t-l)/a/10)*a*10,d=Math.floor((c-u)/Math.pow(10,s)),h=qt(e.min,Math.round((l+u+d*Math.pow(10,s))*o)/o);for(;h<n;)i.push({value:h,major:dd(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(s++,d=2,o=s>=0?1:o),h=Math.round((l+u+d*Math.pow(10,s))*o)/o;let f=qt(e.max,h);return i.push({value:f,major:dd(f),significand:d}),i}var Ms=class extends Pe{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){let i=ai.prototype.parse.apply(this,[t,n]);if(i===0){this._zero=!0;return}return vt(i)&&i>0?i:null}determineDataLimits(){let{min:t,max:n}=this.getMinMax(!0);this.min=vt(t)?Math.max(0,t):null,this.max=vt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!vt(this._userMin)&&(this.min=t===wn(this.min,0)?wn(this.min,-1):wn(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:n}=this.getUserBounds(),i=this.min,r=this.max,s=a=>i=t?i:a,o=a=>r=n?r:a;i===r&&(i<=0?(s(1),o(10)):(s(wn(i,-1)),o(wn(r,1)))),i<=0&&s(wn(r,-1)),r<=0&&o(wn(i,1)),this.min=i,this.max=r}buildTicks(){let t=this.options,n={min:this._userMin,max:this._userMax},i=CM(n,this);return t.bounds==="ticks"&&zo(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":ds(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=Ee(t),this._valueRange=Ee(this.max)-Ee(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ee(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}};F(Ms,"id","logarithmic"),F(Ms,"defaults",{ticks:{callback:Wi.formatters.logarithmic,major:{enabled:!0}}});function Ea(e){let t=e.ticks;if(t.display&&e.display){let n=Ot(t.backdropPadding);return W(t.font&&t.font.size,ct.font.size)+n.height}return 0}function TM(e,t,n){return n=at(n)?n:[n],{w:du(e,t.string,n),h:n.length*t.lineHeight}}function fd(e,t,n,i,r){return e===i||e===r?{start:t-n/2,end:t+n/2}:e<i||e>r?{start:t-n,end:t}:{start:t,end:t+n}}function AM(e){let t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),i=[],r=[],s=e._pointLabels.length,o=e.options.pointLabels,a=o.centerPointLabels?bt/s:0;for(let l=0;l<s;l++){let c=o.setContext(e.getPointLabelContext(l));r[l]=c.padding;let u=e.getPointPosition(l,e.drawingArea+r[l],a),d=kt(c.font),h=TM(e.ctx,d,e._pointLabels[l]);i[l]=h;let f=Xt(e.getIndexAngle(l)+a),g=Math.round(cs(f)),m=fd(g,u.x,h.w,0,180),b=fd(g,u.y,h.h,90,270);PM(n,t,f,m,b)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=qM(e,i,r)}function PM(e,t,n,i,r){let s=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n)),a=0,l=0;i.start<t.l?(a=(t.l-i.start)/s,e.l=Math.min(e.l,t.l-a)):i.end>t.r&&(a=(i.end-t.r)/s,e.r=Math.max(e.r,t.r+a)),r.start<t.t?(l=(t.t-r.start)/o,e.t=Math.min(e.t,t.t-l)):r.end>t.b&&(l=(r.end-t.b)/o,e.b=Math.max(e.b,t.b+l))}function LM(e,t,n){let i=e.drawingArea,{extra:r,additionalAngle:s,padding:o,size:a}=n,l=e.getPointPosition(t,i+r+o,s),c=Math.round(cs(Xt(l.angle+Lt))),u=NM(l.y,a.h,c),d=IM(c),h=RM(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+a.w,bottom:u+a.h}}function DM(e,t){if(!t)return!0;let{left:n,top:i,right:r,bottom:s}=e;return!(pe({x:n,y:i},t)||pe({x:n,y:s},t)||pe({x:r,y:i},t)||pe({x:r,y:s},t))}function qM(e,t,n){let i=[],r=e._pointLabels.length,s=e.options,{centerPointLabels:o,display:a}=s.pointLabels,l={extra:Ea(s)/2,additionalAngle:o?bt/r:0},c;for(let u=0;u<r;u++){l.padding=n[u],l.size=t[u];let d=LM(e,u,l);i.push(d),a==="auto"&&(d.visible=DM(d,c),d.visible&&(c=d))}return i}function IM(e){return e===0||e===180?"center":e<180?"left":"right"}function RM(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function NM(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function FM(e,t,n){let{left:i,top:r,right:s,bottom:o}=n,{backdropColor:a}=t;if(!X(a)){let l=Xe(t.borderRadius),c=Ot(t.backdropPadding);e.fillStyle=a;let u=i-c.left,d=r-c.top,h=s-i+c.width,f=o-r+c.height;Object.values(l).some(g=>g!==0)?(e.beginPath(),ii(e,{x:u,y:d,w:h,h:f,radius:l}),e.fill()):e.fillRect(u,d,h,f)}}function BM(e,t){let{ctx:n,options:{pointLabels:i}}=e;for(let r=t-1;r>=0;r--){let s=e._pointLabelItems[r];if(!s.visible)continue;let o=i.setContext(e.getPointLabelContext(r));FM(n,o,s);let a=kt(o.font),{x:l,y:c,textAlign:u}=s;yn(n,e._pointLabels[r],l,c+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function Id(e,t,n,i){let{ctx:r}=e;if(n)r.arc(e.xCenter,e.yCenter,t,0,Bt);else{let s=e.getPointPosition(0,t);r.moveTo(s.x,s.y);for(let o=1;o<i;o++)s=e.getPointPosition(o,t),r.lineTo(s.x,s.y)}}function zM(e,t,n,i,r){let s=e.ctx,o=t.circular,{color:a,lineWidth:l}=t;!o&&!i||!a||!l||n<0||(s.save(),s.strokeStyle=a,s.lineWidth=l,s.setLineDash(r.dash||[]),s.lineDashOffset=r.dashOffset,s.beginPath(),Id(e,n,o,i),s.closePath(),s.stroke(),s.restore())}function jM(e,t,n){return Ce(e,{label:n,index:t,type:"pointLabel"})}var ri=class extends ai{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let t=this._padding=Ot(Ea(this.options)/2),n=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){let{min:t,max:n}=this.getMinMax(!1);this.min=vt(t)&&!isNaN(t)?t:0,this.max=vt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ea(this.options))}generateTickLabels(t){ai.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,i)=>{let r=et(this.options.pointLabels.callback,[n,i],this);return r||r===0?r:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){let t=this.options;t.display&&t.pointLabels.display?AM(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,i,r){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,i,r))}getIndexAngle(t){let n=Bt/(this._pointLabels.length||1),i=this.options.startAngle||0;return Xt(t*n+Oe(i))}getDistanceFromCenterForValue(t){if(X(t))return NaN;let n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(X(t))return NaN;let n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){let n=this._pointLabels||[];if(t>=0&&t<n.length){let i=n[t];return jM(this.getContext(),t,i)}}getPointPosition(t,n,i=0){let r=this.getIndexAngle(t)-Lt+i;return{x:Math.cos(r)*n+this.xCenter,y:Math.sin(r)*n+this.yCenter,angle:r}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){let{left:n,top:i,right:r,bottom:s}=this._pointLabelItems[t];return{left:n,top:i,right:r,bottom:s}}drawBackground(){let{backgroundColor:t,grid:{circular:n}}=this.options;if(t){let i=this.ctx;i.save(),i.beginPath(),Id(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){let t=this.ctx,n=this.options,{angleLines:i,grid:r,border:s}=n,o=this._pointLabels.length,a,l,c;if(n.pointLabels.display&&BM(this,o),r.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);let h=this.getContext(d),f=r.setContext(h),g=s.setContext(h);zM(this,f,l,o,g)}}),i.display){for(t.save(),a=o-1;a>=0;a--){let u=i.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:h}=u;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){let t=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;let r=this.getIndexAngle(0),s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;let c=i.setContext(this.getContext(l)),u=kt(c.font);if(s=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,o=t.measureText(a.label).width,t.fillStyle=c.backdropColor;let d=Ot(c.backdropPadding);t.fillRect(-o/2-d.left,-s-u.size/2-d.top,o+d.width,u.size+d.height)}yn(t,a.label,0,-s,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}};F(ri,"id","radialLinear"),F(ri,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Wi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),F(ri,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),F(ri,"descriptors",{angleLines:{_fallback:"grid"}});var qs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Nt=Object.keys(qs);function pd(e,t){return e-t}function gd(e,t){if(X(t))return null;let n=e._adapter,{parser:i,round:r,isoWeekday:s}=e._parseOpts,o=t;return typeof i=="function"&&(o=i(o)),vt(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(r&&(o=r==="week"&&(ni(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,r)),+o)}function md(e,t,n,i){let r=Nt.length;for(let s=Nt.indexOf(e);s<r-1;++s){let o=qs[Nt[s]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=i)return Nt[s]}return Nt[r-1]}function $M(e,t,n,i,r){for(let s=Nt.length-1;s>=Nt.indexOf(n);s--){let o=Nt[s];if(qs[o].common&&e._adapter.diff(r,i,o)>=t-1)return o}return Nt[n?Nt.indexOf(n):0]}function WM(e){for(let t=Nt.indexOf(e)+1,n=Nt.length;t<n;++t)if(qs[Nt[t]].common)return Nt[t]}function bd(e,t,n){if(!n)e[t]=!0;else if(n.length){let{lo:i,hi:r}=us(n,t),s=n[i]>=t?n[i]:n[r];e[s]=!0}}function VM(e,t,n,i){let r=e._adapter,s=+r.startOf(t[0].value,i),o=t[t.length-1].value,a,l;for(a=s;a<=o;a=+r.add(a,1,i))l=n[a],l>=0&&(t[l].major=!0);return t}function vd(e,t,n){let i=[],r={},s=t.length,o,a;for(o=0;o<s;++o)a=t[o],r[a]=o,i.push({value:a,major:!1});return s===0||!n?i:VM(e,i,r,n)}var oi=class extends Pe{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){let i=t.time||(t.time={}),r=this._adapter=new Uk._date(t.adapters.date);r.init(n),Qn(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:gd(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,n=this._adapter,i=t.time.unit||"day",{min:r,max:s,minDefined:o,maxDefined:a}=this.getUserBounds();function l(c){!o&&!isNaN(c.min)&&(r=Math.min(r,c.min)),!a&&!isNaN(c.max)&&(s=Math.max(s,c.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),r=vt(r)&&!isNaN(r)?r:+n.startOf(Date.now(),i),s=vt(s)&&!isNaN(s)?s:+n.endOf(Date.now(),i)+1,this.min=Math.min(r,s-1),this.max=Math.max(r+1,s)}_getLabelBounds(){let t=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){let t=this.options,n=t.time,i=t.ticks,r=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);let s=this.min,o=this.max,a=iu(r,s,o);return this._unit=n.unit||(i.autoSkip?md(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):$M(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:WM(this._unit),this.initOffsets(r),t.reverse&&a.reverse(),vd(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,r,s;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?n=1-r:n=(this.getDecimalForValue(t[1])-r)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?i=s:i=(s-this.getDecimalForValue(t[t.length-2]))/2);let o=t.length<3?.5:.25;n=Dt(n,0,o),i=Dt(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){let t=this._adapter,n=this.min,i=this.max,r=this.options,s=r.time,o=s.unit||md(s.minUnit,n,i,this._getLabelCapacity(n)),a=W(r.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,c=ni(l)||l===!0,u={},d=n,h,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":o),t.diff(i,n,o)>1e5*a)throw new Error(n+" and "+i+" are too far apart with stepSize of "+a+" "+o);let g=r.ticks.source==="data"&&this.getDataTimestamps();for(h=d,f=0;h<i;h=+t.add(h,a,o),f++)bd(u,h,g);return(h===i||r.bounds==="ticks"||f===1)&&bd(u,h,g),Object.keys(u).sort(pd).map(m=>+m)}getLabelForValue(t){let n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){let r=this.options.time.displayFormats,s=this._unit,o=n||r[s];return this._adapter.format(t,o)}_tickFormatFunction(t,n,i,r){let s=this.options,o=s.ticks.callback;if(o)return et(o,[t,n,i],this);let a=s.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],h=i[n],f=c&&d&&h&&h.major;return this._adapter.format(t,r||(f?d:u))}generateTickLabels(t){let n,i,r;for(n=0,i=t.length;n<i;++n)r=t[n],r.label=this._tickFormatFunction(r.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let n=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(t){let n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){let n=this.options.ticks,i=this.ctx.measureText(t).width,r=Oe(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(r),o=Math.sin(r),a=this._resolveTickFontOptions(0).size;return{w:i*s+a*o,h:i*o+a*s}}_getLabelCapacity(t){let n=this.options.time,i=n.displayFormats,r=i[n.unit]||i.millisecond,s=this._tickFormatFunction(t,0,vd(this,[t],this._majorUnit),r),o=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,i;if(t.length)return t;let r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,i=r.length;n<i;++n)t=t.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],n,i;if(t.length)return t;let r=this.getLabels();for(n=0,i=r.length;n<i;++n)t.push(gd(this,r[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Vo(t.sort(pd))}};F(oi,"id","time"),F(oi,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Es(e,t,n){let i=0,r=e.length-1,s,o,a,l;n?(t>=e[i].pos&&t<=e[r].pos&&({lo:i,hi:r}=He(e,"pos",t)),{pos:s,time:a}=e[i],{pos:o,time:l}=e[r]):(t>=e[i].time&&t<=e[r].time&&({lo:i,hi:r}=He(e,"time",t)),{time:s,pos:a}=e[i],{time:o,pos:l}=e[r]);let c=o-s;return c?a+(l-a)*(t-s)/c:a}var Os=class extends oi{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Es(n,this.min),this._tableRange=Es(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:n,max:i}=this,r=[],s=[],o,a,l,c,u;for(o=0,a=t.length;o<a;++o)c=t[o],c>=n&&c<=i&&r.push(c);if(r.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,a=r.length;o<a;++o)u=r[o+1],l=r[o-1],c=r[o],Math.round((u+l)/2)!==c&&s.push({time:c,pos:o/(a-1)});return s}_generate(){let t=this.min,n=this.max,i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(n)||i.length===1)&&i.push(n),i.sort((r,s)=>r-s)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Es(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return Es(this._table,i*this._tableRange+this._minPos,!0)}};F(Os,"id","timeseries"),F(Os,"defaults",oi.defaults);var HM="#60a5fa",li="#22d3ee",Rd="#34d399",UM="#818cf8",YM="#fb923c",Nd="#fb7185",GM="#2dd4bf",Fd="#a78bfa",Bd="#facc15",Mn="#9ca3af",zd=[li,Fd,Bd,Rd,YM,GM,Nd],oe={suspended:Mn,scheduled:UM,available:HM,retryable:Bd,executing:Rd,completed:li,cancelled:Fd,discarded:Nd},Oa={suspended:{light:"#f9fafb",dark:"#1f2937"},scheduled:{light:"#eef2ff",dark:"#1e1b4b"},available:{light:"#eff6ff",dark:"#1e3a8a"},retryable:{light:"#fefce8",dark:"#713f12"},executing:{light:"#ecfdf5",dark:"#064e3b"},completed:{light:"#ecfeff",dark:"#164e63"},cancelled:{light:"#f5f3ff",dark:"#2e1065"},discarded:{light:"#fff1f2",dark:"#4c0519"},pending:{light:"#f9fafb",dark:"#1f2937"}};lt.register(zt,jt,Kt,Zt,en);var jd=e=>e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:e<36e5?`${(e/6e4).toFixed(1)}m`:`${(e/36e5).toFixed(1)}h`,XM=e=>new Date(e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}),KM={mounted(){let e=document.createElement("canvas");this.el.appendChild(e),this.chart=new lt(e,{type:"bar",data:{labels:[],datasets:[{data:[],backgroundColor:[],borderRadius:2,barPercentage:.9,categoryPercentage:.9}]},options:{animation:!1,maintainAspectRatio:!1,responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{title:t=>XM(parseInt(t[0].label,10)),label:t=>{let n=t.dataIndex,i=this.data[n].state,r=jd(t.raw);return`${i}: ${r}`}}}},scales:{x:{display:!0,grid:{display:!1},ticks:{maxRotation:0,autoSkip:!0,maxTicksLimit:6,callback:function(t){let n=parseInt(this.getLabelForValue(t),10);return new Date(n).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})}}},y:{display:!0,beginAtZero:!0,ticks:{callback:t=>jd(t)}}}}}),this.handleEvent("cron-history",({history:t})=>{this.data=t,this.chart.data.labels=t.map(n=>n.timestamp),this.chart.data.datasets[0].data=t.map(n=>n.duration),this.chart.data.datasets[0].backgroundColor=t.map(n=>oe[n.state]||Mn),this.chart.update()})},destroyed(){this.chart&&this.chart.destroy()}},$d=KM;lt.register(zt,jt,Kt,Zt,en);var Wd="#94a3b8",Ca=e=>e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:e<36e5?`${(e/6e4).toFixed(1)}m`:`${(e/36e5).toFixed(1)}h`,ZM=e=>new Date(e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}),JM={mounted(){let e=document.createElement("canvas");this.el.appendChild(e),this.currentJobId=parseInt(this.el.dataset.currentJobId,10),this.chart=new lt(e,{type:"bar",data:{labels:[],datasets:[{label:"Wait",data:[],backgroundColor:[],borderRadius:{topLeft:0,topRight:0,bottomLeft:2,bottomRight:2},barPercentage:.9,categoryPercentage:.9},{label:"Exec",data:[],backgroundColor:[],borderRadius:{topLeft:2,topRight:2,bottomLeft:0,bottomRight:0},barPercentage:.9,categoryPercentage:.9}]},options:{animation:!1,maintainAspectRatio:!1,responsive:!0,onClick:(t,n)=>{if(n.length>0){let i=n[0].index,r=this.data[i].id,s=window.location.pathname.replace(/\/\d+$/,"");window.location.href=`${s}/${r}`}},onHover:(t,n)=>{t.native.target.style.cursor=n.length>0?"pointer":"default"},plugins:{legend:{display:!1},tooltip:{mode:"index",intersect:!1,callbacks:{title:t=>{let n=t[0].dataIndex,i=this.data[n],r=ZM(parseInt(t[0].label,10)),s=i.current?" (current)":"";return`${r}${s}`},label:t=>{let n=Ca(t.raw);return`${t.dataset.label}: ${n}`},afterBody:t=>{let n=t[0].dataIndex,i=this.data[n],r=i.wait_time+i.exec_time;return`Total: ${Ca(r)}`}}}},scales:{x:{stacked:!0,display:!0,grid:{display:!1},ticks:{maxRotation:0,autoSkip:!0,maxTicksLimit:6,callback:function(t){let n=parseInt(this.getLabelForValue(t),10);return new Date(n).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})}}},y:{stacked:!0,display:!0,beginAtZero:!0,ticks:{callback:t=>Ca(t)}}}}}),this.handleEvent("job-history",({history:t})=>{this.data=t,this.chart.data.labels=t.map(n=>n.timestamp),this.chart.data.datasets[0].data=t.map(n=>n.wait_time),this.chart.data.datasets[0].backgroundColor=t.map(n=>n.current?Wd:this.fadeColor(Wd,.35)),this.chart.data.datasets[1].data=t.map(n=>n.exec_time),this.chart.data.datasets[1].backgroundColor=t.map(n=>{let i=oe[n.state]||Mn;return n.current?i:this.fadeColor(i,.35)}),this.chart.update()}),this.resizeObserver=new ResizeObserver(()=>{this.chart.resize()}),this.resizeObserver.observe(this.el)},fadeColor(e,t){let n=parseInt(e.slice(1,3),16),i=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return`rgba(${n}, ${i}, ${r}, ${t})`},destroyed(){this.resizeObserver&&this.resizeObserver.disconnect(),this.chart&&this.chart.destroy()}},Vd=JM;lt.register(zt,jt,Kt,Dd,kn,Ze,Zt,Sn,en);lt.defaults.font.size=12;lt.defaults.font.family="Inter var";var QM=["group","ntile","period","series","visible"],tE=e=>{for(let[t,n]of Object.entries(e))QM.includes(t)&&n!==void 0&&fe(`chart-${t}`,n)},Hd=function(e){let t,n,i,r;return e<1e3?e:e<1e4?(n=Math.pow(10,3),t=Math.floor(e/n),part=Math.round(e%n/Math.pow(10,2)),part===0?`${t}k`:part===10?`${t+1}k`:`${t}.${part}k`):(e<1e6?(i=3,r="k"):e<1e9?(i=6,r="m"):(i=9,r="b"),t=Math.round(e/Math.pow(10,i)),`${t}${r}`)},Ud=function(e){let t=e/1e6,n=e/1e9,i=e/6e10,r=e/36e11;return r>=1?`${r.toFixed(1)}h`:i>=1?`${i.toFixed(1)}m`:n>=1?`${n.toFixed(1)}s`:t>=1e3?`${t.toFixed(1)}ms`:`${t.toFixed(0)}ms`},eE={id:"verticalLiner",afterInit:(e,t,n)=>{e.verticalLiner={}},afterEvent:(e,t,n)=>{let{inChartArea:i}=t;e.verticalLiner={draw:i}},beforeTooltipDraw:(e,t,n)=>{let{draw:i}=e.verticalLiner;if(!i)return;let{ctx:r}=e,{top:s,bottom:o}=e.chartArea,{tooltip:a}=t,l=a?.caretX;!l||(r.save(),r.beginPath(),r.moveTo(l,s),r.lineTo(l,o),r.strokeStyle="#d1d5db",r.globalCompositeOperation="destination-over",r.stroke(),r.restore())}},Yd={animation:!1,maintainAspectRatio:!1,normalized:!0,responsive:!0,resizeDelay:100,interaction:{mode:"index",intersect:!1},layout:{padding:{bottom:4}},plugins:{legend:{display:!1},verticalLiner:{},tooltip:{callbacks:{title:function(e){return new Date(parseInt(e[0].label)*1e3).toLocaleTimeString("en-US",{hour12:!1,timeStyle:"long"})},label:function(e){let t=e.chart.options.type,n=e.dataset.label,i=e.parsed.y||0;return t==="line"?`${n}: ${Ud(i)}`:`${n}: ${Hd(i)}`}}}}},nE={...Yd,scales:{x:{stacked:!0,grid:{display:!1,drawTicks:!0},ticks:{maxRotation:0,minRotation:0,padding:3,callback:function(e,t){if(t%4===0)return new Date(parseInt(this.getLabelForValue(e))*1e3).toLocaleTimeString("en-US",{hour12:!1,timeStyle:"medium"})}}},y:{stacked:!0,ticks:{callback:function(e,t,n){if(t%2===0)return Hd(e)}}}}},iE={...Yd,borderWidth:2,borderJoinStyle:"round",radius:2,spanGaps:!0,scales:{x:{grid:{display:!1},ticks:{maxRotation:0,minRotation:0,padding:3,callback:function(e,t){if(t%4===0)return new Date(parseInt(this.getLabelForValue(e))*1e3).toLocaleTimeString("en-US",{hour12:!1,timeStyle:"medium"})}}},y:{ticks:{callback:function(e,t,n){if(t%2===0)return Ud(e)}}}}},rE={mounted(){let e=null;this.handleEvent("chart-change",t=>{let{group:n,points:i,series:r}=t;tE(t);let[s,o]=/_count/.test(r)?["bar",nE]:["line",iE],a=s==="line"?[eE]:[];e===null?e=new lt(this.el,{type:s,options:o,plugins:a}):e.config.type!==s&&(e.destroy(),e=new lt(this.el,{type:s,options:o,plugins:a}));let l=Object.entries(i).map(([c,u],d)=>{let h=n==="state"?oe[c]:zd[d];return{backgroundColor:h,barPercentage:1,barThickness:"flex",borderColor:h,data:u.reverse(),label:c}});e.data.datasets=l,e.update()})}},Gd=rE;var sE={mounted(){this.el.addEventListener("click",e=>{e.preventDefault(),window.history.back()}),this.el.dataset.escapeBack!==void 0&&(this.handleKeydown=e=>{e.key==="Escape"&&window.history.back()},window.addEventListener("keydown",this.handleKeydown))},destroyed(){this.handleKeydown&&window.removeEventListener("keydown",this.handleKeydown)}},Xd=sE;var oE={mounted(){this.handleEvent("select-instance",({name:e})=>{fe("instance",e)})}},Kd=oE;lt.register(zt,jt,Kt,Zt,en);var aE=e=>new Date(e).toLocaleString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}),lE={mounted(){let e=document.createElement("canvas");this.el.appendChild(e),this.chart=new lt(e,{type:"bar",data:{labels:[],datasets:[{data:[],backgroundColor:li,borderRadius:2,barPercentage:.9,categoryPercentage:.9}]},options:{animation:!1,maintainAspectRatio:!1,responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{title:t=>aE(parseInt(t[0].label,10)),label:t=>{let n=t.raw;return`${n} ${n===1?"job":"jobs"}`}}}},scales:{x:{display:!0,grid:{display:!1},ticks:{maxRotation:0,autoSkip:!0,maxTicksLimit:8,callback:function(t){let n=parseInt(this.getLabelForValue(t),10);return new Date(n).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})}}},y:{display:!0,beginAtZero:!0,ticks:{stepSize:1,callback:t=>Number.isInteger(t)?t:null}}}}}),this.handleEvent("queue-history",({history:t})=>{this.data=t,this.chart.data.labels=t.map(n=>n.timestamp),this.chart.data.datasets[0].data=t.map(n=>n.count),this.chart.update()})},destroyed(){this.chart&&this.chart.destroy()}},Zd=lE;var cE={mounted(){let e="#refresh-selector",t=Gn("refresh");t!==void 0&&this.pushEventTo(e,"select-refresh",{interval:t}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"?this.pushEventTo(e,"resume-refresh",{}):this.pushEventTo(e,"pause-refresh",{})}),this.handleEvent("update-refresh",({refresh:n})=>{fe("refresh",n)})}},Jd=cE;function Ta(e){return e<10?`0${e}`:e}function uE(e){let t=Math.floor(Math.abs(Date.now()-e)/1e3),n=t%60,i=Math.floor(t%3600/60),r=Math.floor(t/3600),s=[Ta(i),Ta(n)];return r>0&&s.unshift(Ta(r)),s.join(":")}function dE(e){if(e==="")return"-";let t=Date.now()-e,n=Math.floor(Math.abs(t)/1e3);if(n===0)return"now";let i="";return n<=59?i=`${n}s`:n<=3599?i=`${Math.floor(n/60)}m`:n<=86399?i=`${Math.floor(n/3600)}h`:n<=2591999?i=`${Math.floor(n/86400)}d`:n<=31535999?i=`${Math.floor(n/2592e3)}mo`:i=`${Math.floor(n/31536e3)}yr`,t>0?`${i} ago`:t<0?`in ${i}`:i}var hE={destroyed(){clearInterval(this.interval)},startTimer(){clearInterval(this.interval);let e=this.el.getAttribute("data-timestamp"),t=this.el.getAttribute("data-relative-mode")||"words",n=()=>{this.el.textContent=t==="words"?dE(e):uE(e)};n(),this.interval=window.setInterval(()=>{Gn("refresh")>0&&n()},1e3)},mounted(){this.startTimer()},updated(){this.startTimer()}},Qd=hE;var fE={"/":"#search","?":"#shortcuts",C:"#nav-crons",J:"#nav-jobs",Q:"#nav-queues",W:"#nav-workflows",r:"#refresh-selector",t:"#theme-selector"},pE={mounted(){window.addEventListener("keydown",e=>{if(e.target.nodeName!=="BODY"||e.metaKey)return;let t=fE[e.key];if(t){e.preventDefault();let n=document.querySelector(t),i=n.getAttribute("data-shortcut");this.liveSocket.execJS(n,i,"click")}})}},th=pE;var gE="sidebar_width",mE=256,bE=512,vE={mounted(){this.sidebar=this.el,this.isResizing=!1,this.startX=0,this.startWidth=0,this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.attachHandle(),document.documentElement.style.removeProperty("--sidebar-width")},updated(){this.attachHandle()},destroyed(){this.detachHandle(),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)},attachHandle(){this.handle&&this.handle.removeEventListener("mousedown",this.handleMouseDown),this.handle=this.sidebar.querySelector("[data-resize-handle]"),this.handle&&this.handle.addEventListener("mousedown",this.handleMouseDown)},detachHandle(){this.handle&&this.handle.removeEventListener("mousedown",this.handleMouseDown)},handleMouseDown(e){e.preventDefault(),this.isResizing=!0,this.startX=e.clientX,this.startWidth=this.sidebar.offsetWidth,document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp),document.body.style.cursor="col-resize",document.body.style.userSelect="none",this.handle.classList.add("resizing"),this.pushEventTo("#refresh-selector","pause-refresh",{})},handleMouseMove(e){if(!this.isResizing)return;let t=e.clientX-this.startX;this.setWidth(this.startWidth+t)},handleMouseUp(){if(!this.isResizing)return;this.isResizing=!1,document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.body.style.cursor="",document.body.style.userSelect="",this.handle.classList.remove("resizing");let e=this.sidebar.offsetWidth;fe(gE,e),this.pushEvent("sidebar_resize",{width:e}),this.pushEventTo("#refresh-selector","resume-refresh",{})},setWidth(e){let t=Math.max(mE,Math.min(bE,e));this.sidebar.style.width=`${t}px`}},eh=vE;var ht="top",yt="bottom",gt="right",ft="left",Is="auto",nn=[ht,yt,gt,ft],Le="start",En="end",nh="clippingParents",Rs="viewport",ci="popper",ih="reference",Aa=nn.reduce(function(e,t){return e.concat([t+"-"+Le,t+"-"+En])},[]),Ns=[].concat(nn,[Is]).reduce(function(e,t){return e.concat([t,t+"-"+Le,t+"-"+En])},[]),yE="beforeRead",xE="read",_E="afterRead",wE="beforeMain",kE="main",SE="afterMain",ME="beforeWrite",EE="write",OE="afterWrite",rh=[yE,xE,_E,wE,kE,SE,ME,EE,OE];function St(e){return e?(e.nodeName||"").toLowerCase():null}function ut(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jt(e){var t=ut(e).Element;return e instanceof t||e instanceof Element}function xt(e){var t=ut(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ui(e){if(typeof ShadowRoot>"u")return!1;var t=ut(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function CE(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var i=t.styles[n]||{},r=t.attributes[n]||{},s=t.elements[n];!xt(s)||!St(s)||(Object.assign(s.style,i),Object.keys(r).forEach(function(o){var a=r[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function TE(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(i){var r=t.elements[i],s=t.attributes[i]||{},o=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:n[i]),a=o.reduce(function(l,c){return l[c]="",l},{});!xt(r)||!St(r)||(Object.assign(r.style,a),Object.keys(s).forEach(function(l){r.removeAttribute(l)}))})}}var ir={name:"applyStyles",enabled:!0,phase:"write",fn:CE,effect:TE,requires:["computeStyles"]};function Mt(e){return e.split("-")[0]}var ae=Math.max,On=Math.min,De=Math.round;function di(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function rr(){return!/^((?!chrome|android).)*safari/i.test(di())}function Qt(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var i=e.getBoundingClientRect(),r=1,s=1;t&&xt(e)&&(r=e.offsetWidth>0&&De(i.width)/e.offsetWidth||1,s=e.offsetHeight>0&&De(i.height)/e.offsetHeight||1);var o=Jt(e)?ut(e):window,a=o.visualViewport,l=!rr()&&n,c=(i.left+(l&&a?a.offsetLeft:0))/r,u=(i.top+(l&&a?a.offsetTop:0))/s,d=i.width/r,h=i.height/s;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function Cn(e){var t=Qt(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function sr(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ui(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function At(e){return ut(e).getComputedStyle(e)}function Pa(e){return["table","td","th"].indexOf(St(e))>=0}function Et(e){return((Jt(e)?e.ownerDocument:e.document)||window.document).documentElement}function qe(e){return St(e)==="html"?e:e.assignedSlot||e.parentNode||(ui(e)?e.host:null)||Et(e)}function sh(e){return!xt(e)||At(e).position==="fixed"?null:e.offsetParent}function AE(e){var t=/firefox/i.test(di()),n=/Trident/i.test(di());if(n&&xt(e)){var i=At(e);if(i.position==="fixed")return null}var r=qe(e);for(ui(r)&&(r=r.host);xt(r)&&["html","body"].indexOf(St(r))<0;){var s=At(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function le(e){for(var t=ut(e),n=sh(e);n&&Pa(n)&&At(n).position==="static";)n=sh(n);return n&&(St(n)==="html"||St(n)==="body"&&At(n).position==="static")?t:n||AE(e)||t}function Tn(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function An(e,t,n){return ae(e,On(t,n))}function oh(e,t,n){var i=An(e,t,n);return i>n?n:i}function or(){return{top:0,right:0,bottom:0,left:0}}function ar(e){return Object.assign({},or(),e)}function lr(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}var PE=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,ar(typeof t!="number"?t:lr(t,nn))};function LE(e){var t,n=e.state,i=e.name,r=e.options,s=n.elements.arrow,o=n.modifiersData.popperOffsets,a=Mt(n.placement),l=Tn(a),c=[ft,gt].indexOf(a)>=0,u=c?"height":"width";if(!(!s||!o)){var d=PE(r.padding,n),h=Cn(s),f=l==="y"?ht:ft,g=l==="y"?yt:gt,m=n.rects.reference[u]+n.rects.reference[l]-o[l]-n.rects.popper[u],b=o[l]-n.rects.reference[l],y=le(s),_=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,x=m/2-b/2,v=d[f],w=_-h[u]-d[g],k=_/2-h[u]/2+x,E=An(v,k,w),M=l;n.modifiersData[i]=(t={},t[M]=E,t.centerOffset=E-k,t)}}function DE(e){var t=e.state,n=e.options,i=n.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||!sr(t.elements.popper,r)||(t.elements.arrow=r))}var ah={name:"arrow",enabled:!0,phase:"main",fn:LE,effect:DE,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function te(e){return e.split("-")[1]}var qE={top:"auto",right:"auto",bottom:"auto",left:"auto"};function IE(e){var t=e.x,n=e.y,i=window,r=i.devicePixelRatio||1;return{x:De(t*r)/r||0,y:De(n*r)/r||0}}function lh(e){var t,n=e.popper,i=e.popperRect,r=e.placement,s=e.variation,o=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=o.x,f=h===void 0?0:h,g=o.y,m=g===void 0?0:g,b=typeof u=="function"?u({x:f,y:m}):{x:f,y:m};f=b.x,m=b.y;var y=o.hasOwnProperty("x"),_=o.hasOwnProperty("y"),x=ft,v=ht,w=window;if(c){var k=le(n),E="clientHeight",M="clientWidth";if(k===ut(n)&&(k=Et(n),At(k).position!=="static"&&a==="absolute"&&(E="scrollHeight",M="scrollWidth")),k=k,r===ht||(r===ft||r===gt)&&s===En){v=yt;var C=d&&k===w&&w.visualViewport?w.visualViewport.height:k[E];m-=C-i.height,m*=l?1:-1}if(r===ft||(r===ht||r===yt)&&s===En){x=gt;var T=d&&k===w&&w.visualViewport?w.visualViewport.width:k[M];f-=T-i.width,f*=l?1:-1}}var O=Object.assign({position:a},c&&qE),A=u===!0?IE({x:f,y:m}):{x:f,y:m};if(f=A.x,m=A.y,l){var D;return Object.assign({},O,(D={},D[v]=_?"0":"",D[x]=y?"0":"",D.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",D))}return Object.assign({},O,(t={},t[v]=_?m+"px":"",t[x]=y?f+"px":"",t.transform="",t))}function RE(e){var t=e.state,n=e.options,i=n.gpuAcceleration,r=i===void 0?!0:i,s=n.adaptive,o=s===void 0?!0:s,a=n.roundOffsets,l=a===void 0?!0:a;if(!1)var c;var u={placement:Mt(t.placement),variation:te(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,lh(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,lh(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var ch={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:RE,data:{}};var Fs={passive:!0};function NE(e){var t=e.state,n=e.instance,i=e.options,r=i.scroll,s=r===void 0?!0:r,o=i.resize,a=o===void 0?!0:o,l=ut(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&c.forEach(function(u){u.addEventListener("scroll",n.update,Fs)}),a&&l.addEventListener("resize",n.update,Fs),function(){s&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Fs)}),a&&l.removeEventListener("resize",n.update,Fs)}}var uh={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:NE,data:{}};var FE={left:"right",right:"left",bottom:"top",top:"bottom"};function hi(e){return e.replace(/left|right|bottom|top/g,function(t){return FE[t]})}var BE={start:"end",end:"start"};function Bs(e){return e.replace(/start|end/g,function(t){return BE[t]})}function Pn(e){var t=ut(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Ln(e){return Qt(Et(e)).left+Pn(e).scrollLeft}function La(e,t){var n=ut(e),i=Et(e),r=n.visualViewport,s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;var c=rr();(c||!c&&t==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:s,height:o,x:a+Ln(e),y:l}}function Da(e){var t,n=Et(e),i=Pn(e),r=(t=e.ownerDocument)==null?void 0:t.body,s=ae(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=ae(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+Ln(e),l=-i.scrollTop;return At(r||n).direction==="rtl"&&(a+=ae(n.clientWidth,r?r.clientWidth:0)-s),{width:s,height:o,x:a,y:l}}function Dn(e){var t=At(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function zs(e){return["html","body","#document"].indexOf(St(e))>=0?e.ownerDocument.body:xt(e)&&Dn(e)?e:zs(qe(e))}function rn(e,t){var n;t===void 0&&(t=[]);var i=zs(e),r=i===((n=e.ownerDocument)==null?void 0:n.body),s=ut(i),o=r?[s].concat(s.visualViewport||[],Dn(i)?i:[]):i,a=t.concat(o);return r?a:a.concat(rn(qe(o)))}function fi(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function zE(e,t){var n=Qt(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function dh(e,t,n){return t===Rs?fi(La(e,n)):Jt(t)?zE(t,n):fi(Da(Et(e)))}function jE(e){var t=rn(qe(e)),n=["absolute","fixed"].indexOf(At(e).position)>=0,i=n&&xt(e)?le(e):e;return Jt(i)?t.filter(function(r){return Jt(r)&&sr(r,i)&&St(r)!=="body"}):[]}function qa(e,t,n,i){var r=t==="clippingParents"?jE(e):[].concat(t),s=[].concat(r,[n]),o=s[0],a=s.reduce(function(l,c){var u=dh(e,c,i);return l.top=ae(u.top,l.top),l.right=On(u.right,l.right),l.bottom=On(u.bottom,l.bottom),l.left=ae(u.left,l.left),l},dh(e,o,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function cr(e){var t=e.reference,n=e.element,i=e.placement,r=i?Mt(i):null,s=i?te(i):null,o=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(r){case ht:l={x:o,y:t.y-n.height};break;case yt:l={x:o,y:t.y+t.height};break;case gt:l={x:t.x+t.width,y:a};break;case ft:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=r?Tn(r):null;if(c!=null){var u=c==="y"?"height":"width";switch(s){case Le:l[c]=l[c]-(t[u]/2-n[u]/2);break;case En:l[c]=l[c]+(t[u]/2-n[u]/2);break;default:}}return l}function ce(e,t){t===void 0&&(t={});var n=t,i=n.placement,r=i===void 0?e.placement:i,s=n.strategy,o=s===void 0?e.strategy:s,a=n.boundary,l=a===void 0?nh:a,c=n.rootBoundary,u=c===void 0?Rs:c,d=n.elementContext,h=d===void 0?ci:d,f=n.altBoundary,g=f===void 0?!1:f,m=n.padding,b=m===void 0?0:m,y=ar(typeof b!="number"?b:lr(b,nn)),_=h===ci?ih:ci,x=e.rects.popper,v=e.elements[g?_:h],w=qa(Jt(v)?v:v.contextElement||Et(e.elements.popper),l,u,o),k=Qt(e.elements.reference),E=cr({reference:k,element:x,strategy:"absolute",placement:r}),M=fi(Object.assign({},x,E)),C=h===ci?M:k,T={top:w.top-C.top+y.top,bottom:C.bottom-w.bottom+y.bottom,left:w.left-C.left+y.left,right:C.right-w.right+y.right},O=e.modifiersData.offset;if(h===ci&&O){var A=O[r];Object.keys(T).forEach(function(D){var Z=[gt,yt].indexOf(D)>=0?1:-1,B=[ht,yt].indexOf(D)>=0?"y":"x";T[D]+=A[B]*Z})}return T}function Ia(e,t){t===void 0&&(t={});var n=t,i=n.placement,r=n.boundary,s=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Ns:l,u=te(i),d=u?a?Aa:Aa.filter(function(g){return te(g)===u}):nn,h=d.filter(function(g){return c.indexOf(g)>=0});h.length===0&&(h=d);var f=h.reduce(function(g,m){return g[m]=ce(e,{placement:m,boundary:r,rootBoundary:s,padding:o})[Mt(m)],g},{});return Object.keys(f).sort(function(g,m){return f[g]-f[m]})}function $E(e){if(Mt(e)===Is)return[];var t=hi(e);return[Bs(e),t,Bs(t)]}function WE(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var r=n.mainAxis,s=r===void 0?!0:r,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,g=f===void 0?!0:f,m=n.allowedAutoPlacements,b=t.options.placement,y=Mt(b),_=y===b,x=l||(_||!g?[hi(b)]:$E(b)),v=[b].concat(x).reduce(function(Q,tt){return Q.concat(Mt(tt)===Is?Ia(t,{placement:tt,boundary:u,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:m}):tt)},[]),w=t.rects.reference,k=t.rects.popper,E=new Map,M=!0,C=v[0],T=0;T<v.length;T++){var O=v[T],A=Mt(O),D=te(O)===Le,Z=[ht,yt].indexOf(A)>=0,B=Z?"width":"height",$=ce(t,{placement:O,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),q=Z?D?gt:ft:D?yt:ht;w[B]>k[B]&&(q=hi(q));var L=hi(q),U=[];if(s&&U.push($[A]<=0),a&&U.push($[q]<=0,$[L]<=0),U.every(function(Q){return Q})){C=O,M=!1;break}E.set(O,U)}if(M)for(var Y=g?3:1,_t=function(tt){var ot=v.find(function(Ht){var Ct=E.get(Ht);if(Ct)return Ct.slice(0,tt).every(function(he){return he})});if(ot)return C=ot,"break"},it=Y;it>0;it--){var dt=_t(it);if(dt==="break")break}t.placement!==C&&(t.modifiersData[i]._skip=!0,t.placement=C,t.reset=!0)}}var hh={name:"flip",enabled:!0,phase:"main",fn:WE,requiresIfExists:["offset"],data:{_skip:!1}};function fh(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ph(e){return[ht,gt,yt,ft].some(function(t){return e[t]>=0})}function VE(e){var t=e.state,n=e.name,i=t.rects.reference,r=t.rects.popper,s=t.modifiersData.preventOverflow,o=ce(t,{elementContext:"reference"}),a=ce(t,{altBoundary:!0}),l=fh(o,i),c=fh(a,r,s),u=ph(l),d=ph(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var gh={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:VE};function HE(e,t,n){var i=Mt(e),r=[ft,ht].indexOf(i)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=s[0],a=s[1];return o=o||0,a=(a||0)*r,[ft,gt].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}function UE(e){var t=e.state,n=e.options,i=e.name,r=n.offset,s=r===void 0?[0,0]:r,o=Ns.reduce(function(u,d){return u[d]=HE(d,t.rects,s),u},{}),a=o[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=o}var mh={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:UE};function YE(e){var t=e.state,n=e.name;t.modifiersData[n]=cr({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var bh={name:"popperOffsets",enabled:!0,phase:"read",fn:YE,data:{}};function Ra(e){return e==="x"?"y":"x"}function GE(e){var t=e.state,n=e.options,i=e.name,r=n.mainAxis,s=r===void 0?!0:r,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,g=n.tetherOffset,m=g===void 0?0:g,b=ce(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=Mt(t.placement),_=te(t.placement),x=!_,v=Tn(y),w=Ra(v),k=t.modifiersData.popperOffsets,E=t.rects.reference,M=t.rects.popper,C=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,T=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if(!!k){if(s){var D,Z=v==="y"?ht:ft,B=v==="y"?yt:gt,$=v==="y"?"height":"width",q=k[v],L=q+b[Z],U=q-b[B],Y=f?-M[$]/2:0,_t=_===Le?E[$]:M[$],it=_===Le?-M[$]:-E[$],dt=t.elements.arrow,Q=f&&dt?Cn(dt):{width:0,height:0},tt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:or(),ot=tt[Z],Ht=tt[B],Ct=An(0,E[$],Q[$]),he=x?E[$]/2-Y-Ct-ot-T.mainAxis:_t-Ct-ot-T.mainAxis,wt=x?-E[$]/2+Y+Ct+Ht+T.mainAxis:it+Ct+Ht+T.mainAxis,Ut=t.elements.arrow&&le(t.elements.arrow),zr=Ut?v==="y"?Ut.clientTop||0:Ut.clientLeft||0:0,Di=(D=O?.[v])!=null?D:0,jr=q+he-Di-zr,$r=q+wt-Di,qi=An(f?On(L,jr):L,q,f?ae(U,$r):U);k[v]=qi,A[v]=qi-q}if(a){var Ii,Wr=v==="x"?ht:ft,Vr=v==="x"?yt:gt,ke=k[w],ze=w==="y"?"height":"width",Ri=ke+b[Wr],fn=ke-b[Vr],Ni=[ht,ft].indexOf(y)!==-1,Hr=(Ii=O?.[w])!=null?Ii:0,Ur=Ni?Ri:ke-E[ze]-M[ze]-Hr+T.altAxis,Yr=Ni?ke+E[ze]+M[ze]-Hr-T.altAxis:fn,Gr=f&&Ni?oh(Ur,ke,Yr):An(f?Ur:Ri,ke,f?Yr:fn);k[w]=Gr,A[w]=Gr-ke}t.modifiersData[i]=A}}var vh={name:"preventOverflow",enabled:!0,phase:"main",fn:GE,requiresIfExists:["offset"]};function Na(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Fa(e){return e===ut(e)||!xt(e)?Pn(e):Na(e)}function XE(e){var t=e.getBoundingClientRect(),n=De(t.width)/e.offsetWidth||1,i=De(t.height)/e.offsetHeight||1;return n!==1||i!==1}function Ba(e,t,n){n===void 0&&(n=!1);var i=xt(t),r=xt(t)&&XE(t),s=Et(t),o=Qt(e,r,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((St(t)!=="body"||Dn(s))&&(a=Fa(t)),xt(t)?(l=Qt(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):s&&(l.x=Ln(s))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function KE(e){var t=new Map,n=new Set,i=[];e.forEach(function(s){t.set(s.name,s)});function r(s){n.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&r(l)}}),i.push(s)}return e.forEach(function(s){n.has(s.name)||r(s)}),i}function za(e){var t=KE(e);return rh.reduce(function(n,i){return n.concat(t.filter(function(r){return r.phase===i}))},[])}function ja(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function $a(e){var t=e.reduce(function(n,i){var r=n[i.name];return n[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,n},{});return Object.keys(t).map(function(n){return t[n]})}var yh={placement:"bottom",modifiers:[],strategy:"absolute"};function xh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function _h(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,i=n===void 0?[]:n,r=t.defaultOptions,s=r===void 0?yh:r;return function(a,l,c){c===void 0&&(c=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},yh,s),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],h=!1,f={state:u,setOptions:function(y){var _=typeof y=="function"?y(u.options):y;m(),u.options=Object.assign({},s,u.options,_),u.scrollParents={reference:Jt(a)?rn(a):a.contextElement?rn(a.contextElement):[],popper:rn(l)};var x=za($a([].concat(i,u.options.modifiers)));if(u.orderedModifiers=x.filter(function(O){return O.enabled}),!1){var v;if(getBasePlacement(u.options.placement)===auto)var w;var k,E,M,C,T}return g(),f.update()},forceUpdate:function(){if(!h){var y=u.elements,_=y.reference,x=y.popper;if(!!xh(_,x)){u.rects={reference:Ba(_,le(x),u.options.strategy==="fixed"),popper:Cn(x)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(O){return u.modifiersData[O.name]=Object.assign({},O.data)});for(var v=0,w=0;w<u.orderedModifiers.length;w++){if(u.reset===!0){u.reset=!1,w=-1;continue}var k=u.orderedModifiers[w],E=k.fn,M=k.options,C=M===void 0?{}:M,T=k.name;typeof E=="function"&&(u=E({state:u,options:C,name:T,instance:f})||u)}}}},update:ja(function(){return new Promise(function(b){f.forceUpdate(),b(u)})}),destroy:function(){m(),h=!0}};if(!xh(a,l))return f;f.setOptions(c).then(function(b){!h&&c.onFirstUpdate&&c.onFirstUpdate(b)});function g(){u.orderedModifiers.forEach(function(b){var y=b.name,_=b.options,x=_===void 0?{}:_,v=b.effect;if(typeof v=="function"){var w=v({state:u,name:y,instance:f,options:x}),k=function(){};d.push(w||k)}})}function m(){d.forEach(function(b){return b()}),d=[]}return f}}var ZE=[uh,bh,ch,ir,mh,hh,vh,ah,gh],Wa=_h({defaultModifiers:ZE});var gi='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',JE="tippy-box",Ph="tippy-content",QE="tippy-backdrop",Lh="tippy-arrow",Dh="tippy-svg-arrow",qn={passive:!0,capture:!0},qh=function(){return document.body};function Va(e,t,n){if(Array.isArray(e)){var i=e[t];return i??(Array.isArray(n)?n[t]:n)}return e}function Za(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function Ih(e,t){return typeof e=="function"?e.apply(void 0,t):e}function wh(e,t){if(t===0)return e;var n;return function(i){clearTimeout(n),n=setTimeout(function(){e(i)},t)}}function tO(e){return e.split(/\s+/).filter(Boolean)}function pi(e){return[].concat(e)}function kh(e,t){e.indexOf(t)===-1&&e.push(t)}function eO(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function nO(e){return e.split("-")[0]}function Ws(e){return[].slice.call(e)}function Sh(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function ur(){return document.createElement("div")}function Vs(e){return["Element","Fragment"].some(function(t){return Za(e,t)})}function iO(e){return Za(e,"NodeList")}function Rh(e){return Za(e,"MouseEvent")}function rO(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function sO(e){return Vs(e)?[e]:iO(e)?Ws(e):Array.isArray(e)?e:Ws(document.querySelectorAll(e))}function Ha(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function Mh(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Nh(e){var t,n=pi(e),i=n[0];return i!=null&&(t=i.ownerDocument)!=null&&t.body?i.ownerDocument:document}function oO(e,t){var n=t.clientX,i=t.clientY;return e.every(function(r){var s=r.popperRect,o=r.popperState,a=r.props,l=a.interactiveBorder,c=nO(o.placement),u=o.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,h=c==="top"?u.bottom.y:0,f=c==="right"?u.left.x:0,g=c==="left"?u.right.x:0,m=s.top-i+d>l,b=i-s.bottom-h>l,y=s.left-n+f>l,_=n-s.right-g>l;return m||b||y||_})}function Ua(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){e[i](r,n)})}function Eh(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=n.getRootNode==null||(i=n.getRootNode())==null?void 0:i.host}return!1}var ve={isTouch:!1},Oh=0;function aO(){ve.isTouch||(ve.isTouch=!0,window.performance&&document.addEventListener("mousemove",Fh))}function Fh(){var e=performance.now();e-Oh<20&&(ve.isTouch=!1,document.removeEventListener("mousemove",Fh)),Oh=e}function lO(){var e=document.activeElement;if(rO(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function cO(){document.addEventListener("touchstart",aO,qn),window.addEventListener("blur",lO)}var uO=typeof window<"u"&&typeof document<"u",dO=uO?!!window.msCrypto:!1;var hO={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},fO={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ue=Object.assign({appendTo:qh,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},hO,fO),pO=Object.keys(ue),gO=function(t){var n=Object.keys(t);n.forEach(function(i){ue[i]=t[i]})};function Bh(e){var t=e.plugins||[],n=t.reduce(function(i,r){var s=r.name,o=r.defaultValue;if(s){var a;i[s]=e[s]!==void 0?e[s]:(a=ue[s])!=null?a:o}return i},{});return Object.assign({},e,n)}function mO(e,t){var n=t?Object.keys(Bh(Object.assign({},ue,{plugins:t}))):pO,i=n.reduce(function(r,s){var o=(e.getAttribute("data-tippy-"+s)||"").trim();if(!o)return r;if(s==="content")r[s]=o;else try{r[s]=JSON.parse(o)}catch{r[s]=o}return r},{});return i}function Ch(e,t){var n=Object.assign({},t,{content:Ih(t.content,[e])},t.ignoreAttributes?{}:mO(e,t.plugins));return n.aria=Object.assign({},ue.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}var bO=function(){return"innerHTML"};function Ga(e,t){e[bO()]=t}function Th(e){var t=ur();return e===!0?t.className=Lh:(t.className=Dh,Vs(e)?t.appendChild(e):Ga(t,e)),t}function Ah(e,t){Vs(t.content)?(Ga(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?Ga(e,t.content):e.textContent=t.content)}function Xa(e){var t=e.firstElementChild,n=Ws(t.children);return{box:t,content:n.find(function(i){return i.classList.contains(Ph)}),arrow:n.find(function(i){return i.classList.contains(Lh)||i.classList.contains(Dh)}),backdrop:n.find(function(i){return i.classList.contains(QE)})}}function zh(e){var t=ur(),n=ur();n.className=JE,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=ur();i.className=Ph,i.setAttribute("data-state","hidden"),Ah(i,e.props),t.appendChild(n),n.appendChild(i),r(e.props,e.props);function r(s,o){var a=Xa(t),l=a.box,c=a.content,u=a.arrow;o.theme?l.setAttribute("data-theme",o.theme):l.removeAttribute("data-theme"),typeof o.animation=="string"?l.setAttribute("data-animation",o.animation):l.removeAttribute("data-animation"),o.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof o.maxWidth=="number"?o.maxWidth+"px":o.maxWidth,o.role?l.setAttribute("role",o.role):l.removeAttribute("role"),(s.content!==o.content||s.allowHTML!==o.allowHTML)&&Ah(c,e.props),o.arrow?u?s.arrow!==o.arrow&&(l.removeChild(u),l.appendChild(Th(o.arrow))):l.appendChild(Th(o.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:r}}zh.$$tippy=!0;var vO=1,js=[],Ya=[];function yO(e,t){var n=Ch(e,Object.assign({},ue,Bh(Sh(t)))),i,r,s,o=!1,a=!1,l=!1,c=!1,u,d,h,f=[],g=wh(jr,n.interactiveDebounce),m,b=vO++,y=null,_=eO(n.plugins),x={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},v={id:b,reference:e,popper:ur(),popperInstance:y,props:n,state:x,plugins:_,clearDelayTimeouts:Ur,setProps:Yr,setContent:Gr,show:Yw,hide:Gw,hideWithInteractivity:Xw,enable:Ni,disable:Hr,unmount:Kw,destroy:Zw};if(!n.render)return v;var w=n.render(v),k=w.popper,E=w.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+v.id,v.popper=k,e._tippy=v,k._tippy=v;var M=_.map(function(S){return S.fn(v)}),C=e.hasAttribute("aria-expanded");return Ut(),Y(),q(),L("onCreate",[v]),n.showOnCreate&&Ri(),k.addEventListener("mouseenter",function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()}),k.addEventListener("mouseleave",function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&Z().addEventListener("mousemove",g)}),v;function T(){var S=v.props.touch;return Array.isArray(S)?S:[S,0]}function O(){return T()[0]==="hold"}function A(){var S;return!!((S=v.props.render)!=null&&S.$$tippy)}function D(){return m||e}function Z(){var S=D().parentNode;return S?Nh(S):document}function B(){return Xa(k)}function $(S){return v.state.isMounted&&!v.state.isVisible||ve.isTouch||u&&u.type==="focus"?0:Va(v.props.delay,S?0:1,ue.delay)}function q(S){S===void 0&&(S=!1),k.style.pointerEvents=v.props.interactive&&!S?"":"none",k.style.zIndex=""+v.props.zIndex}function L(S,P,I){if(I===void 0&&(I=!0),M.forEach(function(V){V[S]&&V[S].apply(V,P)}),I){var J;(J=v.props)[S].apply(J,P)}}function U(){var S=v.props.aria;if(!!S.content){var P="aria-"+S.content,I=k.id,J=pi(v.props.triggerTarget||e);J.forEach(function(V){var Tt=V.getAttribute(P);if(v.state.isVisible)V.setAttribute(P,Tt?Tt+" "+I:I);else{var Yt=Tt&&Tt.replace(I,"").trim();Yt?V.setAttribute(P,Yt):V.removeAttribute(P)}})}}function Y(){if(!(C||!v.props.aria.expanded)){var S=pi(v.props.triggerTarget||e);S.forEach(function(P){v.props.interactive?P.setAttribute("aria-expanded",v.state.isVisible&&P===D()?"true":"false"):P.removeAttribute("aria-expanded")})}}function _t(){Z().removeEventListener("mousemove",g),js=js.filter(function(S){return S!==g})}function it(S){if(!(ve.isTouch&&(l||S.type==="mousedown"))){var P=S.composedPath&&S.composedPath()[0]||S.target;if(!(v.props.interactive&&Eh(k,P))){if(pi(v.props.triggerTarget||e).some(function(I){return Eh(I,P)})){if(ve.isTouch||v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else L("onClickOutside",[v,S]);v.props.hideOnClick===!0&&(v.clearDelayTimeouts(),v.hide(),a=!0,setTimeout(function(){a=!1}),v.state.isMounted||ot())}}}function dt(){l=!0}function Q(){l=!1}function tt(){var S=Z();S.addEventListener("mousedown",it,!0),S.addEventListener("touchend",it,qn),S.addEventListener("touchstart",Q,qn),S.addEventListener("touchmove",dt,qn)}function ot(){var S=Z();S.removeEventListener("mousedown",it,!0),S.removeEventListener("touchend",it,qn),S.removeEventListener("touchstart",Q,qn),S.removeEventListener("touchmove",dt,qn)}function Ht(S,P){he(S,function(){!v.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&P()})}function Ct(S,P){he(S,P)}function he(S,P){var I=B().box;function J(V){V.target===I&&(Ua(I,"remove",J),P())}if(S===0)return P();Ua(I,"remove",d),Ua(I,"add",J),d=J}function wt(S,P,I){I===void 0&&(I=!1);var J=pi(v.props.triggerTarget||e);J.forEach(function(V){V.addEventListener(S,P,I),f.push({node:V,eventType:S,handler:P,options:I})})}function Ut(){O()&&(wt("touchstart",Di,{passive:!0}),wt("touchend",$r,{passive:!0})),tO(v.props.trigger).forEach(function(S){if(S!=="manual")switch(wt(S,Di),S){case"mouseenter":wt("mouseleave",$r);break;case"focus":wt(dO?"focusout":"blur",qi);break;case"focusin":wt("focusout",qi);break}})}function zr(){f.forEach(function(S){var P=S.node,I=S.eventType,J=S.handler,V=S.options;P.removeEventListener(I,J,V)}),f=[]}function Di(S){var P,I=!1;if(!(!v.state.isEnabled||Ii(S)||a)){var J=((P=u)==null?void 0:P.type)==="focus";u=S,m=S.currentTarget,Y(),!v.state.isVisible&&Rh(S)&&js.forEach(function(V){return V(S)}),S.type==="click"&&(v.props.trigger.indexOf("mouseenter")<0||o)&&v.props.hideOnClick!==!1&&v.state.isVisible?I=!0:Ri(S),S.type==="click"&&(o=!I),I&&!J&&fn(S)}}function jr(S){var P=S.target,I=D().contains(P)||k.contains(P);if(!(S.type==="mousemove"&&I)){var J=ze().concat(k).map(function(V){var Tt,Yt=V._tippy,Hn=(Tt=Yt.popperInstance)==null?void 0:Tt.state;return Hn?{popperRect:V.getBoundingClientRect(),popperState:Hn,props:n}:null}).filter(Boolean);oO(J,S)&&(_t(),fn(S))}}function $r(S){var P=Ii(S)||v.props.trigger.indexOf("click")>=0&&o;if(!P){if(v.props.interactive){v.hideWithInteractivity(S);return}fn(S)}}function qi(S){v.props.trigger.indexOf("focusin")<0&&S.target!==D()||v.props.interactive&&S.relatedTarget&&k.contains(S.relatedTarget)||fn(S)}function Ii(S){return ve.isTouch?O()!==S.type.indexOf("touch")>=0:!1}function Wr(){Vr();var S=v.props,P=S.popperOptions,I=S.placement,J=S.offset,V=S.getReferenceClientRect,Tt=S.moveTransition,Yt=A()?Xa(k).arrow:null,Hn=V?{getBoundingClientRect:V,contextElement:V.contextElement||D()}:e,Mc={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Xr){var Un=Xr.state;if(A()){var Jw=B(),Oo=Jw.box;["placement","reference-hidden","escaped"].forEach(function(Kr){Kr==="placement"?Oo.setAttribute("data-placement",Un.placement):Un.attributes.popper["data-popper-"+Kr]?Oo.setAttribute("data-"+Kr,""):Oo.removeAttribute("data-"+Kr)}),Un.attributes.popper={}}}},pn=[{name:"offset",options:{offset:J}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Tt}},Mc];A()&&Yt&&pn.push({name:"arrow",options:{element:Yt,padding:3}}),pn.push.apply(pn,P?.modifiers||[]),v.popperInstance=Wa(Hn,k,Object.assign({},P,{placement:I,onFirstUpdate:h,modifiers:pn}))}function Vr(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function ke(){var S=v.props.appendTo,P,I=D();v.props.interactive&&S===qh||S==="parent"?P=I.parentNode:P=Ih(S,[I]),P.contains(k)||P.appendChild(k),v.state.isMounted=!0,Wr()}function ze(){return Ws(k.querySelectorAll("[data-tippy-root]"))}function Ri(S){v.clearDelayTimeouts(),S&&L("onTrigger",[v,S]),tt();var P=$(!0),I=T(),J=I[0],V=I[1];ve.isTouch&&J==="hold"&&V&&(P=V),P?i=setTimeout(function(){v.show()},P):v.show()}function fn(S){if(v.clearDelayTimeouts(),L("onUntrigger",[v,S]),!v.state.isVisible){ot();return}if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(S.type)>=0&&o)){var P=$(!1);P?r=setTimeout(function(){v.state.isVisible&&v.hide()},P):s=requestAnimationFrame(function(){v.hide()})}}function Ni(){v.state.isEnabled=!0}function Hr(){v.hide(),v.state.isEnabled=!1}function Ur(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(s)}function Yr(S){if(!v.state.isDestroyed){L("onBeforeUpdate",[v,S]),zr();var P=v.props,I=Ch(e,Object.assign({},P,Sh(S),{ignoreAttributes:!0}));v.props=I,Ut(),P.interactiveDebounce!==I.interactiveDebounce&&(_t(),g=wh(jr,I.interactiveDebounce)),P.triggerTarget&&!I.triggerTarget?pi(P.triggerTarget).forEach(function(J){J.removeAttribute("aria-expanded")}):I.triggerTarget&&e.removeAttribute("aria-expanded"),Y(),q(),E&&E(P,I),v.popperInstance&&(Wr(),ze().forEach(function(J){requestAnimationFrame(J._tippy.popperInstance.forceUpdate)})),L("onAfterUpdate",[v,S])}}function Gr(S){v.setProps({content:S})}function Yw(){var S=v.state.isVisible,P=v.state.isDestroyed,I=!v.state.isEnabled,J=ve.isTouch&&!v.props.touch,V=Va(v.props.duration,0,ue.duration);if(!(S||P||I||J)&&!D().hasAttribute("disabled")&&(L("onShow",[v],!1),v.props.onShow(v)!==!1)){if(v.state.isVisible=!0,A()&&(k.style.visibility="visible"),q(),tt(),v.state.isMounted||(k.style.transition="none"),A()){var Tt=B(),Yt=Tt.box,Hn=Tt.content;Ha([Yt,Hn],0)}h=function(){var pn;if(!(!v.state.isVisible||c)){if(c=!0,k.offsetHeight,k.style.transition=v.props.moveTransition,A()&&v.props.animation){var Eo=B(),Xr=Eo.box,Un=Eo.content;Ha([Xr,Un],V),Mh([Xr,Un],"visible")}U(),Y(),kh(Ya,v),(pn=v.popperInstance)==null||pn.forceUpdate(),L("onMount",[v]),v.props.animation&&A()&&Ct(V,function(){v.state.isShown=!0,L("onShown",[v])})}},ke()}}function Gw(){var S=!v.state.isVisible,P=v.state.isDestroyed,I=!v.state.isEnabled,J=Va(v.props.duration,1,ue.duration);if(!(S||P||I)&&(L("onHide",[v],!1),v.props.onHide(v)!==!1)){if(v.state.isVisible=!1,v.state.isShown=!1,c=!1,o=!1,A()&&(k.style.visibility="hidden"),_t(),ot(),q(!0),A()){var V=B(),Tt=V.box,Yt=V.content;v.props.animation&&(Ha([Tt,Yt],J),Mh([Tt,Yt],"hidden"))}U(),Y(),v.props.animation?A()&&Ht(J,v.unmount):v.unmount()}}function Xw(S){Z().addEventListener("mousemove",g),kh(js,g),g(S)}function Kw(){v.state.isVisible&&v.hide(),v.state.isMounted&&(Vr(),ze().forEach(function(S){S._tippy.unmount()}),k.parentNode&&k.parentNode.removeChild(k),Ya=Ya.filter(function(S){return S!==v}),v.state.isMounted=!1,L("onHidden",[v]))}function Zw(){v.state.isDestroyed||(v.clearDelayTimeouts(),v.unmount(),zr(),delete e._tippy,v.state.isDestroyed=!0,L("onDestroy",[v]))}}function dr(e,t){t===void 0&&(t={});var n=ue.plugins.concat(t.plugins||[]);cO();var i=Object.assign({},t,{plugins:n}),r=sO(e);if(!1)var s,o;var a=r.reduce(function(l,c){var u=c&&yO(c,i);return u&&l.push(u),l},[]);return Vs(e)?a[0]:a}dr.defaultProps=ue;dr.setDefaultProps=gO;dr.currentInput=ve;var CU=Object.assign({},ir,{effect:function(t){var n=t.state,i={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,i.popper),n.styles=i,n.elements.arrow&&Object.assign(n.elements.arrow.style,i.arrow)}});var Ka={clientX:0,clientY:0},$s=[];function jh(e){var t=e.clientX,n=e.clientY;Ka={clientX:t,clientY:n}}function xO(e){e.addEventListener("mousemove",jh)}function _O(e){e.removeEventListener("mousemove",jh)}var Hs={name:"followCursor",defaultValue:!1,fn:function(t){var n=t.reference,i=Nh(t.props.triggerTarget||n),r=!1,s=!1,o=!0,a=t.props;function l(){return t.props.followCursor==="initial"&&t.state.isVisible}function c(){i.addEventListener("mousemove",h)}function u(){i.removeEventListener("mousemove",h)}function d(){r=!0,t.setProps({getReferenceClientRect:null}),r=!1}function h(m){var b=m.target?n.contains(m.target):!0,y=t.props.followCursor,_=m.clientX,x=m.clientY,v=n.getBoundingClientRect(),w=_-v.left,k=x-v.top;(b||!t.props.interactive)&&t.setProps({getReferenceClientRect:function(){var M=n.getBoundingClientRect(),C=_,T=x;y==="initial"&&(C=M.left+w,T=M.top+k);var O=y==="horizontal"?M.top:T,A=y==="vertical"?M.right:C,D=y==="horizontal"?M.bottom:T,Z=y==="vertical"?M.left:C;return{width:A-Z,height:D-O,top:O,right:A,bottom:D,left:Z}}})}function f(){t.props.followCursor&&($s.push({instance:t,doc:i}),xO(i))}function g(){$s=$s.filter(function(m){return m.instance!==t}),$s.filter(function(m){return m.doc===i}).length===0&&_O(i)}return{onCreate:f,onDestroy:g,onBeforeUpdate:function(){a=t.props},onAfterUpdate:function(b,y){var _=y.followCursor;r||_!==void 0&&a.followCursor!==_&&(g(),_?(f(),t.state.isMounted&&!s&&!l()&&c()):(u(),d()))},onMount:function(){t.props.followCursor&&!s&&(o&&(h(Ka),o=!1),l()||c())},onTrigger:function(b,y){Rh(y)&&(Ka={clientX:y.clientX,clientY:y.clientY}),s=y.type==="focus"},onHidden:function(){t.props.followCursor&&(d(),u(),o=!0)}}}};dr.setDefaultProps({render:zh});var mi=dr;var wO=e=>new Date(e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}),kO={mounted(){this.initData()},updated(){this.initData()},initData(){this.data=JSON.parse(this.el.dataset.tooltip),this.barWidth=parseInt(this.el.dataset.barWidth,10),this.offset=parseInt(this.el.dataset.offset,10),this.step=this.barWidth+1,this.bars=Array.from(this.el.querySelectorAll("rect")).filter(e=>e.getAttribute("height")!=="2"),!this.tippy&&(this.tippy=mi(this.el,{arrow:gi,content:"",delay:[50,0],duration:[200,0],followCursor:"horizontal",plugins:[Hs],placement:"top",allowHTML:!0,trigger:"manual"}),this.lastIndex=null,this.el.addEventListener("mousemove",e=>{let t=this.el.getBoundingClientRect(),n=e.clientX-t.left,r=Math.floor(n/this.step)-this.offset;if(this.lastIndex!==null&&this.lastIndex!==r){let s=this.bars[this.lastIndex];s&&(s.style.opacity="1")}if(r>=0&&r<this.data.length){let s=this.data[r],a=`
<span style="color: ${oe[s.state]||Mn}; font-weight: 600;">${s.state}</span>
<span style="color: #9ca3af; margin-left: 4px;">${wO(s.timestamp)}</span>
`;this.tippy.setContent(a),this.tippy.show(),this.bars.forEach((l,c)=>{l.style.opacity=c===r?"1":"0.4"}),this.lastIndex=r}else this.tippy.hide(),this.bars.forEach(s=>s.style.opacity="1"),this.lastIndex=null}),this.el.addEventListener("mouseleave",()=>{this.tippy.hide(),this.bars.forEach(e=>e.style.opacity="1"),this.lastIndex=null}))},destroyed(){this.tippy&&this.tippy.destroy()}},$h=kO;var SO=e=>new Date(e).toLocaleString("en-US",{hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}),MO={mounted(){this.initData()},updated(){this.initData()},initData(){this.data=JSON.parse(this.el.dataset.tooltip),this.barWidth=parseInt(this.el.dataset.barWidth,10),this.step=this.barWidth+1,this.bars=Array.from(this.el.querySelectorAll("rect")).filter(e=>e.getAttribute("height")!=="2"),this.barsBySlot=new Map,this.bars.forEach(e=>{let t=parseInt(e.getAttribute("x"),10),n=Math.floor(t/this.step);this.barsBySlot.set(n,e)}),!this.tippy&&(this.tippy=mi(this.el,{arrow:gi,content:"",delay:[50,0],duration:[200,0],followCursor:"horizontal",plugins:[Hs],placement:"top",allowHTML:!0,trigger:"manual"}),this.lastSlot=null,this.el.addEventListener("mousemove",e=>{let t=this.el.getBoundingClientRect(),n=e.clientX-t.left,i=Math.floor(n/this.step);if(this.lastSlot!==null&&this.lastSlot!==i){let r=this.barsBySlot.get(this.lastSlot);r&&(r.style.opacity="1")}if(i>=0&&i<this.data.length){let r=this.data[i],s=r.count===1?"job":"jobs",o=`
<span style="color: ${li}; font-weight: 600;">${r.count}</span>
<span style="color: #9ca3af;"> ${s}</span>
<span style="color: #9ca3af; margin-left: 4px;">${SO(r.timestamp)}</span>
`;this.tippy.setContent(o),this.tippy.show(),this.bars.forEach(a=>{let l=Math.floor(parseInt(a.getAttribute("x"),10)/this.step);a.style.opacity=l===i?"1":"0.4"}),this.lastSlot=i}else this.tippy.hide(),this.bars.forEach(r=>r.style.opacity="1"),this.lastSlot=null}),this.el.addEventListener("mouseleave",()=>{this.tippy.hide(),this.bars.forEach(e=>e.style.opacity="1"),this.lastSlot=null}))},destroyed(){this.tippy&&this.tippy.destroy()}},Wh=MO;var EO={applyTheme(){let e=window.matchMedia("(prefers-color-scheme: dark)").matches,t=Gn("theme");t==="dark"||t==="system"&&e||!t&&e?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},mounted(){this.mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.onMediaChange=()=>this.applyTheme(),this.mediaQuery.addEventListener("change",this.onMediaChange),this.handleEvent("update-theme",({theme:e})=>{fe("theme",e),this.applyTheme()})},destroyed(){this.mediaQuery.removeEventListener("change",this.onMediaChange)}},Vh=EO;var OO={mounted(){this.drawConnectors(),this.resizeObserver=new ResizeObserver(()=>this.drawConnectors()),this.resizeObserver.observe(this.el)},updated(){this.drawConnectors()},destroyed(){this.resizeObserver.disconnect()},drawConnectors(){let e=this.el.querySelector("#timeline-connectors"),n=this.el.querySelector("#timeline-boxes").getBoundingClientRect(),i=(C,T)=>{let O=this.el.querySelector(`#timeline-${C}`).getBoundingClientRect(),A,D;switch(T){case"right":A=O.right-n.left,D=O.top-n.top+O.height/2;break;case"left":A=O.left-n.left,D=O.top-n.top+O.height/2;break;case"top":A=O.left-n.left+O.width/2,D=O.top-n.top;break;case"bottom":A=O.left-n.left+O.width/2,D=O.bottom-n.top;break}return{x:A,y:D}},r=i("suspended","right"),s=i("suspended","bottom"),o=i("scheduled","top"),a=i("scheduled","right"),l=i("retryable","right"),c=i("available","left"),u=i("available","right"),d=i("executing","left"),h=i("executing","right"),f=i("completed","left"),g=i("cancelled","left"),m=i("discarded","left"),b=this.el.dataset,y=b.entrySuspended==="true",_=b.entryScheduled==="true",x=b.entryRetryable==="true",v=b.engaged==="true",w=(C,T)=>{let O=(C.x+T.x)/2;return`M ${C.x} ${C.y} C ${O} ${C.y}, ${O} ${T.y}, ${T.x} ${T.y}`},k=(C,T)=>`M ${C.x} ${C.y} L ${T.x} ${T.y}`,M=[{d:((C,T)=>`M ${C.x} ${C.y} L ${T.x} ${T.y}`)(s,o),active:y},{d:k(a,c),active:(_||y)&&v},{d:w(l,c),active:x&&v},{d:k(u,d),active:v},{d:w(h,f),active:b.terminalCompleted==="true"},{d:k(h,g),active:b.terminalCancelled==="true"},{d:w(h,m),active:b.terminalDiscarded==="true"}];e.innerHTML="",e.setAttribute("width",n.width),e.setAttribute("height",n.height),M.forEach(({d:C,active:T})=>{let O=document.createElementNS("http://www.w3.org/2000/svg","path");O.setAttribute("d",C),O.setAttribute("fill","none"),O.setAttribute("stroke-width","2"),O.setAttribute("class",T?"stroke-gray-400 dark:stroke-gray-500":"stroke-gray-300 dark:stroke-gray-600"),T||O.setAttribute("stroke-dasharray","6 4"),e.appendChild(O)})}},Hh=OO;var CO={destroyed(){this.tippy.destroy()},mounted(){let e=this.el.getAttribute("data-title");this.tippy=mi(this.el,{arrow:gi,content:e,delay:[250,null]})},updated(){let e=this.el.getAttribute("data-title");this.tippy.setContent(e)}},Uh=CO;var Vn=Ec(Vw());var Ai=260,Pi=56,mt=8,Ft=20,Li=[.5,.75,1,1.25],Hw=2,$V={mounted(){this.pan={x:0,y:0},this.isPanning=!1,this.startPan={x:0,y:0},this.startMouse={x:0,y:0},this.graphData=null,this.zoomIndex=Hw,this.needsInitialCenter=!0,this.trackActiveNode=!0,this.lastTrackedNodeId=null,this.direction="LR",this.expandedSubWorkflows=new Map,this.loadingSubWorkflows=new Set,this.applyDotGridBackground(),this.setupPanning(),this.createControls(),this.handleEvent("graph-data",e=>{this.graphData=e,this.updateTruncationWarning(e.truncated,e.jobs?.length||0),this.expandedSubWorkflows.forEach((t,n)=>{this.pushEventTo(this.el,"expand-sub-workflow",{workflow_id:n})}),this.render()}),this.handleEvent("sub-workflow-jobs",e=>{let{workflow_id:t,jobs:n,truncated:i}=e,r=this.loadingSubWorkflows.has(t);this.loadingSubWorkflows.delete(t),this.expandedSubWorkflows.set(t,{jobs:n,truncated:i}),r&&(this.pendingCenterOnNode=`sub-${t}`),this.render()}),this.themeObserver=new MutationObserver(()=>{this.applyDotGridBackground(),this.updateControlColors(),this.graphData&&this.render()}),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})},destroyed(){this.removePanningListeners(),this.themeObserver&&this.themeObserver.disconnect(),this.panAnimation&&cancelAnimationFrame(this.panAnimation)},applyDotGridBackground(){let e=this.isDarkMode(),t=e?"#111827":"#f9fafb",n=e?"#374151":"#d1d5db";this.el.style.backgroundColor=t,this.el.style.backgroundImage=`radial-gradient(circle, ${n} 1px, transparent 1px)`,this.el.style.backgroundSize="20px 20px"},isDarkMode(){return document.documentElement.classList.contains("dark")},getStateColors(e){let t=oe[e]||oe.available,n=this.isDarkMode(),i=Oa[e]||Oa.pending,r=n?i.dark:i.light;return{border:t,bg:r}},render(){let e=this.el,t=this.graphData;if(!t)return;let{jobs:n,sub_workflows:i}=t;if(n.length===0&&i.length===0){this.renderEmpty(e);return}let r=new Vn.default.graphlib.Graph;r.setGraph({rankdir:this.direction,nodesep:20,ranksep:50,marginx:30,marginy:20}),r.setDefaultEdgeLabel(()=>({}));let s=new Map;n.forEach(x=>{let v=x.meta?.name;v&&s.set(v,x)}),n.forEach(x=>{let v=this.getDisplayName(x);r.setNode(`job-${x.id}`,{displayName:v,width:Ai,height:Pi,type:"job",job:x})});let o=new Map;i.forEach(x=>{o.set(x.workflow_id,x)});let a=new Map;i.forEach(x=>{let v=this.expandedSubWorkflows.has(x.workflow_id),w=this.loadingSubWorkflows.has(x.workflow_id);if(v){let{jobs:k,truncated:E}=this.expandedSubWorkflows.get(x.workflow_id),M=this.calculateExpandedSize(k);a.set(x.workflow_id,{sub:x,subJobs:k,subTruncated:E}),r.setNode(`sub-${x.workflow_id}`,{label:x.sub_name||x.workflow_name||x.workflow_id.slice(0,8)+"...",width:M.width,height:M.height,type:"sub_workflow_expanded",subWorkflow:x})}else r.setNode(`sub-${x.workflow_id}`,{label:x.sub_name||x.workflow_name||x.workflow_id.slice(0,8)+"...",width:Ai,height:Pi,type:"sub_workflow",subWorkflow:x,isLoading:w});if(x.parent_dep){let k=s.get(x.parent_dep);k&&r.setEdge(`job-${k.id}`,`sub-${x.workflow_id}`,{suspended:!1})}}),n.forEach(x=>{let v=x.meta?.deps||[];v.forEach(w=>{let k=x.state==="scheduled"&&v.length>0;if(Array.isArray(w)){let[E,M]=w;M==="*"&&o.get(E)&&r.setEdge(`sub-${E}`,`job-${x.id}`,{suspended:k})}else{let E=s.get(w);E&&r.setEdge(`job-${E.id}`,`job-${x.id}`,{suspended:k})}})}),Vn.default.layout(r);let l=1/0,c=1/0,u=-1/0,d=-1/0;r.nodes().forEach(x=>{let v=r.node(x);l=Math.min(l,v.x-v.width/2),c=Math.min(c,v.y-v.height/2),u=Math.max(u,v.x+v.width/2),d=Math.max(d,v.y+v.height/2)});let h=u-l+60,f=d-c+40,g=e.querySelector("svg"),m=e.getBoundingClientRect(),b=m.width,y=m.height;this.bounds={minX:l-30,minY:c-20,width:h,height:f},this.viewSize={width:b,height:y},this.needsInitialCenter&&(this.centerGraph(),this.needsInitialCenter=!1),this.trackActiveNode&&this.centerOnActiveNode(r);let _=this.buildSvgContent(r,l-30,c-20,a);if(g.innerHTML=_,this.updateViewBox(),this.currentGraph=r,this.pendingCenterOnNode){let x=r.node(this.pendingCenterOnNode);x&&this.centerOnNode(x),this.pendingCenterOnNode=null}this.setupClickHandlers(g)},centerOnNode(e){if(!this.bounds||!this.viewSize)return;let t=Li[this.zoomIndex],n=this.viewSize.width/t,i=this.viewSize.height/t,r=n/2-(e.x-this.bounds.minX),s=i/2-(e.y-this.bounds.minY);this.animatePanTo(r,s)},renderEmpty(e){let t=e.querySelector("svg"),i=this.isDarkMode()?"#6b7280":"#9ca3af";t.innerHTML=`
<text x="50%" y="50%" text-anchor="middle" dominant-baseline="middle"
fill="${i}" font-size="14">
No jobs to display
</text>
`},getJobName(e){return e.meta?.handler||e.worker},getDisplayName(e){let t=e.meta?.name,n=e.meta?.decorated_name||e.meta?.handler||e.worker||"Unknown",i=28,r=t.length>i?t.slice(0,i-1)+"\u2026":t,s=32,o=n.length>s?"\u2026"+n.slice(-(s-1)):n;return{name:r,worker:o}},truncateWorkflowId(e){return!e||e.length<=20?`Sub ${e}`:`Sub ${e.slice(0,6)}\u2026${e.slice(-12)}`},calculateExpandedSize(e){if(!e||e.length===0)return{width:Ai+20*2,height:Pi+32+20*2};let i=new Vn.default.graphlib.Graph;i.setGraph({rankdir:this.direction,nodesep:15,ranksep:40,marginx:10,marginy:10}),i.setDefaultEdgeLabel(()=>({}));let r=new Map;e.forEach(d=>{let h=d.meta?.name;h&&r.set(h,d),i.setNode(`job-${d.id}`,{width:Ai,height:Pi})}),e.forEach(d=>{(d.meta?.deps||[]).forEach(f=>{if(!Array.isArray(f)){let g=r.get(f);g&&i.setEdge(`job-${g.id}`,`job-${d.id}`)}})}),Vn.default.layout(i);let s=1/0,o=1/0,a=-1/0,l=-1/0;i.nodes().forEach(d=>{let h=i.node(d);s=Math.min(s,h.x-h.width/2),o=Math.min(o,h.y-h.height/2),a=Math.max(a,h.x+h.width/2),l=Math.max(l,h.y+h.height/2)});let c=a-s,u=l-o;return{width:c+20*2,height:u+32+20*2}},buildSvgContent(e,t,n,i=new Map){let r="",s=this.isDarkMode();return r+=`
<defs>
<style>
.workflow-node {
transition: filter 0.15s ease;
}
.workflow-node:hover {
filter: brightness(1.08) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}
</style>
<symbol id="icon-ellipsis" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"
d="M8.625 12a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
</symbol>
<symbol id="icon-check" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"
d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
</symbol>
<symbol id="icon-spinner" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="9" fill="none" stroke="currentColor" stroke-width="1.5" opacity="0.25"/>
<path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"
d="M12 3a9 9 0 0 1 9 9">
<animateTransform attributeName="transform" type="rotate" from="0 12 12" to="360 12 12" dur="1s" repeatCount="indefinite"/>
</path>
</symbol>
<symbol id="icon-document-check" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"
d="M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Zm0 0A9 9 0 0 1 19.5 11.25M10.125 2.25c.621 0 1.125.504 1.125 1.125v3.75c0 .621.504 1.125 1.125 1.125h3.75c.621 0 1.125.504 1.125 1.125M9 15l2.25 2.25L15 12"/>
</symbol>
<symbol id="icon-arrow-path" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"/>
</symbol>
<symbol id="icon-plus-circle" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"
d="M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
</symbol>
<symbol id="icon-minus-circle" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"
d="M15 12H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
</symbol>
</defs>
`,e.edges().forEach(o=>{let a=e.edge(o),l=e.node(o.v),c=e.node(o.w);if(!l||!c)return;let u=s?"#4b5563":"#9ca3af",d=a.suspended?"6 4":"none",h,f;if(this.direction==="TB"){let g=l.x,m=l.y+l.height/2,b=c.y-c.height/2-mt,y=c.x,_=c.y-c.height/2,x=(m+_)/2;h=`M ${g} ${m} C ${g} ${x}, ${y} ${x}, ${y} ${b}`,f=`${y},${_} ${y-mt/2},${_-mt} ${y+mt/2},${_-mt}`}else{let g=l.x+l.width/2,m=l.y,b=c.x-c.width/2-mt,y=c.y,_=c.x-c.width/2,x=(g+_)/2;h=`M ${g} ${m} C ${x} ${m}, ${x} ${y}, ${b} ${y}`,f=`${_},${y} ${_-mt},${y-mt/2} ${_-mt},${y+mt/2}`}r+=`<path d="${h}" fill="none" stroke="${u}" stroke-width="2" stroke-dasharray="${d}" />`,r+=`<polygon points="${f}" fill="${u}" />`}),e.nodes().forEach(o=>{let a=e.node(o),l=a.x-a.width/2,c=a.y-a.height/2;if(a.type==="job")r+=this.renderJobNode(a,l,c,o);else if(a.type==="sub_workflow")r+=this.renderSubWorkflowNode(a,l,c,o);else if(a.type==="sub_workflow_expanded"){let u=a.subWorkflow.workflow_id,d=i.get(u);r+=this.renderExpandedSubWorkflowNode(a,l,c,o,d?.subJobs||[],d?.subTruncated||!1)}}),r},renderJobNode(e,t,n,i){let r=e.job,s=this.getStateColors(r.state),o=this.isDarkMode(),a=o?"#e5e7eb":"#374151",l=o?"#9ca3af":"#6b7280",c=t+12+Ft/2,u=n+e.height/2,d=t+12+Ft+8,h=e.displayName,f=r.meta?.name==="context"&&r.meta?.context===!0;return`
<g data-job-id="${r.id}" class="cursor-pointer workflow-node" role="button">
<rect x="${t}" y="${n}" width="${e.width}" height="${e.height}"
rx="8" fill="${s.bg}" stroke="${s.border}" stroke-width="2" />
${f?this.renderContextIcon(c,u,s.border):this.renderStateIcon(r.state,c,u)}
<text x="${d}" y="${n+e.height/2-7}"
dominant-baseline="middle" font-size="13" font-weight="500" fill="${a}">
${this.escapeHtml(h.name)}
</text>
<text x="${d}" y="${n+e.height/2+11}"
dominant-baseline="middle" font-size="11" fill="${l}">
${this.escapeHtml(h.worker)}
</text>
</g>
`},renderSubWorkflowNode(e,t,n,i){let r=e.subWorkflow,s=this.getStateColors(r.state),o=this.isDarkMode(),a=o?"#e5e7eb":"#374151",l=o?"#9ca3af":"#6b7280",c=t+12+Ft/2,u=n+e.height/2,d=t+12+Ft+8,h=r.sub_name||r.workflow_name||"Sub-workflow",f=this.truncateWorkflowId(r.workflow_id),g=t+e.width-28,m=n+e.height/2,b=e.isLoading?`
<g transform="translate(${g-8}, ${m-8})">
<circle cx="8" cy="8" r="6" fill="none" stroke="${l}" stroke-width="1.5" opacity="0.25"/>
<path fill="none" stroke="${l}" stroke-width="1.5" stroke-linecap="round"
d="M8 2a6 6 0 0 1 6 6">
<animateTransform attributeName="transform" type="rotate" from="0 8 8" to="360 8 8" dur="1s" repeatCount="indefinite"/>
</path>
</g>
`:`
<g data-expand-workflow="${r.workflow_id}" class="cursor-pointer" role="button">
<circle cx="${g}" cy="${m}" r="12" fill="transparent" />
<use href="#icon-plus-circle" x="${g-10}" y="${m-10}" width="20" height="20"
style="color: ${l}" />
</g>
`;return`
<g data-workflow-id="${r.workflow_id}" class="cursor-pointer workflow-node" role="button">
<rect x="${t}" y="${n}" width="${e.width}" height="${e.height}"
rx="8" fill="${s.bg}" stroke="${s.border}" stroke-width="2" stroke-dasharray="6 3" />
${this.renderStateIcon(r.state,c,u)}
<text x="${d}" y="${n+e.height/2-7}"
dominant-baseline="middle" font-size="13" font-weight="500" fill="${a}">
${this.escapeHtml(h)}
</text>
<text x="${d}" y="${n+e.height/2+11}"
dominant-baseline="middle" font-size="11" fill="${l}">
${this.escapeHtml(f)}
</text>
</g>
${b}
`},renderExpandedSubWorkflowNode(e,t,n,i,r,s=!1){let o=e.subWorkflow,a=this.getStateColors(o.state),l=this.isDarkMode(),c=l?"#e5e7eb":"#374151",u=l?"#9ca3af":"#6b7280",d=l?"#fbbf24":"#d97706",h=l?"rgba(17, 24, 39, 0.5)":"rgba(249, 250, 251, 0.5)",f=32,g=20,m=o.sub_name||o.workflow_name||"Sub-workflow",b=new Vn.default.graphlib.Graph;b.setGraph({rankdir:this.direction,nodesep:15,ranksep:40,marginx:10,marginy:10}),b.setDefaultEdgeLabel(()=>({}));let y=new Map;r.forEach(q=>{let L=q.meta?.name;L&&y.set(L,q);let U=this.getDisplayName(q);b.setNode(`job-${q.id}`,{displayName:U,width:Ai,height:Pi,job:q})}),r.forEach(q=>{let L=q.meta?.deps||[];L.forEach(U=>{if(!Array.isArray(U)){let Y=y.get(U);if(Y){let _t=q.state==="scheduled"&&L.length>0;b.setEdge(`job-${Y.id}`,`job-${q.id}`,{suspended:_t})}}})}),Vn.default.layout(b);let _=1/0,x=1/0,v=-1/0,w=-1/0;b.nodes().forEach(q=>{let L=b.node(q);_=Math.min(_,L.x-L.width/2),x=Math.min(x,L.y-L.height/2),v=Math.max(v,L.x+L.width/2),w=Math.max(w,L.y+L.height/2)});let k=r.length>0?v-_:Ai,E=r.length>0?w-x:Pi,M=k+g*2,C=E+f+g*2,T=t+g-_,O=n+f+g-x,A=t+M-28,D=n+f/2,Z=s?`
<g>
<title>Showing first ${r.length} jobs</title>
<svg x="${A-36}" y="${D-8}" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="${d}" stroke-width="1.5">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z" />
</svg>
</g>
`:"",B=`
<g>
<rect x="${t}" y="${n}" width="${M}" height="${C}"
rx="8" fill="${h}" stroke="${a.border}" stroke-width="2" stroke-dasharray="6 3" />
<text x="${t+12}" y="${n+f/2+1}"
dominant-baseline="middle" font-size="12" font-weight="600" fill="${c}">
${this.escapeHtml(m)}
</text>
${Z}
<g data-collapse-workflow="${o.workflow_id}" class="cursor-pointer" role="button">
<circle cx="${A}" cy="${D}" r="12" fill="transparent" />
<use href="#icon-minus-circle" x="${A-10}" y="${D-10}" width="20" height="20"
style="color: ${u}" />
</g>
</g>
`,$=l?"#4b5563":"#9ca3af";return b.edges().forEach(q=>{let L=b.edge(q),U=b.node(q.v),Y=b.node(q.w);if(!U||!Y)return;let _t=L.suspended?"6 4":"none",it=U.x+T,dt=U.y+O,Q=Y.x+T,tt=Y.y+O,ot,Ht;if(this.direction==="TB"){let Ct=dt+U.height/2,he=tt-Y.height/2-mt,wt=tt-Y.height/2,Ut=(Ct+wt)/2;ot=`M ${it} ${Ct} C ${it} ${Ut}, ${Q} ${Ut}, ${Q} ${he}`,Ht=`${Q},${wt} ${Q-mt/2},${wt-mt} ${Q+mt/2},${wt-mt}`}else{let Ct=it+U.width/2,he=Q-Y.width/2-mt,wt=Q-Y.width/2,Ut=(Ct+wt)/2;ot=`M ${Ct} ${dt} C ${Ut} ${dt}, ${Ut} ${tt}, ${he} ${tt}`,Ht=`${wt},${tt} ${wt-mt},${tt-mt/2} ${wt-mt},${tt+mt/2}`}B+=`<path d="${ot}" fill="none" stroke="${$}" stroke-width="2" stroke-dasharray="${_t}" />`,B+=`<polygon points="${Ht}" fill="${$}" />`}),b.nodes().forEach(q=>{let L=b.node(q),U=L.job,Y=this.getStateColors(U.state),_t=l?"#9ca3af":"#6b7280",it=L.x+T-L.width/2,dt=L.y+O-L.height/2,Q=it+12+Ft/2,tt=dt+L.height/2,ot=it+12+Ft+8,Ht=U.meta?.name==="context"&&U.meta?.context===!0;B+=`
<g data-job-id="${U.id}" class="cursor-pointer workflow-node" role="button">
<rect x="${it}" y="${dt}" width="${L.width}" height="${L.height}"
rx="8" fill="${Y.bg}" stroke="${Y.border}" stroke-width="2" />
${Ht?this.renderContextIcon(Q,tt,Y.border):this.renderStateIcon(U.state,Q,tt)}
<text x="${ot}" y="${dt+L.height/2-7}"
dominant-baseline="middle" font-size="13" font-weight="500" fill="${c}">
${this.escapeHtml(L.displayName.name)}
</text>
<text x="${ot}" y="${dt+L.height/2+11}"
dominant-baseline="middle" font-size="11" fill="${_t}">
${this.escapeHtml(L.displayName.worker)}
</text>
</g>
`}),B},getStateIconId(e){switch(e){case"executing":return"icon-spinner";case"retryable":return"icon-arrow-path";case"completed":case"cancelled":case"discarded":return"icon-check";default:return"icon-ellipsis"}},renderStateIcon(e,t,n){let i=this.getStateColors(e),r=this.getStateIconId(e),s=t-Ft/2,o=n-Ft/2;return`<use href="#${r}" x="${s}" y="${o}" width="${Ft}" height="${Ft}"
style="color: ${i.border}" />`},renderContextIcon(e,t,n){let i=e-Ft/2,r=t-Ft/2;return`<use href="#icon-document-check" x="${i}" y="${r}" width="${Ft}" height="${Ft}"
style="color: ${n}" />`},escapeHtml(e){let t=document.createElement("div");return t.textContent=e,t.innerHTML},setupClickHandlers(e){e.querySelectorAll("[data-expand-workflow]").forEach(t=>{t.addEventListener("click",n=>{n.stopPropagation();let i=t.dataset.expandWorkflow;this.expandSubWorkflow(i)})}),e.querySelectorAll("[data-collapse-workflow]").forEach(t=>{t.addEventListener("click",n=>{n.stopPropagation();let i=t.dataset.collapseWorkflow;this.collapseSubWorkflow(i)})}),e.querySelectorAll("[data-job-id]").forEach(t=>{t.addEventListener("click",n=>{n.stopPropagation();let i=t.dataset.jobId;this.pushEventTo(this.el,"navigate-to-job",{job_id:i})})}),e.querySelectorAll("[data-workflow-id]").forEach(t=>{t.addEventListener("click",n=>{n.stopPropagation();let i=t.dataset.workflowId;this.pushEventTo(this.el,"navigate-to-workflow",{workflow_id:i})})})},expandSubWorkflow(e){this.loadingSubWorkflows.has(e)||this.expandedSubWorkflows.has(e)||(this.loadingSubWorkflows.add(e),this.render(),this.pushEventTo(this.el,"expand-sub-workflow",{workflow_id:e}))},collapseSubWorkflow(e){this.expandedSubWorkflows.delete(e),this.render()},setupPanning(){let e=this.el.querySelector("svg");this.onMouseDown=t=>{t.target.closest(".workflow-node")||(this.isPanning=!0,this.startPan={...this.pan},this.startMouse={x:t.clientX,y:t.clientY},e.style.cursor="grabbing",t.preventDefault())},this.onMouseMove=t=>{if(!this.isPanning)return;let n=Li[this.zoomIndex],i=(t.clientX-this.startMouse.x)/n,r=(t.clientY-this.startMouse.y)/n;this.pan.x=this.startPan.x+i,this.pan.y=this.startPan.y+r,this.updateViewBox()},this.onMouseUp=()=>{this.isPanning=!1,this.el.querySelector("svg").style.cursor="grab"},e.addEventListener("mousedown",this.onMouseDown),document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.onMouseUp),e.style.cursor="grab"},removePanningListeners(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("mouseup",this.onMouseUp)},updateViewBox(){let e=this.el.querySelector("svg");if(!this.bounds||!this.viewSize)return;let t=Li[this.zoomIndex],n=this.viewSize.width/t,i=this.viewSize.height/t;e.setAttribute("viewBox",`${this.bounds.minX-this.pan.x} ${this.bounds.minY-this.pan.y} ${n} ${i}`),e.style.width="100%",e.style.height="100%"},centerGraph(){if(!this.bounds||!this.viewSize)return;let e=Li[this.zoomIndex],t=this.viewSize.width/e,n=this.viewSize.height/e;this.direction==="TB"?(this.pan.x=(t-this.bounds.width)/2,this.pan.y=20):(this.pan.x=20,this.pan.y=(n-this.bounds.height)/2)},zoomIn(){this.zoomIndex<Li.length-1&&(this.zoomIndex++,this.updateViewBox())},zoomOut(){this.zoomIndex>0&&(this.zoomIndex--,this.updateViewBox())},resetView(){this.zoomIndex=Hw,this.centerGraph(),this.updateViewBox()},toggleTracking(){this.trackActiveNode=!this.trackActiveNode,this.updateTrackingButtonState(),this.trackActiveNode&&this.currentGraph&&(this.lastTrackedNodeId=null,this.centerOnActiveNode(this.currentGraph,!1),this.updateViewBox())},centerOnActiveNode(e,t=!0){if(!this.bounds||!this.viewSize)return;let n=null,i=null;if(e.nodes().forEach(c=>{let u=e.node(c),d;u.type==="job"?d=u.job.state:(u.type==="sub_workflow"||u.type==="sub_workflow_expanded")&&(d=u.subWorkflow?.state),d==="executing"&&(n=u,i=c)}),!n||i===this.lastTrackedNodeId)return;this.lastTrackedNodeId=i;let r=Li[this.zoomIndex],s=this.viewSize.width/r,o=this.viewSize.height/r,a=s/2-(n.x-this.bounds.minX),l=o/2-(n.y-this.bounds.minY);t?this.animatePanTo(a,l):(this.pan.x=a,this.pan.y=l)},animatePanTo(e,t){this.panAnimation&&cancelAnimationFrame(this.panAnimation);let n=this.pan.x,i=this.pan.y,r=300,s=performance.now(),o=l=>1-Math.pow(1-l,3),a=l=>{let c=l-s,u=Math.min(c/r,1),d=o(u);this.pan.x=n+(e-n)*d,this.pan.y=i+(t-i)*d,this.updateViewBox(),u<1?this.panAnimation=requestAnimationFrame(a):this.panAnimation=null};this.panAnimation=requestAnimationFrame(a)},updateTrackingButtonState(){this.updateControlColors()},createControls(){let e=document.createElement("div");e.className="absolute bottom-3 right-3 flex flex-col gap-1",e.id="graph-controls";let t="w-8 h-8 flex items-center justify-center rounded-md border transition-colors";e.innerHTML=`
<button id="zoom-in" class="${t}" title="Zoom in">
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM10.5 7.5v6m3-3h-6" />
</svg>
</button>
<button id="zoom-out" class="${t}" title="Zoom out">
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM13.5 10.5h-6" />
</svg>
</button>
<button id="reset-view" class="${t}" title="Reset view">
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path stroke-linecap="round" stroke-linejoin="round" d="M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25" />
</svg>
</button>
<button id="toggle-tracking" class="${t}" title="Track active node">
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path stroke-linecap="round" stroke-linejoin="round" d="M7.5 3.75H6A2.25 2.25 0 0 0 3.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0 1 20.25 6v1.5m0 9V18A2.25 2.25 0 0 1 18 20.25h-1.5m-9 0H6A2.25 2.25 0 0 1 3.75 18v-1.5M12 12m-3 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0" />
</svg>
</button>
<button id="toggle-direction" class="${t}" title="Toggle layout direction"></button>
`,this.el.style.position="relative",this.el.appendChild(e),this.updateControlColors(),e.querySelector("#zoom-in").addEventListener("click",()=>this.zoomIn()),e.querySelector("#zoom-out").addEventListener("click",()=>this.zoomOut()),e.querySelector("#reset-view").addEventListener("click",()=>this.resetView()),e.querySelector("#toggle-tracking").addEventListener("click",()=>this.toggleTracking()),e.querySelector("#toggle-direction").addEventListener("click",()=>this.toggleDirection()),this.updateDirectionIcon()},toggleDirection(){this.direction=this.direction==="LR"?"TB":"LR",this.needsInitialCenter=!0,this.updateDirectionIcon(),this.graphData&&this.render()},updateDirectionIcon(){let e=this.el.querySelector("#toggle-direction");if(!e)return;let t=this.direction==="LR"?`<svg class="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path stroke-linecap="round" stroke-linejoin="round" d="M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5" />
</svg>`:`<svg class="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path stroke-linecap="round" stroke-linejoin="round" d="M3 7.5 7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5" />
</svg>`;e.innerHTML=t,e.title=this.direction==="LR"?"Layout: left to right":"Layout: top to bottom"},updateTruncationWarning(e,t){let n=this.el.querySelector("#truncation-warning");if(n&&n.remove(),!e)return;let i=this.isDarkMode(),r=document.createElement("div");r.id="truncation-warning",r.className=`absolute top-3 left-3 right-3 px-3 py-2 rounded-md text-sm flex items-center gap-2 ${i?"bg-yellow-900/80 text-yellow-200 border border-yellow-700":"bg-yellow-50 text-yellow-800 border border-yellow-200"}`,r.innerHTML=`
<svg class="w-4 h-4 shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z" />
</svg>
<span>Showing first ${t} jobs. This workflow has more jobs than can be displayed.</span>
`,this.el.appendChild(r)},updateControlColors(){let e=this.el.querySelector("#graph-controls");if(!e)return;let t=this.isDarkMode(),n=t?"bg-gray-800":"bg-white",i=t?"border-gray-600":"border-gray-300",r=t?"text-gray-300":"text-gray-600",s=t?"hover:bg-gray-700":"hover:bg-gray-100";e.querySelectorAll("button").forEach(o=>{if(o.id==="toggle-tracking"&&this.trackActiveNode){let a=t?"bg-blue-900":"bg-blue-100",l=t?"border-blue-500":"border-blue-400",c=t?"text-blue-400":"text-blue-600";o.className=`w-8 h-8 flex items-center justify-center rounded-md border transition-colors cursor-pointer ${a} ${l} ${c}`}else o.className=`w-8 h-8 flex items-center justify-center rounded-md border transition-colors cursor-pointer ${n} ${i} ${r} ${s}`})}},Uw=$V;var WV={Completer:Ac,CronChart:$d,CronSparkline:$h,JobHistoryChart:Vd,JobsChart:Gd,HistoryBack:Xd,Instantiator:Kd,QueueDetailChart:Zd,QueueSparkline:Wh,Refresher:Jd,Relativize:Qd,Shortcuts:th,SidebarResizer:eh,Themer:Vh,TimelineConnectors:Hh,Tippy:Uh,WorkflowGraph:Uw},So;Mo.default.config({barColors:{0:"#0284c7"},shadowColor:"rgba(0, 0, 0, .3)"});window.addEventListener("phx:page-loading-start",e=>{So||(So=setTimeout(()=>Mo.default.show(),500))});window.addEventListener("phx:page-loading-stop",e=>{clearTimeout(So),So=void 0,Mo.default.hide()});window.addEventListener("phx:scroll-top",()=>{window.scrollTo({top:0,behavior:"instant"})});window.addEventListener("phx:copy-to-clipboard",e=>{let t=e.detail.text;if(navigator.clipboard)navigator.clipboard.writeText(t);else{let n=document.createElement("textarea");n.value=t,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.focus(),n.select();try{document.execCommand("copy")}finally{document.body.removeChild(n)}}});var VV=document.querySelector("meta[name='csrf-token']").getAttribute("content"),HV=document.querySelector("meta[name='live-transport']").getAttribute("content"),UV=document.querySelector("meta[name='live-path']").getAttribute("content"),YV=new LiveView.LiveSocket(UV,Phoenix.Socket,{transport:HV==="longpoll"?Phoenix.LongPoll:WebSocket,params:{_csrf_token:VV,init_state:Tc()},hooks:WV});YV.connect();})();
/*!
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
*/
/*!
* Chart.js v4.4.7
* https://www.chartjs.org
* (c) 2024 Chart.js Contributors
* Released under the MIT License
*/
/**
* @license MIT
* topbar 1.0.0, 2021-01-06
* http://buunguyen.github.io/topbar
* Copyright (c) 2021 Buu Nguyen
*/