@deskhero/dh_ui 1.44.3 → 1.44.4

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/dh_ui.es.js CHANGED
@@ -24886,7 +24886,7 @@ const _sfc_main$c = {
24886
24886
  key: index,
24887
24887
  icon: props.icon,
24888
24888
  "input-index": item.id,
24889
- "input-value": item.input,
24889
+ "input-value": item.id === 1 ? props.inputValue : item.input,
24890
24890
  "input-width": props.inputWidth,
24891
24891
  list: item.list,
24892
24892
  "placeholder-input": props.placeholderInput,
package/dist/dh_ui.umd.js CHANGED
@@ -16,7 +16,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
16
16
  * Released under the MIT License
17
17
  */class K4{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(n,t,o,e){const i=t.listeners[e],a=t.duration;i.forEach(s=>s({chart:n,initial:t.initial,numSteps:a,currentStep:Math.min(o-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=wd.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(n=Date.now()){let t=0;this._charts.forEach((o,e)=>{if(!o.running||!o.items.length)return;const i=o.items;let a=i.length-1,s=!1,l;for(;a>=0;--a)l=i[a],l._active?(l._total>o.duration&&(o.duration=l._total),l.tick(n),s=!0):(i[a]=i[i.length-1],i.pop());s&&(e.draw(),this._notify(e,o,n,"progress")),i.length||(o.running=!1,this._notify(e,o,n,"complete"),o.initial=!1),t+=i.length}),this._lastDate=n,t===0&&(this._running=!1)}_getAnims(n){const t=this._charts;let o=t.get(n);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(n,o)),o}listen(n,t,o){this._getAnims(n).listeners[t].push(o)}add(n,t){!t||!t.length||this._getAnims(n).items.push(...t)}has(n){return this._getAnims(n).items.length>0}start(n){const t=this._charts.get(n);!t||(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((o,e)=>Math.max(o,e._duration),0),this._refresh())}running(n){if(!this._running)return!1;const t=this._charts.get(n);return!(!t||!t.running||!t.items.length)}stop(n){const t=this._charts.get(n);if(!t||!t.items.length)return;const o=t.items;let e=o.length-1;for(;e>=0;--e)o[e].cancel();t.items=[],this._notify(n,t,Date.now(),"complete")}remove(n){return this._charts.delete(n)}}var on=new K4;const Mf="transparent",q4={boolean(r,n,t){return t>.5?n:r},color(r,n,t){const o=Wd(r||Mf),e=o.valid&&Wd(n||Mf);return e&&e.valid?e.mix(o,t).hexString():n},number(r,n,t){return r+(n-r)*t}};class ex{constructor(n,t,o,e){const i=t[o];e=Li([n.to,e,i,n.from]);const a=Li([n.from,i,e]);this._active=!0,this._fn=n.fn||q4[n.type||typeof a],this._easing=yr[n.easing]||yr.linear,this._start=Math.floor(Date.now()+(n.delay||0)),this._duration=this._total=Math.floor(n.duration),this._loop=!!n.loop,this._target=t,this._prop=o,this._from=a,this._to=e,this._promises=void 0}active(){return this._active}update(n,t,o){if(this._active){this._notify(!1);const e=this._target[this._prop],i=o-this._start,a=this._duration-i;this._start=o,this._duration=Math.floor(Math.max(a,n.duration)),this._total+=i,this._loop=!!n.loop,this._to=Li([n.to,t,e,n.from]),this._from=Li([n.from,e,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(n){const t=n-this._start,o=this._duration,e=this._prop,i=this._from,a=this._loop,s=this._to;let l;if(this._active=i!==s&&(a||t<o),!this._active){this._target[e]=s,this._notify(!0);return}if(t<0){this._target[e]=i;return}l=t/o%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[e]=this._fn(i,s,l)}wait(){const n=this._promises||(this._promises=[]);return new Promise((t,o)=>{n.push({res:t,rej:o})})}_notify(n){const t=n?"res":"rej",o=this._promises||[];for(let e=0;e<o.length;e++)o[e][t]()}}const tx=["x","y","borderWidth","radius","tension"],nx=["color","borderColor","backgroundColor"];ke.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const rx=Object.keys(ke.animation);ke.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:r=>r!=="onProgress"&&r!=="onComplete"&&r!=="fn"}),ke.set("animations",{colors:{type:"color",properties:nx},numbers:{type:"number",properties:tx}}),ke.describe("animations",{_fallback:"animation"}),ke.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:r=>r|0}}}});class gf{constructor(n,t){this._chart=n,this._properties=new Map,this.configure(t)}configure(n){if(!Ae(n))return;const t=this._properties;Object.getOwnPropertyNames(n).forEach(o=>{const e=n[o];if(!Ae(e))return;const i={};for(const a of rx)i[a]=e[a];(Ze(e.properties)&&e.properties||[o]).forEach(a=>{(a===o||!t.has(a))&&t.set(a,i)})})}_animateOptions(n,t){const o=t.options,e=ix(n,o);if(!e)return[];const i=this._createAnimations(e,o);return o.$shared&&ox(n.options.$animations,o).then(()=>{n.options=o},()=>{}),i}_createAnimations(n,t){const o=this._properties,e=[],i=n.$animations||(n.$animations={}),a=Object.keys(t),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const u=a[l];if(u.charAt(0)==="$")continue;if(u==="options"){e.push(...this._animateOptions(n,t));continue}const d=t[u];let f=i[u];const M=o.get(u);if(f)if(M&&f.active()){f.update(M,d,s);continue}else f.cancel();if(!M||!M.duration){n[u]=d;continue}i[u]=f=new ex(M,n,u,d),e.push(f)}return e}update(n,t){if(this._properties.size===0){Object.assign(n,t);return}const o=this._createAnimations(n,t);if(o.length)return on.add(this._chart,o),!0}}function ox(r,n){const t=[],o=Object.keys(n);for(let e=0;e<o.length;e++){const i=r[o[e]];i&&i.active()&&t.push(i.wait())}return Promise.all(t)}function ix(r,n){if(!n)return;let t=r.options;if(!t){r.options=n;return}return t.$shared&&(r.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function hf(r,n){const t=r&&r.options||{},o=t.reverse,e=t.min===void 0?n:0,i=t.max===void 0?n:0;return{start:o?i:e,end:o?e:i}}function ax(r,n,t){if(t===!1)return!1;const o=hf(r,t),e=hf(n,t);return{top:e.end,right:o.end,bottom:e.start,left:o.start}}function sx(r){let n,t,o,e;return Ae(r)?(n=r.top,t=r.right,o=r.bottom,e=r.left):n=t=o=e=r,{top:n,right:t,bottom:o,left:e,disabled:r===!1}}function pf(r,n){const t=[],o=r._getSortedDatasetMetas(n);let e,i;for(e=0,i=o.length;e<i;++e)t.push(o[e].index);return t}function yf(r,n,t,o={}){const e=r.keys,i=o.mode==="single";let a,s,l,u;if(n!==null){for(a=0,s=e.length;a<s;++a){if(l=+e[a],l===t){if(o.all)continue;break}u=r.values[l],ot(u)&&(i||n===0||Ht(n)===Ht(u))&&(n+=u)}return n}}function lx(r){const n=Object.keys(r),t=new Array(n.length);let o,e,i;for(o=0,e=n.length;o<e;++o)i=n[o],t[o]={x:i,y:r[i]};return t}function Nf(r,n){const t=r&&r.options.stacked;return t||t===void 0&&n.stack!==void 0}function ux(r,n,t){return`${r.id}.${n.id}.${t.stack||t.type}`}function cx(r){const{min:n,max:t,minDefined:o,maxDefined:e}=r.getUserBounds();return{min:o?n:Number.NEGATIVE_INFINITY,max:e?t:Number.POSITIVE_INFINITY}}function dx(r,n,t){const o=r[n]||(r[n]={});return o[t]||(o[t]={})}function mf(r,n,t,o){for(const e of n.getMatchingVisibleMetas(o).reverse()){const i=r[e.index];if(t&&i>0||!t&&i<0)return e.index}return null}function jf(r,n){const{chart:t,_cachedMeta:o}=r,e=t._stacks||(t._stacks={}),{iScale:i,vScale:a,index:s}=o,l=i.axis,u=a.axis,d=ux(i,a,o),f=n.length;let M;for(let p=0;p<f;++p){const y=n[p],{[l]:j,[u]:v}=y,h=y._stacks||(y._stacks={});M=h[u]=dx(e,d,j),M[s]=v,M._top=mf(M,a,!0,o.type),M._bottom=mf(M,a,!1,o.type)}}function jl(r,n){const t=r.scales;return Object.keys(t).filter(o=>t[o].axis===n).shift()}function fx(r,n){return Dn(r,{active:!1,dataset:void 0,datasetIndex:n,index:n,mode:"default",type:"dataset"})}function Mx(r,n,t){return Dn(r,{active:!1,dataIndex:n,parsed:void 0,raw:void 0,element:t,index:n,mode:"default",type:"data"})}function xr(r,n){const t=r.controller.index,o=r.vScale&&r.vScale.axis;if(!!o){n=n||r._parsed;for(const e of n){const i=e._stacks;if(!i||i[o]===void 0||i[o][t]===void 0)return;delete i[o][t]}}}const Il=r=>r==="reset"||r==="none",If=(r,n)=>n?r:Object.assign({},r),gx=(r,n,t)=>r&&!n.hidden&&n._stacked&&{keys:pf(t,!0),values:null};class _t{constructor(n,t){this.chart=n,this._ctx=n.ctx,this.index=t,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.initialize()}initialize(){const n=this._cachedMeta;this.configure(),this.linkScales(),n._stacked=Nf(n.vScale,n),this.addElements()}updateIndex(n){this.index!==n&&xr(this._cachedMeta),this.index=n}linkScales(){const n=this.chart,t=this._cachedMeta,o=this.getDataset(),e=(f,M,p,y)=>f==="x"?M:f==="r"?y:p,i=t.xAxisID=we(o.xAxisID,jl(n,"x")),a=t.yAxisID=we(o.yAxisID,jl(n,"y")),s=t.rAxisID=we(o.rAxisID,jl(n,"r")),l=t.indexAxis,u=t.iAxisID=e(l,i,a,s),d=t.vAxisID=e(l,a,i,s);t.xScale=this.getScaleForId(i),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(s),t.iScale=this.getScaleForId(u),t.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(n){return this.chart.scales[n]}_getOtherScale(n){const t=this._cachedMeta;return n===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const n=this._cachedMeta;this._data&&kd(this._data,this),n._stacked&&xr(n)}_dataCheck(){const n=this.getDataset(),t=n.data||(n.data=[]),o=this._data;if(Ae(t))this._data=lx(t);else if(o!==t){if(o){kd(o,this);const e=this._cachedMeta;xr(e),e._parsed=[]}t&&Object.isExtensible(t)&&L1(t,this),this._syncList=[],this._data=t}}addElements(){const n=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(n.dataset=new this.datasetElementType)}buildOrUpdateElements(n){const t=this._cachedMeta,o=this.getDataset();let e=!1;this._dataCheck();const i=t._stacked;t._stacked=Nf(t.vScale,t),t.stack!==o.stack&&(e=!0,xr(t),t.stack=o.stack),this._resyncElements(n),(e||i!==t._stacked)&&jf(this,t._parsed)}configure(){const n=this.chart.config,t=n.datasetScopeKeys(this._type),o=n.getOptionScopes(this.getDataset(),t,!0);this.options=n.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(n,t){const{_cachedMeta:o,_data:e}=this,{iScale:i,_stacked:a}=o,s=i.axis;let l=n===0&&t===e.length?!0:o._sorted,u=n>0&&o._parsed[n-1],d,f,M;if(this._parsing===!1)o._parsed=e,o._sorted=!0,M=e;else{Ze(e[n])?M=this.parseArrayData(o,e,n,t):Ae(e[n])?M=this.parseObjectData(o,e,n,t):M=this.parsePrimitiveData(o,e,n,t);const p=()=>f[s]===null||u&&f[s]<u[s];for(d=0;d<t;++d)o._parsed[d+n]=f=M[d],l&&(p()&&(l=!1),u=f);o._sorted=l}a&&jf(this,M)}parsePrimitiveData(n,t,o,e){const{iScale:i,vScale:a}=n,s=i.axis,l=a.axis,u=i.getLabels(),d=i===a,f=new Array(e);let M,p,y;for(M=0,p=e;M<p;++M)y=M+o,f[M]={[s]:d||i.parse(u[y],y),[l]:a.parse(t[y],y)};return f}parseArrayData(n,t,o,e){const{xScale:i,yScale:a}=n,s=new Array(e);let l,u,d,f;for(l=0,u=e;l<u;++l)d=l+o,f=t[d],s[l]={x:i.parse(f[0],d),y:a.parse(f[1],d)};return s}parseObjectData(n,t,o,e){const{xScale:i,yScale:a}=n,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=new Array(e);let d,f,M,p;for(d=0,f=e;d<f;++d)M=d+o,p=t[M],u[d]={x:i.parse(Nn(p,s),M),y:a.parse(Nn(p,l),M)};return u}getParsed(n){return this._cachedMeta._parsed[n]}getDataElement(n){return this._cachedMeta.data[n]}applyStack(n,t,o){const e=this.chart,i=this._cachedMeta,a=t[n.axis],s={keys:pf(e,!0),values:t._stacks[n.axis]};return yf(s,a,i.index,{mode:o})}updateRangeFromParsed(n,t,o,e){const i=o[t.axis];let a=i===null?NaN:i;const s=e&&o._stacks[t.axis];e&&s&&(e.values=s,a=yf(e,i,this._cachedMeta.index)),n.min=Math.min(n.min,a),n.max=Math.max(n.max,a)}getMinMax(n,t){const o=this._cachedMeta,e=o._parsed,i=o._sorted&&n===o.iScale,a=e.length,s=this._getOtherScale(n),l=gx(t,o,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:f}=cx(s);let M,p;function y(){p=e[M];const j=p[s.axis];return!ot(p[n.axis])||d>j||f<j}for(M=0;M<a&&!(!y()&&(this.updateRangeFromParsed(u,n,p,l),i));++M);if(i){for(M=a-1;M>=0;--M)if(!y()){this.updateRangeFromParsed(u,n,p,l);break}}return u}getAllParsedValues(n){const t=this._cachedMeta._parsed,o=[];let e,i,a;for(e=0,i=t.length;e<i;++e)a=t[e][n.axis],ot(a)&&o.push(a);return o}getMaxOverflow(){return!1}getLabelAndValue(n){const t=this._cachedMeta,o=t.iScale,e=t.vScale,i=this.getParsed(n);return{label:o?""+o.getLabelForValue(i[o.axis]):"",value:e?""+e.getLabelForValue(i[e.axis]):""}}_update(n){const t=this._cachedMeta;this.update(n||"default"),t._clip=sx(we(this.options.clip,ax(t.xScale,t.yScale,this.getMaxOverflow())))}update(n){}draw(){const n=this._ctx,t=this.chart,o=this._cachedMeta,e=o.data||[],i=t.chartArea,a=[],s=this._drawStart||0,l=this._drawCount||e.length-s,u=this.options.drawActiveElementsOnTop;let d;for(o.dataset&&o.dataset.draw(n,i,s,l),d=s;d<s+l;++d){const f=e[d];f.hidden||(f.active&&u?a.push(f):f.draw(n,i))}for(d=0;d<a.length;++d)a[d].draw(n,i)}getStyle(n,t){const o=t?"active":"default";return n===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(n||0,o)}getContext(n,t,o){const e=this.getDataset();let i;if(n>=0&&n<this._cachedMeta.data.length){const a=this._cachedMeta.data[n];i=a.$context||(a.$context=Mx(this.getContext(),n,a)),i.parsed=this.getParsed(n),i.raw=e.data[n],i.index=i.dataIndex=n}else i=this.$context||(this.$context=fx(this.chart.getContext(),this.index)),i.dataset=e,i.index=i.datasetIndex=this.index;return i.active=!!t,i.mode=o,i}resolveDatasetElementOptions(n){return this._resolveElementOptions(this.datasetElementType.id,n)}resolveDataElementOptions(n,t){return this._resolveElementOptions(this.dataElementType.id,t,n)}_resolveElementOptions(n,t="default",o){const e=t==="active",i=this._cachedDataOpts,a=n+"-"+t,s=i[a],l=this.enableOptionSharing&&Dt(o);if(s)return If(s,l);const u=this.chart.config,d=u.datasetElementScopeKeys(this._type,n),f=e?[`${n}Hover`,"hover",n,""]:[n,""],M=u.getOptionScopes(this.getDataset(),d),p=Object.keys(ke.elements[n]),y=()=>this.getContext(o,e),j=u.resolveNamedOptions(M,p,y,f);return j.$shared&&(j.$shared=l,i[a]=Object.freeze(If(j,l))),j}_resolveAnimations(n,t,o){const e=this.chart,i=this._cachedDataOpts,a=`animation-${t}`,s=i[a];if(s)return s;let l;if(e.options.animation!==!1){const d=this.chart.config,f=d.datasetAnimationScopeKeys(this._type,t),M=d.getOptionScopes(this.getDataset(),f);l=d.createResolver(M,this.getContext(n,o,t))}const u=new gf(e,l&&l.animations);return l&&l._cacheable&&(i[a]=Object.freeze(u)),u}getSharedOptions(n){if(!!n.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},n))}includeOptions(n,t){return!t||Il(n)||this.chart._animationsDisabled}_getSharedOptions(n,t){const o=this.resolveDataElementOptions(n,t),e=this._sharedOptions,i=this.getSharedOptions(o),a=this.includeOptions(t,i)||i!==e;return this.updateSharedOptions(i,t,o),{sharedOptions:i,includeOptions:a}}updateElement(n,t,o,e){Il(e)?Object.assign(n,o):this._resolveAnimations(t,e).update(n,o)}updateSharedOptions(n,t,o){n&&!Il(t)&&this._resolveAnimations(void 0,t).update(n,o)}_setStyle(n,t,o,e){n.active=e;const i=this.getStyle(t,e);this._resolveAnimations(t,o,e).update(n,{options:!e&&this.getSharedOptions(i)||i})}removeHoverStyle(n,t,o){this._setStyle(n,o,"active",!1)}setHoverStyle(n,t,o){this._setStyle(n,o,"active",!0)}_removeDatasetHoverStyle(){const n=this._cachedMeta.dataset;n&&this._setStyle(n,void 0,"active",!1)}_setDatasetHoverStyle(){const n=this._cachedMeta.dataset;n&&this._setStyle(n,void 0,"active",!0)}_resyncElements(n){const t=this._data,o=this._cachedMeta.data;for(const[s,l,u]of this._syncList)this[s](l,u);this._syncList=[];const e=o.length,i=t.length,a=Math.min(i,e);a&&this.parse(0,a),i>e?this._insertElements(e,i-e,n):i<e&&this._removeElements(i,e-i)}_insertElements(n,t,o=!0){const e=this._cachedMeta,i=e.data,a=n+t;let s;const l=u=>{for(u.length+=t,s=u.length-1;s>=a;s--)u[s]=u[s-t]};for(l(i),s=n;s<a;++s)i[s]=new this.dataElementType;this._parsing&&l(e._parsed),this.parse(n,t),o&&this.updateElements(i,n,t,"reset")}updateElements(n,t,o,e){}_removeElements(n,t){const o=this._cachedMeta;if(this._parsing){const e=o._parsed.splice(n,t);o._stacked&&xr(o,e)}o.data.splice(n,t)}_sync(n){if(this._parsing)this._syncList.push(n);else{const[t,o,e]=n;this[t](o,e)}this.chart._dataChanges.push([this.index,...n])}_onDataPush(){const n=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-n,n])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(n,t){t&&this._sync(["_removeElements",n,t]);const o=arguments.length-2;o&&this._sync(["_insertElements",n,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}_t.defaults={},_t.prototype.datasetElementType=null,_t.prototype.dataElementType=null;function hx(r,n){if(!r._cache.$bar){const t=r.getMatchingVisibleMetas(n);let o=[];for(let e=0,i=t.length;e<i;e++)o=o.concat(t[e].controller.getAllParsedValues(r));r._cache.$bar=Ad(o.sort((e,i)=>e-i))}return r._cache.$bar}function px(r){const n=r.iScale,t=hx(n,r.type);let o=n._length,e,i,a,s;const l=()=>{a===32767||a===-32768||(Dt(s)&&(o=Math.min(o,Math.abs(a-s)||o)),s=a)};for(e=0,i=t.length;e<i;++e)a=n.getPixelForValue(t[e]),l();for(s=void 0,e=0,i=n.ticks.length;e<i;++e)a=n.getPixelForTick(e),l();return o}function yx(r,n,t,o){const e=t.barThickness;let i,a;return Ce(e)?(i=n.min*t.categoryPercentage,a=t.barPercentage):(i=e*o,a=1),{chunk:i/o,ratio:a,start:n.pixels[r]-i/2}}function Nx(r,n,t,o){const e=n.pixels,i=e[r];let a=r>0?e[r-1]:null,s=r<e.length-1?e[r+1]:null;const l=t.categoryPercentage;a===null&&(a=i-(s===null?n.end-n.start:s-i)),s===null&&(s=i+i-a);const u=i-(i-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/o,ratio:t.barPercentage,start:u}}function mx(r,n,t,o){const e=t.parse(r[0],o),i=t.parse(r[1],o),a=Math.min(e,i),s=Math.max(e,i);let l=a,u=s;Math.abs(a)>Math.abs(s)&&(l=s,u=a),n[t.axis]=u,n._custom={barStart:l,barEnd:u,start:e,end:i,min:a,max:s}}function Df(r,n,t,o){return Ze(r)?mx(r,n,t,o):n[t.axis]=t.parse(r,o),n}function xf(r,n,t,o){const e=r.iScale,i=r.vScale,a=e.getLabels(),s=e===i,l=[];let u,d,f,M;for(u=t,d=t+o;u<d;++u)M=n[u],f={},f[e.axis]=s||e.parse(a[u],u),l.push(Df(M,f,i,u));return l}function Dl(r){return r&&r.barStart!==void 0&&r.barEnd!==void 0}function jx(r,n,t){return r!==0?Ht(r):(n.isHorizontal()?1:-1)*(n.min>=t?1:-1)}function Ix(r){let n,t,o,e,i;return r.horizontal?(n=r.base>r.x,t="left",o="right"):(n=r.base<r.y,t="bottom",o="top"),n?(e="end",i="start"):(e="start",i="end"),{start:t,end:o,reverse:n,top:e,bottom:i}}function Dx(r,n,t,o){let e=n.borderSkipped;const i={};if(!e){r.borderSkipped=i;return}if(e===!0){r.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:s,reverse:l,top:u,bottom:d}=Ix(r);e==="middle"&&t&&(r.enableBorderRadius=!0,(t._top||0)===o?e=u:(t._bottom||0)===o?e=d:(i[vf(d,a,s,l)]=!0,e=u)),i[vf(e,a,s,l)]=!0,r.borderSkipped=i}function vf(r,n,t,o){return o?(r=xx(r,n,t),r=bf(r,t,n)):r=bf(r,n,t),r}function xx(r,n,t){return r===n?t:r===t?n:r}function bf(r,n,t){return r==="start"?n:r==="end"?t:r}function vx(r,{inflateAmount:n},t){r.inflateAmount=n==="auto"?t===1?.33:0:n}class Ci extends _t{parsePrimitiveData(n,t,o,e){return xf(n,t,o,e)}parseArrayData(n,t,o,e){return xf(n,t,o,e)}parseObjectData(n,t,o,e){const{iScale:i,vScale:a}=n,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=i.axis==="x"?s:l,d=a.axis==="x"?s:l,f=[];let M,p,y,j;for(M=o,p=o+e;M<p;++M)j=t[M],y={},y[i.axis]=i.parse(Nn(j,u),M),f.push(Df(Nn(j,d),y,a,M));return f}updateRangeFromParsed(n,t,o,e){super.updateRangeFromParsed(n,t,o,e);const i=o._custom;i&&t===this._cachedMeta.vScale&&(n.min=Math.min(n.min,i.min),n.max=Math.max(n.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(n){const t=this._cachedMeta,{iScale:o,vScale:e}=t,i=this.getParsed(n),a=i._custom,s=Dl(a)?"["+a.start+", "+a.end+"]":""+e.getLabelForValue(i[e.axis]);return{label:""+o.getLabelForValue(i[o.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const n=this._cachedMeta;n.stack=this.getDataset().stack}update(n){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,n)}updateElements(n,t,o,e){const i=e==="reset",{index:a,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),u=s.isHorizontal(),d=this._getRuler(),{sharedOptions:f,includeOptions:M}=this._getSharedOptions(t,e);for(let p=t;p<t+o;p++){const y=this.getParsed(p),j=i||Ce(y[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),v=this._calculateBarIndexPixels(p,d),h=(y._stacks||{})[s.axis],N={horizontal:u,base:j.base,enableBorderRadius:!h||Dl(y._custom)||a===h._top||a===h._bottom,x:u?j.head:v.center,y:u?v.center:j.head,height:u?v.size:Math.abs(j.size),width:u?Math.abs(j.size):v.size};M&&(N.options=f||this.resolveDataElementOptions(p,n[p].active?"active":e));const D=N.options||n[p].options;Dx(N,D,h,a),vx(N,D,d.ratio),this.updateElement(n[p],p,N,e)}}_getStacks(n,t){const{iScale:o}=this._cachedMeta,e=o.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),i=o.options.stacked,a=[],s=l=>{const u=l.controller.getParsed(t),d=u&&u[l.vScale.axis];if(Ce(d)||isNaN(d))return!0};for(const l of e)if(!(t!==void 0&&s(l))&&((i===!1||a.indexOf(l.stack)===-1||i===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===n))break;return a.length||a.push(void 0),a}_getStackCount(n){return this._getStacks(void 0,n).length}_getStackIndex(n,t,o){const e=this._getStacks(n,o),i=t!==void 0?e.indexOf(t):-1;return i===-1?e.length-1:i}_getRuler(){const n=this.options,t=this._cachedMeta,o=t.iScale,e=[];let i,a;for(i=0,a=t.data.length;i<a;++i)e.push(o.getPixelForValue(this.getParsed(i)[o.axis],i));const s=n.barThickness;return{min:s||px(t),pixels:e,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:n.grouped,ratio:s?1:n.categoryPercentage*n.barPercentage}}_calculateBarValuePixels(n){const{_cachedMeta:{vScale:t,_stacked:o},options:{base:e,minBarLength:i}}=this,a=e||0,s=this.getParsed(n),l=s._custom,u=Dl(l);let d=s[t.axis],f=0,M=o?this.applyStack(t,s,o):d,p,y;M!==d&&(f=M-d,M=d),u&&(d=l.barStart,M=l.barEnd-l.barStart,d!==0&&Ht(d)!==Ht(l.barEnd)&&(f=0),f+=d);const j=!Ce(e)&&!u?e:f;let v=t.getPixelForValue(j);if(this.chart.getDataVisibility(n)?p=t.getPixelForValue(f+M):p=v,y=p-v,Math.abs(y)<i){y=jx(y,t,a)*i,d===a&&(v-=y/2);const h=t.getPixelForDecimal(0),N=t.getPixelForDecimal(1),D=Math.min(h,N),I=Math.max(h,N);v=Math.max(Math.min(v,I),D),p=v+y}if(v===t.getPixelForValue(a)){const h=Ht(y)*t.getLineWidthForValue(a)/2;v+=h,y-=h}return{size:y,base:v,head:p,center:p+y/2}}_calculateBarIndexPixels(n,t){const o=t.scale,e=this.options,i=e.skipNull,a=we(e.maxBarThickness,1/0);let s,l;if(t.grouped){const u=i?this._getStackCount(n):t.stackCount,d=e.barThickness==="flex"?Nx(n,t,e,u):yx(n,t,e,u),f=this._getStackIndex(this.index,this._cachedMeta.stack,i?n:void 0);s=d.start+d.chunk*f+d.chunk/2,l=Math.min(a,d.chunk*d.ratio)}else s=o.getPixelForValue(this.getParsed(n)[o.axis],n),l=Math.min(a,t.min*t.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const n=this._cachedMeta,t=n.vScale,o=n.data,e=o.length;let i=0;for(;i<e;++i)this.getParsed(i)[t.axis]!==null&&o[i].draw(this._ctx)}}Ci.id="bar",Ci.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Ci.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class xl extends _t{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(n,t,o,e){const i=super.parsePrimitiveData(n,t,o,e);for(let a=0;a<i.length;a++)i[a]._custom=this.resolveDataElementOptions(a+o).radius;return i}parseArrayData(n,t,o,e){const i=super.parseArrayData(n,t,o,e);for(let a=0;a<i.length;a++){const s=t[o+a];i[a]._custom=we(s[2],this.resolveDataElementOptions(a+o).radius)}return i}parseObjectData(n,t,o,e){const i=super.parseObjectData(n,t,o,e);for(let a=0;a<i.length;a++){const s=t[o+a];i[a]._custom=we(s&&s.r&&+s.r,this.resolveDataElementOptions(a+o).radius)}return i}getMaxOverflow(){const n=this._cachedMeta.data;let t=0;for(let o=n.length-1;o>=0;--o)t=Math.max(t,n[o].size(this.resolveDataElementOptions(o))/2);return t>0&&t}getLabelAndValue(n){const t=this._cachedMeta,{xScale:o,yScale:e}=t,i=this.getParsed(n),a=o.getLabelForValue(i.x),s=e.getLabelForValue(i.y),l=i._custom;return{label:t.label,value:"("+a+", "+s+(l?", "+l:"")+")"}}update(n){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,n)}updateElements(n,t,o,e){const i=e==="reset",{iScale:a,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(t,e),d=a.axis,f=s.axis;for(let M=t;M<t+o;M++){const p=n[M],y=!i&&this.getParsed(M),j={},v=j[d]=i?a.getPixelForDecimal(.5):a.getPixelForValue(y[d]),h=j[f]=i?s.getBasePixel():s.getPixelForValue(y[f]);j.skip=isNaN(v)||isNaN(h),u&&(j.options=l||this.resolveDataElementOptions(M,p.active?"active":e),i&&(j.options.radius=0)),this.updateElement(p,M,j,e)}}resolveDataElementOptions(n,t){const o=this.getParsed(n);let e=super.resolveDataElementOptions(n,t);e.$shared&&(e=Object.assign({},e,{$shared:!1}));const i=e.radius;return t!=="active"&&(e.radius=0),e.radius+=we(o&&o._custom,i),e}}xl.id="bubble",xl.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},xl.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function bx(r,n,t){let o=1,e=1,i=0,a=0;if(n<Be){const s=r,l=s+n,u=Math.cos(s),d=Math.sin(s),f=Math.cos(l),M=Math.sin(l),p=(D,I,m)=>pr(D,s,l,!0)?1:Math.max(I,I*t,m,m*t),y=(D,I,m)=>pr(D,s,l,!0)?-1:Math.min(I,I*t,m,m*t),j=p(0,u,f),v=p(Xe,d,M),h=y(Je,u,f),N=y(Je+Xe,d,M);o=(j-h)/2,e=(v-N)/2,i=-(j+h)/2,a=-(v+N)/2}return{ratioX:o,ratioY:e,offsetX:i,offsetY:a}}class vr extends _t{constructor(n,t){super(n,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(n,t){const o=this.getDataset().data,e=this._cachedMeta;if(this._parsing===!1)e._parsed=o;else{let i=l=>+o[l];if(Ae(o[n])){const{key:l="value"}=this._parsing;i=u=>+Nn(o[u],l)}let a,s;for(a=n,s=n+t;a<s;++a)e._parsed[a]=i(a)}}_getRotation(){return Ct(this.options.rotation-90)}_getCircumference(){return Ct(this.options.circumference)}_getRotationExtents(){let n=Be,t=-Be;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)){const e=this.chart.getDatasetMeta(o).controller,i=e._getRotation(),a=e._getCircumference();n=Math.min(n,i),t=Math.max(t,i+a)}return{rotation:n,circumference:t-n}}update(n){const t=this.chart,{chartArea:o}=t,e=this._cachedMeta,i=e.data,a=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,s=Math.max((Math.min(o.width,o.height)-a)/2,0),l=Math.min(p1(this.options.cutout,s),1),u=this._getRingWeight(this.index),{circumference:d,rotation:f}=this._getRotationExtents(),{ratioX:M,ratioY:p,offsetX:y,offsetY:j}=bx(f,d,l),v=(o.width-a)/M,h=(o.height-a)/p,N=Math.max(Math.min(v,h)/2,0),D=yd(this.options.radius,N),I=Math.max(D*l,0),m=(D-I)/this._getVisibleDatasetWeightTotal();this.offsetX=y*D,this.offsetY=j*D,e.total=this.calculateTotal(),this.outerRadius=D-m*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-m*u,0),this.updateElements(i,0,i.length,n)}_circumference(n,t){const o=this.options,e=this._cachedMeta,i=this._getCircumference();return t&&o.animation.animateRotate||!this.chart.getDataVisibility(n)||e._parsed[n]===null||e.data[n].hidden?0:this.calculateCircumference(e._parsed[n]*i/Be)}updateElements(n,t,o,e){const i=e==="reset",a=this.chart,s=a.chartArea,u=a.options.animation,d=(s.left+s.right)/2,f=(s.top+s.bottom)/2,M=i&&u.animateScale,p=M?0:this.innerRadius,y=M?0:this.outerRadius,{sharedOptions:j,includeOptions:v}=this._getSharedOptions(t,e);let h=this._getRotation(),N;for(N=0;N<t;++N)h+=this._circumference(N,i);for(N=t;N<t+o;++N){const D=this._circumference(N,i),I=n[N],m={x:d+this.offsetX,y:f+this.offsetY,startAngle:h,endAngle:h+D,circumference:D,outerRadius:y,innerRadius:p};v&&(m.options=j||this.resolveDataElementOptions(N,I.active?"active":e)),h+=D,this.updateElement(I,N,m,e)}}calculateTotal(){const n=this._cachedMeta,t=n.data;let o=0,e;for(e=0;e<t.length;e++){const i=n._parsed[e];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(e)&&!t[e].hidden&&(o+=Math.abs(i))}return o}calculateCircumference(n){const t=this._cachedMeta.total;return t>0&&!isNaN(n)?Be*(Math.abs(n)/t):0}getLabelAndValue(n){const t=this._cachedMeta,o=this.chart,e=o.data.labels||[],i=Dr(t._parsed[n],o.options.locale);return{label:e[n]||"",value:i}}getMaxBorderWidth(n){let t=0;const o=this.chart;let e,i,a,s,l;if(!n){for(e=0,i=o.data.datasets.length;e<i;++e)if(o.isDatasetVisible(e)){a=o.getDatasetMeta(e),n=a.data,s=a.controller;break}}if(!n)return 0;for(e=0,i=n.length;e<i;++e)l=s.resolveDataElementOptions(e),l.borderAlign!=="inner"&&(t=Math.max(t,l.borderWidth||0,l.hoverBorderWidth||0));return t}getMaxOffset(n){let t=0;for(let o=0,e=n.length;o<e;++o){const i=this.resolveDataElementOptions(o);t=Math.max(t,i.offset||0,i.hoverOffset||0)}return t}_getRingWeightOffset(n){let t=0;for(let o=0;o<n;++o)this.chart.isDatasetVisible(o)&&(t+=this._getRingWeight(o));return t}_getRingWeight(n){return Math.max(we(this.chart.data.datasets[n].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}vr.id="doughnut",vr.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"},vr.descriptors={_scriptable:r=>r!=="spacing",_indexable:r=>r!=="spacing"},vr.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(r){const n=r.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:t}}=r.legend.options;return n.labels.map((o,e)=>{const a=r.getDatasetMeta(0).controller.getStyle(e);return{text:o,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:t,hidden:!r.getDataVisibility(e),index:e}})}return[]}},onClick(r,n,t){t.chart.toggleDataVisibility(n.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(r){let n=r.label;const t=": "+r.formattedValue;return Ze(n)?(n=n.slice(),n[0]+=t):n+=t,n}}}}};class vl extends _t{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(n){const t=this._cachedMeta,{dataset:o,data:e=[],_dataset:i}=t,a=this.chart._animationsDisabled;let{start:s,count:l}=Od(t,e,a);this._drawStart=s,this._drawCount=l,Sd(t)&&(s=0,l=e.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!i._decimated,o.points=e;const u=this.resolveDatasetElementOptions(n);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(o,void 0,{animated:!a,options:u},n),this.updateElements(e,s,l,n)}updateElements(n,t,o,e){const i=e==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:d,includeOptions:f}=this._getSharedOptions(t,e),M=a.axis,p=s.axis,{spanGaps:y,segment:j}=this.options,v=Xn(y)?y:Number.POSITIVE_INFINITY,h=this.chart._animationsDisabled||i||e==="none";let N=t>0&&this.getParsed(t-1);for(let D=t;D<t+o;++D){const I=n[D],m=this.getParsed(D),T=h?I:{},L=Ce(m[p]),A=T[M]=a.getPixelForValue(m[M],D),z=T[p]=i||L?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,m,l):m[p],D);T.skip=isNaN(A)||isNaN(z)||L,T.stop=D>0&&Math.abs(m[M]-N[M])>v,j&&(T.parsed=m,T.raw=u.data[D]),f&&(T.options=d||this.resolveDataElementOptions(D,I.active?"active":e)),h||this.updateElement(I,D,T,e),N=m}}getMaxOverflow(){const n=this._cachedMeta,t=n.dataset,o=t.options&&t.options.borderWidth||0,e=n.data||[];if(!e.length)return o;const i=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(o,i,a)/2}draw(){const n=this._cachedMeta;n.dataset.updateControlPoints(this.chart.chartArea,n.iScale.axis),super.draw()}}vl.id="line",vl.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},vl.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class bl extends _t{constructor(n,t){super(n,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(n){const t=this._cachedMeta,o=this.chart,e=o.data.labels||[],i=Dr(t._parsed[n].r,o.options.locale);return{label:e[n]||"",value:i}}parseObjectData(n,t,o,e){return nf.bind(this)(n,t,o,e)}update(n){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,n)}getMinMax(){const n=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return n.data.forEach((o,e)=>{const i=this.getParsed(e).r;!isNaN(i)&&this.chart.getDataVisibility(e)&&(i<t.min&&(t.min=i),i>t.max&&(t.max=i))}),t}_updateRadius(){const n=this.chart,t=n.chartArea,o=n.options,e=Math.min(t.right-t.left,t.bottom-t.top),i=Math.max(e/2,0),a=Math.max(o.cutoutPercentage?i/100*o.cutoutPercentage:1,0),s=(i-a)/n.getVisibleDatasetCount();this.outerRadius=i-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(n,t,o,e){const i=e==="reset",a=this.chart,l=a.options.animation,u=this._cachedMeta.rScale,d=u.xCenter,f=u.yCenter,M=u.getIndexAngle(0)-.5*Je;let p=M,y;const j=360/this.countVisibleElements();for(y=0;y<t;++y)p+=this._computeAngle(y,e,j);for(y=t;y<t+o;y++){const v=n[y];let h=p,N=p+this._computeAngle(y,e,j),D=a.getDataVisibility(y)?u.getDistanceFromCenterForValue(this.getParsed(y).r):0;p=N,i&&(l.animateScale&&(D=0),l.animateRotate&&(h=N=M));const I={x:d,y:f,innerRadius:0,outerRadius:D,startAngle:h,endAngle:N,options:this.resolveDataElementOptions(y,v.active?"active":e)};this.updateElement(v,y,I,e)}}countVisibleElements(){const n=this._cachedMeta;let t=0;return n.data.forEach((o,e)=>{!isNaN(this.getParsed(e).r)&&this.chart.getDataVisibility(e)&&t++}),t}_computeAngle(n,t,o){return this.chart.getDataVisibility(n)?Ct(this.resolveDataElementOptions(n,t).angle||o):0}}bl.id="polarArea",bl.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},bl.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(r){const n=r.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:t}}=r.legend.options;return n.labels.map((o,e)=>{const a=r.getDatasetMeta(0).controller.getStyle(e);return{text:o,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:t,hidden:!r.getDataVisibility(e),index:e}})}return[]}},onClick(r,n,t){t.chart.toggleDataVisibility(n.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(r){return r.chart.data.labels[r.dataIndex]+": "+r.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Tf extends vr{}Tf.id="pie",Tf.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Tl extends _t{getLabelAndValue(n){const t=this._cachedMeta.vScale,o=this.getParsed(n);return{label:t.getLabels()[n],value:""+t.getLabelForValue(o[t.axis])}}parseObjectData(n,t,o,e){return nf.bind(this)(n,t,o,e)}update(n){const t=this._cachedMeta,o=t.dataset,e=t.data||[],i=t.iScale.getLabels();if(o.points=e,n!=="resize"){const a=this.resolveDatasetElementOptions(n);this.options.showLine||(a.borderWidth=0);const s={_loop:!0,_fullLoop:i.length===e.length,options:a};this.updateElement(o,void 0,s,n)}this.updateElements(e,0,e.length,n)}updateElements(n,t,o,e){const i=this._cachedMeta.rScale,a=e==="reset";for(let s=t;s<t+o;s++){const l=n[s],u=this.resolveDataElementOptions(s,l.active?"active":e),d=i.getPointPositionForValue(s,this.getParsed(s).r),f=a?i.xCenter:d.x,M=a?i.yCenter:d.y,p={x:f,y:M,angle:d.angle,skip:isNaN(f)||isNaN(M),options:u};this.updateElement(l,s,p,e)}}}Tl.id="radar",Tl.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},Tl.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class an{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(n){const{x:t,y:o}=this.getProps(["x","y"],n);return{x:t,y:o}}hasValue(){return Xn(this.x)&&Xn(this.y)}getProps(n,t){const o=this.$animations;if(!t||!o)return this;const e={};return n.forEach(i=>{e[i]=o[i]&&o[i].active()?o[i]._to:this[i]}),e}}an.defaults={},an.defaultRoutes=void 0;const kf={values(r){return Ze(r)?r:""+r},numeric(r,n,t){if(r===0)return"0";const o=this.chart.options.locale;let e,i=r;if(t.length>1){const u=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(u<1e-4||u>1e15)&&(e="scientific"),i=Tx(r,t)}const a=xt(Math.abs(i)),s=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:e,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),Dr(r,o,l)},logarithmic(r,n,t){if(r===0)return"0";const o=r/Math.pow(10,Math.floor(xt(r)));return o===1||o===2||o===5?kf.numeric.call(this,r,n,t):""}};function Tx(r,n){let t=n.length>3?n[2].value-n[1].value:n[1].value-n[0].value;return Math.abs(t)>=1&&r!==Math.floor(r)&&(t=r-Math.floor(r)),t}var Ei={formatters:kf};ke.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(r,n)=>n.lineWidth,tickColor:(r,n)=>n.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ei.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),ke.route("scale.ticks","color","","color"),ke.route("scale.grid","color","","borderColor"),ke.route("scale.grid","borderColor","","borderColor"),ke.route("scale.title","color","","color"),ke.describe("scale",{_fallback:!1,_scriptable:r=>!r.startsWith("before")&&!r.startsWith("after")&&r!=="callback"&&r!=="parser",_indexable:r=>r!=="borderDash"&&r!=="tickBorderDash"}),ke.describe("scales",{_fallback:"scale"}),ke.describe("scale.ticks",{_scriptable:r=>r!=="backdropPadding"&&r!=="callback",_indexable:r=>r!=="backdropPadding"});function kx(r,n){const t=r.options.ticks,o=t.maxTicksLimit||Ax(r),e=t.major.enabled?Lx(n):[],i=e.length,a=e[0],s=e[i-1],l=[];if(i>o)return zx(n,l,e,i/o),l;const u=wx(e,n,o);if(i>0){let d,f;const M=i>1?Math.round((s-a)/(i-1)):null;for(_i(n,l,u,Ce(M)?0:a-M,a),d=0,f=i-1;d<f;d++)_i(n,l,u,e[d],e[d+1]);return _i(n,l,u,s,Ce(M)?n.length:s+M),l}return _i(n,l,u),l}function Ax(r){const n=r.options.offset,t=r._tickSize(),o=r._length/t+(n?0:1),e=r._maxLength/t;return Math.floor(Math.min(o,e))}function wx(r,n,t){const o=Ox(r),e=n.length/t;if(!o)return Math.max(e,1);const i=v1(o);for(let a=0,s=i.length-1;a<s;a++){const l=i[a];if(l>e)return l}return Math.max(e,1)}function Lx(r){const n=[];let t,o;for(t=0,o=r.length;t<o;t++)r[t].major&&n.push(t);return n}function zx(r,n,t,o){let e=0,i=t[0],a;for(o=Math.ceil(o),a=0;a<r.length;a++)a===i&&(n.push(r[a]),e++,i=t[e*o])}function _i(r,n,t,o,e){const i=we(o,0),a=Math.min(we(e,r.length),r.length);let s=0,l,u,d;for(t=Math.ceil(t),e&&(l=e-o,t=l/Math.floor(l/t)),d=i;d<0;)s++,d=Math.round(i+s*t);for(u=Math.max(i,0);u<a;u++)u===d&&(n.push(r[u]),s++,d=Math.round(i+s*t))}function Ox(r){const n=r.length;let t,o;if(n<2)return!1;for(o=r[0],t=1;t<n;++t)if(r[t]-r[t-1]!==o)return!1;return o}const Sx=r=>r==="left"?"right":r==="right"?"left":r,Af=(r,n,t)=>n==="top"||n==="left"?r[n]+t:r[n]-t;function wf(r,n){const t=[],o=r.length/n,e=r.length;let i=0;for(;i<e;i+=o)t.push(r[Math.floor(i)]);return t}function Cx(r,n,t){const o=r.ticks.length,e=Math.min(n,o-1),i=r._startPixel,a=r._endPixel,s=1e-6;let l=r.getPixelForTick(e),u;if(!(t&&(o===1?u=Math.max(l-i,a-l):n===0?u=(r.getPixelForTick(1)-l)/2:u=(l-r.getPixelForTick(e-1))/2,l+=e<n?u:-u,l<i-s||l>a+s)))return l}function Ex(r,n){_e(r,t=>{const o=t.gc,e=o.length/2;let i;if(e>n){for(i=0;i<e;++i)delete t.data[o[i]];o.splice(0,e)}})}function br(r){return r.drawTicks?r.tickLength:0}function Lf(r,n){if(!r.display)return 0;const t=yt(r.font,n),o=bt(r.padding);return(Ze(r.text)?r.text.length:1)*t.lineHeight+o.height}function _x(r,n){return Dn(r,{scale:n,type:"scale"})}function Qx(r,n,t){return Dn(r,{tick:t,index:n,type:"tick"})}function Ux(r,n,t){let o=O1(r);return(t&&n!=="right"||!t&&n==="right")&&(o=Sx(o)),o}function Yx(r,n,t,o){const{top:e,left:i,bottom:a,right:s,chart:l}=r,{chartArea:u,scales:d}=l;let f=0,M,p,y;const j=a-e,v=s-i;if(r.isHorizontal()){if(p=zd(o,i,s),Ae(t)){const h=Object.keys(t)[0],N=t[h];y=d[h].getPixelForValue(N)+j-n}else t==="center"?y=(u.bottom+u.top)/2+j-n:y=Af(r,t,n);M=s-i}else{if(Ae(t)){const h=Object.keys(t)[0],N=t[h];p=d[h].getPixelForValue(N)-v+n}else t==="center"?p=(u.left+u.right)/2-v+n:p=Af(r,t,n);y=zd(o,a,e),f=t==="left"?-Xe:Xe}return{titleX:p,titleY:y,maxWidth:M,rotation:f}}class Pn extends an{constructor(n){super(),this.id=n.id,this.type=n.type,this.options=void 0,this.ctx=n.ctx,this.chart=n.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(n){this.options=n.setContext(this.getContext()),this.axis=n.axis,this._userMin=this.parse(n.min),this._userMax=this.parse(n.max),this._suggestedMin=this.parse(n.suggestedMin),this._suggestedMax=this.parse(n.suggestedMax)}parse(n,t){return n}getUserBounds(){let{_userMin:n,_userMax:t,_suggestedMin:o,_suggestedMax:e}=this;return n=It(n,Number.POSITIVE_INFINITY),t=It(t,Number.NEGATIVE_INFINITY),o=It(o,Number.POSITIVE_INFINITY),e=It(e,Number.NEGATIVE_INFINITY),{min:It(n,o),max:It(t,e),minDefined:ot(n),maxDefined:ot(t)}}getMinMax(n){let{min:t,max:o,minDefined:e,maxDefined:i}=this.getUserBounds(),a;if(e&&i)return{min:t,max:o};const s=this.getMatchingVisibleMetas();for(let l=0,u=s.length;l<u;++l)a=s[l].controller.getMinMax(this,n),e||(t=Math.min(t,a.min)),i||(o=Math.max(o,a.max));return t=i&&t>o?o:t,o=e&&t>o?t:o,{min:It(t,It(o,t)),max:It(o,It(t,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const n=this.chart.data;return this.options.labels||(this.isHorizontal()?n.xLabels:n.yLabels)||n.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$e(this.options.beforeUpdate,[this])}update(n,t,o){const{beginAtZero:e,grace:i,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=n,this.maxHeight=t,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=M4(this,i,e),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?wf(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=kx(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let n=this.options.reverse,t,o;this.isHorizontal()?(t=this.left,o=this.right):(t=this.top,o=this.bottom,n=!n),this._startPixel=t,this._endPixel=o,this._reversePixels=n,this._length=o-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){$e(this.options.afterUpdate,[this])}beforeSetDimensions(){$e(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(){$e(this.options.afterSetDimensions,[this])}_callHooks(n){this.chart.notifyPlugins(n,this.getContext()),$e(this.options[n],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){$e(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(n){const t=this.options.ticks;let o,e,i;for(o=0,e=n.length;o<e;o++)i=n[o],i.label=$e(t.callback,[i.value,o,n],this)}afterTickToLabelConversion(){$e(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){$e(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const n=this.options,t=n.ticks,o=this.ticks.length,e=t.minRotation||0,i=t.maxRotation;let a=e,s,l,u;if(!this._isVisible()||!t.display||e>=i||o<=1||!this.isHorizontal()){this.labelRotation=e;return}const d=this._getLabelSizes(),f=d.widest.width,M=d.highest.height,p=lt(this.chart.width-f,0,this.maxWidth);s=n.offset?this.maxWidth/o:p/(o-1),f+6>s&&(s=p/(o-(n.offset?.5:1)),l=this.maxHeight-br(n.grid)-t.padding-Lf(n.title,this.chart.options.font),u=Math.sqrt(f*f+M*M),a=tl(Math.min(Math.asin(lt((d.highest.height+6)/s,-1,1)),Math.asin(lt(l/u,-1,1))-Math.asin(lt(M/u,-1,1)))),a=Math.max(e,Math.min(i,a))),this.labelRotation=a}afterCalculateLabelRotation(){$e(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$e(this.options.beforeFit,[this])}fit(){const n={width:0,height:0},{chart:t,options:{ticks:o,title:e,grid:i}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=Lf(e,t.options.font);if(s?(n.width=this.maxWidth,n.height=br(i)+l):(n.height=this.maxHeight,n.width=br(i)+l),o.display&&this.ticks.length){const{first:u,last:d,widest:f,highest:M}=this._getLabelSizes(),p=o.padding*2,y=Ct(this.labelRotation),j=Math.cos(y),v=Math.sin(y);if(s){const h=o.mirror?0:v*f.width+j*M.height;n.height=Math.min(this.maxHeight,n.height+h+p)}else{const h=o.mirror?0:j*f.width+v*M.height;n.width=Math.min(this.maxWidth,n.width+h+p)}this._calculatePadding(u,d,v,j)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=n.height):(this.width=n.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(n,t,o,e){const{ticks:{align:i,padding:a},position:s}=this.options,l=this.labelRotation!==0,u=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let M=0,p=0;l?u?(M=e*n.width,p=o*t.height):(M=o*n.height,p=e*t.width):i==="start"?p=t.width:i==="end"?M=n.width:i!=="inner"&&(M=n.width/2,p=t.width/2),this.paddingLeft=Math.max((M-d+a)*this.width/(this.width-d),0),this.paddingRight=Math.max((p-f+a)*this.width/(this.width-f),0)}else{let d=t.height/2,f=n.height/2;i==="start"?(d=0,f=n.height):i==="end"&&(d=t.height,f=0),this.paddingTop=d+a,this.paddingBottom=f+a}}_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(){$e(this.options.afterFit,[this])}isHorizontal(){const{axis:n,position:t}=this.options;return t==="top"||t==="bottom"||n==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(n){this.beforeTickToLabelConversion(),this.generateTickLabels(n);let t,o;for(t=0,o=n.length;t<o;t++)Ce(n[t].label)&&(n.splice(t,1),o--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let n=this._labelSizes;if(!n){const t=this.options.ticks.sampleSize;let o=this.ticks;t<o.length&&(o=wf(o,t)),this._labelSizes=n=this._computeLabelSizes(o,o.length)}return n}_computeLabelSizes(n,t){const{ctx:o,_longestTextCache:e}=this,i=[],a=[];let s=0,l=0,u,d,f,M,p,y,j,v,h,N,D;for(u=0;u<t;++u){if(M=n[u].label,p=this._resolveTickFontOptions(u),o.font=y=p.string,j=e[y]=e[y]||{data:{},gc:[]},v=p.lineHeight,h=N=0,!Ce(M)&&!Ze(M))h=ki(o,j.data,j.gc,h,M),N=v;else if(Ze(M))for(d=0,f=M.length;d<f;++d)D=M[d],!Ce(D)&&!Ze(D)&&(h=ki(o,j.data,j.gc,h,D),N+=v);i.push(h),a.push(N),s=Math.max(h,s),l=Math.max(N,l)}Ex(e,t);const I=i.indexOf(s),m=a.indexOf(l),T=L=>({width:i[L]||0,height:a[L]||0});return{first:T(0),last:T(t-1),widest:T(I),highest:T(m),widths:i,heights:a}}getLabelForValue(n){return n}getPixelForValue(n,t){return NaN}getValueForPixel(n){}getPixelForTick(n){const t=this.ticks;return n<0||n>t.length-1?null:this.getPixelForValue(t[n].value)}getPixelForDecimal(n){this._reversePixels&&(n=1-n);const t=this._startPixel+n*this._length;return k1(this._alignToPixels?Qn(this.chart,t,0):t)}getDecimalForPixel(n){const t=(n-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:n,max:t}=this;return n<0&&t<0?t:n>0&&t>0?n:0}getContext(n){const t=this.ticks||[];if(n>=0&&n<t.length){const o=t[n];return o.$context||(o.$context=Qx(this.getContext(),n,o))}return this.$context||(this.$context=_x(this.chart.getContext(),this))}_tickSize(){const n=this.options.ticks,t=Ct(this.labelRotation),o=Math.abs(Math.cos(t)),e=Math.abs(Math.sin(t)),i=this._getLabelSizes(),a=n.autoSkipPadding||0,s=i?i.widest.width+a:0,l=i?i.highest.height+a:0;return this.isHorizontal()?l*o>s*e?s/o:l/e:l*e<s*o?l/o:s/e}_isVisible(){const n=this.options.display;return n!=="auto"?!!n:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(n){const t=this.axis,o=this.chart,e=this.options,{grid:i,position:a}=e,s=i.offset,l=this.isHorizontal(),d=this.ticks.length+(s?1:0),f=br(i),M=[],p=i.setContext(this.getContext()),y=p.drawBorder?p.borderWidth:0,j=y/2,v=function(w){return Qn(o,w,y)};let h,N,D,I,m,T,L,A,z,S,b,g;if(a==="top")h=v(this.bottom),T=this.bottom-f,A=h-j,S=v(n.top)+j,g=n.bottom;else if(a==="bottom")h=v(this.top),S=n.top,g=v(n.bottom)-j,T=h+j,A=this.top+f;else if(a==="left")h=v(this.right),m=this.right-f,L=h-j,z=v(n.left)+j,b=n.right;else if(a==="right")h=v(this.left),z=n.left,b=v(n.right)-j,m=h+j,L=this.left+f;else if(t==="x"){if(a==="center")h=v((n.top+n.bottom)/2+.5);else if(Ae(a)){const w=Object.keys(a)[0],C=a[w];h=v(this.chart.scales[w].getPixelForValue(C))}S=n.top,g=n.bottom,T=h+j,A=T+f}else if(t==="y"){if(a==="center")h=v((n.left+n.right)/2);else if(Ae(a)){const w=Object.keys(a)[0],C=a[w];h=v(this.chart.scales[w].getPixelForValue(C))}m=h-j,L=m-f,z=n.left,b=n.right}const x=we(e.ticks.maxTicksLimit,d),k=Math.max(1,Math.ceil(d/x));for(N=0;N<d;N+=k){const w=i.setContext(this.getContext(N)),C=w.lineWidth,E=w.color,O=w.borderDash||[],_=w.borderDashOffset,Y=w.tickWidth,U=w.tickColor,Q=w.tickBorderDash||[],B=w.tickBorderDashOffset;D=Cx(this,N,s),D!==void 0&&(I=Qn(o,D,C),l?m=L=z=b=I:T=A=S=g=I,M.push({tx1:m,ty1:T,tx2:L,ty2:A,x1:z,y1:S,x2:b,y2:g,width:C,color:E,borderDash:O,borderDashOffset:_,tickWidth:Y,tickColor:U,tickBorderDash:Q,tickBorderDashOffset:B}))}return this._ticksLength=d,this._borderValue=h,M}_computeLabelItems(n){const t=this.axis,o=this.options,{position:e,ticks:i}=o,a=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:u,padding:d,mirror:f}=i,M=br(o.grid),p=M+d,y=f?-d:p,j=-Ct(this.labelRotation),v=[];let h,N,D,I,m,T,L,A,z,S,b,g,x="middle";if(e==="top")T=this.bottom-y,L=this._getXAxisLabelAlignment();else if(e==="bottom")T=this.top+y,L=this._getXAxisLabelAlignment();else if(e==="left"){const w=this._getYAxisLabelAlignment(M);L=w.textAlign,m=w.x}else if(e==="right"){const w=this._getYAxisLabelAlignment(M);L=w.textAlign,m=w.x}else if(t==="x"){if(e==="center")T=(n.top+n.bottom)/2+p;else if(Ae(e)){const w=Object.keys(e)[0],C=e[w];T=this.chart.scales[w].getPixelForValue(C)+p}L=this._getXAxisLabelAlignment()}else if(t==="y"){if(e==="center")m=(n.left+n.right)/2-p;else if(Ae(e)){const w=Object.keys(e)[0],C=e[w];m=this.chart.scales[w].getPixelForValue(C)}L=this._getYAxisLabelAlignment(M).textAlign}t==="y"&&(l==="start"?x="top":l==="end"&&(x="bottom"));const k=this._getLabelSizes();for(h=0,N=s.length;h<N;++h){D=s[h],I=D.label;const w=i.setContext(this.getContext(h));A=this.getPixelForTick(h)+i.labelOffset,z=this._resolveTickFontOptions(h),S=z.lineHeight,b=Ze(I)?I.length:1;const C=b/2,E=w.color,O=w.textStrokeColor,_=w.textStrokeWidth;let Y=L;a?(m=A,L==="inner"&&(h===N-1?Y=this.options.reverse?"left":"right":h===0?Y=this.options.reverse?"right":"left":Y="center"),e==="top"?u==="near"||j!==0?g=-b*S+S/2:u==="center"?g=-k.highest.height/2-C*S+S:g=-k.highest.height+S/2:u==="near"||j!==0?g=S/2:u==="center"?g=k.highest.height/2-C*S:g=k.highest.height-b*S,f&&(g*=-1)):(T=A,g=(1-b)*S/2);let U;if(w.showLabelBackdrop){const Q=bt(w.backdropPadding),B=k.heights[h],V=k.widths[h];let P=T+g-Q.top,R=m-Q.left;switch(x){case"middle":P-=B/2;break;case"bottom":P-=B;break}switch(L){case"center":R-=V/2;break;case"right":R-=V;break}U={left:R,top:P,width:V+Q.width,height:B+Q.height,color:w.backdropColor}}v.push({rotation:j,label:I,font:z,color:E,strokeColor:O,strokeWidth:_,textOffset:g,textAlign:Y,textBaseline:x,translation:[m,T],backdrop:U})}return v}_getXAxisLabelAlignment(){const{position:n,ticks:t}=this.options;if(-Ct(this.labelRotation))return n==="top"?"left":"right";let e="center";return t.align==="start"?e="left":t.align==="end"?e="right":t.align==="inner"&&(e="inner"),e}_getYAxisLabelAlignment(n){const{position:t,ticks:{crossAlign:o,mirror:e,padding:i}}=this.options,a=this._getLabelSizes(),s=n+i,l=a.widest.width;let u,d;return t==="left"?e?(d=this.right+i,o==="near"?u="left":o==="center"?(u="center",d+=l/2):(u="right",d+=l)):(d=this.right-s,o==="near"?u="right":o==="center"?(u="center",d-=l/2):(u="left",d=this.left)):t==="right"?e?(d=this.left+i,o==="near"?u="right":o==="center"?(u="center",d-=l/2):(u="left",d-=l)):(d=this.left+s,o==="near"?u="left":o==="center"?(u="center",d+=l/2):(u="right",d=this.right)):u="right",{textAlign:u,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const n=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:n.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:n.width}}drawBackground(){const{ctx:n,options:{backgroundColor:t},left:o,top:e,width:i,height:a}=this;t&&(n.save(),n.fillStyle=t,n.fillRect(o,e,i,a),n.restore())}getLineWidthForValue(n){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const e=this.ticks.findIndex(i=>i.value===n);return e>=0?t.setContext(this.getContext(e)).lineWidth:0}drawGrid(n){const t=this.options.grid,o=this.ctx,e=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(n));let i,a;const s=(l,u,d)=>{!d.width||!d.color||(o.save(),o.lineWidth=d.width,o.strokeStyle=d.color,o.setLineDash(d.borderDash||[]),o.lineDashOffset=d.borderDashOffset,o.beginPath(),o.moveTo(l.x,l.y),o.lineTo(u.x,u.y),o.stroke(),o.restore())};if(t.display)for(i=0,a=e.length;i<a;++i){const l=e[i];t.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.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:n,ctx:t,options:{grid:o}}=this,e=o.setContext(this.getContext()),i=o.drawBorder?e.borderWidth:0;if(!i)return;const a=o.setContext(this.getContext(0)).lineWidth,s=this._borderValue;let l,u,d,f;this.isHorizontal()?(l=Qn(n,this.left,i)-i/2,u=Qn(n,this.right,a)+a/2,d=f=s):(d=Qn(n,this.top,i)-i/2,f=Qn(n,this.bottom,a)+a/2,l=u=s),t.save(),t.lineWidth=e.borderWidth,t.strokeStyle=e.borderColor,t.beginPath(),t.moveTo(l,d),t.lineTo(u,f),t.stroke(),t.restore()}drawLabels(n){if(!this.options.ticks.display)return;const o=this.ctx,e=this._computeLabelArea();e&&Fd(o,e);const i=this._labelItems||(this._labelItems=this._computeLabelItems(n));let a,s;for(a=0,s=i.length;a<s;++a){const l=i[a],u=l.font,d=l.label;l.backdrop&&(o.fillStyle=l.backdrop.color,o.fillRect(l.backdrop.left,l.backdrop.top,l.backdrop.width,l.backdrop.height));let f=l.textOffset;Ai(o,d,0,f,u,l)}e&&Gd(o)}drawTitle(){const{ctx:n,options:{position:t,title:o,reverse:e}}=this;if(!o.display)return;const i=yt(o.font),a=bt(o.padding),s=o.align;let l=i.lineHeight/2;t==="bottom"||t==="center"||Ae(t)?(l+=a.bottom,Ze(o.text)&&(l+=i.lineHeight*(o.text.length-1))):l+=a.top;const{titleX:u,titleY:d,maxWidth:f,rotation:M}=Yx(this,l,t,s);Ai(n,o.text,0,0,i,{color:o.color,maxWidth:f,rotation:M,textAlign:Ux(s,t,e),textBaseline:"middle",translation:[u,d]})}draw(n){!this._isVisible()||(this.drawBackground(),this.drawGrid(n),this.drawBorder(),this.drawTitle(),this.drawLabels(n))}_layers(){const n=this.options,t=n.ticks&&n.ticks.z||0,o=we(n.grid&&n.grid.z,-1);return!this._isVisible()||this.draw!==Pn.prototype.draw?[{z:t,draw:e=>{this.draw(e)}}]:[{z:o,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:o+1,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]}getMatchingVisibleMetas(n){const t=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",e=[];let i,a;for(i=0,a=t.length;i<a;++i){const s=t[i];s[o]===this.id&&(!n||s.type===n)&&e.push(s)}return e}_resolveTickFontOptions(n){const t=this.options.ticks.setContext(this.getContext(n));return yt(t.font)}_maxDigits(){const n=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/n}}class Qi{constructor(n,t,o){this.type=n,this.scope=t,this.override=o,this.items=Object.create(null)}isForType(n){return Object.prototype.isPrototypeOf.call(this.type.prototype,n.prototype)}register(n){const t=Object.getPrototypeOf(n);let o;Rx(t)&&(o=this.register(t));const e=this.items,i=n.id,a=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+n);return i in e||(e[i]=n,Bx(n,a,o),this.override&&ke.override(n.id,n.overrides)),a}get(n){return this.items[n]}unregister(n){const t=this.items,o=n.id,e=this.scope;o in t&&delete t[o],e&&o in ke[e]&&(delete ke[e][o],this.override&&delete _n[o])}}function Bx(r,n,t){const o=fr(Object.create(null),[t?ke.get(t):{},ke.get(n),r.defaults]);ke.set(n,o),r.defaultRoutes&&Px(n,r.defaultRoutes),r.descriptors&&ke.describe(n,r.descriptors)}function Px(r,n){Object.keys(n).forEach(t=>{const o=t.split("."),e=o.pop(),i=[r].concat(o).join("."),a=n[t].split("."),s=a.pop(),l=a.join(".");ke.route(i,e,l,s)})}function Rx(r){return"id"in r&&"defaults"in r}class Vx{constructor(){this.controllers=new Qi(_t,"datasets",!0),this.elements=new Qi(an,"elements"),this.plugins=new Qi(Object,"plugins"),this.scales=new Qi(Pn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...n){this._each("register",n)}remove(...n){this._each("unregister",n)}addControllers(...n){this._each("register",n,this.controllers)}addElements(...n){this._each("register",n,this.elements)}addPlugins(...n){this._each("register",n,this.plugins)}addScales(...n){this._each("register",n,this.scales)}getController(n){return this._get(n,this.controllers,"controller")}getElement(n){return this._get(n,this.elements,"element")}getPlugin(n){return this._get(n,this.plugins,"plugin")}getScale(n){return this._get(n,this.scales,"scale")}removeControllers(...n){this._each("unregister",n,this.controllers)}removeElements(...n){this._each("unregister",n,this.elements)}removePlugins(...n){this._each("unregister",n,this.plugins)}removeScales(...n){this._each("unregister",n,this.scales)}_each(n,t,o){[...t].forEach(e=>{const i=o||this._getRegistryForType(e);o||i.isForType(e)||i===this.plugins&&e.id?this._exec(n,i,e):_e(e,a=>{const s=o||this._getRegistryForType(a);this._exec(n,s,a)})})}_exec(n,t,o){const e=el(n);$e(o["before"+e],[],o),t[n](o),$e(o["after"+e],[],o)}_getRegistryForType(n){for(let t=0;t<this._typedRegistries.length;t++){const o=this._typedRegistries[t];if(o.isForType(n))return o}return this.plugins}_get(n,t,o){const e=t.get(n);if(e===void 0)throw new Error('"'+n+'" is not a registered '+o+".");return e}}var Ft=new Vx;class kl extends _t{update(n){const t=this._cachedMeta,{data:o=[]}=t,e=this.chart._animationsDisabled;let{start:i,count:a}=Od(t,o,e);if(this._drawStart=i,this._drawCount=a,Sd(t)&&(i=0,a=o.length),this.options.showLine){const{dataset:s,_dataset:l}=t;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=o;const u=this.resolveDatasetElementOptions(n);u.segment=this.options.segment,this.updateElement(s,void 0,{animated:!e,options:u},n)}this.updateElements(o,i,a,n)}addElements(){const{showLine:n}=this.options;!this.datasetElementType&&n&&(this.datasetElementType=Ft.getElement("line")),super.addElements()}updateElements(n,t,o,e){const i=e==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,d=this.resolveDataElementOptions(t,e),f=this.getSharedOptions(d),M=this.includeOptions(e,f),p=a.axis,y=s.axis,{spanGaps:j,segment:v}=this.options,h=Xn(j)?j:Number.POSITIVE_INFINITY,N=this.chart._animationsDisabled||i||e==="none";let D=t>0&&this.getParsed(t-1);for(let I=t;I<t+o;++I){const m=n[I],T=this.getParsed(I),L=N?m:{},A=Ce(T[y]),z=L[p]=a.getPixelForValue(T[p],I),S=L[y]=i||A?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,T,l):T[y],I);L.skip=isNaN(z)||isNaN(S)||A,L.stop=I>0&&Math.abs(T[p]-D[p])>h,v&&(L.parsed=T,L.raw=u.data[I]),M&&(L.options=f||this.resolveDataElementOptions(I,m.active?"active":e)),N||this.updateElement(m,I,L,e),D=T}this.updateSharedOptions(f,e,d)}getMaxOverflow(){const n=this._cachedMeta,t=n.data||[];if(!this.options.showLine){let s=0;for(let l=t.length-1;l>=0;--l)s=Math.max(s,t[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const o=n.dataset,e=o.options&&o.options.borderWidth||0;if(!t.length)return e;const i=t[0].size(this.resolveDataElementOptions(0)),a=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(e,i,a)/2}}kl.id="scatter",kl.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},kl.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(r){return"("+r.label+", "+r.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Rn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Al{constructor(n){this.options=n||{}}init(n){}formats(){return Rn()}parse(n,t){return Rn()}format(n,t){return Rn()}add(n,t,o){return Rn()}diff(n,t,o){return Rn()}startOf(n,t,o){return Rn()}endOf(n,t){return Rn()}}Al.override=function(r){Object.assign(Al.prototype,r)};var Zx={_date:Al};function Wx(r,n,t,o){const{controller:e,data:i,_sorted:a}=r,s=e._cachedMeta.iScale;if(s&&n===s.axis&&n!=="r"&&a&&i.length){const l=s._reversePixels?A1:En;if(o){if(e._sharedOptions){const u=i[0],d=typeof u.getRange=="function"&&u.getRange(n);if(d){const f=l(i,n,t-d),M=l(i,n,t+d);return{lo:f.lo,hi:M.hi}}}}else return l(i,n,t)}return{lo:0,hi:i.length-1}}function Tr(r,n,t,o,e){const i=r.getSortedVisibleDatasetMetas(),a=t[n];for(let s=0,l=i.length;s<l;++s){const{index:u,data:d}=i[s],{lo:f,hi:M}=Wx(i[s],n,a,e);for(let p=f;p<=M;++p){const y=d[p];y.skip||o(y,u,p)}}}function Hx(r){const n=r.indexOf("x")!==-1,t=r.indexOf("y")!==-1;return function(o,e){const i=n?Math.abs(o.x-e.x):0,a=t?Math.abs(o.y-e.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(a,2))}}function wl(r,n,t,o,e){const i=[];return!e&&!r.isPointInArea(n)||Tr(r,t,n,function(s,l,u){!e&&!Ir(s,r.chartArea,0)||s.inRange(n.x,n.y,o)&&i.push({element:s,datasetIndex:l,index:u})},!0),i}function Fx(r,n,t,o){let e=[];function i(a,s,l){const{startAngle:u,endAngle:d}=a.getProps(["startAngle","endAngle"],o),{angle:f}=bd(a,{x:n.x,y:n.y});pr(f,u,d)&&e.push({element:a,datasetIndex:s,index:l})}return Tr(r,t,n,i),e}function Gx(r,n,t,o,e,i){let a=[];const s=Hx(t);let l=Number.POSITIVE_INFINITY;function u(d,f,M){const p=d.inRange(n.x,n.y,e);if(o&&!p)return;const y=d.getCenterPoint(e);if(!(!!i||r.isPointInArea(y))&&!p)return;const v=s(n,y);v<l?(a=[{element:d,datasetIndex:f,index:M}],l=v):v===l&&a.push({element:d,datasetIndex:f,index:M})}return Tr(r,t,n,u),a}function Ll(r,n,t,o,e,i){return!i&&!r.isPointInArea(n)?[]:t==="r"&&!o?Fx(r,n,t,e):Gx(r,n,t,o,e,i)}function zf(r,n,t,o,e){const i=[],a=t==="x"?"inXRange":"inYRange";let s=!1;return Tr(r,t,n,(l,u,d)=>{l[a](n[t],e)&&(i.push({element:l,datasetIndex:u,index:d}),s=s||l.inRange(n.x,n.y,e))}),o&&!s?[]:i}var $x={evaluateInteractionItems:Tr,modes:{index(r,n,t,o){const e=Yn(n,r),i=t.axis||"x",a=t.includeInvisible||!1,s=t.intersect?wl(r,e,i,o,a):Ll(r,e,i,!1,o,a),l=[];return s.length?(r.getSortedVisibleDatasetMetas().forEach(u=>{const d=s[0].index,f=u.data[d];f&&!f.skip&&l.push({element:f,datasetIndex:u.index,index:d})}),l):[]},dataset(r,n,t,o){const e=Yn(n,r),i=t.axis||"xy",a=t.includeInvisible||!1;let s=t.intersect?wl(r,e,i,o,a):Ll(r,e,i,!1,o,a);if(s.length>0){const l=s[0].datasetIndex,u=r.getDatasetMeta(l).data;s=[];for(let d=0;d<u.length;++d)s.push({element:u[d],datasetIndex:l,index:d})}return s},point(r,n,t,o){const e=Yn(n,r),i=t.axis||"xy",a=t.includeInvisible||!1;return wl(r,e,i,o,a)},nearest(r,n,t,o){const e=Yn(n,r),i=t.axis||"xy",a=t.includeInvisible||!1;return Ll(r,e,i,t.intersect,o,a)},x(r,n,t,o){const e=Yn(n,r);return zf(r,e,"x",t.intersect,o)},y(r,n,t,o){const e=Yn(n,r);return zf(r,e,"y",t.intersect,o)}}};const Of=["left","top","right","bottom"];function kr(r,n){return r.filter(t=>t.pos===n)}function Sf(r,n){return r.filter(t=>Of.indexOf(t.pos)===-1&&t.box.axis===n)}function Ar(r,n){return r.sort((t,o)=>{const e=n?o:t,i=n?t:o;return e.weight===i.weight?e.index-i.index:e.weight-i.weight})}function Jx(r){const n=[];let t,o,e,i,a,s;for(t=0,o=(r||[]).length;t<o;++t)e=r[t],{position:i,options:{stack:a,stackWeight:s=1}}=e,n.push({index:t,box:e,pos:i,horizontal:e.isHorizontal(),weight:e.weight,stack:a&&i+a,stackWeight:s});return n}function Xx(r){const n={};for(const t of r){const{stack:o,pos:e,stackWeight:i}=t;if(!o||!Of.includes(e))continue;const a=n[o]||(n[o]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=i}return n}function Kx(r,n){const t=Xx(r),{vBoxMaxWidth:o,hBoxMaxHeight:e}=n;let i,a,s;for(i=0,a=r.length;i<a;++i){s=r[i];const{fullSize:l}=s.box,u=t[s.stack],d=u&&s.stackWeight/u.weight;s.horizontal?(s.width=d?d*o:l&&n.availableWidth,s.height=e):(s.width=o,s.height=d?d*e:l&&n.availableHeight)}return t}function qx(r){const n=Jx(r),t=Ar(n.filter(u=>u.box.fullSize),!0),o=Ar(kr(n,"left"),!0),e=Ar(kr(n,"right")),i=Ar(kr(n,"top"),!0),a=Ar(kr(n,"bottom")),s=Sf(n,"x"),l=Sf(n,"y");return{fullSize:t,leftAndTop:o.concat(i),rightAndBottom:e.concat(l).concat(a).concat(s),chartArea:kr(n,"chartArea"),vertical:o.concat(e).concat(l),horizontal:i.concat(a).concat(s)}}function Cf(r,n,t,o){return Math.max(r[t],n[t])+Math.max(r[o],n[o])}function Ef(r,n){r.top=Math.max(r.top,n.top),r.left=Math.max(r.left,n.left),r.bottom=Math.max(r.bottom,n.bottom),r.right=Math.max(r.right,n.right)}function ev(r,n,t,o){const{pos:e,box:i}=t,a=r.maxPadding;if(!Ae(e)){t.size&&(r[e]-=t.size);const f=o[t.stack]||{size:0,count:1};f.size=Math.max(f.size,t.horizontal?i.height:i.width),t.size=f.size/f.count,r[e]+=t.size}i.getPadding&&Ef(a,i.getPadding());const s=Math.max(0,n.outerWidth-Cf(a,r,"left","right")),l=Math.max(0,n.outerHeight-Cf(a,r,"top","bottom")),u=s!==r.w,d=l!==r.h;return r.w=s,r.h=l,t.horizontal?{same:u,other:d}:{same:d,other:u}}function tv(r){const n=r.maxPadding;function t(o){const e=Math.max(n[o]-r[o],0);return r[o]+=e,e}r.y+=t("top"),r.x+=t("left"),t("right"),t("bottom")}function nv(r,n){const t=n.maxPadding;function o(e){const i={left:0,top:0,right:0,bottom:0};return e.forEach(a=>{i[a]=Math.max(n[a],t[a])}),i}return o(r?["left","right"]:["top","bottom"])}function wr(r,n,t,o){const e=[];let i,a,s,l,u,d;for(i=0,a=r.length,u=0;i<a;++i){s=r[i],l=s.box,l.update(s.width||n.w,s.height||n.h,nv(s.horizontal,n));const{same:f,other:M}=ev(n,t,s,o);u|=f&&e.length,d=d||M,l.fullSize||e.push(s)}return u&&wr(e,n,t,o)||d}function Ui(r,n,t,o,e){r.top=t,r.left=n,r.right=n+o,r.bottom=t+e,r.width=o,r.height=e}function _f(r,n,t,o){const e=t.padding;let{x:i,y:a}=n;for(const s of r){const l=s.box,u=o[s.stack]||{count:1,placed:0,weight:1},d=s.stackWeight/u.weight||1;if(s.horizontal){const f=n.w*d,M=u.size||l.height;Dt(u.start)&&(a=u.start),l.fullSize?Ui(l,e.left,a,t.outerWidth-e.right-e.left,M):Ui(l,n.left+u.placed,a,f,M),u.start=a,u.placed+=f,a=l.bottom}else{const f=n.h*d,M=u.size||l.width;Dt(u.start)&&(i=u.start),l.fullSize?Ui(l,i,e.top,M,t.outerHeight-e.bottom-e.top):Ui(l,i,n.top+u.placed,M,f),u.start=i,u.placed+=f,i=l.right}}n.x=i,n.y=a}ke.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var Yi={addBox(r,n){r.boxes||(r.boxes=[]),n.fullSize=n.fullSize||!1,n.position=n.position||"top",n.weight=n.weight||0,n._layers=n._layers||function(){return[{z:0,draw(t){n.draw(t)}}]},r.boxes.push(n)},removeBox(r,n){const t=r.boxes?r.boxes.indexOf(n):-1;t!==-1&&r.boxes.splice(t,1)},configure(r,n,t){n.fullSize=t.fullSize,n.position=t.position,n.weight=t.weight},update(r,n,t,o){if(!r)return;const e=bt(r.options.layout.padding),i=Math.max(n-e.width,0),a=Math.max(t-e.height,0),s=qx(r.boxes),l=s.vertical,u=s.horizontal;_e(r.boxes,j=>{typeof j.beforeLayout=="function"&&j.beforeLayout()});const d=l.reduce((j,v)=>v.box.options&&v.box.options.display===!1?j:j+1,0)||1,f=Object.freeze({outerWidth:n,outerHeight:t,padding:e,availableWidth:i,availableHeight:a,vBoxMaxWidth:i/2/d,hBoxMaxHeight:a/2}),M=Object.assign({},e);Ef(M,bt(o));const p=Object.assign({maxPadding:M,w:i,h:a,x:e.left,y:e.top},e),y=Kx(l.concat(u),f);wr(s.fullSize,p,f,y),wr(l,p,f,y),wr(u,p,f,y)&&wr(l,p,f,y),tv(p),_f(s.leftAndTop,p,f,y),p.x+=p.w,p.y+=p.h,_f(s.rightAndBottom,p,f,y),r.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},_e(s.chartArea,j=>{const v=j.box;Object.assign(v,r.chartArea),v.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class Qf{acquireContext(n,t){}releaseContext(n){return!1}addEventListener(n,t,o){}removeEventListener(n,t,o){}getDevicePixelRatio(){return 1}getMaximumSize(n,t,o,e){return t=Math.max(0,t||n.width),o=o||n.height,{width:t,height:Math.max(0,e?Math.floor(t/e):o)}}isAttached(n){return!0}updateConfig(n){}}class rv extends Qf{acquireContext(n){return n&&n.getContext&&n.getContext("2d")||null}updateConfig(n){n.options.animation=!1}}const Bi="$chartjs",ov={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Uf=r=>r===null||r==="";function iv(r,n){const t=r.style,o=r.getAttribute("height"),e=r.getAttribute("width");if(r[Bi]={initial:{height:o,width:e,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",Uf(e)){const i=sf(r,"width");i!==void 0&&(r.width=i)}if(Uf(o))if(r.style.height==="")r.height=r.width/(n||2);else{const i=sf(r,"height");i!==void 0&&(r.height=i)}return r}const Yf=_4?{passive:!0}:!1;function av(r,n,t){r.addEventListener(n,t,Yf)}function sv(r,n,t){r.canvas.removeEventListener(n,t,Yf)}function lv(r,n){const t=ov[r.type]||r.type,{x:o,y:e}=Yn(r,n);return{type:t,chart:n,native:r,x:o!==void 0?o:null,y:e!==void 0?e:null}}function Pi(r,n){for(const t of r)if(t===n||t.contains(n))return!0}function uv(r,n,t){const o=r.canvas,e=new MutationObserver(i=>{let a=!1;for(const s of i)a=a||Pi(s.addedNodes,o),a=a&&!Pi(s.removedNodes,o);a&&t()});return e.observe(document,{childList:!0,subtree:!0}),e}function cv(r,n,t){const o=r.canvas,e=new MutationObserver(i=>{let a=!1;for(const s of i)a=a||Pi(s.removedNodes,o),a=a&&!Pi(s.addedNodes,o);a&&t()});return e.observe(document,{childList:!0,subtree:!0}),e}const Lr=new Map;let Bf=0;function Pf(){const r=window.devicePixelRatio;r!==Bf&&(Bf=r,Lr.forEach((n,t)=>{t.currentDevicePixelRatio!==r&&n()}))}function dv(r,n){Lr.size||window.addEventListener("resize",Pf),Lr.set(r,n)}function fv(r){Lr.delete(r),Lr.size||window.removeEventListener("resize",Pf)}function Mv(r,n,t){const o=r.canvas,e=o&&yl(o);if(!e)return;const i=Ld((s,l)=>{const u=e.clientWidth;t(s,l),u<e.clientWidth&&t()},window),a=new ResizeObserver(s=>{const l=s[0],u=l.contentRect.width,d=l.contentRect.height;u===0&&d===0||i(u,d)});return a.observe(e),dv(r,i),a}function zl(r,n,t){t&&t.disconnect(),n==="resize"&&fv(r)}function gv(r,n,t){const o=r.canvas,e=Ld(i=>{r.ctx!==null&&t(lv(i,r))},r,i=>{const a=i[0];return[a,a.offsetX,a.offsetY]});return av(o,n,e),e}class hv extends Qf{acquireContext(n,t){const o=n&&n.getContext&&n.getContext("2d");return o&&o.canvas===n?(iv(n,t),o):null}releaseContext(n){const t=n.canvas;if(!t[Bi])return!1;const o=t[Bi].initial;["height","width"].forEach(i=>{const a=o[i];Ce(a)?t.removeAttribute(i):t.setAttribute(i,a)});const e=o.style||{};return Object.keys(e).forEach(i=>{t.style[i]=e[i]}),t.width=t.width,delete t[Bi],!0}addEventListener(n,t,o){this.removeEventListener(n,t);const e=n.$proxies||(n.$proxies={}),a={attach:uv,detach:cv,resize:Mv}[t]||gv;e[t]=a(n,t,o)}removeEventListener(n,t){const o=n.$proxies||(n.$proxies={}),e=o[t];if(!e)return;({attach:zl,detach:zl,resize:zl}[t]||sv)(n,t,e),o[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(n,t,o,e){return E4(n,t,o,e)}isAttached(n){const t=yl(n);return!!(t&&t.isConnected)}}function pv(r){return!of()||typeof OffscreenCanvas!="undefined"&&r instanceof OffscreenCanvas?rv:hv}class yv{constructor(){this._init=[]}notify(n,t,o,e){t==="beforeInit"&&(this._init=this._createDescriptors(n,!0),this._notify(this._init,n,"install"));const i=e?this._descriptors(n).filter(e):this._descriptors(n),a=this._notify(i,n,t,o);return t==="afterDestroy"&&(this._notify(i,n,"stop"),this._notify(this._init,n,"uninstall")),a}_notify(n,t,o,e){e=e||{};for(const i of n){const a=i.plugin,s=a[o],l=[t,e,i.options];if($e(s,l,a)===!1&&e.cancelable)return!1}return!0}invalidate(){Ce(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(n){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(n);return this._notifyStateChanges(n),t}_createDescriptors(n,t){const o=n&&n.config,e=we(o.options&&o.options.plugins,{}),i=Nv(o);return e===!1&&!t?[]:jv(n,i,e,t)}_notifyStateChanges(n){const t=this._oldCache||[],o=this._cache,e=(i,a)=>i.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(e(t,o),n,"stop"),this._notify(e(o,t),n,"start")}}function Nv(r){const n={},t=[],o=Object.keys(Ft.plugins.items);for(let i=0;i<o.length;i++)t.push(Ft.getPlugin(o[i]));const e=r.plugins||[];for(let i=0;i<e.length;i++){const a=e[i];t.indexOf(a)===-1&&(t.push(a),n[a.id]=!0)}return{plugins:t,localIds:n}}function mv(r,n){return!n&&r===!1?null:r===!0?{}:r}function jv(r,{plugins:n,localIds:t},o,e){const i=[],a=r.getContext();for(const s of n){const l=s.id,u=mv(o[l],e);u!==null&&i.push({plugin:s,options:Iv(r.config,{plugin:s,local:t[l]},u,a)})}return i}function Iv(r,{plugin:n,local:t},o,e){const i=r.pluginScopeKeys(n),a=r.getOptionScopes(o,i);return t&&n.defaults&&a.push(n.defaults),r.createResolver(a,e,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ol(r,n){const t=ke.datasets[r]||{};return((n.datasets||{})[r]||{}).indexAxis||n.indexAxis||t.indexAxis||"x"}function Dv(r,n){let t=r;return r==="_index_"?t=n:r==="_value_"&&(t=n==="x"?"y":"x"),t}function xv(r,n){return r===n?"_index_":"_value_"}function vv(r){if(r==="top"||r==="bottom")return"x";if(r==="left"||r==="right")return"y"}function Sl(r,n){return r==="x"||r==="y"?r:n.axis||vv(n.position)||r.charAt(0).toLowerCase()}function bv(r,n){const t=_n[r.type]||{scales:{}},o=n.scales||{},e=Ol(r.type,n),i=Object.create(null),a=Object.create(null);return Object.keys(o).forEach(s=>{const l=o[s];if(!Ae(l))return console.error(`Invalid scale configuration for scale: ${s}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const u=Sl(s,l),d=xv(u,e),f=t.scales||{};i[u]=i[u]||s,a[s]=Mr(Object.create(null),[{axis:u},l,f[u],f[d]])}),r.data.datasets.forEach(s=>{const l=s.type||r.type,u=s.indexAxis||Ol(l,n),f=(_n[l]||{}).scales||{};Object.keys(f).forEach(M=>{const p=Dv(M,u),y=s[p+"AxisID"]||i[p]||p;a[y]=a[y]||Object.create(null),Mr(a[y],[{axis:p},o[y],f[M]])})}),Object.keys(a).forEach(s=>{const l=a[s];Mr(l,[ke.scales[l.type],ke.scale])}),a}function Rf(r){const n=r.options||(r.options={});n.plugins=we(n.plugins,{}),n.scales=bv(r,n)}function Vf(r){return r=r||{},r.datasets=r.datasets||[],r.labels=r.labels||[],r}function Tv(r){return r=r||{},r.data=Vf(r.data),Rf(r),r}const Zf=new Map,Wf=new Set;function Ri(r,n){let t=Zf.get(r);return t||(t=n(),Zf.set(r,t),Wf.add(t)),t}const zr=(r,n,t)=>{const o=Nn(n,t);o!==void 0&&r.add(o)};class kv{constructor(n){this._config=Tv(n),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(n){this._config.type=n}get data(){return this._config.data}set data(n){this._config.data=Vf(n)}get options(){return this._config.options}set options(n){this._config.options=n}get plugins(){return this._config.plugins}update(){const n=this._config;this.clearCache(),Rf(n)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(n){return Ri(n,()=>[[`datasets.${n}`,""]])}datasetAnimationScopeKeys(n,t){return Ri(`${n}.transition.${t}`,()=>[[`datasets.${n}.transitions.${t}`,`transitions.${t}`],[`datasets.${n}`,""]])}datasetElementScopeKeys(n,t){return Ri(`${n}-${t}`,()=>[[`datasets.${n}.elements.${t}`,`datasets.${n}`,`elements.${t}`,""]])}pluginScopeKeys(n){const t=n.id,o=this.type;return Ri(`${o}-plugin-${t}`,()=>[[`plugins.${t}`,...n.additionalOptionScopes||[]]])}_cachedScopes(n,t){const o=this._scopeCache;let e=o.get(n);return(!e||t)&&(e=new Map,o.set(n,e)),e}getOptionScopes(n,t,o){const{options:e,type:i}=this,a=this._cachedScopes(n,o),s=a.get(t);if(s)return s;const l=new Set;t.forEach(d=>{n&&(l.add(n),d.forEach(f=>zr(l,n,f))),d.forEach(f=>zr(l,e,f)),d.forEach(f=>zr(l,_n[i]||{},f)),d.forEach(f=>zr(l,ke,f)),d.forEach(f=>zr(l,cl,f))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),Wf.has(t)&&a.set(t,u),u}chartOptionScopes(){const{options:n,type:t}=this;return[n,_n[t]||{},ke.datasets[t]||{},{type:t},ke,cl]}resolveNamedOptions(n,t,o,e=[""]){const i={$shared:!0},{resolver:a,subPrefixes:s}=Hf(this._resolverCache,n,e);let l=a;if(wv(a,t)){i.$shared=!1,o=mn(o)?o():o;const u=this.createResolver(n,o,s);l=er(a,o,u)}for(const u of t)i[u]=l[u];return i}createResolver(n,t,o=[""],e){const{resolver:i}=Hf(this._resolverCache,n,o);return Ae(t)?er(i,t,void 0,e):i}}function Hf(r,n,t){let o=r.get(n);o||(o=new Map,r.set(n,o));const e=t.join();let i=o.get(e);return i||(i={resolver:gl(n,t),subPrefixes:t.filter(s=>!s.toLowerCase().includes("hover"))},o.set(e,i)),i}const Av=r=>Ae(r)&&Object.getOwnPropertyNames(r).reduce((n,t)=>n||mn(r[t]),!1);function wv(r,n){const{isScriptable:t,isIndexable:o}=Jd(r);for(const e of n){const i=t(e),a=o(e),s=(a||i)&&r[e];if(i&&(mn(s)||Av(s))||a&&Ze(s))return!0}return!1}var Lv="3.9.1";const zv=["top","bottom","left","right","chartArea"];function Ff(r,n){return r==="top"||r==="bottom"||zv.indexOf(r)===-1&&n==="x"}function Gf(r,n){return function(t,o){return t[r]===o[r]?t[n]-o[n]:t[r]-o[r]}}function $f(r){const n=r.chart,t=n.options.animation;n.notifyPlugins("afterRender"),$e(t&&t.onComplete,[r],n)}function Ov(r){const n=r.chart,t=n.options.animation;$e(t&&t.onProgress,[r],n)}function Jf(r){return of()&&typeof r=="string"?r=document.getElementById(r):r&&r.length&&(r=r[0]),r&&r.canvas&&(r=r.canvas),r}const Vi={},Xf=r=>{const n=Jf(r);return Object.values(Vi).filter(t=>t.canvas===n).pop()};function Sv(r,n,t){const o=Object.keys(r);for(const e of o){const i=+e;if(i>=n){const a=r[e];delete r[e],(t>0||i>n)&&(r[i+t]=a)}}}function Cv(r,n,t,o){return!t||r.type==="mouseout"?null:o?n:r}class Or{constructor(n,t){const o=this.config=new kv(t),e=Jf(n),i=Xf(e);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const a=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||pv(e)),this.platform.updateConfig(o);const s=this.platform.acquireContext(e,a.aspectRatio),l=s&&s.canvas,u=l&&l.height,d=l&&l.width;if(this.id=h1(),this.ctx=s,this.canvas=l,this.width=d,this.height=u,this._options=a,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 yv,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=z1(f=>this.update(f),a.resizeDelay||0),this._dataChanges=[],Vi[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}on.listen(this,"complete",$f),on.listen(this,"progress",Ov),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:n,maintainAspectRatio:t},width:o,height:e,_aspectRatio:i}=this;return Ce(n)?t&&i?i:e?o/e:null:n}get data(){return this.config.data}set data(n){this.config.data=n}get options(){return this._options}set options(n){this.config.options=n}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():af(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Hd(this.canvas,this.ctx),this}stop(){return on.stop(this),this}resize(n,t){on.running(this)?this._resizeBeforeDraw={width:n,height:t}:this._resize(n,t)}_resize(n,t){const o=this.options,e=this.canvas,i=o.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(e,n,t,i),s=o.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,af(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),$e(o.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};_e(t,(o,e)=>{o.id=e})}buildOrUpdateScales(){const n=this.options,t=n.scales,o=this.scales,e=Object.keys(o).reduce((a,s)=>(a[s]=!1,a),{});let i=[];t&&(i=i.concat(Object.keys(t).map(a=>{const s=t[a],l=Sl(a,s),u=l==="r",d=l==="x";return{options:s,dposition:u?"chartArea":d?"bottom":"left",dtype:u?"radialLinear":d?"category":"linear"}}))),_e(i,a=>{const s=a.options,l=s.id,u=Sl(l,s),d=we(s.type,a.dtype);(s.position===void 0||Ff(s.position,u)!==Ff(a.dposition))&&(s.position=a.dposition),e[l]=!0;let f=null;if(l in o&&o[l].type===d)f=o[l];else{const M=Ft.getScale(d);f=new M({id:l,type:d,ctx:this.ctx,chart:this}),o[f.id]=f}f.init(s,n)}),_e(e,(a,s)=>{a||delete o[s]}),_e(o,a=>{Yi.configure(this,a,a.options),Yi.addBox(this,a)})}_updateMetasets(){const n=this._metasets,t=this.data.datasets.length,o=n.length;if(n.sort((e,i)=>e.index-i.index),o>t){for(let e=t;e<o;++e)this._destroyDatasetMeta(e);n.splice(t,o-t)}this._sortedMetasets=n.slice(0).sort(Gf("order","index"))}_removeUnreferencedMetasets(){const{_metasets:n,data:{datasets:t}}=this;n.length>t.length&&delete this._stacks,n.forEach((o,e)=>{t.filter(i=>i===o._dataset).length===0&&this._destroyDatasetMeta(e)})}buildOrUpdateControllers(){const n=[],t=this.data.datasets;let o,e;for(this._removeUnreferencedMetasets(),o=0,e=t.length;o<e;o++){const i=t[o];let a=this.getDatasetMeta(o);const s=i.type||this.config.type;if(a.type&&a.type!==s&&(this._destroyDatasetMeta(o),a=this.getDatasetMeta(o)),a.type=s,a.indexAxis=i.indexAxis||Ol(s,this.options),a.order=i.order||0,a.index=o,a.label=""+i.label,a.visible=this.isDatasetVisible(o),a.controller)a.controller.updateIndex(o),a.controller.linkScales();else{const l=Ft.getController(s),{datasetElementType:u,dataElementType:d}=ke.datasets[s];Object.assign(l.prototype,{dataElementType:Ft.getElement(d),datasetElementType:u&&Ft.getElement(u)}),a.controller=new l(this,o),n.push(a.controller)}}return this._updateMetasets(),n}_resetElements(){_e(this.data.datasets,(n,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(n){const t=this.config;t.update();const o=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),e=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:n,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let u=0,d=this.data.datasets.length;u<d;u++){const{controller:f}=this.getDatasetMeta(u),M=!e&&i.indexOf(f)===-1;f.buildOrUpdateElements(M),a=Math.max(+f.getMaxOverflow(),a)}a=this._minPadding=o.layout.autoPadding?a:0,this._updateLayout(a),e||_e(i,u=>{u.reset()}),this._updateDatasets(n),this.notifyPlugins("afterUpdate",{mode:n}),this._layers.sort(Gf("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){_e(this.scales,n=>{Yi.removeBox(this,n)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const n=this.options,t=new Set(Object.keys(this._listeners)),o=new Set(n.events);(!jd(t,o)||!!this._responsiveListeners!==n.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:n}=this,t=this._getUniformDataChanges()||[];for(const{method:o,start:e,count:i}of t){const a=o==="_removeElements"?-i:i;Sv(n,e,a)}}_getUniformDataChanges(){const n=this._dataChanges;if(!n||!n.length)return;this._dataChanges=[];const t=this.data.datasets.length,o=i=>new Set(n.filter(a=>a[0]===i).map((a,s)=>s+","+a.splice(1).join(","))),e=o(0);for(let i=1;i<t;i++)if(!jd(e,o(i)))return;return Array.from(e).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(n){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Yi.update(this,this.width,this.height,n);const t=this.chartArea,o=t.width<=0||t.height<=0;this._layers=[],_e(this.boxes,e=>{o&&e.position==="chartArea"||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,i)=>{e._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(n){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:n,cancelable:!0})!==!1){for(let t=0,o=this.data.datasets.length;t<o;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,o=this.data.datasets.length;t<o;++t)this._updateDataset(t,mn(n)?n({datasetIndex:t}):n);this.notifyPlugins("afterDatasetsUpdate",{mode:n})}}_updateDataset(n,t){const o=this.getDatasetMeta(n),e={meta:o,index:n,mode:t,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",e)!==!1&&(o.controller._update(t),e.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",e))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(on.has(this)?this.attached&&!on.running(this)&&on.start(this):(this.draw(),$f({chart:this})))}draw(){let n;if(this._resizeBeforeDraw){const{width:o,height:e}=this._resizeBeforeDraw;this._resize(o,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const t=this._layers;for(n=0;n<t.length&&t[n].z<=0;++n)t[n].draw(this.chartArea);for(this._drawDatasets();n<t.length;++n)t[n].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(n){const t=this._sortedMetasets,o=[];let e,i;for(e=0,i=t.length;e<i;++e){const a=t[e];(!n||a.visible)&&o.push(a)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const n=this.getSortedVisibleDatasetMetas();for(let t=n.length-1;t>=0;--t)this._drawDataset(n[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(n){const t=this.ctx,o=n._clip,e=!o.disabled,i=this.chartArea,a={meta:n,index:n.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(e&&Fd(t,{left:o.left===!1?0:i.left-o.left,right:o.right===!1?this.width:i.right+o.right,top:o.top===!1?0:i.top-o.top,bottom:o.bottom===!1?this.height:i.bottom+o.bottom}),n.controller.draw(),e&&Gd(t),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(n){return Ir(n,this.chartArea,this._minPadding)}getElementsAtEventForMode(n,t,o,e){const i=$x.modes[t];return typeof i=="function"?i(this,n,o,e):[]}getDatasetMeta(n){const t=this.data.datasets[n],o=this._metasets;let e=o.filter(i=>i&&i._dataset===t).pop();return e||(e={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:n,_dataset:t,_parsed:[],_sorted:!1},o.push(e)),e}getContext(){return this.$context||(this.$context=Dn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(n){const t=this.data.datasets[n];if(!t)return!1;const o=this.getDatasetMeta(n);return typeof o.hidden=="boolean"?!o.hidden:!t.hidden}setDatasetVisibility(n,t){const o=this.getDatasetMeta(n);o.hidden=!t}toggleDataVisibility(n){this._hiddenIndices[n]=!this._hiddenIndices[n]}getDataVisibility(n){return!this._hiddenIndices[n]}_updateVisibility(n,t,o){const e=o?"show":"hide",i=this.getDatasetMeta(n),a=i.controller._resolveAnimations(void 0,e);Dt(t)?(i.data[t].hidden=!o,this.update()):(this.setDatasetVisibility(n,o),a.update(i,{visible:o}),this.update(s=>s.datasetIndex===n?e:void 0))}hide(n,t){this._updateVisibility(n,t,!1)}show(n,t){this._updateVisibility(n,t,!0)}_destroyDatasetMeta(n){const t=this._metasets[n];t&&t.controller&&t.controller._destroy(),delete this._metasets[n]}_stop(){let n,t;for(this.stop(),on.remove(this),n=0,t=this.data.datasets.length;n<t;++n)this._destroyDatasetMeta(n)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:n,ctx:t}=this;this._stop(),this.config.clearCache(),n&&(this.unbindEvents(),Hd(n,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete Vi[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...n){return this.canvas.toDataURL(...n)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const n=this._listeners,t=this.platform,o=(i,a)=>{t.addEventListener(this,i,a),n[i]=a},e=(i,a,s)=>{i.offsetX=a,i.offsetY=s,this._eventHandler(i)};_e(this.options.events,i=>o(i,e))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const n=this._responsiveListeners,t=this.platform,o=(l,u)=>{t.addEventListener(this,l,u),n[l]=u},e=(l,u)=>{n[l]&&(t.removeEventListener(this,l,u),delete n[l])},i=(l,u)=>{this.canvas&&this.resize(l,u)};let a;const s=()=>{e("attach",s),this.attached=!0,this.resize(),o("resize",i),o("detach",a)};a=()=>{this.attached=!1,e("resize",i),this._stop(),this._resize(0,0),o("attach",s)},t.isAttached(this.canvas)?s():a()}unbindEvents(){_e(this._listeners,(n,t)=>{this.platform.removeEventListener(this,t,n)}),this._listeners={},_e(this._responsiveListeners,(n,t)=>{this.platform.removeEventListener(this,t,n)}),this._responsiveListeners=void 0}updateHoverStyle(n,t,o){const e=o?"set":"remove";let i,a,s,l;for(t==="dataset"&&(i=this.getDatasetMeta(n[0].datasetIndex),i.controller["_"+e+"DatasetHoverStyle"]()),s=0,l=n.length;s<l;++s){a=n[s];const u=a&&this.getDatasetMeta(a.datasetIndex).controller;u&&u[e+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(n){const t=this._active||[],o=n.map(({datasetIndex:i,index:a})=>{const s=this.getDatasetMeta(i);if(!s)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:s.data[a],index:a}});!Ni(o,t)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,t))}notifyPlugins(n,t,o){return this._plugins.notify(this,n,t,o)}_updateHoverStyles(n,t,o){const e=this.options.hover,i=(l,u)=>l.filter(d=>!u.some(f=>d.datasetIndex===f.datasetIndex&&d.index===f.index)),a=i(t,n),s=o?n:i(n,t);a.length&&this.updateHoverStyle(a,e.mode,!1),s.length&&e.mode&&this.updateHoverStyle(s,e.mode,!0)}_eventHandler(n,t){const o={event:n,replay:t,cancelable:!0,inChartArea:this.isPointInArea(n)},e=a=>(a.options.events||this.options.events).includes(n.native.type);if(this.notifyPlugins("beforeEvent",o,e)===!1)return;const i=this._handleEvent(n,t,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,e),(i||o.changed)&&this.render(),this}_handleEvent(n,t,o){const{_active:e=[],options:i}=this,a=t,s=this._getActiveElements(n,e,o,a),l=I1(n),u=Cv(n,this._lastEvent,o,l);o&&(this._lastEvent=null,$e(i.onHover,[n,s,this],this),l&&$e(i.onClick,[n,s,this],this));const d=!Ni(s,e);return(d||t)&&(this._active=s,this._updateHoverStyles(s,e,t)),this._lastEvent=u,d}_getActiveElements(n,t,o,e){if(n.type==="mouseout")return[];if(!o)return t;const i=this.options.hover;return this.getElementsAtEventForMode(n,i.mode,i,e)}}const Kf=()=>_e(Or.instances,r=>r._plugins.invalidate()),xn=!0;Object.defineProperties(Or,{defaults:{enumerable:xn,value:ke},instances:{enumerable:xn,value:Vi},overrides:{enumerable:xn,value:_n},registry:{enumerable:xn,value:Ft},version:{enumerable:xn,value:Lv},getChart:{enumerable:xn,value:Xf},register:{enumerable:xn,value:(...r)=>{Ft.add(...r),Kf()}},unregister:{enumerable:xn,value:(...r)=>{Ft.remove(...r),Kf()}}});function qf(r,n,t){const{startAngle:o,pixelMargin:e,x:i,y:a,outerRadius:s,innerRadius:l}=n;let u=e/s;r.beginPath(),r.arc(i,a,s,o-u,t+u),l>e?(u=e/l,r.arc(i,a,l,t+u,o-u,!0)):r.arc(i,a,e,t+Xe,o-Xe),r.closePath(),r.clip()}function Ev(r){return Ml(r,["outerStart","outerEnd","innerStart","innerEnd"])}function _v(r,n,t,o){const e=Ev(r.options.borderRadius),i=(t-n)/2,a=Math.min(i,o*n/2),s=l=>{const u=(t-Math.min(i,l))*o/2;return lt(l,0,Math.min(i,u))};return{outerStart:s(e.outerStart),outerEnd:s(e.outerEnd),innerStart:lt(e.innerStart,0,a),innerEnd:lt(e.innerEnd,0,a)}}function nr(r,n,t,o){return{x:t+r*Math.cos(n),y:o+r*Math.sin(n)}}function Cl(r,n,t,o,e,i){const{x:a,y:s,startAngle:l,pixelMargin:u,innerRadius:d}=n,f=Math.max(n.outerRadius+o+t-u,0),M=d>0?d+o+t+u:0;let p=0;const y=e-l;if(o){const w=d>0?d-o:0,C=f>0?f-o:0,E=(w+C)/2,O=E!==0?y*E/(E+o):y;p=(y-O)/2}const j=Math.max(.001,y*f-t/Je)/f,v=(y-j)/2,h=l+v+p,N=e-v-p,{outerStart:D,outerEnd:I,innerStart:m,innerEnd:T}=_v(n,M,f,N-h),L=f-D,A=f-I,z=h+D/L,S=N-I/A,b=M+m,g=M+T,x=h+m/b,k=N-T/g;if(r.beginPath(),i){if(r.arc(a,s,f,z,S),I>0){const E=nr(A,S,a,s);r.arc(E.x,E.y,I,S,N+Xe)}const w=nr(g,N,a,s);if(r.lineTo(w.x,w.y),T>0){const E=nr(g,k,a,s);r.arc(E.x,E.y,T,N+Xe,k+Math.PI)}if(r.arc(a,s,M,N-T/M,h+m/M,!0),m>0){const E=nr(b,x,a,s);r.arc(E.x,E.y,m,x+Math.PI,h-Xe)}const C=nr(L,h,a,s);if(r.lineTo(C.x,C.y),D>0){const E=nr(L,z,a,s);r.arc(E.x,E.y,D,h-Xe,z)}}else{r.moveTo(a,s);const w=Math.cos(z)*f+a,C=Math.sin(z)*f+s;r.lineTo(w,C);const E=Math.cos(S)*f+a,O=Math.sin(S)*f+s;r.lineTo(E,O)}r.closePath()}function Qv(r,n,t,o,e){const{fullCircles:i,startAngle:a,circumference:s}=n;let l=n.endAngle;if(i){Cl(r,n,t,o,a+Be,e);for(let u=0;u<i;++u)r.fill();isNaN(s)||(l=a+s%Be,s%Be===0&&(l+=Be))}return Cl(r,n,t,o,l,e),r.fill(),l}function Uv(r,n,t){const{x:o,y:e,startAngle:i,pixelMargin:a,fullCircles:s}=n,l=Math.max(n.outerRadius-a,0),u=n.innerRadius+a;let d;for(t&&qf(r,n,i+Be),r.beginPath(),r.arc(o,e,u,i+Be,i,!0),d=0;d<s;++d)r.stroke();for(r.beginPath(),r.arc(o,e,l,i,i+Be),d=0;d<s;++d)r.stroke()}function Yv(r,n,t,o,e,i){const{options:a}=n,{borderWidth:s,borderJoinStyle:l}=a,u=a.borderAlign==="inner";!s||(u?(r.lineWidth=s*2,r.lineJoin=l||"round"):(r.lineWidth=s,r.lineJoin=l||"bevel"),n.fullCircles&&Uv(r,n,u),u&&qf(r,n,e),Cl(r,n,t,o,e,i),r.stroke())}class El extends an{constructor(n){super(),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,n&&Object.assign(this,n)}inRange(n,t,o){const e=this.getProps(["x","y"],o),{angle:i,distance:a}=bd(e,{x:n,y:t}),{startAngle:s,endAngle:l,innerRadius:u,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],o),M=this.options.spacing/2,y=we(f,l-s)>=Be||pr(i,s,l),j=Ii(a,u+M,d+M);return y&&j}getCenterPoint(n){const{x:t,y:o,startAngle:e,endAngle:i,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],n),{offset:l,spacing:u}=this.options,d=(e+i)/2,f=(a+s+u+l)/2;return{x:t+Math.cos(d)*f,y:o+Math.sin(d)*f}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:t,circumference:o}=this,e=(t.offset||0)/2,i=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=o>Be?Math.floor(o/Be):0,o===0||this.innerRadius<0||this.outerRadius<0)return;n.save();let s=0;if(e){s=e/2;const u=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(u)*s,Math.sin(u)*s),this.circumference>=Je&&(s=e)}n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor;const l=Qv(n,this,s,i,a);Yv(n,this,s,i,l,a),n.restore()}}El.id="arc",El.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},El.defaultRoutes={backgroundColor:"backgroundColor"};function eM(r,n,t=n){r.lineCap=we(t.borderCapStyle,n.borderCapStyle),r.setLineDash(we(t.borderDash,n.borderDash)),r.lineDashOffset=we(t.borderDashOffset,n.borderDashOffset),r.lineJoin=we(t.borderJoinStyle,n.borderJoinStyle),r.lineWidth=we(t.borderWidth,n.borderWidth),r.strokeStyle=we(t.borderColor,n.borderColor)}function Bv(r,n,t){r.lineTo(t.x,t.y)}function Pv(r){return r.stepped?i4:r.tension||r.cubicInterpolationMode==="monotone"?a4:Bv}function tM(r,n,t={}){const o=r.length,{start:e=0,end:i=o-1}=t,{start:a,end:s}=n,l=Math.max(e,a),u=Math.min(i,s),d=e<a&&i<a||e>s&&i>s;return{count:o,start:l,loop:n.loop,ilen:u<l&&!d?o+u-l:u-l}}function Rv(r,n,t,o){const{points:e,options:i}=n,{count:a,start:s,loop:l,ilen:u}=tM(e,t,o),d=Pv(i);let{move:f=!0,reverse:M}=o||{},p,y,j;for(p=0;p<=u;++p)y=e[(s+(M?u-p:p))%a],!y.skip&&(f?(r.moveTo(y.x,y.y),f=!1):d(r,j,y,M,i.stepped),j=y);return l&&(y=e[(s+(M?u:0))%a],d(r,j,y,M,i.stepped)),!!l}function Vv(r,n,t,o){const e=n.points,{count:i,start:a,ilen:s}=tM(e,t,o),{move:l=!0,reverse:u}=o||{};let d=0,f=0,M,p,y,j,v,h;const N=I=>(a+(u?s-I:I))%i,D=()=>{j!==v&&(r.lineTo(d,v),r.lineTo(d,j),r.lineTo(d,h))};for(l&&(p=e[N(0)],r.moveTo(p.x,p.y)),M=0;M<=s;++M){if(p=e[N(M)],p.skip)continue;const I=p.x,m=p.y,T=I|0;T===y?(m<j?j=m:m>v&&(v=m),d=(f*d+I)/++f):(D(),r.lineTo(I,m),y=T,f=0,j=v=m),h=m}D()}function _l(r){const n=r.options,t=n.borderDash&&n.borderDash.length;return!r._decimated&&!r._loop&&!n.tension&&n.cubicInterpolationMode!=="monotone"&&!n.stepped&&!t?Vv:Rv}function Zv(r){return r.stepped?Q4:r.tension||r.cubicInterpolationMode==="monotone"?U4:Bn}function Wv(r,n,t,o){let e=n._path;e||(e=n._path=new Path2D,n.path(e,t,o)&&e.closePath()),eM(r,n.options),r.stroke(e)}function Hv(r,n,t,o){const{segments:e,options:i}=n,a=_l(n);for(const s of e)eM(r,i,s.style),r.beginPath(),a(r,n,s,{start:t,end:t+o-1})&&r.closePath(),r.stroke()}const Fv=typeof Path2D=="function";function Gv(r,n,t,o){Fv&&!n.options.segment?Wv(r,n,t,o):Hv(r,n,t,o)}class Zi extends an{constructor(n){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,n&&Object.assign(this,n)}updateControlPoints(n,t){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const e=o.spanGaps?this._loop:this._fullLoop;w4(this._points,o,n,e,t),this._pointsUpdated=!0}}set points(n){this._points=n,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=$4(this,this.options.segment))}first(){const n=this.segments,t=this.points;return n.length&&t[n[0].start]}last(){const n=this.segments,t=this.points,o=n.length;return o&&t[n[o-1].end]}interpolate(n,t){const o=this.options,e=n[t],i=this.points,a=H4(this,{property:t,start:e,end:e});if(!a.length)return;const s=[],l=Zv(o);let u,d;for(u=0,d=a.length;u<d;++u){const{start:f,end:M}=a[u],p=i[f],y=i[M];if(p===y){s.push(p);continue}const j=Math.abs((e-p[t])/(y[t]-p[t])),v=l(p,y,j,o.stepped);v[t]=n[t],s.push(v)}return s.length===1?s[0]:s}pathSegment(n,t,o){return _l(this)(n,this,t,o)}path(n,t,o){const e=this.segments,i=_l(this);let a=this._loop;t=t||0,o=o||this.points.length-t;for(const s of e)a&=i(n,this,s,{start:t,end:t+o-1});return!!a}draw(n,t,o,e){const i=this.options||{};(this.points||[]).length&&i.borderWidth&&(n.save(),Gv(n,this,o,e),n.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Zi.id="line",Zi.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Zi.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Zi.descriptors={_scriptable:!0,_indexable:r=>r!=="borderDash"&&r!=="fill"};function nM(r,n,t,o){const e=r.options,{[t]:i}=r.getProps([t],o);return Math.abs(n-i)<e.radius+e.hitRadius}class Ql extends an{constructor(n){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,t,o){const e=this.options,{x:i,y:a}=this.getProps(["x","y"],o);return Math.pow(n-i,2)+Math.pow(t-a,2)<Math.pow(e.hitRadius+e.radius,2)}inXRange(n,t){return nM(this,n,"x",t)}inYRange(n,t){return nM(this,n,"y",t)}getCenterPoint(n){const{x:t,y:o}=this.getProps(["x","y"],n);return{x:t,y:o}}size(n){n=n||this.options||{};let t=n.radius||0;t=Math.max(t,t&&n.hoverRadius||0);const o=t&&n.borderWidth||0;return(t+o)*2}draw(n,t){const o=this.options;this.skip||o.radius<.1||!Ir(this,t,this.size(o)/2)||(n.strokeStyle=o.borderColor,n.lineWidth=o.borderWidth,n.fillStyle=o.backgroundColor,fl(n,o,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}Ql.id="point",Ql.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Ql.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function rM(r,n){const{x:t,y:o,base:e,width:i,height:a}=r.getProps(["x","y","base","width","height"],n);let s,l,u,d,f;return r.horizontal?(f=a/2,s=Math.min(t,e),l=Math.max(t,e),u=o-f,d=o+f):(f=i/2,s=t-f,l=t+f,u=Math.min(o,e),d=Math.max(o,e)),{left:s,top:u,right:l,bottom:d}}function vn(r,n,t,o){return r?0:lt(n,t,o)}function $v(r,n,t){const o=r.options.borderWidth,e=r.borderSkipped,i=$d(o);return{t:vn(e.top,i.top,0,t),r:vn(e.right,i.right,0,n),b:vn(e.bottom,i.bottom,0,t),l:vn(e.left,i.left,0,n)}}function Jv(r,n,t){const{enableBorderRadius:o}=r.getProps(["enableBorderRadius"]),e=r.options.borderRadius,i=qn(e),a=Math.min(n,t),s=r.borderSkipped,l=o||Ae(e);return{topLeft:vn(!l||s.top||s.left,i.topLeft,0,a),topRight:vn(!l||s.top||s.right,i.topRight,0,a),bottomLeft:vn(!l||s.bottom||s.left,i.bottomLeft,0,a),bottomRight:vn(!l||s.bottom||s.right,i.bottomRight,0,a)}}function Xv(r){const n=rM(r),t=n.right-n.left,o=n.bottom-n.top,e=$v(r,t/2,o/2),i=Jv(r,t/2,o/2);return{outer:{x:n.left,y:n.top,w:t,h:o,radius:i},inner:{x:n.left+e.l,y:n.top+e.t,w:t-e.l-e.r,h:o-e.t-e.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(e.t,e.l)),topRight:Math.max(0,i.topRight-Math.max(e.t,e.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(e.b,e.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(e.b,e.r))}}}}function Ul(r,n,t,o){const e=n===null,i=t===null,s=r&&!(e&&i)&&rM(r,o);return s&&(e||Ii(n,s.left,s.right))&&(i||Ii(t,s.top,s.bottom))}function Kv(r){return r.topLeft||r.topRight||r.bottomLeft||r.bottomRight}function qv(r,n){r.rect(n.x,n.y,n.w,n.h)}function Yl(r,n,t={}){const o=r.x!==t.x?-n:0,e=r.y!==t.y?-n:0,i=(r.x+r.w!==t.x+t.w?n:0)-o,a=(r.y+r.h!==t.y+t.h?n:0)-e;return{x:r.x+o,y:r.y+e,w:r.w+i,h:r.h+a,radius:r.radius}}class Wi extends an{constructor(n){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,n&&Object.assign(this,n)}draw(n){const{inflateAmount:t,options:{borderColor:o,backgroundColor:e}}=this,{inner:i,outer:a}=Xv(this),s=Kv(a.radius)?wi:qv;n.save(),(a.w!==i.w||a.h!==i.h)&&(n.beginPath(),s(n,Yl(a,t,i)),n.clip(),s(n,Yl(i,-t,a)),n.fillStyle=o,n.fill("evenodd")),n.beginPath(),s(n,Yl(i,t)),n.fillStyle=e,n.fill(),n.restore()}inRange(n,t,o){return Ul(this,n,t,o)}inXRange(n,t){return Ul(this,n,null,t)}inYRange(n,t){return Ul(this,null,n,t)}getCenterPoint(n){const{x:t,y:o,base:e,horizontal:i}=this.getProps(["x","y","base","horizontal"],n);return{x:i?(t+e)/2:t,y:i?o:(o+e)/2}}getRange(n){return n==="x"?this.width/2:this.height/2}}Wi.id="bar",Wi.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Wi.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};const Sr={average(r){if(!r.length)return!1;let n,t,o=0,e=0,i=0;for(n=0,t=r.length;n<t;++n){const a=r[n].element;if(a&&a.hasValue()){const s=a.tooltipPosition();o+=s.x,e+=s.y,++i}}return{x:o/i,y:e/i}},nearest(r,n){if(!r.length)return!1;let t=n.x,o=n.y,e=Number.POSITIVE_INFINITY,i,a,s;for(i=0,a=r.length;i<a;++i){const l=r[i].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),d=nl(n,u);d<e&&(e=d,s=l)}}if(s){const l=s.tooltipPosition();t=l.x,o=l.y}return{x:t,y:o}}};function Gt(r,n){return n&&(Ze(n)?Array.prototype.push.apply(r,n):r.push(n)),r}function sn(r){return(typeof r=="string"||r instanceof String)&&r.indexOf(`
18
18
  `)>-1?r.split(`
19
- `):r}function eb(r,n){const{element:t,datasetIndex:o,index:e}=n,i=r.getDatasetMeta(o).controller,{label:a,value:s}=i.getLabelAndValue(e);return{chart:r,label:a,parsed:i.getParsed(e),raw:r.data.datasets[o].data[e],formattedValue:s,dataset:i.getDataset(),dataIndex:e,datasetIndex:o,element:t}}function oM(r,n){const t=r.chart.ctx,{body:o,footer:e,title:i}=r,{boxWidth:a,boxHeight:s}=n,l=yt(n.bodyFont),u=yt(n.titleFont),d=yt(n.footerFont),f=i.length,M=e.length,p=o.length,y=bt(n.padding);let j=y.height,v=0,h=o.reduce((I,m)=>I+m.before.length+m.lines.length+m.after.length,0);if(h+=r.beforeBody.length+r.afterBody.length,f&&(j+=f*u.lineHeight+(f-1)*n.titleSpacing+n.titleMarginBottom),h){const I=n.displayColors?Math.max(s,l.lineHeight):l.lineHeight;j+=p*I+(h-p)*l.lineHeight+(h-1)*n.bodySpacing}M&&(j+=n.footerMarginTop+M*d.lineHeight+(M-1)*n.footerSpacing);let N=0;const D=function(I){v=Math.max(v,t.measureText(I).width+N)};return t.save(),t.font=u.string,_e(r.title,D),t.font=l.string,_e(r.beforeBody.concat(r.afterBody),D),N=n.displayColors?a+2+n.boxPadding:0,_e(o,I=>{_e(I.before,D),_e(I.lines,D),_e(I.after,D)}),N=0,t.font=d.string,_e(r.footer,D),t.restore(),v+=y.width,{width:v,height:j}}function tb(r,n){const{y:t,height:o}=n;return t<o/2?"top":t>r.height-o/2?"bottom":"center"}function nb(r,n,t,o){const{x:e,width:i}=o,a=t.caretSize+t.caretPadding;if(r==="left"&&e+i+a>n.width||r==="right"&&e-i-a<0)return!0}function rb(r,n,t,o){const{x:e,width:i}=t,{width:a,chartArea:{left:s,right:l}}=r;let u="center";return o==="center"?u=e<=(s+l)/2?"left":"right":e<=i/2?u="left":e>=a-i/2&&(u="right"),nb(u,r,n,t)&&(u="center"),u}function iM(r,n,t){const o=t.yAlign||n.yAlign||tb(r,t);return{xAlign:t.xAlign||n.xAlign||rb(r,n,t,o),yAlign:o}}function ob(r,n){let{x:t,width:o}=r;return n==="right"?t-=o:n==="center"&&(t-=o/2),t}function ib(r,n,t){let{y:o,height:e}=r;return n==="top"?o+=t:n==="bottom"?o-=e+t:o-=e/2,o}function aM(r,n,t,o){const{caretSize:e,caretPadding:i,cornerRadius:a}=r,{xAlign:s,yAlign:l}=t,u=e+i,{topLeft:d,topRight:f,bottomLeft:M,bottomRight:p}=qn(a);let y=ob(n,s);const j=ib(n,l,u);return l==="center"?s==="left"?y+=u:s==="right"&&(y-=u):s==="left"?y-=Math.max(d,M)+e:s==="right"&&(y+=Math.max(f,p)+e),{x:lt(y,0,o.width-n.width),y:lt(j,0,o.height-n.height)}}function Hi(r,n,t){const o=bt(t.padding);return n==="center"?r.x+r.width/2:n==="right"?r.x+r.width-o.right:r.x+o.left}function sM(r){return Gt([],sn(r))}function ab(r,n,t){return Dn(r,{tooltip:n,tooltipItems:t,type:"tooltip"})}function lM(r,n){const t=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return t?r.override(t):r}class Bl extends an{constructor(n){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=n.chart||n._chart,this._chart=this.chart,this.options=n.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(n){this.options=n,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const n=this._cachedAnimations;if(n)return n;const t=this.chart,o=this.options.setContext(this.getContext()),e=o.enabled&&t.options.animation&&o.animations,i=new gf(this.chart,e);return e._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=ab(this.chart.getContext(),this,this._tooltipItems))}getTitle(n,t){const{callbacks:o}=t,e=o.beforeTitle.apply(this,[n]),i=o.title.apply(this,[n]),a=o.afterTitle.apply(this,[n]);let s=[];return s=Gt(s,sn(e)),s=Gt(s,sn(i)),s=Gt(s,sn(a)),s}getBeforeBody(n,t){return sM(t.callbacks.beforeBody.apply(this,[n]))}getBody(n,t){const{callbacks:o}=t,e=[];return _e(n,i=>{const a={before:[],lines:[],after:[]},s=lM(o,i);Gt(a.before,sn(s.beforeLabel.call(this,i))),Gt(a.lines,s.label.call(this,i)),Gt(a.after,sn(s.afterLabel.call(this,i))),e.push(a)}),e}getAfterBody(n,t){return sM(t.callbacks.afterBody.apply(this,[n]))}getFooter(n,t){const{callbacks:o}=t,e=o.beforeFooter.apply(this,[n]),i=o.footer.apply(this,[n]),a=o.afterFooter.apply(this,[n]);let s=[];return s=Gt(s,sn(e)),s=Gt(s,sn(i)),s=Gt(s,sn(a)),s}_createItems(n){const t=this._active,o=this.chart.data,e=[],i=[],a=[];let s=[],l,u;for(l=0,u=t.length;l<u;++l)s.push(eb(this.chart,t[l]));return n.filter&&(s=s.filter((d,f,M)=>n.filter(d,f,M,o))),n.itemSort&&(s=s.sort((d,f)=>n.itemSort(d,f,o))),_e(s,d=>{const f=lM(n.callbacks,d);e.push(f.labelColor.call(this,d)),i.push(f.labelPointStyle.call(this,d)),a.push(f.labelTextColor.call(this,d))}),this.labelColors=e,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=s,s}update(n,t){const o=this.options.setContext(this.getContext()),e=this._active;let i,a=[];if(!e.length)this.opacity!==0&&(i={opacity:0});else{const s=Sr[o.position].call(this,e,this._eventPosition);a=this._createItems(o),this.title=this.getTitle(a,o),this.beforeBody=this.getBeforeBody(a,o),this.body=this.getBody(a,o),this.afterBody=this.getAfterBody(a,o),this.footer=this.getFooter(a,o);const l=this._size=oM(this,o),u=Object.assign({},s,l),d=iM(this.chart,o,u),f=aM(o,u,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,i={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),n&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(n,t,o,e){const i=this.getCaretPosition(n,o,e);t.lineTo(i.x1,i.y1),t.lineTo(i.x2,i.y2),t.lineTo(i.x3,i.y3)}getCaretPosition(n,t,o){const{xAlign:e,yAlign:i}=this,{caretSize:a,cornerRadius:s}=o,{topLeft:l,topRight:u,bottomLeft:d,bottomRight:f}=qn(s),{x:M,y:p}=n,{width:y,height:j}=t;let v,h,N,D,I,m;return i==="center"?(I=p+j/2,e==="left"?(v=M,h=v-a,D=I+a,m=I-a):(v=M+y,h=v+a,D=I-a,m=I+a),N=v):(e==="left"?h=M+Math.max(l,d)+a:e==="right"?h=M+y-Math.max(u,f)-a:h=this.caretX,i==="top"?(D=p,I=D-a,v=h-a,N=h+a):(D=p+j,I=D+a,v=h+a,N=h-a),m=D),{x1:v,x2:h,x3:N,y1:D,y2:I,y3:m}}drawTitle(n,t,o){const e=this.title,i=e.length;let a,s,l;if(i){const u=ml(o.rtl,this.x,this.width);for(n.x=Hi(this,o.titleAlign,o),t.textAlign=u.textAlign(o.titleAlign),t.textBaseline="middle",a=yt(o.titleFont),s=o.titleSpacing,t.fillStyle=o.titleColor,t.font=a.string,l=0;l<i;++l)t.fillText(e[l],u.x(n.x),n.y+a.lineHeight/2),n.y+=a.lineHeight+s,l+1===i&&(n.y+=o.titleMarginBottom-s)}}_drawColorBox(n,t,o,e,i){const a=this.labelColors[o],s=this.labelPointStyles[o],{boxHeight:l,boxWidth:u,boxPadding:d}=i,f=yt(i.bodyFont),M=Hi(this,"left",i),p=e.x(M),y=l<f.lineHeight?(f.lineHeight-l)/2:0,j=t.y+y;if(i.usePointStyle){const v={radius:Math.min(u,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},h=e.leftForLtr(p,u)+u/2,N=j+l/2;n.strokeStyle=i.multiKeyBackground,n.fillStyle=i.multiKeyBackground,fl(n,v,h,N),n.strokeStyle=a.borderColor,n.fillStyle=a.backgroundColor,fl(n,v,h,N)}else{n.lineWidth=Ae(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,n.strokeStyle=a.borderColor,n.setLineDash(a.borderDash||[]),n.lineDashOffset=a.borderDashOffset||0;const v=e.leftForLtr(p,u-d),h=e.leftForLtr(e.xPlus(p,1),u-d-2),N=qn(a.borderRadius);Object.values(N).some(D=>D!==0)?(n.beginPath(),n.fillStyle=i.multiKeyBackground,wi(n,{x:v,y:j,w:u,h:l,radius:N}),n.fill(),n.stroke(),n.fillStyle=a.backgroundColor,n.beginPath(),wi(n,{x:h,y:j+1,w:u-2,h:l-2,radius:N}),n.fill()):(n.fillStyle=i.multiKeyBackground,n.fillRect(v,j,u,l),n.strokeRect(v,j,u,l),n.fillStyle=a.backgroundColor,n.fillRect(h,j+1,u-2,l-2))}n.fillStyle=this.labelTextColors[o]}drawBody(n,t,o){const{body:e}=this,{bodySpacing:i,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:u,boxPadding:d}=o,f=yt(o.bodyFont);let M=f.lineHeight,p=0;const y=ml(o.rtl,this.x,this.width),j=function(A){t.fillText(A,y.x(n.x+p),n.y+M/2),n.y+=M+i},v=y.textAlign(a);let h,N,D,I,m,T,L;for(t.textAlign=a,t.textBaseline="middle",t.font=f.string,n.x=Hi(this,v,o),t.fillStyle=o.bodyColor,_e(this.beforeBody,j),p=s&&v!=="right"?a==="center"?u/2+d:u+2+d:0,I=0,T=e.length;I<T;++I){for(h=e[I],N=this.labelTextColors[I],t.fillStyle=N,_e(h.before,j),D=h.lines,s&&D.length&&(this._drawColorBox(t,n,I,y,o),M=Math.max(f.lineHeight,l)),m=0,L=D.length;m<L;++m)j(D[m]),M=f.lineHeight;_e(h.after,j)}p=0,M=f.lineHeight,_e(this.afterBody,j),n.y-=i}drawFooter(n,t,o){const e=this.footer,i=e.length;let a,s;if(i){const l=ml(o.rtl,this.x,this.width);for(n.x=Hi(this,o.footerAlign,o),n.y+=o.footerMarginTop,t.textAlign=l.textAlign(o.footerAlign),t.textBaseline="middle",a=yt(o.footerFont),t.fillStyle=o.footerColor,t.font=a.string,s=0;s<i;++s)t.fillText(e[s],l.x(n.x),n.y+a.lineHeight/2),n.y+=a.lineHeight+o.footerSpacing}}drawBackground(n,t,o,e){const{xAlign:i,yAlign:a}=this,{x:s,y:l}=n,{width:u,height:d}=o,{topLeft:f,topRight:M,bottomLeft:p,bottomRight:y}=qn(e.cornerRadius);t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.beginPath(),t.moveTo(s+f,l),a==="top"&&this.drawCaret(n,t,o,e),t.lineTo(s+u-M,l),t.quadraticCurveTo(s+u,l,s+u,l+M),a==="center"&&i==="right"&&this.drawCaret(n,t,o,e),t.lineTo(s+u,l+d-y),t.quadraticCurveTo(s+u,l+d,s+u-y,l+d),a==="bottom"&&this.drawCaret(n,t,o,e),t.lineTo(s+p,l+d),t.quadraticCurveTo(s,l+d,s,l+d-p),a==="center"&&i==="left"&&this.drawCaret(n,t,o,e),t.lineTo(s,l+f),t.quadraticCurveTo(s,l,s+f,l),t.closePath(),t.fill(),e.borderWidth>0&&t.stroke()}_updateAnimationTarget(n){const t=this.chart,o=this.$animations,e=o&&o.x,i=o&&o.y;if(e||i){const a=Sr[n.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=oM(this,n),l=Object.assign({},a,this._size),u=iM(t,n,l),d=aM(n,l,u,t);(e._to!==d.x||i._to!==d.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(n){const t=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(t);const e={width:this.width,height:this.height},i={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const a=bt(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(n.save(),n.globalAlpha=o,this.drawBackground(i,n,e,t),R4(n,t.textDirection),i.y+=a.top,this.drawTitle(i,n,t),this.drawBody(i,n,t),this.drawFooter(i,n,t),V4(n,t.textDirection),n.restore())}getActiveElements(){return this._active||[]}setActiveElements(n,t){const o=this._active,e=n.map(({datasetIndex:s,index:l})=>{const u=this.chart.getDatasetMeta(s);if(!u)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:u.data[l],index:l}}),i=!Ni(o,e),a=this._positionChanged(e,t);(i||a)&&(this._active=e,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(n,t,o=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const e=this.options,i=this._active||[],a=this._getActiveElements(n,i,t,o),s=this._positionChanged(a,n),l=t||!Ni(a,i)||s;return l&&(this._active=a,(e.enabled||e.external)&&(this._eventPosition={x:n.x,y:n.y},this.update(!0,t))),l}_getActiveElements(n,t,o,e){const i=this.options;if(n.type==="mouseout")return[];if(!e)return t;const a=this.chart.getElementsAtEventForMode(n,i.mode,i,o);return i.reverse&&a.reverse(),a}_positionChanged(n,t){const{caretX:o,caretY:e,options:i}=this,a=Sr[i.position].call(this,n,t);return a!==!1&&(o!==a.x||e!==a.y)}}Bl.positioners=Sr;var sb={id:"tooltip",_element:Bl,positioners:Sr,afterInit(r,n,t){t&&(r.tooltip=new Bl({chart:r,options:t}))},beforeUpdate(r,n,t){r.tooltip&&r.tooltip.initialize(t)},reset(r,n,t){r.tooltip&&r.tooltip.initialize(t)},afterDraw(r){const n=r.tooltip;if(n&&n._willRender()){const t={tooltip:n};if(r.notifyPlugins("beforeTooltipDraw",t)===!1)return;n.draw(r.ctx),r.notifyPlugins("afterTooltipDraw",t)}},afterEvent(r,n){if(r.tooltip){const t=n.replay;r.tooltip.handleEvent(n.event,t,n.inChartArea)&&(n.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:(r,n)=>n.bodyFont.size,boxWidth:(r,n)=>n.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:{beforeTitle:nn,title(r){if(r.length>0){const n=r[0],t=n.chart.data.labels,o=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return n.dataset.label||"";if(n.label)return n.label;if(o>0&&n.dataIndex<o)return t[n.dataIndex]}return""},afterTitle:nn,beforeBody:nn,beforeLabel:nn,label(r){if(this&&this.options&&this.options.mode==="dataset")return r.label+": "+r.formattedValue||r.formattedValue;let n=r.dataset.label||"";n&&(n+=": ");const t=r.formattedValue;return Ce(t)||(n+=t),n},labelColor(r){const t=r.chart.getDatasetMeta(r.datasetIndex).controller.getStyle(r.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(r){const t=r.chart.getDatasetMeta(r.datasetIndex).controller.getStyle(r.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:nn,afterBody:nn,beforeFooter:nn,footer:nn,afterFooter:nn}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:r=>r!=="filter"&&r!=="itemSort"&&r!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const lb=(r,n,t,o)=>(typeof n=="string"?(t=r.push(n)-1,o.unshift({index:t,label:n})):isNaN(n)&&(t=null),t);function ub(r,n,t,o){const e=r.indexOf(n);if(e===-1)return lb(r,n,t,o);const i=r.lastIndexOf(n);return e!==i?t:e}const cb=(r,n)=>r===null?null:lt(Math.round(r),0,n);class Fi extends Pn{constructor(n){super(n),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(n){const t=this._addedLabels;if(t.length){const o=this.getLabels();for(const{index:e,label:i}of t)o[e]===i&&o.splice(e,1);this._addedLabels=[]}super.init(n)}parse(n,t){if(Ce(n))return null;const o=this.getLabels();return t=isFinite(t)&&o[t]===n?t:ub(o,n,we(t,n),this._addedLabels),cb(t,o.length-1)}determineDataLimits(){const{minDefined:n,maxDefined:t}=this.getUserBounds();let{min:o,max:e}=this.getMinMax(!0);this.options.bounds==="ticks"&&(n||(o=0),t||(e=this.getLabels().length-1)),this.min=o,this.max=e}buildTicks(){const n=this.min,t=this.max,o=this.options.offset,e=[];let i=this.getLabels();i=n===0&&t===i.length-1?i:i.slice(n,t+1),this._valueRange=Math.max(i.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let a=n;a<=t;a++)e.push({value:a});return e}getLabelForValue(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(n){return typeof n!="number"&&(n=this.parse(n)),n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getPixelForTick(n){const t=this.ticks;return n<0||n>t.length-1?null:this.getPixelForValue(t[n].value)}getValueForPixel(n){return Math.round(this._startValue+this.getDecimalForPixel(n)*this._valueRange)}getBasePixel(){return this.bottom}}Fi.id="category",Fi.defaults={ticks:{callback:Fi.prototype.getLabelForValue}};function db(r,n){const t=[],{bounds:e,step:i,min:a,max:s,precision:l,count:u,maxTicks:d,maxDigits:f,includeBounds:M}=r,p=i||1,y=d-1,{min:j,max:v}=n,h=!Ce(a),N=!Ce(s),D=!Ce(u),I=(v-j)/(f+1);let m=Dd((v-j)/y/p)*p,T,L,A,z;if(m<1e-14&&!h&&!N)return[{value:j},{value:v}];z=Math.ceil(v/m)-Math.floor(j/m),z>y&&(m=Dd(z*m/y/p)*p),Ce(l)||(T=Math.pow(10,l),m=Math.ceil(m*T)/T),e==="ticks"?(L=Math.floor(j/m)*m,A=Math.ceil(v/m)*m):(L=j,A=v),h&&N&&i&&b1((s-a)/i,m/1e3)?(z=Math.round(Math.min((s-a)/m,d)),m=(s-a)/z,L=a,A=s):D?(L=h?a:L,A=N?s:A,z=u-1,m=(A-L)/z):(z=(A-L)/m,hr(z,Math.round(z),m/1e3)?z=Math.round(z):z=Math.ceil(z));const S=Math.max(vd(m),vd(L));T=Math.pow(10,Ce(l)?S:l),L=Math.round(L*T)/T,A=Math.round(A*T)/T;let b=0;for(h&&(M&&L!==a?(t.push({value:a}),L<a&&b++,hr(Math.round((L+b*m)*T)/T,a,uM(a,I,r))&&b++):L<a&&b++);b<z;++b)t.push({value:Math.round((L+b*m)*T)/T});return N&&M&&A!==s?t.length&&hr(t[t.length-1].value,s,uM(s,I,r))?t[t.length-1].value=s:t.push({value:s}):(!N||A===s)&&t.push({value:A}),t}function uM(r,n,{horizontal:t,minRotation:o}){const e=Ct(o),i=(t?Math.sin(e):Math.cos(e))||.001,a=.75*n*(""+r).length;return Math.min(n/i,a)}class Gi extends Pn{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(n,t){return Ce(n)||(typeof n=="number"||n instanceof Number)&&!isFinite(+n)?null:+n}handleTickRangeOptions(){const{beginAtZero:n}=this.options,{minDefined:t,maxDefined:o}=this.getUserBounds();let{min:e,max:i}=this;const a=l=>e=t?e:l,s=l=>i=o?i:l;if(n){const l=Ht(e),u=Ht(i);l<0&&u<0?s(0):l>0&&u>0&&a(0)}if(e===i){let l=1;(i>=Number.MAX_SAFE_INTEGER||e<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(i*.05)),s(i+l),n||a(e-l)}this.min=e,this.max=i}getTickLimit(){const n=this.options.ticks;let{maxTicksLimit:t,stepSize:o}=n,e;return o?(e=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),t=t||11),t&&(e=Math.min(t,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const n=this.options,t=n.ticks;let o=this.getTickLimit();o=Math.max(2,o);const e={maxTicks:o,bounds:n.bounds,min:n.min,max:n.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},i=this._range||this,a=db(e,i);return n.bounds==="ticks"&&xd(a,this,"value"),n.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const n=this.ticks;let t=this.min,o=this.max;if(super.configure(),this.options.offset&&n.length){const e=(o-t)/Math.max(n.length-1,1)/2;t-=e,o+=e}this._startValue=t,this._endValue=o,this._valueRange=o-t}getLabelForValue(n){return Dr(n,this.chart.options.locale,this.options.ticks.format)}}class Pl extends Gi{determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=ot(n)?n:0,this.max=ot(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const n=this.isHorizontal(),t=n?this.width:this.height,o=Ct(this.options.ticks.minRotation),e=(n?Math.sin(o):Math.cos(o))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,i.lineHeight/e))}getPixelForValue(n){return n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getValueForPixel(n){return this._startValue+this.getDecimalForPixel(n)*this._valueRange}}Pl.id="linear",Pl.defaults={ticks:{callback:Ei.formatters.numeric}};function cM(r){return r/Math.pow(10,Math.floor(xt(r)))===1}function fb(r,n){const t=Math.floor(xt(n.max)),o=Math.ceil(n.max/Math.pow(10,t)),e=[];let i=It(r.min,Math.pow(10,Math.floor(xt(n.min)))),a=Math.floor(xt(i)),s=Math.floor(i/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do e.push({value:i,major:cM(i)}),++s,s===10&&(s=1,++a,l=a>=0?1:l),i=Math.round(s*Math.pow(10,a)*l)/l;while(a<t||a===t&&s<o);const u=It(r.max,i);return e.push({value:u,major:cM(i)}),e}class dM extends Pn{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(n,t){const o=Gi.prototype.parse.apply(this,[n,t]);if(o===0){this._zero=!0;return}return ot(o)&&o>0?o:null}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=ot(n)?Math.max(0,n):null,this.max=ot(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:n,maxDefined:t}=this.getUserBounds();let o=this.min,e=this.max;const i=l=>o=n?o:l,a=l=>e=t?e:l,s=(l,u)=>Math.pow(10,Math.floor(xt(l))+u);o===e&&(o<=0?(i(1),a(10)):(i(s(o,-1)),a(s(e,1)))),o<=0&&i(s(e,-1)),e<=0&&a(s(o,1)),this._zero&&this.min!==this._suggestedMin&&o===s(this.min,0)&&i(s(o,-1)),this.min=o,this.max=e}buildTicks(){const n=this.options,t={min:this._userMin,max:this._userMax},o=fb(t,this);return n.bounds==="ticks"&&xd(o,this,"value"),n.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(n){return n===void 0?"0":Dr(n,this.chart.options.locale,this.options.ticks.format)}configure(){const n=this.min;super.configure(),this._startValue=xt(n),this._valueRange=xt(this.max)-xt(n)}getPixelForValue(n){return(n===void 0||n===0)&&(n=this.min),n===null||isNaN(n)?NaN:this.getPixelForDecimal(n===this.min?0:(xt(n)-this._startValue)/this._valueRange)}getValueForPixel(n){const t=this.getDecimalForPixel(n);return Math.pow(10,this._startValue+t*this._valueRange)}}dM.id="logarithmic",dM.defaults={ticks:{callback:Ei.formatters.logarithmic,major:{enabled:!0}}};function Rl(r){const n=r.ticks;if(n.display&&r.display){const t=bt(n.backdropPadding);return we(n.font&&n.font.size,ke.font.size)+t.height}return 0}function Mb(r,n,t){return t=Ze(t)?t:[t],{w:r4(r,n.string,t),h:t.length*n.lineHeight}}function fM(r,n,t,o,e){return r===o||r===e?{start:n-t/2,end:n+t/2}:r<o||r>e?{start:n-t,end:n}:{start:n,end:n+t}}function gb(r){const n={l:r.left+r._padding.left,r:r.right-r._padding.right,t:r.top+r._padding.top,b:r.bottom-r._padding.bottom},t=Object.assign({},n),o=[],e=[],i=r._pointLabels.length,a=r.options.pointLabels,s=a.centerPointLabels?Je/i:0;for(let l=0;l<i;l++){const u=a.setContext(r.getPointLabelContext(l));e[l]=u.padding;const d=r.getPointPosition(l,r.drawingArea+e[l],s),f=yt(u.font),M=Mb(r.ctx,f,r._pointLabels[l]);o[l]=M;const p=Et(r.getIndexAngle(l)+s),y=Math.round(tl(p)),j=fM(y,d.x,M.w,0,180),v=fM(y,d.y,M.h,90,270);hb(t,n,p,j,v)}r.setCenterPoint(n.l-t.l,t.r-n.r,n.t-t.t,t.b-n.b),r._pointLabelItems=pb(r,o,e)}function hb(r,n,t,o,e){const i=Math.abs(Math.sin(t)),a=Math.abs(Math.cos(t));let s=0,l=0;o.start<n.l?(s=(n.l-o.start)/i,r.l=Math.min(r.l,n.l-s)):o.end>n.r&&(s=(o.end-n.r)/i,r.r=Math.max(r.r,n.r+s)),e.start<n.t?(l=(n.t-e.start)/a,r.t=Math.min(r.t,n.t-l)):e.end>n.b&&(l=(e.end-n.b)/a,r.b=Math.max(r.b,n.b+l))}function pb(r,n,t){const o=[],e=r._pointLabels.length,i=r.options,a=Rl(i)/2,s=r.drawingArea,l=i.pointLabels.centerPointLabels?Je/e:0;for(let u=0;u<e;u++){const d=r.getPointPosition(u,s+a+t[u],l),f=Math.round(tl(Et(d.angle+Xe))),M=n[u],p=mb(d.y,M.h,f),y=yb(f),j=Nb(d.x,M.w,y);o.push({x:d.x,y:p,textAlign:y,left:j,top:p,right:j+M.w,bottom:p+M.h})}return o}function yb(r){return r===0||r===180?"center":r<180?"left":"right"}function Nb(r,n,t){return t==="right"?r-=n:t==="center"&&(r-=n/2),r}function mb(r,n,t){return t===90||t===270?r-=n/2:(t>270||t<90)&&(r-=n),r}function jb(r,n){const{ctx:t,options:{pointLabels:o}}=r;for(let e=n-1;e>=0;e--){const i=o.setContext(r.getPointLabelContext(e)),a=yt(i.font),{x:s,y:l,textAlign:u,left:d,top:f,right:M,bottom:p}=r._pointLabelItems[e],{backdropColor:y}=i;if(!Ce(y)){const j=qn(i.borderRadius),v=bt(i.backdropPadding);t.fillStyle=y;const h=d-v.left,N=f-v.top,D=M-d+v.width,I=p-f+v.height;Object.values(j).some(m=>m!==0)?(t.beginPath(),wi(t,{x:h,y:N,w:D,h:I,radius:j}),t.fill()):t.fillRect(h,N,D,I)}Ai(t,r._pointLabels[e],s,l+a.lineHeight/2,a,{color:i.color,textAlign:u,textBaseline:"middle"})}}function MM(r,n,t,o){const{ctx:e}=r;if(t)e.arc(r.xCenter,r.yCenter,n,0,Be);else{let i=r.getPointPosition(0,n);e.moveTo(i.x,i.y);for(let a=1;a<o;a++)i=r.getPointPosition(a,n),e.lineTo(i.x,i.y)}}function Ib(r,n,t,o){const e=r.ctx,i=n.circular,{color:a,lineWidth:s}=n;!i&&!o||!a||!s||t<0||(e.save(),e.strokeStyle=a,e.lineWidth=s,e.setLineDash(n.borderDash),e.lineDashOffset=n.borderDashOffset,e.beginPath(),MM(r,t,i,o),e.closePath(),e.stroke(),e.restore())}function Db(r,n,t){return Dn(r,{label:t,index:n,type:"pointLabel"})}class $i extends Gi{constructor(n){super(n),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const n=this._padding=bt(Rl(this.options)/2),t=this.width=this.maxWidth-n.width,o=this.height=this.maxHeight-n.height;this.xCenter=Math.floor(this.left+t/2+n.left),this.yCenter=Math.floor(this.top+o/2+n.top),this.drawingArea=Math.floor(Math.min(t,o)/2)}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!1);this.min=ot(n)&&!isNaN(n)?n:0,this.max=ot(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Rl(this.options))}generateTickLabels(n){Gi.prototype.generateTickLabels.call(this,n),this._pointLabels=this.getLabels().map((t,o)=>{const e=$e(this.options.pointLabels.callback,[t,o],this);return e||e===0?e:""}).filter((t,o)=>this.chart.getDataVisibility(o))}fit(){const n=this.options;n.display&&n.pointLabels.display?gb(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(n,t,o,e){this.xCenter+=Math.floor((n-t)/2),this.yCenter+=Math.floor((o-e)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(n,t,o,e))}getIndexAngle(n){const t=Be/(this._pointLabels.length||1),o=this.options.startAngle||0;return Et(n*t+Ct(o))}getDistanceFromCenterForValue(n){if(Ce(n))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-n)*t:(n-this.min)*t}getValueForDistanceFromCenter(n){if(Ce(n))return NaN;const t=n/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(n){const t=this._pointLabels||[];if(n>=0&&n<t.length){const o=t[n];return Db(this.getContext(),n,o)}}getPointPosition(n,t,o=0){const e=this.getIndexAngle(n)-Xe+o;return{x:Math.cos(e)*t+this.xCenter,y:Math.sin(e)*t+this.yCenter,angle:e}}getPointPositionForValue(n,t){return this.getPointPosition(n,this.getDistanceFromCenterForValue(t))}getBasePosition(n){return this.getPointPositionForValue(n||0,this.getBaseValue())}getPointLabelPosition(n){const{left:t,top:o,right:e,bottom:i}=this._pointLabelItems[n];return{left:t,top:o,right:e,bottom:i}}drawBackground(){const{backgroundColor:n,grid:{circular:t}}=this.options;if(n){const o=this.ctx;o.save(),o.beginPath(),MM(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),o.closePath(),o.fillStyle=n,o.fill(),o.restore()}}drawGrid(){const n=this.ctx,t=this.options,{angleLines:o,grid:e}=t,i=this._pointLabels.length;let a,s,l;if(t.pointLabels.display&&jb(this,i),e.display&&this.ticks.forEach((u,d)=>{if(d!==0){s=this.getDistanceFromCenterForValue(u.value);const f=e.setContext(this.getContext(d-1));Ib(this,f,s,i)}}),o.display){for(n.save(),a=i-1;a>=0;a--){const u=o.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=u;!f||!d||(n.lineWidth=f,n.strokeStyle=d,n.setLineDash(u.borderDash),n.lineDashOffset=u.borderDashOffset,s=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,s),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(l.x,l.y),n.stroke())}n.restore()}}drawBorder(){}drawLabels(){const n=this.ctx,t=this.options,o=t.ticks;if(!o.display)return;const e=this.getIndexAngle(0);let i,a;n.save(),n.translate(this.xCenter,this.yCenter),n.rotate(e),n.textAlign="center",n.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&!t.reverse)return;const u=o.setContext(this.getContext(l)),d=yt(u.font);if(i=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){n.font=d.string,a=n.measureText(s.label).width,n.fillStyle=u.backdropColor;const f=bt(u.backdropPadding);n.fillRect(-a/2-f.left,-i-d.size/2-f.top,a+f.width,d.size+f.height)}Ai(n,s.label,0,-i,d,{color:u.color})}),n.restore()}drawTitle(){}}$i.id="radialLinear",$i.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ei.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(r){return r},padding:5,centerPointLabels:!1}},$i.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},$i.descriptors={angleLines:{_fallback:"grid"}};const Ji={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}},pt=Object.keys(Ji);function xb(r,n){return r-n}function gM(r,n){if(Ce(n))return null;const t=r._adapter,{parser:o,round:e,isoWeekday:i}=r._parseOpts;let a=n;return typeof o=="function"&&(a=o(a)),ot(a)||(a=typeof o=="string"?t.parse(a,o):t.parse(a)),a===null?null:(e&&(a=e==="week"&&(Xn(i)||i===!0)?t.startOf(a,"isoWeek",i):t.startOf(a,e)),+a)}function hM(r,n,t,o){const e=pt.length;for(let i=pt.indexOf(r);i<e-1;++i){const a=Ji[pt[i]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((t-n)/(s*a.size))<=o)return pt[i]}return pt[e-1]}function vb(r,n,t,o,e){for(let i=pt.length-1;i>=pt.indexOf(t);i--){const a=pt[i];if(Ji[a].common&&r._adapter.diff(e,o,a)>=n-1)return a}return pt[t?pt.indexOf(t):0]}function bb(r){for(let n=pt.indexOf(r)+1,t=pt.length;n<t;++n)if(Ji[pt[n]].common)return pt[n]}function pM(r,n,t){if(!t)r[n]=!0;else if(t.length){const{lo:o,hi:e}=rl(t,n),i=t[o]>=n?t[o]:t[e];r[i]=!0}}function Tb(r,n,t,o){const e=r._adapter,i=+e.startOf(n[0].value,o),a=n[n.length-1].value;let s,l;for(s=i;s<=a;s=+e.add(s,1,o))l=t[s],l>=0&&(n[l].major=!0);return n}function yM(r,n,t){const o=[],e={},i=n.length;let a,s;for(a=0;a<i;++a)s=n[a],e[s]=a,o.push({value:s,major:!1});return i===0||!t?o:Tb(r,o,e,t)}class Xi extends Pn{constructor(n){super(n),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(n,t){const o=n.time||(n.time={}),e=this._adapter=new Zx._date(n.adapters.date);e.init(t),Mr(o.displayFormats,e.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(n),this._normalized=t.normalized}parse(n,t){return n===void 0?null:gM(this,n)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const n=this.options,t=this._adapter,o=n.time.unit||"day";let{min:e,max:i,minDefined:a,maxDefined:s}=this.getUserBounds();function l(u){!a&&!isNaN(u.min)&&(e=Math.min(e,u.min)),!s&&!isNaN(u.max)&&(i=Math.max(i,u.max))}(!a||!s)&&(l(this._getLabelBounds()),(n.bounds!=="ticks"||n.ticks.source!=="labels")&&l(this.getMinMax(!1))),e=ot(e)&&!isNaN(e)?e:+t.startOf(Date.now(),o),i=ot(i)&&!isNaN(i)?i:+t.endOf(Date.now(),o)+1,this.min=Math.min(e,i-1),this.max=Math.max(e+1,i)}_getLabelBounds(){const n=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return n.length&&(t=n[0],o=n[n.length-1]),{min:t,max:o}}buildTicks(){const n=this.options,t=n.time,o=n.ticks,e=o.source==="labels"?this.getLabelTimestamps():this._generate();n.bounds==="ticks"&&e.length&&(this.min=this._userMin||e[0],this.max=this._userMax||e[e.length-1]);const i=this.min,a=this.max,s=w1(e,i,a);return this._unit=t.unit||(o.autoSkip?hM(t.minUnit,this.min,this.max,this._getLabelCapacity(i)):vb(this,s.length,t.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:bb(this._unit),this.initOffsets(e),n.reverse&&s.reverse(),yM(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(n=>+n.value))}initOffsets(n){let t=0,o=0,e,i;this.options.offset&&n.length&&(e=this.getDecimalForValue(n[0]),n.length===1?t=1-e:t=(this.getDecimalForValue(n[1])-e)/2,i=this.getDecimalForValue(n[n.length-1]),n.length===1?o=i:o=(i-this.getDecimalForValue(n[n.length-2]))/2);const a=n.length<3?.5:.25;t=lt(t,0,a),o=lt(o,0,a),this._offsets={start:t,end:o,factor:1/(t+1+o)}}_generate(){const n=this._adapter,t=this.min,o=this.max,e=this.options,i=e.time,a=i.unit||hM(i.minUnit,t,o,this._getLabelCapacity(t)),s=we(i.stepSize,1),l=a==="week"?i.isoWeekday:!1,u=Xn(l)||l===!0,d={};let f=t,M,p;if(u&&(f=+n.startOf(f,"isoWeek",l)),f=+n.startOf(f,u?"day":a),n.diff(o,t,a)>1e5*s)throw new Error(t+" and "+o+" are too far apart with stepSize of "+s+" "+a);const y=e.ticks.source==="data"&&this.getDataTimestamps();for(M=f,p=0;M<o;M=+n.add(M,s,a),p++)pM(d,M,y);return(M===o||e.bounds==="ticks"||p===1)&&pM(d,M,y),Object.keys(d).sort((j,v)=>j-v).map(j=>+j)}getLabelForValue(n){const t=this._adapter,o=this.options.time;return o.tooltipFormat?t.format(n,o.tooltipFormat):t.format(n,o.displayFormats.datetime)}_tickFormatFunction(n,t,o,e){const i=this.options,a=i.time.displayFormats,s=this._unit,l=this._majorUnit,u=s&&a[s],d=l&&a[l],f=o[t],M=l&&d&&f&&f.major,p=this._adapter.format(n,e||(M?d:u)),y=i.ticks.callback;return y?$e(y,[p,t,o],this):p}generateTickLabels(n){let t,o,e;for(t=0,o=n.length;t<o;++t)e=n[t],e.label=this._tickFormatFunction(e.value,t,n)}getDecimalForValue(n){return n===null?NaN:(n-this.min)/(this.max-this.min)}getPixelForValue(n){const t=this._offsets,o=this.getDecimalForValue(n);return this.getPixelForDecimal((t.start+o)*t.factor)}getValueForPixel(n){const t=this._offsets,o=this.getDecimalForPixel(n)/t.factor-t.end;return this.min+o*(this.max-this.min)}_getLabelSize(n){const t=this.options.ticks,o=this.ctx.measureText(n).width,e=Ct(this.isHorizontal()?t.maxRotation:t.minRotation),i=Math.cos(e),a=Math.sin(e),s=this._resolveTickFontOptions(0).size;return{w:o*i+s*a,h:o*a+s*i}}_getLabelCapacity(n){const t=this.options.time,o=t.displayFormats,e=o[t.unit]||o.millisecond,i=this._tickFormatFunction(n,0,yM(this,[n],this._majorUnit),e),a=this._getLabelSize(i),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let n=this._cache.data||[],t,o;if(n.length)return n;const e=this.getMatchingVisibleMetas();if(this._normalized&&e.length)return this._cache.data=e[0].controller.getAllParsedValues(this);for(t=0,o=e.length;t<o;++t)n=n.concat(e[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const n=this._cache.labels||[];let t,o;if(n.length)return n;const e=this.getLabels();for(t=0,o=e.length;t<o;++t)n.push(gM(this,e[t]));return this._cache.labels=this._normalized?n:this.normalize(n)}normalize(n){return Ad(n.sort(xb))}}Xi.id="time",Xi.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function Ki(r,n,t){let o=0,e=r.length-1,i,a,s,l;t?(n>=r[o].pos&&n<=r[e].pos&&({lo:o,hi:e}=En(r,"pos",n)),{pos:i,time:s}=r[o],{pos:a,time:l}=r[e]):(n>=r[o].time&&n<=r[e].time&&({lo:o,hi:e}=En(r,"time",n)),{time:i,pos:s}=r[o],{time:a,pos:l}=r[e]);const u=a-i;return u?s+(l-s)*(n-i)/u:s}class NM extends Xi{constructor(n){super(n),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const n=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(n);this._minPos=Ki(t,this.min),this._tableRange=Ki(t,this.max)-this._minPos,super.initOffsets(n)}buildLookupTable(n){const{min:t,max:o}=this,e=[],i=[];let a,s,l,u,d;for(a=0,s=n.length;a<s;++a)u=n[a],u>=t&&u<=o&&e.push(u);if(e.length<2)return[{time:t,pos:0},{time:o,pos:1}];for(a=0,s=e.length;a<s;++a)d=e[a+1],l=e[a-1],u=e[a],Math.round((d+l)/2)!==u&&i.push({time:u,pos:a/(s-1)});return i}_getTimestampsForTable(){let n=this._cache.all||[];if(n.length)return n;const t=this.getDataTimestamps(),o=this.getLabelTimestamps();return t.length&&o.length?n=this.normalize(t.concat(o)):n=t.length?t:o,n=this._cache.all=n,n}getDecimalForValue(n){return(Ki(this._table,n)-this._minPos)/this._tableRange}getValueForPixel(n){const t=this._offsets,o=this.getDecimalForPixel(n)/t.factor-t.end;return Ki(this._table,o*this._tableRange+this._minPos,!0)}}NM.id="timeseries",NM.defaults=Xi.defaults;var rr;(function(r){r.ChartRendered="chart:rendered",r.ChartUpdated="chart:updated",r.ChartDestroyed="chart:destroyed",r.LabelsUpdated="labels:updated"})(rr||(rr={}));function qi(r,n,t,o){r(n,t),o!==void 0&&o.emit(rr.ChartRendered)}function kb(r,n){r.update(),n!==void 0&&n.emit(rr.ChartUpdated)}function ea(r,n){r.destroy(),n!==void 0&&n.emit(rr.ChartDestroyed)}function Ab(r,n){const t={labels:typeof r.labels=="undefined"?[]:[...r.labels],datasets:[]};return mM(t,{...r},n),t}function mM(r,n,t){const o=[];r.datasets=n.datasets.map(e=>{const i=r.datasets.find(a=>a[t]===e[t]);return!i||!e.data||o.includes(i)?{...e}:(o.push(i),Object.assign(i,e),i)})}function wb(r,n,t){r.data.labels=n,t!==void 0&&t.emit(rr.LabelsUpdated)}function Lb(r,n){r.options={...n}}function zb(r,n){const t=r.datasets.map(e=>e.label),o=n.datasets.map(e=>e.label);return n.datasets.length===r.datasets.length&&t.every((e,i)=>e===o[i])}const Ob="Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components",Sb="Update ERROR: chart instance not found",Cb=((r,n,t)=>c.defineComponent({props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,default:()=>{}},datasetIdKey:{type:String,default:"label"},chartId:{type:String,default:r},width:{type:Number,default:400},height:{type:Number,default:400},cssClasses:{type:String,default:""},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},setup(o,e){Or.register(t);const i=c.shallowRef(null),a=c.ref(null);function s(f,M){if(i.value!==null&&ea(c.toRaw(i.value),e),a.value===null)throw new Error(Ob);{const p=Ab(f,o.datasetIdKey),y=a.value.getContext("2d");y!==null&&(i.value=new Or(y,{type:n,data:c.isProxy(f)?new Proxy(p,{}):p,options:M,plugins:o.plugins}))}}function l(f,M){const p=c.isProxy(f)?c.toRaw(f):{...f},y=c.isProxy(M)?c.toRaw(M):{...M};if(Object.keys(y).length>0){const j=c.toRaw(i.value);zb(p,y)&&j!==null?(mM(j==null?void 0:j.data,p,o.datasetIdKey),p.labels!==void 0&&wb(j,p.labels,e),d()):(j!==null&&ea(j,e),qi(s,o.chartData,o.chartOptions,e))}else i.value!==null&&ea(c.toRaw(i.value),e),qi(s,o.chartData,o.chartOptions,e)}function u(f){const M=c.toRaw(i.value);M!==null?(Lb(M,f),d()):qi(s,o.chartData,o.chartOptions,e)}function d(){const f=c.toRaw(i.value);f!==null?kb(f,e):console.error(Sb)}return c.watch(()=>o.chartData,(f,M)=>l(f,M),{deep:!0}),c.watch(()=>o.chartOptions,f=>u(f),{deep:!0}),c.onMounted(()=>{"datasets"in o.chartData&&o.chartData.datasets.length>0&&qi(s,o.chartData,o.chartOptions,e)}),c.onBeforeUnmount(()=>{i.value!==null&&ea(c.toRaw(i.value),e)}),e.expose({chart:i,updateChart:d}),()=>c.h("div",{style:o.styles,class:o.cssClasses},[c.h("canvas",{id:o.chartId,width:o.width,height:o.height,ref:a})])}}))("bar-chart","bar",Ci);var xw="";const Eb={name:"MultiRangeSlider",props:{baseClassName:{type:String,default:"multi-range-slider"},min:{type:Number},max:{type:Number},minValue:{type:Number},maxValue:{type:Number},step:{type:Number,default:1},preventWheel:{type:Boolean,default:!1},ruler:{type:Boolean,default:!0},label:{type:Boolean,default:!0},labels:{type:Array},minCaption:{type:String},maxCaption:{type:String},rangeMargin:{type:Number}},data(){let r=this.labels||[],n=this.min===void 0?0:this.min,t=r.length?r.length-1:100,o=this.max===void 0?t:this.max,e=this.minValue===void 0?25:this.minValue;r.length&&this.minValue===void 0&&(e=1);let i=this.maxValue||75;if(r.length&&this.maxValue===void 0&&(i=r.length-2),o<=n)throw new Error("Invalid props min or max");if(e>i)throw new Error("Invalid props minValue or maxValue");let a=this.rangeMargin===void 0?this.step:this.rangeMargin,s=a%this.step;return s&&(a=a+this.step-s),{valueMin:e<n?n:e,valueMax:i>o?o:i,interVal:null,startX:null,mouseMoveCounter:null,barBox:null,barValue:0,rangeMarginValue:a}},methods:{onBarLeftClick(){this.valueMin-this.step>=this.minimum?this.valueMin-=this.step:this.valueMin=this.minimum},onInnerBarLeftClick(){this.valueMin+this.rangeMarginValue<this.valueMax&&(this.valueMin+=this.step)},onBarRightClick(){this.valueMax+this.step<=this.maximum?this.valueMax+=this.step:this.valueMax=this.maximum},onInnerBarRightClick(){this.valueMax-this.rangeMarginValue>this.valueMin&&(this.valueMax-=this.step)},onInputMinChange(r){let n=parseFloat(r.target.value);n<=this.valueMax-this.rangeMarginValue&&n>=this.minimum?this.valueMin=n:r.target.value=this.valueMin},onInputMaxChange(r){let n=parseFloat(r.target.value);n>=this.valueMin+this.rangeMarginValue&&n<=this.maximum?this.valueMax=n:r.target.value=this.valueMax},onLeftThumbMousedown(r){if(r.preventDefault(),this.startX=r.clientX,r.type==="touchstart")if(r.touches.length===1)this.startX=r.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMin,this.barBox=r.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onLeftThumbMousemove),document.addEventListener("mouseup",this.onLeftThumbMouseup),document.addEventListener("touchmove",this.onLeftThumbMousemove),document.addEventListener("touchend",this.onLeftThumbMouseup)},onLeftThumbMousemove(r){this.mouseMoveCounter++;let n=r.clientX;r.type==="touchmove"&&(n=r.touches[0].clientX);let o=(n-this.startX)/this.barBox.width,e=this.barValue+(this.maximum-this.minimum)*o;e-=e%this.step,e<this.minimum?e=this.minimum:e>this.valueMax-this.rangeMarginValue&&(e=this.valueMax-this.rangeMarginValue),this.valueMin=e},onLeftThumbMouseup(){document.removeEventListener("mousemove",this.onLeftThumbMousemove),document.removeEventListener("mouseup",this.onLeftThumbMouseup),document.removeEventListener("touchmove",this.onLeftThumbMousemove),document.removeEventListener("touchend",this.onLeftThumbMouseup)},onRightThumbMousedown(r){if(r.preventDefault(),this.startX=r.clientX,r.type==="touchstart")if(r.touches.length===1)this.startX=r.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMax,this.barBox=r.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onRightThumbMousemove),document.addEventListener("mouseup",this.onRightThumbMouseup),document.addEventListener("touchmove",this.onRightThumbMousemove),document.addEventListener("touchend",this.onRightThumbMouseup)},onRightThumbMousemove(r){this.mouseMoveCounter++;let n=r.clientX;r.type==="touchmove"&&(n=r.touches[0].clientX);let o=(n-this.startX)/this.barBox.width,e=this.barValue+(this.maximum-this.minimum)*o;e-=e%this.step,e<this.valueMin+this.rangeMarginValue?e=this.valueMin+this.rangeMarginValue:e>this.maximum&&(e=this.maximum),this.valueMax=e},onRightThumbMouseup(){document.removeEventListener("mousemove",this.onRightThumbMousemove),document.removeEventListener("mouseup",this.onRightThumbMouseup),document.removeEventListener("touchmove",this.onRightThumbMousemove),document.removeEventListener("touchend",this.onRightThumbMouseup)},onMouseWheel(r){if(this.preventWheel===!0||!r.shiftKey&&!r.ctrlKey)return;let n=this.step;r.deltaY<0&&(n=-n),r.shiftKey&&r.ctrlKey?this.valueMin+n>=this.minimum&&this.valueMax+n<=this.maximum&&(this.valueMin=this.valueMin+n,this.valueMax=this.valueMax+n):r.ctrlKey?(n=this.valueMax+n,n<this.valueMin+this.rangeMarginValue?n=this.valueMin+this.rangeMarginValue:n>this.maximum&&(n=this.maximum),this.valueMax=n):r.shiftKey&&(n=this.valueMin+n,n<this.minimum?n=this.minimum:n>this.valueMax-this.rangeMarginValue&&(n=this.valueMax-this.rangeMarginValue),this.valueMin=n)},triggerInput(){let r=0;this.step.toString().includes(".")&&(r=2);let n={min:this.minimum,max:this.maximum,minValue:parseFloat(this.valueMin.toFixed(r)),maxValue:parseFloat(this.valueMax.toFixed(r))};this.$emit("input",n)}},computed:{minimum(){return this.min===void 0?0:this.min},maximum(){let r=this.labels||[],n=r.length?r.length-1:100;return this.max===void 0?n:this.max},stepCount(){let r=this.labels||[];return r.length?r.length-1:Math.floor((this.maximum-this.minimum)/this.step)},subStepCount(){return(this.labels||[]).length&&this.step>1?(this.maximum-this.minimum)/this.step:0},barMin(){return(this.valueMin-this.minimum)/(this.maximum-this.minimum)*100},barMax(){return 100-(this.valueMax-this.minimum)/(this.maximum-this.minimum)*100},barMinVal(){let r=0;return this.step.toString().includes(".")&&(r=2),(this.valueMin||0).toFixed(r)},barMaxVal(){let r=0;return this.step.toString().includes(".")&&(r=2),(this.valueMax||100).toFixed(r)},scaleLabels(){let r=this.labels||[];return r.length===0&&(r=[],r.push(this.minimum),r.push(this.maximum)),r}},watch:{valueMin(){this.triggerInput()},valueMax(){this.triggerInput()},minValue(r){this.valueMin=r<this.minimum?this.minimum:r},maxValue(r){this.valueMax=r>this.maximum?this.maximum:r}},mounted(){}},_b={class:"bar"},Qb=["min","max","step","value"],Ub={class:"caption"},Yb={class:"min-caption"},Bb={class:"bar-inner"},Pb=["min","max","step","value"],Rb={class:"caption"},Vb={class:"max-caption"},Zb={key:0,class:"ruler"},Wb={key:1,class:"sub-ruler"},Hb={key:2,class:"labels"};function Fb(r,n,t,o,e,i){return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([t.baseClassName,e.rangeMarginValue===0?"zero-ranage-margin":""]),onMousewheel:n[10]||(n[10]=c.withModifiers((...a)=>i.onMouseWheel&&i.onMouseWheel(...a),["prevent","stop"]))},[c.createElementVNode("div",_b,[c.createElementVNode("div",{class:"bar-left",style:c.normalizeStyle({width:i.barMin+"%"}),onClick:n[0]||(n[0]=(...a)=>i.onBarLeftClick&&i.onBarLeftClick(...a))},null,4),c.createElementVNode("input",{class:"input-type-range input-type-range-min",type:"range",min:i.minimum,max:i.maximum,step:t.step,value:e.valueMin,onInput:n[1]||(n[1]=c.withModifiers((...a)=>i.onInputMinChange&&i.onInputMinChange(...a),["stop","prevent"]))},null,40,Qb),c.createElementVNode("div",{class:"thumb thumb-left",onMousedown:n[2]||(n[2]=(...a)=>i.onLeftThumbMousedown&&i.onLeftThumbMousedown(...a)),onTouchstart:n[3]||(n[3]=(...a)=>i.onLeftThumbMousedown&&i.onLeftThumbMousedown(...a))},[c.createElementVNode("div",Ub,[c.createElementVNode("span",Yb,c.toDisplayString(t.minCaption||i.barMinVal),1)])],32),c.createElementVNode("div",Bb,[c.createElementVNode("div",{class:"bar-inner-left",onClick:n[4]||(n[4]=(...a)=>i.onInnerBarLeftClick&&i.onInnerBarLeftClick(...a))}),c.createElementVNode("div",{class:"bar-inner-right",onClick:n[5]||(n[5]=(...a)=>i.onInnerBarRightClick&&i.onInnerBarRightClick(...a))})]),c.createElementVNode("input",{class:"input-type-range input-type-range-max",type:"range",min:i.minimum,max:i.maximum,step:t.step,value:e.valueMax,onInput:n[6]||(n[6]=c.withModifiers((...a)=>i.onInputMaxChange&&i.onInputMaxChange(...a),["stop","prevent"]))},null,40,Pb),c.createElementVNode("div",{class:"thumb thumb-right",onMousedown:n[7]||(n[7]=(...a)=>i.onRightThumbMousedown&&i.onRightThumbMousedown(...a)),onTouchstart:n[8]||(n[8]=(...a)=>i.onRightThumbMousedown&&i.onRightThumbMousedown(...a))},[c.createElementVNode("div",Rb,[c.createElementVNode("span",Vb,c.toDisplayString(t.maxCaption||i.barMaxVal),1)])],32),c.createElementVNode("div",{class:"bar-right",style:c.normalizeStyle({width:i.barMax+"%"}),onClick:n[9]||(n[9]=(...a)=>i.onBarRightClick&&i.onBarRightClick(...a))},null,4)]),t.ruler?(c.openBlock(),c.createElementBlock("div",Zb,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.stepCount,a=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"ruler-rule"}))),128))])):c.createCommentVNode("",!0),i.subStepCount?(c.openBlock(),c.createElementBlock("div",Wb,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.subStepCount,a=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"ruler-sub-rule"}))),128))])):c.createCommentVNode("",!0),t.label?(c.openBlock(),c.createElementBlock("div",Hb,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.scaleLabels,a=>(c.openBlock(),c.createElementBlock("div",{class:"label",key:a},c.toDisplayString(a),1))),128))])):c.createCommentVNode("",!0)],34)}var Gb=st(Eb,[["render",Fb]]);const $b=c.defineComponent({components:{DhIcon:Te},props:{mainText:{type:String,default:"Advanced"},filterMissingText:{type:String,default:"Filter Missing"},matchText:{type:String,default:"Match"},excludeText:{type:String,default:"Exclude"}},data(){return{activeFilter:!1,isFilterMissing:!1,isMatch:!1,isExclude:!1}},emits:["match","exclude","filter_missing"],mounted(){this.isMatch=!0},methods:{toggleFilter(){this.activeFilter=!this.activeFilter},matchFilter(){this.isMatch=!0,this.isExclude=!1,this.$emit("match",this.isMatch)},excludeFilter(){this.isMatch=!1,this.isExclude=!0,this.$emit("exclude",this.isExclude)},missingFilter(){this.isFilterMissing=!this.isFilterMissing,this.$emit("filter_missing",this.isFilterMissing),this.isFilterMissing&&this.isMatch?this.matchFilter():this.isFilterMissing&&this.isExclude&&this.excludeFilter()}}}),Jb={class:"dh-advanced-filter-container"},Xb={class:"advance_section"},Kb={key:0},qb={class:"list-none"},eT=["checked"],tT=["checked"],nT=["checked"];function rT(r,n,t,o,e,i){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock("div",Jb,[c.createElementVNode("div",Xb,[c.createElementVNode("span",{class:"toggle-icon",onClick:n[0]||(n[0]=s=>r.toggleFilter())},[c.createTextVNode(c.toDisplayString(r.mainText)+" ",1),c.createVNode(a,{"icon-name":r.activeFilter?"arrow-up":"arrow-down",size:20},null,8,["icon-name"])]),r.activeFilter?(c.openBlock(),c.createElementBlock("div",Kb,[c.renderSlot(r.$slots,"default"),c.createElementVNode("ul",qb,[c.createElementVNode("li",null,[c.createElementVNode("label",null,[c.createElementVNode("input",{checked:r.isFilterMissing,name:"number_filter",type:"checkbox",onChange:n[1]||(n[1]=s=>r.missingFilter())},null,40,eT),c.createTextVNode(" "+c.toDisplayString(r.filterMissingText),1)])]),c.createElementVNode("li",null,[c.createElementVNode("label",null,[c.createElementVNode("input",{checked:r.isMatch,name:"number_filter",type:"radio",onChange:n[2]||(n[2]=s=>r.matchFilter())},null,40,tT),c.createTextVNode(" "+c.toDisplayString(r.matchText),1)]),c.createElementVNode("label",null,[c.createElementVNode("input",{checked:r.isExclude,name:"number_filter",type:"radio",onChange:n[3]||(n[3]=s=>r.excludeFilter())},null,40,nT),c.createTextVNode(" "+c.toDisplayString(r.excludeText),1)])])])])):c.createCommentVNode("",!0)])])}var jM=st($b,[["render",rT]]),vw="";Or.register(sb,Wi,Fi,Pl);const oT=c.defineComponent({components:{Bar:Cb,MultiRangeSlider:Gb,DhAdvancedFilter:jM},props:{numberRange:{type:Array,default:()=>[{key:1,count:10}]},width:{type:Number,default:200},height:{type:Number,default:50},chartId:{type:String,default:"bar-chart"},datasetIdKey:{type:String,default:"label"},steps:{type:Number,default:1},includeForm:{type:Boolean,default:!1}},data(){return{chartData:{labels:[],datasets:[{labels:"",data:[],backgroundColor:["#5ea9e5"],borderRadius:1,hoverBackgroundColor:"#e0e0e0"}]},chartOptions:{responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!1}},scales:{x:{display:!1,grid:{display:!1},ticks:{display:!0}},y:{display:!1,grid:{display:!1},ticks:{display:!1}}}},chartLines:{},min:"1",max:this.maxNumber(this.numberRange),rangeMax:this.numberRange.length,chart_dta:[],BarMinValue:1,BarMaxValue:this.numberRange.length,activeFilter:!1,validated:!1,isMatch:!1,isExclude:!1,isDisable:!1,labels:[]}},mounted(){this.isMatch=!0,this.setChartData(this.numberRange),this.highlightChart(),this.labels=[this.BarMinValue,this.max]},methods:{matchFilter(){if(!this.isDisable){this.isMatch=!0,this.isExclude=!1;var r=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<=r.length;n++)r[n]>=this.min&&r[n]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")}},excludeFilter(){if(!this.isDisable){this.isMatch=!1,this.isExclude=!0;var r=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<r.length;n++)r[n]>=this.min&&r[n]<=this.max?this.chartData.datasets[0].backgroundColor.push("#e0e0e0"):this.chartData.datasets[0].backgroundColor.push("#5ea9e5")}},missingFilter(){this.isDisable=!this.isDisable,this.validated=!this.validated;var r=this.chartData.datasets[0].data;if(this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[],this.validated)for(let n=1;n<=r.length;n++)this.chartData.datasets[0].backgroundColor.push("#e0e0e0");else this.isMatch&&this.matchFilter(),this.isExclude&&this.excludeFilter()},changeMin(r){let n=r.target.value;this.min=n||"1",this.BarMinValue=n?this.getFirstIndex(parseInt(n)):1,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},changeMax(r){let n=r.target.value;this.BarMaxValue=n&&n>this.maxNumber(this.numberRange)?this.numberRange.length:this.getLastIndex(parseInt(n)),this.max=n&&n>this.maxNumber(this.numberRange)?this.maxNumber(this.numberRange):n,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},setChartData(r){r=this.sortData(r),this.removeChartData();let n=this.chartData.labels;for(let t=0;t<r.length;t++)n.push(r[t].key),this.chart_dta.push(r[t].count);this.chartData.datasets[0].data=this.chart_dta},highlightChart(){var r=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<=r.length;n++)r[n]>=this.min&&r[n]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")},updateBarChart(r){const{minValue:n,maxValue:t}=r;this.BarMinValue=n,this.BarMaxValue=t;var o=this.chartData.datasets[0].data;this.min=o[this.BarMinValue]?o[this.BarMinValue]:"1",this.max=o[this.BarMaxValue]?o[this.BarMaxValue]:this.max,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},toggleFilter(){this.activeFilter=!this.activeFilter},removeChartData(){this.chartData.labels=[],this.chartData.datasets[0].data=[],this.chart_dta=[]},sortData(r){return r.slice().sort(function(n,t){return n.count-t.count})},maxNumber(r){if(r.length!=0)return r.reduce((n,t)=>n=n>t.count?n:t.count,0)},getLastIndex(r){let n=this.chartData.datasets[0].data,t=0;for(let o=r;o>=0;o--)if(n.lastIndexOf(o)!==-1){t=n.lastIndexOf(o);break}else continue;return t},getFirstIndex(r){let n=this.chartData.datasets[0].data,t=0;for(let o=r;o<=this.max;o++)if(n.lastIndexOf(o)!==-1){t=n.lastIndexOf(o);break}else continue;return t}}}),iT={class:"dh-range-container"},aT={class:"bar-chart"},sT={key:0,class:"input-group-section"},lT={class:"input-group sb-input"},uT=["disabled","max","value"],cT={class:"input-group sb-input"},dT=["disabled","max","min","value"];function fT(r,n,t,o,e,i){const a=c.resolveComponent("Bar"),s=c.resolveComponent("MultiRangeSlider"),l=c.resolveComponent("dh-advanced-filter");return c.openBlock(),c.createElementBlock("div",iT,[c.createElementVNode("div",aT,[c.createVNode(a,{"chart-data":r.chartData,"chart-id":r.chartId,"chart-options":r.chartOptions,"dataset-id-key":r.datasetIdKey,height:r.height,width:r.width},null,8,["chart-data","chart-id","chart-options","dataset-id-key","height","width"]),c.createVNode(s,{"base-class-name":`multi-range-slider range-slider ${r.isDisable}`,label:!0,labels:r.labels,max:r.rangeMax,"max-caption":`${r.max}`,"max-value":r.BarMaxValue,min:1,"min-caption":`${r.min}`,"min-value":r.BarMinValue,"range-margin":0,ruler:!1,step:r.steps,onInput:r.updateBarChart},null,8,["base-class-name","labels","max","max-caption","max-value","min-caption","min-value","step","onInput"])]),r.includeForm?(c.openBlock(),c.createElementBlock("div",sT,[c.createElementVNode("div",lT,[c.createElementVNode("label",{class:c.normalizeClass(`dh-body-2 input-to ${r.validated?"disable":""}`)}," From ",2),c.createElementVNode("input",{class:"form-input text",disabled:!!r.validated,max:`${r.max}`,min:"1",placeholder:"From",type:"number",value:`${r.min}`,onInput:n[0]||(n[0]=u=>r.changeMin(u))},null,40,uT)]),c.createElementVNode("div",cT,[c.createElementVNode("label",{class:c.normalizeClass(`dh-body-2 input-to ${r.validated?"disable":""}`)}," To ",2),c.createElementVNode("input",{class:"form-input text",disabled:!!r.validated,max:`${r.maxNumber(r.numberRange)}`,min:`${r.min}`,placeholder:"To",type:"number",value:`${r.max}`,onInput:n[1]||(n[1]=u=>r.changeMax(u))},null,40,dT)])])):c.createCommentVNode("",!0),c.renderSlot(r.$slots,"input"),c.createVNode(l,{onExclude:r.excludeFilter,onFilter_missing:r.missingFilter,onMatch:r.matchFilter},{default:c.withCtx(()=>[c.renderSlot(r.$slots,"filter")]),_:3},8,["onExclude","onFilter_missing","onMatch"])])}var IM=st(oT,[["render",fT]]),bw="",Tw="";const MT={id:"dp-container"},gT=c.createElementVNode("div",{class:"dp__calendar_range"},[c.createElementVNode("p",null,"From"),c.createElementVNode("p",null,"To")],-1),hT={class:"dp__multi"},pT=["value"],yT=["value"],NT=c.createTextVNode(" Back "),mT=["onClick"],jT=["onClick"],IT=["onClick"],DT=["onClick"],xT=["onClick"],vT=["onClick"],bT=["onClick"],TT=["onClick"],kT=c.createElementVNode("div",{id:"tags",class:"dp__calendar_tags"},null,-1),AT={__name:"AdvancedDatePicker",props:{numberRange:{type:Array,required:!0}},emits:["update"],setup(r,{emit:n}){const t=c.ref(["",""]),o=c.ref(null),e=c.ref(null),i=c.ref(null),a=c.ref(!1),s=c.ref([{label:"Today",range:[new Date,new Date],slot:"today"},{label:"Previous week",range:[Cc(Sc(new Date)),Sc(new Date)],slot:"previousWeek"},{label:"This week",range:[Cc(new Date),A0(new Date)],slot:"week"},{label:"Next week",range:[L0(new Date),w0(new Date().setDate(new Date().getDate()+7))],slot:"nextWeek"},{label:"This month",range:[Pr(new Date),Br(new Date)],slot:"currentMonth"},{label:"Previous month",range:[Pr(jt(new Date,1)),Br(jt(new Date,1))],slot:"previousMonth"},{label:"Last 3 months",range:[Pr(jt(new Date,3)),Br(jt(new Date,1))],slot:"threeMonths"},{label:"Last 6 months",range:[Pr(jt(new Date,6)),Br(jt(new Date,1))],slot:"sixMonths"},{label:"Last year",range:[XM(new Date),JM(new Date)],slot:"yearly"}]),l=M=>{t.value=M,console.log(t.value),n("update",t.value)};function u(M){e.value=M.target.value,t.value=[M.target.value,o.value]}function d(M){o.value=M.target.value,t.value=[e.value,M.target.value]}c.onMounted(()=>{i.value.openMenu()});function f(){i.value.openMenu()}return(M,p)=>(c.openBlock(),c.createElementBlock("div",MT,[gT,c.createVNode(c.unref(yi),{ref_key:"datePicker",ref:i,modelValue:t.value,"onUpdate:modelValue":[p[2]||(p[2]=y=>t.value=y),l],"auto-apply":"","day-names":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"enable-time-picker":!1,"model-type":"dd/MM/yyyy","multi-calendars":"","multi-calendars-solo":"","multi-static":!1,offset:12,position:"left","preset-ranges":s.value,range:"","select-text":"Apply","text-input":"",uid:"advanced",onClosed:f},{"dp-input":c.withCtx(()=>[c.createElementVNode("div",hT,[c.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:e.value?e.value:t.value[0],onInput:p[0]||(p[0]=y=>u(y))},null,40,pT),c.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:o.value?o.value:t.value[1],onInput:p[1]||(p[1]=y=>d(y))},null,40,yT)])]),"arrow-left":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"previous",size:20})]),"arrow-right":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"next",size:20})]),"calendar-icon":c.withCtx(()=>[NT]),"clear-icon":c.withCtx(()=>[]),"action-preview":c.withCtx(()=>[]),"action-select":c.withCtx(()=>[]),previousWeek:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,mT)]))]),week:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,jT)]))]),nextWeek:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,IT)]))]),currentMonth:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,DT)]))]),previousMonth:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,xT)]))]),threeMonths:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,vT)]))]),sixMonths:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,bT)]))]),yearly:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,TT)]))]),_:1},8,["modelValue","preset-ranges"]),c.createVNode(IM,{class:"dp__calendar_range_number","number-range":r.numberRange,steps:1},{input:c.withCtx(()=>[kT]),filter:c.withCtx(()=>[c.createVNode(pd,{data:a.value,label:"Include time",onChange:p[3]||(p[3]=y=>a.value=y)},null,8,["data"])]),_:1},8,["number-range"])]))}},wT=c.defineComponent({props:{target:{type:String,required:!0},trigger:{type:String,required:!0},placement:{type:String,default:()=>"bottom",required:!1},tooltipText:{type:String,required:!0}},data(){return{show:!1}},methods:{showTooltip(){this.show=!this.show},tooltip(){let r=this.$refs.main,n=this.$refs[this.target];["right","left"].includes(this.placement)&&(n.style.top=-(((n==null?void 0:n.offsetHeight)-(r==null?void 0:r.offsetHeight))/2)+"px")}}}),LT=["placement","target","tooltipText","trigger"],zT=["id"],OT={class:"text"};function ST(r,n,t,o,e,i){return c.openBlock(),c.createElementBlock("div",{id:"main-contain",ref:"main",class:"dh-tooltip-container tooltip",placement:r.placement,target:r.target,tooltipText:r.tooltipText,trigger:r.trigger,onClick:n[0]||(n[0]=a=>r.trigger=="click"?r.showTooltip():null),onMouseover:n[1]||(n[1]=a=>r.tooltip())},[c.renderSlot(r.$slots,"default"),c.createElementVNode("div",{id:r.target,ref:r.target,class:c.normalizeClass(`tooltiptext ${r.show}`)},[c.createElementVNode("span",OT,c.toDisplayString(r.tooltipText),1)],10,zT)],40,LT)}var DM=st(wT,[["render",ST]]),kw="";const CT={class:"copy__text"},ET=["readonly"],_T={__name:"Copiable",props:{text:{type:String,required:!0},placement:{type:String,default:"bottom"},readonly:{type:Boolean,default:!0}},setup(r){const n=r,t=c.ref(""),o=c.ref("copy text");function e(a){navigator.clipboard.writeText(a),o.value="copied !"}function i(){o.value="copy text"}return c.onMounted(()=>{t.value=n.text}),(a,s)=>(c.openBlock(),c.createElementBlock("span",CT,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>t.value=l),readonly:r.readonly,type:"text",onInput:i},null,40,ET),[[c.vModelText,t.value]]),c.createVNode(DM,{placement:r.placement,target:"tooltiptext","tooltip-text":o.value,trigger:"hover",onClick:s[1]||(s[1]=l=>e(t.value))},{default:c.withCtx(()=>[c.createVNode(Te,{class:"copy__text_icon","icon-name":"copy",size:18})]),_:1},8,["placement","tooltip-text"])]))}};var Aw="";const QT=c.createTextVNode(" Back "),UT=c.createElementVNode("div",null,"today",-1),YT={__name:"DatePicker",props:{inline:{type:Boolean,default:!0}},emits:["update"],setup(r,{emit:n}){const t=c.ref(),o=c.ref(null),e=a=>{t.value=a,n("update",t.value)},i=c.ref([{date:en(new Date,0),type:"dot",tooltip:[{text:"Dot with tooltip",color:"blue"}]}]);return(a,s)=>(c.openBlock(),c.createElementBlock("div",null,[c.createVNode(c.unref(yi),{ref_key:"datePicker",ref:o,modelValue:t.value,"onUpdate:modelValue":[s[0]||(s[0]=l=>t.value=l),e],"day-names":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"enable-time-picker":!1,inline:r.inline,markers:i.value,"month-name-format":"short",offset:12,placeholder:"MM/DD/YYYY","select-text":"Apply","text-input":"",uid:"base"},{"arrow-left":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"previous",size:20})]),"arrow-right":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"next",size:20})]),"calendar-icon":c.withCtx(()=>[QT]),"clear-icon":c.withCtx(()=>[]),"action-preview":c.withCtx(()=>[]),"marker-tooltip":c.withCtx(()=>[UT]),_:1},8,["modelValue","inline","markers"])]))}};var ww="";const BT=["src"],PT={key:3,class:"menu-item-text-wrapper"};var xM=st(c.defineComponent({__name:"DropdownMenuItem",props:{item:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:r=>["none","ellipsis","fit-content"].includes(r)},iconSize:{type:Number,required:!1,default:24}},setup(r){const n=r;return(t,o)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[r.item.iconUrl?(c.openBlock(),c.createElementBlock("img",{key:0,alt:"icon image",class:"icon icon-url",src:r.item.iconUrl},null,8,BT)):c.createCommentVNode("",!0),r.item.iconUrl?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Te,c.mergeProps({key:1,class:"icon"},{...r.item,size:n.iconSize}),null,16)),r.item.subText?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",{key:2,class:c.normalizeClass(["dh-body-2",r.textEllipsisStyle])},c.toDisplayString(r.item.text),3)),r.item.subText?(c.openBlock(),c.createElementBlock("div",PT,[c.createElementVNode("span",{class:c.normalizeClass(["dh-body-1",r.textEllipsisStyle])},c.toDisplayString(r.item.text),3),c.createElementVNode("span",{class:c.normalizeClass(["dh-body-4-medium",r.textEllipsisStyle])},c.toDisplayString(r.item.subText),3)])):c.createCommentVNode("",!0),r.item.isSelected?(c.openBlock(),c.createBlock(Te,{key:4,class:"icon-blue icon-accept","icon-name":"accept",size:16})):c.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-3a3f37c0"]]),zw="";const RT=["data-e2e","onClick"],VT=["onClick"];var ZT=st(c.defineComponent({__name:"DropdownMenu",props:{items:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:r=>["none","ellipsis","fit-content"].includes(r)},iconSize:{type:Number,required:!1,default:24},closeOnClickOutside:{type:Boolean,required:!1,default:!0},zIndex:{type:Number,required:!1,default:100},closeOnItemSelected:{type:Boolean,required:!1,default:!0}},emits:["itemSelected","close"],setup(r,{emit:n}){const t=r;c.onMounted(()=>{document.addEventListener("click",i=>{o(i)})});function o(i){const a=i.target,s=document.querySelector("[data-id='dropdown-menu']");s&&!s.contains(i.target)&&!a.classList.contains("dropdown-toggle")&&t.closeOnClickOutside&&n("close")}function e(i){n("itemSelected",i),t.closeOnItemSelected&&n("close")}return(i,a)=>{const s=c.resolveComponent("router-link");return c.openBlock(),c.createElementBlock("div",{class:"dropdown-menu","data-id":"dropdown-menu",style:c.normalizeStyle({"z-index":t.zIndex})},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.items,l=>(c.openBlock(),c.createElementBlock("div",{key:l.iconName,class:"menu-item","data-e2e":l.dataE2eTag,onClick:u=>e(l)},[l.url?(c.openBlock(),c.createBlock(s,{key:0,class:"center-vertical",to:{path:l.url},onClick:u=>e(l)},{default:c.withCtx(()=>[c.createVNode(xM,{"icon-size":r.iconSize,item:l,"text-ellipsis-style":r.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])]),_:2},1032,["to","onClick"])):(c.openBlock(),c.createElementBlock("div",{key:1,class:"center-vertical",onClick:u=>e(l)},[c.createVNode(xM,{"icon-size":r.iconSize,item:l,"text-ellipsis-style":r.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])],8,VT))],8,RT))),128))],4)}}}),[["__scopeId","data-v-2fa20f7b"]]),Sw="";const WT={key:0,class:"invalid-feedback"},HT=c.defineComponent({__name:"Error",props:{errors:{type:Object,required:!1,default:void 0}},setup(r){const n=r;return(t,o)=>{var e;return c.unref(n).errors&&((e=c.unref(n).errors)==null?void 0:e.length)>0?(c.openBlock(),c.createElementBlock("div",WT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.errors,i=>(c.openBlock(),c.createElementBlock("span",{key:i},c.toDisplayString(i),1))),128))])):c.createCommentVNode("",!0)}}}),FT=c.defineComponent({components:{DhIcon:Te},props:{title:{type:String,default:"Advanced"},isAdvancedSettingsOpen:{type:Boolean,default:!1}},data(){return{isAdvancedSettingsCurrentlyOpen:!1}},watch:{isAdvancedSettingsOpen:function(r){this.isAdvancedSettingsCurrentlyOpen=r}},mounted(){this.isAdvancedSettingsCurrentlyOpen=this.isAdvancedSettingsOpen}}),GT={class:"dh-body-1-medium"},$T=c.createTextVNode(" Content ");function JT(r,n,t,o,e,i){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{class:c.normalizeClass(["advanced-panel-header clickable",{opened:r.isAdvancedSettingsCurrentlyOpen,closed:!r.isAdvancedSettingsCurrentlyOpen}]),"data-e2e":"expansion-panel-button",onClick:n[0]||(n[0]=s=>r.isAdvancedSettingsCurrentlyOpen=!r.isAdvancedSettingsCurrentlyOpen)},[c.createElementVNode("h4",GT,c.toDisplayString(r.title),1),c.createVNode(a,{class:"icon","icon-name":r.isAdvancedSettingsCurrentlyOpen?"arrow-up":"arrow-down",size:24},null,8,["icon-name"])],2),r.isAdvancedSettingsCurrentlyOpen?c.renderSlot(r.$slots,"content",{key:0},()=>[$T]):c.createCommentVNode("",!0)],64)}var XT=st(FT,[["render",JT]]),Cw="";const KT=c.createElementVNode("label",{for:"upload_pdf"},[c.createTextVNode(" Drag and drop file or "),c.createElementVNode("span",{id:"upload"},"browse")],-1),qT={key:1,class:"file__upload_items"},ek={class:"file__upload_list_item"},tk={class:"file__upload_list_item_label"},nk=["title"],rk={key:0,class:"label__antivirus"},ok={key:1,class:"label__antivirus label__antivirus--failed"},ik={key:2,class:"label__antivirus label__antivirus--detected"},ak=c.createElementVNode("br",null,null,-1),sk={key:3},lk={key:4},uk={key:0},ck=["value"],dk=["href"],fk={key:2,class:"file__upload_placeholder"},Mk={key:3,class:"file__upload_action"},gk=c.createElementVNode("button",{class:"file__upload_action_cancel"},"Cancel",-1),hk={__name:"FileUpload",props:{uploadProgress:{type:Array,required:!0},errorOccurred:{type:Array,required:!0},virusCheck:{type:Array,required:!0},modelValue:{type:FileList,required:!1,default:void 0},inline:{type:Boolean,required:!1,default:!1},errorMessage:{type:String,required:!1,default:"an error occurred while uploading"},fileSaved:{type:Boolean,required:!1,default:!1},virusCheckText:{type:String,required:!1,default:"Antivirus check ..."},virusCheckFailedText:{type:String,required:!1,default:"Antivirus check failed"},virusDetectedText:{type:String,required:!1,default:"Virus detected"},deleteConfirmationText:{type:String,required:!1,default:"Are you sure you want to delete it permanently? this action will be irreversible"},zIndex:{type:Number,required:!1,default:99}},emits:["update:modelValue","save:modelValue","reload"],setup(r,{emit:n}){const t=r,o=c.ref(null),e=c.ref(!1),i=c.ref([]),a=c.ref([".pdf",".csv",".doc",".jpeg",".mp4",".png",".txt",".xls"]);function s(D,I=2){if(!+D)return"0 Bytes";const m=1024,T=I<0?0:I,L=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],A=Math.floor(Math.log(D)/Math.log(m));return`${parseFloat((D/Math.pow(m,A)).toFixed(T))} ${L[A]}`}function l(D){return a.value.includes(d(D))?d(D).slice(1):"unknown"}function u(D){const I=D.lastIndexOf(".");let m=D.slice(0,I);return m.length<=15?m:m.slice(0,15)+"... "}function d(D){return D.replace(/.*(?=\.)/g,"")}function f(D){D.stopPropagation(),i.value=o.value.files,i.value&&(e.value=!0),n("update:modelValue",i.value)}function M(D){D.stopPropagation(),D.dataTransfer.dropEffect="copy"}function p(D){D.stopPropagation(),e.value=!0,i.value=D.dataTransfer.files,n("update:modelValue",i.value)}function y(D){window.confirm(t.deleteConfirmationText)&&j(D)}function j(D){const I=new DataTransfer;for(let m=0;m<i.value.length;m++){const T=i.value[m];D!==m&&I.items.add(T)}i.value=I.files,i.value.length==0&&(e.value=!1)}function v(){n("save:modelValue",i.value)}function h(D){return URL.createObjectURL(D)}function N(D){D.preventDefault(),n("reload")}return(D,I)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["file__upload",r.inline?"":"file__upload_box"])},[r.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:"file__upload_btn",onDragover:I[1]||(I[1]=c.withModifiers(m=>M(m),["prevent"])),onDrop:I[2]||(I[2]=c.withModifiers(m=>p(m),["prevent"]))},[c.createVNode(Te,{class:"file__upload_btn_icon","icon-name":"upload",size:24}),KT,c.createElementVNode("input",{id:"upload_pdf",ref_key:"upload",ref:o,multiple:"",name:"file",type:"file",onInput:I[0]||(I[0]=m=>f(m))},null,544)],32)),e.value?(c.openBlock(),c.createElementBlock("div",qT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,(m,T)=>(c.openBlock(),c.createElementBlock("div",{key:T,class:c.normalizeClass(["file__upload_list",r.inline?"":"file__upload_list_box"])},[c.createVNode(Te,{class:c.normalizeClass(r.errorOccurred[T]?"file__upload_list_icon":""),"icon-name":"file-"+l(m.name),size:40},null,8,["class","icon-name"]),t.uploadProgress[T]==100&&r.fileSaved&&!r.errorOccurred[T]&&r.virusCheck[T]=="loading"?(c.openBlock(),c.createBlock(Te,{key:0,class:"file__upload_list_icon_sub file__upload_list_icon_sub--loading","icon-name":"states",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="failed"?(c.openBlock(),c.createBlock(Te,{key:1,class:"file__upload_list_icon_sub","icon-name":"warning",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="detected"?(c.openBlock(),c.createBlock(Te,{key:2,class:"file__upload_list_icon_sub","icon-name":"danger",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),r.fileSaved&&r.errorOccurred[T]?(c.openBlock(),c.createBlock(Te,{key:3,class:"file__upload_list_icon_sub","icon-name":"error",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),c.createElementVNode("div",ek,[c.createElementVNode("div",tk,[c.createElementVNode("div",null,[c.createElementVNode("span",{title:m.name},c.toDisplayString(u(m.name))+c.toDisplayString(d(m.name)),9,nk),t.uploadProgress[T]==100&&r.fileSaved&&!r.errorOccurred[T]&&r.virusCheck[T]=="loading"?(c.openBlock(),c.createElementBlock("span",rk,[c.createTextVNode(c.toDisplayString(r.virusCheckText)+" ",1),c.createVNode(Te,{class:"file__upload_list_icon_sub--loading","icon-name":"processing",size:18})])):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="failed"?(c.openBlock(),c.createElementBlock("span",ok,c.toDisplayString(r.virusCheckFailedText),1)):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="detected"?(c.openBlock(),c.createElementBlock("span",ik,c.toDisplayString(r.virusDetectedText),1)):c.createCommentVNode("",!0),ak,r.fileSaved&&!r.errorOccurred[T]||!r.errorOccurred[T]&&r.virusCheck[T]?(c.openBlock(),c.createElementBlock("span",sk,c.toDisplayString(s(m.size)),1)):c.createCommentVNode("",!0),r.fileSaved&&r.errorOccurred[T]?(c.openBlock(),c.createElementBlock("span",lk,c.toDisplayString(r.errorMessage),1)):c.createCommentVNode("",!0)]),r.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",uk,c.toDisplayString(t.uploadProgress[T])+"%",1))]),r.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("progress",{key:0,id:"file",max:"100",value:t.uploadProgress[T]},c.toDisplayString(t.uploadProgress[T])+"% ",9,ck))]),r.fileSaved&&!r.virusCheck[T]&&!r.errorOccurred[T]?(c.openBlock(),c.createElementBlock("a",{key:4,class:"file__upload_list_download",download:"",href:h(m)},[c.createVNode(Te,{class:"file__upload_list_download_icon","icon-name":"download",size:24})],8,dk)):c.createCommentVNode("",!0),r.fileSaved&&r.errorOccurred[T]?(c.openBlock(),c.createElementBlock("a",{key:5,class:"file__upload_list_retry",onClick:I[3]||(I[3]=L=>N(L))},[c.createVNode(Te,{class:"file__upload_list_retry_icon","icon-name":"retry",size:24})])):c.createCommentVNode("",!0),t.uploadProgress[T]!==100?(c.openBlock(),c.createBlock(Te,{key:6,class:"file__upload_list_delete","icon-name":"close",size:24,onClick:L=>j(T)},null,8,["onClick"])):(c.openBlock(),c.createBlock(Te,{key:7,class:"file__upload_list_delete","icon-name":"delete",size:24,onClick:L=>y(T)},null,8,["onClick"]))],2))),128))])):c.createCommentVNode("",!0),!e.value&&!r.inline?(c.openBlock(),c.createElementBlock("div",fk," No file selected ")):c.createCommentVNode("",!0),!r.inline&&!r.fileSaved?(c.openBlock(),c.createElementBlock("div",Mk,[gk,c.createElementVNode("button",{class:c.normalizeClass(["file__upload_action_done",e.value&&!r.fileSaved?"file__upload_action_done--active":""]),onClick:v}," Done ",2)])):c.createCommentVNode("",!0)],2))}};var Ew="";const pk={class:"input__dropdown"},yk=["placeholder","value"],Nk={class:"input__dropdown_second"},mk=["tabindex"],jk=["onClick"],Ik=["onClick"],vM={__name:"InputDropdown",props:{list:{type:Array,required:!0},labelProp:{type:String,default:"label"},icon:{type:String,required:!0},placeholderInput:{type:String,default:"Enter value"},tabindex:{type:Number,required:!1,default:0},inputValue:{type:String,required:!1,default:""},inputIndex:{type:Number,required:!1,default:0},inputWidth:{type:String,required:!1,default:"75%"}},emits:["update"],setup(r,{emit:n}){const t=r,o=c.ref(t.list[0].label),e=c.ref(!1),i=c.ref(null);c.onMounted(()=>{n("update","",o.value)});function a(){n("update",i.value.value,o.value,t.inputIndex)}return(s,l)=>(c.openBlock(),c.createElementBlock("div",pk,[c.createElementVNode("input",{ref_key:"name",ref:i,class:"input__dropdown_text",placeholder:r.placeholderInput,style:c.normalizeStyle({width:r.inputWidth}),type:"text",value:r.inputValue,onInput:a},null,44,yk),c.createElementVNode("div",Nk,[c.createVNode(Te,{"icon-name":r.icon,size:18},null,8,["icon-name"]),c.createElementVNode("div",{class:"custom__select",tabindex:r.tabindex,onBlur:l[1]||(l[1]=u=>e.value=!1)},[c.createElementVNode("div",{class:c.normalizeClass(["custom__select_selected",{"custom__select--open":e.value}]),onClick:l[0]||(l[0]=u=>e.value=!e.value)},c.toDisplayString(o.value),3),typeof r.list[0]=="object"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["custom__select_items",{"custom__select--hide":!e.value}])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.list,(u,d)=>(c.openBlock(),c.createElementBlock("div",{key:d,onClick:f=>{o.value=u[r.labelProp],e.value=!1,a()}},c.toDisplayString(u[r.labelProp]),9,jk))),128))],2)):c.createCommentVNode("",!0),typeof r.list[0]=="string"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(["custom__select_items",{"custom__select--hide":!e.value}])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.list,(u,d)=>(c.openBlock(),c.createElementBlock("div",{key:d,onClick:f=>{o.value=u,e.value=!1,a()}},c.toDisplayString(u),9,Ik))),128))],2)):c.createCommentVNode("",!0)],40,mk)])]))}};var _w="";const Dk={class:"input-group-multiple"},xk={class:"input-label"},vk={__name:"InputDropdownMultiple",props:{labelProp:{type:String,default:"Label"},icon:{type:String,required:!0},placeholderInput:{type:String,default:"Enter value"},tabindex:{type:Number,required:!1,default:0},inputValue:{type:String,required:!1,default:""},inputIndex:{type:Number,required:!1,default:0},inputWidth:{type:String,required:!1,default:"75%"},multipleProp:{type:Array,required:!0}},emits:["update"],setup(r,{emit:n}){const t=r,o=c.reactive(t.multipleProp);function e(a,s,l){console.log(o),o&&(o.map(u=>{u.id===l&&(u.input=a,u.optionSelected=s)}),n("update",o))}function i(){o&&o.push({id:o.length+1,list:o[0].list,input:null,optionSelected:null})}return(a,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",Dk,[c.createElementVNode("label",xk,c.toDisplayString(r.labelProp),1),c.createElementVNode("button",{class:"btn btn-secondary btn-multiple",onClick:i},[c.createVNode(Te,{"icon-name":"plus",size:24})])]),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o,(l,u)=>(c.openBlock(),c.createBlock(vM,{key:u,icon:t.icon,"input-index":l.id,"input-value":l.input,"input-width":t.inputWidth,list:l.list,"placeholder-input":t.placeholderInput,tabindex:t.tabindex,onUpdate:e},null,8,["icon","input-index","input-value","input-width","list","placeholder-input","tabindex"]))),128))],64))}};var Qw="";const bk={class:"input__group"},Tk=["type"],kk={__name:"InputGroup",props:{inputType:{type:String,default:"text"},iconName:{type:String,required:!0},widthProp:{type:String,default:"200px"},direction:{type:String,default:"right"}},setup(r){const n=r;c.useCssVars(o=>({"14ee876f":t.value,"0aeebdb8":r.widthProp}));const t=c.ref("row");return c.onMounted(()=>{n.direction=="left"&&(t.value="row-reverse")}),(o,e)=>(c.openBlock(),c.createElementBlock("div",bk,[c.createElementVNode("input",{class:"input__group_field",type:r.inputType},null,8,Tk),c.createVNode(Te,{class:"input__group_icon","icon-name":r.iconName},null,8,["icon-name"])]))}};var Ak="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAR2SURBVHgBlVVdaFtlGH6+LydJ89OYtHVbf+YyhoPK5uK2G3/oIlTYhRctKApebAiCXowtDLzxIi3sUqnBiiBerF6osGl7J0idqWyD4WSZF3PzZ4tt7Y/NmnRN0yYn5/t8z9e0Ne35Wnwg5Jzzvt/7vO/7vT8MO6BnYDEuPP4TXMi4kIgyxqOrElEAZEZKZLhVHhpJBDPb2WE6wcsDZtwwXEkJGd9G7T9WRJqZ+f6RxONprUp9BDIs3CLJJM7tSLAJkg5xIT6EVSTCSEFLdPKT5ai36hqWzBVj8v+R1IFVM8y0ekcSvuwWop6BfFgaoR8kY0RSf04qRUriSh6l/AzcDY3wRtpgmWUSUhSewFYuITMFwV9MJ5iKzFgTCHfITtcWEhvW/H38NfYpViZ+UZ7Jmn920B3dZxDuPLnljOQsFmYiSY8J+53Xook734nE4v1r+P2rBMoTt1VUqzRC/ThFU85P2m7CCYKxc3bVrhNZRjDpdPHmoxnMXBmErFbgDIncza+RuzGE1QTXQ1k0fElF9OpAJcaZK+5kZuHuKCqlAraDbWzmxmWUJm5pXEH89Y8W49w0cNrBGYWlqTvbFvjTna1oigQoLQKP/ryq0eIooSFOxcCP6AxJaWkkDAEfw/uJ52GaJt658D1yhSmdGdJmJ+iOZEyrQaFeOPss9u3xKXUVHlXN8UO78U2qFx0tbuxv9eOzZDepCr0ZGlsGdUFYR3L04C50H4ugt2s/HkwXsVgqoyXUgLbdQeITtgFFEPK58VR7iFKk81dEuU7m5yWkXmtEo98Ao0jeS12FWeVo3+WnZhT48edJvNl3RTkU8nN8fKoJAWNJE5HdsJJl6SG6WVZhbsyZfuxVlSLwwbtd2NMcUM/2wReOP4Enoy2rVuhbQTRhpep25pGiwBmvZJ2EVcuD8/fewGwloIy1NftUdUlqUkn7glPKWpsblO7flTDO330FFjyORKSd4bBcY9CCYboUXFe3S9UmYmuvNeTJGRrEziTM1q/eJieLaWhAnuDbiQO12cZgLa0Ay1UI+7eyUfqjMwehWymMHHNXqxc57Y003W5aR3YrfwCXsp3KkCvgAfd7wX3073PRLAOGxztxbWqfrudtpC/R9uWrrGa/1KjS6MSXfxzFFxNdsJhXxUmOQbj8+Py35zB07xilh2kyAoom328/K6KRM740mUxtHoz2fRTmBKYfMMxXaP+wCMzcAsyHCyQLomRElayQs+y1tAVUAKnLtdW+3ke8avSRILNGZpPMjlsozlMBUI6u36Ebaz8M+OjiPUHwvc9g9KeyWkqLD13ITdpkG9OBPmcQNPrW3uti7hlYjkq3Z5iSH8vPEslCfSV1Ha7g1EucSt/Exe8krv/qrzMQeMxCUyu3d1WGutt5lW+QyXDZLPf9M26cldAODkfY99zSUU4FvL6+kdoK1xKt4dDbc3G3EUmSQhw7EDLqFSFZmvZtf2bQvm8HHeyA2FvFGPd6TlN0R0iZJj0Lq2NSZiWsLGNsjKOYvjlIbbIN/gUK8Nn86IrnuAAAAABJRU5ErkJggg==";function $t(r){return[null,void 0].indexOf(r)!==-1}function wk(r,n,t){const{object:o,valueProp:e,mode:i}=c.toRefs(r),a=c.getCurrentInstance().proxy,s=t.iv,l=f=>{s.value=d(f);const M=u(f);n.emit("change",M,a),n.emit("input",M),n.emit("update:modelValue",M)},u=f=>o.value||$t(f)?f:Array.isArray(f)?f.map(M=>M[e.value]):f[e.value],d=f=>$t(f)?i.value==="single"?{}:[]:f;return{update:l}}function Lk(r,n){const{value:t,modelValue:o,mode:e,valueProp:i}=c.toRefs(r),a=c.ref(e.value!=="single"?[]:{}),s=o&&o.value!==void 0?o:t,l=c.computed(()=>e.value==="single"?a.value[i.value]:a.value.map(d=>d[i.value])),u=c.computed(()=>e.value!=="single"?a.value.map(d=>d[i.value]).join(","):a.value[i.value]);return{iv:a,internalValue:a,ev:s,externalValue:s,textValue:u,plainValue:l}}function zk(r,n,t){const{regex:o}=c.toRefs(r),e=c.getCurrentInstance().proxy,i=t.isOpen,a=t.open,s=c.ref(null),l=c.ref(null),u=()=>{s.value=""},d=p=>{s.value=p.target.value},f=p=>{if(o&&o.value){let y=o.value;typeof y=="string"&&(y=new RegExp(y)),p.key.match(y)||p.preventDefault()}},M=p=>{if(o&&o.value){let j=(p.clipboardData||window.clipboardData).getData("Text"),v=o.value;typeof v=="string"&&(v=new RegExp(v)),j.split("").every(h=>!!h.match(v))||p.preventDefault()}n.emit("paste",p,e)};return c.watch(s,p=>{!i.value&&p&&a(),n.emit("search-change",p,e)}),{search:s,input:l,clearSearch:u,handleSearchInput:d,handleKeypress:f,handlePaste:M}}function Ok(r,n,t){const{groupSelect:o,mode:e,groups:i,disabledProp:a}=c.toRefs(r),s=c.ref(null),l=d=>{d===void 0||d!==null&&d[a.value]||i.value&&d&&d.group&&(e.value==="single"||!o.value)||(s.value=d)};return{pointer:s,setPointer:l,clearPointer:()=>{l(null)}}}function ta(r,n=!0){return n?String(r).toLowerCase().trim():String(r).normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase().trim()}function Sk(r){return Object.prototype.toString.call(r)==="[object Object]"}function Ck(r,n){const t=n.slice().sort();return r.length===n.length&&r.slice().sort().every(function(o,e){return o===t[e]})}function Ek(r,n,t){const{options:o,mode:e,trackBy:i,limit:a,hideSelected:s,createTag:l,createOption:u,label:d,appendNewTag:f,appendNewOption:M,multipleLabel:p,object:y,loading:j,delay:v,resolveOnLoad:h,minChars:N,filterResults:D,clearOnSearch:I,clearOnSelect:m,valueProp:T,canDeselect:L,max:A,strict:z,closeOnSelect:S,groups:b,reverse:g,infinite:x,groupOptions:k,groupHideEmpty:w,groupSelect:C,onCreate:E,disabledProp:O,searchStart:_}=c.toRefs(r),Y=c.getCurrentInstance().proxy,U=t.iv,Q=t.ev,B=t.search,V=t.clearSearch,P=t.update,R=t.pointer,W=t.clearPointer,H=t.focus,G=t.deactivate,X=t.close,ie=c.ref([]),ee=c.ref([]),ae=c.ref(!1),Me=c.ref(null),Z=c.ref(x.value&&a.value===-1?10:a.value),q=c.computed(()=>l.value||u.value||!1),ce=c.computed(()=>f.value!==void 0?f.value:M.value!==void 0?M.value:!0),ue=c.computed(()=>{if(b.value){let $=ee.value||[],se=[];return $.forEach(je=>{Nt(je[k.value]).forEach(ne=>{se.push(Object.assign({},ne,je[O.value]?{[O.value]:!0}:{}))})}),se}else{let $=Nt(ee.value||[]);return ie.value.length&&($=$.concat(ie.value)),$}}),Ne=c.computed(()=>b.value?De((ee.value||[]).map(($,se)=>{const je=Nt($[k.value]);return{...$,index:se,group:!0,[k.value]:Bt(je,!1).map(ne=>Object.assign({},ne,$[O.value]?{[O.value]:!0}:{})),__VISIBLE__:Bt(je).map(ne=>Object.assign({},ne,$[O.value]?{[O.value]:!0}:{}))}})):[]),Oe=c.computed(()=>{let $=ue.value;return g.value&&($=$.reverse()),te.value.length&&($=te.value.concat($)),Bt($)}),be=c.computed(()=>{let $=Oe.value;return Z.value>0&&($=$.slice(0,Z.value)),$}),F=c.computed(()=>{switch(e.value){case"single":return!$t(U.value[T.value]);case"multiple":case"tags":return!$t(U.value)&&U.value.length>0}}),K=c.computed(()=>p!==void 0&&p.value!==void 0?p.value(U.value,Y):U.value&&U.value.length>1?`${U.value.length} options selected`:"1 option selected"),re=c.computed(()=>!ue.value.length&&!ae.value&&!te.value.length),le=c.computed(()=>ue.value.length>0&&be.value.length==0&&(B.value&&b.value||!b.value)),te=c.computed(()=>q.value===!1||!B.value?[]:pe(B.value)!==-1?[]:[{[T.value]:B.value,[d.value]:B.value,[oe.value]:B.value,__CREATE__:!0}]),oe=c.computed(()=>i.value||d.value),Ie=c.computed(()=>{switch(e.value){case"single":return null;case"multiple":case"tags":return[]}}),Qe=c.computed(()=>j.value||ae.value),Se=$=>{switch(typeof $!="object"&&($=J($)),e.value){case"single":P($);break;case"multiple":case"tags":P(U.value.concat($));break}n.emit("select",it($),$,Y)},tt=$=>{switch(typeof $!="object"&&($=J($)),e.value){case"single":Ut();break;case"tags":case"multiple":P(Array.isArray($)?U.value.filter(se=>$.map(je=>je[T.value]).indexOf(se[T.value])===-1):U.value.filter(se=>se[T.value]!=$[T.value]));break}n.emit("deselect",it($),$,Y)},it=$=>y.value?$:$[T.value],Jt=$=>{tt($)},ln=($,se)=>{if(se.button!==0){se.preventDefault();return}Jt($)},Ut=()=>{n.emit("clear",Y),P(Ie.value)},gt=$=>{if($.group!==void 0)return e.value==="single"?!1:Ue($[k.value])&&$[k.value].length;switch(e.value){case"single":return!$t(U.value)&&U.value[T.value]==$[T.value];case"tags":case"multiple":return!$t(U.value)&&U.value.map(se=>se[T.value]).indexOf($[T.value])!==-1}},ut=$=>$[O.value]===!0,Xt=()=>A===void 0||A.value===-1||!F.value&&A.value>0?!1:U.value.length>=A.value,Tt=$=>{if(!ut($)){if(E&&E.value&&!gt($)&&$.__CREATE__&&($={...$},delete $.__CREATE__,$=E.value($,Y),$ instanceof Promise)){ae.value=!0,$.then(se=>{ae.value=!1,bn(se)});return}bn($)}},bn=$=>{switch($.__CREATE__&&($={...$},delete $.__CREATE__),e.value){case"single":if($&&gt($)){L.value&&tt($);return}$&&kt($),m.value&&V(),S.value&&(W(),X()),$&&Se($);break;case"multiple":if($&&gt($)){tt($);return}if(Xt())return;$&&(kt($),Se($)),m.value&&V(),s.value&&W(),S.value&&X();break;case"tags":if($&&gt($)){tt($);return}if(Xt())return;$&&kt($),m.value&&V(),$&&Se($),s.value&&W(),S.value&&X();break}S.value||H()},Vn=$=>{if(!(ut($)||e.value==="single"||!C.value)){switch(e.value){case"multiple":case"tags":Yt($[k.value])?tt($[k.value]):Se($[k.value].filter(se=>U.value.map(je=>je[T.value]).indexOf(se[T.value])===-1).filter(se=>!se[O.value]).filter((se,je)=>U.value.length+1+je<=A.value||A.value===-1));break}S.value&&G()}},kt=$=>{J($[T.value])===void 0&&q.value&&(n.emit("tag",$[T.value],Y),n.emit("option",$[T.value],Y),ce.value&&me($),V())},Tn=()=>{e.value!=="single"&&Se(be.value)},Yt=$=>$.find(se=>!gt(se)&&!se[O.value])===void 0,Ue=$=>$.find(se=>!gt(se))===void 0,J=$=>ue.value[ue.value.map(se=>String(se[T.value])).indexOf(String($))],pe=($,se=!0)=>ue.value.map(je=>parseInt(je[oe.value])==je[oe.value]?parseInt(je[oe.value]):je[oe.value]).indexOf(parseInt($)==$?parseInt($):$),ge=$=>["tags","multiple"].indexOf(e.value)!==-1&&s.value&&gt($),me=$=>{ie.value.push($)},De=$=>w.value?$.filter(se=>B.value?se.__VISIBLE__.length:se[k.value].length):$.filter(se=>B.value?se.__VISIBLE__.length:!0),Bt=($,se=!0)=>{let je=$;return B.value&&D.value&&(je=je.filter(ne=>_.value?ta(ne[oe.value],z.value).startsWith(ta(B.value,z.value)):ta(ne[oe.value],z.value).indexOf(ta(B.value,z.value))!==-1)),s.value&&se&&(je=je.filter(ne=>!ge(ne))),je},Nt=$=>{let se=$;return Sk(se)&&(se=Object.keys(se).map(je=>{let ne=se[je];return{[T.value]:je,[oe.value]:ne,[d.value]:ne}})),se=se.map(je=>typeof je=="object"?je:{[T.value]:je,[oe.value]:je,[d.value]:je}),se},Kt=()=>{$t(Q.value)||(U.value=cn(Q.value))},qt=$=>(ae.value=!0,new Promise((se,je)=>{o.value(B.value,Y).then(ne=>{ee.value=ne||[],typeof $=="function"&&$(ne),ae.value=!1}).catch(ne=>{console.error(ne),ee.value=[],ae.value=!1}).finally(()=>{se()})})),un=()=>{if(!!F.value)if(e.value==="single"){let $=J(U.value[T.value]);if($!==void 0){let se=$[d.value];U.value[d.value]=se,y.value&&(Q.value[d.value]=se)}}else U.value.forEach(($,se)=>{let je=J(U.value[se][T.value]);if(je!==void 0){let ne=je[d.value];U.value[se][d.value]=ne,y.value&&(Q.value[se][d.value]=ne)}})},Zn=$=>{qt($)},cn=$=>$t($)?e.value==="single"?{}:[]:y.value?$:e.value==="single"?J($)||{}:$.filter(se=>!!J(se)).map(se=>J(se)),Cr=()=>{Me.value=c.watch(B,$=>{$.length<N.value||!$&&N.value!==0||(ae.value=!0,I.value&&(ee.value=[]),setTimeout(()=>{$==B.value&&o.value(B.value,Y).then(se=>{($==B.value||!B.value)&&(ee.value=se,R.value=be.value.filter(je=>je[O.value]!==!0)[0]||null,ae.value=!1)}).catch(se=>{console.error(se)})},v.value))},{flush:"sync"})};if(e.value!=="single"&&!$t(Q.value)&&!Array.isArray(Q.value))throw new Error(`v-model must be an array when using "${e.value}" mode`);return o&&typeof o.value=="function"?h.value?qt(Kt):y.value==!0&&Kt():(ee.value=o.value,Kt()),v.value>-1&&Cr(),c.watch(v,($,se)=>{Me.value&&Me.value(),$>=0&&Cr()}),c.watch(Q,$=>{if($t($)){U.value=cn($);return}switch(e.value){case"single":(y.value?$[T.value]!=U.value[T.value]:$!=U.value[T.value])&&(U.value=cn($));break;case"multiple":case"tags":Ck(y.value?$.map(se=>se[T.value]):$,U.value.map(se=>se[T.value]))||(U.value=cn($));break}},{deep:!0}),c.watch(o,($,se)=>{typeof r.options=="function"?h.value&&(!se||$&&$.toString()!==se.toString())&&qt():(ee.value=r.options,Object.keys(U.value).length||Kt(),un())}),c.watch(d,un),{pfo:Oe,fo:be,filteredOptions:be,hasSelected:F,multipleLabelText:K,eo:ue,extendedOptions:ue,fg:Ne,filteredGroups:Ne,noOptions:re,noResults:le,resolving:ae,busy:Qe,offset:Z,select:Se,deselect:tt,remove:Jt,selectAll:Tn,clear:Ut,isSelected:gt,isDisabled:ut,isMax:Xt,getOption:J,handleOptionClick:Tt,handleGroupClick:Vn,handleTagRemove:ln,refreshOptions:Zn,resolveOptions:qt,refreshLabels:un}}function _k(r,n,t){const{valueProp:o,showOptions:e,searchable:i,groupLabel:a,groups:s,mode:l,groupSelect:u,disabledProp:d}=c.toRefs(r),f=t.fo,M=t.fg,p=t.handleOptionClick,y=t.handleGroupClick,j=t.search,v=t.pointer,h=t.setPointer,N=t.clearPointer,D=t.multiselect,I=t.isOpen,m=c.computed(()=>f.value.filter(P=>!P[d.value])),T=c.computed(()=>M.value.filter(P=>!P[d.value])),L=c.computed(()=>l.value!=="single"&&u.value),A=c.computed(()=>v.value&&v.value.group),z=c.computed(()=>B(v.value)),S=c.computed(()=>{const P=A.value?v.value:B(v.value),R=T.value.map(H=>H[a.value]).indexOf(P[a.value]);let W=T.value[R-1];return W===void 0&&(W=g.value),W}),b=c.computed(()=>{let P=T.value.map(R=>R.label).indexOf(A.value?v.value[a.value]:B(v.value)[a.value])+1;return T.value.length<=P&&(P=0),T.value[P]}),g=c.computed(()=>[...T.value].slice(-1)[0]),x=c.computed(()=>v.value.__VISIBLE__.filter(P=>!P[d.value])[0]),k=c.computed(()=>{const P=z.value.__VISIBLE__.filter(R=>!R[d.value]);return P[P.map(R=>R[o.value]).indexOf(v.value[o.value])-1]}),w=c.computed(()=>{const P=B(v.value).__VISIBLE__.filter(R=>!R[d.value]);return P[P.map(R=>R[o.value]).indexOf(v.value[o.value])+1]}),C=c.computed(()=>[...S.value.__VISIBLE__.filter(P=>!P[d.value])].slice(-1)[0]),E=c.computed(()=>[...g.value.__VISIBLE__.filter(P=>!P[d.value])].slice(-1)[0]),O=P=>!!v.value&&(!P.group&&v.value[o.value]==P[o.value]||P.group!==void 0&&v.value[a.value]==P[a.value])?!0:void 0,_=()=>{h(m.value[0]||null)},Y=()=>{!v.value||v.value[d.value]===!0||(A.value?y(v.value):p(v.value))},U=()=>{if(v.value===null)h((s.value&&L.value?T.value[0]:m.value[0])||null);else if(s.value&&L.value){let P=A.value?x.value:w.value;P===void 0&&(P=b.value),h(P||null)}else{let P=m.value.map(R=>R[o.value]).indexOf(v.value[o.value])+1;m.value.length<=P&&(P=0),h(m.value[P]||null)}c.nextTick(()=>{V()})},Q=()=>{if(v.value===null){let P=m.value[m.value.length-1];s.value&&L.value&&(P=E.value,P===void 0&&(P=g.value)),h(P||null)}else if(s.value&&L.value){let P=A.value?C.value:k.value;P===void 0&&(P=A.value?S.value:z.value),h(P||null)}else{let P=m.value.map(R=>R[o.value]).indexOf(v.value[o.value])-1;P<0&&(P=m.value.length-1),h(m.value[P]||null)}c.nextTick(()=>{V()})},B=P=>T.value.find(R=>R.__VISIBLE__.map(W=>W[o.value]).indexOf(P[o.value])!==-1),V=()=>{let P=D.value.querySelector("[data-pointed]");if(!P)return;let R=P.parentElement.parentElement;s.value&&(R=A.value?P.parentElement.parentElement.parentElement:P.parentElement.parentElement.parentElement.parentElement),P.offsetTop+P.offsetHeight>R.clientHeight+R.scrollTop&&(R.scrollTop=P.offsetTop+P.offsetHeight-R.clientHeight),P.offsetTop<R.scrollTop&&(R.scrollTop=P.offsetTop)};return c.watch(j,P=>{i.value&&(P.length&&e.value?_():N())}),c.watch(I,P=>{if(P){let R=D.value.querySelectorAll("[data-selected]")[0];if(!R)return;let W=R.parentElement.parentElement;c.nextTick(()=>{W.scrollTop>0||(W.scrollTop=R.offsetTop)})}}),{pointer:v,canPointGroups:L,isPointed:O,setPointerFirst:_,selectPointer:Y,forwardPointer:U,backwardPointer:Q}}function Qk(r,n,t){const{disabled:o}=c.toRefs(r),e=c.getCurrentInstance().proxy,i=c.ref(!1);return{isOpen:i,open:()=>{i.value||o.value||(i.value=!0,n.emit("open",e))},close:()=>{!i.value||(i.value=!1,n.emit("close",e))}}}function Uk(r,n,t){const{searchable:o,disabled:e}=c.toRefs(r),i=t.input,a=t.open,s=t.close,l=t.clearSearch,u=t.isOpen,d=c.ref(null),f=c.ref(null),M=c.ref(null),p=c.ref(!1),y=c.ref(!1),j=c.computed(()=>o.value||e.value?-1:0),v=()=>{o.value&&i.value.blur(),f.value.blur()},h=()=>{o.value&&!e.value&&i.value.focus()},N=(A=!0)=>{e.value||(p.value=!0,A&&a())},D=()=>{p.value=!1,setTimeout(()=>{p.value||(s(),l())},1)};return{multiselect:d,wrapper:f,tags:M,tabindex:j,isActive:p,mouseClicked:y,blur:v,focus:h,activate:N,deactivate:D,handleFocusIn:A=>{A.target.closest("[data-tags]")||A.target.closest("[data-clear]")||N(y.value)},handleFocusOut:()=>{D()},handleCaretClick:()=>{D(),v()},handleMousedown:A=>{y.value=!0,u.value&&(A.target.isEqualNode(f.value)||A.target.isEqualNode(M.value))?setTimeout(()=>{D()},0):document.activeElement.isEqualNode(f.value)&&!u.value&&(console.log(A.target.closest("[data-tags]")),N()),setTimeout(()=>{y.value=!1},0)}}}function Yk(r,n,t){const{mode:o,addTagOn:e,openDirection:i,searchable:a,showOptions:s,valueProp:l,groups:u,addOptionOn:d,createTag:f,createOption:M,reverse:p}=c.toRefs(r),y=c.getCurrentInstance().proxy,j=t.iv,v=t.update,h=t.search,N=t.setPointer,D=t.selectPointer,I=t.backwardPointer,m=t.forwardPointer,T=t.multiselect,L=t.wrapper,A=t.tags,z=t.isOpen,S=t.open,b=t.blur,g=t.fo,x=c.computed(()=>f.value||M.value||!1),k=c.computed(()=>e.value!==void 0?e.value:d.value!==void 0?d.value:["enter"]),w=()=>{o.value==="tags"&&!s.value&&x.value&&a.value&&!u.value&&N(g.value[g.value.map(O=>O[l.value]).indexOf(h.value)])};return{handleKeydown:O=>{n.emit("keydown",O,y);let _,Y;switch(["ArrowLeft","ArrowRight","Enter"].indexOf(O.key)!==-1&&o.value==="tags"&&(_=[...T.value.querySelectorAll("[data-tags] > *")].filter(U=>U!==A.value),Y=_.findIndex(U=>U===document.activeElement)),O.key){case"Backspace":if(o.value==="single"||a.value&&[null,""].indexOf(h.value)===-1||j.value.length===0)return;v([...j.value].slice(0,-1));break;case"Enter":if(O.preventDefault(),O.keyCode===229)return;if(Y!==-1&&Y!==void 0){v([...j.value].filter((U,Q)=>Q!==Y)),Y===_.length-1&&(_.length-1?_[_.length-2].focus():a.value?A.value.querySelector("input").focus():L.value.focus());return}if(k.value.indexOf("enter")===-1&&x.value)return;w(),D();break;case" ":if(!x.value&&!a.value){O.preventDefault(),w(),D();return}if(!x.value)return!1;if(k.value.indexOf("space")===-1&&x.value)return;O.preventDefault(),w(),D();break;case"Tab":case";":case",":if(k.value.indexOf(O.key.toLowerCase())===-1||!x.value)return;w(),D(),O.preventDefault();break;case"Escape":b();break;case"ArrowUp":if(O.preventDefault(),!s.value)return;z.value||S(),I();break;case"ArrowDown":if(O.preventDefault(),!s.value)return;z.value||S(),m();break;case"ArrowLeft":if(a.value&&A.value&&A.value.querySelector("input").selectionStart||O.shiftKey||o.value!=="tags"||!j.value||!j.value.length)return;O.preventDefault(),Y===-1?_[_.length-1].focus():Y>0&&_[Y-1].focus();break;case"ArrowRight":if(Y===-1||O.shiftKey||o.value!=="tags"||!j.value||!j.value.length)return;O.preventDefault(),_.length>Y+1?_[Y+1].focus():a.value?A.value.querySelector("input").focus():a.value||L.value.focus();break}},handleKeyup:O=>{n.emit("keyup",O,y)},preparePointer:w}}function Bk(r,n,t){const{classes:o,disabled:e,openDirection:i,showOptions:a}=c.toRefs(r),s=t.isOpen,l=t.isPointed,u=t.isSelected,d=t.isDisabled,f=t.isActive,M=t.canPointGroups,p=t.resolving,y=t.fo,j=c.computed(()=>({container:"multiselect",containerDisabled:"is-disabled",containerOpen:"is-open",containerOpenTop:"is-open-top",containerActive:"is-active",wrapper:"multiselect-wrapper",singleLabel:"multiselect-single-label",singleLabelText:"multiselect-single-label-text",multipleLabel:"multiselect-multiple-label",search:"multiselect-search",tags:"multiselect-tags",tag:"multiselect-tag",tagDisabled:"is-disabled",tagRemove:"multiselect-tag-remove",tagRemoveIcon:"multiselect-tag-remove-icon",tagsSearchWrapper:"multiselect-tags-search-wrapper",tagsSearch:"multiselect-tags-search",tagsSearchCopy:"multiselect-tags-search-copy",placeholder:"multiselect-placeholder",caret:"multiselect-caret",caretOpen:"is-open",clear:"multiselect-clear",clearIcon:"multiselect-clear-icon",spinner:"multiselect-spinner",inifinite:"multiselect-inifite",inifiniteSpinner:"multiselect-inifite-spinner",dropdown:"multiselect-dropdown",dropdownTop:"is-top",dropdownHidden:"is-hidden",options:"multiselect-options",optionsTop:"is-top",group:"multiselect-group",groupLabel:"multiselect-group-label",groupLabelPointable:"is-pointable",groupLabelPointed:"is-pointed",groupLabelSelected:"is-selected",groupLabelDisabled:"is-disabled",groupLabelSelectedPointed:"is-selected is-pointed",groupLabelSelectedDisabled:"is-selected is-disabled",groupOptions:"multiselect-group-options",option:"multiselect-option",optionPointed:"is-pointed",optionSelected:"is-selected",optionDisabled:"is-disabled",optionSelectedPointed:"is-selected is-pointed",optionSelectedDisabled:"is-selected is-disabled",noOptions:"multiselect-no-options",noResults:"multiselect-no-results",fakeInput:"multiselect-fake-input",assist:"multiselect-assistive-text",spacer:"multiselect-spacer",...o.value})),v=c.computed(()=>!!(s.value&&a.value&&(!p.value||p.value&&y.value.length)));return{classList:c.computed(()=>{const N=j.value;return{container:[N.container].concat(e.value?N.containerDisabled:[]).concat(v.value&&i.value==="top"?N.containerOpenTop:[]).concat(v.value&&i.value!=="top"?N.containerOpen:[]).concat(f.value?N.containerActive:[]),wrapper:N.wrapper,spacer:N.spacer,singleLabel:N.singleLabel,singleLabelText:N.singleLabelText,multipleLabel:N.multipleLabel,search:N.search,tags:N.tags,tag:[N.tag].concat(e.value?N.tagDisabled:[]),tagRemove:N.tagRemove,tagRemoveIcon:N.tagRemoveIcon,tagsSearchWrapper:N.tagsSearchWrapper,tagsSearch:N.tagsSearch,tagsSearchCopy:N.tagsSearchCopy,placeholder:N.placeholder,caret:[N.caret].concat(s.value?N.caretOpen:[]),clear:N.clear,clearIcon:N.clearIcon,spinner:N.spinner,inifinite:N.inifinite,inifiniteSpinner:N.inifiniteSpinner,dropdown:[N.dropdown].concat(i.value==="top"?N.dropdownTop:[]).concat(!s.value||!a.value||!v.value?N.dropdownHidden:[]),options:[N.options].concat(i.value==="top"?N.optionsTop:[]),group:N.group,groupLabel:D=>{let I=[N.groupLabel];return l(D)?I.push(u(D)?N.groupLabelSelectedPointed:N.groupLabelPointed):u(D)&&M.value?I.push(d(D)?N.groupLabelSelectedDisabled:N.groupLabelSelected):d(D)&&I.push(N.groupLabelDisabled),M.value&&I.push(N.groupLabelPointable),I},groupOptions:N.groupOptions,option:(D,I)=>{let m=[N.option];return l(D)?m.push(u(D)?N.optionSelectedPointed:N.optionPointed):u(D)?m.push(d(D)?N.optionSelectedDisabled:N.optionSelected):(d(D)||I&&d(I))&&m.push(N.optionDisabled),m},noOptions:N.noOptions,noResults:N.noResults,assist:N.assist,fakeInput:N.fakeInput}}),showDropdown:v}}function Pk(r,n,t){const{limit:o,infinite:e}=c.toRefs(r),i=t.isOpen,a=t.offset,s=t.search,l=t.pfo,u=t.eo,d=c.ref(null),f=c.ref(null),M=c.computed(()=>a.value<l.value.length),p=j=>{const{isIntersecting:v,target:h}=j[0];if(v){const N=h.offsetParent,D=N.scrollTop;a.value+=o.value==-1?10:o.value,c.nextTick(()=>{N.scrollTop=D})}},y=()=>{i.value&&a.value<l.value.length?d.value.observe(f.value):!i.value&&d.value&&d.value.disconnect()};return c.watch(i,()=>{!e.value||y()}),c.watch(s,()=>{!e.value||(a.value=o.value,y())},{flush:"post"}),c.watch(u,()=>{!e.value||y()},{immediate:!1,flush:"post"}),c.onMounted(()=>{window&&window.IntersectionObserver&&(d.value=new IntersectionObserver(p))}),{hasMore:M,infiniteLoader:f}}function Rk(r,n,t){const{placeholder:o,id:e,valueProp:i,label:a,mode:s,groupLabel:l,aria:u,searchable:d}=c.toRefs(r),f=t.pointer,M=t.iv,p=t.hasSelected,y=t.multipleLabelText,j=c.ref(null),v=c.computed(()=>{let g=[];return e&&e.value&&g.push(e.value),g.push("assist"),g.join("-")}),h=c.computed(()=>{let g=[];return e&&e.value&&g.push(e.value),g.push("multiselect-options"),g.join("-")}),N=c.computed(()=>{let g=[];if(e&&e.value&&g.push(e.value),f.value)return g.push(f.value.group?"multiselect-group":"multiselect-option"),g.push(f.value.group?f.value.index:f.value[i.value]),g.join("-")}),D=c.computed(()=>o.value),I=c.computed(()=>s.value!=="single"),m=c.computed(()=>{let g="";return s.value==="single"&&p.value&&(g+=M.value[a.value]),s.value==="multiple"&&p.value&&(g+=y.value),s.value==="tags"&&p.value&&(g+=M.value.map(x=>x[a.value]).join(", ")),g}),T=c.computed(()=>{let g={...u.value};return d.value&&(g["aria-labelledby"]=g["aria-labelledby"]?`${v.value} ${g["aria-labelledby"]}`:v.value,m.value&&g["aria-label"]&&(g["aria-label"]=`${m.value}, ${g["aria-label"]}`)),g}),L=g=>{let x=[];return e&&e.value&&x.push(e.value),x.push("multiselect-option"),x.push(g[i.value]),x.join("-")},A=g=>{let x=[];return e&&e.value&&x.push(e.value),x.push("multiselect-group"),x.push(g.index),x.join("-")},z=g=>{let x=[];return x.push(g[a.value]),x.join(" ")},S=g=>{let x=[];return x.push(g[l.value]),x.join(" ")},b=g=>`${g} \u274E`;return c.onMounted(()=>{if(e&&e.value&&document&&document.querySelector){let g=document.querySelector(`[for="${e.value}"]`);j.value=g?g.innerText:null}}),{arias:T,ariaLabel:m,ariaAssist:v,ariaControls:h,ariaPlaceholder:D,ariaMultiselectable:I,ariaActiveDescendant:N,ariaOptionId:L,ariaOptionLabel:z,ariaGroupId:A,ariaGroupLabel:S,ariaTagLabel:b}}function Vk(r,n,t,o={}){return t.forEach(e=>{e&&(o={...o,...e(r,n,o)})}),o}var Vl={name:"Multiselect",emits:["paste","open","close","select","deselect","input","search-change","tag","option","update:modelValue","change","clear","keydown","keyup"],props:{value:{required:!1},modelValue:{required:!1},options:{type:[Array,Object,Function],required:!1,default:()=>[]},id:{type:[String,Number],required:!1},name:{type:[String,Number],required:!1,default:"multiselect"},disabled:{type:Boolean,required:!1,default:!1},label:{type:String,required:!1,default:"label"},trackBy:{type:String,required:!1,default:void 0},valueProp:{type:String,required:!1,default:"value"},placeholder:{type:String,required:!1,default:null},mode:{type:String,required:!1,default:"single"},searchable:{type:Boolean,required:!1,default:!1},limit:{type:Number,required:!1,default:-1},hideSelected:{type:Boolean,required:!1,default:!0},createTag:{type:Boolean,required:!1,default:void 0},createOption:{type:Boolean,required:!1,default:void 0},appendNewTag:{type:Boolean,required:!1,default:void 0},appendNewOption:{type:Boolean,required:!1,default:void 0},addTagOn:{type:Array,required:!1,default:void 0},addOptionOn:{type:Array,required:!1,default:void 0},caret:{type:Boolean,required:!1,default:!0},loading:{type:Boolean,required:!1,default:!1},noOptionsText:{type:String,required:!1,default:"The list is empty"},noResultsText:{type:String,required:!1,default:"No results found"},multipleLabel:{type:Function,required:!1},object:{type:Boolean,required:!1,default:!1},delay:{type:Number,required:!1,default:-1},minChars:{type:Number,required:!1,default:0},resolveOnLoad:{type:Boolean,required:!1,default:!0},filterResults:{type:Boolean,required:!1,default:!0},clearOnSearch:{type:Boolean,required:!1,default:!1},clearOnSelect:{type:Boolean,required:!1,default:!0},canDeselect:{type:Boolean,required:!1,default:!0},canClear:{type:Boolean,required:!1,default:!0},max:{type:Number,required:!1,default:-1},showOptions:{type:Boolean,required:!1,default:!0},required:{type:Boolean,required:!1,default:!1},openDirection:{type:String,required:!1,default:"bottom"},nativeSupport:{type:Boolean,required:!1,default:!1},classes:{type:Object,required:!1,default:()=>({})},strict:{type:Boolean,required:!1,default:!0},closeOnSelect:{type:Boolean,required:!1,default:!0},autocomplete:{type:String,required:!1},groups:{type:Boolean,required:!1,default:!1},groupLabel:{type:String,required:!1,default:"label"},groupOptions:{type:String,required:!1,default:"options"},groupHideEmpty:{type:Boolean,required:!1,default:!1},groupSelect:{type:Boolean,required:!1,default:!0},inputType:{type:String,required:!1,default:"text"},attrs:{required:!1,type:Object,default:()=>({})},onCreate:{required:!1,type:Function},disabledProp:{type:String,required:!1,default:"disabled"},searchStart:{type:Boolean,required:!1,default:!1},reverse:{type:Boolean,required:!1,default:!1},regex:{type:[Object,String,RegExp],required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},infinite:{type:Boolean,required:!1,default:!1},aria:{required:!1,type:Object,default:()=>({})}},setup(r,n){return Vk(r,n,[Lk,Ok,Qk,zk,wk,Uk,Ek,Pk,_k,Yk,Bk,Rk])}};const Zk=["id","dir"],Wk=["tabindex","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable","role"],Hk=["type","modelValue","value","autocomplete","id","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],Fk=["onKeyup","aria-label"],Gk=["onClick"],$k=["type","modelValue","value","id","autocomplete","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],Jk=["innerHTML"],Xk=["id"],Kk=["id","aria-label","aria-selected"],qk=["data-pointed","onMouseenter","onClick"],eA=["innerHTML"],tA=["aria-label"],nA=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],rA=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],oA=["innerHTML"],iA=["innerHTML"],aA=["value"],sA=["name","value"],lA=["name","value"],uA=["id"];function cA(r,n,t,o,e,i){return c.openBlock(),c.createElementBlock("div",{ref:"multiselect",class:c.normalizeClass(r.classList.container),id:t.searchable?void 0:t.id,dir:t.rtl?"rtl":void 0,onFocusin:n[10]||(n[10]=(...a)=>r.handleFocusIn&&r.handleFocusIn(...a)),onFocusout:n[11]||(n[11]=(...a)=>r.handleFocusOut&&r.handleFocusOut(...a)),onKeyup:n[12]||(n[12]=(...a)=>r.handleKeyup&&r.handleKeyup(...a)),onKeydown:n[13]||(n[13]=(...a)=>r.handleKeydown&&r.handleKeydown(...a))},[c.createElementVNode("div",c.mergeProps({class:r.classList.wrapper,onMousedown:n[9]||(n[9]=(...a)=>r.handleMousedown&&r.handleMousedown(...a)),ref:"wrapper",tabindex:r.tabindex,"aria-controls":t.searchable?void 0:r.ariaControls,"aria-placeholder":t.searchable?void 0:r.ariaPlaceholder,"aria-expanded":t.searchable?void 0:r.isOpen,"aria-activedescendant":t.searchable?void 0:r.ariaActiveDescendant,"aria-multiselectable":t.searchable?void 0:r.ariaMultiselectable,role:t.searchable?void 0:"combobox"},t.searchable?{}:r.arias),[c.createCommentVNode(" Search "),t.mode!=="tags"&&t.searchable&&!t.disabled?(c.openBlock(),c.createElementBlock("input",c.mergeProps({key:0,type:t.inputType,modelValue:r.search,value:r.search,class:r.classList.search,autocomplete:t.autocomplete,id:t.searchable?t.id:void 0,onInput:n[0]||(n[0]=(...a)=>r.handleSearchInput&&r.handleSearchInput(...a)),onKeypress:n[1]||(n[1]=(...a)=>r.handleKeypress&&r.handleKeypress(...a)),onPaste:n[2]||(n[2]=c.withModifiers((...a)=>r.handlePaste&&r.handlePaste(...a),["stop"])),ref:"input","aria-controls":r.ariaControls,"aria-placeholder":r.ariaPlaceholder,"aria-expanded":r.isOpen,"aria-activedescendant":r.ariaActiveDescendant,"aria-multiselectable":r.ariaMultiselectable,role:"combobox"},{...t.attrs,...r.arias}),null,16,Hk)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Tags (with search) "),t.mode=="tags"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(r.classList.tags),"data-tags":""},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.iv,(a,s,l)=>c.renderSlot(r.$slots,"tag",{option:a,handleTagRemove:r.handleTagRemove,disabled:t.disabled},()=>[(c.openBlock(),c.createElementBlock("span",{class:c.normalizeClass(r.classList.tag),tabindex:"-1",onKeyup:c.withKeys(u=>r.handleTagRemove(a,u),["enter"]),key:l,"aria-label":r.ariaTagLabel(a[t.label])},[c.createTextVNode(c.toDisplayString(a[t.label])+" ",1),t.disabled?c.createCommentVNode("v-if",!0):(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(r.classList.tagRemove),onClick:u=>r.handleTagRemove(a,u)},[c.createElementVNode("span",{class:c.normalizeClass(r.classList.tagRemoveIcon)},null,2)],10,Gk))],42,Fk))])),256)),c.createElementVNode("div",{class:c.normalizeClass(r.classList.tagsSearchWrapper),ref:"tags"},[c.createCommentVNode(" Used for measuring search width "),c.createElementVNode("span",{class:c.normalizeClass(r.classList.tagsSearchCopy)},c.toDisplayString(r.search),3),c.createCommentVNode(" Actual search input "),t.searchable&&!t.disabled?(c.openBlock(),c.createElementBlock("input",c.mergeProps({key:0,type:t.inputType,modelValue:r.search,value:r.search,class:r.classList.tagsSearch,id:t.searchable?t.id:void 0,autocomplete:t.autocomplete,onInput:n[3]||(n[3]=(...a)=>r.handleSearchInput&&r.handleSearchInput(...a)),onKeypress:n[4]||(n[4]=(...a)=>r.handleKeypress&&r.handleKeypress(...a)),onPaste:n[5]||(n[5]=c.withModifiers((...a)=>r.handlePaste&&r.handlePaste(...a),["stop"])),ref:"input","aria-controls":r.ariaControls,"aria-placeholder":r.ariaPlaceholder,"aria-expanded":r.isOpen,"aria-activedescendant":r.ariaActiveDescendant,"aria-multiselectable":r.ariaMultiselectable,role:"combobox"},{...t.attrs,...r.arias}),null,16,$k)):c.createCommentVNode("v-if",!0)],2)],2)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Single label "),t.mode=="single"&&r.hasSelected&&!r.search&&r.iv?c.renderSlot(r.$slots,"singlelabel",{key:2,value:r.iv},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.singleLabel)},[c.createElementVNode("span",{class:c.normalizeClass(r.classList.singleLabelText)},c.toDisplayString(r.iv[t.label]),3)],2)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Multiple label "),t.mode=="multiple"&&r.hasSelected&&!r.search?c.renderSlot(r.$slots,"multiplelabel",{key:3,values:r.iv},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.multipleLabel),innerHTML:r.multipleLabelText},null,10,Jk)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Placeholder "),t.placeholder&&!r.hasSelected&&!r.search?c.renderSlot(r.$slots,"placeholder",{key:4},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.placeholder),"aria-hidden":"true"},c.toDisplayString(t.placeholder),3)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Spinner "),t.loading||r.resolving?c.renderSlot(r.$slots,"spinner",{key:5},()=>[c.createElementVNode("span",{class:c.normalizeClass(r.classList.spinner),"aria-hidden":"true"},null,2)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Clear "),r.hasSelected&&!t.disabled&&t.canClear&&!r.busy?c.renderSlot(r.$slots,"clear",{key:6,clear:r.clear},()=>[c.createElementVNode("span",{"aria-hidden":"true",tabindex:"0",role:"button","data-clear":"","aria-roledescription":"\u274E",class:c.normalizeClass(r.classList.clear),onClick:n[6]||(n[6]=(...a)=>r.clear&&r.clear(...a)),onKeyup:n[7]||(n[7]=c.withKeys((...a)=>r.clear&&r.clear(...a),["enter"]))},[c.createElementVNode("span",{class:c.normalizeClass(r.classList.clearIcon)},null,2)],34)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Caret "),t.caret&&t.showOptions?c.renderSlot(r.$slots,"caret",{key:7},()=>[c.createElementVNode("span",{class:c.normalizeClass(r.classList.caret),onClick:n[8]||(n[8]=(...a)=>r.handleCaretClick&&r.handleCaretClick(...a)),"aria-hidden":"true"},null,2)]):c.createCommentVNode("v-if",!0)],16,Wk),c.createCommentVNode(" Options "),c.createElementVNode("div",{class:c.normalizeClass(r.classList.dropdown),tabindex:"-1"},[c.renderSlot(r.$slots,"beforelist",{options:r.fo}),c.createElementVNode("ul",{class:c.normalizeClass(r.classList.options),id:r.ariaControls,role:"listbox"},[t.groups?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(r.fg,(a,s,l)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(r.classList.group),key:l,id:r.ariaGroupId(a),"aria-label":r.ariaGroupLabel(a),"aria-selected":r.isSelected(a),role:"option"},[c.createElementVNode("div",{class:c.normalizeClass(r.classList.groupLabel(a)),"data-pointed":r.isPointed(a),onMouseenter:u=>r.setPointer(a,s),onClick:u=>r.handleGroupClick(a)},[c.renderSlot(r.$slots,"grouplabel",{group:a,isSelected:r.isSelected,isPointed:r.isPointed},()=>[c.createElementVNode("span",{innerHTML:a[t.groupLabel]},null,8,eA)])],42,qk),c.createElementVNode("ul",{class:c.normalizeClass(r.classList.groupOptions),"aria-label":r.ariaGroupLabel(a),role:"group"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.__VISIBLE__,(u,d,f)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(r.classList.option(u,a)),"data-pointed":r.isPointed(u),"data-selected":r.isSelected(u)||void 0,key:f,onMouseenter:M=>r.setPointer(u),onClick:M=>r.handleOptionClick(u),id:r.ariaOptionId(u),"aria-selected":r.isSelected(u),"aria-label":r.ariaOptionLabel(u),role:"option"},[c.renderSlot(r.$slots,"option",{option:u,isSelected:r.isSelected,isPointed:r.isPointed,search:r.search},()=>[c.createElementVNode("span",null,c.toDisplayString(u[t.label]),1)])],42,nA))),128))],10,tA)],10,Kk))),128)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(r.fo,(a,s,l)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(r.classList.option(a)),"data-pointed":r.isPointed(a),"data-selected":r.isSelected(a)||void 0,key:l,onMouseenter:u=>r.setPointer(a),onClick:u=>r.handleOptionClick(a),id:r.ariaOptionId(a),"aria-selected":r.isSelected(a),"aria-label":r.ariaOptionLabel(a),role:"option"},[c.renderSlot(r.$slots,"option",{option:a,isSelected:r.isSelected,isPointed:r.isPointed,search:r.search},()=>[c.createElementVNode("span",null,c.toDisplayString(a[t.label]),1)])],42,rA))),128))],10,Xk),r.noOptions?c.renderSlot(r.$slots,"nooptions",{key:0},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.noOptions),innerHTML:t.noOptionsText},null,10,oA)]):c.createCommentVNode("v-if",!0),r.noResults?c.renderSlot(r.$slots,"noresults",{key:1},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.noResults),innerHTML:t.noResultsText},null,10,iA)]):c.createCommentVNode("v-if",!0),t.infinite&&r.hasMore?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(r.classList.inifinite),ref:"infiniteLoader"},[c.renderSlot(r.$slots,"infinite",{},()=>[c.createElementVNode("span",{class:c.normalizeClass(r.classList.inifiniteSpinner)},null,2)])],2)):c.createCommentVNode("v-if",!0),c.renderSlot(r.$slots,"afterlist",{options:r.fo})],2),c.createCommentVNode(" Hacky input element to show HTML5 required warning "),t.required?(c.openBlock(),c.createElementBlock("input",{key:0,class:c.normalizeClass(r.classList.fakeInput),tabindex:"-1",value:r.textValue,required:""},null,10,aA)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Native input support "),t.nativeSupport?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[t.mode=="single"?(c.openBlock(),c.createElementBlock("input",{key:0,type:"hidden",name:t.name,value:r.plainValue!==void 0?r.plainValue:""},null,8,sA)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(r.plainValue,(a,s)=>(c.openBlock(),c.createElementBlock("input",{type:"hidden",name:`${t.name}[]`,value:a,key:s},null,8,lA))),128))],64)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Screen reader assistive text "),t.searchable&&r.hasSelected?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(r.classList.assist),id:r.ariaAssist,"aria-hidden":"true"},c.toDisplayString(r.ariaLabel),11,uA)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Create height for empty input "),c.createElementVNode("div",{class:c.normalizeClass(r.classList.spacer)},null,2)],42,Zk)}Vl.render=cA,Vl.__file="src/Multiselect.vue";var Uw="",Yw="";const dA=c.createElementVNode("img",{alt:"",class:"list__item_thumb",src:Ak},null,-1),fA={class:"list__item_text"},MA=c.createElementVNode("div",{id:"list"},null,-1),gA={__name:"InputList",props:{list:{type:Array,required:!0},maxHeight:{type:String,default:"200px"},labelProp:{type:String,default:"label"},idProp:{type:String,default:"value"}},emits:["update"],setup(r,{emit:n}){c.useCssVars(e=>({"341349d2":r.maxHeight}));const t=c.ref(null);function o(){n("update",t.value)}return(e,i)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(c.unref(Vl),{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=a=>t.value=a),label:r.labelProp,mode:"tags",native:!1,object:!0,options:r.list,placeholder:"Start typing a name",searchable:!0,"value-prop":r.idProp,onSelect:o},{tag:c.withCtx(({option:a,handleTagRemove:s,disabled:l})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#list"},[c.createElementVNode("div",{class:c.normalizeClass(["list__item",{"is-disabled":l}])},[dA,c.createElementVNode("p",fA,c.toDisplayString(a[r.labelProp]),1),c.createVNode(Te,{class:"list__item_icon","icon-name":"delete",size:24,onClick:u=>s(a,u)},null,8,["onClick"]),c.renderSlot(e.$slots,"default")],2)]))]),_:3},8,["modelValue","label","options","value-prop"]),MA],64))}},hA=c.defineComponent({components:{DhIcon:Te},props:{hasCloseButton:{type:Boolean,default:!0},hasSideBar:{type:Boolean,default:!0},hasSideBarButtonBottom:{type:Boolean,default:!0},hasHeader:{type:Boolean,default:!0},hasFooter:{type:Boolean,default:!0},hasFooterButtonRight:{type:Boolean,default:!0},hasBodyScrolling:{type:Boolean,default:!0},sideBarPosition:{type:String,default:"left"},hasCloseConfirmation:{type:Boolean,default:!1},bodyClass:{type:String,default:""}},emits:["close"],mounted(){document.body.classList.add("modal-open")},unmounted(){document.body.classList.remove("modal-open")},methods:{closed(){this.$emit("close",this.hasCloseConfirmation),document.body.classList.remove("modal-open")}}}),pA={class:"modal-content"},yA={key:0,id:"modal-sidebar",class:"modal-sidebar"},NA={key:0,id:"modalTitle",class:"modal-header"},mA={class:"modal-footer"};function jA(r,n,t,o,e,i){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createBlock(c.Transition,{name:"modal-fade"},{default:c.withCtx(()=>[c.createElementVNode("div",{class:"modal-backdrop",onClick:n[2]||(n[2]=(...s)=>r.closed&&r.closed(...s))},[c.createElementVNode("div",{"aria-describedby":"modalDescription","aria-labelledby":"modalTitle",class:c.normalizeClass(`modal ${r.hasSideBar?r.sideBarPosition:""} ${r.hasBodyScrolling?"":"modal-auto-height"}`),role:"dialog",onClick:n[1]||(n[1]=c.withModifiers(()=>{},["stop"]))},[r.hasCloseButton?(c.openBlock(),c.createElementBlock("button",{key:0,"aria-label":"Close modal",class:"btn-close",type:"button",onClick:n[0]||(n[0]=(...s)=>r.closed&&r.closed(...s))},[c.createVNode(a,{class:"icon","icon-name":"close",size:24})])):c.createCommentVNode("",!0),c.createElementVNode("div",pA,[r.hasSideBar?(c.openBlock(),c.createElementBlock("aside",yA,[c.renderSlot(r.$slots,"sidebar"),r.hasSideBarButtonBottom?c.renderSlot(r.$slots,"sidebar-button-bottom",{key:0}):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0),c.createElementVNode("section",{class:c.normalizeClass(`right-section ${r.hasSideBar?"":"full"}`)},[r.hasHeader?(c.openBlock(),c.createElementBlock("header",NA,[c.renderSlot(r.$slots,"header")])):c.createCommentVNode("",!0),c.createElementVNode("section",{id:"modalDescription",class:c.normalizeClass(["modal-body",[r.bodyClass,r.hasBodyScrolling?"":"modal-body-no-scroll"]])},[c.renderSlot(r.$slots,"body")],2),c.createElementVNode("footer",mA,[r.hasFooter?c.renderSlot(r.$slots,"footer",{key:0}):c.createCommentVNode("",!0),r.hasFooterButtonRight?c.renderSlot(r.$slots,"footer-button-right",{key:1}):c.createCommentVNode("",!0)])],2)])],2)])]),_:3})}var IA=st(hA,[["render",jA]]);const DA=c.defineComponent({components:{DhIcon:Te},props:{notificationType:{type:String,required:!0,default:"toast",validator:r=>["toast","bottom-message","actionable","modal"].includes(r)},icon:{type:String,required:!0,default:"info"},title:{type:String,required:!1,default:""},message:{type:String,required:!1,default:""},dismissible:{type:Boolean,required:!1,default:!0},notificationButton:{type:String,default:"Action"},buttonDismiss:{type:String,default:"Dismiss"},zIndex:{type:Number,default:2},show:{type:Boolean,default:!1}},mounted(){this.dismissible&&["toast","bottom-message"].includes(this.notificationType)&&setTimeout(()=>{this.close()},3e3)},emits:["action"],methods:{close(r=!1){this.$emit("action",r)},limitTitle(r,n){return["toast","actionable"].includes(n)&&r.length>=60?`${r.substring(0,60)}..`:["bottom-message"].includes(n)&&r.length>=40?`${r.substring(0,40)}..`:["modal"].includes(n)&&r.length>=80?`${r.substring(0,80)}..`:r}}}),xA=[c.createElementVNode("img",{alt:"icon",class:"close-icon",src:hd},null,-1)],vA={class:"additional-text"},bA={key:0,class:"descriptions"};function TA(r,n,t,o,e,i){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(`dh-notification-container ${r.notificationType}`),style:c.normalizeStyle({"z-index":r.zIndex})},[r.show?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["bottom-message"].includes(r.notificationType)?`notification-up status status-${r.notificationType}`:`notification-enter status status-${r.notificationType}`)},[["modal","bottom-message"].includes(r.notificationType)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",{key:0,class:"close-notification",onClick:n[0]||(n[0]=s=>r.close(!1))},xA)),c.createElementVNode("div",{class:c.normalizeClass(`content content- ${r.notificationType}`)},[c.createElementVNode("div",{class:c.normalizeClass(`ellipse ellipse-${r.notificationType} ellipse-${r.icon}`)},[c.createVNode(a,{class:c.normalizeClass(`icon-${r.icon}`),"icon-name":r.icon,size:33},null,8,["class","icon-name"])],2),c.createElementVNode("div",vA,[c.createElementVNode("div",{class:c.normalizeClass(`body-section-title title-${r.notificationType}`)},c.toDisplayString(r.limitTitle(r.title,r.notificationType)),3),["bottom-message"].includes(r.notificationType)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",bA,c.toDisplayString(r.message.length>=280?`${r.message.substring(0,280)}..`:r.message),1))]),["toast","bottom-message"].includes(r.notificationType)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(`buttons ${r.notificationType}`)},[c.createElementVNode("button",{class:c.normalizeClass(["btn btn-normal",r.icon=="delete"?"btn-danger":"btn-primary"]),onClick:n[1]||(n[1]=s=>r.close(!0))},c.toDisplayString(r.notificationButton),3),c.createElementVNode("button",{class:"btn btn-normal btn-secondary dismiss",onClick:n[2]||(n[2]=s=>r.close())},c.toDisplayString(r.buttonDismiss),1)],2))],2)],2)):c.createCommentVNode("",!0)],6)}var kA=st(DA,[["render",TA]]),Pw="";const AA={class:"password__panel"},wA=["placeholder","type"],LA={class:"icon is-right"},zA={key:0,class:"password__tooltip"};var OA=st(c.defineComponent({__name:"PasswordField",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},tipChars:{type:String,default:"12 Characters"},tipNumbers:{type:String,default:"Numbers"},tipSymbols:{type:String,default:"Symbols"},passwordTooltipDisabled:{type:Boolean,default:!1}},emits:["submit","update:modelValue"],setup(r,{emit:n}){const t=r,o=c.ref(""),e=c.ref(!1),i=c.ref(!1),a=c.ref(!1),s=c.ref(!1),l=c.ref(!1),u=c.ref(!1);function d(){n("submit",o.value),n("update:modelValue",o.value)}function f(){e.value=!0,u.value=!0}function M(){e.value=!1,u.value=!1}function p(){l.value=!l.value}return c.onMounted(()=>()=>o.value=t.modelValue||""),c.watch(t,()=>(o.value=t.modelValue||"",i.value=o.value.length>11,a.value=/\d/.test(o.value),s.value=/[!@#$%^&*)(+=._-]/.test(o.value))),(y,j)=>(c.openBlock(),c.createElementBlock("div",AA,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":j[0]||(j[0]=v=>o.value=v),class:"form__input password__panel_input","data-e2e":"password-input",placeholder:t.placeholder,type:l.value?"text":"password",onChange:d,onFocus:f,onFocusout:M},null,40,wA),[[c.vModelDynamic,o.value]]),c.createElementVNode("button",{class:"password__panel_button",type:"button",onClick:p},[c.createElementVNode("span",LA,[c.createVNode(Te,{active:u.value,"icon-name":l.value?"invisible":"visible",size:20},null,8,["active","icon-name"])])]),e.value&&!t.passwordTooltipDisabled?(c.openBlock(),c.createElementBlock("div",zA,[c.createElementVNode("p",{class:c.normalizeClass(["password__tooltip_text",i.value?"password__tooltip_text--valid":""])},[c.createVNode(Te,{class:c.normalizeClass(i.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":i.value?"accept":"close",size:16},null,8,["class","icon-name"]),c.createElementVNode("span",null,c.toDisplayString(t.tipChars),1)],2),c.createElementVNode("p",{class:c.normalizeClass(["password__tooltip_text",a.value?"password__tooltip_text--valid":""])},[c.createVNode(Te,{class:c.normalizeClass(a.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":a.value?"accept":"close",size:16},null,8,["class","icon-name"]),c.createElementVNode("span",null,c.toDisplayString(t.tipNumbers),1)],2),c.createElementVNode("p",{class:c.normalizeClass(["password__tooltip_text",s.value?"password__tooltip_text--valid":""])},[c.createVNode(Te,{class:c.normalizeClass(s.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":s.value?"accept":"close",size:16},null,8,["class","icon-name"]),c.createElementVNode("span",null,c.toDisplayString(t.tipSymbols),1)],2)])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5ec7ff50"]]),Vw="";const SA={class:"radio"},CA=["for"],EA=["id","type","value"],_A={class:"radio__label_txt"};var bM=st({__name:"RadioBox",props:{type:{type:String,default:"radio"},value:{type:String,required:!0},label:{type:String,required:!0}},emits:["clickBox"],setup(r,{emit:n}){return(t,o)=>(c.openBlock(),c.createElementBlock("div",SA,[c.createElementVNode("label",{class:"radio__label",for:r.value},[c.createElementVNode("input",{id:r.value,class:"radio__input",name:"radiobox",type:r.type,value:r.value,onClick:o[0]||(o[0]=e=>n("clickBox"))},null,8,EA),c.createElementVNode("span",_A,c.toDisplayString(r.label),1)],8,CA)]))}},[["__scopeId","data-v-29696bd5"]]),Ww="";const QA={__name:"RadioBoxGroup",props:{orientation:{type:String,default:"horizontal"},type:{type:String,default:"radio"},list:{type:Array,required:!0}},setup(r){const n=c.ref(null);function t(){const o=document.querySelectorAll("input");for(let e=0;e<o.length;e++)o[e].checked?o[e].parentNode.parentNode.classList.add("radio--checked"):o[e].parentNode.parentNode.classList.remove("radio--checked")}return(o,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["radio__grp",r.orientation==="vertical"?"radio__vertical":"radio__horizontal"])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.list,i=>(c.openBlock(),c.createBlock(bM,{key:i.key,ref_for:!0,ref_key:"boxes",ref:n,label:i.label,type:r.type,value:i.value,onClickBox:t},null,8,["label","type","value"]))),128))],2))}};var Hw="";const UA={class:"search-panel"},YA=["placeholder"];var BA=st(c.defineComponent({__name:"SearchInput",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""}},emits:["submit","clean","update:modelValue"],setup(r,{emit:n}){const t=r,o=c.ref("");function e(){n("submit",o.value),n("update:modelValue",o.value)}function i(){o.value="",n("clean"),n("update:modelValue",o.value)}return c.onMounted(()=>()=>o.value=t.modelValue||""),c.watch(t,()=>o.value=t.modelValue||""),(a,s)=>(c.openBlock(),c.createElementBlock("div",UA,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>o.value=l),class:"form-input search-panel-input","data-e2e":"search-input",placeholder:t.placeholder,onKeyup:e},null,40,YA),[[c.vModelText,o.value]]),o.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",{key:0,class:"search-panel-button","data-e2e":"search-submit",onClick:e},[c.createVNode(Te,{active:!0,"icon-name":"search",size:24})])),o.value?(c.openBlock(),c.createElementBlock("button",{key:1,class:"search-panel-button close","data-e2e":"search-close",onClick:i},[c.createVNode(Te,{class:"icon","icon-name":"close",size:24})])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-562faa14"]]),Gw="";const PA=r=>(c.pushScopeId("data-v-0213b522"),r=r(),c.popScopeId(),r),RA={class:"stepper"},VA=PA(()=>c.createElementVNode("hr",{class:"solid"},null,-1));var ZA=st(c.defineComponent({__name:"Stepper",props:{maxSteps:{type:Number,default:0},currentStep:{type:Number,default:0}},setup(r){const n=r;function t(){return Array.from(Array(n.maxSteps||0).keys())}return(o,e)=>(c.openBlock(),c.createElementBlock("div",RA,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t(),(i,a)=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"step"},[c.createElementVNode("span",{class:c.normalizeClass(["step-number",{active:i===r.currentStep}])},c.toDisplayString(i+1),3),VA]))),128))]))}}),[["__scopeId","data-v-0213b522"]]);function Qt(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var TM={exports:{}};/*! For license information please see editor.js.LICENSE.txt */(function(r,n){(function(t,o){r.exports=o()})(window,function(){return function(t){var o={};function e(i){if(o[i])return o[i].exports;var a=o[i]={i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,e),a.l=!0,a.exports}return e.m=t,e.c=o,e.d=function(i,a,s){e.o(i,a)||Object.defineProperty(i,a,{enumerable:!0,get:s})},e.r=function(i){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},e.t=function(i,a){if(1&a&&(i=e(i)),8&a||4&a&&typeof i=="object"&&i&&i.__esModule)return i;var s=Object.create(null);if(e.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:i}),2&a&&typeof i!="string")for(var l in i)e.d(s,l,function(u){return i[u]}.bind(null,l));return s},e.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return e.d(a,"a",a),a},e.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},e.p="",e(e.s=187)}([function(t,o,e){var i=e(10),a=e(16),s=e(27),l=e(23),u=e(31),d=function(f,M,p){var y,j,v,h,N=f&d.F,D=f&d.G,I=f&d.S,m=f&d.P,T=f&d.B,L=D?i:I?i[M]||(i[M]={}):(i[M]||{}).prototype,A=D?a:a[M]||(a[M]={}),z=A.prototype||(A.prototype={});for(y in D&&(p=M),p)v=((j=!N&&L&&L[y]!==void 0)?L:p)[y],h=T&&j?u(v,i):m&&typeof v=="function"?u(Function.call,v):v,L&&l(L,y,v,f&d.U),A[y]!=v&&s(A,y,h),m&&z[y]!=v&&(z[y]=v)};i.core=a,d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,t.exports=d},function(t,o){t.exports=function(e){return e&&e.__esModule?e:{default:e}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,o){t.exports=function(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,o){function e(i,a){for(var s=0;s<a.length;s++){var l=a[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(i,l.key,l)}}t.exports=function(i,a,s){return a&&e(i.prototype,a),s&&e(i,s),Object.defineProperty(i,"prototype",{writable:!1}),i},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,o){function e(i){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},t.exports.__esModule=!0,t.exports.default=t.exports,e(i)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,o,e){var i=e(111);t.exports=function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&i(a,s)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,o,e){var i=e(7).default,a=e(152);t.exports=function(s,l){if(l&&(i(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a(s)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,o){function e(i){return t.exports=e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,e(i)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,o,e){var i,a,s;a=[o,e(20),e(372),e(21),e(403),e(19)],(s=typeof(i=function(l,u,d,f,M,p){var y,j=e(1);function v(b,g){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"log",k=arguments.length>3?arguments[3]:void 0,w=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"color: inherit";if("console"in window&&window.console[x]){var C=["info","log","warn","error"].includes(x),E=[];switch(v.logLevel){case y.ERROR:if(x!=="error")return;break;case y.WARN:if(!["error","warn"].includes(x))return;break;case y.INFO:if(!C||b)return}k&&E.push(k);var O="Editor.js ".concat("2.26.5"),_=`line-height: 1em;
19
+ `):r}function eb(r,n){const{element:t,datasetIndex:o,index:e}=n,i=r.getDatasetMeta(o).controller,{label:a,value:s}=i.getLabelAndValue(e);return{chart:r,label:a,parsed:i.getParsed(e),raw:r.data.datasets[o].data[e],formattedValue:s,dataset:i.getDataset(),dataIndex:e,datasetIndex:o,element:t}}function oM(r,n){const t=r.chart.ctx,{body:o,footer:e,title:i}=r,{boxWidth:a,boxHeight:s}=n,l=yt(n.bodyFont),u=yt(n.titleFont),d=yt(n.footerFont),f=i.length,M=e.length,p=o.length,y=bt(n.padding);let j=y.height,v=0,h=o.reduce((I,m)=>I+m.before.length+m.lines.length+m.after.length,0);if(h+=r.beforeBody.length+r.afterBody.length,f&&(j+=f*u.lineHeight+(f-1)*n.titleSpacing+n.titleMarginBottom),h){const I=n.displayColors?Math.max(s,l.lineHeight):l.lineHeight;j+=p*I+(h-p)*l.lineHeight+(h-1)*n.bodySpacing}M&&(j+=n.footerMarginTop+M*d.lineHeight+(M-1)*n.footerSpacing);let N=0;const D=function(I){v=Math.max(v,t.measureText(I).width+N)};return t.save(),t.font=u.string,_e(r.title,D),t.font=l.string,_e(r.beforeBody.concat(r.afterBody),D),N=n.displayColors?a+2+n.boxPadding:0,_e(o,I=>{_e(I.before,D),_e(I.lines,D),_e(I.after,D)}),N=0,t.font=d.string,_e(r.footer,D),t.restore(),v+=y.width,{width:v,height:j}}function tb(r,n){const{y:t,height:o}=n;return t<o/2?"top":t>r.height-o/2?"bottom":"center"}function nb(r,n,t,o){const{x:e,width:i}=o,a=t.caretSize+t.caretPadding;if(r==="left"&&e+i+a>n.width||r==="right"&&e-i-a<0)return!0}function rb(r,n,t,o){const{x:e,width:i}=t,{width:a,chartArea:{left:s,right:l}}=r;let u="center";return o==="center"?u=e<=(s+l)/2?"left":"right":e<=i/2?u="left":e>=a-i/2&&(u="right"),nb(u,r,n,t)&&(u="center"),u}function iM(r,n,t){const o=t.yAlign||n.yAlign||tb(r,t);return{xAlign:t.xAlign||n.xAlign||rb(r,n,t,o),yAlign:o}}function ob(r,n){let{x:t,width:o}=r;return n==="right"?t-=o:n==="center"&&(t-=o/2),t}function ib(r,n,t){let{y:o,height:e}=r;return n==="top"?o+=t:n==="bottom"?o-=e+t:o-=e/2,o}function aM(r,n,t,o){const{caretSize:e,caretPadding:i,cornerRadius:a}=r,{xAlign:s,yAlign:l}=t,u=e+i,{topLeft:d,topRight:f,bottomLeft:M,bottomRight:p}=qn(a);let y=ob(n,s);const j=ib(n,l,u);return l==="center"?s==="left"?y+=u:s==="right"&&(y-=u):s==="left"?y-=Math.max(d,M)+e:s==="right"&&(y+=Math.max(f,p)+e),{x:lt(y,0,o.width-n.width),y:lt(j,0,o.height-n.height)}}function Hi(r,n,t){const o=bt(t.padding);return n==="center"?r.x+r.width/2:n==="right"?r.x+r.width-o.right:r.x+o.left}function sM(r){return Gt([],sn(r))}function ab(r,n,t){return Dn(r,{tooltip:n,tooltipItems:t,type:"tooltip"})}function lM(r,n){const t=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return t?r.override(t):r}class Bl extends an{constructor(n){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=n.chart||n._chart,this._chart=this.chart,this.options=n.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(n){this.options=n,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const n=this._cachedAnimations;if(n)return n;const t=this.chart,o=this.options.setContext(this.getContext()),e=o.enabled&&t.options.animation&&o.animations,i=new gf(this.chart,e);return e._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=ab(this.chart.getContext(),this,this._tooltipItems))}getTitle(n,t){const{callbacks:o}=t,e=o.beforeTitle.apply(this,[n]),i=o.title.apply(this,[n]),a=o.afterTitle.apply(this,[n]);let s=[];return s=Gt(s,sn(e)),s=Gt(s,sn(i)),s=Gt(s,sn(a)),s}getBeforeBody(n,t){return sM(t.callbacks.beforeBody.apply(this,[n]))}getBody(n,t){const{callbacks:o}=t,e=[];return _e(n,i=>{const a={before:[],lines:[],after:[]},s=lM(o,i);Gt(a.before,sn(s.beforeLabel.call(this,i))),Gt(a.lines,s.label.call(this,i)),Gt(a.after,sn(s.afterLabel.call(this,i))),e.push(a)}),e}getAfterBody(n,t){return sM(t.callbacks.afterBody.apply(this,[n]))}getFooter(n,t){const{callbacks:o}=t,e=o.beforeFooter.apply(this,[n]),i=o.footer.apply(this,[n]),a=o.afterFooter.apply(this,[n]);let s=[];return s=Gt(s,sn(e)),s=Gt(s,sn(i)),s=Gt(s,sn(a)),s}_createItems(n){const t=this._active,o=this.chart.data,e=[],i=[],a=[];let s=[],l,u;for(l=0,u=t.length;l<u;++l)s.push(eb(this.chart,t[l]));return n.filter&&(s=s.filter((d,f,M)=>n.filter(d,f,M,o))),n.itemSort&&(s=s.sort((d,f)=>n.itemSort(d,f,o))),_e(s,d=>{const f=lM(n.callbacks,d);e.push(f.labelColor.call(this,d)),i.push(f.labelPointStyle.call(this,d)),a.push(f.labelTextColor.call(this,d))}),this.labelColors=e,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=s,s}update(n,t){const o=this.options.setContext(this.getContext()),e=this._active;let i,a=[];if(!e.length)this.opacity!==0&&(i={opacity:0});else{const s=Sr[o.position].call(this,e,this._eventPosition);a=this._createItems(o),this.title=this.getTitle(a,o),this.beforeBody=this.getBeforeBody(a,o),this.body=this.getBody(a,o),this.afterBody=this.getAfterBody(a,o),this.footer=this.getFooter(a,o);const l=this._size=oM(this,o),u=Object.assign({},s,l),d=iM(this.chart,o,u),f=aM(o,u,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,i={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),n&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(n,t,o,e){const i=this.getCaretPosition(n,o,e);t.lineTo(i.x1,i.y1),t.lineTo(i.x2,i.y2),t.lineTo(i.x3,i.y3)}getCaretPosition(n,t,o){const{xAlign:e,yAlign:i}=this,{caretSize:a,cornerRadius:s}=o,{topLeft:l,topRight:u,bottomLeft:d,bottomRight:f}=qn(s),{x:M,y:p}=n,{width:y,height:j}=t;let v,h,N,D,I,m;return i==="center"?(I=p+j/2,e==="left"?(v=M,h=v-a,D=I+a,m=I-a):(v=M+y,h=v+a,D=I-a,m=I+a),N=v):(e==="left"?h=M+Math.max(l,d)+a:e==="right"?h=M+y-Math.max(u,f)-a:h=this.caretX,i==="top"?(D=p,I=D-a,v=h-a,N=h+a):(D=p+j,I=D+a,v=h+a,N=h-a),m=D),{x1:v,x2:h,x3:N,y1:D,y2:I,y3:m}}drawTitle(n,t,o){const e=this.title,i=e.length;let a,s,l;if(i){const u=ml(o.rtl,this.x,this.width);for(n.x=Hi(this,o.titleAlign,o),t.textAlign=u.textAlign(o.titleAlign),t.textBaseline="middle",a=yt(o.titleFont),s=o.titleSpacing,t.fillStyle=o.titleColor,t.font=a.string,l=0;l<i;++l)t.fillText(e[l],u.x(n.x),n.y+a.lineHeight/2),n.y+=a.lineHeight+s,l+1===i&&(n.y+=o.titleMarginBottom-s)}}_drawColorBox(n,t,o,e,i){const a=this.labelColors[o],s=this.labelPointStyles[o],{boxHeight:l,boxWidth:u,boxPadding:d}=i,f=yt(i.bodyFont),M=Hi(this,"left",i),p=e.x(M),y=l<f.lineHeight?(f.lineHeight-l)/2:0,j=t.y+y;if(i.usePointStyle){const v={radius:Math.min(u,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},h=e.leftForLtr(p,u)+u/2,N=j+l/2;n.strokeStyle=i.multiKeyBackground,n.fillStyle=i.multiKeyBackground,fl(n,v,h,N),n.strokeStyle=a.borderColor,n.fillStyle=a.backgroundColor,fl(n,v,h,N)}else{n.lineWidth=Ae(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,n.strokeStyle=a.borderColor,n.setLineDash(a.borderDash||[]),n.lineDashOffset=a.borderDashOffset||0;const v=e.leftForLtr(p,u-d),h=e.leftForLtr(e.xPlus(p,1),u-d-2),N=qn(a.borderRadius);Object.values(N).some(D=>D!==0)?(n.beginPath(),n.fillStyle=i.multiKeyBackground,wi(n,{x:v,y:j,w:u,h:l,radius:N}),n.fill(),n.stroke(),n.fillStyle=a.backgroundColor,n.beginPath(),wi(n,{x:h,y:j+1,w:u-2,h:l-2,radius:N}),n.fill()):(n.fillStyle=i.multiKeyBackground,n.fillRect(v,j,u,l),n.strokeRect(v,j,u,l),n.fillStyle=a.backgroundColor,n.fillRect(h,j+1,u-2,l-2))}n.fillStyle=this.labelTextColors[o]}drawBody(n,t,o){const{body:e}=this,{bodySpacing:i,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:u,boxPadding:d}=o,f=yt(o.bodyFont);let M=f.lineHeight,p=0;const y=ml(o.rtl,this.x,this.width),j=function(A){t.fillText(A,y.x(n.x+p),n.y+M/2),n.y+=M+i},v=y.textAlign(a);let h,N,D,I,m,T,L;for(t.textAlign=a,t.textBaseline="middle",t.font=f.string,n.x=Hi(this,v,o),t.fillStyle=o.bodyColor,_e(this.beforeBody,j),p=s&&v!=="right"?a==="center"?u/2+d:u+2+d:0,I=0,T=e.length;I<T;++I){for(h=e[I],N=this.labelTextColors[I],t.fillStyle=N,_e(h.before,j),D=h.lines,s&&D.length&&(this._drawColorBox(t,n,I,y,o),M=Math.max(f.lineHeight,l)),m=0,L=D.length;m<L;++m)j(D[m]),M=f.lineHeight;_e(h.after,j)}p=0,M=f.lineHeight,_e(this.afterBody,j),n.y-=i}drawFooter(n,t,o){const e=this.footer,i=e.length;let a,s;if(i){const l=ml(o.rtl,this.x,this.width);for(n.x=Hi(this,o.footerAlign,o),n.y+=o.footerMarginTop,t.textAlign=l.textAlign(o.footerAlign),t.textBaseline="middle",a=yt(o.footerFont),t.fillStyle=o.footerColor,t.font=a.string,s=0;s<i;++s)t.fillText(e[s],l.x(n.x),n.y+a.lineHeight/2),n.y+=a.lineHeight+o.footerSpacing}}drawBackground(n,t,o,e){const{xAlign:i,yAlign:a}=this,{x:s,y:l}=n,{width:u,height:d}=o,{topLeft:f,topRight:M,bottomLeft:p,bottomRight:y}=qn(e.cornerRadius);t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.beginPath(),t.moveTo(s+f,l),a==="top"&&this.drawCaret(n,t,o,e),t.lineTo(s+u-M,l),t.quadraticCurveTo(s+u,l,s+u,l+M),a==="center"&&i==="right"&&this.drawCaret(n,t,o,e),t.lineTo(s+u,l+d-y),t.quadraticCurveTo(s+u,l+d,s+u-y,l+d),a==="bottom"&&this.drawCaret(n,t,o,e),t.lineTo(s+p,l+d),t.quadraticCurveTo(s,l+d,s,l+d-p),a==="center"&&i==="left"&&this.drawCaret(n,t,o,e),t.lineTo(s,l+f),t.quadraticCurveTo(s,l,s+f,l),t.closePath(),t.fill(),e.borderWidth>0&&t.stroke()}_updateAnimationTarget(n){const t=this.chart,o=this.$animations,e=o&&o.x,i=o&&o.y;if(e||i){const a=Sr[n.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=oM(this,n),l=Object.assign({},a,this._size),u=iM(t,n,l),d=aM(n,l,u,t);(e._to!==d.x||i._to!==d.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(n){const t=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(t);const e={width:this.width,height:this.height},i={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const a=bt(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(n.save(),n.globalAlpha=o,this.drawBackground(i,n,e,t),R4(n,t.textDirection),i.y+=a.top,this.drawTitle(i,n,t),this.drawBody(i,n,t),this.drawFooter(i,n,t),V4(n,t.textDirection),n.restore())}getActiveElements(){return this._active||[]}setActiveElements(n,t){const o=this._active,e=n.map(({datasetIndex:s,index:l})=>{const u=this.chart.getDatasetMeta(s);if(!u)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:u.data[l],index:l}}),i=!Ni(o,e),a=this._positionChanged(e,t);(i||a)&&(this._active=e,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(n,t,o=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const e=this.options,i=this._active||[],a=this._getActiveElements(n,i,t,o),s=this._positionChanged(a,n),l=t||!Ni(a,i)||s;return l&&(this._active=a,(e.enabled||e.external)&&(this._eventPosition={x:n.x,y:n.y},this.update(!0,t))),l}_getActiveElements(n,t,o,e){const i=this.options;if(n.type==="mouseout")return[];if(!e)return t;const a=this.chart.getElementsAtEventForMode(n,i.mode,i,o);return i.reverse&&a.reverse(),a}_positionChanged(n,t){const{caretX:o,caretY:e,options:i}=this,a=Sr[i.position].call(this,n,t);return a!==!1&&(o!==a.x||e!==a.y)}}Bl.positioners=Sr;var sb={id:"tooltip",_element:Bl,positioners:Sr,afterInit(r,n,t){t&&(r.tooltip=new Bl({chart:r,options:t}))},beforeUpdate(r,n,t){r.tooltip&&r.tooltip.initialize(t)},reset(r,n,t){r.tooltip&&r.tooltip.initialize(t)},afterDraw(r){const n=r.tooltip;if(n&&n._willRender()){const t={tooltip:n};if(r.notifyPlugins("beforeTooltipDraw",t)===!1)return;n.draw(r.ctx),r.notifyPlugins("afterTooltipDraw",t)}},afterEvent(r,n){if(r.tooltip){const t=n.replay;r.tooltip.handleEvent(n.event,t,n.inChartArea)&&(n.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:(r,n)=>n.bodyFont.size,boxWidth:(r,n)=>n.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:{beforeTitle:nn,title(r){if(r.length>0){const n=r[0],t=n.chart.data.labels,o=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return n.dataset.label||"";if(n.label)return n.label;if(o>0&&n.dataIndex<o)return t[n.dataIndex]}return""},afterTitle:nn,beforeBody:nn,beforeLabel:nn,label(r){if(this&&this.options&&this.options.mode==="dataset")return r.label+": "+r.formattedValue||r.formattedValue;let n=r.dataset.label||"";n&&(n+=": ");const t=r.formattedValue;return Ce(t)||(n+=t),n},labelColor(r){const t=r.chart.getDatasetMeta(r.datasetIndex).controller.getStyle(r.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(r){const t=r.chart.getDatasetMeta(r.datasetIndex).controller.getStyle(r.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:nn,afterBody:nn,beforeFooter:nn,footer:nn,afterFooter:nn}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:r=>r!=="filter"&&r!=="itemSort"&&r!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const lb=(r,n,t,o)=>(typeof n=="string"?(t=r.push(n)-1,o.unshift({index:t,label:n})):isNaN(n)&&(t=null),t);function ub(r,n,t,o){const e=r.indexOf(n);if(e===-1)return lb(r,n,t,o);const i=r.lastIndexOf(n);return e!==i?t:e}const cb=(r,n)=>r===null?null:lt(Math.round(r),0,n);class Fi extends Pn{constructor(n){super(n),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(n){const t=this._addedLabels;if(t.length){const o=this.getLabels();for(const{index:e,label:i}of t)o[e]===i&&o.splice(e,1);this._addedLabels=[]}super.init(n)}parse(n,t){if(Ce(n))return null;const o=this.getLabels();return t=isFinite(t)&&o[t]===n?t:ub(o,n,we(t,n),this._addedLabels),cb(t,o.length-1)}determineDataLimits(){const{minDefined:n,maxDefined:t}=this.getUserBounds();let{min:o,max:e}=this.getMinMax(!0);this.options.bounds==="ticks"&&(n||(o=0),t||(e=this.getLabels().length-1)),this.min=o,this.max=e}buildTicks(){const n=this.min,t=this.max,o=this.options.offset,e=[];let i=this.getLabels();i=n===0&&t===i.length-1?i:i.slice(n,t+1),this._valueRange=Math.max(i.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let a=n;a<=t;a++)e.push({value:a});return e}getLabelForValue(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(n){return typeof n!="number"&&(n=this.parse(n)),n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getPixelForTick(n){const t=this.ticks;return n<0||n>t.length-1?null:this.getPixelForValue(t[n].value)}getValueForPixel(n){return Math.round(this._startValue+this.getDecimalForPixel(n)*this._valueRange)}getBasePixel(){return this.bottom}}Fi.id="category",Fi.defaults={ticks:{callback:Fi.prototype.getLabelForValue}};function db(r,n){const t=[],{bounds:e,step:i,min:a,max:s,precision:l,count:u,maxTicks:d,maxDigits:f,includeBounds:M}=r,p=i||1,y=d-1,{min:j,max:v}=n,h=!Ce(a),N=!Ce(s),D=!Ce(u),I=(v-j)/(f+1);let m=Dd((v-j)/y/p)*p,T,L,A,z;if(m<1e-14&&!h&&!N)return[{value:j},{value:v}];z=Math.ceil(v/m)-Math.floor(j/m),z>y&&(m=Dd(z*m/y/p)*p),Ce(l)||(T=Math.pow(10,l),m=Math.ceil(m*T)/T),e==="ticks"?(L=Math.floor(j/m)*m,A=Math.ceil(v/m)*m):(L=j,A=v),h&&N&&i&&b1((s-a)/i,m/1e3)?(z=Math.round(Math.min((s-a)/m,d)),m=(s-a)/z,L=a,A=s):D?(L=h?a:L,A=N?s:A,z=u-1,m=(A-L)/z):(z=(A-L)/m,hr(z,Math.round(z),m/1e3)?z=Math.round(z):z=Math.ceil(z));const S=Math.max(vd(m),vd(L));T=Math.pow(10,Ce(l)?S:l),L=Math.round(L*T)/T,A=Math.round(A*T)/T;let b=0;for(h&&(M&&L!==a?(t.push({value:a}),L<a&&b++,hr(Math.round((L+b*m)*T)/T,a,uM(a,I,r))&&b++):L<a&&b++);b<z;++b)t.push({value:Math.round((L+b*m)*T)/T});return N&&M&&A!==s?t.length&&hr(t[t.length-1].value,s,uM(s,I,r))?t[t.length-1].value=s:t.push({value:s}):(!N||A===s)&&t.push({value:A}),t}function uM(r,n,{horizontal:t,minRotation:o}){const e=Ct(o),i=(t?Math.sin(e):Math.cos(e))||.001,a=.75*n*(""+r).length;return Math.min(n/i,a)}class Gi extends Pn{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(n,t){return Ce(n)||(typeof n=="number"||n instanceof Number)&&!isFinite(+n)?null:+n}handleTickRangeOptions(){const{beginAtZero:n}=this.options,{minDefined:t,maxDefined:o}=this.getUserBounds();let{min:e,max:i}=this;const a=l=>e=t?e:l,s=l=>i=o?i:l;if(n){const l=Ht(e),u=Ht(i);l<0&&u<0?s(0):l>0&&u>0&&a(0)}if(e===i){let l=1;(i>=Number.MAX_SAFE_INTEGER||e<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(i*.05)),s(i+l),n||a(e-l)}this.min=e,this.max=i}getTickLimit(){const n=this.options.ticks;let{maxTicksLimit:t,stepSize:o}=n,e;return o?(e=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),t=t||11),t&&(e=Math.min(t,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const n=this.options,t=n.ticks;let o=this.getTickLimit();o=Math.max(2,o);const e={maxTicks:o,bounds:n.bounds,min:n.min,max:n.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},i=this._range||this,a=db(e,i);return n.bounds==="ticks"&&xd(a,this,"value"),n.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const n=this.ticks;let t=this.min,o=this.max;if(super.configure(),this.options.offset&&n.length){const e=(o-t)/Math.max(n.length-1,1)/2;t-=e,o+=e}this._startValue=t,this._endValue=o,this._valueRange=o-t}getLabelForValue(n){return Dr(n,this.chart.options.locale,this.options.ticks.format)}}class Pl extends Gi{determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=ot(n)?n:0,this.max=ot(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const n=this.isHorizontal(),t=n?this.width:this.height,o=Ct(this.options.ticks.minRotation),e=(n?Math.sin(o):Math.cos(o))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,i.lineHeight/e))}getPixelForValue(n){return n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getValueForPixel(n){return this._startValue+this.getDecimalForPixel(n)*this._valueRange}}Pl.id="linear",Pl.defaults={ticks:{callback:Ei.formatters.numeric}};function cM(r){return r/Math.pow(10,Math.floor(xt(r)))===1}function fb(r,n){const t=Math.floor(xt(n.max)),o=Math.ceil(n.max/Math.pow(10,t)),e=[];let i=It(r.min,Math.pow(10,Math.floor(xt(n.min)))),a=Math.floor(xt(i)),s=Math.floor(i/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do e.push({value:i,major:cM(i)}),++s,s===10&&(s=1,++a,l=a>=0?1:l),i=Math.round(s*Math.pow(10,a)*l)/l;while(a<t||a===t&&s<o);const u=It(r.max,i);return e.push({value:u,major:cM(i)}),e}class dM extends Pn{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(n,t){const o=Gi.prototype.parse.apply(this,[n,t]);if(o===0){this._zero=!0;return}return ot(o)&&o>0?o:null}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=ot(n)?Math.max(0,n):null,this.max=ot(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:n,maxDefined:t}=this.getUserBounds();let o=this.min,e=this.max;const i=l=>o=n?o:l,a=l=>e=t?e:l,s=(l,u)=>Math.pow(10,Math.floor(xt(l))+u);o===e&&(o<=0?(i(1),a(10)):(i(s(o,-1)),a(s(e,1)))),o<=0&&i(s(e,-1)),e<=0&&a(s(o,1)),this._zero&&this.min!==this._suggestedMin&&o===s(this.min,0)&&i(s(o,-1)),this.min=o,this.max=e}buildTicks(){const n=this.options,t={min:this._userMin,max:this._userMax},o=fb(t,this);return n.bounds==="ticks"&&xd(o,this,"value"),n.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(n){return n===void 0?"0":Dr(n,this.chart.options.locale,this.options.ticks.format)}configure(){const n=this.min;super.configure(),this._startValue=xt(n),this._valueRange=xt(this.max)-xt(n)}getPixelForValue(n){return(n===void 0||n===0)&&(n=this.min),n===null||isNaN(n)?NaN:this.getPixelForDecimal(n===this.min?0:(xt(n)-this._startValue)/this._valueRange)}getValueForPixel(n){const t=this.getDecimalForPixel(n);return Math.pow(10,this._startValue+t*this._valueRange)}}dM.id="logarithmic",dM.defaults={ticks:{callback:Ei.formatters.logarithmic,major:{enabled:!0}}};function Rl(r){const n=r.ticks;if(n.display&&r.display){const t=bt(n.backdropPadding);return we(n.font&&n.font.size,ke.font.size)+t.height}return 0}function Mb(r,n,t){return t=Ze(t)?t:[t],{w:r4(r,n.string,t),h:t.length*n.lineHeight}}function fM(r,n,t,o,e){return r===o||r===e?{start:n-t/2,end:n+t/2}:r<o||r>e?{start:n-t,end:n}:{start:n,end:n+t}}function gb(r){const n={l:r.left+r._padding.left,r:r.right-r._padding.right,t:r.top+r._padding.top,b:r.bottom-r._padding.bottom},t=Object.assign({},n),o=[],e=[],i=r._pointLabels.length,a=r.options.pointLabels,s=a.centerPointLabels?Je/i:0;for(let l=0;l<i;l++){const u=a.setContext(r.getPointLabelContext(l));e[l]=u.padding;const d=r.getPointPosition(l,r.drawingArea+e[l],s),f=yt(u.font),M=Mb(r.ctx,f,r._pointLabels[l]);o[l]=M;const p=Et(r.getIndexAngle(l)+s),y=Math.round(tl(p)),j=fM(y,d.x,M.w,0,180),v=fM(y,d.y,M.h,90,270);hb(t,n,p,j,v)}r.setCenterPoint(n.l-t.l,t.r-n.r,n.t-t.t,t.b-n.b),r._pointLabelItems=pb(r,o,e)}function hb(r,n,t,o,e){const i=Math.abs(Math.sin(t)),a=Math.abs(Math.cos(t));let s=0,l=0;o.start<n.l?(s=(n.l-o.start)/i,r.l=Math.min(r.l,n.l-s)):o.end>n.r&&(s=(o.end-n.r)/i,r.r=Math.max(r.r,n.r+s)),e.start<n.t?(l=(n.t-e.start)/a,r.t=Math.min(r.t,n.t-l)):e.end>n.b&&(l=(e.end-n.b)/a,r.b=Math.max(r.b,n.b+l))}function pb(r,n,t){const o=[],e=r._pointLabels.length,i=r.options,a=Rl(i)/2,s=r.drawingArea,l=i.pointLabels.centerPointLabels?Je/e:0;for(let u=0;u<e;u++){const d=r.getPointPosition(u,s+a+t[u],l),f=Math.round(tl(Et(d.angle+Xe))),M=n[u],p=mb(d.y,M.h,f),y=yb(f),j=Nb(d.x,M.w,y);o.push({x:d.x,y:p,textAlign:y,left:j,top:p,right:j+M.w,bottom:p+M.h})}return o}function yb(r){return r===0||r===180?"center":r<180?"left":"right"}function Nb(r,n,t){return t==="right"?r-=n:t==="center"&&(r-=n/2),r}function mb(r,n,t){return t===90||t===270?r-=n/2:(t>270||t<90)&&(r-=n),r}function jb(r,n){const{ctx:t,options:{pointLabels:o}}=r;for(let e=n-1;e>=0;e--){const i=o.setContext(r.getPointLabelContext(e)),a=yt(i.font),{x:s,y:l,textAlign:u,left:d,top:f,right:M,bottom:p}=r._pointLabelItems[e],{backdropColor:y}=i;if(!Ce(y)){const j=qn(i.borderRadius),v=bt(i.backdropPadding);t.fillStyle=y;const h=d-v.left,N=f-v.top,D=M-d+v.width,I=p-f+v.height;Object.values(j).some(m=>m!==0)?(t.beginPath(),wi(t,{x:h,y:N,w:D,h:I,radius:j}),t.fill()):t.fillRect(h,N,D,I)}Ai(t,r._pointLabels[e],s,l+a.lineHeight/2,a,{color:i.color,textAlign:u,textBaseline:"middle"})}}function MM(r,n,t,o){const{ctx:e}=r;if(t)e.arc(r.xCenter,r.yCenter,n,0,Be);else{let i=r.getPointPosition(0,n);e.moveTo(i.x,i.y);for(let a=1;a<o;a++)i=r.getPointPosition(a,n),e.lineTo(i.x,i.y)}}function Ib(r,n,t,o){const e=r.ctx,i=n.circular,{color:a,lineWidth:s}=n;!i&&!o||!a||!s||t<0||(e.save(),e.strokeStyle=a,e.lineWidth=s,e.setLineDash(n.borderDash),e.lineDashOffset=n.borderDashOffset,e.beginPath(),MM(r,t,i,o),e.closePath(),e.stroke(),e.restore())}function Db(r,n,t){return Dn(r,{label:t,index:n,type:"pointLabel"})}class $i extends Gi{constructor(n){super(n),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const n=this._padding=bt(Rl(this.options)/2),t=this.width=this.maxWidth-n.width,o=this.height=this.maxHeight-n.height;this.xCenter=Math.floor(this.left+t/2+n.left),this.yCenter=Math.floor(this.top+o/2+n.top),this.drawingArea=Math.floor(Math.min(t,o)/2)}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!1);this.min=ot(n)&&!isNaN(n)?n:0,this.max=ot(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Rl(this.options))}generateTickLabels(n){Gi.prototype.generateTickLabels.call(this,n),this._pointLabels=this.getLabels().map((t,o)=>{const e=$e(this.options.pointLabels.callback,[t,o],this);return e||e===0?e:""}).filter((t,o)=>this.chart.getDataVisibility(o))}fit(){const n=this.options;n.display&&n.pointLabels.display?gb(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(n,t,o,e){this.xCenter+=Math.floor((n-t)/2),this.yCenter+=Math.floor((o-e)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(n,t,o,e))}getIndexAngle(n){const t=Be/(this._pointLabels.length||1),o=this.options.startAngle||0;return Et(n*t+Ct(o))}getDistanceFromCenterForValue(n){if(Ce(n))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-n)*t:(n-this.min)*t}getValueForDistanceFromCenter(n){if(Ce(n))return NaN;const t=n/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(n){const t=this._pointLabels||[];if(n>=0&&n<t.length){const o=t[n];return Db(this.getContext(),n,o)}}getPointPosition(n,t,o=0){const e=this.getIndexAngle(n)-Xe+o;return{x:Math.cos(e)*t+this.xCenter,y:Math.sin(e)*t+this.yCenter,angle:e}}getPointPositionForValue(n,t){return this.getPointPosition(n,this.getDistanceFromCenterForValue(t))}getBasePosition(n){return this.getPointPositionForValue(n||0,this.getBaseValue())}getPointLabelPosition(n){const{left:t,top:o,right:e,bottom:i}=this._pointLabelItems[n];return{left:t,top:o,right:e,bottom:i}}drawBackground(){const{backgroundColor:n,grid:{circular:t}}=this.options;if(n){const o=this.ctx;o.save(),o.beginPath(),MM(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),o.closePath(),o.fillStyle=n,o.fill(),o.restore()}}drawGrid(){const n=this.ctx,t=this.options,{angleLines:o,grid:e}=t,i=this._pointLabels.length;let a,s,l;if(t.pointLabels.display&&jb(this,i),e.display&&this.ticks.forEach((u,d)=>{if(d!==0){s=this.getDistanceFromCenterForValue(u.value);const f=e.setContext(this.getContext(d-1));Ib(this,f,s,i)}}),o.display){for(n.save(),a=i-1;a>=0;a--){const u=o.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=u;!f||!d||(n.lineWidth=f,n.strokeStyle=d,n.setLineDash(u.borderDash),n.lineDashOffset=u.borderDashOffset,s=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,s),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(l.x,l.y),n.stroke())}n.restore()}}drawBorder(){}drawLabels(){const n=this.ctx,t=this.options,o=t.ticks;if(!o.display)return;const e=this.getIndexAngle(0);let i,a;n.save(),n.translate(this.xCenter,this.yCenter),n.rotate(e),n.textAlign="center",n.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&!t.reverse)return;const u=o.setContext(this.getContext(l)),d=yt(u.font);if(i=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){n.font=d.string,a=n.measureText(s.label).width,n.fillStyle=u.backdropColor;const f=bt(u.backdropPadding);n.fillRect(-a/2-f.left,-i-d.size/2-f.top,a+f.width,d.size+f.height)}Ai(n,s.label,0,-i,d,{color:u.color})}),n.restore()}drawTitle(){}}$i.id="radialLinear",$i.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ei.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(r){return r},padding:5,centerPointLabels:!1}},$i.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},$i.descriptors={angleLines:{_fallback:"grid"}};const Ji={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}},pt=Object.keys(Ji);function xb(r,n){return r-n}function gM(r,n){if(Ce(n))return null;const t=r._adapter,{parser:o,round:e,isoWeekday:i}=r._parseOpts;let a=n;return typeof o=="function"&&(a=o(a)),ot(a)||(a=typeof o=="string"?t.parse(a,o):t.parse(a)),a===null?null:(e&&(a=e==="week"&&(Xn(i)||i===!0)?t.startOf(a,"isoWeek",i):t.startOf(a,e)),+a)}function hM(r,n,t,o){const e=pt.length;for(let i=pt.indexOf(r);i<e-1;++i){const a=Ji[pt[i]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((t-n)/(s*a.size))<=o)return pt[i]}return pt[e-1]}function vb(r,n,t,o,e){for(let i=pt.length-1;i>=pt.indexOf(t);i--){const a=pt[i];if(Ji[a].common&&r._adapter.diff(e,o,a)>=n-1)return a}return pt[t?pt.indexOf(t):0]}function bb(r){for(let n=pt.indexOf(r)+1,t=pt.length;n<t;++n)if(Ji[pt[n]].common)return pt[n]}function pM(r,n,t){if(!t)r[n]=!0;else if(t.length){const{lo:o,hi:e}=rl(t,n),i=t[o]>=n?t[o]:t[e];r[i]=!0}}function Tb(r,n,t,o){const e=r._adapter,i=+e.startOf(n[0].value,o),a=n[n.length-1].value;let s,l;for(s=i;s<=a;s=+e.add(s,1,o))l=t[s],l>=0&&(n[l].major=!0);return n}function yM(r,n,t){const o=[],e={},i=n.length;let a,s;for(a=0;a<i;++a)s=n[a],e[s]=a,o.push({value:s,major:!1});return i===0||!t?o:Tb(r,o,e,t)}class Xi extends Pn{constructor(n){super(n),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(n,t){const o=n.time||(n.time={}),e=this._adapter=new Zx._date(n.adapters.date);e.init(t),Mr(o.displayFormats,e.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(n),this._normalized=t.normalized}parse(n,t){return n===void 0?null:gM(this,n)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const n=this.options,t=this._adapter,o=n.time.unit||"day";let{min:e,max:i,minDefined:a,maxDefined:s}=this.getUserBounds();function l(u){!a&&!isNaN(u.min)&&(e=Math.min(e,u.min)),!s&&!isNaN(u.max)&&(i=Math.max(i,u.max))}(!a||!s)&&(l(this._getLabelBounds()),(n.bounds!=="ticks"||n.ticks.source!=="labels")&&l(this.getMinMax(!1))),e=ot(e)&&!isNaN(e)?e:+t.startOf(Date.now(),o),i=ot(i)&&!isNaN(i)?i:+t.endOf(Date.now(),o)+1,this.min=Math.min(e,i-1),this.max=Math.max(e+1,i)}_getLabelBounds(){const n=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return n.length&&(t=n[0],o=n[n.length-1]),{min:t,max:o}}buildTicks(){const n=this.options,t=n.time,o=n.ticks,e=o.source==="labels"?this.getLabelTimestamps():this._generate();n.bounds==="ticks"&&e.length&&(this.min=this._userMin||e[0],this.max=this._userMax||e[e.length-1]);const i=this.min,a=this.max,s=w1(e,i,a);return this._unit=t.unit||(o.autoSkip?hM(t.minUnit,this.min,this.max,this._getLabelCapacity(i)):vb(this,s.length,t.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:bb(this._unit),this.initOffsets(e),n.reverse&&s.reverse(),yM(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(n=>+n.value))}initOffsets(n){let t=0,o=0,e,i;this.options.offset&&n.length&&(e=this.getDecimalForValue(n[0]),n.length===1?t=1-e:t=(this.getDecimalForValue(n[1])-e)/2,i=this.getDecimalForValue(n[n.length-1]),n.length===1?o=i:o=(i-this.getDecimalForValue(n[n.length-2]))/2);const a=n.length<3?.5:.25;t=lt(t,0,a),o=lt(o,0,a),this._offsets={start:t,end:o,factor:1/(t+1+o)}}_generate(){const n=this._adapter,t=this.min,o=this.max,e=this.options,i=e.time,a=i.unit||hM(i.minUnit,t,o,this._getLabelCapacity(t)),s=we(i.stepSize,1),l=a==="week"?i.isoWeekday:!1,u=Xn(l)||l===!0,d={};let f=t,M,p;if(u&&(f=+n.startOf(f,"isoWeek",l)),f=+n.startOf(f,u?"day":a),n.diff(o,t,a)>1e5*s)throw new Error(t+" and "+o+" are too far apart with stepSize of "+s+" "+a);const y=e.ticks.source==="data"&&this.getDataTimestamps();for(M=f,p=0;M<o;M=+n.add(M,s,a),p++)pM(d,M,y);return(M===o||e.bounds==="ticks"||p===1)&&pM(d,M,y),Object.keys(d).sort((j,v)=>j-v).map(j=>+j)}getLabelForValue(n){const t=this._adapter,o=this.options.time;return o.tooltipFormat?t.format(n,o.tooltipFormat):t.format(n,o.displayFormats.datetime)}_tickFormatFunction(n,t,o,e){const i=this.options,a=i.time.displayFormats,s=this._unit,l=this._majorUnit,u=s&&a[s],d=l&&a[l],f=o[t],M=l&&d&&f&&f.major,p=this._adapter.format(n,e||(M?d:u)),y=i.ticks.callback;return y?$e(y,[p,t,o],this):p}generateTickLabels(n){let t,o,e;for(t=0,o=n.length;t<o;++t)e=n[t],e.label=this._tickFormatFunction(e.value,t,n)}getDecimalForValue(n){return n===null?NaN:(n-this.min)/(this.max-this.min)}getPixelForValue(n){const t=this._offsets,o=this.getDecimalForValue(n);return this.getPixelForDecimal((t.start+o)*t.factor)}getValueForPixel(n){const t=this._offsets,o=this.getDecimalForPixel(n)/t.factor-t.end;return this.min+o*(this.max-this.min)}_getLabelSize(n){const t=this.options.ticks,o=this.ctx.measureText(n).width,e=Ct(this.isHorizontal()?t.maxRotation:t.minRotation),i=Math.cos(e),a=Math.sin(e),s=this._resolveTickFontOptions(0).size;return{w:o*i+s*a,h:o*a+s*i}}_getLabelCapacity(n){const t=this.options.time,o=t.displayFormats,e=o[t.unit]||o.millisecond,i=this._tickFormatFunction(n,0,yM(this,[n],this._majorUnit),e),a=this._getLabelSize(i),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let n=this._cache.data||[],t,o;if(n.length)return n;const e=this.getMatchingVisibleMetas();if(this._normalized&&e.length)return this._cache.data=e[0].controller.getAllParsedValues(this);for(t=0,o=e.length;t<o;++t)n=n.concat(e[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const n=this._cache.labels||[];let t,o;if(n.length)return n;const e=this.getLabels();for(t=0,o=e.length;t<o;++t)n.push(gM(this,e[t]));return this._cache.labels=this._normalized?n:this.normalize(n)}normalize(n){return Ad(n.sort(xb))}}Xi.id="time",Xi.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function Ki(r,n,t){let o=0,e=r.length-1,i,a,s,l;t?(n>=r[o].pos&&n<=r[e].pos&&({lo:o,hi:e}=En(r,"pos",n)),{pos:i,time:s}=r[o],{pos:a,time:l}=r[e]):(n>=r[o].time&&n<=r[e].time&&({lo:o,hi:e}=En(r,"time",n)),{time:i,pos:s}=r[o],{time:a,pos:l}=r[e]);const u=a-i;return u?s+(l-s)*(n-i)/u:s}class NM extends Xi{constructor(n){super(n),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const n=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(n);this._minPos=Ki(t,this.min),this._tableRange=Ki(t,this.max)-this._minPos,super.initOffsets(n)}buildLookupTable(n){const{min:t,max:o}=this,e=[],i=[];let a,s,l,u,d;for(a=0,s=n.length;a<s;++a)u=n[a],u>=t&&u<=o&&e.push(u);if(e.length<2)return[{time:t,pos:0},{time:o,pos:1}];for(a=0,s=e.length;a<s;++a)d=e[a+1],l=e[a-1],u=e[a],Math.round((d+l)/2)!==u&&i.push({time:u,pos:a/(s-1)});return i}_getTimestampsForTable(){let n=this._cache.all||[];if(n.length)return n;const t=this.getDataTimestamps(),o=this.getLabelTimestamps();return t.length&&o.length?n=this.normalize(t.concat(o)):n=t.length?t:o,n=this._cache.all=n,n}getDecimalForValue(n){return(Ki(this._table,n)-this._minPos)/this._tableRange}getValueForPixel(n){const t=this._offsets,o=this.getDecimalForPixel(n)/t.factor-t.end;return Ki(this._table,o*this._tableRange+this._minPos,!0)}}NM.id="timeseries",NM.defaults=Xi.defaults;var rr;(function(r){r.ChartRendered="chart:rendered",r.ChartUpdated="chart:updated",r.ChartDestroyed="chart:destroyed",r.LabelsUpdated="labels:updated"})(rr||(rr={}));function qi(r,n,t,o){r(n,t),o!==void 0&&o.emit(rr.ChartRendered)}function kb(r,n){r.update(),n!==void 0&&n.emit(rr.ChartUpdated)}function ea(r,n){r.destroy(),n!==void 0&&n.emit(rr.ChartDestroyed)}function Ab(r,n){const t={labels:typeof r.labels=="undefined"?[]:[...r.labels],datasets:[]};return mM(t,{...r},n),t}function mM(r,n,t){const o=[];r.datasets=n.datasets.map(e=>{const i=r.datasets.find(a=>a[t]===e[t]);return!i||!e.data||o.includes(i)?{...e}:(o.push(i),Object.assign(i,e),i)})}function wb(r,n,t){r.data.labels=n,t!==void 0&&t.emit(rr.LabelsUpdated)}function Lb(r,n){r.options={...n}}function zb(r,n){const t=r.datasets.map(e=>e.label),o=n.datasets.map(e=>e.label);return n.datasets.length===r.datasets.length&&t.every((e,i)=>e===o[i])}const Ob="Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components",Sb="Update ERROR: chart instance not found",Cb=((r,n,t)=>c.defineComponent({props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,default:()=>{}},datasetIdKey:{type:String,default:"label"},chartId:{type:String,default:r},width:{type:Number,default:400},height:{type:Number,default:400},cssClasses:{type:String,default:""},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},setup(o,e){Or.register(t);const i=c.shallowRef(null),a=c.ref(null);function s(f,M){if(i.value!==null&&ea(c.toRaw(i.value),e),a.value===null)throw new Error(Ob);{const p=Ab(f,o.datasetIdKey),y=a.value.getContext("2d");y!==null&&(i.value=new Or(y,{type:n,data:c.isProxy(f)?new Proxy(p,{}):p,options:M,plugins:o.plugins}))}}function l(f,M){const p=c.isProxy(f)?c.toRaw(f):{...f},y=c.isProxy(M)?c.toRaw(M):{...M};if(Object.keys(y).length>0){const j=c.toRaw(i.value);zb(p,y)&&j!==null?(mM(j==null?void 0:j.data,p,o.datasetIdKey),p.labels!==void 0&&wb(j,p.labels,e),d()):(j!==null&&ea(j,e),qi(s,o.chartData,o.chartOptions,e))}else i.value!==null&&ea(c.toRaw(i.value),e),qi(s,o.chartData,o.chartOptions,e)}function u(f){const M=c.toRaw(i.value);M!==null?(Lb(M,f),d()):qi(s,o.chartData,o.chartOptions,e)}function d(){const f=c.toRaw(i.value);f!==null?kb(f,e):console.error(Sb)}return c.watch(()=>o.chartData,(f,M)=>l(f,M),{deep:!0}),c.watch(()=>o.chartOptions,f=>u(f),{deep:!0}),c.onMounted(()=>{"datasets"in o.chartData&&o.chartData.datasets.length>0&&qi(s,o.chartData,o.chartOptions,e)}),c.onBeforeUnmount(()=>{i.value!==null&&ea(c.toRaw(i.value),e)}),e.expose({chart:i,updateChart:d}),()=>c.h("div",{style:o.styles,class:o.cssClasses},[c.h("canvas",{id:o.chartId,width:o.width,height:o.height,ref:a})])}}))("bar-chart","bar",Ci);var xw="";const Eb={name:"MultiRangeSlider",props:{baseClassName:{type:String,default:"multi-range-slider"},min:{type:Number},max:{type:Number},minValue:{type:Number},maxValue:{type:Number},step:{type:Number,default:1},preventWheel:{type:Boolean,default:!1},ruler:{type:Boolean,default:!0},label:{type:Boolean,default:!0},labels:{type:Array},minCaption:{type:String},maxCaption:{type:String},rangeMargin:{type:Number}},data(){let r=this.labels||[],n=this.min===void 0?0:this.min,t=r.length?r.length-1:100,o=this.max===void 0?t:this.max,e=this.minValue===void 0?25:this.minValue;r.length&&this.minValue===void 0&&(e=1);let i=this.maxValue||75;if(r.length&&this.maxValue===void 0&&(i=r.length-2),o<=n)throw new Error("Invalid props min or max");if(e>i)throw new Error("Invalid props minValue or maxValue");let a=this.rangeMargin===void 0?this.step:this.rangeMargin,s=a%this.step;return s&&(a=a+this.step-s),{valueMin:e<n?n:e,valueMax:i>o?o:i,interVal:null,startX:null,mouseMoveCounter:null,barBox:null,barValue:0,rangeMarginValue:a}},methods:{onBarLeftClick(){this.valueMin-this.step>=this.minimum?this.valueMin-=this.step:this.valueMin=this.minimum},onInnerBarLeftClick(){this.valueMin+this.rangeMarginValue<this.valueMax&&(this.valueMin+=this.step)},onBarRightClick(){this.valueMax+this.step<=this.maximum?this.valueMax+=this.step:this.valueMax=this.maximum},onInnerBarRightClick(){this.valueMax-this.rangeMarginValue>this.valueMin&&(this.valueMax-=this.step)},onInputMinChange(r){let n=parseFloat(r.target.value);n<=this.valueMax-this.rangeMarginValue&&n>=this.minimum?this.valueMin=n:r.target.value=this.valueMin},onInputMaxChange(r){let n=parseFloat(r.target.value);n>=this.valueMin+this.rangeMarginValue&&n<=this.maximum?this.valueMax=n:r.target.value=this.valueMax},onLeftThumbMousedown(r){if(r.preventDefault(),this.startX=r.clientX,r.type==="touchstart")if(r.touches.length===1)this.startX=r.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMin,this.barBox=r.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onLeftThumbMousemove),document.addEventListener("mouseup",this.onLeftThumbMouseup),document.addEventListener("touchmove",this.onLeftThumbMousemove),document.addEventListener("touchend",this.onLeftThumbMouseup)},onLeftThumbMousemove(r){this.mouseMoveCounter++;let n=r.clientX;r.type==="touchmove"&&(n=r.touches[0].clientX);let o=(n-this.startX)/this.barBox.width,e=this.barValue+(this.maximum-this.minimum)*o;e-=e%this.step,e<this.minimum?e=this.minimum:e>this.valueMax-this.rangeMarginValue&&(e=this.valueMax-this.rangeMarginValue),this.valueMin=e},onLeftThumbMouseup(){document.removeEventListener("mousemove",this.onLeftThumbMousemove),document.removeEventListener("mouseup",this.onLeftThumbMouseup),document.removeEventListener("touchmove",this.onLeftThumbMousemove),document.removeEventListener("touchend",this.onLeftThumbMouseup)},onRightThumbMousedown(r){if(r.preventDefault(),this.startX=r.clientX,r.type==="touchstart")if(r.touches.length===1)this.startX=r.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMax,this.barBox=r.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onRightThumbMousemove),document.addEventListener("mouseup",this.onRightThumbMouseup),document.addEventListener("touchmove",this.onRightThumbMousemove),document.addEventListener("touchend",this.onRightThumbMouseup)},onRightThumbMousemove(r){this.mouseMoveCounter++;let n=r.clientX;r.type==="touchmove"&&(n=r.touches[0].clientX);let o=(n-this.startX)/this.barBox.width,e=this.barValue+(this.maximum-this.minimum)*o;e-=e%this.step,e<this.valueMin+this.rangeMarginValue?e=this.valueMin+this.rangeMarginValue:e>this.maximum&&(e=this.maximum),this.valueMax=e},onRightThumbMouseup(){document.removeEventListener("mousemove",this.onRightThumbMousemove),document.removeEventListener("mouseup",this.onRightThumbMouseup),document.removeEventListener("touchmove",this.onRightThumbMousemove),document.removeEventListener("touchend",this.onRightThumbMouseup)},onMouseWheel(r){if(this.preventWheel===!0||!r.shiftKey&&!r.ctrlKey)return;let n=this.step;r.deltaY<0&&(n=-n),r.shiftKey&&r.ctrlKey?this.valueMin+n>=this.minimum&&this.valueMax+n<=this.maximum&&(this.valueMin=this.valueMin+n,this.valueMax=this.valueMax+n):r.ctrlKey?(n=this.valueMax+n,n<this.valueMin+this.rangeMarginValue?n=this.valueMin+this.rangeMarginValue:n>this.maximum&&(n=this.maximum),this.valueMax=n):r.shiftKey&&(n=this.valueMin+n,n<this.minimum?n=this.minimum:n>this.valueMax-this.rangeMarginValue&&(n=this.valueMax-this.rangeMarginValue),this.valueMin=n)},triggerInput(){let r=0;this.step.toString().includes(".")&&(r=2);let n={min:this.minimum,max:this.maximum,minValue:parseFloat(this.valueMin.toFixed(r)),maxValue:parseFloat(this.valueMax.toFixed(r))};this.$emit("input",n)}},computed:{minimum(){return this.min===void 0?0:this.min},maximum(){let r=this.labels||[],n=r.length?r.length-1:100;return this.max===void 0?n:this.max},stepCount(){let r=this.labels||[];return r.length?r.length-1:Math.floor((this.maximum-this.minimum)/this.step)},subStepCount(){return(this.labels||[]).length&&this.step>1?(this.maximum-this.minimum)/this.step:0},barMin(){return(this.valueMin-this.minimum)/(this.maximum-this.minimum)*100},barMax(){return 100-(this.valueMax-this.minimum)/(this.maximum-this.minimum)*100},barMinVal(){let r=0;return this.step.toString().includes(".")&&(r=2),(this.valueMin||0).toFixed(r)},barMaxVal(){let r=0;return this.step.toString().includes(".")&&(r=2),(this.valueMax||100).toFixed(r)},scaleLabels(){let r=this.labels||[];return r.length===0&&(r=[],r.push(this.minimum),r.push(this.maximum)),r}},watch:{valueMin(){this.triggerInput()},valueMax(){this.triggerInput()},minValue(r){this.valueMin=r<this.minimum?this.minimum:r},maxValue(r){this.valueMax=r>this.maximum?this.maximum:r}},mounted(){}},_b={class:"bar"},Qb=["min","max","step","value"],Ub={class:"caption"},Yb={class:"min-caption"},Bb={class:"bar-inner"},Pb=["min","max","step","value"],Rb={class:"caption"},Vb={class:"max-caption"},Zb={key:0,class:"ruler"},Wb={key:1,class:"sub-ruler"},Hb={key:2,class:"labels"};function Fb(r,n,t,o,e,i){return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([t.baseClassName,e.rangeMarginValue===0?"zero-ranage-margin":""]),onMousewheel:n[10]||(n[10]=c.withModifiers((...a)=>i.onMouseWheel&&i.onMouseWheel(...a),["prevent","stop"]))},[c.createElementVNode("div",_b,[c.createElementVNode("div",{class:"bar-left",style:c.normalizeStyle({width:i.barMin+"%"}),onClick:n[0]||(n[0]=(...a)=>i.onBarLeftClick&&i.onBarLeftClick(...a))},null,4),c.createElementVNode("input",{class:"input-type-range input-type-range-min",type:"range",min:i.minimum,max:i.maximum,step:t.step,value:e.valueMin,onInput:n[1]||(n[1]=c.withModifiers((...a)=>i.onInputMinChange&&i.onInputMinChange(...a),["stop","prevent"]))},null,40,Qb),c.createElementVNode("div",{class:"thumb thumb-left",onMousedown:n[2]||(n[2]=(...a)=>i.onLeftThumbMousedown&&i.onLeftThumbMousedown(...a)),onTouchstart:n[3]||(n[3]=(...a)=>i.onLeftThumbMousedown&&i.onLeftThumbMousedown(...a))},[c.createElementVNode("div",Ub,[c.createElementVNode("span",Yb,c.toDisplayString(t.minCaption||i.barMinVal),1)])],32),c.createElementVNode("div",Bb,[c.createElementVNode("div",{class:"bar-inner-left",onClick:n[4]||(n[4]=(...a)=>i.onInnerBarLeftClick&&i.onInnerBarLeftClick(...a))}),c.createElementVNode("div",{class:"bar-inner-right",onClick:n[5]||(n[5]=(...a)=>i.onInnerBarRightClick&&i.onInnerBarRightClick(...a))})]),c.createElementVNode("input",{class:"input-type-range input-type-range-max",type:"range",min:i.minimum,max:i.maximum,step:t.step,value:e.valueMax,onInput:n[6]||(n[6]=c.withModifiers((...a)=>i.onInputMaxChange&&i.onInputMaxChange(...a),["stop","prevent"]))},null,40,Pb),c.createElementVNode("div",{class:"thumb thumb-right",onMousedown:n[7]||(n[7]=(...a)=>i.onRightThumbMousedown&&i.onRightThumbMousedown(...a)),onTouchstart:n[8]||(n[8]=(...a)=>i.onRightThumbMousedown&&i.onRightThumbMousedown(...a))},[c.createElementVNode("div",Rb,[c.createElementVNode("span",Vb,c.toDisplayString(t.maxCaption||i.barMaxVal),1)])],32),c.createElementVNode("div",{class:"bar-right",style:c.normalizeStyle({width:i.barMax+"%"}),onClick:n[9]||(n[9]=(...a)=>i.onBarRightClick&&i.onBarRightClick(...a))},null,4)]),t.ruler?(c.openBlock(),c.createElementBlock("div",Zb,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.stepCount,a=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"ruler-rule"}))),128))])):c.createCommentVNode("",!0),i.subStepCount?(c.openBlock(),c.createElementBlock("div",Wb,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.subStepCount,a=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"ruler-sub-rule"}))),128))])):c.createCommentVNode("",!0),t.label?(c.openBlock(),c.createElementBlock("div",Hb,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.scaleLabels,a=>(c.openBlock(),c.createElementBlock("div",{class:"label",key:a},c.toDisplayString(a),1))),128))])):c.createCommentVNode("",!0)],34)}var Gb=st(Eb,[["render",Fb]]);const $b=c.defineComponent({components:{DhIcon:Te},props:{mainText:{type:String,default:"Advanced"},filterMissingText:{type:String,default:"Filter Missing"},matchText:{type:String,default:"Match"},excludeText:{type:String,default:"Exclude"}},data(){return{activeFilter:!1,isFilterMissing:!1,isMatch:!1,isExclude:!1}},emits:["match","exclude","filter_missing"],mounted(){this.isMatch=!0},methods:{toggleFilter(){this.activeFilter=!this.activeFilter},matchFilter(){this.isMatch=!0,this.isExclude=!1,this.$emit("match",this.isMatch)},excludeFilter(){this.isMatch=!1,this.isExclude=!0,this.$emit("exclude",this.isExclude)},missingFilter(){this.isFilterMissing=!this.isFilterMissing,this.$emit("filter_missing",this.isFilterMissing),this.isFilterMissing&&this.isMatch?this.matchFilter():this.isFilterMissing&&this.isExclude&&this.excludeFilter()}}}),Jb={class:"dh-advanced-filter-container"},Xb={class:"advance_section"},Kb={key:0},qb={class:"list-none"},eT=["checked"],tT=["checked"],nT=["checked"];function rT(r,n,t,o,e,i){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock("div",Jb,[c.createElementVNode("div",Xb,[c.createElementVNode("span",{class:"toggle-icon",onClick:n[0]||(n[0]=s=>r.toggleFilter())},[c.createTextVNode(c.toDisplayString(r.mainText)+" ",1),c.createVNode(a,{"icon-name":r.activeFilter?"arrow-up":"arrow-down",size:20},null,8,["icon-name"])]),r.activeFilter?(c.openBlock(),c.createElementBlock("div",Kb,[c.renderSlot(r.$slots,"default"),c.createElementVNode("ul",qb,[c.createElementVNode("li",null,[c.createElementVNode("label",null,[c.createElementVNode("input",{checked:r.isFilterMissing,name:"number_filter",type:"checkbox",onChange:n[1]||(n[1]=s=>r.missingFilter())},null,40,eT),c.createTextVNode(" "+c.toDisplayString(r.filterMissingText),1)])]),c.createElementVNode("li",null,[c.createElementVNode("label",null,[c.createElementVNode("input",{checked:r.isMatch,name:"number_filter",type:"radio",onChange:n[2]||(n[2]=s=>r.matchFilter())},null,40,tT),c.createTextVNode(" "+c.toDisplayString(r.matchText),1)]),c.createElementVNode("label",null,[c.createElementVNode("input",{checked:r.isExclude,name:"number_filter",type:"radio",onChange:n[3]||(n[3]=s=>r.excludeFilter())},null,40,nT),c.createTextVNode(" "+c.toDisplayString(r.excludeText),1)])])])])):c.createCommentVNode("",!0)])])}var jM=st($b,[["render",rT]]),vw="";Or.register(sb,Wi,Fi,Pl);const oT=c.defineComponent({components:{Bar:Cb,MultiRangeSlider:Gb,DhAdvancedFilter:jM},props:{numberRange:{type:Array,default:()=>[{key:1,count:10}]},width:{type:Number,default:200},height:{type:Number,default:50},chartId:{type:String,default:"bar-chart"},datasetIdKey:{type:String,default:"label"},steps:{type:Number,default:1},includeForm:{type:Boolean,default:!1}},data(){return{chartData:{labels:[],datasets:[{labels:"",data:[],backgroundColor:["#5ea9e5"],borderRadius:1,hoverBackgroundColor:"#e0e0e0"}]},chartOptions:{responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!1}},scales:{x:{display:!1,grid:{display:!1},ticks:{display:!0}},y:{display:!1,grid:{display:!1},ticks:{display:!1}}}},chartLines:{},min:"1",max:this.maxNumber(this.numberRange),rangeMax:this.numberRange.length,chart_dta:[],BarMinValue:1,BarMaxValue:this.numberRange.length,activeFilter:!1,validated:!1,isMatch:!1,isExclude:!1,isDisable:!1,labels:[]}},mounted(){this.isMatch=!0,this.setChartData(this.numberRange),this.highlightChart(),this.labels=[this.BarMinValue,this.max]},methods:{matchFilter(){if(!this.isDisable){this.isMatch=!0,this.isExclude=!1;var r=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<=r.length;n++)r[n]>=this.min&&r[n]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")}},excludeFilter(){if(!this.isDisable){this.isMatch=!1,this.isExclude=!0;var r=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<r.length;n++)r[n]>=this.min&&r[n]<=this.max?this.chartData.datasets[0].backgroundColor.push("#e0e0e0"):this.chartData.datasets[0].backgroundColor.push("#5ea9e5")}},missingFilter(){this.isDisable=!this.isDisable,this.validated=!this.validated;var r=this.chartData.datasets[0].data;if(this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[],this.validated)for(let n=1;n<=r.length;n++)this.chartData.datasets[0].backgroundColor.push("#e0e0e0");else this.isMatch&&this.matchFilter(),this.isExclude&&this.excludeFilter()},changeMin(r){let n=r.target.value;this.min=n||"1",this.BarMinValue=n?this.getFirstIndex(parseInt(n)):1,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},changeMax(r){let n=r.target.value;this.BarMaxValue=n&&n>this.maxNumber(this.numberRange)?this.numberRange.length:this.getLastIndex(parseInt(n)),this.max=n&&n>this.maxNumber(this.numberRange)?this.maxNumber(this.numberRange):n,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},setChartData(r){r=this.sortData(r),this.removeChartData();let n=this.chartData.labels;for(let t=0;t<r.length;t++)n.push(r[t].key),this.chart_dta.push(r[t].count);this.chartData.datasets[0].data=this.chart_dta},highlightChart(){var r=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<=r.length;n++)r[n]>=this.min&&r[n]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")},updateBarChart(r){const{minValue:n,maxValue:t}=r;this.BarMinValue=n,this.BarMaxValue=t;var o=this.chartData.datasets[0].data;this.min=o[this.BarMinValue]?o[this.BarMinValue]:"1",this.max=o[this.BarMaxValue]?o[this.BarMaxValue]:this.max,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},toggleFilter(){this.activeFilter=!this.activeFilter},removeChartData(){this.chartData.labels=[],this.chartData.datasets[0].data=[],this.chart_dta=[]},sortData(r){return r.slice().sort(function(n,t){return n.count-t.count})},maxNumber(r){if(r.length!=0)return r.reduce((n,t)=>n=n>t.count?n:t.count,0)},getLastIndex(r){let n=this.chartData.datasets[0].data,t=0;for(let o=r;o>=0;o--)if(n.lastIndexOf(o)!==-1){t=n.lastIndexOf(o);break}else continue;return t},getFirstIndex(r){let n=this.chartData.datasets[0].data,t=0;for(let o=r;o<=this.max;o++)if(n.lastIndexOf(o)!==-1){t=n.lastIndexOf(o);break}else continue;return t}}}),iT={class:"dh-range-container"},aT={class:"bar-chart"},sT={key:0,class:"input-group-section"},lT={class:"input-group sb-input"},uT=["disabled","max","value"],cT={class:"input-group sb-input"},dT=["disabled","max","min","value"];function fT(r,n,t,o,e,i){const a=c.resolveComponent("Bar"),s=c.resolveComponent("MultiRangeSlider"),l=c.resolveComponent("dh-advanced-filter");return c.openBlock(),c.createElementBlock("div",iT,[c.createElementVNode("div",aT,[c.createVNode(a,{"chart-data":r.chartData,"chart-id":r.chartId,"chart-options":r.chartOptions,"dataset-id-key":r.datasetIdKey,height:r.height,width:r.width},null,8,["chart-data","chart-id","chart-options","dataset-id-key","height","width"]),c.createVNode(s,{"base-class-name":`multi-range-slider range-slider ${r.isDisable}`,label:!0,labels:r.labels,max:r.rangeMax,"max-caption":`${r.max}`,"max-value":r.BarMaxValue,min:1,"min-caption":`${r.min}`,"min-value":r.BarMinValue,"range-margin":0,ruler:!1,step:r.steps,onInput:r.updateBarChart},null,8,["base-class-name","labels","max","max-caption","max-value","min-caption","min-value","step","onInput"])]),r.includeForm?(c.openBlock(),c.createElementBlock("div",sT,[c.createElementVNode("div",lT,[c.createElementVNode("label",{class:c.normalizeClass(`dh-body-2 input-to ${r.validated?"disable":""}`)}," From ",2),c.createElementVNode("input",{class:"form-input text",disabled:!!r.validated,max:`${r.max}`,min:"1",placeholder:"From",type:"number",value:`${r.min}`,onInput:n[0]||(n[0]=u=>r.changeMin(u))},null,40,uT)]),c.createElementVNode("div",cT,[c.createElementVNode("label",{class:c.normalizeClass(`dh-body-2 input-to ${r.validated?"disable":""}`)}," To ",2),c.createElementVNode("input",{class:"form-input text",disabled:!!r.validated,max:`${r.maxNumber(r.numberRange)}`,min:`${r.min}`,placeholder:"To",type:"number",value:`${r.max}`,onInput:n[1]||(n[1]=u=>r.changeMax(u))},null,40,dT)])])):c.createCommentVNode("",!0),c.renderSlot(r.$slots,"input"),c.createVNode(l,{onExclude:r.excludeFilter,onFilter_missing:r.missingFilter,onMatch:r.matchFilter},{default:c.withCtx(()=>[c.renderSlot(r.$slots,"filter")]),_:3},8,["onExclude","onFilter_missing","onMatch"])])}var IM=st(oT,[["render",fT]]),bw="",Tw="";const MT={id:"dp-container"},gT=c.createElementVNode("div",{class:"dp__calendar_range"},[c.createElementVNode("p",null,"From"),c.createElementVNode("p",null,"To")],-1),hT={class:"dp__multi"},pT=["value"],yT=["value"],NT=c.createTextVNode(" Back "),mT=["onClick"],jT=["onClick"],IT=["onClick"],DT=["onClick"],xT=["onClick"],vT=["onClick"],bT=["onClick"],TT=["onClick"],kT=c.createElementVNode("div",{id:"tags",class:"dp__calendar_tags"},null,-1),AT={__name:"AdvancedDatePicker",props:{numberRange:{type:Array,required:!0}},emits:["update"],setup(r,{emit:n}){const t=c.ref(["",""]),o=c.ref(null),e=c.ref(null),i=c.ref(null),a=c.ref(!1),s=c.ref([{label:"Today",range:[new Date,new Date],slot:"today"},{label:"Previous week",range:[Cc(Sc(new Date)),Sc(new Date)],slot:"previousWeek"},{label:"This week",range:[Cc(new Date),A0(new Date)],slot:"week"},{label:"Next week",range:[L0(new Date),w0(new Date().setDate(new Date().getDate()+7))],slot:"nextWeek"},{label:"This month",range:[Pr(new Date),Br(new Date)],slot:"currentMonth"},{label:"Previous month",range:[Pr(jt(new Date,1)),Br(jt(new Date,1))],slot:"previousMonth"},{label:"Last 3 months",range:[Pr(jt(new Date,3)),Br(jt(new Date,1))],slot:"threeMonths"},{label:"Last 6 months",range:[Pr(jt(new Date,6)),Br(jt(new Date,1))],slot:"sixMonths"},{label:"Last year",range:[XM(new Date),JM(new Date)],slot:"yearly"}]),l=M=>{t.value=M,console.log(t.value),n("update",t.value)};function u(M){e.value=M.target.value,t.value=[M.target.value,o.value]}function d(M){o.value=M.target.value,t.value=[e.value,M.target.value]}c.onMounted(()=>{i.value.openMenu()});function f(){i.value.openMenu()}return(M,p)=>(c.openBlock(),c.createElementBlock("div",MT,[gT,c.createVNode(c.unref(yi),{ref_key:"datePicker",ref:i,modelValue:t.value,"onUpdate:modelValue":[p[2]||(p[2]=y=>t.value=y),l],"auto-apply":"","day-names":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"enable-time-picker":!1,"model-type":"dd/MM/yyyy","multi-calendars":"","multi-calendars-solo":"","multi-static":!1,offset:12,position:"left","preset-ranges":s.value,range:"","select-text":"Apply","text-input":"",uid:"advanced",onClosed:f},{"dp-input":c.withCtx(()=>[c.createElementVNode("div",hT,[c.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:e.value?e.value:t.value[0],onInput:p[0]||(p[0]=y=>u(y))},null,40,pT),c.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:o.value?o.value:t.value[1],onInput:p[1]||(p[1]=y=>d(y))},null,40,yT)])]),"arrow-left":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"previous",size:20})]),"arrow-right":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"next",size:20})]),"calendar-icon":c.withCtx(()=>[NT]),"clear-icon":c.withCtx(()=>[]),"action-preview":c.withCtx(()=>[]),"action-select":c.withCtx(()=>[]),previousWeek:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,mT)]))]),week:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,jT)]))]),nextWeek:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,IT)]))]),currentMonth:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,DT)]))]),previousMonth:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,xT)]))]),threeMonths:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,vT)]))]),sixMonths:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,bT)]))]),yearly:c.withCtx(({label:y,range:j,presetDateRange:v})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:h=>v(j)},c.toDisplayString(y),9,TT)]))]),_:1},8,["modelValue","preset-ranges"]),c.createVNode(IM,{class:"dp__calendar_range_number","number-range":r.numberRange,steps:1},{input:c.withCtx(()=>[kT]),filter:c.withCtx(()=>[c.createVNode(pd,{data:a.value,label:"Include time",onChange:p[3]||(p[3]=y=>a.value=y)},null,8,["data"])]),_:1},8,["number-range"])]))}},wT=c.defineComponent({props:{target:{type:String,required:!0},trigger:{type:String,required:!0},placement:{type:String,default:()=>"bottom",required:!1},tooltipText:{type:String,required:!0}},data(){return{show:!1}},methods:{showTooltip(){this.show=!this.show},tooltip(){let r=this.$refs.main,n=this.$refs[this.target];["right","left"].includes(this.placement)&&(n.style.top=-(((n==null?void 0:n.offsetHeight)-(r==null?void 0:r.offsetHeight))/2)+"px")}}}),LT=["placement","target","tooltipText","trigger"],zT=["id"],OT={class:"text"};function ST(r,n,t,o,e,i){return c.openBlock(),c.createElementBlock("div",{id:"main-contain",ref:"main",class:"dh-tooltip-container tooltip",placement:r.placement,target:r.target,tooltipText:r.tooltipText,trigger:r.trigger,onClick:n[0]||(n[0]=a=>r.trigger=="click"?r.showTooltip():null),onMouseover:n[1]||(n[1]=a=>r.tooltip())},[c.renderSlot(r.$slots,"default"),c.createElementVNode("div",{id:r.target,ref:r.target,class:c.normalizeClass(`tooltiptext ${r.show}`)},[c.createElementVNode("span",OT,c.toDisplayString(r.tooltipText),1)],10,zT)],40,LT)}var DM=st(wT,[["render",ST]]),kw="";const CT={class:"copy__text"},ET=["readonly"],_T={__name:"Copiable",props:{text:{type:String,required:!0},placement:{type:String,default:"bottom"},readonly:{type:Boolean,default:!0}},setup(r){const n=r,t=c.ref(""),o=c.ref("copy text");function e(a){navigator.clipboard.writeText(a),o.value="copied !"}function i(){o.value="copy text"}return c.onMounted(()=>{t.value=n.text}),(a,s)=>(c.openBlock(),c.createElementBlock("span",CT,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>t.value=l),readonly:r.readonly,type:"text",onInput:i},null,40,ET),[[c.vModelText,t.value]]),c.createVNode(DM,{placement:r.placement,target:"tooltiptext","tooltip-text":o.value,trigger:"hover",onClick:s[1]||(s[1]=l=>e(t.value))},{default:c.withCtx(()=>[c.createVNode(Te,{class:"copy__text_icon","icon-name":"copy",size:18})]),_:1},8,["placement","tooltip-text"])]))}};var Aw="";const QT=c.createTextVNode(" Back "),UT=c.createElementVNode("div",null,"today",-1),YT={__name:"DatePicker",props:{inline:{type:Boolean,default:!0}},emits:["update"],setup(r,{emit:n}){const t=c.ref(),o=c.ref(null),e=a=>{t.value=a,n("update",t.value)},i=c.ref([{date:en(new Date,0),type:"dot",tooltip:[{text:"Dot with tooltip",color:"blue"}]}]);return(a,s)=>(c.openBlock(),c.createElementBlock("div",null,[c.createVNode(c.unref(yi),{ref_key:"datePicker",ref:o,modelValue:t.value,"onUpdate:modelValue":[s[0]||(s[0]=l=>t.value=l),e],"day-names":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"enable-time-picker":!1,inline:r.inline,markers:i.value,"month-name-format":"short",offset:12,placeholder:"MM/DD/YYYY","select-text":"Apply","text-input":"",uid:"base"},{"arrow-left":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"previous",size:20})]),"arrow-right":c.withCtx(()=>[c.createVNode(Te,{"icon-name":"next",size:20})]),"calendar-icon":c.withCtx(()=>[QT]),"clear-icon":c.withCtx(()=>[]),"action-preview":c.withCtx(()=>[]),"marker-tooltip":c.withCtx(()=>[UT]),_:1},8,["modelValue","inline","markers"])]))}};var ww="";const BT=["src"],PT={key:3,class:"menu-item-text-wrapper"};var xM=st(c.defineComponent({__name:"DropdownMenuItem",props:{item:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:r=>["none","ellipsis","fit-content"].includes(r)},iconSize:{type:Number,required:!1,default:24}},setup(r){const n=r;return(t,o)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[r.item.iconUrl?(c.openBlock(),c.createElementBlock("img",{key:0,alt:"icon image",class:"icon icon-url",src:r.item.iconUrl},null,8,BT)):c.createCommentVNode("",!0),r.item.iconUrl?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Te,c.mergeProps({key:1,class:"icon"},{...r.item,size:n.iconSize}),null,16)),r.item.subText?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",{key:2,class:c.normalizeClass(["dh-body-2",r.textEllipsisStyle])},c.toDisplayString(r.item.text),3)),r.item.subText?(c.openBlock(),c.createElementBlock("div",PT,[c.createElementVNode("span",{class:c.normalizeClass(["dh-body-1",r.textEllipsisStyle])},c.toDisplayString(r.item.text),3),c.createElementVNode("span",{class:c.normalizeClass(["dh-body-4-medium",r.textEllipsisStyle])},c.toDisplayString(r.item.subText),3)])):c.createCommentVNode("",!0),r.item.isSelected?(c.openBlock(),c.createBlock(Te,{key:4,class:"icon-blue icon-accept","icon-name":"accept",size:16})):c.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-3a3f37c0"]]),zw="";const RT=["data-e2e","onClick"],VT=["onClick"];var ZT=st(c.defineComponent({__name:"DropdownMenu",props:{items:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:r=>["none","ellipsis","fit-content"].includes(r)},iconSize:{type:Number,required:!1,default:24},closeOnClickOutside:{type:Boolean,required:!1,default:!0},zIndex:{type:Number,required:!1,default:100},closeOnItemSelected:{type:Boolean,required:!1,default:!0}},emits:["itemSelected","close"],setup(r,{emit:n}){const t=r;c.onMounted(()=>{document.addEventListener("click",i=>{o(i)})});function o(i){const a=i.target,s=document.querySelector("[data-id='dropdown-menu']");s&&!s.contains(i.target)&&!a.classList.contains("dropdown-toggle")&&t.closeOnClickOutside&&n("close")}function e(i){n("itemSelected",i),t.closeOnItemSelected&&n("close")}return(i,a)=>{const s=c.resolveComponent("router-link");return c.openBlock(),c.createElementBlock("div",{class:"dropdown-menu","data-id":"dropdown-menu",style:c.normalizeStyle({"z-index":t.zIndex})},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.items,l=>(c.openBlock(),c.createElementBlock("div",{key:l.iconName,class:"menu-item","data-e2e":l.dataE2eTag,onClick:u=>e(l)},[l.url?(c.openBlock(),c.createBlock(s,{key:0,class:"center-vertical",to:{path:l.url},onClick:u=>e(l)},{default:c.withCtx(()=>[c.createVNode(xM,{"icon-size":r.iconSize,item:l,"text-ellipsis-style":r.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])]),_:2},1032,["to","onClick"])):(c.openBlock(),c.createElementBlock("div",{key:1,class:"center-vertical",onClick:u=>e(l)},[c.createVNode(xM,{"icon-size":r.iconSize,item:l,"text-ellipsis-style":r.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])],8,VT))],8,RT))),128))],4)}}}),[["__scopeId","data-v-2fa20f7b"]]),Sw="";const WT={key:0,class:"invalid-feedback"},HT=c.defineComponent({__name:"Error",props:{errors:{type:Object,required:!1,default:void 0}},setup(r){const n=r;return(t,o)=>{var e;return c.unref(n).errors&&((e=c.unref(n).errors)==null?void 0:e.length)>0?(c.openBlock(),c.createElementBlock("div",WT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.errors,i=>(c.openBlock(),c.createElementBlock("span",{key:i},c.toDisplayString(i),1))),128))])):c.createCommentVNode("",!0)}}}),FT=c.defineComponent({components:{DhIcon:Te},props:{title:{type:String,default:"Advanced"},isAdvancedSettingsOpen:{type:Boolean,default:!1}},data(){return{isAdvancedSettingsCurrentlyOpen:!1}},watch:{isAdvancedSettingsOpen:function(r){this.isAdvancedSettingsCurrentlyOpen=r}},mounted(){this.isAdvancedSettingsCurrentlyOpen=this.isAdvancedSettingsOpen}}),GT={class:"dh-body-1-medium"},$T=c.createTextVNode(" Content ");function JT(r,n,t,o,e,i){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{class:c.normalizeClass(["advanced-panel-header clickable",{opened:r.isAdvancedSettingsCurrentlyOpen,closed:!r.isAdvancedSettingsCurrentlyOpen}]),"data-e2e":"expansion-panel-button",onClick:n[0]||(n[0]=s=>r.isAdvancedSettingsCurrentlyOpen=!r.isAdvancedSettingsCurrentlyOpen)},[c.createElementVNode("h4",GT,c.toDisplayString(r.title),1),c.createVNode(a,{class:"icon","icon-name":r.isAdvancedSettingsCurrentlyOpen?"arrow-up":"arrow-down",size:24},null,8,["icon-name"])],2),r.isAdvancedSettingsCurrentlyOpen?c.renderSlot(r.$slots,"content",{key:0},()=>[$T]):c.createCommentVNode("",!0)],64)}var XT=st(FT,[["render",JT]]),Cw="";const KT=c.createElementVNode("label",{for:"upload_pdf"},[c.createTextVNode(" Drag and drop file or "),c.createElementVNode("span",{id:"upload"},"browse")],-1),qT={key:1,class:"file__upload_items"},ek={class:"file__upload_list_item"},tk={class:"file__upload_list_item_label"},nk=["title"],rk={key:0,class:"label__antivirus"},ok={key:1,class:"label__antivirus label__antivirus--failed"},ik={key:2,class:"label__antivirus label__antivirus--detected"},ak=c.createElementVNode("br",null,null,-1),sk={key:3},lk={key:4},uk={key:0},ck=["value"],dk=["href"],fk={key:2,class:"file__upload_placeholder"},Mk={key:3,class:"file__upload_action"},gk=c.createElementVNode("button",{class:"file__upload_action_cancel"},"Cancel",-1),hk={__name:"FileUpload",props:{uploadProgress:{type:Array,required:!0},errorOccurred:{type:Array,required:!0},virusCheck:{type:Array,required:!0},modelValue:{type:FileList,required:!1,default:void 0},inline:{type:Boolean,required:!1,default:!1},errorMessage:{type:String,required:!1,default:"an error occurred while uploading"},fileSaved:{type:Boolean,required:!1,default:!1},virusCheckText:{type:String,required:!1,default:"Antivirus check ..."},virusCheckFailedText:{type:String,required:!1,default:"Antivirus check failed"},virusDetectedText:{type:String,required:!1,default:"Virus detected"},deleteConfirmationText:{type:String,required:!1,default:"Are you sure you want to delete it permanently? this action will be irreversible"},zIndex:{type:Number,required:!1,default:99}},emits:["update:modelValue","save:modelValue","reload"],setup(r,{emit:n}){const t=r,o=c.ref(null),e=c.ref(!1),i=c.ref([]),a=c.ref([".pdf",".csv",".doc",".jpeg",".mp4",".png",".txt",".xls"]);function s(D,I=2){if(!+D)return"0 Bytes";const m=1024,T=I<0?0:I,L=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],A=Math.floor(Math.log(D)/Math.log(m));return`${parseFloat((D/Math.pow(m,A)).toFixed(T))} ${L[A]}`}function l(D){return a.value.includes(d(D))?d(D).slice(1):"unknown"}function u(D){const I=D.lastIndexOf(".");let m=D.slice(0,I);return m.length<=15?m:m.slice(0,15)+"... "}function d(D){return D.replace(/.*(?=\.)/g,"")}function f(D){D.stopPropagation(),i.value=o.value.files,i.value&&(e.value=!0),n("update:modelValue",i.value)}function M(D){D.stopPropagation(),D.dataTransfer.dropEffect="copy"}function p(D){D.stopPropagation(),e.value=!0,i.value=D.dataTransfer.files,n("update:modelValue",i.value)}function y(D){window.confirm(t.deleteConfirmationText)&&j(D)}function j(D){const I=new DataTransfer;for(let m=0;m<i.value.length;m++){const T=i.value[m];D!==m&&I.items.add(T)}i.value=I.files,i.value.length==0&&(e.value=!1)}function v(){n("save:modelValue",i.value)}function h(D){return URL.createObjectURL(D)}function N(D){D.preventDefault(),n("reload")}return(D,I)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["file__upload",r.inline?"":"file__upload_box"])},[r.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:"file__upload_btn",onDragover:I[1]||(I[1]=c.withModifiers(m=>M(m),["prevent"])),onDrop:I[2]||(I[2]=c.withModifiers(m=>p(m),["prevent"]))},[c.createVNode(Te,{class:"file__upload_btn_icon","icon-name":"upload",size:24}),KT,c.createElementVNode("input",{id:"upload_pdf",ref_key:"upload",ref:o,multiple:"",name:"file",type:"file",onInput:I[0]||(I[0]=m=>f(m))},null,544)],32)),e.value?(c.openBlock(),c.createElementBlock("div",qT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,(m,T)=>(c.openBlock(),c.createElementBlock("div",{key:T,class:c.normalizeClass(["file__upload_list",r.inline?"":"file__upload_list_box"])},[c.createVNode(Te,{class:c.normalizeClass(r.errorOccurred[T]?"file__upload_list_icon":""),"icon-name":"file-"+l(m.name),size:40},null,8,["class","icon-name"]),t.uploadProgress[T]==100&&r.fileSaved&&!r.errorOccurred[T]&&r.virusCheck[T]=="loading"?(c.openBlock(),c.createBlock(Te,{key:0,class:"file__upload_list_icon_sub file__upload_list_icon_sub--loading","icon-name":"states",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="failed"?(c.openBlock(),c.createBlock(Te,{key:1,class:"file__upload_list_icon_sub","icon-name":"warning",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="detected"?(c.openBlock(),c.createBlock(Te,{key:2,class:"file__upload_list_icon_sub","icon-name":"danger",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),r.fileSaved&&r.errorOccurred[T]?(c.openBlock(),c.createBlock(Te,{key:3,class:"file__upload_list_icon_sub","icon-name":"error",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),c.createElementVNode("div",ek,[c.createElementVNode("div",tk,[c.createElementVNode("div",null,[c.createElementVNode("span",{title:m.name},c.toDisplayString(u(m.name))+c.toDisplayString(d(m.name)),9,nk),t.uploadProgress[T]==100&&r.fileSaved&&!r.errorOccurred[T]&&r.virusCheck[T]=="loading"?(c.openBlock(),c.createElementBlock("span",rk,[c.createTextVNode(c.toDisplayString(r.virusCheckText)+" ",1),c.createVNode(Te,{class:"file__upload_list_icon_sub--loading","icon-name":"processing",size:18})])):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="failed"?(c.openBlock(),c.createElementBlock("span",ok,c.toDisplayString(r.virusCheckFailedText),1)):c.createCommentVNode("",!0),t.uploadProgress[T]==100&&r.fileSaved&&r.virusCheck[T]=="detected"?(c.openBlock(),c.createElementBlock("span",ik,c.toDisplayString(r.virusDetectedText),1)):c.createCommentVNode("",!0),ak,r.fileSaved&&!r.errorOccurred[T]||!r.errorOccurred[T]&&r.virusCheck[T]?(c.openBlock(),c.createElementBlock("span",sk,c.toDisplayString(s(m.size)),1)):c.createCommentVNode("",!0),r.fileSaved&&r.errorOccurred[T]?(c.openBlock(),c.createElementBlock("span",lk,c.toDisplayString(r.errorMessage),1)):c.createCommentVNode("",!0)]),r.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",uk,c.toDisplayString(t.uploadProgress[T])+"%",1))]),r.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("progress",{key:0,id:"file",max:"100",value:t.uploadProgress[T]},c.toDisplayString(t.uploadProgress[T])+"% ",9,ck))]),r.fileSaved&&!r.virusCheck[T]&&!r.errorOccurred[T]?(c.openBlock(),c.createElementBlock("a",{key:4,class:"file__upload_list_download",download:"",href:h(m)},[c.createVNode(Te,{class:"file__upload_list_download_icon","icon-name":"download",size:24})],8,dk)):c.createCommentVNode("",!0),r.fileSaved&&r.errorOccurred[T]?(c.openBlock(),c.createElementBlock("a",{key:5,class:"file__upload_list_retry",onClick:I[3]||(I[3]=L=>N(L))},[c.createVNode(Te,{class:"file__upload_list_retry_icon","icon-name":"retry",size:24})])):c.createCommentVNode("",!0),t.uploadProgress[T]!==100?(c.openBlock(),c.createBlock(Te,{key:6,class:"file__upload_list_delete","icon-name":"close",size:24,onClick:L=>j(T)},null,8,["onClick"])):(c.openBlock(),c.createBlock(Te,{key:7,class:"file__upload_list_delete","icon-name":"delete",size:24,onClick:L=>y(T)},null,8,["onClick"]))],2))),128))])):c.createCommentVNode("",!0),!e.value&&!r.inline?(c.openBlock(),c.createElementBlock("div",fk," No file selected ")):c.createCommentVNode("",!0),!r.inline&&!r.fileSaved?(c.openBlock(),c.createElementBlock("div",Mk,[gk,c.createElementVNode("button",{class:c.normalizeClass(["file__upload_action_done",e.value&&!r.fileSaved?"file__upload_action_done--active":""]),onClick:v}," Done ",2)])):c.createCommentVNode("",!0)],2))}};var Ew="";const pk={class:"input__dropdown"},yk=["placeholder","value"],Nk={class:"input__dropdown_second"},mk=["tabindex"],jk=["onClick"],Ik=["onClick"],vM={__name:"InputDropdown",props:{list:{type:Array,required:!0},labelProp:{type:String,default:"label"},icon:{type:String,required:!0},placeholderInput:{type:String,default:"Enter value"},tabindex:{type:Number,required:!1,default:0},inputValue:{type:String,required:!1,default:""},inputIndex:{type:Number,required:!1,default:0},inputWidth:{type:String,required:!1,default:"75%"}},emits:["update"],setup(r,{emit:n}){const t=r,o=c.ref(t.list[0].label),e=c.ref(!1),i=c.ref(null);c.onMounted(()=>{n("update","",o.value)});function a(){n("update",i.value.value,o.value,t.inputIndex)}return(s,l)=>(c.openBlock(),c.createElementBlock("div",pk,[c.createElementVNode("input",{ref_key:"name",ref:i,class:"input__dropdown_text",placeholder:r.placeholderInput,style:c.normalizeStyle({width:r.inputWidth}),type:"text",value:r.inputValue,onInput:a},null,44,yk),c.createElementVNode("div",Nk,[c.createVNode(Te,{"icon-name":r.icon,size:18},null,8,["icon-name"]),c.createElementVNode("div",{class:"custom__select",tabindex:r.tabindex,onBlur:l[1]||(l[1]=u=>e.value=!1)},[c.createElementVNode("div",{class:c.normalizeClass(["custom__select_selected",{"custom__select--open":e.value}]),onClick:l[0]||(l[0]=u=>e.value=!e.value)},c.toDisplayString(o.value),3),typeof r.list[0]=="object"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["custom__select_items",{"custom__select--hide":!e.value}])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.list,(u,d)=>(c.openBlock(),c.createElementBlock("div",{key:d,onClick:f=>{o.value=u[r.labelProp],e.value=!1,a()}},c.toDisplayString(u[r.labelProp]),9,jk))),128))],2)):c.createCommentVNode("",!0),typeof r.list[0]=="string"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(["custom__select_items",{"custom__select--hide":!e.value}])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.list,(u,d)=>(c.openBlock(),c.createElementBlock("div",{key:d,onClick:f=>{o.value=u,e.value=!1,a()}},c.toDisplayString(u),9,Ik))),128))],2)):c.createCommentVNode("",!0)],40,mk)])]))}};var _w="";const Dk={class:"input-group-multiple"},xk={class:"input-label"},vk={__name:"InputDropdownMultiple",props:{labelProp:{type:String,default:"Label"},icon:{type:String,required:!0},placeholderInput:{type:String,default:"Enter value"},tabindex:{type:Number,required:!1,default:0},inputValue:{type:String,required:!1,default:""},inputIndex:{type:Number,required:!1,default:0},inputWidth:{type:String,required:!1,default:"75%"},multipleProp:{type:Array,required:!0}},emits:["update"],setup(r,{emit:n}){const t=r,o=c.reactive(t.multipleProp);function e(a,s,l){console.log(o),o&&(o.map(u=>{u.id===l&&(u.input=a,u.optionSelected=s)}),n("update",o))}function i(){o&&o.push({id:o.length+1,list:o[0].list,input:null,optionSelected:null})}return(a,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",Dk,[c.createElementVNode("label",xk,c.toDisplayString(r.labelProp),1),c.createElementVNode("button",{class:"btn btn-secondary btn-multiple",onClick:i},[c.createVNode(Te,{"icon-name":"plus",size:24})])]),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o,(l,u)=>(c.openBlock(),c.createBlock(vM,{key:u,icon:t.icon,"input-index":l.id,"input-value":l.id===1?t.inputValue:l.input,"input-width":t.inputWidth,list:l.list,"placeholder-input":t.placeholderInput,tabindex:t.tabindex,onUpdate:e},null,8,["icon","input-index","input-value","input-width","list","placeholder-input","tabindex"]))),128))],64))}};var Qw="";const bk={class:"input__group"},Tk=["type"],kk={__name:"InputGroup",props:{inputType:{type:String,default:"text"},iconName:{type:String,required:!0},widthProp:{type:String,default:"200px"},direction:{type:String,default:"right"}},setup(r){const n=r;c.useCssVars(o=>({"14ee876f":t.value,"0aeebdb8":r.widthProp}));const t=c.ref("row");return c.onMounted(()=>{n.direction=="left"&&(t.value="row-reverse")}),(o,e)=>(c.openBlock(),c.createElementBlock("div",bk,[c.createElementVNode("input",{class:"input__group_field",type:r.inputType},null,8,Tk),c.createVNode(Te,{class:"input__group_icon","icon-name":r.iconName},null,8,["icon-name"])]))}};var Ak="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAR2SURBVHgBlVVdaFtlGH6+LydJ89OYtHVbf+YyhoPK5uK2G3/oIlTYhRctKApebAiCXowtDLzxIi3sUqnBiiBerF6osGl7J0idqWyD4WSZF3PzZ4tt7Y/NmnRN0yYn5/t8z9e0Ne35Wnwg5Jzzvt/7vO/7vT8MO6BnYDEuPP4TXMi4kIgyxqOrElEAZEZKZLhVHhpJBDPb2WE6wcsDZtwwXEkJGd9G7T9WRJqZ+f6RxONprUp9BDIs3CLJJM7tSLAJkg5xIT6EVSTCSEFLdPKT5ai36hqWzBVj8v+R1IFVM8y0ekcSvuwWop6BfFgaoR8kY0RSf04qRUriSh6l/AzcDY3wRtpgmWUSUhSewFYuITMFwV9MJ5iKzFgTCHfITtcWEhvW/H38NfYpViZ+UZ7Jmn920B3dZxDuPLnljOQsFmYiSY8J+53Xook734nE4v1r+P2rBMoTt1VUqzRC/ThFU85P2m7CCYKxc3bVrhNZRjDpdPHmoxnMXBmErFbgDIncza+RuzGE1QTXQ1k0fElF9OpAJcaZK+5kZuHuKCqlAraDbWzmxmWUJm5pXEH89Y8W49w0cNrBGYWlqTvbFvjTna1oigQoLQKP/ryq0eIooSFOxcCP6AxJaWkkDAEfw/uJ52GaJt658D1yhSmdGdJmJ+iOZEyrQaFeOPss9u3xKXUVHlXN8UO78U2qFx0tbuxv9eOzZDepCr0ZGlsGdUFYR3L04C50H4ugt2s/HkwXsVgqoyXUgLbdQeITtgFFEPK58VR7iFKk81dEuU7m5yWkXmtEo98Ao0jeS12FWeVo3+WnZhT48edJvNl3RTkU8nN8fKoJAWNJE5HdsJJl6SG6WVZhbsyZfuxVlSLwwbtd2NMcUM/2wReOP4Enoy2rVuhbQTRhpep25pGiwBmvZJ2EVcuD8/fewGwloIy1NftUdUlqUkn7glPKWpsblO7flTDO330FFjyORKSd4bBcY9CCYboUXFe3S9UmYmuvNeTJGRrEziTM1q/eJieLaWhAnuDbiQO12cZgLa0Ay1UI+7eyUfqjMwehWymMHHNXqxc57Y003W5aR3YrfwCXsp3KkCvgAfd7wX3073PRLAOGxztxbWqfrudtpC/R9uWrrGa/1KjS6MSXfxzFFxNdsJhXxUmOQbj8+Py35zB07xilh2kyAoom328/K6KRM740mUxtHoz2fRTmBKYfMMxXaP+wCMzcAsyHCyQLomRElayQs+y1tAVUAKnLtdW+3ke8avSRILNGZpPMjlsozlMBUI6u36Ebaz8M+OjiPUHwvc9g9KeyWkqLD13ITdpkG9OBPmcQNPrW3uti7hlYjkq3Z5iSH8vPEslCfSV1Ha7g1EucSt/Exe8krv/qrzMQeMxCUyu3d1WGutt5lW+QyXDZLPf9M26cldAODkfY99zSUU4FvL6+kdoK1xKt4dDbc3G3EUmSQhw7EDLqFSFZmvZtf2bQvm8HHeyA2FvFGPd6TlN0R0iZJj0Lq2NSZiWsLGNsjKOYvjlIbbIN/gUK8Nn86IrnuAAAAABJRU5ErkJggg==";function $t(r){return[null,void 0].indexOf(r)!==-1}function wk(r,n,t){const{object:o,valueProp:e,mode:i}=c.toRefs(r),a=c.getCurrentInstance().proxy,s=t.iv,l=f=>{s.value=d(f);const M=u(f);n.emit("change",M,a),n.emit("input",M),n.emit("update:modelValue",M)},u=f=>o.value||$t(f)?f:Array.isArray(f)?f.map(M=>M[e.value]):f[e.value],d=f=>$t(f)?i.value==="single"?{}:[]:f;return{update:l}}function Lk(r,n){const{value:t,modelValue:o,mode:e,valueProp:i}=c.toRefs(r),a=c.ref(e.value!=="single"?[]:{}),s=o&&o.value!==void 0?o:t,l=c.computed(()=>e.value==="single"?a.value[i.value]:a.value.map(d=>d[i.value])),u=c.computed(()=>e.value!=="single"?a.value.map(d=>d[i.value]).join(","):a.value[i.value]);return{iv:a,internalValue:a,ev:s,externalValue:s,textValue:u,plainValue:l}}function zk(r,n,t){const{regex:o}=c.toRefs(r),e=c.getCurrentInstance().proxy,i=t.isOpen,a=t.open,s=c.ref(null),l=c.ref(null),u=()=>{s.value=""},d=p=>{s.value=p.target.value},f=p=>{if(o&&o.value){let y=o.value;typeof y=="string"&&(y=new RegExp(y)),p.key.match(y)||p.preventDefault()}},M=p=>{if(o&&o.value){let j=(p.clipboardData||window.clipboardData).getData("Text"),v=o.value;typeof v=="string"&&(v=new RegExp(v)),j.split("").every(h=>!!h.match(v))||p.preventDefault()}n.emit("paste",p,e)};return c.watch(s,p=>{!i.value&&p&&a(),n.emit("search-change",p,e)}),{search:s,input:l,clearSearch:u,handleSearchInput:d,handleKeypress:f,handlePaste:M}}function Ok(r,n,t){const{groupSelect:o,mode:e,groups:i,disabledProp:a}=c.toRefs(r),s=c.ref(null),l=d=>{d===void 0||d!==null&&d[a.value]||i.value&&d&&d.group&&(e.value==="single"||!o.value)||(s.value=d)};return{pointer:s,setPointer:l,clearPointer:()=>{l(null)}}}function ta(r,n=!0){return n?String(r).toLowerCase().trim():String(r).normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase().trim()}function Sk(r){return Object.prototype.toString.call(r)==="[object Object]"}function Ck(r,n){const t=n.slice().sort();return r.length===n.length&&r.slice().sort().every(function(o,e){return o===t[e]})}function Ek(r,n,t){const{options:o,mode:e,trackBy:i,limit:a,hideSelected:s,createTag:l,createOption:u,label:d,appendNewTag:f,appendNewOption:M,multipleLabel:p,object:y,loading:j,delay:v,resolveOnLoad:h,minChars:N,filterResults:D,clearOnSearch:I,clearOnSelect:m,valueProp:T,canDeselect:L,max:A,strict:z,closeOnSelect:S,groups:b,reverse:g,infinite:x,groupOptions:k,groupHideEmpty:w,groupSelect:C,onCreate:E,disabledProp:O,searchStart:_}=c.toRefs(r),Y=c.getCurrentInstance().proxy,U=t.iv,Q=t.ev,B=t.search,V=t.clearSearch,P=t.update,R=t.pointer,W=t.clearPointer,H=t.focus,G=t.deactivate,X=t.close,ie=c.ref([]),ee=c.ref([]),ae=c.ref(!1),Me=c.ref(null),Z=c.ref(x.value&&a.value===-1?10:a.value),q=c.computed(()=>l.value||u.value||!1),ce=c.computed(()=>f.value!==void 0?f.value:M.value!==void 0?M.value:!0),ue=c.computed(()=>{if(b.value){let $=ee.value||[],se=[];return $.forEach(je=>{Nt(je[k.value]).forEach(ne=>{se.push(Object.assign({},ne,je[O.value]?{[O.value]:!0}:{}))})}),se}else{let $=Nt(ee.value||[]);return ie.value.length&&($=$.concat(ie.value)),$}}),Ne=c.computed(()=>b.value?De((ee.value||[]).map(($,se)=>{const je=Nt($[k.value]);return{...$,index:se,group:!0,[k.value]:Bt(je,!1).map(ne=>Object.assign({},ne,$[O.value]?{[O.value]:!0}:{})),__VISIBLE__:Bt(je).map(ne=>Object.assign({},ne,$[O.value]?{[O.value]:!0}:{}))}})):[]),Oe=c.computed(()=>{let $=ue.value;return g.value&&($=$.reverse()),te.value.length&&($=te.value.concat($)),Bt($)}),be=c.computed(()=>{let $=Oe.value;return Z.value>0&&($=$.slice(0,Z.value)),$}),F=c.computed(()=>{switch(e.value){case"single":return!$t(U.value[T.value]);case"multiple":case"tags":return!$t(U.value)&&U.value.length>0}}),K=c.computed(()=>p!==void 0&&p.value!==void 0?p.value(U.value,Y):U.value&&U.value.length>1?`${U.value.length} options selected`:"1 option selected"),re=c.computed(()=>!ue.value.length&&!ae.value&&!te.value.length),le=c.computed(()=>ue.value.length>0&&be.value.length==0&&(B.value&&b.value||!b.value)),te=c.computed(()=>q.value===!1||!B.value?[]:pe(B.value)!==-1?[]:[{[T.value]:B.value,[d.value]:B.value,[oe.value]:B.value,__CREATE__:!0}]),oe=c.computed(()=>i.value||d.value),Ie=c.computed(()=>{switch(e.value){case"single":return null;case"multiple":case"tags":return[]}}),Qe=c.computed(()=>j.value||ae.value),Se=$=>{switch(typeof $!="object"&&($=J($)),e.value){case"single":P($);break;case"multiple":case"tags":P(U.value.concat($));break}n.emit("select",it($),$,Y)},tt=$=>{switch(typeof $!="object"&&($=J($)),e.value){case"single":Ut();break;case"tags":case"multiple":P(Array.isArray($)?U.value.filter(se=>$.map(je=>je[T.value]).indexOf(se[T.value])===-1):U.value.filter(se=>se[T.value]!=$[T.value]));break}n.emit("deselect",it($),$,Y)},it=$=>y.value?$:$[T.value],Jt=$=>{tt($)},ln=($,se)=>{if(se.button!==0){se.preventDefault();return}Jt($)},Ut=()=>{n.emit("clear",Y),P(Ie.value)},gt=$=>{if($.group!==void 0)return e.value==="single"?!1:Ue($[k.value])&&$[k.value].length;switch(e.value){case"single":return!$t(U.value)&&U.value[T.value]==$[T.value];case"tags":case"multiple":return!$t(U.value)&&U.value.map(se=>se[T.value]).indexOf($[T.value])!==-1}},ut=$=>$[O.value]===!0,Xt=()=>A===void 0||A.value===-1||!F.value&&A.value>0?!1:U.value.length>=A.value,Tt=$=>{if(!ut($)){if(E&&E.value&&!gt($)&&$.__CREATE__&&($={...$},delete $.__CREATE__,$=E.value($,Y),$ instanceof Promise)){ae.value=!0,$.then(se=>{ae.value=!1,bn(se)});return}bn($)}},bn=$=>{switch($.__CREATE__&&($={...$},delete $.__CREATE__),e.value){case"single":if($&&gt($)){L.value&&tt($);return}$&&kt($),m.value&&V(),S.value&&(W(),X()),$&&Se($);break;case"multiple":if($&&gt($)){tt($);return}if(Xt())return;$&&(kt($),Se($)),m.value&&V(),s.value&&W(),S.value&&X();break;case"tags":if($&&gt($)){tt($);return}if(Xt())return;$&&kt($),m.value&&V(),$&&Se($),s.value&&W(),S.value&&X();break}S.value||H()},Vn=$=>{if(!(ut($)||e.value==="single"||!C.value)){switch(e.value){case"multiple":case"tags":Yt($[k.value])?tt($[k.value]):Se($[k.value].filter(se=>U.value.map(je=>je[T.value]).indexOf(se[T.value])===-1).filter(se=>!se[O.value]).filter((se,je)=>U.value.length+1+je<=A.value||A.value===-1));break}S.value&&G()}},kt=$=>{J($[T.value])===void 0&&q.value&&(n.emit("tag",$[T.value],Y),n.emit("option",$[T.value],Y),ce.value&&me($),V())},Tn=()=>{e.value!=="single"&&Se(be.value)},Yt=$=>$.find(se=>!gt(se)&&!se[O.value])===void 0,Ue=$=>$.find(se=>!gt(se))===void 0,J=$=>ue.value[ue.value.map(se=>String(se[T.value])).indexOf(String($))],pe=($,se=!0)=>ue.value.map(je=>parseInt(je[oe.value])==je[oe.value]?parseInt(je[oe.value]):je[oe.value]).indexOf(parseInt($)==$?parseInt($):$),ge=$=>["tags","multiple"].indexOf(e.value)!==-1&&s.value&&gt($),me=$=>{ie.value.push($)},De=$=>w.value?$.filter(se=>B.value?se.__VISIBLE__.length:se[k.value].length):$.filter(se=>B.value?se.__VISIBLE__.length:!0),Bt=($,se=!0)=>{let je=$;return B.value&&D.value&&(je=je.filter(ne=>_.value?ta(ne[oe.value],z.value).startsWith(ta(B.value,z.value)):ta(ne[oe.value],z.value).indexOf(ta(B.value,z.value))!==-1)),s.value&&se&&(je=je.filter(ne=>!ge(ne))),je},Nt=$=>{let se=$;return Sk(se)&&(se=Object.keys(se).map(je=>{let ne=se[je];return{[T.value]:je,[oe.value]:ne,[d.value]:ne}})),se=se.map(je=>typeof je=="object"?je:{[T.value]:je,[oe.value]:je,[d.value]:je}),se},Kt=()=>{$t(Q.value)||(U.value=cn(Q.value))},qt=$=>(ae.value=!0,new Promise((se,je)=>{o.value(B.value,Y).then(ne=>{ee.value=ne||[],typeof $=="function"&&$(ne),ae.value=!1}).catch(ne=>{console.error(ne),ee.value=[],ae.value=!1}).finally(()=>{se()})})),un=()=>{if(!!F.value)if(e.value==="single"){let $=J(U.value[T.value]);if($!==void 0){let se=$[d.value];U.value[d.value]=se,y.value&&(Q.value[d.value]=se)}}else U.value.forEach(($,se)=>{let je=J(U.value[se][T.value]);if(je!==void 0){let ne=je[d.value];U.value[se][d.value]=ne,y.value&&(Q.value[se][d.value]=ne)}})},Zn=$=>{qt($)},cn=$=>$t($)?e.value==="single"?{}:[]:y.value?$:e.value==="single"?J($)||{}:$.filter(se=>!!J(se)).map(se=>J(se)),Cr=()=>{Me.value=c.watch(B,$=>{$.length<N.value||!$&&N.value!==0||(ae.value=!0,I.value&&(ee.value=[]),setTimeout(()=>{$==B.value&&o.value(B.value,Y).then(se=>{($==B.value||!B.value)&&(ee.value=se,R.value=be.value.filter(je=>je[O.value]!==!0)[0]||null,ae.value=!1)}).catch(se=>{console.error(se)})},v.value))},{flush:"sync"})};if(e.value!=="single"&&!$t(Q.value)&&!Array.isArray(Q.value))throw new Error(`v-model must be an array when using "${e.value}" mode`);return o&&typeof o.value=="function"?h.value?qt(Kt):y.value==!0&&Kt():(ee.value=o.value,Kt()),v.value>-1&&Cr(),c.watch(v,($,se)=>{Me.value&&Me.value(),$>=0&&Cr()}),c.watch(Q,$=>{if($t($)){U.value=cn($);return}switch(e.value){case"single":(y.value?$[T.value]!=U.value[T.value]:$!=U.value[T.value])&&(U.value=cn($));break;case"multiple":case"tags":Ck(y.value?$.map(se=>se[T.value]):$,U.value.map(se=>se[T.value]))||(U.value=cn($));break}},{deep:!0}),c.watch(o,($,se)=>{typeof r.options=="function"?h.value&&(!se||$&&$.toString()!==se.toString())&&qt():(ee.value=r.options,Object.keys(U.value).length||Kt(),un())}),c.watch(d,un),{pfo:Oe,fo:be,filteredOptions:be,hasSelected:F,multipleLabelText:K,eo:ue,extendedOptions:ue,fg:Ne,filteredGroups:Ne,noOptions:re,noResults:le,resolving:ae,busy:Qe,offset:Z,select:Se,deselect:tt,remove:Jt,selectAll:Tn,clear:Ut,isSelected:gt,isDisabled:ut,isMax:Xt,getOption:J,handleOptionClick:Tt,handleGroupClick:Vn,handleTagRemove:ln,refreshOptions:Zn,resolveOptions:qt,refreshLabels:un}}function _k(r,n,t){const{valueProp:o,showOptions:e,searchable:i,groupLabel:a,groups:s,mode:l,groupSelect:u,disabledProp:d}=c.toRefs(r),f=t.fo,M=t.fg,p=t.handleOptionClick,y=t.handleGroupClick,j=t.search,v=t.pointer,h=t.setPointer,N=t.clearPointer,D=t.multiselect,I=t.isOpen,m=c.computed(()=>f.value.filter(P=>!P[d.value])),T=c.computed(()=>M.value.filter(P=>!P[d.value])),L=c.computed(()=>l.value!=="single"&&u.value),A=c.computed(()=>v.value&&v.value.group),z=c.computed(()=>B(v.value)),S=c.computed(()=>{const P=A.value?v.value:B(v.value),R=T.value.map(H=>H[a.value]).indexOf(P[a.value]);let W=T.value[R-1];return W===void 0&&(W=g.value),W}),b=c.computed(()=>{let P=T.value.map(R=>R.label).indexOf(A.value?v.value[a.value]:B(v.value)[a.value])+1;return T.value.length<=P&&(P=0),T.value[P]}),g=c.computed(()=>[...T.value].slice(-1)[0]),x=c.computed(()=>v.value.__VISIBLE__.filter(P=>!P[d.value])[0]),k=c.computed(()=>{const P=z.value.__VISIBLE__.filter(R=>!R[d.value]);return P[P.map(R=>R[o.value]).indexOf(v.value[o.value])-1]}),w=c.computed(()=>{const P=B(v.value).__VISIBLE__.filter(R=>!R[d.value]);return P[P.map(R=>R[o.value]).indexOf(v.value[o.value])+1]}),C=c.computed(()=>[...S.value.__VISIBLE__.filter(P=>!P[d.value])].slice(-1)[0]),E=c.computed(()=>[...g.value.__VISIBLE__.filter(P=>!P[d.value])].slice(-1)[0]),O=P=>!!v.value&&(!P.group&&v.value[o.value]==P[o.value]||P.group!==void 0&&v.value[a.value]==P[a.value])?!0:void 0,_=()=>{h(m.value[0]||null)},Y=()=>{!v.value||v.value[d.value]===!0||(A.value?y(v.value):p(v.value))},U=()=>{if(v.value===null)h((s.value&&L.value?T.value[0]:m.value[0])||null);else if(s.value&&L.value){let P=A.value?x.value:w.value;P===void 0&&(P=b.value),h(P||null)}else{let P=m.value.map(R=>R[o.value]).indexOf(v.value[o.value])+1;m.value.length<=P&&(P=0),h(m.value[P]||null)}c.nextTick(()=>{V()})},Q=()=>{if(v.value===null){let P=m.value[m.value.length-1];s.value&&L.value&&(P=E.value,P===void 0&&(P=g.value)),h(P||null)}else if(s.value&&L.value){let P=A.value?C.value:k.value;P===void 0&&(P=A.value?S.value:z.value),h(P||null)}else{let P=m.value.map(R=>R[o.value]).indexOf(v.value[o.value])-1;P<0&&(P=m.value.length-1),h(m.value[P]||null)}c.nextTick(()=>{V()})},B=P=>T.value.find(R=>R.__VISIBLE__.map(W=>W[o.value]).indexOf(P[o.value])!==-1),V=()=>{let P=D.value.querySelector("[data-pointed]");if(!P)return;let R=P.parentElement.parentElement;s.value&&(R=A.value?P.parentElement.parentElement.parentElement:P.parentElement.parentElement.parentElement.parentElement),P.offsetTop+P.offsetHeight>R.clientHeight+R.scrollTop&&(R.scrollTop=P.offsetTop+P.offsetHeight-R.clientHeight),P.offsetTop<R.scrollTop&&(R.scrollTop=P.offsetTop)};return c.watch(j,P=>{i.value&&(P.length&&e.value?_():N())}),c.watch(I,P=>{if(P){let R=D.value.querySelectorAll("[data-selected]")[0];if(!R)return;let W=R.parentElement.parentElement;c.nextTick(()=>{W.scrollTop>0||(W.scrollTop=R.offsetTop)})}}),{pointer:v,canPointGroups:L,isPointed:O,setPointerFirst:_,selectPointer:Y,forwardPointer:U,backwardPointer:Q}}function Qk(r,n,t){const{disabled:o}=c.toRefs(r),e=c.getCurrentInstance().proxy,i=c.ref(!1);return{isOpen:i,open:()=>{i.value||o.value||(i.value=!0,n.emit("open",e))},close:()=>{!i.value||(i.value=!1,n.emit("close",e))}}}function Uk(r,n,t){const{searchable:o,disabled:e}=c.toRefs(r),i=t.input,a=t.open,s=t.close,l=t.clearSearch,u=t.isOpen,d=c.ref(null),f=c.ref(null),M=c.ref(null),p=c.ref(!1),y=c.ref(!1),j=c.computed(()=>o.value||e.value?-1:0),v=()=>{o.value&&i.value.blur(),f.value.blur()},h=()=>{o.value&&!e.value&&i.value.focus()},N=(A=!0)=>{e.value||(p.value=!0,A&&a())},D=()=>{p.value=!1,setTimeout(()=>{p.value||(s(),l())},1)};return{multiselect:d,wrapper:f,tags:M,tabindex:j,isActive:p,mouseClicked:y,blur:v,focus:h,activate:N,deactivate:D,handleFocusIn:A=>{A.target.closest("[data-tags]")||A.target.closest("[data-clear]")||N(y.value)},handleFocusOut:()=>{D()},handleCaretClick:()=>{D(),v()},handleMousedown:A=>{y.value=!0,u.value&&(A.target.isEqualNode(f.value)||A.target.isEqualNode(M.value))?setTimeout(()=>{D()},0):document.activeElement.isEqualNode(f.value)&&!u.value&&(console.log(A.target.closest("[data-tags]")),N()),setTimeout(()=>{y.value=!1},0)}}}function Yk(r,n,t){const{mode:o,addTagOn:e,openDirection:i,searchable:a,showOptions:s,valueProp:l,groups:u,addOptionOn:d,createTag:f,createOption:M,reverse:p}=c.toRefs(r),y=c.getCurrentInstance().proxy,j=t.iv,v=t.update,h=t.search,N=t.setPointer,D=t.selectPointer,I=t.backwardPointer,m=t.forwardPointer,T=t.multiselect,L=t.wrapper,A=t.tags,z=t.isOpen,S=t.open,b=t.blur,g=t.fo,x=c.computed(()=>f.value||M.value||!1),k=c.computed(()=>e.value!==void 0?e.value:d.value!==void 0?d.value:["enter"]),w=()=>{o.value==="tags"&&!s.value&&x.value&&a.value&&!u.value&&N(g.value[g.value.map(O=>O[l.value]).indexOf(h.value)])};return{handleKeydown:O=>{n.emit("keydown",O,y);let _,Y;switch(["ArrowLeft","ArrowRight","Enter"].indexOf(O.key)!==-1&&o.value==="tags"&&(_=[...T.value.querySelectorAll("[data-tags] > *")].filter(U=>U!==A.value),Y=_.findIndex(U=>U===document.activeElement)),O.key){case"Backspace":if(o.value==="single"||a.value&&[null,""].indexOf(h.value)===-1||j.value.length===0)return;v([...j.value].slice(0,-1));break;case"Enter":if(O.preventDefault(),O.keyCode===229)return;if(Y!==-1&&Y!==void 0){v([...j.value].filter((U,Q)=>Q!==Y)),Y===_.length-1&&(_.length-1?_[_.length-2].focus():a.value?A.value.querySelector("input").focus():L.value.focus());return}if(k.value.indexOf("enter")===-1&&x.value)return;w(),D();break;case" ":if(!x.value&&!a.value){O.preventDefault(),w(),D();return}if(!x.value)return!1;if(k.value.indexOf("space")===-1&&x.value)return;O.preventDefault(),w(),D();break;case"Tab":case";":case",":if(k.value.indexOf(O.key.toLowerCase())===-1||!x.value)return;w(),D(),O.preventDefault();break;case"Escape":b();break;case"ArrowUp":if(O.preventDefault(),!s.value)return;z.value||S(),I();break;case"ArrowDown":if(O.preventDefault(),!s.value)return;z.value||S(),m();break;case"ArrowLeft":if(a.value&&A.value&&A.value.querySelector("input").selectionStart||O.shiftKey||o.value!=="tags"||!j.value||!j.value.length)return;O.preventDefault(),Y===-1?_[_.length-1].focus():Y>0&&_[Y-1].focus();break;case"ArrowRight":if(Y===-1||O.shiftKey||o.value!=="tags"||!j.value||!j.value.length)return;O.preventDefault(),_.length>Y+1?_[Y+1].focus():a.value?A.value.querySelector("input").focus():a.value||L.value.focus();break}},handleKeyup:O=>{n.emit("keyup",O,y)},preparePointer:w}}function Bk(r,n,t){const{classes:o,disabled:e,openDirection:i,showOptions:a}=c.toRefs(r),s=t.isOpen,l=t.isPointed,u=t.isSelected,d=t.isDisabled,f=t.isActive,M=t.canPointGroups,p=t.resolving,y=t.fo,j=c.computed(()=>({container:"multiselect",containerDisabled:"is-disabled",containerOpen:"is-open",containerOpenTop:"is-open-top",containerActive:"is-active",wrapper:"multiselect-wrapper",singleLabel:"multiselect-single-label",singleLabelText:"multiselect-single-label-text",multipleLabel:"multiselect-multiple-label",search:"multiselect-search",tags:"multiselect-tags",tag:"multiselect-tag",tagDisabled:"is-disabled",tagRemove:"multiselect-tag-remove",tagRemoveIcon:"multiselect-tag-remove-icon",tagsSearchWrapper:"multiselect-tags-search-wrapper",tagsSearch:"multiselect-tags-search",tagsSearchCopy:"multiselect-tags-search-copy",placeholder:"multiselect-placeholder",caret:"multiselect-caret",caretOpen:"is-open",clear:"multiselect-clear",clearIcon:"multiselect-clear-icon",spinner:"multiselect-spinner",inifinite:"multiselect-inifite",inifiniteSpinner:"multiselect-inifite-spinner",dropdown:"multiselect-dropdown",dropdownTop:"is-top",dropdownHidden:"is-hidden",options:"multiselect-options",optionsTop:"is-top",group:"multiselect-group",groupLabel:"multiselect-group-label",groupLabelPointable:"is-pointable",groupLabelPointed:"is-pointed",groupLabelSelected:"is-selected",groupLabelDisabled:"is-disabled",groupLabelSelectedPointed:"is-selected is-pointed",groupLabelSelectedDisabled:"is-selected is-disabled",groupOptions:"multiselect-group-options",option:"multiselect-option",optionPointed:"is-pointed",optionSelected:"is-selected",optionDisabled:"is-disabled",optionSelectedPointed:"is-selected is-pointed",optionSelectedDisabled:"is-selected is-disabled",noOptions:"multiselect-no-options",noResults:"multiselect-no-results",fakeInput:"multiselect-fake-input",assist:"multiselect-assistive-text",spacer:"multiselect-spacer",...o.value})),v=c.computed(()=>!!(s.value&&a.value&&(!p.value||p.value&&y.value.length)));return{classList:c.computed(()=>{const N=j.value;return{container:[N.container].concat(e.value?N.containerDisabled:[]).concat(v.value&&i.value==="top"?N.containerOpenTop:[]).concat(v.value&&i.value!=="top"?N.containerOpen:[]).concat(f.value?N.containerActive:[]),wrapper:N.wrapper,spacer:N.spacer,singleLabel:N.singleLabel,singleLabelText:N.singleLabelText,multipleLabel:N.multipleLabel,search:N.search,tags:N.tags,tag:[N.tag].concat(e.value?N.tagDisabled:[]),tagRemove:N.tagRemove,tagRemoveIcon:N.tagRemoveIcon,tagsSearchWrapper:N.tagsSearchWrapper,tagsSearch:N.tagsSearch,tagsSearchCopy:N.tagsSearchCopy,placeholder:N.placeholder,caret:[N.caret].concat(s.value?N.caretOpen:[]),clear:N.clear,clearIcon:N.clearIcon,spinner:N.spinner,inifinite:N.inifinite,inifiniteSpinner:N.inifiniteSpinner,dropdown:[N.dropdown].concat(i.value==="top"?N.dropdownTop:[]).concat(!s.value||!a.value||!v.value?N.dropdownHidden:[]),options:[N.options].concat(i.value==="top"?N.optionsTop:[]),group:N.group,groupLabel:D=>{let I=[N.groupLabel];return l(D)?I.push(u(D)?N.groupLabelSelectedPointed:N.groupLabelPointed):u(D)&&M.value?I.push(d(D)?N.groupLabelSelectedDisabled:N.groupLabelSelected):d(D)&&I.push(N.groupLabelDisabled),M.value&&I.push(N.groupLabelPointable),I},groupOptions:N.groupOptions,option:(D,I)=>{let m=[N.option];return l(D)?m.push(u(D)?N.optionSelectedPointed:N.optionPointed):u(D)?m.push(d(D)?N.optionSelectedDisabled:N.optionSelected):(d(D)||I&&d(I))&&m.push(N.optionDisabled),m},noOptions:N.noOptions,noResults:N.noResults,assist:N.assist,fakeInput:N.fakeInput}}),showDropdown:v}}function Pk(r,n,t){const{limit:o,infinite:e}=c.toRefs(r),i=t.isOpen,a=t.offset,s=t.search,l=t.pfo,u=t.eo,d=c.ref(null),f=c.ref(null),M=c.computed(()=>a.value<l.value.length),p=j=>{const{isIntersecting:v,target:h}=j[0];if(v){const N=h.offsetParent,D=N.scrollTop;a.value+=o.value==-1?10:o.value,c.nextTick(()=>{N.scrollTop=D})}},y=()=>{i.value&&a.value<l.value.length?d.value.observe(f.value):!i.value&&d.value&&d.value.disconnect()};return c.watch(i,()=>{!e.value||y()}),c.watch(s,()=>{!e.value||(a.value=o.value,y())},{flush:"post"}),c.watch(u,()=>{!e.value||y()},{immediate:!1,flush:"post"}),c.onMounted(()=>{window&&window.IntersectionObserver&&(d.value=new IntersectionObserver(p))}),{hasMore:M,infiniteLoader:f}}function Rk(r,n,t){const{placeholder:o,id:e,valueProp:i,label:a,mode:s,groupLabel:l,aria:u,searchable:d}=c.toRefs(r),f=t.pointer,M=t.iv,p=t.hasSelected,y=t.multipleLabelText,j=c.ref(null),v=c.computed(()=>{let g=[];return e&&e.value&&g.push(e.value),g.push("assist"),g.join("-")}),h=c.computed(()=>{let g=[];return e&&e.value&&g.push(e.value),g.push("multiselect-options"),g.join("-")}),N=c.computed(()=>{let g=[];if(e&&e.value&&g.push(e.value),f.value)return g.push(f.value.group?"multiselect-group":"multiselect-option"),g.push(f.value.group?f.value.index:f.value[i.value]),g.join("-")}),D=c.computed(()=>o.value),I=c.computed(()=>s.value!=="single"),m=c.computed(()=>{let g="";return s.value==="single"&&p.value&&(g+=M.value[a.value]),s.value==="multiple"&&p.value&&(g+=y.value),s.value==="tags"&&p.value&&(g+=M.value.map(x=>x[a.value]).join(", ")),g}),T=c.computed(()=>{let g={...u.value};return d.value&&(g["aria-labelledby"]=g["aria-labelledby"]?`${v.value} ${g["aria-labelledby"]}`:v.value,m.value&&g["aria-label"]&&(g["aria-label"]=`${m.value}, ${g["aria-label"]}`)),g}),L=g=>{let x=[];return e&&e.value&&x.push(e.value),x.push("multiselect-option"),x.push(g[i.value]),x.join("-")},A=g=>{let x=[];return e&&e.value&&x.push(e.value),x.push("multiselect-group"),x.push(g.index),x.join("-")},z=g=>{let x=[];return x.push(g[a.value]),x.join(" ")},S=g=>{let x=[];return x.push(g[l.value]),x.join(" ")},b=g=>`${g} \u274E`;return c.onMounted(()=>{if(e&&e.value&&document&&document.querySelector){let g=document.querySelector(`[for="${e.value}"]`);j.value=g?g.innerText:null}}),{arias:T,ariaLabel:m,ariaAssist:v,ariaControls:h,ariaPlaceholder:D,ariaMultiselectable:I,ariaActiveDescendant:N,ariaOptionId:L,ariaOptionLabel:z,ariaGroupId:A,ariaGroupLabel:S,ariaTagLabel:b}}function Vk(r,n,t,o={}){return t.forEach(e=>{e&&(o={...o,...e(r,n,o)})}),o}var Vl={name:"Multiselect",emits:["paste","open","close","select","deselect","input","search-change","tag","option","update:modelValue","change","clear","keydown","keyup"],props:{value:{required:!1},modelValue:{required:!1},options:{type:[Array,Object,Function],required:!1,default:()=>[]},id:{type:[String,Number],required:!1},name:{type:[String,Number],required:!1,default:"multiselect"},disabled:{type:Boolean,required:!1,default:!1},label:{type:String,required:!1,default:"label"},trackBy:{type:String,required:!1,default:void 0},valueProp:{type:String,required:!1,default:"value"},placeholder:{type:String,required:!1,default:null},mode:{type:String,required:!1,default:"single"},searchable:{type:Boolean,required:!1,default:!1},limit:{type:Number,required:!1,default:-1},hideSelected:{type:Boolean,required:!1,default:!0},createTag:{type:Boolean,required:!1,default:void 0},createOption:{type:Boolean,required:!1,default:void 0},appendNewTag:{type:Boolean,required:!1,default:void 0},appendNewOption:{type:Boolean,required:!1,default:void 0},addTagOn:{type:Array,required:!1,default:void 0},addOptionOn:{type:Array,required:!1,default:void 0},caret:{type:Boolean,required:!1,default:!0},loading:{type:Boolean,required:!1,default:!1},noOptionsText:{type:String,required:!1,default:"The list is empty"},noResultsText:{type:String,required:!1,default:"No results found"},multipleLabel:{type:Function,required:!1},object:{type:Boolean,required:!1,default:!1},delay:{type:Number,required:!1,default:-1},minChars:{type:Number,required:!1,default:0},resolveOnLoad:{type:Boolean,required:!1,default:!0},filterResults:{type:Boolean,required:!1,default:!0},clearOnSearch:{type:Boolean,required:!1,default:!1},clearOnSelect:{type:Boolean,required:!1,default:!0},canDeselect:{type:Boolean,required:!1,default:!0},canClear:{type:Boolean,required:!1,default:!0},max:{type:Number,required:!1,default:-1},showOptions:{type:Boolean,required:!1,default:!0},required:{type:Boolean,required:!1,default:!1},openDirection:{type:String,required:!1,default:"bottom"},nativeSupport:{type:Boolean,required:!1,default:!1},classes:{type:Object,required:!1,default:()=>({})},strict:{type:Boolean,required:!1,default:!0},closeOnSelect:{type:Boolean,required:!1,default:!0},autocomplete:{type:String,required:!1},groups:{type:Boolean,required:!1,default:!1},groupLabel:{type:String,required:!1,default:"label"},groupOptions:{type:String,required:!1,default:"options"},groupHideEmpty:{type:Boolean,required:!1,default:!1},groupSelect:{type:Boolean,required:!1,default:!0},inputType:{type:String,required:!1,default:"text"},attrs:{required:!1,type:Object,default:()=>({})},onCreate:{required:!1,type:Function},disabledProp:{type:String,required:!1,default:"disabled"},searchStart:{type:Boolean,required:!1,default:!1},reverse:{type:Boolean,required:!1,default:!1},regex:{type:[Object,String,RegExp],required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},infinite:{type:Boolean,required:!1,default:!1},aria:{required:!1,type:Object,default:()=>({})}},setup(r,n){return Vk(r,n,[Lk,Ok,Qk,zk,wk,Uk,Ek,Pk,_k,Yk,Bk,Rk])}};const Zk=["id","dir"],Wk=["tabindex","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable","role"],Hk=["type","modelValue","value","autocomplete","id","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],Fk=["onKeyup","aria-label"],Gk=["onClick"],$k=["type","modelValue","value","id","autocomplete","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],Jk=["innerHTML"],Xk=["id"],Kk=["id","aria-label","aria-selected"],qk=["data-pointed","onMouseenter","onClick"],eA=["innerHTML"],tA=["aria-label"],nA=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],rA=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],oA=["innerHTML"],iA=["innerHTML"],aA=["value"],sA=["name","value"],lA=["name","value"],uA=["id"];function cA(r,n,t,o,e,i){return c.openBlock(),c.createElementBlock("div",{ref:"multiselect",class:c.normalizeClass(r.classList.container),id:t.searchable?void 0:t.id,dir:t.rtl?"rtl":void 0,onFocusin:n[10]||(n[10]=(...a)=>r.handleFocusIn&&r.handleFocusIn(...a)),onFocusout:n[11]||(n[11]=(...a)=>r.handleFocusOut&&r.handleFocusOut(...a)),onKeyup:n[12]||(n[12]=(...a)=>r.handleKeyup&&r.handleKeyup(...a)),onKeydown:n[13]||(n[13]=(...a)=>r.handleKeydown&&r.handleKeydown(...a))},[c.createElementVNode("div",c.mergeProps({class:r.classList.wrapper,onMousedown:n[9]||(n[9]=(...a)=>r.handleMousedown&&r.handleMousedown(...a)),ref:"wrapper",tabindex:r.tabindex,"aria-controls":t.searchable?void 0:r.ariaControls,"aria-placeholder":t.searchable?void 0:r.ariaPlaceholder,"aria-expanded":t.searchable?void 0:r.isOpen,"aria-activedescendant":t.searchable?void 0:r.ariaActiveDescendant,"aria-multiselectable":t.searchable?void 0:r.ariaMultiselectable,role:t.searchable?void 0:"combobox"},t.searchable?{}:r.arias),[c.createCommentVNode(" Search "),t.mode!=="tags"&&t.searchable&&!t.disabled?(c.openBlock(),c.createElementBlock("input",c.mergeProps({key:0,type:t.inputType,modelValue:r.search,value:r.search,class:r.classList.search,autocomplete:t.autocomplete,id:t.searchable?t.id:void 0,onInput:n[0]||(n[0]=(...a)=>r.handleSearchInput&&r.handleSearchInput(...a)),onKeypress:n[1]||(n[1]=(...a)=>r.handleKeypress&&r.handleKeypress(...a)),onPaste:n[2]||(n[2]=c.withModifiers((...a)=>r.handlePaste&&r.handlePaste(...a),["stop"])),ref:"input","aria-controls":r.ariaControls,"aria-placeholder":r.ariaPlaceholder,"aria-expanded":r.isOpen,"aria-activedescendant":r.ariaActiveDescendant,"aria-multiselectable":r.ariaMultiselectable,role:"combobox"},{...t.attrs,...r.arias}),null,16,Hk)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Tags (with search) "),t.mode=="tags"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(r.classList.tags),"data-tags":""},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.iv,(a,s,l)=>c.renderSlot(r.$slots,"tag",{option:a,handleTagRemove:r.handleTagRemove,disabled:t.disabled},()=>[(c.openBlock(),c.createElementBlock("span",{class:c.normalizeClass(r.classList.tag),tabindex:"-1",onKeyup:c.withKeys(u=>r.handleTagRemove(a,u),["enter"]),key:l,"aria-label":r.ariaTagLabel(a[t.label])},[c.createTextVNode(c.toDisplayString(a[t.label])+" ",1),t.disabled?c.createCommentVNode("v-if",!0):(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(r.classList.tagRemove),onClick:u=>r.handleTagRemove(a,u)},[c.createElementVNode("span",{class:c.normalizeClass(r.classList.tagRemoveIcon)},null,2)],10,Gk))],42,Fk))])),256)),c.createElementVNode("div",{class:c.normalizeClass(r.classList.tagsSearchWrapper),ref:"tags"},[c.createCommentVNode(" Used for measuring search width "),c.createElementVNode("span",{class:c.normalizeClass(r.classList.tagsSearchCopy)},c.toDisplayString(r.search),3),c.createCommentVNode(" Actual search input "),t.searchable&&!t.disabled?(c.openBlock(),c.createElementBlock("input",c.mergeProps({key:0,type:t.inputType,modelValue:r.search,value:r.search,class:r.classList.tagsSearch,id:t.searchable?t.id:void 0,autocomplete:t.autocomplete,onInput:n[3]||(n[3]=(...a)=>r.handleSearchInput&&r.handleSearchInput(...a)),onKeypress:n[4]||(n[4]=(...a)=>r.handleKeypress&&r.handleKeypress(...a)),onPaste:n[5]||(n[5]=c.withModifiers((...a)=>r.handlePaste&&r.handlePaste(...a),["stop"])),ref:"input","aria-controls":r.ariaControls,"aria-placeholder":r.ariaPlaceholder,"aria-expanded":r.isOpen,"aria-activedescendant":r.ariaActiveDescendant,"aria-multiselectable":r.ariaMultiselectable,role:"combobox"},{...t.attrs,...r.arias}),null,16,$k)):c.createCommentVNode("v-if",!0)],2)],2)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Single label "),t.mode=="single"&&r.hasSelected&&!r.search&&r.iv?c.renderSlot(r.$slots,"singlelabel",{key:2,value:r.iv},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.singleLabel)},[c.createElementVNode("span",{class:c.normalizeClass(r.classList.singleLabelText)},c.toDisplayString(r.iv[t.label]),3)],2)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Multiple label "),t.mode=="multiple"&&r.hasSelected&&!r.search?c.renderSlot(r.$slots,"multiplelabel",{key:3,values:r.iv},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.multipleLabel),innerHTML:r.multipleLabelText},null,10,Jk)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Placeholder "),t.placeholder&&!r.hasSelected&&!r.search?c.renderSlot(r.$slots,"placeholder",{key:4},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.placeholder),"aria-hidden":"true"},c.toDisplayString(t.placeholder),3)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Spinner "),t.loading||r.resolving?c.renderSlot(r.$slots,"spinner",{key:5},()=>[c.createElementVNode("span",{class:c.normalizeClass(r.classList.spinner),"aria-hidden":"true"},null,2)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Clear "),r.hasSelected&&!t.disabled&&t.canClear&&!r.busy?c.renderSlot(r.$slots,"clear",{key:6,clear:r.clear},()=>[c.createElementVNode("span",{"aria-hidden":"true",tabindex:"0",role:"button","data-clear":"","aria-roledescription":"\u274E",class:c.normalizeClass(r.classList.clear),onClick:n[6]||(n[6]=(...a)=>r.clear&&r.clear(...a)),onKeyup:n[7]||(n[7]=c.withKeys((...a)=>r.clear&&r.clear(...a),["enter"]))},[c.createElementVNode("span",{class:c.normalizeClass(r.classList.clearIcon)},null,2)],34)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Caret "),t.caret&&t.showOptions?c.renderSlot(r.$slots,"caret",{key:7},()=>[c.createElementVNode("span",{class:c.normalizeClass(r.classList.caret),onClick:n[8]||(n[8]=(...a)=>r.handleCaretClick&&r.handleCaretClick(...a)),"aria-hidden":"true"},null,2)]):c.createCommentVNode("v-if",!0)],16,Wk),c.createCommentVNode(" Options "),c.createElementVNode("div",{class:c.normalizeClass(r.classList.dropdown),tabindex:"-1"},[c.renderSlot(r.$slots,"beforelist",{options:r.fo}),c.createElementVNode("ul",{class:c.normalizeClass(r.classList.options),id:r.ariaControls,role:"listbox"},[t.groups?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(r.fg,(a,s,l)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(r.classList.group),key:l,id:r.ariaGroupId(a),"aria-label":r.ariaGroupLabel(a),"aria-selected":r.isSelected(a),role:"option"},[c.createElementVNode("div",{class:c.normalizeClass(r.classList.groupLabel(a)),"data-pointed":r.isPointed(a),onMouseenter:u=>r.setPointer(a,s),onClick:u=>r.handleGroupClick(a)},[c.renderSlot(r.$slots,"grouplabel",{group:a,isSelected:r.isSelected,isPointed:r.isPointed},()=>[c.createElementVNode("span",{innerHTML:a[t.groupLabel]},null,8,eA)])],42,qk),c.createElementVNode("ul",{class:c.normalizeClass(r.classList.groupOptions),"aria-label":r.ariaGroupLabel(a),role:"group"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.__VISIBLE__,(u,d,f)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(r.classList.option(u,a)),"data-pointed":r.isPointed(u),"data-selected":r.isSelected(u)||void 0,key:f,onMouseenter:M=>r.setPointer(u),onClick:M=>r.handleOptionClick(u),id:r.ariaOptionId(u),"aria-selected":r.isSelected(u),"aria-label":r.ariaOptionLabel(u),role:"option"},[c.renderSlot(r.$slots,"option",{option:u,isSelected:r.isSelected,isPointed:r.isPointed,search:r.search},()=>[c.createElementVNode("span",null,c.toDisplayString(u[t.label]),1)])],42,nA))),128))],10,tA)],10,Kk))),128)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(r.fo,(a,s,l)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(r.classList.option(a)),"data-pointed":r.isPointed(a),"data-selected":r.isSelected(a)||void 0,key:l,onMouseenter:u=>r.setPointer(a),onClick:u=>r.handleOptionClick(a),id:r.ariaOptionId(a),"aria-selected":r.isSelected(a),"aria-label":r.ariaOptionLabel(a),role:"option"},[c.renderSlot(r.$slots,"option",{option:a,isSelected:r.isSelected,isPointed:r.isPointed,search:r.search},()=>[c.createElementVNode("span",null,c.toDisplayString(a[t.label]),1)])],42,rA))),128))],10,Xk),r.noOptions?c.renderSlot(r.$slots,"nooptions",{key:0},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.noOptions),innerHTML:t.noOptionsText},null,10,oA)]):c.createCommentVNode("v-if",!0),r.noResults?c.renderSlot(r.$slots,"noresults",{key:1},()=>[c.createElementVNode("div",{class:c.normalizeClass(r.classList.noResults),innerHTML:t.noResultsText},null,10,iA)]):c.createCommentVNode("v-if",!0),t.infinite&&r.hasMore?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(r.classList.inifinite),ref:"infiniteLoader"},[c.renderSlot(r.$slots,"infinite",{},()=>[c.createElementVNode("span",{class:c.normalizeClass(r.classList.inifiniteSpinner)},null,2)])],2)):c.createCommentVNode("v-if",!0),c.renderSlot(r.$slots,"afterlist",{options:r.fo})],2),c.createCommentVNode(" Hacky input element to show HTML5 required warning "),t.required?(c.openBlock(),c.createElementBlock("input",{key:0,class:c.normalizeClass(r.classList.fakeInput),tabindex:"-1",value:r.textValue,required:""},null,10,aA)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Native input support "),t.nativeSupport?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[t.mode=="single"?(c.openBlock(),c.createElementBlock("input",{key:0,type:"hidden",name:t.name,value:r.plainValue!==void 0?r.plainValue:""},null,8,sA)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(r.plainValue,(a,s)=>(c.openBlock(),c.createElementBlock("input",{type:"hidden",name:`${t.name}[]`,value:a,key:s},null,8,lA))),128))],64)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Screen reader assistive text "),t.searchable&&r.hasSelected?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(r.classList.assist),id:r.ariaAssist,"aria-hidden":"true"},c.toDisplayString(r.ariaLabel),11,uA)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Create height for empty input "),c.createElementVNode("div",{class:c.normalizeClass(r.classList.spacer)},null,2)],42,Zk)}Vl.render=cA,Vl.__file="src/Multiselect.vue";var Uw="",Yw="";const dA=c.createElementVNode("img",{alt:"",class:"list__item_thumb",src:Ak},null,-1),fA={class:"list__item_text"},MA=c.createElementVNode("div",{id:"list"},null,-1),gA={__name:"InputList",props:{list:{type:Array,required:!0},maxHeight:{type:String,default:"200px"},labelProp:{type:String,default:"label"},idProp:{type:String,default:"value"}},emits:["update"],setup(r,{emit:n}){c.useCssVars(e=>({"341349d2":r.maxHeight}));const t=c.ref(null);function o(){n("update",t.value)}return(e,i)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(c.unref(Vl),{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=a=>t.value=a),label:r.labelProp,mode:"tags",native:!1,object:!0,options:r.list,placeholder:"Start typing a name",searchable:!0,"value-prop":r.idProp,onSelect:o},{tag:c.withCtx(({option:a,handleTagRemove:s,disabled:l})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#list"},[c.createElementVNode("div",{class:c.normalizeClass(["list__item",{"is-disabled":l}])},[dA,c.createElementVNode("p",fA,c.toDisplayString(a[r.labelProp]),1),c.createVNode(Te,{class:"list__item_icon","icon-name":"delete",size:24,onClick:u=>s(a,u)},null,8,["onClick"]),c.renderSlot(e.$slots,"default")],2)]))]),_:3},8,["modelValue","label","options","value-prop"]),MA],64))}},hA=c.defineComponent({components:{DhIcon:Te},props:{hasCloseButton:{type:Boolean,default:!0},hasSideBar:{type:Boolean,default:!0},hasSideBarButtonBottom:{type:Boolean,default:!0},hasHeader:{type:Boolean,default:!0},hasFooter:{type:Boolean,default:!0},hasFooterButtonRight:{type:Boolean,default:!0},hasBodyScrolling:{type:Boolean,default:!0},sideBarPosition:{type:String,default:"left"},hasCloseConfirmation:{type:Boolean,default:!1},bodyClass:{type:String,default:""}},emits:["close"],mounted(){document.body.classList.add("modal-open")},unmounted(){document.body.classList.remove("modal-open")},methods:{closed(){this.$emit("close",this.hasCloseConfirmation),document.body.classList.remove("modal-open")}}}),pA={class:"modal-content"},yA={key:0,id:"modal-sidebar",class:"modal-sidebar"},NA={key:0,id:"modalTitle",class:"modal-header"},mA={class:"modal-footer"};function jA(r,n,t,o,e,i){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createBlock(c.Transition,{name:"modal-fade"},{default:c.withCtx(()=>[c.createElementVNode("div",{class:"modal-backdrop",onClick:n[2]||(n[2]=(...s)=>r.closed&&r.closed(...s))},[c.createElementVNode("div",{"aria-describedby":"modalDescription","aria-labelledby":"modalTitle",class:c.normalizeClass(`modal ${r.hasSideBar?r.sideBarPosition:""} ${r.hasBodyScrolling?"":"modal-auto-height"}`),role:"dialog",onClick:n[1]||(n[1]=c.withModifiers(()=>{},["stop"]))},[r.hasCloseButton?(c.openBlock(),c.createElementBlock("button",{key:0,"aria-label":"Close modal",class:"btn-close",type:"button",onClick:n[0]||(n[0]=(...s)=>r.closed&&r.closed(...s))},[c.createVNode(a,{class:"icon","icon-name":"close",size:24})])):c.createCommentVNode("",!0),c.createElementVNode("div",pA,[r.hasSideBar?(c.openBlock(),c.createElementBlock("aside",yA,[c.renderSlot(r.$slots,"sidebar"),r.hasSideBarButtonBottom?c.renderSlot(r.$slots,"sidebar-button-bottom",{key:0}):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0),c.createElementVNode("section",{class:c.normalizeClass(`right-section ${r.hasSideBar?"":"full"}`)},[r.hasHeader?(c.openBlock(),c.createElementBlock("header",NA,[c.renderSlot(r.$slots,"header")])):c.createCommentVNode("",!0),c.createElementVNode("section",{id:"modalDescription",class:c.normalizeClass(["modal-body",[r.bodyClass,r.hasBodyScrolling?"":"modal-body-no-scroll"]])},[c.renderSlot(r.$slots,"body")],2),c.createElementVNode("footer",mA,[r.hasFooter?c.renderSlot(r.$slots,"footer",{key:0}):c.createCommentVNode("",!0),r.hasFooterButtonRight?c.renderSlot(r.$slots,"footer-button-right",{key:1}):c.createCommentVNode("",!0)])],2)])],2)])]),_:3})}var IA=st(hA,[["render",jA]]);const DA=c.defineComponent({components:{DhIcon:Te},props:{notificationType:{type:String,required:!0,default:"toast",validator:r=>["toast","bottom-message","actionable","modal"].includes(r)},icon:{type:String,required:!0,default:"info"},title:{type:String,required:!1,default:""},message:{type:String,required:!1,default:""},dismissible:{type:Boolean,required:!1,default:!0},notificationButton:{type:String,default:"Action"},buttonDismiss:{type:String,default:"Dismiss"},zIndex:{type:Number,default:2},show:{type:Boolean,default:!1}},mounted(){this.dismissible&&["toast","bottom-message"].includes(this.notificationType)&&setTimeout(()=>{this.close()},3e3)},emits:["action"],methods:{close(r=!1){this.$emit("action",r)},limitTitle(r,n){return["toast","actionable"].includes(n)&&r.length>=60?`${r.substring(0,60)}..`:["bottom-message"].includes(n)&&r.length>=40?`${r.substring(0,40)}..`:["modal"].includes(n)&&r.length>=80?`${r.substring(0,80)}..`:r}}}),xA=[c.createElementVNode("img",{alt:"icon",class:"close-icon",src:hd},null,-1)],vA={class:"additional-text"},bA={key:0,class:"descriptions"};function TA(r,n,t,o,e,i){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(`dh-notification-container ${r.notificationType}`),style:c.normalizeStyle({"z-index":r.zIndex})},[r.show?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["bottom-message"].includes(r.notificationType)?`notification-up status status-${r.notificationType}`:`notification-enter status status-${r.notificationType}`)},[["modal","bottom-message"].includes(r.notificationType)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",{key:0,class:"close-notification",onClick:n[0]||(n[0]=s=>r.close(!1))},xA)),c.createElementVNode("div",{class:c.normalizeClass(`content content- ${r.notificationType}`)},[c.createElementVNode("div",{class:c.normalizeClass(`ellipse ellipse-${r.notificationType} ellipse-${r.icon}`)},[c.createVNode(a,{class:c.normalizeClass(`icon-${r.icon}`),"icon-name":r.icon,size:33},null,8,["class","icon-name"])],2),c.createElementVNode("div",vA,[c.createElementVNode("div",{class:c.normalizeClass(`body-section-title title-${r.notificationType}`)},c.toDisplayString(r.limitTitle(r.title,r.notificationType)),3),["bottom-message"].includes(r.notificationType)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",bA,c.toDisplayString(r.message.length>=280?`${r.message.substring(0,280)}..`:r.message),1))]),["toast","bottom-message"].includes(r.notificationType)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(`buttons ${r.notificationType}`)},[c.createElementVNode("button",{class:c.normalizeClass(["btn btn-normal",r.icon=="delete"?"btn-danger":"btn-primary"]),onClick:n[1]||(n[1]=s=>r.close(!0))},c.toDisplayString(r.notificationButton),3),c.createElementVNode("button",{class:"btn btn-normal btn-secondary dismiss",onClick:n[2]||(n[2]=s=>r.close())},c.toDisplayString(r.buttonDismiss),1)],2))],2)],2)):c.createCommentVNode("",!0)],6)}var kA=st(DA,[["render",TA]]),Pw="";const AA={class:"password__panel"},wA=["placeholder","type"],LA={class:"icon is-right"},zA={key:0,class:"password__tooltip"};var OA=st(c.defineComponent({__name:"PasswordField",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},tipChars:{type:String,default:"12 Characters"},tipNumbers:{type:String,default:"Numbers"},tipSymbols:{type:String,default:"Symbols"},passwordTooltipDisabled:{type:Boolean,default:!1}},emits:["submit","update:modelValue"],setup(r,{emit:n}){const t=r,o=c.ref(""),e=c.ref(!1),i=c.ref(!1),a=c.ref(!1),s=c.ref(!1),l=c.ref(!1),u=c.ref(!1);function d(){n("submit",o.value),n("update:modelValue",o.value)}function f(){e.value=!0,u.value=!0}function M(){e.value=!1,u.value=!1}function p(){l.value=!l.value}return c.onMounted(()=>()=>o.value=t.modelValue||""),c.watch(t,()=>(o.value=t.modelValue||"",i.value=o.value.length>11,a.value=/\d/.test(o.value),s.value=/[!@#$%^&*)(+=._-]/.test(o.value))),(y,j)=>(c.openBlock(),c.createElementBlock("div",AA,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":j[0]||(j[0]=v=>o.value=v),class:"form__input password__panel_input","data-e2e":"password-input",placeholder:t.placeholder,type:l.value?"text":"password",onChange:d,onFocus:f,onFocusout:M},null,40,wA),[[c.vModelDynamic,o.value]]),c.createElementVNode("button",{class:"password__panel_button",type:"button",onClick:p},[c.createElementVNode("span",LA,[c.createVNode(Te,{active:u.value,"icon-name":l.value?"invisible":"visible",size:20},null,8,["active","icon-name"])])]),e.value&&!t.passwordTooltipDisabled?(c.openBlock(),c.createElementBlock("div",zA,[c.createElementVNode("p",{class:c.normalizeClass(["password__tooltip_text",i.value?"password__tooltip_text--valid":""])},[c.createVNode(Te,{class:c.normalizeClass(i.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":i.value?"accept":"close",size:16},null,8,["class","icon-name"]),c.createElementVNode("span",null,c.toDisplayString(t.tipChars),1)],2),c.createElementVNode("p",{class:c.normalizeClass(["password__tooltip_text",a.value?"password__tooltip_text--valid":""])},[c.createVNode(Te,{class:c.normalizeClass(a.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":a.value?"accept":"close",size:16},null,8,["class","icon-name"]),c.createElementVNode("span",null,c.toDisplayString(t.tipNumbers),1)],2),c.createElementVNode("p",{class:c.normalizeClass(["password__tooltip_text",s.value?"password__tooltip_text--valid":""])},[c.createVNode(Te,{class:c.normalizeClass(s.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":s.value?"accept":"close",size:16},null,8,["class","icon-name"]),c.createElementVNode("span",null,c.toDisplayString(t.tipSymbols),1)],2)])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5ec7ff50"]]),Vw="";const SA={class:"radio"},CA=["for"],EA=["id","type","value"],_A={class:"radio__label_txt"};var bM=st({__name:"RadioBox",props:{type:{type:String,default:"radio"},value:{type:String,required:!0},label:{type:String,required:!0}},emits:["clickBox"],setup(r,{emit:n}){return(t,o)=>(c.openBlock(),c.createElementBlock("div",SA,[c.createElementVNode("label",{class:"radio__label",for:r.value},[c.createElementVNode("input",{id:r.value,class:"radio__input",name:"radiobox",type:r.type,value:r.value,onClick:o[0]||(o[0]=e=>n("clickBox"))},null,8,EA),c.createElementVNode("span",_A,c.toDisplayString(r.label),1)],8,CA)]))}},[["__scopeId","data-v-29696bd5"]]),Ww="";const QA={__name:"RadioBoxGroup",props:{orientation:{type:String,default:"horizontal"},type:{type:String,default:"radio"},list:{type:Array,required:!0}},setup(r){const n=c.ref(null);function t(){const o=document.querySelectorAll("input");for(let e=0;e<o.length;e++)o[e].checked?o[e].parentNode.parentNode.classList.add("radio--checked"):o[e].parentNode.parentNode.classList.remove("radio--checked")}return(o,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["radio__grp",r.orientation==="vertical"?"radio__vertical":"radio__horizontal"])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.list,i=>(c.openBlock(),c.createBlock(bM,{key:i.key,ref_for:!0,ref_key:"boxes",ref:n,label:i.label,type:r.type,value:i.value,onClickBox:t},null,8,["label","type","value"]))),128))],2))}};var Hw="";const UA={class:"search-panel"},YA=["placeholder"];var BA=st(c.defineComponent({__name:"SearchInput",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""}},emits:["submit","clean","update:modelValue"],setup(r,{emit:n}){const t=r,o=c.ref("");function e(){n("submit",o.value),n("update:modelValue",o.value)}function i(){o.value="",n("clean"),n("update:modelValue",o.value)}return c.onMounted(()=>()=>o.value=t.modelValue||""),c.watch(t,()=>o.value=t.modelValue||""),(a,s)=>(c.openBlock(),c.createElementBlock("div",UA,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>o.value=l),class:"form-input search-panel-input","data-e2e":"search-input",placeholder:t.placeholder,onKeyup:e},null,40,YA),[[c.vModelText,o.value]]),o.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",{key:0,class:"search-panel-button","data-e2e":"search-submit",onClick:e},[c.createVNode(Te,{active:!0,"icon-name":"search",size:24})])),o.value?(c.openBlock(),c.createElementBlock("button",{key:1,class:"search-panel-button close","data-e2e":"search-close",onClick:i},[c.createVNode(Te,{class:"icon","icon-name":"close",size:24})])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-562faa14"]]),Gw="";const PA=r=>(c.pushScopeId("data-v-0213b522"),r=r(),c.popScopeId(),r),RA={class:"stepper"},VA=PA(()=>c.createElementVNode("hr",{class:"solid"},null,-1));var ZA=st(c.defineComponent({__name:"Stepper",props:{maxSteps:{type:Number,default:0},currentStep:{type:Number,default:0}},setup(r){const n=r;function t(){return Array.from(Array(n.maxSteps||0).keys())}return(o,e)=>(c.openBlock(),c.createElementBlock("div",RA,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t(),(i,a)=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"step"},[c.createElementVNode("span",{class:c.normalizeClass(["step-number",{active:i===r.currentStep}])},c.toDisplayString(i+1),3),VA]))),128))]))}}),[["__scopeId","data-v-0213b522"]]);function Qt(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var TM={exports:{}};/*! For license information please see editor.js.LICENSE.txt */(function(r,n){(function(t,o){r.exports=o()})(window,function(){return function(t){var o={};function e(i){if(o[i])return o[i].exports;var a=o[i]={i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,e),a.l=!0,a.exports}return e.m=t,e.c=o,e.d=function(i,a,s){e.o(i,a)||Object.defineProperty(i,a,{enumerable:!0,get:s})},e.r=function(i){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},e.t=function(i,a){if(1&a&&(i=e(i)),8&a||4&a&&typeof i=="object"&&i&&i.__esModule)return i;var s=Object.create(null);if(e.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:i}),2&a&&typeof i!="string")for(var l in i)e.d(s,l,function(u){return i[u]}.bind(null,l));return s},e.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return e.d(a,"a",a),a},e.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},e.p="",e(e.s=187)}([function(t,o,e){var i=e(10),a=e(16),s=e(27),l=e(23),u=e(31),d=function(f,M,p){var y,j,v,h,N=f&d.F,D=f&d.G,I=f&d.S,m=f&d.P,T=f&d.B,L=D?i:I?i[M]||(i[M]={}):(i[M]||{}).prototype,A=D?a:a[M]||(a[M]={}),z=A.prototype||(A.prototype={});for(y in D&&(p=M),p)v=((j=!N&&L&&L[y]!==void 0)?L:p)[y],h=T&&j?u(v,i):m&&typeof v=="function"?u(Function.call,v):v,L&&l(L,y,v,f&d.U),A[y]!=v&&s(A,y,h),m&&z[y]!=v&&(z[y]=v)};i.core=a,d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,t.exports=d},function(t,o){t.exports=function(e){return e&&e.__esModule?e:{default:e}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,o){t.exports=function(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,o){function e(i,a){for(var s=0;s<a.length;s++){var l=a[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(i,l.key,l)}}t.exports=function(i,a,s){return a&&e(i.prototype,a),s&&e(i,s),Object.defineProperty(i,"prototype",{writable:!1}),i},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,o){function e(i){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},t.exports.__esModule=!0,t.exports.default=t.exports,e(i)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,o,e){var i=e(111);t.exports=function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&i(a,s)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,o,e){var i=e(7).default,a=e(152);t.exports=function(s,l){if(l&&(i(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a(s)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,o){function e(i){return t.exports=e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,e(i)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,o,e){var i,a,s;a=[o,e(20),e(372),e(21),e(403),e(19)],(s=typeof(i=function(l,u,d,f,M,p){var y,j=e(1);function v(b,g){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"log",k=arguments.length>3?arguments[3]:void 0,w=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"color: inherit";if("console"in window&&window.console[x]){var C=["info","log","warn","error"].includes(x),E=[];switch(v.logLevel){case y.ERROR:if(x!=="error")return;break;case y.WARN:if(!["error","warn"].includes(x))return;break;case y.INFO:if(!C||b)return}k&&E.push(k);var O="Editor.js ".concat("2.26.5"),_=`line-height: 1em;
20
20
  color: #006FEA;
21
21
  display: inline-block;
22
22
  font-size: 11px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deskhero/dh_ui",
3
- "version": "1.44.3",
3
+ "version": "1.44.4",
4
4
  "files": [
5
5
  "dist"
6
6
  ],