pangea-lib 2.11.749 → 2.11.751
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs.js +1 -1
- package/dist/main.css +1 -1
- package/dist/main.es.js +3 -3
- package/package.json +1 -1
package/dist/main.cjs.js
CHANGED
|
@@ -791,7 +791,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
791
791
|
* Released under the MIT License
|
|
792
792
|
*/class dY{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,a,r,c){const n=a.listeners[c],i=a.duration;n.forEach(s=>s({chart:t,initial:a.initial,numSteps:i,currentStep:Math.min(r-a.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=Ag.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let a=0;this._charts.forEach((r,c)=>{if(!r.running||!r.items.length)return;const n=r.items;let i=n.length-1,s=!1,l;for(;i>=0;--i)l=n[i],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(n[i]=n[n.length-1],n.pop());s&&(c.draw(),this._notify(c,r,t,"progress")),n.length||(r.running=!1,this._notify(c,r,t,"complete"),r.initial=!1),a+=n.length}),this._lastDate=t,a===0&&(this._running=!1)}_getAnims(t){const a=this._charts;let r=a.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},a.set(t,r)),r}listen(t,a,r){this._getAnims(t).listeners[a].push(r)}add(t,a){!a||!a.length||this._getAnims(t).items.push(...a)}has(t){return this._getAnims(t).items.length>0}start(t){const a=this._charts.get(t);a&&(a.running=!0,a.start=Date.now(),a.duration=a.items.reduce((r,c)=>Math.max(r,c._duration),0),this._refresh())}running(t){if(!this._running)return!1;const a=this._charts.get(t);return!(!a||!a.running||!a.items.length)}stop(t){const a=this._charts.get(t);if(!a||!a.items.length)return;const r=a.items;let c=r.length-1;for(;c>=0;--c)r[c].cancel();a.items=[],this._notify(t,a,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Pe=new dY;const xu="transparent",mY={boolean(e,t,a){return a>.5?t:e},color(e,t,a){const r=ou(e||xu),c=r.valid&&ou(t||xu);return c&&c.valid?c.mix(r,a).hexString():t},number(e,t,a){return e+(t-e)*a}};class pY{constructor(t,a,r,c){const n=a[r];c=vt([t.to,c,n,t.from]);const i=vt([t.from,n,c]);this._active=!0,this._fn=t.fn||mY[t.type||typeof i],this._easing=Dt[t.easing]||Dt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=a,this._prop=r,this._from=i,this._to=c,this._promises=void 0}active(){return this._active}update(t,a,r){if(this._active){this._notify(!1);const c=this._target[this._prop],n=r-this._start,i=this._duration-n;this._start=r,this._duration=Math.floor(Math.max(i,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=vt([t.to,a,c,t.from]),this._from=vt([t.from,c,a])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const a=t-this._start,r=this._duration,c=this._prop,n=this._from,i=this._loop,s=this._to;let l;if(this._active=n!==s&&(i||a<r),!this._active){this._target[c]=s,this._notify(!0);return}if(a<0){this._target[c]=n;return}l=a/r%2,l=i&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[c]=this._fn(n,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((a,r)=>{t.push({res:a,rej:r})})}_notify(t){const a=t?"res":"rej",r=this._promises||[];for(let c=0;c<r.length;c++)r[c][a]()}}class Xg{constructor(t,a){this._chart=t,this._properties=new Map,this.configure(a)}configure(t){if(!r2(t))return;const a=Object.keys(D2.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(c=>{const n=t[c];if(!r2(n))return;const i={};for(const s of a)i[s]=n[s];(k2(n.properties)&&n.properties||[c]).forEach(s=>{(s===c||!r.has(s))&&r.set(s,i)})})}_animateOptions(t,a){const r=a.options,c=gY(t,r);if(!c)return[];const n=this._createAnimations(c,r);return r.$shared&&vY(t.options.$animations,r).then(()=>{t.options=r},()=>{}),n}_createAnimations(t,a){const r=this._properties,c=[],n=t.$animations||(t.$animations={}),i=Object.keys(a),s=Date.now();let l;for(l=i.length-1;l>=0;--l){const f=i[l];if(f.charAt(0)==="$")continue;if(f==="options"){c.push(...this._animateOptions(t,a));continue}const u=a[f];let h=n[f];const d=r.get(f);if(h)if(d&&h.active()){h.update(d,u,s);continue}else h.cancel();if(!d||!d.duration){t[f]=u;continue}n[f]=h=new pY(d,t,f,u),c.push(h)}return c}update(t,a){if(this._properties.size===0){Object.assign(t,a);return}const r=this._createAnimations(t,a);if(r.length)return Pe.add(this._chart,r),!0}}function vY(e,t){const a=[],r=Object.keys(t);for(let c=0;c<r.length;c++){const n=e[r[c]];n&&n.active()&&a.push(n.wait())}return Promise.all(a)}function gY(e,t){if(!t)return;let a=e.options;if(!a){e.options=t;return}return a.$shared&&(e.options=a=Object.assign({},a,{$shared:!1,$animations:{}})),a}function Cu(e,t){const a=e&&e.options||{},r=a.reverse,c=a.min===void 0?t:0,n=a.max===void 0?t:0;return{start:r?n:c,end:r?c:n}}function xY(e,t,a){if(a===!1)return!1;const r=Cu(e,a),c=Cu(t,a);return{top:c.end,right:r.end,bottom:c.start,left:r.start}}function CY(e){let t,a,r,c;return r2(e)?(t=e.top,a=e.right,r=e.bottom,c=e.left):t=a=r=c=e,{top:t,right:a,bottom:r,left:c,disabled:e===!1}}function Zg(e,t){const a=[],r=e._getSortedDatasetMetas(t);let c,n;for(c=0,n=r.length;c<n;++c)a.push(r[c].index);return a}function zu(e,t,a,r={}){const c=e.keys,n=r.mode==="single";let i,s,l,f;if(t===null)return;let u=!1;for(i=0,s=c.length;i<s;++i){if(l=+c[i],l===a){if(u=!0,r.all)continue;break}f=e.values[l],q2(f)&&(n||t===0||be(t)===be(f))&&(t+=f)}return!u&&!r.all?0:t}function zY(e,t){const{iScale:a,vScale:r}=t,c=a.axis==="x"?"x":"y",n=r.axis==="x"?"x":"y",i=Object.keys(e),s=new Array(i.length);let l,f,u;for(l=0,f=i.length;l<f;++l)u=i[l],s[l]={[c]:u,[n]:e[u]};return s}function sn(e,t){const a=e&&e.options.stacked;return a||a===void 0&&t.stack!==void 0}function MY(e,t,a){return`${e.id}.${t.id}.${a.stack||a.type}`}function yY(e){const{min:t,max:a,minDefined:r,maxDefined:c}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:c?a:Number.POSITIVE_INFINITY}}function bY(e,t,a){const r=e[t]||(e[t]={});return r[a]||(r[a]={})}function Mu(e,t,a,r){for(const c of t.getMatchingVisibleMetas(r).reverse()){const n=e[c.index];if(a&&n>0||!a&&n<0)return c.index}return null}function yu(e,t){const{chart:a,_cachedMeta:r}=e,c=a._stacks||(a._stacks={}),{iScale:n,vScale:i,index:s}=r,l=n.axis,f=i.axis,u=MY(n,i,r),h=t.length;let d;for(let m=0;m<h;++m){const p=t[m],{[l]:v,[f]:g}=p,x=p._stacks||(p._stacks={});d=x[f]=bY(c,u,v),d[s]=g,d._top=Mu(d,i,!0,r.type),d._bottom=Mu(d,i,!1,r.type);const z=d._visualValues||(d._visualValues={});z[s]=g}}function on(e,t){const a=e.scales;return Object.keys(a).filter(r=>a[r].axis===t).shift()}function HY(e,t){return K0(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function VY(e,t,a){return K0(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:a,index:t,mode:"default",type:"data"})}function nt(e,t){const a=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const c of t){const n=c._stacks;if(!n||n[r]===void 0||n[r][a]===void 0)return;delete n[r][a],n[r]._visualValues!==void 0&&n[r]._visualValues[a]!==void 0&&delete n[r]._visualValues[a]}}}const ln=e=>e==="reset"||e==="none",bu=(e,t)=>t?e:Object.assign({},e),wY=(e,t,a)=>e&&!t.hidden&&t._stacked&&{keys:Zg(a,!0),values:null};class q4{constructor(t,a){this.chart=t,this._ctx=t.ctx,this.index=a,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(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=sn(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&&nt(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,a=this._cachedMeta,r=this.getDataset(),c=(h,d,m,p)=>h==="x"?d:h==="r"?p:m,n=a.xAxisID=q1(r.xAxisID,on(t,"x")),i=a.yAxisID=q1(r.yAxisID,on(t,"y")),s=a.rAxisID=q1(r.rAxisID,on(t,"r")),l=a.indexAxis,f=a.iAxisID=c(l,n,i,s),u=a.vAxisID=c(l,i,n,s);a.xScale=this.getScaleForId(n),a.yScale=this.getScaleForId(i),a.rScale=this.getScaleForId(s),a.iScale=this.getScaleForId(f),a.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){const a=this._cachedMeta;return t===a.iScale?a.vScale:a.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&nu(this._data,this),t._stacked&&nt(t)}_dataCheck(){const t=this.getDataset(),a=t.data||(t.data=[]),r=this._data;if(r2(a)){const c=this._cachedMeta;this._data=zY(a,c)}else if(r!==a){if(r){nu(r,this);const c=this._cachedMeta;nt(c),c._parsed=[]}a&&Object.isExtensible(a)&&uW(a,this),this._syncList=[],this._data=a}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const a=this._cachedMeta,r=this.getDataset();let c=!1;this._dataCheck();const n=a._stacked;a._stacked=sn(a.vScale,a),a.stack!==r.stack&&(c=!0,nt(a),a.stack=r.stack),this._resyncElements(t),(c||n!==a._stacked)&&(yu(this,a._parsed),a._stacked=sn(a.vScale,a))}configure(){const t=this.chart.config,a=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),a,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,a){const{_cachedMeta:r,_data:c}=this,{iScale:n,_stacked:i}=r,s=n.axis;let l=t===0&&a===c.length?!0:r._sorted,f=t>0&&r._parsed[t-1],u,h,d;if(this._parsing===!1)r._parsed=c,r._sorted=!0,d=c;else{k2(c[t])?d=this.parseArrayData(r,c,t,a):r2(c[t])?d=this.parseObjectData(r,c,t,a):d=this.parsePrimitiveData(r,c,t,a);const m=()=>h[s]===null||f&&h[s]<f[s];for(u=0;u<a;++u)r._parsed[u+t]=h=d[u],l&&(m()&&(l=!1),f=h);r._sorted=l}i&&yu(this,d)}parsePrimitiveData(t,a,r,c){const{iScale:n,vScale:i}=t,s=n.axis,l=i.axis,f=n.getLabels(),u=n===i,h=new Array(c);let d,m,p;for(d=0,m=c;d<m;++d)p=d+r,h[d]={[s]:u||n.parse(f[p],p),[l]:i.parse(a[p],p)};return h}parseArrayData(t,a,r,c){const{xScale:n,yScale:i}=t,s=new Array(c);let l,f,u,h;for(l=0,f=c;l<f;++l)u=l+r,h=a[u],s[l]={x:n.parse(h[0],u),y:i.parse(h[1],u)};return s}parseObjectData(t,a,r,c){const{xScale:n,yScale:i}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,f=new Array(c);let u,h,d,m;for(u=0,h=c;u<h;++u)d=u+r,m=a[d],f[u]={x:n.parse(Y0(m,s),d),y:i.parse(Y0(m,l),d)};return f}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,a,r){const c=this.chart,n=this._cachedMeta,i=a[t.axis],s={keys:Zg(c,!0),values:a._stacks[t.axis]._visualValues};return zu(s,i,n.index,{mode:r})}updateRangeFromParsed(t,a,r,c){const n=r[a.axis];let i=n===null?NaN:n;const s=c&&r._stacks[a.axis];c&&s&&(c.values=s,i=zu(c,n,this._cachedMeta.index)),t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}getMinMax(t,a){const r=this._cachedMeta,c=r._parsed,n=r._sorted&&t===r.iScale,i=c.length,s=this._getOtherScale(t),l=wY(a,r,this.chart),f={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:h}=yY(s);let d,m;function p(){m=c[d];const v=m[s.axis];return!q2(m[t.axis])||u>v||h<v}for(d=0;d<i&&!(!p()&&(this.updateRangeFromParsed(f,t,m,l),n));++d);if(n){for(d=i-1;d>=0;--d)if(!p()){this.updateRangeFromParsed(f,t,m,l);break}}return f}getAllParsedValues(t){const a=this._cachedMeta._parsed,r=[];let c,n,i;for(c=0,n=a.length;c<n;++c)i=a[c][t.axis],q2(i)&&r.push(i);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const a=this._cachedMeta,r=a.iScale,c=a.vScale,n=this.getParsed(t);return{label:r?""+r.getLabelForValue(n[r.axis]):"",value:c?""+c.getLabelForValue(n[c.axis]):""}}_update(t){const a=this._cachedMeta;this.update(t||"default"),a._clip=CY(q1(this.options.clip,xY(a.xScale,a.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,a=this.chart,r=this._cachedMeta,c=r.data||[],n=a.chartArea,i=[],s=this._drawStart||0,l=this._drawCount||c.length-s,f=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,n,s,l),u=s;u<s+l;++u){const h=c[u];h.hidden||(h.active&&f?i.push(h):h.draw(t,n))}for(u=0;u<i.length;++u)i[u].draw(t,n)}getStyle(t,a){const r=a?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,a,r){const c=this.getDataset();let n;if(t>=0&&t<this._cachedMeta.data.length){const i=this._cachedMeta.data[t];n=i.$context||(i.$context=VY(this.getContext(),t,i)),n.parsed=this.getParsed(t),n.raw=c.data[t],n.index=n.dataIndex=t}else n=this.$context||(this.$context=HY(this.chart.getContext(),this.index)),n.dataset=c,n.index=n.datasetIndex=this.index;return n.active=!!a,n.mode=r,n}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,a){return this._resolveElementOptions(this.dataElementType.id,a,t)}_resolveElementOptions(t,a="default",r){const c=a==="active",n=this._cachedDataOpts,i=t+"-"+a,s=n[i],l=this.enableOptionSharing&&p5(r);if(s)return bu(s,l);const f=this.chart.config,u=f.datasetElementScopeKeys(this._type,t),h=c?[`${t}Hover`,"hover",t,""]:[t,""],d=f.getOptionScopes(this.getDataset(),u),m=Object.keys(D2.elements[t]),p=()=>this.getContext(r,c,a),v=f.resolveNamedOptions(d,m,p,h);return v.$shared&&(v.$shared=l,n[i]=Object.freeze(bu(v,l))),v}_resolveAnimations(t,a,r){const c=this.chart,n=this._cachedDataOpts,i=`animation-${a}`,s=n[i];if(s)return s;let l;if(c.options.animation!==!1){const u=this.chart.config,h=u.datasetAnimationScopeKeys(this._type,a),d=u.getOptionScopes(this.getDataset(),h);l=u.createResolver(d,this.getContext(t,r,a))}const f=new Xg(c,l&&l.animations);return l&&l._cacheable&&(n[i]=Object.freeze(f)),f}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,a){return!a||ln(t)||this.chart._animationsDisabled}_getSharedOptions(t,a){const r=this.resolveDataElementOptions(t,a),c=this._sharedOptions,n=this.getSharedOptions(r),i=this.includeOptions(a,n)||n!==c;return this.updateSharedOptions(n,a,r),{sharedOptions:n,includeOptions:i}}updateElement(t,a,r,c){ln(c)?Object.assign(t,r):this._resolveAnimations(a,c).update(t,r)}updateSharedOptions(t,a,r){t&&!ln(a)&&this._resolveAnimations(void 0,a).update(t,r)}_setStyle(t,a,r,c){t.active=c;const n=this.getStyle(a,c);this._resolveAnimations(a,r,c).update(t,{options:!c&&this.getSharedOptions(n)||n})}removeHoverStyle(t,a,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,a,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const a=this._data,r=this._cachedMeta.data;for(const[s,l,f]of this._syncList)this[s](l,f);this._syncList=[];const c=r.length,n=a.length,i=Math.min(n,c);i&&this.parse(0,i),n>c?this._insertElements(c,n-c,t):n<c&&this._removeElements(n,c-n)}_insertElements(t,a,r=!0){const c=this._cachedMeta,n=c.data,i=t+a;let s;const l=f=>{for(f.length+=a,s=f.length-1;s>=i;s--)f[s]=f[s-a]};for(l(n),s=t;s<i;++s)n[s]=new this.dataElementType;this._parsing&&l(c._parsed),this.parse(t,a),r&&this.updateElements(n,t,a,"reset")}updateElements(t,a,r,c){}_removeElements(t,a){const r=this._cachedMeta;if(this._parsing){const c=r._parsed.splice(t,a);r._stacked&&nt(r,c)}r.data.splice(t,a)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[a,r,c]=t;this[a](r,c)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const 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,a){a&&this._sync(["_removeElements",t,a]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}o1(q4,"defaults",{}),o1(q4,"datasetElementType",null),o1(q4,"dataElementType",null);function _Y(e,t){if(!e._cache.$bar){const a=e.getMatchingVisibleMetas(t);let r=[];for(let c=0,n=a.length;c<n;c++)r=r.concat(a[c].controller.getAllParsedValues(e));e._cache.$bar=Sg(r.sort((c,n)=>c-n))}return e._cache.$bar}function kY(e){const t=e.iScale,a=_Y(t,e.type);let r=t._length,c,n,i,s;const l=()=>{i===32767||i===-32768||(p5(s)&&(r=Math.min(r,Math.abs(i-s)||r)),s=i)};for(c=0,n=a.length;c<n;++c)i=t.getPixelForValue(a[c]),l();for(s=void 0,c=0,n=t.ticks.length;c<n;++c)i=t.getPixelForTick(c),l();return r}function LY(e,t,a,r){const c=a.barThickness;let n,i;return l2(c)?(n=t.min*a.categoryPercentage,i=a.barPercentage):(n=c*r,i=1),{chunk:n/r,ratio:i,start:t.pixels[e]-n/2}}function SY(e,t,a,r){const c=t.pixels,n=c[e];let i=e>0?c[e-1]:null,s=e<c.length-1?c[e+1]:null;const l=a.categoryPercentage;i===null&&(i=n-(s===null?t.end-t.start:s-n)),s===null&&(s=n+n-i);const f=n-(n-Math.min(i,s))/2*l;return{chunk:Math.abs(s-i)/2*l/r,ratio:a.barPercentage,start:f}}function AY(e,t,a,r){const c=a.parse(e[0],r),n=a.parse(e[1],r),i=Math.min(c,n),s=Math.max(c,n);let l=i,f=s;Math.abs(i)>Math.abs(s)&&(l=s,f=i),t[a.axis]=f,t._custom={barStart:l,barEnd:f,start:c,end:n,min:i,max:s}}function Qg(e,t,a,r){return k2(e)?AY(e,t,a,r):t[a.axis]=a.parse(e,r),t}function Hu(e,t,a,r){const c=e.iScale,n=e.vScale,i=c.getLabels(),s=c===n,l=[];let f,u,h,d;for(f=a,u=a+r;f<u;++f)d=t[f],h={},h[c.axis]=s||c.parse(i[f],f),l.push(Qg(d,h,n,f));return l}function fn(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function TY(e,t,a){return e!==0?be(e):(t.isHorizontal()?1:-1)*(t.min>=a?1:-1)}function NY(e){let t,a,r,c,n;return e.horizontal?(t=e.base>e.x,a="left",r="right"):(t=e.base<e.y,a="bottom",r="top"),t?(c="end",n="start"):(c="start",n="end"),{start:a,end:r,reverse:t,top:c,bottom:n}}function EY(e,t,a,r){let c=t.borderSkipped;const n={};if(!c){e.borderSkipped=n;return}if(c===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:i,end:s,reverse:l,top:f,bottom:u}=NY(e);c==="middle"&&a&&(e.enableBorderRadius=!0,(a._top||0)===r?c=f:(a._bottom||0)===r?c=u:(n[Vu(u,i,s,l)]=!0,c=f)),n[Vu(c,i,s,l)]=!0,e.borderSkipped=n}function Vu(e,t,a,r){return r?(e=PY(e,t,a),e=wu(e,a,t)):e=wu(e,t,a),e}function PY(e,t,a){return e===t?a:e===a?t:e}function wu(e,t,a){return e==="start"?t:e==="end"?a:e}function FY(e,{inflateAmount:t},a){e.inflateAmount=t==="auto"?a===1?.33:0:t}class f7 extends q4{parsePrimitiveData(t,a,r,c){return Hu(t,a,r,c)}parseArrayData(t,a,r,c){return Hu(t,a,r,c)}parseObjectData(t,a,r,c){const{iScale:n,vScale:i}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,f=n.axis==="x"?s:l,u=i.axis==="x"?s:l,h=[];let d,m,p,v;for(d=r,m=r+c;d<m;++d)v=a[d],p={},p[n.axis]=n.parse(Y0(v,f),d),h.push(Qg(Y0(v,u),p,i,d));return h}updateRangeFromParsed(t,a,r,c){super.updateRangeFromParsed(t,a,r,c);const n=r._custom;n&&a===this._cachedMeta.vScale&&(t.min=Math.min(t.min,n.min),t.max=Math.max(t.max,n.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const a=this._cachedMeta,{iScale:r,vScale:c}=a,n=this.getParsed(t),i=n._custom,s=fn(i)?"["+i.start+", "+i.end+"]":""+c.getLabelForValue(n[c.axis]);return{label:""+r.getLabelForValue(n[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const a=this._cachedMeta;this.updateElements(a.data,0,a.data.length,t)}updateElements(t,a,r,c){const n=c==="reset",{index:i,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),f=s.isHorizontal(),u=this._getRuler(),{sharedOptions:h,includeOptions:d}=this._getSharedOptions(a,c);for(let m=a;m<a+r;m++){const p=this.getParsed(m),v=n||l2(p[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(m),g=this._calculateBarIndexPixels(m,u),x=(p._stacks||{})[s.axis],z={horizontal:f,base:v.base,enableBorderRadius:!x||fn(p._custom)||i===x._top||i===x._bottom,x:f?v.head:g.center,y:f?g.center:v.head,height:f?g.size:Math.abs(v.size),width:f?Math.abs(v.size):g.size};d&&(z.options=h||this.resolveDataElementOptions(m,t[m].active?"active":c));const C=z.options||t[m].options;EY(z,C,x,i),FY(z,C,u.ratio),this.updateElement(t[m],m,z,c)}}_getStacks(t,a){const{iScale:r}=this._cachedMeta,c=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),n=r.options.stacked,i=[],s=this._cachedMeta.controller.getParsed(a),l=s&&s[r.axis],f=u=>{const h=u._parsed.find(m=>m[r.axis]===l),d=h&&h[u.vScale.axis];if(l2(d)||isNaN(d))return!0};for(const u of c)if(!(a!==void 0&&f(u))&&((n===!1||i.indexOf(u.stack)===-1||n===void 0&&u.stack===void 0)&&i.push(u.stack),u.index===t))break;return i.length||i.push(void 0),i}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,a,r){const c=this._getStacks(t,r),n=a!==void 0?c.indexOf(a):-1;return n===-1?c.length-1:n}_getRuler(){const t=this.options,a=this._cachedMeta,r=a.iScale,c=[];let n,i;for(n=0,i=a.data.length;n<i;++n)c.push(r.getPixelForValue(this.getParsed(n)[r.axis],n));const s=t.barThickness;return{min:s||kY(a),pixels:c,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:a,_stacked:r,index:c},options:{base:n,minBarLength:i}}=this,s=n||0,l=this.getParsed(t),f=l._custom,u=fn(f);let h=l[a.axis],d=0,m=r?this.applyStack(a,l,r):h,p,v;m!==h&&(d=m-h,m=h),u&&(h=f.barStart,m=f.barEnd-f.barStart,h!==0&&be(h)!==be(f.barEnd)&&(d=0),d+=h);const g=!l2(n)&&!u?n:d;let x=a.getPixelForValue(g);if(this.chart.getDataVisibility(t)?p=a.getPixelForValue(d+m):p=x,v=p-x,Math.abs(v)<i){v=TY(v,a,s)*i,h===s&&(x-=v/2);const z=a.getPixelForDecimal(0),C=a.getPixelForDecimal(1),b=Math.min(z,C),H=Math.max(z,C);x=Math.max(Math.min(x,H),b),p=x+v,r&&!u&&(l._stacks[a.axis]._visualValues[c]=a.getValueForPixel(p)-a.getValueForPixel(x))}if(x===a.getPixelForValue(s)){const z=be(v)*a.getLineWidthForValue(s)/2;x+=z,v-=z}return{size:v,base:x,head:p,center:p+v/2}}_calculateBarIndexPixels(t,a){const r=a.scale,c=this.options,n=c.skipNull,i=q1(c.maxBarThickness,1/0);let s,l;if(a.grouped){const f=n?this._getStackCount(t):a.stackCount,u=c.barThickness==="flex"?SY(t,a,c,f):LY(t,a,c,f),h=this._getStackIndex(this.index,this._cachedMeta.stack,n?t:void 0);s=u.start+u.chunk*h+u.chunk/2,l=Math.min(i,u.chunk*u.ratio)}else s=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(i,a.min*a.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,a=t.vScale,r=t.data,c=r.length;let n=0;for(;n<c;++n)this.getParsed(n)[a.axis]!==null&&!r[n].hidden&&r[n].draw(this._ctx)}}o1(f7,"id","bar"),o1(f7,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),o1(f7,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class u7 extends q4{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,a,r,c){const n=super.parsePrimitiveData(t,a,r,c);for(let i=0;i<n.length;i++)n[i]._custom=this.resolveDataElementOptions(i+r).radius;return n}parseArrayData(t,a,r,c){const n=super.parseArrayData(t,a,r,c);for(let i=0;i<n.length;i++){const s=a[r+i];n[i]._custom=q1(s[2],this.resolveDataElementOptions(i+r).radius)}return n}parseObjectData(t,a,r,c){const n=super.parseObjectData(t,a,r,c);for(let i=0;i<n.length;i++){const s=a[r+i];n[i]._custom=q1(s&&s.r&&+s.r,this.resolveDataElementOptions(i+r).radius)}return n}getMaxOverflow(){const t=this._cachedMeta.data;let a=0;for(let r=t.length-1;r>=0;--r)a=Math.max(a,t[r].size(this.resolveDataElementOptions(r))/2);return a>0&&a}getLabelAndValue(t){const a=this._cachedMeta,r=this.chart.data.labels||[],{xScale:c,yScale:n}=a,i=this.getParsed(t),s=c.getLabelForValue(i.x),l=n.getLabelForValue(i.y),f=i._custom;return{label:r[t]||"",value:"("+s+", "+l+(f?", "+f:"")+")"}}update(t){const a=this._cachedMeta.data;this.updateElements(a,0,a.length,t)}updateElements(t,a,r,c){const n=c==="reset",{iScale:i,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:f}=this._getSharedOptions(a,c),u=i.axis,h=s.axis;for(let d=a;d<a+r;d++){const m=t[d],p=!n&&this.getParsed(d),v={},g=v[u]=n?i.getPixelForDecimal(.5):i.getPixelForValue(p[u]),x=v[h]=n?s.getBasePixel():s.getPixelForValue(p[h]);v.skip=isNaN(g)||isNaN(x),f&&(v.options=l||this.resolveDataElementOptions(d,m.active?"active":c),n&&(v.options.radius=0)),this.updateElement(m,d,v,c)}}resolveDataElementOptions(t,a){const r=this.getParsed(t);let c=super.resolveDataElementOptions(t,a);c.$shared&&(c=Object.assign({},c,{$shared:!1}));const n=c.radius;return a!=="active"&&(c.radius=0),c.radius+=q1(r&&r._custom,n),c}}o1(u7,"id","bubble"),o1(u7,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),o1(u7,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function DY(e,t,a){let r=1,c=1,n=0,i=0;if(t<S2){const s=e,l=s+t,f=Math.cos(s),u=Math.sin(s),h=Math.cos(l),d=Math.sin(l),m=(C,b,H)=>v5(C,s,l,!0)?1:Math.max(b,b*a,H,H*a),p=(C,b,H)=>v5(C,s,l,!0)?-1:Math.min(b,b*a,H,H*a),v=m(0,f,h),g=m(i3,u,d),x=p(A2,f,h),z=p(A2+i3,u,d);r=(v-x)/2,c=(g-z)/2,n=-(v+x)/2,i=-(g+z)/2}return{ratioX:r,ratioY:c,offsetX:n,offsetY:i}}class z6 extends q4{constructor(t,a){super(t,a),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,a){const r=this.getDataset().data,c=this._cachedMeta;if(this._parsing===!1)c._parsed=r;else{let n=l=>+r[l];if(r2(r[t])){const{key:l="value"}=this._parsing;n=f=>+Y0(r[f],l)}let i,s;for(i=t,s=t+a;i<s;++i)c._parsed[i]=n(i)}}_getRotation(){return $4(this.options.rotation-90)}_getCircumference(){return $4(this.options.circumference)}_getRotationExtents(){let t=S2,a=-S2;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const c=this.chart.getDatasetMeta(r).controller,n=c._getRotation(),i=c._getCircumference();t=Math.min(t,n),a=Math.max(a,n+i)}return{rotation:t,circumference:a-t}}update(t){const a=this.chart,{chartArea:r}=a,c=this._cachedMeta,n=c.data,i=this.getMaxBorderWidth()+this.getMaxOffset(n)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-i)/2,0),l=Math.min(QU(this.options.cutout,s),1),f=this._getRingWeight(this.index),{circumference:u,rotation:h}=this._getRotationExtents(),{ratioX:d,ratioY:m,offsetX:p,offsetY:v}=DY(h,u,l),g=(r.width-i)/d,x=(r.height-i)/m,z=Math.max(Math.min(g,x)/2,0),C=Vg(this.options.radius,z),b=Math.max(C*l,0),H=(C-b)/this._getVisibleDatasetWeightTotal();this.offsetX=p*C,this.offsetY=v*C,c.total=this.calculateTotal(),this.outerRadius=C-H*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-H*f,0),this.updateElements(n,0,n.length,t)}_circumference(t,a){const r=this.options,c=this._cachedMeta,n=this._getCircumference();return a&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||c._parsed[t]===null||c.data[t].hidden?0:this.calculateCircumference(c._parsed[t]*n/S2)}updateElements(t,a,r,c){const n=c==="reset",i=this.chart,s=i.chartArea,f=i.options.animation,u=(s.left+s.right)/2,h=(s.top+s.bottom)/2,d=n&&f.animateScale,m=d?0:this.innerRadius,p=d?0:this.outerRadius,{sharedOptions:v,includeOptions:g}=this._getSharedOptions(a,c);let x=this._getRotation(),z;for(z=0;z<a;++z)x+=this._circumference(z,n);for(z=a;z<a+r;++z){const C=this._circumference(z,n),b=t[z],H={x:u+this.offsetX,y:h+this.offsetY,startAngle:x,endAngle:x+C,circumference:C,outerRadius:p,innerRadius:m};g&&(H.options=v||this.resolveDataElementOptions(z,b.active?"active":c)),x+=C,this.updateElement(b,z,H,c)}}calculateTotal(){const t=this._cachedMeta,a=t.data;let r=0,c;for(c=0;c<a.length;c++){const n=t._parsed[c];n!==null&&!isNaN(n)&&this.chart.getDataVisibility(c)&&!a[c].hidden&&(r+=Math.abs(n))}return r}calculateCircumference(t){const a=this._cachedMeta.total;return a>0&&!isNaN(t)?S2*(Math.abs(t)/a):0}getLabelAndValue(t){const a=this._cachedMeta,r=this.chart,c=r.data.labels||[],n=Q5(a._parsed[t],r.options.locale);return{label:c[t]||"",value:n}}getMaxBorderWidth(t){let a=0;const r=this.chart;let c,n,i,s,l;if(!t){for(c=0,n=r.data.datasets.length;c<n;++c)if(r.isDatasetVisible(c)){i=r.getDatasetMeta(c),t=i.data,s=i.controller;break}}if(!t)return 0;for(c=0,n=t.length;c<n;++c)l=s.resolveDataElementOptions(c),l.borderAlign!=="inner"&&(a=Math.max(a,l.borderWidth||0,l.hoverBorderWidth||0));return a}getMaxOffset(t){let a=0;for(let r=0,c=t.length;r<c;++r){const n=this.resolveDataElementOptions(r);a=Math.max(a,n.offset||0,n.hoverOffset||0)}return a}_getRingWeightOffset(t){let a=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(a+=this._getRingWeight(r));return a}_getRingWeight(t){return Math.max(q1(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}o1(z6,"id","doughnut"),o1(z6,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),o1(z6,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),o1(z6,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const a=t.data;if(a.labels.length&&a.datasets.length){const{labels:{pointStyle:r,color:c}}=t.legend.options;return a.labels.map((n,i)=>{const l=t.getDatasetMeta(0).controller.getStyle(i);return{text:n,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:c,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(i),index:i}})}return[]}},onClick(t,a,r){r.chart.toggleDataVisibility(a.index),r.chart.update()}}}});class h7 extends q4{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const a=this._cachedMeta,{dataset:r,data:c=[],_dataset:n}=a,i=this.chart._animationsDisabled;let{start:s,count:l}=Ng(a,c,i);this._drawStart=s,this._drawCount=l,Eg(a)&&(s=0,l=c.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!n._decimated,r.points=c;const f=this.resolveDatasetElementOptions(t);this.options.showLine||(f.borderWidth=0),f.segment=this.options.segment,this.updateElement(r,void 0,{animated:!i,options:f},t),this.updateElements(c,s,l,t)}updateElements(t,a,r,c){const n=c==="reset",{iScale:i,vScale:s,_stacked:l,_dataset:f}=this._cachedMeta,{sharedOptions:u,includeOptions:h}=this._getSharedOptions(a,c),d=i.axis,m=s.axis,{spanGaps:p,segment:v}=this.options,g=N8(p)?p:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||n||c==="none",z=a+r,C=t.length;let b=a>0&&this.getParsed(a-1);for(let H=0;H<C;++H){const V=t[H],y=x?V:{};if(H<a||H>=z){y.skip=!0;continue}const A=this.getParsed(H),E=l2(A[m]),Y=y[d]=i.getPixelForValue(A[d],H),F=y[m]=n||E?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,A,l):A[m],H);y.skip=isNaN(Y)||isNaN(F)||E,y.stop=H>0&&Math.abs(A[d]-b[d])>g,v&&(y.parsed=A,y.raw=f.data[H]),h&&(y.options=u||this.resolveDataElementOptions(H,V.active?"active":c)),x||this.updateElement(V,H,y,c),b=A}}getMaxOverflow(){const t=this._cachedMeta,a=t.dataset,r=a.options&&a.options.borderWidth||0,c=t.data||[];if(!c.length)return r;const n=c[0].size(this.resolveDataElementOptions(0)),i=c[c.length-1].size(this.resolveDataElementOptions(c.length-1));return Math.max(r,n,i)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}o1(h7,"id","line"),o1(h7,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),o1(h7,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ot extends q4{constructor(t,a){super(t,a),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const a=this._cachedMeta,r=this.chart,c=r.data.labels||[],n=Q5(a._parsed[t].r,r.options.locale);return{label:c[t]||"",value:n}}parseObjectData(t,a,r,c){return $g.bind(this)(t,a,r,c)}update(t){const a=this._cachedMeta.data;this._updateRadius(),this.updateElements(a,0,a.length,t)}getMinMax(){const t=this._cachedMeta,a={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,c)=>{const n=this.getParsed(c).r;!isNaN(n)&&this.chart.getDataVisibility(c)&&(n<a.min&&(a.min=n),n>a.max&&(a.max=n))}),a}_updateRadius(){const t=this.chart,a=t.chartArea,r=t.options,c=Math.min(a.right-a.left,a.bottom-a.top),n=Math.max(c/2,0),i=Math.max(r.cutoutPercentage?n/100*r.cutoutPercentage:1,0),s=(n-i)/t.getVisibleDatasetCount();this.outerRadius=n-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,a,r,c){const n=c==="reset",i=this.chart,l=i.options.animation,f=this._cachedMeta.rScale,u=f.xCenter,h=f.yCenter,d=f.getIndexAngle(0)-.5*A2;let m=d,p;const v=360/this.countVisibleElements();for(p=0;p<a;++p)m+=this._computeAngle(p,c,v);for(p=a;p<a+r;p++){const g=t[p];let x=m,z=m+this._computeAngle(p,c,v),C=i.getDataVisibility(p)?f.getDistanceFromCenterForValue(this.getParsed(p).r):0;m=z,n&&(l.animateScale&&(C=0),l.animateRotate&&(x=z=d));const b={x:u,y:h,innerRadius:0,outerRadius:C,startAngle:x,endAngle:z,options:this.resolveDataElementOptions(p,g.active?"active":c)};this.updateElement(g,p,b,c)}}countVisibleElements(){const t=this._cachedMeta;let a=0;return t.data.forEach((r,c)=>{!isNaN(this.getParsed(c).r)&&this.chart.getDataVisibility(c)&&a++}),a}_computeAngle(t,a,r){return this.chart.getDataVisibility(t)?$4(this.resolveDataElementOptions(t,a).angle||r):0}}o1(Ot,"id","polarArea"),o1(Ot,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),o1(Ot,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const a=t.data;if(a.labels.length&&a.datasets.length){const{labels:{pointStyle:r,color:c}}=t.legend.options;return a.labels.map((n,i)=>{const l=t.getDatasetMeta(0).controller.getStyle(i);return{text:n,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:c,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(i),index:i}})}return[]}},onClick(t,a,r){r.chart.toggleDataVisibility(a.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Mi extends z6{}o1(Mi,"id","pie"),o1(Mi,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class d7 extends q4{getLabelAndValue(t){const a=this._cachedMeta.vScale,r=this.getParsed(t);return{label:a.getLabels()[t],value:""+a.getLabelForValue(r[a.axis])}}parseObjectData(t,a,r,c){return $g.bind(this)(t,a,r,c)}update(t){const a=this._cachedMeta,r=a.dataset,c=a.data||[],n=a.iScale.getLabels();if(r.points=c,t!=="resize"){const i=this.resolveDatasetElementOptions(t);this.options.showLine||(i.borderWidth=0);const s={_loop:!0,_fullLoop:n.length===c.length,options:i};this.updateElement(r,void 0,s,t)}this.updateElements(c,0,c.length,t)}updateElements(t,a,r,c){const n=this._cachedMeta.rScale,i=c==="reset";for(let s=a;s<a+r;s++){const l=t[s],f=this.resolveDataElementOptions(s,l.active?"active":c),u=n.getPointPositionForValue(s,this.getParsed(s).r),h=i?n.xCenter:u.x,d=i?n.yCenter:u.y,m={x:h,y:d,angle:u.angle,skip:isNaN(h)||isNaN(d),options:f};this.updateElement(l,s,m,c)}}}o1(d7,"id","radar"),o1(d7,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),o1(d7,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class m7 extends q4{getLabelAndValue(t){const a=this._cachedMeta,r=this.chart.data.labels||[],{xScale:c,yScale:n}=a,i=this.getParsed(t),s=c.getLabelForValue(i.x),l=n.getLabelForValue(i.y);return{label:r[t]||"",value:"("+s+", "+l+")"}}update(t){const a=this._cachedMeta,{data:r=[]}=a,c=this.chart._animationsDisabled;let{start:n,count:i}=Ng(a,r,c);if(this._drawStart=n,this._drawCount=i,Eg(a)&&(n=0,i=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:s,_dataset:l}=a;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=r;const f=this.resolveDatasetElementOptions(t);f.segment=this.options.segment,this.updateElement(s,void 0,{animated:!c,options:f},t)}else this.datasetElementType&&(delete a.dataset,this.datasetElementType=!1);this.updateElements(r,n,i,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,a,r,c){const n=c==="reset",{iScale:i,vScale:s,_stacked:l,_dataset:f}=this._cachedMeta,u=this.resolveDataElementOptions(a,c),h=this.getSharedOptions(u),d=this.includeOptions(c,h),m=i.axis,p=s.axis,{spanGaps:v,segment:g}=this.options,x=N8(v)?v:Number.POSITIVE_INFINITY,z=this.chart._animationsDisabled||n||c==="none";let C=a>0&&this.getParsed(a-1);for(let b=a;b<a+r;++b){const H=t[b],V=this.getParsed(b),y=z?H:{},A=l2(V[p]),E=y[m]=i.getPixelForValue(V[m],b),Y=y[p]=n||A?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,V,l):V[p],b);y.skip=isNaN(E)||isNaN(Y)||A,y.stop=b>0&&Math.abs(V[m]-C[m])>x,g&&(y.parsed=V,y.raw=f.data[b]),d&&(y.options=h||this.resolveDataElementOptions(b,H.active?"active":c)),z||this.updateElement(H,b,y,c),C=V}this.updateSharedOptions(h,c,u)}getMaxOverflow(){const t=this._cachedMeta,a=t.data||[];if(!this.options.showLine){let s=0;for(let l=a.length-1;l>=0;--l)s=Math.max(s,a[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const r=t.dataset,c=r.options&&r.options.borderWidth||0;if(!a.length)return c;const n=a[0].size(this.resolveDataElementOptions(0)),i=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(c,n,i)/2}}o1(m7,"id","scatter"),o1(m7,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),o1(m7,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var BY=Object.freeze({__proto__:null,BarController:f7,BubbleController:u7,DoughnutController:z6,LineController:h7,PieController:Mi,PolarAreaController:Ot,RadarController:d7,ScatterController:m7});function s6(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class P9{constructor(t){o1(this,"options");this.options=t||{}}static override(t){Object.assign(P9.prototype,t)}init(){}formats(){return s6()}parse(){return s6()}format(){return s6()}add(){return s6()}diff(){return s6()}startOf(){return s6()}endOf(){return s6()}}var OY={_date:P9};function RY(e,t,a,r){const{controller:c,data:n,_sorted:i}=e,s=c._cachedMeta.iScale;if(s&&t===s.axis&&t!=="r"&&i&&n.length){const l=s._reversePixels?lW:Ye;if(r){if(c._sharedOptions){const f=n[0],u=typeof f.getRange=="function"&&f.getRange(t);if(u){const h=l(n,t,a-u),d=l(n,t,a+u);return{lo:h.lo,hi:d.hi}}}}else return l(n,t,a)}return{lo:0,hi:n.length-1}}function K5(e,t,a,r,c){const n=e.getSortedVisibleDatasetMetas(),i=a[t];for(let s=0,l=n.length;s<l;++s){const{index:f,data:u}=n[s],{lo:h,hi:d}=RY(n[s],t,i,c);for(let m=h;m<=d;++m){const p=u[m];p.skip||r(p,f,m)}}}function IY(e){const t=e.indexOf("x")!==-1,a=e.indexOf("y")!==-1;return function(r,c){const n=t?Math.abs(r.x-c.x):0,i=a?Math.abs(r.y-c.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(i,2))}}function un(e,t,a,r,c){const n=[];return!c&&!e.isPointInArea(t)||K5(e,a,t,function(s,l,f){!c&&!je(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&n.push({element:s,datasetIndex:l,index:f})},!0),n}function $Y(e,t,a,r){let c=[];function n(i,s,l){const{startAngle:f,endAngle:u}=i.getProps(["startAngle","endAngle"],r),{angle:h}=kg(i,{x:t.x,y:t.y});v5(h,f,u)&&c.push({element:i,datasetIndex:s,index:l})}return K5(e,a,t,n),c}function UY(e,t,a,r,c,n){let i=[];const s=IY(a);let l=Number.POSITIVE_INFINITY;function f(u,h,d){const m=u.inRange(t.x,t.y,c);if(r&&!m)return;const p=u.getCenterPoint(c);if(!(!!n||e.isPointInArea(p))&&!m)return;const g=s(t,p);g<l?(i=[{element:u,datasetIndex:h,index:d}],l=g):g===l&&i.push({element:u,datasetIndex:h,index:d})}return K5(e,a,t,f),i}function hn(e,t,a,r,c,n){return!n&&!e.isPointInArea(t)?[]:a==="r"&&!r?$Y(e,t,a,c):UY(e,t,a,r,c,n)}function _u(e,t,a,r,c){const n=[],i=a==="x"?"inXRange":"inYRange";let s=!1;return K5(e,a,t,(l,f,u)=>{l[i]&&l[i](t[a],c)&&(n.push({element:l,datasetIndex:f,index:u}),s=s||l.inRange(t.x,t.y,c))}),r&&!s?[]:n}var WY={evaluateInteractionItems:K5,modes:{index(e,t,a,r){const c=h6(t,e),n=a.axis||"x",i=a.includeInvisible||!1,s=a.intersect?un(e,c,n,r,i):hn(e,c,n,!1,r,i),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(f=>{const u=s[0].index,h=f.data[u];h&&!h.skip&&l.push({element:h,datasetIndex:f.index,index:u})}),l):[]},dataset(e,t,a,r){const c=h6(t,e),n=a.axis||"xy",i=a.includeInvisible||!1;let s=a.intersect?un(e,c,n,r,i):hn(e,c,n,!1,r,i);if(s.length>0){const l=s[0].datasetIndex,f=e.getDatasetMeta(l).data;s=[];for(let u=0;u<f.length;++u)s.push({element:f[u],datasetIndex:l,index:u})}return s},point(e,t,a,r){const c=h6(t,e),n=a.axis||"xy",i=a.includeInvisible||!1;return un(e,c,n,r,i)},nearest(e,t,a,r){const c=h6(t,e),n=a.axis||"xy",i=a.includeInvisible||!1;return hn(e,c,n,a.intersect,r,i)},x(e,t,a,r){const c=h6(t,e);return _u(e,c,"x",a.intersect,r)},y(e,t,a,r){const c=h6(t,e);return _u(e,c,"y",a.intersect,r)}}};const Kg=["left","top","right","bottom"];function it(e,t){return e.filter(a=>a.pos===t)}function ku(e,t){return e.filter(a=>Kg.indexOf(a.pos)===-1&&a.box.axis===t)}function st(e,t){return e.sort((a,r)=>{const c=t?r:a,n=t?a:r;return c.weight===n.weight?c.index-n.index:c.weight-n.weight})}function YY(e){const t=[];let a,r,c,n,i,s;for(a=0,r=(e||[]).length;a<r;++a)c=e[a],{position:n,options:{stack:i,stackWeight:s=1}}=c,t.push({index:a,box:c,pos:n,horizontal:c.isHorizontal(),weight:c.weight,stack:i&&n+i,stackWeight:s});return t}function jY(e){const t={};for(const a of e){const{stack:r,pos:c,stackWeight:n}=a;if(!r||!Kg.includes(c))continue;const i=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=n}return t}function GY(e,t){const a=jY(e),{vBoxMaxWidth:r,hBoxMaxHeight:c}=t;let n,i,s;for(n=0,i=e.length;n<i;++n){s=e[n];const{fullSize:l}=s.box,f=a[s.stack],u=f&&s.stackWeight/f.weight;s.horizontal?(s.width=u?u*r:l&&t.availableWidth,s.height=c):(s.width=r,s.height=u?u*c:l&&t.availableHeight)}return a}function qY(e){const t=YY(e),a=st(t.filter(f=>f.box.fullSize),!0),r=st(it(t,"left"),!0),c=st(it(t,"right")),n=st(it(t,"top"),!0),i=st(it(t,"bottom")),s=ku(t,"x"),l=ku(t,"y");return{fullSize:a,leftAndTop:r.concat(n),rightAndBottom:c.concat(l).concat(i).concat(s),chartArea:it(t,"chartArea"),vertical:r.concat(c).concat(l),horizontal:n.concat(i).concat(s)}}function Lu(e,t,a,r){return Math.max(e[a],t[a])+Math.max(e[r],t[r])}function Jg(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 XY(e,t,a,r){const{pos:c,box:n}=a,i=e.maxPadding;if(!r2(c)){a.size&&(e[c]-=a.size);const h=r[a.stack]||{size:0,count:1};h.size=Math.max(h.size,a.horizontal?n.height:n.width),a.size=h.size/h.count,e[c]+=a.size}n.getPadding&&Jg(i,n.getPadding());const s=Math.max(0,t.outerWidth-Lu(i,e,"left","right")),l=Math.max(0,t.outerHeight-Lu(i,e,"top","bottom")),f=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,a.horizontal?{same:f,other:u}:{same:u,other:f}}function ZY(e){const t=e.maxPadding;function a(r){const c=Math.max(t[r]-e[r],0);return e[r]+=c,c}e.y+=a("top"),e.x+=a("left"),a("right"),a("bottom")}function QY(e,t){const a=t.maxPadding;function r(c){const n={left:0,top:0,right:0,bottom:0};return c.forEach(i=>{n[i]=Math.max(t[i],a[i])}),n}return r(e?["left","right"]:["top","bottom"])}function gt(e,t,a,r){const c=[];let n,i,s,l,f,u;for(n=0,i=e.length,f=0;n<i;++n){s=e[n],l=s.box,l.update(s.width||t.w,s.height||t.h,QY(s.horizontal,t));const{same:h,other:d}=XY(t,a,s,r);f|=h&&c.length,u=u||d,l.fullSize||c.push(s)}return f&>(c,t,a,r)||u}function Ba(e,t,a,r,c){e.top=a,e.left=t,e.right=t+r,e.bottom=a+c,e.width=r,e.height=c}function Su(e,t,a,r){const c=a.padding;let{x:n,y:i}=t;for(const s of e){const l=s.box,f=r[s.stack]||{count:1,placed:0,weight:1},u=s.stackWeight/f.weight||1;if(s.horizontal){const h=t.w*u,d=f.size||l.height;p5(f.start)&&(i=f.start),l.fullSize?Ba(l,c.left,i,a.outerWidth-c.right-c.left,d):Ba(l,t.left+f.placed,i,h,d),f.start=i,f.placed+=h,i=l.bottom}else{const h=t.h*u,d=f.size||l.width;p5(f.start)&&(n=f.start),l.fullSize?Ba(l,n,c.top,d,a.outerHeight-c.bottom-c.top):Ba(l,n,t.top+f.placed,d,h),f.start=n,f.placed+=h,n=l.right}}t.x=n,t.y=i}var $3={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(a){t.draw(a)}}]},e.boxes.push(t)},removeBox(e,t){const a=e.boxes?e.boxes.indexOf(t):-1;a!==-1&&e.boxes.splice(a,1)},configure(e,t,a){t.fullSize=a.fullSize,t.position=a.position,t.weight=a.weight},update(e,t,a,r){if(!e)return;const c=j3(e.options.layout.padding),n=Math.max(t-c.width,0),i=Math.max(a-c.height,0),s=qY(e.boxes),l=s.vertical,f=s.horizontal;g2(e.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});const u=l.reduce((v,g)=>g.box.options&&g.box.options.display===!1?v:v+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:a,padding:c,availableWidth:n,availableHeight:i,vBoxMaxWidth:n/2/u,hBoxMaxHeight:i/2}),d=Object.assign({},c);Jg(d,j3(r));const m=Object.assign({maxPadding:d,w:n,h:i,x:c.left,y:c.top},c),p=GY(l.concat(f),h);gt(s.fullSize,m,h,p),gt(l,m,h,p),gt(f,m,h,p)&>(l,m,h,p),ZY(m),Su(s.leftAndTop,m,h,p),m.x+=m.w,m.y+=m.h,Su(s.rightAndBottom,m,h,p),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},g2(s.chartArea,v=>{const g=v.box;Object.assign(g,e.chartArea),g.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class ex{acquireContext(t,a){}releaseContext(t){return!1}addEventListener(t,a,r){}removeEventListener(t,a,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,a,r,c){return a=Math.max(0,a||t.width),r=r||t.height,{width:a,height:Math.max(0,c?Math.floor(a/c):r)}}isAttached(t){return!0}updateConfig(t){}}class KY extends ex{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const p7="$chartjs",JY={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Au=e=>e===null||e==="";function ej(e,t){const a=e.style,r=e.getAttribute("height"),c=e.getAttribute("width");if(e[p7]={initial:{height:r,width:c,style:{display:a.display,height:a.height,width:a.width}}},a.display=a.display||"block",a.boxSizing=a.boxSizing||"border-box",Au(c)){const n=mu(e,"width");n!==void 0&&(e.width=n)}if(Au(r))if(e.style.height==="")e.height=e.width/(t||2);else{const n=mu(e,"height");n!==void 0&&(e.height=n)}return e}const tx=aY?{passive:!0}:!1;function tj(e,t,a){e&&e.addEventListener(t,a,tx)}function aj(e,t,a){e&&e.canvas&&e.canvas.removeEventListener(t,a,tx)}function rj(e,t){const a=JY[e.type]||e.type,{x:r,y:c}=h6(e,t);return{type:a,chart:t,native:e,x:r!==void 0?r:null,y:c!==void 0?c:null}}function K7(e,t){for(const a of e)if(a===t||a.contains(t))return!0}function cj(e,t,a){const r=e.canvas,c=new MutationObserver(n=>{let i=!1;for(const s of n)i=i||K7(s.addedNodes,r),i=i&&!K7(s.removedNodes,r);i&&a()});return c.observe(document,{childList:!0,subtree:!0}),c}function nj(e,t,a){const r=e.canvas,c=new MutationObserver(n=>{let i=!1;for(const s of n)i=i||K7(s.removedNodes,r),i=i&&!K7(s.addedNodes,r);i&&a()});return c.observe(document,{childList:!0,subtree:!0}),c}const x5=new Map;let Tu=0;function ax(){const e=window.devicePixelRatio;e!==Tu&&(Tu=e,x5.forEach((t,a)=>{a.currentDevicePixelRatio!==e&&t()}))}function ij(e,t){x5.size||window.addEventListener("resize",ax),x5.set(e,t)}function sj(e){x5.delete(e),x5.size||window.removeEventListener("resize",ax)}function oj(e,t,a){const r=e.canvas,c=r&&E9(r);if(!c)return;const n=Tg((s,l)=>{const f=c.clientWidth;a(s,l),f<c.clientWidth&&a()},window),i=new ResizeObserver(s=>{const l=s[0],f=l.contentRect.width,u=l.contentRect.height;f===0&&u===0||n(f,u)});return i.observe(c),ij(e,n),i}function dn(e,t,a){a&&a.disconnect(),t==="resize"&&sj(e)}function lj(e,t,a){const r=e.canvas,c=Tg(n=>{e.ctx!==null&&a(rj(n,e))},e);return tj(r,t,c),c}class fj extends ex{acquireContext(t,a){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(ej(t,a),r):null}releaseContext(t){const a=t.canvas;if(!a[p7])return!1;const r=a[p7].initial;["height","width"].forEach(n=>{const i=r[n];l2(i)?a.removeAttribute(n):a.setAttribute(n,i)});const c=r.style||{};return Object.keys(c).forEach(n=>{a.style[n]=c[n]}),a.width=a.width,delete a[p7],!0}addEventListener(t,a,r){this.removeEventListener(t,a);const c=t.$proxies||(t.$proxies={}),i={attach:cj,detach:nj,resize:oj}[a]||lj;c[a]=i(t,a,r)}removeEventListener(t,a){const r=t.$proxies||(t.$proxies={}),c=r[a];if(!c)return;({attach:dn,detach:dn,resize:dn}[a]||aj)(t,a,c),r[a]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,a,r,c){return tY(t,a,r,c)}isAttached(t){const a=t&&E9(t);return!!(a&&a.isConnected)}}function uj(e){return!N9()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?KY:fj}class ee{constructor(){o1(this,"x");o1(this,"y");o1(this,"active",!1);o1(this,"options");o1(this,"$animations")}tooltipPosition(t){const{x:a,y:r}=this.getProps(["x","y"],t);return{x:a,y:r}}hasValue(){return N8(this.x)&&N8(this.y)}getProps(t,a){const r=this.$animations;if(!a||!r)return this;const c={};return t.forEach(n=>{c[n]=r[n]&&r[n].active()?r[n]._to:this[n]}),c}}o1(ee,"defaults",{}),o1(ee,"defaultRoutes");function hj(e,t){const a=e.options.ticks,r=dj(e),c=Math.min(a.maxTicksLimit||r,r),n=a.major.enabled?pj(t):[],i=n.length,s=n[0],l=n[i-1],f=[];if(i>c)return vj(t,f,n,i/c),f;const u=mj(n,t,c);if(i>0){let h,d;const m=i>1?Math.round((l-s)/(i-1)):null;for(Oa(t,f,u,l2(m)?0:s-m,s),h=0,d=i-1;h<d;h++)Oa(t,f,u,n[h],n[h+1]);return Oa(t,f,u,l,l2(m)?t.length:l+m),f}return Oa(t,f,u),f}function dj(e){const t=e.options.offset,a=e._tickSize(),r=e._length/a+(t?0:1),c=e._maxLength/a;return Math.floor(Math.min(r,c))}function mj(e,t,a){const r=gj(e),c=t.length/a;if(!r)return Math.max(c,1);const n=nW(r);for(let i=0,s=n.length-1;i<s;i++){const l=n[i];if(l>c)return l}return Math.max(c,1)}function pj(e){const t=[];let a,r;for(a=0,r=e.length;a<r;a++)e[a].major&&t.push(a);return t}function vj(e,t,a,r){let c=0,n=a[0],i;for(r=Math.ceil(r),i=0;i<e.length;i++)i===n&&(t.push(e[i]),c++,n=a[c*r])}function Oa(e,t,a,r,c){const n=q1(r,0),i=Math.min(q1(c,e.length),e.length);let s=0,l,f,u;for(a=Math.ceil(a),c&&(l=c-r,a=l/Math.floor(l/a)),u=n;u<0;)s++,u=Math.round(n+s*a);for(f=Math.max(n,0);f<i;f++)f===u&&(t.push(e[f]),s++,u=Math.round(n+s*a))}function gj(e){const t=e.length;let a,r;if(t<2)return!1;for(r=e[0],a=1;a<t;++a)if(e[a]-e[a-1]!==r)return!1;return r}const xj=e=>e==="left"?"right":e==="right"?"left":e,Nu=(e,t,a)=>t==="top"||t==="left"?e[t]+a:e[t]-a,Eu=(e,t)=>Math.min(t||e,e);function Pu(e,t){const a=[],r=e.length/t,c=e.length;let n=0;for(;n<c;n+=r)a.push(e[Math.floor(n)]);return a}function Cj(e,t,a){const r=e.ticks.length,c=Math.min(t,r-1),n=e._startPixel,i=e._endPixel,s=1e-6;let l=e.getPixelForTick(c),f;if(!(a&&(r===1?f=Math.max(l-n,i-l):t===0?f=(e.getPixelForTick(1)-l)/2:f=(l-e.getPixelForTick(c-1))/2,l+=c<t?f:-f,l<n-s||l>i+s)))return l}function zj(e,t){g2(e,a=>{const r=a.gc,c=r.length/2;let n;if(c>t){for(n=0;n<c;++n)delete a.data[r[n]];r.splice(0,c)}})}function ot(e){return e.drawTicks?e.tickLength:0}function Fu(e,t){if(!e.display)return 0;const a=z3(e.font,t),r=j3(e.padding);return(k2(e.text)?e.text.length:1)*a.lineHeight+r.height}function Mj(e,t){return K0(e,{scale:t,type:"scale"})}function yj(e,t,a){return K0(e,{tick:a,index:t,type:"tick"})}function bj(e,t,a){let r=_9(e);return(a&&t!=="right"||!a&&t==="right")&&(r=xj(r)),r}function Hj(e,t,a,r){const{top:c,left:n,bottom:i,right:s,chart:l}=e,{chartArea:f,scales:u}=l;let h=0,d,m,p;const v=i-c,g=s-n;if(e.isHorizontal()){if(m=D3(r,n,s),r2(a)){const x=Object.keys(a)[0],z=a[x];p=u[x].getPixelForValue(z)+v-t}else a==="center"?p=(f.bottom+f.top)/2+v-t:p=Nu(e,a,t);d=s-n}else{if(r2(a)){const x=Object.keys(a)[0],z=a[x];m=u[x].getPixelForValue(z)-g+t}else a==="center"?m=(f.left+f.right)/2-g+t:m=Nu(e,a,t);p=D3(r,i,c),h=a==="left"?-i3:i3}return{titleX:m,titleY:p,maxWidth:d,rotation:h}}class W6 extends ee{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,a){return t}getUserBounds(){let{_userMin:t,_userMax:a,_suggestedMin:r,_suggestedMax:c}=this;return t=f4(t,Number.POSITIVE_INFINITY),a=f4(a,Number.NEGATIVE_INFINITY),r=f4(r,Number.POSITIVE_INFINITY),c=f4(c,Number.NEGATIVE_INFINITY),{min:f4(t,r),max:f4(a,c),minDefined:q2(t),maxDefined:q2(a)}}getMinMax(t){let{min:a,max:r,minDefined:c,maxDefined:n}=this.getUserBounds(),i;if(c&&n)return{min:a,max:r};const s=this.getMatchingVisibleMetas();for(let l=0,f=s.length;l<f;++l)i=s[l].controller.getMinMax(this,t),c||(a=Math.min(a,i.min)),n||(r=Math.max(r,i.max));return a=n&&a>r?r:a,r=c&&a>r?a:r,{min:f4(a,f4(r,a)),max:f4(r,f4(a,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const 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(){M2(this.options.beforeUpdate,[this])}update(t,a,r){const{beginAtZero:c,grace:n,ticks:i}=this.options,s=i.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=a,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=NW(this,n,c),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?Pu(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),i.display&&(i.autoSkip||i.source==="auto")&&(this.ticks=hj(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,a,r;this.isHorizontal()?(a=this.left,r=this.right):(a=this.top,r=this.bottom,t=!t),this._startPixel=a,this._endPixel=r,this._reversePixels=t,this._length=r-a,this._alignToPixels=this.options.alignToPixels}afterUpdate(){M2(this.options.afterUpdate,[this])}beforeSetDimensions(){M2(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(){M2(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),M2(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){M2(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const a=this.options.ticks;let r,c,n;for(r=0,c=t.length;r<c;r++)n=t[r],n.label=M2(a.callback,[n.value,r,t],this)}afterTickToLabelConversion(){M2(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){M2(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,a=t.ticks,r=Eu(this.ticks.length,t.ticks.maxTicksLimit),c=a.minRotation||0,n=a.maxRotation;let i=c,s,l,f;if(!this._isVisible()||!a.display||c>=n||r<=1||!this.isHorizontal()){this.labelRotation=c;return}const u=this._getLabelSizes(),h=u.widest.width,d=u.highest.height,m=k3(this.chart.width-h,0,this.maxWidth);s=t.offset?this.maxWidth/r:m/(r-1),h+6>s&&(s=m/(r-(t.offset?.5:1)),l=this.maxHeight-ot(t.grid)-a.padding-Fu(t.title,this.chart.options.font),f=Math.sqrt(h*h+d*d),i=V9(Math.min(Math.asin(k3((u.highest.height+6)/s,-1,1)),Math.asin(k3(l/f,-1,1))-Math.asin(k3(d/f,-1,1)))),i=Math.max(c,Math.min(n,i))),this.labelRotation=i}afterCalculateLabelRotation(){M2(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){M2(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:a,options:{ticks:r,title:c,grid:n}}=this,i=this._isVisible(),s=this.isHorizontal();if(i){const l=Fu(c,a.options.font);if(s?(t.width=this.maxWidth,t.height=ot(n)+l):(t.height=this.maxHeight,t.width=ot(n)+l),r.display&&this.ticks.length){const{first:f,last:u,widest:h,highest:d}=this._getLabelSizes(),m=r.padding*2,p=$4(this.labelRotation),v=Math.cos(p),g=Math.sin(p);if(s){const x=r.mirror?0:g*h.width+v*d.height;t.height=Math.min(this.maxHeight,t.height+x+m)}else{const x=r.mirror?0:v*h.width+g*d.height;t.width=Math.min(this.maxWidth,t.width+x+m)}this._calculatePadding(f,u,g,v)}}this._handleMargins(),s?(this.width=this._length=a.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=a.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,a,r,c){const{ticks:{align:n,padding:i},position:s}=this.options,l=this.labelRotation!==0,f=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,m=0;l?f?(d=c*t.width,m=r*a.height):(d=r*t.height,m=c*a.width):n==="start"?m=a.width:n==="end"?d=t.width:n!=="inner"&&(d=t.width/2,m=a.width/2),this.paddingLeft=Math.max((d-u+i)*this.width/(this.width-u),0),this.paddingRight=Math.max((m-h+i)*this.width/(this.width-h),0)}else{let u=a.height/2,h=t.height/2;n==="start"?(u=0,h=t.height):n==="end"&&(u=a.height,h=0),this.paddingTop=u+i,this.paddingBottom=h+i}}_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(){M2(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:a}=this.options;return a==="top"||a==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let a,r;for(a=0,r=t.length;a<r;a++)l2(t[a].label)&&(t.splice(a,1),r--,a--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const a=this.options.ticks.sampleSize;let r=this.ticks;a<r.length&&(r=Pu(r,a)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,a,r){const{ctx:c,_longestTextCache:n}=this,i=[],s=[],l=Math.floor(a/Eu(a,r));let f=0,u=0,h,d,m,p,v,g,x,z,C,b,H;for(h=0;h<a;h+=l){if(p=t[h].label,v=this._resolveTickFontOptions(h),c.font=g=v.string,x=n[g]=n[g]||{data:{},gc:[]},z=v.lineHeight,C=b=0,!l2(p)&&!k2(p))C=Z7(c,x.data,x.gc,C,p),b=z;else if(k2(p))for(d=0,m=p.length;d<m;++d)H=p[d],!l2(H)&&!k2(H)&&(C=Z7(c,x.data,x.gc,C,H),b+=z);i.push(C),s.push(b),f=Math.max(C,f),u=Math.max(b,u)}zj(n,a);const V=i.indexOf(f),y=s.indexOf(u),A=E=>({width:i[E]||0,height:s[E]||0});return{first:A(0),last:A(a-1),widest:A(V),highest:A(y),widths:i,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,a){return NaN}getValueForPixel(t){}getPixelForTick(t){const a=this.ticks;return t<0||t>a.length-1?null:this.getPixelForValue(a[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const a=this._startPixel+t*this._length;return oW(this._alignToPixels?i6(this.chart,a,0):a)}getDecimalForPixel(t){const a=(t-this._startPixel)/this._length;return this._reversePixels?1-a:a}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:a}=this;return t<0&&a<0?a:t>0&&a>0?t:0}getContext(t){const a=this.ticks||[];if(t>=0&&t<a.length){const r=a[t];return r.$context||(r.$context=yj(this.getContext(),t,r))}return this.$context||(this.$context=Mj(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,a=$4(this.labelRotation),r=Math.abs(Math.cos(a)),c=Math.abs(Math.sin(a)),n=this._getLabelSizes(),i=t.autoSkipPadding||0,s=n?n.widest.width+i:0,l=n?n.highest.height+i:0;return this.isHorizontal()?l*r>s*c?s/r:l/c:l*c<s*r?l/r:s/c}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const a=this.axis,r=this.chart,c=this.options,{grid:n,position:i,border:s}=c,l=n.offset,f=this.isHorizontal(),h=this.ticks.length+(l?1:0),d=ot(n),m=[],p=s.setContext(this.getContext()),v=p.display?p.width:0,g=v/2,x=function(O){return i6(r,O,v)};let z,C,b,H,V,y,A,E,Y,F,L,j;if(i==="top")z=x(this.bottom),y=this.bottom-d,E=z-g,F=x(t.top)+g,j=t.bottom;else if(i==="bottom")z=x(this.top),F=t.top,j=x(t.bottom)-g,y=z+g,E=this.top+d;else if(i==="left")z=x(this.right),V=this.right-d,A=z-g,Y=x(t.left)+g,L=t.right;else if(i==="right")z=x(this.left),Y=t.left,L=x(t.right)-g,V=z+g,A=this.left+d;else if(a==="x"){if(i==="center")z=x((t.top+t.bottom)/2+.5);else if(r2(i)){const O=Object.keys(i)[0],X=i[O];z=x(this.chart.scales[O].getPixelForValue(X))}F=t.top,j=t.bottom,y=z+g,E=y+d}else if(a==="y"){if(i==="center")z=x((t.left+t.right)/2);else if(r2(i)){const O=Object.keys(i)[0],X=i[O];z=x(this.chart.scales[O].getPixelForValue(X))}V=z-g,A=V-d,Y=t.left,L=t.right}const r1=q1(c.ticks.maxTicksLimit,h),P=Math.max(1,Math.ceil(h/r1));for(C=0;C<h;C+=P){const O=this.getContext(C),X=n.setContext(O),f1=s.setContext(O),K=X.lineWidth,v1=X.color,c1=f1.dash||[],S=f1.dashOffset,k=X.tickWidth,D=X.tickColor,G=X.tickBorderDash||[],B=X.tickBorderDashOffset;b=Cj(this,C,l),b!==void 0&&(H=i6(r,b,K),f?V=A=Y=L=H:y=E=F=j=H,m.push({tx1:V,ty1:y,tx2:A,ty2:E,x1:Y,y1:F,x2:L,y2:j,width:K,color:v1,borderDash:c1,borderDashOffset:S,tickWidth:k,tickColor:D,tickBorderDash:G,tickBorderDashOffset:B}))}return this._ticksLength=h,this._borderValue=z,m}_computeLabelItems(t){const a=this.axis,r=this.options,{position:c,ticks:n}=r,i=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:f,padding:u,mirror:h}=n,d=ot(r.grid),m=d+u,p=h?-u:m,v=-$4(this.labelRotation),g=[];let x,z,C,b,H,V,y,A,E,Y,F,L,j="middle";if(c==="top")V=this.bottom-p,y=this._getXAxisLabelAlignment();else if(c==="bottom")V=this.top+p,y=this._getXAxisLabelAlignment();else if(c==="left"){const P=this._getYAxisLabelAlignment(d);y=P.textAlign,H=P.x}else if(c==="right"){const P=this._getYAxisLabelAlignment(d);y=P.textAlign,H=P.x}else if(a==="x"){if(c==="center")V=(t.top+t.bottom)/2+m;else if(r2(c)){const P=Object.keys(c)[0],O=c[P];V=this.chart.scales[P].getPixelForValue(O)+m}y=this._getXAxisLabelAlignment()}else if(a==="y"){if(c==="center")H=(t.left+t.right)/2-m;else if(r2(c)){const P=Object.keys(c)[0],O=c[P];H=this.chart.scales[P].getPixelForValue(O)}y=this._getYAxisLabelAlignment(d).textAlign}a==="y"&&(l==="start"?j="top":l==="end"&&(j="bottom"));const r1=this._getLabelSizes();for(x=0,z=s.length;x<z;++x){C=s[x],b=C.label;const P=n.setContext(this.getContext(x));A=this.getPixelForTick(x)+n.labelOffset,E=this._resolveTickFontOptions(x),Y=E.lineHeight,F=k2(b)?b.length:1;const O=F/2,X=P.color,f1=P.textStrokeColor,K=P.textStrokeWidth;let v1=y;i?(H=A,y==="inner"&&(x===z-1?v1=this.options.reverse?"left":"right":x===0?v1=this.options.reverse?"right":"left":v1="center"),c==="top"?f==="near"||v!==0?L=-F*Y+Y/2:f==="center"?L=-r1.highest.height/2-O*Y+Y:L=-r1.highest.height+Y/2:f==="near"||v!==0?L=Y/2:f==="center"?L=r1.highest.height/2-O*Y:L=r1.highest.height-F*Y,h&&(L*=-1),v!==0&&!P.showLabelBackdrop&&(H+=Y/2*Math.sin(v))):(V=A,L=(1-F)*Y/2);let c1;if(P.showLabelBackdrop){const S=j3(P.backdropPadding),k=r1.heights[x],D=r1.widths[x];let G=L-S.top,B=0-S.left;switch(j){case"middle":G-=k/2;break;case"bottom":G-=k;break}switch(y){case"center":B-=D/2;break;case"right":B-=D;break;case"inner":x===z-1?B-=D:x>0&&(B-=D/2);break}c1={left:B,top:G,width:D+S.width,height:k+S.height,color:P.backdropColor}}g.push({label:b,font:E,textOffset:L,options:{rotation:v,color:X,strokeColor:f1,strokeWidth:K,textAlign:v1,textBaseline:j,translation:[H,V],backdrop:c1}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:a}=this.options;if(-$4(this.labelRotation))return t==="top"?"left":"right";let c="center";return a.align==="start"?c="left":a.align==="end"?c="right":a.align==="inner"&&(c="inner"),c}_getYAxisLabelAlignment(t){const{position:a,ticks:{crossAlign:r,mirror:c,padding:n}}=this.options,i=this._getLabelSizes(),s=t+n,l=i.widest.width;let f,u;return a==="left"?c?(u=this.right+n,r==="near"?f="left":r==="center"?(f="center",u+=l/2):(f="right",u+=l)):(u=this.right-s,r==="near"?f="right":r==="center"?(f="center",u-=l/2):(f="left",u=this.left)):a==="right"?c?(u=this.left+n,r==="near"?f="right":r==="center"?(f="center",u-=l/2):(f="left",u-=l)):(u=this.left+s,r==="near"?f="left":r==="center"?(f="center",u+=l/2):(f="right",u=this.right)):f="right",{textAlign:f,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,a=this.options.position;if(a==="left"||a==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(a==="top"||a==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:a},left:r,top:c,width:n,height:i}=this;a&&(t.save(),t.fillStyle=a,t.fillRect(r,c,n,i),t.restore())}getLineWidthForValue(t){const a=this.options.grid;if(!this._isVisible()||!a.display)return 0;const c=this.ticks.findIndex(n=>n.value===t);return c>=0?a.setContext(this.getContext(c)).lineWidth:0}drawGrid(t){const a=this.options.grid,r=this.ctx,c=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,i;const s=(l,f,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(f.x,f.y),r.stroke(),r.restore())};if(a.display)for(n=0,i=c.length;n<i;++n){const l=c[n];a.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),a.drawTicks&&s({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(){const{chart:t,ctx:a,options:{border:r,grid:c}}=this,n=r.setContext(this.getContext()),i=r.display?n.width:0;if(!i)return;const s=c.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let f,u,h,d;this.isHorizontal()?(f=i6(t,this.left,i)-i/2,u=i6(t,this.right,s)+s/2,h=d=l):(h=i6(t,this.top,i)-i/2,d=i6(t,this.bottom,s)+s/2,f=u=l),a.save(),a.lineWidth=n.width,a.strokeStyle=n.color,a.beginPath(),a.moveTo(f,h),a.lineTo(u,d),a.stroke(),a.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,c=this._computeLabelArea();c&&qr(r,c);const n=this.getLabelItems(t);for(const i of n){const s=i.options,l=i.font,f=i.label,u=i.textOffset;E6(r,f,0,u,l,s)}c&&Xr(r)}drawTitle(){const{ctx:t,options:{position:a,title:r,reverse:c}}=this;if(!r.display)return;const n=z3(r.font),i=j3(r.padding),s=r.align;let l=n.lineHeight/2;a==="bottom"||a==="center"||r2(a)?(l+=i.bottom,k2(r.text)&&(l+=n.lineHeight*(r.text.length-1))):l+=i.top;const{titleX:f,titleY:u,maxWidth:h,rotation:d}=Hj(this,l,a,s);E6(t,r.text,0,0,n,{color:r.color,maxWidth:h,rotation:d,textAlign:bj(s,a,c),textBaseline:"middle",translation:[f,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,a=t.ticks&&t.ticks.z||0,r=q1(t.grid&&t.grid.z,-1),c=q1(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==W6.prototype.draw?[{z:a,draw:n=>{this.draw(n)}}]:[{z:r,draw:n=>{this.drawBackground(),this.drawGrid(n),this.drawTitle()}},{z:c,draw:()=>{this.drawBorder()}},{z:a,draw:n=>{this.drawLabels(n)}}]}getMatchingVisibleMetas(t){const a=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",c=[];let n,i;for(n=0,i=a.length;n<i;++n){const s=a[n];s[r]===this.id&&(!t||s.type===t)&&c.push(s)}return c}_resolveTickFontOptions(t){const a=this.options.ticks.setContext(this.getContext(t));return z3(a.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ra{constructor(t,a,r){this.type=t,this.scope=a,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const a=Object.getPrototypeOf(t);let r;_j(a)&&(r=this.register(a));const c=this.items,n=t.id,i=this.scope+"."+n;if(!n)throw new Error("class does not have id: "+t);return n in c||(c[n]=t,Vj(t,i,r),this.override&&D2.override(t.id,t.overrides)),i}get(t){return this.items[t]}unregister(t){const a=this.items,r=t.id,c=this.scope;r in a&&delete a[r],c&&r in D2[c]&&(delete D2[c][r],this.override&&delete N6[r])}}function Vj(e,t,a){const r=m5(Object.create(null),[a?D2.get(a):{},D2.get(t),e.defaults]);D2.set(t,r),e.defaultRoutes&&wj(t,e.defaultRoutes),e.descriptors&&D2.describe(t,e.descriptors)}function wj(e,t){Object.keys(t).forEach(a=>{const r=a.split("."),c=r.pop(),n=[e].concat(r).join("."),i=t[a].split("."),s=i.pop(),l=i.join(".");D2.route(n,c,l,s)})}function _j(e){return"id"in e&&"defaults"in e}class kj{constructor(){this.controllers=new Ra(q4,"datasets",!0),this.elements=new Ra(ee,"elements"),this.plugins=new Ra(Object,"plugins"),this.scales=new Ra(W6,"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,a,r){[...a].forEach(c=>{const n=r||this._getRegistryForType(c);r||n.isForType(c)||n===this.plugins&&c.id?this._exec(t,n,c):g2(c,i=>{const s=r||this._getRegistryForType(i);this._exec(t,s,i)})})}_exec(t,a,r){const c=H9(t);M2(r["before"+c],[],r),a[t](r),M2(r["after"+c],[],r)}_getRegistryForType(t){for(let a=0;a<this._typedRegistries.length;a++){const r=this._typedRegistries[a];if(r.isForType(t))return r}return this.plugins}_get(t,a,r){const c=a.get(t);if(c===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return c}}var he=new kj;class Lj{constructor(){this._init=[]}notify(t,a,r,c){a==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const n=c?this._descriptors(t).filter(c):this._descriptors(t),i=this._notify(n,t,a,r);return a==="afterDestroy"&&(this._notify(n,t,"stop"),this._notify(this._init,t,"uninstall")),i}_notify(t,a,r,c){c=c||{};for(const n of t){const i=n.plugin,s=i[r],l=[a,c,n.options];if(M2(s,l,i)===!1&&c.cancelable)return!1}return!0}invalidate(){l2(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const a=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),a}_createDescriptors(t,a){const r=t&&t.config,c=q1(r.options&&r.options.plugins,{}),n=Sj(r);return c===!1&&!a?[]:Tj(t,n,c,a)}_notifyStateChanges(t){const a=this._oldCache||[],r=this._cache,c=(n,i)=>n.filter(s=>!i.some(l=>s.plugin.id===l.plugin.id));this._notify(c(a,r),t,"stop"),this._notify(c(r,a),t,"start")}}function Sj(e){const t={},a=[],r=Object.keys(he.plugins.items);for(let n=0;n<r.length;n++)a.push(he.getPlugin(r[n]));const c=e.plugins||[];for(let n=0;n<c.length;n++){const i=c[n];a.indexOf(i)===-1&&(a.push(i),t[i.id]=!0)}return{plugins:a,localIds:t}}function Aj(e,t){return!t&&e===!1?null:e===!0?{}:e}function Tj(e,{plugins:t,localIds:a},r,c){const n=[],i=e.getContext();for(const s of t){const l=s.id,f=Aj(r[l],c);f!==null&&n.push({plugin:s,options:Nj(e.config,{plugin:s,local:a[l]},f,i)})}return n}function Nj(e,{plugin:t,local:a},r,c){const n=e.pluginScopeKeys(t),i=e.getOptionScopes(r,n);return a&&t.defaults&&i.push(t.defaults),e.createResolver(i,c,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function yi(e,t){const a=D2.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||a.indexAxis||"x"}function Ej(e,t){let a=e;return e==="_index_"?a=t:e==="_value_"&&(a=t==="x"?"y":"x"),a}function Pj(e,t){return e===t?"_index_":"_value_"}function Du(e){if(e==="x"||e==="y"||e==="r")return e}function Fj(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function bi(e,...t){if(Du(e))return e;for(const a of t){const r=a.axis||Fj(a.position)||e.length>1&&Du(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Bu(e,t,a){if(a[t+"AxisID"]===e)return{axis:t}}function Dj(e,t){if(t.data&&t.data.datasets){const a=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(a.length)return Bu(e,"x",a[0])||Bu(e,"y",a[0])}return{}}function Bj(e,t){const a=N6[e.type]||{scales:{}},r=t.scales||{},c=yi(e.type,t),n=Object.create(null);return Object.keys(r).forEach(i=>{const s=r[i];if(!r2(s))return console.error(`Invalid scale configuration for scale: ${i}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${i}`);const l=bi(i,s,Dj(i,e),D2.scales[s.type]),f=Pj(l,c),u=a.scales||{};n[i]=Pt(Object.create(null),[{axis:l},s,u[l],u[f]])}),e.data.datasets.forEach(i=>{const s=i.type||e.type,l=i.indexAxis||yi(s,t),u=(N6[s]||{}).scales||{};Object.keys(u).forEach(h=>{const d=Ej(h,l),m=i[d+"AxisID"]||d;n[m]=n[m]||Object.create(null),Pt(n[m],[{axis:d},r[m],u[h]])})}),Object.keys(n).forEach(i=>{const s=n[i];Pt(s,[D2.scales[s.type],D2.scale])}),n}function rx(e){const t=e.options||(e.options={});t.plugins=q1(t.plugins,{}),t.scales=Bj(e,t)}function cx(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Oj(e){return e=e||{},e.data=cx(e.data),rx(e),e}const Ou=new Map,nx=new Set;function Ia(e,t){let a=Ou.get(e);return a||(a=t(),Ou.set(e,a),nx.add(a)),a}const lt=(e,t,a)=>{const r=Y0(t,a);r!==void 0&&e.add(r)};class Rj{constructor(t){this._config=Oj(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=cx(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),rx(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ia(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,a){return Ia(`${t}.transition.${a}`,()=>[[`datasets.${t}.transitions.${a}`,`transitions.${a}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,a){return Ia(`${t}-${a}`,()=>[[`datasets.${t}.elements.${a}`,`datasets.${t}`,`elements.${a}`,""]])}pluginScopeKeys(t){const a=t.id,r=this.type;return Ia(`${r}-plugin-${a}`,()=>[[`plugins.${a}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,a){const r=this._scopeCache;let c=r.get(t);return(!c||a)&&(c=new Map,r.set(t,c)),c}getOptionScopes(t,a,r){const{options:c,type:n}=this,i=this._cachedScopes(t,r),s=i.get(a);if(s)return s;const l=new Set;a.forEach(u=>{t&&(l.add(t),u.forEach(h=>lt(l,t,h))),u.forEach(h=>lt(l,c,h)),u.forEach(h=>lt(l,N6[n]||{},h)),u.forEach(h=>lt(l,D2,h)),u.forEach(h=>lt(l,Ci,h))});const f=Array.from(l);return f.length===0&&f.push(Object.create(null)),nx.has(a)&&i.set(a,f),f}chartOptionScopes(){const{options:t,type:a}=this;return[t,N6[a]||{},D2.datasets[a]||{},{type:a},D2,Ci]}resolveNamedOptions(t,a,r,c=[""]){const n={$shared:!0},{resolver:i,subPrefixes:s}=Ru(this._resolverCache,t,c);let l=i;if($j(i,a)){n.$shared=!1,r=j0(r)?r():r;const f=this.createResolver(t,r,s);l=E8(i,r,f)}for(const f of a)n[f]=l[f];return n}createResolver(t,a,r=[""],c){const{resolver:n}=Ru(this._resolverCache,t,r);return r2(a)?E8(n,a,void 0,c):n}}function Ru(e,t,a){let r=e.get(t);r||(r=new Map,e.set(t,r));const c=a.join();let n=r.get(c);return n||(n={resolver:S9(t,a),subPrefixes:a.filter(s=>!s.toLowerCase().includes("hover"))},r.set(c,n)),n}const Ij=e=>r2(e)&&Object.getOwnPropertyNames(e).some(t=>j0(e[t]));function $j(e,t){const{isScriptable:a,isIndexable:r}=Bg(e);for(const c of t){const n=a(c),i=r(c),s=(i||n)&&e[c];if(n&&(j0(s)||Ij(s))||i&&k2(s))return!0}return!1}var Uj="4.4.6";const Wj=["top","bottom","left","right","chartArea"];function Iu(e,t){return e==="top"||e==="bottom"||Wj.indexOf(e)===-1&&t==="x"}function $u(e,t){return function(a,r){return a[e]===r[e]?a[t]-r[t]:a[e]-r[e]}}function Uu(e){const t=e.chart,a=t.options.animation;t.notifyPlugins("afterRender"),M2(a&&a.onComplete,[e],t)}function Yj(e){const t=e.chart,a=t.options.animation;M2(a&&a.onProgress,[e],t)}function ix(e){return N9()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const v7={},Wu=e=>{const t=ix(e);return Object.values(v7).filter(a=>a.canvas===t).pop()};function jj(e,t,a){const r=Object.keys(e);for(const c of r){const n=+c;if(n>=t){const i=e[c];delete e[c],(a>0||n>t)&&(e[n+a]=i)}}}function Gj(e,t,a,r){return!a||e.type==="mouseout"?null:r?t:e}function $a(e,t,a){return e.options.clip?e[a]:t[a]}function qj(e,t){const{xScale:a,yScale:r}=e;return a&&r?{left:$a(a,t,"left"),right:$a(a,t,"right"),top:$a(r,t,"top"),bottom:$a(r,t,"bottom")}:t}class Re{static register(...t){he.add(...t),Yu()}static unregister(...t){he.remove(...t),Yu()}constructor(t,a){const r=this.config=new Rj(a),c=ix(t),n=Wu(c);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const i=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||uj(c)),this.platform.updateConfig(r);const s=this.platform.acquireContext(c,i.aspectRatio),l=s&&s.canvas,f=l&&l.height,u=l&&l.width;if(this.id=ZU(),this.ctx=s,this.canvas=l,this.width=u,this.height=f,this._options=i,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 Lj,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=hW(h=>this.update(h),i.resizeDelay||0),this._dataChanges=[],v7[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Pe.listen(this,"complete",Uu),Pe.listen(this,"progress",Yj),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:a},width:r,height:c,_aspectRatio:n}=this;return l2(t)?a&&n?n:c?r/c: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 he}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():du(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return fu(this.canvas,this.ctx),this}stop(){return Pe.stop(this),this}resize(t,a){Pe.running(this)?this._resizeBeforeDraw={width:t,height:a}:this._resize(t,a)}_resize(t,a){const r=this.options,c=this.canvas,n=r.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(c,t,a,n),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,du(this,s,!0)&&(this.notifyPlugins("resize",{size:i}),M2(r.onResize,[this,i],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const a=this.options.scales||{};g2(a,(r,c)=>{r.id=c})}buildOrUpdateScales(){const t=this.options,a=t.scales,r=this.scales,c=Object.keys(r).reduce((i,s)=>(i[s]=!1,i),{});let n=[];a&&(n=n.concat(Object.keys(a).map(i=>{const s=a[i],l=bi(i,s),f=l==="r",u=l==="x";return{options:s,dposition:f?"chartArea":u?"bottom":"left",dtype:f?"radialLinear":u?"category":"linear"}}))),g2(n,i=>{const s=i.options,l=s.id,f=bi(l,s),u=q1(s.type,i.dtype);(s.position===void 0||Iu(s.position,f)!==Iu(i.dposition))&&(s.position=i.dposition),c[l]=!0;let h=null;if(l in r&&r[l].type===u)h=r[l];else{const d=he.getScale(u);h=new d({id:l,type:u,ctx:this.ctx,chart:this}),r[h.id]=h}h.init(s,t)}),g2(c,(i,s)=>{i||delete r[s]}),g2(r,i=>{$3.configure(this,i,i.options),$3.addBox(this,i)})}_updateMetasets(){const t=this._metasets,a=this.data.datasets.length,r=t.length;if(t.sort((c,n)=>c.index-n.index),r>a){for(let c=a;c<r;++c)this._destroyDatasetMeta(c);t.splice(a,r-a)}this._sortedMetasets=t.slice(0).sort($u("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:a}}=this;t.length>a.length&&delete this._stacks,t.forEach((r,c)=>{a.filter(n=>n===r._dataset).length===0&&this._destroyDatasetMeta(c)})}buildOrUpdateControllers(){const t=[],a=this.data.datasets;let r,c;for(this._removeUnreferencedMetasets(),r=0,c=a.length;r<c;r++){const n=a[r];let i=this.getDatasetMeta(r);const s=n.type||this.config.type;if(i.type&&i.type!==s&&(this._destroyDatasetMeta(r),i=this.getDatasetMeta(r)),i.type=s,i.indexAxis=n.indexAxis||yi(s,this.options),i.order=n.order||0,i.index=r,i.label=""+n.label,i.visible=this.isDatasetVisible(r),i.controller)i.controller.updateIndex(r),i.controller.linkScales();else{const l=he.getController(s),{datasetElementType:f,dataElementType:u}=D2.datasets[s];Object.assign(l,{dataElementType:he.getElement(u),datasetElementType:f&&he.getElement(f)}),i.controller=new l(this,r),t.push(i.controller)}}return this._updateMetasets(),t}_resetElements(){g2(this.data.datasets,(t,a)=>{this.getDatasetMeta(a).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const a=this.config;a.update();const r=this._options=a.createResolver(a.chartOptionScopes(),this.getContext()),c=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let f=0,u=this.data.datasets.length;f<u;f++){const{controller:h}=this.getDatasetMeta(f),d=!c&&n.indexOf(h)===-1;h.buildOrUpdateElements(d),i=Math.max(+h.getMaxOverflow(),i)}i=this._minPadding=r.layout.autoPadding?i:0,this._updateLayout(i),c||g2(n,f=>{f.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort($u("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){g2(this.scales,t=>{$3.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,a=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!tu(a,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,a=this._getUniformDataChanges()||[];for(const{method:r,start:c,count:n}of a){const i=r==="_removeElements"?-n:n;jj(t,c,i)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const a=this.data.datasets.length,r=n=>new Set(t.filter(i=>i[0]===n).map((i,s)=>s+","+i.splice(1).join(","))),c=r(0);for(let n=1;n<a;n++)if(!tu(c,r(n)))return;return Array.from(c).map(n=>n.split(",")).map(n=>({method:n[1],start:+n[2],count:+n[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;$3.update(this,this.width,this.height,t);const a=this.chartArea,r=a.width<=0||a.height<=0;this._layers=[],g2(this.boxes,c=>{r&&c.position==="chartArea"||(c.configure&&c.configure(),this._layers.push(...c._layers()))},this),this._layers.forEach((c,n)=>{c._idx=n}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let a=0,r=this.data.datasets.length;a<r;++a)this.getDatasetMeta(a).controller.configure();for(let a=0,r=this.data.datasets.length;a<r;++a)this._updateDataset(a,j0(t)?t({datasetIndex:a}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,a){const r=this.getDatasetMeta(t),c={meta:r,index:t,mode:a,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",c)!==!1&&(r.controller._update(a),c.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",c))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Pe.has(this)?this.attached&&!Pe.running(this)&&Pe.start(this):(this.draw(),Uu({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:c}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,c)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const a=this._layers;for(t=0;t<a.length&&a[t].z<=0;++t)a[t].draw(this.chartArea);for(this._drawDatasets();t<a.length;++t)a[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const a=this._sortedMetasets,r=[];let c,n;for(c=0,n=a.length;c<n;++c){const i=a[c];(!t||i.visible)&&r.push(i)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let a=t.length-1;a>=0;--a)this._drawDataset(t[a]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const a=this.ctx,r=t._clip,c=!r.disabled,n=qj(t,this.chartArea),i={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(c&&qr(a,{left:r.left===!1?0:n.left-r.left,right:r.right===!1?this.width:n.right+r.right,top:r.top===!1?0:n.top-r.top,bottom:r.bottom===!1?this.height:n.bottom+r.bottom}),t.controller.draw(),c&&Xr(a),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return je(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,a,r,c){const n=WY.modes[a];return typeof n=="function"?n(this,t,r,c):[]}getDatasetMeta(t){const a=this.data.datasets[t],r=this._metasets;let c=r.filter(n=>n&&n._dataset===a).pop();return c||(c={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:a&&a.order||0,index:t,_dataset:a,_parsed:[],_sorted:!1},r.push(c)),c}getContext(){return this.$context||(this.$context=K0(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const a=this.data.datasets[t];if(!a)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!a.hidden}setDatasetVisibility(t,a){const r=this.getDatasetMeta(t);r.hidden=!a}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,a,r){const c=r?"show":"hide",n=this.getDatasetMeta(t),i=n.controller._resolveAnimations(void 0,c);p5(a)?(n.data[a].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),i.update(n,{visible:r}),this.update(s=>s.datasetIndex===t?c:void 0))}hide(t,a){this._updateVisibility(t,a,!1)}show(t,a){this._updateVisibility(t,a,!0)}_destroyDatasetMeta(t){const a=this._metasets[t];a&&a.controller&&a.controller._destroy(),delete this._metasets[t]}_stop(){let t,a;for(this.stop(),Pe.remove(this),t=0,a=this.data.datasets.length;t<a;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:a}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),fu(t,a),this.platform.releaseContext(a),this.canvas=null,this.ctx=null),delete v7[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,a=this.platform,r=(n,i)=>{a.addEventListener(this,n,i),t[n]=i},c=(n,i,s)=>{n.offsetX=i,n.offsetY=s,this._eventHandler(n)};g2(this.options.events,n=>r(n,c))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,a=this.platform,r=(l,f)=>{a.addEventListener(this,l,f),t[l]=f},c=(l,f)=>{t[l]&&(a.removeEventListener(this,l,f),delete t[l])},n=(l,f)=>{this.canvas&&this.resize(l,f)};let i;const s=()=>{c("attach",s),this.attached=!0,this.resize(),r("resize",n),r("detach",i)};i=()=>{this.attached=!1,c("resize",n),this._stop(),this._resize(0,0),r("attach",s)},a.isAttached(this.canvas)?s():i()}unbindEvents(){g2(this._listeners,(t,a)=>{this.platform.removeEventListener(this,a,t)}),this._listeners={},g2(this._responsiveListeners,(t,a)=>{this.platform.removeEventListener(this,a,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,a,r){const c=r?"set":"remove";let n,i,s,l;for(a==="dataset"&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+c+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){i=t[s];const f=i&&this.getDatasetMeta(i.datasetIndex).controller;f&&f[c+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const a=this._active||[],r=t.map(({datasetIndex:n,index:i})=>{const s=this.getDatasetMeta(n);if(!s)throw new Error("No dataset found at index "+n);return{datasetIndex:n,element:s.data[i],index:i}});!G7(r,a)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,a))}notifyPlugins(t,a,r){return this._plugins.notify(this,t,a,r)}isPluginEnabled(t){return this._plugins._cache.filter(a=>a.plugin.id===t).length===1}_updateHoverStyles(t,a,r){const c=this.options.hover,n=(l,f)=>l.filter(u=>!f.some(h=>u.datasetIndex===h.datasetIndex&&u.index===h.index)),i=n(a,t),s=r?t:n(t,a);i.length&&this.updateHoverStyle(i,c.mode,!1),s.length&&c.mode&&this.updateHoverStyle(s,c.mode,!0)}_eventHandler(t,a){const r={event:t,replay:a,cancelable:!0,inChartArea:this.isPointInArea(t)},c=i=>(i.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,c)===!1)return;const n=this._handleEvent(t,a,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,c),(n||r.changed)&&this.render(),this}_handleEvent(t,a,r){const{_active:c=[],options:n}=this,i=a,s=this._getActiveElements(t,c,r,i),l=aW(t),f=Gj(t,this._lastEvent,r,l);r&&(this._lastEvent=null,M2(n.onHover,[t,s,this],this),l&&M2(n.onClick,[t,s,this],this));const u=!G7(s,c);return(u||a)&&(this._active=s,this._updateHoverStyles(s,c,a)),this._lastEvent=f,u}_getActiveElements(t,a,r,c){if(t.type==="mouseout")return[];if(!r)return a;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,c)}}o1(Re,"defaults",D2),o1(Re,"instances",v7),o1(Re,"overrides",N6),o1(Re,"registry",he),o1(Re,"version",Uj),o1(Re,"getChart",Wu);function Yu(){return g2(Re.instances,e=>e._plugins.invalidate())}function Xj(e,t,a){const{startAngle:r,pixelMargin:c,x:n,y:i,outerRadius:s,innerRadius:l}=t;let f=c/s;e.beginPath(),e.arc(n,i,s,r-f,a+f),l>c?(f=c/l,e.arc(n,i,l,a+f,r-f,!0)):e.arc(n,i,c,a+i3,r-i3),e.closePath(),e.clip()}function Zj(e){return L9(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Qj(e,t,a,r){const c=Zj(e.options.borderRadius),n=(a-t)/2,i=Math.min(n,r*t/2),s=l=>{const f=(a-Math.min(n,l))*r/2;return k3(l,0,Math.min(n,f))};return{outerStart:s(c.outerStart),outerEnd:s(c.outerEnd),innerStart:k3(c.innerStart,0,i),innerEnd:k3(c.innerEnd,0,i)}}function n8(e,t,a,r){return{x:a+e*Math.cos(t),y:r+e*Math.sin(t)}}function J7(e,t,a,r,c,n){const{x:i,y:s,startAngle:l,pixelMargin:f,innerRadius:u}=t,h=Math.max(t.outerRadius+r+a-f,0),d=u>0?u+r+a+f:0;let m=0;const p=c-l;if(r){const P=u>0?u-r:0,O=h>0?h-r:0,X=(P+O)/2,f1=X!==0?p*X/(X+r):p;m=(p-f1)/2}const v=Math.max(.001,p*h-a/A2)/h,g=(p-v)/2,x=l+g+m,z=c-g-m,{outerStart:C,outerEnd:b,innerStart:H,innerEnd:V}=Qj(t,d,h,z-x),y=h-C,A=h-b,E=x+C/y,Y=z-b/A,F=d+H,L=d+V,j=x+H/F,r1=z-V/L;if(e.beginPath(),n){const P=(E+Y)/2;if(e.arc(i,s,h,E,P),e.arc(i,s,h,P,Y),b>0){const K=n8(A,Y,i,s);e.arc(K.x,K.y,b,Y,z+i3)}const O=n8(L,z,i,s);if(e.lineTo(O.x,O.y),V>0){const K=n8(L,r1,i,s);e.arc(K.x,K.y,V,z+i3,r1+Math.PI)}const X=(z-V/d+(x+H/d))/2;if(e.arc(i,s,d,z-V/d,X,!0),e.arc(i,s,d,X,x+H/d,!0),H>0){const K=n8(F,j,i,s);e.arc(K.x,K.y,H,j+Math.PI,x-i3)}const f1=n8(y,x,i,s);if(e.lineTo(f1.x,f1.y),C>0){const K=n8(y,E,i,s);e.arc(K.x,K.y,C,x-i3,E)}}else{e.moveTo(i,s);const P=Math.cos(E)*h+i,O=Math.sin(E)*h+s;e.lineTo(P,O);const X=Math.cos(Y)*h+i,f1=Math.sin(Y)*h+s;e.lineTo(X,f1)}e.closePath()}function Kj(e,t,a,r,c){const{fullCircles:n,startAngle:i,circumference:s}=t;let l=t.endAngle;if(n){J7(e,t,a,r,l,c);for(let f=0;f<n;++f)e.fill();isNaN(s)||(l=i+(s%S2||S2))}return J7(e,t,a,r,l,c),e.fill(),l}function Jj(e,t,a,r,c){const{fullCircles:n,startAngle:i,circumference:s,options:l}=t,{borderWidth:f,borderJoinStyle:u,borderDash:h,borderDashOffset:d}=l,m=l.borderAlign==="inner";if(!f)return;e.setLineDash(h||[]),e.lineDashOffset=d,m?(e.lineWidth=f*2,e.lineJoin=u||"round"):(e.lineWidth=f,e.lineJoin=u||"bevel");let p=t.endAngle;if(n){J7(e,t,a,r,p,c);for(let v=0;v<n;++v)e.stroke();isNaN(s)||(p=i+(s%S2||S2))}m&&Xj(e,t,p),n||(J7(e,t,a,r,p,c),e.stroke())}class xt extends ee{constructor(a){super();o1(this,"circumference");o1(this,"endAngle");o1(this,"fullCircles");o1(this,"innerRadius");o1(this,"outerRadius");o1(this,"pixelMargin");o1(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,a&&Object.assign(this,a)}inRange(a,r,c){const n=this.getProps(["x","y"],c),{angle:i,distance:s}=kg(n,{x:a,y:r}),{startAngle:l,endAngle:f,innerRadius:u,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],c),m=(this.options.spacing+this.options.borderWidth)/2,p=q1(d,f-l),v=v5(i,l,f)&&l!==f,g=p>=S2||v,x=We(s,u+m,h+m);return g&&x}getCenterPoint(a){const{x:r,y:c,startAngle:n,endAngle:i,innerRadius:s,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],a),{offset:f,spacing:u}=this.options,h=(n+i)/2,d=(s+l+u+f)/2;return{x:r+Math.cos(h)*d,y:c+Math.sin(h)*d}}tooltipPosition(a){return this.getCenterPoint(a)}draw(a){const{options:r,circumference:c}=this,n=(r.offset||0)/4,i=(r.spacing||0)/2,s=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=c>S2?Math.floor(c/S2):0,c===0||this.innerRadius<0||this.outerRadius<0)return;a.save();const l=(this.startAngle+this.endAngle)/2;a.translate(Math.cos(l)*n,Math.sin(l)*n);const f=1-Math.sin(Math.min(A2,c||0)),u=n*f;a.fillStyle=r.backgroundColor,a.strokeStyle=r.borderColor,Kj(a,this,u,i,s),Jj(a,this,u,i,s),a.restore()}}o1(xt,"id","arc"),o1(xt,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),o1(xt,"defaultRoutes",{backgroundColor:"backgroundColor"}),o1(xt,"descriptors",{_scriptable:!0,_indexable:a=>a!=="borderDash"});function sx(e,t,a=t){e.lineCap=q1(a.borderCapStyle,t.borderCapStyle),e.setLineDash(q1(a.borderDash,t.borderDash)),e.lineDashOffset=q1(a.borderDashOffset,t.borderDashOffset),e.lineJoin=q1(a.borderJoinStyle,t.borderJoinStyle),e.lineWidth=q1(a.borderWidth,t.borderWidth),e.strokeStyle=q1(a.borderColor,t.borderColor)}function eG(e,t,a){e.lineTo(a.x,a.y)}function tG(e){return e.stepped?HW:e.tension||e.cubicInterpolationMode==="monotone"?VW:eG}function ox(e,t,a={}){const r=e.length,{start:c=0,end:n=r-1}=a,{start:i,end:s}=t,l=Math.max(c,i),f=Math.min(n,s),u=c<i&&n<i||c>s&&n>s;return{count:r,start:l,loop:t.loop,ilen:f<l&&!u?r+f-l:f-l}}function aG(e,t,a,r){const{points:c,options:n}=t,{count:i,start:s,loop:l,ilen:f}=ox(c,a,r),u=tG(n);let{move:h=!0,reverse:d}=r||{},m,p,v;for(m=0;m<=f;++m)p=c[(s+(d?f-m:m))%i],!p.skip&&(h?(e.moveTo(p.x,p.y),h=!1):u(e,v,p,d,n.stepped),v=p);return l&&(p=c[(s+(d?f:0))%i],u(e,v,p,d,n.stepped)),!!l}function rG(e,t,a,r){const c=t.points,{count:n,start:i,ilen:s}=ox(c,a,r),{move:l=!0,reverse:f}=r||{};let u=0,h=0,d,m,p,v,g,x;const z=b=>(i+(f?s-b:b))%n,C=()=>{v!==g&&(e.lineTo(u,g),e.lineTo(u,v),e.lineTo(u,x))};for(l&&(m=c[z(0)],e.moveTo(m.x,m.y)),d=0;d<=s;++d){if(m=c[z(d)],m.skip)continue;const b=m.x,H=m.y,V=b|0;V===p?(H<v?v=H:H>g&&(g=H),u=(h*u+b)/++h):(C(),e.lineTo(b,H),p=V,h=0,v=g=H),x=H}C()}function Hi(e){const t=e.options,a=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!a?rG:aG}function cG(e){return e.stepped?rY:e.tension||e.cubicInterpolationMode==="monotone"?cY:d6}function nG(e,t,a,r){let c=t._path;c||(c=t._path=new Path2D,t.path(c,a,r)&&c.closePath()),sx(e,t.options),e.stroke(c)}function iG(e,t,a,r){const{segments:c,options:n}=t,i=Hi(t);for(const s of c)sx(e,n,s.style),e.beginPath(),i(e,t,s,{start:a,end:a+r-1})&&e.closePath(),e.stroke()}const sG=typeof Path2D=="function";function oG(e,t,a,r){sG&&!t.options.segment?nG(e,t,a,r):iG(e,t,a,r)}class w0 extends ee{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,a){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const c=r.spanGaps?this._loop:this._fullLoop;XW(this._points,r,t,c,a),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=fY(this,this.options.segment))}first(){const t=this.segments,a=this.points;return t.length&&a[t[0].start]}last(){const t=this.segments,a=this.points,r=t.length;return r&&a[t[r-1].end]}interpolate(t,a){const r=this.options,c=t[a],n=this.points,i=qg(this,{property:a,start:c,end:c});if(!i.length)return;const s=[],l=cG(r);let f,u;for(f=0,u=i.length;f<u;++f){const{start:h,end:d}=i[f],m=n[h],p=n[d];if(m===p){s.push(m);continue}const v=Math.abs((c-m[a])/(p[a]-m[a])),g=l(m,p,v,r.stepped);g[a]=t[a],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,a,r){return Hi(this)(t,this,a,r)}path(t,a,r){const c=this.segments,n=Hi(this);let i=this._loop;a=a||0,r=r||this.points.length-a;for(const s of c)i&=n(t,this,s,{start:a,end:a+r-1});return!!i}draw(t,a,r,c){const n=this.options||{};(this.points||[]).length&&n.borderWidth&&(t.save(),oG(t,this,r,c),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}o1(w0,"id","line"),o1(w0,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),o1(w0,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),o1(w0,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function ju(e,t,a,r){const c=e.options,{[a]:n}=e.getProps([a],r);return Math.abs(t-n)<c.radius+c.hitRadius}class g7 extends ee{constructor(a){super();o1(this,"parsed");o1(this,"skip");o1(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,a&&Object.assign(this,a)}inRange(a,r,c){const n=this.options,{x:i,y:s}=this.getProps(["x","y"],c);return Math.pow(a-i,2)+Math.pow(r-s,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(a,r){return ju(this,a,"x",r)}inYRange(a,r){return ju(this,a,"y",r)}getCenterPoint(a){const{x:r,y:c}=this.getProps(["x","y"],a);return{x:r,y:c}}size(a){a=a||this.options||{};let r=a.radius||0;r=Math.max(r,r&&a.hoverRadius||0);const c=r&&a.borderWidth||0;return(r+c)*2}draw(a,r){const c=this.options;this.skip||c.radius<.1||!je(this,r,this.size(c)/2)||(a.strokeStyle=c.borderColor,a.lineWidth=c.borderWidth,a.fillStyle=c.backgroundColor,zi(a,c,this.x,this.y))}getRange(){const a=this.options||{};return a.radius+a.hitRadius}}o1(g7,"id","point"),o1(g7,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),o1(g7,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function lx(e,t){const{x:a,y:r,base:c,width:n,height:i}=e.getProps(["x","y","base","width","height"],t);let s,l,f,u,h;return e.horizontal?(h=i/2,s=Math.min(a,c),l=Math.max(a,c),f=r-h,u=r+h):(h=n/2,s=a-h,l=a+h,f=Math.min(r,c),u=Math.max(r,c)),{left:s,top:f,right:l,bottom:u}}function _0(e,t,a,r){return e?0:k3(t,a,r)}function lG(e,t,a){const r=e.options.borderWidth,c=e.borderSkipped,n=Dg(r);return{t:_0(c.top,n.top,0,a),r:_0(c.right,n.right,0,t),b:_0(c.bottom,n.bottom,0,a),l:_0(c.left,n.left,0,t)}}function fG(e,t,a){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),c=e.options.borderRadius,n=w6(c),i=Math.min(t,a),s=e.borderSkipped,l=r||r2(c);return{topLeft:_0(!l||s.top||s.left,n.topLeft,0,i),topRight:_0(!l||s.top||s.right,n.topRight,0,i),bottomLeft:_0(!l||s.bottom||s.left,n.bottomLeft,0,i),bottomRight:_0(!l||s.bottom||s.right,n.bottomRight,0,i)}}function uG(e){const t=lx(e),a=t.right-t.left,r=t.bottom-t.top,c=lG(e,a/2,r/2),n=fG(e,a/2,r/2);return{outer:{x:t.left,y:t.top,w:a,h:r,radius:n},inner:{x:t.left+c.l,y:t.top+c.t,w:a-c.l-c.r,h:r-c.t-c.b,radius:{topLeft:Math.max(0,n.topLeft-Math.max(c.t,c.l)),topRight:Math.max(0,n.topRight-Math.max(c.t,c.r)),bottomLeft:Math.max(0,n.bottomLeft-Math.max(c.b,c.l)),bottomRight:Math.max(0,n.bottomRight-Math.max(c.b,c.r))}}}}function mn(e,t,a,r){const c=t===null,n=a===null,s=e&&!(c&&n)&&lx(e,r);return s&&(c||We(t,s.left,s.right))&&(n||We(a,s.top,s.bottom))}function hG(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function dG(e,t){e.rect(t.x,t.y,t.w,t.h)}function pn(e,t,a={}){const r=e.x!==a.x?-t:0,c=e.y!==a.y?-t:0,n=(e.x+e.w!==a.x+a.w?t:0)-r,i=(e.y+e.h!==a.y+a.h?t:0)-c;return{x:e.x+r,y:e.y+c,w:e.w+n,h:e.h+i,radius:e.radius}}class x7 extends ee{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){const{inflateAmount:a,options:{borderColor:r,backgroundColor:c}}=this,{inner:n,outer:i}=uG(this),s=hG(i.radius)?g5:dG;t.save(),(i.w!==n.w||i.h!==n.h)&&(t.beginPath(),s(t,pn(i,a,n)),t.clip(),s(t,pn(n,-a,i)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,pn(n,a)),t.fillStyle=c,t.fill(),t.restore()}inRange(t,a,r){return mn(this,t,a,r)}inXRange(t,a){return mn(this,t,null,a)}inYRange(t,a){return mn(this,null,t,a)}getCenterPoint(t){const{x:a,y:r,base:c,horizontal:n}=this.getProps(["x","y","base","horizontal"],t);return{x:n?(a+c)/2:a,y:n?r:(r+c)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}o1(x7,"id","bar"),o1(x7,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),o1(x7,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var mG=Object.freeze({__proto__:null,ArcElement:xt,BarElement:x7,LineElement:w0,PointElement:g7});const Vi=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Gu=Vi.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function fx(e){return Vi[e%Vi.length]}function ux(e){return Gu[e%Gu.length]}function pG(e,t){return e.borderColor=fx(t),e.backgroundColor=ux(t),++t}function vG(e,t){return e.backgroundColor=e.data.map(()=>fx(t++)),t}function gG(e,t){return e.backgroundColor=e.data.map(()=>ux(t++)),t}function xG(e){let t=0;return(a,r)=>{const c=e.getDatasetMeta(r).controller;c instanceof z6?t=vG(a,t):c instanceof Ot?t=gG(a,t):c&&(t=pG(a,t))}}function qu(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function CG(e){return e&&(e.borderColor||e.backgroundColor)}function zG(){return D2.borderColor!=="rgba(0,0,0,0.1)"||D2.backgroundColor!=="rgba(0,0,0,0.1)"}var MG={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,a){if(!a.enabled)return;const{data:{datasets:r},options:c}=e.config,{elements:n}=c,i=qu(r)||CG(c)||n&&qu(n)||zG();if(!a.forceOverride&&i)return;const s=xG(e);r.forEach(s)}};function yG(e,t,a,r,c){const n=c.samples||r;if(n>=a)return e.slice(t,t+a);const i=[],s=(a-2)/(n-2);let l=0;const f=t+a-1;let u=t,h,d,m,p,v;for(i[l++]=e[u],h=0;h<n-2;h++){let g=0,x=0,z;const C=Math.floor((h+1)*s)+1+t,b=Math.min(Math.floor((h+2)*s)+1,a)+t,H=b-C;for(z=C;z<b;z++)g+=e[z].x,x+=e[z].y;g/=H,x/=H;const V=Math.floor(h*s)+1+t,y=Math.min(Math.floor((h+1)*s)+1,a)+t,{x:A,y:E}=e[u];for(m=p=-1,z=V;z<y;z++)p=.5*Math.abs((A-g)*(e[z].y-E)-(A-e[z].x)*(x-E)),p>m&&(m=p,d=e[z],v=z);i[l++]=d,u=v}return i[l++]=e[f],i}function bG(e,t,a,r){let c=0,n=0,i,s,l,f,u,h,d,m,p,v;const g=[],x=t+a-1,z=e[t].x,b=e[x].x-z;for(i=t;i<t+a;++i){s=e[i],l=(s.x-z)/b*r,f=s.y;const H=l|0;if(H===u)f<p?(p=f,h=i):f>v&&(v=f,d=i),c=(n*c+s.x)/++n;else{const V=i-1;if(!l2(h)&&!l2(d)){const y=Math.min(h,d),A=Math.max(h,d);y!==m&&y!==V&&g.push({...e[y],x:c}),A!==m&&A!==V&&g.push({...e[A],x:c})}i>0&&V!==m&&g.push(e[V]),g.push(s),u=H,n=0,p=v=f,h=d=m=i}}return g}function hx(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Xu(e){e.data.datasets.forEach(t=>{hx(t)})}function HG(e,t){const a=t.length;let r=0,c;const{iScale:n}=e,{min:i,max:s,minDefined:l,maxDefined:f}=n.getUserBounds();return l&&(r=k3(Ye(t,n.axis,i).lo,0,a-1)),f?c=k3(Ye(t,n.axis,s).hi+1,r,a)-r:c=a-r,{start:r,count:c}}var VG={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,a)=>{if(!a.enabled){Xu(e);return}const r=e.width;e.data.datasets.forEach((c,n)=>{const{_data:i,indexAxis:s}=c,l=e.getDatasetMeta(n),f=i||c.data;if(vt([s,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:h,count:d}=HG(l,f);const m=a.threshold||4*r;if(d<=m){hx(c);return}l2(i)&&(c._data=f,delete c.data,Object.defineProperty(c,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(v){this._data=v}}));let p;switch(a.algorithm){case"lttb":p=yG(f,h,d,r,a);break;case"min-max":p=bG(f,h,d,r);break;default:throw new Error(`Unsupported decimation algorithm '${a.algorithm}'`)}c._decimated=p})},destroy(e){Xu(e)}};function wG(e,t,a){const r=e.segments,c=e.points,n=t.points,i=[];for(const s of r){let{start:l,end:f}=s;f=F9(l,f,c);const u=wi(a,c[l],c[f],s.loop);if(!t.segments){i.push({source:s,target:u,start:c[l],end:c[f]});continue}const h=qg(t,u);for(const d of h){const m=wi(a,n[d.start],n[d.end],d.loop),p=Gg(s,c,m);for(const v of p)i.push({source:v,target:d,start:{[a]:Zu(u,m,"start",Math.max)},end:{[a]:Zu(u,m,"end",Math.min)}})}}return i}function wi(e,t,a,r){if(r)return;let c=t[e],n=a[e];return e==="angle"&&(c=u4(c),n=u4(n)),{property:e,start:c,end:n}}function _G(e,t){const{x:a=null,y:r=null}=e||{},c=t.points,n=[];return t.segments.forEach(({start:i,end:s})=>{s=F9(i,s,c);const l=c[i],f=c[s];r!==null?(n.push({x:l.x,y:r}),n.push({x:f.x,y:r})):a!==null&&(n.push({x:a,y:l.y}),n.push({x:a,y:f.y}))}),n}function F9(e,t,a){for(;t>e;t--){const r=a[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function Zu(e,t,a,r){return e&&t?r(e[a],t[a]):e?e[a]:t?t[a]:0}function dx(e,t){let a=[],r=!1;return k2(e)?(r=!0,a=e):a=_G(e,t),a.length?new w0({points:a,options:{tension:0},_loop:r,_fullLoop:r}):null}function Qu(e){return e&&e.fill!==!1}function kG(e,t,a){let c=e[t].fill;const n=[t];let i;if(!a)return c;for(;c!==!1&&n.indexOf(c)===-1;){if(!q2(c))return c;if(i=e[c],!i)return!1;if(i.visible)return c;n.push(c),c=i.fill}return!1}function LG(e,t,a){const r=NG(e);if(r2(r))return isNaN(r.value)?!1:r;let c=parseFloat(r);return q2(c)&&Math.floor(c)===c?SG(r[0],t,c,a):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function SG(e,t,a,r){return(e==="-"||e==="+")&&(a=t+a),a===t||a<0||a>=r?!1:a}function AG(e,t){let a=null;return e==="start"?a=t.bottom:e==="end"?a=t.top:r2(e)?a=t.getPixelForValue(e.value):t.getBasePixel&&(a=t.getBasePixel()),a}function TG(e,t,a){let r;return e==="start"?r=a:e==="end"?r=t.options.reverse?t.min:t.max:r2(e)?r=e.value:r=t.getBaseValue(),r}function NG(e){const t=e.options,a=t.fill;let r=q1(a&&a.target,a);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function EG(e){const{scale:t,index:a,line:r}=e,c=[],n=r.segments,i=r.points,s=PG(t,a);s.push(dx({x:null,y:t.bottom},r));for(let l=0;l<n.length;l++){const f=n[l];for(let u=f.start;u<=f.end;u++)FG(c,i[u],s)}return new w0({points:c,options:{}})}function PG(e,t){const a=[],r=e.getMatchingVisibleMetas("line");for(let c=0;c<r.length;c++){const n=r[c];if(n.index===t)break;n.hidden||a.unshift(n.dataset)}return a}function FG(e,t,a){const r=[];for(let c=0;c<a.length;c++){const n=a[c],{first:i,last:s,point:l}=DG(n,t,"x");if(!(!l||i&&s)){if(i)r.unshift(l);else if(e.push(l),!s)break}}e.push(...r)}function DG(e,t,a){const r=e.interpolate(t,a);if(!r)return{};const c=r[a],n=e.segments,i=e.points;let s=!1,l=!1;for(let f=0;f<n.length;f++){const u=n[f],h=i[u.start][a],d=i[u.end][a];if(We(c,h,d)){s=c===h,l=c===d;break}}return{first:s,last:l,point:r}}class mx{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,a,r){const{x:c,y:n,radius:i}=this;return a=a||{start:0,end:S2},t.arc(c,n,i,a.end,a.start,!0),!r.bounds}interpolate(t){const{x:a,y:r,radius:c}=this,n=t.angle;return{x:a+Math.cos(n)*c,y:r+Math.sin(n)*c,angle:n}}}function BG(e){const{chart:t,fill:a,line:r}=e;if(q2(a))return OG(t,a);if(a==="stack")return EG(e);if(a==="shape")return!0;const c=RG(e);return c instanceof mx?c:dx(c,r)}function OG(e,t){const a=e.getDatasetMeta(t);return a&&e.isDatasetVisible(t)?a.dataset:null}function RG(e){return(e.scale||{}).getPointPositionForValue?$G(e):IG(e)}function IG(e){const{scale:t={},fill:a}=e,r=AG(a,t);if(q2(r)){const c=t.isHorizontal();return{x:c?r:null,y:c?null:r}}return null}function $G(e){const{scale:t,fill:a}=e,r=t.options,c=t.getLabels().length,n=r.reverse?t.max:t.min,i=TG(a,t,n),s=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,n);return new mx({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(i)})}for(let l=0;l<c;++l)s.push(t.getPointPositionForValue(l,i));return s}function vn(e,t,a){const r=BG(t),{line:c,scale:n,axis:i}=t,s=c.options,l=s.fill,f=s.backgroundColor,{above:u=f,below:h=f}=l||{};r&&c.points.length&&(qr(e,a),UG(e,{line:c,target:r,above:u,below:h,area:a,scale:n,axis:i}),Xr(e))}function UG(e,t){const{line:a,target:r,above:c,below:n,area:i,scale:s}=t,l=a._loop?"angle":t.axis;e.save(),l==="x"&&n!==c&&(Ku(e,r,i.top),Ju(e,{line:a,target:r,color:c,scale:s,property:l}),e.restore(),e.save(),Ku(e,r,i.bottom)),Ju(e,{line:a,target:r,color:n,scale:s,property:l}),e.restore()}function Ku(e,t,a){const{segments:r,points:c}=t;let n=!0,i=!1;e.beginPath();for(const s of r){const{start:l,end:f}=s,u=c[l],h=c[F9(l,f,c)];n?(e.moveTo(u.x,u.y),n=!1):(e.lineTo(u.x,a),e.lineTo(u.x,u.y)),i=!!t.pathSegment(e,s,{move:i}),i?e.closePath():e.lineTo(h.x,a)}e.lineTo(t.first().x,a),e.closePath(),e.clip()}function Ju(e,t){const{line:a,target:r,property:c,color:n,scale:i}=t,s=wG(a,r,c);for(const{source:l,target:f,start:u,end:h}of s){const{style:{backgroundColor:d=n}={}}=l,m=r!==!0;e.save(),e.fillStyle=d,WG(e,i,m&&wi(c,u,h)),e.beginPath();const p=!!a.pathSegment(e,l);let v;if(m){p?e.closePath():eh(e,r,h,c);const g=!!r.pathSegment(e,f,{move:p,reverse:!0});v=p&&g,v||eh(e,r,u,c)}e.closePath(),e.fill(v?"evenodd":"nonzero"),e.restore()}}function WG(e,t,a){const{top:r,bottom:c}=t.chart.chartArea,{property:n,start:i,end:s}=a||{};n==="x"&&(e.beginPath(),e.rect(i,r,s-i,c-r),e.clip())}function eh(e,t,a,r){const c=t.interpolate(a,r);c&&e.lineTo(c.x,c.y)}var YG={id:"filler",afterDatasetsUpdate(e,t,a){const r=(e.data.datasets||[]).length,c=[];let n,i,s,l;for(i=0;i<r;++i)n=e.getDatasetMeta(i),s=n.dataset,l=null,s&&s.options&&s instanceof w0&&(l={visible:e.isDatasetVisible(i),index:i,fill:LG(s,i,r),chart:e,axis:n.controller.options.indexAxis,scale:n.vScale,line:s}),n.$filler=l,c.push(l);for(i=0;i<r;++i)l=c[i],!(!l||l.fill===!1)&&(l.fill=kG(c,i,a.propagate))},beforeDraw(e,t,a){const r=a.drawTime==="beforeDraw",c=e.getSortedVisibleDatasetMetas(),n=e.chartArea;for(let i=c.length-1;i>=0;--i){const s=c[i].$filler;s&&(s.line.updateControlPoints(n,s.axis),r&&s.fill&&vn(e.ctx,s,n))}},beforeDatasetsDraw(e,t,a){if(a.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let c=r.length-1;c>=0;--c){const n=r[c].$filler;Qu(n)&&vn(e.ctx,n,e.chartArea)}},beforeDatasetDraw(e,t,a){const r=t.meta.$filler;!Qu(r)||a.drawTime!=="beforeDatasetDraw"||vn(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const th=(e,t)=>{let{boxHeight:a=t,boxWidth:r=t}=e;return e.usePointStyle&&(a=Math.min(a,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:a,itemHeight:Math.max(t,a)}},jG=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class ah extends ee{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,a,r){this.maxWidth=t,this.maxHeight=a,this._margins=r,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(){const t=this.options.labels||{};let a=M2(t.generateLabels,[this.chart],this)||[];t.filter&&(a=a.filter(r=>t.filter(r,this.chart.data))),t.sort&&(a=a.sort((r,c)=>t.sort(r,c,this.chart.data))),this.options.reverse&&a.reverse(),this.legendItems=a}fit(){const{options:t,ctx:a}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,c=z3(r.font),n=c.size,i=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=th(r,n);let f,u;a.font=c.string,this.isHorizontal()?(f=this.maxWidth,u=this._fitRows(i,n,s,l)+10):(u=this.maxHeight,f=this._fitCols(i,c,s,l)+10),this.width=Math.min(f,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,a,r,c){const{ctx:n,maxWidth:i,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],f=this.lineWidths=[0],u=c+s;let h=t;n.textAlign="left",n.textBaseline="middle";let d=-1,m=-u;return this.legendItems.forEach((p,v)=>{const g=r+a/2+n.measureText(p.text).width;(v===0||f[f.length-1]+g+2*s>i)&&(h+=u,f[f.length-(v>0?0:1)]=0,m+=u,d++),l[v]={left:0,top:m,row:d,width:g,height:c},f[f.length-1]+=g+s}),h}_fitCols(t,a,r,c){const{ctx:n,maxHeight:i,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],f=this.columnSizes=[],u=i-t;let h=s,d=0,m=0,p=0,v=0;return this.legendItems.forEach((g,x)=>{const{itemWidth:z,itemHeight:C}=GG(r,a,n,g,c);x>0&&m+C+2*s>u&&(h+=d+s,f.push({width:d,height:m}),p+=d+s,v++,d=m=0),l[x]={left:p,top:m,col:v,width:z,height:C},d=Math.max(d,z),m+=C+s}),h+=d,f.push({width:d,height:m}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:a,options:{align:r,labels:{padding:c},rtl:n}}=this,i=M8(n,this.left,this.width);if(this.isHorizontal()){let s=0,l=D3(r,this.left+c,this.right-this.lineWidths[s]);for(const f of a)s!==f.row&&(s=f.row,l=D3(r,this.left+c,this.right-this.lineWidths[s])),f.top+=this.top+t+c,f.left=i.leftForLtr(i.x(l),f.width),l+=f.width+c}else{let s=0,l=D3(r,this.top+t+c,this.bottom-this.columnSizes[s].height);for(const f of a)f.col!==s&&(s=f.col,l=D3(r,this.top+t+c,this.bottom-this.columnSizes[s].height)),f.top=l,f.left+=this.left+c,f.left=i.leftForLtr(i.x(f.left),f.width),l+=f.height+c}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;qr(t,this),this._draw(),Xr(t)}}_draw(){const{options:t,columnSizes:a,lineWidths:r,ctx:c}=this,{align:n,labels:i}=t,s=D2.color,l=M8(t.rtl,this.left,this.width),f=z3(i.font),{padding:u}=i,h=f.size,d=h/2;let m;this.drawTitle(),c.textAlign=l.textAlign("left"),c.textBaseline="middle",c.lineWidth=.5,c.font=f.string;const{boxWidth:p,boxHeight:v,itemHeight:g}=th(i,h),x=function(V,y,A){if(isNaN(p)||p<=0||isNaN(v)||v<0)return;c.save();const E=q1(A.lineWidth,1);if(c.fillStyle=q1(A.fillStyle,s),c.lineCap=q1(A.lineCap,"butt"),c.lineDashOffset=q1(A.lineDashOffset,0),c.lineJoin=q1(A.lineJoin,"miter"),c.lineWidth=E,c.strokeStyle=q1(A.strokeStyle,s),c.setLineDash(q1(A.lineDash,[])),i.usePointStyle){const Y={radius:v*Math.SQRT2/2,pointStyle:A.pointStyle,rotation:A.rotation,borderWidth:E},F=l.xPlus(V,p/2),L=y+d;Fg(c,Y,F,L,i.pointStyleWidth&&p)}else{const Y=y+Math.max((h-v)/2,0),F=l.leftForLtr(V,p),L=w6(A.borderRadius);c.beginPath(),Object.values(L).some(j=>j!==0)?g5(c,{x:F,y:Y,w:p,h:v,radius:L}):c.rect(F,Y,p,v),c.fill(),E!==0&&c.stroke()}c.restore()},z=function(V,y,A){E6(c,A.text,V,y+g/2,f,{strikethrough:A.hidden,textAlign:l.textAlign(A.textAlign)})},C=this.isHorizontal(),b=this._computeTitleHeight();C?m={x:D3(n,this.left+u,this.right-r[0]),y:this.top+u+b,line:0}:m={x:this.left+u,y:D3(n,this.top+b+u,this.bottom-a[0].height),line:0},Wg(this.ctx,t.textDirection);const H=g+u;this.legendItems.forEach((V,y)=>{c.strokeStyle=V.fontColor,c.fillStyle=V.fontColor;const A=c.measureText(V.text).width,E=l.textAlign(V.textAlign||(V.textAlign=i.textAlign)),Y=p+d+A;let F=m.x,L=m.y;l.setWidth(this.width),C?y>0&&F+Y+u>this.right&&(L=m.y+=H,m.line++,F=m.x=D3(n,this.left+u,this.right-r[m.line])):y>0&&L+H>this.bottom&&(F=m.x=F+a[m.line].width+u,m.line++,L=m.y=D3(n,this.top+b+u,this.bottom-a[m.line].height));const j=l.x(F);if(x(j,L,V),F=dW(E,F+p+d,C?F+Y:this.right,t.rtl),z(l.x(F),L,V),C)m.x+=Y+u;else if(typeof V.text!="string"){const r1=f.lineHeight;m.y+=px(V,r1)+u}else m.y+=H}),Yg(this.ctx,t.textDirection)}drawTitle(){const t=this.options,a=t.title,r=z3(a.font),c=j3(a.padding);if(!a.display)return;const n=M8(t.rtl,this.left,this.width),i=this.ctx,s=a.position,l=r.size/2,f=c.top+l;let u,h=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),u=this.top+f,h=D3(t.align,h,this.right-d);else{const p=this.columnSizes.reduce((v,g)=>Math.max(v,g.height),0);u=f+D3(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const m=D3(s,h,h+d);i.textAlign=n.textAlign(_9(s)),i.textBaseline="middle",i.strokeStyle=a.color,i.fillStyle=a.color,i.font=r.string,E6(i,a.text,m,u,r)}_computeTitleHeight(){const t=this.options.title,a=z3(t.font),r=j3(t.padding);return t.display?a.lineHeight+r.height:0}_getLegendItemAt(t,a){let r,c,n;if(We(t,this.left,this.right)&&We(a,this.top,this.bottom)){for(n=this.legendHitBoxes,r=0;r<n.length;++r)if(c=n[r],We(t,c.left,c.left+c.width)&&We(a,c.top,c.top+c.height))return this.legendItems[r]}return null}handleEvent(t){const a=this.options;if(!ZG(t.type,a))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const c=this._hoveredItem,n=jG(c,r);c&&!n&&M2(a.onLeave,[t,c,this],this),this._hoveredItem=r,r&&!n&&M2(a.onHover,[t,r,this],this)}else r&&M2(a.onClick,[t,r,this],this)}}function GG(e,t,a,r,c){const n=qG(r,e,t,a),i=XG(c,r,t.lineHeight);return{itemWidth:n,itemHeight:i}}function qG(e,t,a,r){let c=e.text;return c&&typeof c!="string"&&(c=c.reduce((n,i)=>n.length>i.length?n:i)),t+a.size/2+r.measureText(c).width}function XG(e,t,a){let r=e;return typeof t.text!="string"&&(r=px(t,a)),r}function px(e,t){const a=e.text?e.text.length:0;return t*a}function ZG(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var QG={id:"legend",_element:ah,start(e,t,a){const r=e.legend=new ah({ctx:e.ctx,options:a,chart:e});$3.configure(e,r,a),$3.addBox(e,r)},stop(e){$3.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,a){const r=e.legend;$3.configure(e,r,a),r.options=a},afterUpdate(e){const 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,a){const r=t.datasetIndex,c=a.chart;c.isDatasetVisible(r)?(c.hide(r),t.hidden=!0):(c.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:a,pointStyle:r,textAlign:c,color:n,useBorderRadius:i,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const f=l.controller.getStyle(a?0:void 0),u=j3(f.borderWidth);return{text:t[l.index].label,fillStyle:f.backgroundColor,fontColor:n,hidden:!l.visible,lineCap:f.borderCapStyle,lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:f.borderColor,pointStyle:r||f.pointStyle,rotation:f.rotation,textAlign:c||f.textAlign,borderRadius:i&&(s||f.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)}}};class D9 extends ee{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,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.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,a){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=a;const c=k2(r.text)?r.text.length:1;this._padding=j3(r.padding);const n=c*z3(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=n:this.width=n}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:a,left:r,bottom:c,right:n,options:i}=this,s=i.align;let l=0,f,u,h;return this.isHorizontal()?(u=D3(s,r,n),h=a+t,f=n-r):(i.position==="left"?(u=r+t,h=D3(s,c,a),l=A2*-.5):(u=n-t,h=D3(s,a,c),l=A2*.5),f=c-a),{titleX:u,titleY:h,maxWidth:f,rotation:l}}draw(){const t=this.ctx,a=this.options;if(!a.display)return;const r=z3(a.font),n=r.lineHeight/2+this._padding.top,{titleX:i,titleY:s,maxWidth:l,rotation:f}=this._drawArgs(n);E6(t,a.text,0,0,r,{color:a.color,maxWidth:l,rotation:f,textAlign:_9(a.align),textBaseline:"middle",translation:[i,s]})}}function KG(e,t){const a=new D9({ctx:e.ctx,options:t,chart:e});$3.configure(e,a,t),$3.addBox(e,a),e.titleBlock=a}var JG={id:"title",_element:D9,start(e,t,a){KG(e,a)},stop(e){const t=e.titleBlock;$3.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,a){const r=e.titleBlock;$3.configure(e,r,a),r.options=a},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ua=new WeakMap;var eq={id:"subtitle",start(e,t,a){const r=new D9({ctx:e.ctx,options:a,chart:e});$3.configure(e,r,a),$3.addBox(e,r),Ua.set(e,r)},stop(e){$3.removeBox(e,Ua.get(e)),Ua.delete(e)},beforeUpdate(e,t,a){const r=Ua.get(e);$3.configure(e,r,a),r.options=a},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ct={average(e){if(!e.length)return!1;let t,a,r=new Set,c=0,n=0;for(t=0,a=e.length;t<a;++t){const s=e[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();r.add(l.x),c+=l.y,++n}}return n===0||r.size===0?!1:{x:[...r].reduce((s,l)=>s+l)/r.size,y:c/n}},nearest(e,t){if(!e.length)return!1;let a=t.x,r=t.y,c=Number.POSITIVE_INFINITY,n,i,s;for(n=0,i=e.length;n<i;++n){const l=e[n].element;if(l&&l.hasValue()){const f=l.getCenterPoint(),u=xi(t,f);u<c&&(c=u,s=l)}}if(s){const l=s.tooltipPosition();a=l.x,r=l.y}return{x:a,y:r}}};function fe(e,t){return t&&(k2(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Fe(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
793
793
|
`)>-1?e.split(`
|
|
794
|
-
`):e}function tq(e,t){const{element:a,datasetIndex:r,index:c}=t,n=e.getDatasetMeta(r).controller,{label:i,value:s}=n.getLabelAndValue(c);return{chart:e,label:i,parsed:n.getParsed(c),raw:e.data.datasets[r].data[c],formattedValue:s,dataset:n.getDataset(),dataIndex:c,datasetIndex:r,element:a}}function rh(e,t){const a=e.chart.ctx,{body:r,footer:c,title:n}=e,{boxWidth:i,boxHeight:s}=t,l=z3(t.bodyFont),f=z3(t.titleFont),u=z3(t.footerFont),h=n.length,d=c.length,m=r.length,p=j3(t.padding);let v=p.height,g=0,x=r.reduce((b,H)=>b+H.before.length+H.lines.length+H.after.length,0);if(x+=e.beforeBody.length+e.afterBody.length,h&&(v+=h*f.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),x){const b=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;v+=m*b+(x-m)*l.lineHeight+(x-1)*t.bodySpacing}d&&(v+=t.footerMarginTop+d*u.lineHeight+(d-1)*t.footerSpacing);let z=0;const C=function(b){g=Math.max(g,a.measureText(b).width+z)};return a.save(),a.font=f.string,g2(e.title,C),a.font=l.string,g2(e.beforeBody.concat(e.afterBody),C),z=t.displayColors?i+2+t.boxPadding:0,g2(r,b=>{g2(b.before,C),g2(b.lines,C),g2(b.after,C)}),z=0,a.font=u.string,g2(e.footer,C),a.restore(),g+=p.width,{width:g,height:v}}function aq(e,t){const{y:a,height:r}=t;return a<r/2?"top":a>e.height-r/2?"bottom":"center"}function rq(e,t,a,r){const{x:c,width:n}=r,i=a.caretSize+a.caretPadding;if(e==="left"&&c+n+i>t.width||e==="right"&&c-n-i<0)return!0}function cq(e,t,a,r){const{x:c,width:n}=a,{width:i,chartArea:{left:s,right:l}}=e;let f="center";return r==="center"?f=c<=(s+l)/2?"left":"right":c<=n/2?f="left":c>=i-n/2&&(f="right"),rq(f,e,t,a)&&(f="center"),f}function ch(e,t,a){const r=a.yAlign||t.yAlign||aq(e,a);return{xAlign:a.xAlign||t.xAlign||cq(e,t,a,r),yAlign:r}}function nq(e,t){let{x:a,width:r}=e;return t==="right"?a-=r:t==="center"&&(a-=r/2),a}function iq(e,t,a){let{y:r,height:c}=e;return t==="top"?r+=a:t==="bottom"?r-=c+a:r-=c/2,r}function nh(e,t,a,r){const{caretSize:c,caretPadding:n,cornerRadius:i}=e,{xAlign:s,yAlign:l}=a,f=c+n,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:m}=w6(i);let p=nq(t,s);const v=iq(t,l,f);return l==="center"?s==="left"?p+=f:s==="right"&&(p-=f):s==="left"?p-=Math.max(u,d)+c:s==="right"&&(p+=Math.max(h,m)+c),{x:k3(p,0,r.width-t.width),y:k3(v,0,r.height-t.height)}}function Wa(e,t,a){const r=j3(a.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function ih(e){return fe([],Fe(e))}function sq(e,t,a){return K0(e,{tooltip:t,tooltipItems:a,type:"tooltip"})}function sh(e,t){const a=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return a?e.override(a):e}const vx={beforeTitle:Ee,title(e){if(e.length>0){const t=e[0],a=t.chart.data.labels,r=a?a.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return a[t.dataIndex]}return""},afterTitle:Ee,beforeBody:Ee,beforeLabel:Ee,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const a=e.formattedValue;return l2(a)||(t+=a),t},labelColor(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:a.borderColor,backgroundColor:a.backgroundColor,borderWidth:a.borderWidth,borderDash:a.borderDash,borderDashOffset:a.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:a.pointStyle,rotation:a.rotation}},afterLabel:Ee,afterBody:Ee,beforeFooter:Ee,footer:Ee,afterFooter:Ee};function a4(e,t,a,r){const c=e[t].call(a,r);return typeof c>"u"?vx[t].call(a,r):c}class _i extends ee{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(){const t=this._cachedAnimations;if(t)return t;const a=this.chart,r=this.options.setContext(this.getContext()),c=r.enabled&&a.options.animation&&r.animations,n=new Xg(this.chart,c);return c._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=sq(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,a){const{callbacks:r}=a,c=a4(r,"beforeTitle",this,t),n=a4(r,"title",this,t),i=a4(r,"afterTitle",this,t);let s=[];return s=fe(s,Fe(c)),s=fe(s,Fe(n)),s=fe(s,Fe(i)),s}getBeforeBody(t,a){return ih(a4(a.callbacks,"beforeBody",this,t))}getBody(t,a){const{callbacks:r}=a,c=[];return g2(t,n=>{const i={before:[],lines:[],after:[]},s=sh(r,n);fe(i.before,Fe(a4(s,"beforeLabel",this,n))),fe(i.lines,a4(s,"label",this,n)),fe(i.after,Fe(a4(s,"afterLabel",this,n))),c.push(i)}),c}getAfterBody(t,a){return ih(a4(a.callbacks,"afterBody",this,t))}getFooter(t,a){const{callbacks:r}=a,c=a4(r,"beforeFooter",this,t),n=a4(r,"footer",this,t),i=a4(r,"afterFooter",this,t);let s=[];return s=fe(s,Fe(c)),s=fe(s,Fe(n)),s=fe(s,Fe(i)),s}_createItems(t){const a=this._active,r=this.chart.data,c=[],n=[],i=[];let s=[],l,f;for(l=0,f=a.length;l<f;++l)s.push(tq(this.chart,a[l]));return t.filter&&(s=s.filter((u,h,d)=>t.filter(u,h,d,r))),t.itemSort&&(s=s.sort((u,h)=>t.itemSort(u,h,r))),g2(s,u=>{const h=sh(t.callbacks,u);c.push(a4(h,"labelColor",this,u)),n.push(a4(h,"labelPointStyle",this,u)),i.push(a4(h,"labelTextColor",this,u))}),this.labelColors=c,this.labelPointStyles=n,this.labelTextColors=i,this.dataPoints=s,s}update(t,a){const r=this.options.setContext(this.getContext()),c=this._active;let n,i=[];if(!c.length)this.opacity!==0&&(n={opacity:0});else{const s=Ct[r.position].call(this,c,this._eventPosition);i=this._createItems(r),this.title=this.getTitle(i,r),this.beforeBody=this.getBeforeBody(i,r),this.body=this.getBody(i,r),this.afterBody=this.getAfterBody(i,r),this.footer=this.getFooter(i,r);const l=this._size=rh(this,r),f=Object.assign({},s,l),u=ch(this.chart,r,f),h=nh(r,f,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,n={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=i,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:a})}drawCaret(t,a,r,c){const n=this.getCaretPosition(t,r,c);a.lineTo(n.x1,n.y1),a.lineTo(n.x2,n.y2),a.lineTo(n.x3,n.y3)}getCaretPosition(t,a,r){const{xAlign:c,yAlign:n}=this,{caretSize:i,cornerRadius:s}=r,{topLeft:l,topRight:f,bottomLeft:u,bottomRight:h}=w6(s),{x:d,y:m}=t,{width:p,height:v}=a;let g,x,z,C,b,H;return n==="center"?(b=m+v/2,c==="left"?(g=d,x=g-i,C=b+i,H=b-i):(g=d+p,x=g+i,C=b-i,H=b+i),z=g):(c==="left"?x=d+Math.max(l,u)+i:c==="right"?x=d+p-Math.max(f,h)-i:x=this.caretX,n==="top"?(C=m,b=C-i,g=x-i,z=x+i):(C=m+v,b=C+i,g=x+i,z=x-i),H=C),{x1:g,x2:x,x3:z,y1:C,y2:b,y3:H}}drawTitle(t,a,r){const c=this.title,n=c.length;let i,s,l;if(n){const f=M8(r.rtl,this.x,this.width);for(t.x=Wa(this,r.titleAlign,r),a.textAlign=f.textAlign(r.titleAlign),a.textBaseline="middle",i=z3(r.titleFont),s=r.titleSpacing,a.fillStyle=r.titleColor,a.font=i.string,l=0;l<n;++l)a.fillText(c[l],f.x(t.x),t.y+i.lineHeight/2),t.y+=i.lineHeight+s,l+1===n&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,a,r,c,n){const i=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:f}=n,u=z3(n.bodyFont),h=Wa(this,"left",n),d=c.x(h),m=l<u.lineHeight?(u.lineHeight-l)/2:0,p=a.y+m;if(n.usePointStyle){const v={radius:Math.min(f,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=c.leftForLtr(d,f)+f/2,x=p+l/2;t.strokeStyle=n.multiKeyBackground,t.fillStyle=n.multiKeyBackground,zi(t,v,g,x),t.strokeStyle=i.borderColor,t.fillStyle=i.backgroundColor,zi(t,v,g,x)}else{t.lineWidth=r2(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,t.strokeStyle=i.borderColor,t.setLineDash(i.borderDash||[]),t.lineDashOffset=i.borderDashOffset||0;const v=c.leftForLtr(d,f),g=c.leftForLtr(c.xPlus(d,1),f-2),x=w6(i.borderRadius);Object.values(x).some(z=>z!==0)?(t.beginPath(),t.fillStyle=n.multiKeyBackground,g5(t,{x:v,y:p,w:f,h:l,radius:x}),t.fill(),t.stroke(),t.fillStyle=i.backgroundColor,t.beginPath(),g5(t,{x:g,y:p+1,w:f-2,h:l-2,radius:x}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(v,p,f,l),t.strokeRect(v,p,f,l),t.fillStyle=i.backgroundColor,t.fillRect(g,p+1,f-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,a,r){const{body:c}=this,{bodySpacing:n,bodyAlign:i,displayColors:s,boxHeight:l,boxWidth:f,boxPadding:u}=r,h=z3(r.bodyFont);let d=h.lineHeight,m=0;const p=M8(r.rtl,this.x,this.width),v=function(A){a.fillText(A,p.x(t.x+m),t.y+d/2),t.y+=d+n},g=p.textAlign(i);let x,z,C,b,H,V,y;for(a.textAlign=i,a.textBaseline="middle",a.font=h.string,t.x=Wa(this,g,r),a.fillStyle=r.bodyColor,g2(this.beforeBody,v),m=s&&g!=="right"?i==="center"?f/2+u:f+2+u:0,b=0,V=c.length;b<V;++b){for(x=c[b],z=this.labelTextColors[b],a.fillStyle=z,g2(x.before,v),C=x.lines,s&&C.length&&(this._drawColorBox(a,t,b,p,r),d=Math.max(h.lineHeight,l)),H=0,y=C.length;H<y;++H)v(C[H]),d=h.lineHeight;g2(x.after,v)}m=0,d=h.lineHeight,g2(this.afterBody,v),t.y-=n}drawFooter(t,a,r){const c=this.footer,n=c.length;let i,s;if(n){const l=M8(r.rtl,this.x,this.width);for(t.x=Wa(this,r.footerAlign,r),t.y+=r.footerMarginTop,a.textAlign=l.textAlign(r.footerAlign),a.textBaseline="middle",i=z3(r.footerFont),a.fillStyle=r.footerColor,a.font=i.string,s=0;s<n;++s)a.fillText(c[s],l.x(t.x),t.y+i.lineHeight/2),t.y+=i.lineHeight+r.footerSpacing}}drawBackground(t,a,r,c){const{xAlign:n,yAlign:i}=this,{x:s,y:l}=t,{width:f,height:u}=r,{topLeft:h,topRight:d,bottomLeft:m,bottomRight:p}=w6(c.cornerRadius);a.fillStyle=c.backgroundColor,a.strokeStyle=c.borderColor,a.lineWidth=c.borderWidth,a.beginPath(),a.moveTo(s+h,l),i==="top"&&this.drawCaret(t,a,r,c),a.lineTo(s+f-d,l),a.quadraticCurveTo(s+f,l,s+f,l+d),i==="center"&&n==="right"&&this.drawCaret(t,a,r,c),a.lineTo(s+f,l+u-p),a.quadraticCurveTo(s+f,l+u,s+f-p,l+u),i==="bottom"&&this.drawCaret(t,a,r,c),a.lineTo(s+m,l+u),a.quadraticCurveTo(s,l+u,s,l+u-m),i==="center"&&n==="left"&&this.drawCaret(t,a,r,c),a.lineTo(s,l+h),a.quadraticCurveTo(s,l,s+h,l),a.closePath(),a.fill(),c.borderWidth>0&&a.stroke()}_updateAnimationTarget(t){const a=this.chart,r=this.$animations,c=r&&r.x,n=r&&r.y;if(c||n){const i=Ct[t.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=rh(this,t),l=Object.assign({},i,this._size),f=ch(a,t,l),u=nh(t,l,f,a);(c._to!==u.x||n._to!==u.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=s.width,this.height=s.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const a=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(a);const c={width:this.width,height:this.height},n={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const i=j3(a.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;a.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(n,t,c,a),Wg(t,a.textDirection),n.y+=i.top,this.drawTitle(n,t,a),this.drawBody(n,t,a),this.drawFooter(n,t,a),Yg(t,a.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,a){const r=this._active,c=t.map(({datasetIndex:s,index:l})=>{const f=this.chart.getDatasetMeta(s);if(!f)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:f.data[l],index:l}}),n=!G7(r,c),i=this._positionChanged(c,a);(n||i)&&(this._active=c,this._eventPosition=a,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,a,r=!0){if(a&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const c=this.options,n=this._active||[],i=this._getActiveElements(t,n,a,r),s=this._positionChanged(i,t),l=a||!G7(i,n)||s;return l&&(this._active=i,(c.enabled||c.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,a))),l}_getActiveElements(t,a,r,c){const n=this.options;if(t.type==="mouseout")return[];if(!c)return a.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const i=this.chart.getElementsAtEventForMode(t,n.mode,n,r);return n.reverse&&i.reverse(),i}_positionChanged(t,a){const{caretX:r,caretY:c,options:n}=this,i=Ct[n.position].call(this,t,a);return i!==!1&&(r!==i.x||c!==i.y)}}o1(_i,"positioners",Ct);var oq={id:"tooltip",_element:_i,positioners:Ct,afterInit(e,t,a){a&&(e.tooltip=new _i({chart:e,options:a}))},beforeUpdate(e,t,a){e.tooltip&&e.tooltip.initialize(a)},reset(e,t,a){e.tooltip&&e.tooltip.initialize(a)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const a={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...a,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",a)}},afterEvent(e,t){if(e.tooltip){const a=t.replay;e.tooltip.handleEvent(t.event,a,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:vx},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"]},lq=Object.freeze({__proto__:null,Colors:MG,Decimation:VG,Filler:YG,Legend:QG,SubTitle:eq,Title:JG,Tooltip:oq});const fq=(e,t,a,r)=>(typeof t=="string"?(a=e.push(t)-1,r.unshift({index:a,label:t})):isNaN(t)&&(a=null),a);function uq(e,t,a,r){const c=e.indexOf(t);if(c===-1)return fq(e,t,a,r);const n=e.lastIndexOf(t);return c!==n?a:c}const hq=(e,t)=>e===null?null:k3(Math.round(e),0,t);function oh(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class ki extends W6{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const a=this._addedLabels;if(a.length){const r=this.getLabels();for(const{index:c,label:n}of a)r[c]===n&&r.splice(c,1);this._addedLabels=[]}super.init(t)}parse(t,a){if(l2(t))return null;const r=this.getLabels();return a=isFinite(a)&&r[a]===t?a:uq(r,t,q1(a,t),this._addedLabels),hq(a,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let{min:r,max:c}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),a||(c=this.getLabels().length-1)),this.min=r,this.max=c}buildTicks(){const t=this.min,a=this.max,r=this.options.offset,c=[];let n=this.getLabels();n=t===0&&a===n.length-1?n:n.slice(t,a+1),this._valueRange=Math.max(n.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let i=t;i<=a;i++)c.push({value:i});return c}getLabelForValue(t){return oh.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){const a=this.ticks;return t<0||t>a.length-1?null:this.getPixelForValue(a[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}o1(ki,"id","category"),o1(ki,"defaults",{ticks:{callback:oh}});function dq(e,t){const a=[],{bounds:c,step:n,min:i,max:s,precision:l,count:f,maxTicks:u,maxDigits:h,includeBounds:d}=e,m=n||1,p=u-1,{min:v,max:g}=t,x=!l2(i),z=!l2(s),C=!l2(f),b=(g-v)/(h+1);let H=ru((g-v)/p/m)*m,V,y,A,E;if(H<1e-14&&!x&&!z)return[{value:v},{value:g}];E=Math.ceil(g/H)-Math.floor(v/H),E>p&&(H=ru(E*H/p/m)*m),l2(l)||(V=Math.pow(10,l),H=Math.ceil(H*V)/V),c==="ticks"?(y=Math.floor(v/H)*H,A=Math.ceil(g/H)*H):(y=v,A=g),x&&z&&n&&iW((s-i)/n,H/1e3)?(E=Math.round(Math.min((s-i)/H,u)),H=(s-i)/E,y=i,A=s):C?(y=x?i:y,A=z?s:A,E=f-1,H=(A-y)/E):(E=(A-y)/H,Ft(E,Math.round(E),H/1e3)?E=Math.round(E):E=Math.ceil(E));const Y=Math.max(cu(H),cu(y));V=Math.pow(10,l2(l)?Y:l),y=Math.round(y*V)/V,A=Math.round(A*V)/V;let F=0;for(x&&(d&&y!==i?(a.push({value:i}),y<i&&F++,Ft(Math.round((y+F*H)*V)/V,i,lh(i,b,e))&&F++):y<i&&F++);F<E;++F){const L=Math.round((y+F*H)*V)/V;if(z&&L>s)break;a.push({value:L})}return z&&d&&A!==s?a.length&&Ft(a[a.length-1].value,s,lh(s,b,e))?a[a.length-1].value=s:a.push({value:s}):(!z||A===s)&&a.push({value:A}),a}function lh(e,t,{horizontal:a,minRotation:r}){const c=$4(r),n=(a?Math.sin(c):Math.cos(c))||.001,i=.75*t*(""+e).length;return Math.min(t/n,i)}class er extends W6{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,a){return l2(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:a,maxDefined:r}=this.getUserBounds();let{min:c,max:n}=this;const i=l=>c=a?c:l,s=l=>n=r?n:l;if(t){const l=be(c),f=be(n);l<0&&f<0?s(0):l>0&&f>0&&i(0)}if(c===n){let l=n===0?1:Math.abs(n*.05);s(n+l),t||i(c-l)}this.min=c,this.max=n}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:a,stepSize:r}=t,c;return r?(c=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,c>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${c} ticks. Limiting to 1000.`),c=1e3)):(c=this.computeTickLimit(),a=a||11),a&&(c=Math.min(a,c)),c}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,a=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const c={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:a.precision,step:a.stepSize,count:a.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:a.minRotation||0,includeBounds:a.includeBounds!==!1},n=this._range||this,i=dq(c,n);return t.bounds==="ticks"&&_g(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const t=this.ticks;let a=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const c=(r-a)/Math.max(t.length-1,1)/2;a-=c,r+=c}this._startValue=a,this._endValue=r,this._valueRange=r-a}getLabelForValue(t){return Q5(t,this.chart.options.locale,this.options.ticks.format)}}class Li extends er{determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=q2(t)?t:0,this.max=q2(a)?a:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),a=t?this.width:this.height,r=$4(this.options.ticks.minRotation),c=(t?Math.sin(r):Math.cos(r))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(a/Math.min(40,n.lineHeight/c))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}o1(Li,"id","linear"),o1(Li,"defaults",{ticks:{callback:Gr.formatters.numeric}});const C5=e=>Math.floor(V0(e)),o6=(e,t)=>Math.pow(10,C5(e)+t);function fh(e){return e/Math.pow(10,C5(e))===1}function uh(e,t,a){const r=Math.pow(10,a),c=Math.floor(e/r);return Math.ceil(t/r)-c}function mq(e,t){const a=t-e;let r=C5(a);for(;uh(e,t,r)>10;)r++;for(;uh(e,t,r)<10;)r--;return Math.min(r,C5(e))}function pq(e,{min:t,max:a}){t=f4(e.min,t);const r=[],c=C5(t);let n=mq(t,a),i=n<0?Math.pow(10,Math.abs(n)):1;const s=Math.pow(10,n),l=c>n?Math.pow(10,c):0,f=Math.round((t-l)*i)/i,u=Math.floor((t-l)/s/10)*s*10;let h=Math.floor((f-u)/Math.pow(10,n)),d=f4(e.min,Math.round((l+u+h*Math.pow(10,n))*i)/i);for(;d<a;)r.push({value:d,major:fh(d),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(n++,h=2,i=n>=0?1:i),d=Math.round((l+u+h*Math.pow(10,n))*i)/i;const m=f4(e.max,d);return r.push({value:m,major:fh(m),significand:h}),r}class Si extends W6{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,a){const r=er.prototype.parse.apply(this,[t,a]);if(r===0){this._zero=!0;return}return q2(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=q2(t)?Math.max(0,t):null,this.max=q2(a)?Math.max(0,a):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!q2(this._userMin)&&(this.min=t===o6(this.min,0)?o6(this.min,-1):o6(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let r=this.min,c=this.max;const n=s=>r=t?r:s,i=s=>c=a?c:s;r===c&&(r<=0?(n(1),i(10)):(n(o6(r,-1)),i(o6(c,1)))),r<=0&&n(o6(c,-1)),c<=0&&i(o6(r,1)),this.min=r,this.max=c}buildTicks(){const t=this.options,a={min:this._userMin,max:this._userMax},r=pq(a,this);return t.bounds==="ticks"&&_g(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":Q5(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=V0(t),this._valueRange=V0(this.max)-V0(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(V0(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const a=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+a*this._valueRange)}}o1(Si,"id","logarithmic"),o1(Si,"defaults",{ticks:{callback:Gr.formatters.logarithmic,major:{enabled:!0}}});function Ai(e){const t=e.ticks;if(t.display&&e.display){const a=j3(t.backdropPadding);return q1(t.font&&t.font.size,D2.font.size)+a.height}return 0}function vq(e,t,a){return a=k2(a)?a:[a],{w:bW(e,t.string,a),h:a.length*t.lineHeight}}function hh(e,t,a,r,c){return e===r||e===c?{start:t-a/2,end:t+a/2}:e<r||e>c?{start:t-a,end:t}:{start:t,end:t+a}}function gq(e){const 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},a=Object.assign({},t),r=[],c=[],n=e._pointLabels.length,i=e.options.pointLabels,s=i.centerPointLabels?A2/n:0;for(let l=0;l<n;l++){const f=i.setContext(e.getPointLabelContext(l));c[l]=f.padding;const u=e.getPointPosition(l,e.drawingArea+c[l],s),h=z3(f.font),d=vq(e.ctx,h,e._pointLabels[l]);r[l]=d;const m=u4(e.getIndexAngle(l)+s),p=Math.round(V9(m)),v=hh(p,u.x,d.w,0,180),g=hh(p,u.y,d.h,90,270);xq(a,t,m,v,g)}e.setCenterPoint(t.l-a.l,a.r-t.r,t.t-a.t,a.b-t.b),e._pointLabelItems=Mq(e,r,c)}function xq(e,t,a,r,c){const n=Math.abs(Math.sin(a)),i=Math.abs(Math.cos(a));let s=0,l=0;r.start<t.l?(s=(t.l-r.start)/n,e.l=Math.min(e.l,t.l-s)):r.end>t.r&&(s=(r.end-t.r)/n,e.r=Math.max(e.r,t.r+s)),c.start<t.t?(l=(t.t-c.start)/i,e.t=Math.min(e.t,t.t-l)):c.end>t.b&&(l=(c.end-t.b)/i,e.b=Math.max(e.b,t.b+l))}function Cq(e,t,a){const r=e.drawingArea,{extra:c,additionalAngle:n,padding:i,size:s}=a,l=e.getPointPosition(t,r+c+i,n),f=Math.round(V9(u4(l.angle+i3))),u=Hq(l.y,s.h,f),h=yq(f),d=bq(l.x,s.w,h);return{visible:!0,x:l.x,y:u,textAlign:h,left:d,top:u,right:d+s.w,bottom:u+s.h}}function zq(e,t){if(!t)return!0;const{left:a,top:r,right:c,bottom:n}=e;return!(je({x:a,y:r},t)||je({x:a,y:n},t)||je({x:c,y:r},t)||je({x:c,y:n},t))}function Mq(e,t,a){const r=[],c=e._pointLabels.length,n=e.options,{centerPointLabels:i,display:s}=n.pointLabels,l={extra:Ai(n)/2,additionalAngle:i?A2/c:0};let f;for(let u=0;u<c;u++){l.padding=a[u],l.size=t[u];const h=Cq(e,u,l);r.push(h),s==="auto"&&(h.visible=zq(h,f),h.visible&&(f=h))}return r}function yq(e){return e===0||e===180?"center":e<180?"left":"right"}function bq(e,t,a){return a==="right"?e-=t:a==="center"&&(e-=t/2),e}function Hq(e,t,a){return a===90||a===270?e-=t/2:(a>270||a<90)&&(e-=t),e}function Vq(e,t,a){const{left:r,top:c,right:n,bottom:i}=a,{backdropColor:s}=t;if(!l2(s)){const l=w6(t.borderRadius),f=j3(t.backdropPadding);e.fillStyle=s;const u=r-f.left,h=c-f.top,d=n-r+f.width,m=i-c+f.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),g5(e,{x:u,y:h,w:d,h:m,radius:l}),e.fill()):e.fillRect(u,h,d,m)}}function wq(e,t){const{ctx:a,options:{pointLabels:r}}=e;for(let c=t-1;c>=0;c--){const n=e._pointLabelItems[c];if(!n.visible)continue;const i=r.setContext(e.getPointLabelContext(c));Vq(a,i,n);const s=z3(i.font),{x:l,y:f,textAlign:u}=n;E6(a,e._pointLabels[c],l,f+s.lineHeight/2,s,{color:i.color,textAlign:u,textBaseline:"middle"})}}function gx(e,t,a,r){const{ctx:c}=e;if(a)c.arc(e.xCenter,e.yCenter,t,0,S2);else{let n=e.getPointPosition(0,t);c.moveTo(n.x,n.y);for(let i=1;i<r;i++)n=e.getPointPosition(i,t),c.lineTo(n.x,n.y)}}function _q(e,t,a,r,c){const n=e.ctx,i=t.circular,{color:s,lineWidth:l}=t;!i&&!r||!s||!l||a<0||(n.save(),n.strokeStyle=s,n.lineWidth=l,n.setLineDash(c.dash||[]),n.lineDashOffset=c.dashOffset,n.beginPath(),gx(e,a,i,r),n.closePath(),n.stroke(),n.restore())}function kq(e,t,a){return K0(e,{label:a,index:t,type:"pointLabel"})}class zt extends er{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=j3(Ai(this.options)/2),a=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+a/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(a,r)/2)}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!1);this.min=q2(t)&&!isNaN(t)?t:0,this.max=q2(a)&&!isNaN(a)?a:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ai(this.options))}generateTickLabels(t){er.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((a,r)=>{const c=M2(this.options.pointLabels.callback,[a,r],this);return c||c===0?c:""}).filter((a,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?gq(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,a,r,c){this.xCenter+=Math.floor((t-a)/2),this.yCenter+=Math.floor((r-c)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,a,r,c))}getIndexAngle(t){const a=S2/(this._pointLabels.length||1),r=this.options.startAngle||0;return u4(t*a+$4(r))}getDistanceFromCenterForValue(t){if(l2(t))return NaN;const a=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*a:(t-this.min)*a}getValueForDistanceFromCenter(t){if(l2(t))return NaN;const a=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-a:this.min+a}getPointLabelContext(t){const a=this._pointLabels||[];if(t>=0&&t<a.length){const r=a[t];return kq(this.getContext(),t,r)}}getPointPosition(t,a,r=0){const c=this.getIndexAngle(t)-i3+r;return{x:Math.cos(c)*a+this.xCenter,y:Math.sin(c)*a+this.yCenter,angle:c}}getPointPositionForValue(t,a){return this.getPointPosition(t,this.getDistanceFromCenterForValue(a))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:a,top:r,right:c,bottom:n}=this._pointLabelItems[t];return{left:a,top:r,right:c,bottom:n}}drawBackground(){const{backgroundColor:t,grid:{circular:a}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),gx(this,this.getDistanceFromCenterForValue(this._endValue),a,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,a=this.options,{angleLines:r,grid:c,border:n}=a,i=this._pointLabels.length;let s,l,f;if(a.pointLabels.display&&wq(this,i),c.display&&this.ticks.forEach((u,h)=>{if(h!==0||h===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const d=this.getContext(h),m=c.setContext(d),p=n.setContext(d);_q(this,m,l,i,p)}}),r.display){for(t.save(),s=i-1;s>=0;s--){const u=r.setContext(this.getPointLabelContext(s)),{color:h,lineWidth:d}=u;!d||!h||(t.lineWidth=d,t.strokeStyle=h,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(a.reverse?this.min:this.max),f=this.getPointPosition(s,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(f.x,f.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,a=this.options,r=a.ticks;if(!r.display)return;const c=this.getIndexAngle(0);let n,i;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(c),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&this.min>=0&&!a.reverse)return;const f=r.setContext(this.getContext(l)),u=z3(f.font);if(n=this.getDistanceFromCenterForValue(this.ticks[l].value),f.showLabelBackdrop){t.font=u.string,i=t.measureText(s.label).width,t.fillStyle=f.backdropColor;const h=j3(f.backdropPadding);t.fillRect(-i/2-h.left,-n-u.size/2-h.top,i+h.width,u.size+h.height)}E6(t,s.label,0,-n,u,{color:f.color,strokeColor:f.textStrokeColor,strokeWidth:f.textStrokeWidth})}),t.restore()}drawTitle(){}}o1(zt,"id","radialLinear"),o1(zt,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Gr.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),o1(zt,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),o1(zt,"descriptors",{angleLines:{_fallback:"grid"}});const Qr={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}},i4=Object.keys(Qr);function dh(e,t){return e-t}function mh(e,t){if(l2(t))return null;const a=e._adapter,{parser:r,round:c,isoWeekday:n}=e._parseOpts;let i=t;return typeof r=="function"&&(i=r(i)),q2(i)||(i=typeof r=="string"?a.parse(i,r):a.parse(i)),i===null?null:(c&&(i=c==="week"&&(N8(n)||n===!0)?a.startOf(i,"isoWeek",n):a.startOf(i,c)),+i)}function ph(e,t,a,r){const c=i4.length;for(let n=i4.indexOf(e);n<c-1;++n){const i=Qr[i4[n]],s=i.steps?i.steps:Number.MAX_SAFE_INTEGER;if(i.common&&Math.ceil((a-t)/(s*i.size))<=r)return i4[n]}return i4[c-1]}function Lq(e,t,a,r,c){for(let n=i4.length-1;n>=i4.indexOf(a);n--){const i=i4[n];if(Qr[i].common&&e._adapter.diff(c,r,i)>=t-1)return i}return i4[a?i4.indexOf(a):0]}function Sq(e){for(let t=i4.indexOf(e)+1,a=i4.length;t<a;++t)if(Qr[i4[t]].common)return i4[t]}function vh(e,t,a){if(!a)e[t]=!0;else if(a.length){const{lo:r,hi:c}=w9(a,t),n=a[r]>=t?a[r]:a[c];e[n]=!0}}function Aq(e,t,a,r){const c=e._adapter,n=+c.startOf(t[0].value,r),i=t[t.length-1].value;let s,l;for(s=n;s<=i;s=+c.add(s,1,r))l=a[s],l>=0&&(t[l].major=!0);return t}function gh(e,t,a){const r=[],c={},n=t.length;let i,s;for(i=0;i<n;++i)s=t[i],c[s]=i,r.push({value:s,major:!1});return n===0||!a?r:Aq(e,r,c,a)}class z5 extends W6{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,a={}){const r=t.time||(t.time={}),c=this._adapter=new OY._date(t.adapters.date);c.init(a),Pt(r.displayFormats,c.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=a.normalized}parse(t,a){return t===void 0?null:mh(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,a=this._adapter,r=t.time.unit||"day";let{min:c,max:n,minDefined:i,maxDefined:s}=this.getUserBounds();function l(f){!i&&!isNaN(f.min)&&(c=Math.min(c,f.min)),!s&&!isNaN(f.max)&&(n=Math.max(n,f.max))}(!i||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),c=q2(c)&&!isNaN(c)?c:+a.startOf(Date.now(),r),n=q2(n)&&!isNaN(n)?n:+a.endOf(Date.now(),r)+1,this.min=Math.min(c,n-1),this.max=Math.max(c+1,n)}_getLabelBounds(){const t=this.getLabelTimestamps();let a=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(a=t[0],r=t[t.length-1]),{min:a,max:r}}buildTicks(){const t=this.options,a=t.time,r=t.ticks,c=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&c.length&&(this.min=this._userMin||c[0],this.max=this._userMax||c[c.length-1]);const n=this.min,i=this.max,s=fW(c,n,i);return this._unit=a.unit||(r.autoSkip?ph(a.minUnit,this.min,this.max,this._getLabelCapacity(n)):Lq(this,s.length,a.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:Sq(this._unit),this.initOffsets(c),t.reverse&&s.reverse(),gh(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let a=0,r=0,c,n;this.options.offset&&t.length&&(c=this.getDecimalForValue(t[0]),t.length===1?a=1-c:a=(this.getDecimalForValue(t[1])-c)/2,n=this.getDecimalForValue(t[t.length-1]),t.length===1?r=n:r=(n-this.getDecimalForValue(t[t.length-2]))/2);const i=t.length<3?.5:.25;a=k3(a,0,i),r=k3(r,0,i),this._offsets={start:a,end:r,factor:1/(a+1+r)}}_generate(){const t=this._adapter,a=this.min,r=this.max,c=this.options,n=c.time,i=n.unit||ph(n.minUnit,a,r,this._getLabelCapacity(a)),s=q1(c.ticks.stepSize,1),l=i==="week"?n.isoWeekday:!1,f=N8(l)||l===!0,u={};let h=a,d,m;if(f&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,f?"day":i),t.diff(r,a,i)>1e5*s)throw new Error(a+" and "+r+" are too far apart with stepSize of "+s+" "+i);const p=c.ticks.source==="data"&&this.getDataTimestamps();for(d=h,m=0;d<r;d=+t.add(d,s,i),m++)vh(u,d,p);return(d===r||c.bounds==="ticks"||m===1)&&vh(u,d,p),Object.keys(u).sort(dh).map(v=>+v)}getLabelForValue(t){const a=this._adapter,r=this.options.time;return r.tooltipFormat?a.format(t,r.tooltipFormat):a.format(t,r.displayFormats.datetime)}format(t,a){const c=this.options.time.displayFormats,n=this._unit,i=a||c[n];return this._adapter.format(t,i)}_tickFormatFunction(t,a,r,c){const n=this.options,i=n.ticks.callback;if(i)return M2(i,[t,a,r],this);const s=n.time.displayFormats,l=this._unit,f=this._majorUnit,u=l&&s[l],h=f&&s[f],d=r[a],m=f&&h&&d&&d.major;return this._adapter.format(t,c||(m?h:u))}generateTickLabels(t){let a,r,c;for(a=0,r=t.length;a<r;++a)c=t[a],c.label=this._tickFormatFunction(c.value,a,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const a=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((a.start+r)*a.factor)}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const a=this.options.ticks,r=this.ctx.measureText(t).width,c=$4(this.isHorizontal()?a.maxRotation:a.minRotation),n=Math.cos(c),i=Math.sin(c),s=this._resolveTickFontOptions(0).size;return{w:r*n+s*i,h:r*i+s*n}}_getLabelCapacity(t){const a=this.options.time,r=a.displayFormats,c=r[a.unit]||r.millisecond,n=this._tickFormatFunction(t,0,gh(this,[t],this._majorUnit),c),i=this._getLabelSize(n),s=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],a,r;if(t.length)return t;const c=this.getMatchingVisibleMetas();if(this._normalized&&c.length)return this._cache.data=c[0].controller.getAllParsedValues(this);for(a=0,r=c.length;a<r;++a)t=t.concat(c[a].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let a,r;if(t.length)return t;const c=this.getLabels();for(a=0,r=c.length;a<r;++a)t.push(mh(this,c[a]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Sg(t.sort(dh))}}o1(z5,"id","time"),o1(z5,"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 Ya(e,t,a){let r=0,c=e.length-1,n,i,s,l;a?(t>=e[r].pos&&t<=e[c].pos&&({lo:r,hi:c}=Ye(e,"pos",t)),{pos:n,time:s}=e[r],{pos:i,time:l}=e[c]):(t>=e[r].time&&t<=e[c].time&&({lo:r,hi:c}=Ye(e,"time",t)),{time:n,pos:s}=e[r],{time:i,pos:l}=e[c]);const f=i-n;return f?s+(l-s)*(t-n)/f:s}class Ti extends z5{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),a=this._table=this.buildLookupTable(t);this._minPos=Ya(a,this.min),this._tableRange=Ya(a,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:a,max:r}=this,c=[],n=[];let i,s,l,f,u;for(i=0,s=t.length;i<s;++i)f=t[i],f>=a&&f<=r&&c.push(f);if(c.length<2)return[{time:a,pos:0},{time:r,pos:1}];for(i=0,s=c.length;i<s;++i)u=c[i+1],l=c[i-1],f=c[i],Math.round((u+l)/2)!==f&&n.push({time:f,pos:i/(s-1)});return n}_generate(){const t=this.min,a=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(a)||r.length===1)&&r.push(a),r.sort((c,n)=>c-n)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const a=this.getDataTimestamps(),r=this.getLabelTimestamps();return a.length&&r.length?t=this.normalize(a.concat(r)):t=a.length?a:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Ya(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return Ya(this._table,r*this._tableRange+this._minPos,!0)}}o1(Ti,"id","timeseries"),o1(Ti,"defaults",z5.defaults);var Tq=Object.freeze({__proto__:null,CategoryScale:ki,LinearScale:Li,LogarithmicScale:Si,RadialLinearScale:zt,TimeScale:z5,TimeSeriesScale:Ti});const Nq=[BY,mG,lq,Tq];var Eq=typeof global=="object"&&global&&global.Object===Object&&global;const xx=Eq;var Pq=typeof self=="object"&&self&&self.Object===Object&&self,Fq=xx||Pq||Function("return this")();const Le=Fq;var Dq=Le.Symbol;const G0=Dq;var Cx=Object.prototype,Bq=Cx.hasOwnProperty,Oq=Cx.toString,ft=G0?G0.toStringTag:void 0;function Rq(e){var t=Bq.call(e,ft),a=e[ft];try{e[ft]=void 0;var r=!0}catch{}var c=Oq.call(e);return r&&(t?e[ft]=a:delete e[ft]),c}var Iq=Object.prototype,$q=Iq.toString;function Uq(e){return $q.call(e)}var Wq="[object Null]",Yq="[object Undefined]",xh=G0?G0.toStringTag:void 0;function J5(e){return e==null?e===void 0?Yq:Wq:xh&&xh in Object(e)?Rq(e):Uq(e)}function P6(e){return e!=null&&typeof e=="object"}var jq=Array.isArray;const F8=jq;function ea(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Gq="[object AsyncFunction]",qq="[object Function]",Xq="[object GeneratorFunction]",Zq="[object Proxy]";function zx(e){if(!ea(e))return!1;var t=J5(e);return t==qq||t==Xq||t==Gq||t==Zq}var Qq=Le["__core-js_shared__"];const gn=Qq;var Ch=function(){var e=/[^.]+$/.exec(gn&&gn.keys&&gn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Kq(e){return!!Ch&&Ch in e}var Jq=Function.prototype,eX=Jq.toString;function Y6(e){if(e!=null){try{return eX.call(e)}catch{}try{return e+""}catch{}}return""}var tX=/[\\^$.*+?()[\]{}|]/g,aX=/^\[object .+?Constructor\]$/,rX=Function.prototype,cX=Object.prototype,nX=rX.toString,iX=cX.hasOwnProperty,sX=RegExp("^"+nX.call(iX).replace(tX,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oX(e){if(!ea(e)||Kq(e))return!1;var t=zx(e)?sX:aX;return t.test(Y6(e))}function lX(e,t){return e==null?void 0:e[t]}function j6(e,t){var a=lX(e,t);return oX(a)?a:void 0}var fX=j6(Le,"WeakMap");const Ni=fX;var zh=Object.create,uX=function(){function e(){}return function(t){if(!ea(t))return{};if(zh)return zh(t);e.prototype=t;var a=new e;return e.prototype=void 0,a}}();const hX=uX;function dX(e,t){var a=-1,r=e.length;for(t||(t=Array(r));++a<r;)t[a]=e[a];return t}var mX=function(){try{var e=j6(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Mh=mX;function pX(e,t){for(var a=-1,r=e==null?0:e.length;++a<r&&t(e[a],a,e)!==!1;);return e}var vX=9007199254740991,gX=/^(?:0|[1-9]\d*)$/;function xX(e,t){var a=typeof e;return t=t??vX,!!t&&(a=="number"||a!="symbol"&&gX.test(e))&&e>-1&&e%1==0&&e<t}function Mx(e,t,a){t=="__proto__"&&Mh?Mh(e,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[t]=a}function B9(e,t){return e===t||e!==e&&t!==t}var CX=Object.prototype,zX=CX.hasOwnProperty;function yx(e,t,a){var r=e[t];(!(zX.call(e,t)&&B9(r,a))||a===void 0&&!(t in e))&&Mx(e,t,a)}function Kr(e,t,a,r){var c=!a;a||(a={});for(var n=-1,i=t.length;++n<i;){var s=t[n],l=r?r(a[s],e[s],s,a,e):void 0;l===void 0&&(l=e[s]),c?Mx(a,s,l):yx(a,s,l)}return a}var MX=9007199254740991;function bx(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=MX}function O9(e){return e!=null&&bx(e.length)&&!zx(e)}var yX=Object.prototype;function Jr(e){var t=e&&e.constructor,a=typeof t=="function"&&t.prototype||yX;return e===a}function bX(e,t){for(var a=-1,r=Array(e);++a<e;)r[a]=t(a);return r}var HX="[object Arguments]";function yh(e){return P6(e)&&J5(e)==HX}var Hx=Object.prototype,VX=Hx.hasOwnProperty,wX=Hx.propertyIsEnumerable,_X=yh(function(){return arguments}())?yh:function(e){return P6(e)&&VX.call(e,"callee")&&!wX.call(e,"callee")};const Vx=_X;function kX(){return!1}var wx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bh=wx&&typeof module=="object"&&module&&!module.nodeType&&module,LX=bh&&bh.exports===wx,Hh=LX?Le.Buffer:void 0,SX=Hh?Hh.isBuffer:void 0,AX=SX||kX;const M5=AX;var TX="[object Arguments]",NX="[object Array]",EX="[object Boolean]",PX="[object Date]",FX="[object Error]",DX="[object Function]",BX="[object Map]",OX="[object Number]",RX="[object Object]",IX="[object RegExp]",$X="[object Set]",UX="[object String]",WX="[object WeakMap]",YX="[object ArrayBuffer]",jX="[object DataView]",GX="[object Float32Array]",qX="[object Float64Array]",XX="[object Int8Array]",ZX="[object Int16Array]",QX="[object Int32Array]",KX="[object Uint8Array]",JX="[object Uint8ClampedArray]",eZ="[object Uint16Array]",tZ="[object Uint32Array]",w2={};w2[GX]=w2[qX]=w2[XX]=w2[ZX]=w2[QX]=w2[KX]=w2[JX]=w2[eZ]=w2[tZ]=!0;w2[TX]=w2[NX]=w2[YX]=w2[EX]=w2[jX]=w2[PX]=w2[FX]=w2[DX]=w2[BX]=w2[OX]=w2[RX]=w2[IX]=w2[$X]=w2[UX]=w2[WX]=!1;function aZ(e){return P6(e)&&bx(e.length)&&!!w2[J5(e)]}function R9(e){return function(t){return e(t)}}var _x=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Rt=_x&&typeof module=="object"&&module&&!module.nodeType&&module,rZ=Rt&&Rt.exports===_x,xn=rZ&&xx.process,cZ=function(){try{var e=Rt&&Rt.require&&Rt.require("util").types;return e||xn&&xn.binding&&xn.binding("util")}catch{}}();const D8=cZ;var Vh=D8&&D8.isTypedArray,nZ=Vh?R9(Vh):aZ;const I9=nZ;var iZ=Object.prototype,sZ=iZ.hasOwnProperty;function kx(e,t){var a=F8(e),r=!a&&Vx(e),c=!a&&!r&&M5(e),n=!a&&!r&&!c&&I9(e),i=a||r||c||n,s=i?bX(e.length,String):[],l=s.length;for(var f in e)(t||sZ.call(e,f))&&!(i&&(f=="length"||c&&(f=="offset"||f=="parent")||n&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||xX(f,l)))&&s.push(f);return s}function Lx(e,t){return function(a){return e(t(a))}}var oZ=Lx(Object.keys,Object);const lZ=oZ;var fZ=Object.prototype,uZ=fZ.hasOwnProperty;function Sx(e){if(!Jr(e))return lZ(e);var t=[];for(var a in Object(e))uZ.call(e,a)&&a!="constructor"&&t.push(a);return t}function $9(e){return O9(e)?kx(e):Sx(e)}function hZ(e){var t=[];if(e!=null)for(var a in Object(e))t.push(a);return t}var dZ=Object.prototype,mZ=dZ.hasOwnProperty;function pZ(e){if(!ea(e))return hZ(e);var t=Jr(e),a=[];for(var r in e)r=="constructor"&&(t||!mZ.call(e,r))||a.push(r);return a}function U9(e){return O9(e)?kx(e,!0):pZ(e)}var vZ=j6(Object,"create");const y5=vZ;function gZ(){this.__data__=y5?y5(null):{},this.size=0}function xZ(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var CZ="__lodash_hash_undefined__",zZ=Object.prototype,MZ=zZ.hasOwnProperty;function yZ(e){var t=this.__data__;if(y5){var a=t[e];return a===CZ?void 0:a}return MZ.call(t,e)?t[e]:void 0}var bZ=Object.prototype,HZ=bZ.hasOwnProperty;function VZ(e){var t=this.__data__;return y5?t[e]!==void 0:HZ.call(t,e)}var wZ="__lodash_hash_undefined__";function _Z(e,t){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=y5&&t===void 0?wZ:t,this}function F6(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}F6.prototype.clear=gZ;F6.prototype.delete=xZ;F6.prototype.get=yZ;F6.prototype.has=VZ;F6.prototype.set=_Z;function kZ(){this.__data__=[],this.size=0}function ec(e,t){for(var a=e.length;a--;)if(B9(e[a][0],t))return a;return-1}var LZ=Array.prototype,SZ=LZ.splice;function AZ(e){var t=this.__data__,a=ec(t,e);if(a<0)return!1;var r=t.length-1;return a==r?t.pop():SZ.call(t,a,1),--this.size,!0}function TZ(e){var t=this.__data__,a=ec(t,e);return a<0?void 0:t[a][1]}function NZ(e){return ec(this.__data__,e)>-1}function EZ(e,t){var a=this.__data__,r=ec(a,e);return r<0?(++this.size,a.push([e,t])):a[r][1]=t,this}function l0(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}l0.prototype.clear=kZ;l0.prototype.delete=AZ;l0.prototype.get=TZ;l0.prototype.has=NZ;l0.prototype.set=EZ;var PZ=j6(Le,"Map");const b5=PZ;function FZ(){this.size=0,this.__data__={hash:new F6,map:new(b5||l0),string:new F6}}function DZ(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function tc(e,t){var a=e.__data__;return DZ(t)?a[typeof t=="string"?"string":"hash"]:a.map}function BZ(e){var t=tc(this,e).delete(e);return this.size-=t?1:0,t}function OZ(e){return tc(this,e).get(e)}function RZ(e){return tc(this,e).has(e)}function IZ(e,t){var a=tc(this,e),r=a.size;return a.set(e,t),this.size+=a.size==r?0:1,this}function G6(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}G6.prototype.clear=FZ;G6.prototype.delete=BZ;G6.prototype.get=OZ;G6.prototype.has=RZ;G6.prototype.set=IZ;function Ax(e,t){for(var a=-1,r=t.length,c=e.length;++a<r;)e[c+a]=t[a];return e}var $Z=Lx(Object.getPrototypeOf,Object);const Tx=$Z;function UZ(){this.__data__=new l0,this.size=0}function WZ(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a}function YZ(e){return this.__data__.get(e)}function jZ(e){return this.__data__.has(e)}var GZ=200;function qZ(e,t){var a=this.__data__;if(a instanceof l0){var r=a.__data__;if(!b5||r.length<GZ-1)return r.push([e,t]),this.size=++a.size,this;a=this.__data__=new G6(r)}return a.set(e,t),this.size=a.size,this}function Ze(e){var t=this.__data__=new l0(e);this.size=t.size}Ze.prototype.clear=UZ;Ze.prototype.delete=WZ;Ze.prototype.get=YZ;Ze.prototype.has=jZ;Ze.prototype.set=qZ;function XZ(e,t){return e&&Kr(t,$9(t),e)}function ZZ(e,t){return e&&Kr(t,U9(t),e)}var Nx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wh=Nx&&typeof module=="object"&&module&&!module.nodeType&&module,QZ=wh&&wh.exports===Nx,_h=QZ?Le.Buffer:void 0,kh=_h?_h.allocUnsafe:void 0;function KZ(e,t){if(t)return e.slice();var a=e.length,r=kh?kh(a):new e.constructor(a);return e.copy(r),r}function JZ(e,t){for(var a=-1,r=e==null?0:e.length,c=0,n=[];++a<r;){var i=e[a];t(i,a,e)&&(n[c++]=i)}return n}function Ex(){return[]}var eQ=Object.prototype,tQ=eQ.propertyIsEnumerable,Lh=Object.getOwnPropertySymbols,aQ=Lh?function(e){return e==null?[]:(e=Object(e),JZ(Lh(e),function(t){return tQ.call(e,t)}))}:Ex;const W9=aQ;function rQ(e,t){return Kr(e,W9(e),t)}var cQ=Object.getOwnPropertySymbols,nQ=cQ?function(e){for(var t=[];e;)Ax(t,W9(e)),e=Tx(e);return t}:Ex;const Px=nQ;function iQ(e,t){return Kr(e,Px(e),t)}function Fx(e,t,a){var r=t(e);return F8(e)?r:Ax(r,a(e))}function Ei(e){return Fx(e,$9,W9)}function sQ(e){return Fx(e,U9,Px)}var oQ=j6(Le,"DataView");const Pi=oQ;var lQ=j6(Le,"Promise");const Fi=lQ;var fQ=j6(Le,"Set");const Di=fQ;var Sh="[object Map]",uQ="[object Object]",Ah="[object Promise]",Th="[object Set]",Nh="[object WeakMap]",Eh="[object DataView]",hQ=Y6(Pi),dQ=Y6(b5),mQ=Y6(Fi),pQ=Y6(Di),vQ=Y6(Ni),m6=J5;(Pi&&m6(new Pi(new ArrayBuffer(1)))!=Eh||b5&&m6(new b5)!=Sh||Fi&&m6(Fi.resolve())!=Ah||Di&&m6(new Di)!=Th||Ni&&m6(new Ni)!=Nh)&&(m6=function(e){var t=J5(e),a=t==uQ?e.constructor:void 0,r=a?Y6(a):"";if(r)switch(r){case hQ:return Eh;case dQ:return Sh;case mQ:return Ah;case pQ:return Th;case vQ:return Nh}return t});const B8=m6;var gQ=Object.prototype,xQ=gQ.hasOwnProperty;function CQ(e){var t=e.length,a=new e.constructor(t);return t&&typeof e[0]=="string"&&xQ.call(e,"index")&&(a.index=e.index,a.input=e.input),a}var zQ=Le.Uint8Array;const tr=zQ;function Y9(e){var t=new e.constructor(e.byteLength);return new tr(t).set(new tr(e)),t}function MQ(e,t){var a=t?Y9(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.byteLength)}var yQ=/\w*$/;function bQ(e){var t=new e.constructor(e.source,yQ.exec(e));return t.lastIndex=e.lastIndex,t}var Ph=G0?G0.prototype:void 0,Fh=Ph?Ph.valueOf:void 0;function HQ(e){return Fh?Object(Fh.call(e)):{}}function VQ(e,t){var a=t?Y9(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}var wQ="[object Boolean]",_Q="[object Date]",kQ="[object Map]",LQ="[object Number]",SQ="[object RegExp]",AQ="[object Set]",TQ="[object String]",NQ="[object Symbol]",EQ="[object ArrayBuffer]",PQ="[object DataView]",FQ="[object Float32Array]",DQ="[object Float64Array]",BQ="[object Int8Array]",OQ="[object Int16Array]",RQ="[object Int32Array]",IQ="[object Uint8Array]",$Q="[object Uint8ClampedArray]",UQ="[object Uint16Array]",WQ="[object Uint32Array]";function YQ(e,t,a){var r=e.constructor;switch(t){case EQ:return Y9(e);case wQ:case _Q:return new r(+e);case PQ:return MQ(e,a);case FQ:case DQ:case BQ:case OQ:case RQ:case IQ:case $Q:case UQ:case WQ:return VQ(e,a);case kQ:return new r;case LQ:case TQ:return new r(e);case SQ:return bQ(e);case AQ:return new r;case NQ:return HQ(e)}}function jQ(e){return typeof e.constructor=="function"&&!Jr(e)?hX(Tx(e)):{}}var GQ="[object Map]";function qQ(e){return P6(e)&&B8(e)==GQ}var Dh=D8&&D8.isMap,XQ=Dh?R9(Dh):qQ;const ZQ=XQ;var QQ="[object Set]";function KQ(e){return P6(e)&&B8(e)==QQ}var Bh=D8&&D8.isSet,JQ=Bh?R9(Bh):KQ;const eK=JQ;var tK=1,aK=2,rK=4,Dx="[object Arguments]",cK="[object Array]",nK="[object Boolean]",iK="[object Date]",sK="[object Error]",Bx="[object Function]",oK="[object GeneratorFunction]",lK="[object Map]",fK="[object Number]",Ox="[object Object]",uK="[object RegExp]",hK="[object Set]",dK="[object String]",mK="[object Symbol]",pK="[object WeakMap]",vK="[object ArrayBuffer]",gK="[object DataView]",xK="[object Float32Array]",CK="[object Float64Array]",zK="[object Int8Array]",MK="[object Int16Array]",yK="[object Int32Array]",bK="[object Uint8Array]",HK="[object Uint8ClampedArray]",VK="[object Uint16Array]",wK="[object Uint32Array]",z2={};z2[Dx]=z2[cK]=z2[vK]=z2[gK]=z2[nK]=z2[iK]=z2[xK]=z2[CK]=z2[zK]=z2[MK]=z2[yK]=z2[lK]=z2[fK]=z2[Ox]=z2[uK]=z2[hK]=z2[dK]=z2[mK]=z2[bK]=z2[HK]=z2[VK]=z2[wK]=!0;z2[sK]=z2[Bx]=z2[pK]=!1;function C7(e,t,a,r,c,n){var i,s=t&tK,l=t&aK,f=t&rK;if(a&&(i=c?a(e,r,c,n):a(e)),i!==void 0)return i;if(!ea(e))return e;var u=F8(e);if(u){if(i=CQ(e),!s)return dX(e,i)}else{var h=B8(e),d=h==Bx||h==oK;if(M5(e))return KZ(e,s);if(h==Ox||h==Dx||d&&!c){if(i=l||d?{}:jQ(e),!s)return l?iQ(e,ZZ(i,e)):rQ(e,XZ(i,e))}else{if(!z2[h])return c?e:{};i=YQ(e,h,s)}}n||(n=new Ze);var m=n.get(e);if(m)return m;n.set(e,i),eK(e)?e.forEach(function(g){i.add(C7(g,t,a,g,e,n))}):ZQ(e)&&e.forEach(function(g,x){i.set(x,C7(g,t,a,x,e,n))});var p=f?l?sQ:Ei:l?U9:$9,v=u?void 0:p(e);return pX(v||e,function(g,x){v&&(x=g,g=e[x]),yx(i,x,C7(g,t,a,x,e,n))}),i}var _K=1,kK=4;function ut(e){return C7(e,_K|kK)}var LK="__lodash_hash_undefined__";function SK(e){return this.__data__.set(e,LK),this}function AK(e){return this.__data__.has(e)}function ar(e){var t=-1,a=e==null?0:e.length;for(this.__data__=new G6;++t<a;)this.add(e[t])}ar.prototype.add=ar.prototype.push=SK;ar.prototype.has=AK;function TK(e,t){for(var a=-1,r=e==null?0:e.length;++a<r;)if(t(e[a],a,e))return!0;return!1}function NK(e,t){return e.has(t)}var EK=1,PK=2;function Rx(e,t,a,r,c,n){var i=a&EK,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var f=n.get(e),u=n.get(t);if(f&&u)return f==t&&u==e;var h=-1,d=!0,m=a&PK?new ar:void 0;for(n.set(e,t),n.set(t,e);++h<s;){var p=e[h],v=t[h];if(r)var g=i?r(v,p,h,t,e,n):r(p,v,h,e,t,n);if(g!==void 0){if(g)continue;d=!1;break}if(m){if(!TK(t,function(x,z){if(!NK(m,z)&&(p===x||c(p,x,a,r,n)))return m.push(z)})){d=!1;break}}else if(!(p===v||c(p,v,a,r,n))){d=!1;break}}return n.delete(e),n.delete(t),d}function FK(e){var t=-1,a=Array(e.size);return e.forEach(function(r,c){a[++t]=[c,r]}),a}function DK(e){var t=-1,a=Array(e.size);return e.forEach(function(r){a[++t]=r}),a}var BK=1,OK=2,RK="[object Boolean]",IK="[object Date]",$K="[object Error]",UK="[object Map]",WK="[object Number]",YK="[object RegExp]",jK="[object Set]",GK="[object String]",qK="[object Symbol]",XK="[object ArrayBuffer]",ZK="[object DataView]",Oh=G0?G0.prototype:void 0,Cn=Oh?Oh.valueOf:void 0;function QK(e,t,a,r,c,n,i){switch(a){case ZK:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case XK:return!(e.byteLength!=t.byteLength||!n(new tr(e),new tr(t)));case RK:case IK:case WK:return B9(+e,+t);case $K:return e.name==t.name&&e.message==t.message;case YK:case GK:return e==t+"";case UK:var s=FK;case jK:var l=r&BK;if(s||(s=DK),e.size!=t.size&&!l)return!1;var f=i.get(e);if(f)return f==t;r|=OK,i.set(e,t);var u=Rx(s(e),s(t),r,c,n,i);return i.delete(e),u;case qK:if(Cn)return Cn.call(e)==Cn.call(t)}return!1}var KK=1,JK=Object.prototype,eJ=JK.hasOwnProperty;function tJ(e,t,a,r,c,n){var i=a&KK,s=Ei(e),l=s.length,f=Ei(t),u=f.length;if(l!=u&&!i)return!1;for(var h=l;h--;){var d=s[h];if(!(i?d in t:eJ.call(t,d)))return!1}var m=n.get(e),p=n.get(t);if(m&&p)return m==t&&p==e;var v=!0;n.set(e,t),n.set(t,e);for(var g=i;++h<l;){d=s[h];var x=e[d],z=t[d];if(r)var C=i?r(z,x,d,t,e,n):r(x,z,d,e,t,n);if(!(C===void 0?x===z||c(x,z,a,r,n):C)){v=!1;break}g||(g=d=="constructor")}if(v&&!g){var b=e.constructor,H=t.constructor;b!=H&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof H=="function"&&H instanceof H)&&(v=!1)}return n.delete(e),n.delete(t),v}var aJ=1,Rh="[object Arguments]",Ih="[object Array]",ja="[object Object]",rJ=Object.prototype,$h=rJ.hasOwnProperty;function cJ(e,t,a,r,c,n){var i=F8(e),s=F8(t),l=i?Ih:B8(e),f=s?Ih:B8(t);l=l==Rh?ja:l,f=f==Rh?ja:f;var u=l==ja,h=f==ja,d=l==f;if(d&&M5(e)){if(!M5(t))return!1;i=!0,u=!1}if(d&&!u)return n||(n=new Ze),i||I9(e)?Rx(e,t,a,r,c,n):QK(e,t,l,a,r,c,n);if(!(a&aJ)){var m=u&&$h.call(e,"__wrapped__"),p=h&&$h.call(t,"__wrapped__");if(m||p){var v=m?e.value():e,g=p?t.value():t;return n||(n=new Ze),c(v,g,a,r,n)}}return d?(n||(n=new Ze),tJ(e,t,a,r,c,n)):!1}function Ix(e,t,a,r,c){return e===t?!0:e==null||t==null||!P6(e)&&!P6(t)?e!==e&&t!==t:cJ(e,t,a,r,Ix,c)}var nJ="[object Map]",iJ="[object Set]",sJ=Object.prototype,oJ=sJ.hasOwnProperty;function lJ(e){if(e==null)return!0;if(O9(e)&&(F8(e)||typeof e=="string"||typeof e.splice=="function"||M5(e)||I9(e)||Vx(e)))return!e.length;var t=B8(e);if(t==nJ||t==iJ)return!e.size;if(Jr(e))return!Sx(e).length;for(var a in e)if(oJ.call(e,a))return!1;return!0}function Uh(e,t){return Ix(e,t)}var fJ=Object.defineProperty,uJ=Object.defineProperties,hJ=Object.getOwnPropertyDescriptors,Wh=Object.getOwnPropertySymbols,dJ=Object.prototype.hasOwnProperty,mJ=Object.prototype.propertyIsEnumerable,Yh=(e,t,a)=>t in e?fJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,pJ=(e,t)=>{for(var a in t||(t={}))dJ.call(t,a)&&Yh(e,a,t[a]);if(Wh)for(var a of Wh(t))mJ.call(t,a)&&Yh(e,a,t[a]);return e},vJ=(e,t)=>uJ(e,hJ(t));function gJ(e){return(e.match(/[a-zA-Z0-9]+/g)||[]).map(t=>`${t.charAt(0).toUpperCase()}${t.slice(1)}`).join("")}var J0=(e,t)=>{const a={chartData:{type:Object,required:!0},options:{type:Object,required:!1},chartId:{default:e,type:String},width:{default:400,type:Number},height:{default:400,type:Number},cssClasses:{type:String,default:""},styles:{type:Object},plugins:{type:Array,default:()=>[]},onLabelsUpdate:{type:Function},onChartUpdate:{type:Function},onChartDestroy:{type:Function},onChartRender:{type:Function}},r=gJ(e);return o.defineComponent({name:r,props:a,emits:{"labels:update":()=>!0,"chart:update":c=>!0,"chart:destroy":()=>!0,"chart:render":c=>!0},setup(c,{emit:n,expose:i}){const s=o.ref(null),l=`${c.chartId}`;let f=o.shallowRef(null);o.watch(()=>c.chartData,u,{deep:!0}),o.watch(()=>c.options,g=>{f.value&&g&&(f.value.options=ut(g),p())},{deep:!0});function u(g){if(f.value){let x=f.value;Uh(g.labels,f.value.data.labels)||(x.data.labels=g.labels,d()),Uh(g.datasets,f.value.data.datasets)||g.datasets.forEach((z,C)=>{var b,H;if(lJ(z))x.data.datasets=[];else{const V=ut(x.data),y=Object.keys((H=(b=V.datasets)==null?void 0:b[C])!=null?H:{}),A=Object.keys(z);y.filter(Y=>Y!=="_meta"&&A.indexOf(Y)===-1).forEach(Y=>{x.data.datasets[C]&&delete x.data.datasets[C][Y]});for(const Y in z){const F=ut(z[Y]);x.data.datasets[C]||(x.data.datasets[C]={}),z.hasOwnProperty(Y)&&F!=null&&x&&(x.data.datasets[C][Y]=F)}}}),p()}else f.value&&v(),h()}function h(){s.value?(f.value=new Re(s.value,{data:ut(c.chartData),type:t,options:ut(c.options),plugins:c.plugins}),m()):console.error(`Error on component ${r}, canvas cannot be rendered. Check if the render appends server-side`)}function d(){n("labels:update"),c.onLabelsUpdate&&c.onLabelsUpdate()}function m(){f.value&&(n("chart:render",f.value),c.onChartRender&&c.onChartRender(f.value))}function p(){f.value&&(f.value.update(),n("chart:update",f.value),c.onChartUpdate&&c.onChartUpdate(f.value))}function v(){f.value&&f.value.destroy(),n("chart:destroy"),c.onChartDestroy&&c.onChartDestroy()}return o.onMounted(h),o.onBeforeUnmount(()=>{f.value&&f.value.destroy()}),i({canvasRef:s,renderChart:h,chartInstance:f,canvasId:l,update:p}),()=>o.h("div",{style:vJ(pJ({maxWidth:"100%"},c.styles),{position:"relative"}),class:c.cssClasses},[o.h("canvas",{style:{maxWidth:"100%",maxHeight:"100%"},id:l,width:c.width,height:c.height,ref:s})])}})};J0("bar-chart","bar");var xJ=J0("doughnut-chart","doughnut");J0("line-chart","line");J0("pie-chart","pie");J0("polar-chart","polarArea");J0("radar-chart","radar");J0("bubble-chart","bubble");J0("scatter-chart","scatter");const CJ=o.defineComponent({__name:"PgaDoughnutChart",props:{data:{},options:{}},setup(e){Re.register(...Nq);const t={responsive:!0};return(a,r)=>(o.openBlock(),o.createBlock(o.unref(xJ),{chartData:a.data,options:a.options||t},null,8,["chartData","options"]))}}),zJ={key:0},MJ={key:1,class:"barcodes-container"},yJ=o.defineComponent({__name:"PgaDisplayBarcodes",props:{barcodes:{}},setup(e){return(t,a)=>t.barcodes.length?(o.openBlock(),o.createElementBlock("div",MJ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.barcodes,r=>(o.openBlock(),o.createElementBlock("span",{class:"barcode",key:r},[o.createVNode(S3,{icon:"barcode"}),o.createTextVNode(" "+o.toDisplayString(r),1)]))),128))])):(o.openBlock(),o.createElementBlock("span",zJ,"-"))}});const bJ=R1(yJ,[["__scopeId","data-v-5291a54d"]]),HJ=["textContent"],VJ=o.defineComponent({__name:"PgaDisplayDatetime",props:{datetime:{},withoutBackground:{type:Boolean}},setup(e){const t=e,{language:a}=s3.storeToRefs(h3()),r=o.computed(()=>t.datetime instanceof Date),c=o.computed(()=>r.value?new Intl.DateTimeFormat(a.value,{dateStyle:"medium"}).format(t.datetime):"-"),n=o.computed(()=>r.value?new Intl.DateTimeFormat(a.value,{hour:"2-digit",minute:"2-digit"}).format(t.datetime):"");return(i,s)=>{const l=o.resolveDirective("tooltip");return r.value?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["pga-datetime",{"pga-datetime__with-background":!i.withoutBackground}])},[o.createVNode(ae,{icon:"calendar-days",text:c.value,nowrap:""},null,8,["text"])],2)),[[l,n.value]]):(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(c.value)},null,8,HJ))}}});const wJ=R1(VJ,[["__scopeId","data-v-31c52cc2"]]),_J={class:"info-card"},kJ={class:"info-card--icon-container"},LJ={class:"info-card--content-container"},SJ={class:"info-card--content"},AJ=["textContent"],TJ=o.defineComponent({__name:"PgaDisplayInfo",props:{type:{default:"info"},info:{}},setup(e){o.useCssVars(i=>({"25f5bc6c":c.value,"41d953fb":n.value}));const t=e,a=o.computed(()=>{if(t.type==="info")return"circle-info";if(t.type==="success")return"circle-check";if(t.type==="error")return"circle-xmark";if(t.type==="warning")return"circle-exclamation"}),r=o.computed(()=>{if(t.type==="info")return"aqua";if(t.type==="success")return"success";if(t.type==="error")return"danger";if(t.type==="warning")return"warning"}),c=o.computed(()=>`var(--pga-color-${r.value}-08)`),n=o.computed(()=>`var(--pga-color-${r.value}-contrast)`);return(i,s)=>{const l=o.resolveComponent("PgaIcon");return o.openBlock(),o.createElementBlock("div",_J,[o.createElementVNode("div",kJ,[o.createVNode(l,{class:"info-card--icon",icon:a.value},null,8,["icon"])]),o.createElementVNode("div",LJ,[o.createElementVNode("div",SJ,[i.info?(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(i.info)},null,8,AJ)):o.renderSlot(i.$slots,"default",{key:1},void 0,!0)])])])}}});const NJ=R1(TJ,[["__scopeId","data-v-818880c0"]]),EJ={key:0,class:"no-items-container"},PJ={key:1,class:"no-items"},FJ=o.defineComponent({__name:"PgaDisplayNoItems",props:{items:{},label:{},icon:{default:"filter-circle-xmark"},preventDisplayIcon:{type:Boolean},isLoading:{type:Boolean}},setup(e){const t=e,a=I2("pgaDisplayNoItems"),r=o.computed(()=>{var n;return!(((n=t.items)==null?void 0:n.length)>0)}),c=o.computed(()=>t.label?t.label:a("noItemsText"));return(n,i)=>r.value?(o.openBlock(),o.createElementBlock("div",EJ,[n.isLoading?(o.openBlock(),o.createBlock(j5,{key:0})):(o.openBlock(),o.createElementBlock("div",PJ,[n.preventDisplayIcon?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(S3,{key:0,class:"no-items--icon",icon:n.icon},null,8,["icon"])),o.createVNode(ae,{class:"no-items--text",text:c.value},null,8,["text"])]))])):o.createCommentVNode("",!0)}});const $x=R1(FJ,[["__scopeId","data-v-2f2a188f"]]),DJ=["textContent"],BJ={key:0,class:"price-sign",textContent:"$"},OJ=["textContent"],RJ=o.defineComponent({__name:"PgaDisplayPrice",props:{price:{},tooltipPrice:{},size:{default:"m"},color:{default:"first"},numOfDecimals:{},withoutSign:{type:Boolean},withoutBackground:{type:Boolean},isPositive:{type:Boolean,default:void 0}},setup(e){o.useCssVars(f=>({"38848f50":i.value,"885cde0a":l.value,"35f9cc2e":n.value,"4d380636":s.value}));const t=e,a=o.computed(()=>t.price!==void 0),r=o.computed(()=>a.value?typeof t.price=="string"?t.price:V7(t.price,t.numOfDecimals):"-"),c=o.computed(()=>t.tooltipPrice===void 0?"":typeof t.tooltipPrice=="string"?t.tooltipPrice:`$ ${V7(t.tooltipPrice,t.numOfDecimals)}`),n=o.computed(()=>{if(t.size==="s")return"0.9rem";if(t.size==="m")return"1rem";if(t.size==="l")return"1.1rem"}),i=o.computed(()=>{if(t.size==="s")return"0.7rem";if(t.size==="m")return"0.8rem";if(t.size==="l")return"0.9rem"}),s=o.computed(()=>`var(--pga-color-${t.color})`),l=o.computed(()=>{if(t.color==="first")return"var(--pga-color-second)";if(t.color==="second")return"var(--pga-color-third)"});return(f,u)=>{const h=o.resolveDirective("tooltip");return a.value?o.withDirectives((o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(["price-container",{"price-container__with-background":!f.withoutBackground}])},[f.withoutSign?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",BJ)),o.createElementVNode("span",{class:o.normalizeClass(["price",{price__positive:f.isPositive===!0,price__negative:f.isPositive===!1}]),textContent:o.toDisplayString(r.value)},null,10,OJ)],2)),[[h,c.value]]):(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(r.value)},null,8,DJ))}}});const IJ=R1(RJ,[["__scopeId","data-v-97b7f73d"]]),$J=o.defineComponent({__name:"PgaForm",props:{width:{default:"100%"}},setup(e){return o.useCssVars(t=>({"34c1cb30":t.width})),(t,a)=>(o.openBlock(),o.createElementBlock("form",{class:"form",onSubmit:a[0]||(a[0]=o.withModifiers(()=>{},["prevent"]))},[o.renderSlot(t.$slots,"default",{},void 0,!0)],32))}});const Ux=R1($J,[["__scopeId","data-v-0442da56"]]);const UJ={},WJ={class:"form-roww"};function YJ(e,t){return o.openBlock(),o.createElementBlock("div",WJ,[o.renderSlot(e.$slots,"default",{},void 0,!0)])}const jJ=R1(UJ,[["render",YJ],["__scopeId","data-v-04ffa822"]]);function jh(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),a.push.apply(a,r)}return a}function x0(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?jh(Object(a),!0).forEach(function(r){GJ(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):jh(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function GJ(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Gh(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(e).reduce((a,r)=>(t.includes(r)||(a[r]=o.unref(e[r])),a),{})}function rr(e){return typeof e=="function"}function qJ(e){return o.isReactive(e)||o.isReadonly(e)}function Wx(e,t,a){let r=e;const c=t.split(".");for(let n=0;n<c.length;n++){if(!r[c[n]])return a;r=r[c[n]]}return r}function zn(e,t,a){return o.computed(()=>e.some(r=>Wx(t,r,{[a]:!1})[a]))}function qh(e,t,a){return o.computed(()=>e.reduce((r,c)=>{const n=Wx(t,c,{[a]:!1})[a]||[];return r.concat(n)},[]))}function Yx(e,t,a,r){return e.call(r,o.unref(t),o.unref(a),r)}function jx(e){return e.$valid!==void 0?!e.$valid:!e}function XJ(e,t,a,r,c,n,i){let{$lazy:s,$rewardEarly:l}=c,f=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],u=arguments.length>8?arguments[8]:void 0,h=arguments.length>9?arguments[9]:void 0,d=arguments.length>10?arguments[10]:void 0;const m=o.ref(!!r.value),p=o.ref(0);a.value=!1;const v=o.watch([t,r].concat(f,d),()=>{if(s&&!r.value||l&&!h.value&&!a.value)return;let g;try{g=Yx(e,t,u,i)}catch(x){g=Promise.reject(x)}p.value++,a.value=!!p.value,m.value=!1,Promise.resolve(g).then(x=>{p.value--,a.value=!!p.value,n.value=x,m.value=jx(x)}).catch(x=>{p.value--,a.value=!!p.value,n.value=x,m.value=!0})},{immediate:!0,deep:typeof t=="object"});return{$invalid:m,$unwatch:v}}function ZJ(e,t,a,r,c,n,i,s){let{$lazy:l,$rewardEarly:f}=r;const u=()=>({}),h=o.computed(()=>{if(l&&!a.value||f&&!s.value)return!1;let d=!0;try{const m=Yx(e,t,i,n);c.value=m,d=jx(m)}catch(m){c.value=m}return d});return{$unwatch:u,$invalid:h}}function QJ(e,t,a,r,c,n,i,s,l,f,u){const h=o.ref(!1),d=e.$params||{},m=o.ref(null);let p,v;e.$async?{$invalid:p,$unwatch:v}=XJ(e.$validator,t,h,a,r,m,c,e.$watchTargets,l,f,u):{$invalid:p,$unwatch:v}=ZJ(e.$validator,t,a,r,m,c,l,f);const g=e.$message;return{$message:rr(g)?o.computed(()=>g(Gh({$pending:h,$invalid:p,$params:Gh(d),$model:t,$response:m,$validator:n,$propertyPath:s,$property:i}))):g||"",$params:d,$pending:h,$invalid:p,$response:m,$unwatch:v}}function KJ(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=o.unref(e),a=Object.keys(t),r={},c={},n={};let i=null;return a.forEach(s=>{const l=t[s];switch(!0){case rr(l.$validator):r[s]=l;break;case rr(l):r[s]={$validator:l};break;case s==="$validationGroups":i=l;break;case s.startsWith("$"):n[s]=l;break;default:c[s]=l}}),{rules:r,nestedValidators:c,config:n,validationGroups:i}}const JJ="__root";function e11(e,t,a,r,c,n,i,s,l){const f=Object.keys(e),u=r.get(c,e),h=o.ref(!1),d=o.ref(!1),m=o.ref(0);if(u){if(!u.$partial)return u;u.$unwatch(),h.value=u.$dirty.value}const p={$dirty:h,$path:c,$touch:()=>{h.value||(h.value=!0)},$reset:()=>{h.value&&(h.value=!1)},$commit:()=>{}};return f.length?(f.forEach(v=>{p[v]=QJ(e[v],t,p.$dirty,n,i,v,a,c,l,d,m)}),p.$externalResults=o.computed(()=>s.value?[].concat(s.value).map((v,g)=>({$propertyPath:c,$property:a,$validator:"$externalResults",$uid:`${c}-externalResult-${g}`,$message:v,$params:{},$response:null,$pending:!1})):[]),p.$invalid=o.computed(()=>{const v=f.some(g=>o.unref(p[g].$invalid));return d.value=v,!!p.$externalResults.value.length||v}),p.$pending=o.computed(()=>f.some(v=>o.unref(p[v].$pending))),p.$error=o.computed(()=>p.$dirty.value?p.$pending.value||p.$invalid.value:!1),p.$silentErrors=o.computed(()=>f.filter(v=>o.unref(p[v].$invalid)).map(v=>{const g=p[v];return o.reactive({$propertyPath:c,$property:a,$validator:v,$uid:`${c}-${v}`,$message:g.$message,$params:g.$params,$response:g.$response,$pending:g.$pending})}).concat(p.$externalResults.value)),p.$errors=o.computed(()=>p.$dirty.value?p.$silentErrors.value:[]),p.$unwatch=()=>f.forEach(v=>{p[v].$unwatch()}),p.$commit=()=>{d.value=!0,m.value=Date.now()},r.set(c,e,p),p):(u&&r.set(c,e,p),p)}function t11(e,t,a,r,c,n,i){const s=Object.keys(e);return s.length?s.reduce((l,f)=>(l[f]=Bi({validations:e[f],state:t,key:f,parentKey:a,resultsCache:r,globalConfig:c,instance:n,externalResults:i}),l),{}):{}}function a11(e,t,a){const r=o.computed(()=>[t,a].filter(p=>p).reduce((p,v)=>p.concat(Object.values(o.unref(v))),[])),c=o.computed({get(){return e.$dirty.value||(r.value.length?r.value.every(p=>p.$dirty):!1)},set(p){e.$dirty.value=p}}),n=o.computed(()=>{const p=o.unref(e.$silentErrors)||[],v=r.value.filter(g=>(o.unref(g).$silentErrors||[]).length).reduce((g,x)=>g.concat(...x.$silentErrors),[]);return p.concat(v)}),i=o.computed(()=>{const p=o.unref(e.$errors)||[],v=r.value.filter(g=>(o.unref(g).$errors||[]).length).reduce((g,x)=>g.concat(...x.$errors),[]);return p.concat(v)}),s=o.computed(()=>r.value.some(p=>p.$invalid)||o.unref(e.$invalid)||!1),l=o.computed(()=>r.value.some(p=>o.unref(p.$pending))||o.unref(e.$pending)||!1),f=o.computed(()=>r.value.some(p=>p.$dirty)||r.value.some(p=>p.$anyDirty)||c.value),u=o.computed(()=>c.value?l.value||s.value:!1),h=()=>{e.$touch(),r.value.forEach(p=>{p.$touch()})},d=()=>{e.$commit(),r.value.forEach(p=>{p.$commit()})},m=()=>{e.$reset(),r.value.forEach(p=>{p.$reset()})};return r.value.length&&r.value.every(p=>p.$dirty)&&h(),{$dirty:c,$errors:i,$invalid:s,$anyDirty:f,$error:u,$pending:l,$touch:h,$reset:m,$silentErrors:n,$commit:d}}function Bi(e){let{validations:t,state:a,key:r,parentKey:c,childResults:n,resultsCache:i,globalConfig:s={},instance:l,externalResults:f}=e;const u=c?`${c}.${r}`:r,{rules:h,nestedValidators:d,config:m,validationGroups:p}=KJ(t),v=x0(x0({},s),m),g=r?o.computed(()=>{const v1=o.unref(a);return v1?o.unref(v1[r]):void 0}):a,x=x0({},o.unref(f)||{}),z=o.computed(()=>{const v1=o.unref(f);return r?v1?o.unref(v1[r]):void 0:v1}),C=e11(h,g,r,i,u,v,l,z,a),b=t11(d,g,u,i,v,l,z),H={};p&&Object.entries(p).forEach(v1=>{let[c1,S]=v1;H[c1]={$invalid:zn(S,b,"$invalid"),$error:zn(S,b,"$error"),$pending:zn(S,b,"$pending"),$errors:qh(S,b,"$errors"),$silentErrors:qh(S,b,"$silentErrors")}});const{$dirty:V,$errors:y,$invalid:A,$anyDirty:E,$error:Y,$pending:F,$touch:L,$reset:j,$silentErrors:r1,$commit:P}=a11(C,b,n),O=r?o.computed({get:()=>o.unref(g),set:v1=>{V.value=!0;const c1=o.unref(a),S=o.unref(f);S&&(S[r]=x[r]),o.isRef(c1[r])?c1[r].value=v1:c1[r]=v1}}):null;r&&v.$autoDirty&&o.watch(g,()=>{V.value||L();const v1=o.unref(f);v1&&(v1[r]=x[r])},{flush:"sync"});async function X(){return L(),v.$rewardEarly&&(P(),await o.nextTick()),await o.nextTick(),new Promise(v1=>{if(!F.value)return v1(!A.value);const c1=o.watch(F,()=>{v1(!A.value),c1()})})}function f1(v1){return(n.value||{})[v1]}function K(){o.isRef(f)?f.value=x:Object.keys(x).length===0?Object.keys(f).forEach(v1=>{delete f[v1]}):Object.assign(f,x)}return o.reactive(x0(x0(x0({},C),{},{$model:O,$dirty:V,$error:Y,$errors:y,$invalid:A,$anyDirty:E,$pending:F,$touch:L,$reset:j,$path:u||JJ,$silentErrors:r1,$validate:X,$commit:P},n&&{$getResultsForChild:f1,$clearExternalResults:K,$validationGroups:H}),b))}class r11{constructor(){this.storage=new Map}set(t,a,r){this.storage.set(t,{rules:a,result:r})}checkRulesValidity(t,a,r){const c=Object.keys(r),n=Object.keys(a);return n.length!==c.length||!n.every(s=>c.includes(s))?!1:n.every(s=>a[s].$params?Object.keys(a[s].$params).every(l=>o.unref(r[s].$params[l])===o.unref(a[s].$params[l])):!0)}get(t,a){const r=this.storage.get(t);if(!r)return;const{rules:c,result:n}=r,i=this.checkRulesValidity(t,a,c),s=n.$unwatch?n.$unwatch:()=>({});return i?n:{$dirty:n.$dirty,$partial:!0,$unwatch:s}}}const z7={COLLECT_ALL:!0,COLLECT_NONE:!1},Xh=Symbol("vuelidate#injectChildResults"),Zh=Symbol("vuelidate#removeChildResults");function c11(e){let{$scope:t,instance:a}=e;const r={},c=o.ref([]),n=o.computed(()=>c.value.reduce((u,h)=>(u[h]=o.unref(r[h]),u),{}));function i(u,h){let{$registerAs:d,$scope:m,$stopPropagation:p}=h;p||t===z7.COLLECT_NONE||m===z7.COLLECT_NONE||t!==z7.COLLECT_ALL&&t!==m||(r[d]=u,c.value.push(d))}a.__vuelidateInjectInstances=[].concat(a.__vuelidateInjectInstances||[],i);function s(u){c.value=c.value.filter(h=>h!==u),delete r[u]}a.__vuelidateRemoveInstances=[].concat(a.__vuelidateRemoveInstances||[],s);const l=o.inject(Xh,[]);o.provide(Xh,a.__vuelidateInjectInstances);const f=o.inject(Zh,[]);return o.provide(Zh,a.__vuelidateRemoveInstances),{childResults:n,sendValidationResultsToParent:l,removeValidationResultsFromParent:f}}function Gx(e){return new Proxy(e,{get(t,a){return typeof t[a]=="object"?Gx(t[a]):o.computed(()=>t[a])}})}let Qh=0;function n11(e,t){var a;let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(r=e,e=void 0,t=void 0);let{$registerAs:c,$scope:n=z7.COLLECT_ALL,$stopPropagation:i,$externalResults:s,currentVueInstance:l}=r;const f=l||((a=o.getCurrentInstance())===null||a===void 0?void 0:a.proxy),u=f?f.$options:{};c||(Qh+=1,c=`_vuelidate_${Qh}`);const h=o.ref({}),d=new r11,{childResults:m,sendValidationResultsToParent:p,removeValidationResultsFromParent:v}=f?c11({$scope:n,instance:f}):{childResults:o.ref({})};if(!e&&u.validations){const g=u.validations;t=o.ref({}),o.onBeforeMount(()=>{t.value=f,o.watch(()=>rr(g)?g.call(t.value,new Gx(t.value)):g,x=>{h.value=Bi({validations:x,state:t,childResults:m,resultsCache:d,globalConfig:r,instance:f,externalResults:s||f.vuelidateExternalResults})},{immediate:!0})}),r=u.validationsConfig||r}else{const g=o.isRef(e)||qJ(e)?e:o.reactive(e||{});o.watch(g,x=>{h.value=Bi({validations:x,state:t,childResults:m,resultsCache:d,globalConfig:r,instance:f??{},externalResults:s})},{immediate:!0})}return f&&(p.forEach(g=>g(h,{$registerAs:c,$scope:n,$stopPropagation:i})),o.onBeforeUnmount(()=>v.forEach(g=>g(c)))),o.computed(()=>x0(x0({},o.unref(h.value)),m.value))}function Kh(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),a.push.apply(a,r)}return a}function H5(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Kh(Object(a),!0).forEach(function(r){i11(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Kh(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function i11(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function cr(e){return typeof e=="function"}function Oi(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function ac(e){return cr(e.$validator)?H5({},e):{$validator:e}}function qx(e){return typeof e=="object"?e.$valid:e}function Xx(e){return e.$validator||e}function s11(e,t){if(!Oi(e))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);if(!Oi(t)&&!cr(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=ac(t);return a.$params=H5(H5({},a.$params||{}),e),a}function o11(e,t){if(!cr(e)&&typeof o.unref(e)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof e}`);if(!Oi(t)&&!cr(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=ac(t);return a.$message=e,a}function l11(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const a=ac(e);return H5(H5({},a),{},{$async:!0,$watchTargets:t})}function f11(e){return{$validator(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),c=1;c<a;c++)r[c-1]=arguments[c];return o.unref(t).reduce((n,i,s)=>{const l=Object.entries(i).reduce((f,u)=>{let[h,d]=u;const m=e[h]||{},p=Object.entries(m).reduce((v,g)=>{let[x,z]=g;const b=Xx(z).call(this,d,i,s,...r),H=qx(b);if(v.$data[x]=b,v.$data.$invalid=!H||!!v.$data.$invalid,v.$data.$error=v.$data.$invalid,!H){let V=z.$message||"";const y=z.$params||{};typeof V=="function"&&(V=V({$pending:!1,$invalid:!H,$params:y,$model:d,$response:b})),v.$errors.push({$property:h,$message:V,$params:y,$response:b,$model:d,$pending:!1,$validator:x})}return{$valid:v.$valid&&H,$data:v.$data,$errors:v.$errors}},{$valid:!0,$data:{},$errors:[]});return f.$data[h]=p.$data,f.$errors[h]=p.$errors,{$valid:f.$valid&&p.$valid,$data:f.$data,$errors:f.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:n.$valid&&l.$valid,$data:n.$data.concat(l.$data),$errors:n.$errors.concat(l.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:t=>{let{$response:a}=t;return a?a.$errors.map(r=>Object.values(r).map(c=>c.map(n=>n.$message)).reduce((c,n)=>c.concat(n),[])):[]}}}const ta=e=>{if(e=o.unref(e),Array.isArray(e))return!!e.length;if(e==null)return!1;if(e===!1)return!0;if(e instanceof Date)return!isNaN(e.getTime());if(typeof e=="object"){for(let t in e)return!0;return!1}return!!String(e).length},j9=e=>(e=o.unref(e),Array.isArray(e)?e.length:typeof e=="object"?Object.keys(e).length:String(e).length);function e6(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return r=>(r=o.unref(r),!ta(r)||t.every(c=>(c.lastIndex=0,c.test(r))))}var V5=Object.freeze({__proto__:null,forEach:f11,len:j9,normalizeValidatorObject:ac,regex:e6,req:ta,unwrap:o.unref,unwrapNormalizedValidator:Xx,unwrapValidatorResponse:qx,withAsync:l11,withMessage:o11,withParams:s11});e6(/^[a-zA-Z]*$/);e6(/^[a-zA-Z0-9]*$/);e6(/^\d*(\.\d+)?$/);const u11=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;e6(u11);function h11(e){return t=>!ta(t)||j9(t)<=o.unref(e)}function d11(e){return{$validator:h11(e),$message:t=>{let{$params:a}=t;return`The maximum length allowed is ${a.max}`},$params:{max:e,type:"maxLength"}}}function m11(e){return t=>!ta(t)||j9(t)>=o.unref(e)}function p11(e){return{$validator:m11(e),$message:t=>{let{$params:a}=t;return`This field should be at least ${a.min} characters long`},$params:{min:e,type:"minLength"}}}function v11(e){return typeof e=="string"&&(e=e.trim()),ta(e)}var g11={$validator:v11,$message:"Value is required",$params:{type:"required"}};const x11=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;e6(x11);var C11=e6(/(^[0-9]*$)|(^-[0-9]+$)/),z11={$validator:C11,$message:"Value is not an integer",$params:{type:"integer"}};e6(/^[-]?\d*(\.\d+)?$/);const rc=I2("validations"),Ri=V5.withMessage(()=>rc("requiredRuleError"),g11),Ii=e=>Zx("minLength",e),$i=e=>Zx("maxLength",e),M11=V5.withMessage(()=>rc("integerRuleError"),z11),y11=e=>cc("lessEqual",e),b11=e=>cc("greaterEqual",e),H11=e=>cc("lessThan",e),V11=e=>cc("greaterThan",e);function Zx(e,t){const a={minLength:p11,maxLength:d11};return V5.withMessage(()=>rc(`${e}RuleError`,{length:t}),a[e](t))}function cc(e,t){const a={lessEqual:r=>r<=t,greaterEqual:r=>r>=t,lessThan:r=>r<t,greaterThan:r=>r>t};return V5.withMessage(()=>rc(`${e}RuleError`,{number:t}),V5.withParams({},r=>typeof r!="number"?!0:a[e](r)))}const w11=o.defineComponent({__name:"PgaInputRightButton",props:{icon:{},withBackground:{type:Boolean}},setup(e){o.useCssVars(a=>({f1ad62f8:o.unref(t).input.height,26636360:o.unref(t).input.iconWidth,c485010a:o.unref(t).input.borderRadius,"137001a0":o.unref(t).input.backgroundColorFocus,"138c7604":o.unref(t).input.backgroundColorHover}));const{form:t}=s3.storeToRefs(h3());return(a,r)=>(o.openBlock(),o.createBlock(o3,{class:o.normalizeClass(["input-right-button",{"input-right-button__with-background":a.withBackground}]),variant:"flat",icon:a.icon,tabindex:"-1"},null,8,["class","icon"]))}});const nr=R1(w11,[["__scopeId","data-v-0b343b81"]]),_11={class:"input-container"},k11={class:"input-content"},L11=["type","placeholder","autofocus","disabled"],Mn="",S11=o.defineComponent({__name:"PgaInput",props:o.mergeModels({type:{default:"text"},integer:{type:Boolean},placeholder:{},label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},autofocus:{type:Boolean},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["change","enter","valueCleared"],["update:modelValue"]),setup(e,{expose:t,emit:a}){o.useCssVars(V=>({b5591abe:o.unref(i).input.height,b59cec52:o.unref(i).input.padding,"8062fd46":o.unref(i).input.borderColor,"52d159d8":o.unref(i).input.borderRadius,d96bc2ca:o.unref(i).input.backgroundColor,"05f5efaf":o.unref(i).input.colorFocus,f0881b92:o.unref(i).input.backgroundColorDisabled,56569554:o.unref(i).input.paddingWithIcon,"2db6faaa":o.unref(i).input.placeholderColor}));const r=o.useModel(e,"modelValue"),c=e,n=a;t({focus:p});const{form:i}=s3.storeToRefs(h3()),s=o.ref(),l=o.ref(Mn),f=o.ref(!1),u=o.computed(()=>{if(c.placeholder)return A0(c.placeholder)}),h=o.computed(()=>c.type==="password"),d=o.computed(()=>h.value?!1:!!(!c.disabled&&l.value)),m=o.computed(()=>!!(h.value||d.value));o.watch(r,V=>b(V),{immediate:!0});function p(){var V;(V=s.value)==null||V.focus()}function v(){c.type==="number"&&!l.value&&(l.value=Mn)}function g(){c.type==="number"&&!l.value&&(l.value=C())}function x(){H(Mn),n("valueCleared")}function z(V){return V===""?null:c.type==="number"&&c.integer&&typeof V=="number"?Math.round(V):V}function C(V){const y=typeof V>"u"?r.value:V;return y===null?"":y}function b(V){const y=z(V);return r.value=y,l.value=C(y),y}function H(V){const y=b(V);n("change",y)}return(V,y)=>(o.openBlock(),o.createBlock(o0,{label:V.label,withOptionalLabel:V.withOptionalLabel,withLabelSpace:V.withLabelSpace,errors:V.errors,grow:V.grow},{default:o.withCtx(()=>[o.createElementVNode("div",_11,[o.createElementVNode("div",k11,[o.withDirectives(o.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":y[0]||(y[0]=A=>l.value=A),class:o.normalizeClass(["input",{input__disabled:V.disabled,"input__with-btn":m.value}]),type:f.value?"text":V.type,placeholder:u.value,autofocus:V.autofocus,disabled:V.disabled,onInput:y[1]||(y[1]=A=>H(l.value)),onKeyup:y[2]||(y[2]=o.withKeys(A=>n("enter"),["enter"])),onFocus:y[3]||(y[3]=A=>v()),onBlur:y[4]||(y[4]=A=>g())},null,42,L11),[[o.vModelDynamic,l.value]]),h.value?(o.openBlock(),o.createBlock(nr,{key:0,icon:f.value?"eye-slash":"eye",withBackground:"",onClick:y[5]||(y[5]=A=>f.value=!f.value)},null,8,["icon"])):d.value?(o.openBlock(),o.createBlock(nr,{key:1,icon:"xmark",onClick:y[6]||(y[6]=A=>x())})):o.createCommentVNode("",!0)]),o.renderSlot(V.$slots,"labelRight",{},void 0,!0)])]),_:3},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const ir=R1(S11,[["__scopeId","data-v-67603bb6"]]),A11={class:"login-form-container"},T11={class:"user-icon-container"},N11=o.defineComponent({__name:"PgaLoginForm",setup(e){class t{constructor(){o1(this,"username","");o1(this,"password","")}}const a=X2.getConfig(),r=Zt.useRoute(),c=I2("pgaLoginForm"),n={username:{requiredRule:Ri,minLengthRule:Ii(8),maxLengthRule:$i(a.stringLengths.short)},password:{requiredRule:Ri,minLengthRule:Ii(8),maxLengthRule:$i(a.stringLengths.short)}},i=o.ref(new t),s=n11(n,i),l=o.ref(!1);async function f(){if(!await s.value.$validate())return;const u={isLoadingRef:l,redirectToName:r.query.redirectTo};ym(k4().currentRouteType,i.value,u)}return(u,h)=>(o.openBlock(),o.createElementBlock("div",A11,[o.createVNode(Ux,{class:"login-form"},{default:o.withCtx(()=>[o.createElementVNode("div",T11,[o.createVNode(S3,{class:"user-icon",icon:"user"})]),o.createVNode(ir,{modelValue:i.value.username,"onUpdate:modelValue":h[0]||(h[0]=d=>i.value.username=d),label:o.unref(c)("usernameLabel"),errors:o.unref(s).username.$errors,disabled:l.value},null,8,["modelValue","label","errors","disabled"]),o.createVNode(ir,{modelValue:i.value.password,"onUpdate:modelValue":h[1]||(h[1]=d=>i.value.password=d),type:"password",label:o.unref(c)("passwordLabel"),errors:o.unref(s).password.$errors,disabled:l.value},null,8,["modelValue","label","errors","disabled"]),o.createVNode(o3,{type:"submit",icon:"right-to-bracket",text:o.unref(c)("loginBtn"),isLoading:l.value,onClick:h[2]||(h[2]=d=>f())},null,8,["text","isLoading"])]),_:1})]))}});const E11=R1(N11,[["__scopeId","data-v-579ff9e9"]]),P11={class:"pga-checkbox"},F11=["textContent"],D11=o.defineComponent({__name:"PgaCheckbox",props:o.mergeModels({label:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue");return(a,r)=>(o.openBlock(),o.createElementBlock("label",P11,[o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=c=>t.value=c),type:"checkbox"},null,512),[[o.vModelCheckbox,t.value]]),a.label?(o.openBlock(),o.createElementBlock("span",{key:0,class:"checkbox--label",textContent:o.toDisplayString(a.label)},null,8,F11)):o.createCommentVNode("",!0)]))}});const B11=R1(D11,[["__scopeId","data-v-89f11c66"]]),O11={class:"colors-container"},R11=o.defineComponent({__name:"PgaColorSelector",props:o.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(r=>({"808c2cde":o.unref(a).input.padding,c96717d2:o.unref(a).input.borderColor,"31dc8344":o.unref(a).input.borderRadius}));const t=o.useModel(e,"modelValue"),{form:a}=s3.storeToRefs(h3());return(r,c)=>(o.openBlock(),o.createBlock(o0,{label:r.label,withOptionalLabel:r.withOptionalLabel,withLabelSpace:r.withLabelSpace,errors:r.errors,grow:r.grow},{default:o.withCtx(()=>[o.createElementVNode("div",O11,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(Vm),n=>(o.openBlock(),o.createBlock(o3,{key:n,variant:t.value===n?"outlined":"flat",color:t.value===n?"primary":"first",disabled:r.disabled,onClick:i=>t.value=n},{default:o.withCtx(()=>[o.createVNode(kv,{color:n},null,8,["color"])]),_:2},1032,["variant","color","disabled","onClick"]))),128))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const I11=R1(R11,[["__scopeId","data-v-95ed7400"]]),$11={class:"icons-container"},U11=o.defineComponent({__name:"PgaIconSelector",props:o.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(c=>({"7f398b94":o.unref(a).input.padding,"6e555c9a":o.unref(a).input.borderColor,"7525e63b":o.unref(a).input.borderRadius}));const t=o.useModel(e,"modelValue"),{form:a}=s3.storeToRefs(h3()),r=["star","heart","envelope","plus","minus","pen","edit","check","trash","file","clipboard","bell","calendar","clock","money-check-dollar","gift","percent","magnifying-glass-dollar","house","car","store","gamepad","mobile","school","shirt","user-doctor","face-smile","face-frown-open","cog","lock","bug","camera","code","headphones","wifi","user","search","home","arrow-right-arrow-left","circle"];return(c,n)=>(o.openBlock(),o.createBlock(o0,{label:c.label,withOptionalLabel:c.withOptionalLabel,withLabelSpace:c.withLabelSpace,errors:c.errors,grow:c.grow},{default:o.withCtx(()=>[o.createElementVNode("div",$11,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(r,i=>o.createVNode(o3,{key:i,icon:i,variant:t.value===i?"outlined":"flat",color:t.value===i?"primary":"grey",width:"2.5rem",disabled:c.disabled,onClick:s=>t.value=i},null,8,["icon","variant","color","disabled","onClick"])),64))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const W11=R1(U11,[["__scopeId","data-v-f73462c0"]]),Y11={class:"input-file"},j11=["accept","disabled"],G11={class:"input-file--name-container"},q11=["textContent"],X11=o.defineComponent({__name:"PgaInputFile",props:{label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},acceptedFormats:{default:"*"},errors:{},disabled:{type:Boolean},grow:{}},emits:["newFile"],setup(e,{expose:t,emit:a}){o.useCssVars(z=>({"3b3c31fc":o.unref(n).input.borderColor,faaaae5a:o.unref(n).input.borderRadius,"668fac80":o.unref(n).input.backgroundColor,ae727148:o.unref(n).input.backgroundColorHover,"5c59ef48":o.unref(n).input.backgroundColorDisabled}));const r=e,c=a;t({click:p,resetInput:v});const{form:n}=s3.storeToRefs(h3()),i=I2("pgaInputFile"),s=o.ref(),l=o.ref(),f=o.ref(!1),u=o.ref(!1),h=o.computed(()=>r.acceptedFormats==="*"?"*":r.acceptedFormats.map(z=>`.${z}`).join(",")),d=o.computed(()=>f.value&&!u.value&&!r.disabled||!l.value?{icon:"upload"}:x(l.value)?{icon:"circle-check",color:"success"}:{icon:"circle-xmark",color:"danger"}),m=o.computed(()=>l.value?l.value.name:i("selectFileLabel"));function p(){var z;(z=s.value)==null||z.click()}function v(){l.value=null,s.value&&(s.value.value="")}function g(z){f.value=!1;const b=z.target.files[0];b&&(l.value=b,x(b)?c("newFile",b):N0("danger",()=>i("newFileError")))}function x(z){if(!z)return!1;if(r.acceptedFormats==="*")return!0;const C=z.name.split(".").pop();return!!r.acceptedFormats.includes(C)}return(z,C)=>(o.openBlock(),o.createBlock(o0,{label:z.label,withOptionalLabel:z.withOptionalLabel,withLabelSpace:z.withLabelSpace,errors:z.errors,grow:z.grow},{default:o.withCtx(()=>[o.createElementVNode("div",Y11,[o.createElementVNode("input",{ref_key:"inputRef",ref:s,id:"input-file",class:"input-file--input",type:"file",accept:h.value,disabled:z.disabled,onChange:C[0]||(C[0]=b=>g(b))},null,40,j11),o.createElementVNode("label",{for:"input-file",class:o.normalizeClass(["input-file--custom-input",{"input-file--custom-input__disabled":z.disabled}]),onMouseenter:C[4]||(C[4]=b=>f.value=!0),onMouseleave:C[5]||(C[5]=b=>f.value=!1)},[o.createVNode(S3,{class:"input-file--icon",icon:d.value.icon,color:d.value.color},null,8,["icon","color"]),o.createElementVNode("div",G11,[o.createElementVNode("span",{class:"input-file--name",textContent:o.toDisplayString(m.value)},null,8,q11)]),l.value?(o.openBlock(),o.createBlock(o3,{key:0,text:o.unref(i)("removeBtn"),variant:"flat",color:"danger",size:"s",disabled:z.disabled,onMouseenter:C[1]||(C[1]=b=>u.value=!0),onMouseleave:C[2]||(C[2]=b=>u.value=!1),onClick:C[3]||(C[3]=o.withModifiers(b=>v(),["prevent"]))},null,8,["text","disabled"])):o.createCommentVNode("",!0)],34)])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const G9=R1(X11,[["__scopeId","data-v-e44cd93c"]]);/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var Qx=1252,Z11=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],q9={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},X9=function(e){Z11.indexOf(e)!=-1&&(Qx=q9[0]=e)};function Q11(){X9(1252)}var U4=function(e){X9(e)};function Kx(){U4(1200),Q11()}function Jh(e){for(var t=[],a=0,r=e.length;a<r;++a)t[a]=e.charCodeAt(a);return t}function K11(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a)+(e.charCodeAt(2*a+1)<<8));return t.join("")}function Jx(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a+1)+(e.charCodeAt(2*a)<<8));return t.join("")}var Mt=function(e){var t=e.charCodeAt(0),a=e.charCodeAt(1);return t==255&&a==254?K11(e.slice(2)):t==254&&a==255?Jx(e.slice(2)):t==65279?e.slice(1):e},Ga=function(t){return String.fromCharCode(t)},ed=function(t){return String.fromCharCode(t)},C0,k0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function td(e){for(var t="",a=0,r=0,c=0,n=0,i=0,s=0,l=0,f=0;f<e.length;)a=e.charCodeAt(f++),n=a>>2,r=e.charCodeAt(f++),i=(a&3)<<4|r>>4,c=e.charCodeAt(f++),s=(r&15)<<2|c>>6,l=c&63,isNaN(r)?s=l=64:isNaN(c)&&(l=64),t+=k0.charAt(n)+k0.charAt(i)+k0.charAt(s)+k0.charAt(l);return t}function g4(e){var t="",a=0,r=0,c=0,n=0,i=0,s=0,l=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var f=0;f<e.length;)n=k0.indexOf(e.charAt(f++)),i=k0.indexOf(e.charAt(f++)),a=n<<2|i>>4,t+=String.fromCharCode(a),s=k0.indexOf(e.charAt(f++)),r=(i&15)<<4|s>>2,s!==64&&(t+=String.fromCharCode(r)),l=k0.indexOf(e.charAt(f++)),c=(s&3)<<6|l,l!==64&&(t+=String.fromCharCode(c));return t}var c2=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),q6=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,a){return a?new Buffer(t,a):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}}();function q0(e){return c2?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function ad(e){return c2?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var O4=function(t){return c2?q6(t,"binary"):t.split("").map(function(a){return a.charCodeAt(0)&255})};function X6(e){if(Array.isArray(e))return e.map(function(r){return String.fromCharCode(r)}).join("");for(var t=[],a=0;a<e.length;++a)t[a]=String.fromCharCode(e[a]);return t.join("")}function Z9(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return Z9(new Uint8Array(e));for(var t=new Array(e.length),a=0;a<e.length;++a)t[a]=e[a];return t}var z0=c2?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:q6(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,a=0;for(t=0;t<e.length;++t)a+=e[t].length;var r=new Uint8Array(a),c=0;for(t=0,a=0;t<e.length;a+=c,++t)if(c=e[t].length,e[t]instanceof Uint8Array)r.set(e[t],a);else{if(typeof e[t]=="string")throw"wtf";r.set(new Uint8Array(e[t]),a)}return r}return[].concat.apply([],e.map(function(n){return Array.isArray(n)?n:[].slice.call(n)}))};function J11(e){for(var t=[],a=0,r=e.length+250,c=q0(e.length+255),n=0;n<e.length;++n){var i=e.charCodeAt(n);if(i<128)c[a++]=i;else if(i<2048)c[a++]=192|i>>6&31,c[a++]=128|i&63;else if(i>=55296&&i<57344){i=(i&1023)+64;var s=e.charCodeAt(++n)&1023;c[a++]=240|i>>8&7,c[a++]=128|i>>2&63,c[a++]=128|s>>6&15|(i&3)<<4,c[a++]=128|s&63}else c[a++]=224|i>>12&15,c[a++]=128|i>>6&63,c[a++]=128|i&63;a>r&&(t.push(c.slice(0,a)),a=0,c=q0(65535),r=65530)}return t.push(c.slice(0,a)),z0(t)}var e4=/\u0000/g,yt=/[\u0001-\u0006]/g;function y8(e){for(var t="",a=e.length-1;a>=0;)t+=e.charAt(a--);return t}function W4(e,t){var a=""+e;return a.length>=t?a:j2("0",t-a.length)+a}function Q9(e,t){var a=""+e;return a.length>=t?a:j2(" ",t-a.length)+a}function sr(e,t){var a=""+e;return a.length>=t?a:a+j2(" ",t-a.length)}function e21(e,t){var a=""+Math.round(e);return a.length>=t?a:j2("0",t-a.length)+a}function t21(e,t){var a=""+e;return a.length>=t?a:j2("0",t-a.length)+a}var rd=Math.pow(2,32);function i8(e,t){if(e>rd||e<-rd)return e21(e,t);var a=Math.round(e);return t21(a,t)}function or(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var cd=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],yn=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function a21(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var j1={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},nd={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},r21={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function lr(e,t,a){for(var r=e<0?-1:1,c=e*r,n=0,i=1,s=0,l=1,f=0,u=0,h=Math.floor(c);f<t&&(h=Math.floor(c),s=h*i+n,u=h*f+l,!(c-h<5e-8));)c=1/(c-h),n=i,i=s,l=f,f=u;if(u>t&&(f>t?(u=l,s=n):(u=f,s=i)),!a)return[0,r*s,u];var d=Math.floor(r*s/u);return[d,r*s-d*u,u]}function M6(e,t,a){if(e>2958465||e<0)return null;var r=e|0,c=Math.floor(86400*(e-r)),n=0,i=[],s={D:r,T:c,u:86400*(e-r)-c,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(s.u)<1e-6&&(s.u=0),t&&t.date1904&&(r+=1462),s.u>.9999&&(s.u=0,++c==86400&&(s.T=c=0,++r,++s.D)),r===60)i=a?[1317,10,29]:[1900,2,29],n=3;else if(r===0)i=a?[1317,8,29]:[1900,1,0],n=6;else{r>60&&--r;var l=new Date(1900,0,1);l.setDate(l.getDate()+r-1),i=[l.getFullYear(),l.getMonth()+1,l.getDate()],n=l.getDay(),r<60&&(n=(n+6)%7),a&&(n=l21(l,i))}return s.y=i[0],s.m=i[1],s.d=i[2],s.S=c%60,c=Math.floor(c/60),s.M=c%60,c=Math.floor(c/60),s.H=c,s.q=n,s}var eC=new Date(1899,11,31,0,0,0),c21=eC.getTime(),n21=new Date(1900,2,1,0,0,0);function tC(e,t){var a=e.getTime();return t?a-=1461*24*60*60*1e3:e>=n21&&(a+=24*60*60*1e3),(a-(c21+(e.getTimezoneOffset()-eC.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function K9(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function i21(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function s21(e){var t=e<0?12:11,a=K9(e.toFixed(12));return a.length<=t||(a=e.toPrecision(10),a.length<=t)?a:e.toExponential(5)}function o21(e){var t=K9(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function w5(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),a;return t>=-4&&t<=-1?a=e.toPrecision(10+t):Math.abs(t)<=9?a=s21(e):t===10?a=e.toFixed(10).substr(0,12):a=o21(e),K9(i21(a.toUpperCase()))}function D6(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):w5(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return _4(14,tC(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function l21(e,t){t[0]-=581;var a=e.getDay();return e<60&&(a=(a+6)%7),a}function f21(e,t,a,r){var c="",n=0,i=0,s=a.y,l,f=0;switch(e){case 98:s=a.y+543;case 121:switch(t.length){case 1:case 2:l=s%100,f=2;break;default:l=s%1e4,f=4;break}break;case 109:switch(t.length){case 1:case 2:l=a.m,f=t.length;break;case 3:return yn[a.m-1][1];case 5:return yn[a.m-1][0];default:return yn[a.m-1][2]}break;case 100:switch(t.length){case 1:case 2:l=a.d,f=t.length;break;case 3:return cd[a.q][0];default:return cd[a.q][1]}break;case 104:switch(t.length){case 1:case 2:l=1+(a.H+11)%12,f=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:l=a.H,f=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:l=a.M,f=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return a.u===0&&(t=="s"||t=="ss")?W4(a.S,t.length):(r>=2?i=r===3?1e3:100:i=r===1?10:1,n=Math.round(i*(a.S+a.u)),n>=60*i&&(n=0),t==="s"?n===0?"0":""+n/i:(c=W4(n,2+r),t==="ss"?c.substr(0,2):"."+c.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":l=a.D*24+a.H;break;case"[m]":case"[mm]":l=(a.D*24+a.H)*60+a.M;break;case"[s]":case"[ss]":l=((a.D*24+a.H)*60+a.M)*60+Math.round(a.S+a.u);break;default:throw"bad abstime format: "+t}f=t.length===3?1:2;break;case 101:l=s,f=1;break}var u=f>0?W4(l,f):"";return u}function L0(e){var t=3;if(e.length<=t)return e;for(var a=e.length%t,r=e.substr(0,a);a!=e.length;a+=t)r+=(r.length>0?",":"")+e.substr(a,t);return r}var aC=/%/g;function u21(e,t,a){var r=t.replace(aC,""),c=t.length-r.length;return Qe(e,r,a*Math.pow(10,2*c))+j2("%",c)}function h21(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return Qe(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function rC(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+rC(e,-t);var c=e.indexOf(".");c===-1&&(c=e.indexOf("E"));var n=Math.floor(Math.log(t)*Math.LOG10E)%c;if(n<0&&(n+=c),a=(t/Math.pow(10,n)).toPrecision(r+1+(c+n)%c),a.indexOf("e")===-1){var i=Math.floor(Math.log(t)*Math.LOG10E);for(a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(i-a.length+n):a+="E+"+(i-n);a.substr(0,2)==="0.";)a=a.charAt(0)+a.substr(2,c)+"."+a.substr(2+c),a=a.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(c+n)%c)+"."+u.substr(n)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}var cC=/# (\?+)( ?)\/( ?)(\d+)/;function d21(e,t,a){var r=parseInt(e[4],10),c=Math.round(t*r),n=Math.floor(c/r),i=c-n*r,s=r;return a+(n===0?"":""+n)+" "+(i===0?j2(" ",e[1].length+1+e[4].length):Q9(i,e[1].length)+e[2]+"/"+e[3]+W4(s,e[4].length))}function m21(e,t,a){return a+(t===0?"":""+t)+j2(" ",e[1].length+2+e[4].length)}var nC=/^#*0*\.([0#]+)/,iC=/\).*[0#]/,sC=/\(###\) ###\\?-####/;function Z3(e){for(var t="",a,r=0;r!=e.length;++r)switch(a=e.charCodeAt(r)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(a)}return t}function id(e,t){var a=Math.pow(10,t);return""+Math.round(e*a)/a}function sd(e,t){var a=e-Math.floor(e),r=Math.pow(10,t);return t<(""+Math.round(a*r)).length?0:Math.round(a*r)}function p21(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function v21(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function b4(e,t,a){if(e.charCodeAt(0)===40&&!t.match(iC)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?b4("n",r,a):"("+b4("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return h21(e,t,a);if(t.indexOf("%")!==-1)return u21(e,t,a);if(t.indexOf("E")!==-1)return rC(t,a);if(t.charCodeAt(0)===36)return"$"+b4(e,t.substr(t.charAt(1)==" "?2:1),a);var c,n,i,s,l=Math.abs(a),f=a<0?"-":"";if(t.match(/^00+$/))return f+i8(l,t.length);if(t.match(/^[#?]+$/))return c=i8(a,0),c==="0"&&(c=""),c.length>t.length?c:Z3(t.substr(0,t.length-c.length))+c;if(n=t.match(cC))return d21(n,l,f);if(t.match(/^#+0+$/))return f+i8(l,t.length-t.indexOf("0"));if(n=t.match(nC))return c=id(a,n[1].length).replace(/^([^\.]+)$/,"$1."+Z3(n[1])).replace(/\.$/,"."+Z3(n[1])).replace(/\.(\d*)$/,function(p,v){return"."+v+j2("0",Z3(n[1]).length-v.length)}),t.indexOf("0.")!==-1?c:c.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),n=t.match(/^(0*)\.(#*)$/))return f+id(l,n[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,n[1].length?"0.":".");if(n=t.match(/^#{1,3},##0(\.?)$/))return f+L0(i8(l,0));if(n=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+b4(e,t,-a):L0(""+(Math.floor(a)+p21(a,n[1].length)))+"."+W4(sd(a,n[1].length),n[1].length);if(n=t.match(/^#,#*,#0/))return b4(e,t.replace(/^#,#*,/,""),a);if(n=t.match(/^([0#]+)(\\?-([0#]+))+$/))return c=y8(b4(e,t.replace(/[\\-]/g,""),a)),i=0,y8(y8(t.replace(/\\/g,"")).replace(/[0#]/g,function(p){return i<c.length?c.charAt(i++):p==="0"?"0":""}));if(t.match(sC))return c=b4(e,"##########",a),"("+c.substr(0,3)+") "+c.substr(3,3)+"-"+c.substr(6);var u="";if(n=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(n[4].length,7),s=lr(l,Math.pow(10,i)-1,!1),c=""+f,u=Qe("n",n[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),c+=u+n[2]+"/"+n[3],u=sr(s[2],i),u.length<n[4].length&&(u=Z3(n[4].substr(n[4].length-u.length))+u),c+=u,c;if(n=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(n[1].length,n[4].length),7),s=lr(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Q9(s[1],i)+n[2]+"/"+n[3]+sr(s[2],i):j2(" ",2*i+1+n[2].length+n[3].length));if(n=t.match(/^[#0?]+$/))return c=i8(a,0),t.length<=c.length?c:Z3(t.substr(0,t.length-c.length))+c;if(n=t.match(/^([#0?]+)\.([#0]+)$/)){c=""+a.toFixed(Math.min(n[2].length,10)).replace(/([^0])0+$/,"$1"),i=c.indexOf(".");var h=t.indexOf(".")-i,d=t.length-c.length-h;return Z3(t.substr(0,h)+c+t.substr(t.length-d))}if(n=t.match(/^00,000\.([#0]*0)$/))return i=sd(a,n[1].length),a<0?"-"+b4(e,t,-a):L0(v21(a)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?W4(0,3-p.length):"")+p})+"."+W4(i,n[1].length);switch(t){case"###,##0.00":return b4(e,"#,##0.00",a);case"###,###":case"##,###":case"#,###":var m=L0(i8(l,0));return m!=="0"?f+m:"";case"###,###.00":return b4(e,"###,##0.00",a).replace(/^0\./,".");case"#,###.00":return b4(e,"#,##0.00",a).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function g21(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return Qe(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function x21(e,t,a){var r=t.replace(aC,""),c=t.length-r.length;return Qe(e,r,a*Math.pow(10,2*c))+j2("%",c)}function oC(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+oC(e,-t);var c=e.indexOf(".");c===-1&&(c=e.indexOf("E"));var n=Math.floor(Math.log(t)*Math.LOG10E)%c;if(n<0&&(n+=c),a=(t/Math.pow(10,n)).toPrecision(r+1+(c+n)%c),!a.match(/[Ee]/)){var i=Math.floor(Math.log(t)*Math.LOG10E);a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(i-a.length+n):a+="E+"+(i-n),a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(c+n)%c)+"."+u.substr(n)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}function ue(e,t,a){if(e.charCodeAt(0)===40&&!t.match(iC)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?ue("n",r,a):"("+ue("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return g21(e,t,a);if(t.indexOf("%")!==-1)return x21(e,t,a);if(t.indexOf("E")!==-1)return oC(t,a);if(t.charCodeAt(0)===36)return"$"+ue(e,t.substr(t.charAt(1)==" "?2:1),a);var c,n,i,s,l=Math.abs(a),f=a<0?"-":"";if(t.match(/^00+$/))return f+W4(l,t.length);if(t.match(/^[#?]+$/))return c=""+a,a===0&&(c=""),c.length>t.length?c:Z3(t.substr(0,t.length-c.length))+c;if(n=t.match(cC))return m21(n,l,f);if(t.match(/^#+0+$/))return f+W4(l,t.length-t.indexOf("0"));if(n=t.match(nC))return c=(""+a).replace(/^([^\.]+)$/,"$1."+Z3(n[1])).replace(/\.$/,"."+Z3(n[1])),c=c.replace(/\.(\d*)$/,function(p,v){return"."+v+j2("0",Z3(n[1]).length-v.length)}),t.indexOf("0.")!==-1?c:c.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),n=t.match(/^(0*)\.(#*)$/))return f+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,n[1].length?"0.":".");if(n=t.match(/^#{1,3},##0(\.?)$/))return f+L0(""+l);if(n=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+ue(e,t,-a):L0(""+a)+"."+j2("0",n[1].length);if(n=t.match(/^#,#*,#0/))return ue(e,t.replace(/^#,#*,/,""),a);if(n=t.match(/^([0#]+)(\\?-([0#]+))+$/))return c=y8(ue(e,t.replace(/[\\-]/g,""),a)),i=0,y8(y8(t.replace(/\\/g,"")).replace(/[0#]/g,function(p){return i<c.length?c.charAt(i++):p==="0"?"0":""}));if(t.match(sC))return c=ue(e,"##########",a),"("+c.substr(0,3)+") "+c.substr(3,3)+"-"+c.substr(6);var u="";if(n=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(n[4].length,7),s=lr(l,Math.pow(10,i)-1,!1),c=""+f,u=Qe("n",n[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),c+=u+n[2]+"/"+n[3],u=sr(s[2],i),u.length<n[4].length&&(u=Z3(n[4].substr(n[4].length-u.length))+u),c+=u,c;if(n=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(n[1].length,n[4].length),7),s=lr(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Q9(s[1],i)+n[2]+"/"+n[3]+sr(s[2],i):j2(" ",2*i+1+n[2].length+n[3].length));if(n=t.match(/^[#0?]+$/))return c=""+a,t.length<=c.length?c:Z3(t.substr(0,t.length-c.length))+c;if(n=t.match(/^([#0]+)\.([#0]+)$/)){c=""+a.toFixed(Math.min(n[2].length,10)).replace(/([^0])0+$/,"$1"),i=c.indexOf(".");var h=t.indexOf(".")-i,d=t.length-c.length-h;return Z3(t.substr(0,h)+c+t.substr(t.length-d))}if(n=t.match(/^00,000\.([#0]*0)$/))return a<0?"-"+ue(e,t,-a):L0(""+a).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?W4(0,3-p.length):"")+p})+"."+W4(0,n[1].length);switch(t){case"###,###":case"##,###":case"#,###":var m=L0(""+l);return m!=="0"?f+m:"";default:if(t.match(/\.[0#?]*$/))return ue(e,t.slice(0,t.lastIndexOf(".")),a)+Z3(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function Qe(e,t,a){return(a|0)===a?ue(e,t,a):b4(e,t,a)}function C21(e){for(var t=[],a=!1,r=0,c=0;r<e.length;++r)switch(e.charCodeAt(r)){case 34:a=!a;break;case 95:case 42:case 92:++r;break;case 59:t[t.length]=e.substr(c,r-c),c=r+1}if(t[t.length]=e.substr(c),a===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var lC=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function j8(e){for(var t=0,a="",r="";t<e.length;)switch(a=e.charAt(t)){case"G":or(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="上午/下午")return!0;++t;break;case"[":for(r=a;e.charAt(t++)!=="]"&&t<e.length;)r+=e.charAt(t);if(r.match(lC))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(a=e.charAt(++t))>-1||a=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===a;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function z21(e,t,a,r){for(var c=[],n="",i=0,s="",l="t",f,u,h,d="H";i<e.length;)switch(s=e.charAt(i)){case"G":if(!or(e,i))throw new Error("unrecognized character "+s+" in "+e);c[c.length]={t:"G",v:"General"},i+=7;break;case'"':for(n="";(h=e.charCodeAt(++i))!==34&&i<e.length;)n+=String.fromCharCode(h);c[c.length]={t:"t",v:n},++i;break;case"\\":var m=e.charAt(++i),p=m==="("||m===")"?m:"t";c[c.length]={t:p,v:m},++i;break;case"_":c[c.length]={t:"t",v:" "},i+=2;break;case"@":c[c.length]={t:"T",v:t},++i;break;case"B":case"b":if(e.charAt(i+1)==="1"||e.charAt(i+1)==="2"){if(f==null&&(f=M6(t,a,e.charAt(i+1)==="2"),f==null))return"";c[c.length]={t:"X",v:e.substr(i,2)},l=s,i+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":s=s.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||f==null&&(f=M6(t,a),f==null))return"";for(n=s;++i<e.length&&e.charAt(i).toLowerCase()===s;)n+=s;s==="m"&&l.toLowerCase()==="h"&&(s="M"),s==="h"&&(s=d),c[c.length]={t:s,v:n},l=s;break;case"A":case"a":case"上":var v={t:s,v:s};if(f==null&&(f=M6(t,a)),e.substr(i,3).toUpperCase()==="A/P"?(f!=null&&(v.v=f.H>=12?"P":"A"),v.t="T",d="h",i+=3):e.substr(i,5).toUpperCase()==="AM/PM"?(f!=null&&(v.v=f.H>=12?"PM":"AM"),v.t="T",i+=5,d="h"):e.substr(i,5).toUpperCase()==="上午/下午"?(f!=null&&(v.v=f.H>=12?"下午":"上午"),v.t="T",i+=5,d="h"):(v.t="t",++i),f==null&&v.t==="T")return"";c[c.length]=v,l=s;break;case"[":for(n=s;e.charAt(i++)!=="]"&&i<e.length;)n+=e.charAt(i);if(n.slice(-1)!=="]")throw'unterminated "[" block: |'+n+"|";if(n.match(lC)){if(f==null&&(f=M6(t,a),f==null))return"";c[c.length]={t:"Z",v:n.toLowerCase()},l=n.charAt(1)}else n.indexOf("$")>-1&&(n=(n.match(/\$([^-\[\]]*)/)||[])[1]||"$",j8(e)||(c[c.length]={t:"t",v:n}));break;case".":if(f!=null){for(n=s;++i<e.length&&(s=e.charAt(i))==="0";)n+=s;c[c.length]={t:"s",v:n};break}case"0":case"#":for(n=s;++i<e.length&&"0#?.,E+-%".indexOf(s=e.charAt(i))>-1;)n+=s;c[c.length]={t:"n",v:n};break;case"?":for(n=s;e.charAt(++i)===s;)n+=s;c[c.length]={t:s,v:n},l=s;break;case"*":++i,(e.charAt(i)==" "||e.charAt(i)=="*")&&++i;break;case"(":case")":c[c.length]={t:r===1?"t":s,v:s},++i;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(n=s;i<e.length&&"0123456789".indexOf(e.charAt(++i))>-1;)n+=e.charAt(i);c[c.length]={t:"D",v:n};break;case" ":c[c.length]={t:s,v:s},++i;break;case"$":c[c.length]={t:"t",v:"$"},++i;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(s)===-1)throw new Error("unrecognized character "+s+" in "+e);c[c.length]={t:"t",v:s},++i;break}var g=0,x=0,z;for(i=c.length-1,l="t";i>=0;--i)switch(c[i].t){case"h":case"H":c[i].t=d,l="h",g<1&&(g=1);break;case"s":(z=c[i].v.match(/\.0+$/))&&(x=Math.max(x,z[0].length-1)),g<3&&(g=3);case"d":case"y":case"M":case"e":l=c[i].t;break;case"m":l==="s"&&(c[i].t="M",g<2&&(g=2));break;case"X":break;case"Z":g<1&&c[i].v.match(/[Hh]/)&&(g=1),g<2&&c[i].v.match(/[Mm]/)&&(g=2),g<3&&c[i].v.match(/[Ss]/)&&(g=3)}switch(g){case 0:break;case 1:f.u>=.5&&(f.u=0,++f.S),f.S>=60&&(f.S=0,++f.M),f.M>=60&&(f.M=0,++f.H);break;case 2:f.u>=.5&&(f.u=0,++f.S),f.S>=60&&(f.S=0,++f.M);break}var C="",b;for(i=0;i<c.length;++i)switch(c[i].t){case"t":case"T":case" ":case"D":break;case"X":c[i].v="",c[i].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":c[i].v=f21(c[i].t.charCodeAt(0),c[i].v,f,x),c[i].t="t";break;case"n":case"?":for(b=i+1;c[b]!=null&&((s=c[b].t)==="?"||s==="D"||(s===" "||s==="t")&&c[b+1]!=null&&(c[b+1].t==="?"||c[b+1].t==="t"&&c[b+1].v==="/")||c[i].t==="("&&(s===" "||s==="n"||s===")")||s==="t"&&(c[b].v==="/"||c[b].v===" "&&c[b+1]!=null&&c[b+1].t=="?"));)c[i].v+=c[b].v,c[b]={v:"",t:";"},++b;C+=c[i].v,i=b-1;break;case"G":c[i].t="t",c[i].v=D6(t,a);break}var H="",V,y;if(C.length>0){C.charCodeAt(0)==40?(V=t<0&&C.charCodeAt(0)===45?-t:t,y=Qe("n",C,V)):(V=t<0&&r>1?-t:t,y=Qe("n",C,V),V<0&&c[0]&&c[0].t=="t"&&(y=y.substr(1),c[0].v="-"+c[0].v)),b=y.length-1;var A=c.length;for(i=0;i<c.length;++i)if(c[i]!=null&&c[i].t!="t"&&c[i].v.indexOf(".")>-1){A=i;break}var E=c.length;if(A===c.length&&y.indexOf("E")===-1){for(i=c.length-1;i>=0;--i)c[i]==null||"n?".indexOf(c[i].t)===-1||(b>=c[i].v.length-1?(b-=c[i].v.length,c[i].v=y.substr(b+1,c[i].v.length)):b<0?c[i].v="":(c[i].v=y.substr(0,b+1),b=-1),c[i].t="t",E=i);b>=0&&E<c.length&&(c[E].v=y.substr(0,b+1)+c[E].v)}else if(A!==c.length&&y.indexOf("E")===-1){for(b=y.indexOf(".")-1,i=A;i>=0;--i)if(!(c[i]==null||"n?".indexOf(c[i].t)===-1)){for(u=c[i].v.indexOf(".")>-1&&i===A?c[i].v.indexOf(".")-1:c[i].v.length-1,H=c[i].v.substr(u+1);u>=0;--u)b>=0&&(c[i].v.charAt(u)==="0"||c[i].v.charAt(u)==="#")&&(H=y.charAt(b--)+H);c[i].v=H,c[i].t="t",E=i}for(b>=0&&E<c.length&&(c[E].v=y.substr(0,b+1)+c[E].v),b=y.indexOf(".")+1,i=A;i<c.length;++i)if(!(c[i]==null||"n?(".indexOf(c[i].t)===-1&&i!==A)){for(u=c[i].v.indexOf(".")>-1&&i===A?c[i].v.indexOf(".")+1:0,H=c[i].v.substr(0,u);u<c[i].v.length;++u)b<y.length&&(H+=y.charAt(b++));c[i].v=H,c[i].t="t",E=i}}}for(i=0;i<c.length;++i)c[i]!=null&&"n?".indexOf(c[i].t)>-1&&(V=r>1&&t<0&&i>0&&c[i-1].v==="-"?-t:t,c[i].v=Qe(c[i].t,c[i].v,V),c[i].t="t");var Y="";for(i=0;i!==c.length;++i)c[i]!=null&&(Y+=c[i].v);return Y}var od=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function ld(e,t){if(t==null)return!1;var a=parseFloat(t[2]);switch(t[1]){case"=":if(e==a)return!0;break;case">":if(e>a)return!0;break;case"<":if(e<a)return!0;break;case"<>":if(e!=a)return!0;break;case">=":if(e>=a)return!0;break;case"<=":if(e<=a)return!0;break}return!1}function M21(e,t){var a=C21(e),r=a.length,c=a[r-1].indexOf("@");if(r<4&&c>-1&&--r,a.length>4)throw new Error("cannot find right format for |"+a.join("|")+"|");if(typeof t!="number")return[4,a.length===4||c>-1?a[a.length-1]:"@"];switch(a.length){case 1:a=c>-1?["General","General","General",a[0]]:[a[0],a[0],a[0],"@"];break;case 2:a=c>-1?[a[0],a[0],a[0],a[1]]:[a[0],a[1],a[0],"@"];break;case 3:a=c>-1?[a[0],a[1],a[0],a[2]]:[a[0],a[1],a[2],"@"];break}var n=t>0?a[0]:t<0?a[1]:a[2];if(a[0].indexOf("[")===-1&&a[1].indexOf("[")===-1)return[r,n];if(a[0].match(/\[[=<>]/)!=null||a[1].match(/\[[=<>]/)!=null){var i=a[0].match(od),s=a[1].match(od);return ld(t,i)?[r,a[0]]:ld(t,s)?[r,a[1]]:[r,a[i!=null&&s!=null?2:1]]}return[r,n]}function _4(e,t,a){a==null&&(a={});var r="";switch(typeof e){case"string":e=="m/d/yy"&&a.dateNF?r=a.dateNF:r=e;break;case"number":e==14&&a.dateNF?r=a.dateNF:r=(a.table!=null?a.table:j1)[e],r==null&&(r=a.table&&a.table[nd[e]]||j1[nd[e]]),r==null&&(r=r21[e]||"General");break}if(or(r,0))return D6(t,a);t instanceof Date&&(t=tC(t,a.date1904));var c=M21(r,t);if(or(c[1]))return D6(t,a);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return z21(c[1],t,a,c[0])}function k6(e,t){if(typeof t!="number"){t=+t||-1;for(var a=0;a<392;++a){if(j1[a]==null){t<0&&(t=a);continue}if(j1[a]==e){t=a;break}}t<0&&(t=391)}return j1[t]=e,t}function fC(){j1=a21()}var y21={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},uC=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function b21(e){var t=typeof e=="number"?j1[e]:e;return t=t.replace(uC,"(\\d+)"),new RegExp("^"+t+"$")}function H21(e,t,a){var r=-1,c=-1,n=-1,i=-1,s=-1,l=-1;(t.match(uC)||[]).forEach(function(h,d){var m=parseInt(a[d+1],10);switch(h.toLowerCase().charAt(0)){case"y":r=m;break;case"d":n=m;break;case"h":i=m;break;case"s":l=m;break;case"m":i>=0?s=m:c=m;break}}),l>=0&&s==-1&&c>=0&&(s=c,c=-1);var f=(""+(r>=0?r:new Date().getFullYear())).slice(-4)+"-"+("00"+(c>=1?c:1)).slice(-2)+"-"+("00"+(n>=1?n:1)).slice(-2);f.length==7&&(f="0"+f),f.length==8&&(f="20"+f);var u=("00"+(i>=0?i:0)).slice(-2)+":"+("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2);return i==-1&&s==-1&&l==-1?f:r==-1&&c==-1&&n==-1?u:f+"T"+u}var V21=function(){var e={};e.version="1.2.0";function t(){for(var y=0,A=new Array(256),E=0;E!=256;++E)y=E,y=y&1?-306674912^y>>>1:y>>>1,y=y&1?-306674912^y>>>1:y>>>1,y=y&1?-306674912^y>>>1:y>>>1,y=y&1?-306674912^y>>>1:y>>>1,y=y&1?-306674912^y>>>1:y>>>1,y=y&1?-306674912^y>>>1:y>>>1,y=y&1?-306674912^y>>>1:y>>>1,y=y&1?-306674912^y>>>1:y>>>1,A[E]=y;return typeof Int32Array<"u"?new Int32Array(A):A}var a=t();function r(y){var A=0,E=0,Y=0,F=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(Y=0;Y!=256;++Y)F[Y]=y[Y];for(Y=0;Y!=256;++Y)for(E=y[Y],A=256+Y;A<4096;A+=256)E=F[A]=E>>>8^y[E&255];var L=[];for(Y=1;Y!=16;++Y)L[Y-1]=typeof Int32Array<"u"?F.subarray(Y*256,Y*256+256):F.slice(Y*256,Y*256+256);return L}var c=r(a),n=c[0],i=c[1],s=c[2],l=c[3],f=c[4],u=c[5],h=c[6],d=c[7],m=c[8],p=c[9],v=c[10],g=c[11],x=c[12],z=c[13],C=c[14];function b(y,A){for(var E=A^-1,Y=0,F=y.length;Y<F;)E=E>>>8^a[(E^y.charCodeAt(Y++))&255];return~E}function H(y,A){for(var E=A^-1,Y=y.length-15,F=0;F<Y;)E=C[y[F++]^E&255]^z[y[F++]^E>>8&255]^x[y[F++]^E>>16&255]^g[y[F++]^E>>>24]^v[y[F++]]^p[y[F++]]^m[y[F++]]^d[y[F++]]^h[y[F++]]^u[y[F++]]^f[y[F++]]^l[y[F++]]^s[y[F++]]^i[y[F++]]^n[y[F++]]^a[y[F++]];for(Y+=15;F<Y;)E=E>>>8^a[(E^y[F++])&255];return~E}function V(y,A){for(var E=A^-1,Y=0,F=y.length,L=0,j=0;Y<F;)L=y.charCodeAt(Y++),L<128?E=E>>>8^a[(E^L)&255]:L<2048?(E=E>>>8^a[(E^(192|L>>6&31))&255],E=E>>>8^a[(E^(128|L&63))&255]):L>=55296&&L<57344?(L=(L&1023)+64,j=y.charCodeAt(Y++)&1023,E=E>>>8^a[(E^(240|L>>8&7))&255],E=E>>>8^a[(E^(128|L>>2&63))&255],E=E>>>8^a[(E^(128|j>>6&15|(L&3)<<4))&255],E=E>>>8^a[(E^(128|j&63))&255]):(E=E>>>8^a[(E^(224|L>>12&15))&255],E=E>>>8^a[(E^(128|L>>6&63))&255],E=E>>>8^a[(E^(128|L&63))&255]);return~E}return e.table=a,e.bstr=b,e.buf=H,e.str=V,e}(),i2=function(){var t={};t.version="1.2.1";function a(T,q){for(var R=T.split("/"),U=q.split("/"),Z=0,Q=0,u1=Math.min(R.length,U.length);Z<u1;++Z){if(Q=R[Z].length-U[Z].length)return Q;if(R[Z]!=U[Z])return R[Z]<U[Z]?-1:1}return R.length-U.length}function r(T){if(T.charAt(T.length-1)=="/")return T.slice(0,-1).indexOf("/")===-1?T:r(T.slice(0,-1));var q=T.lastIndexOf("/");return q===-1?T:T.slice(0,q+1)}function c(T){if(T.charAt(T.length-1)=="/")return c(T.slice(0,-1));var q=T.lastIndexOf("/");return q===-1?T:T.slice(q+1)}function n(T,q){typeof q=="string"&&(q=new Date(q));var R=q.getHours();R=R<<6|q.getMinutes(),R=R<<5|q.getSeconds()>>>1,T.write_shift(2,R);var U=q.getFullYear()-1980;U=U<<4|q.getMonth()+1,U=U<<5|q.getDate(),T.write_shift(2,U)}function i(T){var q=T.read_shift(2)&65535,R=T.read_shift(2)&65535,U=new Date,Z=R&31;R>>>=5;var Q=R&15;R>>>=4,U.setMilliseconds(0),U.setFullYear(R+1980),U.setMonth(Q-1),U.setDate(Z);var u1=q&31;q>>>=5;var d1=q&63;return q>>>=6,U.setHours(q),U.setMinutes(d1),U.setSeconds(u1<<1),U}function s(T){A3(T,0);for(var q={},R=0;T.l<=T.length-4;){var U=T.read_shift(2),Z=T.read_shift(2),Q=T.l+Z,u1={};switch(U){case 21589:R=T.read_shift(1),R&1&&(u1.mtime=T.read_shift(4)),Z>5&&(R&2&&(u1.atime=T.read_shift(4)),R&4&&(u1.ctime=T.read_shift(4))),u1.mtime&&(u1.mt=new Date(u1.mtime*1e3));break}T.l=Q,q[U]=u1}return q}var l;function f(){return l||(l={})}function u(T,q){if(T[0]==80&&T[1]==75)return K1(T,q);if((T[0]|32)==109&&(T[1]|32)==105)return Q8(T,q);if(T.length<512)throw new Error("CFB file size "+T.length+" < 512");var R=3,U=512,Z=0,Q=0,u1=0,d1=0,M=0,_=[],N=T.slice(0,512);A3(N,0);var W=h(N);switch(R=W[0],R){case 3:U=512;break;case 4:U=4096;break;case 0:if(W[1]==0)return K1(T,q);default:throw new Error("Major Version: Expected 3 or 4 saw "+R)}U!==512&&(N=T.slice(0,U),A3(N,28));var J=T.slice(0,U);d(N,R);var a1=N.read_shift(4,"i");if(R===3&&a1!==0)throw new Error("# Directory Sectors: Expected 0 saw "+a1);N.l+=4,u1=N.read_shift(4,"i"),N.l+=4,N.chk("00100000","Mini Stream Cutoff Size: "),d1=N.read_shift(4,"i"),Z=N.read_shift(4,"i"),M=N.read_shift(4,"i"),Q=N.read_shift(4,"i");for(var e1=-1,m1=0;m1<109&&(e1=N.read_shift(4,"i"),!(e1<0));++m1)_[m1]=e1;var b1=m(T,U);g(M,Q,b1,U,_);var w1=z(b1,u1,_,U);w1[u1].name="!Directory",Z>0&&d1!==j&&(w1[d1].name="!MiniFAT"),w1[_[0]].name="!FAT",w1.fat_addrs=_,w1.ssz=U;var x1={},F1=[],P1=[],Q1=[];C(u1,w1,b1,F1,Z,x1,P1,d1),p(P1,Q1,F1),F1.shift();var E1={FileIndex:P1,FullPaths:Q1};return q&&q.raw&&(E1.raw={header:J,sectors:b1}),E1}function h(T){if(T[T.l]==80&&T[T.l+1]==75)return[0,0];T.chk(r1,"Header Signature: "),T.l+=16;var q=T.read_shift(2,"u");return[T.read_shift(2,"u"),q]}function d(T,q){var R=9;switch(T.l+=2,R=T.read_shift(2)){case 9:if(q!=3)throw new Error("Sector Shift: Expected 9 saw "+R);break;case 12:if(q!=4)throw new Error("Sector Shift: Expected 12 saw "+R);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+R)}T.chk("0600","Mini Sector Shift: "),T.chk("000000000000","Reserved: ")}function m(T,q){for(var R=Math.ceil(T.length/q)-1,U=[],Z=1;Z<R;++Z)U[Z-1]=T.slice(Z*q,(Z+1)*q);return U[R-1]=T.slice(R*q),U}function p(T,q,R){for(var U=0,Z=0,Q=0,u1=0,d1=0,M=R.length,_=[],N=[];U<M;++U)_[U]=N[U]=U,q[U]=R[U];for(;d1<N.length;++d1)U=N[d1],Z=T[U].L,Q=T[U].R,u1=T[U].C,_[U]===U&&(Z!==-1&&_[Z]!==Z&&(_[U]=_[Z]),Q!==-1&&_[Q]!==Q&&(_[U]=_[Q])),u1!==-1&&(_[u1]=U),Z!==-1&&U!=_[U]&&(_[Z]=_[U],N.lastIndexOf(Z)<d1&&N.push(Z)),Q!==-1&&U!=_[U]&&(_[Q]=_[U],N.lastIndexOf(Q)<d1&&N.push(Q));for(U=1;U<M;++U)_[U]===U&&(Q!==-1&&_[Q]!==Q?_[U]=_[Q]:Z!==-1&&_[Z]!==Z&&(_[U]=_[Z]));for(U=1;U<M;++U)if(T[U].type!==0){if(d1=U,d1!=_[d1])do d1=_[d1],q[U]=q[d1]+"/"+q[U];while(d1!==0&&_[d1]!==-1&&d1!=_[d1]);_[U]=-1}for(q[0]+="/",U=1;U<M;++U)T[U].type!==2&&(q[U]+="/")}function v(T,q,R){for(var U=T.start,Z=T.size,Q=[],u1=U;R&&Z>0&&u1>=0;)Q.push(q.slice(u1*L,u1*L+L)),Z-=L,u1=p6(R,u1*4);return Q.length===0?g3(0):z0(Q).slice(0,T.size)}function g(T,q,R,U,Z){var Q=j;if(T===j){if(q!==0)throw new Error("DIFAT chain shorter than expected")}else if(T!==-1){var u1=R[T],d1=(U>>>2)-1;if(!u1)return;for(var M=0;M<d1&&(Q=p6(u1,M*4))!==j;++M)Z.push(Q);g(p6(u1,U-4),q-1,R,U,Z)}}function x(T,q,R,U,Z){var Q=[],u1=[];Z||(Z=[]);var d1=U-1,M=0,_=0;for(M=q;M>=0;){Z[M]=!0,Q[Q.length]=M,u1.push(T[M]);var N=R[Math.floor(M*4/U)];if(_=M*4&d1,U<4+_)throw new Error("FAT boundary crossed: "+M+" 4 "+U);if(!T[N])break;M=p6(T[N],_)}return{nodes:Q,data:Cd([u1])}}function z(T,q,R,U){var Z=T.length,Q=[],u1=[],d1=[],M=[],_=U-1,N=0,W=0,J=0,a1=0;for(N=0;N<Z;++N)if(d1=[],J=N+q,J>=Z&&(J-=Z),!u1[J]){M=[];var e1=[];for(W=J;W>=0;){e1[W]=!0,u1[W]=!0,d1[d1.length]=W,M.push(T[W]);var m1=R[Math.floor(W*4/U)];if(a1=W*4&_,U<4+a1)throw new Error("FAT boundary crossed: "+W+" 4 "+U);if(!T[m1]||(W=p6(T[m1],a1),e1[W]))break}Q[J]={nodes:d1,data:Cd([M])}}return Q}function C(T,q,R,U,Z,Q,u1,d1){for(var M=0,_=U.length?2:0,N=q[T].data,W=0,J=0,a1;W<N.length;W+=128){var e1=N.slice(W,W+128);A3(e1,64),J=e1.read_shift(2),a1=ro(e1,0,J-_),U.push(a1);var m1={name:a1,type:e1.read_shift(1),color:e1.read_shift(1),L:e1.read_shift(4,"i"),R:e1.read_shift(4,"i"),C:e1.read_shift(4,"i"),clsid:e1.read_shift(16),state:e1.read_shift(4,"i"),start:0,size:0},b1=e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2);b1!==0&&(m1.ct=b(e1,e1.l-8));var w1=e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2);w1!==0&&(m1.mt=b(e1,e1.l-8)),m1.start=e1.read_shift(4,"i"),m1.size=e1.read_shift(4,"i"),m1.size<0&&m1.start<0&&(m1.size=m1.type=0,m1.start=j,m1.name=""),m1.type===5?(M=m1.start,Z>0&&M!==j&&(q[M].name="!StreamData")):m1.size>=4096?(m1.storage="fat",q[m1.start]===void 0&&(q[m1.start]=x(R,m1.start,q.fat_addrs,q.ssz)),q[m1.start].name=m1.name,m1.content=q[m1.start].data.slice(0,m1.size)):(m1.storage="minifat",m1.size<0?m1.size=0:M!==j&&m1.start!==j&&q[M]&&(m1.content=v(m1,q[M].data,(q[d1]||{}).data))),m1.content&&A3(m1.content,0),Q[a1]=m1,u1.push(m1)}}function b(T,q){return new Date((h4(T,q+4)/1e7*Math.pow(2,32)+h4(T,q)/1e7-11644473600)*1e3)}function H(T,q){return f(),u(l.readFileSync(T),q)}function V(T,q){var R=q&&q.type;switch(R||c2&&Buffer.isBuffer(T)&&(R="buffer"),R||"base64"){case"file":return H(T,q);case"base64":return u(O4(g4(T)),q);case"binary":return u(O4(T),q)}return u(T,q)}function y(T,q){var R=q||{},U=R.root||"Root Entry";if(T.FullPaths||(T.FullPaths=[]),T.FileIndex||(T.FileIndex=[]),T.FullPaths.length!==T.FileIndex.length)throw new Error("inconsistent CFB structure");T.FullPaths.length===0&&(T.FullPaths[0]=U+"/",T.FileIndex[0]={name:U,type:5}),R.CLSID&&(T.FileIndex[0].clsid=R.CLSID),A(T)}function A(T){var q="Sh33tJ5";if(!i2.find(T,"/"+q)){var R=g3(4);R[0]=55,R[1]=R[3]=50,R[2]=54,T.FileIndex.push({name:q,type:2,content:R,size:4,L:69,R:69,C:69}),T.FullPaths.push(T.FullPaths[0]+q),E(T)}}function E(T,q){y(T);for(var R=!1,U=!1,Z=T.FullPaths.length-1;Z>=0;--Z){var Q=T.FileIndex[Z];switch(Q.type){case 0:U?R=!0:(T.FileIndex.pop(),T.FullPaths.pop());break;case 1:case 2:case 5:U=!0,isNaN(Q.R*Q.L*Q.C)&&(R=!0),Q.R>-1&&Q.L>-1&&Q.R==Q.L&&(R=!0);break;default:R=!0;break}}if(!(!R&&!q)){var u1=new Date(1987,1,19),d1=0,M=Object.create?Object.create(null):{},_=[];for(Z=0;Z<T.FullPaths.length;++Z)M[T.FullPaths[Z]]=!0,T.FileIndex[Z].type!==0&&_.push([T.FullPaths[Z],T.FileIndex[Z]]);for(Z=0;Z<_.length;++Z){var N=r(_[Z][0]);U=M[N],U||(_.push([N,{name:c(N).replace("/",""),type:1,clsid:O,ct:u1,mt:u1,content:null}]),M[N]=!0)}for(_.sort(function(a1,e1){return a(a1[0],e1[0])}),T.FullPaths=[],T.FileIndex=[],Z=0;Z<_.length;++Z)T.FullPaths[Z]=_[Z][0],T.FileIndex[Z]=_[Z][1];for(Z=0;Z<_.length;++Z){var W=T.FileIndex[Z],J=T.FullPaths[Z];if(W.name=c(J).replace("/",""),W.L=W.R=W.C=-(W.color=1),W.size=W.content?W.content.length:0,W.start=0,W.clsid=W.clsid||O,Z===0)W.C=_.length>1?1:-1,W.size=0,W.type=5;else if(J.slice(-1)=="/"){for(d1=Z+1;d1<_.length&&r(T.FullPaths[d1])!=J;++d1);for(W.C=d1>=_.length?-1:d1,d1=Z+1;d1<_.length&&r(T.FullPaths[d1])!=r(J);++d1);W.R=d1>=_.length?-1:d1,W.type=1}else r(T.FullPaths[Z+1]||"")==r(J)&&(W.R=Z+1),W.type=2}}}function Y(T,q){var R=q||{};if(R.fileType=="mad")return ma(T,R);switch(E(T),R.fileType){case"zip":return o4(T,R)}var U=function(a1){for(var e1=0,m1=0,b1=0;b1<a1.FileIndex.length;++b1){var w1=a1.FileIndex[b1];if(w1.content){var x1=w1.content.length;x1>0&&(x1<4096?e1+=x1+63>>6:m1+=x1+511>>9)}}for(var F1=a1.FullPaths.length+3>>2,P1=e1+7>>3,Q1=e1+127>>7,E1=P1+m1+F1+Q1,J1=E1+127>>7,H2=J1<=109?0:Math.ceil((J1-109)/127);E1+J1+H2+127>>7>J1;)H2=++J1<=109?0:Math.ceil((J1-109)/127);var J2=[1,H2,J1,Q1,F1,m1,e1,0];return a1.FileIndex[0].size=e1<<6,J2[7]=(a1.FileIndex[0].start=J2[0]+J2[1]+J2[2]+J2[3]+J2[4]+J2[5])+(J2[6]+7>>3),J2}(T),Z=g3(U[7]<<9),Q=0,u1=0;{for(Q=0;Q<8;++Q)Z.write_shift(1,P[Q]);for(Q=0;Q<8;++Q)Z.write_shift(2,0);for(Z.write_shift(2,62),Z.write_shift(2,3),Z.write_shift(2,65534),Z.write_shift(2,9),Z.write_shift(2,6),Q=0;Q<3;++Q)Z.write_shift(2,0);for(Z.write_shift(4,0),Z.write_shift(4,U[2]),Z.write_shift(4,U[0]+U[1]+U[2]+U[3]-1),Z.write_shift(4,0),Z.write_shift(4,4096),Z.write_shift(4,U[3]?U[0]+U[1]+U[2]-1:j),Z.write_shift(4,U[3]),Z.write_shift(-4,U[1]?U[0]-1:j),Z.write_shift(4,U[1]),Q=0;Q<109;++Q)Z.write_shift(-4,Q<U[2]?U[1]+Q:-1)}if(U[1])for(u1=0;u1<U[1];++u1){for(;Q<236+u1*127;++Q)Z.write_shift(-4,Q<U[2]?U[1]+Q:-1);Z.write_shift(-4,u1===U[1]-1?j:u1+1)}var d1=function(a1){for(u1+=a1;Q<u1-1;++Q)Z.write_shift(-4,Q+1);a1&&(++Q,Z.write_shift(-4,j))};for(u1=Q=0,u1+=U[1];Q<u1;++Q)Z.write_shift(-4,X.DIFSECT);for(u1+=U[2];Q<u1;++Q)Z.write_shift(-4,X.FATSECT);d1(U[3]),d1(U[4]);for(var M=0,_=0,N=T.FileIndex[0];M<T.FileIndex.length;++M)N=T.FileIndex[M],N.content&&(_=N.content.length,!(_<4096)&&(N.start=u1,d1(_+511>>9)));for(d1(U[6]+7>>3);Z.l&511;)Z.write_shift(-4,X.ENDOFCHAIN);for(u1=Q=0,M=0;M<T.FileIndex.length;++M)N=T.FileIndex[M],N.content&&(_=N.content.length,!(!_||_>=4096)&&(N.start=u1,d1(_+63>>6)));for(;Z.l&511;)Z.write_shift(-4,X.ENDOFCHAIN);for(Q=0;Q<U[4]<<2;++Q){var W=T.FullPaths[Q];if(!W||W.length===0){for(M=0;M<17;++M)Z.write_shift(4,0);for(M=0;M<3;++M)Z.write_shift(4,-1);for(M=0;M<12;++M)Z.write_shift(4,0);continue}N=T.FileIndex[Q],Q===0&&(N.start=N.size?N.start-1:j);var J=Q===0&&R.root||N.name;if(_=2*(J.length+1),Z.write_shift(64,J,"utf16le"),Z.write_shift(2,_),Z.write_shift(1,N.type),Z.write_shift(1,N.color),Z.write_shift(-4,N.L),Z.write_shift(-4,N.R),Z.write_shift(-4,N.C),N.clsid)Z.write_shift(16,N.clsid,"hex");else for(M=0;M<4;++M)Z.write_shift(4,0);Z.write_shift(4,N.state||0),Z.write_shift(4,0),Z.write_shift(4,0),Z.write_shift(4,0),Z.write_shift(4,0),Z.write_shift(4,N.start),Z.write_shift(4,N.size),Z.write_shift(4,0)}for(Q=1;Q<T.FileIndex.length;++Q)if(N=T.FileIndex[Q],N.size>=4096)if(Z.l=N.start+1<<9,c2&&Buffer.isBuffer(N.content))N.content.copy(Z,Z.l,0,N.size),Z.l+=N.size+511&-512;else{for(M=0;M<N.size;++M)Z.write_shift(1,N.content[M]);for(;M&511;++M)Z.write_shift(1,0)}for(Q=1;Q<T.FileIndex.length;++Q)if(N=T.FileIndex[Q],N.size>0&&N.size<4096)if(c2&&Buffer.isBuffer(N.content))N.content.copy(Z,Z.l,0,N.size),Z.l+=N.size+63&-64;else{for(M=0;M<N.size;++M)Z.write_shift(1,N.content[M]);for(;M&63;++M)Z.write_shift(1,0)}if(c2)Z.l=Z.length;else for(;Z.l<Z.length;)Z.write_shift(1,0);return Z}function F(T,q){var R=T.FullPaths.map(function(M){return M.toUpperCase()}),U=R.map(function(M){var _=M.split("/");return _[_.length-(M.slice(-1)=="/"?2:1)]}),Z=!1;q.charCodeAt(0)===47?(Z=!0,q=R[0].slice(0,-1)+q):Z=q.indexOf("/")!==-1;var Q=q.toUpperCase(),u1=Z===!0?R.indexOf(Q):U.indexOf(Q);if(u1!==-1)return T.FileIndex[u1];var d1=!Q.match(yt);for(Q=Q.replace(e4,""),d1&&(Q=Q.replace(yt,"!")),u1=0;u1<R.length;++u1)if((d1?R[u1].replace(yt,"!"):R[u1]).replace(e4,"")==Q||(d1?U[u1].replace(yt,"!"):U[u1]).replace(e4,"")==Q)return T.FileIndex[u1];return null}var L=64,j=-2,r1="d0cf11e0a1b11ae1",P=[208,207,17,224,161,177,26,225],O="00000000000000000000000000000000",X={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:j,FREESECT:-1,HEADER_SIGNATURE:r1,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:O,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function f1(T,q,R){f();var U=Y(T,R);l.writeFileSync(q,U)}function K(T){for(var q=new Array(T.length),R=0;R<T.length;++R)q[R]=String.fromCharCode(T[R]);return q.join("")}function v1(T,q){var R=Y(T,q);switch(q&&q.type||"buffer"){case"file":return f(),l.writeFileSync(q.filename,R),R;case"binary":return typeof R=="string"?R:K(R);case"base64":return td(typeof R=="string"?R:K(R));case"buffer":if(c2)return Buffer.isBuffer(R)?R:q6(R);case"array":return typeof R=="string"?O4(R):R}return R}var c1;function S(T){try{var q=T.InflateRaw,R=new q;if(R._processChunk(new Uint8Array([3,0]),R._finishFlushFlag),R.bytesRead)c1=T;else throw new Error("zlib does not expose bytesRead")}catch(U){console.error("cannot use native zlib: "+(U.message||U))}}function k(T,q){if(!c1)return y1(T,q);var R=c1.InflateRaw,U=new R,Z=U._processChunk(T.slice(T.l),U._finishFlushFlag);return T.l+=U.bytesRead,Z}function D(T){return c1?c1.deflateRawSync(T):U1(T)}var G=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],B=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],I=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function p1(T){var q=(T<<1|T<<11)&139536|(T<<5|T<<15)&558144;return(q>>16|q>>8|q)&255}for(var M1=typeof Uint8Array<"u",n1=M1?new Uint8Array(256):[],C1=0;C1<256;++C1)n1[C1]=p1(C1);function w(T,q){var R=n1[T&255];return q<=8?R>>>8-q:(R=R<<8|n1[T>>8&255],q<=16?R>>>16-q:(R=R<<8|n1[T>>16&255],R>>>24-q))}function z1(T,q){var R=q&7,U=q>>>3;return(T[U]|(R<=6?0:T[U+1]<<8))>>>R&3}function V1(T,q){var R=q&7,U=q>>>3;return(T[U]|(R<=5?0:T[U+1]<<8))>>>R&7}function h1(T,q){var R=q&7,U=q>>>3;return(T[U]|(R<=4?0:T[U+1]<<8))>>>R&15}function t1(T,q){var R=q&7,U=q>>>3;return(T[U]|(R<=3?0:T[U+1]<<8))>>>R&31}function i1(T,q){var R=q&7,U=q>>>3;return(T[U]|(R<=1?0:T[U+1]<<8))>>>R&127}function A1(T,q,R){var U=q&7,Z=q>>>3,Q=(1<<R)-1,u1=T[Z]>>>U;return R<8-U||(u1|=T[Z+1]<<8-U,R<16-U)||(u1|=T[Z+2]<<16-U,R<24-U)||(u1|=T[Z+3]<<24-U),u1&Q}function W1(T,q,R){var U=q&7,Z=q>>>3;return U<=5?T[Z]|=(R&7)<<U:(T[Z]|=R<<U&255,T[Z+1]=(R&7)>>8-U),q+3}function $1(T,q,R){var U=q&7,Z=q>>>3;return R=(R&1)<<U,T[Z]|=R,q+1}function L1(T,q,R){var U=q&7,Z=q>>>3;return R<<=U,T[Z]|=R&255,R>>>=8,T[Z+1]=R,q+8}function H3(T,q,R){var U=q&7,Z=q>>>3;return R<<=U,T[Z]|=R&255,R>>>=8,T[Z+1]=R&255,T[Z+2]=R>>>8,q+16}function B2(T,q){var R=T.length,U=2*R>q?2*R:q+5,Z=0;if(R>=q)return T;if(c2){var Q=ad(U);if(T.copy)T.copy(Q);else for(;Z<T.length;++Z)Q[Z]=T[Z];return Q}else if(M1){var u1=new Uint8Array(U);if(u1.set)u1.set(T);else for(;Z<R;++Z)u1[Z]=T[Z];return u1}return T.length=U,T}function m3(T){for(var q=new Array(T),R=0;R<T;++R)q[R]=0;return q}function V3(T,q,R){var U=1,Z=0,Q=0,u1=0,d1=0,M=T.length,_=M1?new Uint16Array(32):m3(32);for(Q=0;Q<32;++Q)_[Q]=0;for(Q=M;Q<R;++Q)T[Q]=0;M=T.length;var N=M1?new Uint16Array(M):m3(M);for(Q=0;Q<M;++Q)_[Z=T[Q]]++,U<Z&&(U=Z),N[Q]=0;for(_[0]=0,Q=1;Q<=U;++Q)_[Q+16]=d1=d1+_[Q-1]<<1;for(Q=0;Q<M;++Q)d1=T[Q],d1!=0&&(N[Q]=_[d1+16]++);var W=0;for(Q=0;Q<M;++Q)if(W=T[Q],W!=0)for(d1=w(N[Q],U)>>U-W,u1=(1<<U+4-W)-1;u1>=0;--u1)q[d1|u1<<W]=W&15|Q<<4;return U}var E2=M1?new Uint16Array(512):m3(512),U2=M1?new Uint16Array(32):m3(32);if(!M1){for(var W2=0;W2<512;++W2)E2[W2]=0;for(W2=0;W2<32;++W2)U2[W2]=0}(function(){for(var T=[],q=0;q<32;q++)T.push(5);V3(T,U2,32);var R=[];for(q=0;q<=143;q++)R.push(8);for(;q<=255;q++)R.push(9);for(;q<=279;q++)R.push(7);for(;q<=287;q++)R.push(8);V3(R,E2,288)})();var p3=function(){for(var q=M1?new Uint8Array(32768):[],R=0,U=0;R<I.length-1;++R)for(;U<I[R+1];++U)q[U]=R;for(;U<32768;++U)q[U]=29;var Z=M1?new Uint8Array(259):[];for(R=0,U=0;R<B.length-1;++R)for(;U<B[R+1];++U)Z[U]=R;function Q(d1,M){for(var _=0;_<d1.length;){var N=Math.min(65535,d1.length-_),W=_+N==d1.length;for(M.write_shift(1,+W),M.write_shift(2,N),M.write_shift(2,~N&65535);N-- >0;)M[M.l++]=d1[_++]}return M.l}function u1(d1,M){for(var _=0,N=0,W=M1?new Uint16Array(32768):[];N<d1.length;){var J=Math.min(65535,d1.length-N);if(J<10){for(_=W1(M,_,+(N+J==d1.length)),_&7&&(_+=8-(_&7)),M.l=_/8|0,M.write_shift(2,J),M.write_shift(2,~J&65535);J-- >0;)M[M.l++]=d1[N++];_=M.l*8;continue}_=W1(M,_,+(N+J==d1.length)+2);for(var a1=0;J-- >0;){var e1=d1[N];a1=(a1<<5^e1)&32767;var m1=-1,b1=0;if((m1=W[a1])&&(m1|=N&-32768,m1>N&&(m1-=32768),m1<N))for(;d1[m1+b1]==d1[N+b1]&&b1<250;)++b1;if(b1>2){e1=Z[b1],e1<=22?_=L1(M,_,n1[e1+1]>>1)-1:(L1(M,_,3),_+=5,L1(M,_,n1[e1-23]>>5),_+=3);var w1=e1<8?0:e1-4>>2;w1>0&&(H3(M,_,b1-B[e1]),_+=w1),e1=q[N-m1],_=L1(M,_,n1[e1]>>3),_-=3;var x1=e1<4?0:e1-2>>1;x1>0&&(H3(M,_,N-m1-I[e1]),_+=x1);for(var F1=0;F1<b1;++F1)W[a1]=N&32767,a1=(a1<<5^d1[N])&32767,++N;J-=b1-1}else e1<=143?e1=e1+48:_=$1(M,_,1),_=L1(M,_,n1[e1]),W[a1]=N&32767,++N}_=L1(M,_,0)-1}return M.l=(_+7)/8|0,M.l}return function(M,_){return M.length<8?Q(M,_):u1(M,_)}}();function U1(T){var q=g3(50+Math.floor(T.length*1.1)),R=p3(T,q);return q.slice(0,R)}var C2=M1?new Uint16Array(32768):m3(32768),v3=M1?new Uint16Array(32768):m3(32768),p2=M1?new Uint16Array(128):m3(128),E3=1,ne=1;function l1(T,q){var R=t1(T,q)+257;q+=5;var U=t1(T,q)+1;q+=5;var Z=h1(T,q)+4;q+=4;for(var Q=0,u1=M1?new Uint8Array(19):m3(19),d1=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=1,_=M1?new Uint8Array(8):m3(8),N=M1?new Uint8Array(8):m3(8),W=u1.length,J=0;J<Z;++J)u1[G[J]]=Q=V1(T,q),M<Q&&(M=Q),_[Q]++,q+=3;var a1=0;for(_[0]=0,J=1;J<=M;++J)N[J]=a1=a1+_[J-1]<<1;for(J=0;J<W;++J)(a1=u1[J])!=0&&(d1[J]=N[a1]++);var e1=0;for(J=0;J<W;++J)if(e1=u1[J],e1!=0){a1=n1[d1[J]]>>8-e1;for(var m1=(1<<7-e1)-1;m1>=0;--m1)p2[a1|m1<<e1]=e1&7|J<<3}var b1=[];for(M=1;b1.length<R+U;)switch(a1=p2[i1(T,q)],q+=a1&7,a1>>>=3){case 16:for(Q=3+z1(T,q),q+=2,a1=b1[b1.length-1];Q-- >0;)b1.push(a1);break;case 17:for(Q=3+V1(T,q),q+=3;Q-- >0;)b1.push(0);break;case 18:for(Q=11+i1(T,q),q+=7;Q-- >0;)b1.push(0);break;default:b1.push(a1),M<a1&&(M=a1);break}var w1=b1.slice(0,R),x1=b1.slice(R);for(J=R;J<286;++J)w1[J]=0;for(J=U;J<30;++J)x1[J]=0;return E3=V3(w1,C2,286),ne=V3(x1,v3,30),q}function s1(T,q){if(T[0]==3&&!(T[1]&3))return[q0(q),2];for(var R=0,U=0,Z=ad(q||1<<18),Q=0,u1=Z.length>>>0,d1=0,M=0;!(U&1);){if(U=V1(T,R),R+=3,U>>>1)U>>1==1?(d1=9,M=5):(R=l1(T,R),d1=E3,M=ne);else{R&7&&(R+=8-(R&7));var _=T[R>>>3]|T[(R>>>3)+1]<<8;if(R+=32,_>0)for(!q&&u1<Q+_&&(Z=B2(Z,Q+_),u1=Z.length);_-- >0;)Z[Q++]=T[R>>>3],R+=8;continue}for(;;){!q&&u1<Q+32767&&(Z=B2(Z,Q+32767),u1=Z.length);var N=A1(T,R,d1),W=U>>>1==1?E2[N]:C2[N];if(R+=W&15,W>>>=4,!(W>>>8&255))Z[Q++]=W;else{if(W==256)break;W-=257;var J=W<8?0:W-4>>2;J>5&&(J=0);var a1=Q+B[W];J>0&&(a1+=A1(T,R,J),R+=J),N=A1(T,R,M),W=U>>>1==1?U2[N]:v3[N],R+=W&15,W>>>=4;var e1=W<4?0:W-2>>1,m1=I[W];for(e1>0&&(m1+=A1(T,R,e1),R+=e1),!q&&u1<a1&&(Z=B2(Z,a1+100),u1=Z.length);Q<a1;)Z[Q]=Z[Q-m1],++Q}}}return q?[Z,R+7>>>3]:[Z.slice(0,Q),R+7>>>3]}function y1(T,q){var R=T.slice(T.l||0),U=s1(R,q);return T.l+=U[1],U[0]}function k1(T,q){if(T)typeof console<"u"&&console.error(q);else throw new Error(q)}function K1(T,q){var R=T;A3(R,0);var U=[],Z=[],Q={FileIndex:U,FullPaths:Z};y(Q,{root:q.root});for(var u1=R.length-4;(R[u1]!=80||R[u1+1]!=75||R[u1+2]!=5||R[u1+3]!=6)&&u1>=0;)--u1;R.l=u1+4,R.l+=4;var d1=R.read_shift(2);R.l+=6;var M=R.read_shift(4);for(R.l=M,u1=0;u1<d1;++u1){R.l+=20;var _=R.read_shift(4),N=R.read_shift(4),W=R.read_shift(2),J=R.read_shift(2),a1=R.read_shift(2);R.l+=8;var e1=R.read_shift(4),m1=s(R.slice(R.l+W,R.l+W+J));R.l+=W+J+a1;var b1=R.l;R.l=e1+4,K2(R,_,N,Q,m1),R.l=b1}return Q}function K2(T,q,R,U,Z){T.l+=2;var Q=T.read_shift(2),u1=T.read_shift(2),d1=i(T);if(Q&8257)throw new Error("Unsupported ZIP encryption");for(var M=T.read_shift(4),_=T.read_shift(4),N=T.read_shift(4),W=T.read_shift(2),J=T.read_shift(2),a1="",e1=0;e1<W;++e1)a1+=String.fromCharCode(T[T.l++]);if(J){var m1=s(T.slice(T.l,T.l+J));(m1[21589]||{}).mt&&(d1=m1[21589].mt),((Z||{})[21589]||{}).mt&&(d1=Z[21589].mt)}T.l+=J;var b1=T.slice(T.l,T.l+_);switch(u1){case 8:b1=k(T,N);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+u1)}var w1=!1;Q&8&&(M=T.read_shift(4),M==134695760&&(M=T.read_shift(4),w1=!0),_=T.read_shift(4),N=T.read_shift(4)),_!=q&&k1(w1,"Bad compressed size: "+q+" != "+_),N!=R&&k1(w1,"Bad uncompressed size: "+R+" != "+N),se(U,a1,b1,{unsafe:!0,mt:d1})}function o4(T,q){var R=q||{},U=[],Z=[],Q=g3(1),u1=R.compression?8:0,d1=0,M=0,_=0,N=0,W=0,J=T.FullPaths[0],a1=J,e1=T.FileIndex[0],m1=[],b1=0;for(M=1;M<T.FullPaths.length;++M)if(a1=T.FullPaths[M].slice(J.length),e1=T.FileIndex[M],!(!e1.size||!e1.content||a1=="Sh33tJ5")){var w1=N,x1=g3(a1.length);for(_=0;_<a1.length;++_)x1.write_shift(1,a1.charCodeAt(_)&127);x1=x1.slice(0,x1.l),m1[W]=V21.buf(e1.content,0);var F1=e1.content;u1==8&&(F1=D(F1)),Q=g3(30),Q.write_shift(4,67324752),Q.write_shift(2,20),Q.write_shift(2,d1),Q.write_shift(2,u1),e1.mt?n(Q,e1.mt):Q.write_shift(4,0),Q.write_shift(-4,m1[W]),Q.write_shift(4,F1.length),Q.write_shift(4,e1.content.length),Q.write_shift(2,x1.length),Q.write_shift(2,0),N+=Q.length,U.push(Q),N+=x1.length,U.push(x1),N+=F1.length,U.push(F1),Q=g3(46),Q.write_shift(4,33639248),Q.write_shift(2,0),Q.write_shift(2,20),Q.write_shift(2,d1),Q.write_shift(2,u1),Q.write_shift(4,0),Q.write_shift(-4,m1[W]),Q.write_shift(4,F1.length),Q.write_shift(4,e1.content.length),Q.write_shift(2,x1.length),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(4,0),Q.write_shift(4,w1),b1+=Q.l,Z.push(Q),b1+=x1.length,Z.push(x1),++W}return Q=g3(22),Q.write_shift(4,101010256),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(2,W),Q.write_shift(2,W),Q.write_shift(4,b1),Q.write_shift(4,N),Q.write_shift(2,0),z0([z0(U),z0(Z),Q])}var z4={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function Te(T,q){if(T.ctype)return T.ctype;var R=T.name||"",U=R.match(/\.([^\.]+)$/);return U&&z4[U[1]]||q&&(U=(R=q).match(/[\.\\]([^\.\\])+$/),U&&z4[U[1]])?z4[U[1]]:"application/octet-stream"}function ie(T){for(var q=td(T),R=[],U=0;U<q.length;U+=76)R.push(q.slice(U,U+76));return R.join(`\r
|
|
794
|
+
`):e}function tq(e,t){const{element:a,datasetIndex:r,index:c}=t,n=e.getDatasetMeta(r).controller,{label:i,value:s}=n.getLabelAndValue(c);return{chart:e,label:i,parsed:n.getParsed(c),raw:e.data.datasets[r].data[c],formattedValue:s,dataset:n.getDataset(),dataIndex:c,datasetIndex:r,element:a}}function rh(e,t){const a=e.chart.ctx,{body:r,footer:c,title:n}=e,{boxWidth:i,boxHeight:s}=t,l=z3(t.bodyFont),f=z3(t.titleFont),u=z3(t.footerFont),h=n.length,d=c.length,m=r.length,p=j3(t.padding);let v=p.height,g=0,x=r.reduce((b,H)=>b+H.before.length+H.lines.length+H.after.length,0);if(x+=e.beforeBody.length+e.afterBody.length,h&&(v+=h*f.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),x){const b=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;v+=m*b+(x-m)*l.lineHeight+(x-1)*t.bodySpacing}d&&(v+=t.footerMarginTop+d*u.lineHeight+(d-1)*t.footerSpacing);let z=0;const C=function(b){g=Math.max(g,a.measureText(b).width+z)};return a.save(),a.font=f.string,g2(e.title,C),a.font=l.string,g2(e.beforeBody.concat(e.afterBody),C),z=t.displayColors?i+2+t.boxPadding:0,g2(r,b=>{g2(b.before,C),g2(b.lines,C),g2(b.after,C)}),z=0,a.font=u.string,g2(e.footer,C),a.restore(),g+=p.width,{width:g,height:v}}function aq(e,t){const{y:a,height:r}=t;return a<r/2?"top":a>e.height-r/2?"bottom":"center"}function rq(e,t,a,r){const{x:c,width:n}=r,i=a.caretSize+a.caretPadding;if(e==="left"&&c+n+i>t.width||e==="right"&&c-n-i<0)return!0}function cq(e,t,a,r){const{x:c,width:n}=a,{width:i,chartArea:{left:s,right:l}}=e;let f="center";return r==="center"?f=c<=(s+l)/2?"left":"right":c<=n/2?f="left":c>=i-n/2&&(f="right"),rq(f,e,t,a)&&(f="center"),f}function ch(e,t,a){const r=a.yAlign||t.yAlign||aq(e,a);return{xAlign:a.xAlign||t.xAlign||cq(e,t,a,r),yAlign:r}}function nq(e,t){let{x:a,width:r}=e;return t==="right"?a-=r:t==="center"&&(a-=r/2),a}function iq(e,t,a){let{y:r,height:c}=e;return t==="top"?r+=a:t==="bottom"?r-=c+a:r-=c/2,r}function nh(e,t,a,r){const{caretSize:c,caretPadding:n,cornerRadius:i}=e,{xAlign:s,yAlign:l}=a,f=c+n,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:m}=w6(i);let p=nq(t,s);const v=iq(t,l,f);return l==="center"?s==="left"?p+=f:s==="right"&&(p-=f):s==="left"?p-=Math.max(u,d)+c:s==="right"&&(p+=Math.max(h,m)+c),{x:k3(p,0,r.width-t.width),y:k3(v,0,r.height-t.height)}}function Wa(e,t,a){const r=j3(a.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function ih(e){return fe([],Fe(e))}function sq(e,t,a){return K0(e,{tooltip:t,tooltipItems:a,type:"tooltip"})}function sh(e,t){const a=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return a?e.override(a):e}const vx={beforeTitle:Ee,title(e){if(e.length>0){const t=e[0],a=t.chart.data.labels,r=a?a.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return a[t.dataIndex]}return""},afterTitle:Ee,beforeBody:Ee,beforeLabel:Ee,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const a=e.formattedValue;return l2(a)||(t+=a),t},labelColor(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:a.borderColor,backgroundColor:a.backgroundColor,borderWidth:a.borderWidth,borderDash:a.borderDash,borderDashOffset:a.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:a.pointStyle,rotation:a.rotation}},afterLabel:Ee,afterBody:Ee,beforeFooter:Ee,footer:Ee,afterFooter:Ee};function a4(e,t,a,r){const c=e[t].call(a,r);return typeof c>"u"?vx[t].call(a,r):c}class _i extends ee{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(){const t=this._cachedAnimations;if(t)return t;const a=this.chart,r=this.options.setContext(this.getContext()),c=r.enabled&&a.options.animation&&r.animations,n=new Xg(this.chart,c);return c._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=sq(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,a){const{callbacks:r}=a,c=a4(r,"beforeTitle",this,t),n=a4(r,"title",this,t),i=a4(r,"afterTitle",this,t);let s=[];return s=fe(s,Fe(c)),s=fe(s,Fe(n)),s=fe(s,Fe(i)),s}getBeforeBody(t,a){return ih(a4(a.callbacks,"beforeBody",this,t))}getBody(t,a){const{callbacks:r}=a,c=[];return g2(t,n=>{const i={before:[],lines:[],after:[]},s=sh(r,n);fe(i.before,Fe(a4(s,"beforeLabel",this,n))),fe(i.lines,a4(s,"label",this,n)),fe(i.after,Fe(a4(s,"afterLabel",this,n))),c.push(i)}),c}getAfterBody(t,a){return ih(a4(a.callbacks,"afterBody",this,t))}getFooter(t,a){const{callbacks:r}=a,c=a4(r,"beforeFooter",this,t),n=a4(r,"footer",this,t),i=a4(r,"afterFooter",this,t);let s=[];return s=fe(s,Fe(c)),s=fe(s,Fe(n)),s=fe(s,Fe(i)),s}_createItems(t){const a=this._active,r=this.chart.data,c=[],n=[],i=[];let s=[],l,f;for(l=0,f=a.length;l<f;++l)s.push(tq(this.chart,a[l]));return t.filter&&(s=s.filter((u,h,d)=>t.filter(u,h,d,r))),t.itemSort&&(s=s.sort((u,h)=>t.itemSort(u,h,r))),g2(s,u=>{const h=sh(t.callbacks,u);c.push(a4(h,"labelColor",this,u)),n.push(a4(h,"labelPointStyle",this,u)),i.push(a4(h,"labelTextColor",this,u))}),this.labelColors=c,this.labelPointStyles=n,this.labelTextColors=i,this.dataPoints=s,s}update(t,a){const r=this.options.setContext(this.getContext()),c=this._active;let n,i=[];if(!c.length)this.opacity!==0&&(n={opacity:0});else{const s=Ct[r.position].call(this,c,this._eventPosition);i=this._createItems(r),this.title=this.getTitle(i,r),this.beforeBody=this.getBeforeBody(i,r),this.body=this.getBody(i,r),this.afterBody=this.getAfterBody(i,r),this.footer=this.getFooter(i,r);const l=this._size=rh(this,r),f=Object.assign({},s,l),u=ch(this.chart,r,f),h=nh(r,f,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,n={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=i,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:a})}drawCaret(t,a,r,c){const n=this.getCaretPosition(t,r,c);a.lineTo(n.x1,n.y1),a.lineTo(n.x2,n.y2),a.lineTo(n.x3,n.y3)}getCaretPosition(t,a,r){const{xAlign:c,yAlign:n}=this,{caretSize:i,cornerRadius:s}=r,{topLeft:l,topRight:f,bottomLeft:u,bottomRight:h}=w6(s),{x:d,y:m}=t,{width:p,height:v}=a;let g,x,z,C,b,H;return n==="center"?(b=m+v/2,c==="left"?(g=d,x=g-i,C=b+i,H=b-i):(g=d+p,x=g+i,C=b-i,H=b+i),z=g):(c==="left"?x=d+Math.max(l,u)+i:c==="right"?x=d+p-Math.max(f,h)-i:x=this.caretX,n==="top"?(C=m,b=C-i,g=x-i,z=x+i):(C=m+v,b=C+i,g=x+i,z=x-i),H=C),{x1:g,x2:x,x3:z,y1:C,y2:b,y3:H}}drawTitle(t,a,r){const c=this.title,n=c.length;let i,s,l;if(n){const f=M8(r.rtl,this.x,this.width);for(t.x=Wa(this,r.titleAlign,r),a.textAlign=f.textAlign(r.titleAlign),a.textBaseline="middle",i=z3(r.titleFont),s=r.titleSpacing,a.fillStyle=r.titleColor,a.font=i.string,l=0;l<n;++l)a.fillText(c[l],f.x(t.x),t.y+i.lineHeight/2),t.y+=i.lineHeight+s,l+1===n&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,a,r,c,n){const i=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:f}=n,u=z3(n.bodyFont),h=Wa(this,"left",n),d=c.x(h),m=l<u.lineHeight?(u.lineHeight-l)/2:0,p=a.y+m;if(n.usePointStyle){const v={radius:Math.min(f,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=c.leftForLtr(d,f)+f/2,x=p+l/2;t.strokeStyle=n.multiKeyBackground,t.fillStyle=n.multiKeyBackground,zi(t,v,g,x),t.strokeStyle=i.borderColor,t.fillStyle=i.backgroundColor,zi(t,v,g,x)}else{t.lineWidth=r2(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,t.strokeStyle=i.borderColor,t.setLineDash(i.borderDash||[]),t.lineDashOffset=i.borderDashOffset||0;const v=c.leftForLtr(d,f),g=c.leftForLtr(c.xPlus(d,1),f-2),x=w6(i.borderRadius);Object.values(x).some(z=>z!==0)?(t.beginPath(),t.fillStyle=n.multiKeyBackground,g5(t,{x:v,y:p,w:f,h:l,radius:x}),t.fill(),t.stroke(),t.fillStyle=i.backgroundColor,t.beginPath(),g5(t,{x:g,y:p+1,w:f-2,h:l-2,radius:x}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(v,p,f,l),t.strokeRect(v,p,f,l),t.fillStyle=i.backgroundColor,t.fillRect(g,p+1,f-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,a,r){const{body:c}=this,{bodySpacing:n,bodyAlign:i,displayColors:s,boxHeight:l,boxWidth:f,boxPadding:u}=r,h=z3(r.bodyFont);let d=h.lineHeight,m=0;const p=M8(r.rtl,this.x,this.width),v=function(A){a.fillText(A,p.x(t.x+m),t.y+d/2),t.y+=d+n},g=p.textAlign(i);let x,z,C,b,H,V,y;for(a.textAlign=i,a.textBaseline="middle",a.font=h.string,t.x=Wa(this,g,r),a.fillStyle=r.bodyColor,g2(this.beforeBody,v),m=s&&g!=="right"?i==="center"?f/2+u:f+2+u:0,b=0,V=c.length;b<V;++b){for(x=c[b],z=this.labelTextColors[b],a.fillStyle=z,g2(x.before,v),C=x.lines,s&&C.length&&(this._drawColorBox(a,t,b,p,r),d=Math.max(h.lineHeight,l)),H=0,y=C.length;H<y;++H)v(C[H]),d=h.lineHeight;g2(x.after,v)}m=0,d=h.lineHeight,g2(this.afterBody,v),t.y-=n}drawFooter(t,a,r){const c=this.footer,n=c.length;let i,s;if(n){const l=M8(r.rtl,this.x,this.width);for(t.x=Wa(this,r.footerAlign,r),t.y+=r.footerMarginTop,a.textAlign=l.textAlign(r.footerAlign),a.textBaseline="middle",i=z3(r.footerFont),a.fillStyle=r.footerColor,a.font=i.string,s=0;s<n;++s)a.fillText(c[s],l.x(t.x),t.y+i.lineHeight/2),t.y+=i.lineHeight+r.footerSpacing}}drawBackground(t,a,r,c){const{xAlign:n,yAlign:i}=this,{x:s,y:l}=t,{width:f,height:u}=r,{topLeft:h,topRight:d,bottomLeft:m,bottomRight:p}=w6(c.cornerRadius);a.fillStyle=c.backgroundColor,a.strokeStyle=c.borderColor,a.lineWidth=c.borderWidth,a.beginPath(),a.moveTo(s+h,l),i==="top"&&this.drawCaret(t,a,r,c),a.lineTo(s+f-d,l),a.quadraticCurveTo(s+f,l,s+f,l+d),i==="center"&&n==="right"&&this.drawCaret(t,a,r,c),a.lineTo(s+f,l+u-p),a.quadraticCurveTo(s+f,l+u,s+f-p,l+u),i==="bottom"&&this.drawCaret(t,a,r,c),a.lineTo(s+m,l+u),a.quadraticCurveTo(s,l+u,s,l+u-m),i==="center"&&n==="left"&&this.drawCaret(t,a,r,c),a.lineTo(s,l+h),a.quadraticCurveTo(s,l,s+h,l),a.closePath(),a.fill(),c.borderWidth>0&&a.stroke()}_updateAnimationTarget(t){const a=this.chart,r=this.$animations,c=r&&r.x,n=r&&r.y;if(c||n){const i=Ct[t.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=rh(this,t),l=Object.assign({},i,this._size),f=ch(a,t,l),u=nh(t,l,f,a);(c._to!==u.x||n._to!==u.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=s.width,this.height=s.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const a=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(a);const c={width:this.width,height:this.height},n={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const i=j3(a.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;a.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(n,t,c,a),Wg(t,a.textDirection),n.y+=i.top,this.drawTitle(n,t,a),this.drawBody(n,t,a),this.drawFooter(n,t,a),Yg(t,a.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,a){const r=this._active,c=t.map(({datasetIndex:s,index:l})=>{const f=this.chart.getDatasetMeta(s);if(!f)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:f.data[l],index:l}}),n=!G7(r,c),i=this._positionChanged(c,a);(n||i)&&(this._active=c,this._eventPosition=a,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,a,r=!0){if(a&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const c=this.options,n=this._active||[],i=this._getActiveElements(t,n,a,r),s=this._positionChanged(i,t),l=a||!G7(i,n)||s;return l&&(this._active=i,(c.enabled||c.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,a))),l}_getActiveElements(t,a,r,c){const n=this.options;if(t.type==="mouseout")return[];if(!c)return a.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const i=this.chart.getElementsAtEventForMode(t,n.mode,n,r);return n.reverse&&i.reverse(),i}_positionChanged(t,a){const{caretX:r,caretY:c,options:n}=this,i=Ct[n.position].call(this,t,a);return i!==!1&&(r!==i.x||c!==i.y)}}o1(_i,"positioners",Ct);var oq={id:"tooltip",_element:_i,positioners:Ct,afterInit(e,t,a){a&&(e.tooltip=new _i({chart:e,options:a}))},beforeUpdate(e,t,a){e.tooltip&&e.tooltip.initialize(a)},reset(e,t,a){e.tooltip&&e.tooltip.initialize(a)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const a={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...a,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",a)}},afterEvent(e,t){if(e.tooltip){const a=t.replay;e.tooltip.handleEvent(t.event,a,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:vx},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"]},lq=Object.freeze({__proto__:null,Colors:MG,Decimation:VG,Filler:YG,Legend:QG,SubTitle:eq,Title:JG,Tooltip:oq});const fq=(e,t,a,r)=>(typeof t=="string"?(a=e.push(t)-1,r.unshift({index:a,label:t})):isNaN(t)&&(a=null),a);function uq(e,t,a,r){const c=e.indexOf(t);if(c===-1)return fq(e,t,a,r);const n=e.lastIndexOf(t);return c!==n?a:c}const hq=(e,t)=>e===null?null:k3(Math.round(e),0,t);function oh(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class ki extends W6{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const a=this._addedLabels;if(a.length){const r=this.getLabels();for(const{index:c,label:n}of a)r[c]===n&&r.splice(c,1);this._addedLabels=[]}super.init(t)}parse(t,a){if(l2(t))return null;const r=this.getLabels();return a=isFinite(a)&&r[a]===t?a:uq(r,t,q1(a,t),this._addedLabels),hq(a,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let{min:r,max:c}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),a||(c=this.getLabels().length-1)),this.min=r,this.max=c}buildTicks(){const t=this.min,a=this.max,r=this.options.offset,c=[];let n=this.getLabels();n=t===0&&a===n.length-1?n:n.slice(t,a+1),this._valueRange=Math.max(n.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let i=t;i<=a;i++)c.push({value:i});return c}getLabelForValue(t){return oh.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){const a=this.ticks;return t<0||t>a.length-1?null:this.getPixelForValue(a[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}o1(ki,"id","category"),o1(ki,"defaults",{ticks:{callback:oh}});function dq(e,t){const a=[],{bounds:c,step:n,min:i,max:s,precision:l,count:f,maxTicks:u,maxDigits:h,includeBounds:d}=e,m=n||1,p=u-1,{min:v,max:g}=t,x=!l2(i),z=!l2(s),C=!l2(f),b=(g-v)/(h+1);let H=ru((g-v)/p/m)*m,V,y,A,E;if(H<1e-14&&!x&&!z)return[{value:v},{value:g}];E=Math.ceil(g/H)-Math.floor(v/H),E>p&&(H=ru(E*H/p/m)*m),l2(l)||(V=Math.pow(10,l),H=Math.ceil(H*V)/V),c==="ticks"?(y=Math.floor(v/H)*H,A=Math.ceil(g/H)*H):(y=v,A=g),x&&z&&n&&iW((s-i)/n,H/1e3)?(E=Math.round(Math.min((s-i)/H,u)),H=(s-i)/E,y=i,A=s):C?(y=x?i:y,A=z?s:A,E=f-1,H=(A-y)/E):(E=(A-y)/H,Ft(E,Math.round(E),H/1e3)?E=Math.round(E):E=Math.ceil(E));const Y=Math.max(cu(H),cu(y));V=Math.pow(10,l2(l)?Y:l),y=Math.round(y*V)/V,A=Math.round(A*V)/V;let F=0;for(x&&(d&&y!==i?(a.push({value:i}),y<i&&F++,Ft(Math.round((y+F*H)*V)/V,i,lh(i,b,e))&&F++):y<i&&F++);F<E;++F){const L=Math.round((y+F*H)*V)/V;if(z&&L>s)break;a.push({value:L})}return z&&d&&A!==s?a.length&&Ft(a[a.length-1].value,s,lh(s,b,e))?a[a.length-1].value=s:a.push({value:s}):(!z||A===s)&&a.push({value:A}),a}function lh(e,t,{horizontal:a,minRotation:r}){const c=$4(r),n=(a?Math.sin(c):Math.cos(c))||.001,i=.75*t*(""+e).length;return Math.min(t/n,i)}class er extends W6{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,a){return l2(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:a,maxDefined:r}=this.getUserBounds();let{min:c,max:n}=this;const i=l=>c=a?c:l,s=l=>n=r?n:l;if(t){const l=be(c),f=be(n);l<0&&f<0?s(0):l>0&&f>0&&i(0)}if(c===n){let l=n===0?1:Math.abs(n*.05);s(n+l),t||i(c-l)}this.min=c,this.max=n}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:a,stepSize:r}=t,c;return r?(c=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,c>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${c} ticks. Limiting to 1000.`),c=1e3)):(c=this.computeTickLimit(),a=a||11),a&&(c=Math.min(a,c)),c}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,a=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const c={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:a.precision,step:a.stepSize,count:a.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:a.minRotation||0,includeBounds:a.includeBounds!==!1},n=this._range||this,i=dq(c,n);return t.bounds==="ticks"&&_g(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const t=this.ticks;let a=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const c=(r-a)/Math.max(t.length-1,1)/2;a-=c,r+=c}this._startValue=a,this._endValue=r,this._valueRange=r-a}getLabelForValue(t){return Q5(t,this.chart.options.locale,this.options.ticks.format)}}class Li extends er{determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=q2(t)?t:0,this.max=q2(a)?a:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),a=t?this.width:this.height,r=$4(this.options.ticks.minRotation),c=(t?Math.sin(r):Math.cos(r))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(a/Math.min(40,n.lineHeight/c))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}o1(Li,"id","linear"),o1(Li,"defaults",{ticks:{callback:Gr.formatters.numeric}});const C5=e=>Math.floor(V0(e)),o6=(e,t)=>Math.pow(10,C5(e)+t);function fh(e){return e/Math.pow(10,C5(e))===1}function uh(e,t,a){const r=Math.pow(10,a),c=Math.floor(e/r);return Math.ceil(t/r)-c}function mq(e,t){const a=t-e;let r=C5(a);for(;uh(e,t,r)>10;)r++;for(;uh(e,t,r)<10;)r--;return Math.min(r,C5(e))}function pq(e,{min:t,max:a}){t=f4(e.min,t);const r=[],c=C5(t);let n=mq(t,a),i=n<0?Math.pow(10,Math.abs(n)):1;const s=Math.pow(10,n),l=c>n?Math.pow(10,c):0,f=Math.round((t-l)*i)/i,u=Math.floor((t-l)/s/10)*s*10;let h=Math.floor((f-u)/Math.pow(10,n)),d=f4(e.min,Math.round((l+u+h*Math.pow(10,n))*i)/i);for(;d<a;)r.push({value:d,major:fh(d),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(n++,h=2,i=n>=0?1:i),d=Math.round((l+u+h*Math.pow(10,n))*i)/i;const m=f4(e.max,d);return r.push({value:m,major:fh(m),significand:h}),r}class Si extends W6{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,a){const r=er.prototype.parse.apply(this,[t,a]);if(r===0){this._zero=!0;return}return q2(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=q2(t)?Math.max(0,t):null,this.max=q2(a)?Math.max(0,a):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!q2(this._userMin)&&(this.min=t===o6(this.min,0)?o6(this.min,-1):o6(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let r=this.min,c=this.max;const n=s=>r=t?r:s,i=s=>c=a?c:s;r===c&&(r<=0?(n(1),i(10)):(n(o6(r,-1)),i(o6(c,1)))),r<=0&&n(o6(c,-1)),c<=0&&i(o6(r,1)),this.min=r,this.max=c}buildTicks(){const t=this.options,a={min:this._userMin,max:this._userMax},r=pq(a,this);return t.bounds==="ticks"&&_g(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":Q5(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=V0(t),this._valueRange=V0(this.max)-V0(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(V0(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const a=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+a*this._valueRange)}}o1(Si,"id","logarithmic"),o1(Si,"defaults",{ticks:{callback:Gr.formatters.logarithmic,major:{enabled:!0}}});function Ai(e){const t=e.ticks;if(t.display&&e.display){const a=j3(t.backdropPadding);return q1(t.font&&t.font.size,D2.font.size)+a.height}return 0}function vq(e,t,a){return a=k2(a)?a:[a],{w:bW(e,t.string,a),h:a.length*t.lineHeight}}function hh(e,t,a,r,c){return e===r||e===c?{start:t-a/2,end:t+a/2}:e<r||e>c?{start:t-a,end:t}:{start:t,end:t+a}}function gq(e){const 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},a=Object.assign({},t),r=[],c=[],n=e._pointLabels.length,i=e.options.pointLabels,s=i.centerPointLabels?A2/n:0;for(let l=0;l<n;l++){const f=i.setContext(e.getPointLabelContext(l));c[l]=f.padding;const u=e.getPointPosition(l,e.drawingArea+c[l],s),h=z3(f.font),d=vq(e.ctx,h,e._pointLabels[l]);r[l]=d;const m=u4(e.getIndexAngle(l)+s),p=Math.round(V9(m)),v=hh(p,u.x,d.w,0,180),g=hh(p,u.y,d.h,90,270);xq(a,t,m,v,g)}e.setCenterPoint(t.l-a.l,a.r-t.r,t.t-a.t,a.b-t.b),e._pointLabelItems=Mq(e,r,c)}function xq(e,t,a,r,c){const n=Math.abs(Math.sin(a)),i=Math.abs(Math.cos(a));let s=0,l=0;r.start<t.l?(s=(t.l-r.start)/n,e.l=Math.min(e.l,t.l-s)):r.end>t.r&&(s=(r.end-t.r)/n,e.r=Math.max(e.r,t.r+s)),c.start<t.t?(l=(t.t-c.start)/i,e.t=Math.min(e.t,t.t-l)):c.end>t.b&&(l=(c.end-t.b)/i,e.b=Math.max(e.b,t.b+l))}function Cq(e,t,a){const r=e.drawingArea,{extra:c,additionalAngle:n,padding:i,size:s}=a,l=e.getPointPosition(t,r+c+i,n),f=Math.round(V9(u4(l.angle+i3))),u=Hq(l.y,s.h,f),h=yq(f),d=bq(l.x,s.w,h);return{visible:!0,x:l.x,y:u,textAlign:h,left:d,top:u,right:d+s.w,bottom:u+s.h}}function zq(e,t){if(!t)return!0;const{left:a,top:r,right:c,bottom:n}=e;return!(je({x:a,y:r},t)||je({x:a,y:n},t)||je({x:c,y:r},t)||je({x:c,y:n},t))}function Mq(e,t,a){const r=[],c=e._pointLabels.length,n=e.options,{centerPointLabels:i,display:s}=n.pointLabels,l={extra:Ai(n)/2,additionalAngle:i?A2/c:0};let f;for(let u=0;u<c;u++){l.padding=a[u],l.size=t[u];const h=Cq(e,u,l);r.push(h),s==="auto"&&(h.visible=zq(h,f),h.visible&&(f=h))}return r}function yq(e){return e===0||e===180?"center":e<180?"left":"right"}function bq(e,t,a){return a==="right"?e-=t:a==="center"&&(e-=t/2),e}function Hq(e,t,a){return a===90||a===270?e-=t/2:(a>270||a<90)&&(e-=t),e}function Vq(e,t,a){const{left:r,top:c,right:n,bottom:i}=a,{backdropColor:s}=t;if(!l2(s)){const l=w6(t.borderRadius),f=j3(t.backdropPadding);e.fillStyle=s;const u=r-f.left,h=c-f.top,d=n-r+f.width,m=i-c+f.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),g5(e,{x:u,y:h,w:d,h:m,radius:l}),e.fill()):e.fillRect(u,h,d,m)}}function wq(e,t){const{ctx:a,options:{pointLabels:r}}=e;for(let c=t-1;c>=0;c--){const n=e._pointLabelItems[c];if(!n.visible)continue;const i=r.setContext(e.getPointLabelContext(c));Vq(a,i,n);const s=z3(i.font),{x:l,y:f,textAlign:u}=n;E6(a,e._pointLabels[c],l,f+s.lineHeight/2,s,{color:i.color,textAlign:u,textBaseline:"middle"})}}function gx(e,t,a,r){const{ctx:c}=e;if(a)c.arc(e.xCenter,e.yCenter,t,0,S2);else{let n=e.getPointPosition(0,t);c.moveTo(n.x,n.y);for(let i=1;i<r;i++)n=e.getPointPosition(i,t),c.lineTo(n.x,n.y)}}function _q(e,t,a,r,c){const n=e.ctx,i=t.circular,{color:s,lineWidth:l}=t;!i&&!r||!s||!l||a<0||(n.save(),n.strokeStyle=s,n.lineWidth=l,n.setLineDash(c.dash||[]),n.lineDashOffset=c.dashOffset,n.beginPath(),gx(e,a,i,r),n.closePath(),n.stroke(),n.restore())}function kq(e,t,a){return K0(e,{label:a,index:t,type:"pointLabel"})}class zt extends er{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=j3(Ai(this.options)/2),a=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+a/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(a,r)/2)}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!1);this.min=q2(t)&&!isNaN(t)?t:0,this.max=q2(a)&&!isNaN(a)?a:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ai(this.options))}generateTickLabels(t){er.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((a,r)=>{const c=M2(this.options.pointLabels.callback,[a,r],this);return c||c===0?c:""}).filter((a,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?gq(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,a,r,c){this.xCenter+=Math.floor((t-a)/2),this.yCenter+=Math.floor((r-c)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,a,r,c))}getIndexAngle(t){const a=S2/(this._pointLabels.length||1),r=this.options.startAngle||0;return u4(t*a+$4(r))}getDistanceFromCenterForValue(t){if(l2(t))return NaN;const a=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*a:(t-this.min)*a}getValueForDistanceFromCenter(t){if(l2(t))return NaN;const a=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-a:this.min+a}getPointLabelContext(t){const a=this._pointLabels||[];if(t>=0&&t<a.length){const r=a[t];return kq(this.getContext(),t,r)}}getPointPosition(t,a,r=0){const c=this.getIndexAngle(t)-i3+r;return{x:Math.cos(c)*a+this.xCenter,y:Math.sin(c)*a+this.yCenter,angle:c}}getPointPositionForValue(t,a){return this.getPointPosition(t,this.getDistanceFromCenterForValue(a))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:a,top:r,right:c,bottom:n}=this._pointLabelItems[t];return{left:a,top:r,right:c,bottom:n}}drawBackground(){const{backgroundColor:t,grid:{circular:a}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),gx(this,this.getDistanceFromCenterForValue(this._endValue),a,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,a=this.options,{angleLines:r,grid:c,border:n}=a,i=this._pointLabels.length;let s,l,f;if(a.pointLabels.display&&wq(this,i),c.display&&this.ticks.forEach((u,h)=>{if(h!==0||h===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const d=this.getContext(h),m=c.setContext(d),p=n.setContext(d);_q(this,m,l,i,p)}}),r.display){for(t.save(),s=i-1;s>=0;s--){const u=r.setContext(this.getPointLabelContext(s)),{color:h,lineWidth:d}=u;!d||!h||(t.lineWidth=d,t.strokeStyle=h,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(a.reverse?this.min:this.max),f=this.getPointPosition(s,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(f.x,f.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,a=this.options,r=a.ticks;if(!r.display)return;const c=this.getIndexAngle(0);let n,i;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(c),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&this.min>=0&&!a.reverse)return;const f=r.setContext(this.getContext(l)),u=z3(f.font);if(n=this.getDistanceFromCenterForValue(this.ticks[l].value),f.showLabelBackdrop){t.font=u.string,i=t.measureText(s.label).width,t.fillStyle=f.backdropColor;const h=j3(f.backdropPadding);t.fillRect(-i/2-h.left,-n-u.size/2-h.top,i+h.width,u.size+h.height)}E6(t,s.label,0,-n,u,{color:f.color,strokeColor:f.textStrokeColor,strokeWidth:f.textStrokeWidth})}),t.restore()}drawTitle(){}}o1(zt,"id","radialLinear"),o1(zt,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Gr.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),o1(zt,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),o1(zt,"descriptors",{angleLines:{_fallback:"grid"}});const Qr={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}},i4=Object.keys(Qr);function dh(e,t){return e-t}function mh(e,t){if(l2(t))return null;const a=e._adapter,{parser:r,round:c,isoWeekday:n}=e._parseOpts;let i=t;return typeof r=="function"&&(i=r(i)),q2(i)||(i=typeof r=="string"?a.parse(i,r):a.parse(i)),i===null?null:(c&&(i=c==="week"&&(N8(n)||n===!0)?a.startOf(i,"isoWeek",n):a.startOf(i,c)),+i)}function ph(e,t,a,r){const c=i4.length;for(let n=i4.indexOf(e);n<c-1;++n){const i=Qr[i4[n]],s=i.steps?i.steps:Number.MAX_SAFE_INTEGER;if(i.common&&Math.ceil((a-t)/(s*i.size))<=r)return i4[n]}return i4[c-1]}function Lq(e,t,a,r,c){for(let n=i4.length-1;n>=i4.indexOf(a);n--){const i=i4[n];if(Qr[i].common&&e._adapter.diff(c,r,i)>=t-1)return i}return i4[a?i4.indexOf(a):0]}function Sq(e){for(let t=i4.indexOf(e)+1,a=i4.length;t<a;++t)if(Qr[i4[t]].common)return i4[t]}function vh(e,t,a){if(!a)e[t]=!0;else if(a.length){const{lo:r,hi:c}=w9(a,t),n=a[r]>=t?a[r]:a[c];e[n]=!0}}function Aq(e,t,a,r){const c=e._adapter,n=+c.startOf(t[0].value,r),i=t[t.length-1].value;let s,l;for(s=n;s<=i;s=+c.add(s,1,r))l=a[s],l>=0&&(t[l].major=!0);return t}function gh(e,t,a){const r=[],c={},n=t.length;let i,s;for(i=0;i<n;++i)s=t[i],c[s]=i,r.push({value:s,major:!1});return n===0||!a?r:Aq(e,r,c,a)}class z5 extends W6{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,a={}){const r=t.time||(t.time={}),c=this._adapter=new OY._date(t.adapters.date);c.init(a),Pt(r.displayFormats,c.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=a.normalized}parse(t,a){return t===void 0?null:mh(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,a=this._adapter,r=t.time.unit||"day";let{min:c,max:n,minDefined:i,maxDefined:s}=this.getUserBounds();function l(f){!i&&!isNaN(f.min)&&(c=Math.min(c,f.min)),!s&&!isNaN(f.max)&&(n=Math.max(n,f.max))}(!i||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),c=q2(c)&&!isNaN(c)?c:+a.startOf(Date.now(),r),n=q2(n)&&!isNaN(n)?n:+a.endOf(Date.now(),r)+1,this.min=Math.min(c,n-1),this.max=Math.max(c+1,n)}_getLabelBounds(){const t=this.getLabelTimestamps();let a=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(a=t[0],r=t[t.length-1]),{min:a,max:r}}buildTicks(){const t=this.options,a=t.time,r=t.ticks,c=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&c.length&&(this.min=this._userMin||c[0],this.max=this._userMax||c[c.length-1]);const n=this.min,i=this.max,s=fW(c,n,i);return this._unit=a.unit||(r.autoSkip?ph(a.minUnit,this.min,this.max,this._getLabelCapacity(n)):Lq(this,s.length,a.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:Sq(this._unit),this.initOffsets(c),t.reverse&&s.reverse(),gh(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let a=0,r=0,c,n;this.options.offset&&t.length&&(c=this.getDecimalForValue(t[0]),t.length===1?a=1-c:a=(this.getDecimalForValue(t[1])-c)/2,n=this.getDecimalForValue(t[t.length-1]),t.length===1?r=n:r=(n-this.getDecimalForValue(t[t.length-2]))/2);const i=t.length<3?.5:.25;a=k3(a,0,i),r=k3(r,0,i),this._offsets={start:a,end:r,factor:1/(a+1+r)}}_generate(){const t=this._adapter,a=this.min,r=this.max,c=this.options,n=c.time,i=n.unit||ph(n.minUnit,a,r,this._getLabelCapacity(a)),s=q1(c.ticks.stepSize,1),l=i==="week"?n.isoWeekday:!1,f=N8(l)||l===!0,u={};let h=a,d,m;if(f&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,f?"day":i),t.diff(r,a,i)>1e5*s)throw new Error(a+" and "+r+" are too far apart with stepSize of "+s+" "+i);const p=c.ticks.source==="data"&&this.getDataTimestamps();for(d=h,m=0;d<r;d=+t.add(d,s,i),m++)vh(u,d,p);return(d===r||c.bounds==="ticks"||m===1)&&vh(u,d,p),Object.keys(u).sort(dh).map(v=>+v)}getLabelForValue(t){const a=this._adapter,r=this.options.time;return r.tooltipFormat?a.format(t,r.tooltipFormat):a.format(t,r.displayFormats.datetime)}format(t,a){const c=this.options.time.displayFormats,n=this._unit,i=a||c[n];return this._adapter.format(t,i)}_tickFormatFunction(t,a,r,c){const n=this.options,i=n.ticks.callback;if(i)return M2(i,[t,a,r],this);const s=n.time.displayFormats,l=this._unit,f=this._majorUnit,u=l&&s[l],h=f&&s[f],d=r[a],m=f&&h&&d&&d.major;return this._adapter.format(t,c||(m?h:u))}generateTickLabels(t){let a,r,c;for(a=0,r=t.length;a<r;++a)c=t[a],c.label=this._tickFormatFunction(c.value,a,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const a=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((a.start+r)*a.factor)}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const a=this.options.ticks,r=this.ctx.measureText(t).width,c=$4(this.isHorizontal()?a.maxRotation:a.minRotation),n=Math.cos(c),i=Math.sin(c),s=this._resolveTickFontOptions(0).size;return{w:r*n+s*i,h:r*i+s*n}}_getLabelCapacity(t){const a=this.options.time,r=a.displayFormats,c=r[a.unit]||r.millisecond,n=this._tickFormatFunction(t,0,gh(this,[t],this._majorUnit),c),i=this._getLabelSize(n),s=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],a,r;if(t.length)return t;const c=this.getMatchingVisibleMetas();if(this._normalized&&c.length)return this._cache.data=c[0].controller.getAllParsedValues(this);for(a=0,r=c.length;a<r;++a)t=t.concat(c[a].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let a,r;if(t.length)return t;const c=this.getLabels();for(a=0,r=c.length;a<r;++a)t.push(mh(this,c[a]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Sg(t.sort(dh))}}o1(z5,"id","time"),o1(z5,"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 Ya(e,t,a){let r=0,c=e.length-1,n,i,s,l;a?(t>=e[r].pos&&t<=e[c].pos&&({lo:r,hi:c}=Ye(e,"pos",t)),{pos:n,time:s}=e[r],{pos:i,time:l}=e[c]):(t>=e[r].time&&t<=e[c].time&&({lo:r,hi:c}=Ye(e,"time",t)),{time:n,pos:s}=e[r],{time:i,pos:l}=e[c]);const f=i-n;return f?s+(l-s)*(t-n)/f:s}class Ti extends z5{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),a=this._table=this.buildLookupTable(t);this._minPos=Ya(a,this.min),this._tableRange=Ya(a,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:a,max:r}=this,c=[],n=[];let i,s,l,f,u;for(i=0,s=t.length;i<s;++i)f=t[i],f>=a&&f<=r&&c.push(f);if(c.length<2)return[{time:a,pos:0},{time:r,pos:1}];for(i=0,s=c.length;i<s;++i)u=c[i+1],l=c[i-1],f=c[i],Math.round((u+l)/2)!==f&&n.push({time:f,pos:i/(s-1)});return n}_generate(){const t=this.min,a=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(a)||r.length===1)&&r.push(a),r.sort((c,n)=>c-n)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const a=this.getDataTimestamps(),r=this.getLabelTimestamps();return a.length&&r.length?t=this.normalize(a.concat(r)):t=a.length?a:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Ya(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return Ya(this._table,r*this._tableRange+this._minPos,!0)}}o1(Ti,"id","timeseries"),o1(Ti,"defaults",z5.defaults);var Tq=Object.freeze({__proto__:null,CategoryScale:ki,LinearScale:Li,LogarithmicScale:Si,RadialLinearScale:zt,TimeScale:z5,TimeSeriesScale:Ti});const Nq=[BY,mG,lq,Tq];var Eq=typeof global=="object"&&global&&global.Object===Object&&global;const xx=Eq;var Pq=typeof self=="object"&&self&&self.Object===Object&&self,Fq=xx||Pq||Function("return this")();const Le=Fq;var Dq=Le.Symbol;const G0=Dq;var Cx=Object.prototype,Bq=Cx.hasOwnProperty,Oq=Cx.toString,ft=G0?G0.toStringTag:void 0;function Rq(e){var t=Bq.call(e,ft),a=e[ft];try{e[ft]=void 0;var r=!0}catch{}var c=Oq.call(e);return r&&(t?e[ft]=a:delete e[ft]),c}var Iq=Object.prototype,$q=Iq.toString;function Uq(e){return $q.call(e)}var Wq="[object Null]",Yq="[object Undefined]",xh=G0?G0.toStringTag:void 0;function J5(e){return e==null?e===void 0?Yq:Wq:xh&&xh in Object(e)?Rq(e):Uq(e)}function P6(e){return e!=null&&typeof e=="object"}var jq=Array.isArray;const F8=jq;function ea(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Gq="[object AsyncFunction]",qq="[object Function]",Xq="[object GeneratorFunction]",Zq="[object Proxy]";function zx(e){if(!ea(e))return!1;var t=J5(e);return t==qq||t==Xq||t==Gq||t==Zq}var Qq=Le["__core-js_shared__"];const gn=Qq;var Ch=function(){var e=/[^.]+$/.exec(gn&&gn.keys&&gn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Kq(e){return!!Ch&&Ch in e}var Jq=Function.prototype,eX=Jq.toString;function Y6(e){if(e!=null){try{return eX.call(e)}catch{}try{return e+""}catch{}}return""}var tX=/[\\^$.*+?()[\]{}|]/g,aX=/^\[object .+?Constructor\]$/,rX=Function.prototype,cX=Object.prototype,nX=rX.toString,iX=cX.hasOwnProperty,sX=RegExp("^"+nX.call(iX).replace(tX,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oX(e){if(!ea(e)||Kq(e))return!1;var t=zx(e)?sX:aX;return t.test(Y6(e))}function lX(e,t){return e==null?void 0:e[t]}function j6(e,t){var a=lX(e,t);return oX(a)?a:void 0}var fX=j6(Le,"WeakMap");const Ni=fX;var zh=Object.create,uX=function(){function e(){}return function(t){if(!ea(t))return{};if(zh)return zh(t);e.prototype=t;var a=new e;return e.prototype=void 0,a}}();const hX=uX;function dX(e,t){var a=-1,r=e.length;for(t||(t=Array(r));++a<r;)t[a]=e[a];return t}var mX=function(){try{var e=j6(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Mh=mX;function pX(e,t){for(var a=-1,r=e==null?0:e.length;++a<r&&t(e[a],a,e)!==!1;);return e}var vX=9007199254740991,gX=/^(?:0|[1-9]\d*)$/;function xX(e,t){var a=typeof e;return t=t??vX,!!t&&(a=="number"||a!="symbol"&&gX.test(e))&&e>-1&&e%1==0&&e<t}function Mx(e,t,a){t=="__proto__"&&Mh?Mh(e,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[t]=a}function B9(e,t){return e===t||e!==e&&t!==t}var CX=Object.prototype,zX=CX.hasOwnProperty;function yx(e,t,a){var r=e[t];(!(zX.call(e,t)&&B9(r,a))||a===void 0&&!(t in e))&&Mx(e,t,a)}function Kr(e,t,a,r){var c=!a;a||(a={});for(var n=-1,i=t.length;++n<i;){var s=t[n],l=r?r(a[s],e[s],s,a,e):void 0;l===void 0&&(l=e[s]),c?Mx(a,s,l):yx(a,s,l)}return a}var MX=9007199254740991;function bx(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=MX}function O9(e){return e!=null&&bx(e.length)&&!zx(e)}var yX=Object.prototype;function Jr(e){var t=e&&e.constructor,a=typeof t=="function"&&t.prototype||yX;return e===a}function bX(e,t){for(var a=-1,r=Array(e);++a<e;)r[a]=t(a);return r}var HX="[object Arguments]";function yh(e){return P6(e)&&J5(e)==HX}var Hx=Object.prototype,VX=Hx.hasOwnProperty,wX=Hx.propertyIsEnumerable,_X=yh(function(){return arguments}())?yh:function(e){return P6(e)&&VX.call(e,"callee")&&!wX.call(e,"callee")};const Vx=_X;function kX(){return!1}var wx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bh=wx&&typeof module=="object"&&module&&!module.nodeType&&module,LX=bh&&bh.exports===wx,Hh=LX?Le.Buffer:void 0,SX=Hh?Hh.isBuffer:void 0,AX=SX||kX;const M5=AX;var TX="[object Arguments]",NX="[object Array]",EX="[object Boolean]",PX="[object Date]",FX="[object Error]",DX="[object Function]",BX="[object Map]",OX="[object Number]",RX="[object Object]",IX="[object RegExp]",$X="[object Set]",UX="[object String]",WX="[object WeakMap]",YX="[object ArrayBuffer]",jX="[object DataView]",GX="[object Float32Array]",qX="[object Float64Array]",XX="[object Int8Array]",ZX="[object Int16Array]",QX="[object Int32Array]",KX="[object Uint8Array]",JX="[object Uint8ClampedArray]",eZ="[object Uint16Array]",tZ="[object Uint32Array]",w2={};w2[GX]=w2[qX]=w2[XX]=w2[ZX]=w2[QX]=w2[KX]=w2[JX]=w2[eZ]=w2[tZ]=!0;w2[TX]=w2[NX]=w2[YX]=w2[EX]=w2[jX]=w2[PX]=w2[FX]=w2[DX]=w2[BX]=w2[OX]=w2[RX]=w2[IX]=w2[$X]=w2[UX]=w2[WX]=!1;function aZ(e){return P6(e)&&bx(e.length)&&!!w2[J5(e)]}function R9(e){return function(t){return e(t)}}var _x=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Rt=_x&&typeof module=="object"&&module&&!module.nodeType&&module,rZ=Rt&&Rt.exports===_x,xn=rZ&&xx.process,cZ=function(){try{var e=Rt&&Rt.require&&Rt.require("util").types;return e||xn&&xn.binding&&xn.binding("util")}catch{}}();const D8=cZ;var Vh=D8&&D8.isTypedArray,nZ=Vh?R9(Vh):aZ;const I9=nZ;var iZ=Object.prototype,sZ=iZ.hasOwnProperty;function kx(e,t){var a=F8(e),r=!a&&Vx(e),c=!a&&!r&&M5(e),n=!a&&!r&&!c&&I9(e),i=a||r||c||n,s=i?bX(e.length,String):[],l=s.length;for(var f in e)(t||sZ.call(e,f))&&!(i&&(f=="length"||c&&(f=="offset"||f=="parent")||n&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||xX(f,l)))&&s.push(f);return s}function Lx(e,t){return function(a){return e(t(a))}}var oZ=Lx(Object.keys,Object);const lZ=oZ;var fZ=Object.prototype,uZ=fZ.hasOwnProperty;function Sx(e){if(!Jr(e))return lZ(e);var t=[];for(var a in Object(e))uZ.call(e,a)&&a!="constructor"&&t.push(a);return t}function $9(e){return O9(e)?kx(e):Sx(e)}function hZ(e){var t=[];if(e!=null)for(var a in Object(e))t.push(a);return t}var dZ=Object.prototype,mZ=dZ.hasOwnProperty;function pZ(e){if(!ea(e))return hZ(e);var t=Jr(e),a=[];for(var r in e)r=="constructor"&&(t||!mZ.call(e,r))||a.push(r);return a}function U9(e){return O9(e)?kx(e,!0):pZ(e)}var vZ=j6(Object,"create");const y5=vZ;function gZ(){this.__data__=y5?y5(null):{},this.size=0}function xZ(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var CZ="__lodash_hash_undefined__",zZ=Object.prototype,MZ=zZ.hasOwnProperty;function yZ(e){var t=this.__data__;if(y5){var a=t[e];return a===CZ?void 0:a}return MZ.call(t,e)?t[e]:void 0}var bZ=Object.prototype,HZ=bZ.hasOwnProperty;function VZ(e){var t=this.__data__;return y5?t[e]!==void 0:HZ.call(t,e)}var wZ="__lodash_hash_undefined__";function _Z(e,t){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=y5&&t===void 0?wZ:t,this}function F6(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}F6.prototype.clear=gZ;F6.prototype.delete=xZ;F6.prototype.get=yZ;F6.prototype.has=VZ;F6.prototype.set=_Z;function kZ(){this.__data__=[],this.size=0}function ec(e,t){for(var a=e.length;a--;)if(B9(e[a][0],t))return a;return-1}var LZ=Array.prototype,SZ=LZ.splice;function AZ(e){var t=this.__data__,a=ec(t,e);if(a<0)return!1;var r=t.length-1;return a==r?t.pop():SZ.call(t,a,1),--this.size,!0}function TZ(e){var t=this.__data__,a=ec(t,e);return a<0?void 0:t[a][1]}function NZ(e){return ec(this.__data__,e)>-1}function EZ(e,t){var a=this.__data__,r=ec(a,e);return r<0?(++this.size,a.push([e,t])):a[r][1]=t,this}function l0(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}l0.prototype.clear=kZ;l0.prototype.delete=AZ;l0.prototype.get=TZ;l0.prototype.has=NZ;l0.prototype.set=EZ;var PZ=j6(Le,"Map");const b5=PZ;function FZ(){this.size=0,this.__data__={hash:new F6,map:new(b5||l0),string:new F6}}function DZ(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function tc(e,t){var a=e.__data__;return DZ(t)?a[typeof t=="string"?"string":"hash"]:a.map}function BZ(e){var t=tc(this,e).delete(e);return this.size-=t?1:0,t}function OZ(e){return tc(this,e).get(e)}function RZ(e){return tc(this,e).has(e)}function IZ(e,t){var a=tc(this,e),r=a.size;return a.set(e,t),this.size+=a.size==r?0:1,this}function G6(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}G6.prototype.clear=FZ;G6.prototype.delete=BZ;G6.prototype.get=OZ;G6.prototype.has=RZ;G6.prototype.set=IZ;function Ax(e,t){for(var a=-1,r=t.length,c=e.length;++a<r;)e[c+a]=t[a];return e}var $Z=Lx(Object.getPrototypeOf,Object);const Tx=$Z;function UZ(){this.__data__=new l0,this.size=0}function WZ(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a}function YZ(e){return this.__data__.get(e)}function jZ(e){return this.__data__.has(e)}var GZ=200;function qZ(e,t){var a=this.__data__;if(a instanceof l0){var r=a.__data__;if(!b5||r.length<GZ-1)return r.push([e,t]),this.size=++a.size,this;a=this.__data__=new G6(r)}return a.set(e,t),this.size=a.size,this}function Ze(e){var t=this.__data__=new l0(e);this.size=t.size}Ze.prototype.clear=UZ;Ze.prototype.delete=WZ;Ze.prototype.get=YZ;Ze.prototype.has=jZ;Ze.prototype.set=qZ;function XZ(e,t){return e&&Kr(t,$9(t),e)}function ZZ(e,t){return e&&Kr(t,U9(t),e)}var Nx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wh=Nx&&typeof module=="object"&&module&&!module.nodeType&&module,QZ=wh&&wh.exports===Nx,_h=QZ?Le.Buffer:void 0,kh=_h?_h.allocUnsafe:void 0;function KZ(e,t){if(t)return e.slice();var a=e.length,r=kh?kh(a):new e.constructor(a);return e.copy(r),r}function JZ(e,t){for(var a=-1,r=e==null?0:e.length,c=0,n=[];++a<r;){var i=e[a];t(i,a,e)&&(n[c++]=i)}return n}function Ex(){return[]}var eQ=Object.prototype,tQ=eQ.propertyIsEnumerable,Lh=Object.getOwnPropertySymbols,aQ=Lh?function(e){return e==null?[]:(e=Object(e),JZ(Lh(e),function(t){return tQ.call(e,t)}))}:Ex;const W9=aQ;function rQ(e,t){return Kr(e,W9(e),t)}var cQ=Object.getOwnPropertySymbols,nQ=cQ?function(e){for(var t=[];e;)Ax(t,W9(e)),e=Tx(e);return t}:Ex;const Px=nQ;function iQ(e,t){return Kr(e,Px(e),t)}function Fx(e,t,a){var r=t(e);return F8(e)?r:Ax(r,a(e))}function Ei(e){return Fx(e,$9,W9)}function sQ(e){return Fx(e,U9,Px)}var oQ=j6(Le,"DataView");const Pi=oQ;var lQ=j6(Le,"Promise");const Fi=lQ;var fQ=j6(Le,"Set");const Di=fQ;var Sh="[object Map]",uQ="[object Object]",Ah="[object Promise]",Th="[object Set]",Nh="[object WeakMap]",Eh="[object DataView]",hQ=Y6(Pi),dQ=Y6(b5),mQ=Y6(Fi),pQ=Y6(Di),vQ=Y6(Ni),m6=J5;(Pi&&m6(new Pi(new ArrayBuffer(1)))!=Eh||b5&&m6(new b5)!=Sh||Fi&&m6(Fi.resolve())!=Ah||Di&&m6(new Di)!=Th||Ni&&m6(new Ni)!=Nh)&&(m6=function(e){var t=J5(e),a=t==uQ?e.constructor:void 0,r=a?Y6(a):"";if(r)switch(r){case hQ:return Eh;case dQ:return Sh;case mQ:return Ah;case pQ:return Th;case vQ:return Nh}return t});const B8=m6;var gQ=Object.prototype,xQ=gQ.hasOwnProperty;function CQ(e){var t=e.length,a=new e.constructor(t);return t&&typeof e[0]=="string"&&xQ.call(e,"index")&&(a.index=e.index,a.input=e.input),a}var zQ=Le.Uint8Array;const tr=zQ;function Y9(e){var t=new e.constructor(e.byteLength);return new tr(t).set(new tr(e)),t}function MQ(e,t){var a=t?Y9(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.byteLength)}var yQ=/\w*$/;function bQ(e){var t=new e.constructor(e.source,yQ.exec(e));return t.lastIndex=e.lastIndex,t}var Ph=G0?G0.prototype:void 0,Fh=Ph?Ph.valueOf:void 0;function HQ(e){return Fh?Object(Fh.call(e)):{}}function VQ(e,t){var a=t?Y9(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}var wQ="[object Boolean]",_Q="[object Date]",kQ="[object Map]",LQ="[object Number]",SQ="[object RegExp]",AQ="[object Set]",TQ="[object String]",NQ="[object Symbol]",EQ="[object ArrayBuffer]",PQ="[object DataView]",FQ="[object Float32Array]",DQ="[object Float64Array]",BQ="[object Int8Array]",OQ="[object Int16Array]",RQ="[object Int32Array]",IQ="[object Uint8Array]",$Q="[object Uint8ClampedArray]",UQ="[object Uint16Array]",WQ="[object Uint32Array]";function YQ(e,t,a){var r=e.constructor;switch(t){case EQ:return Y9(e);case wQ:case _Q:return new r(+e);case PQ:return MQ(e,a);case FQ:case DQ:case BQ:case OQ:case RQ:case IQ:case $Q:case UQ:case WQ:return VQ(e,a);case kQ:return new r;case LQ:case TQ:return new r(e);case SQ:return bQ(e);case AQ:return new r;case NQ:return HQ(e)}}function jQ(e){return typeof e.constructor=="function"&&!Jr(e)?hX(Tx(e)):{}}var GQ="[object Map]";function qQ(e){return P6(e)&&B8(e)==GQ}var Dh=D8&&D8.isMap,XQ=Dh?R9(Dh):qQ;const ZQ=XQ;var QQ="[object Set]";function KQ(e){return P6(e)&&B8(e)==QQ}var Bh=D8&&D8.isSet,JQ=Bh?R9(Bh):KQ;const eK=JQ;var tK=1,aK=2,rK=4,Dx="[object Arguments]",cK="[object Array]",nK="[object Boolean]",iK="[object Date]",sK="[object Error]",Bx="[object Function]",oK="[object GeneratorFunction]",lK="[object Map]",fK="[object Number]",Ox="[object Object]",uK="[object RegExp]",hK="[object Set]",dK="[object String]",mK="[object Symbol]",pK="[object WeakMap]",vK="[object ArrayBuffer]",gK="[object DataView]",xK="[object Float32Array]",CK="[object Float64Array]",zK="[object Int8Array]",MK="[object Int16Array]",yK="[object Int32Array]",bK="[object Uint8Array]",HK="[object Uint8ClampedArray]",VK="[object Uint16Array]",wK="[object Uint32Array]",z2={};z2[Dx]=z2[cK]=z2[vK]=z2[gK]=z2[nK]=z2[iK]=z2[xK]=z2[CK]=z2[zK]=z2[MK]=z2[yK]=z2[lK]=z2[fK]=z2[Ox]=z2[uK]=z2[hK]=z2[dK]=z2[mK]=z2[bK]=z2[HK]=z2[VK]=z2[wK]=!0;z2[sK]=z2[Bx]=z2[pK]=!1;function C7(e,t,a,r,c,n){var i,s=t&tK,l=t&aK,f=t&rK;if(a&&(i=c?a(e,r,c,n):a(e)),i!==void 0)return i;if(!ea(e))return e;var u=F8(e);if(u){if(i=CQ(e),!s)return dX(e,i)}else{var h=B8(e),d=h==Bx||h==oK;if(M5(e))return KZ(e,s);if(h==Ox||h==Dx||d&&!c){if(i=l||d?{}:jQ(e),!s)return l?iQ(e,ZZ(i,e)):rQ(e,XZ(i,e))}else{if(!z2[h])return c?e:{};i=YQ(e,h,s)}}n||(n=new Ze);var m=n.get(e);if(m)return m;n.set(e,i),eK(e)?e.forEach(function(g){i.add(C7(g,t,a,g,e,n))}):ZQ(e)&&e.forEach(function(g,x){i.set(x,C7(g,t,a,x,e,n))});var p=f?l?sQ:Ei:l?U9:$9,v=u?void 0:p(e);return pX(v||e,function(g,x){v&&(x=g,g=e[x]),yx(i,x,C7(g,t,a,x,e,n))}),i}var _K=1,kK=4;function ut(e){return C7(e,_K|kK)}var LK="__lodash_hash_undefined__";function SK(e){return this.__data__.set(e,LK),this}function AK(e){return this.__data__.has(e)}function ar(e){var t=-1,a=e==null?0:e.length;for(this.__data__=new G6;++t<a;)this.add(e[t])}ar.prototype.add=ar.prototype.push=SK;ar.prototype.has=AK;function TK(e,t){for(var a=-1,r=e==null?0:e.length;++a<r;)if(t(e[a],a,e))return!0;return!1}function NK(e,t){return e.has(t)}var EK=1,PK=2;function Rx(e,t,a,r,c,n){var i=a&EK,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var f=n.get(e),u=n.get(t);if(f&&u)return f==t&&u==e;var h=-1,d=!0,m=a&PK?new ar:void 0;for(n.set(e,t),n.set(t,e);++h<s;){var p=e[h],v=t[h];if(r)var g=i?r(v,p,h,t,e,n):r(p,v,h,e,t,n);if(g!==void 0){if(g)continue;d=!1;break}if(m){if(!TK(t,function(x,z){if(!NK(m,z)&&(p===x||c(p,x,a,r,n)))return m.push(z)})){d=!1;break}}else if(!(p===v||c(p,v,a,r,n))){d=!1;break}}return n.delete(e),n.delete(t),d}function FK(e){var t=-1,a=Array(e.size);return e.forEach(function(r,c){a[++t]=[c,r]}),a}function DK(e){var t=-1,a=Array(e.size);return e.forEach(function(r){a[++t]=r}),a}var BK=1,OK=2,RK="[object Boolean]",IK="[object Date]",$K="[object Error]",UK="[object Map]",WK="[object Number]",YK="[object RegExp]",jK="[object Set]",GK="[object String]",qK="[object Symbol]",XK="[object ArrayBuffer]",ZK="[object DataView]",Oh=G0?G0.prototype:void 0,Cn=Oh?Oh.valueOf:void 0;function QK(e,t,a,r,c,n,i){switch(a){case ZK:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case XK:return!(e.byteLength!=t.byteLength||!n(new tr(e),new tr(t)));case RK:case IK:case WK:return B9(+e,+t);case $K:return e.name==t.name&&e.message==t.message;case YK:case GK:return e==t+"";case UK:var s=FK;case jK:var l=r&BK;if(s||(s=DK),e.size!=t.size&&!l)return!1;var f=i.get(e);if(f)return f==t;r|=OK,i.set(e,t);var u=Rx(s(e),s(t),r,c,n,i);return i.delete(e),u;case qK:if(Cn)return Cn.call(e)==Cn.call(t)}return!1}var KK=1,JK=Object.prototype,eJ=JK.hasOwnProperty;function tJ(e,t,a,r,c,n){var i=a&KK,s=Ei(e),l=s.length,f=Ei(t),u=f.length;if(l!=u&&!i)return!1;for(var h=l;h--;){var d=s[h];if(!(i?d in t:eJ.call(t,d)))return!1}var m=n.get(e),p=n.get(t);if(m&&p)return m==t&&p==e;var v=!0;n.set(e,t),n.set(t,e);for(var g=i;++h<l;){d=s[h];var x=e[d],z=t[d];if(r)var C=i?r(z,x,d,t,e,n):r(x,z,d,e,t,n);if(!(C===void 0?x===z||c(x,z,a,r,n):C)){v=!1;break}g||(g=d=="constructor")}if(v&&!g){var b=e.constructor,H=t.constructor;b!=H&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof H=="function"&&H instanceof H)&&(v=!1)}return n.delete(e),n.delete(t),v}var aJ=1,Rh="[object Arguments]",Ih="[object Array]",ja="[object Object]",rJ=Object.prototype,$h=rJ.hasOwnProperty;function cJ(e,t,a,r,c,n){var i=F8(e),s=F8(t),l=i?Ih:B8(e),f=s?Ih:B8(t);l=l==Rh?ja:l,f=f==Rh?ja:f;var u=l==ja,h=f==ja,d=l==f;if(d&&M5(e)){if(!M5(t))return!1;i=!0,u=!1}if(d&&!u)return n||(n=new Ze),i||I9(e)?Rx(e,t,a,r,c,n):QK(e,t,l,a,r,c,n);if(!(a&aJ)){var m=u&&$h.call(e,"__wrapped__"),p=h&&$h.call(t,"__wrapped__");if(m||p){var v=m?e.value():e,g=p?t.value():t;return n||(n=new Ze),c(v,g,a,r,n)}}return d?(n||(n=new Ze),tJ(e,t,a,r,c,n)):!1}function Ix(e,t,a,r,c){return e===t?!0:e==null||t==null||!P6(e)&&!P6(t)?e!==e&&t!==t:cJ(e,t,a,r,Ix,c)}var nJ="[object Map]",iJ="[object Set]",sJ=Object.prototype,oJ=sJ.hasOwnProperty;function lJ(e){if(e==null)return!0;if(O9(e)&&(F8(e)||typeof e=="string"||typeof e.splice=="function"||M5(e)||I9(e)||Vx(e)))return!e.length;var t=B8(e);if(t==nJ||t==iJ)return!e.size;if(Jr(e))return!Sx(e).length;for(var a in e)if(oJ.call(e,a))return!1;return!0}function Uh(e,t){return Ix(e,t)}var fJ=Object.defineProperty,uJ=Object.defineProperties,hJ=Object.getOwnPropertyDescriptors,Wh=Object.getOwnPropertySymbols,dJ=Object.prototype.hasOwnProperty,mJ=Object.prototype.propertyIsEnumerable,Yh=(e,t,a)=>t in e?fJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,pJ=(e,t)=>{for(var a in t||(t={}))dJ.call(t,a)&&Yh(e,a,t[a]);if(Wh)for(var a of Wh(t))mJ.call(t,a)&&Yh(e,a,t[a]);return e},vJ=(e,t)=>uJ(e,hJ(t));function gJ(e){return(e.match(/[a-zA-Z0-9]+/g)||[]).map(t=>`${t.charAt(0).toUpperCase()}${t.slice(1)}`).join("")}var J0=(e,t)=>{const a={chartData:{type:Object,required:!0},options:{type:Object,required:!1},chartId:{default:e,type:String},width:{default:400,type:Number},height:{default:400,type:Number},cssClasses:{type:String,default:""},styles:{type:Object},plugins:{type:Array,default:()=>[]},onLabelsUpdate:{type:Function},onChartUpdate:{type:Function},onChartDestroy:{type:Function},onChartRender:{type:Function}},r=gJ(e);return o.defineComponent({name:r,props:a,emits:{"labels:update":()=>!0,"chart:update":c=>!0,"chart:destroy":()=>!0,"chart:render":c=>!0},setup(c,{emit:n,expose:i}){const s=o.ref(null),l=`${c.chartId}`;let f=o.shallowRef(null);o.watch(()=>c.chartData,u,{deep:!0}),o.watch(()=>c.options,g=>{f.value&&g&&(f.value.options=ut(g),p())},{deep:!0});function u(g){if(f.value){let x=f.value;Uh(g.labels,f.value.data.labels)||(x.data.labels=g.labels,d()),Uh(g.datasets,f.value.data.datasets)||g.datasets.forEach((z,C)=>{var b,H;if(lJ(z))x.data.datasets=[];else{const V=ut(x.data),y=Object.keys((H=(b=V.datasets)==null?void 0:b[C])!=null?H:{}),A=Object.keys(z);y.filter(Y=>Y!=="_meta"&&A.indexOf(Y)===-1).forEach(Y=>{x.data.datasets[C]&&delete x.data.datasets[C][Y]});for(const Y in z){const F=ut(z[Y]);x.data.datasets[C]||(x.data.datasets[C]={}),z.hasOwnProperty(Y)&&F!=null&&x&&(x.data.datasets[C][Y]=F)}}}),p()}else f.value&&v(),h()}function h(){s.value?(f.value=new Re(s.value,{data:ut(c.chartData),type:t,options:ut(c.options),plugins:c.plugins}),m()):console.error(`Error on component ${r}, canvas cannot be rendered. Check if the render appends server-side`)}function d(){n("labels:update"),c.onLabelsUpdate&&c.onLabelsUpdate()}function m(){f.value&&(n("chart:render",f.value),c.onChartRender&&c.onChartRender(f.value))}function p(){f.value&&(f.value.update(),n("chart:update",f.value),c.onChartUpdate&&c.onChartUpdate(f.value))}function v(){f.value&&f.value.destroy(),n("chart:destroy"),c.onChartDestroy&&c.onChartDestroy()}return o.onMounted(h),o.onBeforeUnmount(()=>{f.value&&f.value.destroy()}),i({canvasRef:s,renderChart:h,chartInstance:f,canvasId:l,update:p}),()=>o.h("div",{style:vJ(pJ({maxWidth:"100%"},c.styles),{position:"relative"}),class:c.cssClasses},[o.h("canvas",{style:{maxWidth:"100%",maxHeight:"100%"},id:l,width:c.width,height:c.height,ref:s})])}})};J0("bar-chart","bar");var xJ=J0("doughnut-chart","doughnut");J0("line-chart","line");J0("pie-chart","pie");J0("polar-chart","polarArea");J0("radar-chart","radar");J0("bubble-chart","bubble");J0("scatter-chart","scatter");const CJ=o.defineComponent({__name:"PgaDoughnutChart",props:{data:{},options:{}},setup(e){Re.register(...Nq);const t={responsive:!0};return(a,r)=>(o.openBlock(),o.createBlock(o.unref(xJ),{chartData:a.data,options:a.options||t},null,8,["chartData","options"]))}}),zJ={key:0},MJ={key:1,class:"barcodes-container"},yJ=o.defineComponent({__name:"PgaDisplayBarcodes",props:{barcodes:{}},setup(e){return(t,a)=>t.barcodes.length?(o.openBlock(),o.createElementBlock("div",MJ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.barcodes,r=>(o.openBlock(),o.createElementBlock("span",{class:"barcode",key:r},[o.createVNode(S3,{icon:"barcode"}),o.createTextVNode(" "+o.toDisplayString(r),1)]))),128))])):(o.openBlock(),o.createElementBlock("span",zJ,"-"))}});const bJ=R1(yJ,[["__scopeId","data-v-5291a54d"]]),HJ=["textContent"],VJ=o.defineComponent({__name:"PgaDisplayDatetime",props:{datetime:{},withoutBackground:{type:Boolean}},setup(e){const t=e,{language:a}=s3.storeToRefs(h3()),r=o.computed(()=>t.datetime instanceof Date),c=o.computed(()=>r.value?new Intl.DateTimeFormat(a.value,{dateStyle:"medium"}).format(t.datetime):"-"),n=o.computed(()=>r.value?new Intl.DateTimeFormat(a.value,{hour:"2-digit",minute:"2-digit"}).format(t.datetime):"");return(i,s)=>{const l=o.resolveDirective("tooltip");return r.value?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["pga-datetime",{"pga-datetime__with-background":!i.withoutBackground}])},[o.createVNode(ae,{icon:"calendar-days",text:c.value,nowrap:""},null,8,["text"])],2)),[[l,n.value]]):(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(c.value)},null,8,HJ))}}});const wJ=R1(VJ,[["__scopeId","data-v-31c52cc2"]]),_J={class:"info-card"},kJ={class:"info-card--icon-container"},LJ={class:"info-card--content-container"},SJ={class:"info-card--content"},AJ=["textContent"],TJ=o.defineComponent({__name:"PgaDisplayInfo",props:{type:{default:"info"},info:{}},setup(e){o.useCssVars(i=>({"25f5bc6c":c.value,"41d953fb":n.value}));const t=e,a=o.computed(()=>{if(t.type==="info")return"circle-info";if(t.type==="success")return"circle-check";if(t.type==="error")return"circle-xmark";if(t.type==="warning")return"circle-exclamation"}),r=o.computed(()=>{if(t.type==="info")return"aqua";if(t.type==="success")return"success";if(t.type==="error")return"danger";if(t.type==="warning")return"warning"}),c=o.computed(()=>`var(--pga-color-${r.value}-08)`),n=o.computed(()=>`var(--pga-color-${r.value}-contrast)`);return(i,s)=>{const l=o.resolveComponent("PgaIcon");return o.openBlock(),o.createElementBlock("div",_J,[o.createElementVNode("div",kJ,[o.createVNode(l,{class:"info-card--icon",icon:a.value},null,8,["icon"])]),o.createElementVNode("div",LJ,[o.createElementVNode("div",SJ,[i.info?(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(i.info)},null,8,AJ)):o.renderSlot(i.$slots,"default",{key:1},void 0,!0)])])])}}});const NJ=R1(TJ,[["__scopeId","data-v-818880c0"]]),EJ={key:0,class:"no-items-container"},PJ={key:1,class:"no-items"},FJ=o.defineComponent({__name:"PgaDisplayNoItems",props:{items:{},label:{},icon:{default:"filter-circle-xmark"},preventDisplayIcon:{type:Boolean},isLoading:{type:Boolean}},setup(e){const t=e,a=I2("pgaDisplayNoItems"),r=o.computed(()=>{var n;return!(((n=t.items)==null?void 0:n.length)>0)}),c=o.computed(()=>t.label?t.label:a("noItemsText"));return(n,i)=>r.value?(o.openBlock(),o.createElementBlock("div",EJ,[n.isLoading?(o.openBlock(),o.createBlock(j5,{key:0})):(o.openBlock(),o.createElementBlock("div",PJ,[n.preventDisplayIcon?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(S3,{key:0,class:"no-items--icon",icon:n.icon},null,8,["icon"])),o.createVNode(ae,{class:"no-items--text",text:c.value},null,8,["text"])]))])):o.createCommentVNode("",!0)}});const $x=R1(FJ,[["__scopeId","data-v-2f2a188f"]]),DJ=["textContent"],BJ={key:0,class:"price-sign",textContent:"$"},OJ=["textContent"],RJ=o.defineComponent({__name:"PgaDisplayPrice",props:{price:{},tooltipPrice:{},size:{default:"m"},color:{default:"first"},numOfDecimals:{},withoutSign:{type:Boolean},withoutBackground:{type:Boolean},isPositive:{type:Boolean,default:void 0}},setup(e){o.useCssVars(f=>({"38848f50":i.value,"885cde0a":l.value,"35f9cc2e":n.value,"4d380636":s.value}));const t=e,a=o.computed(()=>t.price!==void 0),r=o.computed(()=>a.value?typeof t.price=="string"?t.price:V7(t.price,t.numOfDecimals):"-"),c=o.computed(()=>t.tooltipPrice===void 0?"":typeof t.tooltipPrice=="string"?t.tooltipPrice:`$ ${V7(t.tooltipPrice,t.numOfDecimals)}`),n=o.computed(()=>{if(t.size==="s")return"0.9rem";if(t.size==="m")return"1rem";if(t.size==="l")return"1.1rem"}),i=o.computed(()=>{if(t.size==="s")return"0.7rem";if(t.size==="m")return"0.8rem";if(t.size==="l")return"0.9rem"}),s=o.computed(()=>`var(--pga-color-${t.color})`),l=o.computed(()=>{if(t.color==="first")return"var(--pga-color-second)";if(t.color==="second")return"var(--pga-color-third)"});return(f,u)=>{const h=o.resolveDirective("tooltip");return a.value?o.withDirectives((o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(["price-container",{"price-container__with-background":!f.withoutBackground}])},[f.withoutSign?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",BJ)),o.createElementVNode("span",{class:o.normalizeClass(["price",{price__positive:f.isPositive===!0,price__negative:f.isPositive===!1}]),textContent:o.toDisplayString(r.value)},null,10,OJ)],2)),[[h,c.value]]):(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(r.value)},null,8,DJ))}}});const IJ=R1(RJ,[["__scopeId","data-v-97b7f73d"]]),$J=o.defineComponent({__name:"PgaForm",props:{width:{default:"100%"}},setup(e){return o.useCssVars(t=>({"34c1cb30":t.width})),(t,a)=>(o.openBlock(),o.createElementBlock("form",{class:"form",onSubmit:a[0]||(a[0]=o.withModifiers(()=>{},["prevent"]))},[o.renderSlot(t.$slots,"default",{},void 0,!0)],32))}});const Ux=R1($J,[["__scopeId","data-v-0442da56"]]);const UJ={},WJ={class:"pga-form-row"};function YJ(e,t){return o.openBlock(),o.createElementBlock("div",WJ,[o.renderSlot(e.$slots,"default")])}const jJ=R1(UJ,[["render",YJ]]);function jh(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),a.push.apply(a,r)}return a}function x0(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?jh(Object(a),!0).forEach(function(r){GJ(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):jh(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function GJ(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Gh(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(e).reduce((a,r)=>(t.includes(r)||(a[r]=o.unref(e[r])),a),{})}function rr(e){return typeof e=="function"}function qJ(e){return o.isReactive(e)||o.isReadonly(e)}function Wx(e,t,a){let r=e;const c=t.split(".");for(let n=0;n<c.length;n++){if(!r[c[n]])return a;r=r[c[n]]}return r}function zn(e,t,a){return o.computed(()=>e.some(r=>Wx(t,r,{[a]:!1})[a]))}function qh(e,t,a){return o.computed(()=>e.reduce((r,c)=>{const n=Wx(t,c,{[a]:!1})[a]||[];return r.concat(n)},[]))}function Yx(e,t,a,r){return e.call(r,o.unref(t),o.unref(a),r)}function jx(e){return e.$valid!==void 0?!e.$valid:!e}function XJ(e,t,a,r,c,n,i){let{$lazy:s,$rewardEarly:l}=c,f=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],u=arguments.length>8?arguments[8]:void 0,h=arguments.length>9?arguments[9]:void 0,d=arguments.length>10?arguments[10]:void 0;const m=o.ref(!!r.value),p=o.ref(0);a.value=!1;const v=o.watch([t,r].concat(f,d),()=>{if(s&&!r.value||l&&!h.value&&!a.value)return;let g;try{g=Yx(e,t,u,i)}catch(x){g=Promise.reject(x)}p.value++,a.value=!!p.value,m.value=!1,Promise.resolve(g).then(x=>{p.value--,a.value=!!p.value,n.value=x,m.value=jx(x)}).catch(x=>{p.value--,a.value=!!p.value,n.value=x,m.value=!0})},{immediate:!0,deep:typeof t=="object"});return{$invalid:m,$unwatch:v}}function ZJ(e,t,a,r,c,n,i,s){let{$lazy:l,$rewardEarly:f}=r;const u=()=>({}),h=o.computed(()=>{if(l&&!a.value||f&&!s.value)return!1;let d=!0;try{const m=Yx(e,t,i,n);c.value=m,d=jx(m)}catch(m){c.value=m}return d});return{$unwatch:u,$invalid:h}}function QJ(e,t,a,r,c,n,i,s,l,f,u){const h=o.ref(!1),d=e.$params||{},m=o.ref(null);let p,v;e.$async?{$invalid:p,$unwatch:v}=XJ(e.$validator,t,h,a,r,m,c,e.$watchTargets,l,f,u):{$invalid:p,$unwatch:v}=ZJ(e.$validator,t,a,r,m,c,l,f);const g=e.$message;return{$message:rr(g)?o.computed(()=>g(Gh({$pending:h,$invalid:p,$params:Gh(d),$model:t,$response:m,$validator:n,$propertyPath:s,$property:i}))):g||"",$params:d,$pending:h,$invalid:p,$response:m,$unwatch:v}}function KJ(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=o.unref(e),a=Object.keys(t),r={},c={},n={};let i=null;return a.forEach(s=>{const l=t[s];switch(!0){case rr(l.$validator):r[s]=l;break;case rr(l):r[s]={$validator:l};break;case s==="$validationGroups":i=l;break;case s.startsWith("$"):n[s]=l;break;default:c[s]=l}}),{rules:r,nestedValidators:c,config:n,validationGroups:i}}const JJ="__root";function e11(e,t,a,r,c,n,i,s,l){const f=Object.keys(e),u=r.get(c,e),h=o.ref(!1),d=o.ref(!1),m=o.ref(0);if(u){if(!u.$partial)return u;u.$unwatch(),h.value=u.$dirty.value}const p={$dirty:h,$path:c,$touch:()=>{h.value||(h.value=!0)},$reset:()=>{h.value&&(h.value=!1)},$commit:()=>{}};return f.length?(f.forEach(v=>{p[v]=QJ(e[v],t,p.$dirty,n,i,v,a,c,l,d,m)}),p.$externalResults=o.computed(()=>s.value?[].concat(s.value).map((v,g)=>({$propertyPath:c,$property:a,$validator:"$externalResults",$uid:`${c}-externalResult-${g}`,$message:v,$params:{},$response:null,$pending:!1})):[]),p.$invalid=o.computed(()=>{const v=f.some(g=>o.unref(p[g].$invalid));return d.value=v,!!p.$externalResults.value.length||v}),p.$pending=o.computed(()=>f.some(v=>o.unref(p[v].$pending))),p.$error=o.computed(()=>p.$dirty.value?p.$pending.value||p.$invalid.value:!1),p.$silentErrors=o.computed(()=>f.filter(v=>o.unref(p[v].$invalid)).map(v=>{const g=p[v];return o.reactive({$propertyPath:c,$property:a,$validator:v,$uid:`${c}-${v}`,$message:g.$message,$params:g.$params,$response:g.$response,$pending:g.$pending})}).concat(p.$externalResults.value)),p.$errors=o.computed(()=>p.$dirty.value?p.$silentErrors.value:[]),p.$unwatch=()=>f.forEach(v=>{p[v].$unwatch()}),p.$commit=()=>{d.value=!0,m.value=Date.now()},r.set(c,e,p),p):(u&&r.set(c,e,p),p)}function t11(e,t,a,r,c,n,i){const s=Object.keys(e);return s.length?s.reduce((l,f)=>(l[f]=Bi({validations:e[f],state:t,key:f,parentKey:a,resultsCache:r,globalConfig:c,instance:n,externalResults:i}),l),{}):{}}function a11(e,t,a){const r=o.computed(()=>[t,a].filter(p=>p).reduce((p,v)=>p.concat(Object.values(o.unref(v))),[])),c=o.computed({get(){return e.$dirty.value||(r.value.length?r.value.every(p=>p.$dirty):!1)},set(p){e.$dirty.value=p}}),n=o.computed(()=>{const p=o.unref(e.$silentErrors)||[],v=r.value.filter(g=>(o.unref(g).$silentErrors||[]).length).reduce((g,x)=>g.concat(...x.$silentErrors),[]);return p.concat(v)}),i=o.computed(()=>{const p=o.unref(e.$errors)||[],v=r.value.filter(g=>(o.unref(g).$errors||[]).length).reduce((g,x)=>g.concat(...x.$errors),[]);return p.concat(v)}),s=o.computed(()=>r.value.some(p=>p.$invalid)||o.unref(e.$invalid)||!1),l=o.computed(()=>r.value.some(p=>o.unref(p.$pending))||o.unref(e.$pending)||!1),f=o.computed(()=>r.value.some(p=>p.$dirty)||r.value.some(p=>p.$anyDirty)||c.value),u=o.computed(()=>c.value?l.value||s.value:!1),h=()=>{e.$touch(),r.value.forEach(p=>{p.$touch()})},d=()=>{e.$commit(),r.value.forEach(p=>{p.$commit()})},m=()=>{e.$reset(),r.value.forEach(p=>{p.$reset()})};return r.value.length&&r.value.every(p=>p.$dirty)&&h(),{$dirty:c,$errors:i,$invalid:s,$anyDirty:f,$error:u,$pending:l,$touch:h,$reset:m,$silentErrors:n,$commit:d}}function Bi(e){let{validations:t,state:a,key:r,parentKey:c,childResults:n,resultsCache:i,globalConfig:s={},instance:l,externalResults:f}=e;const u=c?`${c}.${r}`:r,{rules:h,nestedValidators:d,config:m,validationGroups:p}=KJ(t),v=x0(x0({},s),m),g=r?o.computed(()=>{const v1=o.unref(a);return v1?o.unref(v1[r]):void 0}):a,x=x0({},o.unref(f)||{}),z=o.computed(()=>{const v1=o.unref(f);return r?v1?o.unref(v1[r]):void 0:v1}),C=e11(h,g,r,i,u,v,l,z,a),b=t11(d,g,u,i,v,l,z),H={};p&&Object.entries(p).forEach(v1=>{let[c1,S]=v1;H[c1]={$invalid:zn(S,b,"$invalid"),$error:zn(S,b,"$error"),$pending:zn(S,b,"$pending"),$errors:qh(S,b,"$errors"),$silentErrors:qh(S,b,"$silentErrors")}});const{$dirty:V,$errors:y,$invalid:A,$anyDirty:E,$error:Y,$pending:F,$touch:L,$reset:j,$silentErrors:r1,$commit:P}=a11(C,b,n),O=r?o.computed({get:()=>o.unref(g),set:v1=>{V.value=!0;const c1=o.unref(a),S=o.unref(f);S&&(S[r]=x[r]),o.isRef(c1[r])?c1[r].value=v1:c1[r]=v1}}):null;r&&v.$autoDirty&&o.watch(g,()=>{V.value||L();const v1=o.unref(f);v1&&(v1[r]=x[r])},{flush:"sync"});async function X(){return L(),v.$rewardEarly&&(P(),await o.nextTick()),await o.nextTick(),new Promise(v1=>{if(!F.value)return v1(!A.value);const c1=o.watch(F,()=>{v1(!A.value),c1()})})}function f1(v1){return(n.value||{})[v1]}function K(){o.isRef(f)?f.value=x:Object.keys(x).length===0?Object.keys(f).forEach(v1=>{delete f[v1]}):Object.assign(f,x)}return o.reactive(x0(x0(x0({},C),{},{$model:O,$dirty:V,$error:Y,$errors:y,$invalid:A,$anyDirty:E,$pending:F,$touch:L,$reset:j,$path:u||JJ,$silentErrors:r1,$validate:X,$commit:P},n&&{$getResultsForChild:f1,$clearExternalResults:K,$validationGroups:H}),b))}class r11{constructor(){this.storage=new Map}set(t,a,r){this.storage.set(t,{rules:a,result:r})}checkRulesValidity(t,a,r){const c=Object.keys(r),n=Object.keys(a);return n.length!==c.length||!n.every(s=>c.includes(s))?!1:n.every(s=>a[s].$params?Object.keys(a[s].$params).every(l=>o.unref(r[s].$params[l])===o.unref(a[s].$params[l])):!0)}get(t,a){const r=this.storage.get(t);if(!r)return;const{rules:c,result:n}=r,i=this.checkRulesValidity(t,a,c),s=n.$unwatch?n.$unwatch:()=>({});return i?n:{$dirty:n.$dirty,$partial:!0,$unwatch:s}}}const z7={COLLECT_ALL:!0,COLLECT_NONE:!1},Xh=Symbol("vuelidate#injectChildResults"),Zh=Symbol("vuelidate#removeChildResults");function c11(e){let{$scope:t,instance:a}=e;const r={},c=o.ref([]),n=o.computed(()=>c.value.reduce((u,h)=>(u[h]=o.unref(r[h]),u),{}));function i(u,h){let{$registerAs:d,$scope:m,$stopPropagation:p}=h;p||t===z7.COLLECT_NONE||m===z7.COLLECT_NONE||t!==z7.COLLECT_ALL&&t!==m||(r[d]=u,c.value.push(d))}a.__vuelidateInjectInstances=[].concat(a.__vuelidateInjectInstances||[],i);function s(u){c.value=c.value.filter(h=>h!==u),delete r[u]}a.__vuelidateRemoveInstances=[].concat(a.__vuelidateRemoveInstances||[],s);const l=o.inject(Xh,[]);o.provide(Xh,a.__vuelidateInjectInstances);const f=o.inject(Zh,[]);return o.provide(Zh,a.__vuelidateRemoveInstances),{childResults:n,sendValidationResultsToParent:l,removeValidationResultsFromParent:f}}function Gx(e){return new Proxy(e,{get(t,a){return typeof t[a]=="object"?Gx(t[a]):o.computed(()=>t[a])}})}let Qh=0;function n11(e,t){var a;let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(r=e,e=void 0,t=void 0);let{$registerAs:c,$scope:n=z7.COLLECT_ALL,$stopPropagation:i,$externalResults:s,currentVueInstance:l}=r;const f=l||((a=o.getCurrentInstance())===null||a===void 0?void 0:a.proxy),u=f?f.$options:{};c||(Qh+=1,c=`_vuelidate_${Qh}`);const h=o.ref({}),d=new r11,{childResults:m,sendValidationResultsToParent:p,removeValidationResultsFromParent:v}=f?c11({$scope:n,instance:f}):{childResults:o.ref({})};if(!e&&u.validations){const g=u.validations;t=o.ref({}),o.onBeforeMount(()=>{t.value=f,o.watch(()=>rr(g)?g.call(t.value,new Gx(t.value)):g,x=>{h.value=Bi({validations:x,state:t,childResults:m,resultsCache:d,globalConfig:r,instance:f,externalResults:s||f.vuelidateExternalResults})},{immediate:!0})}),r=u.validationsConfig||r}else{const g=o.isRef(e)||qJ(e)?e:o.reactive(e||{});o.watch(g,x=>{h.value=Bi({validations:x,state:t,childResults:m,resultsCache:d,globalConfig:r,instance:f??{},externalResults:s})},{immediate:!0})}return f&&(p.forEach(g=>g(h,{$registerAs:c,$scope:n,$stopPropagation:i})),o.onBeforeUnmount(()=>v.forEach(g=>g(c)))),o.computed(()=>x0(x0({},o.unref(h.value)),m.value))}function Kh(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),a.push.apply(a,r)}return a}function H5(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Kh(Object(a),!0).forEach(function(r){i11(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Kh(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function i11(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function cr(e){return typeof e=="function"}function Oi(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function ac(e){return cr(e.$validator)?H5({},e):{$validator:e}}function qx(e){return typeof e=="object"?e.$valid:e}function Xx(e){return e.$validator||e}function s11(e,t){if(!Oi(e))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);if(!Oi(t)&&!cr(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=ac(t);return a.$params=H5(H5({},a.$params||{}),e),a}function o11(e,t){if(!cr(e)&&typeof o.unref(e)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof e}`);if(!Oi(t)&&!cr(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=ac(t);return a.$message=e,a}function l11(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const a=ac(e);return H5(H5({},a),{},{$async:!0,$watchTargets:t})}function f11(e){return{$validator(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),c=1;c<a;c++)r[c-1]=arguments[c];return o.unref(t).reduce((n,i,s)=>{const l=Object.entries(i).reduce((f,u)=>{let[h,d]=u;const m=e[h]||{},p=Object.entries(m).reduce((v,g)=>{let[x,z]=g;const b=Xx(z).call(this,d,i,s,...r),H=qx(b);if(v.$data[x]=b,v.$data.$invalid=!H||!!v.$data.$invalid,v.$data.$error=v.$data.$invalid,!H){let V=z.$message||"";const y=z.$params||{};typeof V=="function"&&(V=V({$pending:!1,$invalid:!H,$params:y,$model:d,$response:b})),v.$errors.push({$property:h,$message:V,$params:y,$response:b,$model:d,$pending:!1,$validator:x})}return{$valid:v.$valid&&H,$data:v.$data,$errors:v.$errors}},{$valid:!0,$data:{},$errors:[]});return f.$data[h]=p.$data,f.$errors[h]=p.$errors,{$valid:f.$valid&&p.$valid,$data:f.$data,$errors:f.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:n.$valid&&l.$valid,$data:n.$data.concat(l.$data),$errors:n.$errors.concat(l.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:t=>{let{$response:a}=t;return a?a.$errors.map(r=>Object.values(r).map(c=>c.map(n=>n.$message)).reduce((c,n)=>c.concat(n),[])):[]}}}const ta=e=>{if(e=o.unref(e),Array.isArray(e))return!!e.length;if(e==null)return!1;if(e===!1)return!0;if(e instanceof Date)return!isNaN(e.getTime());if(typeof e=="object"){for(let t in e)return!0;return!1}return!!String(e).length},j9=e=>(e=o.unref(e),Array.isArray(e)?e.length:typeof e=="object"?Object.keys(e).length:String(e).length);function e6(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return r=>(r=o.unref(r),!ta(r)||t.every(c=>(c.lastIndex=0,c.test(r))))}var V5=Object.freeze({__proto__:null,forEach:f11,len:j9,normalizeValidatorObject:ac,regex:e6,req:ta,unwrap:o.unref,unwrapNormalizedValidator:Xx,unwrapValidatorResponse:qx,withAsync:l11,withMessage:o11,withParams:s11});e6(/^[a-zA-Z]*$/);e6(/^[a-zA-Z0-9]*$/);e6(/^\d*(\.\d+)?$/);const u11=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;e6(u11);function h11(e){return t=>!ta(t)||j9(t)<=o.unref(e)}function d11(e){return{$validator:h11(e),$message:t=>{let{$params:a}=t;return`The maximum length allowed is ${a.max}`},$params:{max:e,type:"maxLength"}}}function m11(e){return t=>!ta(t)||j9(t)>=o.unref(e)}function p11(e){return{$validator:m11(e),$message:t=>{let{$params:a}=t;return`This field should be at least ${a.min} characters long`},$params:{min:e,type:"minLength"}}}function v11(e){return typeof e=="string"&&(e=e.trim()),ta(e)}var g11={$validator:v11,$message:"Value is required",$params:{type:"required"}};const x11=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;e6(x11);var C11=e6(/(^[0-9]*$)|(^-[0-9]+$)/),z11={$validator:C11,$message:"Value is not an integer",$params:{type:"integer"}};e6(/^[-]?\d*(\.\d+)?$/);const rc=I2("validations"),Ri=V5.withMessage(()=>rc("requiredRuleError"),g11),Ii=e=>Zx("minLength",e),$i=e=>Zx("maxLength",e),M11=V5.withMessage(()=>rc("integerRuleError"),z11),y11=e=>cc("lessEqual",e),b11=e=>cc("greaterEqual",e),H11=e=>cc("lessThan",e),V11=e=>cc("greaterThan",e);function Zx(e,t){const a={minLength:p11,maxLength:d11};return V5.withMessage(()=>rc(`${e}RuleError`,{length:t}),a[e](t))}function cc(e,t){const a={lessEqual:r=>r<=t,greaterEqual:r=>r>=t,lessThan:r=>r<t,greaterThan:r=>r>t};return V5.withMessage(()=>rc(`${e}RuleError`,{number:t}),V5.withParams({},r=>typeof r!="number"?!0:a[e](r)))}const w11=o.defineComponent({__name:"PgaInputRightButton",props:{icon:{},withBackground:{type:Boolean}},setup(e){o.useCssVars(a=>({f1ad62f8:o.unref(t).input.height,26636360:o.unref(t).input.iconWidth,c485010a:o.unref(t).input.borderRadius,"137001a0":o.unref(t).input.backgroundColorFocus,"138c7604":o.unref(t).input.backgroundColorHover}));const{form:t}=s3.storeToRefs(h3());return(a,r)=>(o.openBlock(),o.createBlock(o3,{class:o.normalizeClass(["input-right-button",{"input-right-button__with-background":a.withBackground}]),variant:"flat",icon:a.icon,tabindex:"-1"},null,8,["class","icon"]))}});const nr=R1(w11,[["__scopeId","data-v-0b343b81"]]),_11={class:"input-container"},k11={class:"input-content"},L11=["type","placeholder","autofocus","disabled"],Mn="",S11=o.defineComponent({__name:"PgaInput",props:o.mergeModels({type:{default:"text"},integer:{type:Boolean},placeholder:{},label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},autofocus:{type:Boolean},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["change","enter","valueCleared"],["update:modelValue"]),setup(e,{expose:t,emit:a}){o.useCssVars(V=>({b5591abe:o.unref(i).input.height,b59cec52:o.unref(i).input.padding,"8062fd46":o.unref(i).input.borderColor,"52d159d8":o.unref(i).input.borderRadius,d96bc2ca:o.unref(i).input.backgroundColor,"05f5efaf":o.unref(i).input.colorFocus,f0881b92:o.unref(i).input.backgroundColorDisabled,56569554:o.unref(i).input.paddingWithIcon,"2db6faaa":o.unref(i).input.placeholderColor}));const r=o.useModel(e,"modelValue"),c=e,n=a;t({focus:p});const{form:i}=s3.storeToRefs(h3()),s=o.ref(),l=o.ref(Mn),f=o.ref(!1),u=o.computed(()=>{if(c.placeholder)return A0(c.placeholder)}),h=o.computed(()=>c.type==="password"),d=o.computed(()=>h.value?!1:!!(!c.disabled&&l.value)),m=o.computed(()=>!!(h.value||d.value));o.watch(r,V=>b(V),{immediate:!0});function p(){var V;(V=s.value)==null||V.focus()}function v(){c.type==="number"&&!l.value&&(l.value=Mn)}function g(){c.type==="number"&&!l.value&&(l.value=C())}function x(){H(Mn),n("valueCleared")}function z(V){return V===""?null:c.type==="number"&&c.integer&&typeof V=="number"?Math.round(V):V}function C(V){const y=typeof V>"u"?r.value:V;return y===null?"":y}function b(V){const y=z(V);return r.value=y,l.value=C(y),y}function H(V){const y=b(V);n("change",y)}return(V,y)=>(o.openBlock(),o.createBlock(o0,{label:V.label,withOptionalLabel:V.withOptionalLabel,withLabelSpace:V.withLabelSpace,errors:V.errors,grow:V.grow},{default:o.withCtx(()=>[o.createElementVNode("div",_11,[o.createElementVNode("div",k11,[o.withDirectives(o.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":y[0]||(y[0]=A=>l.value=A),class:o.normalizeClass(["input",{input__disabled:V.disabled,"input__with-btn":m.value}]),type:f.value?"text":V.type,placeholder:u.value,autofocus:V.autofocus,disabled:V.disabled,onInput:y[1]||(y[1]=A=>H(l.value)),onKeyup:y[2]||(y[2]=o.withKeys(A=>n("enter"),["enter"])),onFocus:y[3]||(y[3]=A=>v()),onBlur:y[4]||(y[4]=A=>g())},null,42,L11),[[o.vModelDynamic,l.value]]),h.value?(o.openBlock(),o.createBlock(nr,{key:0,icon:f.value?"eye-slash":"eye",withBackground:"",onClick:y[5]||(y[5]=A=>f.value=!f.value)},null,8,["icon"])):d.value?(o.openBlock(),o.createBlock(nr,{key:1,icon:"xmark",onClick:y[6]||(y[6]=A=>x())})):o.createCommentVNode("",!0)]),o.renderSlot(V.$slots,"labelRight",{},void 0,!0)])]),_:3},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const ir=R1(S11,[["__scopeId","data-v-67603bb6"]]),A11={class:"login-form-container"},T11={class:"user-icon-container"},N11=o.defineComponent({__name:"PgaLoginForm",setup(e){class t{constructor(){o1(this,"username","");o1(this,"password","")}}const a=X2.getConfig(),r=Zt.useRoute(),c=I2("pgaLoginForm"),n={username:{requiredRule:Ri,minLengthRule:Ii(8),maxLengthRule:$i(a.stringLengths.short)},password:{requiredRule:Ri,minLengthRule:Ii(8),maxLengthRule:$i(a.stringLengths.short)}},i=o.ref(new t),s=n11(n,i),l=o.ref(!1);async function f(){if(!await s.value.$validate())return;const u={isLoadingRef:l,redirectToName:r.query.redirectTo};ym(k4().currentRouteType,i.value,u)}return(u,h)=>(o.openBlock(),o.createElementBlock("div",A11,[o.createVNode(Ux,{class:"login-form"},{default:o.withCtx(()=>[o.createElementVNode("div",T11,[o.createVNode(S3,{class:"user-icon",icon:"user"})]),o.createVNode(ir,{modelValue:i.value.username,"onUpdate:modelValue":h[0]||(h[0]=d=>i.value.username=d),label:o.unref(c)("usernameLabel"),errors:o.unref(s).username.$errors,disabled:l.value},null,8,["modelValue","label","errors","disabled"]),o.createVNode(ir,{modelValue:i.value.password,"onUpdate:modelValue":h[1]||(h[1]=d=>i.value.password=d),type:"password",label:o.unref(c)("passwordLabel"),errors:o.unref(s).password.$errors,disabled:l.value},null,8,["modelValue","label","errors","disabled"]),o.createVNode(o3,{type:"submit",icon:"right-to-bracket",text:o.unref(c)("loginBtn"),isLoading:l.value,onClick:h[2]||(h[2]=d=>f())},null,8,["text","isLoading"])]),_:1})]))}});const E11=R1(N11,[["__scopeId","data-v-579ff9e9"]]),P11={class:"pga-checkbox"},F11=["textContent"],D11=o.defineComponent({__name:"PgaCheckbox",props:o.mergeModels({label:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue");return(a,r)=>(o.openBlock(),o.createElementBlock("label",P11,[o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=c=>t.value=c),type:"checkbox"},null,512),[[o.vModelCheckbox,t.value]]),a.label?(o.openBlock(),o.createElementBlock("span",{key:0,class:"checkbox--label",textContent:o.toDisplayString(a.label)},null,8,F11)):o.createCommentVNode("",!0)]))}});const B11=R1(D11,[["__scopeId","data-v-89f11c66"]]),O11={class:"colors-container"},R11=o.defineComponent({__name:"PgaColorSelector",props:o.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(r=>({"808c2cde":o.unref(a).input.padding,c96717d2:o.unref(a).input.borderColor,"31dc8344":o.unref(a).input.borderRadius}));const t=o.useModel(e,"modelValue"),{form:a}=s3.storeToRefs(h3());return(r,c)=>(o.openBlock(),o.createBlock(o0,{label:r.label,withOptionalLabel:r.withOptionalLabel,withLabelSpace:r.withLabelSpace,errors:r.errors,grow:r.grow},{default:o.withCtx(()=>[o.createElementVNode("div",O11,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(Vm),n=>(o.openBlock(),o.createBlock(o3,{key:n,variant:t.value===n?"outlined":"flat",color:t.value===n?"primary":"first",disabled:r.disabled,onClick:i=>t.value=n},{default:o.withCtx(()=>[o.createVNode(kv,{color:n},null,8,["color"])]),_:2},1032,["variant","color","disabled","onClick"]))),128))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const I11=R1(R11,[["__scopeId","data-v-95ed7400"]]),$11={class:"icons-container"},U11=o.defineComponent({__name:"PgaIconSelector",props:o.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(c=>({"7f398b94":o.unref(a).input.padding,"6e555c9a":o.unref(a).input.borderColor,"7525e63b":o.unref(a).input.borderRadius}));const t=o.useModel(e,"modelValue"),{form:a}=s3.storeToRefs(h3()),r=["star","heart","envelope","plus","minus","pen","edit","check","trash","file","clipboard","bell","calendar","clock","money-check-dollar","gift","percent","magnifying-glass-dollar","house","car","store","gamepad","mobile","school","shirt","user-doctor","face-smile","face-frown-open","cog","lock","bug","camera","code","headphones","wifi","user","search","home","arrow-right-arrow-left","circle"];return(c,n)=>(o.openBlock(),o.createBlock(o0,{label:c.label,withOptionalLabel:c.withOptionalLabel,withLabelSpace:c.withLabelSpace,errors:c.errors,grow:c.grow},{default:o.withCtx(()=>[o.createElementVNode("div",$11,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(r,i=>o.createVNode(o3,{key:i,icon:i,variant:t.value===i?"outlined":"flat",color:t.value===i?"primary":"grey",width:"2.5rem",disabled:c.disabled,onClick:s=>t.value=i},null,8,["icon","variant","color","disabled","onClick"])),64))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const W11=R1(U11,[["__scopeId","data-v-f73462c0"]]),Y11={class:"input-file"},j11=["accept","disabled"],G11={class:"input-file--name-container"},q11=["textContent"],X11=o.defineComponent({__name:"PgaInputFile",props:{label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},acceptedFormats:{default:"*"},errors:{},disabled:{type:Boolean},grow:{}},emits:["newFile"],setup(e,{expose:t,emit:a}){o.useCssVars(z=>({"3b3c31fc":o.unref(n).input.borderColor,faaaae5a:o.unref(n).input.borderRadius,"668fac80":o.unref(n).input.backgroundColor,ae727148:o.unref(n).input.backgroundColorHover,"5c59ef48":o.unref(n).input.backgroundColorDisabled}));const r=e,c=a;t({click:p,resetInput:v});const{form:n}=s3.storeToRefs(h3()),i=I2("pgaInputFile"),s=o.ref(),l=o.ref(),f=o.ref(!1),u=o.ref(!1),h=o.computed(()=>r.acceptedFormats==="*"?"*":r.acceptedFormats.map(z=>`.${z}`).join(",")),d=o.computed(()=>f.value&&!u.value&&!r.disabled||!l.value?{icon:"upload"}:x(l.value)?{icon:"circle-check",color:"success"}:{icon:"circle-xmark",color:"danger"}),m=o.computed(()=>l.value?l.value.name:i("selectFileLabel"));function p(){var z;(z=s.value)==null||z.click()}function v(){l.value=null,s.value&&(s.value.value="")}function g(z){f.value=!1;const b=z.target.files[0];b&&(l.value=b,x(b)?c("newFile",b):N0("danger",()=>i("newFileError")))}function x(z){if(!z)return!1;if(r.acceptedFormats==="*")return!0;const C=z.name.split(".").pop();return!!r.acceptedFormats.includes(C)}return(z,C)=>(o.openBlock(),o.createBlock(o0,{label:z.label,withOptionalLabel:z.withOptionalLabel,withLabelSpace:z.withLabelSpace,errors:z.errors,grow:z.grow},{default:o.withCtx(()=>[o.createElementVNode("div",Y11,[o.createElementVNode("input",{ref_key:"inputRef",ref:s,id:"input-file",class:"input-file--input",type:"file",accept:h.value,disabled:z.disabled,onChange:C[0]||(C[0]=b=>g(b))},null,40,j11),o.createElementVNode("label",{for:"input-file",class:o.normalizeClass(["input-file--custom-input",{"input-file--custom-input__disabled":z.disabled}]),onMouseenter:C[4]||(C[4]=b=>f.value=!0),onMouseleave:C[5]||(C[5]=b=>f.value=!1)},[o.createVNode(S3,{class:"input-file--icon",icon:d.value.icon,color:d.value.color},null,8,["icon","color"]),o.createElementVNode("div",G11,[o.createElementVNode("span",{class:"input-file--name",textContent:o.toDisplayString(m.value)},null,8,q11)]),l.value?(o.openBlock(),o.createBlock(o3,{key:0,text:o.unref(i)("removeBtn"),variant:"flat",color:"danger",size:"s",disabled:z.disabled,onMouseenter:C[1]||(C[1]=b=>u.value=!0),onMouseleave:C[2]||(C[2]=b=>u.value=!1),onClick:C[3]||(C[3]=o.withModifiers(b=>v(),["prevent"]))},null,8,["text","disabled"])):o.createCommentVNode("",!0)],34)])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const G9=R1(X11,[["__scopeId","data-v-e44cd93c"]]);/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var Qx=1252,Z11=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],q9={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},X9=function(e){Z11.indexOf(e)!=-1&&(Qx=q9[0]=e)};function Q11(){X9(1252)}var U4=function(e){X9(e)};function Kx(){U4(1200),Q11()}function Jh(e){for(var t=[],a=0,r=e.length;a<r;++a)t[a]=e.charCodeAt(a);return t}function K11(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a)+(e.charCodeAt(2*a+1)<<8));return t.join("")}function Jx(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a+1)+(e.charCodeAt(2*a)<<8));return t.join("")}var Mt=function(e){var t=e.charCodeAt(0),a=e.charCodeAt(1);return t==255&&a==254?K11(e.slice(2)):t==254&&a==255?Jx(e.slice(2)):t==65279?e.slice(1):e},Ga=function(t){return String.fromCharCode(t)},ed=function(t){return String.fromCharCode(t)},C0,k0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function td(e){for(var t="",a=0,r=0,c=0,n=0,i=0,s=0,l=0,f=0;f<e.length;)a=e.charCodeAt(f++),n=a>>2,r=e.charCodeAt(f++),i=(a&3)<<4|r>>4,c=e.charCodeAt(f++),s=(r&15)<<2|c>>6,l=c&63,isNaN(r)?s=l=64:isNaN(c)&&(l=64),t+=k0.charAt(n)+k0.charAt(i)+k0.charAt(s)+k0.charAt(l);return t}function g4(e){var t="",a=0,r=0,c=0,n=0,i=0,s=0,l=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var f=0;f<e.length;)n=k0.indexOf(e.charAt(f++)),i=k0.indexOf(e.charAt(f++)),a=n<<2|i>>4,t+=String.fromCharCode(a),s=k0.indexOf(e.charAt(f++)),r=(i&15)<<4|s>>2,s!==64&&(t+=String.fromCharCode(r)),l=k0.indexOf(e.charAt(f++)),c=(s&3)<<6|l,l!==64&&(t+=String.fromCharCode(c));return t}var c2=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),q6=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,a){return a?new Buffer(t,a):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}}();function q0(e){return c2?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function ad(e){return c2?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var O4=function(t){return c2?q6(t,"binary"):t.split("").map(function(a){return a.charCodeAt(0)&255})};function X6(e){if(Array.isArray(e))return e.map(function(r){return String.fromCharCode(r)}).join("");for(var t=[],a=0;a<e.length;++a)t[a]=String.fromCharCode(e[a]);return t.join("")}function Z9(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return Z9(new Uint8Array(e));for(var t=new Array(e.length),a=0;a<e.length;++a)t[a]=e[a];return t}var z0=c2?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:q6(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,a=0;for(t=0;t<e.length;++t)a+=e[t].length;var r=new Uint8Array(a),c=0;for(t=0,a=0;t<e.length;a+=c,++t)if(c=e[t].length,e[t]instanceof Uint8Array)r.set(e[t],a);else{if(typeof e[t]=="string")throw"wtf";r.set(new Uint8Array(e[t]),a)}return r}return[].concat.apply([],e.map(function(n){return Array.isArray(n)?n:[].slice.call(n)}))};function J11(e){for(var t=[],a=0,r=e.length+250,c=q0(e.length+255),n=0;n<e.length;++n){var i=e.charCodeAt(n);if(i<128)c[a++]=i;else if(i<2048)c[a++]=192|i>>6&31,c[a++]=128|i&63;else if(i>=55296&&i<57344){i=(i&1023)+64;var s=e.charCodeAt(++n)&1023;c[a++]=240|i>>8&7,c[a++]=128|i>>2&63,c[a++]=128|s>>6&15|(i&3)<<4,c[a++]=128|s&63}else c[a++]=224|i>>12&15,c[a++]=128|i>>6&63,c[a++]=128|i&63;a>r&&(t.push(c.slice(0,a)),a=0,c=q0(65535),r=65530)}return t.push(c.slice(0,a)),z0(t)}var e4=/\u0000/g,yt=/[\u0001-\u0006]/g;function y8(e){for(var t="",a=e.length-1;a>=0;)t+=e.charAt(a--);return t}function W4(e,t){var a=""+e;return a.length>=t?a:j2("0",t-a.length)+a}function Q9(e,t){var a=""+e;return a.length>=t?a:j2(" ",t-a.length)+a}function sr(e,t){var a=""+e;return a.length>=t?a:a+j2(" ",t-a.length)}function e21(e,t){var a=""+Math.round(e);return a.length>=t?a:j2("0",t-a.length)+a}function t21(e,t){var a=""+e;return a.length>=t?a:j2("0",t-a.length)+a}var rd=Math.pow(2,32);function i8(e,t){if(e>rd||e<-rd)return e21(e,t);var a=Math.round(e);return t21(a,t)}function or(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var cd=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],yn=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function a21(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var j1={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},nd={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},r21={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function lr(e,t,a){for(var r=e<0?-1:1,c=e*r,n=0,i=1,s=0,l=1,f=0,u=0,h=Math.floor(c);f<t&&(h=Math.floor(c),s=h*i+n,u=h*f+l,!(c-h<5e-8));)c=1/(c-h),n=i,i=s,l=f,f=u;if(u>t&&(f>t?(u=l,s=n):(u=f,s=i)),!a)return[0,r*s,u];var d=Math.floor(r*s/u);return[d,r*s-d*u,u]}function M6(e,t,a){if(e>2958465||e<0)return null;var r=e|0,c=Math.floor(86400*(e-r)),n=0,i=[],s={D:r,T:c,u:86400*(e-r)-c,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(s.u)<1e-6&&(s.u=0),t&&t.date1904&&(r+=1462),s.u>.9999&&(s.u=0,++c==86400&&(s.T=c=0,++r,++s.D)),r===60)i=a?[1317,10,29]:[1900,2,29],n=3;else if(r===0)i=a?[1317,8,29]:[1900,1,0],n=6;else{r>60&&--r;var l=new Date(1900,0,1);l.setDate(l.getDate()+r-1),i=[l.getFullYear(),l.getMonth()+1,l.getDate()],n=l.getDay(),r<60&&(n=(n+6)%7),a&&(n=l21(l,i))}return s.y=i[0],s.m=i[1],s.d=i[2],s.S=c%60,c=Math.floor(c/60),s.M=c%60,c=Math.floor(c/60),s.H=c,s.q=n,s}var eC=new Date(1899,11,31,0,0,0),c21=eC.getTime(),n21=new Date(1900,2,1,0,0,0);function tC(e,t){var a=e.getTime();return t?a-=1461*24*60*60*1e3:e>=n21&&(a+=24*60*60*1e3),(a-(c21+(e.getTimezoneOffset()-eC.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function K9(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function i21(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function s21(e){var t=e<0?12:11,a=K9(e.toFixed(12));return a.length<=t||(a=e.toPrecision(10),a.length<=t)?a:e.toExponential(5)}function o21(e){var t=K9(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function w5(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),a;return t>=-4&&t<=-1?a=e.toPrecision(10+t):Math.abs(t)<=9?a=s21(e):t===10?a=e.toFixed(10).substr(0,12):a=o21(e),K9(i21(a.toUpperCase()))}function D6(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):w5(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return _4(14,tC(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function l21(e,t){t[0]-=581;var a=e.getDay();return e<60&&(a=(a+6)%7),a}function f21(e,t,a,r){var c="",n=0,i=0,s=a.y,l,f=0;switch(e){case 98:s=a.y+543;case 121:switch(t.length){case 1:case 2:l=s%100,f=2;break;default:l=s%1e4,f=4;break}break;case 109:switch(t.length){case 1:case 2:l=a.m,f=t.length;break;case 3:return yn[a.m-1][1];case 5:return yn[a.m-1][0];default:return yn[a.m-1][2]}break;case 100:switch(t.length){case 1:case 2:l=a.d,f=t.length;break;case 3:return cd[a.q][0];default:return cd[a.q][1]}break;case 104:switch(t.length){case 1:case 2:l=1+(a.H+11)%12,f=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:l=a.H,f=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:l=a.M,f=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return a.u===0&&(t=="s"||t=="ss")?W4(a.S,t.length):(r>=2?i=r===3?1e3:100:i=r===1?10:1,n=Math.round(i*(a.S+a.u)),n>=60*i&&(n=0),t==="s"?n===0?"0":""+n/i:(c=W4(n,2+r),t==="ss"?c.substr(0,2):"."+c.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":l=a.D*24+a.H;break;case"[m]":case"[mm]":l=(a.D*24+a.H)*60+a.M;break;case"[s]":case"[ss]":l=((a.D*24+a.H)*60+a.M)*60+Math.round(a.S+a.u);break;default:throw"bad abstime format: "+t}f=t.length===3?1:2;break;case 101:l=s,f=1;break}var u=f>0?W4(l,f):"";return u}function L0(e){var t=3;if(e.length<=t)return e;for(var a=e.length%t,r=e.substr(0,a);a!=e.length;a+=t)r+=(r.length>0?",":"")+e.substr(a,t);return r}var aC=/%/g;function u21(e,t,a){var r=t.replace(aC,""),c=t.length-r.length;return Qe(e,r,a*Math.pow(10,2*c))+j2("%",c)}function h21(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return Qe(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function rC(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+rC(e,-t);var c=e.indexOf(".");c===-1&&(c=e.indexOf("E"));var n=Math.floor(Math.log(t)*Math.LOG10E)%c;if(n<0&&(n+=c),a=(t/Math.pow(10,n)).toPrecision(r+1+(c+n)%c),a.indexOf("e")===-1){var i=Math.floor(Math.log(t)*Math.LOG10E);for(a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(i-a.length+n):a+="E+"+(i-n);a.substr(0,2)==="0.";)a=a.charAt(0)+a.substr(2,c)+"."+a.substr(2+c),a=a.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(c+n)%c)+"."+u.substr(n)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}var cC=/# (\?+)( ?)\/( ?)(\d+)/;function d21(e,t,a){var r=parseInt(e[4],10),c=Math.round(t*r),n=Math.floor(c/r),i=c-n*r,s=r;return a+(n===0?"":""+n)+" "+(i===0?j2(" ",e[1].length+1+e[4].length):Q9(i,e[1].length)+e[2]+"/"+e[3]+W4(s,e[4].length))}function m21(e,t,a){return a+(t===0?"":""+t)+j2(" ",e[1].length+2+e[4].length)}var nC=/^#*0*\.([0#]+)/,iC=/\).*[0#]/,sC=/\(###\) ###\\?-####/;function Z3(e){for(var t="",a,r=0;r!=e.length;++r)switch(a=e.charCodeAt(r)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(a)}return t}function id(e,t){var a=Math.pow(10,t);return""+Math.round(e*a)/a}function sd(e,t){var a=e-Math.floor(e),r=Math.pow(10,t);return t<(""+Math.round(a*r)).length?0:Math.round(a*r)}function p21(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function v21(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function b4(e,t,a){if(e.charCodeAt(0)===40&&!t.match(iC)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?b4("n",r,a):"("+b4("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return h21(e,t,a);if(t.indexOf("%")!==-1)return u21(e,t,a);if(t.indexOf("E")!==-1)return rC(t,a);if(t.charCodeAt(0)===36)return"$"+b4(e,t.substr(t.charAt(1)==" "?2:1),a);var c,n,i,s,l=Math.abs(a),f=a<0?"-":"";if(t.match(/^00+$/))return f+i8(l,t.length);if(t.match(/^[#?]+$/))return c=i8(a,0),c==="0"&&(c=""),c.length>t.length?c:Z3(t.substr(0,t.length-c.length))+c;if(n=t.match(cC))return d21(n,l,f);if(t.match(/^#+0+$/))return f+i8(l,t.length-t.indexOf("0"));if(n=t.match(nC))return c=id(a,n[1].length).replace(/^([^\.]+)$/,"$1."+Z3(n[1])).replace(/\.$/,"."+Z3(n[1])).replace(/\.(\d*)$/,function(p,v){return"."+v+j2("0",Z3(n[1]).length-v.length)}),t.indexOf("0.")!==-1?c:c.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),n=t.match(/^(0*)\.(#*)$/))return f+id(l,n[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,n[1].length?"0.":".");if(n=t.match(/^#{1,3},##0(\.?)$/))return f+L0(i8(l,0));if(n=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+b4(e,t,-a):L0(""+(Math.floor(a)+p21(a,n[1].length)))+"."+W4(sd(a,n[1].length),n[1].length);if(n=t.match(/^#,#*,#0/))return b4(e,t.replace(/^#,#*,/,""),a);if(n=t.match(/^([0#]+)(\\?-([0#]+))+$/))return c=y8(b4(e,t.replace(/[\\-]/g,""),a)),i=0,y8(y8(t.replace(/\\/g,"")).replace(/[0#]/g,function(p){return i<c.length?c.charAt(i++):p==="0"?"0":""}));if(t.match(sC))return c=b4(e,"##########",a),"("+c.substr(0,3)+") "+c.substr(3,3)+"-"+c.substr(6);var u="";if(n=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(n[4].length,7),s=lr(l,Math.pow(10,i)-1,!1),c=""+f,u=Qe("n",n[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),c+=u+n[2]+"/"+n[3],u=sr(s[2],i),u.length<n[4].length&&(u=Z3(n[4].substr(n[4].length-u.length))+u),c+=u,c;if(n=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(n[1].length,n[4].length),7),s=lr(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Q9(s[1],i)+n[2]+"/"+n[3]+sr(s[2],i):j2(" ",2*i+1+n[2].length+n[3].length));if(n=t.match(/^[#0?]+$/))return c=i8(a,0),t.length<=c.length?c:Z3(t.substr(0,t.length-c.length))+c;if(n=t.match(/^([#0?]+)\.([#0]+)$/)){c=""+a.toFixed(Math.min(n[2].length,10)).replace(/([^0])0+$/,"$1"),i=c.indexOf(".");var h=t.indexOf(".")-i,d=t.length-c.length-h;return Z3(t.substr(0,h)+c+t.substr(t.length-d))}if(n=t.match(/^00,000\.([#0]*0)$/))return i=sd(a,n[1].length),a<0?"-"+b4(e,t,-a):L0(v21(a)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?W4(0,3-p.length):"")+p})+"."+W4(i,n[1].length);switch(t){case"###,##0.00":return b4(e,"#,##0.00",a);case"###,###":case"##,###":case"#,###":var m=L0(i8(l,0));return m!=="0"?f+m:"";case"###,###.00":return b4(e,"###,##0.00",a).replace(/^0\./,".");case"#,###.00":return b4(e,"#,##0.00",a).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function g21(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return Qe(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function x21(e,t,a){var r=t.replace(aC,""),c=t.length-r.length;return Qe(e,r,a*Math.pow(10,2*c))+j2("%",c)}function oC(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+oC(e,-t);var c=e.indexOf(".");c===-1&&(c=e.indexOf("E"));var n=Math.floor(Math.log(t)*Math.LOG10E)%c;if(n<0&&(n+=c),a=(t/Math.pow(10,n)).toPrecision(r+1+(c+n)%c),!a.match(/[Ee]/)){var i=Math.floor(Math.log(t)*Math.LOG10E);a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(i-a.length+n):a+="E+"+(i-n),a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(c+n)%c)+"."+u.substr(n)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}function ue(e,t,a){if(e.charCodeAt(0)===40&&!t.match(iC)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?ue("n",r,a):"("+ue("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return g21(e,t,a);if(t.indexOf("%")!==-1)return x21(e,t,a);if(t.indexOf("E")!==-1)return oC(t,a);if(t.charCodeAt(0)===36)return"$"+ue(e,t.substr(t.charAt(1)==" "?2:1),a);var c,n,i,s,l=Math.abs(a),f=a<0?"-":"";if(t.match(/^00+$/))return f+W4(l,t.length);if(t.match(/^[#?]+$/))return c=""+a,a===0&&(c=""),c.length>t.length?c:Z3(t.substr(0,t.length-c.length))+c;if(n=t.match(cC))return m21(n,l,f);if(t.match(/^#+0+$/))return f+W4(l,t.length-t.indexOf("0"));if(n=t.match(nC))return c=(""+a).replace(/^([^\.]+)$/,"$1."+Z3(n[1])).replace(/\.$/,"."+Z3(n[1])),c=c.replace(/\.(\d*)$/,function(p,v){return"."+v+j2("0",Z3(n[1]).length-v.length)}),t.indexOf("0.")!==-1?c:c.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),n=t.match(/^(0*)\.(#*)$/))return f+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,n[1].length?"0.":".");if(n=t.match(/^#{1,3},##0(\.?)$/))return f+L0(""+l);if(n=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+ue(e,t,-a):L0(""+a)+"."+j2("0",n[1].length);if(n=t.match(/^#,#*,#0/))return ue(e,t.replace(/^#,#*,/,""),a);if(n=t.match(/^([0#]+)(\\?-([0#]+))+$/))return c=y8(ue(e,t.replace(/[\\-]/g,""),a)),i=0,y8(y8(t.replace(/\\/g,"")).replace(/[0#]/g,function(p){return i<c.length?c.charAt(i++):p==="0"?"0":""}));if(t.match(sC))return c=ue(e,"##########",a),"("+c.substr(0,3)+") "+c.substr(3,3)+"-"+c.substr(6);var u="";if(n=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(n[4].length,7),s=lr(l,Math.pow(10,i)-1,!1),c=""+f,u=Qe("n",n[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),c+=u+n[2]+"/"+n[3],u=sr(s[2],i),u.length<n[4].length&&(u=Z3(n[4].substr(n[4].length-u.length))+u),c+=u,c;if(n=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(n[1].length,n[4].length),7),s=lr(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Q9(s[1],i)+n[2]+"/"+n[3]+sr(s[2],i):j2(" ",2*i+1+n[2].length+n[3].length));if(n=t.match(/^[#0?]+$/))return c=""+a,t.length<=c.length?c:Z3(t.substr(0,t.length-c.length))+c;if(n=t.match(/^([#0]+)\.([#0]+)$/)){c=""+a.toFixed(Math.min(n[2].length,10)).replace(/([^0])0+$/,"$1"),i=c.indexOf(".");var h=t.indexOf(".")-i,d=t.length-c.length-h;return Z3(t.substr(0,h)+c+t.substr(t.length-d))}if(n=t.match(/^00,000\.([#0]*0)$/))return a<0?"-"+ue(e,t,-a):L0(""+a).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?W4(0,3-p.length):"")+p})+"."+W4(0,n[1].length);switch(t){case"###,###":case"##,###":case"#,###":var m=L0(""+l);return m!=="0"?f+m:"";default:if(t.match(/\.[0#?]*$/))return ue(e,t.slice(0,t.lastIndexOf(".")),a)+Z3(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function Qe(e,t,a){return(a|0)===a?ue(e,t,a):b4(e,t,a)}function C21(e){for(var t=[],a=!1,r=0,c=0;r<e.length;++r)switch(e.charCodeAt(r)){case 34:a=!a;break;case 95:case 42:case 92:++r;break;case 59:t[t.length]=e.substr(c,r-c),c=r+1}if(t[t.length]=e.substr(c),a===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var lC=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function j8(e){for(var t=0,a="",r="";t<e.length;)switch(a=e.charAt(t)){case"G":or(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="上午/下午")return!0;++t;break;case"[":for(r=a;e.charAt(t++)!=="]"&&t<e.length;)r+=e.charAt(t);if(r.match(lC))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(a=e.charAt(++t))>-1||a=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===a;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function z21(e,t,a,r){for(var c=[],n="",i=0,s="",l="t",f,u,h,d="H";i<e.length;)switch(s=e.charAt(i)){case"G":if(!or(e,i))throw new Error("unrecognized character "+s+" in "+e);c[c.length]={t:"G",v:"General"},i+=7;break;case'"':for(n="";(h=e.charCodeAt(++i))!==34&&i<e.length;)n+=String.fromCharCode(h);c[c.length]={t:"t",v:n},++i;break;case"\\":var m=e.charAt(++i),p=m==="("||m===")"?m:"t";c[c.length]={t:p,v:m},++i;break;case"_":c[c.length]={t:"t",v:" "},i+=2;break;case"@":c[c.length]={t:"T",v:t},++i;break;case"B":case"b":if(e.charAt(i+1)==="1"||e.charAt(i+1)==="2"){if(f==null&&(f=M6(t,a,e.charAt(i+1)==="2"),f==null))return"";c[c.length]={t:"X",v:e.substr(i,2)},l=s,i+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":s=s.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||f==null&&(f=M6(t,a),f==null))return"";for(n=s;++i<e.length&&e.charAt(i).toLowerCase()===s;)n+=s;s==="m"&&l.toLowerCase()==="h"&&(s="M"),s==="h"&&(s=d),c[c.length]={t:s,v:n},l=s;break;case"A":case"a":case"上":var v={t:s,v:s};if(f==null&&(f=M6(t,a)),e.substr(i,3).toUpperCase()==="A/P"?(f!=null&&(v.v=f.H>=12?"P":"A"),v.t="T",d="h",i+=3):e.substr(i,5).toUpperCase()==="AM/PM"?(f!=null&&(v.v=f.H>=12?"PM":"AM"),v.t="T",i+=5,d="h"):e.substr(i,5).toUpperCase()==="上午/下午"?(f!=null&&(v.v=f.H>=12?"下午":"上午"),v.t="T",i+=5,d="h"):(v.t="t",++i),f==null&&v.t==="T")return"";c[c.length]=v,l=s;break;case"[":for(n=s;e.charAt(i++)!=="]"&&i<e.length;)n+=e.charAt(i);if(n.slice(-1)!=="]")throw'unterminated "[" block: |'+n+"|";if(n.match(lC)){if(f==null&&(f=M6(t,a),f==null))return"";c[c.length]={t:"Z",v:n.toLowerCase()},l=n.charAt(1)}else n.indexOf("$")>-1&&(n=(n.match(/\$([^-\[\]]*)/)||[])[1]||"$",j8(e)||(c[c.length]={t:"t",v:n}));break;case".":if(f!=null){for(n=s;++i<e.length&&(s=e.charAt(i))==="0";)n+=s;c[c.length]={t:"s",v:n};break}case"0":case"#":for(n=s;++i<e.length&&"0#?.,E+-%".indexOf(s=e.charAt(i))>-1;)n+=s;c[c.length]={t:"n",v:n};break;case"?":for(n=s;e.charAt(++i)===s;)n+=s;c[c.length]={t:s,v:n},l=s;break;case"*":++i,(e.charAt(i)==" "||e.charAt(i)=="*")&&++i;break;case"(":case")":c[c.length]={t:r===1?"t":s,v:s},++i;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(n=s;i<e.length&&"0123456789".indexOf(e.charAt(++i))>-1;)n+=e.charAt(i);c[c.length]={t:"D",v:n};break;case" ":c[c.length]={t:s,v:s},++i;break;case"$":c[c.length]={t:"t",v:"$"},++i;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(s)===-1)throw new Error("unrecognized character "+s+" in "+e);c[c.length]={t:"t",v:s},++i;break}var g=0,x=0,z;for(i=c.length-1,l="t";i>=0;--i)switch(c[i].t){case"h":case"H":c[i].t=d,l="h",g<1&&(g=1);break;case"s":(z=c[i].v.match(/\.0+$/))&&(x=Math.max(x,z[0].length-1)),g<3&&(g=3);case"d":case"y":case"M":case"e":l=c[i].t;break;case"m":l==="s"&&(c[i].t="M",g<2&&(g=2));break;case"X":break;case"Z":g<1&&c[i].v.match(/[Hh]/)&&(g=1),g<2&&c[i].v.match(/[Mm]/)&&(g=2),g<3&&c[i].v.match(/[Ss]/)&&(g=3)}switch(g){case 0:break;case 1:f.u>=.5&&(f.u=0,++f.S),f.S>=60&&(f.S=0,++f.M),f.M>=60&&(f.M=0,++f.H);break;case 2:f.u>=.5&&(f.u=0,++f.S),f.S>=60&&(f.S=0,++f.M);break}var C="",b;for(i=0;i<c.length;++i)switch(c[i].t){case"t":case"T":case" ":case"D":break;case"X":c[i].v="",c[i].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":c[i].v=f21(c[i].t.charCodeAt(0),c[i].v,f,x),c[i].t="t";break;case"n":case"?":for(b=i+1;c[b]!=null&&((s=c[b].t)==="?"||s==="D"||(s===" "||s==="t")&&c[b+1]!=null&&(c[b+1].t==="?"||c[b+1].t==="t"&&c[b+1].v==="/")||c[i].t==="("&&(s===" "||s==="n"||s===")")||s==="t"&&(c[b].v==="/"||c[b].v===" "&&c[b+1]!=null&&c[b+1].t=="?"));)c[i].v+=c[b].v,c[b]={v:"",t:";"},++b;C+=c[i].v,i=b-1;break;case"G":c[i].t="t",c[i].v=D6(t,a);break}var H="",V,y;if(C.length>0){C.charCodeAt(0)==40?(V=t<0&&C.charCodeAt(0)===45?-t:t,y=Qe("n",C,V)):(V=t<0&&r>1?-t:t,y=Qe("n",C,V),V<0&&c[0]&&c[0].t=="t"&&(y=y.substr(1),c[0].v="-"+c[0].v)),b=y.length-1;var A=c.length;for(i=0;i<c.length;++i)if(c[i]!=null&&c[i].t!="t"&&c[i].v.indexOf(".")>-1){A=i;break}var E=c.length;if(A===c.length&&y.indexOf("E")===-1){for(i=c.length-1;i>=0;--i)c[i]==null||"n?".indexOf(c[i].t)===-1||(b>=c[i].v.length-1?(b-=c[i].v.length,c[i].v=y.substr(b+1,c[i].v.length)):b<0?c[i].v="":(c[i].v=y.substr(0,b+1),b=-1),c[i].t="t",E=i);b>=0&&E<c.length&&(c[E].v=y.substr(0,b+1)+c[E].v)}else if(A!==c.length&&y.indexOf("E")===-1){for(b=y.indexOf(".")-1,i=A;i>=0;--i)if(!(c[i]==null||"n?".indexOf(c[i].t)===-1)){for(u=c[i].v.indexOf(".")>-1&&i===A?c[i].v.indexOf(".")-1:c[i].v.length-1,H=c[i].v.substr(u+1);u>=0;--u)b>=0&&(c[i].v.charAt(u)==="0"||c[i].v.charAt(u)==="#")&&(H=y.charAt(b--)+H);c[i].v=H,c[i].t="t",E=i}for(b>=0&&E<c.length&&(c[E].v=y.substr(0,b+1)+c[E].v),b=y.indexOf(".")+1,i=A;i<c.length;++i)if(!(c[i]==null||"n?(".indexOf(c[i].t)===-1&&i!==A)){for(u=c[i].v.indexOf(".")>-1&&i===A?c[i].v.indexOf(".")+1:0,H=c[i].v.substr(0,u);u<c[i].v.length;++u)b<y.length&&(H+=y.charAt(b++));c[i].v=H,c[i].t="t",E=i}}}for(i=0;i<c.length;++i)c[i]!=null&&"n?".indexOf(c[i].t)>-1&&(V=r>1&&t<0&&i>0&&c[i-1].v==="-"?-t:t,c[i].v=Qe(c[i].t,c[i].v,V),c[i].t="t");var Y="";for(i=0;i!==c.length;++i)c[i]!=null&&(Y+=c[i].v);return Y}var od=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function ld(e,t){if(t==null)return!1;var a=parseFloat(t[2]);switch(t[1]){case"=":if(e==a)return!0;break;case">":if(e>a)return!0;break;case"<":if(e<a)return!0;break;case"<>":if(e!=a)return!0;break;case">=":if(e>=a)return!0;break;case"<=":if(e<=a)return!0;break}return!1}function M21(e,t){var a=C21(e),r=a.length,c=a[r-1].indexOf("@");if(r<4&&c>-1&&--r,a.length>4)throw new Error("cannot find right format for |"+a.join("|")+"|");if(typeof t!="number")return[4,a.length===4||c>-1?a[a.length-1]:"@"];switch(a.length){case 1:a=c>-1?["General","General","General",a[0]]:[a[0],a[0],a[0],"@"];break;case 2:a=c>-1?[a[0],a[0],a[0],a[1]]:[a[0],a[1],a[0],"@"];break;case 3:a=c>-1?[a[0],a[1],a[0],a[2]]:[a[0],a[1],a[2],"@"];break}var n=t>0?a[0]:t<0?a[1]:a[2];if(a[0].indexOf("[")===-1&&a[1].indexOf("[")===-1)return[r,n];if(a[0].match(/\[[=<>]/)!=null||a[1].match(/\[[=<>]/)!=null){var i=a[0].match(od),s=a[1].match(od);return ld(t,i)?[r,a[0]]:ld(t,s)?[r,a[1]]:[r,a[i!=null&&s!=null?2:1]]}return[r,n]}function _4(e,t,a){a==null&&(a={});var r="";switch(typeof e){case"string":e=="m/d/yy"&&a.dateNF?r=a.dateNF:r=e;break;case"number":e==14&&a.dateNF?r=a.dateNF:r=(a.table!=null?a.table:j1)[e],r==null&&(r=a.table&&a.table[nd[e]]||j1[nd[e]]),r==null&&(r=r21[e]||"General");break}if(or(r,0))return D6(t,a);t instanceof Date&&(t=tC(t,a.date1904));var c=M21(r,t);if(or(c[1]))return D6(t,a);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return z21(c[1],t,a,c[0])}function k6(e,t){if(typeof t!="number"){t=+t||-1;for(var a=0;a<392;++a){if(j1[a]==null){t<0&&(t=a);continue}if(j1[a]==e){t=a;break}}t<0&&(t=391)}return j1[t]=e,t}function fC(){j1=a21()}var y21={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},uC=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function b21(e){var t=typeof e=="number"?j1[e]:e;return t=t.replace(uC,"(\\d+)"),new RegExp("^"+t+"$")}function H21(e,t,a){var r=-1,c=-1,n=-1,i=-1,s=-1,l=-1;(t.match(uC)||[]).forEach(function(h,d){var m=parseInt(a[d+1],10);switch(h.toLowerCase().charAt(0)){case"y":r=m;break;case"d":n=m;break;case"h":i=m;break;case"s":l=m;break;case"m":i>=0?s=m:c=m;break}}),l>=0&&s==-1&&c>=0&&(s=c,c=-1);var f=(""+(r>=0?r:new Date().getFullYear())).slice(-4)+"-"+("00"+(c>=1?c:1)).slice(-2)+"-"+("00"+(n>=1?n:1)).slice(-2);f.length==7&&(f="0"+f),f.length==8&&(f="20"+f);var u=("00"+(i>=0?i:0)).slice(-2)+":"+("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2);return i==-1&&s==-1&&l==-1?f:r==-1&&c==-1&&n==-1?u:f+"T"+u}var V21=function(){var e={};e.version="1.2.0";function t(){for(var y=0,A=new Array(256),E=0;E!=256;++E)y=E,y=y&1?-306674912^y>>>1:y>>>1,y=y&1?-306674912^y>>>1:y>>>1,y=y&1?-306674912^y>>>1:y>>>1,y=y&1?-306674912^y>>>1:y>>>1,y=y&1?-306674912^y>>>1:y>>>1,y=y&1?-306674912^y>>>1:y>>>1,y=y&1?-306674912^y>>>1:y>>>1,y=y&1?-306674912^y>>>1:y>>>1,A[E]=y;return typeof Int32Array<"u"?new Int32Array(A):A}var a=t();function r(y){var A=0,E=0,Y=0,F=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(Y=0;Y!=256;++Y)F[Y]=y[Y];for(Y=0;Y!=256;++Y)for(E=y[Y],A=256+Y;A<4096;A+=256)E=F[A]=E>>>8^y[E&255];var L=[];for(Y=1;Y!=16;++Y)L[Y-1]=typeof Int32Array<"u"?F.subarray(Y*256,Y*256+256):F.slice(Y*256,Y*256+256);return L}var c=r(a),n=c[0],i=c[1],s=c[2],l=c[3],f=c[4],u=c[5],h=c[6],d=c[7],m=c[8],p=c[9],v=c[10],g=c[11],x=c[12],z=c[13],C=c[14];function b(y,A){for(var E=A^-1,Y=0,F=y.length;Y<F;)E=E>>>8^a[(E^y.charCodeAt(Y++))&255];return~E}function H(y,A){for(var E=A^-1,Y=y.length-15,F=0;F<Y;)E=C[y[F++]^E&255]^z[y[F++]^E>>8&255]^x[y[F++]^E>>16&255]^g[y[F++]^E>>>24]^v[y[F++]]^p[y[F++]]^m[y[F++]]^d[y[F++]]^h[y[F++]]^u[y[F++]]^f[y[F++]]^l[y[F++]]^s[y[F++]]^i[y[F++]]^n[y[F++]]^a[y[F++]];for(Y+=15;F<Y;)E=E>>>8^a[(E^y[F++])&255];return~E}function V(y,A){for(var E=A^-1,Y=0,F=y.length,L=0,j=0;Y<F;)L=y.charCodeAt(Y++),L<128?E=E>>>8^a[(E^L)&255]:L<2048?(E=E>>>8^a[(E^(192|L>>6&31))&255],E=E>>>8^a[(E^(128|L&63))&255]):L>=55296&&L<57344?(L=(L&1023)+64,j=y.charCodeAt(Y++)&1023,E=E>>>8^a[(E^(240|L>>8&7))&255],E=E>>>8^a[(E^(128|L>>2&63))&255],E=E>>>8^a[(E^(128|j>>6&15|(L&3)<<4))&255],E=E>>>8^a[(E^(128|j&63))&255]):(E=E>>>8^a[(E^(224|L>>12&15))&255],E=E>>>8^a[(E^(128|L>>6&63))&255],E=E>>>8^a[(E^(128|L&63))&255]);return~E}return e.table=a,e.bstr=b,e.buf=H,e.str=V,e}(),i2=function(){var t={};t.version="1.2.1";function a(T,q){for(var R=T.split("/"),U=q.split("/"),Z=0,Q=0,u1=Math.min(R.length,U.length);Z<u1;++Z){if(Q=R[Z].length-U[Z].length)return Q;if(R[Z]!=U[Z])return R[Z]<U[Z]?-1:1}return R.length-U.length}function r(T){if(T.charAt(T.length-1)=="/")return T.slice(0,-1).indexOf("/")===-1?T:r(T.slice(0,-1));var q=T.lastIndexOf("/");return q===-1?T:T.slice(0,q+1)}function c(T){if(T.charAt(T.length-1)=="/")return c(T.slice(0,-1));var q=T.lastIndexOf("/");return q===-1?T:T.slice(q+1)}function n(T,q){typeof q=="string"&&(q=new Date(q));var R=q.getHours();R=R<<6|q.getMinutes(),R=R<<5|q.getSeconds()>>>1,T.write_shift(2,R);var U=q.getFullYear()-1980;U=U<<4|q.getMonth()+1,U=U<<5|q.getDate(),T.write_shift(2,U)}function i(T){var q=T.read_shift(2)&65535,R=T.read_shift(2)&65535,U=new Date,Z=R&31;R>>>=5;var Q=R&15;R>>>=4,U.setMilliseconds(0),U.setFullYear(R+1980),U.setMonth(Q-1),U.setDate(Z);var u1=q&31;q>>>=5;var d1=q&63;return q>>>=6,U.setHours(q),U.setMinutes(d1),U.setSeconds(u1<<1),U}function s(T){A3(T,0);for(var q={},R=0;T.l<=T.length-4;){var U=T.read_shift(2),Z=T.read_shift(2),Q=T.l+Z,u1={};switch(U){case 21589:R=T.read_shift(1),R&1&&(u1.mtime=T.read_shift(4)),Z>5&&(R&2&&(u1.atime=T.read_shift(4)),R&4&&(u1.ctime=T.read_shift(4))),u1.mtime&&(u1.mt=new Date(u1.mtime*1e3));break}T.l=Q,q[U]=u1}return q}var l;function f(){return l||(l={})}function u(T,q){if(T[0]==80&&T[1]==75)return K1(T,q);if((T[0]|32)==109&&(T[1]|32)==105)return Q8(T,q);if(T.length<512)throw new Error("CFB file size "+T.length+" < 512");var R=3,U=512,Z=0,Q=0,u1=0,d1=0,M=0,_=[],N=T.slice(0,512);A3(N,0);var W=h(N);switch(R=W[0],R){case 3:U=512;break;case 4:U=4096;break;case 0:if(W[1]==0)return K1(T,q);default:throw new Error("Major Version: Expected 3 or 4 saw "+R)}U!==512&&(N=T.slice(0,U),A3(N,28));var J=T.slice(0,U);d(N,R);var a1=N.read_shift(4,"i");if(R===3&&a1!==0)throw new Error("# Directory Sectors: Expected 0 saw "+a1);N.l+=4,u1=N.read_shift(4,"i"),N.l+=4,N.chk("00100000","Mini Stream Cutoff Size: "),d1=N.read_shift(4,"i"),Z=N.read_shift(4,"i"),M=N.read_shift(4,"i"),Q=N.read_shift(4,"i");for(var e1=-1,m1=0;m1<109&&(e1=N.read_shift(4,"i"),!(e1<0));++m1)_[m1]=e1;var b1=m(T,U);g(M,Q,b1,U,_);var w1=z(b1,u1,_,U);w1[u1].name="!Directory",Z>0&&d1!==j&&(w1[d1].name="!MiniFAT"),w1[_[0]].name="!FAT",w1.fat_addrs=_,w1.ssz=U;var x1={},F1=[],P1=[],Q1=[];C(u1,w1,b1,F1,Z,x1,P1,d1),p(P1,Q1,F1),F1.shift();var E1={FileIndex:P1,FullPaths:Q1};return q&&q.raw&&(E1.raw={header:J,sectors:b1}),E1}function h(T){if(T[T.l]==80&&T[T.l+1]==75)return[0,0];T.chk(r1,"Header Signature: "),T.l+=16;var q=T.read_shift(2,"u");return[T.read_shift(2,"u"),q]}function d(T,q){var R=9;switch(T.l+=2,R=T.read_shift(2)){case 9:if(q!=3)throw new Error("Sector Shift: Expected 9 saw "+R);break;case 12:if(q!=4)throw new Error("Sector Shift: Expected 12 saw "+R);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+R)}T.chk("0600","Mini Sector Shift: "),T.chk("000000000000","Reserved: ")}function m(T,q){for(var R=Math.ceil(T.length/q)-1,U=[],Z=1;Z<R;++Z)U[Z-1]=T.slice(Z*q,(Z+1)*q);return U[R-1]=T.slice(R*q),U}function p(T,q,R){for(var U=0,Z=0,Q=0,u1=0,d1=0,M=R.length,_=[],N=[];U<M;++U)_[U]=N[U]=U,q[U]=R[U];for(;d1<N.length;++d1)U=N[d1],Z=T[U].L,Q=T[U].R,u1=T[U].C,_[U]===U&&(Z!==-1&&_[Z]!==Z&&(_[U]=_[Z]),Q!==-1&&_[Q]!==Q&&(_[U]=_[Q])),u1!==-1&&(_[u1]=U),Z!==-1&&U!=_[U]&&(_[Z]=_[U],N.lastIndexOf(Z)<d1&&N.push(Z)),Q!==-1&&U!=_[U]&&(_[Q]=_[U],N.lastIndexOf(Q)<d1&&N.push(Q));for(U=1;U<M;++U)_[U]===U&&(Q!==-1&&_[Q]!==Q?_[U]=_[Q]:Z!==-1&&_[Z]!==Z&&(_[U]=_[Z]));for(U=1;U<M;++U)if(T[U].type!==0){if(d1=U,d1!=_[d1])do d1=_[d1],q[U]=q[d1]+"/"+q[U];while(d1!==0&&_[d1]!==-1&&d1!=_[d1]);_[U]=-1}for(q[0]+="/",U=1;U<M;++U)T[U].type!==2&&(q[U]+="/")}function v(T,q,R){for(var U=T.start,Z=T.size,Q=[],u1=U;R&&Z>0&&u1>=0;)Q.push(q.slice(u1*L,u1*L+L)),Z-=L,u1=p6(R,u1*4);return Q.length===0?g3(0):z0(Q).slice(0,T.size)}function g(T,q,R,U,Z){var Q=j;if(T===j){if(q!==0)throw new Error("DIFAT chain shorter than expected")}else if(T!==-1){var u1=R[T],d1=(U>>>2)-1;if(!u1)return;for(var M=0;M<d1&&(Q=p6(u1,M*4))!==j;++M)Z.push(Q);g(p6(u1,U-4),q-1,R,U,Z)}}function x(T,q,R,U,Z){var Q=[],u1=[];Z||(Z=[]);var d1=U-1,M=0,_=0;for(M=q;M>=0;){Z[M]=!0,Q[Q.length]=M,u1.push(T[M]);var N=R[Math.floor(M*4/U)];if(_=M*4&d1,U<4+_)throw new Error("FAT boundary crossed: "+M+" 4 "+U);if(!T[N])break;M=p6(T[N],_)}return{nodes:Q,data:Cd([u1])}}function z(T,q,R,U){var Z=T.length,Q=[],u1=[],d1=[],M=[],_=U-1,N=0,W=0,J=0,a1=0;for(N=0;N<Z;++N)if(d1=[],J=N+q,J>=Z&&(J-=Z),!u1[J]){M=[];var e1=[];for(W=J;W>=0;){e1[W]=!0,u1[W]=!0,d1[d1.length]=W,M.push(T[W]);var m1=R[Math.floor(W*4/U)];if(a1=W*4&_,U<4+a1)throw new Error("FAT boundary crossed: "+W+" 4 "+U);if(!T[m1]||(W=p6(T[m1],a1),e1[W]))break}Q[J]={nodes:d1,data:Cd([M])}}return Q}function C(T,q,R,U,Z,Q,u1,d1){for(var M=0,_=U.length?2:0,N=q[T].data,W=0,J=0,a1;W<N.length;W+=128){var e1=N.slice(W,W+128);A3(e1,64),J=e1.read_shift(2),a1=ro(e1,0,J-_),U.push(a1);var m1={name:a1,type:e1.read_shift(1),color:e1.read_shift(1),L:e1.read_shift(4,"i"),R:e1.read_shift(4,"i"),C:e1.read_shift(4,"i"),clsid:e1.read_shift(16),state:e1.read_shift(4,"i"),start:0,size:0},b1=e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2);b1!==0&&(m1.ct=b(e1,e1.l-8));var w1=e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2)+e1.read_shift(2);w1!==0&&(m1.mt=b(e1,e1.l-8)),m1.start=e1.read_shift(4,"i"),m1.size=e1.read_shift(4,"i"),m1.size<0&&m1.start<0&&(m1.size=m1.type=0,m1.start=j,m1.name=""),m1.type===5?(M=m1.start,Z>0&&M!==j&&(q[M].name="!StreamData")):m1.size>=4096?(m1.storage="fat",q[m1.start]===void 0&&(q[m1.start]=x(R,m1.start,q.fat_addrs,q.ssz)),q[m1.start].name=m1.name,m1.content=q[m1.start].data.slice(0,m1.size)):(m1.storage="minifat",m1.size<0?m1.size=0:M!==j&&m1.start!==j&&q[M]&&(m1.content=v(m1,q[M].data,(q[d1]||{}).data))),m1.content&&A3(m1.content,0),Q[a1]=m1,u1.push(m1)}}function b(T,q){return new Date((h4(T,q+4)/1e7*Math.pow(2,32)+h4(T,q)/1e7-11644473600)*1e3)}function H(T,q){return f(),u(l.readFileSync(T),q)}function V(T,q){var R=q&&q.type;switch(R||c2&&Buffer.isBuffer(T)&&(R="buffer"),R||"base64"){case"file":return H(T,q);case"base64":return u(O4(g4(T)),q);case"binary":return u(O4(T),q)}return u(T,q)}function y(T,q){var R=q||{},U=R.root||"Root Entry";if(T.FullPaths||(T.FullPaths=[]),T.FileIndex||(T.FileIndex=[]),T.FullPaths.length!==T.FileIndex.length)throw new Error("inconsistent CFB structure");T.FullPaths.length===0&&(T.FullPaths[0]=U+"/",T.FileIndex[0]={name:U,type:5}),R.CLSID&&(T.FileIndex[0].clsid=R.CLSID),A(T)}function A(T){var q="Sh33tJ5";if(!i2.find(T,"/"+q)){var R=g3(4);R[0]=55,R[1]=R[3]=50,R[2]=54,T.FileIndex.push({name:q,type:2,content:R,size:4,L:69,R:69,C:69}),T.FullPaths.push(T.FullPaths[0]+q),E(T)}}function E(T,q){y(T);for(var R=!1,U=!1,Z=T.FullPaths.length-1;Z>=0;--Z){var Q=T.FileIndex[Z];switch(Q.type){case 0:U?R=!0:(T.FileIndex.pop(),T.FullPaths.pop());break;case 1:case 2:case 5:U=!0,isNaN(Q.R*Q.L*Q.C)&&(R=!0),Q.R>-1&&Q.L>-1&&Q.R==Q.L&&(R=!0);break;default:R=!0;break}}if(!(!R&&!q)){var u1=new Date(1987,1,19),d1=0,M=Object.create?Object.create(null):{},_=[];for(Z=0;Z<T.FullPaths.length;++Z)M[T.FullPaths[Z]]=!0,T.FileIndex[Z].type!==0&&_.push([T.FullPaths[Z],T.FileIndex[Z]]);for(Z=0;Z<_.length;++Z){var N=r(_[Z][0]);U=M[N],U||(_.push([N,{name:c(N).replace("/",""),type:1,clsid:O,ct:u1,mt:u1,content:null}]),M[N]=!0)}for(_.sort(function(a1,e1){return a(a1[0],e1[0])}),T.FullPaths=[],T.FileIndex=[],Z=0;Z<_.length;++Z)T.FullPaths[Z]=_[Z][0],T.FileIndex[Z]=_[Z][1];for(Z=0;Z<_.length;++Z){var W=T.FileIndex[Z],J=T.FullPaths[Z];if(W.name=c(J).replace("/",""),W.L=W.R=W.C=-(W.color=1),W.size=W.content?W.content.length:0,W.start=0,W.clsid=W.clsid||O,Z===0)W.C=_.length>1?1:-1,W.size=0,W.type=5;else if(J.slice(-1)=="/"){for(d1=Z+1;d1<_.length&&r(T.FullPaths[d1])!=J;++d1);for(W.C=d1>=_.length?-1:d1,d1=Z+1;d1<_.length&&r(T.FullPaths[d1])!=r(J);++d1);W.R=d1>=_.length?-1:d1,W.type=1}else r(T.FullPaths[Z+1]||"")==r(J)&&(W.R=Z+1),W.type=2}}}function Y(T,q){var R=q||{};if(R.fileType=="mad")return ma(T,R);switch(E(T),R.fileType){case"zip":return o4(T,R)}var U=function(a1){for(var e1=0,m1=0,b1=0;b1<a1.FileIndex.length;++b1){var w1=a1.FileIndex[b1];if(w1.content){var x1=w1.content.length;x1>0&&(x1<4096?e1+=x1+63>>6:m1+=x1+511>>9)}}for(var F1=a1.FullPaths.length+3>>2,P1=e1+7>>3,Q1=e1+127>>7,E1=P1+m1+F1+Q1,J1=E1+127>>7,H2=J1<=109?0:Math.ceil((J1-109)/127);E1+J1+H2+127>>7>J1;)H2=++J1<=109?0:Math.ceil((J1-109)/127);var J2=[1,H2,J1,Q1,F1,m1,e1,0];return a1.FileIndex[0].size=e1<<6,J2[7]=(a1.FileIndex[0].start=J2[0]+J2[1]+J2[2]+J2[3]+J2[4]+J2[5])+(J2[6]+7>>3),J2}(T),Z=g3(U[7]<<9),Q=0,u1=0;{for(Q=0;Q<8;++Q)Z.write_shift(1,P[Q]);for(Q=0;Q<8;++Q)Z.write_shift(2,0);for(Z.write_shift(2,62),Z.write_shift(2,3),Z.write_shift(2,65534),Z.write_shift(2,9),Z.write_shift(2,6),Q=0;Q<3;++Q)Z.write_shift(2,0);for(Z.write_shift(4,0),Z.write_shift(4,U[2]),Z.write_shift(4,U[0]+U[1]+U[2]+U[3]-1),Z.write_shift(4,0),Z.write_shift(4,4096),Z.write_shift(4,U[3]?U[0]+U[1]+U[2]-1:j),Z.write_shift(4,U[3]),Z.write_shift(-4,U[1]?U[0]-1:j),Z.write_shift(4,U[1]),Q=0;Q<109;++Q)Z.write_shift(-4,Q<U[2]?U[1]+Q:-1)}if(U[1])for(u1=0;u1<U[1];++u1){for(;Q<236+u1*127;++Q)Z.write_shift(-4,Q<U[2]?U[1]+Q:-1);Z.write_shift(-4,u1===U[1]-1?j:u1+1)}var d1=function(a1){for(u1+=a1;Q<u1-1;++Q)Z.write_shift(-4,Q+1);a1&&(++Q,Z.write_shift(-4,j))};for(u1=Q=0,u1+=U[1];Q<u1;++Q)Z.write_shift(-4,X.DIFSECT);for(u1+=U[2];Q<u1;++Q)Z.write_shift(-4,X.FATSECT);d1(U[3]),d1(U[4]);for(var M=0,_=0,N=T.FileIndex[0];M<T.FileIndex.length;++M)N=T.FileIndex[M],N.content&&(_=N.content.length,!(_<4096)&&(N.start=u1,d1(_+511>>9)));for(d1(U[6]+7>>3);Z.l&511;)Z.write_shift(-4,X.ENDOFCHAIN);for(u1=Q=0,M=0;M<T.FileIndex.length;++M)N=T.FileIndex[M],N.content&&(_=N.content.length,!(!_||_>=4096)&&(N.start=u1,d1(_+63>>6)));for(;Z.l&511;)Z.write_shift(-4,X.ENDOFCHAIN);for(Q=0;Q<U[4]<<2;++Q){var W=T.FullPaths[Q];if(!W||W.length===0){for(M=0;M<17;++M)Z.write_shift(4,0);for(M=0;M<3;++M)Z.write_shift(4,-1);for(M=0;M<12;++M)Z.write_shift(4,0);continue}N=T.FileIndex[Q],Q===0&&(N.start=N.size?N.start-1:j);var J=Q===0&&R.root||N.name;if(_=2*(J.length+1),Z.write_shift(64,J,"utf16le"),Z.write_shift(2,_),Z.write_shift(1,N.type),Z.write_shift(1,N.color),Z.write_shift(-4,N.L),Z.write_shift(-4,N.R),Z.write_shift(-4,N.C),N.clsid)Z.write_shift(16,N.clsid,"hex");else for(M=0;M<4;++M)Z.write_shift(4,0);Z.write_shift(4,N.state||0),Z.write_shift(4,0),Z.write_shift(4,0),Z.write_shift(4,0),Z.write_shift(4,0),Z.write_shift(4,N.start),Z.write_shift(4,N.size),Z.write_shift(4,0)}for(Q=1;Q<T.FileIndex.length;++Q)if(N=T.FileIndex[Q],N.size>=4096)if(Z.l=N.start+1<<9,c2&&Buffer.isBuffer(N.content))N.content.copy(Z,Z.l,0,N.size),Z.l+=N.size+511&-512;else{for(M=0;M<N.size;++M)Z.write_shift(1,N.content[M]);for(;M&511;++M)Z.write_shift(1,0)}for(Q=1;Q<T.FileIndex.length;++Q)if(N=T.FileIndex[Q],N.size>0&&N.size<4096)if(c2&&Buffer.isBuffer(N.content))N.content.copy(Z,Z.l,0,N.size),Z.l+=N.size+63&-64;else{for(M=0;M<N.size;++M)Z.write_shift(1,N.content[M]);for(;M&63;++M)Z.write_shift(1,0)}if(c2)Z.l=Z.length;else for(;Z.l<Z.length;)Z.write_shift(1,0);return Z}function F(T,q){var R=T.FullPaths.map(function(M){return M.toUpperCase()}),U=R.map(function(M){var _=M.split("/");return _[_.length-(M.slice(-1)=="/"?2:1)]}),Z=!1;q.charCodeAt(0)===47?(Z=!0,q=R[0].slice(0,-1)+q):Z=q.indexOf("/")!==-1;var Q=q.toUpperCase(),u1=Z===!0?R.indexOf(Q):U.indexOf(Q);if(u1!==-1)return T.FileIndex[u1];var d1=!Q.match(yt);for(Q=Q.replace(e4,""),d1&&(Q=Q.replace(yt,"!")),u1=0;u1<R.length;++u1)if((d1?R[u1].replace(yt,"!"):R[u1]).replace(e4,"")==Q||(d1?U[u1].replace(yt,"!"):U[u1]).replace(e4,"")==Q)return T.FileIndex[u1];return null}var L=64,j=-2,r1="d0cf11e0a1b11ae1",P=[208,207,17,224,161,177,26,225],O="00000000000000000000000000000000",X={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:j,FREESECT:-1,HEADER_SIGNATURE:r1,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:O,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function f1(T,q,R){f();var U=Y(T,R);l.writeFileSync(q,U)}function K(T){for(var q=new Array(T.length),R=0;R<T.length;++R)q[R]=String.fromCharCode(T[R]);return q.join("")}function v1(T,q){var R=Y(T,q);switch(q&&q.type||"buffer"){case"file":return f(),l.writeFileSync(q.filename,R),R;case"binary":return typeof R=="string"?R:K(R);case"base64":return td(typeof R=="string"?R:K(R));case"buffer":if(c2)return Buffer.isBuffer(R)?R:q6(R);case"array":return typeof R=="string"?O4(R):R}return R}var c1;function S(T){try{var q=T.InflateRaw,R=new q;if(R._processChunk(new Uint8Array([3,0]),R._finishFlushFlag),R.bytesRead)c1=T;else throw new Error("zlib does not expose bytesRead")}catch(U){console.error("cannot use native zlib: "+(U.message||U))}}function k(T,q){if(!c1)return y1(T,q);var R=c1.InflateRaw,U=new R,Z=U._processChunk(T.slice(T.l),U._finishFlushFlag);return T.l+=U.bytesRead,Z}function D(T){return c1?c1.deflateRawSync(T):U1(T)}var G=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],B=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],I=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function p1(T){var q=(T<<1|T<<11)&139536|(T<<5|T<<15)&558144;return(q>>16|q>>8|q)&255}for(var M1=typeof Uint8Array<"u",n1=M1?new Uint8Array(256):[],C1=0;C1<256;++C1)n1[C1]=p1(C1);function w(T,q){var R=n1[T&255];return q<=8?R>>>8-q:(R=R<<8|n1[T>>8&255],q<=16?R>>>16-q:(R=R<<8|n1[T>>16&255],R>>>24-q))}function z1(T,q){var R=q&7,U=q>>>3;return(T[U]|(R<=6?0:T[U+1]<<8))>>>R&3}function V1(T,q){var R=q&7,U=q>>>3;return(T[U]|(R<=5?0:T[U+1]<<8))>>>R&7}function h1(T,q){var R=q&7,U=q>>>3;return(T[U]|(R<=4?0:T[U+1]<<8))>>>R&15}function t1(T,q){var R=q&7,U=q>>>3;return(T[U]|(R<=3?0:T[U+1]<<8))>>>R&31}function i1(T,q){var R=q&7,U=q>>>3;return(T[U]|(R<=1?0:T[U+1]<<8))>>>R&127}function A1(T,q,R){var U=q&7,Z=q>>>3,Q=(1<<R)-1,u1=T[Z]>>>U;return R<8-U||(u1|=T[Z+1]<<8-U,R<16-U)||(u1|=T[Z+2]<<16-U,R<24-U)||(u1|=T[Z+3]<<24-U),u1&Q}function W1(T,q,R){var U=q&7,Z=q>>>3;return U<=5?T[Z]|=(R&7)<<U:(T[Z]|=R<<U&255,T[Z+1]=(R&7)>>8-U),q+3}function $1(T,q,R){var U=q&7,Z=q>>>3;return R=(R&1)<<U,T[Z]|=R,q+1}function L1(T,q,R){var U=q&7,Z=q>>>3;return R<<=U,T[Z]|=R&255,R>>>=8,T[Z+1]=R,q+8}function H3(T,q,R){var U=q&7,Z=q>>>3;return R<<=U,T[Z]|=R&255,R>>>=8,T[Z+1]=R&255,T[Z+2]=R>>>8,q+16}function B2(T,q){var R=T.length,U=2*R>q?2*R:q+5,Z=0;if(R>=q)return T;if(c2){var Q=ad(U);if(T.copy)T.copy(Q);else for(;Z<T.length;++Z)Q[Z]=T[Z];return Q}else if(M1){var u1=new Uint8Array(U);if(u1.set)u1.set(T);else for(;Z<R;++Z)u1[Z]=T[Z];return u1}return T.length=U,T}function m3(T){for(var q=new Array(T),R=0;R<T;++R)q[R]=0;return q}function V3(T,q,R){var U=1,Z=0,Q=0,u1=0,d1=0,M=T.length,_=M1?new Uint16Array(32):m3(32);for(Q=0;Q<32;++Q)_[Q]=0;for(Q=M;Q<R;++Q)T[Q]=0;M=T.length;var N=M1?new Uint16Array(M):m3(M);for(Q=0;Q<M;++Q)_[Z=T[Q]]++,U<Z&&(U=Z),N[Q]=0;for(_[0]=0,Q=1;Q<=U;++Q)_[Q+16]=d1=d1+_[Q-1]<<1;for(Q=0;Q<M;++Q)d1=T[Q],d1!=0&&(N[Q]=_[d1+16]++);var W=0;for(Q=0;Q<M;++Q)if(W=T[Q],W!=0)for(d1=w(N[Q],U)>>U-W,u1=(1<<U+4-W)-1;u1>=0;--u1)q[d1|u1<<W]=W&15|Q<<4;return U}var E2=M1?new Uint16Array(512):m3(512),U2=M1?new Uint16Array(32):m3(32);if(!M1){for(var W2=0;W2<512;++W2)E2[W2]=0;for(W2=0;W2<32;++W2)U2[W2]=0}(function(){for(var T=[],q=0;q<32;q++)T.push(5);V3(T,U2,32);var R=[];for(q=0;q<=143;q++)R.push(8);for(;q<=255;q++)R.push(9);for(;q<=279;q++)R.push(7);for(;q<=287;q++)R.push(8);V3(R,E2,288)})();var p3=function(){for(var q=M1?new Uint8Array(32768):[],R=0,U=0;R<I.length-1;++R)for(;U<I[R+1];++U)q[U]=R;for(;U<32768;++U)q[U]=29;var Z=M1?new Uint8Array(259):[];for(R=0,U=0;R<B.length-1;++R)for(;U<B[R+1];++U)Z[U]=R;function Q(d1,M){for(var _=0;_<d1.length;){var N=Math.min(65535,d1.length-_),W=_+N==d1.length;for(M.write_shift(1,+W),M.write_shift(2,N),M.write_shift(2,~N&65535);N-- >0;)M[M.l++]=d1[_++]}return M.l}function u1(d1,M){for(var _=0,N=0,W=M1?new Uint16Array(32768):[];N<d1.length;){var J=Math.min(65535,d1.length-N);if(J<10){for(_=W1(M,_,+(N+J==d1.length)),_&7&&(_+=8-(_&7)),M.l=_/8|0,M.write_shift(2,J),M.write_shift(2,~J&65535);J-- >0;)M[M.l++]=d1[N++];_=M.l*8;continue}_=W1(M,_,+(N+J==d1.length)+2);for(var a1=0;J-- >0;){var e1=d1[N];a1=(a1<<5^e1)&32767;var m1=-1,b1=0;if((m1=W[a1])&&(m1|=N&-32768,m1>N&&(m1-=32768),m1<N))for(;d1[m1+b1]==d1[N+b1]&&b1<250;)++b1;if(b1>2){e1=Z[b1],e1<=22?_=L1(M,_,n1[e1+1]>>1)-1:(L1(M,_,3),_+=5,L1(M,_,n1[e1-23]>>5),_+=3);var w1=e1<8?0:e1-4>>2;w1>0&&(H3(M,_,b1-B[e1]),_+=w1),e1=q[N-m1],_=L1(M,_,n1[e1]>>3),_-=3;var x1=e1<4?0:e1-2>>1;x1>0&&(H3(M,_,N-m1-I[e1]),_+=x1);for(var F1=0;F1<b1;++F1)W[a1]=N&32767,a1=(a1<<5^d1[N])&32767,++N;J-=b1-1}else e1<=143?e1=e1+48:_=$1(M,_,1),_=L1(M,_,n1[e1]),W[a1]=N&32767,++N}_=L1(M,_,0)-1}return M.l=(_+7)/8|0,M.l}return function(M,_){return M.length<8?Q(M,_):u1(M,_)}}();function U1(T){var q=g3(50+Math.floor(T.length*1.1)),R=p3(T,q);return q.slice(0,R)}var C2=M1?new Uint16Array(32768):m3(32768),v3=M1?new Uint16Array(32768):m3(32768),p2=M1?new Uint16Array(128):m3(128),E3=1,ne=1;function l1(T,q){var R=t1(T,q)+257;q+=5;var U=t1(T,q)+1;q+=5;var Z=h1(T,q)+4;q+=4;for(var Q=0,u1=M1?new Uint8Array(19):m3(19),d1=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=1,_=M1?new Uint8Array(8):m3(8),N=M1?new Uint8Array(8):m3(8),W=u1.length,J=0;J<Z;++J)u1[G[J]]=Q=V1(T,q),M<Q&&(M=Q),_[Q]++,q+=3;var a1=0;for(_[0]=0,J=1;J<=M;++J)N[J]=a1=a1+_[J-1]<<1;for(J=0;J<W;++J)(a1=u1[J])!=0&&(d1[J]=N[a1]++);var e1=0;for(J=0;J<W;++J)if(e1=u1[J],e1!=0){a1=n1[d1[J]]>>8-e1;for(var m1=(1<<7-e1)-1;m1>=0;--m1)p2[a1|m1<<e1]=e1&7|J<<3}var b1=[];for(M=1;b1.length<R+U;)switch(a1=p2[i1(T,q)],q+=a1&7,a1>>>=3){case 16:for(Q=3+z1(T,q),q+=2,a1=b1[b1.length-1];Q-- >0;)b1.push(a1);break;case 17:for(Q=3+V1(T,q),q+=3;Q-- >0;)b1.push(0);break;case 18:for(Q=11+i1(T,q),q+=7;Q-- >0;)b1.push(0);break;default:b1.push(a1),M<a1&&(M=a1);break}var w1=b1.slice(0,R),x1=b1.slice(R);for(J=R;J<286;++J)w1[J]=0;for(J=U;J<30;++J)x1[J]=0;return E3=V3(w1,C2,286),ne=V3(x1,v3,30),q}function s1(T,q){if(T[0]==3&&!(T[1]&3))return[q0(q),2];for(var R=0,U=0,Z=ad(q||1<<18),Q=0,u1=Z.length>>>0,d1=0,M=0;!(U&1);){if(U=V1(T,R),R+=3,U>>>1)U>>1==1?(d1=9,M=5):(R=l1(T,R),d1=E3,M=ne);else{R&7&&(R+=8-(R&7));var _=T[R>>>3]|T[(R>>>3)+1]<<8;if(R+=32,_>0)for(!q&&u1<Q+_&&(Z=B2(Z,Q+_),u1=Z.length);_-- >0;)Z[Q++]=T[R>>>3],R+=8;continue}for(;;){!q&&u1<Q+32767&&(Z=B2(Z,Q+32767),u1=Z.length);var N=A1(T,R,d1),W=U>>>1==1?E2[N]:C2[N];if(R+=W&15,W>>>=4,!(W>>>8&255))Z[Q++]=W;else{if(W==256)break;W-=257;var J=W<8?0:W-4>>2;J>5&&(J=0);var a1=Q+B[W];J>0&&(a1+=A1(T,R,J),R+=J),N=A1(T,R,M),W=U>>>1==1?U2[N]:v3[N],R+=W&15,W>>>=4;var e1=W<4?0:W-2>>1,m1=I[W];for(e1>0&&(m1+=A1(T,R,e1),R+=e1),!q&&u1<a1&&(Z=B2(Z,a1+100),u1=Z.length);Q<a1;)Z[Q]=Z[Q-m1],++Q}}}return q?[Z,R+7>>>3]:[Z.slice(0,Q),R+7>>>3]}function y1(T,q){var R=T.slice(T.l||0),U=s1(R,q);return T.l+=U[1],U[0]}function k1(T,q){if(T)typeof console<"u"&&console.error(q);else throw new Error(q)}function K1(T,q){var R=T;A3(R,0);var U=[],Z=[],Q={FileIndex:U,FullPaths:Z};y(Q,{root:q.root});for(var u1=R.length-4;(R[u1]!=80||R[u1+1]!=75||R[u1+2]!=5||R[u1+3]!=6)&&u1>=0;)--u1;R.l=u1+4,R.l+=4;var d1=R.read_shift(2);R.l+=6;var M=R.read_shift(4);for(R.l=M,u1=0;u1<d1;++u1){R.l+=20;var _=R.read_shift(4),N=R.read_shift(4),W=R.read_shift(2),J=R.read_shift(2),a1=R.read_shift(2);R.l+=8;var e1=R.read_shift(4),m1=s(R.slice(R.l+W,R.l+W+J));R.l+=W+J+a1;var b1=R.l;R.l=e1+4,K2(R,_,N,Q,m1),R.l=b1}return Q}function K2(T,q,R,U,Z){T.l+=2;var Q=T.read_shift(2),u1=T.read_shift(2),d1=i(T);if(Q&8257)throw new Error("Unsupported ZIP encryption");for(var M=T.read_shift(4),_=T.read_shift(4),N=T.read_shift(4),W=T.read_shift(2),J=T.read_shift(2),a1="",e1=0;e1<W;++e1)a1+=String.fromCharCode(T[T.l++]);if(J){var m1=s(T.slice(T.l,T.l+J));(m1[21589]||{}).mt&&(d1=m1[21589].mt),((Z||{})[21589]||{}).mt&&(d1=Z[21589].mt)}T.l+=J;var b1=T.slice(T.l,T.l+_);switch(u1){case 8:b1=k(T,N);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+u1)}var w1=!1;Q&8&&(M=T.read_shift(4),M==134695760&&(M=T.read_shift(4),w1=!0),_=T.read_shift(4),N=T.read_shift(4)),_!=q&&k1(w1,"Bad compressed size: "+q+" != "+_),N!=R&&k1(w1,"Bad uncompressed size: "+R+" != "+N),se(U,a1,b1,{unsafe:!0,mt:d1})}function o4(T,q){var R=q||{},U=[],Z=[],Q=g3(1),u1=R.compression?8:0,d1=0,M=0,_=0,N=0,W=0,J=T.FullPaths[0],a1=J,e1=T.FileIndex[0],m1=[],b1=0;for(M=1;M<T.FullPaths.length;++M)if(a1=T.FullPaths[M].slice(J.length),e1=T.FileIndex[M],!(!e1.size||!e1.content||a1=="Sh33tJ5")){var w1=N,x1=g3(a1.length);for(_=0;_<a1.length;++_)x1.write_shift(1,a1.charCodeAt(_)&127);x1=x1.slice(0,x1.l),m1[W]=V21.buf(e1.content,0);var F1=e1.content;u1==8&&(F1=D(F1)),Q=g3(30),Q.write_shift(4,67324752),Q.write_shift(2,20),Q.write_shift(2,d1),Q.write_shift(2,u1),e1.mt?n(Q,e1.mt):Q.write_shift(4,0),Q.write_shift(-4,m1[W]),Q.write_shift(4,F1.length),Q.write_shift(4,e1.content.length),Q.write_shift(2,x1.length),Q.write_shift(2,0),N+=Q.length,U.push(Q),N+=x1.length,U.push(x1),N+=F1.length,U.push(F1),Q=g3(46),Q.write_shift(4,33639248),Q.write_shift(2,0),Q.write_shift(2,20),Q.write_shift(2,d1),Q.write_shift(2,u1),Q.write_shift(4,0),Q.write_shift(-4,m1[W]),Q.write_shift(4,F1.length),Q.write_shift(4,e1.content.length),Q.write_shift(2,x1.length),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(4,0),Q.write_shift(4,w1),b1+=Q.l,Z.push(Q),b1+=x1.length,Z.push(x1),++W}return Q=g3(22),Q.write_shift(4,101010256),Q.write_shift(2,0),Q.write_shift(2,0),Q.write_shift(2,W),Q.write_shift(2,W),Q.write_shift(4,b1),Q.write_shift(4,N),Q.write_shift(2,0),z0([z0(U),z0(Z),Q])}var z4={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function Te(T,q){if(T.ctype)return T.ctype;var R=T.name||"",U=R.match(/\.([^\.]+)$/);return U&&z4[U[1]]||q&&(U=(R=q).match(/[\.\\]([^\.\\])+$/),U&&z4[U[1]])?z4[U[1]]:"application/octet-stream"}function ie(T){for(var q=td(T),R=[],U=0;U<q.length;U+=76)R.push(q.slice(U,U+76));return R.join(`\r
|
|
795
795
|
`)+`\r
|
|
796
796
|
`}function l4(T){var q=T.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(_){var N=_.charCodeAt(0).toString(16).toUpperCase();return"="+(N.length==1?"0"+N:N)});q=q.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),q.charAt(0)==`
|
|
797
797
|
`&&(q="=0D"+q.slice(1)),q=q.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
|