@feedmepos/ui-library 1.10.5 → 1.10.6

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.
@@ -26,9 +26,9 @@
26
26
  * https://www.chartjs.org
27
27
  * (c) 2024 Chart.js Contributors
28
28
  * Released under the MIT License
29
- */class WC{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,i){const a=n.listeners[i],s=n.duration;a.forEach(l=>l({chart:e,initial:n.initial,numSteps:s,currentStep:Math.min(o-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=dg.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const a=o.items;let s=a.length-1,l=!1,c;for(;s>=0;--s)c=a[s],c._active?(c._total>o.duration&&(o.duration=c._total),c.tick(e),l=!0):(a[s]=a[a.length-1],a.pop());l&&(i.draw(),this._notify(i,o,e,"progress")),a.length||(o.running=!1,this._notify(i,o,e,"complete"),o.initial=!1),n+=a.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let o=n.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,o)),o}listen(e,n,o){this._getAnims(e).listeners[n].push(o)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Eo=new WC;const zg="transparent",jC={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=mg(t||zg),i=o.valid&&mg(e||zg);return i&&i.valid?i.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class GC{constructor(e,n,o,i){const a=n[o];i=at([e.to,i,a,e.from]);const s=at([e.from,a,i]);this._active=!0,this._fn=e.fn||jC[e.type||typeof s],this._easing=Pa[e.easing]||Pa.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=o,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],a=o-this._start,s=this._duration-a;this._start=o,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=a,this._loop=!!e.loop,this._to=at([e.to,n,i,e.from]),this._from=at([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,o=this._duration,i=this._prop,a=this._from,s=this._loop,l=this._to;let c;if(this._active=a!==l&&(s||n<o),!this._active){this._target[i]=l,this._notify(!0);return}if(n<0){this._target[i]=a;return}c=n/o%2,c=s&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[i]=this._fn(a,l,c)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,o)=>{e.push({res:n,rej:o})})}_notify(e){const n=e?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}}class _g{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!_e(e))return;const n=Object.keys(pt.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const a=e[i];if(!_e(a))return;const s={};for(const l of n)s[l]=a[l];(ot(a.properties)&&a.properties||[i]).forEach(l=>{(l===i||!o.has(l))&&o.set(l,s)})})}_animateOptions(e,n){const o=n.options,i=XC(e,o);if(!i)return[];const a=this._createAnimations(i,o);return o.$shared&&QC(e.options.$animations,o).then(()=>{e.options=o},()=>{}),a}_createAnimations(e,n){const o=this._properties,i=[],a=e.$animations||(e.$animations={}),s=Object.keys(n),l=Date.now();let c;for(c=s.length-1;c>=0;--c){const u=s[c];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(e,n));continue}const h=n[u];let p=a[u];const m=o.get(u);if(p)if(m&&p.active()){p.update(m,h,l);continue}else p.cancel();if(!m||!m.duration){e[u]=h;continue}a[u]=p=new GC(m,e,u,h),i.push(p)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const o=this._createAnimations(e,n);if(o.length)return Eo.add(this._chart,o),!0}}function QC(t,e){const n=[],o=Object.keys(e);for(let i=0;i<o.length;i++){const a=t[o[i]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function XC(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Hg(t,e){const n=t&&t.options||{},o=n.reverse,i=n.min===void 0?e:0,a=n.max===void 0?e:0;return{start:o?a:i,end:o?i:a}}function qC(t,e,n){if(n===!1)return!1;const o=Hg(t,n),i=Hg(e,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function KC(t){let e,n,o,i;return _e(t)?(e=t.top,n=t.right,o=t.bottom,i=t.left):e=n=o=i=t,{top:e,right:n,bottom:o,left:i,disabled:t===!1}}function Ug(t,e){const n=[],o=t._getSortedDatasetMetas(e);let i,a;for(i=0,a=o.length;i<a;++i)n.push(o[i].index);return n}function Wg(t,e,n,o={}){const i=t.keys,a=o.mode==="single";let s,l,c,u;if(e!==null){for(s=0,l=i.length;s<l;++s){if(c=+i[s],c===n){if(o.all)continue;break}u=t.values[c],yt(u)&&(a||e===0||co(e)===co(u))&&(e+=u)}return e}}function JC(t,e){const{iScale:n,vScale:o}=e,i=n.axis==="x"?"x":"y",a=o.axis==="x"?"x":"y",s=Object.keys(t),l=new Array(s.length);let c,u,h;for(c=0,u=s.length;c<u;++c)h=s[c],l[c]={[i]:h,[a]:t[h]};return l}function jg(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function YC(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function ZC(t){const{min:e,max:n,minDefined:o,maxDefined:i}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function $C(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function Gg(t,e,n,o){for(const i of e.getMatchingVisibleMetas(o).reverse()){const a=t[i.index];if(n&&a>0||!n&&a<0)return i.index}return null}function Qg(t,e){const{chart:n,_cachedMeta:o}=t,i=n._stacks||(n._stacks={}),{iScale:a,vScale:s,index:l}=o,c=a.axis,u=s.axis,h=YC(a,s,o),p=e.length;let m;for(let b=0;b<p;++b){const y=e[b],{[c]:v,[u]:k}=y,x=y._stacks||(y._stacks={});m=x[u]=$C(i,h,v),m[l]=k,m._top=Gg(m,s,!0,o.type),m._bottom=Gg(m,s,!1,o.type);const C=m._visualValues||(m._visualValues={});C[l]=k}}function yu(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function eA(t,e){return cr(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function tA(t,e,n){return cr(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Va(t,e){const n=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const i of e){const a=i._stacks;if(!a||a[o]===void 0||a[o][n]===void 0)return;delete a[o][n],a[o]._visualValues!==void 0&&a[o]._visualValues[n]!==void 0&&delete a[o]._visualValues[n]}}}const vu=t=>t==="reset"||t==="none",Xg=(t,e)=>e?t:Object.assign({},t),nA=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Ug(n,!0),values:null};class qn{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=jg(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Va(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(p,m,b,y)=>p==="x"?m:p==="r"?y:b,a=n.xAxisID=Oe(o.xAxisID,yu(e,"x")),s=n.yAxisID=Oe(o.yAxisID,yu(e,"y")),l=n.rAxisID=Oe(o.rAxisID,yu(e,"r")),c=n.indexAxis,u=n.iAxisID=i(c,a,s,l),h=n.vAxisID=i(c,s,a,l);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&sg(this._data,this),e._stacked&&Va(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if(_e(n)){const i=this._cachedMeta;this._data=JC(n,i)}else if(o!==n){if(o){sg(o,this);const i=this._cachedMeta;Va(i),i._parsed=[]}n&&Object.isExtensible(n)&&HS(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const a=n._stacked;n._stacked=jg(n.vScale,n),n.stack!==o.stack&&(i=!0,Va(n),n.stack=o.stack),this._resyncElements(e),(i||a!==n._stacked)&&Qg(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:o,_data:i}=this,{iScale:a,_stacked:s}=o,l=a.axis;let c=e===0&&n===i.length?!0:o._sorted,u=e>0&&o._parsed[e-1],h,p,m;if(this._parsing===!1)o._parsed=i,o._sorted=!0,m=i;else{ot(i[e])?m=this.parseArrayData(o,i,e,n):_e(i[e])?m=this.parseObjectData(o,i,e,n):m=this.parsePrimitiveData(o,i,e,n);const b=()=>p[l]===null||u&&p[l]<u[l];for(h=0;h<n;++h)o._parsed[h+e]=p=m[h],c&&(b()&&(c=!1),u=p);o._sorted=c}s&&Qg(this,m)}parsePrimitiveData(e,n,o,i){const{iScale:a,vScale:s}=e,l=a.axis,c=s.axis,u=a.getLabels(),h=a===s,p=new Array(i);let m,b,y;for(m=0,b=i;m<b;++m)y=m+o,p[m]={[l]:h||a.parse(u[y],y),[c]:s.parse(n[y],y)};return p}parseArrayData(e,n,o,i){const{xScale:a,yScale:s}=e,l=new Array(i);let c,u,h,p;for(c=0,u=i;c<u;++c)h=c+o,p=n[h],l[c]={x:a.parse(p[0],h),y:s.parse(p[1],h)};return l}parseObjectData(e,n,o,i){const{xScale:a,yScale:s}=e,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,u=new Array(i);let h,p,m,b;for(h=0,p=i;h<p;++h)m=h+o,b=n[m],u[h]={x:a.parse(sr(b,l),m),y:s.parse(sr(b,c),m)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const i=this.chart,a=this._cachedMeta,s=n[e.axis],l={keys:Ug(i,!0),values:n._stacks[e.axis]._visualValues};return Wg(l,s,a.index,{mode:o})}updateRangeFromParsed(e,n,o,i){const a=o[n.axis];let s=a===null?NaN:a;const l=i&&o._stacks[n.axis];i&&l&&(i.values=l,s=Wg(i,a,this._cachedMeta.index)),e.min=Math.min(e.min,s),e.max=Math.max(e.max,s)}getMinMax(e,n){const o=this._cachedMeta,i=o._parsed,a=o._sorted&&e===o.iScale,s=i.length,l=this._getOtherScale(e),c=nA(n,o,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:p}=ZC(l);let m,b;function y(){b=i[m];const v=b[l.axis];return!yt(b[e.axis])||h>v||p<v}for(m=0;m<s&&!(!y()&&(this.updateRangeFromParsed(u,e,b,c),a));++m);if(a){for(m=s-1;m>=0;--m)if(!y()){this.updateRangeFromParsed(u,e,b,c);break}}return u}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let i,a,s;for(i=0,a=n.length;i<a;++i)s=n[i][e.axis],yt(s)&&o.push(s);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,i=n.vScale,a=this.getParsed(e);return{label:o?""+o.getLabelForValue(a[o.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=KC(Oe(this.options.clip,qC(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],a=n.chartArea,s=[],l=this._drawStart||0,c=this._drawCount||i.length-l,u=this.options.drawActiveElementsOnTop;let h;for(o.dataset&&o.dataset.draw(e,a,l,c),h=l;h<l+c;++h){const p=i[h];p.hidden||(p.active&&u?s.push(p):p.draw(e,a))}for(h=0;h<s.length;++h)s[h].draw(e,a)}getStyle(e,n){const o=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,n,o){const i=this.getDataset();let a;if(e>=0&&e<this._cachedMeta.data.length){const s=this._cachedMeta.data[e];a=s.$context||(s.$context=tA(this.getContext(),e,s)),a.parsed=this.getParsed(e),a.raw=i.data[e],a.index=a.dataIndex=e}else a=this.$context||(this.$context=eA(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=o,a}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",o){const i=n==="active",a=this._cachedDataOpts,s=e+"-"+n,l=a[s],c=this.enableOptionSharing&&Ea(o);if(l)return Xg(l,c);const u=this.chart.config,h=u.datasetElementScopeKeys(this._type,e),p=i?[`${e}Hover`,"hover",e,""]:[e,""],m=u.getOptionScopes(this.getDataset(),h),b=Object.keys(pt.elements[e]),y=()=>this.getContext(o,i,n),v=u.resolveNamedOptions(m,b,y,p);return v.$shared&&(v.$shared=c,a[s]=Object.freeze(Xg(v,c))),v}_resolveAnimations(e,n,o){const i=this.chart,a=this._cachedDataOpts,s=`animation-${n}`,l=a[s];if(l)return l;let c;if(i.options.animation!==!1){const h=this.chart.config,p=h.datasetAnimationScopeKeys(this._type,n),m=h.getOptionScopes(this.getDataset(),p);c=h.createResolver(m,this.getContext(e,o,n))}const u=new _g(i,c&&c.animations);return c&&c._cacheable&&(a[s]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||vu(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),i=this._sharedOptions,a=this.getSharedOptions(o),s=this.includeOptions(n,a)||a!==i;return this.updateSharedOptions(a,n,o),{sharedOptions:a,includeOptions:s}}updateElement(e,n,o,i){vu(i)?Object.assign(e,o):this._resolveAnimations(n,i).update(e,o)}updateSharedOptions(e,n,o){e&&!vu(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,i){e.active=i;const a=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(e,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(e,n,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,n,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,o=this._cachedMeta.data;for(const[l,c,u]of this._syncList)this[l](c,u);this._syncList=[];const i=o.length,a=n.length,s=Math.min(a,i);s&&this.parse(0,s),a>i?this._insertElements(i,a-i,e):a<i&&this._removeElements(a,i-a)}_insertElements(e,n,o=!0){const i=this._cachedMeta,a=i.data,s=e+n;let l;const c=u=>{for(u.length+=n,l=u.length-1;l>=s;l--)u[l]=u[l-n]};for(c(a),l=e;l<s;++l)a[l]=new this.dataElementType;this._parsing&&c(i._parsed),this.parse(e,n),o&&this.updateElements(a,e,n,"reset")}updateElements(e,n,o,i){}_removeElements(e,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(e,n);o._stacked&&Va(o,i)}o.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,o,i]=e;this[n](o,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ue(qn,"defaults",{}),ue(qn,"datasetElementType",null),ue(qn,"dataElementType",null);function oA(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let i=0,a=n.length;i<a;i++)o=o.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=lg(o.sort((i,a)=>i-a))}return t._cache.$bar}function rA(t){const e=t.iScale,n=oA(e,t.type);let o=e._length,i,a,s,l;const c=()=>{s===32767||s===-32768||(Ea(l)&&(o=Math.min(o,Math.abs(s-l)||o)),l=s)};for(i=0,a=n.length;i<a;++i)s=e.getPixelForValue(n[i]),c();for(l=void 0,i=0,a=e.ticks.length;i<a;++i)s=e.getPixelForTick(i),c();return o}function iA(t,e,n,o){const i=n.barThickness;let a,s;return ze(i)?(a=e.min*n.categoryPercentage,s=n.barPercentage):(a=i*o,s=1),{chunk:a/o,ratio:s,start:e.pixels[t]-a/2}}function aA(t,e,n,o){const i=e.pixels,a=i[t];let s=t>0?i[t-1]:null,l=t<i.length-1?i[t+1]:null;const c=n.categoryPercentage;s===null&&(s=a-(l===null?e.end-e.start:l-a)),l===null&&(l=a+a-s);const u=a-(a-Math.min(s,l))/2*c;return{chunk:Math.abs(l-s)/2*c/o,ratio:n.barPercentage,start:u}}function sA(t,e,n,o){const i=n.parse(t[0],o),a=n.parse(t[1],o),s=Math.min(i,a),l=Math.max(i,a);let c=s,u=l;Math.abs(s)>Math.abs(l)&&(c=l,u=s),e[n.axis]=u,e._custom={barStart:c,barEnd:u,start:i,end:a,min:s,max:l}}function qg(t,e,n,o){return ot(t)?sA(t,e,n,o):e[n.axis]=n.parse(t,o),e}function Kg(t,e,n,o){const i=t.iScale,a=t.vScale,s=i.getLabels(),l=i===a,c=[];let u,h,p,m;for(u=n,h=n+o;u<h;++u)m=e[u],p={},p[i.axis]=l||i.parse(s[u],u),c.push(qg(m,p,a,u));return c}function ku(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function lA(t,e,n){return t!==0?co(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function dA(t){let e,n,o,i,a;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(i="end",a="start"):(i="start",a="end"),{start:n,end:o,reverse:e,top:i,bottom:a}}function cA(t,e,n,o){let i=e.borderSkipped;const a={};if(!i){t.borderSkipped=a;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:l,reverse:c,top:u,bottom:h}=dA(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?i=u:(n._bottom||0)===o?i=h:(a[Jg(h,s,l,c)]=!0,i=u)),a[Jg(i,s,l,c)]=!0,t.borderSkipped=a}function Jg(t,e,n,o){return o?(t=uA(t,e,n),t=Yg(t,n,e)):t=Yg(t,e,n),t}function uA(t,e,n){return t===e?n:t===n?e:t}function Yg(t,e,n){return t==="start"?e:t==="end"?n:t}function fA(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class cl extends qn{parsePrimitiveData(e,n,o,i){return Kg(e,n,o,i)}parseArrayData(e,n,o,i){return Kg(e,n,o,i)}parseObjectData(e,n,o,i){const{iScale:a,vScale:s}=e,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,u=a.axis==="x"?l:c,h=s.axis==="x"?l:c,p=[];let m,b,y,v;for(m=o,b=o+i;m<b;++m)v=n[m],y={},y[a.axis]=a.parse(sr(v,u),m),p.push(qg(sr(v,h),y,s,m));return p}updateRangeFromParsed(e,n,o,i){super.updateRangeFromParsed(e,n,o,i);const a=o._custom;a&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,a.min),e.max=Math.max(e.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:i}=n,a=this.getParsed(e),s=a._custom,l=ku(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+o.getLabelForValue(a[o.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,o,i){const a=i==="reset",{index:s,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),u=l.isHorizontal(),h=this._getRuler(),{sharedOptions:p,includeOptions:m}=this._getSharedOptions(n,i);for(let b=n;b<n+o;b++){const y=this.getParsed(b),v=a||ze(y[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(b),k=this._calculateBarIndexPixels(b,h),x=(y._stacks||{})[l.axis],C={horizontal:u,base:v.base,enableBorderRadius:!x||ku(y._custom)||s===x._top||s===x._bottom,x:u?v.head:k.center,y:u?k.center:v.head,height:u?k.size:Math.abs(v.size),width:u?Math.abs(v.size):k.size};m&&(C.options=p||this.resolveDataElementOptions(b,e[b].active?"active":i));const P=C.options||e[b].options;cA(C,P,x,s),fA(C,P,h.ratio),this.updateElement(e[b],b,C,i)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),a=o.options.stacked,s=[],l=c=>{const u=c.controller.getParsed(n),h=u&&u[c.vScale.axis];if(ze(h)||isNaN(h))return!0};for(const c of i)if(!(n!==void 0&&l(c))&&((a===!1||s.indexOf(c.stack)===-1||a===void 0&&c.stack===void 0)&&s.push(c.stack),c.index===e))break;return s.length||s.push(void 0),s}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,o){const i=this._getStacks(e,o),a=n!==void 0?i.indexOf(n):-1;return a===-1?i.length-1:a}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,i=[];let a,s;for(a=0,s=n.data.length;a<s;++a)i.push(o.getPixelForValue(this.getParsed(a)[o.axis],a));const l=e.barThickness;return{min:l||rA(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:e.grouped,ratio:l?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:a,minBarLength:s}}=this,l=a||0,c=this.getParsed(e),u=c._custom,h=ku(u);let p=c[n.axis],m=0,b=o?this.applyStack(n,c,o):p,y,v;b!==p&&(m=b-p,b=p),h&&(p=u.barStart,b=u.barEnd-u.barStart,p!==0&&co(p)!==co(u.barEnd)&&(m=0),m+=p);const k=!ze(a)&&!h?a:m;let x=n.getPixelForValue(k);if(this.chart.getDataVisibility(e)?y=n.getPixelForValue(m+b):y=x,v=y-x,Math.abs(v)<s){v=lA(v,n,l)*s,p===l&&(x-=v/2);const C=n.getPixelForDecimal(0),P=n.getPixelForDecimal(1),O=Math.min(C,P),E=Math.max(C,P);x=Math.max(Math.min(x,E),O),y=x+v,o&&!h&&(c._stacks[n.axis]._visualValues[i]=n.getValueForPixel(y)-n.getValueForPixel(x))}if(x===n.getPixelForValue(l)){const C=co(v)*n.getLineWidthForValue(l)/2;x+=C,v-=C}return{size:v,base:x,head:y,center:y+v/2}}_calculateBarIndexPixels(e,n){const o=n.scale,i=this.options,a=i.skipNull,s=Oe(i.maxBarThickness,1/0);let l,c;if(n.grouped){const u=a?this._getStackCount(e):n.stackCount,h=i.barThickness==="flex"?aA(e,n,i,u):iA(e,n,i,u),p=this._getStackIndex(this.index,this._cachedMeta.stack,a?e:void 0);l=h.start+h.chunk*p+h.chunk/2,c=Math.min(s,h.chunk*h.ratio)}else l=o.getPixelForValue(this.getParsed(e)[o.axis],e),c=Math.min(s,n.min*n.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,i=o.length;let a=0;for(;a<i;++a)this.getParsed(a)[n.axis]!==null&&!o[a].hidden&&o[a].draw(this._ctx)}}ue(cl,"id","bar"),ue(cl,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),ue(cl,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ul extends qn{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,i){const a=super.parsePrimitiveData(e,n,o,i);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+o).radius;return a}parseArrayData(e,n,o,i){const a=super.parseArrayData(e,n,o,i);for(let s=0;s<a.length;s++){const l=n[o+s];a[s]._custom=Oe(l[2],this.resolveDataElementOptions(s+o).radius)}return a}parseObjectData(e,n,o,i){const a=super.parseObjectData(e,n,o,i);for(let s=0;s<a.length;s++){const l=n[o+s];a[s]._custom=Oe(l&&l.r&&+l.r,this.resolveDataElementOptions(s+o).radius)}return a}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let o=e.length-1;o>=0;--o)n=Math.max(n,e[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:a}=n,s=this.getParsed(e),l=i.getLabelForValue(s.x),c=a.getLabelForValue(s.y),u=s._custom;return{label:o[e]||"",value:"("+l+", "+c+(u?", "+u:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,i){const a=i==="reset",{iScale:s,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(n,i),h=s.axis,p=l.axis;for(let m=n;m<n+o;m++){const b=e[m],y=!a&&this.getParsed(m),v={},k=v[h]=a?s.getPixelForDecimal(.5):s.getPixelForValue(y[h]),x=v[p]=a?l.getBasePixel():l.getPixelForValue(y[p]);v.skip=isNaN(k)||isNaN(x),u&&(v.options=c||this.resolveDataElementOptions(m,b.active?"active":i),a&&(v.options.radius=0)),this.updateElement(b,m,v,i)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const a=i.radius;return n!=="active"&&(i.radius=0),i.radius+=Oe(o&&o._custom,a),i}}ue(ul,"id","bubble"),ue(ul,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),ue(ul,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function pA(t,e,n){let o=1,i=1,a=0,s=0;if(e<it){const l=t,c=l+e,u=Math.cos(l),h=Math.sin(l),p=Math.cos(c),m=Math.sin(c),b=(P,O,E)=>Ba(P,l,c,!0)?1:Math.max(O,O*n,E,E*n),y=(P,O,E)=>Ba(P,l,c,!0)?-1:Math.min(O,O*n,E,E*n),v=b(0,u,p),k=b(kt,h,m),x=y(rt,u,p),C=y(rt+kt,h,m);o=(v-x)/2,i=(k-C)/2,a=-(v+x)/2,s=-(k+C)/2}return{ratioX:o,ratioY:i,offsetX:a,offsetY:s}}class Xr extends qn{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const o=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=o;else{let a=c=>+o[c];if(_e(o[e])){const{key:c="value"}=this._parsing;a=u=>+sr(o[u],c)}let s,l;for(s=e,l=e+n;s<l;++s)i._parsed[s]=a(s)}}_getRotation(){return Xn(this.options.rotation-90)}_getCircumference(){return Xn(this.options.circumference)}_getRotationExtents(){let e=it,n=-it;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const i=this.chart.getDatasetMeta(o).controller,a=i._getRotation(),s=i._getCircumference();e=Math.min(e,a),n=Math.max(n,a+s)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,i=this._cachedMeta,a=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,l=Math.max((Math.min(o.width,o.height)-s)/2,0),c=Math.min(DS(this.options.cutout,l),1),u=this._getRingWeight(this.index),{circumference:h,rotation:p}=this._getRotationExtents(),{ratioX:m,ratioY:b,offsetX:y,offsetY:v}=pA(p,h,c),k=(o.width-s)/m,x=(o.height-s)/b,C=Math.max(Math.min(k,x)/2,0),P=Ym(this.options.radius,C),O=Math.max(P*c,0),E=(P-O)/this._getVisibleDatasetWeightTotal();this.offsetX=y*P,this.offsetY=v*P,i.total=this.calculateTotal(),this.outerRadius=P-E*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-E*u,0),this.updateElements(a,0,a.length,e)}_circumference(e,n){const o=this.options,i=this._cachedMeta,a=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*a/it)}updateElements(e,n,o,i){const a=i==="reset",s=this.chart,l=s.chartArea,u=s.options.animation,h=(l.left+l.right)/2,p=(l.top+l.bottom)/2,m=a&&u.animateScale,b=m?0:this.innerRadius,y=m?0:this.outerRadius,{sharedOptions:v,includeOptions:k}=this._getSharedOptions(n,i);let x=this._getRotation(),C;for(C=0;C<n;++C)x+=this._circumference(C,a);for(C=n;C<n+o;++C){const P=this._circumference(C,a),O=e[C],E={x:h+this.offsetX,y:p+this.offsetY,startAngle:x,endAngle:x+P,circumference:P,outerRadius:y,innerRadius:b};k&&(E.options=v||this.resolveDataElementOptions(C,O.active?"active":i)),x+=P,this.updateElement(O,C,E,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,i;for(i=0;i<n.length;i++){const a=e._parsed[i];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(o+=Math.abs(a))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?it*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],a=Ia(n._parsed[e],o.options.locale);return{label:i[e]||"",value:a}}getMaxBorderWidth(e){let n=0;const o=this.chart;let i,a,s,l,c;if(!e){for(i=0,a=o.data.datasets.length;i<a;++i)if(o.isDatasetVisible(i)){s=o.getDatasetMeta(i),e=s.data,l=s.controller;break}}if(!e)return 0;for(i=0,a=e.length;i<a;++i)c=l.resolveDataElementOptions(i),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,i=e.length;o<i;++o){const a=this.resolveDataElementOptions(o);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let o=0;o<e;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(e){return Math.max(Oe(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}ue(Xr,"id","doughnut"),ue(Xr,"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"}),ue(Xr,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),ue(Xr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((a,s)=>{const c=e.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:i,lineWidth:c.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(s),index:s}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class fl extends qn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:i=[],_dataset:a}=n,s=this.chart._animationsDisabled;let{start:l,count:c}=ug(n,i,s);this._drawStart=l,this._drawCount=c,fg(n)&&(l=0,c=i.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!a._decimated,o.points=i;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(o,void 0,{animated:!s,options:u},e),this.updateElements(i,l,c,e)}updateElements(e,n,o,i){const a=i==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:u}=this._cachedMeta,{sharedOptions:h,includeOptions:p}=this._getSharedOptions(n,i),m=s.axis,b=l.axis,{spanGaps:y,segment:v}=this.options,k=Bi(y)?y:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||a||i==="none",C=n+o,P=e.length;let O=n>0&&this.getParsed(n-1);for(let E=0;E<P;++E){const T=e[E],A=x?T:{};if(E<n||E>=C){A.skip=!0;continue}const M=this.getParsed(E),z=ze(M[b]),W=A[m]=s.getPixelForValue(M[m],E),Q=A[b]=a||z?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,M,c):M[b],E);A.skip=isNaN(W)||isNaN(Q)||z,A.stop=E>0&&Math.abs(M[m]-O[m])>k,v&&(A.parsed=M,A.raw=u.data[E]),p&&(A.options=h||this.resolveDataElementOptions(E,T.active?"active":i)),x||this.updateElement(T,E,A,i),O=M}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return o;const a=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,a,s)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}ue(fl,"id","line"),ue(fl,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),ue(fl,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ra extends qn{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],a=Ia(n._parsed[e].r,o.options.locale);return{label:i[e]||"",value:a}}parseObjectData(e,n,o,i){return Dg.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((o,i)=>{const a=this.getParsed(i).r;!isNaN(a)&&this.chart.getDataVisibility(i)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,o=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(i/2,0),s=Math.max(o.cutoutPercentage?a/100*o.cutoutPercentage:1,0),l=(a-s)/e.getVisibleDatasetCount();this.outerRadius=a-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(e,n,o,i){const a=i==="reset",s=this.chart,c=s.options.animation,u=this._cachedMeta.rScale,h=u.xCenter,p=u.yCenter,m=u.getIndexAngle(0)-.5*rt;let b=m,y;const v=360/this.countVisibleElements();for(y=0;y<n;++y)b+=this._computeAngle(y,i,v);for(y=n;y<n+o;y++){const k=e[y];let x=b,C=b+this._computeAngle(y,i,v),P=s.getDataVisibility(y)?u.getDistanceFromCenterForValue(this.getParsed(y).r):0;b=C,a&&(c.animateScale&&(P=0),c.animateRotate&&(x=C=m));const O={x:h,y:p,innerRadius:0,outerRadius:P,startAngle:x,endAngle:C,options:this.resolveDataElementOptions(y,k.active?"active":i)};this.updateElement(k,y,O,i)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((o,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,o){return this.chart.getDataVisibility(e)?Xn(this.resolveDataElementOptions(e,n).angle||o):0}}ue(Ra,"id","polarArea"),ue(Ra,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),ue(Ra,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((a,s)=>{const c=e.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:i,lineWidth:c.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(s),index:s}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class wu extends Xr{}ue(wu,"id","pie"),ue(wu,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class pl extends qn{getLabelAndValue(e){const n=this._cachedMeta.vScale,o=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(e,n,o,i){return Dg.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta,o=n.dataset,i=n.data||[],a=n.iScale.getLabels();if(o.points=i,e!=="resize"){const s=this.resolveDatasetElementOptions(e);this.options.showLine||(s.borderWidth=0);const l={_loop:!0,_fullLoop:a.length===i.length,options:s};this.updateElement(o,void 0,l,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,o,i){const a=this._cachedMeta.rScale,s=i==="reset";for(let l=n;l<n+o;l++){const c=e[l],u=this.resolveDataElementOptions(l,c.active?"active":i),h=a.getPointPositionForValue(l,this.getParsed(l).r),p=s?a.xCenter:h.x,m=s?a.yCenter:h.y,b={x:p,y:m,angle:h.angle,skip:isNaN(p)||isNaN(m),options:u};this.updateElement(c,l,b,i)}}}ue(pl,"id","radar"),ue(pl,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),ue(pl,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class hl extends qn{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:a}=n,s=this.getParsed(e),l=i.getLabelForValue(s.x),c=a.getLabelForValue(s.y);return{label:o[e]||"",value:"("+l+", "+c+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,i=this.chart._animationsDisabled;let{start:a,count:s}=ug(n,o,i);if(this._drawStart=a,this._drawCount=s,fg(n)&&(a=0,s=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:l,_dataset:c}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=o;const u=this.resolveDatasetElementOptions(e);u.segment=this.options.segment,this.updateElement(l,void 0,{animated:!i,options:u},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,a,s,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,o,i){const a=i==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:u}=this._cachedMeta,h=this.resolveDataElementOptions(n,i),p=this.getSharedOptions(h),m=this.includeOptions(i,p),b=s.axis,y=l.axis,{spanGaps:v,segment:k}=this.options,x=Bi(v)?v:Number.POSITIVE_INFINITY,C=this.chart._animationsDisabled||a||i==="none";let P=n>0&&this.getParsed(n-1);for(let O=n;O<n+o;++O){const E=e[O],T=this.getParsed(O),A=C?E:{},M=ze(T[y]),z=A[b]=s.getPixelForValue(T[b],O),W=A[y]=a||M?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,T,c):T[y],O);A.skip=isNaN(z)||isNaN(W)||M,A.stop=O>0&&Math.abs(T[b]-P[b])>x,k&&(A.parsed=T,A.raw=u.data[O]),m&&(A.options=p||this.resolveDataElementOptions(O,E.active?"active":i)),C||this.updateElement(E,O,A,i),P=T}this.updateSharedOptions(p,i,h)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let l=0;for(let c=n.length-1;c>=0;--c)l=Math.max(l,n[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}const o=e.dataset,i=o.options&&o.options.borderWidth||0;if(!n.length)return i;const a=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,s)/2}}ue(hl,"id","scatter"),ue(hl,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),ue(hl,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var hA=Object.freeze({__proto__:null,BarController:cl,BubbleController:ul,DoughnutController:Xr,LineController:fl,PieController:wu,PolarAreaController:Ra,RadarController:pl,ScatterController:hl});function qr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class xu{constructor(e){ue(this,"options");this.options=e||{}}static override(e){Object.assign(xu.prototype,e)}init(){}formats(){return qr()}parse(){return qr()}format(){return qr()}add(){return qr()}diff(){return qr()}startOf(){return qr()}endOf(){return qr()}}var mA={_date:xu};function gA(t,e,n,o){const{controller:i,data:a,_sorted:s}=t,l=i._cachedMeta.iScale;if(l&&e===l.axis&&e!=="r"&&s&&a.length){const c=l._reversePixels?zS:Co;if(o){if(i._sharedOptions){const u=a[0],h=typeof u.getRange=="function"&&u.getRange(e);if(h){const p=c(a,e,n-h),m=c(a,e,n+h);return{lo:p.lo,hi:m.hi}}}}else return c(a,e,n)}return{lo:0,hi:a.length-1}}function Ta(t,e,n,o,i){const a=t.getSortedVisibleDatasetMetas(),s=n[e];for(let l=0,c=a.length;l<c;++l){const{index:u,data:h}=a[l],{lo:p,hi:m}=gA(a[l],e,s,i);for(let b=p;b<=m;++b){const y=h[b];y.skip||o(y,u,b)}}}function bA(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,i){const a=e?Math.abs(o.x-i.x):0,s=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function Su(t,e,n,o,i){const a=[];return!i&&!t.isPointInArea(e)||Ta(t,n,e,function(l,c,u){!i&&!Ao(l,t.chartArea,0)||l.inRange(e.x,e.y,o)&&a.push({element:l,datasetIndex:c,index:u})},!0),a}function yA(t,e,n,o){let i=[];function a(s,l,c){const{startAngle:u,endAngle:h}=s.getProps(["startAngle","endAngle"],o),{angle:p}=ig(s,{x:e.x,y:e.y});Ba(p,u,h)&&i.push({element:s,datasetIndex:l,index:c})}return Ta(t,n,e,a),i}function vA(t,e,n,o,i,a){let s=[];const l=bA(n);let c=Number.POSITIVE_INFINITY;function u(h,p,m){const b=h.inRange(e.x,e.y,i);if(o&&!b)return;const y=h.getCenterPoint(i);if(!(!!a||t.isPointInArea(y))&&!b)return;const k=l(e,y);k<c?(s=[{element:h,datasetIndex:p,index:m}],c=k):k===c&&s.push({element:h,datasetIndex:p,index:m})}return Ta(t,n,e,u),s}function Cu(t,e,n,o,i,a){return!a&&!t.isPointInArea(e)?[]:n==="r"&&!o?yA(t,e,n,i):vA(t,e,n,o,i,a)}function Zg(t,e,n,o,i){const a=[],s=n==="x"?"inXRange":"inYRange";let l=!1;return Ta(t,n,e,(c,u,h)=>{c[s](e[n],i)&&(a.push({element:c,datasetIndex:u,index:h}),l=l||c.inRange(e.x,e.y,i))}),o&&!l?[]:a}var kA={evaluateInteractionItems:Ta,modes:{index(t,e,n,o){const i=Gr(e,t),a=n.axis||"x",s=n.includeInvisible||!1,l=n.intersect?Su(t,i,a,o,s):Cu(t,i,a,!1,o,s),c=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const h=l[0].index,p=u.data[h];p&&!p.skip&&c.push({element:p,datasetIndex:u.index,index:h})}),c):[]},dataset(t,e,n,o){const i=Gr(e,t),a=n.axis||"xy",s=n.includeInvisible||!1;let l=n.intersect?Su(t,i,a,o,s):Cu(t,i,a,!1,o,s);if(l.length>0){const c=l[0].datasetIndex,u=t.getDatasetMeta(c).data;l=[];for(let h=0;h<u.length;++h)l.push({element:u[h],datasetIndex:c,index:h})}return l},point(t,e,n,o){const i=Gr(e,t),a=n.axis||"xy",s=n.includeInvisible||!1;return Su(t,i,a,o,s)},nearest(t,e,n,o){const i=Gr(e,t),a=n.axis||"xy",s=n.includeInvisible||!1;return Cu(t,i,a,n.intersect,o,s)},x(t,e,n,o){const i=Gr(e,t);return Zg(t,i,"x",n.intersect,o)},y(t,e,n,o){const i=Gr(e,t);return Zg(t,i,"y",n.intersect,o)}}};const $g=["left","top","right","bottom"];function Fa(t,e){return t.filter(n=>n.pos===e)}function e0(t,e){return t.filter(n=>$g.indexOf(n.pos)===-1&&n.box.axis===e)}function Ma(t,e){return t.sort((n,o)=>{const i=e?o:n,a=e?n:o;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function wA(t){const e=[];let n,o,i,a,s,l;for(n=0,o=(t||[]).length;n<o;++n)i=t[n],{position:a,options:{stack:s,stackWeight:l=1}}=i,e.push({index:n,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&a+s,stackWeight:l});return e}function xA(t){const e={};for(const n of t){const{stack:o,pos:i,stackWeight:a}=n;if(!o||!$g.includes(i))continue;const s=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return e}function SA(t,e){const n=xA(t),{vBoxMaxWidth:o,hBoxMaxHeight:i}=e;let a,s,l;for(a=0,s=t.length;a<s;++a){l=t[a];const{fullSize:c}=l.box,u=n[l.stack],h=u&&l.stackWeight/u.weight;l.horizontal?(l.width=h?h*o:c&&e.availableWidth,l.height=i):(l.width=o,l.height=h?h*i:c&&e.availableHeight)}return n}function CA(t){const e=wA(t),n=Ma(e.filter(u=>u.box.fullSize),!0),o=Ma(Fa(e,"left"),!0),i=Ma(Fa(e,"right")),a=Ma(Fa(e,"top"),!0),s=Ma(Fa(e,"bottom")),l=e0(e,"x"),c=e0(e,"y");return{fullSize:n,leftAndTop:o.concat(a),rightAndBottom:i.concat(c).concat(s).concat(l),chartArea:Fa(e,"chartArea"),vertical:o.concat(i).concat(c),horizontal:a.concat(s).concat(l)}}function t0(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function n0(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function AA(t,e,n,o){const{pos:i,box:a}=n,s=t.maxPadding;if(!_e(i)){n.size&&(t[i]-=n.size);const p=o[n.stack]||{size:0,count:1};p.size=Math.max(p.size,n.horizontal?a.height:a.width),n.size=p.size/p.count,t[i]+=n.size}a.getPadding&&n0(s,a.getPadding());const l=Math.max(0,e.outerWidth-t0(s,t,"left","right")),c=Math.max(0,e.outerHeight-t0(s,t,"top","bottom")),u=l!==t.w,h=c!==t.h;return t.w=l,t.h=c,n.horizontal?{same:u,other:h}:{same:h,other:u}}function EA(t){const e=t.maxPadding;function n(o){const i=Math.max(e[o]-t[o],0);return t[o]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function DA(t,e){const n=e.maxPadding;function o(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{a[s]=Math.max(e[s],n[s])}),a}return o(t?["left","right"]:["top","bottom"])}function La(t,e,n,o){const i=[];let a,s,l,c,u,h;for(a=0,s=t.length,u=0;a<s;++a){l=t[a],c=l.box,c.update(l.width||e.w,l.height||e.h,DA(l.horizontal,e));const{same:p,other:m}=AA(e,n,l,o);u|=p&&i.length,h=h||m,c.fullSize||i.push(l)}return u&&La(i,e,n,o)||h}function ml(t,e,n,o,i){t.top=n,t.left=e,t.right=e+o,t.bottom=n+i,t.width=o,t.height=i}function o0(t,e,n,o){const i=n.padding;let{x:a,y:s}=e;for(const l of t){const c=l.box,u=o[l.stack]||{count:1,placed:0,weight:1},h=l.stackWeight/u.weight||1;if(l.horizontal){const p=e.w*h,m=u.size||c.height;Ea(u.start)&&(s=u.start),c.fullSize?ml(c,i.left,s,n.outerWidth-i.right-i.left,m):ml(c,e.left+u.placed,s,p,m),u.start=s,u.placed+=p,s=c.bottom}else{const p=e.h*h,m=u.size||c.width;Ea(u.start)&&(a=u.start),c.fullSize?ml(c,a,i.top,m,n.outerHeight-i.bottom-i.top):ml(c,a,e.top+u.placed,m,p),u.start=a,u.placed+=p,a=c.right}}e.x=a,e.y=s}var jt={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,o){if(!t)return;const i=Mt(t.options.layout.padding),a=Math.max(e-i.width,0),s=Math.max(n-i.height,0),l=CA(t.boxes),c=l.vertical,u=l.horizontal;Je(t.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});const h=c.reduce((v,k)=>k.box.options&&k.box.options.display===!1?v:v+1,0)||1,p=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/h,hBoxMaxHeight:s/2}),m=Object.assign({},i);n0(m,Mt(o));const b=Object.assign({maxPadding:m,w:a,h:s,x:i.left,y:i.top},i),y=SA(c.concat(u),p);La(l.fullSize,b,p,y),La(c,b,p,y),La(u,b,p,y)&&La(c,b,p,y),EA(b),o0(l.leftAndTop,b,p,y),b.x+=b.w,b.y+=b.h,o0(l.rightAndBottom,b,p,y),t.chartArea={left:b.left,top:b.top,right:b.left+b.w,bottom:b.top+b.h,height:b.h,width:b.w},Je(l.chartArea,v=>{const k=v.box;Object.assign(k,t.chartArea),k.update(b.w,b.h,{left:0,top:0,right:0,bottom:0})})}};class r0{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,o){}removeEventListener(e,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,o,i){return n=Math.max(0,n||e.width),o=o||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(e){return!0}updateConfig(e){}}class BA extends r0{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const gl="$chartjs",PA={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},i0=t=>t===null||t==="";function IA(t,e){const n=t.style,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[gl]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",i0(i)){const a=Ig(t,"width");a!==void 0&&(t.width=a)}if(i0(o))if(t.style.height==="")t.height=t.width/(e||2);else{const a=Ig(t,"height");a!==void 0&&(t.height=a)}return t}const a0=NC?{passive:!0}:!1;function OA(t,e,n){t&&t.addEventListener(e,n,a0)}function NA(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,a0)}function VA(t,e){const n=PA[t.type]||t.type,{x:o,y:i}=Gr(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:i!==void 0?i:null}}function bl(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function RA(t,e,n){const o=t.canvas,i=new MutationObserver(a=>{let s=!1;for(const l of a)s=s||bl(l.addedNodes,o),s=s&&!bl(l.removedNodes,o);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function TA(t,e,n){const o=t.canvas,i=new MutationObserver(a=>{let s=!1;for(const l of a)s=s||bl(l.removedNodes,o),s=s&&!bl(l.addedNodes,o);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const za=new Map;let s0=0;function l0(){const t=window.devicePixelRatio;t!==s0&&(s0=t,za.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function FA(t,e){za.size||window.addEventListener("resize",l0),za.set(t,e)}function MA(t){za.delete(t),za.size||window.removeEventListener("resize",l0)}function LA(t,e,n){const o=t.canvas,i=o&&bu(o);if(!i)return;const a=cg((l,c)=>{const u=i.clientWidth;n(l,c),u<i.clientWidth&&n()},window),s=new ResizeObserver(l=>{const c=l[0],u=c.contentRect.width,h=c.contentRect.height;u===0&&h===0||a(u,h)});return s.observe(i),FA(t,a),s}function Au(t,e,n){n&&n.disconnect(),e==="resize"&&MA(t)}function zA(t,e,n){const o=t.canvas,i=cg(a=>{t.ctx!==null&&n(VA(a,t))},t);return OA(o,e,i),i}class _A extends r0{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(IA(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[gl])return!1;const o=n[gl].initial;["height","width"].forEach(a=>{const s=o[a];ze(s)?n.removeAttribute(a):n.setAttribute(a,s)});const i=o.style||{};return Object.keys(i).forEach(a=>{n.style[a]=i[a]}),n.width=n.width,delete n[gl],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),s={attach:RA,detach:TA,resize:LA}[n]||zA;i[n]=s(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),i=o[n];if(!i)return;({attach:Au,detach:Au,resize:Au}[n]||NA)(e,n,i),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,i){return OC(e,n,o,i)}isAttached(e){const n=e&&bu(e);return!!(n&&n.isConnected)}}function HA(t){return!gu()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?BA:_A}let Do=(hd=class{constructor(){ue(this,"x");ue(this,"y");ue(this,"active",!1);ue(this,"options");ue(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return Bi(this.x)&&Bi(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const i={};return e.forEach(a=>{i[a]=o[a]&&o[a].active()?o[a]._to:this[a]}),i}},ue(hd,"defaults",{}),ue(hd,"defaultRoutes"),hd);function UA(t,e){const n=t.options.ticks,o=WA(t),i=Math.min(n.maxTicksLimit||o,o),a=n.major.enabled?GA(e):[],s=a.length,l=a[0],c=a[s-1],u=[];if(s>i)return QA(e,u,a,s/i),u;const h=jA(a,e,i);if(s>0){let p,m;const b=s>1?Math.round((c-l)/(s-1)):null;for(yl(e,u,h,ze(b)?0:l-b,l),p=0,m=s-1;p<m;p++)yl(e,u,h,a[p],a[p+1]);return yl(e,u,h,c,ze(b)?e.length:c+b),u}return yl(e,u,h),u}function WA(t){const e=t.options.offset,n=t._tickSize(),o=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(o,i))}function jA(t,e,n){const o=XA(t),i=e.length/n;if(!o)return Math.max(i,1);const a=TS(o);for(let s=0,l=a.length-1;s<l;s++){const c=a[s];if(c>i)return c}return Math.max(i,1)}function GA(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function QA(t,e,n,o){let i=0,a=n[0],s;for(o=Math.ceil(o),s=0;s<t.length;s++)s===a&&(e.push(t[s]),i++,a=n[i*o])}function yl(t,e,n,o,i){const a=Oe(o,0),s=Math.min(Oe(i,t.length),t.length);let l=0,c,u,h;for(n=Math.ceil(n),i&&(c=i-o,n=c/Math.floor(c/n)),h=a;h<0;)l++,h=Math.round(a+l*n);for(u=Math.max(a,0);u<s;u++)u===h&&(e.push(t[u]),l++,h=Math.round(a+l*n))}function XA(t){const e=t.length;let n,o;if(e<2)return!1;for(o=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==o)return!1;return o}const qA=t=>t==="left"?"right":t==="right"?"left":t,d0=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,c0=(t,e)=>Math.min(e||t,t);function u0(t,e){const n=[],o=t.length/e,i=t.length;let a=0;for(;a<i;a+=o)n.push(t[Math.floor(a)]);return n}function KA(t,e,n){const o=t.ticks.length,i=Math.min(e,o-1),a=t._startPixel,s=t._endPixel,l=1e-6;let c=t.getPixelForTick(i),u;if(!(n&&(o===1?u=Math.max(c-a,s-c):e===0?u=(t.getPixelForTick(1)-c)/2:u=(c-t.getPixelForTick(i-1))/2,c+=i<e?u:-u,c<a-l||c>s+l)))return c}function JA(t,e){Je(t,n=>{const o=n.gc,i=o.length/2;let a;if(i>e){for(a=0;a<i;++a)delete n.data[o[a]];o.splice(0,i)}})}function _a(t){return t.drawTicks?t.tickLength:0}function f0(t,e){if(!t.display)return 0;const n=At(t.font,e),o=Mt(t.padding);return(ot(t.text)?t.text.length:1)*n.lineHeight+o.height}function YA(t,e){return cr(t,{scale:e,type:"scale"})}function ZA(t,e,n){return cr(t,{tick:n,index:e,type:"tick"})}function $A(t,e,n){let o=au(t);return(n&&e!=="right"||!n&&e==="right")&&(o=qA(o)),o}function e4(t,e,n,o){const{top:i,left:a,bottom:s,right:l,chart:c}=t,{chartArea:u,scales:h}=c;let p=0,m,b,y;const v=s-i,k=l-a;if(t.isHorizontal()){if(b=Wt(o,a,l),_e(n)){const x=Object.keys(n)[0],C=n[x];y=h[x].getPixelForValue(C)+v-e}else n==="center"?y=(u.bottom+u.top)/2+v-e:y=d0(t,n,e);m=l-a}else{if(_e(n)){const x=Object.keys(n)[0],C=n[x];b=h[x].getPixelForValue(C)-k+e}else n==="center"?b=(u.left+u.right)/2-k+e:b=d0(t,n,e);y=Wt(o,s,i),p=n==="left"?-kt:kt}return{titleX:b,titleY:y,maxWidth:m,rotation:p}}class Kr extends Do{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return e=kn(e,Number.POSITIVE_INFINITY),n=kn(n,Number.NEGATIVE_INFINITY),o=kn(o,Number.POSITIVE_INFINITY),i=kn(i,Number.NEGATIVE_INFINITY),{min:kn(e,o),max:kn(n,i),minDefined:yt(e),maxDefined:yt(n)}}getMinMax(e){let{min:n,max:o,minDefined:i,maxDefined:a}=this.getUserBounds(),s;if(i&&a)return{min:n,max:o};const l=this.getMatchingVisibleMetas();for(let c=0,u=l.length;c<u;++c)s=l[c].controller.getMinMax(this,e),i||(n=Math.min(n,s.min)),a||(o=Math.max(o,s.max));return n=a&&n>o?o:n,o=i&&n>o?n:o,{min:kn(n,kn(o,n)),max:kn(o,kn(n,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 e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$e(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:i,grace:a,ticks:s}=this.options,l=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,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=dC(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?u0(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=UA(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,e=!e),this._startPixel=n,this._endPixel=o,this._reversePixels=e,this._length=o-n,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(e){this.chart.notifyPlugins(e,this.getContext()),$e(this.options[e],[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(e){const n=this.options.ticks;let o,i,a;for(o=0,i=e.length;o<i;o++)a=e[o],a.label=$e(n.callback,[a.value,o,e],this)}afterTickToLabelConversion(){$e(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){$e(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=c0(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,a=n.maxRotation;let s=i,l,c,u;if(!this._isVisible()||!n.display||i>=a||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const h=this._getLabelSizes(),p=h.widest.width,m=h.highest.height,b=Ot(this.chart.width-p,0,this.maxWidth);l=e.offset?this.maxWidth/o:b/(o-1),p+6>l&&(l=b/(o-(e.offset?.5:1)),c=this.maxHeight-_a(e.grid)-n.padding-f0(e.title,this.chart.options.font),u=Math.sqrt(p*p+m*m),s=ou(Math.min(Math.asin(Ot((h.highest.height+6)/l,-1,1)),Math.asin(Ot(c/u,-1,1))-Math.asin(Ot(m/u,-1,1)))),s=Math.max(i,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){$e(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$e(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:a}}=this,s=this._isVisible(),l=this.isHorizontal();if(s){const c=f0(i,n.options.font);if(l?(e.width=this.maxWidth,e.height=_a(a)+c):(e.height=this.maxHeight,e.width=_a(a)+c),o.display&&this.ticks.length){const{first:u,last:h,widest:p,highest:m}=this._getLabelSizes(),b=o.padding*2,y=Xn(this.labelRotation),v=Math.cos(y),k=Math.sin(y);if(l){const x=o.mirror?0:k*p.width+v*m.height;e.height=Math.min(this.maxHeight,e.height+x+b)}else{const x=o.mirror?0:v*p.width+k*m.height;e.width=Math.min(this.maxWidth,e.width+x+b)}this._calculatePadding(u,h,k,v)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,o,i){const{ticks:{align:a,padding:s},position:l}=this.options,c=this.labelRotation!==0,u=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1);let m=0,b=0;c?u?(m=i*e.width,b=o*n.height):(m=o*e.height,b=i*n.width):a==="start"?b=n.width:a==="end"?m=e.width:a!=="inner"&&(m=e.width/2,b=n.width/2),this.paddingLeft=Math.max((m-h+s)*this.width/(this.width-h),0),this.paddingRight=Math.max((b-p+s)*this.width/(this.width-p),0)}else{let h=n.height/2,p=e.height/2;a==="start"?(h=0,p=e.height):a==="end"&&(h=n.height,p=0),this.paddingTop=h+s,this.paddingBottom=p+s}}_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:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,o;for(n=0,o=e.length;n<o;n++)ze(e[n].label)&&(e.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=u0(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:i,_longestTextCache:a}=this,s=[],l=[],c=Math.floor(n/c0(n,o));let u=0,h=0,p,m,b,y,v,k,x,C,P,O,E;for(p=0;p<n;p+=c){if(y=e[p].label,v=this._resolveTickFontOptions(p),i.font=k=v.string,x=a[k]=a[k]||{data:{},gc:[]},C=v.lineHeight,P=O=0,!ze(y)&&!ot(y))P=ol(i,x.data,x.gc,P,y),O=C;else if(ot(y))for(m=0,b=y.length;m<b;++m)E=y[m],!ze(E)&&!ot(E)&&(P=ol(i,x.data,x.gc,P,E),O+=C);s.push(P),l.push(O),u=Math.max(P,u),h=Math.max(O,h)}JA(a,n);const T=s.indexOf(u),A=l.indexOf(h),M=z=>({width:s[z]||0,height:l[z]||0});return{first:M(0),last:M(n-1),widest:M(T),highest:M(A),widths:s,heights:l}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return LS(this._alignToPixels?Hr(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const o=n[e];return o.$context||(o.$context=ZA(this.getContext(),e,o))}return this.$context||(this.$context=YA(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Xn(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),a=this._getLabelSizes(),s=e.autoSkipPadding||0,l=a?a.widest.width+s:0,c=a?a.highest.height+s:0;return this.isHorizontal()?c*o>l*i?l/o:c/i:c*i<l*o?c/o:l/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,o=this.chart,i=this.options,{grid:a,position:s,border:l}=i,c=a.offset,u=this.isHorizontal(),p=this.ticks.length+(c?1:0),m=_a(a),b=[],y=l.setContext(this.getContext()),v=y.display?y.width:0,k=v/2,x=function(D){return Hr(o,D,v)};let C,P,O,E,T,A,M,z,W,Q,N,F;if(s==="top")C=x(this.bottom),A=this.bottom-m,z=C-k,Q=x(e.top)+k,F=e.bottom;else if(s==="bottom")C=x(this.top),Q=e.top,F=x(e.bottom)-k,A=C+k,z=this.top+m;else if(s==="left")C=x(this.right),T=this.right-m,M=C-k,W=x(e.left)+k,N=e.right;else if(s==="right")C=x(this.left),W=e.left,N=x(e.right)-k,T=C+k,M=this.left+m;else if(n==="x"){if(s==="center")C=x((e.top+e.bottom)/2+.5);else if(_e(s)){const D=Object.keys(s)[0],U=s[D];C=x(this.chart.scales[D].getPixelForValue(U))}Q=e.top,F=e.bottom,A=C+k,z=A+m}else if(n==="y"){if(s==="center")C=x((e.left+e.right)/2);else if(_e(s)){const D=Object.keys(s)[0],U=s[D];C=x(this.chart.scales[D].getPixelForValue(U))}T=C-k,M=T-m,W=e.left,N=e.right}const V=Oe(i.ticks.maxTicksLimit,p),R=Math.max(1,Math.ceil(p/V));for(P=0;P<p;P+=R){const D=this.getContext(P),U=a.setContext(D),q=l.setContext(D),ne=U.lineWidth,le=U.color,ge=q.dash||[],ce=q.dashOffset,j=U.tickWidth,ee=U.tickColor,H=U.tickBorderDash||[],J=U.tickBorderDashOffset;O=KA(this,P,c),O!==void 0&&(E=Hr(o,O,ne),u?T=M=W=N=E:A=z=Q=F=E,b.push({tx1:T,ty1:A,tx2:M,ty2:z,x1:W,y1:Q,x2:N,y2:F,width:ne,color:le,borderDash:ge,borderDashOffset:ce,tickWidth:j,tickColor:ee,tickBorderDash:H,tickBorderDashOffset:J}))}return this._ticksLength=p,this._borderValue=C,b}_computeLabelItems(e){const n=this.axis,o=this.options,{position:i,ticks:a}=o,s=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:u,padding:h,mirror:p}=a,m=_a(o.grid),b=m+h,y=p?-h:b,v=-Xn(this.labelRotation),k=[];let x,C,P,O,E,T,A,M,z,W,Q,N,F="middle";if(i==="top")T=this.bottom-y,A=this._getXAxisLabelAlignment();else if(i==="bottom")T=this.top+y,A=this._getXAxisLabelAlignment();else if(i==="left"){const R=this._getYAxisLabelAlignment(m);A=R.textAlign,E=R.x}else if(i==="right"){const R=this._getYAxisLabelAlignment(m);A=R.textAlign,E=R.x}else if(n==="x"){if(i==="center")T=(e.top+e.bottom)/2+b;else if(_e(i)){const R=Object.keys(i)[0],D=i[R];T=this.chart.scales[R].getPixelForValue(D)+b}A=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")E=(e.left+e.right)/2-b;else if(_e(i)){const R=Object.keys(i)[0],D=i[R];E=this.chart.scales[R].getPixelForValue(D)}A=this._getYAxisLabelAlignment(m).textAlign}n==="y"&&(c==="start"?F="top":c==="end"&&(F="bottom"));const V=this._getLabelSizes();for(x=0,C=l.length;x<C;++x){P=l[x],O=P.label;const R=a.setContext(this.getContext(x));M=this.getPixelForTick(x)+a.labelOffset,z=this._resolveTickFontOptions(x),W=z.lineHeight,Q=ot(O)?O.length:1;const D=Q/2,U=R.color,q=R.textStrokeColor,ne=R.textStrokeWidth;let le=A;s?(E=M,A==="inner"&&(x===C-1?le=this.options.reverse?"left":"right":x===0?le=this.options.reverse?"right":"left":le="center"),i==="top"?u==="near"||v!==0?N=-Q*W+W/2:u==="center"?N=-V.highest.height/2-D*W+W:N=-V.highest.height+W/2:u==="near"||v!==0?N=W/2:u==="center"?N=V.highest.height/2-D*W:N=V.highest.height-Q*W,p&&(N*=-1),v!==0&&!R.showLabelBackdrop&&(E+=W/2*Math.sin(v))):(T=M,N=(1-Q)*W/2);let ge;if(R.showLabelBackdrop){const ce=Mt(R.backdropPadding),j=V.heights[x],ee=V.widths[x];let H=N-ce.top,J=0-ce.left;switch(F){case"middle":H-=j/2;break;case"bottom":H-=j;break}switch(A){case"center":J-=ee/2;break;case"right":J-=ee;break;case"inner":x===C-1?J-=ee:x>0&&(J-=ee/2);break}ge={left:J,top:H,width:ee+ce.width,height:j+ce.height,color:R.backdropColor}}k.push({label:O,font:z,textOffset:N,options:{rotation:v,color:U,strokeColor:q,strokeWidth:ne,textAlign:le,textBaseline:F,translation:[E,T],backdrop:ge}})}return k}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Xn(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:o,mirror:i,padding:a}}=this.options,s=this._getLabelSizes(),l=e+a,c=s.widest.width;let u,h;return n==="left"?i?(h=this.right+a,o==="near"?u="left":o==="center"?(u="center",h+=c/2):(u="right",h+=c)):(h=this.right-l,o==="near"?u="right":o==="center"?(u="center",h-=c/2):(u="left",h=this.left)):n==="right"?i?(h=this.left+a,o==="near"?u="right":o==="center"?(u="center",h-=c/2):(u="left",h-=c)):(h=this.left+l,o==="near"?u="left":o==="center"?(u="center",h+=c/2):(u="right",h=this.right)):u="right",{textAlign:u,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:o,top:i,width:a,height:s}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,i,a,s),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(a=>a.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let a,s;const l=(c,u,h)=>{!h.width||!h.color||(o.save(),o.lineWidth=h.width,o.strokeStyle=h.color,o.setLineDash(h.borderDash||[]),o.lineDashOffset=h.borderDashOffset,o.beginPath(),o.moveTo(c.x,c.y),o.lineTo(u.x,u.y),o.stroke(),o.restore())};if(n.display)for(a=0,s=i.length;a<s;++a){const c=i[a];n.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:i}}=this,a=o.setContext(this.getContext()),s=o.display?a.width:0;if(!s)return;const l=i.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let u,h,p,m;this.isHorizontal()?(u=Hr(e,this.left,s)-s/2,h=Hr(e,this.right,l)+l/2,p=m=c):(p=Hr(e,this.top,s)-s/2,m=Hr(e,this.bottom,l)+l/2,u=h=c),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(u,p),n.lineTo(h,m),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,i=this._computeLabelArea();i&&rl(o,i);const a=this.getLabelItems(e);for(const s of a){const l=s.options,c=s.font,u=s.label,h=s.textOffset;Ur(o,u,0,h,c,l)}i&&il(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const a=At(o.font),s=Mt(o.padding),l=o.align;let c=a.lineHeight/2;n==="bottom"||n==="center"||_e(n)?(c+=s.bottom,ot(o.text)&&(c+=a.lineHeight*(o.text.length-1))):c+=s.top;const{titleX:u,titleY:h,maxWidth:p,rotation:m}=e4(this,c,n,l);Ur(e,o.text,0,0,a,{color:o.color,maxWidth:p,rotation:m,textAlign:$A(l,n,i),textBaseline:"middle",translation:[u,h]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,o=Oe(e.grid&&e.grid.z,-1),i=Oe(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Kr.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:o,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let a,s;for(a=0,s=n.length;a<s;++a){const l=n[a];l[o]===this.id&&(!e||l.type===e)&&i.push(l)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return At(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class vl{constructor(e,n,o){this.type=e,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let o;o4(n)&&(o=this.register(n));const i=this.items,a=e.id,s=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+e);return a in i||(i[a]=e,t4(e,s,o),this.override&&pt.override(e.id,e.overrides)),s}get(e){return this.items[e]}unregister(e){const n=this.items,o=e.id,i=this.scope;o in n&&delete n[o],i&&o in pt[i]&&(delete pt[i][o],this.override&&delete _r[o])}}function t4(t,e,n){const o=lo(Object.create(null),[n?pt.get(n):{},pt.get(e),t.defaults]);pt.set(e,o),t.defaultRoutes&&n4(e,t.defaultRoutes),t.descriptors&&pt.describe(e,t.descriptors)}function n4(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),i=o.pop(),a=[t].concat(o).join("."),s=e[n].split("."),l=s.pop(),c=s.join(".");pt.route(a,i,c,l)})}function o4(t){return"id"in t&&"defaults"in t}class r4{constructor(){this.controllers=new vl(qn,"datasets",!0),this.elements=new vl(Do,"elements"),this.plugins=new vl(Object,"plugins"),this.scales=new vl(Kr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,o){[...n].forEach(i=>{const a=o||this._getRegistryForType(i);o||a.isForType(i)||a===this.plugins&&i.id?this._exec(e,a,i):Je(i,s=>{const l=o||this._getRegistryForType(s);this._exec(e,l,s)})})}_exec(e,n,o){const i=nu(e);$e(o["before"+i],[],o),n[e](o),$e(o["after"+i],[],o)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(e))return o}return this.plugins}_get(e,n,o){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+o+".");return i}}var uo=new r4;class i4{constructor(){this._init=[]}notify(e,n,o,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const a=i?this._descriptors(e).filter(i):this._descriptors(e),s=this._notify(a,e,n,o);return n==="afterDestroy"&&(this._notify(a,e,"stop"),this._notify(this._init,e,"uninstall")),s}_notify(e,n,o,i){i=i||{};for(const a of e){const s=a.plugin,l=s[o],c=[n,i,a.options];if($e(l,c,s)===!1&&i.cancelable)return!1}return!0}invalidate(){ze(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const o=e&&e.config,i=Oe(o.options&&o.options.plugins,{}),a=a4(o);return i===!1&&!n?[]:l4(e,a,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,i=(a,s)=>a.filter(l=>!s.some(c=>l.plugin.id===c.plugin.id));this._notify(i(n,o),e,"stop"),this._notify(i(o,n),e,"start")}}function a4(t){const e={},n=[],o=Object.keys(uo.plugins.items);for(let a=0;a<o.length;a++)n.push(uo.getPlugin(o[a]));const i=t.plugins||[];for(let a=0;a<i.length;a++){const s=i[a];n.indexOf(s)===-1&&(n.push(s),e[s.id]=!0)}return{plugins:n,localIds:e}}function s4(t,e){return!e&&t===!1?null:t===!0?{}:t}function l4(t,{plugins:e,localIds:n},o,i){const a=[],s=t.getContext();for(const l of e){const c=l.id,u=s4(o[c],i);u!==null&&a.push({plugin:l,options:d4(t.config,{plugin:l,local:n[c]},u,s)})}return a}function d4(t,{plugin:e,local:n},o,i){const a=t.pluginScopeKeys(e),s=t.getOptionScopes(o,a);return n&&e.defaults&&s.push(e.defaults),t.createResolver(s,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Eu(t,e){const n=pt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function c4(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function u4(t,e){return t===e?"_index_":"_value_"}function p0(t){if(t==="x"||t==="y"||t==="r")return t}function f4(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Du(t,...e){if(p0(t))return t;for(const n of e){const o=n.axis||f4(n.position)||t.length>1&&p0(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function h0(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function p4(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(o=>o.xAxisID===t||o.yAxisID===t);if(n.length)return h0(t,"x",n[0])||h0(t,"y",n[0])}return{}}function h4(t,e){const n=_r[t.type]||{scales:{}},o=e.scales||{},i=Eu(t.type,e),a=Object.create(null);return Object.keys(o).forEach(s=>{const l=o[s];if(!_e(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 c=Du(s,l,p4(s,t),pt.scales[l.type]),u=u4(c,i),h=n.scales||{};a[s]=Aa(Object.create(null),[{axis:c},l,h[c],h[u]])}),t.data.datasets.forEach(s=>{const l=s.type||t.type,c=s.indexAxis||Eu(l,e),h=(_r[l]||{}).scales||{};Object.keys(h).forEach(p=>{const m=c4(p,c),b=s[m+"AxisID"]||m;a[b]=a[b]||Object.create(null),Aa(a[b],[{axis:m},o[b],h[p]])})}),Object.keys(a).forEach(s=>{const l=a[s];Aa(l,[pt.scales[l.type],pt.scale])}),a}function m0(t){const e=t.options||(t.options={});e.plugins=Oe(e.plugins,{}),e.scales=h4(t,e)}function g0(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function m4(t){return t=t||{},t.data=g0(t.data),m0(t),t}const b0=new Map,y0=new Set;function kl(t,e){let n=b0.get(t);return n||(n=e(),b0.set(t,n),y0.add(n)),n}const Ha=(t,e,n)=>{const o=sr(e,n);o!==void 0&&t.add(o)};class g4{constructor(e){this._config=m4(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=g0(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),m0(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return kl(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return kl(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return kl(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return kl(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const o=this._scopeCache;let i=o.get(e);return(!i||n)&&(i=new Map,o.set(e,i)),i}getOptionScopes(e,n,o){const{options:i,type:a}=this,s=this._cachedScopes(e,o),l=s.get(n);if(l)return l;const c=new Set;n.forEach(h=>{e&&(c.add(e),h.forEach(p=>Ha(c,e,p))),h.forEach(p=>Ha(c,i,p)),h.forEach(p=>Ha(c,_r[a]||{},p)),h.forEach(p=>Ha(c,pt,p)),h.forEach(p=>Ha(c,du,p))});const u=Array.from(c);return u.length===0&&u.push(Object.create(null)),y0.has(n)&&s.set(n,u),u}chartOptionScopes(){const{options:e,type:n}=this;return[e,_r[n]||{},pt.datasets[n]||{},{type:n},pt,du]}resolveNamedOptions(e,n,o,i=[""]){const a={$shared:!0},{resolver:s,subPrefixes:l}=v0(this._resolverCache,e,i);let c=s;if(y4(s,n)){a.$shared=!1,o=lr(o)?o():o;const u=this.createResolver(e,o,l);c=Pi(s,o,u)}for(const u of n)a[u]=c[u];return a}createResolver(e,n,o=[""],i){const{resolver:a}=v0(this._resolverCache,e,o);return _e(n)?Pi(a,n,void 0,i):a}}function v0(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const i=n.join();let a=o.get(i);return a||(a={resolver:pu(e,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},o.set(i,a)),a}const b4=t=>_e(t)&&Object.getOwnPropertyNames(t).some(e=>lr(t[e]));function y4(t,e){const{isScriptable:n,isIndexable:o}=wg(t);for(const i of e){const a=n(i),s=o(i),l=(s||a)&&t[i];if(a&&(lr(l)||b4(l))||s&&ot(l))return!0}return!1}var v4="4.4.3";const k4=["top","bottom","left","right","chartArea"];function k0(t,e){return t==="top"||t==="bottom"||k4.indexOf(t)===-1&&e==="x"}function w0(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function x0(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),$e(n&&n.onComplete,[t],e)}function w4(t){const e=t.chart,n=e.options.animation;$e(n&&n.onProgress,[t],e)}function S0(t){return gu()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const wl={},C0=t=>{const e=S0(t);return Object.values(wl).filter(n=>n.canvas===e).pop()};function x4(t,e,n){const o=Object.keys(t);for(const i of o){const a=+i;if(a>=e){const s=t[i];delete t[i],(n>0||a>e)&&(t[a+n]=s)}}}function S4(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}function xl(t,e,n){return t.options.clip?t[n]:e[n]}function C4(t,e){const{xScale:n,yScale:o}=t;return n&&o?{left:xl(n,e,"left"),right:xl(n,e,"right"),top:xl(o,e,"top"),bottom:xl(o,e,"bottom")}:e}class on{static register(...e){uo.add(...e),A0()}static unregister(...e){uo.remove(...e),A0()}constructor(e,n){const o=this.config=new g4(n),i=S0(e),a=C0(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const s=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||HA(i)),this.platform.updateConfig(o);const l=this.platform.acquireContext(i,s.aspectRatio),c=l&&l.canvas,u=c&&c.height,h=c&&c.width;if(this.id=ES(),this.ctx=l,this.canvas=c,this.width=h,this.height=u,this._options=s,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 i4,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=US(p=>this.update(p),s.resizeDelay||0),this._dataChanges=[],wl[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}Eo.listen(this,"complete",x0),Eo.listen(this,"progress",w4),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:i,_aspectRatio:a}=this;return ze(e)?n&&a?a:i?o/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return uo}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Pg(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return yg(this.canvas,this.ctx),this}stop(){return Eo.stop(this),this}resize(e,n){Eo.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,i=this.canvas,a=o.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,e,n,a),l=o.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Pg(this,l,!0)&&(this.notifyPlugins("resize",{size:s}),$e(o.onResize,[this,s],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Je(n,(o,i)=>{o.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,i=Object.keys(o).reduce((s,l)=>(s[l]=!1,s),{});let a=[];n&&(a=a.concat(Object.keys(n).map(s=>{const l=n[s],c=Du(s,l),u=c==="r",h=c==="x";return{options:l,dposition:u?"chartArea":h?"bottom":"left",dtype:u?"radialLinear":h?"category":"linear"}}))),Je(a,s=>{const l=s.options,c=l.id,u=Du(c,l),h=Oe(l.type,s.dtype);(l.position===void 0||k0(l.position,u)!==k0(s.dposition))&&(l.position=s.dposition),i[c]=!0;let p=null;if(c in o&&o[c].type===h)p=o[c];else{const m=uo.getScale(h);p=new m({id:c,type:h,ctx:this.ctx,chart:this}),o[p.id]=p}p.init(l,e)}),Je(i,(s,l)=>{s||delete o[l]}),Je(o,s=>{jt.configure(this,s,s.options),jt.addBox(this,s)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((i,a)=>i.index-a.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort(w0("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,i)=>{n.filter(a=>a===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const a=n[o];let s=this.getDatasetMeta(o);const l=a.type||this.config.type;if(s.type&&s.type!==l&&(this._destroyDatasetMeta(o),s=this.getDatasetMeta(o)),s.type=l,s.indexAxis=a.indexAxis||Eu(l,this.options),s.order=a.order||0,s.index=o,s.label=""+a.label,s.visible=this.isDatasetVisible(o),s.controller)s.controller.updateIndex(o),s.controller.linkScales();else{const c=uo.getController(l),{datasetElementType:u,dataElementType:h}=pt.datasets[l];Object.assign(c,{dataElementType:uo.getElement(h),datasetElementType:u&&uo.getElement(u)}),s.controller=new c(this,o),e.push(s.controller)}}return this._updateMetasets(),e}_resetElements(){Je(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let u=0,h=this.data.datasets.length;u<h;u++){const{controller:p}=this.getDatasetMeta(u),m=!i&&a.indexOf(p)===-1;p.buildOrUpdateElements(m),s=Math.max(+p.getMaxOverflow(),s)}s=this._minPadding=o.layout.autoPadding?s:0,this._updateLayout(s),i||Je(a,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(w0("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){Je(this.scales,e=>{jt.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!eg(n,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:a}of n){const s=o==="_removeElements"?-a:a;x4(e,i,s)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=a=>new Set(e.filter(s=>s[0]===a).map((s,l)=>l+","+s.splice(1).join(","))),i=o(0);for(let a=1;a<n;a++)if(!eg(i,o(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;jt.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],Je(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,lr(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const o=this.getDatasetMeta(e),i={meta:o,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Eo.has(this)?this.attached&&!Eo.running(this)&&Eo.start(this):(this.draw(),x0({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resize(o,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,o=[];let i,a;for(i=0,a=n.length;i<a;++i){const s=n[i];(!e||s.visible)&&o.push(s)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,o=e._clip,i=!o.disabled,a=C4(e,this.chartArea),s={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&rl(n,{left:o.left===!1?0:a.left-o.left,right:o.right===!1?this.width:a.right+o.right,top:o.top===!1?0:a.top-o.top,bottom:o.bottom===!1?this.height:a.bottom+o.bottom}),e.controller.draw(),i&&il(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return Ao(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,i){const a=kA.modes[n];return typeof a=="function"?a(this,e,o,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let i=o.filter(a=>a&&a._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=cr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(e,n){const o=this.getDatasetMeta(e);o.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,o){const i=o?"show":"hide",a=this.getDatasetMeta(e),s=a.controller._resolveAnimations(void 0,i);Ea(n)?(a.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),s.update(a,{visible:o}),this.update(l=>l.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Eo.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),yg(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete wl[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,o=(a,s)=>{n.addEventListener(this,a,s),e[a]=s},i=(a,s,l)=>{a.offsetX=s,a.offsetY=l,this._eventHandler(a)};Je(this.options.events,a=>o(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(c,u)=>{n.addEventListener(this,c,u),e[c]=u},i=(c,u)=>{e[c]&&(n.removeEventListener(this,c,u),delete e[c])},a=(c,u)=>{this.canvas&&this.resize(c,u)};let s;const l=()=>{i("attach",l),this.attached=!0,this.resize(),o("resize",a),o("detach",s)};s=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),o("attach",l)},n.isAttached(this.canvas)?l():s()}unbindEvents(){Je(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Je(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const i=o?"set":"remove";let a,s,l,c;for(n==="dataset"&&(a=this.getDatasetMeta(e[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),l=0,c=e.length;l<c;++l){s=e[l];const u=s&&this.getDatasetMeta(s.datasetIndex).controller;u&&u[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:a,index:s})=>{const l=this.getDatasetMeta(a);if(!l)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:l.data[s],index:s}});!Zs(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(e,n,o){return this._plugins.notify(this,e,n,o)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,o){const i=this.options.hover,a=(c,u)=>c.filter(h=>!u.some(p=>h.datasetIndex===p.datasetIndex&&h.index===p.index)),s=a(n,e),l=o?e:a(e,n);s.length&&this.updateHoverStyle(s,i.mode,!1),l.length&&i.mode&&this.updateHoverStyle(l,i.mode,!0)}_eventHandler(e,n){const o={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=s=>(s.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const a=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(a||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:i=[],options:a}=this,s=n,l=this._getActiveElements(e,i,o,s),c=NS(e),u=S4(e,this._lastEvent,o,c);o&&(this._lastEvent=null,$e(a.onHover,[e,l,this],this),c&&$e(a.onClick,[e,l,this],this));const h=!Zs(l,i);return(h||n)&&(this._active=l,this._updateHoverStyles(l,i,n)),this._lastEvent=u,h}_getActiveElements(e,n,o,i){if(e.type==="mouseout")return[];if(!o)return n;const a=this.options.hover;return this.getElementsAtEventForMode(e,a.mode,a,i)}}ue(on,"defaults",pt),ue(on,"instances",wl),ue(on,"overrides",_r),ue(on,"registry",uo),ue(on,"version",v4),ue(on,"getChart",C0);function A0(){return Je(on.instances,t=>t._plugins.invalidate())}function A4(t,e,n){const{startAngle:o,pixelMargin:i,x:a,y:s,outerRadius:l,innerRadius:c}=e;let u=i/l;t.beginPath(),t.arc(a,s,l,o-u,n+u),c>i?(u=i/c,t.arc(a,s,c,n+u,o-u,!0)):t.arc(a,s,i,n+kt,o-kt),t.closePath(),t.clip()}function E4(t){return fu(t,["outerStart","outerEnd","innerStart","innerEnd"])}function D4(t,e,n,o){const i=E4(t.options.borderRadius),a=(n-e)/2,s=Math.min(a,o*e/2),l=c=>{const u=(n-Math.min(a,c))*o/2;return Ot(c,0,Math.min(a,u))};return{outerStart:l(i.outerStart),outerEnd:l(i.outerEnd),innerStart:Ot(i.innerStart,0,s),innerEnd:Ot(i.innerEnd,0,s)}}function Ni(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function Sl(t,e,n,o,i,a){const{x:s,y:l,startAngle:c,pixelMargin:u,innerRadius:h}=e,p=Math.max(e.outerRadius+o+n-u,0),m=h>0?h+o+n+u:0;let b=0;const y=i-c;if(o){const R=h>0?h-o:0,D=p>0?p-o:0,U=(R+D)/2,q=U!==0?y*U/(U+o):y;b=(y-q)/2}const v=Math.max(.001,y*p-n/rt)/p,k=(y-v)/2,x=c+k+b,C=i-k-b,{outerStart:P,outerEnd:O,innerStart:E,innerEnd:T}=D4(e,m,p,C-x),A=p-P,M=p-O,z=x+P/A,W=C-O/M,Q=m+E,N=m+T,F=x+E/Q,V=C-T/N;if(t.beginPath(),a){const R=(z+W)/2;if(t.arc(s,l,p,z,R),t.arc(s,l,p,R,W),O>0){const ne=Ni(M,W,s,l);t.arc(ne.x,ne.y,O,W,C+kt)}const D=Ni(N,C,s,l);if(t.lineTo(D.x,D.y),T>0){const ne=Ni(N,V,s,l);t.arc(ne.x,ne.y,T,C+kt,V+Math.PI)}const U=(C-T/m+(x+E/m))/2;if(t.arc(s,l,m,C-T/m,U,!0),t.arc(s,l,m,U,x+E/m,!0),E>0){const ne=Ni(Q,F,s,l);t.arc(ne.x,ne.y,E,F+Math.PI,x-kt)}const q=Ni(A,x,s,l);if(t.lineTo(q.x,q.y),P>0){const ne=Ni(A,z,s,l);t.arc(ne.x,ne.y,P,x-kt,z)}}else{t.moveTo(s,l);const R=Math.cos(z)*p+s,D=Math.sin(z)*p+l;t.lineTo(R,D);const U=Math.cos(W)*p+s,q=Math.sin(W)*p+l;t.lineTo(U,q)}t.closePath()}function B4(t,e,n,o,i){const{fullCircles:a,startAngle:s,circumference:l}=e;let c=e.endAngle;if(a){Sl(t,e,n,o,c,i);for(let u=0;u<a;++u)t.fill();isNaN(l)||(c=s+(l%it||it))}return Sl(t,e,n,o,c,i),t.fill(),c}function P4(t,e,n,o,i){const{fullCircles:a,startAngle:s,circumference:l,options:c}=e,{borderWidth:u,borderJoinStyle:h,borderDash:p,borderDashOffset:m}=c,b=c.borderAlign==="inner";if(!u)return;t.setLineDash(p||[]),t.lineDashOffset=m,b?(t.lineWidth=u*2,t.lineJoin=h||"round"):(t.lineWidth=u,t.lineJoin=h||"bevel");let y=e.endAngle;if(a){Sl(t,e,n,o,y,i);for(let v=0;v<a;++v)t.stroke();isNaN(l)||(y=s+(l%it||it))}b&&A4(t,e,y),a||(Sl(t,e,n,o,y,i),t.stroke())}class Vi extends Do{constructor(n){super();ue(this,"circumference");ue(this,"endAngle");ue(this,"fullCircles");ue(this,"innerRadius");ue(this,"outerRadius");ue(this,"pixelMargin");ue(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,o,i){const a=this.getProps(["x","y"],i),{angle:s,distance:l}=ig(a,{x:n,y:o}),{startAngle:c,endAngle:u,innerRadius:h,outerRadius:p,circumference:m}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),b=(this.options.spacing+this.options.borderWidth)/2,v=Oe(m,u-c)>=it||Ba(s,c,u),k=So(l,h+b,p+b);return v&&k}getCenterPoint(n){const{x:o,y:i,startAngle:a,endAngle:s,innerRadius:l,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:u,spacing:h}=this.options,p=(a+s)/2,m=(l+c+h+u)/2;return{x:o+Math.cos(p)*m,y:i+Math.sin(p)*m}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:i}=this,a=(o.offset||0)/4,s=(o.spacing||0)/2,l=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=i>it?Math.floor(i/it):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const c=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(c)*a,Math.sin(c)*a);const u=1-Math.sin(Math.min(rt,i||0)),h=a*u;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,B4(n,this,h,s,l),P4(n,this,h,s,l),n.restore()}}ue(Vi,"id","arc"),ue(Vi,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),ue(Vi,"defaultRoutes",{backgroundColor:"backgroundColor"}),ue(Vi,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function E0(t,e,n=e){t.lineCap=Oe(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Oe(n.borderDash,e.borderDash)),t.lineDashOffset=Oe(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Oe(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Oe(n.borderWidth,e.borderWidth),t.strokeStyle=Oe(n.borderColor,e.borderColor)}function I4(t,e,n){t.lineTo(n.x,n.y)}function O4(t){return t.stepped?eC:t.tension||t.cubicInterpolationMode==="monotone"?tC:I4}function D0(t,e,n={}){const o=t.length,{start:i=0,end:a=o-1}=n,{start:s,end:l}=e,c=Math.max(i,s),u=Math.min(a,l),h=i<s&&a<s||i>l&&a>l;return{count:o,start:c,loop:e.loop,ilen:u<c&&!h?o+u-c:u-c}}function N4(t,e,n,o){const{points:i,options:a}=e,{count:s,start:l,loop:c,ilen:u}=D0(i,n,o),h=O4(a);let{move:p=!0,reverse:m}=o||{},b,y,v;for(b=0;b<=u;++b)y=i[(l+(m?u-b:b))%s],!y.skip&&(p?(t.moveTo(y.x,y.y),p=!1):h(t,v,y,m,a.stepped),v=y);return c&&(y=i[(l+(m?u:0))%s],h(t,v,y,m,a.stepped)),!!c}function V4(t,e,n,o){const i=e.points,{count:a,start:s,ilen:l}=D0(i,n,o),{move:c=!0,reverse:u}=o||{};let h=0,p=0,m,b,y,v,k,x;const C=O=>(s+(u?l-O:O))%a,P=()=>{v!==k&&(t.lineTo(h,k),t.lineTo(h,v),t.lineTo(h,x))};for(c&&(b=i[C(0)],t.moveTo(b.x,b.y)),m=0;m<=l;++m){if(b=i[C(m)],b.skip)continue;const O=b.x,E=b.y,T=O|0;T===y?(E<v?v=E:E>k&&(k=E),h=(p*h+O)/++p):(P(),t.lineTo(O,E),y=T,p=0,v=k=E),x=E}P()}function Bu(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?V4:N4}function R4(t){return t.stepped?VC:t.tension||t.cubicInterpolationMode==="monotone"?RC:Qr}function T4(t,e,n,o){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,o)&&i.closePath()),E0(t,e.options),t.stroke(i)}function F4(t,e,n,o){const{segments:i,options:a}=e,s=Bu(e);for(const l of i)E0(t,a,l.style),t.beginPath(),s(t,e,l,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const M4=typeof Path2D=="function";function L4(t,e,n,o){M4&&!e.options.segment?T4(t,e,n,o):F4(t,e,n,o)}class ur extends Do{constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const i=o.spanGaps?this._loop:this._fullLoop;AC(this._points,o,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=_C(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,o=e.length;return o&&n[e[o-1].end]}interpolate(e,n){const o=this.options,i=e[n],a=this.points,s=Fg(this,{property:n,start:i,end:i});if(!s.length)return;const l=[],c=R4(o);let u,h;for(u=0,h=s.length;u<h;++u){const{start:p,end:m}=s[u],b=a[p],y=a[m];if(b===y){l.push(b);continue}const v=Math.abs((i-b[n])/(y[n]-b[n])),k=c(b,y,v,o.stepped);k[n]=e[n],l.push(k)}return l.length===1?l[0]:l}pathSegment(e,n,o){return Bu(this)(e,this,n,o)}path(e,n,o){const i=this.segments,a=Bu(this);let s=this._loop;n=n||0,o=o||this.points.length-n;for(const l of i)s&=a(e,this,l,{start:n,end:n+o-1});return!!s}draw(e,n,o,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(e.save(),L4(e,this,o,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}ue(ur,"id","line"),ue(ur,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),ue(ur,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),ue(ur,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function B0(t,e,n,o){const i=t.options,{[n]:a}=t.getProps([n],o);return Math.abs(e-a)<i.radius+i.hitRadius}class Ua extends Do{constructor(n){super();ue(this,"parsed");ue(this,"skip");ue(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,o,i){const a=this.options,{x:s,y:l}=this.getProps(["x","y"],i);return Math.pow(n-s,2)+Math.pow(o-l,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(n,o){return B0(this,n,"x",o)}inYRange(n,o){return B0(this,n,"y",o)}getCenterPoint(n){const{x:o,y:i}=this.getProps(["x","y"],n);return{x:o,y:i}}size(n){n=n||this.options||{};let o=n.radius||0;o=Math.max(o,o&&n.hoverRadius||0);const i=o&&n.borderWidth||0;return(o+i)*2}draw(n,o){const i=this.options;this.skip||i.radius<.1||!Ao(this,o,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,uu(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}ue(Ua,"id","point"),ue(Ua,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),ue(Ua,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function P0(t,e){const{x:n,y:o,base:i,width:a,height:s}=t.getProps(["x","y","base","width","height"],e);let l,c,u,h,p;return t.horizontal?(p=s/2,l=Math.min(n,i),c=Math.max(n,i),u=o-p,h=o+p):(p=a/2,l=n-p,c=n+p,u=Math.min(o,i),h=Math.max(o,i)),{left:l,top:u,right:c,bottom:h}}function fr(t,e,n,o){return t?0:Ot(e,n,o)}function z4(t,e,n){const o=t.options.borderWidth,i=t.borderSkipped,a=kg(o);return{t:fr(i.top,a.top,0,n),r:fr(i.right,a.right,0,e),b:fr(i.bottom,a.bottom,0,n),l:fr(i.left,a.left,0,e)}}function _4(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,a=Wr(i),s=Math.min(e,n),l=t.borderSkipped,c=o||_e(i);return{topLeft:fr(!c||l.top||l.left,a.topLeft,0,s),topRight:fr(!c||l.top||l.right,a.topRight,0,s),bottomLeft:fr(!c||l.bottom||l.left,a.bottomLeft,0,s),bottomRight:fr(!c||l.bottom||l.right,a.bottomRight,0,s)}}function H4(t){const e=P0(t),n=e.right-e.left,o=e.bottom-e.top,i=z4(t,n/2,o/2),a=_4(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:a},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function Pu(t,e,n,o){const i=e===null,a=n===null,l=t&&!(i&&a)&&P0(t,o);return l&&(i||So(e,l.left,l.right))&&(a||So(n,l.top,l.bottom))}function U4(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function W4(t,e){t.rect(e.x,e.y,e.w,e.h)}function Iu(t,e,n={}){const o=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,a=(t.x+t.w!==n.x+n.w?e:0)-o,s=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+o,y:t.y+i,w:t.w+a,h:t.h+s,radius:t.radius}}class Wa extends Do{constructor(e){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,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:a,outer:s}=H4(this),l=U4(s.radius)?Na:W4;e.save(),(s.w!==a.w||s.h!==a.h)&&(e.beginPath(),l(e,Iu(s,n,a)),e.clip(),l(e,Iu(a,-n,s)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),l(e,Iu(a,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,o){return Pu(this,e,n,o)}inXRange(e,n){return Pu(this,e,null,n)}inYRange(e,n){return Pu(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],e);return{x:a?(n+i)/2:n,y:a?o:(o+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}ue(Wa,"id","bar"),ue(Wa,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),ue(Wa,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var j4=Object.freeze({__proto__:null,ArcElement:Vi,BarElement:Wa,LineElement:ur,PointElement:Ua});const Ou=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],I0=Ou.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function O0(t){return Ou[t%Ou.length]}function N0(t){return I0[t%I0.length]}function G4(t,e){return t.borderColor=O0(e),t.backgroundColor=N0(e),++e}function Q4(t,e){return t.backgroundColor=t.data.map(()=>O0(e++)),e}function X4(t,e){return t.backgroundColor=t.data.map(()=>N0(e++)),e}function q4(t){let e=0;return(n,o)=>{const i=t.getDatasetMeta(o).controller;i instanceof Xr?e=Q4(n,e):i instanceof Ra?e=X4(n,e):i&&(e=G4(n,e))}}function V0(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function K4(t){return t&&(t.borderColor||t.backgroundColor)}var J4={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:o},options:i}=t.config,{elements:a}=i;if(!n.forceOverride&&(V0(o)||K4(i)||a&&V0(a)))return;const s=q4(t);o.forEach(s)}};function Y4(t,e,n,o,i){const a=i.samples||o;if(a>=n)return t.slice(e,e+n);const s=[],l=(n-2)/(a-2);let c=0;const u=e+n-1;let h=e,p,m,b,y,v;for(s[c++]=t[h],p=0;p<a-2;p++){let k=0,x=0,C;const P=Math.floor((p+1)*l)+1+e,O=Math.min(Math.floor((p+2)*l)+1,n)+e,E=O-P;for(C=P;C<O;C++)k+=t[C].x,x+=t[C].y;k/=E,x/=E;const T=Math.floor(p*l)+1+e,A=Math.min(Math.floor((p+1)*l)+1,n)+e,{x:M,y:z}=t[h];for(b=y=-1,C=T;C<A;C++)y=.5*Math.abs((M-k)*(t[C].y-z)-(M-t[C].x)*(x-z)),y>b&&(b=y,m=t[C],v=C);s[c++]=m,h=v}return s[c++]=t[u],s}function Z4(t,e,n,o){let i=0,a=0,s,l,c,u,h,p,m,b,y,v;const k=[],x=e+n-1,C=t[e].x,O=t[x].x-C;for(s=e;s<e+n;++s){l=t[s],c=(l.x-C)/O*o,u=l.y;const E=c|0;if(E===h)u<y?(y=u,p=s):u>v&&(v=u,m=s),i=(a*i+l.x)/++a;else{const T=s-1;if(!ze(p)&&!ze(m)){const A=Math.min(p,m),M=Math.max(p,m);A!==b&&A!==T&&k.push({...t[A],x:i}),M!==b&&M!==T&&k.push({...t[M],x:i})}s>0&&T!==b&&k.push(t[T]),k.push(l),h=E,a=0,y=v=u,p=m=b=s}}return k}function R0(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function T0(t){t.data.datasets.forEach(e=>{R0(e)})}function $4(t,e){const n=e.length;let o=0,i;const{iScale:a}=t,{min:s,max:l,minDefined:c,maxDefined:u}=a.getUserBounds();return c&&(o=Ot(Co(e,a.axis,s).lo,0,n-1)),u?i=Ot(Co(e,a.axis,l).hi+1,o,n)-o:i=n-o,{start:o,count:i}}var e8={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){T0(t);return}const o=t.width;t.data.datasets.forEach((i,a)=>{const{_data:s,indexAxis:l}=i,c=t.getDatasetMeta(a),u=s||i.data;if(at([l,t.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;const h=t.scales[c.xAxisID];if(h.type!=="linear"&&h.type!=="time"||t.options.parsing)return;let{start:p,count:m}=$4(c,u);const b=n.threshold||4*o;if(m<=b){R0(i);return}ze(s)&&(i._data=u,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(v){this._data=v}}));let y;switch(n.algorithm){case"lttb":y=Y4(u,p,m,o,n);break;case"min-max":y=Z4(u,p,m,o);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=y})},destroy(t){T0(t)}};function t8(t,e,n){const o=t.segments,i=t.points,a=e.points,s=[];for(const l of o){let{start:c,end:u}=l;u=Vu(c,u,i);const h=Nu(n,i[c],i[u],l.loop);if(!e.segments){s.push({source:l,target:h,start:i[c],end:i[u]});continue}const p=Fg(e,h);for(const m of p){const b=Nu(n,a[m.start],a[m.end],m.loop),y=Tg(l,i,b);for(const v of y)s.push({source:v,target:m,start:{[n]:F0(h,b,"start",Math.max)},end:{[n]:F0(h,b,"end",Math.min)}})}}return s}function Nu(t,e,n,o){if(o)return;let i=e[t],a=n[t];return t==="angle"&&(i=wn(i),a=wn(a)),{property:t,start:i,end:a}}function n8(t,e){const{x:n=null,y:o=null}=t||{},i=e.points,a=[];return e.segments.forEach(({start:s,end:l})=>{l=Vu(s,l,i);const c=i[s],u=i[l];o!==null?(a.push({x:c.x,y:o}),a.push({x:u.x,y:o})):n!==null&&(a.push({x:n,y:c.y}),a.push({x:n,y:u.y}))}),a}function Vu(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function F0(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function M0(t,e){let n=[],o=!1;return ot(t)?(o=!0,n=t):n=n8(t,e),n.length?new ur({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function L0(t){return t&&t.fill!==!1}function o8(t,e,n){let i=t[e].fill;const a=[e];let s;if(!n)return i;for(;i!==!1&&a.indexOf(i)===-1;){if(!yt(i))return i;if(s=t[i],!s)return!1;if(s.visible)return i;a.push(i),i=s.fill}return!1}function r8(t,e,n){const o=l8(t);if(_e(o))return isNaN(o.value)?!1:o;let i=parseFloat(o);return yt(i)&&Math.floor(i)===i?i8(o[0],e,i,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function i8(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function a8(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:_e(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function s8(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:_e(t)?o=t.value:o=e.getBaseValue(),o}function l8(t){const e=t.options,n=e.fill;let o=Oe(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function d8(t){const{scale:e,index:n,line:o}=t,i=[],a=o.segments,s=o.points,l=c8(e,n);l.push(M0({x:null,y:e.bottom},o));for(let c=0;c<a.length;c++){const u=a[c];for(let h=u.start;h<=u.end;h++)u8(i,s[h],l)}return new ur({points:i,options:{}})}function c8(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let i=0;i<o.length;i++){const a=o[i];if(a.index===e)break;a.hidden||n.unshift(a.dataset)}return n}function u8(t,e,n){const o=[];for(let i=0;i<n.length;i++){const a=n[i],{first:s,last:l,point:c}=f8(a,e,"x");if(!(!c||s&&l)){if(s)o.unshift(c);else if(t.push(c),!l)break}}t.push(...o)}function f8(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const i=o[n],a=t.segments,s=t.points;let l=!1,c=!1;for(let u=0;u<a.length;u++){const h=a[u],p=s[h.start][n],m=s[h.end][n];if(So(i,p,m)){l=i===p,c=i===m;break}}return{first:l,last:c,point:o}}class z0{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:i,y:a,radius:s}=this;return n=n||{start:0,end:it},e.arc(i,a,s,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:i}=this,a=e.angle;return{x:n+Math.cos(a)*i,y:o+Math.sin(a)*i,angle:a}}}function p8(t){const{chart:e,fill:n,line:o}=t;if(yt(n))return h8(e,n);if(n==="stack")return d8(t);if(n==="shape")return!0;const i=m8(t);return i instanceof z0?i:M0(i,o)}function h8(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function m8(t){return(t.scale||{}).getPointPositionForValue?b8(t):g8(t)}function g8(t){const{scale:e={},fill:n}=t,o=a8(n,e);if(yt(o)){const i=e.isHorizontal();return{x:i?o:null,y:i?null:o}}return null}function b8(t){const{scale:e,fill:n}=t,o=e.options,i=e.getLabels().length,a=o.reverse?e.max:e.min,s=s8(n,e,a),l=[];if(o.grid.circular){const c=e.getPointPositionForValue(0,a);return new z0({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(s)})}for(let c=0;c<i;++c)l.push(e.getPointPositionForValue(c,s));return l}function Ru(t,e,n){const o=p8(e),{line:i,scale:a,axis:s}=e,l=i.options,c=l.fill,u=l.backgroundColor,{above:h=u,below:p=u}=c||{};o&&i.points.length&&(rl(t,n),y8(t,{line:i,target:o,above:h,below:p,area:n,scale:a,axis:s}),il(t))}function y8(t,e){const{line:n,target:o,above:i,below:a,area:s,scale:l}=e,c=n._loop?"angle":e.axis;t.save(),c==="x"&&a!==i&&(_0(t,o,s.top),H0(t,{line:n,target:o,color:i,scale:l,property:c}),t.restore(),t.save(),_0(t,o,s.bottom)),H0(t,{line:n,target:o,color:a,scale:l,property:c}),t.restore()}function _0(t,e,n){const{segments:o,points:i}=e;let a=!0,s=!1;t.beginPath();for(const l of o){const{start:c,end:u}=l,h=i[c],p=i[Vu(c,u,i)];a?(t.moveTo(h.x,h.y),a=!1):(t.lineTo(h.x,n),t.lineTo(h.x,h.y)),s=!!e.pathSegment(t,l,{move:s}),s?t.closePath():t.lineTo(p.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function H0(t,e){const{line:n,target:o,property:i,color:a,scale:s}=e,l=t8(n,o,i);for(const{source:c,target:u,start:h,end:p}of l){const{style:{backgroundColor:m=a}={}}=c,b=o!==!0;t.save(),t.fillStyle=m,v8(t,s,b&&Nu(i,h,p)),t.beginPath();const y=!!n.pathSegment(t,c);let v;if(b){y?t.closePath():U0(t,o,p,i);const k=!!o.pathSegment(t,u,{move:y,reverse:!0});v=y&&k,v||U0(t,o,h,i)}t.closePath(),t.fill(v?"evenodd":"nonzero"),t.restore()}}function v8(t,e,n){const{top:o,bottom:i}=e.chart.chartArea,{property:a,start:s,end:l}=n||{};a==="x"&&(t.beginPath(),t.rect(s,o,l-s,i-o),t.clip())}function U0(t,e,n,o){const i=e.interpolate(n,o);i&&t.lineTo(i.x,i.y)}var k8={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,i=[];let a,s,l,c;for(s=0;s<o;++s)a=t.getDatasetMeta(s),l=a.dataset,c=null,l&&l.options&&l instanceof ur&&(c={visible:t.isDatasetVisible(s),index:s,fill:r8(l,s,o),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:l}),a.$filler=c,i.push(c);for(s=0;s<o;++s)c=i[s],!(!c||c.fill===!1)&&(c.fill=o8(i,s,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),a=t.chartArea;for(let s=i.length-1;s>=0;--s){const l=i[s].$filler;l&&(l.line.updateControlPoints(a,l.axis),o&&l.fill&&Ru(t.ctx,l,a))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let i=o.length-1;i>=0;--i){const a=o[i].$filler;L0(a)&&Ru(t.ctx,a,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!L0(o)||n.drawTime!=="beforeDatasetDraw"||Ru(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const W0=(t,e)=>{let{boxHeight:n=e,boxWidth:o=e}=t;return t.usePointStyle&&(n=Math.min(n,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(e,n)}},w8=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class j0 extends Do{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,o){this.maxWidth=e,this.maxHeight=n,this._margins=o,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=$e(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(o=>e.filter(o,this.chart.data))),e.sort&&(n=n.sort((o,i)=>e.sort(o,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const o=e.labels,i=At(o.font),a=i.size,s=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=W0(o,a);let u,h;n.font=i.string,this.isHorizontal()?(u=this.maxWidth,h=this._fitRows(s,a,l,c)+10):(h=this.maxHeight,u=this._fitCols(s,i,l,c)+10),this.width=Math.min(u,e.maxWidth||this.maxWidth),this.height=Math.min(h,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,i){const{ctx:a,maxWidth:s,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],u=this.lineWidths=[0],h=i+l;let p=e;a.textAlign="left",a.textBaseline="middle";let m=-1,b=-h;return this.legendItems.forEach((y,v)=>{const k=o+n/2+a.measureText(y.text).width;(v===0||u[u.length-1]+k+2*l>s)&&(p+=h,u[u.length-(v>0?0:1)]=0,b+=h,m++),c[v]={left:0,top:b,row:m,width:k,height:i},u[u.length-1]+=k+l}),p}_fitCols(e,n,o,i){const{ctx:a,maxHeight:s,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],u=this.columnSizes=[],h=s-e;let p=l,m=0,b=0,y=0,v=0;return this.legendItems.forEach((k,x)=>{const{itemWidth:C,itemHeight:P}=x8(o,n,a,k,i);x>0&&b+P+2*l>h&&(p+=m+l,u.push({width:m,height:b}),y+=m+l,v++,m=b=0),c[x]={left:y,top:b,col:v,width:C,height:P},m=Math.max(m,C),b+=P+l}),p+=m,u.push({width:m,height:b}),p}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:i},rtl:a}}=this,s=Oi(a,this.left,this.width);if(this.isHorizontal()){let l=0,c=Wt(o,this.left+i,this.right-this.lineWidths[l]);for(const u of n)l!==u.row&&(l=u.row,c=Wt(o,this.left+i,this.right-this.lineWidths[l])),u.top+=this.top+e+i,u.left=s.leftForLtr(s.x(c),u.width),c+=u.width+i}else{let l=0,c=Wt(o,this.top+e+i,this.bottom-this.columnSizes[l].height);for(const u of n)u.col!==l&&(l=u.col,c=Wt(o,this.top+e+i,this.bottom-this.columnSizes[l].height)),u.top=c,u.left+=this.left+i,u.left=s.leftForLtr(s.x(u.left),u.width),c+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;rl(e,this),this._draw(),il(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:i}=this,{align:a,labels:s}=e,l=pt.color,c=Oi(e.rtl,this.left,this.width),u=At(s.font),{padding:h}=s,p=u.size,m=p/2;let b;this.drawTitle(),i.textAlign=c.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:y,boxHeight:v,itemHeight:k}=W0(s,p),x=function(T,A,M){if(isNaN(y)||y<=0||isNaN(v)||v<0)return;i.save();const z=Oe(M.lineWidth,1);if(i.fillStyle=Oe(M.fillStyle,l),i.lineCap=Oe(M.lineCap,"butt"),i.lineDashOffset=Oe(M.lineDashOffset,0),i.lineJoin=Oe(M.lineJoin,"miter"),i.lineWidth=z,i.strokeStyle=Oe(M.strokeStyle,l),i.setLineDash(Oe(M.lineDash,[])),s.usePointStyle){const W={radius:v*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:z},Q=c.xPlus(T,y/2),N=A+m;vg(i,W,Q,N,s.pointStyleWidth&&y)}else{const W=A+Math.max((p-v)/2,0),Q=c.leftForLtr(T,y),N=Wr(M.borderRadius);i.beginPath(),Object.values(N).some(F=>F!==0)?Na(i,{x:Q,y:W,w:y,h:v,radius:N}):i.rect(Q,W,y,v),i.fill(),z!==0&&i.stroke()}i.restore()},C=function(T,A,M){Ur(i,M.text,T,A+k/2,u,{strikethrough:M.hidden,textAlign:c.textAlign(M.textAlign)})},P=this.isHorizontal(),O=this._computeTitleHeight();P?b={x:Wt(a,this.left+h,this.right-o[0]),y:this.top+h+O,line:0}:b={x:this.left+h,y:Wt(a,this.top+O+h,this.bottom-n[0].height),line:0},Og(this.ctx,e.textDirection);const E=k+h;this.legendItems.forEach((T,A)=>{i.strokeStyle=T.fontColor,i.fillStyle=T.fontColor;const M=i.measureText(T.text).width,z=c.textAlign(T.textAlign||(T.textAlign=s.textAlign)),W=y+m+M;let Q=b.x,N=b.y;c.setWidth(this.width),P?A>0&&Q+W+h>this.right&&(N=b.y+=E,b.line++,Q=b.x=Wt(a,this.left+h,this.right-o[b.line])):A>0&&N+E>this.bottom&&(Q=b.x=Q+n[b.line].width+h,b.line++,N=b.y=Wt(a,this.top+O+h,this.bottom-n[b.line].height));const F=c.x(Q);if(x(F,N,T),Q=WS(z,Q+y+m,P?Q+W:this.right,e.rtl),C(c.x(Q),N,T),P)b.x+=W+h;else if(typeof T.text!="string"){const V=u.lineHeight;b.y+=G0(T,V)+h}else b.y+=E}),Ng(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=At(n.font),i=Mt(n.padding);if(!n.display)return;const a=Oi(e.rtl,this.left,this.width),s=this.ctx,l=n.position,c=o.size/2,u=i.top+c;let h,p=this.left,m=this.width;if(this.isHorizontal())m=Math.max(...this.lineWidths),h=this.top+u,p=Wt(e.align,p,this.right-m);else{const y=this.columnSizes.reduce((v,k)=>Math.max(v,k.height),0);h=u+Wt(e.align,this.top,this.bottom-y-e.labels.padding-this._computeTitleHeight())}const b=Wt(l,p,p+m);s.textAlign=a.textAlign(au(l)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=o.string,Ur(s,n.text,b,h,o)}_computeTitleHeight(){const e=this.options.title,n=At(e.font),o=Mt(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,i,a;if(So(e,this.left,this.right)&&So(n,this.top,this.bottom)){for(a=this.legendHitBoxes,o=0;o<a.length;++o)if(i=a[o],So(e,i.left,i.left+i.width)&&So(n,i.top,i.top+i.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!A8(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,a=w8(i,o);i&&!a&&$e(n.onLeave,[e,i,this],this),this._hoveredItem=o,o&&!a&&$e(n.onHover,[e,o,this],this)}else o&&$e(n.onClick,[e,o,this],this)}}function x8(t,e,n,o,i){const a=S8(o,t,e,n),s=C8(i,o,e.lineHeight);return{itemWidth:a,itemHeight:s}}function S8(t,e,n,o){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((a,s)=>a.length>s.length?a:s)),e+n.size/2+o.measureText(i).width}function C8(t,e,n){let o=t;return typeof e.text!="string"&&(o=G0(e,n)),o}function G0(t,e){const n=t.text?t.text.length:0;return e*n}function A8(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var E8={id:"legend",_element:j0,start(t,e,n){const o=t.legend=new j0({ctx:t.ctx,options:n,chart:t});jt.configure(t,o,n),jt.addBox(t,o)},stop(t){jt.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;jt.configure(t,o,n),o.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const o=e.datasetIndex,i=n.chart;i.isDatasetVisible(o)?(i.hide(o),e.hidden=!0):(i.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:i,color:a,useBorderRadius:s,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map(c=>{const u=c.controller.getStyle(n?0:void 0),h=Mt(u.borderWidth);return{text:e[c.index].label,fillStyle:u.backgroundColor,fontColor:a,hidden:!c.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:u.borderColor,pointStyle:o||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:s&&(l||u.borderRadius),datasetIndex:c.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Tu extends Do{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=ot(o.text)?o.text.length:1;this._padding=Mt(o.padding);const a=i*At(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:o,bottom:i,right:a,options:s}=this,l=s.align;let c=0,u,h,p;return this.isHorizontal()?(h=Wt(l,o,a),p=n+e,u=a-o):(s.position==="left"?(h=o+e,p=Wt(l,i,n),c=rt*-.5):(h=a-e,p=Wt(l,n,i),c=rt*.5),u=i-n),{titleX:h,titleY:p,maxWidth:u,rotation:c}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const o=At(n.font),a=o.lineHeight/2+this._padding.top,{titleX:s,titleY:l,maxWidth:c,rotation:u}=this._drawArgs(a);Ur(e,n.text,0,0,o,{color:n.color,maxWidth:c,rotation:u,textAlign:au(n.align),textBaseline:"middle",translation:[s,l]})}}function D8(t,e){const n=new Tu({ctx:t.ctx,options:e,chart:t});jt.configure(t,n,e),jt.addBox(t,n),t.titleBlock=n}var B8={id:"title",_element:Tu,start(t,e,n){D8(t,n)},stop(t){const e=t.titleBlock;jt.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const o=t.titleBlock;jt.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Cl=new WeakMap;var P8={id:"subtitle",start(t,e,n){const o=new Tu({ctx:t.ctx,options:n,chart:t});jt.configure(t,o,n),jt.addBox(t,o),Cl.set(t,o)},stop(t){jt.removeBox(t,Cl.get(t)),Cl.delete(t)},beforeUpdate(t,e,n){const o=Cl.get(t);jt.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ja={average(t){if(!t.length)return!1;let e,n,o=new Set,i=0,a=0;for(e=0,n=t.length;e<n;++e){const l=t[e].element;if(l&&l.hasValue()){const c=l.tooltipPosition();o.add(c.x),i+=c.y,++a}}return{x:[...o].reduce((l,c)=>l+c)/o.size,y:i/a}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,i=Number.POSITIVE_INFINITY,a,s,l;for(a=0,s=t.length;a<s;++a){const c=t[a].element;if(c&&c.hasValue()){const u=c.getCenterPoint(),h=ru(e,u);h<i&&(i=h,l=c)}}if(l){const c=l.tooltipPosition();n=c.x,o=c.y}return{x:n,y:o}}};function fo(t,e){return e&&(ot(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Bo(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
29
+ */class WC{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,i){const a=n.listeners[i],s=n.duration;a.forEach(l=>l({chart:e,initial:n.initial,numSteps:s,currentStep:Math.min(o-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=dg.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const a=o.items;let s=a.length-1,l=!1,c;for(;s>=0;--s)c=a[s],c._active?(c._total>o.duration&&(o.duration=c._total),c.tick(e),l=!0):(a[s]=a[a.length-1],a.pop());l&&(i.draw(),this._notify(i,o,e,"progress")),a.length||(o.running=!1,this._notify(i,o,e,"complete"),o.initial=!1),n+=a.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let o=n.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,o)),o}listen(e,n,o){this._getAnims(e).listeners[n].push(o)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Eo=new WC;const zg="transparent",jC={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=mg(t||zg),i=o.valid&&mg(e||zg);return i&&i.valid?i.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class GC{constructor(e,n,o,i){const a=n[o];i=at([e.to,i,a,e.from]);const s=at([e.from,a,i]);this._active=!0,this._fn=e.fn||jC[e.type||typeof s],this._easing=Pa[e.easing]||Pa.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=o,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],a=o-this._start,s=this._duration-a;this._start=o,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=a,this._loop=!!e.loop,this._to=at([e.to,n,i,e.from]),this._from=at([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,o=this._duration,i=this._prop,a=this._from,s=this._loop,l=this._to;let c;if(this._active=a!==l&&(s||n<o),!this._active){this._target[i]=l,this._notify(!0);return}if(n<0){this._target[i]=a;return}c=n/o%2,c=s&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[i]=this._fn(a,l,c)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,o)=>{e.push({res:n,rej:o})})}_notify(e){const n=e?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}}class _g{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!_e(e))return;const n=Object.keys(pt.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const a=e[i];if(!_e(a))return;const s={};for(const l of n)s[l]=a[l];(ot(a.properties)&&a.properties||[i]).forEach(l=>{(l===i||!o.has(l))&&o.set(l,s)})})}_animateOptions(e,n){const o=n.options,i=XC(e,o);if(!i)return[];const a=this._createAnimations(i,o);return o.$shared&&QC(e.options.$animations,o).then(()=>{e.options=o},()=>{}),a}_createAnimations(e,n){const o=this._properties,i=[],a=e.$animations||(e.$animations={}),s=Object.keys(n),l=Date.now();let c;for(c=s.length-1;c>=0;--c){const u=s[c];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(e,n));continue}const h=n[u];let p=a[u];const m=o.get(u);if(p)if(m&&p.active()){p.update(m,h,l);continue}else p.cancel();if(!m||!m.duration){e[u]=h;continue}a[u]=p=new GC(m,e,u,h),i.push(p)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const o=this._createAnimations(e,n);if(o.length)return Eo.add(this._chart,o),!0}}function QC(t,e){const n=[],o=Object.keys(e);for(let i=0;i<o.length;i++){const a=t[o[i]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function XC(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Hg(t,e){const n=t&&t.options||{},o=n.reverse,i=n.min===void 0?e:0,a=n.max===void 0?e:0;return{start:o?a:i,end:o?i:a}}function qC(t,e,n){if(n===!1)return!1;const o=Hg(t,n),i=Hg(e,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function KC(t){let e,n,o,i;return _e(t)?(e=t.top,n=t.right,o=t.bottom,i=t.left):e=n=o=i=t,{top:e,right:n,bottom:o,left:i,disabled:t===!1}}function Ug(t,e){const n=[],o=t._getSortedDatasetMetas(e);let i,a;for(i=0,a=o.length;i<a;++i)n.push(o[i].index);return n}function Wg(t,e,n,o={}){const i=t.keys,a=o.mode==="single";let s,l,c,u;if(e!==null){for(s=0,l=i.length;s<l;++s){if(c=+i[s],c===n){if(o.all)continue;break}u=t.values[c],yt(u)&&(a||e===0||co(e)===co(u))&&(e+=u)}return e}}function JC(t,e){const{iScale:n,vScale:o}=e,i=n.axis==="x"?"x":"y",a=o.axis==="x"?"x":"y",s=Object.keys(t),l=new Array(s.length);let c,u,h;for(c=0,u=s.length;c<u;++c)h=s[c],l[c]={[i]:h,[a]:t[h]};return l}function jg(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function YC(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function ZC(t){const{min:e,max:n,minDefined:o,maxDefined:i}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function $C(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function Gg(t,e,n,o){for(const i of e.getMatchingVisibleMetas(o).reverse()){const a=t[i.index];if(n&&a>0||!n&&a<0)return i.index}return null}function Qg(t,e){const{chart:n,_cachedMeta:o}=t,i=n._stacks||(n._stacks={}),{iScale:a,vScale:s,index:l}=o,c=a.axis,u=s.axis,h=YC(a,s,o),p=e.length;let m;for(let b=0;b<p;++b){const y=e[b],{[c]:v,[u]:k}=y,x=y._stacks||(y._stacks={});m=x[u]=$C(i,h,v),m[l]=k,m._top=Gg(m,s,!0,o.type),m._bottom=Gg(m,s,!1,o.type);const C=m._visualValues||(m._visualValues={});C[l]=k}}function yu(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function eA(t,e){return cr(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function tA(t,e,n){return cr(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Va(t,e){const n=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const i of e){const a=i._stacks;if(!a||a[o]===void 0||a[o][n]===void 0)return;delete a[o][n],a[o]._visualValues!==void 0&&a[o]._visualValues[n]!==void 0&&delete a[o]._visualValues[n]}}}const vu=t=>t==="reset"||t==="none",Xg=(t,e)=>e?t:Object.assign({},t),nA=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Ug(n,!0),values:null};class qn{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=jg(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Va(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(p,m,b,y)=>p==="x"?m:p==="r"?y:b,a=n.xAxisID=Oe(o.xAxisID,yu(e,"x")),s=n.yAxisID=Oe(o.yAxisID,yu(e,"y")),l=n.rAxisID=Oe(o.rAxisID,yu(e,"r")),c=n.indexAxis,u=n.iAxisID=i(c,a,s,l),h=n.vAxisID=i(c,s,a,l);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&sg(this._data,this),e._stacked&&Va(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if(_e(n)){const i=this._cachedMeta;this._data=JC(n,i)}else if(o!==n){if(o){sg(o,this);const i=this._cachedMeta;Va(i),i._parsed=[]}n&&Object.isExtensible(n)&&HS(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const a=n._stacked;n._stacked=jg(n.vScale,n),n.stack!==o.stack&&(i=!0,Va(n),n.stack=o.stack),this._resyncElements(e),(i||a!==n._stacked)&&Qg(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:o,_data:i}=this,{iScale:a,_stacked:s}=o,l=a.axis;let c=e===0&&n===i.length?!0:o._sorted,u=e>0&&o._parsed[e-1],h,p,m;if(this._parsing===!1)o._parsed=i,o._sorted=!0,m=i;else{ot(i[e])?m=this.parseArrayData(o,i,e,n):_e(i[e])?m=this.parseObjectData(o,i,e,n):m=this.parsePrimitiveData(o,i,e,n);const b=()=>p[l]===null||u&&p[l]<u[l];for(h=0;h<n;++h)o._parsed[h+e]=p=m[h],c&&(b()&&(c=!1),u=p);o._sorted=c}s&&Qg(this,m)}parsePrimitiveData(e,n,o,i){const{iScale:a,vScale:s}=e,l=a.axis,c=s.axis,u=a.getLabels(),h=a===s,p=new Array(i);let m,b,y;for(m=0,b=i;m<b;++m)y=m+o,p[m]={[l]:h||a.parse(u[y],y),[c]:s.parse(n[y],y)};return p}parseArrayData(e,n,o,i){const{xScale:a,yScale:s}=e,l=new Array(i);let c,u,h,p;for(c=0,u=i;c<u;++c)h=c+o,p=n[h],l[c]={x:a.parse(p[0],h),y:s.parse(p[1],h)};return l}parseObjectData(e,n,o,i){const{xScale:a,yScale:s}=e,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,u=new Array(i);let h,p,m,b;for(h=0,p=i;h<p;++h)m=h+o,b=n[m],u[h]={x:a.parse(sr(b,l),m),y:s.parse(sr(b,c),m)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const i=this.chart,a=this._cachedMeta,s=n[e.axis],l={keys:Ug(i,!0),values:n._stacks[e.axis]._visualValues};return Wg(l,s,a.index,{mode:o})}updateRangeFromParsed(e,n,o,i){const a=o[n.axis];let s=a===null?NaN:a;const l=i&&o._stacks[n.axis];i&&l&&(i.values=l,s=Wg(i,a,this._cachedMeta.index)),e.min=Math.min(e.min,s),e.max=Math.max(e.max,s)}getMinMax(e,n){const o=this._cachedMeta,i=o._parsed,a=o._sorted&&e===o.iScale,s=i.length,l=this._getOtherScale(e),c=nA(n,o,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:p}=ZC(l);let m,b;function y(){b=i[m];const v=b[l.axis];return!yt(b[e.axis])||h>v||p<v}for(m=0;m<s&&!(!y()&&(this.updateRangeFromParsed(u,e,b,c),a));++m);if(a){for(m=s-1;m>=0;--m)if(!y()){this.updateRangeFromParsed(u,e,b,c);break}}return u}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let i,a,s;for(i=0,a=n.length;i<a;++i)s=n[i][e.axis],yt(s)&&o.push(s);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,i=n.vScale,a=this.getParsed(e);return{label:o?""+o.getLabelForValue(a[o.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=KC(Oe(this.options.clip,qC(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],a=n.chartArea,s=[],l=this._drawStart||0,c=this._drawCount||i.length-l,u=this.options.drawActiveElementsOnTop;let h;for(o.dataset&&o.dataset.draw(e,a,l,c),h=l;h<l+c;++h){const p=i[h];p.hidden||(p.active&&u?s.push(p):p.draw(e,a))}for(h=0;h<s.length;++h)s[h].draw(e,a)}getStyle(e,n){const o=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,n,o){const i=this.getDataset();let a;if(e>=0&&e<this._cachedMeta.data.length){const s=this._cachedMeta.data[e];a=s.$context||(s.$context=tA(this.getContext(),e,s)),a.parsed=this.getParsed(e),a.raw=i.data[e],a.index=a.dataIndex=e}else a=this.$context||(this.$context=eA(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=o,a}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",o){const i=n==="active",a=this._cachedDataOpts,s=e+"-"+n,l=a[s],c=this.enableOptionSharing&&Ea(o);if(l)return Xg(l,c);const u=this.chart.config,h=u.datasetElementScopeKeys(this._type,e),p=i?[`${e}Hover`,"hover",e,""]:[e,""],m=u.getOptionScopes(this.getDataset(),h),b=Object.keys(pt.elements[e]),y=()=>this.getContext(o,i,n),v=u.resolveNamedOptions(m,b,y,p);return v.$shared&&(v.$shared=c,a[s]=Object.freeze(Xg(v,c))),v}_resolveAnimations(e,n,o){const i=this.chart,a=this._cachedDataOpts,s=`animation-${n}`,l=a[s];if(l)return l;let c;if(i.options.animation!==!1){const h=this.chart.config,p=h.datasetAnimationScopeKeys(this._type,n),m=h.getOptionScopes(this.getDataset(),p);c=h.createResolver(m,this.getContext(e,o,n))}const u=new _g(i,c&&c.animations);return c&&c._cacheable&&(a[s]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||vu(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),i=this._sharedOptions,a=this.getSharedOptions(o),s=this.includeOptions(n,a)||a!==i;return this.updateSharedOptions(a,n,o),{sharedOptions:a,includeOptions:s}}updateElement(e,n,o,i){vu(i)?Object.assign(e,o):this._resolveAnimations(n,i).update(e,o)}updateSharedOptions(e,n,o){e&&!vu(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,i){e.active=i;const a=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(e,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(e,n,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,n,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,o=this._cachedMeta.data;for(const[l,c,u]of this._syncList)this[l](c,u);this._syncList=[];const i=o.length,a=n.length,s=Math.min(a,i);s&&this.parse(0,s),a>i?this._insertElements(i,a-i,e):a<i&&this._removeElements(a,i-a)}_insertElements(e,n,o=!0){const i=this._cachedMeta,a=i.data,s=e+n;let l;const c=u=>{for(u.length+=n,l=u.length-1;l>=s;l--)u[l]=u[l-n]};for(c(a),l=e;l<s;++l)a[l]=new this.dataElementType;this._parsing&&c(i._parsed),this.parse(e,n),o&&this.updateElements(a,e,n,"reset")}updateElements(e,n,o,i){}_removeElements(e,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(e,n);o._stacked&&Va(o,i)}o.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,o,i]=e;this[n](o,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ue(qn,"defaults",{}),ue(qn,"datasetElementType",null),ue(qn,"dataElementType",null);function oA(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let i=0,a=n.length;i<a;i++)o=o.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=lg(o.sort((i,a)=>i-a))}return t._cache.$bar}function rA(t){const e=t.iScale,n=oA(e,t.type);let o=e._length,i,a,s,l;const c=()=>{s===32767||s===-32768||(Ea(l)&&(o=Math.min(o,Math.abs(s-l)||o)),l=s)};for(i=0,a=n.length;i<a;++i)s=e.getPixelForValue(n[i]),c();for(l=void 0,i=0,a=e.ticks.length;i<a;++i)s=e.getPixelForTick(i),c();return o}function iA(t,e,n,o){const i=n.barThickness;let a,s;return ze(i)?(a=e.min*n.categoryPercentage,s=n.barPercentage):(a=i*o,s=1),{chunk:a/o,ratio:s,start:e.pixels[t]-a/2}}function aA(t,e,n,o){const i=e.pixels,a=i[t];let s=t>0?i[t-1]:null,l=t<i.length-1?i[t+1]:null;const c=n.categoryPercentage;s===null&&(s=a-(l===null?e.end-e.start:l-a)),l===null&&(l=a+a-s);const u=a-(a-Math.min(s,l))/2*c;return{chunk:Math.abs(l-s)/2*c/o,ratio:n.barPercentage,start:u}}function sA(t,e,n,o){const i=n.parse(t[0],o),a=n.parse(t[1],o),s=Math.min(i,a),l=Math.max(i,a);let c=s,u=l;Math.abs(s)>Math.abs(l)&&(c=l,u=s),e[n.axis]=u,e._custom={barStart:c,barEnd:u,start:i,end:a,min:s,max:l}}function qg(t,e,n,o){return ot(t)?sA(t,e,n,o):e[n.axis]=n.parse(t,o),e}function Kg(t,e,n,o){const i=t.iScale,a=t.vScale,s=i.getLabels(),l=i===a,c=[];let u,h,p,m;for(u=n,h=n+o;u<h;++u)m=e[u],p={},p[i.axis]=l||i.parse(s[u],u),c.push(qg(m,p,a,u));return c}function ku(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function lA(t,e,n){return t!==0?co(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function dA(t){let e,n,o,i,a;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(i="end",a="start"):(i="start",a="end"),{start:n,end:o,reverse:e,top:i,bottom:a}}function cA(t,e,n,o){let i=e.borderSkipped;const a={};if(!i){t.borderSkipped=a;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:l,reverse:c,top:u,bottom:h}=dA(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?i=u:(n._bottom||0)===o?i=h:(a[Jg(h,s,l,c)]=!0,i=u)),a[Jg(i,s,l,c)]=!0,t.borderSkipped=a}function Jg(t,e,n,o){return o?(t=uA(t,e,n),t=Yg(t,n,e)):t=Yg(t,e,n),t}function uA(t,e,n){return t===e?n:t===n?e:t}function Yg(t,e,n){return t==="start"?e:t==="end"?n:t}function fA(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class cl extends qn{parsePrimitiveData(e,n,o,i){return Kg(e,n,o,i)}parseArrayData(e,n,o,i){return Kg(e,n,o,i)}parseObjectData(e,n,o,i){const{iScale:a,vScale:s}=e,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,u=a.axis==="x"?l:c,h=s.axis==="x"?l:c,p=[];let m,b,y,v;for(m=o,b=o+i;m<b;++m)v=n[m],y={},y[a.axis]=a.parse(sr(v,u),m),p.push(qg(sr(v,h),y,s,m));return p}updateRangeFromParsed(e,n,o,i){super.updateRangeFromParsed(e,n,o,i);const a=o._custom;a&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,a.min),e.max=Math.max(e.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:i}=n,a=this.getParsed(e),s=a._custom,l=ku(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+o.getLabelForValue(a[o.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,o,i){const a=i==="reset",{index:s,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),u=l.isHorizontal(),h=this._getRuler(),{sharedOptions:p,includeOptions:m}=this._getSharedOptions(n,i);for(let b=n;b<n+o;b++){const y=this.getParsed(b),v=a||ze(y[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(b),k=this._calculateBarIndexPixels(b,h),x=(y._stacks||{})[l.axis],C={horizontal:u,base:v.base,enableBorderRadius:!x||ku(y._custom)||s===x._top||s===x._bottom,x:u?v.head:k.center,y:u?k.center:v.head,height:u?k.size:Math.abs(v.size),width:u?Math.abs(v.size):k.size};m&&(C.options=p||this.resolveDataElementOptions(b,e[b].active?"active":i));const P=C.options||e[b].options;cA(C,P,x,s),fA(C,P,h.ratio),this.updateElement(e[b],b,C,i)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),a=o.options.stacked,s=[],l=c=>{const u=c.controller.getParsed(n),h=u&&u[c.vScale.axis];if(ze(h)||isNaN(h))return!0};for(const c of i)if(!(n!==void 0&&l(c))&&((a===!1||s.indexOf(c.stack)===-1||a===void 0&&c.stack===void 0)&&s.push(c.stack),c.index===e))break;return s.length||s.push(void 0),s}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,o){const i=this._getStacks(e,o),a=n!==void 0?i.indexOf(n):-1;return a===-1?i.length-1:a}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,i=[];let a,s;for(a=0,s=n.data.length;a<s;++a)i.push(o.getPixelForValue(this.getParsed(a)[o.axis],a));const l=e.barThickness;return{min:l||rA(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:e.grouped,ratio:l?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:a,minBarLength:s}}=this,l=a||0,c=this.getParsed(e),u=c._custom,h=ku(u);let p=c[n.axis],m=0,b=o?this.applyStack(n,c,o):p,y,v;b!==p&&(m=b-p,b=p),h&&(p=u.barStart,b=u.barEnd-u.barStart,p!==0&&co(p)!==co(u.barEnd)&&(m=0),m+=p);const k=!ze(a)&&!h?a:m;let x=n.getPixelForValue(k);if(this.chart.getDataVisibility(e)?y=n.getPixelForValue(m+b):y=x,v=y-x,Math.abs(v)<s){v=lA(v,n,l)*s,p===l&&(x-=v/2);const C=n.getPixelForDecimal(0),P=n.getPixelForDecimal(1),O=Math.min(C,P),E=Math.max(C,P);x=Math.max(Math.min(x,E),O),y=x+v,o&&!h&&(c._stacks[n.axis]._visualValues[i]=n.getValueForPixel(y)-n.getValueForPixel(x))}if(x===n.getPixelForValue(l)){const C=co(v)*n.getLineWidthForValue(l)/2;x+=C,v-=C}return{size:v,base:x,head:y,center:y+v/2}}_calculateBarIndexPixels(e,n){const o=n.scale,i=this.options,a=i.skipNull,s=Oe(i.maxBarThickness,1/0);let l,c;if(n.grouped){const u=a?this._getStackCount(e):n.stackCount,h=i.barThickness==="flex"?aA(e,n,i,u):iA(e,n,i,u),p=this._getStackIndex(this.index,this._cachedMeta.stack,a?e:void 0);l=h.start+h.chunk*p+h.chunk/2,c=Math.min(s,h.chunk*h.ratio)}else l=o.getPixelForValue(this.getParsed(e)[o.axis],e),c=Math.min(s,n.min*n.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,i=o.length;let a=0;for(;a<i;++a)this.getParsed(a)[n.axis]!==null&&!o[a].hidden&&o[a].draw(this._ctx)}}ue(cl,"id","bar"),ue(cl,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),ue(cl,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ul extends qn{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,i){const a=super.parsePrimitiveData(e,n,o,i);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+o).radius;return a}parseArrayData(e,n,o,i){const a=super.parseArrayData(e,n,o,i);for(let s=0;s<a.length;s++){const l=n[o+s];a[s]._custom=Oe(l[2],this.resolveDataElementOptions(s+o).radius)}return a}parseObjectData(e,n,o,i){const a=super.parseObjectData(e,n,o,i);for(let s=0;s<a.length;s++){const l=n[o+s];a[s]._custom=Oe(l&&l.r&&+l.r,this.resolveDataElementOptions(s+o).radius)}return a}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let o=e.length-1;o>=0;--o)n=Math.max(n,e[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:a}=n,s=this.getParsed(e),l=i.getLabelForValue(s.x),c=a.getLabelForValue(s.y),u=s._custom;return{label:o[e]||"",value:"("+l+", "+c+(u?", "+u:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,i){const a=i==="reset",{iScale:s,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(n,i),h=s.axis,p=l.axis;for(let m=n;m<n+o;m++){const b=e[m],y=!a&&this.getParsed(m),v={},k=v[h]=a?s.getPixelForDecimal(.5):s.getPixelForValue(y[h]),x=v[p]=a?l.getBasePixel():l.getPixelForValue(y[p]);v.skip=isNaN(k)||isNaN(x),u&&(v.options=c||this.resolveDataElementOptions(m,b.active?"active":i),a&&(v.options.radius=0)),this.updateElement(b,m,v,i)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const a=i.radius;return n!=="active"&&(i.radius=0),i.radius+=Oe(o&&o._custom,a),i}}ue(ul,"id","bubble"),ue(ul,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),ue(ul,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function pA(t,e,n){let o=1,i=1,a=0,s=0;if(e<it){const l=t,c=l+e,u=Math.cos(l),h=Math.sin(l),p=Math.cos(c),m=Math.sin(c),b=(P,O,E)=>Ba(P,l,c,!0)?1:Math.max(O,O*n,E,E*n),y=(P,O,E)=>Ba(P,l,c,!0)?-1:Math.min(O,O*n,E,E*n),v=b(0,u,p),k=b(kt,h,m),x=y(rt,u,p),C=y(rt+kt,h,m);o=(v-x)/2,i=(k-C)/2,a=-(v+x)/2,s=-(k+C)/2}return{ratioX:o,ratioY:i,offsetX:a,offsetY:s}}class Xr extends qn{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const o=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=o;else{let a=c=>+o[c];if(_e(o[e])){const{key:c="value"}=this._parsing;a=u=>+sr(o[u],c)}let s,l;for(s=e,l=e+n;s<l;++s)i._parsed[s]=a(s)}}_getRotation(){return Xn(this.options.rotation-90)}_getCircumference(){return Xn(this.options.circumference)}_getRotationExtents(){let e=it,n=-it;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const i=this.chart.getDatasetMeta(o).controller,a=i._getRotation(),s=i._getCircumference();e=Math.min(e,a),n=Math.max(n,a+s)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,i=this._cachedMeta,a=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,l=Math.max((Math.min(o.width,o.height)-s)/2,0),c=Math.min(DS(this.options.cutout,l),1),u=this._getRingWeight(this.index),{circumference:h,rotation:p}=this._getRotationExtents(),{ratioX:m,ratioY:b,offsetX:y,offsetY:v}=pA(p,h,c),k=(o.width-s)/m,x=(o.height-s)/b,C=Math.max(Math.min(k,x)/2,0),P=Ym(this.options.radius,C),O=Math.max(P*c,0),E=(P-O)/this._getVisibleDatasetWeightTotal();this.offsetX=y*P,this.offsetY=v*P,i.total=this.calculateTotal(),this.outerRadius=P-E*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-E*u,0),this.updateElements(a,0,a.length,e)}_circumference(e,n){const o=this.options,i=this._cachedMeta,a=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*a/it)}updateElements(e,n,o,i){const a=i==="reset",s=this.chart,l=s.chartArea,u=s.options.animation,h=(l.left+l.right)/2,p=(l.top+l.bottom)/2,m=a&&u.animateScale,b=m?0:this.innerRadius,y=m?0:this.outerRadius,{sharedOptions:v,includeOptions:k}=this._getSharedOptions(n,i);let x=this._getRotation(),C;for(C=0;C<n;++C)x+=this._circumference(C,a);for(C=n;C<n+o;++C){const P=this._circumference(C,a),O=e[C],E={x:h+this.offsetX,y:p+this.offsetY,startAngle:x,endAngle:x+P,circumference:P,outerRadius:y,innerRadius:b};k&&(E.options=v||this.resolveDataElementOptions(C,O.active?"active":i)),x+=P,this.updateElement(O,C,E,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,i;for(i=0;i<n.length;i++){const a=e._parsed[i];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(o+=Math.abs(a))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?it*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],a=Ia(n._parsed[e],o.options.locale);return{label:i[e]||"",value:a}}getMaxBorderWidth(e){let n=0;const o=this.chart;let i,a,s,l,c;if(!e){for(i=0,a=o.data.datasets.length;i<a;++i)if(o.isDatasetVisible(i)){s=o.getDatasetMeta(i),e=s.data,l=s.controller;break}}if(!e)return 0;for(i=0,a=e.length;i<a;++i)c=l.resolveDataElementOptions(i),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,i=e.length;o<i;++o){const a=this.resolveDataElementOptions(o);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let o=0;o<e;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(e){return Math.max(Oe(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}ue(Xr,"id","doughnut"),ue(Xr,"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"}),ue(Xr,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),ue(Xr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((a,s)=>{const c=e.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:i,lineWidth:c.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(s),index:s}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class fl extends qn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:i=[],_dataset:a}=n,s=this.chart._animationsDisabled;let{start:l,count:c}=ug(n,i,s);this._drawStart=l,this._drawCount=c,fg(n)&&(l=0,c=i.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!a._decimated,o.points=i;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(o,void 0,{animated:!s,options:u},e),this.updateElements(i,l,c,e)}updateElements(e,n,o,i){const a=i==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:u}=this._cachedMeta,{sharedOptions:h,includeOptions:p}=this._getSharedOptions(n,i),m=s.axis,b=l.axis,{spanGaps:y,segment:v}=this.options,k=Bi(y)?y:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||a||i==="none",C=n+o,P=e.length;let O=n>0&&this.getParsed(n-1);for(let E=0;E<P;++E){const T=e[E],A=x?T:{};if(E<n||E>=C){A.skip=!0;continue}const M=this.getParsed(E),z=ze(M[b]),W=A[m]=s.getPixelForValue(M[m],E),Q=A[b]=a||z?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,M,c):M[b],E);A.skip=isNaN(W)||isNaN(Q)||z,A.stop=E>0&&Math.abs(M[m]-O[m])>k,v&&(A.parsed=M,A.raw=u.data[E]),p&&(A.options=h||this.resolveDataElementOptions(E,T.active?"active":i)),x||this.updateElement(T,E,A,i),O=M}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return o;const a=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,a,s)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}ue(fl,"id","line"),ue(fl,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),ue(fl,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ra extends qn{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],a=Ia(n._parsed[e].r,o.options.locale);return{label:i[e]||"",value:a}}parseObjectData(e,n,o,i){return Dg.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((o,i)=>{const a=this.getParsed(i).r;!isNaN(a)&&this.chart.getDataVisibility(i)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,o=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(i/2,0),s=Math.max(o.cutoutPercentage?a/100*o.cutoutPercentage:1,0),l=(a-s)/e.getVisibleDatasetCount();this.outerRadius=a-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(e,n,o,i){const a=i==="reset",s=this.chart,c=s.options.animation,u=this._cachedMeta.rScale,h=u.xCenter,p=u.yCenter,m=u.getIndexAngle(0)-.5*rt;let b=m,y;const v=360/this.countVisibleElements();for(y=0;y<n;++y)b+=this._computeAngle(y,i,v);for(y=n;y<n+o;y++){const k=e[y];let x=b,C=b+this._computeAngle(y,i,v),P=s.getDataVisibility(y)?u.getDistanceFromCenterForValue(this.getParsed(y).r):0;b=C,a&&(c.animateScale&&(P=0),c.animateRotate&&(x=C=m));const O={x:h,y:p,innerRadius:0,outerRadius:P,startAngle:x,endAngle:C,options:this.resolveDataElementOptions(y,k.active?"active":i)};this.updateElement(k,y,O,i)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((o,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,o){return this.chart.getDataVisibility(e)?Xn(this.resolveDataElementOptions(e,n).angle||o):0}}ue(Ra,"id","polarArea"),ue(Ra,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),ue(Ra,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((a,s)=>{const c=e.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:i,lineWidth:c.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(s),index:s}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class wu extends Xr{}ue(wu,"id","pie"),ue(wu,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class pl extends qn{getLabelAndValue(e){const n=this._cachedMeta.vScale,o=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(e,n,o,i){return Dg.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta,o=n.dataset,i=n.data||[],a=n.iScale.getLabels();if(o.points=i,e!=="resize"){const s=this.resolveDatasetElementOptions(e);this.options.showLine||(s.borderWidth=0);const l={_loop:!0,_fullLoop:a.length===i.length,options:s};this.updateElement(o,void 0,l,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,o,i){const a=this._cachedMeta.rScale,s=i==="reset";for(let l=n;l<n+o;l++){const c=e[l],u=this.resolveDataElementOptions(l,c.active?"active":i),h=a.getPointPositionForValue(l,this.getParsed(l).r),p=s?a.xCenter:h.x,m=s?a.yCenter:h.y,b={x:p,y:m,angle:h.angle,skip:isNaN(p)||isNaN(m),options:u};this.updateElement(c,l,b,i)}}}ue(pl,"id","radar"),ue(pl,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),ue(pl,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class hl extends qn{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:a}=n,s=this.getParsed(e),l=i.getLabelForValue(s.x),c=a.getLabelForValue(s.y);return{label:o[e]||"",value:"("+l+", "+c+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,i=this.chart._animationsDisabled;let{start:a,count:s}=ug(n,o,i);if(this._drawStart=a,this._drawCount=s,fg(n)&&(a=0,s=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:l,_dataset:c}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=o;const u=this.resolveDatasetElementOptions(e);u.segment=this.options.segment,this.updateElement(l,void 0,{animated:!i,options:u},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,a,s,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,o,i){const a=i==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:u}=this._cachedMeta,h=this.resolveDataElementOptions(n,i),p=this.getSharedOptions(h),m=this.includeOptions(i,p),b=s.axis,y=l.axis,{spanGaps:v,segment:k}=this.options,x=Bi(v)?v:Number.POSITIVE_INFINITY,C=this.chart._animationsDisabled||a||i==="none";let P=n>0&&this.getParsed(n-1);for(let O=n;O<n+o;++O){const E=e[O],T=this.getParsed(O),A=C?E:{},M=ze(T[y]),z=A[b]=s.getPixelForValue(T[b],O),W=A[y]=a||M?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,T,c):T[y],O);A.skip=isNaN(z)||isNaN(W)||M,A.stop=O>0&&Math.abs(T[b]-P[b])>x,k&&(A.parsed=T,A.raw=u.data[O]),m&&(A.options=p||this.resolveDataElementOptions(O,E.active?"active":i)),C||this.updateElement(E,O,A,i),P=T}this.updateSharedOptions(p,i,h)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let l=0;for(let c=n.length-1;c>=0;--c)l=Math.max(l,n[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}const o=e.dataset,i=o.options&&o.options.borderWidth||0;if(!n.length)return i;const a=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,s)/2}}ue(hl,"id","scatter"),ue(hl,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),ue(hl,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var hA=Object.freeze({__proto__:null,BarController:cl,BubbleController:ul,DoughnutController:Xr,LineController:fl,PieController:wu,PolarAreaController:Ra,RadarController:pl,ScatterController:hl});function qr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class xu{constructor(e){ue(this,"options");this.options=e||{}}static override(e){Object.assign(xu.prototype,e)}init(){}formats(){return qr()}parse(){return qr()}format(){return qr()}add(){return qr()}diff(){return qr()}startOf(){return qr()}endOf(){return qr()}}var mA={_date:xu};function gA(t,e,n,o){const{controller:i,data:a,_sorted:s}=t,l=i._cachedMeta.iScale;if(l&&e===l.axis&&e!=="r"&&s&&a.length){const c=l._reversePixels?zS:Co;if(o){if(i._sharedOptions){const u=a[0],h=typeof u.getRange=="function"&&u.getRange(e);if(h){const p=c(a,e,n-h),m=c(a,e,n+h);return{lo:p.lo,hi:m.hi}}}}else return c(a,e,n)}return{lo:0,hi:a.length-1}}function Ta(t,e,n,o,i){const a=t.getSortedVisibleDatasetMetas(),s=n[e];for(let l=0,c=a.length;l<c;++l){const{index:u,data:h}=a[l],{lo:p,hi:m}=gA(a[l],e,s,i);for(let b=p;b<=m;++b){const y=h[b];y.skip||o(y,u,b)}}}function bA(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,i){const a=e?Math.abs(o.x-i.x):0,s=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function Su(t,e,n,o,i){const a=[];return!i&&!t.isPointInArea(e)||Ta(t,n,e,function(l,c,u){!i&&!Ao(l,t.chartArea,0)||l.inRange(e.x,e.y,o)&&a.push({element:l,datasetIndex:c,index:u})},!0),a}function yA(t,e,n,o){let i=[];function a(s,l,c){const{startAngle:u,endAngle:h}=s.getProps(["startAngle","endAngle"],o),{angle:p}=ig(s,{x:e.x,y:e.y});Ba(p,u,h)&&i.push({element:s,datasetIndex:l,index:c})}return Ta(t,n,e,a),i}function vA(t,e,n,o,i,a){let s=[];const l=bA(n);let c=Number.POSITIVE_INFINITY;function u(h,p,m){const b=h.inRange(e.x,e.y,i);if(o&&!b)return;const y=h.getCenterPoint(i);if(!(!!a||t.isPointInArea(y))&&!b)return;const k=l(e,y);k<c?(s=[{element:h,datasetIndex:p,index:m}],c=k):k===c&&s.push({element:h,datasetIndex:p,index:m})}return Ta(t,n,e,u),s}function Cu(t,e,n,o,i,a){return!a&&!t.isPointInArea(e)?[]:n==="r"&&!o?yA(t,e,n,i):vA(t,e,n,o,i,a)}function Zg(t,e,n,o,i){const a=[],s=n==="x"?"inXRange":"inYRange";let l=!1;return Ta(t,n,e,(c,u,h)=>{c[s](e[n],i)&&(a.push({element:c,datasetIndex:u,index:h}),l=l||c.inRange(e.x,e.y,i))}),o&&!l?[]:a}var kA={evaluateInteractionItems:Ta,modes:{index(t,e,n,o){const i=Gr(e,t),a=n.axis||"x",s=n.includeInvisible||!1,l=n.intersect?Su(t,i,a,o,s):Cu(t,i,a,!1,o,s),c=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const h=l[0].index,p=u.data[h];p&&!p.skip&&c.push({element:p,datasetIndex:u.index,index:h})}),c):[]},dataset(t,e,n,o){const i=Gr(e,t),a=n.axis||"xy",s=n.includeInvisible||!1;let l=n.intersect?Su(t,i,a,o,s):Cu(t,i,a,!1,o,s);if(l.length>0){const c=l[0].datasetIndex,u=t.getDatasetMeta(c).data;l=[];for(let h=0;h<u.length;++h)l.push({element:u[h],datasetIndex:c,index:h})}return l},point(t,e,n,o){const i=Gr(e,t),a=n.axis||"xy",s=n.includeInvisible||!1;return Su(t,i,a,o,s)},nearest(t,e,n,o){const i=Gr(e,t),a=n.axis||"xy",s=n.includeInvisible||!1;return Cu(t,i,a,n.intersect,o,s)},x(t,e,n,o){const i=Gr(e,t);return Zg(t,i,"x",n.intersect,o)},y(t,e,n,o){const i=Gr(e,t);return Zg(t,i,"y",n.intersect,o)}}};const $g=["left","top","right","bottom"];function Fa(t,e){return t.filter(n=>n.pos===e)}function e0(t,e){return t.filter(n=>$g.indexOf(n.pos)===-1&&n.box.axis===e)}function Ma(t,e){return t.sort((n,o)=>{const i=e?o:n,a=e?n:o;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function wA(t){const e=[];let n,o,i,a,s,l;for(n=0,o=(t||[]).length;n<o;++n)i=t[n],{position:a,options:{stack:s,stackWeight:l=1}}=i,e.push({index:n,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&a+s,stackWeight:l});return e}function xA(t){const e={};for(const n of t){const{stack:o,pos:i,stackWeight:a}=n;if(!o||!$g.includes(i))continue;const s=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return e}function SA(t,e){const n=xA(t),{vBoxMaxWidth:o,hBoxMaxHeight:i}=e;let a,s,l;for(a=0,s=t.length;a<s;++a){l=t[a];const{fullSize:c}=l.box,u=n[l.stack],h=u&&l.stackWeight/u.weight;l.horizontal?(l.width=h?h*o:c&&e.availableWidth,l.height=i):(l.width=o,l.height=h?h*i:c&&e.availableHeight)}return n}function CA(t){const e=wA(t),n=Ma(e.filter(u=>u.box.fullSize),!0),o=Ma(Fa(e,"left"),!0),i=Ma(Fa(e,"right")),a=Ma(Fa(e,"top"),!0),s=Ma(Fa(e,"bottom")),l=e0(e,"x"),c=e0(e,"y");return{fullSize:n,leftAndTop:o.concat(a),rightAndBottom:i.concat(c).concat(s).concat(l),chartArea:Fa(e,"chartArea"),vertical:o.concat(i).concat(c),horizontal:a.concat(s).concat(l)}}function t0(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function n0(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function AA(t,e,n,o){const{pos:i,box:a}=n,s=t.maxPadding;if(!_e(i)){n.size&&(t[i]-=n.size);const p=o[n.stack]||{size:0,count:1};p.size=Math.max(p.size,n.horizontal?a.height:a.width),n.size=p.size/p.count,t[i]+=n.size}a.getPadding&&n0(s,a.getPadding());const l=Math.max(0,e.outerWidth-t0(s,t,"left","right")),c=Math.max(0,e.outerHeight-t0(s,t,"top","bottom")),u=l!==t.w,h=c!==t.h;return t.w=l,t.h=c,n.horizontal?{same:u,other:h}:{same:h,other:u}}function EA(t){const e=t.maxPadding;function n(o){const i=Math.max(e[o]-t[o],0);return t[o]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function DA(t,e){const n=e.maxPadding;function o(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{a[s]=Math.max(e[s],n[s])}),a}return o(t?["left","right"]:["top","bottom"])}function La(t,e,n,o){const i=[];let a,s,l,c,u,h;for(a=0,s=t.length,u=0;a<s;++a){l=t[a],c=l.box,c.update(l.width||e.w,l.height||e.h,DA(l.horizontal,e));const{same:p,other:m}=AA(e,n,l,o);u|=p&&i.length,h=h||m,c.fullSize||i.push(l)}return u&&La(i,e,n,o)||h}function ml(t,e,n,o,i){t.top=n,t.left=e,t.right=e+o,t.bottom=n+i,t.width=o,t.height=i}function o0(t,e,n,o){const i=n.padding;let{x:a,y:s}=e;for(const l of t){const c=l.box,u=o[l.stack]||{count:1,placed:0,weight:1},h=l.stackWeight/u.weight||1;if(l.horizontal){const p=e.w*h,m=u.size||c.height;Ea(u.start)&&(s=u.start),c.fullSize?ml(c,i.left,s,n.outerWidth-i.right-i.left,m):ml(c,e.left+u.placed,s,p,m),u.start=s,u.placed+=p,s=c.bottom}else{const p=e.h*h,m=u.size||c.width;Ea(u.start)&&(a=u.start),c.fullSize?ml(c,a,i.top,m,n.outerHeight-i.bottom-i.top):ml(c,a,e.top+u.placed,m,p),u.start=a,u.placed+=p,a=c.right}}e.x=a,e.y=s}var jt={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,o){if(!t)return;const i=Mt(t.options.layout.padding),a=Math.max(e-i.width,0),s=Math.max(n-i.height,0),l=CA(t.boxes),c=l.vertical,u=l.horizontal;Je(t.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});const h=c.reduce((v,k)=>k.box.options&&k.box.options.display===!1?v:v+1,0)||1,p=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/h,hBoxMaxHeight:s/2}),m=Object.assign({},i);n0(m,Mt(o));const b=Object.assign({maxPadding:m,w:a,h:s,x:i.left,y:i.top},i),y=SA(c.concat(u),p);La(l.fullSize,b,p,y),La(c,b,p,y),La(u,b,p,y)&&La(c,b,p,y),EA(b),o0(l.leftAndTop,b,p,y),b.x+=b.w,b.y+=b.h,o0(l.rightAndBottom,b,p,y),t.chartArea={left:b.left,top:b.top,right:b.left+b.w,bottom:b.top+b.h,height:b.h,width:b.w},Je(l.chartArea,v=>{const k=v.box;Object.assign(k,t.chartArea),k.update(b.w,b.h,{left:0,top:0,right:0,bottom:0})})}};class r0{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,o){}removeEventListener(e,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,o,i){return n=Math.max(0,n||e.width),o=o||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(e){return!0}updateConfig(e){}}class BA extends r0{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const gl="$chartjs",PA={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},i0=t=>t===null||t==="";function IA(t,e){const n=t.style,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[gl]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",i0(i)){const a=Ig(t,"width");a!==void 0&&(t.width=a)}if(i0(o))if(t.style.height==="")t.height=t.width/(e||2);else{const a=Ig(t,"height");a!==void 0&&(t.height=a)}return t}const a0=NC?{passive:!0}:!1;function OA(t,e,n){t&&t.addEventListener(e,n,a0)}function NA(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,a0)}function VA(t,e){const n=PA[t.type]||t.type,{x:o,y:i}=Gr(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:i!==void 0?i:null}}function bl(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function RA(t,e,n){const o=t.canvas,i=new MutationObserver(a=>{let s=!1;for(const l of a)s=s||bl(l.addedNodes,o),s=s&&!bl(l.removedNodes,o);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function TA(t,e,n){const o=t.canvas,i=new MutationObserver(a=>{let s=!1;for(const l of a)s=s||bl(l.removedNodes,o),s=s&&!bl(l.addedNodes,o);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const za=new Map;let s0=0;function l0(){const t=window.devicePixelRatio;t!==s0&&(s0=t,za.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function FA(t,e){za.size||window.addEventListener("resize",l0),za.set(t,e)}function MA(t){za.delete(t),za.size||window.removeEventListener("resize",l0)}function LA(t,e,n){const o=t.canvas,i=o&&bu(o);if(!i)return;const a=cg((l,c)=>{const u=i.clientWidth;n(l,c),u<i.clientWidth&&n()},window),s=new ResizeObserver(l=>{const c=l[0],u=c.contentRect.width,h=c.contentRect.height;u===0&&h===0||a(u,h)});return s.observe(i),FA(t,a),s}function Au(t,e,n){n&&n.disconnect(),e==="resize"&&MA(t)}function zA(t,e,n){const o=t.canvas,i=cg(a=>{t.ctx!==null&&n(VA(a,t))},t);return OA(o,e,i),i}class _A extends r0{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(IA(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[gl])return!1;const o=n[gl].initial;["height","width"].forEach(a=>{const s=o[a];ze(s)?n.removeAttribute(a):n.setAttribute(a,s)});const i=o.style||{};return Object.keys(i).forEach(a=>{n.style[a]=i[a]}),n.width=n.width,delete n[gl],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),s={attach:RA,detach:TA,resize:LA}[n]||zA;i[n]=s(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),i=o[n];if(!i)return;({attach:Au,detach:Au,resize:Au}[n]||NA)(e,n,i),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,i){return OC(e,n,o,i)}isAttached(e){const n=e&&bu(e);return!!(n&&n.isConnected)}}function HA(t){return!gu()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?BA:_A}let Do=(hd=class{constructor(){ue(this,"x");ue(this,"y");ue(this,"active",!1);ue(this,"options");ue(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return Bi(this.x)&&Bi(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const i={};return e.forEach(a=>{i[a]=o[a]&&o[a].active()?o[a]._to:this[a]}),i}},ue(hd,"defaults",{}),ue(hd,"defaultRoutes"),hd);function UA(t,e){const n=t.options.ticks,o=WA(t),i=Math.min(n.maxTicksLimit||o,o),a=n.major.enabled?GA(e):[],s=a.length,l=a[0],c=a[s-1],u=[];if(s>i)return QA(e,u,a,s/i),u;const h=jA(a,e,i);if(s>0){let p,m;const b=s>1?Math.round((c-l)/(s-1)):null;for(yl(e,u,h,ze(b)?0:l-b,l),p=0,m=s-1;p<m;p++)yl(e,u,h,a[p],a[p+1]);return yl(e,u,h,c,ze(b)?e.length:c+b),u}return yl(e,u,h),u}function WA(t){const e=t.options.offset,n=t._tickSize(),o=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(o,i))}function jA(t,e,n){const o=XA(t),i=e.length/n;if(!o)return Math.max(i,1);const a=TS(o);for(let s=0,l=a.length-1;s<l;s++){const c=a[s];if(c>i)return c}return Math.max(i,1)}function GA(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function QA(t,e,n,o){let i=0,a=n[0],s;for(o=Math.ceil(o),s=0;s<t.length;s++)s===a&&(e.push(t[s]),i++,a=n[i*o])}function yl(t,e,n,o,i){const a=Oe(o,0),s=Math.min(Oe(i,t.length),t.length);let l=0,c,u,h;for(n=Math.ceil(n),i&&(c=i-o,n=c/Math.floor(c/n)),h=a;h<0;)l++,h=Math.round(a+l*n);for(u=Math.max(a,0);u<s;u++)u===h&&(e.push(t[u]),l++,h=Math.round(a+l*n))}function XA(t){const e=t.length;let n,o;if(e<2)return!1;for(o=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==o)return!1;return o}const qA=t=>t==="left"?"right":t==="right"?"left":t,d0=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,c0=(t,e)=>Math.min(e||t,t);function u0(t,e){const n=[],o=t.length/e,i=t.length;let a=0;for(;a<i;a+=o)n.push(t[Math.floor(a)]);return n}function KA(t,e,n){const o=t.ticks.length,i=Math.min(e,o-1),a=t._startPixel,s=t._endPixel,l=1e-6;let c=t.getPixelForTick(i),u;if(!(n&&(o===1?u=Math.max(c-a,s-c):e===0?u=(t.getPixelForTick(1)-c)/2:u=(c-t.getPixelForTick(i-1))/2,c+=i<e?u:-u,c<a-l||c>s+l)))return c}function JA(t,e){Je(t,n=>{const o=n.gc,i=o.length/2;let a;if(i>e){for(a=0;a<i;++a)delete n.data[o[a]];o.splice(0,i)}})}function _a(t){return t.drawTicks?t.tickLength:0}function f0(t,e){if(!t.display)return 0;const n=At(t.font,e),o=Mt(t.padding);return(ot(t.text)?t.text.length:1)*n.lineHeight+o.height}function YA(t,e){return cr(t,{scale:e,type:"scale"})}function ZA(t,e,n){return cr(t,{tick:n,index:e,type:"tick"})}function $A(t,e,n){let o=au(t);return(n&&e!=="right"||!n&&e==="right")&&(o=qA(o)),o}function e8(t,e,n,o){const{top:i,left:a,bottom:s,right:l,chart:c}=t,{chartArea:u,scales:h}=c;let p=0,m,b,y;const v=s-i,k=l-a;if(t.isHorizontal()){if(b=Wt(o,a,l),_e(n)){const x=Object.keys(n)[0],C=n[x];y=h[x].getPixelForValue(C)+v-e}else n==="center"?y=(u.bottom+u.top)/2+v-e:y=d0(t,n,e);m=l-a}else{if(_e(n)){const x=Object.keys(n)[0],C=n[x];b=h[x].getPixelForValue(C)-k+e}else n==="center"?b=(u.left+u.right)/2-k+e:b=d0(t,n,e);y=Wt(o,s,i),p=n==="left"?-kt:kt}return{titleX:b,titleY:y,maxWidth:m,rotation:p}}class Kr extends Do{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return e=kn(e,Number.POSITIVE_INFINITY),n=kn(n,Number.NEGATIVE_INFINITY),o=kn(o,Number.POSITIVE_INFINITY),i=kn(i,Number.NEGATIVE_INFINITY),{min:kn(e,o),max:kn(n,i),minDefined:yt(e),maxDefined:yt(n)}}getMinMax(e){let{min:n,max:o,minDefined:i,maxDefined:a}=this.getUserBounds(),s;if(i&&a)return{min:n,max:o};const l=this.getMatchingVisibleMetas();for(let c=0,u=l.length;c<u;++c)s=l[c].controller.getMinMax(this,e),i||(n=Math.min(n,s.min)),a||(o=Math.max(o,s.max));return n=a&&n>o?o:n,o=i&&n>o?n:o,{min:kn(n,kn(o,n)),max:kn(o,kn(n,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 e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$e(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:i,grace:a,ticks:s}=this.options,l=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,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=dC(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?u0(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=UA(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,e=!e),this._startPixel=n,this._endPixel=o,this._reversePixels=e,this._length=o-n,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(e){this.chart.notifyPlugins(e,this.getContext()),$e(this.options[e],[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(e){const n=this.options.ticks;let o,i,a;for(o=0,i=e.length;o<i;o++)a=e[o],a.label=$e(n.callback,[a.value,o,e],this)}afterTickToLabelConversion(){$e(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){$e(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=c0(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,a=n.maxRotation;let s=i,l,c,u;if(!this._isVisible()||!n.display||i>=a||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const h=this._getLabelSizes(),p=h.widest.width,m=h.highest.height,b=Ot(this.chart.width-p,0,this.maxWidth);l=e.offset?this.maxWidth/o:b/(o-1),p+6>l&&(l=b/(o-(e.offset?.5:1)),c=this.maxHeight-_a(e.grid)-n.padding-f0(e.title,this.chart.options.font),u=Math.sqrt(p*p+m*m),s=ou(Math.min(Math.asin(Ot((h.highest.height+6)/l,-1,1)),Math.asin(Ot(c/u,-1,1))-Math.asin(Ot(m/u,-1,1)))),s=Math.max(i,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){$e(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$e(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:a}}=this,s=this._isVisible(),l=this.isHorizontal();if(s){const c=f0(i,n.options.font);if(l?(e.width=this.maxWidth,e.height=_a(a)+c):(e.height=this.maxHeight,e.width=_a(a)+c),o.display&&this.ticks.length){const{first:u,last:h,widest:p,highest:m}=this._getLabelSizes(),b=o.padding*2,y=Xn(this.labelRotation),v=Math.cos(y),k=Math.sin(y);if(l){const x=o.mirror?0:k*p.width+v*m.height;e.height=Math.min(this.maxHeight,e.height+x+b)}else{const x=o.mirror?0:v*p.width+k*m.height;e.width=Math.min(this.maxWidth,e.width+x+b)}this._calculatePadding(u,h,k,v)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,o,i){const{ticks:{align:a,padding:s},position:l}=this.options,c=this.labelRotation!==0,u=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1);let m=0,b=0;c?u?(m=i*e.width,b=o*n.height):(m=o*e.height,b=i*n.width):a==="start"?b=n.width:a==="end"?m=e.width:a!=="inner"&&(m=e.width/2,b=n.width/2),this.paddingLeft=Math.max((m-h+s)*this.width/(this.width-h),0),this.paddingRight=Math.max((b-p+s)*this.width/(this.width-p),0)}else{let h=n.height/2,p=e.height/2;a==="start"?(h=0,p=e.height):a==="end"&&(h=n.height,p=0),this.paddingTop=h+s,this.paddingBottom=p+s}}_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:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,o;for(n=0,o=e.length;n<o;n++)ze(e[n].label)&&(e.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=u0(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:i,_longestTextCache:a}=this,s=[],l=[],c=Math.floor(n/c0(n,o));let u=0,h=0,p,m,b,y,v,k,x,C,P,O,E;for(p=0;p<n;p+=c){if(y=e[p].label,v=this._resolveTickFontOptions(p),i.font=k=v.string,x=a[k]=a[k]||{data:{},gc:[]},C=v.lineHeight,P=O=0,!ze(y)&&!ot(y))P=ol(i,x.data,x.gc,P,y),O=C;else if(ot(y))for(m=0,b=y.length;m<b;++m)E=y[m],!ze(E)&&!ot(E)&&(P=ol(i,x.data,x.gc,P,E),O+=C);s.push(P),l.push(O),u=Math.max(P,u),h=Math.max(O,h)}JA(a,n);const T=s.indexOf(u),A=l.indexOf(h),M=z=>({width:s[z]||0,height:l[z]||0});return{first:M(0),last:M(n-1),widest:M(T),highest:M(A),widths:s,heights:l}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return LS(this._alignToPixels?Hr(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const o=n[e];return o.$context||(o.$context=ZA(this.getContext(),e,o))}return this.$context||(this.$context=YA(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Xn(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),a=this._getLabelSizes(),s=e.autoSkipPadding||0,l=a?a.widest.width+s:0,c=a?a.highest.height+s:0;return this.isHorizontal()?c*o>l*i?l/o:c/i:c*i<l*o?c/o:l/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,o=this.chart,i=this.options,{grid:a,position:s,border:l}=i,c=a.offset,u=this.isHorizontal(),p=this.ticks.length+(c?1:0),m=_a(a),b=[],y=l.setContext(this.getContext()),v=y.display?y.width:0,k=v/2,x=function(D){return Hr(o,D,v)};let C,P,O,E,T,A,M,z,W,Q,N,F;if(s==="top")C=x(this.bottom),A=this.bottom-m,z=C-k,Q=x(e.top)+k,F=e.bottom;else if(s==="bottom")C=x(this.top),Q=e.top,F=x(e.bottom)-k,A=C+k,z=this.top+m;else if(s==="left")C=x(this.right),T=this.right-m,M=C-k,W=x(e.left)+k,N=e.right;else if(s==="right")C=x(this.left),W=e.left,N=x(e.right)-k,T=C+k,M=this.left+m;else if(n==="x"){if(s==="center")C=x((e.top+e.bottom)/2+.5);else if(_e(s)){const D=Object.keys(s)[0],U=s[D];C=x(this.chart.scales[D].getPixelForValue(U))}Q=e.top,F=e.bottom,A=C+k,z=A+m}else if(n==="y"){if(s==="center")C=x((e.left+e.right)/2);else if(_e(s)){const D=Object.keys(s)[0],U=s[D];C=x(this.chart.scales[D].getPixelForValue(U))}T=C-k,M=T-m,W=e.left,N=e.right}const V=Oe(i.ticks.maxTicksLimit,p),R=Math.max(1,Math.ceil(p/V));for(P=0;P<p;P+=R){const D=this.getContext(P),U=a.setContext(D),q=l.setContext(D),ne=U.lineWidth,le=U.color,ge=q.dash||[],ce=q.dashOffset,j=U.tickWidth,ee=U.tickColor,H=U.tickBorderDash||[],J=U.tickBorderDashOffset;O=KA(this,P,c),O!==void 0&&(E=Hr(o,O,ne),u?T=M=W=N=E:A=z=Q=F=E,b.push({tx1:T,ty1:A,tx2:M,ty2:z,x1:W,y1:Q,x2:N,y2:F,width:ne,color:le,borderDash:ge,borderDashOffset:ce,tickWidth:j,tickColor:ee,tickBorderDash:H,tickBorderDashOffset:J}))}return this._ticksLength=p,this._borderValue=C,b}_computeLabelItems(e){const n=this.axis,o=this.options,{position:i,ticks:a}=o,s=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:u,padding:h,mirror:p}=a,m=_a(o.grid),b=m+h,y=p?-h:b,v=-Xn(this.labelRotation),k=[];let x,C,P,O,E,T,A,M,z,W,Q,N,F="middle";if(i==="top")T=this.bottom-y,A=this._getXAxisLabelAlignment();else if(i==="bottom")T=this.top+y,A=this._getXAxisLabelAlignment();else if(i==="left"){const R=this._getYAxisLabelAlignment(m);A=R.textAlign,E=R.x}else if(i==="right"){const R=this._getYAxisLabelAlignment(m);A=R.textAlign,E=R.x}else if(n==="x"){if(i==="center")T=(e.top+e.bottom)/2+b;else if(_e(i)){const R=Object.keys(i)[0],D=i[R];T=this.chart.scales[R].getPixelForValue(D)+b}A=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")E=(e.left+e.right)/2-b;else if(_e(i)){const R=Object.keys(i)[0],D=i[R];E=this.chart.scales[R].getPixelForValue(D)}A=this._getYAxisLabelAlignment(m).textAlign}n==="y"&&(c==="start"?F="top":c==="end"&&(F="bottom"));const V=this._getLabelSizes();for(x=0,C=l.length;x<C;++x){P=l[x],O=P.label;const R=a.setContext(this.getContext(x));M=this.getPixelForTick(x)+a.labelOffset,z=this._resolveTickFontOptions(x),W=z.lineHeight,Q=ot(O)?O.length:1;const D=Q/2,U=R.color,q=R.textStrokeColor,ne=R.textStrokeWidth;let le=A;s?(E=M,A==="inner"&&(x===C-1?le=this.options.reverse?"left":"right":x===0?le=this.options.reverse?"right":"left":le="center"),i==="top"?u==="near"||v!==0?N=-Q*W+W/2:u==="center"?N=-V.highest.height/2-D*W+W:N=-V.highest.height+W/2:u==="near"||v!==0?N=W/2:u==="center"?N=V.highest.height/2-D*W:N=V.highest.height-Q*W,p&&(N*=-1),v!==0&&!R.showLabelBackdrop&&(E+=W/2*Math.sin(v))):(T=M,N=(1-Q)*W/2);let ge;if(R.showLabelBackdrop){const ce=Mt(R.backdropPadding),j=V.heights[x],ee=V.widths[x];let H=N-ce.top,J=0-ce.left;switch(F){case"middle":H-=j/2;break;case"bottom":H-=j;break}switch(A){case"center":J-=ee/2;break;case"right":J-=ee;break;case"inner":x===C-1?J-=ee:x>0&&(J-=ee/2);break}ge={left:J,top:H,width:ee+ce.width,height:j+ce.height,color:R.backdropColor}}k.push({label:O,font:z,textOffset:N,options:{rotation:v,color:U,strokeColor:q,strokeWidth:ne,textAlign:le,textBaseline:F,translation:[E,T],backdrop:ge}})}return k}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Xn(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:o,mirror:i,padding:a}}=this.options,s=this._getLabelSizes(),l=e+a,c=s.widest.width;let u,h;return n==="left"?i?(h=this.right+a,o==="near"?u="left":o==="center"?(u="center",h+=c/2):(u="right",h+=c)):(h=this.right-l,o==="near"?u="right":o==="center"?(u="center",h-=c/2):(u="left",h=this.left)):n==="right"?i?(h=this.left+a,o==="near"?u="right":o==="center"?(u="center",h-=c/2):(u="left",h-=c)):(h=this.left+l,o==="near"?u="left":o==="center"?(u="center",h+=c/2):(u="right",h=this.right)):u="right",{textAlign:u,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:o,top:i,width:a,height:s}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,i,a,s),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(a=>a.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let a,s;const l=(c,u,h)=>{!h.width||!h.color||(o.save(),o.lineWidth=h.width,o.strokeStyle=h.color,o.setLineDash(h.borderDash||[]),o.lineDashOffset=h.borderDashOffset,o.beginPath(),o.moveTo(c.x,c.y),o.lineTo(u.x,u.y),o.stroke(),o.restore())};if(n.display)for(a=0,s=i.length;a<s;++a){const c=i[a];n.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:i}}=this,a=o.setContext(this.getContext()),s=o.display?a.width:0;if(!s)return;const l=i.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let u,h,p,m;this.isHorizontal()?(u=Hr(e,this.left,s)-s/2,h=Hr(e,this.right,l)+l/2,p=m=c):(p=Hr(e,this.top,s)-s/2,m=Hr(e,this.bottom,l)+l/2,u=h=c),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(u,p),n.lineTo(h,m),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,i=this._computeLabelArea();i&&rl(o,i);const a=this.getLabelItems(e);for(const s of a){const l=s.options,c=s.font,u=s.label,h=s.textOffset;Ur(o,u,0,h,c,l)}i&&il(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const a=At(o.font),s=Mt(o.padding),l=o.align;let c=a.lineHeight/2;n==="bottom"||n==="center"||_e(n)?(c+=s.bottom,ot(o.text)&&(c+=a.lineHeight*(o.text.length-1))):c+=s.top;const{titleX:u,titleY:h,maxWidth:p,rotation:m}=e8(this,c,n,l);Ur(e,o.text,0,0,a,{color:o.color,maxWidth:p,rotation:m,textAlign:$A(l,n,i),textBaseline:"middle",translation:[u,h]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,o=Oe(e.grid&&e.grid.z,-1),i=Oe(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Kr.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:o,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let a,s;for(a=0,s=n.length;a<s;++a){const l=n[a];l[o]===this.id&&(!e||l.type===e)&&i.push(l)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return At(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class vl{constructor(e,n,o){this.type=e,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let o;o8(n)&&(o=this.register(n));const i=this.items,a=e.id,s=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+e);return a in i||(i[a]=e,t8(e,s,o),this.override&&pt.override(e.id,e.overrides)),s}get(e){return this.items[e]}unregister(e){const n=this.items,o=e.id,i=this.scope;o in n&&delete n[o],i&&o in pt[i]&&(delete pt[i][o],this.override&&delete _r[o])}}function t8(t,e,n){const o=lo(Object.create(null),[n?pt.get(n):{},pt.get(e),t.defaults]);pt.set(e,o),t.defaultRoutes&&n8(e,t.defaultRoutes),t.descriptors&&pt.describe(e,t.descriptors)}function n8(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),i=o.pop(),a=[t].concat(o).join("."),s=e[n].split("."),l=s.pop(),c=s.join(".");pt.route(a,i,c,l)})}function o8(t){return"id"in t&&"defaults"in t}class r8{constructor(){this.controllers=new vl(qn,"datasets",!0),this.elements=new vl(Do,"elements"),this.plugins=new vl(Object,"plugins"),this.scales=new vl(Kr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,o){[...n].forEach(i=>{const a=o||this._getRegistryForType(i);o||a.isForType(i)||a===this.plugins&&i.id?this._exec(e,a,i):Je(i,s=>{const l=o||this._getRegistryForType(s);this._exec(e,l,s)})})}_exec(e,n,o){const i=nu(e);$e(o["before"+i],[],o),n[e](o),$e(o["after"+i],[],o)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(e))return o}return this.plugins}_get(e,n,o){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+o+".");return i}}var uo=new r8;class i8{constructor(){this._init=[]}notify(e,n,o,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const a=i?this._descriptors(e).filter(i):this._descriptors(e),s=this._notify(a,e,n,o);return n==="afterDestroy"&&(this._notify(a,e,"stop"),this._notify(this._init,e,"uninstall")),s}_notify(e,n,o,i){i=i||{};for(const a of e){const s=a.plugin,l=s[o],c=[n,i,a.options];if($e(l,c,s)===!1&&i.cancelable)return!1}return!0}invalidate(){ze(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const o=e&&e.config,i=Oe(o.options&&o.options.plugins,{}),a=a8(o);return i===!1&&!n?[]:l8(e,a,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,i=(a,s)=>a.filter(l=>!s.some(c=>l.plugin.id===c.plugin.id));this._notify(i(n,o),e,"stop"),this._notify(i(o,n),e,"start")}}function a8(t){const e={},n=[],o=Object.keys(uo.plugins.items);for(let a=0;a<o.length;a++)n.push(uo.getPlugin(o[a]));const i=t.plugins||[];for(let a=0;a<i.length;a++){const s=i[a];n.indexOf(s)===-1&&(n.push(s),e[s.id]=!0)}return{plugins:n,localIds:e}}function s8(t,e){return!e&&t===!1?null:t===!0?{}:t}function l8(t,{plugins:e,localIds:n},o,i){const a=[],s=t.getContext();for(const l of e){const c=l.id,u=s8(o[c],i);u!==null&&a.push({plugin:l,options:d8(t.config,{plugin:l,local:n[c]},u,s)})}return a}function d8(t,{plugin:e,local:n},o,i){const a=t.pluginScopeKeys(e),s=t.getOptionScopes(o,a);return n&&e.defaults&&s.push(e.defaults),t.createResolver(s,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Eu(t,e){const n=pt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function c8(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function u8(t,e){return t===e?"_index_":"_value_"}function p0(t){if(t==="x"||t==="y"||t==="r")return t}function f8(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Du(t,...e){if(p0(t))return t;for(const n of e){const o=n.axis||f8(n.position)||t.length>1&&p0(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function h0(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function p8(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(o=>o.xAxisID===t||o.yAxisID===t);if(n.length)return h0(t,"x",n[0])||h0(t,"y",n[0])}return{}}function h8(t,e){const n=_r[t.type]||{scales:{}},o=e.scales||{},i=Eu(t.type,e),a=Object.create(null);return Object.keys(o).forEach(s=>{const l=o[s];if(!_e(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 c=Du(s,l,p8(s,t),pt.scales[l.type]),u=u8(c,i),h=n.scales||{};a[s]=Aa(Object.create(null),[{axis:c},l,h[c],h[u]])}),t.data.datasets.forEach(s=>{const l=s.type||t.type,c=s.indexAxis||Eu(l,e),h=(_r[l]||{}).scales||{};Object.keys(h).forEach(p=>{const m=c8(p,c),b=s[m+"AxisID"]||m;a[b]=a[b]||Object.create(null),Aa(a[b],[{axis:m},o[b],h[p]])})}),Object.keys(a).forEach(s=>{const l=a[s];Aa(l,[pt.scales[l.type],pt.scale])}),a}function m0(t){const e=t.options||(t.options={});e.plugins=Oe(e.plugins,{}),e.scales=h8(t,e)}function g0(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function m8(t){return t=t||{},t.data=g0(t.data),m0(t),t}const b0=new Map,y0=new Set;function kl(t,e){let n=b0.get(t);return n||(n=e(),b0.set(t,n),y0.add(n)),n}const Ha=(t,e,n)=>{const o=sr(e,n);o!==void 0&&t.add(o)};class g8{constructor(e){this._config=m8(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=g0(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),m0(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return kl(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return kl(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return kl(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return kl(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const o=this._scopeCache;let i=o.get(e);return(!i||n)&&(i=new Map,o.set(e,i)),i}getOptionScopes(e,n,o){const{options:i,type:a}=this,s=this._cachedScopes(e,o),l=s.get(n);if(l)return l;const c=new Set;n.forEach(h=>{e&&(c.add(e),h.forEach(p=>Ha(c,e,p))),h.forEach(p=>Ha(c,i,p)),h.forEach(p=>Ha(c,_r[a]||{},p)),h.forEach(p=>Ha(c,pt,p)),h.forEach(p=>Ha(c,du,p))});const u=Array.from(c);return u.length===0&&u.push(Object.create(null)),y0.has(n)&&s.set(n,u),u}chartOptionScopes(){const{options:e,type:n}=this;return[e,_r[n]||{},pt.datasets[n]||{},{type:n},pt,du]}resolveNamedOptions(e,n,o,i=[""]){const a={$shared:!0},{resolver:s,subPrefixes:l}=v0(this._resolverCache,e,i);let c=s;if(y8(s,n)){a.$shared=!1,o=lr(o)?o():o;const u=this.createResolver(e,o,l);c=Pi(s,o,u)}for(const u of n)a[u]=c[u];return a}createResolver(e,n,o=[""],i){const{resolver:a}=v0(this._resolverCache,e,o);return _e(n)?Pi(a,n,void 0,i):a}}function v0(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const i=n.join();let a=o.get(i);return a||(a={resolver:pu(e,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},o.set(i,a)),a}const b8=t=>_e(t)&&Object.getOwnPropertyNames(t).some(e=>lr(t[e]));function y8(t,e){const{isScriptable:n,isIndexable:o}=wg(t);for(const i of e){const a=n(i),s=o(i),l=(s||a)&&t[i];if(a&&(lr(l)||b8(l))||s&&ot(l))return!0}return!1}var v8="4.4.3";const k8=["top","bottom","left","right","chartArea"];function k0(t,e){return t==="top"||t==="bottom"||k8.indexOf(t)===-1&&e==="x"}function w0(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function x0(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),$e(n&&n.onComplete,[t],e)}function w8(t){const e=t.chart,n=e.options.animation;$e(n&&n.onProgress,[t],e)}function S0(t){return gu()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const wl={},C0=t=>{const e=S0(t);return Object.values(wl).filter(n=>n.canvas===e).pop()};function x8(t,e,n){const o=Object.keys(t);for(const i of o){const a=+i;if(a>=e){const s=t[i];delete t[i],(n>0||a>e)&&(t[a+n]=s)}}}function S8(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}function xl(t,e,n){return t.options.clip?t[n]:e[n]}function C8(t,e){const{xScale:n,yScale:o}=t;return n&&o?{left:xl(n,e,"left"),right:xl(n,e,"right"),top:xl(o,e,"top"),bottom:xl(o,e,"bottom")}:e}class on{static register(...e){uo.add(...e),A0()}static unregister(...e){uo.remove(...e),A0()}constructor(e,n){const o=this.config=new g8(n),i=S0(e),a=C0(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const s=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||HA(i)),this.platform.updateConfig(o);const l=this.platform.acquireContext(i,s.aspectRatio),c=l&&l.canvas,u=c&&c.height,h=c&&c.width;if(this.id=ES(),this.ctx=l,this.canvas=c,this.width=h,this.height=u,this._options=s,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 i8,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=US(p=>this.update(p),s.resizeDelay||0),this._dataChanges=[],wl[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}Eo.listen(this,"complete",x0),Eo.listen(this,"progress",w8),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:i,_aspectRatio:a}=this;return ze(e)?n&&a?a:i?o/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return uo}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Pg(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return yg(this.canvas,this.ctx),this}stop(){return Eo.stop(this),this}resize(e,n){Eo.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,i=this.canvas,a=o.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,e,n,a),l=o.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Pg(this,l,!0)&&(this.notifyPlugins("resize",{size:s}),$e(o.onResize,[this,s],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Je(n,(o,i)=>{o.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,i=Object.keys(o).reduce((s,l)=>(s[l]=!1,s),{});let a=[];n&&(a=a.concat(Object.keys(n).map(s=>{const l=n[s],c=Du(s,l),u=c==="r",h=c==="x";return{options:l,dposition:u?"chartArea":h?"bottom":"left",dtype:u?"radialLinear":h?"category":"linear"}}))),Je(a,s=>{const l=s.options,c=l.id,u=Du(c,l),h=Oe(l.type,s.dtype);(l.position===void 0||k0(l.position,u)!==k0(s.dposition))&&(l.position=s.dposition),i[c]=!0;let p=null;if(c in o&&o[c].type===h)p=o[c];else{const m=uo.getScale(h);p=new m({id:c,type:h,ctx:this.ctx,chart:this}),o[p.id]=p}p.init(l,e)}),Je(i,(s,l)=>{s||delete o[l]}),Je(o,s=>{jt.configure(this,s,s.options),jt.addBox(this,s)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((i,a)=>i.index-a.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort(w0("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,i)=>{n.filter(a=>a===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const a=n[o];let s=this.getDatasetMeta(o);const l=a.type||this.config.type;if(s.type&&s.type!==l&&(this._destroyDatasetMeta(o),s=this.getDatasetMeta(o)),s.type=l,s.indexAxis=a.indexAxis||Eu(l,this.options),s.order=a.order||0,s.index=o,s.label=""+a.label,s.visible=this.isDatasetVisible(o),s.controller)s.controller.updateIndex(o),s.controller.linkScales();else{const c=uo.getController(l),{datasetElementType:u,dataElementType:h}=pt.datasets[l];Object.assign(c,{dataElementType:uo.getElement(h),datasetElementType:u&&uo.getElement(u)}),s.controller=new c(this,o),e.push(s.controller)}}return this._updateMetasets(),e}_resetElements(){Je(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let u=0,h=this.data.datasets.length;u<h;u++){const{controller:p}=this.getDatasetMeta(u),m=!i&&a.indexOf(p)===-1;p.buildOrUpdateElements(m),s=Math.max(+p.getMaxOverflow(),s)}s=this._minPadding=o.layout.autoPadding?s:0,this._updateLayout(s),i||Je(a,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(w0("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){Je(this.scales,e=>{jt.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!eg(n,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:a}of n){const s=o==="_removeElements"?-a:a;x8(e,i,s)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=a=>new Set(e.filter(s=>s[0]===a).map((s,l)=>l+","+s.splice(1).join(","))),i=o(0);for(let a=1;a<n;a++)if(!eg(i,o(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;jt.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],Je(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,lr(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const o=this.getDatasetMeta(e),i={meta:o,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Eo.has(this)?this.attached&&!Eo.running(this)&&Eo.start(this):(this.draw(),x0({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resize(o,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,o=[];let i,a;for(i=0,a=n.length;i<a;++i){const s=n[i];(!e||s.visible)&&o.push(s)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,o=e._clip,i=!o.disabled,a=C8(e,this.chartArea),s={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&rl(n,{left:o.left===!1?0:a.left-o.left,right:o.right===!1?this.width:a.right+o.right,top:o.top===!1?0:a.top-o.top,bottom:o.bottom===!1?this.height:a.bottom+o.bottom}),e.controller.draw(),i&&il(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return Ao(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,i){const a=kA.modes[n];return typeof a=="function"?a(this,e,o,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let i=o.filter(a=>a&&a._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=cr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(e,n){const o=this.getDatasetMeta(e);o.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,o){const i=o?"show":"hide",a=this.getDatasetMeta(e),s=a.controller._resolveAnimations(void 0,i);Ea(n)?(a.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),s.update(a,{visible:o}),this.update(l=>l.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Eo.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),yg(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete wl[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,o=(a,s)=>{n.addEventListener(this,a,s),e[a]=s},i=(a,s,l)=>{a.offsetX=s,a.offsetY=l,this._eventHandler(a)};Je(this.options.events,a=>o(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(c,u)=>{n.addEventListener(this,c,u),e[c]=u},i=(c,u)=>{e[c]&&(n.removeEventListener(this,c,u),delete e[c])},a=(c,u)=>{this.canvas&&this.resize(c,u)};let s;const l=()=>{i("attach",l),this.attached=!0,this.resize(),o("resize",a),o("detach",s)};s=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),o("attach",l)},n.isAttached(this.canvas)?l():s()}unbindEvents(){Je(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Je(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const i=o?"set":"remove";let a,s,l,c;for(n==="dataset"&&(a=this.getDatasetMeta(e[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),l=0,c=e.length;l<c;++l){s=e[l];const u=s&&this.getDatasetMeta(s.datasetIndex).controller;u&&u[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:a,index:s})=>{const l=this.getDatasetMeta(a);if(!l)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:l.data[s],index:s}});!Zs(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(e,n,o){return this._plugins.notify(this,e,n,o)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,o){const i=this.options.hover,a=(c,u)=>c.filter(h=>!u.some(p=>h.datasetIndex===p.datasetIndex&&h.index===p.index)),s=a(n,e),l=o?e:a(e,n);s.length&&this.updateHoverStyle(s,i.mode,!1),l.length&&i.mode&&this.updateHoverStyle(l,i.mode,!0)}_eventHandler(e,n){const o={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=s=>(s.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const a=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(a||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:i=[],options:a}=this,s=n,l=this._getActiveElements(e,i,o,s),c=NS(e),u=S8(e,this._lastEvent,o,c);o&&(this._lastEvent=null,$e(a.onHover,[e,l,this],this),c&&$e(a.onClick,[e,l,this],this));const h=!Zs(l,i);return(h||n)&&(this._active=l,this._updateHoverStyles(l,i,n)),this._lastEvent=u,h}_getActiveElements(e,n,o,i){if(e.type==="mouseout")return[];if(!o)return n;const a=this.options.hover;return this.getElementsAtEventForMode(e,a.mode,a,i)}}ue(on,"defaults",pt),ue(on,"instances",wl),ue(on,"overrides",_r),ue(on,"registry",uo),ue(on,"version",v8),ue(on,"getChart",C0);function A0(){return Je(on.instances,t=>t._plugins.invalidate())}function A8(t,e,n){const{startAngle:o,pixelMargin:i,x:a,y:s,outerRadius:l,innerRadius:c}=e;let u=i/l;t.beginPath(),t.arc(a,s,l,o-u,n+u),c>i?(u=i/c,t.arc(a,s,c,n+u,o-u,!0)):t.arc(a,s,i,n+kt,o-kt),t.closePath(),t.clip()}function E8(t){return fu(t,["outerStart","outerEnd","innerStart","innerEnd"])}function D8(t,e,n,o){const i=E8(t.options.borderRadius),a=(n-e)/2,s=Math.min(a,o*e/2),l=c=>{const u=(n-Math.min(a,c))*o/2;return Ot(c,0,Math.min(a,u))};return{outerStart:l(i.outerStart),outerEnd:l(i.outerEnd),innerStart:Ot(i.innerStart,0,s),innerEnd:Ot(i.innerEnd,0,s)}}function Ni(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function Sl(t,e,n,o,i,a){const{x:s,y:l,startAngle:c,pixelMargin:u,innerRadius:h}=e,p=Math.max(e.outerRadius+o+n-u,0),m=h>0?h+o+n+u:0;let b=0;const y=i-c;if(o){const R=h>0?h-o:0,D=p>0?p-o:0,U=(R+D)/2,q=U!==0?y*U/(U+o):y;b=(y-q)/2}const v=Math.max(.001,y*p-n/rt)/p,k=(y-v)/2,x=c+k+b,C=i-k-b,{outerStart:P,outerEnd:O,innerStart:E,innerEnd:T}=D8(e,m,p,C-x),A=p-P,M=p-O,z=x+P/A,W=C-O/M,Q=m+E,N=m+T,F=x+E/Q,V=C-T/N;if(t.beginPath(),a){const R=(z+W)/2;if(t.arc(s,l,p,z,R),t.arc(s,l,p,R,W),O>0){const ne=Ni(M,W,s,l);t.arc(ne.x,ne.y,O,W,C+kt)}const D=Ni(N,C,s,l);if(t.lineTo(D.x,D.y),T>0){const ne=Ni(N,V,s,l);t.arc(ne.x,ne.y,T,C+kt,V+Math.PI)}const U=(C-T/m+(x+E/m))/2;if(t.arc(s,l,m,C-T/m,U,!0),t.arc(s,l,m,U,x+E/m,!0),E>0){const ne=Ni(Q,F,s,l);t.arc(ne.x,ne.y,E,F+Math.PI,x-kt)}const q=Ni(A,x,s,l);if(t.lineTo(q.x,q.y),P>0){const ne=Ni(A,z,s,l);t.arc(ne.x,ne.y,P,x-kt,z)}}else{t.moveTo(s,l);const R=Math.cos(z)*p+s,D=Math.sin(z)*p+l;t.lineTo(R,D);const U=Math.cos(W)*p+s,q=Math.sin(W)*p+l;t.lineTo(U,q)}t.closePath()}function B8(t,e,n,o,i){const{fullCircles:a,startAngle:s,circumference:l}=e;let c=e.endAngle;if(a){Sl(t,e,n,o,c,i);for(let u=0;u<a;++u)t.fill();isNaN(l)||(c=s+(l%it||it))}return Sl(t,e,n,o,c,i),t.fill(),c}function P8(t,e,n,o,i){const{fullCircles:a,startAngle:s,circumference:l,options:c}=e,{borderWidth:u,borderJoinStyle:h,borderDash:p,borderDashOffset:m}=c,b=c.borderAlign==="inner";if(!u)return;t.setLineDash(p||[]),t.lineDashOffset=m,b?(t.lineWidth=u*2,t.lineJoin=h||"round"):(t.lineWidth=u,t.lineJoin=h||"bevel");let y=e.endAngle;if(a){Sl(t,e,n,o,y,i);for(let v=0;v<a;++v)t.stroke();isNaN(l)||(y=s+(l%it||it))}b&&A8(t,e,y),a||(Sl(t,e,n,o,y,i),t.stroke())}class Vi extends Do{constructor(n){super();ue(this,"circumference");ue(this,"endAngle");ue(this,"fullCircles");ue(this,"innerRadius");ue(this,"outerRadius");ue(this,"pixelMargin");ue(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,o,i){const a=this.getProps(["x","y"],i),{angle:s,distance:l}=ig(a,{x:n,y:o}),{startAngle:c,endAngle:u,innerRadius:h,outerRadius:p,circumference:m}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),b=(this.options.spacing+this.options.borderWidth)/2,v=Oe(m,u-c)>=it||Ba(s,c,u),k=So(l,h+b,p+b);return v&&k}getCenterPoint(n){const{x:o,y:i,startAngle:a,endAngle:s,innerRadius:l,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:u,spacing:h}=this.options,p=(a+s)/2,m=(l+c+h+u)/2;return{x:o+Math.cos(p)*m,y:i+Math.sin(p)*m}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:i}=this,a=(o.offset||0)/4,s=(o.spacing||0)/2,l=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=i>it?Math.floor(i/it):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const c=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(c)*a,Math.sin(c)*a);const u=1-Math.sin(Math.min(rt,i||0)),h=a*u;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,B8(n,this,h,s,l),P8(n,this,h,s,l),n.restore()}}ue(Vi,"id","arc"),ue(Vi,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),ue(Vi,"defaultRoutes",{backgroundColor:"backgroundColor"}),ue(Vi,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function E0(t,e,n=e){t.lineCap=Oe(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Oe(n.borderDash,e.borderDash)),t.lineDashOffset=Oe(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Oe(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Oe(n.borderWidth,e.borderWidth),t.strokeStyle=Oe(n.borderColor,e.borderColor)}function I8(t,e,n){t.lineTo(n.x,n.y)}function O8(t){return t.stepped?eC:t.tension||t.cubicInterpolationMode==="monotone"?tC:I8}function D0(t,e,n={}){const o=t.length,{start:i=0,end:a=o-1}=n,{start:s,end:l}=e,c=Math.max(i,s),u=Math.min(a,l),h=i<s&&a<s||i>l&&a>l;return{count:o,start:c,loop:e.loop,ilen:u<c&&!h?o+u-c:u-c}}function N8(t,e,n,o){const{points:i,options:a}=e,{count:s,start:l,loop:c,ilen:u}=D0(i,n,o),h=O8(a);let{move:p=!0,reverse:m}=o||{},b,y,v;for(b=0;b<=u;++b)y=i[(l+(m?u-b:b))%s],!y.skip&&(p?(t.moveTo(y.x,y.y),p=!1):h(t,v,y,m,a.stepped),v=y);return c&&(y=i[(l+(m?u:0))%s],h(t,v,y,m,a.stepped)),!!c}function V8(t,e,n,o){const i=e.points,{count:a,start:s,ilen:l}=D0(i,n,o),{move:c=!0,reverse:u}=o||{};let h=0,p=0,m,b,y,v,k,x;const C=O=>(s+(u?l-O:O))%a,P=()=>{v!==k&&(t.lineTo(h,k),t.lineTo(h,v),t.lineTo(h,x))};for(c&&(b=i[C(0)],t.moveTo(b.x,b.y)),m=0;m<=l;++m){if(b=i[C(m)],b.skip)continue;const O=b.x,E=b.y,T=O|0;T===y?(E<v?v=E:E>k&&(k=E),h=(p*h+O)/++p):(P(),t.lineTo(O,E),y=T,p=0,v=k=E),x=E}P()}function Bu(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?V8:N8}function R8(t){return t.stepped?VC:t.tension||t.cubicInterpolationMode==="monotone"?RC:Qr}function T8(t,e,n,o){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,o)&&i.closePath()),E0(t,e.options),t.stroke(i)}function F8(t,e,n,o){const{segments:i,options:a}=e,s=Bu(e);for(const l of i)E0(t,a,l.style),t.beginPath(),s(t,e,l,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const M8=typeof Path2D=="function";function L8(t,e,n,o){M8&&!e.options.segment?T8(t,e,n,o):F8(t,e,n,o)}class ur extends Do{constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const i=o.spanGaps?this._loop:this._fullLoop;AC(this._points,o,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=_C(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,o=e.length;return o&&n[e[o-1].end]}interpolate(e,n){const o=this.options,i=e[n],a=this.points,s=Fg(this,{property:n,start:i,end:i});if(!s.length)return;const l=[],c=R8(o);let u,h;for(u=0,h=s.length;u<h;++u){const{start:p,end:m}=s[u],b=a[p],y=a[m];if(b===y){l.push(b);continue}const v=Math.abs((i-b[n])/(y[n]-b[n])),k=c(b,y,v,o.stepped);k[n]=e[n],l.push(k)}return l.length===1?l[0]:l}pathSegment(e,n,o){return Bu(this)(e,this,n,o)}path(e,n,o){const i=this.segments,a=Bu(this);let s=this._loop;n=n||0,o=o||this.points.length-n;for(const l of i)s&=a(e,this,l,{start:n,end:n+o-1});return!!s}draw(e,n,o,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(e.save(),L8(e,this,o,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}ue(ur,"id","line"),ue(ur,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),ue(ur,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),ue(ur,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function B0(t,e,n,o){const i=t.options,{[n]:a}=t.getProps([n],o);return Math.abs(e-a)<i.radius+i.hitRadius}class Ua extends Do{constructor(n){super();ue(this,"parsed");ue(this,"skip");ue(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,o,i){const a=this.options,{x:s,y:l}=this.getProps(["x","y"],i);return Math.pow(n-s,2)+Math.pow(o-l,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(n,o){return B0(this,n,"x",o)}inYRange(n,o){return B0(this,n,"y",o)}getCenterPoint(n){const{x:o,y:i}=this.getProps(["x","y"],n);return{x:o,y:i}}size(n){n=n||this.options||{};let o=n.radius||0;o=Math.max(o,o&&n.hoverRadius||0);const i=o&&n.borderWidth||0;return(o+i)*2}draw(n,o){const i=this.options;this.skip||i.radius<.1||!Ao(this,o,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,uu(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}ue(Ua,"id","point"),ue(Ua,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),ue(Ua,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function P0(t,e){const{x:n,y:o,base:i,width:a,height:s}=t.getProps(["x","y","base","width","height"],e);let l,c,u,h,p;return t.horizontal?(p=s/2,l=Math.min(n,i),c=Math.max(n,i),u=o-p,h=o+p):(p=a/2,l=n-p,c=n+p,u=Math.min(o,i),h=Math.max(o,i)),{left:l,top:u,right:c,bottom:h}}function fr(t,e,n,o){return t?0:Ot(e,n,o)}function z8(t,e,n){const o=t.options.borderWidth,i=t.borderSkipped,a=kg(o);return{t:fr(i.top,a.top,0,n),r:fr(i.right,a.right,0,e),b:fr(i.bottom,a.bottom,0,n),l:fr(i.left,a.left,0,e)}}function _8(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,a=Wr(i),s=Math.min(e,n),l=t.borderSkipped,c=o||_e(i);return{topLeft:fr(!c||l.top||l.left,a.topLeft,0,s),topRight:fr(!c||l.top||l.right,a.topRight,0,s),bottomLeft:fr(!c||l.bottom||l.left,a.bottomLeft,0,s),bottomRight:fr(!c||l.bottom||l.right,a.bottomRight,0,s)}}function H8(t){const e=P0(t),n=e.right-e.left,o=e.bottom-e.top,i=z8(t,n/2,o/2),a=_8(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:a},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function Pu(t,e,n,o){const i=e===null,a=n===null,l=t&&!(i&&a)&&P0(t,o);return l&&(i||So(e,l.left,l.right))&&(a||So(n,l.top,l.bottom))}function U8(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function W8(t,e){t.rect(e.x,e.y,e.w,e.h)}function Iu(t,e,n={}){const o=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,a=(t.x+t.w!==n.x+n.w?e:0)-o,s=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+o,y:t.y+i,w:t.w+a,h:t.h+s,radius:t.radius}}class Wa extends Do{constructor(e){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,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:a,outer:s}=H8(this),l=U8(s.radius)?Na:W8;e.save(),(s.w!==a.w||s.h!==a.h)&&(e.beginPath(),l(e,Iu(s,n,a)),e.clip(),l(e,Iu(a,-n,s)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),l(e,Iu(a,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,o){return Pu(this,e,n,o)}inXRange(e,n){return Pu(this,e,null,n)}inYRange(e,n){return Pu(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],e);return{x:a?(n+i)/2:n,y:a?o:(o+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}ue(Wa,"id","bar"),ue(Wa,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),ue(Wa,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var j8=Object.freeze({__proto__:null,ArcElement:Vi,BarElement:Wa,LineElement:ur,PointElement:Ua});const Ou=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],I0=Ou.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function O0(t){return Ou[t%Ou.length]}function N0(t){return I0[t%I0.length]}function G8(t,e){return t.borderColor=O0(e),t.backgroundColor=N0(e),++e}function Q8(t,e){return t.backgroundColor=t.data.map(()=>O0(e++)),e}function X8(t,e){return t.backgroundColor=t.data.map(()=>N0(e++)),e}function q8(t){let e=0;return(n,o)=>{const i=t.getDatasetMeta(o).controller;i instanceof Xr?e=Q8(n,e):i instanceof Ra?e=X8(n,e):i&&(e=G8(n,e))}}function V0(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function K8(t){return t&&(t.borderColor||t.backgroundColor)}var J8={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:o},options:i}=t.config,{elements:a}=i;if(!n.forceOverride&&(V0(o)||K8(i)||a&&V0(a)))return;const s=q8(t);o.forEach(s)}};function Y8(t,e,n,o,i){const a=i.samples||o;if(a>=n)return t.slice(e,e+n);const s=[],l=(n-2)/(a-2);let c=0;const u=e+n-1;let h=e,p,m,b,y,v;for(s[c++]=t[h],p=0;p<a-2;p++){let k=0,x=0,C;const P=Math.floor((p+1)*l)+1+e,O=Math.min(Math.floor((p+2)*l)+1,n)+e,E=O-P;for(C=P;C<O;C++)k+=t[C].x,x+=t[C].y;k/=E,x/=E;const T=Math.floor(p*l)+1+e,A=Math.min(Math.floor((p+1)*l)+1,n)+e,{x:M,y:z}=t[h];for(b=y=-1,C=T;C<A;C++)y=.5*Math.abs((M-k)*(t[C].y-z)-(M-t[C].x)*(x-z)),y>b&&(b=y,m=t[C],v=C);s[c++]=m,h=v}return s[c++]=t[u],s}function Z8(t,e,n,o){let i=0,a=0,s,l,c,u,h,p,m,b,y,v;const k=[],x=e+n-1,C=t[e].x,O=t[x].x-C;for(s=e;s<e+n;++s){l=t[s],c=(l.x-C)/O*o,u=l.y;const E=c|0;if(E===h)u<y?(y=u,p=s):u>v&&(v=u,m=s),i=(a*i+l.x)/++a;else{const T=s-1;if(!ze(p)&&!ze(m)){const A=Math.min(p,m),M=Math.max(p,m);A!==b&&A!==T&&k.push({...t[A],x:i}),M!==b&&M!==T&&k.push({...t[M],x:i})}s>0&&T!==b&&k.push(t[T]),k.push(l),h=E,a=0,y=v=u,p=m=b=s}}return k}function R0(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function T0(t){t.data.datasets.forEach(e=>{R0(e)})}function $8(t,e){const n=e.length;let o=0,i;const{iScale:a}=t,{min:s,max:l,minDefined:c,maxDefined:u}=a.getUserBounds();return c&&(o=Ot(Co(e,a.axis,s).lo,0,n-1)),u?i=Ot(Co(e,a.axis,l).hi+1,o,n)-o:i=n-o,{start:o,count:i}}var e4={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){T0(t);return}const o=t.width;t.data.datasets.forEach((i,a)=>{const{_data:s,indexAxis:l}=i,c=t.getDatasetMeta(a),u=s||i.data;if(at([l,t.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;const h=t.scales[c.xAxisID];if(h.type!=="linear"&&h.type!=="time"||t.options.parsing)return;let{start:p,count:m}=$8(c,u);const b=n.threshold||4*o;if(m<=b){R0(i);return}ze(s)&&(i._data=u,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(v){this._data=v}}));let y;switch(n.algorithm){case"lttb":y=Y8(u,p,m,o,n);break;case"min-max":y=Z8(u,p,m,o);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=y})},destroy(t){T0(t)}};function t4(t,e,n){const o=t.segments,i=t.points,a=e.points,s=[];for(const l of o){let{start:c,end:u}=l;u=Vu(c,u,i);const h=Nu(n,i[c],i[u],l.loop);if(!e.segments){s.push({source:l,target:h,start:i[c],end:i[u]});continue}const p=Fg(e,h);for(const m of p){const b=Nu(n,a[m.start],a[m.end],m.loop),y=Tg(l,i,b);for(const v of y)s.push({source:v,target:m,start:{[n]:F0(h,b,"start",Math.max)},end:{[n]:F0(h,b,"end",Math.min)}})}}return s}function Nu(t,e,n,o){if(o)return;let i=e[t],a=n[t];return t==="angle"&&(i=wn(i),a=wn(a)),{property:t,start:i,end:a}}function n4(t,e){const{x:n=null,y:o=null}=t||{},i=e.points,a=[];return e.segments.forEach(({start:s,end:l})=>{l=Vu(s,l,i);const c=i[s],u=i[l];o!==null?(a.push({x:c.x,y:o}),a.push({x:u.x,y:o})):n!==null&&(a.push({x:n,y:c.y}),a.push({x:n,y:u.y}))}),a}function Vu(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function F0(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function M0(t,e){let n=[],o=!1;return ot(t)?(o=!0,n=t):n=n4(t,e),n.length?new ur({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function L0(t){return t&&t.fill!==!1}function o4(t,e,n){let i=t[e].fill;const a=[e];let s;if(!n)return i;for(;i!==!1&&a.indexOf(i)===-1;){if(!yt(i))return i;if(s=t[i],!s)return!1;if(s.visible)return i;a.push(i),i=s.fill}return!1}function r4(t,e,n){const o=l4(t);if(_e(o))return isNaN(o.value)?!1:o;let i=parseFloat(o);return yt(i)&&Math.floor(i)===i?i4(o[0],e,i,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function i4(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function a4(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:_e(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function s4(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:_e(t)?o=t.value:o=e.getBaseValue(),o}function l4(t){const e=t.options,n=e.fill;let o=Oe(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function d4(t){const{scale:e,index:n,line:o}=t,i=[],a=o.segments,s=o.points,l=c4(e,n);l.push(M0({x:null,y:e.bottom},o));for(let c=0;c<a.length;c++){const u=a[c];for(let h=u.start;h<=u.end;h++)u4(i,s[h],l)}return new ur({points:i,options:{}})}function c4(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let i=0;i<o.length;i++){const a=o[i];if(a.index===e)break;a.hidden||n.unshift(a.dataset)}return n}function u4(t,e,n){const o=[];for(let i=0;i<n.length;i++){const a=n[i],{first:s,last:l,point:c}=f4(a,e,"x");if(!(!c||s&&l)){if(s)o.unshift(c);else if(t.push(c),!l)break}}t.push(...o)}function f4(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const i=o[n],a=t.segments,s=t.points;let l=!1,c=!1;for(let u=0;u<a.length;u++){const h=a[u],p=s[h.start][n],m=s[h.end][n];if(So(i,p,m)){l=i===p,c=i===m;break}}return{first:l,last:c,point:o}}class z0{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:i,y:a,radius:s}=this;return n=n||{start:0,end:it},e.arc(i,a,s,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:i}=this,a=e.angle;return{x:n+Math.cos(a)*i,y:o+Math.sin(a)*i,angle:a}}}function p4(t){const{chart:e,fill:n,line:o}=t;if(yt(n))return h4(e,n);if(n==="stack")return d4(t);if(n==="shape")return!0;const i=m4(t);return i instanceof z0?i:M0(i,o)}function h4(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function m4(t){return(t.scale||{}).getPointPositionForValue?b4(t):g4(t)}function g4(t){const{scale:e={},fill:n}=t,o=a4(n,e);if(yt(o)){const i=e.isHorizontal();return{x:i?o:null,y:i?null:o}}return null}function b4(t){const{scale:e,fill:n}=t,o=e.options,i=e.getLabels().length,a=o.reverse?e.max:e.min,s=s4(n,e,a),l=[];if(o.grid.circular){const c=e.getPointPositionForValue(0,a);return new z0({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(s)})}for(let c=0;c<i;++c)l.push(e.getPointPositionForValue(c,s));return l}function Ru(t,e,n){const o=p4(e),{line:i,scale:a,axis:s}=e,l=i.options,c=l.fill,u=l.backgroundColor,{above:h=u,below:p=u}=c||{};o&&i.points.length&&(rl(t,n),y4(t,{line:i,target:o,above:h,below:p,area:n,scale:a,axis:s}),il(t))}function y4(t,e){const{line:n,target:o,above:i,below:a,area:s,scale:l}=e,c=n._loop?"angle":e.axis;t.save(),c==="x"&&a!==i&&(_0(t,o,s.top),H0(t,{line:n,target:o,color:i,scale:l,property:c}),t.restore(),t.save(),_0(t,o,s.bottom)),H0(t,{line:n,target:o,color:a,scale:l,property:c}),t.restore()}function _0(t,e,n){const{segments:o,points:i}=e;let a=!0,s=!1;t.beginPath();for(const l of o){const{start:c,end:u}=l,h=i[c],p=i[Vu(c,u,i)];a?(t.moveTo(h.x,h.y),a=!1):(t.lineTo(h.x,n),t.lineTo(h.x,h.y)),s=!!e.pathSegment(t,l,{move:s}),s?t.closePath():t.lineTo(p.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function H0(t,e){const{line:n,target:o,property:i,color:a,scale:s}=e,l=t4(n,o,i);for(const{source:c,target:u,start:h,end:p}of l){const{style:{backgroundColor:m=a}={}}=c,b=o!==!0;t.save(),t.fillStyle=m,v4(t,s,b&&Nu(i,h,p)),t.beginPath();const y=!!n.pathSegment(t,c);let v;if(b){y?t.closePath():U0(t,o,p,i);const k=!!o.pathSegment(t,u,{move:y,reverse:!0});v=y&&k,v||U0(t,o,h,i)}t.closePath(),t.fill(v?"evenodd":"nonzero"),t.restore()}}function v4(t,e,n){const{top:o,bottom:i}=e.chart.chartArea,{property:a,start:s,end:l}=n||{};a==="x"&&(t.beginPath(),t.rect(s,o,l-s,i-o),t.clip())}function U0(t,e,n,o){const i=e.interpolate(n,o);i&&t.lineTo(i.x,i.y)}var k4={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,i=[];let a,s,l,c;for(s=0;s<o;++s)a=t.getDatasetMeta(s),l=a.dataset,c=null,l&&l.options&&l instanceof ur&&(c={visible:t.isDatasetVisible(s),index:s,fill:r4(l,s,o),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:l}),a.$filler=c,i.push(c);for(s=0;s<o;++s)c=i[s],!(!c||c.fill===!1)&&(c.fill=o4(i,s,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),a=t.chartArea;for(let s=i.length-1;s>=0;--s){const l=i[s].$filler;l&&(l.line.updateControlPoints(a,l.axis),o&&l.fill&&Ru(t.ctx,l,a))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let i=o.length-1;i>=0;--i){const a=o[i].$filler;L0(a)&&Ru(t.ctx,a,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!L0(o)||n.drawTime!=="beforeDatasetDraw"||Ru(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const W0=(t,e)=>{let{boxHeight:n=e,boxWidth:o=e}=t;return t.usePointStyle&&(n=Math.min(n,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(e,n)}},w4=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class j0 extends Do{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,o){this.maxWidth=e,this.maxHeight=n,this._margins=o,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=$e(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(o=>e.filter(o,this.chart.data))),e.sort&&(n=n.sort((o,i)=>e.sort(o,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const o=e.labels,i=At(o.font),a=i.size,s=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=W0(o,a);let u,h;n.font=i.string,this.isHorizontal()?(u=this.maxWidth,h=this._fitRows(s,a,l,c)+10):(h=this.maxHeight,u=this._fitCols(s,i,l,c)+10),this.width=Math.min(u,e.maxWidth||this.maxWidth),this.height=Math.min(h,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,i){const{ctx:a,maxWidth:s,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],u=this.lineWidths=[0],h=i+l;let p=e;a.textAlign="left",a.textBaseline="middle";let m=-1,b=-h;return this.legendItems.forEach((y,v)=>{const k=o+n/2+a.measureText(y.text).width;(v===0||u[u.length-1]+k+2*l>s)&&(p+=h,u[u.length-(v>0?0:1)]=0,b+=h,m++),c[v]={left:0,top:b,row:m,width:k,height:i},u[u.length-1]+=k+l}),p}_fitCols(e,n,o,i){const{ctx:a,maxHeight:s,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],u=this.columnSizes=[],h=s-e;let p=l,m=0,b=0,y=0,v=0;return this.legendItems.forEach((k,x)=>{const{itemWidth:C,itemHeight:P}=x4(o,n,a,k,i);x>0&&b+P+2*l>h&&(p+=m+l,u.push({width:m,height:b}),y+=m+l,v++,m=b=0),c[x]={left:y,top:b,col:v,width:C,height:P},m=Math.max(m,C),b+=P+l}),p+=m,u.push({width:m,height:b}),p}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:i},rtl:a}}=this,s=Oi(a,this.left,this.width);if(this.isHorizontal()){let l=0,c=Wt(o,this.left+i,this.right-this.lineWidths[l]);for(const u of n)l!==u.row&&(l=u.row,c=Wt(o,this.left+i,this.right-this.lineWidths[l])),u.top+=this.top+e+i,u.left=s.leftForLtr(s.x(c),u.width),c+=u.width+i}else{let l=0,c=Wt(o,this.top+e+i,this.bottom-this.columnSizes[l].height);for(const u of n)u.col!==l&&(l=u.col,c=Wt(o,this.top+e+i,this.bottom-this.columnSizes[l].height)),u.top=c,u.left+=this.left+i,u.left=s.leftForLtr(s.x(u.left),u.width),c+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;rl(e,this),this._draw(),il(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:i}=this,{align:a,labels:s}=e,l=pt.color,c=Oi(e.rtl,this.left,this.width),u=At(s.font),{padding:h}=s,p=u.size,m=p/2;let b;this.drawTitle(),i.textAlign=c.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:y,boxHeight:v,itemHeight:k}=W0(s,p),x=function(T,A,M){if(isNaN(y)||y<=0||isNaN(v)||v<0)return;i.save();const z=Oe(M.lineWidth,1);if(i.fillStyle=Oe(M.fillStyle,l),i.lineCap=Oe(M.lineCap,"butt"),i.lineDashOffset=Oe(M.lineDashOffset,0),i.lineJoin=Oe(M.lineJoin,"miter"),i.lineWidth=z,i.strokeStyle=Oe(M.strokeStyle,l),i.setLineDash(Oe(M.lineDash,[])),s.usePointStyle){const W={radius:v*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:z},Q=c.xPlus(T,y/2),N=A+m;vg(i,W,Q,N,s.pointStyleWidth&&y)}else{const W=A+Math.max((p-v)/2,0),Q=c.leftForLtr(T,y),N=Wr(M.borderRadius);i.beginPath(),Object.values(N).some(F=>F!==0)?Na(i,{x:Q,y:W,w:y,h:v,radius:N}):i.rect(Q,W,y,v),i.fill(),z!==0&&i.stroke()}i.restore()},C=function(T,A,M){Ur(i,M.text,T,A+k/2,u,{strikethrough:M.hidden,textAlign:c.textAlign(M.textAlign)})},P=this.isHorizontal(),O=this._computeTitleHeight();P?b={x:Wt(a,this.left+h,this.right-o[0]),y:this.top+h+O,line:0}:b={x:this.left+h,y:Wt(a,this.top+O+h,this.bottom-n[0].height),line:0},Og(this.ctx,e.textDirection);const E=k+h;this.legendItems.forEach((T,A)=>{i.strokeStyle=T.fontColor,i.fillStyle=T.fontColor;const M=i.measureText(T.text).width,z=c.textAlign(T.textAlign||(T.textAlign=s.textAlign)),W=y+m+M;let Q=b.x,N=b.y;c.setWidth(this.width),P?A>0&&Q+W+h>this.right&&(N=b.y+=E,b.line++,Q=b.x=Wt(a,this.left+h,this.right-o[b.line])):A>0&&N+E>this.bottom&&(Q=b.x=Q+n[b.line].width+h,b.line++,N=b.y=Wt(a,this.top+O+h,this.bottom-n[b.line].height));const F=c.x(Q);if(x(F,N,T),Q=WS(z,Q+y+m,P?Q+W:this.right,e.rtl),C(c.x(Q),N,T),P)b.x+=W+h;else if(typeof T.text!="string"){const V=u.lineHeight;b.y+=G0(T,V)+h}else b.y+=E}),Ng(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=At(n.font),i=Mt(n.padding);if(!n.display)return;const a=Oi(e.rtl,this.left,this.width),s=this.ctx,l=n.position,c=o.size/2,u=i.top+c;let h,p=this.left,m=this.width;if(this.isHorizontal())m=Math.max(...this.lineWidths),h=this.top+u,p=Wt(e.align,p,this.right-m);else{const y=this.columnSizes.reduce((v,k)=>Math.max(v,k.height),0);h=u+Wt(e.align,this.top,this.bottom-y-e.labels.padding-this._computeTitleHeight())}const b=Wt(l,p,p+m);s.textAlign=a.textAlign(au(l)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=o.string,Ur(s,n.text,b,h,o)}_computeTitleHeight(){const e=this.options.title,n=At(e.font),o=Mt(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,i,a;if(So(e,this.left,this.right)&&So(n,this.top,this.bottom)){for(a=this.legendHitBoxes,o=0;o<a.length;++o)if(i=a[o],So(e,i.left,i.left+i.width)&&So(n,i.top,i.top+i.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!A4(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,a=w4(i,o);i&&!a&&$e(n.onLeave,[e,i,this],this),this._hoveredItem=o,o&&!a&&$e(n.onHover,[e,o,this],this)}else o&&$e(n.onClick,[e,o,this],this)}}function x4(t,e,n,o,i){const a=S4(o,t,e,n),s=C4(i,o,e.lineHeight);return{itemWidth:a,itemHeight:s}}function S4(t,e,n,o){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((a,s)=>a.length>s.length?a:s)),e+n.size/2+o.measureText(i).width}function C4(t,e,n){let o=t;return typeof e.text!="string"&&(o=G0(e,n)),o}function G0(t,e){const n=t.text?t.text.length:0;return e*n}function A4(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var E4={id:"legend",_element:j0,start(t,e,n){const o=t.legend=new j0({ctx:t.ctx,options:n,chart:t});jt.configure(t,o,n),jt.addBox(t,o)},stop(t){jt.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;jt.configure(t,o,n),o.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const o=e.datasetIndex,i=n.chart;i.isDatasetVisible(o)?(i.hide(o),e.hidden=!0):(i.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:i,color:a,useBorderRadius:s,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map(c=>{const u=c.controller.getStyle(n?0:void 0),h=Mt(u.borderWidth);return{text:e[c.index].label,fillStyle:u.backgroundColor,fontColor:a,hidden:!c.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:u.borderColor,pointStyle:o||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:s&&(l||u.borderRadius),datasetIndex:c.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Tu extends Do{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=ot(o.text)?o.text.length:1;this._padding=Mt(o.padding);const a=i*At(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:o,bottom:i,right:a,options:s}=this,l=s.align;let c=0,u,h,p;return this.isHorizontal()?(h=Wt(l,o,a),p=n+e,u=a-o):(s.position==="left"?(h=o+e,p=Wt(l,i,n),c=rt*-.5):(h=a-e,p=Wt(l,n,i),c=rt*.5),u=i-n),{titleX:h,titleY:p,maxWidth:u,rotation:c}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const o=At(n.font),a=o.lineHeight/2+this._padding.top,{titleX:s,titleY:l,maxWidth:c,rotation:u}=this._drawArgs(a);Ur(e,n.text,0,0,o,{color:n.color,maxWidth:c,rotation:u,textAlign:au(n.align),textBaseline:"middle",translation:[s,l]})}}function D4(t,e){const n=new Tu({ctx:t.ctx,options:e,chart:t});jt.configure(t,n,e),jt.addBox(t,n),t.titleBlock=n}var B4={id:"title",_element:Tu,start(t,e,n){D4(t,n)},stop(t){const e=t.titleBlock;jt.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const o=t.titleBlock;jt.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Cl=new WeakMap;var P4={id:"subtitle",start(t,e,n){const o=new Tu({ctx:t.ctx,options:n,chart:t});jt.configure(t,o,n),jt.addBox(t,o),Cl.set(t,o)},stop(t){jt.removeBox(t,Cl.get(t)),Cl.delete(t)},beforeUpdate(t,e,n){const o=Cl.get(t);jt.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ja={average(t){if(!t.length)return!1;let e,n,o=new Set,i=0,a=0;for(e=0,n=t.length;e<n;++e){const l=t[e].element;if(l&&l.hasValue()){const c=l.tooltipPosition();o.add(c.x),i+=c.y,++a}}return{x:[...o].reduce((l,c)=>l+c)/o.size,y:i/a}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,i=Number.POSITIVE_INFINITY,a,s,l;for(a=0,s=t.length;a<s;++a){const c=t[a].element;if(c&&c.hasValue()){const u=c.getCenterPoint(),h=ru(e,u);h<i&&(i=h,l=c)}}if(l){const c=l.tooltipPosition();n=c.x,o=c.y}return{x:n,y:o}}};function fo(t,e){return e&&(ot(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Bo(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
30
30
  `)>-1?t.split(`
31
- `):t}function I8(t,e){const{element:n,datasetIndex:o,index:i}=e,a=t.getDatasetMeta(o).controller,{label:s,value:l}=a.getLabelAndValue(i);return{chart:t,label:s,parsed:a.getParsed(i),raw:t.data.datasets[o].data[i],formattedValue:l,dataset:a.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function Q0(t,e){const n=t.chart.ctx,{body:o,footer:i,title:a}=t,{boxWidth:s,boxHeight:l}=e,c=At(e.bodyFont),u=At(e.titleFont),h=At(e.footerFont),p=a.length,m=i.length,b=o.length,y=Mt(e.padding);let v=y.height,k=0,x=o.reduce((O,E)=>O+E.before.length+E.lines.length+E.after.length,0);if(x+=t.beforeBody.length+t.afterBody.length,p&&(v+=p*u.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),x){const O=e.displayColors?Math.max(l,c.lineHeight):c.lineHeight;v+=b*O+(x-b)*c.lineHeight+(x-1)*e.bodySpacing}m&&(v+=e.footerMarginTop+m*h.lineHeight+(m-1)*e.footerSpacing);let C=0;const P=function(O){k=Math.max(k,n.measureText(O).width+C)};return n.save(),n.font=u.string,Je(t.title,P),n.font=c.string,Je(t.beforeBody.concat(t.afterBody),P),C=e.displayColors?s+2+e.boxPadding:0,Je(o,O=>{Je(O.before,P),Je(O.lines,P),Je(O.after,P)}),C=0,n.font=h.string,Je(t.footer,P),n.restore(),k+=y.width,{width:k,height:v}}function O8(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function N8(t,e,n,o){const{x:i,width:a}=o,s=n.caretSize+n.caretPadding;if(t==="left"&&i+a+s>e.width||t==="right"&&i-a-s<0)return!0}function V8(t,e,n,o){const{x:i,width:a}=n,{width:s,chartArea:{left:l,right:c}}=t;let u="center";return o==="center"?u=i<=(l+c)/2?"left":"right":i<=a/2?u="left":i>=s-a/2&&(u="right"),N8(u,t,e,n)&&(u="center"),u}function X0(t,e,n){const o=n.yAlign||e.yAlign||O8(t,n);return{xAlign:n.xAlign||e.xAlign||V8(t,e,n,o),yAlign:o}}function R8(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function T8(t,e,n){let{y:o,height:i}=t;return e==="top"?o+=n:e==="bottom"?o-=i+n:o-=i/2,o}function q0(t,e,n,o){const{caretSize:i,caretPadding:a,cornerRadius:s}=t,{xAlign:l,yAlign:c}=n,u=i+a,{topLeft:h,topRight:p,bottomLeft:m,bottomRight:b}=Wr(s);let y=R8(e,l);const v=T8(e,c,u);return c==="center"?l==="left"?y+=u:l==="right"&&(y-=u):l==="left"?y-=Math.max(h,m)+i:l==="right"&&(y+=Math.max(p,b)+i),{x:Ot(y,0,o.width-e.width),y:Ot(v,0,o.height-e.height)}}function Al(t,e,n){const o=Mt(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function K0(t){return fo([],Bo(t))}function F8(t,e,n){return cr(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function J0(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Y0={beforeTitle:xo,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:xo,beforeBody:xo,beforeLabel:xo,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return ze(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:xo,afterBody:xo,beforeFooter:xo,footer:xo,afterFooter:xo};function rn(t,e,n,o){const i=t[e].call(n,o);return typeof i>"u"?Y0[e].call(n,o):i}class Fu extends Do{constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),i=o.enabled&&n.options.animation&&o.animations,a=new _g(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=F8(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,i=rn(o,"beforeTitle",this,e),a=rn(o,"title",this,e),s=rn(o,"afterTitle",this,e);let l=[];return l=fo(l,Bo(i)),l=fo(l,Bo(a)),l=fo(l,Bo(s)),l}getBeforeBody(e,n){return K0(rn(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,i=[];return Je(e,a=>{const s={before:[],lines:[],after:[]},l=J0(o,a);fo(s.before,Bo(rn(l,"beforeLabel",this,a))),fo(s.lines,rn(l,"label",this,a)),fo(s.after,Bo(rn(l,"afterLabel",this,a))),i.push(s)}),i}getAfterBody(e,n){return K0(rn(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,i=rn(o,"beforeFooter",this,e),a=rn(o,"footer",this,e),s=rn(o,"afterFooter",this,e);let l=[];return l=fo(l,Bo(i)),l=fo(l,Bo(a)),l=fo(l,Bo(s)),l}_createItems(e){const n=this._active,o=this.chart.data,i=[],a=[],s=[];let l=[],c,u;for(c=0,u=n.length;c<u;++c)l.push(I8(this.chart,n[c]));return e.filter&&(l=l.filter((h,p,m)=>e.filter(h,p,m,o))),e.itemSort&&(l=l.sort((h,p)=>e.itemSort(h,p,o))),Je(l,h=>{const p=J0(e.callbacks,h);i.push(rn(p,"labelColor",this,h)),a.push(rn(p,"labelPointStyle",this,h)),s.push(rn(p,"labelTextColor",this,h))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=l,l}update(e,n){const o=this.options.setContext(this.getContext()),i=this._active;let a,s=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const l=ja[o.position].call(this,i,this._eventPosition);s=this._createItems(o),this.title=this.getTitle(s,o),this.beforeBody=this.getBeforeBody(s,o),this.body=this.getBody(s,o),this.afterBody=this.getAfterBody(s,o),this.footer=this.getFooter(s,o);const c=this._size=Q0(this,o),u=Object.assign({},l,c),h=X0(this.chart,o,u),p=q0(o,u,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,a={opacity:1,x:p.x,y:p.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,i){const a=this.getCaretPosition(e,o,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(e,n,o){const{xAlign:i,yAlign:a}=this,{caretSize:s,cornerRadius:l}=o,{topLeft:c,topRight:u,bottomLeft:h,bottomRight:p}=Wr(l),{x:m,y:b}=e,{width:y,height:v}=n;let k,x,C,P,O,E;return a==="center"?(O=b+v/2,i==="left"?(k=m,x=k-s,P=O+s,E=O-s):(k=m+y,x=k+s,P=O-s,E=O+s),C=k):(i==="left"?x=m+Math.max(c,h)+s:i==="right"?x=m+y-Math.max(u,p)-s:x=this.caretX,a==="top"?(P=b,O=P-s,k=x-s,C=x+s):(P=b+v,O=P+s,k=x+s,C=x-s),E=P),{x1:k,x2:x,x3:C,y1:P,y2:O,y3:E}}drawTitle(e,n,o){const i=this.title,a=i.length;let s,l,c;if(a){const u=Oi(o.rtl,this.x,this.width);for(e.x=Al(this,o.titleAlign,o),n.textAlign=u.textAlign(o.titleAlign),n.textBaseline="middle",s=At(o.titleFont),l=o.titleSpacing,n.fillStyle=o.titleColor,n.font=s.string,c=0;c<a;++c)n.fillText(i[c],u.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+l,c+1===a&&(e.y+=o.titleMarginBottom-l)}}_drawColorBox(e,n,o,i,a){const s=this.labelColors[o],l=this.labelPointStyles[o],{boxHeight:c,boxWidth:u}=a,h=At(a.bodyFont),p=Al(this,"left",a),m=i.x(p),b=c<h.lineHeight?(h.lineHeight-c)/2:0,y=n.y+b;if(a.usePointStyle){const v={radius:Math.min(u,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},k=i.leftForLtr(m,u)+u/2,x=y+c/2;e.strokeStyle=a.multiKeyBackground,e.fillStyle=a.multiKeyBackground,uu(e,v,k,x),e.strokeStyle=s.borderColor,e.fillStyle=s.backgroundColor,uu(e,v,k,x)}else{e.lineWidth=_e(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,e.strokeStyle=s.borderColor,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset||0;const v=i.leftForLtr(m,u),k=i.leftForLtr(i.xPlus(m,1),u-2),x=Wr(s.borderRadius);Object.values(x).some(C=>C!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,Na(e,{x:v,y,w:u,h:c,radius:x}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),Na(e,{x:k,y:y+1,w:u-2,h:c-2,radius:x}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(v,y,u,c),e.strokeRect(v,y,u,c),e.fillStyle=s.backgroundColor,e.fillRect(k,y+1,u-2,c-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:i}=this,{bodySpacing:a,bodyAlign:s,displayColors:l,boxHeight:c,boxWidth:u,boxPadding:h}=o,p=At(o.bodyFont);let m=p.lineHeight,b=0;const y=Oi(o.rtl,this.x,this.width),v=function(M){n.fillText(M,y.x(e.x+b),e.y+m/2),e.y+=m+a},k=y.textAlign(s);let x,C,P,O,E,T,A;for(n.textAlign=s,n.textBaseline="middle",n.font=p.string,e.x=Al(this,k,o),n.fillStyle=o.bodyColor,Je(this.beforeBody,v),b=l&&k!=="right"?s==="center"?u/2+h:u+2+h:0,O=0,T=i.length;O<T;++O){for(x=i[O],C=this.labelTextColors[O],n.fillStyle=C,Je(x.before,v),P=x.lines,l&&P.length&&(this._drawColorBox(n,e,O,y,o),m=Math.max(p.lineHeight,c)),E=0,A=P.length;E<A;++E)v(P[E]),m=p.lineHeight;Je(x.after,v)}b=0,m=p.lineHeight,Je(this.afterBody,v),e.y-=a}drawFooter(e,n,o){const i=this.footer,a=i.length;let s,l;if(a){const c=Oi(o.rtl,this.x,this.width);for(e.x=Al(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=c.textAlign(o.footerAlign),n.textBaseline="middle",s=At(o.footerFont),n.fillStyle=o.footerColor,n.font=s.string,l=0;l<a;++l)n.fillText(i[l],c.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+o.footerSpacing}}drawBackground(e,n,o,i){const{xAlign:a,yAlign:s}=this,{x:l,y:c}=e,{width:u,height:h}=o,{topLeft:p,topRight:m,bottomLeft:b,bottomRight:y}=Wr(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(l+p,c),s==="top"&&this.drawCaret(e,n,o,i),n.lineTo(l+u-m,c),n.quadraticCurveTo(l+u,c,l+u,c+m),s==="center"&&a==="right"&&this.drawCaret(e,n,o,i),n.lineTo(l+u,c+h-y),n.quadraticCurveTo(l+u,c+h,l+u-y,c+h),s==="bottom"&&this.drawCaret(e,n,o,i),n.lineTo(l+b,c+h),n.quadraticCurveTo(l,c+h,l,c+h-b),s==="center"&&a==="left"&&this.drawCaret(e,n,o,i),n.lineTo(l,c+p),n.quadraticCurveTo(l,c,l+p,c),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,i=o&&o.x,a=o&&o.y;if(i||a){const s=ja[e.position].call(this,this._active,this._eventPosition);if(!s)return;const l=this._size=Q0(this,e),c=Object.assign({},s,this._size),u=X0(n,e,c),h=q0(e,c,u,n);(i._to!==h.x||a._to!==h.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=l.width,this.height=l.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const s=Mt(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(e.save(),e.globalAlpha=o,this.drawBackground(a,e,i,n),Og(e,n.textDirection),a.y+=s.top,this.drawTitle(a,e,n),this.drawBody(a,e,n),this.drawFooter(a,e,n),Ng(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,i=e.map(({datasetIndex:l,index:c})=>{const u=this.chart.getDatasetMeta(l);if(!u)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:u.data[c],index:c}}),a=!Zs(o,i),s=this._positionChanged(i,n);(a||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],s=this._getActiveElements(e,a,n,o),l=this._positionChanged(s,e),c=n||!Zs(s,a)||l;return c&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),c}_getActiveElements(e,n,o,i){const a=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const s=this.chart.getElementsAtEventForMode(e,a.mode,a,o);return a.reverse&&s.reverse(),s}_positionChanged(e,n){const{caretX:o,caretY:i,options:a}=this,s=ja[a.position].call(this,e,n);return s!==!1&&(o!==s.x||i!==s.y)}}ue(Fu,"positioners",ja);var M8={id:"tooltip",_element:Fu,positioners:ja,afterInit(t,e,n){n&&(t.tooltip=new Fu({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:Y0},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},L8=Object.freeze({__proto__:null,Colors:J4,Decimation:e8,Filler:k8,Legend:E8,SubTitle:P8,Title:B8,Tooltip:M8});const z8=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function _8(t,e,n,o){const i=t.indexOf(e);if(i===-1)return z8(t,e,n,o);const a=t.lastIndexOf(e);return i!==a?n:i}const H8=(t,e)=>t===null?null:Ot(Math.round(t),0,e);function Z0(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Mu extends Kr{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:i,label:a}of n)o[i]===a&&o.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(ze(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:_8(o,e,Oe(n,e),this._addedLabels),H8(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(i=this.getLabels().length-1)),this.min=o,this.max=i}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,i=[];let a=this.getLabels();a=e===0&&n===a.length-1?a:a.slice(e,n+1),this._valueRange=Math.max(a.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let s=e;s<=n;s++)i.push({value:s});return i}getLabelForValue(e){return Z0.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}ue(Mu,"id","category"),ue(Mu,"defaults",{ticks:{callback:Z0}});function U8(t,e){const n=[],{bounds:i,step:a,min:s,max:l,precision:c,count:u,maxTicks:h,maxDigits:p,includeBounds:m}=t,b=a||1,y=h-1,{min:v,max:k}=e,x=!ze(s),C=!ze(l),P=!ze(u),O=(k-v)/(p+1);let E=ng((k-v)/y/b)*b,T,A,M,z;if(E<1e-14&&!x&&!C)return[{value:v},{value:k}];z=Math.ceil(k/E)-Math.floor(v/E),z>y&&(E=ng(z*E/y/b)*b),ze(c)||(T=Math.pow(10,c),E=Math.ceil(E*T)/T),i==="ticks"?(A=Math.floor(v/E)*E,M=Math.ceil(k/E)*E):(A=v,M=k),x&&C&&a&&FS((l-s)/a,E/1e3)?(z=Math.round(Math.min((l-s)/E,h)),E=(l-s)/z,A=s,M=l):P?(A=x?s:A,M=C?l:M,z=u-1,E=(M-A)/z):(z=(M-A)/E,Da(z,Math.round(z),E/1e3)?z=Math.round(z):z=Math.ceil(z));const W=Math.max(rg(E),rg(A));T=Math.pow(10,ze(c)?W:c),A=Math.round(A*T)/T,M=Math.round(M*T)/T;let Q=0;for(x&&(m&&A!==s?(n.push({value:s}),A<s&&Q++,Da(Math.round((A+Q*E)*T)/T,s,$0(s,O,t))&&Q++):A<s&&Q++);Q<z;++Q){const N=Math.round((A+Q*E)*T)/T;if(C&&N>l)break;n.push({value:N})}return C&&m&&M!==l?n.length&&Da(n[n.length-1].value,l,$0(l,O,t))?n[n.length-1].value=l:n.push({value:l}):(!C||M===l)&&n.push({value:M}),n}function $0(t,e,{horizontal:n,minRotation:o}){const i=Xn(o),a=(n?Math.sin(i):Math.cos(i))||.001,s=.75*e*(""+t).length;return Math.min(e/a,s)}class El extends Kr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return ze(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:i,max:a}=this;const s=c=>i=n?i:c,l=c=>a=o?a:c;if(e){const c=co(i),u=co(a);c<0&&u<0?l(0):c>0&&u>0&&s(0)}if(i===a){let c=a===0?1:Math.abs(a*.05);l(a+c),e||s(i-c)}this.min=i,this.max=a}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,i;return o?(i=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const i={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,s=U8(i,a);return e.bounds==="ticks"&&og(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const i=(o-n)/Math.max(e.length-1,1)/2;n-=i,o+=i}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return Ia(e,this.chart.options.locale,this.options.ticks.format)}}class Lu extends El{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=yt(e)?e:0,this.max=yt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Xn(this.options.ticks.minRotation),i=(e?Math.sin(o):Math.cos(o))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}ue(Lu,"id","linear"),ue(Lu,"defaults",{ticks:{callback:nl.formatters.numeric}});const Ga=t=>Math.floor(dr(t)),Jr=(t,e)=>Math.pow(10,Ga(t)+e);function e1(t){return t/Math.pow(10,Ga(t))===1}function t1(t,e,n){const o=Math.pow(10,n),i=Math.floor(t/o);return Math.ceil(e/o)-i}function W8(t,e){const n=e-t;let o=Ga(n);for(;t1(t,e,o)>10;)o++;for(;t1(t,e,o)<10;)o--;return Math.min(o,Ga(t))}function j8(t,{min:e,max:n}){e=kn(t.min,e);const o=[],i=Ga(e);let a=W8(e,n),s=a<0?Math.pow(10,Math.abs(a)):1;const l=Math.pow(10,a),c=i>a?Math.pow(10,i):0,u=Math.round((e-c)*s)/s,h=Math.floor((e-c)/l/10)*l*10;let p=Math.floor((u-h)/Math.pow(10,a)),m=kn(t.min,Math.round((c+h+p*Math.pow(10,a))*s)/s);for(;m<n;)o.push({value:m,major:e1(m),significand:p}),p>=10?p=p<15?15:20:p++,p>=20&&(a++,p=2,s=a>=0?1:s),m=Math.round((c+h+p*Math.pow(10,a))*s)/s;const b=kn(t.max,m);return o.push({value:b,major:e1(b),significand:p}),o}class zu extends Kr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const o=El.prototype.parse.apply(this,[e,n]);if(o===0){this._zero=!0;return}return yt(o)&&o>0?o:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=yt(e)?Math.max(0,e):null,this.max=yt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!yt(this._userMin)&&(this.min=e===Jr(this.min,0)?Jr(this.min,-1):Jr(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let o=this.min,i=this.max;const a=l=>o=e?o:l,s=l=>i=n?i:l;o===i&&(o<=0?(a(1),s(10)):(a(Jr(o,-1)),s(Jr(i,1)))),o<=0&&a(Jr(i,-1)),i<=0&&s(Jr(o,1)),this.min=o,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},o=j8(n,this);return e.bounds==="ticks"&&og(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(e){return e===void 0?"0":Ia(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=dr(e),this._valueRange=dr(this.max)-dr(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(dr(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}ue(zu,"id","logarithmic"),ue(zu,"defaults",{ticks:{callback:nl.formatters.logarithmic,major:{enabled:!0}}});function _u(t){const e=t.ticks;if(e.display&&t.display){const n=Mt(e.backdropPadding);return Oe(e.font&&e.font.size,pt.font.size)+n.height}return 0}function G8(t,e,n){return n=ot(n)?n:[n],{w:$S(t,e.string,n),h:n.length*e.lineHeight}}function n1(t,e,n,o,i){return t===o||t===i?{start:e-n/2,end:e+n/2}:t<o||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function Q8(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),o=[],i=[],a=t._pointLabels.length,s=t.options.pointLabels,l=s.centerPointLabels?rt/a:0;for(let c=0;c<a;c++){const u=s.setContext(t.getPointLabelContext(c));i[c]=u.padding;const h=t.getPointPosition(c,t.drawingArea+i[c],l),p=At(u.font),m=G8(t.ctx,p,t._pointLabels[c]);o[c]=m;const b=wn(t.getIndexAngle(c)+l),y=Math.round(ou(b)),v=n1(y,h.x,m.w,0,180),k=n1(y,h.y,m.h,90,270);X8(n,e,b,v,k)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=J8(t,o,i)}function X8(t,e,n,o,i){const a=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let l=0,c=0;o.start<e.l?(l=(e.l-o.start)/a,t.l=Math.min(t.l,e.l-l)):o.end>e.r&&(l=(o.end-e.r)/a,t.r=Math.max(t.r,e.r+l)),i.start<e.t?(c=(e.t-i.start)/s,t.t=Math.min(t.t,e.t-c)):i.end>e.b&&(c=(i.end-e.b)/s,t.b=Math.max(t.b,e.b+c))}function q8(t,e,n){const o=t.drawingArea,{extra:i,additionalAngle:a,padding:s,size:l}=n,c=t.getPointPosition(e,o+i+s,a),u=Math.round(ou(wn(c.angle+kt))),h=$8(c.y,l.h,u),p=Y8(u),m=Z8(c.x,l.w,p);return{visible:!0,x:c.x,y:h,textAlign:p,left:m,top:h,right:m+l.w,bottom:h+l.h}}function K8(t,e){if(!e)return!0;const{left:n,top:o,right:i,bottom:a}=t;return!(Ao({x:n,y:o},e)||Ao({x:n,y:a},e)||Ao({x:i,y:o},e)||Ao({x:i,y:a},e))}function J8(t,e,n){const o=[],i=t._pointLabels.length,a=t.options,{centerPointLabels:s,display:l}=a.pointLabels,c={extra:_u(a)/2,additionalAngle:s?rt/i:0};let u;for(let h=0;h<i;h++){c.padding=n[h],c.size=e[h];const p=q8(t,h,c);o.push(p),l==="auto"&&(p.visible=K8(p,u),p.visible&&(u=p))}return o}function Y8(t){return t===0||t===180?"center":t<180?"left":"right"}function Z8(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function $8(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function e6(t,e,n){const{left:o,top:i,right:a,bottom:s}=n,{backdropColor:l}=e;if(!ze(l)){const c=Wr(e.borderRadius),u=Mt(e.backdropPadding);t.fillStyle=l;const h=o-u.left,p=i-u.top,m=a-o+u.width,b=s-i+u.height;Object.values(c).some(y=>y!==0)?(t.beginPath(),Na(t,{x:h,y:p,w:m,h:b,radius:c}),t.fill()):t.fillRect(h,p,m,b)}}function t6(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let i=e-1;i>=0;i--){const a=t._pointLabelItems[i];if(!a.visible)continue;const s=o.setContext(t.getPointLabelContext(i));e6(n,s,a);const l=At(s.font),{x:c,y:u,textAlign:h}=a;Ur(n,t._pointLabels[i],c,u+l.lineHeight/2,l,{color:s.color,textAlign:h,textBaseline:"middle"})}}function o1(t,e,n,o){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,it);else{let a=t.getPointPosition(0,e);i.moveTo(a.x,a.y);for(let s=1;s<o;s++)a=t.getPointPosition(s,e),i.lineTo(a.x,a.y)}}function n6(t,e,n,o,i){const a=t.ctx,s=e.circular,{color:l,lineWidth:c}=e;!s&&!o||!l||!c||n<0||(a.save(),a.strokeStyle=l,a.lineWidth=c,a.setLineDash(i.dash),a.lineDashOffset=i.dashOffset,a.beginPath(),o1(t,n,s,o),a.closePath(),a.stroke(),a.restore())}function o6(t,e,n){return cr(t,{label:n,index:e,type:"pointLabel"})}class Qa extends El{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Mt(_u(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=yt(e)&&!isNaN(e)?e:0,this.max=yt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/_u(this.options))}generateTickLabels(e){El.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const i=$e(this.options.pointLabels.callback,[n,o],this);return i||i===0?i:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?Q8(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,i))}getIndexAngle(e){const n=it/(this._pointLabels.length||1),o=this.options.startAngle||0;return wn(e*n+Xn(o))}getDistanceFromCenterForValue(e){if(ze(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(ze(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return o6(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const i=this.getIndexAngle(e)-kt+o;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:i,bottom:a}=this._pointLabelItems[e];return{left:n,top:o,right:i,bottom:a}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),o1(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:i,border:a}=n,s=this._pointLabels.length;let l,c,u;if(n.pointLabels.display&&t6(this,s),i.display&&this.ticks.forEach((h,p)=>{if(p!==0||p===0&&this.min<0){c=this.getDistanceFromCenterForValue(h.value);const m=this.getContext(p),b=i.setContext(m),y=a.setContext(m);n6(this,b,c,s,y)}}),o.display){for(e.save(),l=s-1;l>=0;l--){const h=o.setContext(this.getPointLabelContext(l)),{color:p,lineWidth:m}=h;!m||!p||(e.lineWidth=m,e.strokeStyle=p,e.setLineDash(h.borderDash),e.lineDashOffset=h.borderDashOffset,c=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),u=this.getPointPosition(l,c),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(u.x,u.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const i=this.getIndexAngle(0);let a,s;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((l,c)=>{if(c===0&&this.min>=0&&!n.reverse)return;const u=o.setContext(this.getContext(c)),h=At(u.font);if(a=this.getDistanceFromCenterForValue(this.ticks[c].value),u.showLabelBackdrop){e.font=h.string,s=e.measureText(l.label).width,e.fillStyle=u.backdropColor;const p=Mt(u.backdropPadding);e.fillRect(-s/2-p.left,-a-h.size/2-p.top,s+p.width,h.size+p.height)}Ur(e,l.label,0,-a,h,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),e.restore()}drawTitle(){}}ue(Qa,"id","radialLinear"),ue(Qa,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:nl.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),ue(Qa,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),ue(Qa,"descriptors",{angleLines:{_fallback:"grid"}});const Dl={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}},an=Object.keys(Dl);function r1(t,e){return t-e}function i1(t,e){if(ze(e))return null;const n=t._adapter,{parser:o,round:i,isoWeekday:a}=t._parseOpts;let s=e;return typeof o=="function"&&(s=o(s)),yt(s)||(s=typeof o=="string"?n.parse(s,o):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(Bi(a)||a===!0)?n.startOf(s,"isoWeek",a):n.startOf(s,i)),+s)}function a1(t,e,n,o){const i=an.length;for(let a=an.indexOf(t);a<i-1;++a){const s=Dl[an[a]],l=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-e)/(l*s.size))<=o)return an[a]}return an[i-1]}function r6(t,e,n,o,i){for(let a=an.length-1;a>=an.indexOf(n);a--){const s=an[a];if(Dl[s].common&&t._adapter.diff(i,o,s)>=e-1)return s}return an[n?an.indexOf(n):0]}function i6(t){for(let e=an.indexOf(t)+1,n=an.length;e<n;++e)if(Dl[an[e]].common)return an[e]}function s1(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:i}=iu(n,e),a=n[o]>=e?n[o]:n[i];t[a]=!0}}function a6(t,e,n,o){const i=t._adapter,a=+i.startOf(e[0].value,o),s=e[e.length-1].value;let l,c;for(l=a;l<=s;l=+i.add(l,1,o))c=n[l],c>=0&&(e[c].major=!0);return e}function l1(t,e,n){const o=[],i={},a=e.length;let s,l;for(s=0;s<a;++s)l=e[s],i[l]=s,o.push({value:l,major:!1});return a===0||!n?o:a6(t,o,i,n)}class Xa extends Kr{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),i=this._adapter=new mA._date(e.adapters.date);i.init(n),Aa(o.displayFormats,i.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:i1(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:i,max:a,minDefined:s,maxDefined:l}=this.getUserBounds();function c(u){!s&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!l&&!isNaN(u.max)&&(a=Math.max(a,u.max))}(!s||!l)&&(c(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&c(this.getMinMax(!1))),i=yt(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),a=yt(a)&&!isNaN(a)?a:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,i=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,s=this.max,l=_S(i,a,s);return this._unit=n.unit||(o.autoSkip?a1(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):r6(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:i6(this._unit),this.initOffsets(i),e.reverse&&l.reverse(),l1(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,i,a;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,a=this.getDecimalForValue(e[e.length-1]),e.length===1?o=a:o=(a-this.getDecimalForValue(e[e.length-2]))/2);const s=e.length<3?.5:.25;n=Ot(n,0,s),o=Ot(o,0,s),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,i=this.options,a=i.time,s=a.unit||a1(a.minUnit,n,o,this._getLabelCapacity(n)),l=Oe(i.ticks.stepSize,1),c=s==="week"?a.isoWeekday:!1,u=Bi(c)||c===!0,h={};let p=n,m,b;if(u&&(p=+e.startOf(p,"isoWeek",c)),p=+e.startOf(p,u?"day":s),e.diff(o,n,s)>1e5*l)throw new Error(n+" and "+o+" are too far apart with stepSize of "+l+" "+s);const y=i.ticks.source==="data"&&this.getDataTimestamps();for(m=p,b=0;m<o;m=+e.add(m,l,s),b++)s1(h,m,y);return(m===o||i.bounds==="ticks"||b===1)&&s1(h,m,y),Object.keys(h).sort(r1).map(v=>+v)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,a=this._unit,s=n||i[a];return this._adapter.format(e,s)}_tickFormatFunction(e,n,o,i){const a=this.options,s=a.ticks.callback;if(s)return $e(s,[e,n,o],this);const l=a.time.displayFormats,c=this._unit,u=this._majorUnit,h=c&&l[c],p=u&&l[u],m=o[n],b=u&&p&&m&&m.major;return this._adapter.format(e,i||(b?p:h))}generateTickLabels(e){let n,o,i;for(n=0,o=e.length;n<o;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,i=Xn(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),s=Math.sin(i),l=this._resolveTickFontOptions(0).size;return{w:o*a+l*s,h:o*s+l*a}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,a=this._tickFormatFunction(e,0,l1(this,[e],this._majorUnit),i),s=this._getLabelSize(a),l=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return l>0?l:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,o=i.length;n<o;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const i=this.getLabels();for(n=0,o=i.length;n<o;++n)e.push(i1(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return lg(e.sort(r1))}}ue(Xa,"id","time"),ue(Xa,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Bl(t,e,n){let o=0,i=t.length-1,a,s,l,c;n?(e>=t[o].pos&&e<=t[i].pos&&({lo:o,hi:i}=Co(t,"pos",e)),{pos:a,time:l}=t[o],{pos:s,time:c}=t[i]):(e>=t[o].time&&e<=t[i].time&&({lo:o,hi:i}=Co(t,"time",e)),{time:a,pos:l}=t[o],{time:s,pos:c}=t[i]);const u=s-a;return u?l+(c-l)*(e-a)/u:l}class Hu extends Xa{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Bl(n,this.min),this._tableRange=Bl(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,i=[],a=[];let s,l,c,u,h;for(s=0,l=e.length;s<l;++s)u=e[s],u>=n&&u<=o&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(s=0,l=i.length;s<l;++s)h=i[s+1],c=i[s-1],u=i[s],Math.round((h+c)/2)!==u&&a.push({time:u,pos:s/(l-1)});return a}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((i,a)=>i-a)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(Bl(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return Bl(this._table,o*this._tableRange+this._minPos,!0)}}ue(Hu,"id","timeseries"),ue(Hu,"defaults",Xa.defaults);var s6=Object.freeze({__proto__:null,CategoryScale:Mu,LinearScale:Lu,LogarithmicScale:zu,RadialLinearScale:Qa,TimeScale:Xa,TimeSeriesScale:Hu});const l6=[hA,j4,L8,s6];on.register(...l6);/*!
31
+ `):t}function I4(t,e){const{element:n,datasetIndex:o,index:i}=e,a=t.getDatasetMeta(o).controller,{label:s,value:l}=a.getLabelAndValue(i);return{chart:t,label:s,parsed:a.getParsed(i),raw:t.data.datasets[o].data[i],formattedValue:l,dataset:a.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function Q0(t,e){const n=t.chart.ctx,{body:o,footer:i,title:a}=t,{boxWidth:s,boxHeight:l}=e,c=At(e.bodyFont),u=At(e.titleFont),h=At(e.footerFont),p=a.length,m=i.length,b=o.length,y=Mt(e.padding);let v=y.height,k=0,x=o.reduce((O,E)=>O+E.before.length+E.lines.length+E.after.length,0);if(x+=t.beforeBody.length+t.afterBody.length,p&&(v+=p*u.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),x){const O=e.displayColors?Math.max(l,c.lineHeight):c.lineHeight;v+=b*O+(x-b)*c.lineHeight+(x-1)*e.bodySpacing}m&&(v+=e.footerMarginTop+m*h.lineHeight+(m-1)*e.footerSpacing);let C=0;const P=function(O){k=Math.max(k,n.measureText(O).width+C)};return n.save(),n.font=u.string,Je(t.title,P),n.font=c.string,Je(t.beforeBody.concat(t.afterBody),P),C=e.displayColors?s+2+e.boxPadding:0,Je(o,O=>{Je(O.before,P),Je(O.lines,P),Je(O.after,P)}),C=0,n.font=h.string,Je(t.footer,P),n.restore(),k+=y.width,{width:k,height:v}}function O4(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function N4(t,e,n,o){const{x:i,width:a}=o,s=n.caretSize+n.caretPadding;if(t==="left"&&i+a+s>e.width||t==="right"&&i-a-s<0)return!0}function V4(t,e,n,o){const{x:i,width:a}=n,{width:s,chartArea:{left:l,right:c}}=t;let u="center";return o==="center"?u=i<=(l+c)/2?"left":"right":i<=a/2?u="left":i>=s-a/2&&(u="right"),N4(u,t,e,n)&&(u="center"),u}function X0(t,e,n){const o=n.yAlign||e.yAlign||O4(t,n);return{xAlign:n.xAlign||e.xAlign||V4(t,e,n,o),yAlign:o}}function R4(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function T4(t,e,n){let{y:o,height:i}=t;return e==="top"?o+=n:e==="bottom"?o-=i+n:o-=i/2,o}function q0(t,e,n,o){const{caretSize:i,caretPadding:a,cornerRadius:s}=t,{xAlign:l,yAlign:c}=n,u=i+a,{topLeft:h,topRight:p,bottomLeft:m,bottomRight:b}=Wr(s);let y=R4(e,l);const v=T4(e,c,u);return c==="center"?l==="left"?y+=u:l==="right"&&(y-=u):l==="left"?y-=Math.max(h,m)+i:l==="right"&&(y+=Math.max(p,b)+i),{x:Ot(y,0,o.width-e.width),y:Ot(v,0,o.height-e.height)}}function Al(t,e,n){const o=Mt(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function K0(t){return fo([],Bo(t))}function F4(t,e,n){return cr(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function J0(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Y0={beforeTitle:xo,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:xo,beforeBody:xo,beforeLabel:xo,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return ze(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:xo,afterBody:xo,beforeFooter:xo,footer:xo,afterFooter:xo};function rn(t,e,n,o){const i=t[e].call(n,o);return typeof i>"u"?Y0[e].call(n,o):i}class Fu extends Do{constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),i=o.enabled&&n.options.animation&&o.animations,a=new _g(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=F4(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,i=rn(o,"beforeTitle",this,e),a=rn(o,"title",this,e),s=rn(o,"afterTitle",this,e);let l=[];return l=fo(l,Bo(i)),l=fo(l,Bo(a)),l=fo(l,Bo(s)),l}getBeforeBody(e,n){return K0(rn(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,i=[];return Je(e,a=>{const s={before:[],lines:[],after:[]},l=J0(o,a);fo(s.before,Bo(rn(l,"beforeLabel",this,a))),fo(s.lines,rn(l,"label",this,a)),fo(s.after,Bo(rn(l,"afterLabel",this,a))),i.push(s)}),i}getAfterBody(e,n){return K0(rn(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,i=rn(o,"beforeFooter",this,e),a=rn(o,"footer",this,e),s=rn(o,"afterFooter",this,e);let l=[];return l=fo(l,Bo(i)),l=fo(l,Bo(a)),l=fo(l,Bo(s)),l}_createItems(e){const n=this._active,o=this.chart.data,i=[],a=[],s=[];let l=[],c,u;for(c=0,u=n.length;c<u;++c)l.push(I4(this.chart,n[c]));return e.filter&&(l=l.filter((h,p,m)=>e.filter(h,p,m,o))),e.itemSort&&(l=l.sort((h,p)=>e.itemSort(h,p,o))),Je(l,h=>{const p=J0(e.callbacks,h);i.push(rn(p,"labelColor",this,h)),a.push(rn(p,"labelPointStyle",this,h)),s.push(rn(p,"labelTextColor",this,h))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=l,l}update(e,n){const o=this.options.setContext(this.getContext()),i=this._active;let a,s=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const l=ja[o.position].call(this,i,this._eventPosition);s=this._createItems(o),this.title=this.getTitle(s,o),this.beforeBody=this.getBeforeBody(s,o),this.body=this.getBody(s,o),this.afterBody=this.getAfterBody(s,o),this.footer=this.getFooter(s,o);const c=this._size=Q0(this,o),u=Object.assign({},l,c),h=X0(this.chart,o,u),p=q0(o,u,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,a={opacity:1,x:p.x,y:p.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,i){const a=this.getCaretPosition(e,o,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(e,n,o){const{xAlign:i,yAlign:a}=this,{caretSize:s,cornerRadius:l}=o,{topLeft:c,topRight:u,bottomLeft:h,bottomRight:p}=Wr(l),{x:m,y:b}=e,{width:y,height:v}=n;let k,x,C,P,O,E;return a==="center"?(O=b+v/2,i==="left"?(k=m,x=k-s,P=O+s,E=O-s):(k=m+y,x=k+s,P=O-s,E=O+s),C=k):(i==="left"?x=m+Math.max(c,h)+s:i==="right"?x=m+y-Math.max(u,p)-s:x=this.caretX,a==="top"?(P=b,O=P-s,k=x-s,C=x+s):(P=b+v,O=P+s,k=x+s,C=x-s),E=P),{x1:k,x2:x,x3:C,y1:P,y2:O,y3:E}}drawTitle(e,n,o){const i=this.title,a=i.length;let s,l,c;if(a){const u=Oi(o.rtl,this.x,this.width);for(e.x=Al(this,o.titleAlign,o),n.textAlign=u.textAlign(o.titleAlign),n.textBaseline="middle",s=At(o.titleFont),l=o.titleSpacing,n.fillStyle=o.titleColor,n.font=s.string,c=0;c<a;++c)n.fillText(i[c],u.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+l,c+1===a&&(e.y+=o.titleMarginBottom-l)}}_drawColorBox(e,n,o,i,a){const s=this.labelColors[o],l=this.labelPointStyles[o],{boxHeight:c,boxWidth:u}=a,h=At(a.bodyFont),p=Al(this,"left",a),m=i.x(p),b=c<h.lineHeight?(h.lineHeight-c)/2:0,y=n.y+b;if(a.usePointStyle){const v={radius:Math.min(u,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},k=i.leftForLtr(m,u)+u/2,x=y+c/2;e.strokeStyle=a.multiKeyBackground,e.fillStyle=a.multiKeyBackground,uu(e,v,k,x),e.strokeStyle=s.borderColor,e.fillStyle=s.backgroundColor,uu(e,v,k,x)}else{e.lineWidth=_e(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,e.strokeStyle=s.borderColor,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset||0;const v=i.leftForLtr(m,u),k=i.leftForLtr(i.xPlus(m,1),u-2),x=Wr(s.borderRadius);Object.values(x).some(C=>C!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,Na(e,{x:v,y,w:u,h:c,radius:x}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),Na(e,{x:k,y:y+1,w:u-2,h:c-2,radius:x}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(v,y,u,c),e.strokeRect(v,y,u,c),e.fillStyle=s.backgroundColor,e.fillRect(k,y+1,u-2,c-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:i}=this,{bodySpacing:a,bodyAlign:s,displayColors:l,boxHeight:c,boxWidth:u,boxPadding:h}=o,p=At(o.bodyFont);let m=p.lineHeight,b=0;const y=Oi(o.rtl,this.x,this.width),v=function(M){n.fillText(M,y.x(e.x+b),e.y+m/2),e.y+=m+a},k=y.textAlign(s);let x,C,P,O,E,T,A;for(n.textAlign=s,n.textBaseline="middle",n.font=p.string,e.x=Al(this,k,o),n.fillStyle=o.bodyColor,Je(this.beforeBody,v),b=l&&k!=="right"?s==="center"?u/2+h:u+2+h:0,O=0,T=i.length;O<T;++O){for(x=i[O],C=this.labelTextColors[O],n.fillStyle=C,Je(x.before,v),P=x.lines,l&&P.length&&(this._drawColorBox(n,e,O,y,o),m=Math.max(p.lineHeight,c)),E=0,A=P.length;E<A;++E)v(P[E]),m=p.lineHeight;Je(x.after,v)}b=0,m=p.lineHeight,Je(this.afterBody,v),e.y-=a}drawFooter(e,n,o){const i=this.footer,a=i.length;let s,l;if(a){const c=Oi(o.rtl,this.x,this.width);for(e.x=Al(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=c.textAlign(o.footerAlign),n.textBaseline="middle",s=At(o.footerFont),n.fillStyle=o.footerColor,n.font=s.string,l=0;l<a;++l)n.fillText(i[l],c.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+o.footerSpacing}}drawBackground(e,n,o,i){const{xAlign:a,yAlign:s}=this,{x:l,y:c}=e,{width:u,height:h}=o,{topLeft:p,topRight:m,bottomLeft:b,bottomRight:y}=Wr(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(l+p,c),s==="top"&&this.drawCaret(e,n,o,i),n.lineTo(l+u-m,c),n.quadraticCurveTo(l+u,c,l+u,c+m),s==="center"&&a==="right"&&this.drawCaret(e,n,o,i),n.lineTo(l+u,c+h-y),n.quadraticCurveTo(l+u,c+h,l+u-y,c+h),s==="bottom"&&this.drawCaret(e,n,o,i),n.lineTo(l+b,c+h),n.quadraticCurveTo(l,c+h,l,c+h-b),s==="center"&&a==="left"&&this.drawCaret(e,n,o,i),n.lineTo(l,c+p),n.quadraticCurveTo(l,c,l+p,c),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,i=o&&o.x,a=o&&o.y;if(i||a){const s=ja[e.position].call(this,this._active,this._eventPosition);if(!s)return;const l=this._size=Q0(this,e),c=Object.assign({},s,this._size),u=X0(n,e,c),h=q0(e,c,u,n);(i._to!==h.x||a._to!==h.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=l.width,this.height=l.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const s=Mt(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(e.save(),e.globalAlpha=o,this.drawBackground(a,e,i,n),Og(e,n.textDirection),a.y+=s.top,this.drawTitle(a,e,n),this.drawBody(a,e,n),this.drawFooter(a,e,n),Ng(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,i=e.map(({datasetIndex:l,index:c})=>{const u=this.chart.getDatasetMeta(l);if(!u)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:u.data[c],index:c}}),a=!Zs(o,i),s=this._positionChanged(i,n);(a||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],s=this._getActiveElements(e,a,n,o),l=this._positionChanged(s,e),c=n||!Zs(s,a)||l;return c&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),c}_getActiveElements(e,n,o,i){const a=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const s=this.chart.getElementsAtEventForMode(e,a.mode,a,o);return a.reverse&&s.reverse(),s}_positionChanged(e,n){const{caretX:o,caretY:i,options:a}=this,s=ja[a.position].call(this,e,n);return s!==!1&&(o!==s.x||i!==s.y)}}ue(Fu,"positioners",ja);var M4={id:"tooltip",_element:Fu,positioners:ja,afterInit(t,e,n){n&&(t.tooltip=new Fu({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:Y0},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},L4=Object.freeze({__proto__:null,Colors:J8,Decimation:e4,Filler:k4,Legend:E4,SubTitle:P4,Title:B4,Tooltip:M4});const z4=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function _4(t,e,n,o){const i=t.indexOf(e);if(i===-1)return z4(t,e,n,o);const a=t.lastIndexOf(e);return i!==a?n:i}const H4=(t,e)=>t===null?null:Ot(Math.round(t),0,e);function Z0(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Mu extends Kr{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:i,label:a}of n)o[i]===a&&o.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(ze(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:_4(o,e,Oe(n,e),this._addedLabels),H4(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(i=this.getLabels().length-1)),this.min=o,this.max=i}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,i=[];let a=this.getLabels();a=e===0&&n===a.length-1?a:a.slice(e,n+1),this._valueRange=Math.max(a.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let s=e;s<=n;s++)i.push({value:s});return i}getLabelForValue(e){return Z0.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}ue(Mu,"id","category"),ue(Mu,"defaults",{ticks:{callback:Z0}});function U4(t,e){const n=[],{bounds:i,step:a,min:s,max:l,precision:c,count:u,maxTicks:h,maxDigits:p,includeBounds:m}=t,b=a||1,y=h-1,{min:v,max:k}=e,x=!ze(s),C=!ze(l),P=!ze(u),O=(k-v)/(p+1);let E=ng((k-v)/y/b)*b,T,A,M,z;if(E<1e-14&&!x&&!C)return[{value:v},{value:k}];z=Math.ceil(k/E)-Math.floor(v/E),z>y&&(E=ng(z*E/y/b)*b),ze(c)||(T=Math.pow(10,c),E=Math.ceil(E*T)/T),i==="ticks"?(A=Math.floor(v/E)*E,M=Math.ceil(k/E)*E):(A=v,M=k),x&&C&&a&&FS((l-s)/a,E/1e3)?(z=Math.round(Math.min((l-s)/E,h)),E=(l-s)/z,A=s,M=l):P?(A=x?s:A,M=C?l:M,z=u-1,E=(M-A)/z):(z=(M-A)/E,Da(z,Math.round(z),E/1e3)?z=Math.round(z):z=Math.ceil(z));const W=Math.max(rg(E),rg(A));T=Math.pow(10,ze(c)?W:c),A=Math.round(A*T)/T,M=Math.round(M*T)/T;let Q=0;for(x&&(m&&A!==s?(n.push({value:s}),A<s&&Q++,Da(Math.round((A+Q*E)*T)/T,s,$0(s,O,t))&&Q++):A<s&&Q++);Q<z;++Q){const N=Math.round((A+Q*E)*T)/T;if(C&&N>l)break;n.push({value:N})}return C&&m&&M!==l?n.length&&Da(n[n.length-1].value,l,$0(l,O,t))?n[n.length-1].value=l:n.push({value:l}):(!C||M===l)&&n.push({value:M}),n}function $0(t,e,{horizontal:n,minRotation:o}){const i=Xn(o),a=(n?Math.sin(i):Math.cos(i))||.001,s=.75*e*(""+t).length;return Math.min(e/a,s)}class El extends Kr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return ze(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:i,max:a}=this;const s=c=>i=n?i:c,l=c=>a=o?a:c;if(e){const c=co(i),u=co(a);c<0&&u<0?l(0):c>0&&u>0&&s(0)}if(i===a){let c=a===0?1:Math.abs(a*.05);l(a+c),e||s(i-c)}this.min=i,this.max=a}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,i;return o?(i=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const i={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,s=U4(i,a);return e.bounds==="ticks"&&og(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const i=(o-n)/Math.max(e.length-1,1)/2;n-=i,o+=i}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return Ia(e,this.chart.options.locale,this.options.ticks.format)}}class Lu extends El{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=yt(e)?e:0,this.max=yt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Xn(this.options.ticks.minRotation),i=(e?Math.sin(o):Math.cos(o))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}ue(Lu,"id","linear"),ue(Lu,"defaults",{ticks:{callback:nl.formatters.numeric}});const Ga=t=>Math.floor(dr(t)),Jr=(t,e)=>Math.pow(10,Ga(t)+e);function e1(t){return t/Math.pow(10,Ga(t))===1}function t1(t,e,n){const o=Math.pow(10,n),i=Math.floor(t/o);return Math.ceil(e/o)-i}function W4(t,e){const n=e-t;let o=Ga(n);for(;t1(t,e,o)>10;)o++;for(;t1(t,e,o)<10;)o--;return Math.min(o,Ga(t))}function j4(t,{min:e,max:n}){e=kn(t.min,e);const o=[],i=Ga(e);let a=W4(e,n),s=a<0?Math.pow(10,Math.abs(a)):1;const l=Math.pow(10,a),c=i>a?Math.pow(10,i):0,u=Math.round((e-c)*s)/s,h=Math.floor((e-c)/l/10)*l*10;let p=Math.floor((u-h)/Math.pow(10,a)),m=kn(t.min,Math.round((c+h+p*Math.pow(10,a))*s)/s);for(;m<n;)o.push({value:m,major:e1(m),significand:p}),p>=10?p=p<15?15:20:p++,p>=20&&(a++,p=2,s=a>=0?1:s),m=Math.round((c+h+p*Math.pow(10,a))*s)/s;const b=kn(t.max,m);return o.push({value:b,major:e1(b),significand:p}),o}class zu extends Kr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const o=El.prototype.parse.apply(this,[e,n]);if(o===0){this._zero=!0;return}return yt(o)&&o>0?o:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=yt(e)?Math.max(0,e):null,this.max=yt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!yt(this._userMin)&&(this.min=e===Jr(this.min,0)?Jr(this.min,-1):Jr(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let o=this.min,i=this.max;const a=l=>o=e?o:l,s=l=>i=n?i:l;o===i&&(o<=0?(a(1),s(10)):(a(Jr(o,-1)),s(Jr(i,1)))),o<=0&&a(Jr(i,-1)),i<=0&&s(Jr(o,1)),this.min=o,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},o=j4(n,this);return e.bounds==="ticks"&&og(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(e){return e===void 0?"0":Ia(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=dr(e),this._valueRange=dr(this.max)-dr(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(dr(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}ue(zu,"id","logarithmic"),ue(zu,"defaults",{ticks:{callback:nl.formatters.logarithmic,major:{enabled:!0}}});function _u(t){const e=t.ticks;if(e.display&&t.display){const n=Mt(e.backdropPadding);return Oe(e.font&&e.font.size,pt.font.size)+n.height}return 0}function G4(t,e,n){return n=ot(n)?n:[n],{w:$S(t,e.string,n),h:n.length*e.lineHeight}}function n1(t,e,n,o,i){return t===o||t===i?{start:e-n/2,end:e+n/2}:t<o||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function Q4(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),o=[],i=[],a=t._pointLabels.length,s=t.options.pointLabels,l=s.centerPointLabels?rt/a:0;for(let c=0;c<a;c++){const u=s.setContext(t.getPointLabelContext(c));i[c]=u.padding;const h=t.getPointPosition(c,t.drawingArea+i[c],l),p=At(u.font),m=G4(t.ctx,p,t._pointLabels[c]);o[c]=m;const b=wn(t.getIndexAngle(c)+l),y=Math.round(ou(b)),v=n1(y,h.x,m.w,0,180),k=n1(y,h.y,m.h,90,270);X4(n,e,b,v,k)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=J4(t,o,i)}function X4(t,e,n,o,i){const a=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let l=0,c=0;o.start<e.l?(l=(e.l-o.start)/a,t.l=Math.min(t.l,e.l-l)):o.end>e.r&&(l=(o.end-e.r)/a,t.r=Math.max(t.r,e.r+l)),i.start<e.t?(c=(e.t-i.start)/s,t.t=Math.min(t.t,e.t-c)):i.end>e.b&&(c=(i.end-e.b)/s,t.b=Math.max(t.b,e.b+c))}function q4(t,e,n){const o=t.drawingArea,{extra:i,additionalAngle:a,padding:s,size:l}=n,c=t.getPointPosition(e,o+i+s,a),u=Math.round(ou(wn(c.angle+kt))),h=$4(c.y,l.h,u),p=Y4(u),m=Z4(c.x,l.w,p);return{visible:!0,x:c.x,y:h,textAlign:p,left:m,top:h,right:m+l.w,bottom:h+l.h}}function K4(t,e){if(!e)return!0;const{left:n,top:o,right:i,bottom:a}=t;return!(Ao({x:n,y:o},e)||Ao({x:n,y:a},e)||Ao({x:i,y:o},e)||Ao({x:i,y:a},e))}function J4(t,e,n){const o=[],i=t._pointLabels.length,a=t.options,{centerPointLabels:s,display:l}=a.pointLabels,c={extra:_u(a)/2,additionalAngle:s?rt/i:0};let u;for(let h=0;h<i;h++){c.padding=n[h],c.size=e[h];const p=q4(t,h,c);o.push(p),l==="auto"&&(p.visible=K4(p,u),p.visible&&(u=p))}return o}function Y4(t){return t===0||t===180?"center":t<180?"left":"right"}function Z4(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function $4(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function e6(t,e,n){const{left:o,top:i,right:a,bottom:s}=n,{backdropColor:l}=e;if(!ze(l)){const c=Wr(e.borderRadius),u=Mt(e.backdropPadding);t.fillStyle=l;const h=o-u.left,p=i-u.top,m=a-o+u.width,b=s-i+u.height;Object.values(c).some(y=>y!==0)?(t.beginPath(),Na(t,{x:h,y:p,w:m,h:b,radius:c}),t.fill()):t.fillRect(h,p,m,b)}}function t6(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let i=e-1;i>=0;i--){const a=t._pointLabelItems[i];if(!a.visible)continue;const s=o.setContext(t.getPointLabelContext(i));e6(n,s,a);const l=At(s.font),{x:c,y:u,textAlign:h}=a;Ur(n,t._pointLabels[i],c,u+l.lineHeight/2,l,{color:s.color,textAlign:h,textBaseline:"middle"})}}function o1(t,e,n,o){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,it);else{let a=t.getPointPosition(0,e);i.moveTo(a.x,a.y);for(let s=1;s<o;s++)a=t.getPointPosition(s,e),i.lineTo(a.x,a.y)}}function n6(t,e,n,o,i){const a=t.ctx,s=e.circular,{color:l,lineWidth:c}=e;!s&&!o||!l||!c||n<0||(a.save(),a.strokeStyle=l,a.lineWidth=c,a.setLineDash(i.dash),a.lineDashOffset=i.dashOffset,a.beginPath(),o1(t,n,s,o),a.closePath(),a.stroke(),a.restore())}function o6(t,e,n){return cr(t,{label:n,index:e,type:"pointLabel"})}class Qa extends El{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Mt(_u(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=yt(e)&&!isNaN(e)?e:0,this.max=yt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/_u(this.options))}generateTickLabels(e){El.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const i=$e(this.options.pointLabels.callback,[n,o],this);return i||i===0?i:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?Q4(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,i))}getIndexAngle(e){const n=it/(this._pointLabels.length||1),o=this.options.startAngle||0;return wn(e*n+Xn(o))}getDistanceFromCenterForValue(e){if(ze(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(ze(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return o6(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const i=this.getIndexAngle(e)-kt+o;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:i,bottom:a}=this._pointLabelItems[e];return{left:n,top:o,right:i,bottom:a}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),o1(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:i,border:a}=n,s=this._pointLabels.length;let l,c,u;if(n.pointLabels.display&&t6(this,s),i.display&&this.ticks.forEach((h,p)=>{if(p!==0||p===0&&this.min<0){c=this.getDistanceFromCenterForValue(h.value);const m=this.getContext(p),b=i.setContext(m),y=a.setContext(m);n6(this,b,c,s,y)}}),o.display){for(e.save(),l=s-1;l>=0;l--){const h=o.setContext(this.getPointLabelContext(l)),{color:p,lineWidth:m}=h;!m||!p||(e.lineWidth=m,e.strokeStyle=p,e.setLineDash(h.borderDash),e.lineDashOffset=h.borderDashOffset,c=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),u=this.getPointPosition(l,c),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(u.x,u.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const i=this.getIndexAngle(0);let a,s;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((l,c)=>{if(c===0&&this.min>=0&&!n.reverse)return;const u=o.setContext(this.getContext(c)),h=At(u.font);if(a=this.getDistanceFromCenterForValue(this.ticks[c].value),u.showLabelBackdrop){e.font=h.string,s=e.measureText(l.label).width,e.fillStyle=u.backdropColor;const p=Mt(u.backdropPadding);e.fillRect(-s/2-p.left,-a-h.size/2-p.top,s+p.width,h.size+p.height)}Ur(e,l.label,0,-a,h,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),e.restore()}drawTitle(){}}ue(Qa,"id","radialLinear"),ue(Qa,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:nl.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),ue(Qa,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),ue(Qa,"descriptors",{angleLines:{_fallback:"grid"}});const Dl={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}},an=Object.keys(Dl);function r1(t,e){return t-e}function i1(t,e){if(ze(e))return null;const n=t._adapter,{parser:o,round:i,isoWeekday:a}=t._parseOpts;let s=e;return typeof o=="function"&&(s=o(s)),yt(s)||(s=typeof o=="string"?n.parse(s,o):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(Bi(a)||a===!0)?n.startOf(s,"isoWeek",a):n.startOf(s,i)),+s)}function a1(t,e,n,o){const i=an.length;for(let a=an.indexOf(t);a<i-1;++a){const s=Dl[an[a]],l=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-e)/(l*s.size))<=o)return an[a]}return an[i-1]}function r6(t,e,n,o,i){for(let a=an.length-1;a>=an.indexOf(n);a--){const s=an[a];if(Dl[s].common&&t._adapter.diff(i,o,s)>=e-1)return s}return an[n?an.indexOf(n):0]}function i6(t){for(let e=an.indexOf(t)+1,n=an.length;e<n;++e)if(Dl[an[e]].common)return an[e]}function s1(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:i}=iu(n,e),a=n[o]>=e?n[o]:n[i];t[a]=!0}}function a6(t,e,n,o){const i=t._adapter,a=+i.startOf(e[0].value,o),s=e[e.length-1].value;let l,c;for(l=a;l<=s;l=+i.add(l,1,o))c=n[l],c>=0&&(e[c].major=!0);return e}function l1(t,e,n){const o=[],i={},a=e.length;let s,l;for(s=0;s<a;++s)l=e[s],i[l]=s,o.push({value:l,major:!1});return a===0||!n?o:a6(t,o,i,n)}class Xa extends Kr{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),i=this._adapter=new mA._date(e.adapters.date);i.init(n),Aa(o.displayFormats,i.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:i1(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:i,max:a,minDefined:s,maxDefined:l}=this.getUserBounds();function c(u){!s&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!l&&!isNaN(u.max)&&(a=Math.max(a,u.max))}(!s||!l)&&(c(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&c(this.getMinMax(!1))),i=yt(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),a=yt(a)&&!isNaN(a)?a:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,i=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,s=this.max,l=_S(i,a,s);return this._unit=n.unit||(o.autoSkip?a1(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):r6(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:i6(this._unit),this.initOffsets(i),e.reverse&&l.reverse(),l1(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,i,a;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,a=this.getDecimalForValue(e[e.length-1]),e.length===1?o=a:o=(a-this.getDecimalForValue(e[e.length-2]))/2);const s=e.length<3?.5:.25;n=Ot(n,0,s),o=Ot(o,0,s),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,i=this.options,a=i.time,s=a.unit||a1(a.minUnit,n,o,this._getLabelCapacity(n)),l=Oe(i.ticks.stepSize,1),c=s==="week"?a.isoWeekday:!1,u=Bi(c)||c===!0,h={};let p=n,m,b;if(u&&(p=+e.startOf(p,"isoWeek",c)),p=+e.startOf(p,u?"day":s),e.diff(o,n,s)>1e5*l)throw new Error(n+" and "+o+" are too far apart with stepSize of "+l+" "+s);const y=i.ticks.source==="data"&&this.getDataTimestamps();for(m=p,b=0;m<o;m=+e.add(m,l,s),b++)s1(h,m,y);return(m===o||i.bounds==="ticks"||b===1)&&s1(h,m,y),Object.keys(h).sort(r1).map(v=>+v)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,a=this._unit,s=n||i[a];return this._adapter.format(e,s)}_tickFormatFunction(e,n,o,i){const a=this.options,s=a.ticks.callback;if(s)return $e(s,[e,n,o],this);const l=a.time.displayFormats,c=this._unit,u=this._majorUnit,h=c&&l[c],p=u&&l[u],m=o[n],b=u&&p&&m&&m.major;return this._adapter.format(e,i||(b?p:h))}generateTickLabels(e){let n,o,i;for(n=0,o=e.length;n<o;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,i=Xn(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),s=Math.sin(i),l=this._resolveTickFontOptions(0).size;return{w:o*a+l*s,h:o*s+l*a}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,a=this._tickFormatFunction(e,0,l1(this,[e],this._majorUnit),i),s=this._getLabelSize(a),l=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return l>0?l:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,o=i.length;n<o;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const i=this.getLabels();for(n=0,o=i.length;n<o;++n)e.push(i1(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return lg(e.sort(r1))}}ue(Xa,"id","time"),ue(Xa,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Bl(t,e,n){let o=0,i=t.length-1,a,s,l,c;n?(e>=t[o].pos&&e<=t[i].pos&&({lo:o,hi:i}=Co(t,"pos",e)),{pos:a,time:l}=t[o],{pos:s,time:c}=t[i]):(e>=t[o].time&&e<=t[i].time&&({lo:o,hi:i}=Co(t,"time",e)),{time:a,pos:l}=t[o],{time:s,pos:c}=t[i]);const u=s-a;return u?l+(c-l)*(e-a)/u:l}class Hu extends Xa{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Bl(n,this.min),this._tableRange=Bl(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,i=[],a=[];let s,l,c,u,h;for(s=0,l=e.length;s<l;++s)u=e[s],u>=n&&u<=o&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(s=0,l=i.length;s<l;++s)h=i[s+1],c=i[s-1],u=i[s],Math.round((h+c)/2)!==u&&a.push({time:u,pos:s/(l-1)});return a}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((i,a)=>i-a)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(Bl(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return Bl(this._table,o*this._tableRange+this._minPos,!0)}}ue(Hu,"id","timeseries"),ue(Hu,"defaults",Xa.defaults);var s6=Object.freeze({__proto__:null,CategoryScale:Mu,LinearScale:Lu,LogarithmicScale:zu,RadialLinearScale:Qa,TimeScale:Xa,TimeSeriesScale:Hu});const l6=[hA,j8,L4,s6];on.register(...l6);/*!
32
32
  * chartjs-plugin-datalabels v2.2.0
33
33
  * https://chartjs-plugin-datalabels.netlify.app
34
34
  * (c) 2017-2022 chartjs-plugin-datalabels contributors
@@ -111,7 +111,7 @@ __p += '`),We&&(se+=`' +
111
111
  function print() { __p += __j.call(arguments, '') }
112
112
  `:`;
113
113
  `)+se+`return __p
114
- }`;var Fe=ik(function(){return Ke(I,ve+"return "+se).apply(n,L)});if(Fe.source=se,ah(Fe))throw Fe;return Fe}function UG(d){return Ye(d).toLowerCase()}function WG(d){return Ye(d).toUpperCase()}function jG(d,f,g){if(d=Ye(d),d&&(g||f===n))return h2(d);if(!d||!(f=Dn(f)))return d;var w=Zn(d),S=Zn(f),I=m2(w,S),L=g2(w,S)+1;return Br(w,I,L).join("")}function GG(d,f,g){if(d=Ye(d),d&&(g||f===n))return d.slice(0,y2(d)+1);if(!d||!(f=Dn(f)))return d;var w=Zn(d),S=g2(w,Zn(f))+1;return Br(w,0,S).join("")}function QG(d,f,g){if(d=Ye(d),d&&(g||f===n))return d.replace(ap,"");if(!d||!(f=Dn(f)))return d;var w=Zn(d),S=m2(w,Zn(f));return Br(w,S).join("")}function XG(d,f){var g=W,w=Q;if(ht(f)){var S="separator"in f?f.separator:S;g="length"in f?Re(f.length):g,w="omission"in f?Dn(f.omission):w}d=Ye(d);var I=d.length;if(Ki(d)){var L=Zn(d);I=L.length}if(g>=I)return d;var G=g-Ji(w);if(G<1)return w;var Y=L?Br(L,0,G).join(""):d.slice(0,G);if(S===n)return Y+w;if(L&&(G+=Y.length-G),sh(S)){if(d.slice(G).search(S)){var oe,re=Y;for(S.global||(S=Sp(S.source,Ye(Fy.exec(S))+"g")),S.lastIndex=0;oe=S.exec(re);)var se=oe.index;Y=Y.slice(0,se===n?G:se)}}else if(d.indexOf(Dn(S),G)!=G){var me=Y.lastIndexOf(S);me>-1&&(Y=Y.slice(0,me))}return Y+w}function qG(d){return d=Ye(d),d&&iz.test(d)?d.replace(Vy,S_):d}var KG=oa(function(d,f,g){return d+(g?" ":"")+f.toUpperCase()}),ch=av("toUpperCase");function rk(d,f,g){return d=Ye(d),f=g?n:f,f===n?y_(d)?E_(d):d_(d):d.match(f)||[]}var ik=Le(function(d,f){try{return An(d,n,f)}catch(g){return ah(g)?g:new Pe(g)}}),JG=Wo(function(d,f){return Fn(f,function(g){g=mo(g),Ho(d,g,rh(d[g],d))}),d});function YG(d){var f=d==null?0:d.length,g=Ce();return d=f?ft(d,function(w){if(typeof w[1]!="function")throw new Mn(s);return[g(w[0]),w[1]]}):[],Le(function(w){for(var S=-1;++S<f;){var I=d[S];if(An(I[0],this,w))return An(I[1],this,w)}})}function ZG(d){return SH(zn(d,p))}function uh(d){return function(){return d}}function $G(d,f){return d==null||d!==d?f:d}var eQ=lv(),tQ=lv(!0);function pn(d){return d}function fh(d){return L2(typeof d=="function"?d:zn(d,p))}function nQ(d){return _2(zn(d,p))}function oQ(d,f){return H2(d,zn(f,p))}var rQ=Le(function(d,f){return function(g){return gs(g,d,f)}}),iQ=Le(function(d,f){return function(g){return gs(d,g,f)}});function ph(d,f,g){var w=Nt(f),S=Md(f,w);g==null&&!(ht(f)&&(S.length||!w.length))&&(g=f,f=d,d=this,S=Md(f,Nt(f)));var I=!(ht(g)&&"chain"in g)||!!g.chain,L=Go(d);return Fn(S,function(G){var Y=f[G];d[G]=Y,L&&(d.prototype[G]=function(){var oe=this.__chain__;if(I||oe){var re=d(this.__wrapped__),se=re.__actions__=cn(this.__actions__);return se.push({func:Y,args:arguments,thisArg:d}),re.__chain__=oe,re}return Y.apply(d,xr([this.value()],arguments))})}),d}function aQ(){return _t._===this&&(_t._=N_),this}function hh(){}function sQ(d){return d=Re(d),Le(function(f){return U2(f,d)})}var lQ=Gp(ft),dQ=Gp(d2),cQ=Gp(gp);function ak(d){return Zp(d)?bp(mo(d)):_H(d)}function uQ(d){return function(f){return d==null?n:ri(d,f)}}var fQ=cv(),pQ=cv(!0);function mh(){return[]}function gh(){return!1}function hQ(){return{}}function mQ(){return""}function gQ(){return!0}function bQ(d,f){if(d=Re(d),d<1||d>q)return[];var g=ge,w=Qt(d,ge);f=Ce(f),d-=ge;for(var S=kp(w,f);++g<d;)f(g);return S}function yQ(d){return Ne(d)?ft(d,mo):Bn(d)?[d]:cn(Ev(Ye(d)))}function vQ(d){var f=++I_;return Ye(d)+f}var kQ=Wd(function(d,f){return d+f},0),wQ=Qp("ceil"),xQ=Wd(function(d,f){return d/f},1),SQ=Qp("floor");function CQ(d){return d&&d.length?Fd(d,pn,Op):n}function AQ(d,f){return d&&d.length?Fd(d,Ce(f,2),Op):n}function EQ(d){return f2(d,pn)}function DQ(d,f){return f2(d,Ce(f,2))}function BQ(d){return d&&d.length?Fd(d,pn,Tp):n}function PQ(d,f){return d&&d.length?Fd(d,Ce(f,2),Tp):n}var IQ=Wd(function(d,f){return d*f},1),OQ=Qp("round"),NQ=Wd(function(d,f){return d-f},0);function VQ(d){return d&&d.length?vp(d,pn):0}function RQ(d,f){return d&&d.length?vp(d,Ce(f,2)):0}return B.after=nj,B.ary=Mv,B.assign=Wj,B.assignIn=Yv,B.assignInWith=nc,B.assignWith=jj,B.at=Gj,B.before=Lv,B.bind=rh,B.bindAll=JG,B.bindKey=zv,B.castArray=hj,B.chain=Rv,B.chunk=SU,B.compact=CU,B.concat=AU,B.cond=YG,B.conforms=ZG,B.constant=uh,B.countBy=VW,B.create=Qj,B.curry=_v,B.curryRight=Hv,B.debounce=Uv,B.defaults=Xj,B.defaultsDeep=qj,B.defer=oj,B.delay=rj,B.difference=EU,B.differenceBy=DU,B.differenceWith=BU,B.drop=PU,B.dropRight=IU,B.dropRightWhile=OU,B.dropWhile=NU,B.fill=VU,B.filter=TW,B.flatMap=LW,B.flatMapDeep=zW,B.flatMapDepth=_W,B.flatten=Iv,B.flattenDeep=RU,B.flattenDepth=TU,B.flip=ij,B.flow=eQ,B.flowRight=tQ,B.fromPairs=FU,B.functions=tG,B.functionsIn=nG,B.groupBy=HW,B.initial=LU,B.intersection=zU,B.intersectionBy=_U,B.intersectionWith=HU,B.invert=rG,B.invertBy=iG,B.invokeMap=WW,B.iteratee=fh,B.keyBy=jW,B.keys=Nt,B.keysIn=fn,B.map=Jd,B.mapKeys=sG,B.mapValues=lG,B.matches=nQ,B.matchesProperty=oQ,B.memoize=Zd,B.merge=dG,B.mergeWith=Zv,B.method=rQ,B.methodOf=iQ,B.mixin=ph,B.negate=$d,B.nthArg=sQ,B.omit=cG,B.omitBy=uG,B.once=aj,B.orderBy=GW,B.over=lQ,B.overArgs=sj,B.overEvery=dQ,B.overSome=cQ,B.partial=ih,B.partialRight=Wv,B.partition=QW,B.pick=fG,B.pickBy=$v,B.property=ak,B.propertyOf=uQ,B.pull=GU,B.pullAll=Nv,B.pullAllBy=QU,B.pullAllWith=XU,B.pullAt=qU,B.range=fQ,B.rangeRight=pQ,B.rearg=lj,B.reject=KW,B.remove=KU,B.rest=dj,B.reverse=nh,B.sampleSize=YW,B.set=hG,B.setWith=mG,B.shuffle=ZW,B.slice=JU,B.sortBy=tj,B.sortedUniq=oW,B.sortedUniqBy=rW,B.split=LG,B.spread=cj,B.tail=iW,B.take=aW,B.takeRight=sW,B.takeRightWhile=lW,B.takeWhile=dW,B.tap=CW,B.throttle=uj,B.thru=Kd,B.toArray=qv,B.toPairs=ek,B.toPairsIn=tk,B.toPath=yQ,B.toPlainObject=Jv,B.transform=gG,B.unary=fj,B.union=cW,B.unionBy=uW,B.unionWith=fW,B.uniq=pW,B.uniqBy=hW,B.uniqWith=mW,B.unset=bG,B.unzip=oh,B.unzipWith=Vv,B.update=yG,B.updateWith=vG,B.values=aa,B.valuesIn=kG,B.without=gW,B.words=rk,B.wrap=pj,B.xor=bW,B.xorBy=yW,B.xorWith=vW,B.zip=kW,B.zipObject=wW,B.zipObjectDeep=xW,B.zipWith=SW,B.entries=ek,B.entriesIn=tk,B.extend=Yv,B.extendWith=nc,ph(B,B),B.add=kQ,B.attempt=ik,B.camelCase=CG,B.capitalize=nk,B.ceil=wQ,B.clamp=wG,B.clone=mj,B.cloneDeep=bj,B.cloneDeepWith=yj,B.cloneWith=gj,B.conformsTo=vj,B.deburr=ok,B.defaultTo=$G,B.divide=xQ,B.endsWith=AG,B.eq=eo,B.escape=EG,B.escapeRegExp=DG,B.every=RW,B.find=FW,B.findIndex=Bv,B.findKey=Kj,B.findLast=MW,B.findLastIndex=Pv,B.findLastKey=Jj,B.floor=SQ,B.forEach=Tv,B.forEachRight=Fv,B.forIn=Yj,B.forInRight=Zj,B.forOwn=$j,B.forOwnRight=eG,B.get=lh,B.gt=kj,B.gte=wj,B.has=oG,B.hasIn=dh,B.head=Ov,B.identity=pn,B.includes=UW,B.indexOf=MU,B.inRange=xG,B.invoke=aG,B.isArguments=si,B.isArray=Ne,B.isArrayBuffer=xj,B.isArrayLike=un,B.isArrayLikeObject=xt,B.isBoolean=Sj,B.isBuffer=Pr,B.isDate=Cj,B.isElement=Aj,B.isEmpty=Ej,B.isEqual=Dj,B.isEqualWith=Bj,B.isError=ah,B.isFinite=Pj,B.isFunction=Go,B.isInteger=jv,B.isLength=ec,B.isMap=Gv,B.isMatch=Ij,B.isMatchWith=Oj,B.isNaN=Nj,B.isNative=Vj,B.isNil=Tj,B.isNull=Rj,B.isNumber=Qv,B.isObject=ht,B.isObjectLike=vt,B.isPlainObject=xs,B.isRegExp=sh,B.isSafeInteger=Fj,B.isSet=Xv,B.isString=tc,B.isSymbol=Bn,B.isTypedArray=ia,B.isUndefined=Mj,B.isWeakMap=Lj,B.isWeakSet=zj,B.join=UU,B.kebabCase=BG,B.last=Hn,B.lastIndexOf=WU,B.lowerCase=PG,B.lowerFirst=IG,B.lt=_j,B.lte=Hj,B.max=CQ,B.maxBy=AQ,B.mean=EQ,B.meanBy=DQ,B.min=BQ,B.minBy=PQ,B.stubArray=mh,B.stubFalse=gh,B.stubObject=hQ,B.stubString=mQ,B.stubTrue=gQ,B.multiply=IQ,B.nth=jU,B.noConflict=aQ,B.noop=hh,B.now=Yd,B.pad=OG,B.padEnd=NG,B.padStart=VG,B.parseInt=RG,B.random=SG,B.reduce=XW,B.reduceRight=qW,B.repeat=TG,B.replace=FG,B.result=pG,B.round=OQ,B.runInContext=K,B.sample=JW,B.size=$W,B.snakeCase=MG,B.some=ej,B.sortedIndex=YU,B.sortedIndexBy=ZU,B.sortedIndexOf=$U,B.sortedLastIndex=eW,B.sortedLastIndexBy=tW,B.sortedLastIndexOf=nW,B.startCase=zG,B.startsWith=_G,B.subtract=NQ,B.sum=VQ,B.sumBy=RQ,B.template=HG,B.times=bQ,B.toFinite=Qo,B.toInteger=Re,B.toLength=Kv,B.toLower=UG,B.toNumber=Un,B.toSafeInteger=Uj,B.toString=Ye,B.toUpper=WG,B.trim=jG,B.trimEnd=GG,B.trimStart=QG,B.truncate=XG,B.unescape=qG,B.uniqueId=vQ,B.upperCase=KG,B.upperFirst=ch,B.each=Tv,B.eachRight=Fv,B.first=Ov,ph(B,function(){var d={};return po(B,function(f,g){Ze.call(B.prototype,g)||(d[g]=f)}),d}(),{chain:!1}),B.VERSION=o,Fn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){B[d].placeholder=B}),Fn(["drop","take"],function(d,f){Ue.prototype[d]=function(g){g=g===n?1:It(Re(g),0);var w=this.__filtered__&&!f?new Ue(this):this.clone();return w.__filtered__?w.__takeCount__=Qt(g,w.__takeCount__):w.__views__.push({size:Qt(g,ge),type:d+(w.__dir__<0?"Right":"")}),w},Ue.prototype[d+"Right"]=function(g){return this.reverse()[d](g).reverse()}}),Fn(["filter","map","takeWhile"],function(d,f){var g=f+1,w=g==V||g==D;Ue.prototype[d]=function(S){var I=this.clone();return I.__iteratees__.push({iteratee:Ce(S,3),type:g}),I.__filtered__=I.__filtered__||w,I}}),Fn(["head","last"],function(d,f){var g="take"+(f?"Right":"");Ue.prototype[d]=function(){return this[g](1).value()[0]}}),Fn(["initial","tail"],function(d,f){var g="drop"+(f?"":"Right");Ue.prototype[d]=function(){return this.__filtered__?new Ue(this):this[g](1)}}),Ue.prototype.compact=function(){return this.filter(pn)},Ue.prototype.find=function(d){return this.filter(d).head()},Ue.prototype.findLast=function(d){return this.reverse().find(d)},Ue.prototype.invokeMap=Le(function(d,f){return typeof d=="function"?new Ue(this):this.map(function(g){return gs(g,d,f)})}),Ue.prototype.reject=function(d){return this.filter($d(Ce(d)))},Ue.prototype.slice=function(d,f){d=Re(d);var g=this;return g.__filtered__&&(d>0||f<0)?new Ue(g):(d<0?g=g.takeRight(-d):d&&(g=g.drop(d)),f!==n&&(f=Re(f),g=f<0?g.dropRight(-f):g.take(f-d)),g)},Ue.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},Ue.prototype.toArray=function(){return this.take(ge)},po(Ue.prototype,function(d,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=B[w?"take"+(f=="last"?"Right":""):f],I=w||/^find/.test(f);S&&(B.prototype[f]=function(){var L=this.__wrapped__,G=w?[1]:arguments,Y=L instanceof Ue,oe=G[0],re=Y||Ne(L),se=function(He){var We=S.apply(B,xr([He],G));return w&&me?We[0]:We};re&&g&&typeof oe=="function"&&oe.length!=1&&(Y=re=!1);var me=this.__chain__,ve=!!this.__actions__.length,Ae=I&&!me,Fe=Y&&!ve;if(!I&&re){L=Fe?L:new Ue(this);var Ee=d.apply(L,G);return Ee.__actions__.push({func:Kd,args:[se],thisArg:n}),new Ln(Ee,me)}return Ae&&Fe?d.apply(this,G):(Ee=this.thru(se),Ae?w?Ee.value()[0]:Ee.value():Ee)})}),Fn(["pop","push","shift","sort","splice","unshift"],function(d){var f=wd[d],g=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",w=/^(?:pop|shift)$/.test(d);B.prototype[d]=function(){var S=arguments;if(w&&!this.__chain__){var I=this.value();return f.apply(Ne(I)?I:[],S)}return this[g](function(L){return f.apply(Ne(L)?L:[],S)})}}),po(Ue.prototype,function(d,f){var g=B[f];if(g){var w=g.name+"";Ze.call(ea,w)||(ea[w]=[]),ea[w].push({name:f,func:g})}}),ea[Ud(n,x).name]=[{name:"wrapper",func:n}],Ue.prototype.clone=q_,Ue.prototype.reverse=K_,Ue.prototype.value=J_,B.prototype.at=AW,B.prototype.chain=EW,B.prototype.commit=DW,B.prototype.next=BW,B.prototype.plant=IW,B.prototype.reverse=OW,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=NW,B.prototype.first=B.prototype.head,ds&&(B.prototype[ds]=PW),B},Yi=D_();$r?(($r.exports=Yi)._=Yi,fp._=Yi):_t._=Yi}).call(nn)}(Wl,Wl.exports);var lf=Wl.exports;const uB={class:"flex gap-8 items-center"},fB=["type","onInput","onKeydown"],pB=Ie(r.defineComponent({__name:"FmPinField",props:{modelValue:{default:()=>[]},length:{default:6},type:{default:"number"},isError:{type:Boolean},masked:{type:Boolean,default:!1}},emits:["update:modelValue","complete","focus"],setup(t,{emit:e}){const n=e,o=t,i=Te(o,"modelValue"),a=r.ref([]),s=(m,b)=>{const y=m.target;if(o.type==="number"&&!/^[0-9]$/g.test(y.value)){y.value="";return}y.value=y.value.slice(-1),u(y.value,b),a.value[b+1]?a.value[b+1].focus():a.value[b].blur()},l=(m,b)=>{m.preventDefault();const y=m.target;y.value="",u(null,b),a.value[b-1]?a.value[b-1].focus():a.value[b].focus()},c=(m,b)=>{m.preventDefault(),m.key==="ArrowLeft"&&(a.value[b-1]?a.value[b-1].focus():a.value[b].focus()),m.key==="ArrowRight"&&(a.value[b+1]?a.value[b+1].focus():a.value[b].focus())},u=(m,b)=>{i.value=i.value.toSpliced(b,1,m)},h=(m,b)=>{a.value[b]=m};r.onMounted(()=>{const m=Array.from(Array(o.length).fill(null));Array.isArray(i.value)&&i.value.forEach((b,y)=>{b!==null&&y<m.length&&(m[y]=b)}),i.value=m});const p=r.computed(()=>lf.isArray(i.value)?i.value.map(m=>m===null?" ":m).join(""):new Array(o.length).fill(" ").join(""));return r.watch([()=>{var m;return(m=a.value)==null?void 0:m.length},p],()=>{var m,b;((m=a.value)==null?void 0:m.length)>0&&((b=i.value)==null||b.forEach((y,v)=>{v<o.length&&(a.value[v].value=y??"")}))},{immediate:!0,flush:"post"}),r.watch(()=>i.value,()=>{i.value.every(m=>m!==null)&&n("complete",i.value.join(""))}),(m,b)=>(r.openBlock(),r.createElementBlock("div",uB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.length,(y,v)=>(r.openBlock(),r.createElementBlock("input",{key:y,ref_for:!0,ref:k=>h(k,v),class:r.normalizeClass(["fm-pin-field",{[m.isError?"fm-pin-field--error":"fm-pin-field--populated"]:r.unref(i)[v]!==null}]),inputmode:"numeric",type:m.masked?"password":"text",onFocus:b[0]||(b[0]=k=>n("focus")),onInput:k=>s(k,v),onKeydown:[r.withKeys(k=>l(k,v),["backspace"]),r.withKeys(k=>c(k,v),["arrow-left","arrow-right"])]},null,42,fB))),128))]))}}),[["__scopeId","data-v-aec3f93d"]]),hB={class:"fm-radio-btn"},mB={class:"relative flex items-center justify-center w-6 h-6"},gB={class:"fm-radio-btn__input--container"},bB=["checked","disabled","value"],yB={class:"fm-typo-en-body-lg-400"},vB={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},kB=Ie(r.defineComponent({__name:"FmRadio",props:{modelValue:{default:null},value:{},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=Te(e,"modelValue"),o=r.ref(),i=r.inject(nm,null),a=r.inject(tt,null),s=()=>{l.value||(i?i.updateValue(e.value):n.value=e.value)},l=r.computed(()=>e.disabled??(i==null?void 0:i.getDisabled())??(a==null?void 0:a.getDisabled())??!1),c=r.computed(()=>i?e.value===i.groupValue.value:n.value===e.value);return(u,h)=>{const p=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",hB,[r.createElementVNode("label",{class:r.normalizeClass([{"fm-radio-btn--wrapper":!0,"cursor-not-allowed text-fm-color-typo-disabled":l.value,"cursor-pointer":!l.value},"space-x-8",u.sublabel?"items-start":"items-center"]),onClick:s},[r.createElementVNode("div",mB,[r.withDirectives((r.openBlock(),r.createElementBlock("div",gB,[r.createElementVNode("input",{ref_key:"inputEl",ref:o,checked:c.value,disabled:l.value,value:u.value,class:"fm-radio-btn__input--btn",type:"radio"},null,8,bB)])),[[p,!l.value]])]),r.createElementVNode("div",{class:r.normalizeClass([u.sublabel?"py-0":"py-0.5","space-y-4","flex-1","min-w-0"])},[r.renderSlot(u.$slots,"label",{},()=>[r.createElementVNode("div",yB,r.toDisplayString(u.label),1),u.sublabel?(r.openBlock(),r.createElementBlock("div",vB,r.toDisplayString(u.sublabel),1)):r.createCommentVNode("",!0)],!0)],2)],2)])}}}),[["__scopeId","data-v-9d8dbc91"]]),wB=r.defineComponent({__name:"FmRadioGroup",props:{modelValue:{},inline:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[t=>!lf.isNil(t)||"This field is required"]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=Te(e,"modelValue"),o=r.inject(tt,null);r.provide(nm,{groupValue:n,getDisabled:()=>i.value,updateValue(a){n.value=a}});const i=r.computed(()=>e.disabled??(o==null?void 0:o.getDisabled())??!1);return(a,s)=>(r.openBlock(),r.createBlock(Rt,{modelValue:r.unref(n),"onUpdate:modelValue":s[0]||(s[0]=l=>r.isRef(n)?n.value=l:null),disabled:i.value,"helper-state":a.helperState,"helper-text":a.helperText,info:a.labelInfo,label:a.label,optional:a.labelMark==="optional",required:a.labelMark==="required",rules:a.rules},r.createSlots({default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass({"flex items-center gap-16 justify-start":a.inline,"flex flex-col gap-8":!a.inline})},[r.renderSlot(a.$slots,"default")],2)]),_:2},[a.label||a.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(a.$slots,"label")]),key:"0"}:void 0,a.helperText||a.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(a.$slots,"helper-text")]),key:"1"}:void 0]),1032,["modelValue","disabled","helper-state","helper-text","info","label","optional","required","rules"]))}}),jl=r.defineComponent({__name:"FmSearch",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},maxWidth:{default:void 0},autofocus:{type:Boolean,default:!1},modelValue:{},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},setup(t){const e=t,n=r.inject(tt,null),o=r.computed(()=>{const{modelValue:m,disabled:b,...y}=e;return y}),i=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),a=Te(e,"modelValue"),s=r.ref(!1),l=r.ref(),c=r.ref(e.collapsible),u=r.ref(e.collapsible);function h(){c.value=!1,r.nextTick(()=>{var m,b,y,v;(v=(y=(b=(m=l.value)==null?void 0:m.querySelector)==null?void 0:b.call(m,"input"))==null?void 0:y.focus)==null||v.call(y)})}function p(m){if(s.value=m,!!e.collapsible){if(m){u.value=!1;return}c.value=a.value.length===0,c.value&&setTimeout(()=>{u.value=!0},250)}}return(m,b)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"componentRoot",ref:l,class:"flex items-center justify-end min-w-48 relative"},[r.createElementVNode("div",{class:r.normalizeClass(["transition-all",{"opacity-100":!m.collapsible||!c.value,"opacity-0 pointer-events-none":m.collapsible&&c.value},m.collapsible&&c.value?"w-9 h-9":"w-full"])},[r.createVNode(Lr,r.mergeProps({modelValue:r.unref(a),"onUpdate:modelValue":b[1]||(b[1]=y=>r.isRef(a)?a.value=y:null),disabled:i.value||m.collapsible&&c.value},o.value,{autofocus:e.autofocus,onFocusChanged:p}),r.createSlots({_:2},[!m.collapsible||!s.value?{name:"prepend",fn:r.withCtx(()=>[r.createVNode(be,{name:"search"})]),key:"0"}:void 0,r.unref(a).length?{name:"append",fn:r.withCtx(()=>[r.createVNode(be,{class:"cursor-pointer text-fm-color-neutral-gray-300",name:"close",onClick:b[0]||(b[0]=y=>a.value="")})]),key:"1"}:void 0]),1040,["modelValue","disabled","autofocus"])],2),m.collapsible?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["absolute bottom-0 right-0",c.value?"opacity-100":"opacity-0 pointer-events-none"]),style:r.normalizeStyle({transition:"opacity 150ms",transitionTimingFunction:c.value?"cubic-bezier(.95,-0.01,.82,.6)":"ease-out"})},[r.createVNode(we,{icon:"search",variant:"tertiary",onClick:h})],6)):r.createCommentVNode("",!0)],512))}}),xB={key:0,class:"flex fm-typo-en-title-sm-600 items-center justify-between text-fm-color-typo-primary"},SB={key:0},CB={class:"h-full overflow-y-auto"},AB={key:1,class:"flex gap-8 items-center"},cb=Ie(r.defineComponent({__name:"FmTopSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},fullscreenSize:{default:void 0},zIndex:{default:void 0},noOverlay:{type:Boolean,default:!1}},emits:["update:modelValue","on:clickedAway"],setup(t){const e=t,n=Te(e,"modelValue");return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:i[0]||(i[0]=a=>n.value=!0)},[r.renderSlot(o.$slots,"top-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(n)?(r.openBlock(),r.createBlock(Ei,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,transparent:e.noOverlay,onClose:i[1]||(i[1]=a=>n.value=!1),onClickedAway:i[2]||(i[2]=a=>o.$emit("on:clickedAway"))},{default:r.withCtx(()=>[r.createVNode(r.Transition,{name:o.fullscreenSize?`slide-${o.fullscreenSize}`:"slide",appear:""},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-top-sheet",`fm-top-sheet--fullscreen-${o.fullscreenSize}`,e.noOverlay&&"shadow-md"])},[o.header||o.$slots["top-sheet-header"]?(r.openBlock(),r.createElementBlock("div",xB,[r.renderSlot(o.$slots,"top-sheet-header",{},()=>[o.header?(r.openBlock(),r.createElementBlock("div",SB,r.toDisplayString(o.header),1)):r.createCommentVNode("",!0)],!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",CB,[r.renderSlot(o.$slots,"default",{},void 0,!0)]),o.$slots["top-sheet-footer"]?(r.openBlock(),r.createElementBlock("div",AB,[r.renderSlot(o.$slots,"top-sheet-footer",{},void 0,!0)])):r.createCommentVNode("",!0)],2)]),_:3},8,["name"])]),_:3},8,["dismiss-away","z-index","transparent"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-6e83c161"]]);var df={exports:{}};function ub(t,e=100,n={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");const{immediate:o}=typeof n=="boolean"?{immediate:n}:n;let i,a,s,l,c;function u(){const m=i,b=a;return i=void 0,a=void 0,c=t.apply(m,b),c}function h(){const m=Date.now()-l;m<e&&m>=0?s=setTimeout(h,e-m):(s=void 0,o||(c=u()))}const p=function(...m){if(i&&this!==i)throw new Error("Debounced method called with different contexts.");i=this,a=m,l=Date.now();const b=o&&!s;return s||(s=setTimeout(h,e)),b&&(c=u()),c};return p.clear=()=>{s&&(clearTimeout(s),s=void 0)},p.flush=()=>{s&&p.trigger()},p.trigger=()=>{c=u(),p.clear()},p}df.exports.debounce=ub,df.exports=ub;var EB=df.exports;const cf=wa(EB);var fb={exports:{}};(function(t,e){(function(){var n={};t.exports=n,n.simpleFilter=function(o,i){return i.filter(function(a){return n.test(o,a)})},n.test=function(o,i){return n.match(o,i)!==null},n.match=function(o,i,a){a=a||{};var s=0,l=[],c=i.length,u=0,h=0,p=a.pre||"",m=a.post||"",b=a.caseSensitive&&i||i.toLowerCase(),y;o=a.caseSensitive&&o||o.toLowerCase();for(var v=0;v<c;v++)y=i[v],b[v]===o[s]?(y=p+y+m,s+=1,h+=1+h):h=0,u+=h,l[l.length]=y;return s===o.length?(u=b===o?1/0:u,{rendered:l.join(""),score:u}):null},n.filter=function(o,i,a){return!i||i.length===0?[]:typeof o!="string"?i:(a=a||{},i.reduce(function(s,l,c,u){var h=l;a.extract&&(h=a.extract(l));var p=n.match(o,h,a);return p!=null&&(s[s.length]={string:p.rendered,score:p.score,index:c,original:l}),s},[]).sort(function(s,l){var c=l.score-s.score;return c||s.index-l.index}))}})()})(fb);var DB=fb.exports;const BB=wa(DB);function Gl(t,e){const[n]=BB.filter(t.toLocaleLowerCase(),[e],{pre:"|",post:"|",extract(i){return i.toLocaleLowerCase()}});if(!n)return{label:e,segments:[{segment:e,isMatch:!1}],matched:!1};const o=n.string.toString().replace(/\|\|/g,"").split("|").reduce((i,a,s)=>(i.push({segment:a,isMatch:s%2!==0}),i),new Array);return{label:e,segments:o,matched:!0}}const PB={class:"flex flex-col gap-4"},IB={class:"bg-white flex gap-4 px-24 py-8 sticky top-0"},OB={class:"hidden sm:inline xs:inline"},NB={key:0},VB={key:0,class:"flex flex-col"},RB={class:"flex flex-col"},TB={class:"flex items-center px-24 py-12"},FB={class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},MB=r.createElementVNode("div",{class:"py-4"},[r.createElementVNode("hr",{class:"border-fm-color-neutral-gray-100"})],-1),LB=["onClick"],zB={class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"},_B={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-primary"},HB={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-typo-secondary"},UB={key:3,class:"flex flex-col"},WB=["onClick"],jB={class:"flex flex-col gap-4"},GB={key:0,class:"text-fm-color-typo-secondary"},QB={class:"px-16 py-4"},XB=5,qB=r.defineComponent({__name:"FmGlobalSearch",props:{show:{type:Boolean,default:!1},modelValue:{default:""},suggestions:{default:void 0},onSearch:{type:Function,default:void 0},placeholder:{default:""},hintPlaceholder:{default:""},notFoundPlaceholder:{default:""},recentSearchKey:{default:""}},emits:["dismiss","submit","update:show","update:modelValue"],setup(t,{emit:e}){const n=t,o=e;function i(){if(!n.recentSearchKey)return;const z=n.recentSearchKey;localStorage.removeItem(z),l.value=[]}function a(){if(!n.recentSearchKey)return;const z=n.recentSearchKey,W=localStorage.getItem(z);if(!W)return[];try{return JSON.parse(W)}catch{return new Array}}const s=cf(function(W){if(!n.recentSearchKey)return;const Q=n.recentSearchKey,N=W().trim();if(!Q||!N)return;const F=a()??[],V=[...new Set([N,...F])].slice(0,XB),R=JSON.stringify(V);return localStorage.setItem(Q,R),l.value=V,V},800),l=r.ref(a()),c=Te(n,"show");r.watch([()=>n.show],()=>{n.show?(p.value=null,n.suggestions&&C()):o("dismiss")});const u=Te(n,"modelValue"),h=r.ref(n.modelValue);r.watch([()=>h.value],()=>{O()});const p=r.ref(null),m=r.ref(!0),b=r.computed(()=>{var z;return m.value?(z=p.value)==null?void 0:z.slice(0,5):p.value});r.watch([()=>p.value],([])=>{m.value=!0});const y=r.computed(()=>p.value===null),v=r.ref(!1),k=r.ref(""),x=()=>h.value;async function C(){if(!c.value)return;const z=x();if(!z)return;const W=Math.random().toString();if(k.value=W,n.suggestions){p.value=n.suggestions.map(Q=>({label:Gl(z,Q.label),sublabel:Q.sublabel?Gl(z,Q.sublabel):null})).filter(Q=>{var N;return Q.label.matched||((N=Q.sublabel)==null?void 0:N.matched)}),s(x);return}if(n.onSearch)try{v.value=!0;const Q=await n.onSearch(z);W===k.value&&(p.value=Q.map(N=>({label:Gl(z,N.label),sublabel:N.sublabel?Gl(z,N.sublabel):null})))}catch{W===k.value&&(p.value=[])}finally{W===k.value&&(v.value=!1,s(x))}}function P(z){c.value=!1,o("dismiss"),u.value=z}const O=cf(C),E=r.computed(()=>l.value&&l.value.length===0),T=r.computed(()=>(!h.value||y.value)&&!E.value),A=r.computed(()=>(!h.value||y.value)&&E.value),M=r.computed(()=>h.value&&p.value&&p.value.length===0);return(z,W)=>(r.openBlock(),r.createBlock(cb,{"model-value":r.unref(c),"onUpdate:modelValue":W[4]||(W[4]=Q=>r.isRef(c)?c.value=Q:null),"fullscreen-size":"sm","dismiss-away":""},{default:r.withCtx(()=>{var Q,N;return[r.createElementVNode("div",PB,[r.createElementVNode("div",IB,[r.createElementVNode("div",OB,[r.createVNode(we,{"prepend-icon":"arrow_back",variant:"tertiary",onClick:W[0]||(W[0]=F=>c.value=!1)})]),r.createVNode(jl,{"model-value":h.value,"onUpdate:modelValue":W[1]||(W[1]=F=>h.value=F),class:"flex-1",placeholder:z.placeholder},null,8,["model-value","placeholder"])]),v.value?(r.openBlock(),r.createElementBlock("div",NB,[r.createVNode(Rr,{size:"xl"})])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[T.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[z.recentSearchKey&&((Q=l.value)!=null&&Q.length)?(r.openBlock(),r.createElementBlock("div",VB,[r.createElementVNode("div",RB,[r.createElementVNode("div",TB,[r.createElementVNode("div",FB,r.toDisplayString(r.unref(_)("search.recent")),1),r.createVNode(rr),r.createVNode(we,{label:r.unref(_)("search.clearHistory"),variant:"plain",size:"md",onClick:W[2]||(W[2]=F=>i())},null,8,["label"])]),MB]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(F,V)=>(r.openBlock(),r.createElementBlock("div",{key:V,class:"cursor-pointer flex gap-8 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12",onClick:R=>h.value=F},[r.createVNode(be,{size:"lg",name:"history"}),r.createElementVNode("div",zB,r.toDisplayString(F),1)],8,LB))),128))])])):r.createCommentVNode("",!0)],64)):A.value?r.renderSlot(z.$slots,"hint-placeholder",{key:1},()=>[r.createElementVNode("div",_B,r.toDisplayString(z.hintPlaceholder),1)]):M.value?r.renderSlot(z.$slots,"not-found-placeholder",{key:2},()=>[r.createElementVNode("div",HB,r.toDisplayString(z.notFoundPlaceholder||`No result found for “${h.value}”`),1)]):(r.openBlock(),r.createElementBlock("div",UB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(b.value,(F,V)=>r.renderSlot(z.$slots,"search-result-item",r.mergeProps({key:V,ref_for:!0},{result:F}),()=>[r.createElementVNode("div",{class:"cursor-pointer flex gap-16 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12 w-full",onClick:R=>P(F.label.label)},[r.createVNode(be,{size:"lg",name:"arrow_forward"}),r.createElementVNode("div",jB,[r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(F.label.segments,(R,D)=>(r.openBlock(),r.createElementBlock("span",{key:D,class:r.normalizeClass({"fm-typo-en-body-lg-400":!R.isMatch,"fm-typo-en-body-lg-600":R.isMatch})},r.toDisplayString(R.segment),3))),128))]),F.sublabel?(r.openBlock(),r.createElementBlock("div",GB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(F.sublabel.segments,(R,D)=>(r.openBlock(),r.createElementBlock("span",{key:D,class:r.normalizeClass({"fm-typo-en-body-md-400":!R.isMatch,"fm-typo-en-body-md-600":R.isMatch})},r.toDisplayString(R.segment),3))),128))])):r.createCommentVNode("",!0)])],8,WB)])),128)),r.createElementVNode("div",QB,[m.value&&(((N=p.value)==null?void 0:N.length)??0)>5?(r.openBlock(),r.createBlock(we,{key:0,label:`show ${p.value.length-5} more results`,variant:"plain",onClick:W[3]||(W[3]=F=>m.value=!1)},null,8,["label"])):r.createCommentVNode("",!0)])]))],64))])]}),_:3},8,["model-value"]))}}),KB=["disabled","inputMode","placeholder","readOnly","value"],JB={key:0},YB=["disabled"],ZB=["disabled"],$B=Ie(r.defineComponent({__name:"FmStepperField",props:{modelValue:{},placeholder:{default:""},inputmode:{default:"numeric"},readonly:{type:Boolean},labelMark:{default:"none"},step:{default:1},min:{default:void 0},max:{default:void 0},prependIcon:{default:""},appendIcon:{default:""},isCurrency:{type:Boolean,default:!1},showSteppers:{type:Boolean,default:!0},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},useGrouping:{type:Boolean,default:!0},minFractionDigits:{default:0},maxFractionDigits:{default:2},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(tt,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Te(e,"modelValue"),{isFocused:a,blur:s,focus:l}=ka(),c=r.ref(null);let u;const h=E=>{if(E!==""){const T=+E.replace(/,/g,"");return isNaN(T)?null:T}return null},p=E=>u.format(E),m=E=>{if(typeof i.value!="number"){i.value=+i.value;return}if(E>0&&x.value||E<0&&C.value)return;let T=P(i.value)?i.value+E:0;T=b(T),i.value=T},b=E=>e.max!==void 0&&E>e.max?e.max:e.min!==void 0&&E<e.min?e.min:E,y=()=>{var E;i.value=h(((E=c.value)==null?void 0:E.value)??"")},v=E=>{if(![...Array(10).keys()].map(T=>T.toString()).includes(E.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(E.key)){E.preventDefault();return}},k=r.computed(()=>i.value!=null?p(i.value):""),x=r.computed(()=>{let E=!1;return e.max!==void 0&&(E=i.value>=e.max),e.min!==void 0&&(E=i.value<e.min),E}),C=r.computed(()=>{let E=!1;return e.max!==void 0&&(E=i.value>e.max),e.min!==void 0&&(E=i.value<=e.min),E});r.onBeforeMount(()=>{u=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping,minimumFractionDigits:e.minFractionDigits,maximumFractionDigits:e.maxFractionDigits,roundingMode:"trunc"})});function P(E){return typeof E=="number"&&isFinite(E)}const O=()=>{var E;(E=c.value)==null||E.focus()};return(E,T)=>(r.openBlock(),r.createBlock(Rt,{modelValue:r.unref(i),"onUpdate:modelValue":T[8]||(T[8]=A=>r.isRef(i)?i.value=A:null),disabled:o.value,focused:r.unref(a),"helper-state":E.helperState,"helper-text":E.helperText,info:E.labelInfo,label:E.label,optional:E.labelMark==="optional",required:E.labelMark==="required",rules:E.rules,"blame-handler":O},{label:r.withCtx(()=>[r.renderSlot(E.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:A})=>[r.createVNode(ct,{"append-icon":E.appendIcon,focused:r.unref(a),invalid:A,"prepend-icon":E.prependIcon,"show-valid-border":E.showValidBorder,class:"cursor-text"},{prepend:r.withCtx(()=>[r.renderSlot(E.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(E.$slots,"append",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([{"mr-32":E.showSteppers},"flex items-center justify-center"])},[E.appendText?(r.openBlock(),r.createElementBlock("div",JB,r.toDisplayString(E.appendText),1)):r.createCommentVNode("",!0),E.appendIcon?(r.openBlock(),r.createBlock(be,{key:1,color:o.value?"#C7C7CC":"#1C1C1E",name:E.appendIcon,size:"md"},null,8,["color","name"])):r.createCommentVNode("",!0)],2)],!0),E.showSteppers?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-stepper-field__stepper__container",r.unref(a)?"right-[6px]":"right-[7px]"])},[r.createElementVNode("button",{disabled:o.value||x.value,class:"fm-stepper-field__stepper__item",tabindex:"0",type:"button",onBlur:T[2]||(T[2]=(...M)=>r.unref(s)&&r.unref(s)(...M)),onFocus:T[3]||(T[3]=(...M)=>r.unref(l)&&r.unref(l)(...M)),onMousedown:T[4]||(T[4]=()=>m(E.step))},[r.createVNode(be,{color:o.value||x.value?"#C7C7CC":"#1C1C1E",name:"expand_less",size:"md"},null,8,["color"])],40,YB),r.createElementVNode("button",{disabled:o.value||C.value,class:"fm-stepper-field__stepper__item",tabindex:"1",type:"button",onBlur:T[5]||(T[5]=(...M)=>r.unref(s)&&r.unref(s)(...M)),onFocus:T[6]||(T[6]=(...M)=>r.unref(l)&&r.unref(l)(...M)),onMousedown:T[7]||(T[7]=()=>m(-E.step))},[r.createVNode(be,{color:o.value||C.value?"#C7C7CC":"#1C1C1E",name:"expand_more",size:"md"},null,8,["color"])],40,ZB)],2)):r.createCommentVNode("",!0)]),default:r.withCtx(()=>[r.createElementVNode("input",{ref_key:"inputEl",ref:c,disabled:o.value,inputMode:E.inputmode,placeholder:E.placeholder,readOnly:E.readonly,value:k.value,class:"fm-stepper-field--input outline-none",type:"text",onBlur:T[0]||(T[0]=(...M)=>r.unref(s)&&r.unref(s)(...M)),onFocus:T[1]||(T[1]=(...M)=>r.unref(l)&&r.unref(l)(...M)),onInput:y,onKeydown:v},null,40,KB)]),_:2},1032,["append-icon","focused","invalid","prepend-icon","show-valid-border"])]),"helper-text":r.withCtx(()=>[r.renderSlot(E.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-62601f37"]]),eP=["disabled","maxlength","minlength","placeholder","readOnly","value"],tP=Ie(r.defineComponent({__name:"FmTextarea",props:{modelValue:{default:""},placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},helperText:{default:""},helperState:{default:"none"},showWordCount:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(tt,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Te(e,"modelValue"),{isFocused:a,focus:s,blur:l}=ka(),c=p=>{i.value=p.target.value},u=r.ref(null);Vm(u,r.toRef(()=>e.autofocus));const h=()=>{var p;(p=u.value)==null||p.focus()};return(p,m)=>(r.openBlock(),r.createBlock(Rt,{modelValue:r.unref(i),"onUpdate:modelValue":m[2]||(m[2]=b=>r.isRef(i)?i.value=b:null),disabled:o.value,focused:r.unref(a),"helper-state":p.helperState,"helper-text":p.helperText,info:p.labelInfo,label:p.label,optional:p.labelMark==="optional",required:p.labelMark==="required",rules:p.rules,"blame-handler":h},r.createSlots({label:r.withCtx(()=>[r.renderSlot(p.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:b})=>[r.createElementVNode("div",{class:r.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":r.unref(a),"fm-textarea__container--invalid":!!r.unref(i)&&b,"fm-textarea__container--valid":p.showValidBorder&&p.showSuccess&&!!r.unref(i)&&!b,"fm-textarea__container--disabled":o.value})},[r.createElementVNode("textarea",{ref_key:"inputEl",ref:u,class:r.normalizeClass({"fm-textarea--input fm-typo-en-body-lg-400":!0,"fm-color-typo-primary":!o.value,"fm-color-typo-disabled":o.value,"outline-none":!0}),disabled:o.value,maxlength:p.maxLength,minlength:p.minLength,placeholder:p.placeholder,readOnly:p.readonly,value:r.unref(i),onBlur:m[0]||(m[0]=(...y)=>r.unref(l)&&r.unref(l)(...y)),onFocus:m[1]||(m[1]=(...y)=>r.unref(s)&&r.unref(s)(...y)),onInput:c},null,42,eP)],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(p.$slots,"helper-text",{},void 0,!0)]),_:2},[p.showWordCount?{name:"helper-append",fn:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([o.value?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-en-body-sm-400"])},r.toDisplayString(p.maxLength?`${r.unref(i).length} / ${p.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-8bc4f92e"]]),nP={class:"flex gap-8"},oP={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300 w-[220px]"},rP={class:"flex flex-col gap-16 items-center justify-center w-full pb-16"},iP={class:"fm-typo-en-body-lg-600 text-left w-full"},aP={class:"fm-typo-en-body-lg-600 text-left w-full"},sP={class:"flex gap-8 items-center justify-end"},lP=r.defineComponent({__name:"FmTimeRangePicker",props:{modelValue:{},disableTimeCheck:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},placeholder:{default:"HH:MM"},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(tt,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Te(e,"modelValue"),a=r.ref(null),s=r.ref(null),l=r.computed(()=>{const v=Array.isArray(i.value);return!i.value||!v||v&&i.value.every(k=>!b(k))?null:i.value.map(k=>{const{hours:x,minutes:C,period:P}=ln(k);return`${xn(x)}:${xn(C)} ${P}`}).join(" - ")});function c(){if(!a.value||!s.value){i.value=null;return}const v=a.value,k=s.value,x=v.period===Vn.PM&&k.period===Vn.AM,P=!(v.period===Vn.PM&&v.hours===12&&k.period===Vn.PM&&k.hours!==12)&&v.period===k.period&&(v.hours>k.hours||v.hours===k.hours&&v.minutes>k.minutes),O=!e.disableTimeCheck&&(x||P),E=Qu(a.value),T=Qu(s.value);i.value=O?[T,E]:[E,T],h()}r.onMounted(()=>{Array.isArray(i.value)&&i.value.every(v=>!!v)&&(a.value=ln(i.value[0]),s.value=ln(i.value[1]))}),r.watch(()=>i.value,v=>{const k=Array.isArray(v);v&&k&&v.every(x=>b(x))&&(a.value=ln(v[0]),s.value=ln(v[1]))});const u=r.ref();function h(){var v;(v=u.value)==null||v.hide()}const p=r.ref(!1);function m(v){var k,x,C,P;v?(a.value=ln(((C=i.value)==null?void 0:C[0])??"00:00"),s.value=ln(((P=i.value)==null?void 0:P[1])??"23:59")):(a.value=(k=i.value)!=null&&k[0]?ln(i.value[0]):null,s.value=(x=i.value)!=null&&x[1]?ln(i.value[1]):null),p.value=v}const b=v=>/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(v),y=r.computed(()=>e.disableTimeCheck?!1:Tt(a.value,s.value));return(v,k)=>(r.openBlock(),r.createBlock(Rt,{modelValue:r.unref(i),"onUpdate:modelValue":k[2]||(k[2]=x=>r.isRef(i)?i.value=x:null),disabled:o.value,focused:p.value,"helper-state":v.helperState,"helper-text":v.helperText,info:v.labelInfo,label:v.label,optional:v.labelMark==="optional",required:v.labelMark==="required",rules:v.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(v.$slots,"label")]),default:r.withCtx(({invalid:x})=>[r.createVNode(Io,{ref_key:"dropdownRef",ref:u,"show-popover":p.value,width:343,"z-index":e.zIndex,onPopoverChanged:m},{"popover-button":r.withCtx(()=>[v.$slots["trigger-button"]?r.renderSlot(v.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:x,dropdownShowed:p.value,showValidBorder:v.showValidBorder,shouldDisable:o.value}))):(r.openBlock(),r.createBlock(ct,{key:1,class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:p.value,invalid:x,"show-valid-border":v.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",nP,[r.createVNode(be,{outline:!p.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!l.value},"grow"])},r.toDisplayString(l.value??v.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",oP,[r.createElementVNode("div",rP,[r.createElementVNode("div",null,[r.createElementVNode("div",iP,r.toDisplayString(r.unref(_)("time.start")),1),r.createVNode(Tl,{"model-value":a.value??{hours:0,minutes:0,period:r.unref(Vn).AM},"onUpdate:modelValue":k[0]||(k[0]=C=>a.value=C)},null,8,["model-value"])]),r.createElementVNode("div",null,[r.createElementVNode("div",aP,r.toDisplayString(r.unref(_)("time.end")),1),r.createVNode(Tl,{"model-value":s.value??{hours:0,minutes:0,period:r.unref(Vn).AM},"onUpdate:modelValue":k[1]||(k[1]=C=>s.value=C)},null,8,["model-value"])])]),r.createElementVNode("div",sP,[r.createVNode(we,{label:r.unref(_)("actions.cancel"),size:"md",variant:"tertiary",onClick:h},null,8,["label"]),r.createVNode(we,{disabled:y.value,label:r.unref(_)("actions.apply"),size:"md",variant:"primary",onClick:c},null,8,["disabled","label"])])])]),_:2},1032,["show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(v.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),uf=Ie(r.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(t,{expose:e}){const n=r.ref(null);return e({element:n}),(o,i)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"element",ref:n,class:r.normalizeClass({"fm-list--separator":o.separator,activeClass:o.activeClass})},[r.renderSlot(o.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-266d01d7"]]),ff=Ie(r.defineComponent({__name:"FmListItem",props:{tag:{default:"div"},clickable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},label:{default:""},sublabel:{default:""}},setup(t){const e=t;function n(o){e.disabled&&o.stopImmediatePropagation()}return(o,i)=>{const a=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":o.disabled,"cursor-pointer hover:bg-fm-color-opacity-sm":o.clickable&&!o.disabled,"cursor-not-allowed":o.clickable&&o.disabled}),onClick:r.withModifiers(n,["prevent"])},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend",{},void 0,!0),r.renderSlot(o.$slots,"default",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-typo-en-body-lg-400 line-clamp-1 break-all ${o.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},r.toDisplayString(o.label),3),o.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-en-body-md-400 line-clamp-2 break-all ${o.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(o.sublabel),3)):r.createCommentVNode("",!0)])],!0),o.$slots.append?(r.openBlock(),r.createBlock(rr,{key:0})):r.createCommentVNode("",!0),r.renderSlot(o.$slots,"append",{},void 0,!0)]),_:3},8,["class"])),[[a,o.clickable&&!o.disabled]])}}}),[["__scopeId","data-v-90c2ba0a"]]);function dP(t){for(;t;){if(cP(t))return t;t=t.parentElement}return document.scrollingElement}function cP(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(t);return e.overflowY==="scroll"||e.overflowY==="auto"&&t.scrollHeight>t.clientHeight}class uP{constructor(e,n){ue(this,"onScroll");ue(this,"scrollParent");this.onScroll=n,this.scrollParent=dP(e)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const fP={class:"fm-menu__wrapper"},pP=Ie(r.defineComponent({__name:"FmMenuDeprecated",props:{showMenu:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["dropdown-changed"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref(!1),a=r.ref(null),s=r.ref(null),{floatingStyles:l}=Ci(a,s,{middleware:[wi(4),xi()],placement:o.placement,whileElementsMounted:ki});let c;const u=n;e({show:()=>{i.value||(i.value=!0,u("dropdown-changed",i.value))},hide:()=>{i.value&&(i.value=!1,u("dropdown-changed",i.value))}});const h=b=>{b.preventDefault(),b.stopPropagation(),!o.disabled&&(i.value=!i.value,u("dropdown-changed",i.value))},p=b=>{if(!i.value)return;const y=b.path||b.composedPath();for(const v of y)if(v==a.value||v==s.value)return;i.value=!1,u("dropdown-changed",i.value)},m=()=>{u("dropdown-changed",!1)};return r.watch(()=>o.showMenu,b=>i.value=b),r.onMounted(()=>{i.value=o.showMenu,window.addEventListener("click",p),c=new uP(a.value,m),c.bindScroll()}),r.onUnmounted(()=>{window.removeEventListener("click",p),c.unbindScroll()}),(b,y)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:a,class:"fm-menu",onClick:h},[r.renderSlot(b.$slots,"menu-button",{},void 0,!0)],512),i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"menuEl",ref:s,class:r.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":i.value}),style:r.normalizeStyle(r.unref(l))},[r.renderSlot(b.$slots,"menu-wrapper",{},()=>[r.createElementVNode("div",fP,[r.renderSlot(b.$slots,"menu-content",{},void 0,!0)])],!0)],6)):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5b19ece2"]]),hP={class:"fm-typo-en-body-md-600 mx-8 p-8 text-fm-color-typo-secondary"},mP=r.defineComponent({__name:"FmMenuHeader",props:{label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",hP,r.toDisplayString(e.label),1))}}),gP=t=>(r.pushScopeId("data-v-6d0e6490"),t=t(),r.popScopeId(),t),bP={class:"relative"},yP={class:"fm-progress-linear fm-typo-en-body-sm-400 h-4 overflow-hidden relative rounded-lg w-auto"},vP=gP(()=>r.createElementVNode("span",{class:"bg-fm-color-neutral-gray-100",style:{width:"100%"}},null,-1)),kP=Ie(r.defineComponent({__name:"FmLinearProgress",props:{color:{default:"primary"}},setup(t){const e=t,n=r.computed(()=>{const o=new Array,i={};return e.color?(hi(e.color)?i["background-color"]=e.color:o.push(`bg-fm-color-${e.color}`),{class:o.join(" "),style:i}):{class:o.join(" "),style:i}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",bP,[r.createElementVNode("div",yP,[vP,r.createElementVNode("span",{class:r.normalizeClass(["dash-1",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6),r.createElementVNode("span",{class:r.normalizeClass(["dash-2",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6)])]))}}),[["__scopeId","data-v-6d0e6490"]]),wP={key:0,class:"fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-4 text-right"},xP=Ie(r.defineComponent({__name:"FmProgressBar",props:{value:{default:void 0},max:{default:100},indeterminate:{type:Boolean,default:void 0},color:{default:"primary"},showLabel:{type:Boolean,default:!1},size:{default:"md"}},setup(t){const e=t,n=r.computed(()=>{const a=mi(e.value),s=mi(e.max)??100,l=e.indeterminate??a===null;return{value:l?null:Math.min(Math.max(0,a),s),max:s,indeterminate:l}}),o=r.computed(()=>{if(n.value.indeterminate||n.value.value===null)return 0;const a=n.value.value/n.value.max*100;return isNaN(a)?0:a}),i=r.computed(()=>{const a=new Array,s={};return e.color?(hi(e.color)?s["background-color"]=e.color:a.push(`bg-fm-color-${e.color}`),{class:a.join(" "),style:s}):{class:a.join(" "),style:s}});return(a,s)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{class:r.normalizeClass(["fm-progress-bar",`fm-progress-bar--${a.size}`,{"fm-progress-bar--indeterminate":n.value.indeterminate},"overflow-hidden relative rounded-lg w-full bg-fm-color-neutral-gray-100"])},[n.value.indeterminate?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("span",{class:r.normalizeClass(["dash-1",i.value.class]),style:r.normalizeStyle(i.value.style)},null,6),r.createElementVNode("span",{class:r.normalizeClass(["dash-2",i.value.class]),style:r.normalizeStyle(i.value.style)},null,6)],64)):(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-progress-bar__fill rounded-lg",i.value.class]),style:r.normalizeStyle({width:`${o.value}%`,...i.value.style})},null,6))],2),a.showLabel&&!n.value.indeterminate?(r.openBlock(),r.createElementBlock("div",wP,r.toDisplayString(Math.round(o.value))+"% ",1)):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-b8386e08"]]),SP={class:"flex fm-typo-en-title-md-600 items-center justify-between text-fm-color-typo-primary pb-16"},CP={key:0},AP={class:"h-full overflow-y-auto"},EP={key:0,class:"pt-24"},DP=Ie(r.defineComponent({__name:"FmSideSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},closeButton:{type:Boolean,default:!0},maxWidth:{default:void 0},zIndex:{default:void 0},isContainer:{default:"div"},isContainerProps:{default:()=>({})},closeIcon:{default:"close"},noOverlay:{type:Boolean,default:!1}},emits:["update:modelValue","on:clickedAway","on:close"],setup(t,{expose:e,emit:n}){const o=t,i=n,a=Te(o,"modelValue"),s=r.ref(),l=()=>{a.value=!1,i("on:close")};return e({containerRef:s}),(c,u)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:u[0]||(u[0]=h=>a.value=!0)},[r.renderSlot(c.$slots,"side-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(Ei,{key:0,"dismiss-away":o.dismissAway,"z-index":o.zIndex,transparent:o.noOverlay,onClose:l,onClickedAway:u[1]||(u[1]=h=>c.$emit("on:clickedAway"))},{default:r.withCtx(()=>[r.createVNode(r.Transition,{appear:"",name:"slide"},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(c.isContainer),r.mergeProps({ref_key:"containerRef",ref:s,class:[[!c.maxWidth&&"max-w-[400px]",o.noOverlay&&"shadow-md"],"fm-side-sheet xs:w-full"],style:{maxWidth:`${c.maxWidth}px`}},c.isContainerProps),{default:r.withCtx(()=>[r.createElementVNode("div",SP,[r.renderSlot(c.$slots,"side-sheet-header",{},()=>[c.header?(r.openBlock(),r.createElementBlock("div",CP,r.toDisplayString(c.header),1)):r.createCommentVNode("",!0)],!0),c.closeButton?(r.openBlock(),r.createBlock(be,{key:0,name:c.closeIcon,class:"cursor-pointer",size:"md",onClick:l},null,8,["name"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",AP,[r.renderSlot(c.$slots,"default",{},void 0,!0)]),c.$slots["side-sheet-footer"]?(r.openBlock(),r.createElementBlock("div",EP,[r.renderSlot(c.$slots,"side-sheet-footer",{},void 0,!0)])):r.createCommentVNode("",!0)]),_:3},16,["class","style"]))]),_:3})]),_:3},8,["dismiss-away","z-index","transparent"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-d5a939ad"]]),BP={class:"flex items-center"},PP={key:1,class:"flex items-center mx-12"},IP={key:0,class:"mt-8"},pb=Ie(r.defineComponent({__name:"FmSnackbar",props:{title:{type:String,default:void 0},description:{type:String,default:void 0},variant:{type:String,default:"info"},dismissable:{type:Boolean,default:!1},action:{type:String,default:void 0},color:{type:String,default:void 0},bgColor:{type:String,default:void 0},zIndex:{type:Number,default:1e3},spinner:{type:Boolean,default:!1}},emits:["onDismiss","onAction"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{switch(n.variant){case"info":return{icon:{name:"info",color:"system-info-300"},actionColor:"typo-info",bgColor:"system-info-100"};case"success":return{icon:{name:"check_circle",color:"system-success-300"},actionColor:"typo-success",bgColor:"system-success-100"};case"warning":return{icon:{name:"warning",color:"system-warning-300"},actionColor:"typo-warning",bgColor:"system-warning-100"};case"error":return{icon:{name:"error",color:"system-error-300"},actionColor:"typo-error",bgColor:"system-error-100"};case"neutral":return{actionColor:"primary",bgColor:"neutral-gray-100"};default:throw Error(`Unimplement snackbar variant ${n.variant}`)}}),a=r.computed(()=>n.title?{text:n.title,classes:"fm-typo-en-body-lg-600"}:{text:n.description,classes:""}),s=r.computed(()=>n.bgColor?hi(n.bgColor)?{style:{backgroundColor:n.bgColor}}:{class:`bg-fm-color-${n.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),l=r.computed(()=>n.color?hi(n.color)?{style:{color:n.color}}:{class:`text-fm-color-${n.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(c,u)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({style:{zIndex:t.zIndex},class:"fm-corner-radius-lg fm-shadow-light-400 fm-snackbar px-24 py-16"},s.value),[r.createElementVNode("div",BP,[i.value.icon?(r.openBlock(),r.createBlock(be,{key:0,color:n.color??i.value.icon.color,name:i.value.icon.name,class:"mr-12"},null,8,["color","name"])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(`${a.value.classes} grow ellipsis mr-16`)},r.toDisplayString(a.value.text),3),t.spinner?(r.openBlock(),r.createElementBlock("div",PP,[r.createVNode(be,{class:"animate-spin",name:"progress_activity"})])):r.createCommentVNode("",!0),n.dismissable?(r.openBlock(),r.createBlock(be,{key:2,class:"cursor-pointer",name:"close",style:{"{ flex":"none}"},onClick:u[0]||(u[0]=()=>o("onDismiss"))})):r.createCommentVNode("",!0)]),n.title&&n.description?(r.openBlock(),r.createElementBlock("div",IP,r.toDisplayString(n.description),1)):r.createCommentVNode("",!0),r.renderSlot(c.$slots,"actions",{},()=>[n.action?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:"mt-16 fm-typo-en-body-lg-600"},l.value),[r.createElementVNode("span",{class:"cursor-pointer",onClick:u[1]||(u[1]=()=>o("onAction"))},r.toDisplayString(n.action),1)],16)):r.createCommentVNode("",!0)],!0)],16))}}),[["__scopeId","data-v-65fce1f3"]]),OP={class:r.normalizeClass(["fm-step-description","text-fm-color-typo-secondary","fm-typo-en-body-md-400 line-clamp-1","mt-4"])},pf=r.defineComponent({__name:"FmStepHeader",props:{title:{type:String,required:!0},description:{type:String,default:void 0},disabled:{type:Boolean,default:!1},titleBold:{type:Boolean,default:!1}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([t.disabled?"text-fm-color-typo-disabled":"","flex flex-col"])},[r.renderSlot(e.$slots,"title",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([t.titleBold?"fm-typo-en-title-md-600":"fm-typo-en-body-md-400","fm-step-title line-clamp-2"])},r.toDisplayString(t.title),3)]),r.renderSlot(e.$slots,"description",{},()=>[r.createElementVNode("div",OP,r.toDisplayString(t.description),1)])],2))}}),NP=["data-title","data-description","data-disabled"],VP={class:"flex flex-col fm-step-container grow"},RP={class:"fm-step-container-content"},TP=Ie(r.defineComponent({__name:"FmStep",props:{title:{type:String,required:!0},description:{type:String,default:void 0},value:{type:Number,required:!0},complete:{type:Function,required:!0},error:{type:Function,default:void 0},disabled:{type:Function,default:void 0}},setup(t){const e=t,{currentStep:n,goToStep:o}=r.inject(om);function i(){a.value||o(e.value)}const a=r.computed(()=>e.disabled?e.disabled():!1),s=r.computed(()=>e.error?e.error():!1),l=r.computed(()=>n()===e.value),c=r.computed(()=>e.complete()),u=r.computed(()=>l.value||c.value||n()>e.value?"bg-fm-color-primary":"bg-fm-color-neutral-gray-300"),h=r.computed(()=>l.value?{className:"bg-fm-color-primary"}:s.value?{config:{name:"warning",color:"system-error-300"}}:a.value?{className:"border-2 border-fm-color-neutral-gray-200"}:c.value?{config:{name:"check_small",color:"primary"},className:"border-2 border-fm-color-primary"}:{className:"border-2 border-fm-color-neutral-gray-300"});return(p,m)=>{const b=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",{"data-title":t.title,"data-description":t.description,"data-disabled":a.value,class:r.normalizeClass(`fm-step gap-4 grow ${a.value?"cursor-not-allowed":"cursor-pointer"}`)},[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-step-indicator ${u.value}`)},null,2)]),r.createElementVNode("div",VP,[r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"flex gap-12",onClick:r.withModifiers(i,["stop"])},[r.createElementVNode("div",{class:r.normalizeClass(["flex fm-step-container-icon h-[24px] items-center justify-center min-h-[24px] min-w-[24px] relative rounded-full w-[24px]",h.value.className])},[h.value.config?(r.openBlock(),r.createBlock(be,{key:0,name:h.value.config.name,color:h.value.config.color,outline:"",class:"absolute"},null,8,["name","color"])):r.createCommentVNode("",!0)],2),r.createVNode(pf,{title:t.title,description:t.description,disabled:a.value,class:"grow"},null,8,["title","description","disabled"])])),[[b,!a.value]]),r.createElementVNode("div",RP,[r.renderSlot(p.$slots,"default",{},void 0,!0)])])],10,NP)}}}),[["__scopeId","data-v-113e7095"]]),FP={class:"hidden items-center xs:flex"},MP={class:"flex gap-2 items-start justify-end mb-24 mt-40 p-0 self-stretch"},LP=r.defineComponent({__name:"FmStepper",props:{modelValue:{type:Number,required:!0},orientation:{type:String,default:"horizontal"}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e,i=h=>{o("update:model-value",h)};r.provide(om,{currentStep:()=>n.modelValue,goToStep:i});const a=r.ref(),s=r.ref([]),l=r.computed(()=>s.value[n.modelValue-1]),c=r.computed(()=>`${n.modelValue} of ${s.value.length}`),u=()=>{var p;const h=Array.from(((p=a.value)==null?void 0:p.querySelectorAll(":scope > .fm-step"))??[]);s.value=h.map(m=>({title:m.dataset.title??"",description:m.dataset.description,disabled:m.dataset.disabled=="true"}))};return r.onMounted(()=>{u()}),(h,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(`fm-stepper fm-stepper__${t.orientation}`)},[r.createElementVNode("div",{ref_key:"stepperRef",ref:a,class:r.normalizeClass(`flex mx-24 mt-12 mb-24 xs:hidden ${t.orientation==="vertical"?"flex-col":""}`)},[r.renderSlot(h.$slots,"default")],2),r.createElementVNode("div",FP,[r.createVNode(Rr,{"current-step":t.modelValue,"total-steps":s.value.length,class:"mr-12"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(c.value),1)]),_:1},8,["current-step","total-steps"]),l.value?(r.openBlock(),r.createBlock(pf,{key:0,class:"grow","title-bold":"",title:l.value.title,description:l.value.description,disabled:l.value.disabled},null,8,["title","description","disabled"])):r.createCommentVNode("",!0)]),h.$slots.contents?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`flex-col mx-24 mt-12 mb-24 ${t.orientation==="vertical"?"w-2/3":""}`)},[r.renderSlot(h.$slots,"contents"),r.createElementVNode("div",MP,[r.renderSlot(h.$slots,"actions")])],2)):r.createCommentVNode("",!0)],2))}});let zP=0;function _P(){return zP++}const HP=t=>(r.pushScopeId("data-v-dfbdb871"),t=t(),r.popScopeId(),t),UP=["disabled"],WP={key:1,class:"ml-4"},jP={key:0,class:"ml-4"},GP={key:0,class:r.normalizeClass(["block","absolute bottom-0 left-0","h-0.5 w-full"])},QP=[HP(()=>r.createElementVNode("span",{class:r.normalizeClass(["block","bg-fm-color-primary rounded-xxxl","w-full h-full"])},null,-1))],hb=Ie(r.defineComponent({__name:"FmTab",props:{modelValue:{default:null},label:{default:""},vertical:{type:Boolean,default:!1},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:()=>_P()},children:{default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.ref(!1),o=t,i=e,a=r.ref(!1);function s(p){n.value=p}const l=()=>{o.disabled||o.children.length>0||i("update:modelValue",o.value)},c=p=>{o.children.length!==0&&(a.value=p)},u=r.computed(()=>o.children.length>0?o.children.some(p=>p.value===o.modelValue):o.modelValue===o.value),h=p=>{a.value=!1,i("update:modelValue",p)};return(p,m)=>{const b=r.resolveDirective("wave");return r.openBlock(),r.createBlock(so,{class:r.normalizeClass([{"w-full":p.vertical},"flex-shrink-0 max-w-[360px] min-w-[90px] rounded-sm"]),disabled:p.children.length===0,placement:p.vertical?"right-start":"bottom-start","show-menu":a.value,onMenuChanged:c},{"menu-button":r.withCtx(()=>[r.createElementVNode("button",{class:r.normalizeClass([p.vertical?["px-16 py-8"]:["px-8 pt-8"],p.vertical?["max-w-[360px] w-full"]:["min-w-[90px] max-w-[360px]"]]),disabled:p.disabled,type:"button",onClick:l,onMousedown:m[0]||(m[0]=()=>s(!0)),onMouseleave:m[1]||(m[1]=()=>s(!1)),onMouseup:m[2]||(m[2]=()=>s(!1))},[r.createElementVNode("span",{class:r.normalizeClass(["flex items-center",p.vertical?["justify-start"]:["justify-center"],"relative"])},[r.createElementVNode("span",{class:r.normalizeClass([[p.vertical&&"w-full"],"block"])},[r.createElementVNode("span",{class:r.normalizeClass(["flex items-center",!p.vertical&&"pb-1.5",p.vertical&&"w-full"])},[r.withDirectives((r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["rounded-xxxl",!p.vertical&&"hover:bg-fm-color-opacity-sm group",p.vertical&&"w-full"]),type:"button"},[r.createElementVNode("button",{class:r.normalizeClass(["relative","flex items-center","px-8",p.vertical?"py-1":"py-1.5 space-x-8",p.vertical&&"w-full"]),type:"button"},[r.renderSlot(p.$slots,"prepend",{},void 0,!0),p.icon?(r.openBlock(),r.createBlock(be,{key:0,color:p.disabled?"neutral-gray-200":u.value?"primary":"neutral-black",name:p.icon,outline:!n.value&&!u.value,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-lg-400",p.disabled?"text-fm-color-typo-disabled":u.value?"text-fm-color-primary":"text-fm-color-typo-secondary"])},r.toDisplayString(p.label),3),p.badge&&p.vertical?(r.openBlock(),r.createElementBlock("span",WP,[r.createVNode(or,{value:p.badge,inline:"",variant:"numeric"},null,8,["value"])])):r.createCommentVNode("",!0),p.children.length>0?(r.openBlock(),r.createBlock(be,{key:2,class:r.normalizeClass(["text-fm-color-neutral-gray-400",p.vertical&&"block ml-auto"]),name:a.value?"expand_less":"expand_more",size:"md"},null,8,["class","name"])):r.createCommentVNode("",!0),r.renderSlot(p.$slots,"append",{},void 0,!0)],2)],2)),[[b,p.vertical?!1:{color:"rgba(28, 28, 30, 0.16)"}]]),p.badge&&!p.vertical?(r.openBlock(),r.createElementBlock("span",jP,[r.createVNode(or,{value:p.badge,inline:"",variant:"numeric"},null,8,["value"])])):r.createCommentVNode("",!0)],2),u.value&&!p.vertical?(r.openBlock(),r.createElementBlock("span",GP,QP)):r.createCommentVNode("",!0)],2)],2)],42,UP)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.children,y=>(r.openBlock(),r.createBlock(Dt,{key:y.value,disabled:y.disabled,icon:y.icon,label:y.label,"model-value":o.modelValue===y.value,onClick:v=>h(y.value)},{append:r.withCtx(()=>[y.badge?(r.openBlock(),r.createBlock(or,{key:0,value:y.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["disabled","icon","label","model-value","onClick"]))),128))]),_:3},8,["class","disabled","placement","show-menu"])}}}),[["__scopeId","data-v-dfbdb871"]]),XP={class:"flex gap-8 h-48 items-center justify-end transition-all w-full xs:flex-wrap-reverse"},qP={class:"flex flex-1 gap-8"},KP=r.defineComponent({__name:"FmTableToolbar",props:{searchModel:{default:""},searchable:{type:Boolean},filterable:{type:Boolean},chips:{default:()=>[]},actions:{default:()=>[]},zIndexForBottomSheet:{default:void 0}},emits:["update:search-model","click:remove-chip"],setup(t){const e=t,{breakpoints:n}=nr(),o=r.computed(()=>{const l=[];e.searchable&&l.push({label:"Search",icon:"search",key:"search"}),e.filterable&&l.push({label:"Filter",icon:"filter_alt",key:"filter"});const c=l.concat(e.actions);if(n.value.xs){const[y,v,k,...x]=c;return x.length===0?{actionButtons:[y,v,k].filter(C=>C),collapse:x}:{actionButtons:[y,v].filter(C=>C),collapse:[k,...x]}}const[u,h,p,m,...b]=c;return b.length===0?{actionButtons:[u,h,p,m].filter(y=>y),collapse:b}:{actionButtons:[u,h,p].filter(y=>y),collapse:[m,...b]}}),i=r.ref(!1);function a(l){if(n.value.xs){l.stopPropagation(),i.value=!0;return}}const s=Te(e,"searchModel");return(l,c)=>(r.openBlock(),r.createElementBlock("div",XP,[r.renderSlot(l.$slots,"chips",{},()=>[l.chips.length?(r.openBlock(),r.createBlock(Xc,{key:0,class:"min-w-0 mr-auto",items:l.chips,removable:"",onChipClosed:c[0]||(c[0]=u=>l.$emit("click:remove-chip",u))},null,8,["items"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",qP,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.actionButtons,u=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:u.key},[u.key==="search"?r.renderSlot(l.$slots,"action-search",{key:0},()=>[r.createVNode(jl,{"model-value":r.unref(s),"onUpdate:modelValue":c[1]||(c[1]=h=>r.isRef(s)?s.value=h:null),class:"w-full",collapsible:""},null,8,["model-value"])]):r.renderSlot(l.$slots,`action-${u.key}`,{key:1},()=>[r.createVNode(we,{"prepend-icon":u.icon,variant:"tertiary",onClick:h=>l.$emit(`click:action-${u.key}`)},null,8,["prepend-icon","onClick"])])],64))),128)),o.value.collapse.length?(r.openBlock(),r.createBlock(so,{key:0},{"menu-button":r.withCtx(()=>[r.createVNode(we,{"prepend-icon":"more_vert",variant:"tertiary",onClick:a})]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,u=>(r.openBlock(),r.createBlock(Dt,{key:u.key,label:u.label,icon:u.icon,onClick:h=>{l.$emit(`click:action-${u.key}`),i.value=!1}},null,8,["label","icon","onClick"]))),128))]),_:1})):r.createCommentVNode("",!0),l.$slots.append?r.renderSlot(l.$slots,"append",{key:1}):r.createCommentVNode("",!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(qc,{modelValue:i.value,"onUpdate:modelValue":c[2]||(c[2]=u=>i.value=u),"dismiss-away":"","z-index":e.zIndexForBottomSheet},{default:r.withCtx(()=>[r.createVNode(uf,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,u=>(r.openBlock(),r.createBlock(ff,{key:u.key,label:u.label,class:"hover:bg-fm-color-neutral-gray-100",onClick:h=>{l.$emit(`click:action-${u.key}`),i.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["modelValue","z-index"])]))]))}});var JP={env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_4404d514-7ecb-46ca-abbe-c8673210fee6",npm_package_exports___require:"./dist/feedmepos-ui-library.umd.cjs",npm_package_dependencies_prettier:"^3.2.5",npm_package_devDependencies__types_node:"^18.19.21",DOTNET_NOLOGO:"1",npm_package_devDependencies__originjs_vite_plugin_federation:"^1.3.5",USER:"runner",npm_package_dependencies__rollup_plugin_commonjs:"^26.0.1",npm_config_user_agent:"pnpm/9.15.9 npm/? node/v20.20.2 linux x64",CI:"true",npm_package_dependencies_v_wave:"^1.5.1",npm_package_dependencies_vue:"^3.4.21",USE_BAZEL_FALLBACK_VERSION:"silent:",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_4404d514-7ecb-46ca-abbe-c8673210fee6",PIPX_HOME:"/opt/pipx",npm_package_dependencies__types_lodash:"^4.17.7",npm_package_devDependencies_tsc_alias:"^1.8.8",npm_package_devDependencies_vite:"^5.1.4",npm_package_peerDependencies_tailwindcss:"^3.4.1",npm_node_execpath:"/opt/hostedtoolcache/node/20.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_files_0:"dist",npm_package_scripts_build_lib:"vite build --mode library",npm_package_dependencies_vue_virtual_scroller:"2.0.0-beta.8",HOME:"/home/runner",npm_package_exports___meta_types:"./dist/meta.d.ts",npm_package_dependencies_chart_js:"^4.4.2",npm_package_devDependencies_sass:"^1.71.1",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_devDependencies_eslint_config_prettier:"^9.1.0",npm_package_devDependencies_vite_plugin_static_copy:"^0.17.1",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"feedmepos",npm_package_scripts_build_components:'run-p type-check "build-lib {@}" --',GRADLE_HOME:"/usr/share/gradle-9.5.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/29.0.14206865",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",GITHUB_RETENTION_DAYS:"90",npm_package_scripts_type_check:"vue-tsc --noEmit -p tsconfig.app.json --composite false",npm_package_dependencies__tanstack_vue_virtual:"^3.13.0",npm_package_devDependencies_npm_run_all2:"^6.1.2",npm_package_peerDependencies_vue:"^3.4.21",GITHUB_REPOSITORY_OWNER_ID:"54831515",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-Linux",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_build_federation:"vite build --mode federation && cp -r ./temp/assets ./dist/federation && rm -rf ./temp",npm_package_devDependencies_vue_component_meta:"^2.0.13",SYSTEMD_EXEC_PID:"1858",ACTIONS_ORCHESTRATION_ID:"0435405b-4128-4f38-af9a-8818affece06.deploy.__default",npm_package_dependencies_dayjs:"^1.11.10",npm_package_devDependencies__tsconfig_node18:"^18.2.2",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_devDependencies_tailwindcss:"^3.4.1",npm_package_devDependencies_typescript:"~5.2.2",JAVA_HOME_25_X64:"/usr/lib/jvm/temurin-25-jdk-amd64",NVM_DIR:"/home/runner/.nvm",npm_package_homepage:"ui.feedme.ai",npm_package_devDependencies_vue_tsc:"^1.8.27",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20260513.135.3",npm_package_scripts_dev:"vite --port 5273",LOGNAME:"runner",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",STORE_PATH:"/home/runner/setup-pnpm/node_modules/.bin/store/v3",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_type:"module",npm_package_dependencies__vueuse_core:"^10.9.0",npm_package_devDependencies__vue_tsconfig:"^0.4.0",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.12/x64",JOURNAL_STREAM:"9:15640",GITHUB_WORKFLOW:"Publish Vue",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_module:"./dist/feedmepos-ui-library.js",npm_package_devDependencies_autoprefixer:"^10.4.17",RUNNER_DEBUG:"1",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure",GOROOT_1_24_X64:"/opt/hostedtoolcache/go/1.24.13/x64",npm_package_scripts_build_tailwind_plugin:"vite build --mode tailwind-plugin",npm_package_scripts_lint:"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",npm_package_dependencies_fuzzy:"^0.1.3",npm_package_devDependencies__types_uuid:"^10.0.0",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GOROOT_1_25_X64:"/opt/hostedtoolcache/go/1.25.10/x64",GITHUB_RUN_ID:"25870945920",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"4fa9e56e653aef7b55fdd413969ec977d8dee48a",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",npm_package_exports___import:"./dist/feedmepos-ui-library.js",npm_package_devDependencies__vitejs_plugin_vue:"^5.0.4",GITHUB_WORKFLOW_REF:"feedmepos/ui-library/.github/workflows/publish-vue.yml@refs/heads/main",GITHUB_ACTION_REPOSITORY:"",ENABLE_RUNNER_TRACING:"true",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.20.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_47628c0d-97f0-48d2-9a39-9547592a07f6",INVOCATION_ID:"b00ff4a2f30445a5bebb78912cb2548e",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.20.2/x64/bin/node",npm_package_name:"@feedmepos/ui-library",npm_package_repository_type:"git",GITHUB_ACTION:"__run_4",GITHUB_RUN_NUMBER:"345",GITHUB_TRIGGERING_ACTOR:"heiseshandian",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies_vue_country_flag_next:"^2.3.2",npm_config_frozen_lockfile:"",npm_package_exports___styles_css:"./dist/style.css",npm_package_scripts_build_tailwind_styling:"vite build --mode tailwind-styling",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_scripts_generate_component_meta:"node ./scripts/generate-component-meta.js",npm_package_devDependencies__vue_eslint_config_typescript:"^12.0.0",npm_package_devDependencies_eslint:"^8.57.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 1000069014",XDG_CONFIG_HOME:"/home/runner/.config",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"feedmepos/ui-library",npm_package_main:"./dist/feedmepos-ui-library.umd.cjs",npm_package_scripts_build_types:"vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false",npm_package_devDependencies__types_debounce:"^1.2.4",npm_lifecycle_script:"vite build --mode library",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_exports___tailwind_plugin:"./dist/tailwind-plugin.js",npm_package_devDependencies__vitejs_plugin_vue_jsx:"^3.1.0",SHELL:"/bin/bash",GITHUB_REPOSITORY_ID:"677015340",GITHUB_ACTIONS:"true",NODE_PATH:"/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/run-p/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.10.5",npm_package_repository_url:"git+https://github.com/feedmepos/ui-library.git",npm_package_dependencies__tanstack_vue_table:"^8.13.2",npm_package_dependencies_vuedraggable:"^4.1.0",npm_package_devDependencies__rushstack_eslint_patch:"^1.7.2",npm_package_devDependencies_eslint_plugin_unused_imports:"^4.3.0",npm_lifecycle_event:"build-lib",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build",npm_package_dependencies_uuid:"^10.0.0",GITHUB_WORKSPACE:"/home/runner/work/ui-library/ui-library",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",npm_package_dependencies_lodash:"^4.17.21",GITHUB_SHA:"4fa9e56e653aef7b55fdd413969ec977d8dee48a",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies_vue_router:"^4.3.0",npm_package_devDependencies_vite_plugin_top_level_await:"^1.4.1",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"heiseshandian",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_pack:"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../",npm_package_exports___tailwind_styling:"./dist/tailwind-styling.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_4404d514-7ecb-46ca-abbe-c8673210fee6",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/ui-library/ui-library/packages/vue",GITHUB_ACTOR_ID:"7780463",RUNNER_WORKSPACE:"/home/runner/work/ui-library",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_4404d514-7ecb-46ca-abbe-c8673210fee6",npm_package_exports___types:"./dist/index.d.ts",npm_package_devDependencies__types_chart_js:"^2.9.41",npm_config_recursive:"true",EDGEWEBDRIVER:"/usr/local/share/edge_driver",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_devDependencies_eslint_plugin_vue:"^9.22.0",npm_package_devDependencies_postcss:"^8.4.35",npm_package_peerDependencies_vite:"^5.1.4",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.3.13750724",SGX_AESM_ADDR:"1",PSModulePath:"/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules:/usr/share/az_14.6.0",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_scripts_deploy:"pnpm run build:lib && pnpm publish --no-git-checks .",npm_package_dependencies__floating_ui_vue:"^1.0.6",npm_package_dependencies_debounce:"^2.0.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",npm_package_bugs:"https://feedmepos.atlassian.net/browse/CT-3",npm_package_scripts_register_components:"node ./scripts/register-components.js && pnpm lint",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_4404d514-7ecb-46ca-abbe-c8673210fee6",INIT_CWD:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_scripts_copy_changelog:"cp ./CHANGELOG.md ./dist/CHANGELOG.md",npm_package_dependencies_chartjs_plugin_datalabels:"^2.2.0",npm_package_dependencies_libphonenumber_js:"^1.10.57",NODE_ENV:"production"}};function pr(t,e){return typeof t=="function"?t(e):t}function Sn(t,e){return n=>{e.setState(o=>({...o,[t]:pr(n,o[t])}))}}function Ql(t){return t instanceof Function}function YP(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function ZP(t,e){const n=[],o=i=>{i.forEach(a=>{n.push(a);const s=e(a);s!=null&&s.length&&o(s)})};return o(t),n}function xe(t,e,n){let o=[],i;return a=>{let s;n.key&&n.debug&&(s=Date.now());const l=t(a);if(!(l.length!==o.length||l.some((h,p)=>o[p]!==h)))return i;o=l;let u;if(n.key&&n.debug&&(u=Date.now()),i=e(...l),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const h=Math.round((Date.now()-s)*100)/100,p=Math.round((Date.now()-u)*100)/100,m=p/16,b=(y,v)=>{for(y=String(y);y.length<v;)y=" "+y;return y};console.info(`%c⏱ ${b(p,5)} /${b(h,5)} ms`,`
114
+ }`;var Fe=ik(function(){return Ke(I,ve+"return "+se).apply(n,L)});if(Fe.source=se,ah(Fe))throw Fe;return Fe}function UG(d){return Ye(d).toLowerCase()}function WG(d){return Ye(d).toUpperCase()}function jG(d,f,g){if(d=Ye(d),d&&(g||f===n))return h2(d);if(!d||!(f=Dn(f)))return d;var w=Zn(d),S=Zn(f),I=m2(w,S),L=g2(w,S)+1;return Br(w,I,L).join("")}function GG(d,f,g){if(d=Ye(d),d&&(g||f===n))return d.slice(0,y2(d)+1);if(!d||!(f=Dn(f)))return d;var w=Zn(d),S=g2(w,Zn(f))+1;return Br(w,0,S).join("")}function QG(d,f,g){if(d=Ye(d),d&&(g||f===n))return d.replace(ap,"");if(!d||!(f=Dn(f)))return d;var w=Zn(d),S=m2(w,Zn(f));return Br(w,S).join("")}function XG(d,f){var g=W,w=Q;if(ht(f)){var S="separator"in f?f.separator:S;g="length"in f?Re(f.length):g,w="omission"in f?Dn(f.omission):w}d=Ye(d);var I=d.length;if(Ki(d)){var L=Zn(d);I=L.length}if(g>=I)return d;var G=g-Ji(w);if(G<1)return w;var Y=L?Br(L,0,G).join(""):d.slice(0,G);if(S===n)return Y+w;if(L&&(G+=Y.length-G),sh(S)){if(d.slice(G).search(S)){var oe,re=Y;for(S.global||(S=Sp(S.source,Ye(Fy.exec(S))+"g")),S.lastIndex=0;oe=S.exec(re);)var se=oe.index;Y=Y.slice(0,se===n?G:se)}}else if(d.indexOf(Dn(S),G)!=G){var me=Y.lastIndexOf(S);me>-1&&(Y=Y.slice(0,me))}return Y+w}function qG(d){return d=Ye(d),d&&iz.test(d)?d.replace(Vy,S_):d}var KG=oa(function(d,f,g){return d+(g?" ":"")+f.toUpperCase()}),ch=av("toUpperCase");function rk(d,f,g){return d=Ye(d),f=g?n:f,f===n?y_(d)?E_(d):d_(d):d.match(f)||[]}var ik=Le(function(d,f){try{return An(d,n,f)}catch(g){return ah(g)?g:new Pe(g)}}),JG=Wo(function(d,f){return Fn(f,function(g){g=mo(g),Ho(d,g,rh(d[g],d))}),d});function YG(d){var f=d==null?0:d.length,g=Ce();return d=f?ft(d,function(w){if(typeof w[1]!="function")throw new Mn(s);return[g(w[0]),w[1]]}):[],Le(function(w){for(var S=-1;++S<f;){var I=d[S];if(An(I[0],this,w))return An(I[1],this,w)}})}function ZG(d){return SH(zn(d,p))}function uh(d){return function(){return d}}function $G(d,f){return d==null||d!==d?f:d}var eQ=lv(),tQ=lv(!0);function pn(d){return d}function fh(d){return L2(typeof d=="function"?d:zn(d,p))}function nQ(d){return _2(zn(d,p))}function oQ(d,f){return H2(d,zn(f,p))}var rQ=Le(function(d,f){return function(g){return gs(g,d,f)}}),iQ=Le(function(d,f){return function(g){return gs(d,g,f)}});function ph(d,f,g){var w=Nt(f),S=Md(f,w);g==null&&!(ht(f)&&(S.length||!w.length))&&(g=f,f=d,d=this,S=Md(f,Nt(f)));var I=!(ht(g)&&"chain"in g)||!!g.chain,L=Go(d);return Fn(S,function(G){var Y=f[G];d[G]=Y,L&&(d.prototype[G]=function(){var oe=this.__chain__;if(I||oe){var re=d(this.__wrapped__),se=re.__actions__=cn(this.__actions__);return se.push({func:Y,args:arguments,thisArg:d}),re.__chain__=oe,re}return Y.apply(d,xr([this.value()],arguments))})}),d}function aQ(){return _t._===this&&(_t._=N_),this}function hh(){}function sQ(d){return d=Re(d),Le(function(f){return U2(f,d)})}var lQ=Gp(ft),dQ=Gp(d2),cQ=Gp(gp);function ak(d){return Zp(d)?bp(mo(d)):_H(d)}function uQ(d){return function(f){return d==null?n:ri(d,f)}}var fQ=cv(),pQ=cv(!0);function mh(){return[]}function gh(){return!1}function hQ(){return{}}function mQ(){return""}function gQ(){return!0}function bQ(d,f){if(d=Re(d),d<1||d>q)return[];var g=ge,w=Qt(d,ge);f=Ce(f),d-=ge;for(var S=kp(w,f);++g<d;)f(g);return S}function yQ(d){return Ne(d)?ft(d,mo):Bn(d)?[d]:cn(Ev(Ye(d)))}function vQ(d){var f=++I_;return Ye(d)+f}var kQ=Wd(function(d,f){return d+f},0),wQ=Qp("ceil"),xQ=Wd(function(d,f){return d/f},1),SQ=Qp("floor");function CQ(d){return d&&d.length?Fd(d,pn,Op):n}function AQ(d,f){return d&&d.length?Fd(d,Ce(f,2),Op):n}function EQ(d){return f2(d,pn)}function DQ(d,f){return f2(d,Ce(f,2))}function BQ(d){return d&&d.length?Fd(d,pn,Tp):n}function PQ(d,f){return d&&d.length?Fd(d,Ce(f,2),Tp):n}var IQ=Wd(function(d,f){return d*f},1),OQ=Qp("round"),NQ=Wd(function(d,f){return d-f},0);function VQ(d){return d&&d.length?vp(d,pn):0}function RQ(d,f){return d&&d.length?vp(d,Ce(f,2)):0}return B.after=nj,B.ary=Mv,B.assign=Wj,B.assignIn=Yv,B.assignInWith=nc,B.assignWith=jj,B.at=Gj,B.before=Lv,B.bind=rh,B.bindAll=JG,B.bindKey=zv,B.castArray=hj,B.chain=Rv,B.chunk=SU,B.compact=CU,B.concat=AU,B.cond=YG,B.conforms=ZG,B.constant=uh,B.countBy=VW,B.create=Qj,B.curry=_v,B.curryRight=Hv,B.debounce=Uv,B.defaults=Xj,B.defaultsDeep=qj,B.defer=oj,B.delay=rj,B.difference=EU,B.differenceBy=DU,B.differenceWith=BU,B.drop=PU,B.dropRight=IU,B.dropRightWhile=OU,B.dropWhile=NU,B.fill=VU,B.filter=TW,B.flatMap=LW,B.flatMapDeep=zW,B.flatMapDepth=_W,B.flatten=Iv,B.flattenDeep=RU,B.flattenDepth=TU,B.flip=ij,B.flow=eQ,B.flowRight=tQ,B.fromPairs=FU,B.functions=tG,B.functionsIn=nG,B.groupBy=HW,B.initial=LU,B.intersection=zU,B.intersectionBy=_U,B.intersectionWith=HU,B.invert=rG,B.invertBy=iG,B.invokeMap=WW,B.iteratee=fh,B.keyBy=jW,B.keys=Nt,B.keysIn=fn,B.map=Jd,B.mapKeys=sG,B.mapValues=lG,B.matches=nQ,B.matchesProperty=oQ,B.memoize=Zd,B.merge=dG,B.mergeWith=Zv,B.method=rQ,B.methodOf=iQ,B.mixin=ph,B.negate=$d,B.nthArg=sQ,B.omit=cG,B.omitBy=uG,B.once=aj,B.orderBy=GW,B.over=lQ,B.overArgs=sj,B.overEvery=dQ,B.overSome=cQ,B.partial=ih,B.partialRight=Wv,B.partition=QW,B.pick=fG,B.pickBy=$v,B.property=ak,B.propertyOf=uQ,B.pull=GU,B.pullAll=Nv,B.pullAllBy=QU,B.pullAllWith=XU,B.pullAt=qU,B.range=fQ,B.rangeRight=pQ,B.rearg=lj,B.reject=KW,B.remove=KU,B.rest=dj,B.reverse=nh,B.sampleSize=YW,B.set=hG,B.setWith=mG,B.shuffle=ZW,B.slice=JU,B.sortBy=tj,B.sortedUniq=oW,B.sortedUniqBy=rW,B.split=LG,B.spread=cj,B.tail=iW,B.take=aW,B.takeRight=sW,B.takeRightWhile=lW,B.takeWhile=dW,B.tap=CW,B.throttle=uj,B.thru=Kd,B.toArray=qv,B.toPairs=ek,B.toPairsIn=tk,B.toPath=yQ,B.toPlainObject=Jv,B.transform=gG,B.unary=fj,B.union=cW,B.unionBy=uW,B.unionWith=fW,B.uniq=pW,B.uniqBy=hW,B.uniqWith=mW,B.unset=bG,B.unzip=oh,B.unzipWith=Vv,B.update=yG,B.updateWith=vG,B.values=aa,B.valuesIn=kG,B.without=gW,B.words=rk,B.wrap=pj,B.xor=bW,B.xorBy=yW,B.xorWith=vW,B.zip=kW,B.zipObject=wW,B.zipObjectDeep=xW,B.zipWith=SW,B.entries=ek,B.entriesIn=tk,B.extend=Yv,B.extendWith=nc,ph(B,B),B.add=kQ,B.attempt=ik,B.camelCase=CG,B.capitalize=nk,B.ceil=wQ,B.clamp=wG,B.clone=mj,B.cloneDeep=bj,B.cloneDeepWith=yj,B.cloneWith=gj,B.conformsTo=vj,B.deburr=ok,B.defaultTo=$G,B.divide=xQ,B.endsWith=AG,B.eq=eo,B.escape=EG,B.escapeRegExp=DG,B.every=RW,B.find=FW,B.findIndex=Bv,B.findKey=Kj,B.findLast=MW,B.findLastIndex=Pv,B.findLastKey=Jj,B.floor=SQ,B.forEach=Tv,B.forEachRight=Fv,B.forIn=Yj,B.forInRight=Zj,B.forOwn=$j,B.forOwnRight=eG,B.get=lh,B.gt=kj,B.gte=wj,B.has=oG,B.hasIn=dh,B.head=Ov,B.identity=pn,B.includes=UW,B.indexOf=MU,B.inRange=xG,B.invoke=aG,B.isArguments=si,B.isArray=Ne,B.isArrayBuffer=xj,B.isArrayLike=un,B.isArrayLikeObject=xt,B.isBoolean=Sj,B.isBuffer=Pr,B.isDate=Cj,B.isElement=Aj,B.isEmpty=Ej,B.isEqual=Dj,B.isEqualWith=Bj,B.isError=ah,B.isFinite=Pj,B.isFunction=Go,B.isInteger=jv,B.isLength=ec,B.isMap=Gv,B.isMatch=Ij,B.isMatchWith=Oj,B.isNaN=Nj,B.isNative=Vj,B.isNil=Tj,B.isNull=Rj,B.isNumber=Qv,B.isObject=ht,B.isObjectLike=vt,B.isPlainObject=xs,B.isRegExp=sh,B.isSafeInteger=Fj,B.isSet=Xv,B.isString=tc,B.isSymbol=Bn,B.isTypedArray=ia,B.isUndefined=Mj,B.isWeakMap=Lj,B.isWeakSet=zj,B.join=UU,B.kebabCase=BG,B.last=Hn,B.lastIndexOf=WU,B.lowerCase=PG,B.lowerFirst=IG,B.lt=_j,B.lte=Hj,B.max=CQ,B.maxBy=AQ,B.mean=EQ,B.meanBy=DQ,B.min=BQ,B.minBy=PQ,B.stubArray=mh,B.stubFalse=gh,B.stubObject=hQ,B.stubString=mQ,B.stubTrue=gQ,B.multiply=IQ,B.nth=jU,B.noConflict=aQ,B.noop=hh,B.now=Yd,B.pad=OG,B.padEnd=NG,B.padStart=VG,B.parseInt=RG,B.random=SG,B.reduce=XW,B.reduceRight=qW,B.repeat=TG,B.replace=FG,B.result=pG,B.round=OQ,B.runInContext=K,B.sample=JW,B.size=$W,B.snakeCase=MG,B.some=ej,B.sortedIndex=YU,B.sortedIndexBy=ZU,B.sortedIndexOf=$U,B.sortedLastIndex=eW,B.sortedLastIndexBy=tW,B.sortedLastIndexOf=nW,B.startCase=zG,B.startsWith=_G,B.subtract=NQ,B.sum=VQ,B.sumBy=RQ,B.template=HG,B.times=bQ,B.toFinite=Qo,B.toInteger=Re,B.toLength=Kv,B.toLower=UG,B.toNumber=Un,B.toSafeInteger=Uj,B.toString=Ye,B.toUpper=WG,B.trim=jG,B.trimEnd=GG,B.trimStart=QG,B.truncate=XG,B.unescape=qG,B.uniqueId=vQ,B.upperCase=KG,B.upperFirst=ch,B.each=Tv,B.eachRight=Fv,B.first=Ov,ph(B,function(){var d={};return po(B,function(f,g){Ze.call(B.prototype,g)||(d[g]=f)}),d}(),{chain:!1}),B.VERSION=o,Fn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){B[d].placeholder=B}),Fn(["drop","take"],function(d,f){Ue.prototype[d]=function(g){g=g===n?1:It(Re(g),0);var w=this.__filtered__&&!f?new Ue(this):this.clone();return w.__filtered__?w.__takeCount__=Qt(g,w.__takeCount__):w.__views__.push({size:Qt(g,ge),type:d+(w.__dir__<0?"Right":"")}),w},Ue.prototype[d+"Right"]=function(g){return this.reverse()[d](g).reverse()}}),Fn(["filter","map","takeWhile"],function(d,f){var g=f+1,w=g==V||g==D;Ue.prototype[d]=function(S){var I=this.clone();return I.__iteratees__.push({iteratee:Ce(S,3),type:g}),I.__filtered__=I.__filtered__||w,I}}),Fn(["head","last"],function(d,f){var g="take"+(f?"Right":"");Ue.prototype[d]=function(){return this[g](1).value()[0]}}),Fn(["initial","tail"],function(d,f){var g="drop"+(f?"":"Right");Ue.prototype[d]=function(){return this.__filtered__?new Ue(this):this[g](1)}}),Ue.prototype.compact=function(){return this.filter(pn)},Ue.prototype.find=function(d){return this.filter(d).head()},Ue.prototype.findLast=function(d){return this.reverse().find(d)},Ue.prototype.invokeMap=Le(function(d,f){return typeof d=="function"?new Ue(this):this.map(function(g){return gs(g,d,f)})}),Ue.prototype.reject=function(d){return this.filter($d(Ce(d)))},Ue.prototype.slice=function(d,f){d=Re(d);var g=this;return g.__filtered__&&(d>0||f<0)?new Ue(g):(d<0?g=g.takeRight(-d):d&&(g=g.drop(d)),f!==n&&(f=Re(f),g=f<0?g.dropRight(-f):g.take(f-d)),g)},Ue.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},Ue.prototype.toArray=function(){return this.take(ge)},po(Ue.prototype,function(d,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),S=B[w?"take"+(f=="last"?"Right":""):f],I=w||/^find/.test(f);S&&(B.prototype[f]=function(){var L=this.__wrapped__,G=w?[1]:arguments,Y=L instanceof Ue,oe=G[0],re=Y||Ne(L),se=function(He){var We=S.apply(B,xr([He],G));return w&&me?We[0]:We};re&&g&&typeof oe=="function"&&oe.length!=1&&(Y=re=!1);var me=this.__chain__,ve=!!this.__actions__.length,Ae=I&&!me,Fe=Y&&!ve;if(!I&&re){L=Fe?L:new Ue(this);var Ee=d.apply(L,G);return Ee.__actions__.push({func:Kd,args:[se],thisArg:n}),new Ln(Ee,me)}return Ae&&Fe?d.apply(this,G):(Ee=this.thru(se),Ae?w?Ee.value()[0]:Ee.value():Ee)})}),Fn(["pop","push","shift","sort","splice","unshift"],function(d){var f=wd[d],g=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",w=/^(?:pop|shift)$/.test(d);B.prototype[d]=function(){var S=arguments;if(w&&!this.__chain__){var I=this.value();return f.apply(Ne(I)?I:[],S)}return this[g](function(L){return f.apply(Ne(L)?L:[],S)})}}),po(Ue.prototype,function(d,f){var g=B[f];if(g){var w=g.name+"";Ze.call(ea,w)||(ea[w]=[]),ea[w].push({name:f,func:g})}}),ea[Ud(n,x).name]=[{name:"wrapper",func:n}],Ue.prototype.clone=q_,Ue.prototype.reverse=K_,Ue.prototype.value=J_,B.prototype.at=AW,B.prototype.chain=EW,B.prototype.commit=DW,B.prototype.next=BW,B.prototype.plant=IW,B.prototype.reverse=OW,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=NW,B.prototype.first=B.prototype.head,ds&&(B.prototype[ds]=PW),B},Yi=D_();$r?(($r.exports=Yi)._=Yi,fp._=Yi):_t._=Yi}).call(nn)}(Wl,Wl.exports);var lf=Wl.exports;const uB={class:"flex gap-8 items-center"},fB=["type","onInput","onKeydown"],pB=Ie(r.defineComponent({__name:"FmPinField",props:{modelValue:{default:()=>[]},length:{default:6},type:{default:"number"},isError:{type:Boolean},masked:{type:Boolean,default:!1}},emits:["update:modelValue","complete","focus"],setup(t,{emit:e}){const n=e,o=t,i=Te(o,"modelValue"),a=r.ref([]),s=(m,b)=>{const y=m.target;if(o.type==="number"&&!/^[0-9]$/g.test(y.value)){y.value="";return}y.value=y.value.slice(-1),u(y.value,b),a.value[b+1]?a.value[b+1].focus():a.value[b].blur()},l=(m,b)=>{m.preventDefault();const y=m.target;y.value="",u(null,b),a.value[b-1]?a.value[b-1].focus():a.value[b].focus()},c=(m,b)=>{m.preventDefault(),m.key==="ArrowLeft"&&(a.value[b-1]?a.value[b-1].focus():a.value[b].focus()),m.key==="ArrowRight"&&(a.value[b+1]?a.value[b+1].focus():a.value[b].focus())},u=(m,b)=>{i.value=i.value.toSpliced(b,1,m)},h=(m,b)=>{a.value[b]=m};r.onMounted(()=>{const m=Array.from(Array(o.length).fill(null));Array.isArray(i.value)&&i.value.forEach((b,y)=>{b!==null&&y<m.length&&(m[y]=b)}),i.value=m});const p=r.computed(()=>lf.isArray(i.value)?i.value.map(m=>m===null?" ":m).join(""):new Array(o.length).fill(" ").join(""));return r.watch([()=>{var m;return(m=a.value)==null?void 0:m.length},p],()=>{var m,b;((m=a.value)==null?void 0:m.length)>0&&((b=i.value)==null||b.forEach((y,v)=>{v<o.length&&(a.value[v].value=y??"")}))},{immediate:!0,flush:"post"}),r.watch(()=>i.value,()=>{i.value.every(m=>m!==null)&&n("complete",i.value.join(""))}),(m,b)=>(r.openBlock(),r.createElementBlock("div",uB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.length,(y,v)=>(r.openBlock(),r.createElementBlock("input",{key:y,ref_for:!0,ref:k=>h(k,v),class:r.normalizeClass(["fm-pin-field",{[m.isError?"fm-pin-field--error":"fm-pin-field--populated"]:r.unref(i)[v]!==null}]),inputmode:"numeric",type:m.masked?"password":"text",onFocus:b[0]||(b[0]=k=>n("focus")),onInput:k=>s(k,v),onKeydown:[r.withKeys(k=>l(k,v),["backspace"]),r.withKeys(k=>c(k,v),["arrow-left","arrow-right"])]},null,42,fB))),128))]))}}),[["__scopeId","data-v-aec3f93d"]]),hB={class:"fm-radio-btn"},mB={class:"relative flex items-center justify-center w-6 h-6"},gB={class:"fm-radio-btn__input--container"},bB=["checked","disabled","value"],yB={class:"fm-typo-en-body-lg-400"},vB={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},kB=Ie(r.defineComponent({__name:"FmRadio",props:{modelValue:{default:null},value:{},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=Te(e,"modelValue"),o=r.ref(),i=r.inject(nm,null),a=r.inject(tt,null),s=()=>{l.value||(i?i.updateValue(e.value):n.value=e.value)},l=r.computed(()=>e.disabled??(i==null?void 0:i.getDisabled())??(a==null?void 0:a.getDisabled())??!1),c=r.computed(()=>i?e.value===i.groupValue.value:n.value===e.value);return(u,h)=>{const p=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",hB,[r.createElementVNode("label",{class:r.normalizeClass([{"fm-radio-btn--wrapper":!0,"cursor-not-allowed text-fm-color-typo-disabled":l.value,"cursor-pointer":!l.value},"space-x-8",u.sublabel?"items-start":"items-center"]),onClick:s},[r.createElementVNode("div",mB,[r.withDirectives((r.openBlock(),r.createElementBlock("div",gB,[r.createElementVNode("input",{ref_key:"inputEl",ref:o,checked:c.value,disabled:l.value,value:u.value,class:"fm-radio-btn__input--btn",type:"radio"},null,8,bB)])),[[p,!l.value]])]),r.createElementVNode("div",{class:r.normalizeClass([u.sublabel?"py-0":"py-0.5","space-y-4","flex-1","min-w-0"])},[r.renderSlot(u.$slots,"label",{},()=>[r.createElementVNode("div",yB,r.toDisplayString(u.label),1),u.sublabel?(r.openBlock(),r.createElementBlock("div",vB,r.toDisplayString(u.sublabel),1)):r.createCommentVNode("",!0)],!0)],2)],2)])}}}),[["__scopeId","data-v-9d8dbc91"]]),wB=r.defineComponent({__name:"FmRadioGroup",props:{modelValue:{},inline:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[t=>!lf.isNil(t)||"This field is required"]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=Te(e,"modelValue"),o=r.inject(tt,null);r.provide(nm,{groupValue:n,getDisabled:()=>i.value,updateValue(a){n.value=a}});const i=r.computed(()=>e.disabled??(o==null?void 0:o.getDisabled())??!1);return(a,s)=>(r.openBlock(),r.createBlock(Rt,{modelValue:r.unref(n),"onUpdate:modelValue":s[0]||(s[0]=l=>r.isRef(n)?n.value=l:null),disabled:i.value,"helper-state":a.helperState,"helper-text":a.helperText,info:a.labelInfo,label:a.label,optional:a.labelMark==="optional",required:a.labelMark==="required",rules:a.rules},r.createSlots({default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass({"flex items-center gap-16 justify-start":a.inline,"flex flex-col gap-8":!a.inline})},[r.renderSlot(a.$slots,"default")],2)]),_:2},[a.label||a.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(a.$slots,"label")]),key:"0"}:void 0,a.helperText||a.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(a.$slots,"helper-text")]),key:"1"}:void 0]),1032,["modelValue","disabled","helper-state","helper-text","info","label","optional","required","rules"]))}}),jl=r.defineComponent({__name:"FmSearch",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},maxWidth:{default:void 0},autofocus:{type:Boolean,default:!1},modelValue:{},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},setup(t){const e=t,n=r.inject(tt,null),o=r.computed(()=>{const{modelValue:m,disabled:b,...y}=e;return y}),i=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),a=Te(e,"modelValue"),s=r.ref(!1),l=r.ref(),c=r.ref(e.collapsible),u=r.ref(e.collapsible);function h(){c.value=!1,r.nextTick(()=>{var m,b,y,v;(v=(y=(b=(m=l.value)==null?void 0:m.querySelector)==null?void 0:b.call(m,"input"))==null?void 0:y.focus)==null||v.call(y)})}function p(m){if(s.value=m,!!e.collapsible){if(m){u.value=!1;return}c.value=a.value.length===0,c.value&&setTimeout(()=>{u.value=!0},250)}}return(m,b)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"componentRoot",ref:l,class:"flex items-center justify-end min-w-48 relative"},[r.createElementVNode("div",{class:r.normalizeClass(["transition-all",{"opacity-100":!m.collapsible||!c.value,"opacity-0 pointer-events-none":m.collapsible&&c.value},m.collapsible&&c.value?"w-9 h-9":"w-full"])},[r.createVNode(Lr,r.mergeProps({modelValue:r.unref(a),"onUpdate:modelValue":b[1]||(b[1]=y=>r.isRef(a)?a.value=y:null),disabled:i.value||m.collapsible&&c.value},o.value,{autofocus:e.autofocus,onFocusChanged:p}),r.createSlots({_:2},[!m.collapsible||!s.value?{name:"prepend",fn:r.withCtx(()=>[r.createVNode(be,{name:"search"})]),key:"0"}:void 0,r.unref(a).length?{name:"append",fn:r.withCtx(()=>[r.createVNode(be,{class:"cursor-pointer text-fm-color-neutral-gray-300",name:"close",onClick:b[0]||(b[0]=y=>a.value="")})]),key:"1"}:void 0]),1040,["modelValue","disabled","autofocus"])],2),m.collapsible?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["absolute bottom-0 right-0",c.value?"opacity-100":"opacity-0 pointer-events-none"]),style:r.normalizeStyle({transition:"opacity 150ms",transitionTimingFunction:c.value?"cubic-bezier(.95,-0.01,.82,.6)":"ease-out"})},[r.createVNode(we,{icon:"search",variant:"tertiary",onClick:h})],6)):r.createCommentVNode("",!0)],512))}}),xB={key:0,class:"flex fm-typo-en-title-sm-600 items-center justify-between text-fm-color-typo-primary"},SB={key:0},CB={class:"h-full overflow-y-auto"},AB={key:1,class:"flex gap-8 items-center"},cb=Ie(r.defineComponent({__name:"FmTopSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},fullscreenSize:{default:void 0},zIndex:{default:void 0},noOverlay:{type:Boolean,default:!1}},emits:["update:modelValue","on:clickedAway"],setup(t){const e=t,n=Te(e,"modelValue");return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:i[0]||(i[0]=a=>n.value=!0)},[r.renderSlot(o.$slots,"top-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(n)?(r.openBlock(),r.createBlock(Ei,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,transparent:e.noOverlay,onClose:i[1]||(i[1]=a=>n.value=!1),onClickedAway:i[2]||(i[2]=a=>o.$emit("on:clickedAway"))},{default:r.withCtx(()=>[r.createVNode(r.Transition,{name:o.fullscreenSize?`slide-${o.fullscreenSize}`:"slide",appear:""},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-top-sheet",`fm-top-sheet--fullscreen-${o.fullscreenSize}`,e.noOverlay&&"shadow-md"])},[o.header||o.$slots["top-sheet-header"]?(r.openBlock(),r.createElementBlock("div",xB,[r.renderSlot(o.$slots,"top-sheet-header",{},()=>[o.header?(r.openBlock(),r.createElementBlock("div",SB,r.toDisplayString(o.header),1)):r.createCommentVNode("",!0)],!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",CB,[r.renderSlot(o.$slots,"default",{},void 0,!0)]),o.$slots["top-sheet-footer"]?(r.openBlock(),r.createElementBlock("div",AB,[r.renderSlot(o.$slots,"top-sheet-footer",{},void 0,!0)])):r.createCommentVNode("",!0)],2)]),_:3},8,["name"])]),_:3},8,["dismiss-away","z-index","transparent"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-6e83c161"]]);var df={exports:{}};function ub(t,e=100,n={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");const{immediate:o}=typeof n=="boolean"?{immediate:n}:n;let i,a,s,l,c;function u(){const m=i,b=a;return i=void 0,a=void 0,c=t.apply(m,b),c}function h(){const m=Date.now()-l;m<e&&m>=0?s=setTimeout(h,e-m):(s=void 0,o||(c=u()))}const p=function(...m){if(i&&this!==i)throw new Error("Debounced method called with different contexts.");i=this,a=m,l=Date.now();const b=o&&!s;return s||(s=setTimeout(h,e)),b&&(c=u()),c};return p.clear=()=>{s&&(clearTimeout(s),s=void 0)},p.flush=()=>{s&&p.trigger()},p.trigger=()=>{c=u(),p.clear()},p}df.exports.debounce=ub,df.exports=ub;var EB=df.exports;const cf=wa(EB);var fb={exports:{}};(function(t,e){(function(){var n={};t.exports=n,n.simpleFilter=function(o,i){return i.filter(function(a){return n.test(o,a)})},n.test=function(o,i){return n.match(o,i)!==null},n.match=function(o,i,a){a=a||{};var s=0,l=[],c=i.length,u=0,h=0,p=a.pre||"",m=a.post||"",b=a.caseSensitive&&i||i.toLowerCase(),y;o=a.caseSensitive&&o||o.toLowerCase();for(var v=0;v<c;v++)y=i[v],b[v]===o[s]?(y=p+y+m,s+=1,h+=1+h):h=0,u+=h,l[l.length]=y;return s===o.length?(u=b===o?1/0:u,{rendered:l.join(""),score:u}):null},n.filter=function(o,i,a){return!i||i.length===0?[]:typeof o!="string"?i:(a=a||{},i.reduce(function(s,l,c,u){var h=l;a.extract&&(h=a.extract(l));var p=n.match(o,h,a);return p!=null&&(s[s.length]={string:p.rendered,score:p.score,index:c,original:l}),s},[]).sort(function(s,l){var c=l.score-s.score;return c||s.index-l.index}))}})()})(fb);var DB=fb.exports;const BB=wa(DB);function Gl(t,e){const[n]=BB.filter(t.toLocaleLowerCase(),[e],{pre:"|",post:"|",extract(i){return i.toLocaleLowerCase()}});if(!n)return{label:e,segments:[{segment:e,isMatch:!1}],matched:!1};const o=n.string.toString().replace(/\|\|/g,"").split("|").reduce((i,a,s)=>(i.push({segment:a,isMatch:s%2!==0}),i),new Array);return{label:e,segments:o,matched:!0}}const PB={class:"flex flex-col gap-4"},IB={class:"bg-white flex gap-4 px-24 py-8 sticky top-0"},OB={class:"hidden sm:inline xs:inline"},NB={key:0},VB={key:0,class:"flex flex-col"},RB={class:"flex flex-col"},TB={class:"flex items-center px-24 py-12"},FB={class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},MB=r.createElementVNode("div",{class:"py-4"},[r.createElementVNode("hr",{class:"border-fm-color-neutral-gray-100"})],-1),LB=["onClick"],zB={class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"},_B={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-primary"},HB={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-typo-secondary"},UB={key:3,class:"flex flex-col"},WB=["onClick"],jB={class:"flex flex-col gap-4"},GB={key:0,class:"text-fm-color-typo-secondary"},QB={class:"px-16 py-4"},XB=5,qB=r.defineComponent({__name:"FmGlobalSearch",props:{show:{type:Boolean,default:!1},modelValue:{default:""},suggestions:{default:void 0},onSearch:{type:Function,default:void 0},placeholder:{default:""},hintPlaceholder:{default:""},notFoundPlaceholder:{default:""},recentSearchKey:{default:""}},emits:["dismiss","submit","update:show","update:modelValue"],setup(t,{emit:e}){const n=t,o=e;function i(){if(!n.recentSearchKey)return;const z=n.recentSearchKey;localStorage.removeItem(z),l.value=[]}function a(){if(!n.recentSearchKey)return;const z=n.recentSearchKey,W=localStorage.getItem(z);if(!W)return[];try{return JSON.parse(W)}catch{return new Array}}const s=cf(function(W){if(!n.recentSearchKey)return;const Q=n.recentSearchKey,N=W().trim();if(!Q||!N)return;const F=a()??[],V=[...new Set([N,...F])].slice(0,XB),R=JSON.stringify(V);return localStorage.setItem(Q,R),l.value=V,V},800),l=r.ref(a()),c=Te(n,"show");r.watch([()=>n.show],()=>{n.show?(p.value=null,n.suggestions&&C()):o("dismiss")});const u=Te(n,"modelValue"),h=r.ref(n.modelValue);r.watch([()=>h.value],()=>{O()});const p=r.ref(null),m=r.ref(!0),b=r.computed(()=>{var z;return m.value?(z=p.value)==null?void 0:z.slice(0,5):p.value});r.watch([()=>p.value],([])=>{m.value=!0});const y=r.computed(()=>p.value===null),v=r.ref(!1),k=r.ref(""),x=()=>h.value;async function C(){if(!c.value)return;const z=x();if(!z)return;const W=Math.random().toString();if(k.value=W,n.suggestions){p.value=n.suggestions.map(Q=>({label:Gl(z,Q.label),sublabel:Q.sublabel?Gl(z,Q.sublabel):null})).filter(Q=>{var N;return Q.label.matched||((N=Q.sublabel)==null?void 0:N.matched)}),s(x);return}if(n.onSearch)try{v.value=!0;const Q=await n.onSearch(z);W===k.value&&(p.value=Q.map(N=>({label:Gl(z,N.label),sublabel:N.sublabel?Gl(z,N.sublabel):null})))}catch{W===k.value&&(p.value=[])}finally{W===k.value&&(v.value=!1,s(x))}}function P(z){c.value=!1,o("dismiss"),u.value=z}const O=cf(C),E=r.computed(()=>l.value&&l.value.length===0),T=r.computed(()=>(!h.value||y.value)&&!E.value),A=r.computed(()=>(!h.value||y.value)&&E.value),M=r.computed(()=>h.value&&p.value&&p.value.length===0);return(z,W)=>(r.openBlock(),r.createBlock(cb,{"model-value":r.unref(c),"onUpdate:modelValue":W[4]||(W[4]=Q=>r.isRef(c)?c.value=Q:null),"fullscreen-size":"sm","dismiss-away":""},{default:r.withCtx(()=>{var Q,N;return[r.createElementVNode("div",PB,[r.createElementVNode("div",IB,[r.createElementVNode("div",OB,[r.createVNode(we,{"prepend-icon":"arrow_back",variant:"tertiary",onClick:W[0]||(W[0]=F=>c.value=!1)})]),r.createVNode(jl,{"model-value":h.value,"onUpdate:modelValue":W[1]||(W[1]=F=>h.value=F),class:"flex-1",placeholder:z.placeholder},null,8,["model-value","placeholder"])]),v.value?(r.openBlock(),r.createElementBlock("div",NB,[r.createVNode(Rr,{size:"xl"})])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[T.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[z.recentSearchKey&&((Q=l.value)!=null&&Q.length)?(r.openBlock(),r.createElementBlock("div",VB,[r.createElementVNode("div",RB,[r.createElementVNode("div",TB,[r.createElementVNode("div",FB,r.toDisplayString(r.unref(_)("search.recent")),1),r.createVNode(rr),r.createVNode(we,{label:r.unref(_)("search.clearHistory"),variant:"plain",size:"md",onClick:W[2]||(W[2]=F=>i())},null,8,["label"])]),MB]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(F,V)=>(r.openBlock(),r.createElementBlock("div",{key:V,class:"cursor-pointer flex gap-8 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12",onClick:R=>h.value=F},[r.createVNode(be,{size:"lg",name:"history"}),r.createElementVNode("div",zB,r.toDisplayString(F),1)],8,LB))),128))])])):r.createCommentVNode("",!0)],64)):A.value?r.renderSlot(z.$slots,"hint-placeholder",{key:1},()=>[r.createElementVNode("div",_B,r.toDisplayString(z.hintPlaceholder),1)]):M.value?r.renderSlot(z.$slots,"not-found-placeholder",{key:2},()=>[r.createElementVNode("div",HB,r.toDisplayString(z.notFoundPlaceholder||`No result found for “${h.value}”`),1)]):(r.openBlock(),r.createElementBlock("div",UB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(b.value,(F,V)=>r.renderSlot(z.$slots,"search-result-item",r.mergeProps({key:V,ref_for:!0},{result:F}),()=>[r.createElementVNode("div",{class:"cursor-pointer flex gap-16 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12 w-full",onClick:R=>P(F.label.label)},[r.createVNode(be,{size:"lg",name:"arrow_forward"}),r.createElementVNode("div",jB,[r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(F.label.segments,(R,D)=>(r.openBlock(),r.createElementBlock("span",{key:D,class:r.normalizeClass({"fm-typo-en-body-lg-400":!R.isMatch,"fm-typo-en-body-lg-600":R.isMatch})},r.toDisplayString(R.segment),3))),128))]),F.sublabel?(r.openBlock(),r.createElementBlock("div",GB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(F.sublabel.segments,(R,D)=>(r.openBlock(),r.createElementBlock("span",{key:D,class:r.normalizeClass({"fm-typo-en-body-md-400":!R.isMatch,"fm-typo-en-body-md-600":R.isMatch})},r.toDisplayString(R.segment),3))),128))])):r.createCommentVNode("",!0)])],8,WB)])),128)),r.createElementVNode("div",QB,[m.value&&(((N=p.value)==null?void 0:N.length)??0)>5?(r.openBlock(),r.createBlock(we,{key:0,label:`show ${p.value.length-5} more results`,variant:"plain",onClick:W[3]||(W[3]=F=>m.value=!1)},null,8,["label"])):r.createCommentVNode("",!0)])]))],64))])]}),_:3},8,["model-value"]))}}),KB=["disabled","inputMode","placeholder","readOnly","value"],JB={key:0},YB=["disabled"],ZB=["disabled"],$B=Ie(r.defineComponent({__name:"FmStepperField",props:{modelValue:{},placeholder:{default:""},inputmode:{default:"numeric"},readonly:{type:Boolean},labelMark:{default:"none"},step:{default:1},min:{default:void 0},max:{default:void 0},prependIcon:{default:""},appendIcon:{default:""},isCurrency:{type:Boolean,default:!1},showSteppers:{type:Boolean,default:!0},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},useGrouping:{type:Boolean,default:!0},minFractionDigits:{default:0},maxFractionDigits:{default:2},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(tt,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Te(e,"modelValue"),{isFocused:a,blur:s,focus:l}=ka(),c=r.ref(null);let u;const h=E=>{if(E!==""){const T=+E.replace(/,/g,"");return isNaN(T)?null:T}return null},p=E=>u.format(E),m=E=>{if(typeof i.value!="number"){i.value=+i.value;return}if(E>0&&x.value||E<0&&C.value)return;let T=P(i.value)?i.value+E:0;T=b(T),i.value=T},b=E=>e.max!==void 0&&E>e.max?e.max:e.min!==void 0&&E<e.min?e.min:E,y=()=>{var E;i.value=h(((E=c.value)==null?void 0:E.value)??"")},v=E=>{if(![...Array(10).keys()].map(T=>T.toString()).includes(E.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(E.key)){E.preventDefault();return}},k=r.computed(()=>i.value!=null?p(i.value):""),x=r.computed(()=>{let E=!1;return e.max!==void 0&&(E=i.value>=e.max),e.min!==void 0&&(E=i.value<e.min),E}),C=r.computed(()=>{let E=!1;return e.max!==void 0&&(E=i.value>e.max),e.min!==void 0&&(E=i.value<=e.min),E});r.onBeforeMount(()=>{u=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping,minimumFractionDigits:e.minFractionDigits,maximumFractionDigits:e.maxFractionDigits,roundingMode:"trunc"})});function P(E){return typeof E=="number"&&isFinite(E)}const O=()=>{var E;(E=c.value)==null||E.focus()};return(E,T)=>(r.openBlock(),r.createBlock(Rt,{modelValue:r.unref(i),"onUpdate:modelValue":T[8]||(T[8]=A=>r.isRef(i)?i.value=A:null),disabled:o.value,focused:r.unref(a),"helper-state":E.helperState,"helper-text":E.helperText,info:E.labelInfo,label:E.label,optional:E.labelMark==="optional",required:E.labelMark==="required",rules:E.rules,"blame-handler":O},{label:r.withCtx(()=>[r.renderSlot(E.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:A})=>[r.createVNode(ct,{"append-icon":E.appendIcon,focused:r.unref(a),invalid:A,"prepend-icon":E.prependIcon,"show-valid-border":E.showValidBorder,class:"cursor-text"},{prepend:r.withCtx(()=>[r.renderSlot(E.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(E.$slots,"append",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([{"mr-32":E.showSteppers},"flex items-center justify-center"])},[E.appendText?(r.openBlock(),r.createElementBlock("div",JB,r.toDisplayString(E.appendText),1)):r.createCommentVNode("",!0),E.appendIcon?(r.openBlock(),r.createBlock(be,{key:1,color:o.value?"#C7C7CC":"#1C1C1E",name:E.appendIcon,size:"md"},null,8,["color","name"])):r.createCommentVNode("",!0)],2)],!0),E.showSteppers?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-stepper-field__stepper__container",r.unref(a)?"right-[6px]":"right-[7px]"])},[r.createElementVNode("button",{disabled:o.value||x.value,class:"fm-stepper-field__stepper__item",tabindex:"0",type:"button",onBlur:T[2]||(T[2]=(...M)=>r.unref(s)&&r.unref(s)(...M)),onFocus:T[3]||(T[3]=(...M)=>r.unref(l)&&r.unref(l)(...M)),onMousedown:T[4]||(T[4]=()=>m(E.step))},[r.createVNode(be,{color:o.value||x.value?"#C7C7CC":"#1C1C1E",name:"expand_less",size:"md"},null,8,["color"])],40,YB),r.createElementVNode("button",{disabled:o.value||C.value,class:"fm-stepper-field__stepper__item",tabindex:"1",type:"button",onBlur:T[5]||(T[5]=(...M)=>r.unref(s)&&r.unref(s)(...M)),onFocus:T[6]||(T[6]=(...M)=>r.unref(l)&&r.unref(l)(...M)),onMousedown:T[7]||(T[7]=()=>m(-E.step))},[r.createVNode(be,{color:o.value||C.value?"#C7C7CC":"#1C1C1E",name:"expand_more",size:"md"},null,8,["color"])],40,ZB)],2)):r.createCommentVNode("",!0)]),default:r.withCtx(()=>[r.createElementVNode("input",{ref_key:"inputEl",ref:c,disabled:o.value,inputMode:E.inputmode,placeholder:E.placeholder,readOnly:E.readonly,value:k.value,class:"fm-stepper-field--input outline-none",type:"text",onBlur:T[0]||(T[0]=(...M)=>r.unref(s)&&r.unref(s)(...M)),onFocus:T[1]||(T[1]=(...M)=>r.unref(l)&&r.unref(l)(...M)),onInput:y,onKeydown:v},null,40,KB)]),_:2},1032,["append-icon","focused","invalid","prepend-icon","show-valid-border"])]),"helper-text":r.withCtx(()=>[r.renderSlot(E.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-62601f37"]]),eP=["disabled","maxlength","minlength","placeholder","readOnly","value"],tP=Ie(r.defineComponent({__name:"FmTextarea",props:{modelValue:{default:""},placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},helperText:{default:""},helperState:{default:"none"},showWordCount:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(tt,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Te(e,"modelValue"),{isFocused:a,focus:s,blur:l}=ka(),c=p=>{i.value=p.target.value},u=r.ref(null);Vm(u,r.toRef(()=>e.autofocus));const h=()=>{var p;(p=u.value)==null||p.focus()};return(p,m)=>(r.openBlock(),r.createBlock(Rt,{modelValue:r.unref(i),"onUpdate:modelValue":m[2]||(m[2]=b=>r.isRef(i)?i.value=b:null),disabled:o.value,focused:r.unref(a),"helper-state":p.helperState,"helper-text":p.helperText,info:p.labelInfo,label:p.label,optional:p.labelMark==="optional",required:p.labelMark==="required",rules:p.rules,"blame-handler":h},r.createSlots({label:r.withCtx(()=>[r.renderSlot(p.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:b})=>[r.createElementVNode("div",{class:r.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":r.unref(a),"fm-textarea__container--invalid":!!r.unref(i)&&b,"fm-textarea__container--valid":p.showValidBorder&&p.showSuccess&&!!r.unref(i)&&!b,"fm-textarea__container--disabled":o.value})},[r.createElementVNode("textarea",{ref_key:"inputEl",ref:u,class:r.normalizeClass({"fm-textarea--input fm-typo-en-body-lg-400":!0,"fm-color-typo-primary":!o.value,"fm-color-typo-disabled":o.value,"outline-none":!0}),disabled:o.value,maxlength:p.maxLength,minlength:p.minLength,placeholder:p.placeholder,readOnly:p.readonly,value:r.unref(i),onBlur:m[0]||(m[0]=(...y)=>r.unref(l)&&r.unref(l)(...y)),onFocus:m[1]||(m[1]=(...y)=>r.unref(s)&&r.unref(s)(...y)),onInput:c},null,42,eP)],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(p.$slots,"helper-text",{},void 0,!0)]),_:2},[p.showWordCount?{name:"helper-append",fn:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([o.value?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-en-body-sm-400"])},r.toDisplayString(p.maxLength?`${r.unref(i).length} / ${p.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-8bc4f92e"]]),nP={class:"flex gap-8"},oP={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300 w-[220px]"},rP={class:"flex flex-col gap-16 items-center justify-center w-full pb-16"},iP={class:"fm-typo-en-body-lg-600 text-left w-full"},aP={class:"fm-typo-en-body-lg-600 text-left w-full"},sP={class:"flex gap-8 items-center justify-end"},lP=r.defineComponent({__name:"FmTimeRangePicker",props:{modelValue:{},disableTimeCheck:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},placeholder:{default:"HH:MM"},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(tt,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Te(e,"modelValue"),a=r.ref(null),s=r.ref(null),l=r.computed(()=>{const v=Array.isArray(i.value);return!i.value||!v||v&&i.value.every(k=>!b(k))?null:i.value.map(k=>{const{hours:x,minutes:C,period:P}=ln(k);return`${xn(x)}:${xn(C)} ${P}`}).join(" - ")});function c(){if(!a.value||!s.value){i.value=null;return}const v=a.value,k=s.value,x=v.period===Vn.PM&&k.period===Vn.AM,P=!(v.period===Vn.PM&&v.hours===12&&k.period===Vn.PM&&k.hours!==12)&&v.period===k.period&&(v.hours>k.hours||v.hours===k.hours&&v.minutes>k.minutes),O=!e.disableTimeCheck&&(x||P),E=Qu(a.value),T=Qu(s.value);i.value=O?[T,E]:[E,T],h()}r.onMounted(()=>{Array.isArray(i.value)&&i.value.every(v=>!!v)&&(a.value=ln(i.value[0]),s.value=ln(i.value[1]))}),r.watch(()=>i.value,v=>{const k=Array.isArray(v);v&&k&&v.every(x=>b(x))&&(a.value=ln(v[0]),s.value=ln(v[1]))});const u=r.ref();function h(){var v;(v=u.value)==null||v.hide()}const p=r.ref(!1);function m(v){var k,x,C,P;v?(a.value=ln(((C=i.value)==null?void 0:C[0])??"00:00"),s.value=ln(((P=i.value)==null?void 0:P[1])??"23:59")):(a.value=(k=i.value)!=null&&k[0]?ln(i.value[0]):null,s.value=(x=i.value)!=null&&x[1]?ln(i.value[1]):null),p.value=v}const b=v=>/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(v),y=r.computed(()=>e.disableTimeCheck?!1:Tt(a.value,s.value));return(v,k)=>(r.openBlock(),r.createBlock(Rt,{modelValue:r.unref(i),"onUpdate:modelValue":k[2]||(k[2]=x=>r.isRef(i)?i.value=x:null),disabled:o.value,focused:p.value,"helper-state":v.helperState,"helper-text":v.helperText,info:v.labelInfo,label:v.label,optional:v.labelMark==="optional",required:v.labelMark==="required",rules:v.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(v.$slots,"label")]),default:r.withCtx(({invalid:x})=>[r.createVNode(Io,{ref_key:"dropdownRef",ref:u,"show-popover":p.value,width:343,"z-index":e.zIndex,onPopoverChanged:m},{"popover-button":r.withCtx(()=>[v.$slots["trigger-button"]?r.renderSlot(v.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:x,dropdownShowed:p.value,showValidBorder:v.showValidBorder,shouldDisable:o.value}))):(r.openBlock(),r.createBlock(ct,{key:1,class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:p.value,invalid:x,"show-valid-border":v.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",nP,[r.createVNode(be,{outline:!p.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!l.value},"grow"])},r.toDisplayString(l.value??v.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",oP,[r.createElementVNode("div",rP,[r.createElementVNode("div",null,[r.createElementVNode("div",iP,r.toDisplayString(r.unref(_)("time.start")),1),r.createVNode(Tl,{"model-value":a.value??{hours:0,minutes:0,period:r.unref(Vn).AM},"onUpdate:modelValue":k[0]||(k[0]=C=>a.value=C)},null,8,["model-value"])]),r.createElementVNode("div",null,[r.createElementVNode("div",aP,r.toDisplayString(r.unref(_)("time.end")),1),r.createVNode(Tl,{"model-value":s.value??{hours:0,minutes:0,period:r.unref(Vn).AM},"onUpdate:modelValue":k[1]||(k[1]=C=>s.value=C)},null,8,["model-value"])])]),r.createElementVNode("div",sP,[r.createVNode(we,{label:r.unref(_)("actions.cancel"),size:"md",variant:"tertiary",onClick:h},null,8,["label"]),r.createVNode(we,{disabled:y.value,label:r.unref(_)("actions.apply"),size:"md",variant:"primary",onClick:c},null,8,["disabled","label"])])])]),_:2},1032,["show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(v.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),uf=Ie(r.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(t,{expose:e}){const n=r.ref(null);return e({element:n}),(o,i)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"element",ref:n,class:r.normalizeClass({"fm-list--separator":o.separator,activeClass:o.activeClass})},[r.renderSlot(o.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-266d01d7"]]),ff=Ie(r.defineComponent({__name:"FmListItem",props:{tag:{default:"div"},clickable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},label:{default:""},sublabel:{default:""}},setup(t){const e=t;function n(o){e.disabled&&o.stopImmediatePropagation()}return(o,i)=>{const a=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":o.disabled,"cursor-pointer hover:bg-fm-color-opacity-sm":o.clickable&&!o.disabled,"cursor-not-allowed":o.clickable&&o.disabled}),onClick:r.withModifiers(n,["prevent"])},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend",{},void 0,!0),r.renderSlot(o.$slots,"default",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-typo-en-body-lg-400 line-clamp-1 break-all ${o.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},r.toDisplayString(o.label),3),o.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-en-body-md-400 line-clamp-2 break-all ${o.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(o.sublabel),3)):r.createCommentVNode("",!0)])],!0),o.$slots.append?(r.openBlock(),r.createBlock(rr,{key:0})):r.createCommentVNode("",!0),r.renderSlot(o.$slots,"append",{},void 0,!0)]),_:3},8,["class"])),[[a,o.clickable&&!o.disabled]])}}}),[["__scopeId","data-v-90c2ba0a"]]);function dP(t){for(;t;){if(cP(t))return t;t=t.parentElement}return document.scrollingElement}function cP(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(t);return e.overflowY==="scroll"||e.overflowY==="auto"&&t.scrollHeight>t.clientHeight}class uP{constructor(e,n){ue(this,"onScroll");ue(this,"scrollParent");this.onScroll=n,this.scrollParent=dP(e)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const fP={class:"fm-menu__wrapper"},pP=Ie(r.defineComponent({__name:"FmMenuDeprecated",props:{showMenu:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["dropdown-changed"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref(!1),a=r.ref(null),s=r.ref(null),{floatingStyles:l}=Ci(a,s,{middleware:[wi(4),xi()],placement:o.placement,whileElementsMounted:ki});let c;const u=n;e({show:()=>{i.value||(i.value=!0,u("dropdown-changed",i.value))},hide:()=>{i.value&&(i.value=!1,u("dropdown-changed",i.value))}});const h=b=>{b.preventDefault(),b.stopPropagation(),!o.disabled&&(i.value=!i.value,u("dropdown-changed",i.value))},p=b=>{if(!i.value)return;const y=b.path||b.composedPath();for(const v of y)if(v==a.value||v==s.value)return;i.value=!1,u("dropdown-changed",i.value)},m=()=>{u("dropdown-changed",!1)};return r.watch(()=>o.showMenu,b=>i.value=b),r.onMounted(()=>{i.value=o.showMenu,window.addEventListener("click",p),c=new uP(a.value,m),c.bindScroll()}),r.onUnmounted(()=>{window.removeEventListener("click",p),c.unbindScroll()}),(b,y)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:a,class:"fm-menu",onClick:h},[r.renderSlot(b.$slots,"menu-button",{},void 0,!0)],512),i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"menuEl",ref:s,class:r.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":i.value}),style:r.normalizeStyle(r.unref(l))},[r.renderSlot(b.$slots,"menu-wrapper",{},()=>[r.createElementVNode("div",fP,[r.renderSlot(b.$slots,"menu-content",{},void 0,!0)])],!0)],6)):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5b19ece2"]]),hP={class:"fm-typo-en-body-md-600 mx-8 p-8 text-fm-color-typo-secondary"},mP=r.defineComponent({__name:"FmMenuHeader",props:{label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",hP,r.toDisplayString(e.label),1))}}),gP=t=>(r.pushScopeId("data-v-6d0e6490"),t=t(),r.popScopeId(),t),bP={class:"relative"},yP={class:"fm-progress-linear fm-typo-en-body-sm-400 h-4 overflow-hidden relative rounded-lg w-auto"},vP=gP(()=>r.createElementVNode("span",{class:"bg-fm-color-neutral-gray-100",style:{width:"100%"}},null,-1)),kP=Ie(r.defineComponent({__name:"FmLinearProgress",props:{color:{default:"primary"}},setup(t){const e=t,n=r.computed(()=>{const o=new Array,i={};return e.color?(hi(e.color)?i["background-color"]=e.color:o.push(`bg-fm-color-${e.color}`),{class:o.join(" "),style:i}):{class:o.join(" "),style:i}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",bP,[r.createElementVNode("div",yP,[vP,r.createElementVNode("span",{class:r.normalizeClass(["dash-1",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6),r.createElementVNode("span",{class:r.normalizeClass(["dash-2",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6)])]))}}),[["__scopeId","data-v-6d0e6490"]]),wP={key:0,class:"fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-4 text-right"},xP=Ie(r.defineComponent({__name:"FmProgressBar",props:{value:{default:void 0},max:{default:100},indeterminate:{type:Boolean,default:void 0},color:{default:"primary"},showLabel:{type:Boolean,default:!1},size:{default:"md"}},setup(t){const e=t,n=r.computed(()=>{const a=mi(e.value),s=mi(e.max)??100,l=e.indeterminate??a===null;return{value:l?null:Math.min(Math.max(0,a),s),max:s,indeterminate:l}}),o=r.computed(()=>{if(n.value.indeterminate||n.value.value===null)return 0;const a=n.value.value/n.value.max*100;return isNaN(a)?0:a}),i=r.computed(()=>{const a=new Array,s={};return e.color?(hi(e.color)?s["background-color"]=e.color:a.push(`bg-fm-color-${e.color}`),{class:a.join(" "),style:s}):{class:a.join(" "),style:s}});return(a,s)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{class:r.normalizeClass(["fm-progress-bar",`fm-progress-bar--${a.size}`,{"fm-progress-bar--indeterminate":n.value.indeterminate},"overflow-hidden relative rounded-lg w-full bg-fm-color-neutral-gray-100"])},[n.value.indeterminate?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("span",{class:r.normalizeClass(["dash-1",i.value.class]),style:r.normalizeStyle(i.value.style)},null,6),r.createElementVNode("span",{class:r.normalizeClass(["dash-2",i.value.class]),style:r.normalizeStyle(i.value.style)},null,6)],64)):(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-progress-bar__fill rounded-lg",i.value.class]),style:r.normalizeStyle({width:`${o.value}%`,...i.value.style})},null,6))],2),a.showLabel&&!n.value.indeterminate?(r.openBlock(),r.createElementBlock("div",wP,r.toDisplayString(Math.round(o.value))+"% ",1)):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-b8386e08"]]),SP={class:"flex fm-typo-en-title-md-600 items-center justify-between text-fm-color-typo-primary pb-16"},CP={key:0},AP={class:"h-full overflow-y-auto"},EP={key:0,class:"pt-24"},DP=Ie(r.defineComponent({__name:"FmSideSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},closeButton:{type:Boolean,default:!0},maxWidth:{default:void 0},zIndex:{default:void 0},isContainer:{default:"div"},isContainerProps:{default:()=>({})},closeIcon:{default:"close"},noOverlay:{type:Boolean,default:!1}},emits:["update:modelValue","on:clickedAway","on:close"],setup(t,{expose:e,emit:n}){const o=t,i=n,a=Te(o,"modelValue"),s=r.ref(),l=()=>{a.value=!1,i("on:close")};return e({containerRef:s}),(c,u)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:u[0]||(u[0]=h=>a.value=!0)},[r.renderSlot(c.$slots,"side-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(Ei,{key:0,"dismiss-away":o.dismissAway,"z-index":o.zIndex,transparent:o.noOverlay,onClose:l,onClickedAway:u[1]||(u[1]=h=>c.$emit("on:clickedAway"))},{default:r.withCtx(()=>[r.createVNode(r.Transition,{appear:"",name:"slide"},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(c.isContainer),r.mergeProps({ref_key:"containerRef",ref:s,class:[[!c.maxWidth&&"max-w-[400px]",o.noOverlay&&"shadow-md"],"fm-side-sheet xs:w-full"],style:{maxWidth:`${c.maxWidth}px`}},c.isContainerProps),{default:r.withCtx(()=>[r.createElementVNode("div",SP,[r.renderSlot(c.$slots,"side-sheet-header",{},()=>[c.header?(r.openBlock(),r.createElementBlock("div",CP,r.toDisplayString(c.header),1)):r.createCommentVNode("",!0)],!0),c.closeButton?(r.openBlock(),r.createBlock(be,{key:0,name:c.closeIcon,class:"cursor-pointer",size:"md",onClick:l},null,8,["name"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",AP,[r.renderSlot(c.$slots,"default",{},void 0,!0)]),c.$slots["side-sheet-footer"]?(r.openBlock(),r.createElementBlock("div",EP,[r.renderSlot(c.$slots,"side-sheet-footer",{},void 0,!0)])):r.createCommentVNode("",!0)]),_:3},16,["class","style"]))]),_:3})]),_:3},8,["dismiss-away","z-index","transparent"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-d5a939ad"]]),BP={class:"flex items-center"},PP={key:1,class:"flex items-center mx-12"},IP={key:0,class:"mt-8"},pb=Ie(r.defineComponent({__name:"FmSnackbar",props:{title:{type:String,default:void 0},description:{type:String,default:void 0},variant:{type:String,default:"info"},dismissable:{type:Boolean,default:!1},action:{type:String,default:void 0},color:{type:String,default:void 0},bgColor:{type:String,default:void 0},zIndex:{type:Number,default:1e3},spinner:{type:Boolean,default:!1}},emits:["onDismiss","onAction"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{switch(n.variant){case"info":return{icon:{name:"info",color:"system-info-300"},actionColor:"typo-info",bgColor:"system-info-100"};case"success":return{icon:{name:"check_circle",color:"system-success-300"},actionColor:"typo-success",bgColor:"system-success-100"};case"warning":return{icon:{name:"warning",color:"system-warning-300"},actionColor:"typo-warning",bgColor:"system-warning-100"};case"error":return{icon:{name:"error",color:"system-error-300"},actionColor:"typo-error",bgColor:"system-error-100"};case"neutral":return{actionColor:"primary",bgColor:"neutral-gray-100"};default:throw Error(`Unimplement snackbar variant ${n.variant}`)}}),a=r.computed(()=>n.title?{text:n.title,classes:"fm-typo-en-body-lg-600"}:{text:n.description,classes:""}),s=r.computed(()=>n.bgColor?hi(n.bgColor)?{style:{backgroundColor:n.bgColor}}:{class:`bg-fm-color-${n.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),l=r.computed(()=>n.color?hi(n.color)?{style:{color:n.color}}:{class:`text-fm-color-${n.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(c,u)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({style:{zIndex:t.zIndex},class:"fm-corner-radius-lg fm-shadow-light-400 fm-snackbar px-24 py-16"},s.value),[r.createElementVNode("div",BP,[i.value.icon?(r.openBlock(),r.createBlock(be,{key:0,color:n.color??i.value.icon.color,name:i.value.icon.name,class:"mr-12"},null,8,["color","name"])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(`${a.value.classes} grow ellipsis mr-16`)},r.toDisplayString(a.value.text),3),t.spinner?(r.openBlock(),r.createElementBlock("div",PP,[r.createVNode(be,{class:"animate-spin",name:"progress_activity"})])):r.createCommentVNode("",!0),n.dismissable?(r.openBlock(),r.createBlock(be,{key:2,class:"cursor-pointer",name:"close",style:{"{ flex":"none}"},onClick:u[0]||(u[0]=()=>o("onDismiss"))})):r.createCommentVNode("",!0)]),n.title&&n.description?(r.openBlock(),r.createElementBlock("div",IP,r.toDisplayString(n.description),1)):r.createCommentVNode("",!0),r.renderSlot(c.$slots,"actions",{},()=>[n.action?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:"mt-16 fm-typo-en-body-lg-600"},l.value),[r.createElementVNode("span",{class:"cursor-pointer",onClick:u[1]||(u[1]=()=>o("onAction"))},r.toDisplayString(n.action),1)],16)):r.createCommentVNode("",!0)],!0)],16))}}),[["__scopeId","data-v-65fce1f3"]]),OP={class:r.normalizeClass(["fm-step-description","text-fm-color-typo-secondary","fm-typo-en-body-md-400 line-clamp-1","mt-4"])},pf=r.defineComponent({__name:"FmStepHeader",props:{title:{type:String,required:!0},description:{type:String,default:void 0},disabled:{type:Boolean,default:!1},titleBold:{type:Boolean,default:!1}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([t.disabled?"text-fm-color-typo-disabled":"","flex flex-col"])},[r.renderSlot(e.$slots,"title",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([t.titleBold?"fm-typo-en-title-md-600":"fm-typo-en-body-md-400","fm-step-title line-clamp-2"])},r.toDisplayString(t.title),3)]),r.renderSlot(e.$slots,"description",{},()=>[r.createElementVNode("div",OP,r.toDisplayString(t.description),1)])],2))}}),NP=["data-title","data-description","data-disabled"],VP={class:"flex flex-col fm-step-container grow"},RP={class:"fm-step-container-content"},TP=Ie(r.defineComponent({__name:"FmStep",props:{title:{type:String,required:!0},description:{type:String,default:void 0},value:{type:Number,required:!0},complete:{type:Function,required:!0},error:{type:Function,default:void 0},disabled:{type:Function,default:void 0}},setup(t){const e=t,{currentStep:n,goToStep:o}=r.inject(om);function i(){a.value||o(e.value)}const a=r.computed(()=>e.disabled?e.disabled():!1),s=r.computed(()=>e.error?e.error():!1),l=r.computed(()=>n()===e.value),c=r.computed(()=>e.complete()),u=r.computed(()=>l.value||c.value||n()>e.value?"bg-fm-color-primary":"bg-fm-color-neutral-gray-300"),h=r.computed(()=>l.value?{className:"bg-fm-color-primary"}:s.value?{config:{name:"warning",color:"system-error-300"}}:a.value?{className:"border-2 border-fm-color-neutral-gray-200"}:c.value?{config:{name:"check_small",color:"primary"},className:"border-2 border-fm-color-primary"}:{className:"border-2 border-fm-color-neutral-gray-300"});return(p,m)=>{const b=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",{"data-title":t.title,"data-description":t.description,"data-disabled":a.value,class:r.normalizeClass(`fm-step gap-4 grow ${a.value?"cursor-not-allowed":"cursor-pointer"}`)},[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-step-indicator ${u.value}`)},null,2)]),r.createElementVNode("div",VP,[r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"flex gap-12",onClick:r.withModifiers(i,["stop"])},[r.createElementVNode("div",{class:r.normalizeClass(["flex fm-step-container-icon h-[24px] items-center justify-center min-h-[24px] min-w-[24px] relative rounded-full w-[24px]",h.value.className])},[h.value.config?(r.openBlock(),r.createBlock(be,{key:0,name:h.value.config.name,color:h.value.config.color,outline:"",class:"absolute"},null,8,["name","color"])):r.createCommentVNode("",!0)],2),r.createVNode(pf,{title:t.title,description:t.description,disabled:a.value,class:"grow"},null,8,["title","description","disabled"])])),[[b,!a.value]]),r.createElementVNode("div",RP,[r.renderSlot(p.$slots,"default",{},void 0,!0)])])],10,NP)}}}),[["__scopeId","data-v-113e7095"]]),FP={class:"hidden items-center xs:flex"},MP={class:"flex gap-2 items-start justify-end mb-24 mt-40 p-0 self-stretch"},LP=r.defineComponent({__name:"FmStepper",props:{modelValue:{type:Number,required:!0},orientation:{type:String,default:"horizontal"}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e,i=h=>{o("update:model-value",h)};r.provide(om,{currentStep:()=>n.modelValue,goToStep:i});const a=r.ref(),s=r.ref([]),l=r.computed(()=>s.value[n.modelValue-1]),c=r.computed(()=>`${n.modelValue} of ${s.value.length}`),u=()=>{var p;const h=Array.from(((p=a.value)==null?void 0:p.querySelectorAll(":scope > .fm-step"))??[]);s.value=h.map(m=>({title:m.dataset.title??"",description:m.dataset.description,disabled:m.dataset.disabled=="true"}))};return r.onMounted(()=>{u()}),(h,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(`fm-stepper fm-stepper__${t.orientation}`)},[r.createElementVNode("div",{ref_key:"stepperRef",ref:a,class:r.normalizeClass(`flex mx-24 mt-12 mb-24 xs:hidden ${t.orientation==="vertical"?"flex-col":""}`)},[r.renderSlot(h.$slots,"default")],2),r.createElementVNode("div",FP,[r.createVNode(Rr,{"current-step":t.modelValue,"total-steps":s.value.length,class:"mr-12"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(c.value),1)]),_:1},8,["current-step","total-steps"]),l.value?(r.openBlock(),r.createBlock(pf,{key:0,class:"grow","title-bold":"",title:l.value.title,description:l.value.description,disabled:l.value.disabled},null,8,["title","description","disabled"])):r.createCommentVNode("",!0)]),h.$slots.contents?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`flex-col mx-24 mt-12 mb-24 ${t.orientation==="vertical"?"w-2/3":""}`)},[r.renderSlot(h.$slots,"contents"),r.createElementVNode("div",MP,[r.renderSlot(h.$slots,"actions")])],2)):r.createCommentVNode("",!0)],2))}});let zP=0;function _P(){return zP++}const HP=t=>(r.pushScopeId("data-v-dfbdb871"),t=t(),r.popScopeId(),t),UP=["disabled"],WP={key:1,class:"ml-4"},jP={key:0,class:"ml-4"},GP={key:0,class:r.normalizeClass(["block","absolute bottom-0 left-0","h-0.5 w-full"])},QP=[HP(()=>r.createElementVNode("span",{class:r.normalizeClass(["block","bg-fm-color-primary rounded-xxxl","w-full h-full"])},null,-1))],hb=Ie(r.defineComponent({__name:"FmTab",props:{modelValue:{default:null},label:{default:""},vertical:{type:Boolean,default:!1},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:()=>_P()},children:{default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.ref(!1),o=t,i=e,a=r.ref(!1);function s(p){n.value=p}const l=()=>{o.disabled||o.children.length>0||i("update:modelValue",o.value)},c=p=>{o.children.length!==0&&(a.value=p)},u=r.computed(()=>o.children.length>0?o.children.some(p=>p.value===o.modelValue):o.modelValue===o.value),h=p=>{a.value=!1,i("update:modelValue",p)};return(p,m)=>{const b=r.resolveDirective("wave");return r.openBlock(),r.createBlock(so,{class:r.normalizeClass([{"w-full":p.vertical},"flex-shrink-0 max-w-[360px] min-w-[90px] rounded-sm"]),disabled:p.children.length===0,placement:p.vertical?"right-start":"bottom-start","show-menu":a.value,onMenuChanged:c},{"menu-button":r.withCtx(()=>[r.createElementVNode("button",{class:r.normalizeClass([p.vertical?["px-16 py-8"]:["px-8 pt-8"],p.vertical?["max-w-[360px] w-full"]:["min-w-[90px] max-w-[360px]"]]),disabled:p.disabled,type:"button",onClick:l,onMousedown:m[0]||(m[0]=()=>s(!0)),onMouseleave:m[1]||(m[1]=()=>s(!1)),onMouseup:m[2]||(m[2]=()=>s(!1))},[r.createElementVNode("span",{class:r.normalizeClass(["flex items-center",p.vertical?["justify-start"]:["justify-center"],"relative"])},[r.createElementVNode("span",{class:r.normalizeClass([[p.vertical&&"w-full"],"block"])},[r.createElementVNode("span",{class:r.normalizeClass(["flex items-center",!p.vertical&&"pb-1.5",p.vertical&&"w-full"])},[r.withDirectives((r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["rounded-xxxl",!p.vertical&&"hover:bg-fm-color-opacity-sm group",p.vertical&&"w-full"]),type:"button"},[r.createElementVNode("button",{class:r.normalizeClass(["relative","flex items-center","px-8",p.vertical?"py-1":"py-1.5 space-x-8",p.vertical&&"w-full"]),type:"button"},[r.renderSlot(p.$slots,"prepend",{},void 0,!0),p.icon?(r.openBlock(),r.createBlock(be,{key:0,color:p.disabled?"neutral-gray-200":u.value?"primary":"neutral-black",name:p.icon,outline:!n.value&&!u.value,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-lg-400",p.disabled?"text-fm-color-typo-disabled":u.value?"text-fm-color-primary":"text-fm-color-typo-secondary"])},r.toDisplayString(p.label),3),p.badge&&p.vertical?(r.openBlock(),r.createElementBlock("span",WP,[r.createVNode(or,{value:p.badge,inline:"",variant:"numeric"},null,8,["value"])])):r.createCommentVNode("",!0),p.children.length>0?(r.openBlock(),r.createBlock(be,{key:2,class:r.normalizeClass(["text-fm-color-neutral-gray-400",p.vertical&&"block ml-auto"]),name:a.value?"expand_less":"expand_more",size:"md"},null,8,["class","name"])):r.createCommentVNode("",!0),r.renderSlot(p.$slots,"append",{},void 0,!0)],2)],2)),[[b,p.vertical?!1:{color:"rgba(28, 28, 30, 0.16)"}]]),p.badge&&!p.vertical?(r.openBlock(),r.createElementBlock("span",jP,[r.createVNode(or,{value:p.badge,inline:"",variant:"numeric"},null,8,["value"])])):r.createCommentVNode("",!0)],2),u.value&&!p.vertical?(r.openBlock(),r.createElementBlock("span",GP,QP)):r.createCommentVNode("",!0)],2)],2)],42,UP)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.children,y=>(r.openBlock(),r.createBlock(Dt,{key:y.value,disabled:y.disabled,icon:y.icon,label:y.label,"model-value":o.modelValue===y.value,onClick:v=>h(y.value)},{append:r.withCtx(()=>[y.badge?(r.openBlock(),r.createBlock(or,{key:0,value:y.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["disabled","icon","label","model-value","onClick"]))),128))]),_:3},8,["class","disabled","placement","show-menu"])}}}),[["__scopeId","data-v-dfbdb871"]]),XP={class:"flex gap-8 h-48 items-center justify-end transition-all w-full xs:flex-wrap-reverse"},qP={class:"flex flex-1 gap-8"},KP=r.defineComponent({__name:"FmTableToolbar",props:{searchModel:{default:""},searchable:{type:Boolean},filterable:{type:Boolean},chips:{default:()=>[]},actions:{default:()=>[]},zIndexForBottomSheet:{default:void 0}},emits:["update:search-model","click:remove-chip"],setup(t){const e=t,{breakpoints:n}=nr(),o=r.computed(()=>{const l=[];e.searchable&&l.push({label:"Search",icon:"search",key:"search"}),e.filterable&&l.push({label:"Filter",icon:"filter_alt",key:"filter"});const c=l.concat(e.actions);if(n.value.xs){const[y,v,k,...x]=c;return x.length===0?{actionButtons:[y,v,k].filter(C=>C),collapse:x}:{actionButtons:[y,v].filter(C=>C),collapse:[k,...x]}}const[u,h,p,m,...b]=c;return b.length===0?{actionButtons:[u,h,p,m].filter(y=>y),collapse:b}:{actionButtons:[u,h,p].filter(y=>y),collapse:[m,...b]}}),i=r.ref(!1);function a(l){if(n.value.xs){l.stopPropagation(),i.value=!0;return}}const s=Te(e,"searchModel");return(l,c)=>(r.openBlock(),r.createElementBlock("div",XP,[r.renderSlot(l.$slots,"chips",{},()=>[l.chips.length?(r.openBlock(),r.createBlock(Xc,{key:0,class:"min-w-0 mr-auto",items:l.chips,removable:"",onChipClosed:c[0]||(c[0]=u=>l.$emit("click:remove-chip",u))},null,8,["items"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",qP,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.actionButtons,u=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:u.key},[u.key==="search"?r.renderSlot(l.$slots,"action-search",{key:0},()=>[r.createVNode(jl,{"model-value":r.unref(s),"onUpdate:modelValue":c[1]||(c[1]=h=>r.isRef(s)?s.value=h:null),class:"w-full",collapsible:""},null,8,["model-value"])]):r.renderSlot(l.$slots,`action-${u.key}`,{key:1},()=>[r.createVNode(we,{"prepend-icon":u.icon,variant:"tertiary",onClick:h=>l.$emit(`click:action-${u.key}`)},null,8,["prepend-icon","onClick"])])],64))),128)),o.value.collapse.length?(r.openBlock(),r.createBlock(so,{key:0},{"menu-button":r.withCtx(()=>[r.createVNode(we,{"prepend-icon":"more_vert",variant:"tertiary",onClick:a})]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,u=>(r.openBlock(),r.createBlock(Dt,{key:u.key,label:u.label,icon:u.icon,onClick:h=>{l.$emit(`click:action-${u.key}`),i.value=!1}},null,8,["label","icon","onClick"]))),128))]),_:1})):r.createCommentVNode("",!0),l.$slots.append?r.renderSlot(l.$slots,"append",{key:1}):r.createCommentVNode("",!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(qc,{modelValue:i.value,"onUpdate:modelValue":c[2]||(c[2]=u=>i.value=u),"dismiss-away":"","z-index":e.zIndexForBottomSheet},{default:r.withCtx(()=>[r.createVNode(uf,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,u=>(r.openBlock(),r.createBlock(ff,{key:u.key,label:u.label,class:"hover:bg-fm-color-neutral-gray-100",onClick:h=>{l.$emit(`click:action-${u.key}`),i.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["modelValue","z-index"])]))]))}});var JP={env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_69dde61d-c16e-4bc5-8640-8967b257d98f",npm_package_exports___require:"./dist/feedmepos-ui-library.umd.cjs",npm_package_dependencies_prettier:"^3.2.5",npm_package_devDependencies__types_node:"^18.19.21",DOTNET_NOLOGO:"1",npm_package_devDependencies__originjs_vite_plugin_federation:"^1.3.5",USER:"runner",npm_package_dependencies__rollup_plugin_commonjs:"^26.0.1",npm_config_user_agent:"pnpm/9.15.9 npm/? node/v20.20.2 linux x64",CI:"true",npm_package_dependencies_v_wave:"^1.5.1",npm_package_dependencies_vue:"^3.4.21",USE_BAZEL_FALLBACK_VERSION:"silent:",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_69dde61d-c16e-4bc5-8640-8967b257d98f",PIPX_HOME:"/opt/pipx",npm_package_dependencies__types_lodash:"^4.17.7",npm_package_devDependencies_tsc_alias:"^1.8.8",npm_package_devDependencies_vite:"^5.1.4",npm_package_peerDependencies_tailwindcss:"^3.4.1",npm_node_execpath:"/opt/hostedtoolcache/node/20.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_files_0:"dist",npm_package_scripts_build_lib:"vite build --mode library",npm_package_dependencies_vue_virtual_scroller:"2.0.0-beta.8",HOME:"/home/runner",npm_package_exports___meta_types:"./dist/meta.d.ts",npm_package_dependencies_chart_js:"^4.4.2",npm_package_devDependencies_sass:"^1.71.1",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_devDependencies_eslint_config_prettier:"^9.1.0",npm_package_devDependencies_vite_plugin_static_copy:"^0.17.1",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"feedmepos",npm_package_scripts_build_components:'run-p type-check "build-lib {@}" --',GRADLE_HOME:"/usr/share/gradle-9.5.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/29.0.14206865",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",GITHUB_RETENTION_DAYS:"90",npm_package_scripts_type_check:"vue-tsc --noEmit -p tsconfig.app.json --composite false",npm_package_dependencies__tanstack_vue_virtual:"^3.13.0",npm_package_devDependencies_npm_run_all2:"^6.1.2",npm_package_peerDependencies_vue:"^3.4.21",GITHUB_REPOSITORY_OWNER_ID:"54831515",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-Linux",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_build_federation:"vite build --mode federation && cp -r ./temp/assets ./dist/federation && rm -rf ./temp",npm_package_devDependencies_vue_component_meta:"^2.0.13",SYSTEMD_EXEC_PID:"1850",ACTIONS_ORCHESTRATION_ID:"4e068db5-2ddf-4717-b5b4-19491e961d93.deploy.__default",npm_package_dependencies_dayjs:"^1.11.10",npm_package_devDependencies__tsconfig_node18:"^18.2.2",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_devDependencies_tailwindcss:"^3.4.1",npm_package_devDependencies_typescript:"~5.2.2",JAVA_HOME_25_X64:"/usr/lib/jvm/temurin-25-jdk-amd64",NVM_DIR:"/home/runner/.nvm",npm_package_homepage:"ui.feedme.ai",npm_package_devDependencies_vue_tsc:"^1.8.27",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20260513.135.3",npm_package_scripts_dev:"vite --port 5273",LOGNAME:"runner",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",STORE_PATH:"/home/runner/setup-pnpm/node_modules/.bin/store/v3",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_type:"module",npm_package_dependencies__vueuse_core:"^10.9.0",npm_package_devDependencies__vue_tsconfig:"^0.4.0",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.12/x64",JOURNAL_STREAM:"9:12618",GITHUB_WORKFLOW:"Publish Vue",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_module:"./dist/feedmepos-ui-library.js",npm_package_devDependencies_autoprefixer:"^10.4.17",RUNNER_DEBUG:"1",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure",GOROOT_1_24_X64:"/opt/hostedtoolcache/go/1.24.13/x64",npm_package_scripts_build_tailwind_plugin:"vite build --mode tailwind-plugin",npm_package_scripts_lint:"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",npm_package_dependencies_fuzzy:"^0.1.3",npm_package_devDependencies__types_uuid:"^10.0.0",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GOROOT_1_25_X64:"/opt/hostedtoolcache/go/1.25.10/x64",GITHUB_RUN_ID:"25983612088",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"4e3488f15b456ae22ed7333c0236e6697742cec5",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",npm_package_exports___import:"./dist/feedmepos-ui-library.js",npm_package_devDependencies__vitejs_plugin_vue:"^5.0.4",GITHUB_WORKFLOW_REF:"feedmepos/ui-library/.github/workflows/publish-vue.yml@refs/heads/fix/fm-table-page-count",GITHUB_ACTION_REPOSITORY:"",ENABLE_RUNNER_TRACING:"true",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.20.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_8d5d9164-91e1-4d4b-a84f-8cfc3b1f1713",INVOCATION_ID:"ce152af1f8de4f03bfdbcc90f5adaf47",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.20.2/x64/bin/node",npm_package_name:"@feedmepos/ui-library",npm_package_repository_type:"git",GITHUB_ACTION:"__run_4",GITHUB_RUN_NUMBER:"346",GITHUB_TRIGGERING_ACTOR:"heiseshandian",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies_vue_country_flag_next:"^2.3.2",npm_config_frozen_lockfile:"",npm_package_exports___styles_css:"./dist/style.css",npm_package_scripts_build_tailwind_styling:"vite build --mode tailwind-styling",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_scripts_generate_component_meta:"node ./scripts/generate-component-meta.js",npm_package_devDependencies__vue_eslint_config_typescript:"^12.0.0",npm_package_devDependencies_eslint:"^8.57.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 1000069326",XDG_CONFIG_HOME:"/home/runner/.config",GITHUB_REF_NAME:"fix/fm-table-page-count",GITHUB_REPOSITORY:"feedmepos/ui-library",npm_package_main:"./dist/feedmepos-ui-library.umd.cjs",npm_package_scripts_build_types:"vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false",npm_package_devDependencies__types_debounce:"^1.2.4",npm_lifecycle_script:"vite build --mode library",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_exports___tailwind_plugin:"./dist/tailwind-plugin.js",npm_package_devDependencies__vitejs_plugin_vue_jsx:"^3.1.0",SHELL:"/bin/bash",GITHUB_REPOSITORY_ID:"677015340",GITHUB_ACTIONS:"true",NODE_PATH:"/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/run-p/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.10.6",npm_package_repository_url:"git+https://github.com/feedmepos/ui-library.git",npm_package_dependencies__tanstack_vue_table:"^8.13.2",npm_package_dependencies_vuedraggable:"^4.1.0",npm_package_devDependencies__rushstack_eslint_patch:"^1.7.2",npm_package_devDependencies_eslint_plugin_unused_imports:"^4.3.0",npm_lifecycle_event:"build-lib",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build",npm_package_dependencies_uuid:"^10.0.0",GITHUB_WORKSPACE:"/home/runner/work/ui-library/ui-library",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",npm_package_dependencies_lodash:"^4.17.21",GITHUB_SHA:"4e3488f15b456ae22ed7333c0236e6697742cec5",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies_vue_router:"^4.3.0",npm_package_devDependencies_vite_plugin_top_level_await:"^1.4.1",GITHUB_REF:"refs/heads/fix/fm-table-page-count",GITHUB_ACTOR:"heiseshandian",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_pack:"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../",npm_package_exports___tailwind_styling:"./dist/tailwind-styling.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_69dde61d-c16e-4bc5-8640-8967b257d98f",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/ui-library/ui-library/packages/vue",GITHUB_ACTOR_ID:"7780463",RUNNER_WORKSPACE:"/home/runner/work/ui-library",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_69dde61d-c16e-4bc5-8640-8967b257d98f",npm_package_exports___types:"./dist/index.d.ts",npm_package_devDependencies__types_chart_js:"^2.9.41",npm_config_recursive:"true",EDGEWEBDRIVER:"/usr/local/share/edge_driver",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_devDependencies_eslint_plugin_vue:"^9.22.0",npm_package_devDependencies_postcss:"^8.4.35",npm_package_peerDependencies_vite:"^5.1.4",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.3.13750724",SGX_AESM_ADDR:"1",PSModulePath:"/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules:/usr/share/az_14.6.0",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_scripts_deploy:"pnpm run build:lib && pnpm publish --no-git-checks .",npm_package_dependencies__floating_ui_vue:"^1.0.6",npm_package_dependencies_debounce:"^2.0.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",npm_package_bugs:"https://feedmepos.atlassian.net/browse/CT-3",npm_package_scripts_register_components:"node ./scripts/register-components.js && pnpm lint",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_69dde61d-c16e-4bc5-8640-8967b257d98f",INIT_CWD:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_scripts_copy_changelog:"cp ./CHANGELOG.md ./dist/CHANGELOG.md",npm_package_dependencies_chartjs_plugin_datalabels:"^2.2.0",npm_package_dependencies_libphonenumber_js:"^1.10.57",NODE_ENV:"production"}};function pr(t,e){return typeof t=="function"?t(e):t}function Sn(t,e){return n=>{e.setState(o=>({...o,[t]:pr(n,o[t])}))}}function Ql(t){return t instanceof Function}function YP(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function ZP(t,e){const n=[],o=i=>{i.forEach(a=>{n.push(a);const s=e(a);s!=null&&s.length&&o(s)})};return o(t),n}function xe(t,e,n){let o=[],i;return a=>{let s;n.key&&n.debug&&(s=Date.now());const l=t(a);if(!(l.length!==o.length||l.some((h,p)=>o[p]!==h)))return i;o=l;let u;if(n.key&&n.debug&&(u=Date.now()),i=e(...l),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const h=Math.round((Date.now()-s)*100)/100,p=Math.round((Date.now()-u)*100)/100,m=p/16,b=(y,v)=>{for(y=String(y);y.length<v;)y=" "+y;return y};console.info(`%c⏱ ${b(p,5)} /${b(h,5)} ms`,`
115
115
  font-size: .6rem;
116
116
  font-weight: bold;
117
117
  color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function Se(t,e,n,o){return{debug:()=>{var i;return(i=t==null?void 0:t.debugAll)!=null?i:t[e]},key:JP.env.NODE_ENV==="development",onChange:o}}function $P(t,e,n,o){const i=()=>{var s;return(s=a.getValue())!=null?s:t.options.renderFallbackValue},a={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(o),renderValue:i,getContext:xe(()=>[t,n,e,a],(s,l,c,u)=>({table:s,column:l,row:c,cell:u,getValue:u.getValue,renderValue:u.renderValue}),Se(t.options,"debugCells"))};return t._features.forEach(s=>{s.createCell==null||s.createCell(a,n,e,t)},{}),a}function eI(t,e,n,o){var i,a;const l={...t._getDefaultColumnDef(),...e},c=l.accessorKey;let u=(i=(a=l.id)!=null?a:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?i:typeof l.header=="string"?l.header:void 0,h;if(l.accessorFn?h=l.accessorFn:c&&(c.includes(".")?h=m=>{let b=m;for(const v of c.split(".")){var y;b=(y=b)==null?void 0:y[v]}return b}:h=m=>m[l.accessorKey]),!u)throw new Error;let p={id:`${String(u)}`,accessorFn:h,parent:o,depth:n,columnDef:l,columns:[],getFlatColumns:xe(()=>[!0],()=>{var m;return[p,...(m=p.columns)==null?void 0:m.flatMap(b=>b.getFlatColumns())]},Se(t.options,"debugColumns")),getLeafColumns:xe(()=>[t._getOrderColumnsFn()],m=>{var b;if((b=p.columns)!=null&&b.length){let y=p.columns.flatMap(v=>v.getLeafColumns());return m(y)}return[p]},Se(t.options,"debugColumns"))};for(const m of t._features)m.createColumn==null||m.createColumn(p,t);return p}const Gt="debugHeaders";function mb(t,e,n){var o;let a={id:(o=n.id)!=null?o:e.id,column:e,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],l=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(l),s.push(c)};return l(a),s},getContext:()=>({table:t,header:a,column:e})};return t._features.forEach(s=>{s.createHeader==null||s.createHeader(a,t)}),a}const tI={createTable:t=>{t.getHeaderGroups=xe(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>{var a,s;const l=(a=o==null?void 0:o.map(p=>n.find(m=>m.id===p)).filter(Boolean))!=null?a:[],c=(s=i==null?void 0:i.map(p=>n.find(m=>m.id===p)).filter(Boolean))!=null?s:[],u=n.filter(p=>!(o!=null&&o.includes(p.id))&&!(i!=null&&i.includes(p.id)));return Xl(e,[...l,...u,...c],t)},Se(t.options,Gt)),t.getCenterHeaderGroups=xe(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>(n=n.filter(a=>!(o!=null&&o.includes(a.id))&&!(i!=null&&i.includes(a.id))),Xl(e,n,t,"center")),Se(t.options,Gt)),t.getLeftHeaderGroups=xe(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(e,n,o)=>{var i;const a=(i=o==null?void 0:o.map(s=>n.find(l=>l.id===s)).filter(Boolean))!=null?i:[];return Xl(e,a,t,"left")},Se(t.options,Gt)),t.getRightHeaderGroups=xe(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(e,n,o)=>{var i;const a=(i=o==null?void 0:o.map(s=>n.find(l=>l.id===s)).filter(Boolean))!=null?i:[];return Xl(e,a,t,"right")},Se(t.options,Gt)),t.getFooterGroups=xe(()=>[t.getHeaderGroups()],e=>[...e].reverse(),Se(t.options,Gt)),t.getLeftFooterGroups=xe(()=>[t.getLeftHeaderGroups()],e=>[...e].reverse(),Se(t.options,Gt)),t.getCenterFooterGroups=xe(()=>[t.getCenterHeaderGroups()],e=>[...e].reverse(),Se(t.options,Gt)),t.getRightFooterGroups=xe(()=>[t.getRightHeaderGroups()],e=>[...e].reverse(),Se(t.options,Gt)),t.getFlatHeaders=xe(()=>[t.getHeaderGroups()],e=>e.map(n=>n.headers).flat(),Se(t.options,Gt)),t.getLeftFlatHeaders=xe(()=>[t.getLeftHeaderGroups()],e=>e.map(n=>n.headers).flat(),Se(t.options,Gt)),t.getCenterFlatHeaders=xe(()=>[t.getCenterHeaderGroups()],e=>e.map(n=>n.headers).flat(),Se(t.options,Gt)),t.getRightFlatHeaders=xe(()=>[t.getRightHeaderGroups()],e=>e.map(n=>n.headers).flat(),Se(t.options,Gt)),t.getCenterLeafHeaders=xe(()=>[t.getCenterFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),Se(t.options,Gt)),t.getLeftLeafHeaders=xe(()=>[t.getLeftFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),Se(t.options,Gt)),t.getRightLeafHeaders=xe(()=>[t.getRightFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),Se(t.options,Gt)),t.getLeafHeaders=xe(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(e,n,o)=>{var i,a,s,l,c,u;return[...(i=(a=e[0])==null?void 0:a.headers)!=null?i:[],...(s=(l=n[0])==null?void 0:l.headers)!=null?s:[],...(c=(u=o[0])==null?void 0:u.headers)!=null?c:[]].map(h=>h.getLeafHeaders()).flat()},Se(t.options,Gt))}};function Xl(t,e,n,o){var i,a;let s=0;const l=function(m,b){b===void 0&&(b=1),s=Math.max(s,b),m.filter(y=>y.getIsVisible()).forEach(y=>{var v;(v=y.columns)!=null&&v.length&&l(y.columns,b+1)},0)};l(t);let c=[];const u=(m,b)=>{const y={depth:b,id:[o,`${b}`].filter(Boolean).join("_"),headers:[]},v=[];m.forEach(k=>{const x=[...v].reverse()[0],C=k.column.depth===y.depth;let P,O=!1;if(C&&k.column.parent?P=k.column.parent:(P=k.column,O=!0),x&&(x==null?void 0:x.column)===P)x.subHeaders.push(k);else{const E=mb(n,P,{id:[o,b,P.id,k==null?void 0:k.id].filter(Boolean).join("_"),isPlaceholder:O,placeholderId:O?`${v.filter(T=>T.column===P).length}`:void 0,depth:b,index:v.length});E.subHeaders.push(k),v.push(E)}y.headers.push(k),k.headerGroup=y}),c.push(y),b>0&&u(v,b-1)},h=e.map((m,b)=>mb(n,m,{depth:s,index:b}));u(h,s-1),c.reverse();const p=m=>m.filter(y=>y.column.getIsVisible()).map(y=>{let v=0,k=0,x=[0];y.subHeaders&&y.subHeaders.length?(x=[],p(y.subHeaders).forEach(P=>{let{colSpan:O,rowSpan:E}=P;v+=O,x.push(E)})):v=1;const C=Math.min(...x);return k=k+C,y.colSpan=v,y.rowSpan=k,{colSpan:v,rowSpan:k}});return p((i=(a=c[0])==null?void 0:a.headers)!=null?i:[]),c}const hf=(t,e,n,o,i,a,s)=>{let l={id:e,index:o,original:n,depth:i,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];const u=t.getColumn(c);if(u!=null&&u.accessorFn)return l._valuesCache[c]=u.accessorFn(l.original,o),l._valuesCache[c]},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];const u=t.getColumn(c);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=u.columnDef.getUniqueValues(l.original,o),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},renderValue:c=>{var u;return(u=l.getValue(c))!=null?u:t.options.renderFallbackValue},subRows:[],getLeafRows:()=>ZP(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?t.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],u=l;for(;;){const h=u.getParentRow();if(!h)break;c.push(h),u=h}return c.reverse()},getAllCells:xe(()=>[t.getAllLeafColumns()],c=>c.map(u=>$P(t,l,u,u.id)),Se(t.options,"debugRows")),_getAllCellsByColumnId:xe(()=>[l.getAllCells()],c=>c.reduce((u,h)=>(u[h.column.id]=h,u),{}),Se(t.options,"debugRows"))};for(let c=0;c<t._features.length;c++){const u=t._features[c];u==null||u.createRow==null||u.createRow(l,t)}return l},nI={createColumn:(t,e)=>{t._getFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),t._getFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}}},gb=(t,e,n)=>{var o;const i=n.toLowerCase();return!!(!((o=t.getValue(e))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};gb.autoRemove=t=>Jn(t);const bb=(t,e,n)=>{var o;return!!(!((o=t.getValue(e))==null||(o=o.toString())==null)&&o.includes(n))};bb.autoRemove=t=>Jn(t);const yb=(t,e,n)=>{var o;return((o=t.getValue(e))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(n==null?void 0:n.toLowerCase())};yb.autoRemove=t=>Jn(t);const vb=(t,e,n)=>{var o;return(o=t.getValue(e))==null?void 0:o.includes(n)};vb.autoRemove=t=>Jn(t)||!(t!=null&&t.length);const kb=(t,e,n)=>!n.some(o=>{var i;return!((i=t.getValue(e))!=null&&i.includes(o))});kb.autoRemove=t=>Jn(t)||!(t!=null&&t.length);const wb=(t,e,n)=>n.some(o=>{var i;return(i=t.getValue(e))==null?void 0:i.includes(o)});wb.autoRemove=t=>Jn(t)||!(t!=null&&t.length);const xb=(t,e,n)=>t.getValue(e)===n;xb.autoRemove=t=>Jn(t);const Sb=(t,e,n)=>t.getValue(e)==n;Sb.autoRemove=t=>Jn(t);const mf=(t,e,n)=>{let[o,i]=n;const a=t.getValue(e);return a>=o&&a<=i};mf.resolveFilterValue=t=>{let[e,n]=t,o=typeof e!="number"?parseFloat(e):e,i=typeof n!="number"?parseFloat(n):n,a=e===null||Number.isNaN(o)?-1/0:o,s=n===null||Number.isNaN(i)?1/0:i;if(a>s){const l=a;a=s,s=l}return[a,s]},mf.autoRemove=t=>Jn(t)||Jn(t[0])&&Jn(t[1]);const To={includesString:gb,includesStringSensitive:bb,equalsString:yb,arrIncludes:vb,arrIncludesAll:kb,arrIncludesSome:wb,equals:xb,weakEquals:Sb,inNumberRange:mf};function Jn(t){return t==null||t===""}const oI={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],...t}),getDefaultOptions:t=>({onColumnFiltersChange:Sn("columnFilters",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(t,e)=>{t.getAutoFilterFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);return typeof o=="string"?To.includesString:typeof o=="number"?To.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?To.equals:Array.isArray(o)?To.arrIncludes:To.weakEquals},t.getFilterFn=()=>{var n,o;return Ql(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():(n=(o=e.options.filterFns)==null?void 0:o[t.columnDef.filterFn])!=null?n:To[t.columnDef.filterFn]},t.getCanFilter=()=>{var n,o,i;return((n=t.columnDef.enableColumnFilter)!=null?n:!0)&&((o=e.options.enableColumnFilters)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var n;return(n=e.getState().columnFilters)==null||(n=n.find(o=>o.id===t.id))==null?void 0:n.value},t.getFilterIndex=()=>{var n,o;return(n=(o=e.getState().columnFilters)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.setFilterValue=n=>{e.setColumnFilters(o=>{const i=t.getFilterFn(),a=o==null?void 0:o.find(h=>h.id===t.id),s=pr(n,a?a.value:void 0);if(Cb(i,s,t)){var l;return(l=o==null?void 0:o.filter(h=>h.id!==t.id))!=null?l:[]}const c={id:t.id,value:s};if(a){var u;return(u=o==null?void 0:o.map(h=>h.id===t.id?c:h))!=null?u:[]}return o!=null&&o.length?[...o,c]:[c]})}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.setColumnFilters=e=>{const n=t.getAllLeafColumns(),o=i=>{var a;return(a=pr(e,i))==null?void 0:a.filter(s=>{const l=n.find(c=>c.id===s.id);if(l){const c=l.getFilterFn();if(Cb(c,s.value,l))return!1}return!0})};t.options.onColumnFiltersChange==null||t.options.onColumnFiltersChange(o)},t.resetColumnFilters=e=>{var n,o;t.setColumnFilters(e?[]:(n=(o=t.initialState)==null?void 0:o.columnFilters)!=null?n:[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel())}};function Cb(t,e,n){return(t&&t.autoRemove?t.autoRemove(e,n):!1)||typeof e>"u"||typeof e=="string"&&!e}const gf={sum:(t,e,n)=>n.reduce((o,i)=>{const a=i.getValue(t);return o+(typeof a=="number"?a:0)},0),min:(t,e,n)=>{let o;return n.forEach(i=>{const a=i.getValue(t);a!=null&&(o>a||o===void 0&&a>=a)&&(o=a)}),o},max:(t,e,n)=>{let o;return n.forEach(i=>{const a=i.getValue(t);a!=null&&(o<a||o===void 0&&a>=a)&&(o=a)}),o},extent:(t,e,n)=>{let o,i;return n.forEach(a=>{const s=a.getValue(t);s!=null&&(o===void 0?s>=s&&(o=i=s):(o>s&&(o=s),i<s&&(i=s)))}),[o,i]},mean:(t,e)=>{let n=0,o=0;if(e.forEach(i=>{let a=i.getValue(t);a!=null&&(a=+a)>=a&&(++n,o+=a)}),n)return o/n},median:(t,e)=>{if(!e.length)return;const n=e.map(a=>a.getValue(t));if(!YP(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),i=n.sort((a,s)=>a-s);return n.length%2!==0?i[o]:(i[o-1]+i[o])/2},unique:(t,e)=>Array.from(new Set(e.map(n=>n.getValue(t))).values()),uniqueCount:(t,e)=>new Set(e.map(n=>n.getValue(t))).size,count:(t,e)=>e.length},rI={getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,n;return(e=(n=t.getValue())==null||n.toString==null?void 0:n.toString())!=null?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:Sn("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>{t.toggleGrouping=()=>{e.setGrouping(n=>n!=null&&n.includes(t.id)?n.filter(o=>o!==t.id):[...n??[],t.id])},t.getCanGroup=()=>{var n,o;return((n=t.columnDef.enableGrouping)!=null?n:!0)&&((o=e.options.enableGrouping)!=null?o:!0)&&(!!t.accessorFn||!!t.columnDef.getGroupingValue)},t.getIsGrouped=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.includes(t.id)},t.getGroupedIndex=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.indexOf(t.id)},t.getToggleGroupingHandler=()=>{const n=t.getCanGroup();return()=>{n&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);if(typeof o=="number")return gf.sum;if(Object.prototype.toString.call(o)==="[object Date]")return gf.extent},t.getAggregationFn=()=>{var n,o;if(!t)throw new Error;return Ql(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():(n=(o=e.options.aggregationFns)==null?void 0:o[t.columnDef.aggregationFn])!=null?n:gf[t.columnDef.aggregationFn]}},createTable:t=>{t.setGrouping=e=>t.options.onGroupingChange==null?void 0:t.options.onGroupingChange(e),t.resetGrouping=e=>{var n,o;t.setGrouping(e?[]:(n=(o=t.initialState)==null?void 0:o.grouping)!=null?n:[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},createRow:(t,e)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=n=>{if(t._groupingValuesCache.hasOwnProperty(n))return t._groupingValuesCache[n];const o=e.getColumn(n);return o!=null&&o.columnDef.getGroupingValue?(t._groupingValuesCache[n]=o.columnDef.getGroupingValue(t.original),t._groupingValuesCache[n]):t.getValue(n)},t._groupingValuesCache={}},createCell:(t,e,n,o)=>{t.getIsGrouped=()=>e.getIsGrouped()&&e.id===n.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&e.getIsGrouped(),t.getIsAggregated=()=>{var i;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function iI(t,e,n){if(!(e!=null&&e.length)||!n)return t;const o=t.filter(a=>!e.includes(a.id));return n==="remove"?o:[...e.map(a=>t.find(s=>s.id===a)).filter(Boolean),...o]}const aI={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:Sn("columnOrder",t)}),createColumn:(t,e)=>{t.getIndex=xe(n=>[es(e,n)],n=>n.findIndex(o=>o.id===t.id),Se(e.options,"debugColumns")),t.getIsFirstColumn=n=>{var o;return((o=es(e,n)[0])==null?void 0:o.id)===t.id},t.getIsLastColumn=n=>{var o;const i=es(e,n);return((o=i[i.length-1])==null?void 0:o.id)===t.id}},createTable:t=>{t.setColumnOrder=e=>t.options.onColumnOrderChange==null?void 0:t.options.onColumnOrderChange(e),t.resetColumnOrder=e=>{var n;t.setColumnOrder(e?[]:(n=t.initialState.columnOrder)!=null?n:[])},t._getOrderColumnsFn=xe(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(e,n,o)=>i=>{let a=[];if(!(e!=null&&e.length))a=i;else{const s=[...e],l=[...i];for(;l.length&&s.length;){const c=s.shift(),u=l.findIndex(h=>h.id===c);u>-1&&a.push(l.splice(u,1)[0])}a=[...a,...l]}return iI(a,n,o)},Se(t.options,"debugTable"))}},bf=()=>({left:[],right:[]}),sI={getInitialState:t=>({columnPinning:bf(),...t}),getDefaultOptions:t=>({onColumnPinningChange:Sn("columnPinning",t)}),createColumn:(t,e)=>{t.pin=n=>{const o=t.getLeafColumns().map(i=>i.id).filter(Boolean);e.setColumnPinning(i=>{var a,s;if(n==="right"){var l,c;return{left:((l=i==null?void 0:i.left)!=null?l:[]).filter(p=>!(o!=null&&o.includes(p))),right:[...((c=i==null?void 0:i.right)!=null?c:[]).filter(p=>!(o!=null&&o.includes(p))),...o]}}if(n==="left"){var u,h;return{left:[...((u=i==null?void 0:i.left)!=null?u:[]).filter(p=>!(o!=null&&o.includes(p))),...o],right:((h=i==null?void 0:i.right)!=null?h:[]).filter(p=>!(o!=null&&o.includes(p)))}}return{left:((a=i==null?void 0:i.left)!=null?a:[]).filter(p=>!(o!=null&&o.includes(p))),right:((s=i==null?void 0:i.right)!=null?s:[]).filter(p=>!(o!=null&&o.includes(p)))}})},t.getCanPin=()=>t.getLeafColumns().some(o=>{var i,a,s;return((i=o.columnDef.enablePinning)!=null?i:!0)&&((a=(s=e.options.enableColumnPinning)!=null?s:e.options.enablePinning)!=null?a:!0)}),t.getIsPinned=()=>{const n=t.getLeafColumns().map(l=>l.id),{left:o,right:i}=e.getState().columnPinning,a=n.some(l=>o==null?void 0:o.includes(l)),s=n.some(l=>i==null?void 0:i.includes(l));return a?"left":s?"right":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();return i?(n=(o=e.getState().columnPinning)==null||(o=o[i])==null?void 0:o.indexOf(t.id))!=null?n:-1:0}},createRow:(t,e)=>{t.getCenterVisibleCells=xe(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,o,i)=>{const a=[...o??[],...i??[]];return n.filter(s=>!a.includes(s.column.id))},Se(e.options,"debugRows")),t.getLeftVisibleCells=xe(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left],(n,o)=>(o??[]).map(a=>n.find(s=>s.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),Se(e.options,"debugRows")),t.getRightVisibleCells=xe(()=>[t._getAllVisibleCells(),e.getState().columnPinning.right],(n,o)=>(o??[]).map(a=>n.find(s=>s.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),Se(e.options,"debugRows"))},createTable:t=>{t.setColumnPinning=e=>t.options.onColumnPinningChange==null?void 0:t.options.onColumnPinningChange(e),t.resetColumnPinning=e=>{var n,o;return t.setColumnPinning(e?bf():(n=(o=t.initialState)==null?void 0:o.columnPinning)!=null?n:bf())},t.getIsSomeColumnsPinned=e=>{var n;const o=t.getState().columnPinning;if(!e){var i,a;return!!((i=o.left)!=null&&i.length||(a=o.right)!=null&&a.length)}return!!((n=o[e])!=null&&n.length)},t.getLeftLeafColumns=xe(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),Se(t.options,"debugColumns")),t.getRightLeafColumns=xe(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),Se(t.options,"debugColumns")),t.getCenterLeafColumns=xe(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o)=>{const i=[...n??[],...o??[]];return e.filter(a=>!i.includes(a.id))},Se(t.options,"debugColumns"))}},ql={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},yf=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),lI={getDefaultColumnDef:()=>ql,getInitialState:t=>({columnSizing:{},columnSizingInfo:yf(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Sn("columnSizing",t),onColumnSizingInfoChange:Sn("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var n,o,i;const a=e.getState().columnSizing[t.id];return Math.min(Math.max((n=t.columnDef.minSize)!=null?n:ql.minSize,(o=a??t.columnDef.size)!=null?o:ql.size),(i=t.columnDef.maxSize)!=null?i:ql.maxSize)},t.getStart=xe(n=>[n,es(e,n),e.getState().columnSizing],(n,o)=>o.slice(0,t.getIndex(n)).reduce((i,a)=>i+a.getSize(),0),Se(e.options,"debugColumns")),t.getAfter=xe(n=>[n,es(e,n),e.getState().columnSizing],(n,o)=>o.slice(t.getIndex(n)+1).reduce((i,a)=>i+a.getSize(),0),Se(e.options,"debugColumns")),t.resetSize=()=>{e.setColumnSizing(n=>{let{[t.id]:o,...i}=n;return i})},t.getCanResize=()=>{var n,o;return((n=t.columnDef.enableResizing)!=null?n:!0)&&((o=e.options.enableColumnResizing)!=null?o:!0)},t.getIsResizing=()=>e.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,e)=>{t.getSize=()=>{let n=0;const o=i=>{if(i.subHeaders.length)i.subHeaders.forEach(o);else{var a;n+=(a=i.column.getSize())!=null?a:0}};return o(t),n},t.getStart=()=>{if(t.index>0){const n=t.headerGroup.headers[t.index-1];return n.getStart()+n.getSize()}return 0},t.getResizeHandler=n=>{const o=e.getColumn(t.column.id),i=o==null?void 0:o.getCanResize();return a=>{if(!o||!i||(a.persist==null||a.persist(),vf(a)&&a.touches&&a.touches.length>1))return;const s=t.getSize(),l=t?t.getLeafHeaders().map(x=>[x.column.id,x.column.getSize()]):[[o.id,o.getSize()]],c=vf(a)?Math.round(a.touches[0].clientX):a.clientX,u={},h=(x,C)=>{typeof C=="number"&&(e.setColumnSizingInfo(P=>{var O,E;const T=e.options.columnResizeDirection==="rtl"?-1:1,A=(C-((O=P==null?void 0:P.startOffset)!=null?O:0))*T,M=Math.max(A/((E=P==null?void 0:P.startSize)!=null?E:0),-.999999);return P.columnSizingStart.forEach(z=>{let[W,Q]=z;u[W]=Math.round(Math.max(Q+Q*M,0)*100)/100}),{...P,deltaOffset:A,deltaPercentage:M}}),(e.options.columnResizeMode==="onChange"||x==="end")&&e.setColumnSizing(P=>({...P,...u})))},p=x=>h("move",x),m=x=>{h("end",x),e.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},b=n||typeof document<"u"?document:null,y={moveHandler:x=>p(x.clientX),upHandler:x=>{b==null||b.removeEventListener("mousemove",y.moveHandler),b==null||b.removeEventListener("mouseup",y.upHandler),m(x.clientX)}},v={moveHandler:x=>(x.cancelable&&(x.preventDefault(),x.stopPropagation()),p(x.touches[0].clientX),!1),upHandler:x=>{var C;b==null||b.removeEventListener("touchmove",v.moveHandler),b==null||b.removeEventListener("touchend",v.upHandler),x.cancelable&&(x.preventDefault(),x.stopPropagation()),m((C=x.touches[0])==null?void 0:C.clientX)}},k=dI()?{passive:!1}:!1;vf(a)?(b==null||b.addEventListener("touchmove",v.moveHandler,k),b==null||b.addEventListener("touchend",v.upHandler,k)):(b==null||b.addEventListener("mousemove",y.moveHandler,k),b==null||b.addEventListener("mouseup",y.upHandler,k)),e.setColumnSizingInfo(x=>({...x,startOffset:c,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:o.id}))}}},createTable:t=>{t.setColumnSizing=e=>t.options.onColumnSizingChange==null?void 0:t.options.onColumnSizingChange(e),t.setColumnSizingInfo=e=>t.options.onColumnSizingInfoChange==null?void 0:t.options.onColumnSizingInfoChange(e),t.resetColumnSizing=e=>{var n;t.setColumnSizing(e?{}:(n=t.initialState.columnSizing)!=null?n:{})},t.resetHeaderSizeInfo=e=>{var n;t.setColumnSizingInfo(e?yf():(n=t.initialState.columnSizingInfo)!=null?n:yf())},t.getTotalSize=()=>{var e,n;return(e=(n=t.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getLeftTotalSize=()=>{var e,n;return(e=(n=t.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getCenterTotalSize=()=>{var e,n;return(e=(n=t.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getRightTotalSize=()=>{var e,n;return(e=(n=t.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0}}};let Kl=null;function dI(){if(typeof Kl=="boolean")return Kl;let t=!1;try{const e={get passive(){return t=!0,!1}},n=()=>{};window.addEventListener("test",n,e),window.removeEventListener("test",n)}catch{t=!1}return Kl=t,Kl}function vf(t){return t.type==="touchstart"}const cI={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:Sn("columnVisibility",t)}),createColumn:(t,e)=>{t.toggleVisibility=n=>{t.getCanHide()&&e.setColumnVisibility(o=>({...o,[t.id]:n??!t.getIsVisible()}))},t.getIsVisible=()=>{var n,o;const i=t.columns;return(n=i.length?i.some(a=>a.getIsVisible()):(o=e.getState().columnVisibility)==null?void 0:o[t.id])!=null?n:!0},t.getCanHide=()=>{var n,o;return((n=t.columnDef.enableHiding)!=null?n:!0)&&((o=e.options.enableHiding)!=null?o:!0)},t.getToggleVisibilityHandler=()=>n=>{t.toggleVisibility==null||t.toggleVisibility(n.target.checked)}},createRow:(t,e)=>{t._getAllVisibleCells=xe(()=>[t.getAllCells(),e.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),Se(e.options,"debugRows")),t.getVisibleCells=xe(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(n,o,i)=>[...n,...o,...i],Se(e.options,"debugRows"))},createTable:t=>{const e=(n,o)=>xe(()=>[o(),o().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),Se(t.options,"debugColumns"));t.getVisibleFlatColumns=e("getVisibleFlatColumns",()=>t.getAllFlatColumns()),t.getVisibleLeafColumns=e("getVisibleLeafColumns",()=>t.getAllLeafColumns()),t.getLeftVisibleLeafColumns=e("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),t.getRightVisibleLeafColumns=e("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),t.getCenterVisibleLeafColumns=e("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),t.setColumnVisibility=n=>t.options.onColumnVisibilityChange==null?void 0:t.options.onColumnVisibilityChange(n),t.resetColumnVisibility=n=>{var o;t.setColumnVisibility(n?{}:(o=t.initialState.columnVisibility)!=null?o:{})},t.toggleAllColumnsVisible=n=>{var o;n=(o=n)!=null?o:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((i,a)=>({...i,[a.id]:n||!(a.getCanHide!=null&&a.getCanHide())}),{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),t.getToggleAllColumnsVisibilityHandler=()=>n=>{var o;t.toggleAllColumnsVisible((o=n.target)==null?void 0:o.checked)}}};function es(t,e){return e?e==="center"?t.getCenterVisibleLeafColumns():e==="left"?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns()}const uI={createTable:t=>{t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}}},fI={getInitialState:t=>({globalFilter:void 0,...t}),getDefaultOptions:t=>({onGlobalFilterChange:Sn("globalFilter",t),globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var n;const o=(n=t.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[e.id])==null?void 0:n.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(t,e)=>{t.getCanGlobalFilter=()=>{var n,o,i,a;return((n=t.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=e.options.enableGlobalFilter)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&((a=e.options.getColumnCanGlobalFilter==null?void 0:e.options.getColumnCanGlobalFilter(t))!=null?a:!0)&&!!t.accessorFn}},createTable:t=>{t.getGlobalAutoFilterFn=()=>To.includesString,t.getGlobalFilterFn=()=>{var e,n;const{globalFilterFn:o}=t.options;return Ql(o)?o:o==="auto"?t.getGlobalAutoFilterFn():(e=(n=t.options.filterFns)==null?void 0:n[o])!=null?e:To[o]},t.setGlobalFilter=e=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)}}},pI={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:Sn("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,n=!1;t._autoResetExpanded=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetExpanded)!=null?o:!t.options.manualExpanding){if(n)return;n=!0,t._queue(()=>{t.resetExpanded(),n=!1})}},t.setExpanded=o=>t.options.onExpandedChange==null?void 0:t.options.onExpandedChange(o),t.toggleAllRowsExpanded=o=>{o??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=o=>{var i,a;t.setExpanded(o?{}:(i=(a=t.initialState)==null?void 0:a.expanded)!=null?i:{})},t.getCanSomeRowsExpand=()=>t.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),t.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),t.toggleAllRowsExpanded()},t.getIsSomeRowsExpanded=()=>{const o=t.getState().expanded;return o===!0||Object.values(o).some(Boolean)},t.getIsAllRowsExpanded=()=>{const o=t.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||t.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},t.getExpandedDepth=()=>{let o=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(a=>{const s=a.split(".");o=Math.max(o,s.length)}),o},t.getPreExpandedRowModel=()=>t.getSortedRowModel(),t.getExpandedRowModel=()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())},createRow:(t,e)=>{t.toggleExpanded=n=>{e.setExpanded(o=>{var i;const a=o===!0?!0:!!(o!=null&&o[t.id]);let s={};if(o===!0?Object.keys(e.getRowModel().rowsById).forEach(l=>{s[l]=!0}):s=o,n=(i=n)!=null?i:!a,!a&&n)return{...s,[t.id]:!0};if(a&&!n){const{[t.id]:l,...c}=s;return c}return o})},t.getIsExpanded=()=>{var n;const o=e.getState().expanded;return!!((n=e.options.getIsRowExpanded==null?void 0:e.options.getIsRowExpanded(t))!=null?n:o===!0||o!=null&&o[t.id])},t.getCanExpand=()=>{var n,o,i;return(n=e.options.getRowCanExpand==null?void 0:e.options.getRowCanExpand(t))!=null?n:((o=e.options.enableExpanding)!=null?o:!0)&&!!((i=t.subRows)!=null&&i.length)},t.getIsAllParentsExpanded=()=>{let n=!0,o=t;for(;n&&o.parentId;)o=e.getRow(o.parentId,!0),n=o.getIsExpanded();return n},t.getToggleExpandedHandler=()=>{const n=t.getCanExpand();return()=>{n&&t.toggleExpanded()}}}},kf=0,wf=10,xf=()=>({pageIndex:kf,pageSize:wf}),hI={getInitialState:t=>({...t,pagination:{...xf(),...t==null?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:Sn("pagination",t)}),createTable:t=>{let e=!1,n=!1;t._autoResetPageIndex=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetPageIndex)!=null?o:!t.options.manualPagination){if(n)return;n=!0,t._queue(()=>{t.resetPageIndex(),n=!1})}},t.setPagination=o=>{const i=a=>pr(o,a);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(i)},t.resetPagination=o=>{var i;t.setPagination(o?xf():(i=t.initialState.pagination)!=null?i:xf())},t.setPageIndex=o=>{t.setPagination(i=>{let a=pr(o,i.pageIndex);const s=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return a=Math.max(0,Math.min(a,s)),{...i,pageIndex:a}})},t.resetPageIndex=o=>{var i,a;t.setPageIndex(o?kf:(i=(a=t.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?i:kf)},t.resetPageSize=o=>{var i,a;t.setPageSize(o?wf:(i=(a=t.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?i:wf)},t.setPageSize=o=>{t.setPagination(i=>{const a=Math.max(1,pr(o,i.pageSize)),s=i.pageSize*i.pageIndex,l=Math.floor(s/a);return{...i,pageIndex:l,pageSize:a}})},t.setPageCount=o=>t.setPagination(i=>{var a;let s=pr(o,(a=t.options.pageCount)!=null?a:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...i,pageCount:s}}),t.getPageOptions=xe(()=>[t.getPageCount()],o=>{let i=[];return o&&o>0&&(i=[...new Array(o)].fill(null).map((a,s)=>s)),i},Se(t.options,"debugTable")),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{const{pageIndex:o}=t.getState().pagination,i=t.getPageCount();return i===-1?!0:i===0?!1:o<i-1},t.previousPage=()=>t.setPageIndex(o=>o-1),t.nextPage=()=>t.setPageIndex(o=>o+1),t.firstPage=()=>t.setPageIndex(0),t.lastPage=()=>t.setPageIndex(t.getPageCount()-1),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>{var o;return(o=t.options.pageCount)!=null?o:Math.ceil(t.getRowCount()/t.getState().pagination.pageSize)},t.getRowCount=()=>{var o;return(o=t.options.rowCount)!=null?o:t.getPrePaginationRowModel().rows.length}}},Sf=()=>({top:[],bottom:[]}),mI={getInitialState:t=>({rowPinning:Sf(),...t}),getDefaultOptions:t=>({onRowPinningChange:Sn("rowPinning",t)}),createRow:(t,e)=>{t.pin=(n,o,i)=>{const a=o?t.getLeafRows().map(c=>{let{id:u}=c;return u}):[],s=i?t.getParentRows().map(c=>{let{id:u}=c;return u}):[],l=new Set([...s,t.id,...a]);e.setRowPinning(c=>{var u,h;if(n==="bottom"){var p,m;return{top:((p=c==null?void 0:c.top)!=null?p:[]).filter(v=>!(l!=null&&l.has(v))),bottom:[...((m=c==null?void 0:c.bottom)!=null?m:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)]}}if(n==="top"){var b,y;return{top:[...((b=c==null?void 0:c.top)!=null?b:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)],bottom:((y=c==null?void 0:c.bottom)!=null?y:[]).filter(v=>!(l!=null&&l.has(v)))}}return{top:((u=c==null?void 0:c.top)!=null?u:[]).filter(v=>!(l!=null&&l.has(v))),bottom:((h=c==null?void 0:c.bottom)!=null?h:[]).filter(v=>!(l!=null&&l.has(v)))}})},t.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:i}=e.options;return typeof o=="function"?o(t):(n=o??i)!=null?n:!0},t.getIsPinned=()=>{const n=[t.id],{top:o,bottom:i}=e.getState().rowPinning,a=n.some(l=>o==null?void 0:o.includes(l)),s=n.some(l=>i==null?void 0:i.includes(l));return a?"top":s?"bottom":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();if(!i)return-1;const a=(n=i==="top"?e.getTopRows():e.getBottomRows())==null?void 0:n.map(s=>{let{id:l}=s;return l});return(o=a==null?void 0:a.indexOf(t.id))!=null?o:-1}},createTable:t=>{t.setRowPinning=e=>t.options.onRowPinningChange==null?void 0:t.options.onRowPinningChange(e),t.resetRowPinning=e=>{var n,o;return t.setRowPinning(e?Sf():(n=(o=t.initialState)==null?void 0:o.rowPinning)!=null?n:Sf())},t.getIsSomeRowsPinned=e=>{var n;const o=t.getState().rowPinning;if(!e){var i,a;return!!((i=o.top)!=null&&i.length||(a=o.bottom)!=null&&a.length)}return!!((n=o[e])!=null&&n.length)},t._getPinnedRows=(e,n,o)=>{var i;return((i=t.options.keepPinnedRows)==null||i?(n??[]).map(s=>{const l=t.getRow(s,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(s=>e.find(l=>l.id===s))).filter(Boolean).map(s=>({...s,position:o}))},t.getTopRows=xe(()=>[t.getRowModel().rows,t.getState().rowPinning.top],(e,n)=>t._getPinnedRows(e,n,"top"),Se(t.options,"debugRows")),t.getBottomRows=xe(()=>[t.getRowModel().rows,t.getState().rowPinning.bottom],(e,n)=>t._getPinnedRows(e,n,"bottom"),Se(t.options,"debugRows")),t.getCenterRows=xe(()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom],(e,n,o)=>{const i=new Set([...n??[],...o??[]]);return e.filter(a=>!i.has(a.id))},Se(t.options,"debugRows"))}},gI={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:Sn("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>{t.setRowSelection=e=>t.options.onRowSelectionChange==null?void 0:t.options.onRowSelectionChange(e),t.resetRowSelection=e=>{var n;return t.setRowSelection(e?{}:(n=t.initialState.rowSelection)!=null?n:{})},t.toggleAllRowsSelected=e=>{t.setRowSelection(n=>{e=typeof e<"u"?e:!t.getIsAllRowsSelected();const o={...n},i=t.getPreGroupedRowModel().flatRows;return e?i.forEach(a=>{a.getCanSelect()&&(o[a.id]=!0)}):i.forEach(a=>{delete o[a.id]}),o})},t.toggleAllPageRowsSelected=e=>t.setRowSelection(n=>{const o=typeof e<"u"?e:!t.getIsAllPageRowsSelected(),i={...n};return t.getRowModel().rows.forEach(a=>{Cf(i,a.id,o,!0,t)}),i}),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=xe(()=>[t.getState().rowSelection,t.getCoreRowModel()],(e,n)=>Object.keys(e).length?Af(t,n):{rows:[],flatRows:[],rowsById:{}},Se(t.options,"debugTable")),t.getFilteredSelectedRowModel=xe(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(e,n)=>Object.keys(e).length?Af(t,n):{rows:[],flatRows:[],rowsById:{}},Se(t.options,"debugTable")),t.getGroupedSelectedRowModel=xe(()=>[t.getState().rowSelection,t.getSortedRowModel()],(e,n)=>Object.keys(e).length?Af(t,n):{rows:[],flatRows:[],rowsById:{}},Se(t.options,"debugTable")),t.getIsAllRowsSelected=()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:n}=t.getState();let o=!!(e.length&&Object.keys(n).length);return o&&e.some(i=>i.getCanSelect()&&!n[i.id])&&(o=!1),o},t.getIsAllPageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=t.getState();let o=!!e.length;return o&&e.some(i=>!n[i.id])&&(o=!1),o},t.getIsSomeRowsSelected=()=>{var e;const n=Object.keys((e=t.getState().rowSelection)!=null?e:{}).length;return n>0&&n<t.getFilteredRowModel().flatRows.length},t.getIsSomePageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:e.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},t.getToggleAllRowsSelectedHandler=()=>e=>{t.toggleAllRowsSelected(e.target.checked)},t.getToggleAllPageRowsSelectedHandler=()=>e=>{t.toggleAllPageRowsSelected(e.target.checked)}},createRow:(t,e)=>{t.toggleSelected=(n,o)=>{const i=t.getIsSelected();e.setRowSelection(a=>{var s;if(n=typeof n<"u"?n:!i,t.getCanSelect()&&i===n)return a;const l={...a};return Cf(l,t.id,n,(s=o==null?void 0:o.selectChildren)!=null?s:!0,e),l})},t.getIsSelected=()=>{const{rowSelection:n}=e.getState();return Ef(t,n)},t.getIsSomeSelected=()=>{const{rowSelection:n}=e.getState();return Df(t,n)==="some"},t.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=e.getState();return Df(t,n)==="all"},t.getCanSelect=()=>{var n;return typeof e.options.enableRowSelection=="function"?e.options.enableRowSelection(t):(n=e.options.enableRowSelection)!=null?n:!0},t.getCanSelectSubRows=()=>{var n;return typeof e.options.enableSubRowSelection=="function"?e.options.enableSubRowSelection(t):(n=e.options.enableSubRowSelection)!=null?n:!0},t.getCanMultiSelect=()=>{var n;return typeof e.options.enableMultiRowSelection=="function"?e.options.enableMultiRowSelection(t):(n=e.options.enableMultiRowSelection)!=null?n:!0},t.getToggleSelectedHandler=()=>{const n=t.getCanSelect();return o=>{var i;n&&t.toggleSelected((i=o.target)==null?void 0:i.checked)}}}},Cf=(t,e,n,o,i)=>{var a;const s=i.getRow(e,!0);n?(s.getCanMultiSelect()||Object.keys(t).forEach(l=>delete t[l]),s.getCanSelect()&&(t[e]=!0)):delete t[e],o&&(a=s.subRows)!=null&&a.length&&s.getCanSelectSubRows()&&s.subRows.forEach(l=>Cf(t,l.id,n,o,i))};function Af(t,e){const n=t.getState().rowSelection,o=[],i={},a=function(s,l){return s.map(c=>{var u;const h=Ef(c,n);if(h&&(o.push(c),i[c.id]=c),(u=c.subRows)!=null&&u.length&&(c={...c,subRows:a(c.subRows)}),h)return c}).filter(Boolean)};return{rows:a(e.rows),flatRows:o,rowsById:i}}function Ef(t,e){var n;return(n=e[t.id])!=null?n:!1}function Df(t,e,n){var o;if(!((o=t.subRows)!=null&&o.length))return!1;let i=!0,a=!1;return t.subRows.forEach(s=>{if(!(a&&!i)&&(s.getCanSelect()&&(Ef(s,e)?a=!0:i=!1),s.subRows&&s.subRows.length)){const l=Df(s,e);l==="all"?a=!0:(l==="some"&&(a=!0),i=!1)}}),i?"all":a?"some":!1}const Bf=/([0-9]+)/gm,bI=(t,e,n)=>Ab(hr(t.getValue(n)).toLowerCase(),hr(e.getValue(n)).toLowerCase()),yI=(t,e,n)=>Ab(hr(t.getValue(n)),hr(e.getValue(n))),vI=(t,e,n)=>Pf(hr(t.getValue(n)).toLowerCase(),hr(e.getValue(n)).toLowerCase()),kI=(t,e,n)=>Pf(hr(t.getValue(n)),hr(e.getValue(n))),wI=(t,e,n)=>{const o=t.getValue(n),i=e.getValue(n);return o>i?1:o<i?-1:0},xI=(t,e,n)=>Pf(t.getValue(n),e.getValue(n));function Pf(t,e){return t===e?0:t>e?1:-1}function hr(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function Ab(t,e){const n=t.split(Bf).filter(Boolean),o=e.split(Bf).filter(Boolean);for(;n.length&&o.length;){const i=n.shift(),a=o.shift(),s=parseInt(i,10),l=parseInt(a,10),c=[s,l].sort();if(isNaN(c[0])){if(i>a)return 1;if(a>i)return-1;continue}if(isNaN(c[1]))return isNaN(s)?-1:1;if(s>l)return 1;if(l>s)return-1}return n.length-o.length}const ts={alphanumeric:bI,alphanumericCaseSensitive:yI,text:vI,textCaseSensitive:kI,datetime:wI,basic:xI},SI=[tI,cI,aI,sI,nI,oI,uI,fI,{getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:Sn("sorting",t),isMultiSortEvent:e=>e.shiftKey}),createColumn:(t,e)=>{t.getAutoSortingFn=()=>{const n=e.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const i of n){const a=i==null?void 0:i.getValue(t.id);if(Object.prototype.toString.call(a)==="[object Date]")return ts.datetime;if(typeof a=="string"&&(o=!0,a.split(Bf).length>1))return ts.alphanumeric}return o?ts.text:ts.basic},t.getAutoSortDir=()=>{const n=e.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(t.id))=="string"?"asc":"desc"},t.getSortingFn=()=>{var n,o;if(!t)throw new Error;return Ql(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():(n=(o=e.options.sortingFns)==null?void 0:o[t.columnDef.sortingFn])!=null?n:ts[t.columnDef.sortingFn]},t.toggleSorting=(n,o)=>{const i=t.getNextSortingOrder(),a=typeof n<"u"&&n!==null;e.setSorting(s=>{const l=s==null?void 0:s.find(b=>b.id===t.id),c=s==null?void 0:s.findIndex(b=>b.id===t.id);let u=[],h,p=a?n:i==="desc";if(s!=null&&s.length&&t.getCanMultiSort()&&o?l?h="toggle":h="add":s!=null&&s.length&&c!==s.length-1?h="replace":l?h="toggle":h="replace",h==="toggle"&&(a||i||(h="remove")),h==="add"){var m;u=[...s,{id:t.id,desc:p}],u.splice(0,u.length-((m=e.options.maxMultiSortColCount)!=null?m:Number.MAX_SAFE_INTEGER))}else h==="toggle"?u=s.map(b=>b.id===t.id?{...b,desc:p}:b):h==="remove"?u=s.filter(b=>b.id!==t.id):u=[{id:t.id,desc:p}];return u})},t.getFirstSortDir=()=>{var n,o;return((n=(o=t.columnDef.sortDescFirst)!=null?o:e.options.sortDescFirst)!=null?n:t.getAutoSortDir()==="desc")?"desc":"asc"},t.getNextSortingOrder=n=>{var o,i;const a=t.getFirstSortDir(),s=t.getIsSorted();return s?s!==a&&((o=e.options.enableSortingRemoval)==null||o)&&(!(n&&(i=e.options.enableMultiRemove)!=null)||i)?!1:s==="desc"?"asc":"desc":a},t.getCanSort=()=>{var n,o;return((n=t.columnDef.enableSorting)!=null?n:!0)&&((o=e.options.enableSorting)!=null?o:!0)&&!!t.accessorFn},t.getCanMultiSort=()=>{var n,o;return(n=(o=t.columnDef.enableMultiSort)!=null?o:e.options.enableMultiSort)!=null?n:!!t.accessorFn},t.getIsSorted=()=>{var n;const o=(n=e.getState().sorting)==null?void 0:n.find(i=>i.id===t.id);return o?o.desc?"desc":"asc":!1},t.getSortIndex=()=>{var n,o;return(n=(o=e.getState().sorting)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.clearSorting=()=>{e.setSorting(n=>n!=null&&n.length?n.filter(o=>o.id!==t.id):[])},t.getToggleSortingHandler=()=>{const n=t.getCanSort();return o=>{n&&(o.persist==null||o.persist(),t.toggleSorting==null||t.toggleSorting(void 0,t.getCanMultiSort()?e.options.isMultiSortEvent==null?void 0:e.options.isMultiSortEvent(o):!1))}}},createTable:t=>{t.setSorting=e=>t.options.onSortingChange==null?void 0:t.options.onSortingChange(e),t.resetSorting=e=>{var n,o;t.setSorting(e?[]:(n=(o=t.initialState)==null?void 0:o.sorting)!=null?n:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}},rI,pI,hI,mI,gI,lI];function CI(t){var e,n;const o=[...SI,...(e=t._features)!=null?e:[]];let i={_features:o};const a=i._features.reduce((m,b)=>Object.assign(m,b.getDefaultOptions==null?void 0:b.getDefaultOptions(i)),{}),s=m=>i.options.mergeOptions?i.options.mergeOptions(a,m):{...a,...m};let c={...{},...(n=t.initialState)!=null?n:{}};i._features.forEach(m=>{var b;c=(b=m.getInitialState==null?void 0:m.getInitialState(c))!=null?b:c});const u=[];let h=!1;const p={_features:o,options:{...a,...t},initialState:c,_queue:m=>{u.push(m),h||(h=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();h=!1}).catch(b=>setTimeout(()=>{throw b})))},reset:()=>{i.setState(i.initialState)},setOptions:m=>{const b=pr(m,i.options);i.options=s(b)},getState:()=>i.options.state,setState:m=>{i.options.onStateChange==null||i.options.onStateChange(m)},_getRowId:(m,b,y)=>{var v;return(v=i.options.getRowId==null?void 0:i.options.getRowId(m,b,y))!=null?v:`${y?[y.id,b].join("."):b}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(m,b)=>{let y=(b?i.getPrePaginationRowModel():i.getRowModel()).rowsById[m];if(!y&&(y=i.getCoreRowModel().rowsById[m],!y))throw new Error;return y},_getDefaultColumnDef:xe(()=>[i.options.defaultColumn],m=>{var b;return m=(b=m)!=null?b:{},{header:y=>{const v=y.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:y=>{var v,k;return(v=(k=y.renderValue())==null||k.toString==null?void 0:k.toString())!=null?v:null},...i._features.reduce((y,v)=>Object.assign(y,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...m}},Se(t,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:xe(()=>[i._getColumnDefs()],m=>{const b=function(y,v,k){return k===void 0&&(k=0),y.map(x=>{const C=eI(i,x,k,v),P=x;return C.columns=P.columns?b(P.columns,C,k+1):[],C})};return b(m)},Se(t,"debugColumns")),getAllFlatColumns:xe(()=>[i.getAllColumns()],m=>m.flatMap(b=>b.getFlatColumns()),Se(t,"debugColumns")),_getAllFlatColumnsById:xe(()=>[i.getAllFlatColumns()],m=>m.reduce((b,y)=>(b[y.id]=y,b),{}),Se(t,"debugColumns")),getAllLeafColumns:xe(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(m,b)=>{let y=m.flatMap(v=>v.getLeafColumns());return b(y)},Se(t,"debugColumns")),getColumn:m=>i._getAllFlatColumnsById()[m]};Object.assign(i,p);for(let m=0;m<i._features.length;m++){const b=i._features[m];b==null||b.createTable==null||b.createTable(i)}return i}function AI(){return t=>xe(()=>[t.options.data],e=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(i,a,s){a===void 0&&(a=0);const l=[];for(let u=0;u<i.length;u++){const h=hf(t,t._getRowId(i[u],u,s),i[u],u,a,void 0,s==null?void 0:s.id);if(n.flatRows.push(h),n.rowsById[h.id]=h,l.push(h),t.options.getSubRows){var c;h.originalSubRows=t.options.getSubRows(i[u],u),(c=h.originalSubRows)!=null&&c.length&&(h.subRows=o(h.originalSubRows,a+1,h))}}return l};return n.rows=o(e),n},Se(t.options,"debugTable","getRowModel",()=>t._autoResetPageIndex()))}function EI(){return t=>xe(()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows],(e,n,o)=>!n.rows.length||e!==!0&&!Object.keys(e??{}).length||!o?n:Eb(n),Se(t.options,"debugTable"))}function Eb(t){const e=[],n=o=>{var i;e.push(o),(i=o.subRows)!=null&&i.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}function DI(t,e,n){return n.options.filterFromLeafRows?BI(t,e,n):PI(t,e,n)}function BI(t,e,n){var o;const i=[],a={},s=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,l=function(c,u){u===void 0&&(u=0);const h=[];for(let m=0;m<c.length;m++){var p;let b=c[m];const y=hf(n,b.id,b.original,b.index,b.depth,void 0,b.parentId);if(y.columnFilters=b.columnFilters,(p=b.subRows)!=null&&p.length&&u<s){if(y.subRows=l(b.subRows,u+1),b=y,e(b)&&!y.subRows.length){h.push(b),a[b.id]=b,i.push(b);continue}if(e(b)||y.subRows.length){h.push(b),a[b.id]=b,i.push(b);continue}}else b=y,e(b)&&(h.push(b),a[b.id]=b,i.push(b))}return h};return{rows:l(t),flatRows:i,rowsById:a}}function PI(t,e,n){var o;const i=[],a={},s=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,l=function(c,u){u===void 0&&(u=0);const h=[];for(let m=0;m<c.length;m++){let b=c[m];if(e(b)){var p;if((p=b.subRows)!=null&&p.length&&u<s){const v=hf(n,b.id,b.original,b.index,b.depth,void 0,b.parentId);v.subRows=l(b.subRows,u+1),b=v}h.push(b),i.push(b),a[b.id]=b}}return h};return{rows:l(t),flatRows:i,rowsById:a}}function II(){return t=>xe(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(e,n,o)=>{if(!e.rows.length||!(n!=null&&n.length)&&!o){for(let m=0;m<e.flatRows.length;m++)e.flatRows[m].columnFilters={},e.flatRows[m].columnFiltersMeta={};return e}const i=[],a=[];(n??[]).forEach(m=>{var b;const y=t.getColumn(m.id);if(!y)return;const v=y.getFilterFn();v&&i.push({id:m.id,filterFn:v,resolvedValue:(b=v.resolveFilterValue==null?void 0:v.resolveFilterValue(m.value))!=null?b:m.value})});const s=(n??[]).map(m=>m.id),l=t.getGlobalFilterFn(),c=t.getAllLeafColumns().filter(m=>m.getCanGlobalFilter());o&&l&&c.length&&(s.push("__global__"),c.forEach(m=>{var b;a.push({id:m.id,filterFn:l,resolvedValue:(b=l.resolveFilterValue==null?void 0:l.resolveFilterValue(o))!=null?b:o})}));let u,h;for(let m=0;m<e.flatRows.length;m++){const b=e.flatRows[m];if(b.columnFilters={},i.length)for(let y=0;y<i.length;y++){u=i[y];const v=u.id;b.columnFilters[v]=u.filterFn(b,v,u.resolvedValue,k=>{b.columnFiltersMeta[v]=k})}if(a.length){for(let y=0;y<a.length;y++){h=a[y];const v=h.id;if(h.filterFn(b,v,h.resolvedValue,k=>{b.columnFiltersMeta[v]=k})){b.columnFilters.__global__=!0;break}}b.columnFilters.__global__!==!0&&(b.columnFilters.__global__=!1)}}const p=m=>{for(let b=0;b<s.length;b++)if(m.columnFilters[s[b]]===!1)return!1;return!0};return DI(e.rows,p,t)},Se(t.options,"debugTable","getFilteredRowModel",()=>t._autoResetPageIndex()))}function OI(t){return e=>xe(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(n,o)=>{if(!o.rows.length)return o;const{pageSize:i,pageIndex:a}=n;let{rows:s,flatRows:l,rowsById:c}=o;const u=i*a,h=u+i;s=s.slice(u,h);let p;e.options.paginateExpandedRows?p={rows:s,flatRows:l,rowsById:c}:p=Eb({rows:s,flatRows:l,rowsById:c}),p.flatRows=[];const m=b=>{p.flatRows.push(b),b.subRows.length&&b.subRows.forEach(m)};return p.rows.forEach(m),p},Se(e.options,"debugTable"))}function NI(){return t=>xe(()=>[t.getState().sorting,t.getPreSortedRowModel()],(e,n)=>{if(!n.rows.length||!(e!=null&&e.length))return n;const o=t.getState().sorting,i=[],a=o.filter(c=>{var u;return(u=t.getColumn(c.id))==null?void 0:u.getCanSort()}),s={};a.forEach(c=>{const u=t.getColumn(c.id);u&&(s[c.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const l=c=>{const u=c.map(h=>({...h}));return u.sort((h,p)=>{for(let b=0;b<a.length;b+=1){var m;const y=a[b],v=s[y.id],k=v.sortUndefined,x=(m=y==null?void 0:y.desc)!=null?m:!1;let C=0;if(k){const P=h.getValue(y.id),O=p.getValue(y.id),E=P===void 0,T=O===void 0;if(E||T){if(k==="first")return E?-1:1;if(k==="last")return E?1:-1;C=E&&T?0:E?k:-k}}if(C===0&&(C=v.sortingFn(h,p,y.id)),C!==0)return x&&(C*=-1),v.invertSorting&&(C*=-1),C}return h.index-p.index}),u.forEach(h=>{var p;i.push(h),(p=h.subRows)!=null&&p.length&&(h.subRows=l(h.subRows))}),u};return{rows:l(n.rows),flatRows:i,rowsById:n.rowsById}},Se(t.options,"debugTable","getSortedRowModel",()=>t._autoResetPageIndex()))}/**
@@ -126,5 +126,5 @@ function print() { __p += __j.call(arguments, '') }
126
126
  */function Jl(){return!0}const VI=Symbol("merge-proxy"),RI={get(t,e,n){return e===VI?n:t.get(e)},has(t,e){return t.has(e)},set:Jl,deleteProperty:Jl,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:Jl,deleteProperty:Jl}},ownKeys(t){return t.keys()}};function If(t){return"value"in t?t.value:t}function ns(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new Proxy({get(o){for(let i=e.length-1;i>=0;i--){const a=If(e[i])[o];if(a!==void 0)return a}},has(o){for(let i=e.length-1;i>=0;i--)if(o in If(e[i]))return!0;return!1},keys(){const o=[];for(let i=0;i<e.length;i++)o.push(...Object.keys(If(e[i])));return[...Array.from(new Set(o))]}},RI)}const os=r.defineComponent({props:["render","props"],setup:t=>()=>typeof t.render=="function"||typeof t.render=="object"?r.h(t.render,t.props):t.render});function Db(t){return ns(t,{data:r.unref(t.data)})}function TI(t){const e=ns({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(i,a){return ns(i,a)}},Db(t)),n=CI(e);r.isRef(t.data)&&r.watch(t.data,()=>{n.setState(i=>({...i,data:r.unref(t.data)}))},{immediate:!0,deep:!0});const o=r.ref(n.initialState);return r.watchEffect(()=>{n.setOptions(i=>{var a;const s=new Proxy({},{get:(l,c)=>o.value[c]});return ns(i,Db(t),{state:ns(s,(a=t.state)!=null?a:{}),onStateChange:l=>{l instanceof Function?o.value=l(o.value):o.value=l,t.onStateChange==null||t.onStateChange(l)}})})}),n}const FI=["checked","disabled","indeterminate"],Bb=Ie(r.defineComponent({__name:"FmTableCheckbox",props:{checked:{type:Boolean},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},onChange:{}},setup(t){const e=t,n=r.computed(()=>e.indeterminate&&!e.checked?"remove":e.checked?"check_small":"");return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:"fm-checkbox__input--container",onClick:i[0]||(i[0]=r.withModifiers((...a)=>o.onChange&&o.onChange(...a),["stop"]))},[r.createElementVNode("input",{checked:o.checked,class:r.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":o.checked}),disabled:o.disabled,indeterminate:o.indeterminate,type:"checkbox"},null,10,FI),o.indeterminate||o.checked?(r.openBlock(),r.createBlock(be,{key:0,name:n.value,class:"fm-checkbox__input--checkmark",color:"#FFFFFF",size:"md"},null,8,["name"])):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-05ce96cb"]]),MI=["id"],Pb=r.defineComponent({__name:"FmTableSelection",props:{modelValue:{},items:{}},emits:["update:modelValue"],setup(t){const n=Te(t,"modelValue"),o=r.ref(!1);return(i,a)=>(r.openBlock(),r.createBlock(so,{"max-height":264,shift:"",onMenuChanged:a[0]||(a[0]=s=>o.value=s)},{"menu-button":r.withCtx(()=>{var s;return[r.createVNode(we,{icon:o.value?"expand_less":"expand_more",label:(s=i.items.find(l=>l.value===i.modelValue))==null?void 0:s.label,"icon-position":"append",size:"md",variant:"tertiary"},null,8,["icon","label"])]}),"menu-wrapper":r.withCtx(({maxHeight:s})=>[r.createElementVNode("div",{id:`menu-wrapper-${s}`,style:r.normalizeStyle({maxHeight:`${s}px`}),class:"bg-fm-color-neutral-white flex flex-col overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.items,l=>(r.openBlock(),r.createBlock(Dt,{key:l.value,label:l.label,"model-value":l.value===r.unref(n),value:l.value,"onUpdate:modelValue":c=>n.value=l.value},null,8,["label","model-value","value","onUpdate:modelValue"]))),128))],12,MI)]),_:1}))}}),LI=["colSpan","onClick"],Yl=r.defineComponent({__name:"FmTableHeader",props:{table:{}},emits:["update:column-widths"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(new Map);function a(c){return c.column.columnDef.meta}function s(){const c=Array.from(i.value.values()).map(u=>u.offsetWidth);n("update:column-widths",c)}r.onMounted(()=>{setTimeout(()=>{s()},0),setTimeout(()=>{s()},100)});let l=null;return r.onMounted(()=>{window.ResizeObserver&&(l=new ResizeObserver(()=>{s()}),i.value.forEach(c=>{l==null||l.observe(c)})),r.onUnmounted(()=>{l&&l.disconnect()})}),r.onMounted(()=>{window.addEventListener("resize",s),r.onUnmounted(()=>window.removeEventListener("resize",s))}),r.watch(()=>o.table.getHeaderGroups(),()=>{s()}),(c,u)=>{const h=r.resolveComponent("FmIcon");return r.openBlock(),r.createElementBlock("thead",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.table.getHeaderGroups(),p=>(r.openBlock(),r.createElementBlock("tr",{key:p.id},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.headers,m=>{var b,y,v,k,x,C,P;return r.openBlock(),r.createElementBlock("th",{key:m.id,ref_for:!0,ref:O=>O&&i.value.set(m.id,O),class:r.normalizeClass(["fm-typo-en-body-md-600 text-fm-color-typo-secondary border-b border-fm-color-neutral-gray-100 h-24",m.column.getCanSort()?"cursor-pointer select-none hover:bg-fm-color-opacity-sm":"",((b=a(m))==null?void 0:b.headerClass)??"px-16 py-[13px]"]),colSpan:m.colSpan,style:r.normalizeStyle({width:(y=m.column.columnDef.meta)!=null&&y.width?(v=m.column.columnDef.meta)==null?void 0:v.width:m.column.getSize()!==0?`${m.column.getSize()}px`:(k=a(m))==null?void 0:k.width,maxWidth:(x=a(m))==null?void 0:x.maxWidth,textAlign:((C=a(m))==null?void 0:C.textAlign)??"left"}),onClick:O=>{var E;return(E=m.column.getToggleSortingHandler())==null?void 0:E(O)}},[r.createElementVNode("div",{class:r.normalizeClass([((P=a(m))==null?void 0:P.headerContentClass)??"flex gap-8 items-center"])},[m.isPlaceholder?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(r.unref(os),{key:0,props:m.getContext(),render:m.column.columnDef.header},null,8,["props","render"])),m.column.getCanSort()?(r.openBlock(),r.createBlock(h,{key:1,name:{asc:"arrow_upward",desc:"arrow_downward"}[m.column.getIsSorted()]??"unfold_more",color:"neutral-gray-400",size:"sm"},null,8,["name"])):r.createCommentVNode("",!0)],2)],14,LI)}),128))]))),128))])}}});function zI(){this.__data__=[],this.size=0}var _I=zI;function HI(t,e){return t===e||t!==t&&e!==e}var Ib=HI,UI=Ib;function WI(t,e){for(var n=t.length;n--;)if(UI(t[n][0],e))return n;return-1}var Zl=WI,jI=Zl,GI=Array.prototype,QI=GI.splice;function XI(t){var e=this.__data__,n=jI(e,t);if(n<0)return!1;var o=e.length-1;return n==o?e.pop():QI.call(e,n,1),--this.size,!0}var qI=XI,KI=Zl;function JI(t){var e=this.__data__,n=KI(e,t);return n<0?void 0:e[n][1]}var YI=JI,ZI=Zl;function $I(t){return ZI(this.__data__,t)>-1}var eO=$I,tO=Zl;function nO(t,e){var n=this.__data__,o=tO(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}var oO=nO,rO=_I,iO=qI,aO=YI,sO=eO,lO=oO;function zi(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}zi.prototype.clear=rO,zi.prototype.delete=iO,zi.prototype.get=aO,zi.prototype.has=sO,zi.prototype.set=lO;var $l=zi,dO=$l;function cO(){this.__data__=new dO,this.size=0}var uO=cO;function fO(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var pO=fO;function hO(t){return this.__data__.get(t)}var mO=hO;function gO(t){return this.__data__.has(t)}var bO=gO,yO=typeof nn=="object"&&nn&&nn.Object===Object&&nn,Ob=yO,vO=Ob,kO=typeof self=="object"&&self&&self.Object===Object&&self,wO=vO||kO||Function("return this")(),Fo=wO,xO=Fo,SO=xO.Symbol,Of=SO,Nb=Of,Vb=Object.prototype,CO=Vb.hasOwnProperty,AO=Vb.toString,rs=Nb?Nb.toStringTag:void 0;function EO(t){var e=CO.call(t,rs),n=t[rs];try{t[rs]=void 0;var o=!0}catch{}var i=AO.call(t);return o&&(e?t[rs]=n:delete t[rs]),i}var DO=EO,BO=Object.prototype,PO=BO.toString;function IO(t){return PO.call(t)}var OO=IO,Rb=Of,NO=DO,VO=OO,RO="[object Null]",TO="[object Undefined]",Tb=Rb?Rb.toStringTag:void 0;function FO(t){return t==null?t===void 0?TO:RO:Tb&&Tb in Object(t)?NO(t):VO(t)}var ed=FO;function MO(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Fb=MO,LO=ed,zO=Fb,_O="[object AsyncFunction]",HO="[object Function]",UO="[object GeneratorFunction]",WO="[object Proxy]";function jO(t){if(!zO(t))return!1;var e=LO(t);return e==HO||e==UO||e==_O||e==WO}var Mb=jO,GO=Fo,QO=GO["__core-js_shared__"],XO=QO,Nf=XO,Lb=function(){var t=/[^.]+$/.exec(Nf&&Nf.keys&&Nf.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function qO(t){return!!Lb&&Lb in t}var KO=qO,JO=Function.prototype,YO=JO.toString;function ZO(t){if(t!=null){try{return YO.call(t)}catch{}try{return t+""}catch{}}return""}var zb=ZO,$O=Mb,eN=KO,tN=Fb,nN=zb,oN=/[\\^$.*+?()[\]{}|]/g,rN=/^\[object .+?Constructor\]$/,iN=Function.prototype,aN=Object.prototype,sN=iN.toString,lN=aN.hasOwnProperty,dN=RegExp("^"+sN.call(lN).replace(oN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cN(t){if(!tN(t)||eN(t))return!1;var e=$O(t)?dN:rN;return e.test(nN(t))}var uN=cN;function fN(t,e){return t==null?void 0:t[e]}var pN=fN,hN=uN,mN=pN;function gN(t,e){var n=mN(t,e);return hN(n)?n:void 0}var _i=gN,bN=_i,yN=Fo,vN=bN(yN,"Map"),Vf=vN,kN=_i,wN=kN(Object,"create"),td=wN,_b=td;function xN(){this.__data__=_b?_b(null):{},this.size=0}var SN=xN;function CN(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var AN=CN,EN=td,DN="__lodash_hash_undefined__",BN=Object.prototype,PN=BN.hasOwnProperty;function IN(t){var e=this.__data__;if(EN){var n=e[t];return n===DN?void 0:n}return PN.call(e,t)?e[t]:void 0}var ON=IN,NN=td,VN=Object.prototype,RN=VN.hasOwnProperty;function TN(t){var e=this.__data__;return NN?e[t]!==void 0:RN.call(e,t)}var FN=TN,MN=td,LN="__lodash_hash_undefined__";function zN(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=MN&&e===void 0?LN:e,this}var _N=zN,HN=SN,UN=AN,WN=ON,jN=FN,GN=_N;function Hi(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}Hi.prototype.clear=HN,Hi.prototype.delete=UN,Hi.prototype.get=WN,Hi.prototype.has=jN,Hi.prototype.set=GN;var QN=Hi,Hb=QN,XN=$l,qN=Vf;function KN(){this.size=0,this.__data__={hash:new Hb,map:new(qN||XN),string:new Hb}}var JN=KN;function YN(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var ZN=YN,$N=ZN;function eV(t,e){var n=t.__data__;return $N(e)?n[typeof e=="string"?"string":"hash"]:n.map}var nd=eV,tV=nd;function nV(t){var e=tV(this,t).delete(t);return this.size-=e?1:0,e}var oV=nV,rV=nd;function iV(t){return rV(this,t).get(t)}var aV=iV,sV=nd;function lV(t){return sV(this,t).has(t)}var dV=lV,cV=nd;function uV(t,e){var n=cV(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}var fV=uV,pV=JN,hV=oV,mV=aV,gV=dV,bV=fV;function Ui(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}Ui.prototype.clear=pV,Ui.prototype.delete=hV,Ui.prototype.get=mV,Ui.prototype.has=gV,Ui.prototype.set=bV;var Ub=Ui,yV=$l,vV=Vf,kV=Ub,wV=200;function xV(t,e){var n=this.__data__;if(n instanceof yV){var o=n.__data__;if(!vV||o.length<wV-1)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new kV(o)}return n.set(t,e),this.size=n.size,this}var SV=xV,CV=$l,AV=uO,EV=pO,DV=mO,BV=bO,PV=SV;function Wi(t){var e=this.__data__=new CV(t);this.size=e.size}Wi.prototype.clear=AV,Wi.prototype.delete=EV,Wi.prototype.get=DV,Wi.prototype.has=BV,Wi.prototype.set=PV;var IV=Wi,OV="__lodash_hash_undefined__";function NV(t){return this.__data__.set(t,OV),this}var VV=NV;function RV(t){return this.__data__.has(t)}var TV=RV,FV=Ub,MV=VV,LV=TV;function od(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new FV;++e<n;)this.add(t[e])}od.prototype.add=od.prototype.push=MV,od.prototype.has=LV;var zV=od;function _V(t,e){for(var n=-1,o=t==null?0:t.length;++n<o;)if(e(t[n],n,t))return!0;return!1}var HV=_V;function UV(t,e){return t.has(e)}var WV=UV,jV=zV,GV=HV,QV=WV,XV=1,qV=2;function KV(t,e,n,o,i,a){var s=n&XV,l=t.length,c=e.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(t),h=a.get(e);if(u&&h)return u==e&&h==t;var p=-1,m=!0,b=n&qV?new jV:void 0;for(a.set(t,e),a.set(e,t);++p<l;){var y=t[p],v=e[p];if(o)var k=s?o(v,y,p,e,t,a):o(y,v,p,t,e,a);if(k!==void 0){if(k)continue;m=!1;break}if(b){if(!GV(e,function(x,C){if(!QV(b,C)&&(y===x||i(y,x,n,o,a)))return b.push(C)})){m=!1;break}}else if(!(y===v||i(y,v,n,o,a))){m=!1;break}}return a.delete(t),a.delete(e),m}var Wb=KV,JV=Fo,YV=JV.Uint8Array,ZV=YV;function $V(t){var e=-1,n=Array(t.size);return t.forEach(function(o,i){n[++e]=[i,o]}),n}var eR=$V;function tR(t){var e=-1,n=Array(t.size);return t.forEach(function(o){n[++e]=o}),n}var nR=tR,jb=Of,Gb=ZV,oR=Ib,rR=Wb,iR=eR,aR=nR,sR=1,lR=2,dR="[object Boolean]",cR="[object Date]",uR="[object Error]",fR="[object Map]",pR="[object Number]",hR="[object RegExp]",mR="[object Set]",gR="[object String]",bR="[object Symbol]",yR="[object ArrayBuffer]",vR="[object DataView]",Qb=jb?jb.prototype:void 0,Rf=Qb?Qb.valueOf:void 0;function kR(t,e,n,o,i,a,s){switch(n){case vR:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case yR:return!(t.byteLength!=e.byteLength||!a(new Gb(t),new Gb(e)));case dR:case cR:case pR:return oR(+t,+e);case uR:return t.name==e.name&&t.message==e.message;case hR:case gR:return t==e+"";case fR:var l=iR;case mR:var c=o&sR;if(l||(l=aR),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;o|=lR,s.set(t,e);var h=rR(l(t),l(e),o,i,a,s);return s.delete(t),h;case bR:if(Rf)return Rf.call(t)==Rf.call(e)}return!1}var wR=kR;function xR(t,e){for(var n=-1,o=e.length,i=t.length;++n<o;)t[i+n]=e[n];return t}var SR=xR,CR=Array.isArray,Tf=CR,AR=SR,ER=Tf;function DR(t,e,n){var o=e(t);return ER(t)?o:AR(o,n(t))}var BR=DR;function PR(t,e){for(var n=-1,o=t==null?0:t.length,i=0,a=[];++n<o;){var s=t[n];e(s,n,t)&&(a[i++]=s)}return a}var IR=PR;function OR(){return[]}var NR=OR,VR=IR,RR=NR,TR=Object.prototype,FR=TR.propertyIsEnumerable,Xb=Object.getOwnPropertySymbols,MR=Xb?function(t){return t==null?[]:(t=Object(t),VR(Xb(t),function(e){return FR.call(t,e)}))}:RR,LR=MR;function zR(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o}var _R=zR;function HR(t){return t!=null&&typeof t=="object"}var rd=HR,UR=ed,WR=rd,jR="[object Arguments]";function GR(t){return WR(t)&&UR(t)==jR}var QR=GR,qb=QR,XR=rd,Kb=Object.prototype,qR=Kb.hasOwnProperty,KR=Kb.propertyIsEnumerable,JR=qb(function(){return arguments}())?qb:function(t){return XR(t)&&qR.call(t,"callee")&&!KR.call(t,"callee")},YR=JR,id={exports:{}};function ZR(){return!1}var $R=ZR;id.exports,function(t,e){var n=Fo,o=$R,i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,l=s?n.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||o;t.exports=u}(id,id.exports);var Jb=id.exports,eT=9007199254740991,tT=/^(?:0|[1-9]\d*)$/;function nT(t,e){var n=typeof t;return e=e??eT,!!e&&(n=="number"||n!="symbol"&&tT.test(t))&&t>-1&&t%1==0&&t<e}var oT=nT,rT=9007199254740991;function iT(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=rT}var Yb=iT,aT=ed,sT=Yb,lT=rd,dT="[object Arguments]",cT="[object Array]",uT="[object Boolean]",fT="[object Date]",pT="[object Error]",hT="[object Function]",mT="[object Map]",gT="[object Number]",bT="[object Object]",yT="[object RegExp]",vT="[object Set]",kT="[object String]",wT="[object WeakMap]",xT="[object ArrayBuffer]",ST="[object DataView]",CT="[object Float32Array]",AT="[object Float64Array]",ET="[object Int8Array]",DT="[object Int16Array]",BT="[object Int32Array]",PT="[object Uint8Array]",IT="[object Uint8ClampedArray]",OT="[object Uint16Array]",NT="[object Uint32Array]",st={};st[CT]=st[AT]=st[ET]=st[DT]=st[BT]=st[PT]=st[IT]=st[OT]=st[NT]=!0,st[dT]=st[cT]=st[xT]=st[uT]=st[ST]=st[fT]=st[pT]=st[hT]=st[mT]=st[gT]=st[bT]=st[yT]=st[vT]=st[kT]=st[wT]=!1;function VT(t){return lT(t)&&sT(t.length)&&!!st[aT(t)]}var RT=VT;function TT(t){return function(e){return t(e)}}var FT=TT,ad={exports:{}};ad.exports,function(t,e){var n=Ob,o=e&&!e.nodeType&&e,i=o&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===o,s=a&&n.process,l=function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();t.exports=l}(ad,ad.exports);var MT=ad.exports,LT=RT,zT=FT,Zb=MT,$b=Zb&&Zb.isTypedArray,_T=$b?zT($b):LT,ey=_T,HT=_R,UT=YR,WT=Tf,jT=Jb,GT=oT,QT=ey,XT=Object.prototype,qT=XT.hasOwnProperty;function KT(t,e){var n=WT(t),o=!n&&UT(t),i=!n&&!o&&jT(t),a=!n&&!o&&!i&&QT(t),s=n||o||i||a,l=s?HT(t.length,String):[],c=l.length;for(var u in t)(e||qT.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||GT(u,c)))&&l.push(u);return l}var JT=KT,YT=Object.prototype;function ZT(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||YT;return t===n}var $T=ZT;function eF(t,e){return function(n){return t(e(n))}}var tF=eF,nF=tF,oF=nF(Object.keys,Object),rF=oF,iF=$T,aF=rF,sF=Object.prototype,lF=sF.hasOwnProperty;function dF(t){if(!iF(t))return aF(t);var e=[];for(var n in Object(t))lF.call(t,n)&&n!="constructor"&&e.push(n);return e}var cF=dF,uF=Mb,fF=Yb;function pF(t){return t!=null&&fF(t.length)&&!uF(t)}var hF=pF,mF=JT,gF=cF,bF=hF;function yF(t){return bF(t)?mF(t):gF(t)}var vF=yF,kF=BR,wF=LR,xF=vF;function SF(t){return kF(t,xF,wF)}var CF=SF,ty=CF,AF=1,EF=Object.prototype,DF=EF.hasOwnProperty;function BF(t,e,n,o,i,a){var s=n&AF,l=ty(t),c=l.length,u=ty(e),h=u.length;if(c!=h&&!s)return!1;for(var p=c;p--;){var m=l[p];if(!(s?m in e:DF.call(e,m)))return!1}var b=a.get(t),y=a.get(e);if(b&&y)return b==e&&y==t;var v=!0;a.set(t,e),a.set(e,t);for(var k=s;++p<c;){m=l[p];var x=t[m],C=e[m];if(o)var P=s?o(C,x,m,e,t,a):o(x,C,m,t,e,a);if(!(P===void 0?x===C||i(x,C,n,o,a):P)){v=!1;break}k||(k=m=="constructor")}if(v&&!k){var O=t.constructor,E=e.constructor;O!=E&&"constructor"in t&&"constructor"in e&&!(typeof O=="function"&&O instanceof O&&typeof E=="function"&&E instanceof E)&&(v=!1)}return a.delete(t),a.delete(e),v}var PF=BF,IF=_i,OF=Fo,NF=IF(OF,"DataView"),VF=NF,RF=_i,TF=Fo,FF=RF(TF,"Promise"),MF=FF,LF=_i,zF=Fo,_F=LF(zF,"Set"),HF=_F,UF=_i,WF=Fo,jF=UF(WF,"WeakMap"),GF=jF,Ff=VF,Mf=Vf,Lf=MF,zf=HF,_f=GF,ny=ed,ji=zb,oy="[object Map]",QF="[object Object]",ry="[object Promise]",iy="[object Set]",ay="[object WeakMap]",sy="[object DataView]",XF=ji(Ff),qF=ji(Mf),KF=ji(Lf),JF=ji(zf),YF=ji(_f),Yr=ny;(Ff&&Yr(new Ff(new ArrayBuffer(1)))!=sy||Mf&&Yr(new Mf)!=oy||Lf&&Yr(Lf.resolve())!=ry||zf&&Yr(new zf)!=iy||_f&&Yr(new _f)!=ay)&&(Yr=function(t){var e=ny(t),n=e==QF?t.constructor:void 0,o=n?ji(n):"";if(o)switch(o){case XF:return sy;case qF:return oy;case KF:return ry;case JF:return iy;case YF:return ay}return e});var ZF=Yr,Hf=IV,$F=Wb,eM=wR,tM=PF,ly=ZF,dy=Tf,cy=Jb,nM=ey,oM=1,uy="[object Arguments]",fy="[object Array]",sd="[object Object]",rM=Object.prototype,py=rM.hasOwnProperty;function iM(t,e,n,o,i,a){var s=dy(t),l=dy(e),c=s?fy:ly(t),u=l?fy:ly(e);c=c==uy?sd:c,u=u==uy?sd:u;var h=c==sd,p=u==sd,m=c==u;if(m&&cy(t)){if(!cy(e))return!1;s=!0,h=!1}if(m&&!h)return a||(a=new Hf),s||nM(t)?$F(t,e,n,o,i,a):eM(t,e,c,n,o,i,a);if(!(n&oM)){var b=h&&py.call(t,"__wrapped__"),y=p&&py.call(e,"__wrapped__");if(b||y){var v=b?t.value():t,k=y?e.value():e;return a||(a=new Hf),i(v,k,n,o,a)}}return m?(a||(a=new Hf),tM(t,e,n,o,i,a)):!1}var aM=iM,sM=aM,hy=rd;function my(t,e,n,o,i){return t===e?!0:t==null||e==null||!hy(t)&&!hy(e)?t!==t&&e!==e:sM(t,e,n,o,my,i)}var lM=my,dM=lM;function cM(t,e){return dM(t,e)}var uM=cM;const fM=wa(uM);function Gi(t,e,n){let o=n.initialDeps??[],i;return()=>{var a,s,l,c;let u;n.key&&((a=n.debug)!=null&&a.call(n))&&(u=Date.now());const h=t();if(!(h.length!==o.length||h.some((b,y)=>o[y]!==b)))return i;o=h;let m;if(n.key&&((s=n.debug)!=null&&s.call(n))&&(m=Date.now()),i=e(...h),n.key&&((l=n.debug)!=null&&l.call(n))){const b=Math.round((Date.now()-u)*100)/100,y=Math.round((Date.now()-m)*100)/100,v=y/16,k=(x,C)=>{for(x=String(x);x.length<C;)x=" "+x;return x};console.info(`%c⏱ ${k(y,5)} /${k(b,5)} ms`,`
127
127
  font-size: .6rem;
128
128
  font-weight: bold;
129
- color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(c=n==null?void 0:n.onChange)==null||c.call(n,i),i}}function Uf(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const pM=(t,e)=>Math.abs(t-e)<1,hM=(t,e,n)=>{let o;return function(...i){t.clearTimeout(o),o=t.setTimeout(()=>e.apply(this,i),n)}};var is={env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_4404d514-7ecb-46ca-abbe-c8673210fee6",npm_package_exports___require:"./dist/feedmepos-ui-library.umd.cjs",npm_package_dependencies_prettier:"^3.2.5",npm_package_devDependencies__types_node:"^18.19.21",DOTNET_NOLOGO:"1",npm_package_devDependencies__originjs_vite_plugin_federation:"^1.3.5",USER:"runner",npm_package_dependencies__rollup_plugin_commonjs:"^26.0.1",npm_config_user_agent:"pnpm/9.15.9 npm/? node/v20.20.2 linux x64",CI:"true",npm_package_dependencies_v_wave:"^1.5.1",npm_package_dependencies_vue:"^3.4.21",USE_BAZEL_FALLBACK_VERSION:"silent:",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_4404d514-7ecb-46ca-abbe-c8673210fee6",PIPX_HOME:"/opt/pipx",npm_package_dependencies__types_lodash:"^4.17.7",npm_package_devDependencies_tsc_alias:"^1.8.8",npm_package_devDependencies_vite:"^5.1.4",npm_package_peerDependencies_tailwindcss:"^3.4.1",npm_node_execpath:"/opt/hostedtoolcache/node/20.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_files_0:"dist",npm_package_scripts_build_lib:"vite build --mode library",npm_package_dependencies_vue_virtual_scroller:"2.0.0-beta.8",HOME:"/home/runner",npm_package_exports___meta_types:"./dist/meta.d.ts",npm_package_dependencies_chart_js:"^4.4.2",npm_package_devDependencies_sass:"^1.71.1",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_devDependencies_eslint_config_prettier:"^9.1.0",npm_package_devDependencies_vite_plugin_static_copy:"^0.17.1",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"feedmepos",npm_package_scripts_build_components:'run-p type-check "build-lib {@}" --',GRADLE_HOME:"/usr/share/gradle-9.5.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/29.0.14206865",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",GITHUB_RETENTION_DAYS:"90",npm_package_scripts_type_check:"vue-tsc --noEmit -p tsconfig.app.json --composite false",npm_package_dependencies__tanstack_vue_virtual:"^3.13.0",npm_package_devDependencies_npm_run_all2:"^6.1.2",npm_package_peerDependencies_vue:"^3.4.21",GITHUB_REPOSITORY_OWNER_ID:"54831515",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-Linux",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_build_federation:"vite build --mode federation && cp -r ./temp/assets ./dist/federation && rm -rf ./temp",npm_package_devDependencies_vue_component_meta:"^2.0.13",SYSTEMD_EXEC_PID:"1858",ACTIONS_ORCHESTRATION_ID:"0435405b-4128-4f38-af9a-8818affece06.deploy.__default",npm_package_dependencies_dayjs:"^1.11.10",npm_package_devDependencies__tsconfig_node18:"^18.2.2",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_devDependencies_tailwindcss:"^3.4.1",npm_package_devDependencies_typescript:"~5.2.2",JAVA_HOME_25_X64:"/usr/lib/jvm/temurin-25-jdk-amd64",NVM_DIR:"/home/runner/.nvm",npm_package_homepage:"ui.feedme.ai",npm_package_devDependencies_vue_tsc:"^1.8.27",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20260513.135.3",npm_package_scripts_dev:"vite --port 5273",LOGNAME:"runner",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",STORE_PATH:"/home/runner/setup-pnpm/node_modules/.bin/store/v3",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_type:"module",npm_package_dependencies__vueuse_core:"^10.9.0",npm_package_devDependencies__vue_tsconfig:"^0.4.0",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.12/x64",JOURNAL_STREAM:"9:15640",GITHUB_WORKFLOW:"Publish Vue",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_module:"./dist/feedmepos-ui-library.js",npm_package_devDependencies_autoprefixer:"^10.4.17",RUNNER_DEBUG:"1",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure",GOROOT_1_24_X64:"/opt/hostedtoolcache/go/1.24.13/x64",npm_package_scripts_build_tailwind_plugin:"vite build --mode tailwind-plugin",npm_package_scripts_lint:"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",npm_package_dependencies_fuzzy:"^0.1.3",npm_package_devDependencies__types_uuid:"^10.0.0",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GOROOT_1_25_X64:"/opt/hostedtoolcache/go/1.25.10/x64",GITHUB_RUN_ID:"25870945920",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"4fa9e56e653aef7b55fdd413969ec977d8dee48a",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",npm_package_exports___import:"./dist/feedmepos-ui-library.js",npm_package_devDependencies__vitejs_plugin_vue:"^5.0.4",GITHUB_WORKFLOW_REF:"feedmepos/ui-library/.github/workflows/publish-vue.yml@refs/heads/main",GITHUB_ACTION_REPOSITORY:"",ENABLE_RUNNER_TRACING:"true",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.20.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_47628c0d-97f0-48d2-9a39-9547592a07f6",INVOCATION_ID:"b00ff4a2f30445a5bebb78912cb2548e",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.20.2/x64/bin/node",npm_package_name:"@feedmepos/ui-library",npm_package_repository_type:"git",GITHUB_ACTION:"__run_4",GITHUB_RUN_NUMBER:"345",GITHUB_TRIGGERING_ACTOR:"heiseshandian",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies_vue_country_flag_next:"^2.3.2",npm_config_frozen_lockfile:"",npm_package_exports___styles_css:"./dist/style.css",npm_package_scripts_build_tailwind_styling:"vite build --mode tailwind-styling",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_scripts_generate_component_meta:"node ./scripts/generate-component-meta.js",npm_package_devDependencies__vue_eslint_config_typescript:"^12.0.0",npm_package_devDependencies_eslint:"^8.57.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 1000069014",XDG_CONFIG_HOME:"/home/runner/.config",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"feedmepos/ui-library",npm_package_main:"./dist/feedmepos-ui-library.umd.cjs",npm_package_scripts_build_types:"vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false",npm_package_devDependencies__types_debounce:"^1.2.4",npm_lifecycle_script:"vite build --mode library",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_exports___tailwind_plugin:"./dist/tailwind-plugin.js",npm_package_devDependencies__vitejs_plugin_vue_jsx:"^3.1.0",SHELL:"/bin/bash",GITHUB_REPOSITORY_ID:"677015340",GITHUB_ACTIONS:"true",NODE_PATH:"/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/run-p/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.10.5",npm_package_repository_url:"git+https://github.com/feedmepos/ui-library.git",npm_package_dependencies__tanstack_vue_table:"^8.13.2",npm_package_dependencies_vuedraggable:"^4.1.0",npm_package_devDependencies__rushstack_eslint_patch:"^1.7.2",npm_package_devDependencies_eslint_plugin_unused_imports:"^4.3.0",npm_lifecycle_event:"build-lib",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build",npm_package_dependencies_uuid:"^10.0.0",GITHUB_WORKSPACE:"/home/runner/work/ui-library/ui-library",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",npm_package_dependencies_lodash:"^4.17.21",GITHUB_SHA:"4fa9e56e653aef7b55fdd413969ec977d8dee48a",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies_vue_router:"^4.3.0",npm_package_devDependencies_vite_plugin_top_level_await:"^1.4.1",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"heiseshandian",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_pack:"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../",npm_package_exports___tailwind_styling:"./dist/tailwind-styling.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_4404d514-7ecb-46ca-abbe-c8673210fee6",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/ui-library/ui-library/packages/vue",GITHUB_ACTOR_ID:"7780463",RUNNER_WORKSPACE:"/home/runner/work/ui-library",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_4404d514-7ecb-46ca-abbe-c8673210fee6",npm_package_exports___types:"./dist/index.d.ts",npm_package_devDependencies__types_chart_js:"^2.9.41",npm_config_recursive:"true",EDGEWEBDRIVER:"/usr/local/share/edge_driver",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_devDependencies_eslint_plugin_vue:"^9.22.0",npm_package_devDependencies_postcss:"^8.4.35",npm_package_peerDependencies_vite:"^5.1.4",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.3.13750724",SGX_AESM_ADDR:"1",PSModulePath:"/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules:/usr/share/az_14.6.0",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_scripts_deploy:"pnpm run build:lib && pnpm publish --no-git-checks .",npm_package_dependencies__floating_ui_vue:"^1.0.6",npm_package_dependencies_debounce:"^2.0.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",npm_package_bugs:"https://feedmepos.atlassian.net/browse/CT-3",npm_package_scripts_register_components:"node ./scripts/register-components.js && pnpm lint",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_4404d514-7ecb-46ca-abbe-c8673210fee6",INIT_CWD:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_scripts_copy_changelog:"cp ./CHANGELOG.md ./dist/CHANGELOG.md",npm_package_dependencies_chartjs_plugin_datalabels:"^2.2.0",npm_package_dependencies_libphonenumber_js:"^1.10.57",NODE_ENV:"production"}};const mM=t=>t,gM=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),o=[];for(let i=e;i<=n;i++)o.push(i);return o},bM=(t,e)=>{const n=t.scrollElement;if(!n)return;const o=t.targetWindow;if(!o)return;const i=s=>{const{width:l,height:c}=s;e({width:Math.round(l),height:Math.round(c)})};if(i(n.getBoundingClientRect()),!o.ResizeObserver)return()=>{};const a=new o.ResizeObserver(s=>{const l=()=>{const c=s[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(n.getBoundingClientRect())};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},gy={passive:!0},by=typeof window>"u"?!0:"onscrollend"in window,yM=(t,e)=>{const n=t.scrollElement;if(!n)return;const o=t.targetWindow;if(!o)return;let i=0;const a=t.options.useScrollendEvent&&by?()=>{}:hM(o,()=>{e(i,!1)},t.options.isScrollingResetDelay),s=h=>()=>{const{horizontal:p,isRtl:m}=t.options;i=p?n.scrollLeft*(m&&-1||1):n.scrollTop,a(),e(i,h)},l=s(!0),c=s(!1);c(),n.addEventListener("scroll",l,gy);const u=t.options.useScrollendEvent&&by;return u&&n.addEventListener("scrollend",c,gy),()=>{n.removeEventListener("scroll",l),u&&n.removeEventListener("scrollend",c)}},vM=(t,e,n)=>{if(e!=null&&e.borderBoxSize){const o=e.borderBoxSize[0];if(o)return Math.round(o[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(t.getBoundingClientRect()[n.options.horizontal?"width":"height"])},kM=(t,{adjustments:e=0,behavior:n},o)=>{var i,a;const s=t+e;(a=(i=o.scrollElement)==null?void 0:i.scrollTo)==null||a.call(i,{[o.options.horizontal?"left":"top"]:s,behavior:n})};class wM{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const o=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(a=>{const s=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()})}));return{disconnect:()=>{var i;(i=o())==null||i.disconnect(),n=null},observe:i=>{var a;return(a=o())==null?void 0:a.observe(i,{box:"border-box"})},unobserve:i=>{var a;return(a=o())==null?void 0:a.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([o,i])=>{typeof i>"u"&&delete n[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:mM,rangeExtractor:gM,onChange:()=>{},measureElement:vM,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var o,i;(i=(o=this.options).onChange)==null||i.call(o,this,n)},this.maybeNotify=Gi(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:is.env.NODE_ENV!=="production",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.maybeNotify();return}this.scrollElement=o,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=a,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,o)=>{const i=new Map,a=new Map;for(let s=o-1;s>=0;s--){const l=n[s];if(i.has(l.lane))continue;const c=a.get(l.lane);if(c==null||l.end>c.end?a.set(l.lane,l):l.end<c.end&&i.set(l.lane,!0),i.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((s,l)=>s.end===l.end?s.index-l.index:s.end-l.end)[0]:void 0},this.getMeasurementOptions=Gi(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,o,i,a,s)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:o,scrollMargin:i,getItemKey:a,enabled:s}),{key:!1}),this.getMeasurements=Gi(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:o,scrollMargin:i,getItemKey:a,enabled:s},l)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,c);for(let h=c;h<n;h++){const p=a(h),m=this.options.lanes===1?u[h-1]:this.getFurthestMeasurement(u,h),b=m?m.end+this.options.gap:o+i,y=l.get(p),v=typeof y=="number"?y:this.options.estimateSize(h),k=b+v,x=m?m.lane:h%this.options.lanes;u[h]={index:h,start:b,size:v,end:k,key:p,lane:x}}return this.measurementsCache=u,u},{key:is.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.calculateRange=Gi(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,o,i)=>this.range=n.length>0&&o>0?xM({measurements:n,outerSize:o,scrollOffset:i}):null,{key:is.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.getVirtualIndexes=Gi(()=>{let n=null,o=null;const i=this.calculateRange();return i&&(n=i.startIndex,o=i.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,o]},(n,o,i,a,s)=>a===null||s===null?[]:n({startIndex:a,endIndex:s,overscan:o,count:i}),{key:is.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.indexFromElement=n=>{const o=this.options.indexAttribute,i=n.getAttribute(o);return i?parseInt(i,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(n,o)=>{const i=this.indexFromElement(n),a=this.measurementsCache[i];if(!a)return;const s=a.key,l=this.elementsCache.get(s);l!==n&&(l&&this.observer.unobserve(l),this.observer.observe(n),this.elementsCache.set(s,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,o,this))},this.resizeItem=(n,o)=>{const i=this.measurementsCache[n];if(!i)return;const a=this.itemSizeCache.get(i.key)??i.size,s=o-a;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,s,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,o)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((o,i)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=Gi(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,o)=>{const i=[];for(let a=0,s=n.length;a<s;a++){const l=n[a],c=o[l];i.push(c)}return i},{key:is.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const o=this.getMeasurements();if(o.length!==0)return Uf(o[yy(0,o.length-1,i=>Uf(o[i]).start,n)])},this.getOffsetForAlignment=(n,o)=>{const i=this.getSize(),a=this.getScrollOffset();o==="auto"&&n>=a+i&&(o="end"),o==="end"&&(n-=i);const s=this.options.horizontal?"scrollWidth":"scrollHeight",c=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-i;return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,o="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const a=this.getSize(),s=this.getScrollOffset();if(o==="auto")if(i.end>=s+a-this.options.scrollPaddingEnd)o="end";else if(i.start<=s+this.options.scrollPaddingStart)o="start";else return[s,o];const l=i.start-this.options.scrollPaddingStart+(i.size-a)/2;switch(o){case"center":return[this.getOffsetForAlignment(l,o),o];case"end":return[this.getOffsetForAlignment(i.end+this.options.scrollPaddingEnd,o),o];default:return[this.getOffsetForAlignment(i.start-this.options.scrollPaddingStart,o),o]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:o="start",behavior:i}={})=>{this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,o),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:o="auto",behavior:i}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(n,o);if(!a)return;const[s,l]=a;this._scrollToOffset(s,{adjustments:void 0,behavior:i}),i!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[u]=Uf(this.getOffsetForIndex(n,l));pM(u,this.getScrollOffset())||this.scrollToIndex(n,{align:l,behavior:i})}else this.scrollToIndex(n,{align:l,behavior:i})}))},this.scrollBy=(n,{behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var n;const o=this.getMeasurements();let i;return o.length===0?i=this.options.paddingStart:i=this.options.lanes===1?((n=o[o.length-1])==null?void 0:n.end)??0:Math.max(...o.slice(-this.options.lanes).map(a=>a.end)),Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:o,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const yy=(t,e,n,o)=>{for(;t<=e;){const i=(t+e)/2|0,a=n(i);if(a<o)t=i+1;else if(a>o)e=i-1;else return i}return t>0?t-1:0};function xM({measurements:t,outerSize:e,scrollOffset:n}){const o=t.length-1,a=yy(0,o,l=>t[l].start,n);let s=a;for(;s<o&&t[s].end<n+e;)s++;return{startIndex:a,endIndex:s}}function SM(t){const e=new wM(r.unref(t)),n=r.shallowRef(e),o=e._didMount();return r.watch(()=>r.unref(t).getScrollElement(),i=>{i&&e._willUpdate()},{immediate:!0}),r.watch(()=>r.unref(t),i=>{e.setOptions({...i,onChange:(a,s)=>{var l;r.triggerRef(n),(l=i.onChange)==null||l.call(i,a,s)}}),e._willUpdate(),r.triggerRef(n)},{immediate:!0}),r.onScopeDispose(o),n}function CM(t){return SM(r.computed(()=>({observeElementRect:bM,observeElementOffset:yM,scrollToFn:kM,...r.unref(t)})))}const AM={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},EM={class:"text-fm-color-typo-secondary"},DM=["onClick"],BM={key:0},PM={key:0,class:"w-full"},IM={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},OM={class:"text-fm-color-typo-secondary"},NM=["onClick"],VM=["colspan"],RM={key:1,class:"virtual-table-container w-full"},TM={class:"sticky top-0 z-10 w-full"},FM={class:"w-full"},MM=["onClick"],LM={class:"flex gap-8 items-center"},zM={class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"},_M={class:"flex gap-8"},HM=Ie(r.defineComponent({__name:"FmTable",props:{modelValue:{default:{}},selection:{default:void 0},rowData:{default:()=>[]},columnDefs:{default:()=>[]},columnFilter:{default:void 0},searchValue:{default:""},pageCount:{default:0},rowCount:{default:void 0},fetchFn:{type:Function,default:void 0},pageSize:{default:10},loading:{type:Boolean,default:void 0},pinHeaderRow:{type:Boolean,default:!0},hideHeaderRow:{type:Boolean},rowClassName:{},onRowClick:{type:Function,default:void 0},autoResetPageIndex:{type:Boolean},shrinkAt:{type:[String,Number,Boolean],default:"sm"},hideFooter:{type:Boolean},forceMobileFooter:{type:Boolean},columnVisibility:{},draggable:{type:[Boolean,Function]},wholeRowDraggable:{type:Boolean},expandedState:{type:[Boolean,Object]},getRowCanExpand:{type:Function,default:()=>!0},getSubRow:{type:Function,default:t=>t.subRows},onVuedraggableMove:{type:Function,default:()=>!0},virtual:{type:Boolean,default:!1},virtualRowHeight:{default:48},getRowId:{}},emits:["sort-change","dnd-changed","update:expanded-state","update:dragging"],setup(t,{emit:e}){const n=t,o=e;if(n.virtual&&n.draggable)throw new Error("Cannot use virtual scroll and draggable at the same time");const i=Te(n,"modelValue"),a=Te(n,"searchValue"),s=r.ref(n.rowData),l=r.ref(!1);r.watch(()=>l.value,D=>{o("update:dragging",D),D&&o("update:expanded-state",{})});const c=()=>{let D=[];n.selection&&D.push({id:"row-selection",header:({table:q})=>r.createVNode(Bb,{checked:q.getIsAllPageRowsSelected(),indeterminate:q.getIsSomePageRowsSelected(),onChange:q.getToggleAllPageRowsSelectedHandler()},null),cell:({row:q})=>q.depth===0?r.createVNode(Bb,{checked:q==null?void 0:q.getIsSelected(),disabled:!(q!=null&&q.getCanSelect()),onChange:q==null?void 0:q.getToggleSelectedHandler()},null):r.createVNode("div",null,null),enableResizing:!1,meta:{headerClass:"py-[2px] pl-4 pr-16",cellClass:"pl-4 pr-16",width:"60px"},size:60});const U=n.draggable;return U&&!n.wholeRowDraggable&&D.push({id:"row-drag",header:"",cell:({row:q})=>(typeof U=="function"?U(q.original,q.index):U)&&q.depth===0?r.h("div",{class:["w-full flex",n.selection?"justify-end":"justify-start"]},r.h(we,{prependIcon:"drag_handle",variant:"tertiary",class:"cursor-move",type:"button",onMousedown:()=>{l.value=!0},onMouseup:()=>{l.value=!1}})):typeof U=="function"?r.h("div",{class:["w-full flex",n.selection?"justify-end":"justify-start"]},r.h(we,{prependIcon:"drag_handle",variant:"tertiary",class:"cursor-move",type:"button",disabled:!0})):r.createVNode("div",null,null),enableResizing:!1,meta:{cellClass:"dnd-handler",width:"60px"},size:60}),[...D,...n.columnDefs]},u=r.ref([]);r.watch(()=>u.value,D=>{o("sort-change",D)}),r.watch(()=>n.rowData,D=>{s.value=[...D]},{deep:!0});const h=r.ref({pageIndex:0,pageSize:n.pageSize}),p=TI({get enableRowSelection(){return!!n.selection},get enableMultiRowSelection(){return n.selection==="multiple"},get columns(){return c()},get data(){return s.value},getRowId:n.getRowId,state:{get pagination(){return typeof n.fetchFn=="function"?h.value:void 0},get globalFilter(){return a.value},get rowSelection(){return i.value},get sorting(){return u.value},get columnVisibility(){return n.columnVisibility},get expanded(){return n.expandedState}},getCoreRowModel:AI(),getSortedRowModel:NI(),getFilteredRowModel:II(),getPaginationRowModel:OI(),getRowCanExpand:n.getRowCanExpand,onExpandedChange:D=>{if(!n.expandedState)return;const U=typeof D=="function"?D(n.expandedState):D;o("update:expanded-state",U)},onRowSelectionChange:D=>{if(!v.value)return i.value=typeof D=="function"?D(i.value):D},onSortingChange:D=>{u.value=typeof D=="function"?D(u.value):D},onGlobalFilterChange:D=>{a.value=typeof D=="function"?D(a.value):D},autoResetPageIndex:n.autoResetPageIndex,manualPagination:typeof n.fetchFn=="function",...typeof n.fetchFn=="function"&&{onPaginationChange:D=>h.value=typeof D=="function"?D(h.value):D},pageCount:typeof n.fetchFn=="function"?n.pageCount:void 0,getSubRows:D=>n.getSubRow(D),getExpandedRowModel:EI(),get enableHiding(){return!0}});r.watch(()=>h.value,D=>{y(D)}),r.watch(()=>n.selection,()=>{p.setOptions(D=>({...D,get enableRowSelection(){return!!n.selection},get enableMultiRowSelection(){return n.selection==="multiple"},get columns(){return c()}}))});const m=r.ref(""),b=r.ref(!1);async function y(D){if(!n.fetchFn)return;b.value=!0;const U=`${Math.random()}`;m.value=U;try{await n.fetchFn(D)}catch{}finally{m.value===U&&(b.value=!1)}}const v=r.computed(()=>{const D=b.value;return typeof n.loading=="boolean"?n.loading:D});r.watch(()=>n.rowData,()=>{p.setOptions(D=>({...D,get data(){return s.value}}))}),r.watch([()=>n.pageCount,()=>n.rowCount],()=>{p.setOptions(D=>({...D,pageCount:n.pageCount,rowCount:n.rowCount}))}),r.watch(()=>n.pageSize,()=>{p.setPageSize(n.pageSize)}),r.watch([()=>n.columnFilter],([D])=>{p.setColumnFilters(()=>D??[])}),r.watch(()=>n.columnDefs,()=>{p.setOptions(D=>({...D,get columns(){return c()}}))}),r.onMounted(()=>{n.fetchFn&&n.fetchFn(p.getState().pagination),p.setPageSize(n.pageSize)});const k=r.ref(380);function x(D){var q;const U=((q=D.el)==null?void 0:q.scrollHeight)??0;k.value=Math.max(100,U)}const C=nr(),P=r.ref(),O=r.ref(typeof n.shrinkAt=="boolean"&&!n.shrinkAt?!1:C.isBreakpointKeyword(n.shrinkAt)&&C.isAtMost(n.shrinkAt)),E=r.computed(()=>{const D=[...Array.from(Array(Math.min(5,Math.floor(n.rowData.length/10))),(q,ne)=>(ne+1)*10).map(q=>({label:q.toString(),value:q}))],U={label:_("table.all"),value:n.rowData.length};return n.pageSize&&n.pageSize>0&&(D.some(q=>q.value===n.pageSize)||(D.push({label:n.pageSize.toString(),value:n.pageSize}),D.sort((q,ne)=>q.value-ne.value))),[...D,U]});function T(D){const U=D.el;if(!U||typeof n.shrinkAt>"u"||typeof n.shrinkAt=="boolean"&&!n.shrinkAt)return;const q=cf(function(){if(P.value=U.clientWidth,C.isBreakpointKeyword(n.shrinkAt)){O.value=C.isAtMost(n.shrinkAt);return}const ne=Number(n.shrinkAt);if(isNaN(ne)){O.value=!1;return}O.value=U.scrollWidth>=ne},200);U.resizeTable??(U.resizeTable=function(){O.value=C.isBreakpointKeyword(n.shrinkAt)&&C.isAtMost(n.shrinkAt),q()}),window.addEventListener("resize",U.resizeTable),U.resizeTable()}function A(D){const U=D.el;!U||typeof n.shrinkAt>"u"||typeof n.shrinkAt=="boolean"&&!n.shrinkAt||U.resizeTable&&window.removeEventListener("resize",U.resizeTable)}function M(D){const U=Math.min(...D.map(j=>j.index)),q=Math.max(...D.map(j=>j.index)),ne=s.value.slice(0,U),le=s.value.slice(q+1),ge=D.map(j=>j.original),ce=s.value.slice(U,q+1);fM(ge,ce)||o("dnd-changed",[...ne,...ge,...le])}const z=r.ref(),W=r.computed(()=>!n.virtual||!z.value?null:CM({count:p.getRowModel().rows.length,getScrollElement:()=>z.value||null,estimateSize:()=>n.virtualRowHeight,overscan:20})),Q=r.ref([]);function N(D){Q.value=D}function F(D,U){var ne;const q=(ne=D.column.columnDef.meta)==null?void 0:ne.colspan;return typeof q=="function"?q(U):q??1}function V(D){return D.getVisibleCells().filter(U=>F(U,D)!==0)}function R({draggedContext:D}){const U=n.draggable,q=D.index,ne=p.getRowModel().rows[q];let le=typeof U=="function"?U(ne.original,q):U;if(!le)return le;const ge=D.futureIndex,ce=p.getRowModel().rows[ge];return le=typeof U=="function"?U(ce.original,ge):U,le}return(D,U)=>{var le,ge;const q=r.resolveComponent("FmListItem"),ne=r.resolveComponent("FmList");return r.openBlock(),r.createElementBlock("div",{class:"flex flex-col h-full relative",onVnodeMounted:T,onVnodeUnmounted:A},[r.createElementVNode("div",{class:"overflow-y-auto",ref_key:"parentRef",ref:z},[O.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[v.value?(r.openBlock(),r.createElementBlock("div",{key:0,style:r.normalizeStyle({height:`${k.value}px`}),class:"pointer-events-none"},[r.createElementVNode("div",AM,[r.createVNode(rr),r.createVNode(Rr,{size:"xl"}),r.createElementVNode("div",null,[r.renderSlot(D.$slots,"loading-text",{},()=>[r.createElementVNode("span",EM,r.toDisplayString(r.unref(_)("table.loading")),1)],!0)]),r.createVNode(rr)])],4)):(r.openBlock(),r.createBlock(ne,{key:1,onVnodeMounted:x},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(p).getRowModel().rows,ce=>r.renderSlot(D.$slots,"list-row",r.mergeProps({key:ce.id,ref_for:!0},ce),()=>[r.createVNode(q,{class:r.normalizeClass([{"bg-fm-color-neutral-gray-100":ce.getIsSelected(),"cursor-pointer":typeof D.onRowClick=="function"}]),style:{padding:"0"},tag:"label"},{prepend:r.withCtx(()=>{var j,ee,H,J,ie;return[r.createVNode(r.unref(os),{props:(ee=(j=ce.getVisibleCells().find(Z=>Z.column.id==="row-selection"))==null?void 0:j.getContext)==null?void 0:ee.call(j),render:(ie=(J=(H=ce.getVisibleCells().find(Z=>Z.column.id==="row-selection"))==null?void 0:H.column)==null?void 0:J.columnDef)==null?void 0:ie.cell},null,8,["props","render"])]}),default:r.withCtx(()=>[r.createElementVNode("div",{class:"flex flex-col gap-4 grow p-8",onClick:j=>{var ee;return(ee=D.onRowClick)==null?void 0:ee.call(D,ce)}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(ce.getVisibleCells(),j=>{var ee;return r.openBlock(),r.createElementBlock(r.Fragment,{key:j.id},[j.column.id!=="row-selection"?(r.openBlock(),r.createElementBlock("div",BM,[r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-md-400",((ee=j.column.columnDef.meta)==null?void 0:ee.cellSpanClass)??"line-clamp-2 w-full"])},[r.createVNode(r.unref(os),{props:j.getContext(),render:j.column.columnDef.cell},null,8,["props","render"])],2)])):r.createCommentVNode("",!0)],64)}),128))],8,DM)]),_:2},1032,["class"])],!0)),128))]),_:3},512))],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[D.virtual?(r.openBlock(),r.createElementBlock("div",RM,[r.createElementVNode("div",TM,[r.createElementVNode("table",FM,[D.hideHeaderRow?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(Yl,{key:0,table:r.unref(p),class:"bg-fm-color-neutral-gray-100","onUpdate:columnWidths":N},null,8,["table"]))])]),r.createElementVNode("div",{class:"virtual-list relative",style:r.normalizeStyle({height:`${r.unref(p).getRowModel().rows.length*n.virtualRowHeight}px`,width:"100%"}),onVnodeMounted:x},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList((ge=(le=W.value)==null?void 0:le.value)==null?void 0:ge.getVirtualItems(),ce=>{var j,ee;return r.openBlock(),r.createElementBlock("div",{key:ce.index,style:r.normalizeStyle({position:"absolute",top:0,left:0,width:"100%",height:`${n.virtualRowHeight}px`,transform:`translateY(${ce.start}px)`,display:"flex",alignItems:"center",borderBottom:"1px solid var(--fm-color-neutral-gray-100)"}),class:r.normalizeClass([{"bg-fm-color-neutral-gray-100":(j=r.unref(p).getRowModel().rows[ce.index])==null?void 0:j.getIsSelected(),"cursor-pointer":typeof D.onRowClick=="function"},D.rowClassName,"hover:bg-fm-color-opacity-sm"]),onClick:H=>{var J;return(J=D.onRowClick)==null?void 0:J.call(D,r.unref(p).getRowModel().rows[ce.index])}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(((ee=r.unref(p).getRowModel().rows[ce.index])==null?void 0:ee.getVisibleCells())||[],(H,J)=>{var ie,Z,pe,ae;return r.openBlock(),r.createElementBlock("div",{key:H.id,class:r.normalizeClass(["virtual-cell","h-full flex items-center",((ie=H.column.columnDef.meta)==null?void 0:ie.cellClass)??"px-16"]),style:r.normalizeStyle({width:Q.value[J]?`${Q.value[J]}px`:"auto",flex:Q.value[J]?"0 0 auto":"1 1 0px",textAlign:((Z=H.column.columnDef.meta)==null?void 0:Z.textAlign)??"left",maxWidth:(pe=H.column.columnDef.meta)==null?void 0:pe.maxWidth})},[r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-md-400",((ae=H.column.columnDef.meta)==null?void 0:ae.cellSpanClass)??"line-clamp-2 w-full"])},[r.createVNode(r.unref(os),{props:H.getContext(),render:H.column.columnDef.cell},null,8,["props","render"])],2)],6)}),128))],14,MM)}),128))],4)])):(r.openBlock(),r.createElementBlock("table",PM,[!D.pinHeaderRow&&!D.hideHeaderRow?(r.openBlock(),r.createBlock(Yl,{key:0,table:r.unref(p)},null,8,["table"])):r.createCommentVNode("",!0),r.renderSlot(D.$slots,"pin-top",{},void 0,!0),v.value?(r.openBlock(),r.createElementBlock("tbody",{key:1,onVnodeMounted:x},[r.createElementVNode("div",{style:r.normalizeStyle({height:`${k.value}px`}),class:"pointer-events-none"},[r.createElementVNode("div",IM,[r.createVNode(rr),r.createVNode(Rr,{size:"xl"}),r.createElementVNode("div",null,[r.renderSlot(D.$slots,"loading-text",{},()=>[r.createElementVNode("span",OM,r.toDisplayString(r.unref(_)("table.loading")),1)],!0)]),r.createVNode(rr)])],4)],512)):(r.openBlock(),r.createBlock(r.unref(zs),{key:2,clone:r.unref(lf.clone),handle:Object.keys(n.expandedState??{}).length>0?".dnd-handler-disabled":".dnd-handler","model-value":r.unref(p).getRowModel().rows,move:R||D.onVuedraggableMove,"item-key":"id",tag:"tbody",onDragend:U[0]||(U[0]=ce=>l.value=!1),onDragstart:U[1]||(U[1]=ce=>l.value=!0),"onUpdate:modelValue":M,onVnodeMounted:x},{item:r.withCtx(({element:ce})=>[D.$slots["table-row"]?r.renderSlot(D.$slots,"table-row",r.normalizeProps(r.mergeProps({key:0},ce)),void 0,!0):(r.openBlock(),r.createElementBlock("tr",{key:1,class:r.normalizeClass([[{"bg-fm-color-neutral-gray-100":ce.getIsSelected(),"cursor-pointer":typeof D.onRowClick=="function","dnd-handler":(typeof D.draggable=="function"?D.draggable(ce.original,ce.index):D.draggable)&&D.wholeRowDraggable,"border-b border-fm-color-neutral-gray-100":ce.subRows.length===0&&ce.depth===0?!0:ce.depth===0?!ce.getIsExpanded():ce.index+1===ce.getParentRow().subRows.length},D.rowClassName],"hover:bg-fm-color-opacity-sm"]),onClick:j=>{var ee;return(ee=D.onRowClick)==null?void 0:ee.call(D,ce)}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V(ce),j=>{var ee,H,J,ie,Z,pe;return r.openBlock(),r.createElementBlock("td",{key:j.id,colspan:F(j,ce),class:r.normalizeClass([v.value?"hidden":"","h-[48px] text-fm-color-typo-primary",((ee=j.column.columnDef.meta)==null?void 0:ee.cellClass)??"px-16"]),style:r.normalizeStyle({width:(H=j.column.columnDef.meta)!=null&&H.width?(J=j.column.columnDef.meta)==null?void 0:J.width:j.column.getSize()!==0?`${j.column.getSize()}px`:void 0,maxWidth:(ie=j.column.columnDef.meta)==null?void 0:ie.maxWidth,textAlign:((Z=j.column.columnDef.meta)==null?void 0:Z.textAlign)??"left"})},[r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-md-400",((pe=j.column.columnDef.meta)==null?void 0:pe.cellSpanClass)??"line-clamp-2 w-full"])},[r.createVNode(r.unref(os),{props:j.getContext(),render:j.column.columnDef.cell},null,8,["props","render"])],2)],14,VM)}),128))],10,NM))]),_:3},8,["clone","handle","model-value","move"])),D.pinHeaderRow&&!D.hideHeaderRow?(r.openBlock(),r.createBlock(Yl,{key:3,table:r.unref(p),class:r.normalizeClass(["bg-fm-color-neutral-gray-100 top-0",{sticky:!l.value}]),"onUpdate:columnWidths":N},null,8,["table","class"])):r.createCommentVNode("",!0)]))],64))],512),D.hideFooter?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,style:r.normalizeStyle({maxWidth:P.value?`${P.value}px`:void 0}),class:"basis-72 bg-white flex items-center justify-between px-24"},[O.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([{"hidden invisible":D.forceMobileFooter},"flex gap-24 items-center justify-between xs:hidden xs:invisible"])},[r.createElementVNode("div",LM,[r.createElementVNode("span",zM,r.toDisplayString(r.unref(_)("table.itemsPerPage")),1),r.createVNode(Pb,{items:E.value,"model-value":r.unref(p).getState().pagination.pageSize,"onUpdate:modelValue":U[2]||(U[2]=ce=>r.unref(p).setPageSize(ce))},null,8,["items","model-value"])]),r.createElementVNode("span",{class:r.normalizeClass([{"hidden invisible":D.forceMobileFooter},"fm-typo-en-body-lg-400 text-fm-color-typo-secondary xs:hidden xs:invisible"])},r.toDisplayString(r.unref(_)("table.itemCount",{start:n.rowData.length<r.unref(p).getState().pagination.pageSize?n.rowData.length:r.unref(p).getState().pagination.pageIndex*r.unref(p).getState().pagination.pageSize+1,end:(r.unref(p).getState().pagination.pageIndex+1)*r.unref(p).getState().pagination.pageSize,total:n.rowCount??n.rowData.length})),3)],2)),r.createElementVNode("div",{class:r.normalizeClass(["flex gap-8 items-center",{"w-full justify-between":O.value||D.forceMobileFooter,"xs:w-full xs:justify-between":!O.value}])},[r.createVNode(Pb,{items:Array.from(Array(r.unref(p).getPageCount()),(ce,j)=>j+1).map(ce=>({label:ce.toString(),value:ce})),"model-value":r.unref(p).getState().pagination.pageIndex+1,"onUpdate:modelValue":U[3]||(U[3]=ce=>r.unref(p).setPageIndex(ce?ce-1:0))},null,8,["items","model-value"]),r.createElementVNode("span",{class:r.normalizeClass([{"mr-auto":O.value||D.forceMobileFooter},"fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto"])},r.toDisplayString(r.unref(_)("table.pageCount",{total:r.unref(p).getPageCount()})),3),r.createElementVNode("div",_M,[r.createVNode(we,{disabled:!r.unref(p).getCanPreviousPage(),icon:"chevron_left","icon-color":"neutral-black",variant:"tertiary",onClick:U[4]||(U[4]=()=>r.unref(p).previousPage())},null,8,["disabled"]),r.createVNode(we,{disabled:!r.unref(p).getCanNextPage(),icon:"chevron_right","icon-color":"neutral-black",variant:"tertiary",onClick:U[5]||(U[5]=()=>r.unref(p).nextPage())},null,8,["disabled"])])],2)],4))],512)}}}),[["__scopeId","data-v-e7cc726e"]]),UM={class:"fm-customize-fields"},WM={class:"fm-customize-fields__header"},jM={class:"fm-typo-en-title-md-600 text-fm-color-typo-primary"},GM={key:0,class:"fm-customize-fields__search"},QM={class:"fm-customize-fields__actions"},XM={class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},qM={class:"fm-customize-fields__list-container"},KM={class:"fm-customize-fields__item"},JM={class:"fm-customize-fields__item-left"},YM={class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary fm-customize-fields__item-label"},ZM={key:0,class:"fm-customize-fields__empty"},$M={class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},eL=Ie(r.defineComponent({__name:"FmCustomizeFields",props:{modelValue:{},title:{},searchPlaceholder:{},showCloseButton:{type:Boolean,default:!0},searchable:{type:Boolean,default:!0},showToggleAllButton:{type:Boolean,default:!0},hideAllText:{},showAllText:{},shownLabel:{}},emits:["update:modelValue","close"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(""),a=r.ref(!1),s=v=>[...v].sort((k,x)=>k.position-x.position),l=r.ref(s(n.modelValue));r.watch(()=>n.modelValue,v=>{l.value=s(v)},{deep:!0});const c=r.computed(()=>{if(!i.value)return l.value;const v=i.value.toLowerCase();return l.value.filter(k=>k.label.toLowerCase().includes(v))}),u=v=>{const k=l.value.findIndex(C=>C.id===v);if(k===-1)return;const x=l.value[k];x.canHide!==!1&&(l.value[k]={...x,visible:!x.visible},b())},h=()=>{l.value=l.value.map(v=>({...v,visible:v.canHide===!1?v.visible:!1})),b()},p=()=>{l.value=l.value.map(v=>({...v,visible:!0})),b()},m=()=>{a.value=!1,b()},b=()=>{const v=l.value.map((k,x)=>({...k,position:x}));o("update:modelValue",v)},y=r.computed(()=>l.value.filter(k=>k.canHide!==!1).every(k=>!k.visible));return(v,k)=>(r.openBlock(),r.createElementBlock("div",UM,[r.createElementVNode("div",WM,[r.createElementVNode("span",jM,r.toDisplayString(v.title??r.unref(_)("customizeFields.title")),1),v.showCloseButton?(r.openBlock(),r.createBlock(be,{key:0,name:"close",size:"md",class:"fm-customize-fields__close-btn",onClick:k[0]||(k[0]=x=>v.$emit("close"))})):r.createCommentVNode("",!0)]),v.searchable?(r.openBlock(),r.createElementBlock("div",GM,[r.createVNode(jl,{modelValue:i.value,"onUpdate:modelValue":k[1]||(k[1]=x=>i.value=x),placeholder:v.searchPlaceholder??r.unref(_)("customizeFields.searchPlaceholder"),class:"w-full"},null,8,["modelValue","placeholder"])])):r.createCommentVNode("",!0),r.createElementVNode("div",QM,[r.createElementVNode("span",XM,r.toDisplayString(v.shownLabel??r.unref(_)("customizeFields.shown")),1),v.showToggleAllButton&&!y.value?(r.openBlock(),r.createElementBlock("button",{key:0,class:"fm-customize-fields__hide-all-btn",onClick:h},r.toDisplayString(v.hideAllText??r.unref(_)("customizeFields.hideAll")),1)):r.createCommentVNode("",!0),v.showToggleAllButton&&y.value?(r.openBlock(),r.createElementBlock("button",{key:1,class:"fm-customize-fields__hide-all-btn",onClick:p},r.toDisplayString(v.showAllText??r.unref(_)("customizeFields.showAll")),1)):r.createCommentVNode("",!0)]),r.createElementVNode("div",qM,[r.createVNode(r.unref(zs),{modelValue:l.value,"onUpdate:modelValue":k[2]||(k[2]=x=>l.value=x),"item-key":x=>x.id,handle:".fm-customize-fields__drag-handle",class:"fm-customize-fields__list","ghost-class":"fm-customize-fields__item--ghost",onStart:k[3]||(k[3]=x=>a.value=!0),onEnd:m},{item:r.withCtx(({element:x})=>[r.withDirectives(r.createElementVNode("div",KM,[r.createElementVNode("div",JM,[r.createVNode(be,{name:"drag_indicator",size:"md",class:"fm-customize-fields__drag-handle",color:"#8E8E93"}),x.icon?(r.openBlock(),r.createBlock(be,{key:0,name:x.icon,size:"md",class:"fm-customize-fields__item-icon",color:"#636366"},null,8,["name"])):r.createCommentVNode("",!0),r.createElementVNode("span",YM,r.toDisplayString(x.label),1)]),r.createVNode(Rl,{"model-value":x.visible,disabled:x.canHide===!1,"onUpdate:modelValue":C=>u(x.id)},null,8,["model-value","disabled","onUpdate:modelValue"])],512),[[r.vShow,!i.value||x.label.toLowerCase().includes(i.value.toLowerCase())]])]),_:1},8,["modelValue","item-key"]),c.value.length===0&&i.value?(r.openBlock(),r.createElementBlock("div",ZM,[r.createElementVNode("span",$M,r.toDisplayString(r.unref(_)("customizeFields.noFieldsFound")),1)])):r.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-28662a9d"]]),tL=r.createElementVNode("span",{class:"fm-typo-en-body-lg-400 text-fm-color-typo-secondary"}," More ",-1),nL=r.defineComponent({__name:"FmTabs",props:{modelValue:{default:null},items:{},vertical:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showMoreAt:{default:6}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),a=r.computed(()=>({vertical:n.vertical,disabled:n.disabled})),s=r.computed(()=>{const u=n.items.slice(0,n.showMoreAt-1),h=n.items.find(m=>{var b;return m.value===n.modelValue||((b=m.children)==null?void 0:b.find(y=>y.value===n.modelValue))}),p=u.map(m=>m.value);return h&&p.includes(h.value)?n.items.slice(0,n.showMoreAt):h?[...u,h]:u}),l=r.computed(()=>{const u=s.value.map(h=>h.value);return n.items.filter(h=>!u.includes(h.value))}),c=u=>{i.value=!1,o("update:modelValue",u)};return(u,h)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex",u.vertical?"flex-col":"flex-row items-center"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,p=>r.renderSlot(u.$slots,"default",r.mergeProps({ref_for:!0},{...p,tabsProps:a.value}),()=>[r.createVNode(hb,r.mergeProps({"model-value":n.modelValue,ref_for:!0},{children:p.children,label:p.label,icon:p.icon,disabled:p.disabled,badge:p.badge,value:p.value,tabsProps:a.value},{disabled:p.disabled===void 0?u.disabled:p.disabled,vertical:u.vertical,"onUpdate:modelValue":h[0]||(h[0]=m=>o("update:modelValue",m))}),null,16,["model-value","disabled","vertical"])])),256)),l.value.length>0?(r.openBlock(),r.createBlock(so,{key:0,"show-menu":i.value,class:r.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":u.vertical}]),placement:u.vertical?"right-start":"bottom-start",onMenuChanged:h[1]||(h[1]=p=>i.value=p)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-8 hover:bg-fm-color-opacity-sm items-center px-16 rounded-sm",[u.vertical?"h-40":"h-[46px]"]])},[r.createVNode(be,{name:"more_vert"}),tL],2)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,p=>{var m;return r.openBlock(),r.createElementBlock(r.Fragment,{key:p.value},[(m=p.children)!=null&&m.length?(r.openBlock(),r.createBlock(so,{key:0,placement:"right-start"},{"menu-button":r.withCtx(()=>[r.createVNode(Dt,{"model-value":n.modelValue===p.value,label:p.label,icon:p.icon,disabled:p.disabled,expandable:""},{append:r.withCtx(()=>[p.badge?(r.openBlock(),r.createBlock(or,{key:0,value:p.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled"])]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.children,b=>(r.openBlock(),r.createBlock(Dt,{key:b.value,"model-value":n.modelValue===b.value,label:b.label,icon:b.icon,disabled:b.disabled,onClick:y=>c(b.value)},{append:r.withCtx(()=>[b.badge?(r.openBlock(),r.createBlock(or,{key:0,value:b.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:2},1024)):(r.openBlock(),r.createBlock(Dt,{key:1,"model-value":n.modelValue===p.value,label:p.label,icon:p.icon,disabled:p.disabled,onClick:b=>c(p.value)},{append:r.withCtx(()=>[p.badge?(r.openBlock(),r.createBlock(or,{key:0,value:p.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))],64)}),128))]),_:1},8,["show-menu","class","placement"])):r.createCommentVNode("",!0)],2))}}),oL=["tabindex"],rL=r.defineComponent({__name:"FmCollapsibleTab",props:{modelValue:{default:void 0},label:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{},value:{default:void 0},children:{default:()=>[]},indentation:{default:1},active:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},focusable:{type:Boolean,default:void 0},action:{}},setup(t){const e=t,n=Te(e,"modelValue"),o=r.computed(()=>e.children.length>0),i=r.ref(!e.expand||e.disabled),a=r.computed(()=>{if(!o.value)return 0;function m(y){return y.children?[y,...y.children.flatMap(m)]:[y]}return 56*(e.children?e.children.flatMap(m):[]).length});function s(){if(!e.disabled){if(o.value){i.value=!i.value;return}n.value=e.value,e.action&&e.action()}}const l=r.computed(()=>typeof e.focusable=="boolean"?e.focusable:!e.disabled&&(!i.value||!o.value));function c(m){return m.children&&m.children.length?m.children.some(c):e.modelValue===m.value}const u=r.computed(()=>{const m=c(e);return o.value?m&&i.value:m}),h=r.computed(()=>e.children?e.children.map(({modelValue:m,indentation:b,active:y,focusable:v,...k})=>{const x=c(k);return{...k,expand:x,focusable:!k.disabled&&!i.value}}):[]),p=r.computed(()=>{switch(e.indentation){case 1:return 8;case 2:return 16;case 3:return 24;default:return 32}});return(m,b)=>{const y=r.resolveComponent("FmCollapsibleTab",!0),v=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",{style:r.normalizeStyle({paddingLeft:`${p.value}px`}),class:"flex flex-col px-8"},[r.withDirectives((r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["flex fm-corner-radius-md gap-4 items-center px-16 py-8 focus-visible:outline-none",{"cursor-pointer focus-visible:bg-fm-color-opacity-md hover:bg-fm-color-opacity-sm ":!m.disabled,"cursor-not-allowed":m.disabled,"bg-fm-color-system-warning-100":u.value}]),tabindex:l.value?"0":"-1",type:"button",onClick:s},[m.icon?(r.openBlock(),r.createBlock(be,{key:0,class:r.normalizeClass({"text-fm-color-typo-disabled":m.disabled,"text-fm-color-typo-primary":!m.disabled&&!u.value,"text-fm-color-primary":!m.disabled&&u.value}),name:m.icon},null,8,["class","name"])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["py-4 fm-typo-en-body-lg-400 text-left line-clamp-2",{"text-fm-color-typo-secondary":!m.disabled&&!u.value,"text-fm-color-primary":!m.disabled&&u.value,"text-fm-color-typo-disabled":m.disabled}])},r.toDisplayString(m.label),3),m.badge!==void 0&&m.badge!==null?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[typeof m.badge=="number"?(r.openBlock(),r.createBlock(or,{key:0,value:m.badge,inline:"",variant:"numeric"},null,8,["value"])):(r.openBlock(),r.createBlock(r.resolveDynamicComponent(m.badge),{key:1}))],64)):r.createCommentVNode("",!0),o.value?(r.openBlock(),r.createElementBlock("div",{key:2,style:r.normalizeStyle({transformOrigin:"center",transform:`rotate(${i.value?"0":"180"}deg)`,transition:"transform ease-out 250ms"}),class:"flex h-24 items-center ml-auto w-24"},[r.createVNode(be,{class:r.normalizeClass({"text-fm-color-neutral-gray-300":!m.disabled,"text-fm-color-typo-disabled":m.disabled}),name:"expand_more",size:"md"},null,8,["class"])],4)):r.createCommentVNode("",!0)],10,oL)),[[v,!m.disabled]]),o.value?(r.openBlock(),r.createElementBlock("div",{key:0,style:r.normalizeStyle({maxHeight:i.value?0:`${a.value}px`,transition:"max-height 250ms",transitionTimingFunction:i.value?"ease-out":"ease-in"}),class:"flex flex-col overflow-hidden"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.value,(k,x)=>(r.openBlock(),r.createBlock(y,r.mergeProps({key:x,"model-value":r.unref(n),"onUpdate:modelValue":b[0]||(b[0]=C=>r.isRef(n)?n.value=C:null),indentation:m.indentation+1,ref_for:!0},k),null,16,["model-value","indentation"]))),128))],4)):r.createCommentVNode("",!0)],4)}}}),iL={class:"h-full flex flex-col overflow-auto"},aL=r.defineComponent({__name:"FmCollapsibleTabs",props:{modelValue:{default:void 0},items:{default:()=>[]}},setup(t){const e=t,n=Te(e,"modelValue"),o=r.computed(()=>e.items?e.items.map(({modelValue:a,...s})=>s):[]);function i(a){function s(c){return c.children?c.children.flatMap(s):[c.value]}return(a.children?a.children.flatMap(s):[a.value]).includes(e.modelValue)}return(a,s)=>(r.openBlock(),r.createElementBlock("div",iL,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(l,c)=>(r.openBlock(),r.createBlock(rL,r.mergeProps({key:c,"model-value":r.unref(n),"onUpdate:modelValue":s[0]||(s[0]=u=>r.isRef(n)?n.value=u:null),active:i(l),expand:i(l),ref_for:!0},l),null,16,["model-value","active","expand"]))),128))]))}}),sL=r.defineComponent({__name:"FmAvatar",props:{initials:{default:()=>""},name:{default:()=>""},src:{default:void 0},size:{default:()=>"md"},rounded:{default:()=>"xxxl"}},setup(t){const e=t,n=r.computed(()=>{if(e.initials)return e.initials.slice(0,2);if(e.name){const[o,i]=e.name.split(" ");return i?`${o[0]}${i[0]}`:o.slice(0,2)}return e.src?"":"?"});return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center justify-center uppercase",{"w-24 h-24 fm-typo-en-body-sm-600":o.size==="sm","w-9 h-9 fm-typo-en-body-sm-600":o.size==="sm2","w-40 h-40 fm-typo-en-body-md-600":o.size==="md","w-48 h-48 fm-typo-en-body-lg-600":o.size==="lg","w-56 h-56 fm-typo-en-body-lg-600":o.size==="xl","bg-fm-color-neutral-gray-100":!e.src},{"rounded-xxxl":o.rounded==="xxxl","rounded-xxl":o.rounded==="xxl","rounded-xl":o.rounded==="xl","rounded-lg":o.rounded==="lg","rounded-md":o.rounded==="md","rounded-sm":o.rounded==="sm"}]),style:r.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},r.toDisplayString(n.value),7))}}),lL=r.defineComponent({__name:"FmThumbnail",props:{src:{default:void 0},icon:{default:t=>t.src?"":"image"},size:{default:()=>"md"}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center justify-center fm-corner-radius-md border-1 border-fm-color-neutral-gray-300",{"w-24 h-24 fm-typo-en-body-sm-600":n.size==="sm","w-40 h-40 fm-typo-en-body-md-600":n.size==="md","w-56 h-56 fm-typo-en-body-lg-600":n.size==="lg","w-72 h-72 fm-typo-en-body-lg-600":n.size==="xl","text-fm-color-neutral-gray-300 bg-fm-color-neutral-gray-100":!e.src}]),style:r.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},[n.icon?(r.openBlock(),r.createBlock(be,{key:0,name:n.icon},null,8,["name"])):r.createCommentVNode("",!0)],6))}}),dL={class:"bg-white flex fm-corner-radius-md gap-4 items-center px-24 py-16"},cL={class:"flex gap-4 items-center xs:hidden"},uL={key:1,class:"hidden xs:flex"},fL=r.defineComponent({__name:"FmPageHead",props:{title:{default:()=>""},description:{default:()=>""},backButton:{type:Boolean,default:()=>!1},actions:{default:()=>[]},zIndexForBottomSheet:{default:void 0},titleBold:{type:Boolean,default:()=>!0},primaryActionXsBottomMargin:{}},emits:["click:back","click:action"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{const s=[...n.actions],l=s.findIndex(m=>m.isPrimary),c=s[l],[u,h,...p]=s.filter((m,b)=>b!==l);return{primaryAction:c,firstSecondaryAction:u,secondSecondaryAction:h,showMoreSecondary:p,bottomSheetActions:s.filter(m=>!m.isPrimary),fabActions:s.filter(m=>m.isPrimary)}}),a=r.ref(!1);return(s,l)=>(r.openBlock(),r.createElementBlock("div",dL,[s.backButton?(r.openBlock(),r.createBlock(we,{key:0,icon:"arrow_back","icon-color":"black",size:"md",type:"button",variant:"tertiary",onClick:l[0]||(l[0]=c=>o("click:back"))})):r.createCommentVNode("",!0),r.renderSlot(s.$slots,"prepend"),r.createVNode(pf,{description:s.description,title:s.title,"title-bold":s.titleBold,class:"flex-grow"},{title:r.withCtx(()=>[r.renderSlot(s.$slots,"title")]),description:r.withCtx(()=>[r.renderSlot(s.$slots,"description")]),_:3},8,["description","title","title-bold"]),r.createElementVNode("div",cL,[i.value.firstSecondaryAction?(r.openBlock(),r.createBlock(we,{key:0,"append-icon":i.value.firstSecondaryAction.appendIcon,"bg-color":i.value.firstSecondaryAction.bgColor,"border-color":i.value.firstSecondaryAction.borderColor,"icon-color":i.value.firstSecondaryAction.iconColor,label:i.value.firstSecondaryAction.label,"prepend-icon":i.value.firstSecondaryAction.prependIcon,"text-color":i.value.firstSecondaryAction.fontColor,variant:i.value.firstSecondaryAction.variant??"tertiary",size:"md",type:"button",onClick:l[1]||(l[1]=c=>o("click:action",i.value.firstSecondaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0),i.value.secondSecondaryAction?(r.openBlock(),r.createBlock(we,{key:1,"append-icon":i.value.secondSecondaryAction.appendIcon,"bg-color":i.value.secondSecondaryAction.bgColor,"border-color":i.value.secondSecondaryAction.borderColor,"icon-color":i.value.secondSecondaryAction.iconColor,label:i.value.secondSecondaryAction.label,"prepend-icon":i.value.secondSecondaryAction.prependIcon,"text-color":i.value.secondSecondaryAction.fontColor,variant:i.value.firstSecondaryAction.variant??"tertiary",size:"md",type:"button",onClick:l[2]||(l[2]=c=>o("click:action",i.value.secondSecondaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0),i.value.showMoreSecondary.length>1?(r.openBlock(),r.createBlock(so,{key:2},{"menu-button":r.withCtx(()=>[r.createVNode(we,{"append-icon":"expand_more","icon-color":"black",label:r.unref(_)("actions.more"),size:"md",type:"button",variant:"tertiary"},null,8,["label"])]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.showMoreSecondary,c=>(r.openBlock(),r.createBlock(Dt,{key:c.value,icon:c.prependIcon,label:c.label,onClick:u=>o("click:action",c.value)},null,8,["icon","label","onClick"]))),128))]),_:1})):i.value.showMoreSecondary.length===1?(r.openBlock(),r.createBlock(we,{key:3,"append-icon":i.value.showMoreSecondary[0].appendIcon,label:i.value.showMoreSecondary[0].label,"prepend-icon":i.value.showMoreSecondary[0].prependIcon,size:"md",type:"button",variant:"tertiary",onClick:l[3]||(l[3]=c=>o("click:action",i.value.showMoreSecondary[0].value))},null,8,["append-icon","label","prepend-icon"])):r.createCommentVNode("",!0),i.value.primaryAction?(r.openBlock(),r.createBlock(we,{key:4,"append-icon":i.value.primaryAction.appendIcon,"bg-color":i.value.primaryAction.bgColor,"border-color":i.value.primaryAction.borderColor,"icon-color":i.value.primaryAction.iconColor,label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"text-color":i.value.primaryAction.fontColor,variant:i.value.primaryAction.variant??"primary",size:"md",type:"button",onClick:l[4]||(l[4]=c=>o("click:action",i.value.primaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0)]),i.value.bottomSheetActions.length>0?(r.openBlock(),r.createElementBlock("div",uL,[r.createVNode(we,{icon:"more_vert","icon-color":"black",size:"md",type:"button",variant:"tertiary",onClick:l[5]||(l[5]=c=>a.value=!0)})])):r.createCommentVNode("",!0),r.renderSlot(s.$slots,"append"),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(qc,{"model-value":a.value,"onUpdate:modelValue":l[6]||(l[6]=c=>a.value=c),"z-index":n.zIndexForBottomSheet,"dismiss-away":""},{default:r.withCtx(()=>[r.createVNode(uf,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.bottomSheetActions,c=>(r.openBlock(),r.createBlock(ff,{key:c.value,label:c.label,class:"hover:bg-fm-color-neutral-gray-100",onClick:u=>{o("click:action",c.value),a.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["model-value","z-index"]),r.createElementVNode("div",{class:r.normalizeClass(["fixed hidden right-16 xs:inline",{"bottom-[68px]":!n.primaryActionXsBottomMargin}]),style:r.normalizeStyle({bottom:n.primaryActionXsBottomMargin})},[i.value.primaryAction?(r.openBlock(),r.createBlock(we,{key:0,"append-icon":i.value.primaryAction.appendIcon,"bg-color":i.value.primaryAction.bgColor,"border-color":i.value.primaryAction.borderColor,"icon-color":i.value.primaryAction.iconColor,label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"text-color":i.value.primaryAction.fontColor,variant:i.value.primaryAction.variant??"fab",class:"fm-shadow-light-100",size:"md",type:"button",onClick:l[7]||(l[7]=c=>o("click:action",i.value.primaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0)],6)]))]))}}),pL={class:"fm-typo-en-title-md-600"},hL={class:"flex"},mL=Ie(r.defineComponent({__name:"FmScorecard",props:{title:{},value:{default:0},compareValue:{default:void 0},description:{},hideCompare:{type:Boolean,default:!1},hideLineChart:{type:Boolean,default:!1},sparklineData:{default:void 0}},setup(t){const e=t,n=(s,l)=>{if(s===""||l==="")return null;const c=Number(s),u=Number(l);let h=0;u===0?c===0?h=0:h=1:h=(c-u)/u;const p=o(h);return{value:isNaN(h)?"":`${(h*100).toFixed(0)}%`,icon:p}};function o(s){return s>0?{name:"moving",color:"#1F7735",tailwind:"fm-color-system-success-100"}:s<0?{name:"trending_down",color:"#99231D",tailwind:"fm-color-system-error-100"}:{name:"equal",color:"#C7C7CC",tailwind:"fm-color-neutral-gray-100"}}const i=r.computed(()=>{const{value:s,compareValue:l}=e;return l?n(s,l):null}),a=r.computed(()=>{var s;return((s=e.sparklineData)==null?void 0:s.datasets.map(l=>{var c;return{label:l.name,data:l.values,fill:!0,color:((c=i.value)==null?void 0:c.icon.color)??"fm-color-system-info-300"}}))??[]});return(s,l)=>(r.openBlock(),r.createBlock(Kc,{class:"flex flex-col gap-2 p-5",variant:"outlined"},{default:r.withCtx(()=>[r.createVNode(Hc,{content:e.description},{default:r.withCtx(()=>[r.renderSlot(s.$slots,"title",{},()=>[r.createElementVNode("p",{class:r.normalizeClass([e.description?"border-b-2 border-dotted":"","fm-typo-body-md-400 w-full truncate"])},r.toDisplayString(e.title),3)],!0)]),_:3},8,["content"]),r.createElementVNode("p",pL,r.toDisplayString(e.value),1),s.hideCompare?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",hL,[i.value?(r.openBlock(),r.createBlock(Qc,{key:0,class:r.normalizeClass(`bg-${i.value.icon.tailwind}`),compact:""},{default:r.withCtx(()=>[r.createVNode(be,{color:i.value.icon.color,name:i.value.icon.name},null,8,["color","name"]),r.createElementVNode("p",{style:r.normalizeStyle({color:i.value.icon.color}),class:"fm-typo-body-md-700"},r.toDisplayString(i.value.value),5)]),_:1},8,["class"])):r.createCommentVNode("",!0)]),r.renderSlot(s.$slots,"compare",{},void 0,!0)],64)),e.sparklineData?(r.openBlock(),r.createBlock(Kc,{key:1},{default:r.withCtx(()=>[r.createVNode(v1,{datasets:a.value,"hide-x-axis":!0,"hide-y-axis":!0,legend:{display:!1},"x-axis":{categories:e.sparklineData.dimension},class:"sparkline"},null,8,["datasets","x-axis"])]),_:1})):r.createCommentVNode("",!0)]),_:3}))}}),[["__scopeId","data-v-c66db589"]]);var as=(t=>(t.Premium="premium",t.Beta="beta",t.Paid="paid",t))(as||{});const gL=r.defineComponent({__name:"FmPill",props:{variant:{default:as.Beta},label:{}},setup(t){const e=t,n=r.computed(()=>({[as.Beta]:{containerClass:"border border-fm-color-system-error-400 bg-fm-color-system-error-100 ",label:"BETA",labelClass:"fm-typo-en-body-sm-600 text-fm-color-typo-error"},[as.Premium]:{containerClass:"h-[18px] fm-pill-premium-gradient",label:"Premium",labelClass:"fm-typo-en-body-sm-600 text-fm-color-typo-white"},[as.Paid]:{containerClass:"border border-fm-color-system-info-400 bg-fm-color-system-info-100 ",icon:"lock",label:"Paid feature",labelClass:"fm-typo-en-body-sm-600 text-fm-color-typo-info"}})[e.variant]);return(o,i)=>{const a=r.resolveComponent("FmIcon");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center fm-corner-radius-md px-4 gap-4",n.value.containerClass])},[n.value.icon?(r.openBlock(),r.createBlock(a,{key:0,size:"sm",outline:"",name:n.value.icon,class:r.normalizeClass(n.value.labelClass)},null,8,["name","class"])):r.createCommentVNode("",!0),r.createElementVNode("span",{class:r.normalizeClass(n.value.labelClass)},r.toDisplayString(e.label||n.value.label),3)],2)}}}),bL=Ie(gL,[["__scopeId","data-v-cdca68a7"]]),ld=16,yL=r.defineComponent({__name:"FmSnackbarToast",setup(t){const{breakpoints:e}=nr(),n=r.inject(Ec),o=r.computed(()=>{var u;const s={currentSum:ld,tops:new Array},l=Object.values(dn).reduce((h,p)=>({...h,[p]:{...s}}),{});return[...((u=n==null?void 0:n.store)==null?void 0:u.snackbars)??[]].reduce((h,p)=>{const m=e.value.xs?dn.TOP:p.position??dn.TOP_RIGHT,{currentSum:b,tops:y}=h[m];y.push({id:p.id,accumulatedHeight:b});const v=p.mountStage===wt.EXPIRED?0:ld+p.renderedHeight;return h[m]={currentSum:b+v,tops:y},h},l)}),i=r.computed(()=>{var s,l;return(l=(s=n==null?void 0:n.store)==null?void 0:s.snackbars)==null?void 0:l.map(c=>{var p,m,b,y,v,k;let u=0;const h=e.value.xs?dn.TOP:c.position??dn.TOP_RIGHT;switch(c.mountStage){case wt.PREMOUNT:{u=e.value.xs?0:ld;break}case wt.MOUNTED:{u=((b=(m=(p=o.value[h].tops)==null?void 0:p.find)==null?void 0:m.call(p,x=>x.id===c.id))==null?void 0:b.accumulatedHeight)||ld;break}case wt.EXPIRED:{u=((k=(v=(y=o.value[h].tops)==null?void 0:y.find)==null?void 0:v.call(y,x=>x.id===c.id))==null?void 0:k.accumulatedHeight)||0,u=Math.max(0,u-c.renderedHeight);break}}return{...c,top:u}})}),a=(s,l,c)=>{if(e.value.xs)return{bottom:`${s}px`,width:"calc(100vw - 32px)",right:"16px",opacity:l===wt.EXPIRED?0:1};if(c===dn.TOP)return{top:l===wt.PREMOUNT?"-20px":`${s}px`,opacity:l===wt.EXPIRED?0:1,right:"50vw",transform:"translateX(50%)"};if(c===dn.TOP_LEFT)return{top:`${s}px`,opacity:l===wt.EXPIRED?0:1,left:l===wt.PREMOUNT?"-20px":"16px"};if(c===dn.TOP_RIGHT)return{top:`${s}px`,opacity:l===wt.EXPIRED?0:1,right:l===wt.PREMOUNT?"-20px":"16px"};if(c===dn.BOTTOM)return{bottom:l===wt.PREMOUNT?"-20px":`${s}px`,opacity:l===wt.EXPIRED?0:1,right:"50vw",transform:"translateX(50%)"};if(c===dn.BOTTOM_LEFT)return{bottom:l===wt.PREMOUNT?"-20px":`${s}px`,opacity:l===wt.EXPIRED?0:1,left:l===wt.PREMOUNT?"-20px":"16px"};if(c===dn.BOTTOM_RIGHT)return{bottom:l===wt.PREMOUNT?"-20px":`${s}px`,opacity:l===wt.EXPIRED?0:1,right:l===wt.PREMOUNT?"-20px":"16px"}};return(s,l)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,c=>(r.openBlock(),r.createBlock(r.Teleport,{key:c.id,to:"body"},[r.createVNode(pb,{action:c.action,description:c.message,dismissable:c.dismissable,spinner:c.spinner,style:r.normalizeStyle(a(c.top,c.mountStage,c.position??r.unref(dn).TOP_RIGHT)),title:c.title,variant:c.type,"z-index":c.zIndex,class:"fixed transition-all z-10",onVnodeMounted:u=>{var h;return(h=r.unref(n))==null?void 0:h.onSnackbarMounted(c.id,u.el.scrollHeight,c.persistent)},onOnAction:()=>{var u,h;(u=c==null?void 0:c.onAction)==null||u.call(c),(h=r.unref(n))==null||h.close(c.id)},onOnDismiss:()=>{var u;return(u=r.unref(n))==null?void 0:u.close(c.id)}},null,8,["action","description","dismissable","spinner","style","title","variant","z-index","onVnodeMounted","onOnAction","onOnDismiss"])]))),128))}});var dn=(t=>(t.TOP="top",t.TOP_LEFT="top-left",t.TOP_RIGHT="top-right",t.BOTTOM="bottom",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_RIGHT="bottom-right",t))(dn||{}),wt=(t=>(t.PREMOUNT="PREMOUNT",t.MOUNTED="MOUNTED",t.EXPIRED="EXPIRED",t))(wt||{});class vy{constructor(){ue(this,"store",r.reactive({snackbars:new Array}))}open(e,n){const o=Math.random().toString(16).slice(2),i=[{...e,id:o,mountStage:"PREMOUNT",duration:n===null?null:n??5e3,renderedHeight:0,type:(e==null?void 0:e.type)??"info",dismissable:typeof(e==null?void 0:e.dismissable)=="boolean"?e.dismissable:!0,position:(e==null?void 0:e.position)??"top-right"},...this.store.snackbars];return this.store.snackbars=i,o}onSnackbarMounted(e,n,o){const i=this.store.snackbars.findIndex(s=>s.id===e);if(i===-1)return;const a=this.store.snackbars[i];this.store.snackbars[i]={...a,renderedHeight:n},setTimeout(()=>{const s=this.store.snackbars[i];this.store.snackbars[i]={...s,mountStage:"MOUNTED"}}),!o&&typeof a.duration=="number"&&setTimeout(()=>{this.close(e)},a.duration)}close(e){const n=this.store.snackbars.findIndex(i=>i.id===e);if(n===-1)return;const o=this.store.snackbars[n];this.store.snackbars[n]={...o,mountStage:"EXPIRED"},setTimeout(()=>{this.removeSnackbar(e)},500)}removeSnackbar(e){const n=this.store.snackbars.findIndex(o=>o.id===e);n!==-1&&this.store.snackbars.splice(n,1)}updateSnackbar(e,n){const o=this.store.snackbars.findIndex(a=>a.id===e);if(o===-1)return;const i=this.store.snackbars[o];this.store.snackbars[o]={...i,...n}}}const ky={install(t){t.provide(Ec,new vy);const e=document.body,n=r.createVNode(yL);n.appContext=t._context,r.render(n,e)}},wy={FmAdvancedSort:Mm,FmBadge:or,FmBottomSheet:qc,FmBreadcrumb:Rx,FmButton:we,FmButtonGroup:Mx,FmCard:Kc,FmCardActionArea:Lx,FmCardActions:_x,FmCardHeader:Ux,FmCardMedia:jx,FmCardSection:Jc,FmCardSubtitle:Hm,FmCardTitle:_m,FmChip:Qc,FmChipGroup:Xc,FmDialog:Qx,FmDropField:Kx,FmDynamicDialog:Wm,FmLineChart:v1,FmPieChart:_6,FmBarChart:Q6,FmScorecard:mL,FmCheckbox:Pm,FmDatePicker:k9,FmDatePickerMobile:x1,FmDateRangePicker:W5,FmDateRangePickerMobile:B1,FmSimpleDatePicker:hE,FmSimpleDatePickerMobile:I1,FmSimpleDateRangePicker:QE,FmSimpleDateRangePickerMobile:O1,FmField:ct,FmForm:Fm,FmFormGroup:Rt,FmErrorSummary:JE,FmHelperText:dm,FmLabel:vn,FmPhoneNumber:cB,FmPinField:pB,FmRadio:kB,FmRadioGroup:wB,FmSearch:jl,FmGlobalSearch:qB,FmSelect:ko,FmStepperField:$B,FmSwitch:Rl,FmTextField:Lr,FmTextarea:tP,FmTimeInput:Tl,FmTimePicker:No,FmTimeRangePicker:lP,FmIcon:be,FmList:uf,FmListItem:ff,FmMenu:so,FmMenuDeprecated:pP,FmMenuDivider:S1,FmMenuHeader:mP,FmMenuItem:Dt,FmCircularProgress:Rr,FmLinearProgress:kP,FmProgressBar:xP,FmSideSheet:DP,FmSnackbar:pb,FmSpacer:rr,FmStep:TP,FmStepper:LP,FmTab:hb,FmTable:HM,FmCustomizeFields:eL,FmTableToolbar:KP,FmTableHeader:Yl,FmTabs:nL,FmCollapsibleTabs:aL,FmTooltip:Hc,FmAvatar:sL,FmThumbnail:lL,FmPageHead:fL,FmTopSheet:cb,FmPopover:Io,FmOverlay:Ei,FmPill:bL},vL=r.defineComponent({__name:"FmTooltipDirective",props:{reference:{},placement:{default:"top"},content:{default:""},disabled:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1},zIndex:{}},setup(t){const e=t,n=r.ref(!1),o=r.ref(null),i=r.ref(null),a=r.computed(()=>e.reference());let s;const{floatingStyles:l,middlewareData:c,placement:u}=Ci(a,o,{whileElementsMounted:ki,placement:e.placement,middleware:[xi(),wi({mainAxis:6}),Sm({element:i})]}),h=r.computed(()=>{var y,v,k,x;const b={top:"bottom",right:"left",bottom:"top",left:"right"}[u.value];return{left:((y=c.value.arrow)==null?void 0:y.x)!=null?`${(v=c.value.arrow)==null?void 0:v.x}px`:"",top:((k=c.value.arrow)==null?void 0:k.y)!=null?`${(x=c.value.arrow)==null?void 0:x.y}px`:"",[b]:"-3px"}}),p=()=>{e.disabled||(s&&clearTimeout(s),s=setTimeout(()=>{n.value=!0},250))},m=()=>{e.disabled||(s&&clearTimeout(s),s=setTimeout(()=>{n.value=!1},250))};return r.onMounted(()=>{a.value.addEventListener("pointerdown",p),a.value.addEventListener("pointermove",b=>{b.pointerType!=="touch"&&p()}),a.value.addEventListener("pointerleave",m),a.value.addEventListener("pointerup",m)}),r.onBeforeUnmount(()=>{a.value.removeEventListener("pointerdown",p),a.value.removeEventListener("pointermove",b=>{b.pointerType!=="touch"&&p()}),a.value.removeEventListener("pointerleave",m),a.value.removeEventListener("pointerup",m)}),(b,y)=>n.value&&!b.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:"bg-fm-color-neutral-black fm-shadow-light-300 fm-typo-en-body-sm-400 max-w-[240px] px-16 py-12 rounded-lg text-fm-color-typo-white",style:r.normalizeStyle({...r.unref(l),zIndex:b.zIndex})},[r.withDirectives(r.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:"absolute bg-fm-color-neutral-black h-8 rotate-45 rounded-[2px] w-8",style:r.normalizeStyle(h.value)},null,4),[[r.vShow,!b.hideArrow]]),r.createTextVNode(" "+r.toDisplayString(b.content),1)],4)):r.createCommentVNode("",!0)}});let Wf;const mr=r.ref([]);let xy=0;const kL=()=>{if(Wf)return;const t=document.createElement("div");document.body.appendChild(t),Wf=r.createApp({render:()=>mr.value.map(e=>r.h(vL,e))}),Wf.mount(t)},dd=t=>{if(t){for(const e of["top","right","bottom","left"])if(t[e])return e}return"top"},Sy=(t,e)=>{const{value:n,modifiers:o}=e;kL(),t.$_fmTooltipId=xy,xy+=1,typeof n=="string"?mr.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:dd(o),hideArrow:!1}):n&&typeof n=="object"&&mr.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),placement:dd(o),disabled:n.disabled??!1,hideArrow:n.hideArrow??!1,zIndex:n.zIndex})},wL={mounted:Sy,updated:(t,e)=>{const{value:n,modifiers:o}=e,i=mr.value.findIndex(a=>a.id===t.$_fmTooltipId);if(i===-1){Sy(t,e);return}typeof n=="string"?mr.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:dd(o),hideArrow:!1}:n&&typeof n=="object"&&(mr.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),disabled:n.disabled??!1,placement:dd(o),hideArrow:n.hideArrow??!1})},beforeUnmount:t=>{const e=mr.value.findIndex(n=>n.id===t.$_fmTooltipId);e!==-1&&mr.value.splice(e,1)}};function xL(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);var n=t.indexOf("Trident/");if(n>0){var o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}let cd;function jf(){jf.init||(jf.init=!0,cd=xL()!==-1)}var ud={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){jf(),r.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",cd&&this.$el.appendChild(t),t.data="about:blank",cd||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!cd&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const SL=r.withScopeId("data-v-b329ee4c");r.pushScopeId("data-v-b329ee4c");const CL={class:"resize-observer",tabindex:"-1"};r.popScopeId();const AL=SL((t,e,n,o,i,a)=>(r.openBlock(),r.createBlock("div",CL)));ud.render=AL,ud.__scopeId="data-v-b329ee4c",ud.__file="src/components/ResizeObserver.vue";function fd(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fd=function(e){return typeof e}:fd=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fd(t)}function EL(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function DL(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function BL(t,e,n){return e&&DL(t.prototype,e),t}function Cy(t){return PL(t)||IL(t)||OL(t)||NL()}function PL(t){if(Array.isArray(t))return Gf(t)}function IL(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function OL(t,e){if(t){if(typeof t=="string")return Gf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gf(t,e)}}function Gf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function NL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
130
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VL(t){var e;return typeof t=="function"?e={callback:t}:e=t,e}function RL(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,a,s=function(c){for(var u=arguments.length,h=new Array(u>1?u-1:0),p=1;p<u;p++)h[p-1]=arguments[p];if(a=h,!(o&&c===i)){var m=n.leading;typeof m=="function"&&(m=m(c,i)),(!o||c!==i)&&m&&t.apply(void 0,[c].concat(Cy(a))),i=c,clearTimeout(o),o=setTimeout(function(){t.apply(void 0,[c].concat(Cy(a))),o=0},e)}};return s._clear=function(){clearTimeout(o),o=null},s}function Ay(t,e){if(t===e)return!0;if(fd(t)==="object"){for(var n in t)if(!Ay(t[n],e[n]))return!1;return!0}return!1}var TL=function(){function t(e,n,o){EL(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,o)}return BL(t,[{key:"createObserver",value:function(n,o){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=VL(n),this.callback=function(l,c){i.options.callback(l,c),l&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var a=this.options.throttleOptions||{},s=a.leading;this.callback=RL(this.callback,this.options.throttle,{leading:function(c){return s==="both"||s==="visible"&&c||s==="hidden"&&!c}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(l){var c=l[0];if(l.length>1){var u=l.find(function(p){return p.isIntersecting});u&&(c=u)}if(i.callback){var h=c.isIntersecting&&c.intersectionRatio>=i.threshold;if(h===i.oldResult)return;i.oldResult=h,i.callback(h,c)}},this.options.intersection),r.nextTick(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),t}();function Ey(t,e,n){var o=e.value;if(o)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new TL(t,o,n);t._vue_visibilityState=i}}function FL(t,e,n){var o=e.value,i=e.oldValue;if(!Ay(o,i)){var a=t._vue_visibilityState;if(!o){Dy(t);return}a?a.createObserver(o,n):Ey(t,{value:o},n)}}function Dy(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var ML={beforeMount:Ey,updated:FL,unmounted:Dy};function LL(t){return{all:t=t||new Map,on:function(e,n){var o=t.get(e);o&&o.push(n)||t.set(e,[n])},off:function(e,n){var o=t.get(e);o&&o.splice(o.indexOf(n)>>>0,1)},emit:function(e,n){(t.get(e)||[]).slice().map(function(o){o(n)}),(t.get("*")||[]).slice().map(function(o){o(e,n)})}}}var By={itemsLimit:1e3},zL=/(auto|scroll)/;function Py(t,e){return t.parentNode===null?e:Py(t.parentNode,e.concat([t]))}var Qf=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},_L=function(e){return Qf(e,"overflow")+Qf(e,"overflow-y")+Qf(e,"overflow-x")},HL=function(e){return zL.test(_L(e))};function Iy(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=Py(t.parentNode,[]),n=0;n<e.length;n+=1)if(HL(e[n]))return e[n];return document.scrollingElement||document.documentElement}}function Xf(t){"@babel/helpers - typeof";return Xf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xf(t)}var Oy={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(e){return["vertical","horizontal"].includes(e)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function Ny(){return this.items.length&&Xf(this.items[0])!=="object"}var qf=!1;if(typeof window<"u"){qf=!1;try{var UL=Object.defineProperty({},"passive",{get:function(){qf=!0}});window.addEventListener("test",null,UL)}catch{}}let WL=0;var ss={name:"RecycleScroller",components:{ResizeObserver:ud},directives:{ObserveVisibility:ML},props:{...Oy,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const t={"-1":{accumulator:0}},e=this.items,n=this.sizeField,o=this.minItemSize;let i=1e4,a=0,s;for(let l=0,c=e.length;l<c;l++)s=e[l][n]||o,s<i&&(i=s),a+=s,t[l]={accumulator:a,size:s};return this.$_computedMinItemSize=i,t}return[]},simpleArray:Ny,itemIndexByKey(){const{keyField:t,items:e}=this,n={};for(let o=0,i=e.length;o<i;o++)n[e[o][t]]=o;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,e,n,o,i){const a=r.markRaw({id:WL++,index:e,used:!0,key:o,type:i}),s=r.shallowReactive({item:n,position:0,nr:a});return t.push(s),s},unuseView(t,e=!1){const n=this.$_unusedViews,o=t.nr.type;let i=n.get(o);i||(i=[],n.set(o,i)),i.push(t),e||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(t,e){this.ready&&(t||e.boundingClientRect.width!==0||e.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,e=!1){const n=this.itemSize,o=this.gridItems||1,i=this.itemSecondarySize||n,a=this.$_computedMinItemSize,s=this.typeField,l=this.simpleArray?null:this.keyField,c=this.items,u=c.length,h=this.sizes,p=this.$_views,m=this.$_unusedViews,b=this.pool,y=this.itemIndexByKey;let v,k,x,C,P;if(!u)v=k=C=P=x=0;else if(this.$_prerender)v=C=0,k=P=Math.min(this.prerender,c.length),x=null;else{const W=this.getScroll();if(e){let F=W.start-this.$_lastUpdateScrollPosition;if(F<0&&(F=-F),n===null&&F<a||F<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=W.start;const Q=this.buffer;W.start-=Q,W.end+=Q;let N=0;if(this.$refs.before&&(N=this.$refs.before.scrollHeight,W.start-=N),this.$refs.after){const F=this.$refs.after.scrollHeight;W.end+=F}if(n===null){let F,V=0,R=u-1,D=~~(u/2),U;do U=D,F=h[D].accumulator,F<W.start?V=D:D<u-1&&h[D+1].accumulator>W.start&&(R=D),D=~~((V+R)/2);while(D!==U);for(D<0&&(D=0),v=D,x=h[u-1].accumulator,k=D;k<u&&h[k].accumulator<W.end;k++);for(k===-1?k=c.length-1:(k++,k>u&&(k=u)),C=v;C<u&&N+h[C].accumulator<W.start;C++);for(P=C;P<u&&N+h[P].accumulator<W.end;P++);}else{v=~~(W.start/n*o);const F=v%o;v-=F,k=Math.ceil(W.end/n*o),C=Math.max(0,Math.floor((W.start-N)/n*o)),P=Math.floor((W.end-N)/n*o),v<0&&(v=0),k>u&&(k=u),C<0&&(C=0),P>u&&(P=u),x=Math.ceil(u/o)*n}}k-v>By.itemsLimit&&this.itemsLimitError(),this.totalSize=x;let O;const E=v<=this.$_endIndex&&k>=this.$_startIndex;if(E)for(let W=0,Q=b.length;W<Q;W++)O=b[W],O.nr.used&&(t&&(O.nr.index=y[O.item[l]]),(O.nr.index==null||O.nr.index<v||O.nr.index>=k)&&this.unuseView(O));const T=E?null:new Map;let A,M,z;for(let W=v;W<k;W++){A=c[W];const Q=l?A[l]:A;if(Q==null)throw new Error(`Key is ${Q} on item (keyField is '${l}')`);if(O=p.get(Q),!n&&!h[W].size){O&&this.unuseView(O);continue}M=A[s];let N=m.get(M),F=!1;if(!O)E?N&&N.length?O=N.pop():O=this.addView(b,W,A,Q,M):(z=T.get(M)||0,(!N||z>=N.length)&&(O=this.addView(b,W,A,Q,M),this.unuseView(O,!0),N=m.get(M)),O=N[z],T.set(M,z+1)),p.delete(O.nr.key),O.nr.used=!0,O.nr.index=W,O.nr.key=Q,O.nr.type=M,p.set(Q,O),F=!0;else if(!O.nr.used&&(O.nr.used=!0,F=!0,N)){const V=N.indexOf(O);V!==-1&&N.splice(V,1)}O.item=A,F&&(W===c.length-1&&this.$emit("scroll-end"),W===0&&this.$emit("scroll-start")),n===null?(O.position=h[W-1].accumulator,O.offset=0):(O.position=Math.floor(W/o)*n,O.offset=W%o*i)}return this.$_startIndex=v,this.$_endIndex=k,this.emitUpdate&&this.$emit("update",v,k,C,P),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:E}},getListenerTarget(){let t=Iy(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:e}=this,n=e==="vertical";let o;if(this.pageMode){const i=t.getBoundingClientRect(),a=n?i.height:i.width;let s=-(n?i.top:i.left),l=n?window.innerHeight:window.innerWidth;s<0&&(l+=s,s=0),s+l>a&&(l=a-s),o={start:s,end:s+l}}else n?o={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:o={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return o},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,qf?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(t){let e;const n=this.gridItems||1;this.itemSize===null?e=t>0?this.sizes[t-1].accumulator:0:e=Math.floor(t/n)*this.itemSize,this.scrollToPosition(e)},scrollToPosition(t){const e=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,o,i;if(this.pageMode){const a=Iy(this.$el),s=a.tagName==="HTML"?0:a[e.scroll],l=a.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[e.start]-l[e.start];n=a,o=e.scroll,i=t+s+u}else n=this.$el,o=e.scroll,i=t;n[o]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((t,e)=>t.nr.index-e.nr.index)}}};const jL={key:0,ref:"before",class:"vue-recycle-scroller__slot"},GL={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function QL(t,e,n,o,i,a){const s=r.resolveComponent("ResizeObserver"),l=r.resolveDirective("observe-visibility");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...c)=>a.handleScroll&&a.handleScroll(...c))},[t.$slots.before?(r.openBlock(),r.createElementBlock("div",jL,[r.renderSlot(t.$slots,"before")],512)):r.createCommentVNode("v-if",!0),(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.listTag),{ref:"wrapper",style:r.normalizeStyle({[t.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:r.normalizeClass(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.pool,c=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.itemTag),r.mergeProps({key:c.nr.id,style:i.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${c.position}px) translate${t.direction==="vertical"?"X":"Y"}(${c.offset}px)`,width:n.gridItems?`${t.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${t.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===c.nr.key}]]},r.toHandlers(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=c.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:r.withCtx(()=>[r.renderSlot(t.$slots,"default",{item:c.item,index:c.nr.index,active:c.nr.used})]),_:2},1040,["style","class"]))),128)),r.renderSlot(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(r.openBlock(),r.createElementBlock("div",GL,[r.renderSlot(t.$slots,"after")],512)):r.createCommentVNode("v-if",!0),r.createVNode(s,{onNotify:a.handleResize},null,8,["onNotify"])],34)),[[l,a.handleVisibilityChange]])}ss.render=QL,ss.__file="src/components/RecycleScroller.vue";var pd={name:"DynamicScroller",components:{RecycleScroller:ss},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(t=>{requestAnimationFrame(()=>{if(Array.isArray(t)){for(const e of t)if(e.target&&e.target.$_vs_onResize){let n,o;if(e.borderBoxSize){const i=e.borderBoxSize[0];n=i.inlineSize,o=i.blockSize}else n=e.contentRect.width,o=e.contentRect.height;e.target.$_vs_onResize(e.target.$_vs_id,n,o)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...Oy,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:Ny,itemsWithSize(){const t=[],{items:e,keyField:n,simpleArray:o}=this,i=this.vscrollData.sizes,a=e.length;for(let s=0;s<a;s++){const l=e[s],c=o?s:l[n];let u=i[c];typeof u>"u"&&!this.$_undefinedMap[c]&&(u=0),t.push({item:l,id:c,size:u})}return t}},watch:{items(){this.forceUpdate()},simpleArray:{handler(t){this.vscrollData.simpleArray=t},immediate:!0},direction(t){this.forceUpdate(!0)},itemsWithSize(t,e){const n=this.$el.scrollTop;let o=0,i=0;const a=Math.min(t.length,e.length);for(let l=0;l<a&&!(o>=n);l++)o+=e[l].size||this.minItemSize,i+=t[l].size||this.minItemSize;const s=i-o;s!==0&&(this.$el.scrollTop+=s)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=LL()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(t=!1){(t||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(t){const e=this.$refs.scroller;e&&e.scrollToItem(t)},getItemSize(t,e=void 0){const n=this.simpleArray?e??this.items.indexOf(t):t[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const t=this.$el;this.$nextTick(()=>{t.scrollTop=t.scrollHeight+5e3;const e=()=>{t.scrollTop=t.scrollHeight+5e3,requestAnimationFrame(()=>{t.scrollTop=t.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(e)})};requestAnimationFrame(e)})}}};function XL(t,e,n,o,i,a){const s=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(s,r.mergeProps({ref:"scroller",items:a.itemsWithSize,"min-item-size":n.minItemSize,direction:t.direction,"key-field":"id","list-tag":t.listTag,"item-tag":t.itemTag},t.$attrs,{onResize:a.onScrollerResize,onVisible:a.onScrollerVisible}),{default:r.withCtx(({item:l,index:c,active:u})=>[r.renderSlot(t.$slots,"default",r.normalizeProps(r.guardReactiveProps({item:l.item,index:c,active:u,itemWithSize:l})))]),before:r.withCtx(()=>[r.renderSlot(t.$slots,"before")]),after:r.withCtx(()=>[r.renderSlot(t.$slots,"after")]),empty:r.withCtx(()=>[r.renderSlot(t.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}pd.render=XL,pd.__file="src/components/DynamicScroller.vue";var Kf={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(t,e){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[e],o=this.vscrollData.sizes[t];n!=null&&n!==o&&this.applySize(n)}},finalActive(t){this.size||(t?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?t?this.observeSize():this.unobserveSize():t&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const t in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[t],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:t}){!this.finalActive&&t&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||t||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(t){this.$nextTick(()=>{if(this.id===t){const e=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(e,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(t,e){const n=~~(this.vscrollParent.direction==="vertical"?e:t);n&&this.size!==n&&this.applySize(n)},applySize(t){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=t,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(t,e,n){this.id===t&&this.applyWidthHeight(e,n)}},render(){return r.h(this.tag,this.$slots.default())}};Kf.__file="src/components/DynamicScrollerItem.vue";function qL(t,e){t.component("".concat(e,"recycle-scroller"),ss),t.component("".concat(e,"RecycleScroller"),ss),t.component("".concat(e,"dynamic-scroller"),pd),t.component("".concat(e,"DynamicScroller"),pd),t.component("".concat(e,"dynamic-scroller-item"),Kf),t.component("".concat(e,"DynamicScrollerItem"),Kf)}var KL={version:"2.0.0-beta.8",install:function(e,n){var o=Object.assign({},{installComponents:!0,componentsPrefix:""},n);for(var i in o)typeof o[i]<"u"&&(By[i]=o[i]);o.installComponents&&qL(e,o.componentsPrefix)}},JL={exports:{}};(function(t,e){(function(n,o){t.exports=o(jc)})(nn,function(n){function o(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=o(n),a={name:"th",weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"},ordinal:function(s){return s+"."}};return i.default.locale(a,null,!0),a})})(JL);var YL={exports:{}};(function(t,e){(function(n,o){t.exports=o(jc)})(nn,function(n){function o(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=o(n),a={name:"zh-tw",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,l){return l==="W"?s+"週":s+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"},meridiem:function(s,l){var c=100*s+l;return c<600?"凌晨":c<900?"早上":c<1100?"上午":c<1300?"中午":c<1800?"下午":"晚上"}};return i.default.locale(a,null,!0),a})})(YL);var ZL={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(nn,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var o=["th","st","nd","rd"],i=n%100;return"["+n+(o[(i-20)%10]||o[i]||o[0])+"]"}}})})(ZL);const $L={name:"@feedmepos/ui-library",version:"1.10.5",type:"module",files:["dist"],repository:{type:"git",url:"git+https://github.com/feedmepos/ui-library.git"},bugs:"https://feedmepos.atlassian.net/browse/CT-3",homepage:"ui.feedme.ai",main:"./dist/feedmepos-ui-library.umd.cjs",module:"./dist/feedmepos-ui-library.js",exports:{".":{types:"./dist/index.d.ts",import:"./dist/feedmepos-ui-library.js",require:"./dist/feedmepos-ui-library.umd.cjs"},"./meta":{types:"./dist/meta.d.ts"},"./tailwind-plugin":"./dist/tailwind-plugin.js","./tailwind-styling":"./dist/tailwind-styling.js","./styles.css":"./dist/style.css"},scripts:{dev:"vite --port 5273",preview:"vite preview","build:lib":"pnpm run build-components && pnpm run build-types && pnpm run build-federation && pnpm run build-tailwind-plugin && pnpm run build-tailwind-styling && tsc-alias --project tsconfig.app.json --outDir dist && mv ./dist/src/* ./dist",build:"vite build","build-lib":"vite build --mode library","build-tailwind-plugin":"vite build --mode tailwind-plugin","build-tailwind-styling":"vite build --mode tailwind-styling","build-federation":"vite build --mode federation && cp -r ./temp/assets ./dist/federation && rm -rf ./temp","build-components":'run-p type-check "build-lib {@}" --',"build-types":"vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false","copy-changelog":"cp ./CHANGELOG.md ./dist/CHANGELOG.md","type-check":"vue-tsc --noEmit -p tsconfig.app.json --composite false",lint:"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",deploy:"pnpm run build:lib && pnpm publish --no-git-checks .","register-components":"node ./scripts/register-components.js && pnpm lint","generate-component-meta":"node ./scripts/generate-component-meta.js","build:pack":"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../"},dependencies:{"@floating-ui/vue":"^1.0.6","@rollup/plugin-commonjs":"^26.0.1","@tanstack/vue-table":"^8.13.2","@tanstack/vue-virtual":"^3.13.0","@types/lodash":"^4.17.7","@vueuse/core":"^10.9.0","chart.js":"^4.4.2","chartjs-plugin-datalabels":"^2.2.0",dayjs:"^1.11.10",debounce:"^2.0.0",fuzzy:"^0.1.3","libphonenumber-js":"^1.10.57",lodash:"^4.17.21",prettier:"^3.2.5",uuid:"^10.0.0","v-wave":"^1.5.1",vue:"^3.4.21","vue-country-flag-next":"^2.3.2","vue-router":"^4.3.0","vue-virtual-scroller":"2.0.0-beta.8",vuedraggable:"^4.1.0"},devDependencies:{"@originjs/vite-plugin-federation":"^1.3.5","@rushstack/eslint-patch":"^1.7.2","@tsconfig/node18":"^18.2.2","@types/chart.js":"^2.9.41","@types/debounce":"^1.2.4","@types/node":"^18.19.21","@types/uuid":"^10.0.0","@vitejs/plugin-vue":"^5.0.4","@vitejs/plugin-vue-jsx":"^3.1.0","@vue/eslint-config-typescript":"^12.0.0","@vue/tsconfig":"^0.4.0",autoprefixer:"^10.4.17",eslint:"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-unused-imports":"^4.3.0","eslint-plugin-vue":"^9.22.0","npm-run-all2":"^6.1.2",postcss:"^8.4.35",sass:"^1.71.1",tailwindcss:"^3.4.1","tsc-alias":"^1.8.8",typescript:"~5.2.2",vite:"^5.1.4","vite-plugin-static-copy":"^0.17.1","vite-plugin-top-level-await":"^1.4.1","vue-component-meta":"^2.0.13","vue-tsc":"^1.8.27"},peerDependencies:{tailwindcss:"^3.4.1",vite:"^5.1.4",vue:"^3.4.21"}};globalThis.__FM_UI_VERSION__=$L.version;const ez={"en-US":"en","zh-CN":"zh-cn","zh-Hant":"zh-tw","th-TH":"th"},tz=(t,e)=>{if(t.use(bk,{duration:.3,color:"var(--fm-color-opacity-sm)",initialOpacity:1,finalOpacity:.1,dissolveDuration:.6}),t.directive("tooltip",wL),t.use($x),t.use(ky),t.use(KL),Object.entries(wy).forEach(([n,o])=>{t.component(n,o)}),e!=null&&e.locale){Dm(e.locale);const n=ez[e.locale]||"en";X.locale(n)}};Ge.FeedMeUI=tz,Ge.FmAdvancedSort=Mm,Ge.FmButtonColorThemeVariant=Kt,Ge.FmButtonVariant=jn,Ge.Locale=Em,Ge.SnackbarMountStage=wt,Ge.SnackbarPlugin=ky,Ge.SnackbarPosition=dn,Ge.SnackbarService=vy,Ge.components=wy,Ge.setLocale=Dm,Ge.useBreakpoints=nr,Ge.useDialog=Rm,Ge.useDialogChild=Tm,Ge.useFocus=ka,Ge.useFormChild=lm,Ge.useProxiedModel=Te,Ge.useSnackbar=zw,Ge.useValidation=sm,Object.defineProperty(Ge,Symbol.toStringTag,{value:"Module"})});
129
+ color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(c=n==null?void 0:n.onChange)==null||c.call(n,i),i}}function Uf(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const pM=(t,e)=>Math.abs(t-e)<1,hM=(t,e,n)=>{let o;return function(...i){t.clearTimeout(o),o=t.setTimeout(()=>e.apply(this,i),n)}};var is={env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_69dde61d-c16e-4bc5-8640-8967b257d98f",npm_package_exports___require:"./dist/feedmepos-ui-library.umd.cjs",npm_package_dependencies_prettier:"^3.2.5",npm_package_devDependencies__types_node:"^18.19.21",DOTNET_NOLOGO:"1",npm_package_devDependencies__originjs_vite_plugin_federation:"^1.3.5",USER:"runner",npm_package_dependencies__rollup_plugin_commonjs:"^26.0.1",npm_config_user_agent:"pnpm/9.15.9 npm/? node/v20.20.2 linux x64",CI:"true",npm_package_dependencies_v_wave:"^1.5.1",npm_package_dependencies_vue:"^3.4.21",USE_BAZEL_FALLBACK_VERSION:"silent:",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_69dde61d-c16e-4bc5-8640-8967b257d98f",PIPX_HOME:"/opt/pipx",npm_package_dependencies__types_lodash:"^4.17.7",npm_package_devDependencies_tsc_alias:"^1.8.8",npm_package_devDependencies_vite:"^5.1.4",npm_package_peerDependencies_tailwindcss:"^3.4.1",npm_node_execpath:"/opt/hostedtoolcache/node/20.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_files_0:"dist",npm_package_scripts_build_lib:"vite build --mode library",npm_package_dependencies_vue_virtual_scroller:"2.0.0-beta.8",HOME:"/home/runner",npm_package_exports___meta_types:"./dist/meta.d.ts",npm_package_dependencies_chart_js:"^4.4.2",npm_package_devDependencies_sass:"^1.71.1",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_devDependencies_eslint_config_prettier:"^9.1.0",npm_package_devDependencies_vite_plugin_static_copy:"^0.17.1",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"feedmepos",npm_package_scripts_build_components:'run-p type-check "build-lib {@}" --',GRADLE_HOME:"/usr/share/gradle-9.5.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/29.0.14206865",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",GITHUB_RETENTION_DAYS:"90",npm_package_scripts_type_check:"vue-tsc --noEmit -p tsconfig.app.json --composite false",npm_package_dependencies__tanstack_vue_virtual:"^3.13.0",npm_package_devDependencies_npm_run_all2:"^6.1.2",npm_package_peerDependencies_vue:"^3.4.21",GITHUB_REPOSITORY_OWNER_ID:"54831515",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-Linux",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_build_federation:"vite build --mode federation && cp -r ./temp/assets ./dist/federation && rm -rf ./temp",npm_package_devDependencies_vue_component_meta:"^2.0.13",SYSTEMD_EXEC_PID:"1850",ACTIONS_ORCHESTRATION_ID:"4e068db5-2ddf-4717-b5b4-19491e961d93.deploy.__default",npm_package_dependencies_dayjs:"^1.11.10",npm_package_devDependencies__tsconfig_node18:"^18.2.2",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_devDependencies_tailwindcss:"^3.4.1",npm_package_devDependencies_typescript:"~5.2.2",JAVA_HOME_25_X64:"/usr/lib/jvm/temurin-25-jdk-amd64",NVM_DIR:"/home/runner/.nvm",npm_package_homepage:"ui.feedme.ai",npm_package_devDependencies_vue_tsc:"^1.8.27",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20260513.135.3",npm_package_scripts_dev:"vite --port 5273",LOGNAME:"runner",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",STORE_PATH:"/home/runner/setup-pnpm/node_modules/.bin/store/v3",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_type:"module",npm_package_dependencies__vueuse_core:"^10.9.0",npm_package_devDependencies__vue_tsconfig:"^0.4.0",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.12/x64",JOURNAL_STREAM:"9:12618",GITHUB_WORKFLOW:"Publish Vue",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_module:"./dist/feedmepos-ui-library.js",npm_package_devDependencies_autoprefixer:"^10.4.17",RUNNER_DEBUG:"1",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure",GOROOT_1_24_X64:"/opt/hostedtoolcache/go/1.24.13/x64",npm_package_scripts_build_tailwind_plugin:"vite build --mode tailwind-plugin",npm_package_scripts_lint:"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",npm_package_dependencies_fuzzy:"^0.1.3",npm_package_devDependencies__types_uuid:"^10.0.0",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GOROOT_1_25_X64:"/opt/hostedtoolcache/go/1.25.10/x64",GITHUB_RUN_ID:"25983612088",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"4e3488f15b456ae22ed7333c0236e6697742cec5",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",npm_package_exports___import:"./dist/feedmepos-ui-library.js",npm_package_devDependencies__vitejs_plugin_vue:"^5.0.4",GITHUB_WORKFLOW_REF:"feedmepos/ui-library/.github/workflows/publish-vue.yml@refs/heads/fix/fm-table-page-count",GITHUB_ACTION_REPOSITORY:"",ENABLE_RUNNER_TRACING:"true",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.20.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_8d5d9164-91e1-4d4b-a84f-8cfc3b1f1713",INVOCATION_ID:"ce152af1f8de4f03bfdbcc90f5adaf47",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.20.2/x64/bin/node",npm_package_name:"@feedmepos/ui-library",npm_package_repository_type:"git",GITHUB_ACTION:"__run_4",GITHUB_RUN_NUMBER:"346",GITHUB_TRIGGERING_ACTOR:"heiseshandian",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies_vue_country_flag_next:"^2.3.2",npm_config_frozen_lockfile:"",npm_package_exports___styles_css:"./dist/style.css",npm_package_scripts_build_tailwind_styling:"vite build --mode tailwind-styling",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_scripts_generate_component_meta:"node ./scripts/generate-component-meta.js",npm_package_devDependencies__vue_eslint_config_typescript:"^12.0.0",npm_package_devDependencies_eslint:"^8.57.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 1000069326",XDG_CONFIG_HOME:"/home/runner/.config",GITHUB_REF_NAME:"fix/fm-table-page-count",GITHUB_REPOSITORY:"feedmepos/ui-library",npm_package_main:"./dist/feedmepos-ui-library.umd.cjs",npm_package_scripts_build_types:"vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false",npm_package_devDependencies__types_debounce:"^1.2.4",npm_lifecycle_script:"vite build --mode library",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_exports___tailwind_plugin:"./dist/tailwind-plugin.js",npm_package_devDependencies__vitejs_plugin_vue_jsx:"^3.1.0",SHELL:"/bin/bash",GITHUB_REPOSITORY_ID:"677015340",GITHUB_ACTIONS:"true",NODE_PATH:"/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/run-p/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.10.6",npm_package_repository_url:"git+https://github.com/feedmepos/ui-library.git",npm_package_dependencies__tanstack_vue_table:"^8.13.2",npm_package_dependencies_vuedraggable:"^4.1.0",npm_package_devDependencies__rushstack_eslint_patch:"^1.7.2",npm_package_devDependencies_eslint_plugin_unused_imports:"^4.3.0",npm_lifecycle_event:"build-lib",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build",npm_package_dependencies_uuid:"^10.0.0",GITHUB_WORKSPACE:"/home/runner/work/ui-library/ui-library",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",npm_package_dependencies_lodash:"^4.17.21",GITHUB_SHA:"4e3488f15b456ae22ed7333c0236e6697742cec5",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies_vue_router:"^4.3.0",npm_package_devDependencies_vite_plugin_top_level_await:"^1.4.1",GITHUB_REF:"refs/heads/fix/fm-table-page-count",GITHUB_ACTOR:"heiseshandian",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_pack:"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../",npm_package_exports___tailwind_styling:"./dist/tailwind-styling.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_69dde61d-c16e-4bc5-8640-8967b257d98f",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/ui-library/ui-library/packages/vue",GITHUB_ACTOR_ID:"7780463",RUNNER_WORKSPACE:"/home/runner/work/ui-library",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_69dde61d-c16e-4bc5-8640-8967b257d98f",npm_package_exports___types:"./dist/index.d.ts",npm_package_devDependencies__types_chart_js:"^2.9.41",npm_config_recursive:"true",EDGEWEBDRIVER:"/usr/local/share/edge_driver",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_devDependencies_eslint_plugin_vue:"^9.22.0",npm_package_devDependencies_postcss:"^8.4.35",npm_package_peerDependencies_vite:"^5.1.4",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.3.13750724",SGX_AESM_ADDR:"1",PSModulePath:"/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules:/usr/share/az_14.6.0",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_scripts_deploy:"pnpm run build:lib && pnpm publish --no-git-checks .",npm_package_dependencies__floating_ui_vue:"^1.0.6",npm_package_dependencies_debounce:"^2.0.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",npm_package_bugs:"https://feedmepos.atlassian.net/browse/CT-3",npm_package_scripts_register_components:"node ./scripts/register-components.js && pnpm lint",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_69dde61d-c16e-4bc5-8640-8967b257d98f",INIT_CWD:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_scripts_copy_changelog:"cp ./CHANGELOG.md ./dist/CHANGELOG.md",npm_package_dependencies_chartjs_plugin_datalabels:"^2.2.0",npm_package_dependencies_libphonenumber_js:"^1.10.57",NODE_ENV:"production"}};const mM=t=>t,gM=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),o=[];for(let i=e;i<=n;i++)o.push(i);return o},bM=(t,e)=>{const n=t.scrollElement;if(!n)return;const o=t.targetWindow;if(!o)return;const i=s=>{const{width:l,height:c}=s;e({width:Math.round(l),height:Math.round(c)})};if(i(n.getBoundingClientRect()),!o.ResizeObserver)return()=>{};const a=new o.ResizeObserver(s=>{const l=()=>{const c=s[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(n.getBoundingClientRect())};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},gy={passive:!0},by=typeof window>"u"?!0:"onscrollend"in window,yM=(t,e)=>{const n=t.scrollElement;if(!n)return;const o=t.targetWindow;if(!o)return;let i=0;const a=t.options.useScrollendEvent&&by?()=>{}:hM(o,()=>{e(i,!1)},t.options.isScrollingResetDelay),s=h=>()=>{const{horizontal:p,isRtl:m}=t.options;i=p?n.scrollLeft*(m&&-1||1):n.scrollTop,a(),e(i,h)},l=s(!0),c=s(!1);c(),n.addEventListener("scroll",l,gy);const u=t.options.useScrollendEvent&&by;return u&&n.addEventListener("scrollend",c,gy),()=>{n.removeEventListener("scroll",l),u&&n.removeEventListener("scrollend",c)}},vM=(t,e,n)=>{if(e!=null&&e.borderBoxSize){const o=e.borderBoxSize[0];if(o)return Math.round(o[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(t.getBoundingClientRect()[n.options.horizontal?"width":"height"])},kM=(t,{adjustments:e=0,behavior:n},o)=>{var i,a;const s=t+e;(a=(i=o.scrollElement)==null?void 0:i.scrollTo)==null||a.call(i,{[o.options.horizontal?"left":"top"]:s,behavior:n})};class wM{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const o=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(a=>{const s=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()})}));return{disconnect:()=>{var i;(i=o())==null||i.disconnect(),n=null},observe:i=>{var a;return(a=o())==null?void 0:a.observe(i,{box:"border-box"})},unobserve:i=>{var a;return(a=o())==null?void 0:a.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([o,i])=>{typeof i>"u"&&delete n[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:mM,rangeExtractor:gM,onChange:()=>{},measureElement:vM,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var o,i;(i=(o=this.options).onChange)==null||i.call(o,this,n)},this.maybeNotify=Gi(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:is.env.NODE_ENV!=="production",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.maybeNotify();return}this.scrollElement=o,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=a,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,o)=>{const i=new Map,a=new Map;for(let s=o-1;s>=0;s--){const l=n[s];if(i.has(l.lane))continue;const c=a.get(l.lane);if(c==null||l.end>c.end?a.set(l.lane,l):l.end<c.end&&i.set(l.lane,!0),i.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((s,l)=>s.end===l.end?s.index-l.index:s.end-l.end)[0]:void 0},this.getMeasurementOptions=Gi(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,o,i,a,s)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:o,scrollMargin:i,getItemKey:a,enabled:s}),{key:!1}),this.getMeasurements=Gi(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:o,scrollMargin:i,getItemKey:a,enabled:s},l)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,c);for(let h=c;h<n;h++){const p=a(h),m=this.options.lanes===1?u[h-1]:this.getFurthestMeasurement(u,h),b=m?m.end+this.options.gap:o+i,y=l.get(p),v=typeof y=="number"?y:this.options.estimateSize(h),k=b+v,x=m?m.lane:h%this.options.lanes;u[h]={index:h,start:b,size:v,end:k,key:p,lane:x}}return this.measurementsCache=u,u},{key:is.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.calculateRange=Gi(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,o,i)=>this.range=n.length>0&&o>0?xM({measurements:n,outerSize:o,scrollOffset:i}):null,{key:is.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.getVirtualIndexes=Gi(()=>{let n=null,o=null;const i=this.calculateRange();return i&&(n=i.startIndex,o=i.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,o]},(n,o,i,a,s)=>a===null||s===null?[]:n({startIndex:a,endIndex:s,overscan:o,count:i}),{key:is.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.indexFromElement=n=>{const o=this.options.indexAttribute,i=n.getAttribute(o);return i?parseInt(i,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(n,o)=>{const i=this.indexFromElement(n),a=this.measurementsCache[i];if(!a)return;const s=a.key,l=this.elementsCache.get(s);l!==n&&(l&&this.observer.unobserve(l),this.observer.observe(n),this.elementsCache.set(s,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,o,this))},this.resizeItem=(n,o)=>{const i=this.measurementsCache[n];if(!i)return;const a=this.itemSizeCache.get(i.key)??i.size,s=o-a;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,s,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,o)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((o,i)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=Gi(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,o)=>{const i=[];for(let a=0,s=n.length;a<s;a++){const l=n[a],c=o[l];i.push(c)}return i},{key:is.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const o=this.getMeasurements();if(o.length!==0)return Uf(o[yy(0,o.length-1,i=>Uf(o[i]).start,n)])},this.getOffsetForAlignment=(n,o)=>{const i=this.getSize(),a=this.getScrollOffset();o==="auto"&&n>=a+i&&(o="end"),o==="end"&&(n-=i);const s=this.options.horizontal?"scrollWidth":"scrollHeight",c=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-i;return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,o="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const a=this.getSize(),s=this.getScrollOffset();if(o==="auto")if(i.end>=s+a-this.options.scrollPaddingEnd)o="end";else if(i.start<=s+this.options.scrollPaddingStart)o="start";else return[s,o];const l=i.start-this.options.scrollPaddingStart+(i.size-a)/2;switch(o){case"center":return[this.getOffsetForAlignment(l,o),o];case"end":return[this.getOffsetForAlignment(i.end+this.options.scrollPaddingEnd,o),o];default:return[this.getOffsetForAlignment(i.start-this.options.scrollPaddingStart,o),o]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:o="start",behavior:i}={})=>{this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,o),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:o="auto",behavior:i}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(n,o);if(!a)return;const[s,l]=a;this._scrollToOffset(s,{adjustments:void 0,behavior:i}),i!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[u]=Uf(this.getOffsetForIndex(n,l));pM(u,this.getScrollOffset())||this.scrollToIndex(n,{align:l,behavior:i})}else this.scrollToIndex(n,{align:l,behavior:i})}))},this.scrollBy=(n,{behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var n;const o=this.getMeasurements();let i;return o.length===0?i=this.options.paddingStart:i=this.options.lanes===1?((n=o[o.length-1])==null?void 0:n.end)??0:Math.max(...o.slice(-this.options.lanes).map(a=>a.end)),Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:o,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const yy=(t,e,n,o)=>{for(;t<=e;){const i=(t+e)/2|0,a=n(i);if(a<o)t=i+1;else if(a>o)e=i-1;else return i}return t>0?t-1:0};function xM({measurements:t,outerSize:e,scrollOffset:n}){const o=t.length-1,a=yy(0,o,l=>t[l].start,n);let s=a;for(;s<o&&t[s].end<n+e;)s++;return{startIndex:a,endIndex:s}}function SM(t){const e=new wM(r.unref(t)),n=r.shallowRef(e),o=e._didMount();return r.watch(()=>r.unref(t).getScrollElement(),i=>{i&&e._willUpdate()},{immediate:!0}),r.watch(()=>r.unref(t),i=>{e.setOptions({...i,onChange:(a,s)=>{var l;r.triggerRef(n),(l=i.onChange)==null||l.call(i,a,s)}}),e._willUpdate(),r.triggerRef(n)},{immediate:!0}),r.onScopeDispose(o),n}function CM(t){return SM(r.computed(()=>({observeElementRect:bM,observeElementOffset:yM,scrollToFn:kM,...r.unref(t)})))}const AM={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},EM={class:"text-fm-color-typo-secondary"},DM=["onClick"],BM={key:0},PM={key:0,class:"w-full"},IM={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},OM={class:"text-fm-color-typo-secondary"},NM=["onClick"],VM=["colspan"],RM={key:1,class:"virtual-table-container w-full"},TM={class:"sticky top-0 z-10 w-full"},FM={class:"w-full"},MM=["onClick"],LM={class:"flex gap-8 items-center"},zM={class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"},_M={class:"flex gap-8"},HM=Ie(r.defineComponent({__name:"FmTable",props:{modelValue:{default:{}},selection:{default:void 0},rowData:{default:()=>[]},columnDefs:{default:()=>[]},columnFilter:{default:void 0},searchValue:{default:""},pageCount:{default:0},rowCount:{default:void 0},fetchFn:{type:Function,default:void 0},pageSize:{default:10},loading:{type:Boolean,default:void 0},pinHeaderRow:{type:Boolean,default:!0},hideHeaderRow:{type:Boolean},rowClassName:{},onRowClick:{type:Function,default:void 0},autoResetPageIndex:{type:Boolean},shrinkAt:{type:[String,Number,Boolean],default:"sm"},hideFooter:{type:Boolean},forceMobileFooter:{type:Boolean},columnVisibility:{},draggable:{type:[Boolean,Function]},wholeRowDraggable:{type:Boolean},expandedState:{type:[Boolean,Object]},getRowCanExpand:{type:Function,default:()=>!0},getSubRow:{type:Function,default:t=>t.subRows},onVuedraggableMove:{type:Function,default:()=>!0},virtual:{type:Boolean,default:!1},virtualRowHeight:{default:48},getRowId:{}},emits:["sort-change","dnd-changed","update:expanded-state","update:dragging"],setup(t,{emit:e}){const n=t,o=e;if(n.virtual&&n.draggable)throw new Error("Cannot use virtual scroll and draggable at the same time");const i=Te(n,"modelValue"),a=Te(n,"searchValue"),s=r.ref(n.rowData),l=r.ref(!1);r.watch(()=>l.value,D=>{o("update:dragging",D),D&&o("update:expanded-state",{})});const c=()=>{let D=[];n.selection&&D.push({id:"row-selection",header:({table:q})=>r.createVNode(Bb,{checked:q.getIsAllPageRowsSelected(),indeterminate:q.getIsSomePageRowsSelected(),onChange:q.getToggleAllPageRowsSelectedHandler()},null),cell:({row:q})=>q.depth===0?r.createVNode(Bb,{checked:q==null?void 0:q.getIsSelected(),disabled:!(q!=null&&q.getCanSelect()),onChange:q==null?void 0:q.getToggleSelectedHandler()},null):r.createVNode("div",null,null),enableResizing:!1,meta:{headerClass:"py-[2px] pl-4 pr-16",cellClass:"pl-4 pr-16",width:"60px"},size:60});const U=n.draggable;return U&&!n.wholeRowDraggable&&D.push({id:"row-drag",header:"",cell:({row:q})=>(typeof U=="function"?U(q.original,q.index):U)&&q.depth===0?r.h("div",{class:["w-full flex",n.selection?"justify-end":"justify-start"]},r.h(we,{prependIcon:"drag_handle",variant:"tertiary",class:"cursor-move",type:"button",onMousedown:()=>{l.value=!0},onMouseup:()=>{l.value=!1}})):typeof U=="function"?r.h("div",{class:["w-full flex",n.selection?"justify-end":"justify-start"]},r.h(we,{prependIcon:"drag_handle",variant:"tertiary",class:"cursor-move",type:"button",disabled:!0})):r.createVNode("div",null,null),enableResizing:!1,meta:{cellClass:"dnd-handler",width:"60px"},size:60}),[...D,...n.columnDefs]},u=r.ref([]);r.watch(()=>u.value,D=>{o("sort-change",D)}),r.watch(()=>n.rowData,D=>{s.value=[...D]},{deep:!0});const h=r.ref({pageIndex:0,pageSize:n.pageSize}),p=TI({get enableRowSelection(){return!!n.selection},get enableMultiRowSelection(){return n.selection==="multiple"},get columns(){return c()},get data(){return s.value},getRowId:n.getRowId,state:{get pagination(){return typeof n.fetchFn=="function"?h.value:void 0},get globalFilter(){return a.value},get rowSelection(){return i.value},get sorting(){return u.value},get columnVisibility(){return n.columnVisibility},get expanded(){return n.expandedState}},getCoreRowModel:AI(),getSortedRowModel:NI(),getFilteredRowModel:II(),getPaginationRowModel:OI(),getRowCanExpand:n.getRowCanExpand,onExpandedChange:D=>{if(!n.expandedState)return;const U=typeof D=="function"?D(n.expandedState):D;o("update:expanded-state",U)},onRowSelectionChange:D=>{if(!v.value)return i.value=typeof D=="function"?D(i.value):D},onSortingChange:D=>{u.value=typeof D=="function"?D(u.value):D},onGlobalFilterChange:D=>{a.value=typeof D=="function"?D(a.value):D},autoResetPageIndex:n.autoResetPageIndex,manualPagination:typeof n.fetchFn=="function",...typeof n.fetchFn=="function"&&{onPaginationChange:D=>h.value=typeof D=="function"?D(h.value):D},get pageCount(){return typeof n.fetchFn=="function"?n.pageCount:void 0},getSubRows:D=>n.getSubRow(D),getExpandedRowModel:EI(),get enableHiding(){return!0}});r.watch(()=>h.value,D=>{y(D)}),r.watch(()=>n.selection,()=>{p.setOptions(D=>({...D,get enableRowSelection(){return!!n.selection},get enableMultiRowSelection(){return n.selection==="multiple"},get columns(){return c()}}))});const m=r.ref(""),b=r.ref(!1);async function y(D){if(!n.fetchFn)return;b.value=!0;const U=`${Math.random()}`;m.value=U;try{await n.fetchFn(D)}catch{}finally{m.value===U&&(b.value=!1)}}const v=r.computed(()=>{const D=b.value;return typeof n.loading=="boolean"?n.loading:D});r.watch(()=>n.rowData,()=>{p.setOptions(D=>({...D,get data(){return s.value}}))}),r.watch([()=>n.pageCount,()=>n.rowCount],()=>{p.setOptions(D=>({...D,pageCount:n.pageCount,rowCount:n.rowCount}))}),r.watch(()=>n.pageSize,()=>{p.setPageSize(n.pageSize)}),r.watch([()=>n.columnFilter],([D])=>{p.setColumnFilters(()=>D??[])}),r.watch(()=>n.columnDefs,()=>{p.setOptions(D=>({...D,get columns(){return c()}}))}),r.onMounted(()=>{n.fetchFn&&n.fetchFn(p.getState().pagination),p.setPageSize(n.pageSize)});const k=r.ref(380);function x(D){var q;const U=((q=D.el)==null?void 0:q.scrollHeight)??0;k.value=Math.max(100,U)}const C=nr(),P=r.ref(),O=r.ref(typeof n.shrinkAt=="boolean"&&!n.shrinkAt?!1:C.isBreakpointKeyword(n.shrinkAt)&&C.isAtMost(n.shrinkAt)),E=r.computed(()=>{const D=[...Array.from(Array(Math.min(5,Math.floor(n.rowData.length/10))),(q,ne)=>(ne+1)*10).map(q=>({label:q.toString(),value:q}))],U={label:_("table.all"),value:n.rowData.length};return n.pageSize&&n.pageSize>0&&(D.some(q=>q.value===n.pageSize)||(D.push({label:n.pageSize.toString(),value:n.pageSize}),D.sort((q,ne)=>q.value-ne.value))),[...D,U]});function T(D){const U=D.el;if(!U||typeof n.shrinkAt>"u"||typeof n.shrinkAt=="boolean"&&!n.shrinkAt)return;const q=cf(function(){if(P.value=U.clientWidth,C.isBreakpointKeyword(n.shrinkAt)){O.value=C.isAtMost(n.shrinkAt);return}const ne=Number(n.shrinkAt);if(isNaN(ne)){O.value=!1;return}O.value=U.scrollWidth>=ne},200);U.resizeTable??(U.resizeTable=function(){O.value=C.isBreakpointKeyword(n.shrinkAt)&&C.isAtMost(n.shrinkAt),q()}),window.addEventListener("resize",U.resizeTable),U.resizeTable()}function A(D){const U=D.el;!U||typeof n.shrinkAt>"u"||typeof n.shrinkAt=="boolean"&&!n.shrinkAt||U.resizeTable&&window.removeEventListener("resize",U.resizeTable)}function M(D){const U=Math.min(...D.map(j=>j.index)),q=Math.max(...D.map(j=>j.index)),ne=s.value.slice(0,U),le=s.value.slice(q+1),ge=D.map(j=>j.original),ce=s.value.slice(U,q+1);fM(ge,ce)||o("dnd-changed",[...ne,...ge,...le])}const z=r.ref(),W=r.computed(()=>!n.virtual||!z.value?null:CM({count:p.getRowModel().rows.length,getScrollElement:()=>z.value||null,estimateSize:()=>n.virtualRowHeight,overscan:20})),Q=r.ref([]);function N(D){Q.value=D}function F(D,U){var ne;const q=(ne=D.column.columnDef.meta)==null?void 0:ne.colspan;return typeof q=="function"?q(U):q??1}function V(D){return D.getVisibleCells().filter(U=>F(U,D)!==0)}function R({draggedContext:D}){const U=n.draggable,q=D.index,ne=p.getRowModel().rows[q];let le=typeof U=="function"?U(ne.original,q):U;if(!le)return le;const ge=D.futureIndex,ce=p.getRowModel().rows[ge];return le=typeof U=="function"?U(ce.original,ge):U,le}return(D,U)=>{var le,ge;const q=r.resolveComponent("FmListItem"),ne=r.resolveComponent("FmList");return r.openBlock(),r.createElementBlock("div",{class:"flex flex-col h-full relative",onVnodeMounted:T,onVnodeUnmounted:A},[r.createElementVNode("div",{class:"overflow-y-auto",ref_key:"parentRef",ref:z},[O.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[v.value?(r.openBlock(),r.createElementBlock("div",{key:0,style:r.normalizeStyle({height:`${k.value}px`}),class:"pointer-events-none"},[r.createElementVNode("div",AM,[r.createVNode(rr),r.createVNode(Rr,{size:"xl"}),r.createElementVNode("div",null,[r.renderSlot(D.$slots,"loading-text",{},()=>[r.createElementVNode("span",EM,r.toDisplayString(r.unref(_)("table.loading")),1)],!0)]),r.createVNode(rr)])],4)):(r.openBlock(),r.createBlock(ne,{key:1,onVnodeMounted:x},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(p).getRowModel().rows,ce=>r.renderSlot(D.$slots,"list-row",r.mergeProps({key:ce.id,ref_for:!0},ce),()=>[r.createVNode(q,{class:r.normalizeClass([{"bg-fm-color-neutral-gray-100":ce.getIsSelected(),"cursor-pointer":typeof D.onRowClick=="function"}]),style:{padding:"0"},tag:"label"},{prepend:r.withCtx(()=>{var j,ee,H,J,ie;return[r.createVNode(r.unref(os),{props:(ee=(j=ce.getVisibleCells().find(Z=>Z.column.id==="row-selection"))==null?void 0:j.getContext)==null?void 0:ee.call(j),render:(ie=(J=(H=ce.getVisibleCells().find(Z=>Z.column.id==="row-selection"))==null?void 0:H.column)==null?void 0:J.columnDef)==null?void 0:ie.cell},null,8,["props","render"])]}),default:r.withCtx(()=>[r.createElementVNode("div",{class:"flex flex-col gap-4 grow p-8",onClick:j=>{var ee;return(ee=D.onRowClick)==null?void 0:ee.call(D,ce)}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(ce.getVisibleCells(),j=>{var ee;return r.openBlock(),r.createElementBlock(r.Fragment,{key:j.id},[j.column.id!=="row-selection"?(r.openBlock(),r.createElementBlock("div",BM,[r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-md-400",((ee=j.column.columnDef.meta)==null?void 0:ee.cellSpanClass)??"line-clamp-2 w-full"])},[r.createVNode(r.unref(os),{props:j.getContext(),render:j.column.columnDef.cell},null,8,["props","render"])],2)])):r.createCommentVNode("",!0)],64)}),128))],8,DM)]),_:2},1032,["class"])],!0)),128))]),_:3},512))],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[D.virtual?(r.openBlock(),r.createElementBlock("div",RM,[r.createElementVNode("div",TM,[r.createElementVNode("table",FM,[D.hideHeaderRow?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(Yl,{key:0,table:r.unref(p),class:"bg-fm-color-neutral-gray-100","onUpdate:columnWidths":N},null,8,["table"]))])]),r.createElementVNode("div",{class:"virtual-list relative",style:r.normalizeStyle({height:`${r.unref(p).getRowModel().rows.length*n.virtualRowHeight}px`,width:"100%"}),onVnodeMounted:x},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList((ge=(le=W.value)==null?void 0:le.value)==null?void 0:ge.getVirtualItems(),ce=>{var j,ee;return r.openBlock(),r.createElementBlock("div",{key:ce.index,style:r.normalizeStyle({position:"absolute",top:0,left:0,width:"100%",height:`${n.virtualRowHeight}px`,transform:`translateY(${ce.start}px)`,display:"flex",alignItems:"center",borderBottom:"1px solid var(--fm-color-neutral-gray-100)"}),class:r.normalizeClass([{"bg-fm-color-neutral-gray-100":(j=r.unref(p).getRowModel().rows[ce.index])==null?void 0:j.getIsSelected(),"cursor-pointer":typeof D.onRowClick=="function"},D.rowClassName,"hover:bg-fm-color-opacity-sm"]),onClick:H=>{var J;return(J=D.onRowClick)==null?void 0:J.call(D,r.unref(p).getRowModel().rows[ce.index])}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(((ee=r.unref(p).getRowModel().rows[ce.index])==null?void 0:ee.getVisibleCells())||[],(H,J)=>{var ie,Z,pe,ae;return r.openBlock(),r.createElementBlock("div",{key:H.id,class:r.normalizeClass(["virtual-cell","h-full flex items-center",((ie=H.column.columnDef.meta)==null?void 0:ie.cellClass)??"px-16"]),style:r.normalizeStyle({width:Q.value[J]?`${Q.value[J]}px`:"auto",flex:Q.value[J]?"0 0 auto":"1 1 0px",textAlign:((Z=H.column.columnDef.meta)==null?void 0:Z.textAlign)??"left",maxWidth:(pe=H.column.columnDef.meta)==null?void 0:pe.maxWidth})},[r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-md-400",((ae=H.column.columnDef.meta)==null?void 0:ae.cellSpanClass)??"line-clamp-2 w-full"])},[r.createVNode(r.unref(os),{props:H.getContext(),render:H.column.columnDef.cell},null,8,["props","render"])],2)],6)}),128))],14,MM)}),128))],4)])):(r.openBlock(),r.createElementBlock("table",PM,[!D.pinHeaderRow&&!D.hideHeaderRow?(r.openBlock(),r.createBlock(Yl,{key:0,table:r.unref(p)},null,8,["table"])):r.createCommentVNode("",!0),r.renderSlot(D.$slots,"pin-top",{},void 0,!0),v.value?(r.openBlock(),r.createElementBlock("tbody",{key:1,onVnodeMounted:x},[r.createElementVNode("div",{style:r.normalizeStyle({height:`${k.value}px`}),class:"pointer-events-none"},[r.createElementVNode("div",IM,[r.createVNode(rr),r.createVNode(Rr,{size:"xl"}),r.createElementVNode("div",null,[r.renderSlot(D.$slots,"loading-text",{},()=>[r.createElementVNode("span",OM,r.toDisplayString(r.unref(_)("table.loading")),1)],!0)]),r.createVNode(rr)])],4)],512)):(r.openBlock(),r.createBlock(r.unref(zs),{key:2,clone:r.unref(lf.clone),handle:Object.keys(n.expandedState??{}).length>0?".dnd-handler-disabled":".dnd-handler","model-value":r.unref(p).getRowModel().rows,move:R||D.onVuedraggableMove,"item-key":"id",tag:"tbody",onDragend:U[0]||(U[0]=ce=>l.value=!1),onDragstart:U[1]||(U[1]=ce=>l.value=!0),"onUpdate:modelValue":M,onVnodeMounted:x},{item:r.withCtx(({element:ce})=>[D.$slots["table-row"]?r.renderSlot(D.$slots,"table-row",r.normalizeProps(r.mergeProps({key:0},ce)),void 0,!0):(r.openBlock(),r.createElementBlock("tr",{key:1,class:r.normalizeClass([[{"bg-fm-color-neutral-gray-100":ce.getIsSelected(),"cursor-pointer":typeof D.onRowClick=="function","dnd-handler":(typeof D.draggable=="function"?D.draggable(ce.original,ce.index):D.draggable)&&D.wholeRowDraggable,"border-b border-fm-color-neutral-gray-100":ce.subRows.length===0&&ce.depth===0?!0:ce.depth===0?!ce.getIsExpanded():ce.index+1===ce.getParentRow().subRows.length},D.rowClassName],"hover:bg-fm-color-opacity-sm"]),onClick:j=>{var ee;return(ee=D.onRowClick)==null?void 0:ee.call(D,ce)}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V(ce),j=>{var ee,H,J,ie,Z,pe;return r.openBlock(),r.createElementBlock("td",{key:j.id,colspan:F(j,ce),class:r.normalizeClass([v.value?"hidden":"","h-[48px] text-fm-color-typo-primary",((ee=j.column.columnDef.meta)==null?void 0:ee.cellClass)??"px-16"]),style:r.normalizeStyle({width:(H=j.column.columnDef.meta)!=null&&H.width?(J=j.column.columnDef.meta)==null?void 0:J.width:j.column.getSize()!==0?`${j.column.getSize()}px`:void 0,maxWidth:(ie=j.column.columnDef.meta)==null?void 0:ie.maxWidth,textAlign:((Z=j.column.columnDef.meta)==null?void 0:Z.textAlign)??"left"})},[r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-md-400",((pe=j.column.columnDef.meta)==null?void 0:pe.cellSpanClass)??"line-clamp-2 w-full"])},[r.createVNode(r.unref(os),{props:j.getContext(),render:j.column.columnDef.cell},null,8,["props","render"])],2)],14,VM)}),128))],10,NM))]),_:3},8,["clone","handle","model-value","move"])),D.pinHeaderRow&&!D.hideHeaderRow?(r.openBlock(),r.createBlock(Yl,{key:3,table:r.unref(p),class:r.normalizeClass(["bg-fm-color-neutral-gray-100 top-0",{sticky:!l.value}]),"onUpdate:columnWidths":N},null,8,["table","class"])):r.createCommentVNode("",!0)]))],64))],512),D.hideFooter?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,style:r.normalizeStyle({maxWidth:P.value?`${P.value}px`:void 0}),class:"basis-72 bg-white flex items-center justify-between px-24"},[O.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([{"hidden invisible":D.forceMobileFooter},"flex gap-24 items-center justify-between xs:hidden xs:invisible"])},[r.createElementVNode("div",LM,[r.createElementVNode("span",zM,r.toDisplayString(r.unref(_)("table.itemsPerPage")),1),r.createVNode(Pb,{items:E.value,"model-value":r.unref(p).getState().pagination.pageSize,"onUpdate:modelValue":U[2]||(U[2]=ce=>r.unref(p).setPageSize(ce))},null,8,["items","model-value"])]),r.createElementVNode("span",{class:r.normalizeClass([{"hidden invisible":D.forceMobileFooter},"fm-typo-en-body-lg-400 text-fm-color-typo-secondary xs:hidden xs:invisible"])},r.toDisplayString(r.unref(_)("table.itemCount",{start:n.rowData.length<r.unref(p).getState().pagination.pageSize?n.rowData.length:r.unref(p).getState().pagination.pageIndex*r.unref(p).getState().pagination.pageSize+1,end:(r.unref(p).getState().pagination.pageIndex+1)*r.unref(p).getState().pagination.pageSize,total:n.rowCount??n.rowData.length})),3)],2)),r.createElementVNode("div",{class:r.normalizeClass(["flex gap-8 items-center",{"w-full justify-between":O.value||D.forceMobileFooter,"xs:w-full xs:justify-between":!O.value}])},[r.createVNode(Pb,{items:Array.from(Array(r.unref(p).getPageCount()),(ce,j)=>j+1).map(ce=>({label:ce.toString(),value:ce})),"model-value":r.unref(p).getState().pagination.pageIndex+1,"onUpdate:modelValue":U[3]||(U[3]=ce=>r.unref(p).setPageIndex(ce?ce-1:0))},null,8,["items","model-value"]),r.createElementVNode("span",{class:r.normalizeClass([{"mr-auto":O.value||D.forceMobileFooter},"fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto"])},r.toDisplayString(r.unref(_)("table.pageCount",{total:r.unref(p).getPageCount()})),3),r.createElementVNode("div",_M,[r.createVNode(we,{disabled:!r.unref(p).getCanPreviousPage(),icon:"chevron_left","icon-color":"neutral-black",variant:"tertiary",onClick:U[4]||(U[4]=()=>r.unref(p).previousPage())},null,8,["disabled"]),r.createVNode(we,{disabled:!r.unref(p).getCanNextPage(),icon:"chevron_right","icon-color":"neutral-black",variant:"tertiary",onClick:U[5]||(U[5]=()=>r.unref(p).nextPage())},null,8,["disabled"])])],2)],4))],512)}}}),[["__scopeId","data-v-3de7dd74"]]),UM={class:"fm-customize-fields"},WM={class:"fm-customize-fields__header"},jM={class:"fm-typo-en-title-md-600 text-fm-color-typo-primary"},GM={key:0,class:"fm-customize-fields__search"},QM={class:"fm-customize-fields__actions"},XM={class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},qM={class:"fm-customize-fields__list-container"},KM={class:"fm-customize-fields__item"},JM={class:"fm-customize-fields__item-left"},YM={class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary fm-customize-fields__item-label"},ZM={key:0,class:"fm-customize-fields__empty"},$M={class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},eL=Ie(r.defineComponent({__name:"FmCustomizeFields",props:{modelValue:{},title:{},searchPlaceholder:{},showCloseButton:{type:Boolean,default:!0},searchable:{type:Boolean,default:!0},showToggleAllButton:{type:Boolean,default:!0},hideAllText:{},showAllText:{},shownLabel:{}},emits:["update:modelValue","close"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(""),a=r.ref(!1),s=v=>[...v].sort((k,x)=>k.position-x.position),l=r.ref(s(n.modelValue));r.watch(()=>n.modelValue,v=>{l.value=s(v)},{deep:!0});const c=r.computed(()=>{if(!i.value)return l.value;const v=i.value.toLowerCase();return l.value.filter(k=>k.label.toLowerCase().includes(v))}),u=v=>{const k=l.value.findIndex(C=>C.id===v);if(k===-1)return;const x=l.value[k];x.canHide!==!1&&(l.value[k]={...x,visible:!x.visible},b())},h=()=>{l.value=l.value.map(v=>({...v,visible:v.canHide===!1?v.visible:!1})),b()},p=()=>{l.value=l.value.map(v=>({...v,visible:!0})),b()},m=()=>{a.value=!1,b()},b=()=>{const v=l.value.map((k,x)=>({...k,position:x}));o("update:modelValue",v)},y=r.computed(()=>l.value.filter(k=>k.canHide!==!1).every(k=>!k.visible));return(v,k)=>(r.openBlock(),r.createElementBlock("div",UM,[r.createElementVNode("div",WM,[r.createElementVNode("span",jM,r.toDisplayString(v.title??r.unref(_)("customizeFields.title")),1),v.showCloseButton?(r.openBlock(),r.createBlock(be,{key:0,name:"close",size:"md",class:"fm-customize-fields__close-btn",onClick:k[0]||(k[0]=x=>v.$emit("close"))})):r.createCommentVNode("",!0)]),v.searchable?(r.openBlock(),r.createElementBlock("div",GM,[r.createVNode(jl,{modelValue:i.value,"onUpdate:modelValue":k[1]||(k[1]=x=>i.value=x),placeholder:v.searchPlaceholder??r.unref(_)("customizeFields.searchPlaceholder"),class:"w-full"},null,8,["modelValue","placeholder"])])):r.createCommentVNode("",!0),r.createElementVNode("div",QM,[r.createElementVNode("span",XM,r.toDisplayString(v.shownLabel??r.unref(_)("customizeFields.shown")),1),v.showToggleAllButton&&!y.value?(r.openBlock(),r.createElementBlock("button",{key:0,class:"fm-customize-fields__hide-all-btn",onClick:h},r.toDisplayString(v.hideAllText??r.unref(_)("customizeFields.hideAll")),1)):r.createCommentVNode("",!0),v.showToggleAllButton&&y.value?(r.openBlock(),r.createElementBlock("button",{key:1,class:"fm-customize-fields__hide-all-btn",onClick:p},r.toDisplayString(v.showAllText??r.unref(_)("customizeFields.showAll")),1)):r.createCommentVNode("",!0)]),r.createElementVNode("div",qM,[r.createVNode(r.unref(zs),{modelValue:l.value,"onUpdate:modelValue":k[2]||(k[2]=x=>l.value=x),"item-key":x=>x.id,handle:".fm-customize-fields__drag-handle",class:"fm-customize-fields__list","ghost-class":"fm-customize-fields__item--ghost",onStart:k[3]||(k[3]=x=>a.value=!0),onEnd:m},{item:r.withCtx(({element:x})=>[r.withDirectives(r.createElementVNode("div",KM,[r.createElementVNode("div",JM,[r.createVNode(be,{name:"drag_indicator",size:"md",class:"fm-customize-fields__drag-handle",color:"#8E8E93"}),x.icon?(r.openBlock(),r.createBlock(be,{key:0,name:x.icon,size:"md",class:"fm-customize-fields__item-icon",color:"#636366"},null,8,["name"])):r.createCommentVNode("",!0),r.createElementVNode("span",YM,r.toDisplayString(x.label),1)]),r.createVNode(Rl,{"model-value":x.visible,disabled:x.canHide===!1,"onUpdate:modelValue":C=>u(x.id)},null,8,["model-value","disabled","onUpdate:modelValue"])],512),[[r.vShow,!i.value||x.label.toLowerCase().includes(i.value.toLowerCase())]])]),_:1},8,["modelValue","item-key"]),c.value.length===0&&i.value?(r.openBlock(),r.createElementBlock("div",ZM,[r.createElementVNode("span",$M,r.toDisplayString(r.unref(_)("customizeFields.noFieldsFound")),1)])):r.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-28662a9d"]]),tL=r.createElementVNode("span",{class:"fm-typo-en-body-lg-400 text-fm-color-typo-secondary"}," More ",-1),nL=r.defineComponent({__name:"FmTabs",props:{modelValue:{default:null},items:{},vertical:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showMoreAt:{default:6}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),a=r.computed(()=>({vertical:n.vertical,disabled:n.disabled})),s=r.computed(()=>{const u=n.items.slice(0,n.showMoreAt-1),h=n.items.find(m=>{var b;return m.value===n.modelValue||((b=m.children)==null?void 0:b.find(y=>y.value===n.modelValue))}),p=u.map(m=>m.value);return h&&p.includes(h.value)?n.items.slice(0,n.showMoreAt):h?[...u,h]:u}),l=r.computed(()=>{const u=s.value.map(h=>h.value);return n.items.filter(h=>!u.includes(h.value))}),c=u=>{i.value=!1,o("update:modelValue",u)};return(u,h)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex",u.vertical?"flex-col":"flex-row items-center"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,p=>r.renderSlot(u.$slots,"default",r.mergeProps({ref_for:!0},{...p,tabsProps:a.value}),()=>[r.createVNode(hb,r.mergeProps({"model-value":n.modelValue,ref_for:!0},{children:p.children,label:p.label,icon:p.icon,disabled:p.disabled,badge:p.badge,value:p.value,tabsProps:a.value},{disabled:p.disabled===void 0?u.disabled:p.disabled,vertical:u.vertical,"onUpdate:modelValue":h[0]||(h[0]=m=>o("update:modelValue",m))}),null,16,["model-value","disabled","vertical"])])),256)),l.value.length>0?(r.openBlock(),r.createBlock(so,{key:0,"show-menu":i.value,class:r.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":u.vertical}]),placement:u.vertical?"right-start":"bottom-start",onMenuChanged:h[1]||(h[1]=p=>i.value=p)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-8 hover:bg-fm-color-opacity-sm items-center px-16 rounded-sm",[u.vertical?"h-40":"h-[46px]"]])},[r.createVNode(be,{name:"more_vert"}),tL],2)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,p=>{var m;return r.openBlock(),r.createElementBlock(r.Fragment,{key:p.value},[(m=p.children)!=null&&m.length?(r.openBlock(),r.createBlock(so,{key:0,placement:"right-start"},{"menu-button":r.withCtx(()=>[r.createVNode(Dt,{"model-value":n.modelValue===p.value,label:p.label,icon:p.icon,disabled:p.disabled,expandable:""},{append:r.withCtx(()=>[p.badge?(r.openBlock(),r.createBlock(or,{key:0,value:p.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled"])]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.children,b=>(r.openBlock(),r.createBlock(Dt,{key:b.value,"model-value":n.modelValue===b.value,label:b.label,icon:b.icon,disabled:b.disabled,onClick:y=>c(b.value)},{append:r.withCtx(()=>[b.badge?(r.openBlock(),r.createBlock(or,{key:0,value:b.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:2},1024)):(r.openBlock(),r.createBlock(Dt,{key:1,"model-value":n.modelValue===p.value,label:p.label,icon:p.icon,disabled:p.disabled,onClick:b=>c(p.value)},{append:r.withCtx(()=>[p.badge?(r.openBlock(),r.createBlock(or,{key:0,value:p.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))],64)}),128))]),_:1},8,["show-menu","class","placement"])):r.createCommentVNode("",!0)],2))}}),oL=["tabindex"],rL=r.defineComponent({__name:"FmCollapsibleTab",props:{modelValue:{default:void 0},label:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{},value:{default:void 0},children:{default:()=>[]},indentation:{default:1},active:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},focusable:{type:Boolean,default:void 0},action:{}},setup(t){const e=t,n=Te(e,"modelValue"),o=r.computed(()=>e.children.length>0),i=r.ref(!e.expand||e.disabled),a=r.computed(()=>{if(!o.value)return 0;function m(y){return y.children?[y,...y.children.flatMap(m)]:[y]}return 56*(e.children?e.children.flatMap(m):[]).length});function s(){if(!e.disabled){if(o.value){i.value=!i.value;return}n.value=e.value,e.action&&e.action()}}const l=r.computed(()=>typeof e.focusable=="boolean"?e.focusable:!e.disabled&&(!i.value||!o.value));function c(m){return m.children&&m.children.length?m.children.some(c):e.modelValue===m.value}const u=r.computed(()=>{const m=c(e);return o.value?m&&i.value:m}),h=r.computed(()=>e.children?e.children.map(({modelValue:m,indentation:b,active:y,focusable:v,...k})=>{const x=c(k);return{...k,expand:x,focusable:!k.disabled&&!i.value}}):[]),p=r.computed(()=>{switch(e.indentation){case 1:return 8;case 2:return 16;case 3:return 24;default:return 32}});return(m,b)=>{const y=r.resolveComponent("FmCollapsibleTab",!0),v=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",{style:r.normalizeStyle({paddingLeft:`${p.value}px`}),class:"flex flex-col px-8"},[r.withDirectives((r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["flex fm-corner-radius-md gap-4 items-center px-16 py-8 focus-visible:outline-none",{"cursor-pointer focus-visible:bg-fm-color-opacity-md hover:bg-fm-color-opacity-sm ":!m.disabled,"cursor-not-allowed":m.disabled,"bg-fm-color-system-warning-100":u.value}]),tabindex:l.value?"0":"-1",type:"button",onClick:s},[m.icon?(r.openBlock(),r.createBlock(be,{key:0,class:r.normalizeClass({"text-fm-color-typo-disabled":m.disabled,"text-fm-color-typo-primary":!m.disabled&&!u.value,"text-fm-color-primary":!m.disabled&&u.value}),name:m.icon},null,8,["class","name"])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["py-4 fm-typo-en-body-lg-400 text-left line-clamp-2",{"text-fm-color-typo-secondary":!m.disabled&&!u.value,"text-fm-color-primary":!m.disabled&&u.value,"text-fm-color-typo-disabled":m.disabled}])},r.toDisplayString(m.label),3),m.badge!==void 0&&m.badge!==null?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[typeof m.badge=="number"?(r.openBlock(),r.createBlock(or,{key:0,value:m.badge,inline:"",variant:"numeric"},null,8,["value"])):(r.openBlock(),r.createBlock(r.resolveDynamicComponent(m.badge),{key:1}))],64)):r.createCommentVNode("",!0),o.value?(r.openBlock(),r.createElementBlock("div",{key:2,style:r.normalizeStyle({transformOrigin:"center",transform:`rotate(${i.value?"0":"180"}deg)`,transition:"transform ease-out 250ms"}),class:"flex h-24 items-center ml-auto w-24"},[r.createVNode(be,{class:r.normalizeClass({"text-fm-color-neutral-gray-300":!m.disabled,"text-fm-color-typo-disabled":m.disabled}),name:"expand_more",size:"md"},null,8,["class"])],4)):r.createCommentVNode("",!0)],10,oL)),[[v,!m.disabled]]),o.value?(r.openBlock(),r.createElementBlock("div",{key:0,style:r.normalizeStyle({maxHeight:i.value?0:`${a.value}px`,transition:"max-height 250ms",transitionTimingFunction:i.value?"ease-out":"ease-in"}),class:"flex flex-col overflow-hidden"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.value,(k,x)=>(r.openBlock(),r.createBlock(y,r.mergeProps({key:x,"model-value":r.unref(n),"onUpdate:modelValue":b[0]||(b[0]=C=>r.isRef(n)?n.value=C:null),indentation:m.indentation+1,ref_for:!0},k),null,16,["model-value","indentation"]))),128))],4)):r.createCommentVNode("",!0)],4)}}}),iL={class:"h-full flex flex-col overflow-auto"},aL=r.defineComponent({__name:"FmCollapsibleTabs",props:{modelValue:{default:void 0},items:{default:()=>[]}},setup(t){const e=t,n=Te(e,"modelValue"),o=r.computed(()=>e.items?e.items.map(({modelValue:a,...s})=>s):[]);function i(a){function s(c){return c.children?c.children.flatMap(s):[c.value]}return(a.children?a.children.flatMap(s):[a.value]).includes(e.modelValue)}return(a,s)=>(r.openBlock(),r.createElementBlock("div",iL,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(l,c)=>(r.openBlock(),r.createBlock(rL,r.mergeProps({key:c,"model-value":r.unref(n),"onUpdate:modelValue":s[0]||(s[0]=u=>r.isRef(n)?n.value=u:null),active:i(l),expand:i(l),ref_for:!0},l),null,16,["model-value","active","expand"]))),128))]))}}),sL=r.defineComponent({__name:"FmAvatar",props:{initials:{default:()=>""},name:{default:()=>""},src:{default:void 0},size:{default:()=>"md"},rounded:{default:()=>"xxxl"}},setup(t){const e=t,n=r.computed(()=>{if(e.initials)return e.initials.slice(0,2);if(e.name){const[o,i]=e.name.split(" ");return i?`${o[0]}${i[0]}`:o.slice(0,2)}return e.src?"":"?"});return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center justify-center uppercase",{"w-24 h-24 fm-typo-en-body-sm-600":o.size==="sm","w-9 h-9 fm-typo-en-body-sm-600":o.size==="sm2","w-40 h-40 fm-typo-en-body-md-600":o.size==="md","w-48 h-48 fm-typo-en-body-lg-600":o.size==="lg","w-56 h-56 fm-typo-en-body-lg-600":o.size==="xl","bg-fm-color-neutral-gray-100":!e.src},{"rounded-xxxl":o.rounded==="xxxl","rounded-xxl":o.rounded==="xxl","rounded-xl":o.rounded==="xl","rounded-lg":o.rounded==="lg","rounded-md":o.rounded==="md","rounded-sm":o.rounded==="sm"}]),style:r.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},r.toDisplayString(n.value),7))}}),lL=r.defineComponent({__name:"FmThumbnail",props:{src:{default:void 0},icon:{default:t=>t.src?"":"image"},size:{default:()=>"md"}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center justify-center fm-corner-radius-md border-1 border-fm-color-neutral-gray-300",{"w-24 h-24 fm-typo-en-body-sm-600":n.size==="sm","w-40 h-40 fm-typo-en-body-md-600":n.size==="md","w-56 h-56 fm-typo-en-body-lg-600":n.size==="lg","w-72 h-72 fm-typo-en-body-lg-600":n.size==="xl","text-fm-color-neutral-gray-300 bg-fm-color-neutral-gray-100":!e.src}]),style:r.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},[n.icon?(r.openBlock(),r.createBlock(be,{key:0,name:n.icon},null,8,["name"])):r.createCommentVNode("",!0)],6))}}),dL={class:"bg-white flex fm-corner-radius-md gap-4 items-center px-24 py-16"},cL={class:"flex gap-4 items-center xs:hidden"},uL={key:1,class:"hidden xs:flex"},fL=r.defineComponent({__name:"FmPageHead",props:{title:{default:()=>""},description:{default:()=>""},backButton:{type:Boolean,default:()=>!1},actions:{default:()=>[]},zIndexForBottomSheet:{default:void 0},titleBold:{type:Boolean,default:()=>!0},primaryActionXsBottomMargin:{}},emits:["click:back","click:action"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{const s=[...n.actions],l=s.findIndex(m=>m.isPrimary),c=s[l],[u,h,...p]=s.filter((m,b)=>b!==l);return{primaryAction:c,firstSecondaryAction:u,secondSecondaryAction:h,showMoreSecondary:p,bottomSheetActions:s.filter(m=>!m.isPrimary),fabActions:s.filter(m=>m.isPrimary)}}),a=r.ref(!1);return(s,l)=>(r.openBlock(),r.createElementBlock("div",dL,[s.backButton?(r.openBlock(),r.createBlock(we,{key:0,icon:"arrow_back","icon-color":"black",size:"md",type:"button",variant:"tertiary",onClick:l[0]||(l[0]=c=>o("click:back"))})):r.createCommentVNode("",!0),r.renderSlot(s.$slots,"prepend"),r.createVNode(pf,{description:s.description,title:s.title,"title-bold":s.titleBold,class:"flex-grow"},{title:r.withCtx(()=>[r.renderSlot(s.$slots,"title")]),description:r.withCtx(()=>[r.renderSlot(s.$slots,"description")]),_:3},8,["description","title","title-bold"]),r.createElementVNode("div",cL,[i.value.firstSecondaryAction?(r.openBlock(),r.createBlock(we,{key:0,"append-icon":i.value.firstSecondaryAction.appendIcon,"bg-color":i.value.firstSecondaryAction.bgColor,"border-color":i.value.firstSecondaryAction.borderColor,"icon-color":i.value.firstSecondaryAction.iconColor,label:i.value.firstSecondaryAction.label,"prepend-icon":i.value.firstSecondaryAction.prependIcon,"text-color":i.value.firstSecondaryAction.fontColor,variant:i.value.firstSecondaryAction.variant??"tertiary",size:"md",type:"button",onClick:l[1]||(l[1]=c=>o("click:action",i.value.firstSecondaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0),i.value.secondSecondaryAction?(r.openBlock(),r.createBlock(we,{key:1,"append-icon":i.value.secondSecondaryAction.appendIcon,"bg-color":i.value.secondSecondaryAction.bgColor,"border-color":i.value.secondSecondaryAction.borderColor,"icon-color":i.value.secondSecondaryAction.iconColor,label:i.value.secondSecondaryAction.label,"prepend-icon":i.value.secondSecondaryAction.prependIcon,"text-color":i.value.secondSecondaryAction.fontColor,variant:i.value.firstSecondaryAction.variant??"tertiary",size:"md",type:"button",onClick:l[2]||(l[2]=c=>o("click:action",i.value.secondSecondaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0),i.value.showMoreSecondary.length>1?(r.openBlock(),r.createBlock(so,{key:2},{"menu-button":r.withCtx(()=>[r.createVNode(we,{"append-icon":"expand_more","icon-color":"black",label:r.unref(_)("actions.more"),size:"md",type:"button",variant:"tertiary"},null,8,["label"])]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.showMoreSecondary,c=>(r.openBlock(),r.createBlock(Dt,{key:c.value,icon:c.prependIcon,label:c.label,onClick:u=>o("click:action",c.value)},null,8,["icon","label","onClick"]))),128))]),_:1})):i.value.showMoreSecondary.length===1?(r.openBlock(),r.createBlock(we,{key:3,"append-icon":i.value.showMoreSecondary[0].appendIcon,label:i.value.showMoreSecondary[0].label,"prepend-icon":i.value.showMoreSecondary[0].prependIcon,size:"md",type:"button",variant:"tertiary",onClick:l[3]||(l[3]=c=>o("click:action",i.value.showMoreSecondary[0].value))},null,8,["append-icon","label","prepend-icon"])):r.createCommentVNode("",!0),i.value.primaryAction?(r.openBlock(),r.createBlock(we,{key:4,"append-icon":i.value.primaryAction.appendIcon,"bg-color":i.value.primaryAction.bgColor,"border-color":i.value.primaryAction.borderColor,"icon-color":i.value.primaryAction.iconColor,label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"text-color":i.value.primaryAction.fontColor,variant:i.value.primaryAction.variant??"primary",size:"md",type:"button",onClick:l[4]||(l[4]=c=>o("click:action",i.value.primaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0)]),i.value.bottomSheetActions.length>0?(r.openBlock(),r.createElementBlock("div",uL,[r.createVNode(we,{icon:"more_vert","icon-color":"black",size:"md",type:"button",variant:"tertiary",onClick:l[5]||(l[5]=c=>a.value=!0)})])):r.createCommentVNode("",!0),r.renderSlot(s.$slots,"append"),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(qc,{"model-value":a.value,"onUpdate:modelValue":l[6]||(l[6]=c=>a.value=c),"z-index":n.zIndexForBottomSheet,"dismiss-away":""},{default:r.withCtx(()=>[r.createVNode(uf,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.bottomSheetActions,c=>(r.openBlock(),r.createBlock(ff,{key:c.value,label:c.label,class:"hover:bg-fm-color-neutral-gray-100",onClick:u=>{o("click:action",c.value),a.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["model-value","z-index"]),r.createElementVNode("div",{class:r.normalizeClass(["fixed hidden right-16 xs:inline",{"bottom-[68px]":!n.primaryActionXsBottomMargin}]),style:r.normalizeStyle({bottom:n.primaryActionXsBottomMargin})},[i.value.primaryAction?(r.openBlock(),r.createBlock(we,{key:0,"append-icon":i.value.primaryAction.appendIcon,"bg-color":i.value.primaryAction.bgColor,"border-color":i.value.primaryAction.borderColor,"icon-color":i.value.primaryAction.iconColor,label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"text-color":i.value.primaryAction.fontColor,variant:i.value.primaryAction.variant??"fab",class:"fm-shadow-light-100",size:"md",type:"button",onClick:l[7]||(l[7]=c=>o("click:action",i.value.primaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0)],6)]))]))}}),pL={class:"fm-typo-en-title-md-600"},hL={class:"flex"},mL=Ie(r.defineComponent({__name:"FmScorecard",props:{title:{},value:{default:0},compareValue:{default:void 0},description:{},hideCompare:{type:Boolean,default:!1},hideLineChart:{type:Boolean,default:!1},sparklineData:{default:void 0}},setup(t){const e=t,n=(s,l)=>{if(s===""||l==="")return null;const c=Number(s),u=Number(l);let h=0;u===0?c===0?h=0:h=1:h=(c-u)/u;const p=o(h);return{value:isNaN(h)?"":`${(h*100).toFixed(0)}%`,icon:p}};function o(s){return s>0?{name:"moving",color:"#1F7735",tailwind:"fm-color-system-success-100"}:s<0?{name:"trending_down",color:"#99231D",tailwind:"fm-color-system-error-100"}:{name:"equal",color:"#C7C7CC",tailwind:"fm-color-neutral-gray-100"}}const i=r.computed(()=>{const{value:s,compareValue:l}=e;return l?n(s,l):null}),a=r.computed(()=>{var s;return((s=e.sparklineData)==null?void 0:s.datasets.map(l=>{var c;return{label:l.name,data:l.values,fill:!0,color:((c=i.value)==null?void 0:c.icon.color)??"fm-color-system-info-300"}}))??[]});return(s,l)=>(r.openBlock(),r.createBlock(Kc,{class:"flex flex-col gap-2 p-5",variant:"outlined"},{default:r.withCtx(()=>[r.createVNode(Hc,{content:e.description},{default:r.withCtx(()=>[r.renderSlot(s.$slots,"title",{},()=>[r.createElementVNode("p",{class:r.normalizeClass([e.description?"border-b-2 border-dotted":"","fm-typo-body-md-400 w-full truncate"])},r.toDisplayString(e.title),3)],!0)]),_:3},8,["content"]),r.createElementVNode("p",pL,r.toDisplayString(e.value),1),s.hideCompare?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",hL,[i.value?(r.openBlock(),r.createBlock(Qc,{key:0,class:r.normalizeClass(`bg-${i.value.icon.tailwind}`),compact:""},{default:r.withCtx(()=>[r.createVNode(be,{color:i.value.icon.color,name:i.value.icon.name},null,8,["color","name"]),r.createElementVNode("p",{style:r.normalizeStyle({color:i.value.icon.color}),class:"fm-typo-body-md-700"},r.toDisplayString(i.value.value),5)]),_:1},8,["class"])):r.createCommentVNode("",!0)]),r.renderSlot(s.$slots,"compare",{},void 0,!0)],64)),e.sparklineData?(r.openBlock(),r.createBlock(Kc,{key:1},{default:r.withCtx(()=>[r.createVNode(v1,{datasets:a.value,"hide-x-axis":!0,"hide-y-axis":!0,legend:{display:!1},"x-axis":{categories:e.sparklineData.dimension},class:"sparkline"},null,8,["datasets","x-axis"])]),_:1})):r.createCommentVNode("",!0)]),_:3}))}}),[["__scopeId","data-v-c66db589"]]);var as=(t=>(t.Premium="premium",t.Beta="beta",t.Paid="paid",t))(as||{});const gL=r.defineComponent({__name:"FmPill",props:{variant:{default:as.Beta},label:{}},setup(t){const e=t,n=r.computed(()=>({[as.Beta]:{containerClass:"border border-fm-color-system-error-400 bg-fm-color-system-error-100 ",label:"BETA",labelClass:"fm-typo-en-body-sm-600 text-fm-color-typo-error"},[as.Premium]:{containerClass:"h-[18px] fm-pill-premium-gradient",label:"Premium",labelClass:"fm-typo-en-body-sm-600 text-fm-color-typo-white"},[as.Paid]:{containerClass:"border border-fm-color-system-info-400 bg-fm-color-system-info-100 ",icon:"lock",label:"Paid feature",labelClass:"fm-typo-en-body-sm-600 text-fm-color-typo-info"}})[e.variant]);return(o,i)=>{const a=r.resolveComponent("FmIcon");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center fm-corner-radius-md px-4 gap-4",n.value.containerClass])},[n.value.icon?(r.openBlock(),r.createBlock(a,{key:0,size:"sm",outline:"",name:n.value.icon,class:r.normalizeClass(n.value.labelClass)},null,8,["name","class"])):r.createCommentVNode("",!0),r.createElementVNode("span",{class:r.normalizeClass(n.value.labelClass)},r.toDisplayString(e.label||n.value.label),3)],2)}}}),bL=Ie(gL,[["__scopeId","data-v-cdca68a7"]]),ld=16,yL=r.defineComponent({__name:"FmSnackbarToast",setup(t){const{breakpoints:e}=nr(),n=r.inject(Ec),o=r.computed(()=>{var u;const s={currentSum:ld,tops:new Array},l=Object.values(dn).reduce((h,p)=>({...h,[p]:{...s}}),{});return[...((u=n==null?void 0:n.store)==null?void 0:u.snackbars)??[]].reduce((h,p)=>{const m=e.value.xs?dn.TOP:p.position??dn.TOP_RIGHT,{currentSum:b,tops:y}=h[m];y.push({id:p.id,accumulatedHeight:b});const v=p.mountStage===wt.EXPIRED?0:ld+p.renderedHeight;return h[m]={currentSum:b+v,tops:y},h},l)}),i=r.computed(()=>{var s,l;return(l=(s=n==null?void 0:n.store)==null?void 0:s.snackbars)==null?void 0:l.map(c=>{var p,m,b,y,v,k;let u=0;const h=e.value.xs?dn.TOP:c.position??dn.TOP_RIGHT;switch(c.mountStage){case wt.PREMOUNT:{u=e.value.xs?0:ld;break}case wt.MOUNTED:{u=((b=(m=(p=o.value[h].tops)==null?void 0:p.find)==null?void 0:m.call(p,x=>x.id===c.id))==null?void 0:b.accumulatedHeight)||ld;break}case wt.EXPIRED:{u=((k=(v=(y=o.value[h].tops)==null?void 0:y.find)==null?void 0:v.call(y,x=>x.id===c.id))==null?void 0:k.accumulatedHeight)||0,u=Math.max(0,u-c.renderedHeight);break}}return{...c,top:u}})}),a=(s,l,c)=>{if(e.value.xs)return{bottom:`${s}px`,width:"calc(100vw - 32px)",right:"16px",opacity:l===wt.EXPIRED?0:1};if(c===dn.TOP)return{top:l===wt.PREMOUNT?"-20px":`${s}px`,opacity:l===wt.EXPIRED?0:1,right:"50vw",transform:"translateX(50%)"};if(c===dn.TOP_LEFT)return{top:`${s}px`,opacity:l===wt.EXPIRED?0:1,left:l===wt.PREMOUNT?"-20px":"16px"};if(c===dn.TOP_RIGHT)return{top:`${s}px`,opacity:l===wt.EXPIRED?0:1,right:l===wt.PREMOUNT?"-20px":"16px"};if(c===dn.BOTTOM)return{bottom:l===wt.PREMOUNT?"-20px":`${s}px`,opacity:l===wt.EXPIRED?0:1,right:"50vw",transform:"translateX(50%)"};if(c===dn.BOTTOM_LEFT)return{bottom:l===wt.PREMOUNT?"-20px":`${s}px`,opacity:l===wt.EXPIRED?0:1,left:l===wt.PREMOUNT?"-20px":"16px"};if(c===dn.BOTTOM_RIGHT)return{bottom:l===wt.PREMOUNT?"-20px":`${s}px`,opacity:l===wt.EXPIRED?0:1,right:l===wt.PREMOUNT?"-20px":"16px"}};return(s,l)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,c=>(r.openBlock(),r.createBlock(r.Teleport,{key:c.id,to:"body"},[r.createVNode(pb,{action:c.action,description:c.message,dismissable:c.dismissable,spinner:c.spinner,style:r.normalizeStyle(a(c.top,c.mountStage,c.position??r.unref(dn).TOP_RIGHT)),title:c.title,variant:c.type,"z-index":c.zIndex,class:"fixed transition-all z-10",onVnodeMounted:u=>{var h;return(h=r.unref(n))==null?void 0:h.onSnackbarMounted(c.id,u.el.scrollHeight,c.persistent)},onOnAction:()=>{var u,h;(u=c==null?void 0:c.onAction)==null||u.call(c),(h=r.unref(n))==null||h.close(c.id)},onOnDismiss:()=>{var u;return(u=r.unref(n))==null?void 0:u.close(c.id)}},null,8,["action","description","dismissable","spinner","style","title","variant","z-index","onVnodeMounted","onOnAction","onOnDismiss"])]))),128))}});var dn=(t=>(t.TOP="top",t.TOP_LEFT="top-left",t.TOP_RIGHT="top-right",t.BOTTOM="bottom",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_RIGHT="bottom-right",t))(dn||{}),wt=(t=>(t.PREMOUNT="PREMOUNT",t.MOUNTED="MOUNTED",t.EXPIRED="EXPIRED",t))(wt||{});class vy{constructor(){ue(this,"store",r.reactive({snackbars:new Array}))}open(e,n){const o=Math.random().toString(16).slice(2),i=[{...e,id:o,mountStage:"PREMOUNT",duration:n===null?null:n??5e3,renderedHeight:0,type:(e==null?void 0:e.type)??"info",dismissable:typeof(e==null?void 0:e.dismissable)=="boolean"?e.dismissable:!0,position:(e==null?void 0:e.position)??"top-right"},...this.store.snackbars];return this.store.snackbars=i,o}onSnackbarMounted(e,n,o){const i=this.store.snackbars.findIndex(s=>s.id===e);if(i===-1)return;const a=this.store.snackbars[i];this.store.snackbars[i]={...a,renderedHeight:n},setTimeout(()=>{const s=this.store.snackbars[i];this.store.snackbars[i]={...s,mountStage:"MOUNTED"}}),!o&&typeof a.duration=="number"&&setTimeout(()=>{this.close(e)},a.duration)}close(e){const n=this.store.snackbars.findIndex(i=>i.id===e);if(n===-1)return;const o=this.store.snackbars[n];this.store.snackbars[n]={...o,mountStage:"EXPIRED"},setTimeout(()=>{this.removeSnackbar(e)},500)}removeSnackbar(e){const n=this.store.snackbars.findIndex(o=>o.id===e);n!==-1&&this.store.snackbars.splice(n,1)}updateSnackbar(e,n){const o=this.store.snackbars.findIndex(a=>a.id===e);if(o===-1)return;const i=this.store.snackbars[o];this.store.snackbars[o]={...i,...n}}}const ky={install(t){t.provide(Ec,new vy);const e=document.body,n=r.createVNode(yL);n.appContext=t._context,r.render(n,e)}},wy={FmAdvancedSort:Mm,FmBadge:or,FmBottomSheet:qc,FmBreadcrumb:Rx,FmButton:we,FmButtonGroup:Mx,FmCard:Kc,FmCardActionArea:Lx,FmCardActions:_x,FmCardHeader:Ux,FmCardMedia:jx,FmCardSection:Jc,FmCardSubtitle:Hm,FmCardTitle:_m,FmChip:Qc,FmChipGroup:Xc,FmDialog:Qx,FmDropField:Kx,FmDynamicDialog:Wm,FmLineChart:v1,FmPieChart:_6,FmBarChart:Q6,FmScorecard:mL,FmCheckbox:Pm,FmDatePicker:k9,FmDatePickerMobile:x1,FmDateRangePicker:W5,FmDateRangePickerMobile:B1,FmSimpleDatePicker:hE,FmSimpleDatePickerMobile:I1,FmSimpleDateRangePicker:QE,FmSimpleDateRangePickerMobile:O1,FmField:ct,FmForm:Fm,FmFormGroup:Rt,FmErrorSummary:JE,FmHelperText:dm,FmLabel:vn,FmPhoneNumber:cB,FmPinField:pB,FmRadio:kB,FmRadioGroup:wB,FmSearch:jl,FmGlobalSearch:qB,FmSelect:ko,FmStepperField:$B,FmSwitch:Rl,FmTextField:Lr,FmTextarea:tP,FmTimeInput:Tl,FmTimePicker:No,FmTimeRangePicker:lP,FmIcon:be,FmList:uf,FmListItem:ff,FmMenu:so,FmMenuDeprecated:pP,FmMenuDivider:S1,FmMenuHeader:mP,FmMenuItem:Dt,FmCircularProgress:Rr,FmLinearProgress:kP,FmProgressBar:xP,FmSideSheet:DP,FmSnackbar:pb,FmSpacer:rr,FmStep:TP,FmStepper:LP,FmTab:hb,FmTable:HM,FmCustomizeFields:eL,FmTableToolbar:KP,FmTableHeader:Yl,FmTabs:nL,FmCollapsibleTabs:aL,FmTooltip:Hc,FmAvatar:sL,FmThumbnail:lL,FmPageHead:fL,FmTopSheet:cb,FmPopover:Io,FmOverlay:Ei,FmPill:bL},vL=r.defineComponent({__name:"FmTooltipDirective",props:{reference:{},placement:{default:"top"},content:{default:""},disabled:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1},zIndex:{}},setup(t){const e=t,n=r.ref(!1),o=r.ref(null),i=r.ref(null),a=r.computed(()=>e.reference());let s;const{floatingStyles:l,middlewareData:c,placement:u}=Ci(a,o,{whileElementsMounted:ki,placement:e.placement,middleware:[xi(),wi({mainAxis:6}),Sm({element:i})]}),h=r.computed(()=>{var y,v,k,x;const b={top:"bottom",right:"left",bottom:"top",left:"right"}[u.value];return{left:((y=c.value.arrow)==null?void 0:y.x)!=null?`${(v=c.value.arrow)==null?void 0:v.x}px`:"",top:((k=c.value.arrow)==null?void 0:k.y)!=null?`${(x=c.value.arrow)==null?void 0:x.y}px`:"",[b]:"-3px"}}),p=()=>{e.disabled||(s&&clearTimeout(s),s=setTimeout(()=>{n.value=!0},250))},m=()=>{e.disabled||(s&&clearTimeout(s),s=setTimeout(()=>{n.value=!1},250))};return r.onMounted(()=>{a.value.addEventListener("pointerdown",p),a.value.addEventListener("pointermove",b=>{b.pointerType!=="touch"&&p()}),a.value.addEventListener("pointerleave",m),a.value.addEventListener("pointerup",m)}),r.onBeforeUnmount(()=>{a.value.removeEventListener("pointerdown",p),a.value.removeEventListener("pointermove",b=>{b.pointerType!=="touch"&&p()}),a.value.removeEventListener("pointerleave",m),a.value.removeEventListener("pointerup",m)}),(b,y)=>n.value&&!b.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:"bg-fm-color-neutral-black fm-shadow-light-300 fm-typo-en-body-sm-400 max-w-[240px] px-16 py-12 rounded-lg text-fm-color-typo-white",style:r.normalizeStyle({...r.unref(l),zIndex:b.zIndex})},[r.withDirectives(r.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:"absolute bg-fm-color-neutral-black h-8 rotate-45 rounded-[2px] w-8",style:r.normalizeStyle(h.value)},null,4),[[r.vShow,!b.hideArrow]]),r.createTextVNode(" "+r.toDisplayString(b.content),1)],4)):r.createCommentVNode("",!0)}});let Wf;const mr=r.ref([]);let xy=0;const kL=()=>{if(Wf)return;const t=document.createElement("div");document.body.appendChild(t),Wf=r.createApp({render:()=>mr.value.map(e=>r.h(vL,e))}),Wf.mount(t)},dd=t=>{if(t){for(const e of["top","right","bottom","left"])if(t[e])return e}return"top"},Sy=(t,e)=>{const{value:n,modifiers:o}=e;kL(),t.$_fmTooltipId=xy,xy+=1,typeof n=="string"?mr.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:dd(o),hideArrow:!1}):n&&typeof n=="object"&&mr.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),placement:dd(o),disabled:n.disabled??!1,hideArrow:n.hideArrow??!1,zIndex:n.zIndex})},wL={mounted:Sy,updated:(t,e)=>{const{value:n,modifiers:o}=e,i=mr.value.findIndex(a=>a.id===t.$_fmTooltipId);if(i===-1){Sy(t,e);return}typeof n=="string"?mr.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:dd(o),hideArrow:!1}:n&&typeof n=="object"&&(mr.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),disabled:n.disabled??!1,placement:dd(o),hideArrow:n.hideArrow??!1})},beforeUnmount:t=>{const e=mr.value.findIndex(n=>n.id===t.$_fmTooltipId);e!==-1&&mr.value.splice(e,1)}};function xL(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);var n=t.indexOf("Trident/");if(n>0){var o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}let cd;function jf(){jf.init||(jf.init=!0,cd=xL()!==-1)}var ud={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){jf(),r.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",cd&&this.$el.appendChild(t),t.data="about:blank",cd||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!cd&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const SL=r.withScopeId("data-v-b329ee4c");r.pushScopeId("data-v-b329ee4c");const CL={class:"resize-observer",tabindex:"-1"};r.popScopeId();const AL=SL((t,e,n,o,i,a)=>(r.openBlock(),r.createBlock("div",CL)));ud.render=AL,ud.__scopeId="data-v-b329ee4c",ud.__file="src/components/ResizeObserver.vue";function fd(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fd=function(e){return typeof e}:fd=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fd(t)}function EL(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function DL(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function BL(t,e,n){return e&&DL(t.prototype,e),t}function Cy(t){return PL(t)||IL(t)||OL(t)||NL()}function PL(t){if(Array.isArray(t))return Gf(t)}function IL(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function OL(t,e){if(t){if(typeof t=="string")return Gf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gf(t,e)}}function Gf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function NL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
130
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VL(t){var e;return typeof t=="function"?e={callback:t}:e=t,e}function RL(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,a,s=function(c){for(var u=arguments.length,h=new Array(u>1?u-1:0),p=1;p<u;p++)h[p-1]=arguments[p];if(a=h,!(o&&c===i)){var m=n.leading;typeof m=="function"&&(m=m(c,i)),(!o||c!==i)&&m&&t.apply(void 0,[c].concat(Cy(a))),i=c,clearTimeout(o),o=setTimeout(function(){t.apply(void 0,[c].concat(Cy(a))),o=0},e)}};return s._clear=function(){clearTimeout(o),o=null},s}function Ay(t,e){if(t===e)return!0;if(fd(t)==="object"){for(var n in t)if(!Ay(t[n],e[n]))return!1;return!0}return!1}var TL=function(){function t(e,n,o){EL(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,o)}return BL(t,[{key:"createObserver",value:function(n,o){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=VL(n),this.callback=function(l,c){i.options.callback(l,c),l&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var a=this.options.throttleOptions||{},s=a.leading;this.callback=RL(this.callback,this.options.throttle,{leading:function(c){return s==="both"||s==="visible"&&c||s==="hidden"&&!c}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(l){var c=l[0];if(l.length>1){var u=l.find(function(p){return p.isIntersecting});u&&(c=u)}if(i.callback){var h=c.isIntersecting&&c.intersectionRatio>=i.threshold;if(h===i.oldResult)return;i.oldResult=h,i.callback(h,c)}},this.options.intersection),r.nextTick(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),t}();function Ey(t,e,n){var o=e.value;if(o)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new TL(t,o,n);t._vue_visibilityState=i}}function FL(t,e,n){var o=e.value,i=e.oldValue;if(!Ay(o,i)){var a=t._vue_visibilityState;if(!o){Dy(t);return}a?a.createObserver(o,n):Ey(t,{value:o},n)}}function Dy(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var ML={beforeMount:Ey,updated:FL,unmounted:Dy};function LL(t){return{all:t=t||new Map,on:function(e,n){var o=t.get(e);o&&o.push(n)||t.set(e,[n])},off:function(e,n){var o=t.get(e);o&&o.splice(o.indexOf(n)>>>0,1)},emit:function(e,n){(t.get(e)||[]).slice().map(function(o){o(n)}),(t.get("*")||[]).slice().map(function(o){o(e,n)})}}}var By={itemsLimit:1e3},zL=/(auto|scroll)/;function Py(t,e){return t.parentNode===null?e:Py(t.parentNode,e.concat([t]))}var Qf=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},_L=function(e){return Qf(e,"overflow")+Qf(e,"overflow-y")+Qf(e,"overflow-x")},HL=function(e){return zL.test(_L(e))};function Iy(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=Py(t.parentNode,[]),n=0;n<e.length;n+=1)if(HL(e[n]))return e[n];return document.scrollingElement||document.documentElement}}function Xf(t){"@babel/helpers - typeof";return Xf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xf(t)}var Oy={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(e){return["vertical","horizontal"].includes(e)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function Ny(){return this.items.length&&Xf(this.items[0])!=="object"}var qf=!1;if(typeof window<"u"){qf=!1;try{var UL=Object.defineProperty({},"passive",{get:function(){qf=!0}});window.addEventListener("test",null,UL)}catch{}}let WL=0;var ss={name:"RecycleScroller",components:{ResizeObserver:ud},directives:{ObserveVisibility:ML},props:{...Oy,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const t={"-1":{accumulator:0}},e=this.items,n=this.sizeField,o=this.minItemSize;let i=1e4,a=0,s;for(let l=0,c=e.length;l<c;l++)s=e[l][n]||o,s<i&&(i=s),a+=s,t[l]={accumulator:a,size:s};return this.$_computedMinItemSize=i,t}return[]},simpleArray:Ny,itemIndexByKey(){const{keyField:t,items:e}=this,n={};for(let o=0,i=e.length;o<i;o++)n[e[o][t]]=o;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,e,n,o,i){const a=r.markRaw({id:WL++,index:e,used:!0,key:o,type:i}),s=r.shallowReactive({item:n,position:0,nr:a});return t.push(s),s},unuseView(t,e=!1){const n=this.$_unusedViews,o=t.nr.type;let i=n.get(o);i||(i=[],n.set(o,i)),i.push(t),e||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(t,e){this.ready&&(t||e.boundingClientRect.width!==0||e.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,e=!1){const n=this.itemSize,o=this.gridItems||1,i=this.itemSecondarySize||n,a=this.$_computedMinItemSize,s=this.typeField,l=this.simpleArray?null:this.keyField,c=this.items,u=c.length,h=this.sizes,p=this.$_views,m=this.$_unusedViews,b=this.pool,y=this.itemIndexByKey;let v,k,x,C,P;if(!u)v=k=C=P=x=0;else if(this.$_prerender)v=C=0,k=P=Math.min(this.prerender,c.length),x=null;else{const W=this.getScroll();if(e){let F=W.start-this.$_lastUpdateScrollPosition;if(F<0&&(F=-F),n===null&&F<a||F<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=W.start;const Q=this.buffer;W.start-=Q,W.end+=Q;let N=0;if(this.$refs.before&&(N=this.$refs.before.scrollHeight,W.start-=N),this.$refs.after){const F=this.$refs.after.scrollHeight;W.end+=F}if(n===null){let F,V=0,R=u-1,D=~~(u/2),U;do U=D,F=h[D].accumulator,F<W.start?V=D:D<u-1&&h[D+1].accumulator>W.start&&(R=D),D=~~((V+R)/2);while(D!==U);for(D<0&&(D=0),v=D,x=h[u-1].accumulator,k=D;k<u&&h[k].accumulator<W.end;k++);for(k===-1?k=c.length-1:(k++,k>u&&(k=u)),C=v;C<u&&N+h[C].accumulator<W.start;C++);for(P=C;P<u&&N+h[P].accumulator<W.end;P++);}else{v=~~(W.start/n*o);const F=v%o;v-=F,k=Math.ceil(W.end/n*o),C=Math.max(0,Math.floor((W.start-N)/n*o)),P=Math.floor((W.end-N)/n*o),v<0&&(v=0),k>u&&(k=u),C<0&&(C=0),P>u&&(P=u),x=Math.ceil(u/o)*n}}k-v>By.itemsLimit&&this.itemsLimitError(),this.totalSize=x;let O;const E=v<=this.$_endIndex&&k>=this.$_startIndex;if(E)for(let W=0,Q=b.length;W<Q;W++)O=b[W],O.nr.used&&(t&&(O.nr.index=y[O.item[l]]),(O.nr.index==null||O.nr.index<v||O.nr.index>=k)&&this.unuseView(O));const T=E?null:new Map;let A,M,z;for(let W=v;W<k;W++){A=c[W];const Q=l?A[l]:A;if(Q==null)throw new Error(`Key is ${Q} on item (keyField is '${l}')`);if(O=p.get(Q),!n&&!h[W].size){O&&this.unuseView(O);continue}M=A[s];let N=m.get(M),F=!1;if(!O)E?N&&N.length?O=N.pop():O=this.addView(b,W,A,Q,M):(z=T.get(M)||0,(!N||z>=N.length)&&(O=this.addView(b,W,A,Q,M),this.unuseView(O,!0),N=m.get(M)),O=N[z],T.set(M,z+1)),p.delete(O.nr.key),O.nr.used=!0,O.nr.index=W,O.nr.key=Q,O.nr.type=M,p.set(Q,O),F=!0;else if(!O.nr.used&&(O.nr.used=!0,F=!0,N)){const V=N.indexOf(O);V!==-1&&N.splice(V,1)}O.item=A,F&&(W===c.length-1&&this.$emit("scroll-end"),W===0&&this.$emit("scroll-start")),n===null?(O.position=h[W-1].accumulator,O.offset=0):(O.position=Math.floor(W/o)*n,O.offset=W%o*i)}return this.$_startIndex=v,this.$_endIndex=k,this.emitUpdate&&this.$emit("update",v,k,C,P),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:E}},getListenerTarget(){let t=Iy(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:e}=this,n=e==="vertical";let o;if(this.pageMode){const i=t.getBoundingClientRect(),a=n?i.height:i.width;let s=-(n?i.top:i.left),l=n?window.innerHeight:window.innerWidth;s<0&&(l+=s,s=0),s+l>a&&(l=a-s),o={start:s,end:s+l}}else n?o={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:o={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return o},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,qf?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(t){let e;const n=this.gridItems||1;this.itemSize===null?e=t>0?this.sizes[t-1].accumulator:0:e=Math.floor(t/n)*this.itemSize,this.scrollToPosition(e)},scrollToPosition(t){const e=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,o,i;if(this.pageMode){const a=Iy(this.$el),s=a.tagName==="HTML"?0:a[e.scroll],l=a.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[e.start]-l[e.start];n=a,o=e.scroll,i=t+s+u}else n=this.$el,o=e.scroll,i=t;n[o]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((t,e)=>t.nr.index-e.nr.index)}}};const jL={key:0,ref:"before",class:"vue-recycle-scroller__slot"},GL={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function QL(t,e,n,o,i,a){const s=r.resolveComponent("ResizeObserver"),l=r.resolveDirective("observe-visibility");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...c)=>a.handleScroll&&a.handleScroll(...c))},[t.$slots.before?(r.openBlock(),r.createElementBlock("div",jL,[r.renderSlot(t.$slots,"before")],512)):r.createCommentVNode("v-if",!0),(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.listTag),{ref:"wrapper",style:r.normalizeStyle({[t.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:r.normalizeClass(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.pool,c=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.itemTag),r.mergeProps({key:c.nr.id,style:i.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${c.position}px) translate${t.direction==="vertical"?"X":"Y"}(${c.offset}px)`,width:n.gridItems?`${t.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${t.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===c.nr.key}]]},r.toHandlers(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=c.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:r.withCtx(()=>[r.renderSlot(t.$slots,"default",{item:c.item,index:c.nr.index,active:c.nr.used})]),_:2},1040,["style","class"]))),128)),r.renderSlot(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(r.openBlock(),r.createElementBlock("div",GL,[r.renderSlot(t.$slots,"after")],512)):r.createCommentVNode("v-if",!0),r.createVNode(s,{onNotify:a.handleResize},null,8,["onNotify"])],34)),[[l,a.handleVisibilityChange]])}ss.render=QL,ss.__file="src/components/RecycleScroller.vue";var pd={name:"DynamicScroller",components:{RecycleScroller:ss},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(t=>{requestAnimationFrame(()=>{if(Array.isArray(t)){for(const e of t)if(e.target&&e.target.$_vs_onResize){let n,o;if(e.borderBoxSize){const i=e.borderBoxSize[0];n=i.inlineSize,o=i.blockSize}else n=e.contentRect.width,o=e.contentRect.height;e.target.$_vs_onResize(e.target.$_vs_id,n,o)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...Oy,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:Ny,itemsWithSize(){const t=[],{items:e,keyField:n,simpleArray:o}=this,i=this.vscrollData.sizes,a=e.length;for(let s=0;s<a;s++){const l=e[s],c=o?s:l[n];let u=i[c];typeof u>"u"&&!this.$_undefinedMap[c]&&(u=0),t.push({item:l,id:c,size:u})}return t}},watch:{items(){this.forceUpdate()},simpleArray:{handler(t){this.vscrollData.simpleArray=t},immediate:!0},direction(t){this.forceUpdate(!0)},itemsWithSize(t,e){const n=this.$el.scrollTop;let o=0,i=0;const a=Math.min(t.length,e.length);for(let l=0;l<a&&!(o>=n);l++)o+=e[l].size||this.minItemSize,i+=t[l].size||this.minItemSize;const s=i-o;s!==0&&(this.$el.scrollTop+=s)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=LL()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(t=!1){(t||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(t){const e=this.$refs.scroller;e&&e.scrollToItem(t)},getItemSize(t,e=void 0){const n=this.simpleArray?e??this.items.indexOf(t):t[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const t=this.$el;this.$nextTick(()=>{t.scrollTop=t.scrollHeight+5e3;const e=()=>{t.scrollTop=t.scrollHeight+5e3,requestAnimationFrame(()=>{t.scrollTop=t.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(e)})};requestAnimationFrame(e)})}}};function XL(t,e,n,o,i,a){const s=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(s,r.mergeProps({ref:"scroller",items:a.itemsWithSize,"min-item-size":n.minItemSize,direction:t.direction,"key-field":"id","list-tag":t.listTag,"item-tag":t.itemTag},t.$attrs,{onResize:a.onScrollerResize,onVisible:a.onScrollerVisible}),{default:r.withCtx(({item:l,index:c,active:u})=>[r.renderSlot(t.$slots,"default",r.normalizeProps(r.guardReactiveProps({item:l.item,index:c,active:u,itemWithSize:l})))]),before:r.withCtx(()=>[r.renderSlot(t.$slots,"before")]),after:r.withCtx(()=>[r.renderSlot(t.$slots,"after")]),empty:r.withCtx(()=>[r.renderSlot(t.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}pd.render=XL,pd.__file="src/components/DynamicScroller.vue";var Kf={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(t,e){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[e],o=this.vscrollData.sizes[t];n!=null&&n!==o&&this.applySize(n)}},finalActive(t){this.size||(t?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?t?this.observeSize():this.unobserveSize():t&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const t in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[t],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:t}){!this.finalActive&&t&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||t||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(t){this.$nextTick(()=>{if(this.id===t){const e=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(e,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(t,e){const n=~~(this.vscrollParent.direction==="vertical"?e:t);n&&this.size!==n&&this.applySize(n)},applySize(t){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=t,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(t,e,n){this.id===t&&this.applyWidthHeight(e,n)}},render(){return r.h(this.tag,this.$slots.default())}};Kf.__file="src/components/DynamicScrollerItem.vue";function qL(t,e){t.component("".concat(e,"recycle-scroller"),ss),t.component("".concat(e,"RecycleScroller"),ss),t.component("".concat(e,"dynamic-scroller"),pd),t.component("".concat(e,"DynamicScroller"),pd),t.component("".concat(e,"dynamic-scroller-item"),Kf),t.component("".concat(e,"DynamicScrollerItem"),Kf)}var KL={version:"2.0.0-beta.8",install:function(e,n){var o=Object.assign({},{installComponents:!0,componentsPrefix:""},n);for(var i in o)typeof o[i]<"u"&&(By[i]=o[i]);o.installComponents&&qL(e,o.componentsPrefix)}},JL={exports:{}};(function(t,e){(function(n,o){t.exports=o(jc)})(nn,function(n){function o(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=o(n),a={name:"th",weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"},ordinal:function(s){return s+"."}};return i.default.locale(a,null,!0),a})})(JL);var YL={exports:{}};(function(t,e){(function(n,o){t.exports=o(jc)})(nn,function(n){function o(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=o(n),a={name:"zh-tw",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,l){return l==="W"?s+"週":s+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"},meridiem:function(s,l){var c=100*s+l;return c<600?"凌晨":c<900?"早上":c<1100?"上午":c<1300?"中午":c<1800?"下午":"晚上"}};return i.default.locale(a,null,!0),a})})(YL);var ZL={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(nn,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var o=["th","st","nd","rd"],i=n%100;return"["+n+(o[(i-20)%10]||o[i]||o[0])+"]"}}})})(ZL);const $L={name:"@feedmepos/ui-library",version:"1.10.6",type:"module",files:["dist"],repository:{type:"git",url:"git+https://github.com/feedmepos/ui-library.git"},bugs:"https://feedmepos.atlassian.net/browse/CT-3",homepage:"ui.feedme.ai",main:"./dist/feedmepos-ui-library.umd.cjs",module:"./dist/feedmepos-ui-library.js",exports:{".":{types:"./dist/index.d.ts",import:"./dist/feedmepos-ui-library.js",require:"./dist/feedmepos-ui-library.umd.cjs"},"./meta":{types:"./dist/meta.d.ts"},"./tailwind-plugin":"./dist/tailwind-plugin.js","./tailwind-styling":"./dist/tailwind-styling.js","./styles.css":"./dist/style.css"},scripts:{dev:"vite --port 5273",preview:"vite preview","build:lib":"pnpm run build-components && pnpm run build-types && pnpm run build-federation && pnpm run build-tailwind-plugin && pnpm run build-tailwind-styling && tsc-alias --project tsconfig.app.json --outDir dist && mv ./dist/src/* ./dist",build:"vite build","build-lib":"vite build --mode library","build-tailwind-plugin":"vite build --mode tailwind-plugin","build-tailwind-styling":"vite build --mode tailwind-styling","build-federation":"vite build --mode federation && cp -r ./temp/assets ./dist/federation && rm -rf ./temp","build-components":'run-p type-check "build-lib {@}" --',"build-types":"vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false","copy-changelog":"cp ./CHANGELOG.md ./dist/CHANGELOG.md","type-check":"vue-tsc --noEmit -p tsconfig.app.json --composite false",lint:"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",deploy:"pnpm run build:lib && pnpm publish --no-git-checks .","register-components":"node ./scripts/register-components.js && pnpm lint","generate-component-meta":"node ./scripts/generate-component-meta.js","build:pack":"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../"},dependencies:{"@floating-ui/vue":"^1.0.6","@rollup/plugin-commonjs":"^26.0.1","@tanstack/vue-table":"^8.13.2","@tanstack/vue-virtual":"^3.13.0","@types/lodash":"^4.17.7","@vueuse/core":"^10.9.0","chart.js":"^4.4.2","chartjs-plugin-datalabels":"^2.2.0",dayjs:"^1.11.10",debounce:"^2.0.0",fuzzy:"^0.1.3","libphonenumber-js":"^1.10.57",lodash:"^4.17.21",prettier:"^3.2.5",uuid:"^10.0.0","v-wave":"^1.5.1",vue:"^3.4.21","vue-country-flag-next":"^2.3.2","vue-router":"^4.3.0","vue-virtual-scroller":"2.0.0-beta.8",vuedraggable:"^4.1.0"},devDependencies:{"@originjs/vite-plugin-federation":"^1.3.5","@rushstack/eslint-patch":"^1.7.2","@tsconfig/node18":"^18.2.2","@types/chart.js":"^2.9.41","@types/debounce":"^1.2.4","@types/node":"^18.19.21","@types/uuid":"^10.0.0","@vitejs/plugin-vue":"^5.0.4","@vitejs/plugin-vue-jsx":"^3.1.0","@vue/eslint-config-typescript":"^12.0.0","@vue/tsconfig":"^0.4.0",autoprefixer:"^10.4.17",eslint:"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-unused-imports":"^4.3.0","eslint-plugin-vue":"^9.22.0","npm-run-all2":"^6.1.2",postcss:"^8.4.35",sass:"^1.71.1",tailwindcss:"^3.4.1","tsc-alias":"^1.8.8",typescript:"~5.2.2",vite:"^5.1.4","vite-plugin-static-copy":"^0.17.1","vite-plugin-top-level-await":"^1.4.1","vue-component-meta":"^2.0.13","vue-tsc":"^1.8.27"},peerDependencies:{tailwindcss:"^3.4.1",vite:"^5.1.4",vue:"^3.4.21"}};globalThis.__FM_UI_VERSION__=$L.version;const ez={"en-US":"en","zh-CN":"zh-cn","zh-Hant":"zh-tw","th-TH":"th"},tz=(t,e)=>{if(t.use(bk,{duration:.3,color:"var(--fm-color-opacity-sm)",initialOpacity:1,finalOpacity:.1,dissolveDuration:.6}),t.directive("tooltip",wL),t.use($x),t.use(ky),t.use(KL),Object.entries(wy).forEach(([n,o])=>{t.component(n,o)}),e!=null&&e.locale){Dm(e.locale);const n=ez[e.locale]||"en";X.locale(n)}};Ge.FeedMeUI=tz,Ge.FmAdvancedSort=Mm,Ge.FmButtonColorThemeVariant=Kt,Ge.FmButtonVariant=jn,Ge.Locale=Em,Ge.SnackbarMountStage=wt,Ge.SnackbarPlugin=ky,Ge.SnackbarPosition=dn,Ge.SnackbarService=vy,Ge.components=wy,Ge.setLocale=Dm,Ge.useBreakpoints=nr,Ge.useDialog=Rm,Ge.useDialogChild=Tm,Ge.useFocus=ka,Ge.useFormChild=lm,Ge.useProxiedModel=Te,Ge.useSnackbar=zw,Ge.useValidation=sm,Object.defineProperty(Ge,Symbol.toStringTag,{value:"Module"})});