pangea-lib 2.12.97 → 2.12.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.cjs.js CHANGED
@@ -850,7 +850,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
850
850
  * Released under the MIT License
851
851
  */class AU{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,a,r,n){const i=a.listeners[n],c=a.duration;i.forEach(s=>s({chart:t,initial:a.initial,numSteps:c,currentStep:Math.min(r-a.start,c)}))}_refresh(){this._request||(this._running=!0,this._request=Ty.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let a=0;this._charts.forEach((r,n)=>{if(!r.running||!r.items.length)return;const i=r.items;let c=i.length-1,s=!1,o;for(;c>=0;--c)o=i[c],o._active?(o._total>r.duration&&(r.duration=o._total),o.tick(t),s=!0):(i[c]=i[i.length-1],i.pop());s&&(n.draw(),this._notify(n,r,t,"progress")),i.length||(r.running=!1,this._notify(n,r,t,"complete"),r.initial=!1),a+=i.length}),this._lastDate=t,a===0&&(this._running=!1)}_getAnims(t){const a=this._charts;let r=a.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},a.set(t,r)),r}listen(t,a,r){this._getAnims(t).listeners[a].push(r)}add(t,a){!a||!a.length||this._getAnims(t).items.push(...a)}has(t){return this._getAnims(t).items.length>0}start(t){const a=this._charts.get(t);a&&(a.running=!0,a.start=Date.now(),a.duration=a.items.reduce((r,n)=>Math.max(r,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const a=this._charts.get(t);return!(!a||!a.running||!a.items.length)}stop(t){const a=this._charts.get(t);if(!a||!a.items.length)return;const r=a.items;let n=r.length-1;for(;n>=0;--n)r[n].cancel();a.items=[],this._notify(t,a,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var d4=new AU;const Vd="transparent",VU={boolean(e,t,a){return a>.5?t:e},color(e,t,a){const r=Cd(e||Vd),n=r.valid&&Cd(t||Vd);return n&&n.valid?n.mix(r,a).hexString():t},number(e,t,a){return e+(t-e)*a}};class TU{constructor(t,a,r,n){const i=a[r];n=ar([t.to,n,i,t.from]);const c=ar([t.from,i,n]);this._active=!0,this._fn=t.fn||VU[t.type||typeof c],this._easing=Cr[t.easing]||Cr.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=a,this._prop=r,this._from=c,this._to=n,this._promises=void 0}active(){return this._active}update(t,a,r){if(this._active){this._notify(!1);const n=this._target[this._prop],i=r-this._start,c=this._duration-i;this._start=r,this._duration=Math.floor(Math.max(c,t.duration)),this._total+=i,this._loop=!!t.loop,this._to=ar([t.to,a,n,t.from]),this._from=ar([t.from,n,a])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const a=t-this._start,r=this._duration,n=this._prop,i=this._from,c=this._loop,s=this._to;let o;if(this._active=i!==s&&(c||a<r),!this._active){this._target[n]=s,this._notify(!0);return}if(a<0){this._target[n]=i;return}o=a/r%2,o=c&&o>1?2-o:o,o=this._easing(Math.min(1,Math.max(0,o))),this._target[n]=this._fn(i,s,o)}wait(){const t=this._promises||(this._promises=[]);return new Promise((a,r)=>{t.push({res:a,rej:r})})}_notify(t){const a=t?"res":"rej",r=this._promises||[];for(let n=0;n<r.length;n++)r[n][a]()}}class Ky{constructor(t,a){this._chart=t,this._properties=new Map,this.configure(a)}configure(t){if(!x2(t))return;const a=Object.keys(se.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const i=t[n];if(!x2(i))return;const c={};for(const s of a)c[s]=i[s];(Z2(i.properties)&&i.properties||[n]).forEach(s=>{(s===n||!r.has(s))&&r.set(s,c)})})}_animateOptions(t,a){const r=a.options,n=NU(t,r);if(!n)return[];const i=this._createAnimations(n,r);return r.$shared&&EU(t.options.$animations,r).then(()=>{t.options=r},()=>{}),i}_createAnimations(t,a){const r=this._properties,n=[],i=t.$animations||(t.$animations={}),c=Object.keys(a),s=Date.now();let o;for(o=c.length-1;o>=0;--o){const l=c[o];if(l.charAt(0)==="$")continue;if(l==="options"){n.push(...this._animateOptions(t,a));continue}const f=a[l];let d=i[l];const h=r.get(l);if(d)if(h&&d.active()){d.update(h,f,s);continue}else d.cancel();if(!h||!h.duration){t[l]=f;continue}i[l]=d=new TU(h,t,l,f),n.push(d)}return n}update(t,a){if(this._properties.size===0){Object.assign(t,a);return}const r=this._createAnimations(t,a);if(r.length)return d4.add(this._chart,r),!0}}function EU(e,t){const a=[],r=Object.keys(t);for(let n=0;n<r.length;n++){const i=e[r[n]];i&&i.active()&&a.push(i.wait())}return Promise.all(a)}function NU(e,t){if(!t)return;let a=e.options;if(!a){e.options=t;return}return a.$shared&&(e.options=a=Object.assign({},a,{$shared:!1,$animations:{}})),a}function Td(e,t){const a=e&&e.options||{},r=a.reverse,n=a.min===void 0?t:0,i=a.max===void 0?t:0;return{start:r?i:n,end:r?n:i}}function OU(e,t,a){if(a===!1)return!1;const r=Td(e,a),n=Td(t,a);return{top:n.end,right:r.end,bottom:n.start,left:r.start}}function PU(e){let t,a,r,n;return x2(e)?(t=e.top,a=e.right,r=e.bottom,n=e.left):t=a=r=n=e,{top:t,right:a,bottom:r,left:n,disabled:e===!1}}function Zy(e,t){const a=[],r=e._getSortedDatasetMetas(t);let n,i;for(n=0,i=r.length;n<i;++n)a.push(r[n].index);return a}function Ed(e,t,a,r={}){const n=e.keys,i=r.mode==="single";let c,s,o,l;if(t===null)return;let f=!1;for(c=0,s=n.length;c<s;++c){if(o=+n[c],o===a){if(f=!0,r.all)continue;break}l=e.values[o],ve(l)&&(i||t===0||Y3(t)===Y3(l))&&(t+=l)}return!f&&!r.all?0:t}function DU(e,t){const{iScale:a,vScale:r}=t,n=a.axis==="x"?"x":"y",i=r.axis==="x"?"x":"y",c=Object.keys(e),s=new Array(c.length);let o,l,f;for(o=0,l=c.length;o<l;++o)f=c[o],s[o]={[n]:f,[i]:e[f]};return s}function J5(e,t){const a=e&&e.options.stacked;return a||a===void 0&&t.stack!==void 0}function RU(e,t,a){return`${e.id}.${t.id}.${a.stack||a.type}`}function FU(e){const{min:t,max:a,minDefined:r,maxDefined:n}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:n?a:Number.POSITIVE_INFINITY}}function BU(e,t,a){const r=e[t]||(e[t]={});return r[a]||(r[a]={})}function Nd(e,t,a,r){for(const n of t.getMatchingVisibleMetas(r).reverse()){const i=e[n.index];if(a&&i>0||!a&&i<0)return n.index}return null}function Od(e,t){const{chart:a,_cachedMeta:r}=e,n=a._stacks||(a._stacks={}),{iScale:i,vScale:c,index:s}=r,o=i.axis,l=c.axis,f=RU(i,c,r),d=t.length;let h;for(let m=0;m<d;++m){const p=t[m],{[o]:v,[l]:g}=p,y=p._stacks||(p._stacks={});h=y[l]=BU(n,f,v),h[s]=g,h._top=Nd(h,c,!0,r.type),h._bottom=Nd(h,c,!1,r.type);const x=h._visualValues||(h._visualValues={});x[s]=g}}function es(e,t){const a=e.scales;return Object.keys(a).filter(r=>a[r].axis===t).shift()}function IU(e,t){return S0(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function $U(e,t,a){return S0(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:a,index:t,mode:"default",type:"data"})}function $6(e,t){const a=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const n of t){const i=n._stacks;if(!i||i[r]===void 0||i[r][a]===void 0)return;delete i[r][a],i[r]._visualValues!==void 0&&i[r]._visualValues[a]!==void 0&&delete i[r]._visualValues[a]}}}const ts=e=>e==="reset"||e==="none",Pd=(e,t)=>t?e:Object.assign({},e),UU=(e,t,a)=>e&&!t.hidden&&t._stacked&&{keys:Zy(a,!0),values:null};class C3{constructor(t,a){this.chart=t,this._ctx=t.ctx,this.index=a,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=J5(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&$6(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,a=this._cachedMeta,r=this.getDataset(),n=(d,h,m,p)=>d==="x"?h:d==="r"?p:m,i=a.xAxisID=l2(r.xAxisID,es(t,"x")),c=a.yAxisID=l2(r.yAxisID,es(t,"y")),s=a.rAxisID=l2(r.rAxisID,es(t,"r")),o=a.indexAxis,l=a.iAxisID=n(o,i,c,s),f=a.vAxisID=n(o,c,i,s);a.xScale=this.getScaleForId(i),a.yScale=this.getScaleForId(c),a.rScale=this.getScaleForId(s),a.iScale=this.getScaleForId(l),a.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const a=this._cachedMeta;return t===a.iScale?a.vScale:a.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&yd(this._data,this),t._stacked&&$6(t)}_dataCheck(){const t=this.getDataset(),a=t.data||(t.data=[]),r=this._data;if(x2(a)){const n=this._cachedMeta;this._data=DU(a,n)}else if(r!==a){if(r){yd(r,this);const n=this._cachedMeta;$6(n),n._parsed=[]}a&&Object.isExtensible(a)&&L$(a,this),this._syncList=[],this._data=a}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const a=this._cachedMeta,r=this.getDataset();let n=!1;this._dataCheck();const i=a._stacked;a._stacked=J5(a.vScale,a),a.stack!==r.stack&&(n=!0,$6(a),a.stack=r.stack),this._resyncElements(t),(n||i!==a._stacked)&&(Od(this,a._parsed),a._stacked=J5(a.vScale,a))}configure(){const t=this.chart.config,a=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),a,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,a){const{_cachedMeta:r,_data:n}=this,{iScale:i,_stacked:c}=r,s=i.axis;let o=t===0&&a===n.length?!0:r._sorted,l=t>0&&r._parsed[t-1],f,d,h;if(this._parsing===!1)r._parsed=n,r._sorted=!0,h=n;else{Z2(n[t])?h=this.parseArrayData(r,n,t,a):x2(n[t])?h=this.parseObjectData(r,n,t,a):h=this.parsePrimitiveData(r,n,t,a);const m=()=>d[s]===null||l&&d[s]<l[s];for(f=0;f<a;++f)r._parsed[f+t]=d=h[f],o&&(m()&&(o=!1),l=d);r._sorted=o}c&&Od(this,h)}parsePrimitiveData(t,a,r,n){const{iScale:i,vScale:c}=t,s=i.axis,o=c.axis,l=i.getLabels(),f=i===c,d=new Array(n);let h,m,p;for(h=0,m=n;h<m;++h)p=h+r,d[h]={[s]:f||i.parse(l[p],p),[o]:c.parse(a[p],p)};return d}parseArrayData(t,a,r,n){const{xScale:i,yScale:c}=t,s=new Array(n);let o,l,f,d;for(o=0,l=n;o<l;++o)f=o+r,d=a[f],s[o]={x:i.parse(d[0],f),y:c.parse(d[1],f)};return s}parseObjectData(t,a,r,n){const{xScale:i,yScale:c}=t,{xAxisKey:s="x",yAxisKey:o="y"}=this._parsing,l=new Array(n);let f,d,h,m;for(f=0,d=n;f<d;++f)h=f+r,m=a[h],l[f]={x:i.parse(C0(m,s),h),y:c.parse(C0(m,o),h)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,a,r){const n=this.chart,i=this._cachedMeta,c=a[t.axis],s={keys:Zy(n,!0),values:a._stacks[t.axis]._visualValues};return Ed(s,c,i.index,{mode:r})}updateRangeFromParsed(t,a,r,n){const i=r[a.axis];let c=i===null?NaN:i;const s=n&&r._stacks[a.axis];n&&s&&(n.values=s,c=Ed(n,i,this._cachedMeta.index)),t.min=Math.min(t.min,c),t.max=Math.max(t.max,c)}getMinMax(t,a){const r=this._cachedMeta,n=r._parsed,i=r._sorted&&t===r.iScale,c=n.length,s=this._getOtherScale(t),o=UU(a,r,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:d}=FU(s);let h,m;function p(){m=n[h];const v=m[s.axis];return!ve(m[t.axis])||f>v||d<v}for(h=0;h<c&&!(!p()&&(this.updateRangeFromParsed(l,t,m,o),i));++h);if(i){for(h=c-1;h>=0;--h)if(!p()){this.updateRangeFromParsed(l,t,m,o);break}}return l}getAllParsedValues(t){const a=this._cachedMeta._parsed,r=[];let n,i,c;for(n=0,i=a.length;n<i;++n)c=a[n][t.axis],ve(c)&&r.push(c);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const a=this._cachedMeta,r=a.iScale,n=a.vScale,i=this.getParsed(t);return{label:r?""+r.getLabelForValue(i[r.axis]):"",value:n?""+n.getLabelForValue(i[n.axis]):""}}_update(t){const a=this._cachedMeta;this.update(t||"default"),a._clip=PU(l2(this.options.clip,OU(a.xScale,a.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,a=this.chart,r=this._cachedMeta,n=r.data||[],i=a.chartArea,c=[],s=this._drawStart||0,o=this._drawCount||n.length-s,l=this.options.drawActiveElementsOnTop;let f;for(r.dataset&&r.dataset.draw(t,i,s,o),f=s;f<s+o;++f){const d=n[f];d.hidden||(d.active&&l?c.push(d):d.draw(t,i))}for(f=0;f<c.length;++f)c[f].draw(t,i)}getStyle(t,a){const r=a?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,a,r){const n=this.getDataset();let i;if(t>=0&&t<this._cachedMeta.data.length){const c=this._cachedMeta.data[t];i=c.$context||(c.$context=$U(this.getContext(),t,c)),i.parsed=this.getParsed(t),i.raw=n.data[t],i.index=i.dataIndex=t}else i=this.$context||(this.$context=IU(this.chart.getContext(),this.index)),i.dataset=n,i.index=i.datasetIndex=this.index;return i.active=!!a,i.mode=r,i}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,a){return this._resolveElementOptions(this.dataElementType.id,a,t)}_resolveElementOptions(t,a="default",r){const n=a==="active",i=this._cachedDataOpts,c=t+"-"+a,s=i[c],o=this.enableOptionSharing&&Jr(r);if(s)return Pd(s,o);const l=this.chart.config,f=l.datasetElementScopeKeys(this._type,t),d=n?[`${t}Hover`,"hover",t,""]:[t,""],h=l.getOptionScopes(this.getDataset(),f),m=Object.keys(se.elements[t]),p=()=>this.getContext(r,n,a),v=l.resolveNamedOptions(h,m,p,d);return v.$shared&&(v.$shared=o,i[c]=Object.freeze(Pd(v,o))),v}_resolveAnimations(t,a,r){const n=this.chart,i=this._cachedDataOpts,c=`animation-${a}`,s=i[c];if(s)return s;let o;if(n.options.animation!==!1){const f=this.chart.config,d=f.datasetAnimationScopeKeys(this._type,a),h=f.getOptionScopes(this.getDataset(),d);o=f.createResolver(h,this.getContext(t,r,a))}const l=new Ky(n,o&&o.animations);return o&&o._cacheable&&(i[c]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,a){return!a||ts(t)||this.chart._animationsDisabled}_getSharedOptions(t,a){const r=this.resolveDataElementOptions(t,a),n=this._sharedOptions,i=this.getSharedOptions(r),c=this.includeOptions(a,i)||i!==n;return this.updateSharedOptions(i,a,r),{sharedOptions:i,includeOptions:c}}updateElement(t,a,r,n){ts(n)?Object.assign(t,r):this._resolveAnimations(a,n).update(t,r)}updateSharedOptions(t,a,r){t&&!ts(a)&&this._resolveAnimations(void 0,a).update(t,r)}_setStyle(t,a,r,n){t.active=n;const i=this.getStyle(a,n);this._resolveAnimations(a,r,n).update(t,{options:!n&&this.getSharedOptions(i)||i})}removeHoverStyle(t,a,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,a,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const a=this._data,r=this._cachedMeta.data;for(const[s,o,l]of this._syncList)this[s](o,l);this._syncList=[];const n=r.length,i=a.length,c=Math.min(i,n);c&&this.parse(0,c),i>n?this._insertElements(n,i-n,t):i<n&&this._removeElements(i,n-i)}_insertElements(t,a,r=!0){const n=this._cachedMeta,i=n.data,c=t+a;let s;const o=l=>{for(l.length+=a,s=l.length-1;s>=c;s--)l[s]=l[s-a]};for(o(i),s=t;s<c;++s)i[s]=new this.dataElementType;this._parsing&&o(n._parsed),this.parse(t,a),r&&this.updateElements(i,t,a,"reset")}updateElements(t,a,r,n){}_removeElements(t,a){const r=this._cachedMeta;if(this._parsing){const n=r._parsed.splice(t,a);r._stacked&&$6(r,n)}r.data.splice(t,a)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[a,r,n]=t;this[a](r,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,a){a&&this._sync(["_removeElements",t,a]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}z1(C3,"defaults",{}),z1(C3,"datasetElementType",null),z1(C3,"dataElementType",null);function qU(e,t){if(!e._cache.$bar){const a=e.getMatchingVisibleMetas(t);let r=[];for(let n=0,i=a.length;n<i;n++)r=r.concat(a[n].controller.getAllParsedValues(e));e._cache.$bar=Vy(r.sort((n,i)=>n-i))}return e._cache.$bar}function jU(e){const t=e.iScale,a=qU(t,e.type);let r=t._length,n,i,c,s;const o=()=>{c===32767||c===-32768||(Jr(s)&&(r=Math.min(r,Math.abs(c-s)||r)),s=c)};for(n=0,i=a.length;n<i;++n)c=t.getPixelForValue(a[n]),o();for(s=void 0,n=0,i=t.ticks.length;n<i;++n)c=t.getPixelForTick(n),o();return r}function WU(e,t,a,r){const n=a.barThickness;let i,c;return L2(n)?(i=t.min*a.categoryPercentage,c=a.barPercentage):(i=n*r,c=1),{chunk:i/r,ratio:c,start:t.pixels[e]-i/2}}function GU(e,t,a,r){const n=t.pixels,i=n[e];let c=e>0?n[e-1]:null,s=e<n.length-1?n[e+1]:null;const o=a.categoryPercentage;c===null&&(c=i-(s===null?t.end-t.start:s-i)),s===null&&(s=i+i-c);const l=i-(i-Math.min(c,s))/2*o;return{chunk:Math.abs(s-c)/2*o/r,ratio:a.barPercentage,start:l}}function YU(e,t,a,r){const n=a.parse(e[0],r),i=a.parse(e[1],r),c=Math.min(n,i),s=Math.max(n,i);let o=c,l=s;Math.abs(c)>Math.abs(s)&&(o=s,l=c),t[a.axis]=l,t._custom={barStart:o,barEnd:l,start:n,end:i,min:c,max:s}}function Qy(e,t,a,r){return Z2(e)?YU(e,t,a,r):t[a.axis]=a.parse(e,r),t}function Dd(e,t,a,r){const n=e.iScale,i=e.vScale,c=n.getLabels(),s=n===i,o=[];let l,f,d,h;for(l=a,f=a+r;l<f;++l)h=t[l],d={},d[n.axis]=s||n.parse(c[l],l),o.push(Qy(h,d,i,l));return o}function as(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function XU(e,t,a){return e!==0?Y3(e):(t.isHorizontal()?1:-1)*(t.min>=a?1:-1)}function KU(e){let t,a,r,n,i;return e.horizontal?(t=e.base>e.x,a="left",r="right"):(t=e.base<e.y,a="bottom",r="top"),t?(n="end",i="start"):(n="start",i="end"),{start:a,end:r,reverse:t,top:n,bottom:i}}function ZU(e,t,a,r){let n=t.borderSkipped;const i={};if(!n){e.borderSkipped=i;return}if(n===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:c,end:s,reverse:o,top:l,bottom:f}=KU(e);n==="middle"&&a&&(e.enableBorderRadius=!0,(a._top||0)===r?n=l:(a._bottom||0)===r?n=f:(i[Rd(f,c,s,o)]=!0,n=l)),i[Rd(n,c,s,o)]=!0,e.borderSkipped=i}function Rd(e,t,a,r){return r?(e=QU(e,t,a),e=Fd(e,a,t)):e=Fd(e,t,a),e}function QU(e,t,a){return e===t?a:e===a?t:e}function Fd(e,t,a){return e==="start"?t:e==="end"?a:e}function JU(e,{inflateAmount:t},a){e.inflateAmount=t==="auto"?a===1?.33:0:t}class ai extends C3{parsePrimitiveData(t,a,r,n){return Dd(t,a,r,n)}parseArrayData(t,a,r,n){return Dd(t,a,r,n)}parseObjectData(t,a,r,n){const{iScale:i,vScale:c}=t,{xAxisKey:s="x",yAxisKey:o="y"}=this._parsing,l=i.axis==="x"?s:o,f=c.axis==="x"?s:o,d=[];let h,m,p,v;for(h=r,m=r+n;h<m;++h)v=a[h],p={},p[i.axis]=i.parse(C0(v,l),h),d.push(Qy(C0(v,f),p,c,h));return d}updateRangeFromParsed(t,a,r,n){super.updateRangeFromParsed(t,a,r,n);const i=r._custom;i&&a===this._cachedMeta.vScale&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const a=this._cachedMeta,{iScale:r,vScale:n}=a,i=this.getParsed(t),c=i._custom,s=as(c)?"["+c.start+", "+c.end+"]":""+n.getLabelForValue(i[n.axis]);return{label:""+r.getLabelForValue(i[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const a=this._cachedMeta;this.updateElements(a.data,0,a.data.length,t)}updateElements(t,a,r,n){const i=n==="reset",{index:c,_cachedMeta:{vScale:s}}=this,o=s.getBasePixel(),l=s.isHorizontal(),f=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(a,n);for(let m=a;m<a+r;m++){const p=this.getParsed(m),v=i||L2(p[s.axis])?{base:o,head:o}:this._calculateBarValuePixels(m),g=this._calculateBarIndexPixels(m,f),y=(p._stacks||{})[s.axis],x={horizontal:l,base:v.base,enableBorderRadius:!y||as(p._custom)||c===y._top||c===y._bottom,x:l?v.head:g.center,y:l?g.center:v.head,height:l?g.size:Math.abs(v.size),width:l?Math.abs(v.size):g.size};h&&(x.options=d||this.resolveDataElementOptions(m,t[m].active?"active":n));const C=x.options||t[m].options;ZU(x,C,y,c),JU(x,C,f.ratio),this.updateElement(t[m],m,x,n)}}_getStacks(t,a){const{iScale:r}=this._cachedMeta,n=r.getMatchingVisibleMetas(this._type).filter(f=>f.controller.options.grouped),i=r.options.stacked,c=[],s=this._cachedMeta.controller.getParsed(a),o=s&&s[r.axis],l=f=>{const d=f._parsed.find(m=>m[r.axis]===o),h=d&&d[f.vScale.axis];if(L2(h)||isNaN(h))return!0};for(const f of n)if(!(a!==void 0&&l(f))&&((i===!1||c.indexOf(f.stack)===-1||i===void 0&&f.stack===void 0)&&c.push(f.stack),f.index===t))break;return c.length||c.push(void 0),c}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,a,r){const n=this._getStacks(t,r),i=a!==void 0?n.indexOf(a):-1;return i===-1?n.length-1:i}_getRuler(){const t=this.options,a=this._cachedMeta,r=a.iScale,n=[];let i,c;for(i=0,c=a.data.length;i<c;++i)n.push(r.getPixelForValue(this.getParsed(i)[r.axis],i));const s=t.barThickness;return{min:s||jU(a),pixels:n,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:a,_stacked:r,index:n},options:{base:i,minBarLength:c}}=this,s=i||0,o=this.getParsed(t),l=o._custom,f=as(l);let d=o[a.axis],h=0,m=r?this.applyStack(a,o,r):d,p,v;m!==d&&(h=m-d,m=d),f&&(d=l.barStart,m=l.barEnd-l.barStart,d!==0&&Y3(d)!==Y3(l.barEnd)&&(h=0),h+=d);const g=!L2(i)&&!f?i:h;let y=a.getPixelForValue(g);if(this.chart.getDataVisibility(t)?p=a.getPixelForValue(h+m):p=y,v=p-y,Math.abs(v)<c){v=XU(v,a,s)*c,d===s&&(y-=v/2);const x=a.getPixelForDecimal(0),C=a.getPixelForDecimal(1),b=Math.min(x,C),M=Math.max(x,C);y=Math.max(Math.min(y,M),b),p=y+v,r&&!f&&(o._stacks[a.axis]._visualValues[n]=a.getValueForPixel(p)-a.getValueForPixel(y))}if(y===a.getPixelForValue(s)){const x=Y3(v)*a.getLineWidthForValue(s)/2;y+=x,v-=x}return{size:v,base:y,head:p,center:p+v/2}}_calculateBarIndexPixels(t,a){const r=a.scale,n=this.options,i=n.skipNull,c=l2(n.maxBarThickness,1/0);let s,o;if(a.grouped){const l=i?this._getStackCount(t):a.stackCount,f=n.barThickness==="flex"?GU(t,a,n,l):WU(t,a,n,l),d=this._getStackIndex(this.index,this._cachedMeta.stack,i?t:void 0);s=f.start+f.chunk*d+f.chunk/2,o=Math.min(c,f.chunk*f.ratio)}else s=r.getPixelForValue(this.getParsed(t)[r.axis],t),o=Math.min(c,a.min*a.ratio);return{base:s-o/2,head:s+o/2,center:s,size:o}}draw(){const t=this._cachedMeta,a=t.vScale,r=t.data,n=r.length;let i=0;for(;i<n;++i)this.getParsed(i)[a.axis]!==null&&!r[i].hidden&&r[i].draw(this._ctx)}}z1(ai,"id","bar"),z1(ai,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),z1(ai,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ri extends C3{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,a,r,n){const i=super.parsePrimitiveData(t,a,r,n);for(let c=0;c<i.length;c++)i[c]._custom=this.resolveDataElementOptions(c+r).radius;return i}parseArrayData(t,a,r,n){const i=super.parseArrayData(t,a,r,n);for(let c=0;c<i.length;c++){const s=a[r+c];i[c]._custom=l2(s[2],this.resolveDataElementOptions(c+r).radius)}return i}parseObjectData(t,a,r,n){const i=super.parseObjectData(t,a,r,n);for(let c=0;c<i.length;c++){const s=a[r+c];i[c]._custom=l2(s&&s.r&&+s.r,this.resolveDataElementOptions(c+r).radius)}return i}getMaxOverflow(){const t=this._cachedMeta.data;let a=0;for(let r=t.length-1;r>=0;--r)a=Math.max(a,t[r].size(this.resolveDataElementOptions(r))/2);return a>0&&a}getLabelAndValue(t){const a=this._cachedMeta,r=this.chart.data.labels||[],{xScale:n,yScale:i}=a,c=this.getParsed(t),s=n.getLabelForValue(c.x),o=i.getLabelForValue(c.y),l=c._custom;return{label:r[t]||"",value:"("+s+", "+o+(l?", "+l:"")+")"}}update(t){const a=this._cachedMeta.data;this.updateElements(a,0,a.length,t)}updateElements(t,a,r,n){const i=n==="reset",{iScale:c,vScale:s}=this._cachedMeta,{sharedOptions:o,includeOptions:l}=this._getSharedOptions(a,n),f=c.axis,d=s.axis;for(let h=a;h<a+r;h++){const m=t[h],p=!i&&this.getParsed(h),v={},g=v[f]=i?c.getPixelForDecimal(.5):c.getPixelForValue(p[f]),y=v[d]=i?s.getBasePixel():s.getPixelForValue(p[d]);v.skip=isNaN(g)||isNaN(y),l&&(v.options=o||this.resolveDataElementOptions(h,m.active?"active":n),i&&(v.options.radius=0)),this.updateElement(m,h,v,n)}}resolveDataElementOptions(t,a){const r=this.getParsed(t);let n=super.resolveDataElementOptions(t,a);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const i=n.radius;return a!=="active"&&(n.radius=0),n.radius+=l2(r&&r._custom,i),n}}z1(ri,"id","bubble"),z1(ri,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),z1(ri,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function eq(e,t,a){let r=1,n=1,i=0,c=0;if(t<J2){const s=e,o=s+t,l=Math.cos(s),f=Math.sin(s),d=Math.cos(o),h=Math.sin(o),m=(C,b,M)=>en(C,s,o,!0)?1:Math.max(b,b*a,M,M*a),p=(C,b,M)=>en(C,s,o,!0)?-1:Math.min(b,b*a,M,M*a),v=m(0,l,d),g=m(we,f,h),y=p(ee,l,d),x=p(ee+we,f,h);r=(v-y)/2,n=(g-x)/2,i=-(v+y)/2,c=-(g+x)/2}return{ratioX:r,ratioY:n,offsetX:i,offsetY:c}}class K0 extends C3{constructor(t,a){super(t,a),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,a){const r=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=r;else{let i=o=>+r[o];if(x2(r[t])){const{key:o="value"}=this._parsing;i=l=>+C0(r[l],o)}let c,s;for(c=t,s=t+a;c<s;++c)n._parsed[c]=i(c)}}_getRotation(){return v3(this.options.rotation-90)}_getCircumference(){return v3(this.options.circumference)}_getRotationExtents(){let t=J2,a=-J2;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const n=this.chart.getDatasetMeta(r).controller,i=n._getRotation(),c=n._getCircumference();t=Math.min(t,i),a=Math.max(a,i+c)}return{rotation:t,circumference:a-t}}update(t){const a=this.chart,{chartArea:r}=a,n=this._cachedMeta,i=n.data,c=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-c)/2,0),o=Math.min(m$(this.options.cutout,s),1),l=this._getRingWeight(this.index),{circumference:f,rotation:d}=this._getRotationExtents(),{ratioX:h,ratioY:m,offsetX:p,offsetY:v}=eq(d,f,o),g=(r.width-c)/h,y=(r.height-c)/m,x=Math.max(Math.min(g,y)/2,0),C=Hy(this.options.radius,x),b=Math.max(C*o,0),M=(C-b)/this._getVisibleDatasetWeightTotal();this.offsetX=p*C,this.offsetY=v*C,n.total=this.calculateTotal(),this.outerRadius=C-M*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-M*l,0),this.updateElements(i,0,i.length,t)}_circumference(t,a){const r=this.options,n=this._cachedMeta,i=this._getCircumference();return a&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*i/J2)}updateElements(t,a,r,n){const i=n==="reset",c=this.chart,s=c.chartArea,l=c.options.animation,f=(s.left+s.right)/2,d=(s.top+s.bottom)/2,h=i&&l.animateScale,m=h?0:this.innerRadius,p=h?0:this.outerRadius,{sharedOptions:v,includeOptions:g}=this._getSharedOptions(a,n);let y=this._getRotation(),x;for(x=0;x<a;++x)y+=this._circumference(x,i);for(x=a;x<a+r;++x){const C=this._circumference(x,i),b=t[x],M={x:f+this.offsetX,y:d+this.offsetY,startAngle:y,endAngle:y+C,circumference:C,outerRadius:p,innerRadius:m};g&&(M.options=v||this.resolveDataElementOptions(x,b.active?"active":n)),y+=C,this.updateElement(b,x,M,n)}}calculateTotal(){const t=this._cachedMeta,a=t.data;let r=0,n;for(n=0;n<a.length;n++){const i=t._parsed[n];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(n)&&!a[n].hidden&&(r+=Math.abs(i))}return r}calculateCircumference(t){const a=this._cachedMeta.total;return a>0&&!isNaN(t)?J2*(Math.abs(t)/a):0}getLabelAndValue(t){const a=this._cachedMeta,r=this.chart,n=r.data.labels||[],i=En(a._parsed[t],r.options.locale);return{label:n[t]||"",value:i}}getMaxBorderWidth(t){let a=0;const r=this.chart;let n,i,c,s,o;if(!t){for(n=0,i=r.data.datasets.length;n<i;++n)if(r.isDatasetVisible(n)){c=r.getDatasetMeta(n),t=c.data,s=c.controller;break}}if(!t)return 0;for(n=0,i=t.length;n<i;++n)o=s.resolveDataElementOptions(n),o.borderAlign!=="inner"&&(a=Math.max(a,o.borderWidth||0,o.hoverBorderWidth||0));return a}getMaxOffset(t){let a=0;for(let r=0,n=t.length;r<n;++r){const i=this.resolveDataElementOptions(r);a=Math.max(a,i.offset||0,i.hoverOffset||0)}return a}_getRingWeightOffset(t){let a=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(a+=this._getRingWeight(r));return a}_getRingWeight(t){return Math.max(l2(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}z1(K0,"id","doughnut"),z1(K0,"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"}),z1(K0,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),z1(K0,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const a=t.data;if(a.labels.length&&a.datasets.length){const{labels:{pointStyle:r,color:n}}=t.legend.options;return a.labels.map((i,c)=>{const o=t.getDatasetMeta(0).controller.getStyle(c);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:n,lineWidth:o.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(c),index:c}})}return[]}},onClick(t,a,r){r.chart.toggleDataVisibility(a.index),r.chart.update()}}}});class ni extends C3{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const a=this._cachedMeta,{dataset:r,data:n=[],_dataset:i}=a,c=this.chart._animationsDisabled;let{start:s,count:o}=Ny(a,n,c);this._drawStart=s,this._drawCount=o,Oy(a)&&(s=0,o=n.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!i._decimated,r.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(r,void 0,{animated:!c,options:l},t),this.updateElements(n,s,o,t)}updateElements(t,a,r,n){const i=n==="reset",{iScale:c,vScale:s,_stacked:o,_dataset:l}=this._cachedMeta,{sharedOptions:f,includeOptions:d}=this._getSharedOptions(a,n),h=c.axis,m=s.axis,{spanGaps:p,segment:v}=this.options,g=l6(p)?p:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||i||n==="none",x=a+r,C=t.length;let b=a>0&&this.getParsed(a-1);for(let M=0;M<C;++M){const w=t[M],z=y?w:{};if(M<a||M>=x){z.skip=!0;continue}const _=this.getParsed(M),S=L2(_[m]),k=z[h]=c.getPixelForValue(_[h],M),H=z[m]=i||S?s.getBasePixel():s.getPixelForValue(o?this.applyStack(s,_,o):_[m],M);z.skip=isNaN(k)||isNaN(H)||S,z.stop=M>0&&Math.abs(_[h]-b[h])>g,v&&(z.parsed=_,z.raw=l.data[M]),d&&(z.options=f||this.resolveDataElementOptions(M,w.active?"active":n)),y||this.updateElement(w,M,z,n),b=_}}getMaxOverflow(){const t=this._cachedMeta,a=t.dataset,r=a.options&&a.options.borderWidth||0,n=t.data||[];if(!n.length)return r;const i=n[0].size(this.resolveDataElementOptions(0)),c=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(r,i,c)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}z1(ni,"id","line"),z1(ni,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),z1(ni,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class zr extends C3{constructor(t,a){super(t,a),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const a=this._cachedMeta,r=this.chart,n=r.data.labels||[],i=En(a._parsed[t].r,r.options.locale);return{label:n[t]||"",value:i}}parseObjectData(t,a,r,n){return Uy.bind(this)(t,a,r,n)}update(t){const a=this._cachedMeta.data;this._updateRadius(),this.updateElements(a,0,a.length,t)}getMinMax(){const t=this._cachedMeta,a={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,n)=>{const i=this.getParsed(n).r;!isNaN(i)&&this.chart.getDataVisibility(n)&&(i<a.min&&(a.min=i),i>a.max&&(a.max=i))}),a}_updateRadius(){const t=this.chart,a=t.chartArea,r=t.options,n=Math.min(a.right-a.left,a.bottom-a.top),i=Math.max(n/2,0),c=Math.max(r.cutoutPercentage?i/100*r.cutoutPercentage:1,0),s=(i-c)/t.getVisibleDatasetCount();this.outerRadius=i-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,a,r,n){const i=n==="reset",c=this.chart,o=c.options.animation,l=this._cachedMeta.rScale,f=l.xCenter,d=l.yCenter,h=l.getIndexAngle(0)-.5*ee;let m=h,p;const v=360/this.countVisibleElements();for(p=0;p<a;++p)m+=this._computeAngle(p,n,v);for(p=a;p<a+r;p++){const g=t[p];let y=m,x=m+this._computeAngle(p,n,v),C=c.getDataVisibility(p)?l.getDistanceFromCenterForValue(this.getParsed(p).r):0;m=x,i&&(o.animateScale&&(C=0),o.animateRotate&&(y=x=h));const b={x:f,y:d,innerRadius:0,outerRadius:C,startAngle:y,endAngle:x,options:this.resolveDataElementOptions(p,g.active?"active":n)};this.updateElement(g,p,b,n)}}countVisibleElements(){const t=this._cachedMeta;let a=0;return t.data.forEach((r,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&a++}),a}_computeAngle(t,a,r){return this.chart.getDataVisibility(t)?v3(this.resolveDataElementOptions(t,a).angle||r):0}}z1(zr,"id","polarArea"),z1(zr,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),z1(zr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const a=t.data;if(a.labels.length&&a.datasets.length){const{labels:{pointStyle:r,color:n}}=t.legend.options;return a.labels.map((i,c)=>{const o=t.getDatasetMeta(0).controller.getStyle(c);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:n,lineWidth:o.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(c),index:c}})}return[]}},onClick(t,a,r){r.chart.toggleDataVisibility(a.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class zo extends K0{}z1(zo,"id","pie"),z1(zo,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ci extends C3{getLabelAndValue(t){const a=this._cachedMeta.vScale,r=this.getParsed(t);return{label:a.getLabels()[t],value:""+a.getLabelForValue(r[a.axis])}}parseObjectData(t,a,r,n){return Uy.bind(this)(t,a,r,n)}update(t){const a=this._cachedMeta,r=a.dataset,n=a.data||[],i=a.iScale.getLabels();if(r.points=n,t!=="resize"){const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0);const s={_loop:!0,_fullLoop:i.length===n.length,options:c};this.updateElement(r,void 0,s,t)}this.updateElements(n,0,n.length,t)}updateElements(t,a,r,n){const i=this._cachedMeta.rScale,c=n==="reset";for(let s=a;s<a+r;s++){const o=t[s],l=this.resolveDataElementOptions(s,o.active?"active":n),f=i.getPointPositionForValue(s,this.getParsed(s).r),d=c?i.xCenter:f.x,h=c?i.yCenter:f.y,m={x:d,y:h,angle:f.angle,skip:isNaN(d)||isNaN(h),options:l};this.updateElement(o,s,m,n)}}}z1(ci,"id","radar"),z1(ci,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),z1(ci,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class ii extends C3{getLabelAndValue(t){const a=this._cachedMeta,r=this.chart.data.labels||[],{xScale:n,yScale:i}=a,c=this.getParsed(t),s=n.getLabelForValue(c.x),o=i.getLabelForValue(c.y);return{label:r[t]||"",value:"("+s+", "+o+")"}}update(t){const a=this._cachedMeta,{data:r=[]}=a,n=this.chart._animationsDisabled;let{start:i,count:c}=Ny(a,r,n);if(this._drawStart=i,this._drawCount=c,Oy(a)&&(i=0,c=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:s,_dataset:o}=a;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=r;const l=this.resolveDatasetElementOptions(t);l.segment=this.options.segment,this.updateElement(s,void 0,{animated:!n,options:l},t)}else this.datasetElementType&&(delete a.dataset,this.datasetElementType=!1);this.updateElements(r,i,c,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,a,r,n){const i=n==="reset",{iScale:c,vScale:s,_stacked:o,_dataset:l}=this._cachedMeta,f=this.resolveDataElementOptions(a,n),d=this.getSharedOptions(f),h=this.includeOptions(n,d),m=c.axis,p=s.axis,{spanGaps:v,segment:g}=this.options,y=l6(v)?v:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||i||n==="none";let C=a>0&&this.getParsed(a-1);for(let b=a;b<a+r;++b){const M=t[b],w=this.getParsed(b),z=x?M:{},_=L2(w[p]),S=z[m]=c.getPixelForValue(w[m],b),k=z[p]=i||_?s.getBasePixel():s.getPixelForValue(o?this.applyStack(s,w,o):w[p],b);z.skip=isNaN(S)||isNaN(k)||_,z.stop=b>0&&Math.abs(w[m]-C[m])>y,g&&(z.parsed=w,z.raw=l.data[b]),h&&(z.options=d||this.resolveDataElementOptions(b,M.active?"active":n)),x||this.updateElement(M,b,z,n),C=w}this.updateSharedOptions(d,n,f)}getMaxOverflow(){const t=this._cachedMeta,a=t.data||[];if(!this.options.showLine){let s=0;for(let o=a.length-1;o>=0;--o)s=Math.max(s,a[o].size(this.resolveDataElementOptions(o))/2);return s>0&&s}const r=t.dataset,n=r.options&&r.options.borderWidth||0;if(!a.length)return n;const i=a[0].size(this.resolveDataElementOptions(0)),c=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(n,i,c)/2}}z1(ii,"id","scatter"),z1(ii,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),z1(ii,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var tq=Object.freeze({__proto__:null,BarController:ai,BubbleController:ri,DoughnutController:K0,LineController:ni,PieController:zo,PolarAreaController:zr,RadarController:ci,ScatterController:ii});function D0(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class zl{constructor(t){z1(this,"options");this.options=t||{}}static override(t){Object.assign(zl.prototype,t)}init(){}formats(){return D0()}parse(){return D0()}format(){return D0()}add(){return D0()}diff(){return D0()}startOf(){return D0()}endOf(){return D0()}}var aq={_date:zl};function rq(e,t,a,r){const{controller:n,data:i,_sorted:c}=e,s=n._cachedMeta.iScale;if(s&&t===s.axis&&t!=="r"&&c&&i.length){const o=s._reversePixels?H$:C4;if(r){if(n._sharedOptions){const l=i[0],f=typeof l.getRange=="function"&&l.getRange(t);if(f){const d=o(i,t,a-f),h=o(i,t,a+f);return{lo:d.lo,hi:h.hi}}}}else return o(i,t,a)}return{lo:0,hi:i.length-1}}function Nn(e,t,a,r,n){const i=e.getSortedVisibleDatasetMetas(),c=a[t];for(let s=0,o=i.length;s<o;++s){const{index:l,data:f}=i[s],{lo:d,hi:h}=rq(i[s],t,c,n);for(let m=d;m<=h;++m){const p=f[m];p.skip||r(p,l,m)}}}function nq(e){const t=e.indexOf("x")!==-1,a=e.indexOf("y")!==-1;return function(r,n){const i=t?Math.abs(r.x-n.x):0,c=a?Math.abs(r.y-n.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(c,2))}}function rs(e,t,a,r,n){const i=[];return!n&&!e.isPointInArea(t)||Nn(e,a,t,function(s,o,l){!n&&!M4(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&i.push({element:s,datasetIndex:o,index:l})},!0),i}function cq(e,t,a,r){let n=[];function i(c,s,o){const{startAngle:l,endAngle:f}=c.getProps(["startAngle","endAngle"],r),{angle:d}=ky(c,{x:t.x,y:t.y});en(d,l,f)&&n.push({element:c,datasetIndex:s,index:o})}return Nn(e,a,t,i),n}function iq(e,t,a,r,n,i){let c=[];const s=nq(a);let o=Number.POSITIVE_INFINITY;function l(f,d,h){const m=f.inRange(t.x,t.y,n);if(r&&!m)return;const p=f.getCenterPoint(n);if(!(!!i||e.isPointInArea(p))&&!m)return;const g=s(t,p);g<o?(c=[{element:f,datasetIndex:d,index:h}],o=g):g===o&&c.push({element:f,datasetIndex:d,index:h})}return Nn(e,a,t,l),c}function ns(e,t,a,r,n,i){return!i&&!e.isPointInArea(t)?[]:a==="r"&&!r?cq(e,t,a,n):iq(e,t,a,r,n,i)}function Bd(e,t,a,r,n){const i=[],c=a==="x"?"inXRange":"inYRange";let s=!1;return Nn(e,a,t,(o,l,f)=>{o[c]&&o[c](t[a],n)&&(i.push({element:o,datasetIndex:l,index:f}),s=s||o.inRange(t.x,t.y,n))}),r&&!s?[]:i}var sq={evaluateInteractionItems:Nn,modes:{index(e,t,a,r){const n=I0(t,e),i=a.axis||"x",c=a.includeInvisible||!1,s=a.intersect?rs(e,n,i,r,c):ns(e,n,i,!1,r,c),o=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(l=>{const f=s[0].index,d=l.data[f];d&&!d.skip&&o.push({element:d,datasetIndex:l.index,index:f})}),o):[]},dataset(e,t,a,r){const n=I0(t,e),i=a.axis||"xy",c=a.includeInvisible||!1;let s=a.intersect?rs(e,n,i,r,c):ns(e,n,i,!1,r,c);if(s.length>0){const o=s[0].datasetIndex,l=e.getDatasetMeta(o).data;s=[];for(let f=0;f<l.length;++f)s.push({element:l[f],datasetIndex:o,index:f})}return s},point(e,t,a,r){const n=I0(t,e),i=a.axis||"xy",c=a.includeInvisible||!1;return rs(e,n,i,r,c)},nearest(e,t,a,r){const n=I0(t,e),i=a.axis||"xy",c=a.includeInvisible||!1;return ns(e,n,i,a.intersect,r,c)},x(e,t,a,r){const n=I0(t,e);return Bd(e,n,"x",a.intersect,r)},y(e,t,a,r){const n=I0(t,e);return Bd(e,n,"y",a.intersect,r)}}};const Jy=["left","top","right","bottom"];function U6(e,t){return e.filter(a=>a.pos===t)}function Id(e,t){return e.filter(a=>Jy.indexOf(a.pos)===-1&&a.box.axis===t)}function q6(e,t){return e.sort((a,r)=>{const n=t?r:a,i=t?a:r;return n.weight===i.weight?n.index-i.index:n.weight-i.weight})}function oq(e){const t=[];let a,r,n,i,c,s;for(a=0,r=(e||[]).length;a<r;++a)n=e[a],{position:i,options:{stack:c,stackWeight:s=1}}=n,t.push({index:a,box:n,pos:i,horizontal:n.isHorizontal(),weight:n.weight,stack:c&&i+c,stackWeight:s});return t}function lq(e){const t={};for(const a of e){const{stack:r,pos:n,stackWeight:i}=a;if(!r||!Jy.includes(n))continue;const c=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});c.count++,c.weight+=i}return t}function fq(e,t){const a=lq(e),{vBoxMaxWidth:r,hBoxMaxHeight:n}=t;let i,c,s;for(i=0,c=e.length;i<c;++i){s=e[i];const{fullSize:o}=s.box,l=a[s.stack],f=l&&s.stackWeight/l.weight;s.horizontal?(s.width=f?f*r:o&&t.availableWidth,s.height=n):(s.width=r,s.height=f?f*n:o&&t.availableHeight)}return a}function uq(e){const t=oq(e),a=q6(t.filter(l=>l.box.fullSize),!0),r=q6(U6(t,"left"),!0),n=q6(U6(t,"right")),i=q6(U6(t,"top"),!0),c=q6(U6(t,"bottom")),s=Id(t,"x"),o=Id(t,"y");return{fullSize:a,leftAndTop:r.concat(i),rightAndBottom:n.concat(o).concat(c).concat(s),chartArea:U6(t,"chartArea"),vertical:r.concat(n).concat(o),horizontal:i.concat(c).concat(s)}}function $d(e,t,a,r){return Math.max(e[a],t[a])+Math.max(e[r],t[r])}function ex(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function dq(e,t,a,r){const{pos:n,box:i}=a,c=e.maxPadding;if(!x2(n)){a.size&&(e[n]-=a.size);const d=r[a.stack]||{size:0,count:1};d.size=Math.max(d.size,a.horizontal?i.height:i.width),a.size=d.size/d.count,e[n]+=a.size}i.getPadding&&ex(c,i.getPadding());const s=Math.max(0,t.outerWidth-$d(c,e,"left","right")),o=Math.max(0,t.outerHeight-$d(c,e,"top","bottom")),l=s!==e.w,f=o!==e.h;return e.w=s,e.h=o,a.horizontal?{same:l,other:f}:{same:f,other:l}}function hq(e){const t=e.maxPadding;function a(r){const n=Math.max(t[r]-e[r],0);return e[r]+=n,n}e.y+=a("top"),e.x+=a("left"),a("right"),a("bottom")}function mq(e,t){const a=t.maxPadding;function r(n){const i={left:0,top:0,right:0,bottom:0};return n.forEach(c=>{i[c]=Math.max(t[c],a[c])}),i}return r(e?["left","right"]:["top","bottom"])}function rr(e,t,a,r){const n=[];let i,c,s,o,l,f;for(i=0,c=e.length,l=0;i<c;++i){s=e[i],o=s.box,o.update(s.width||t.w,s.height||t.h,mq(s.horizontal,t));const{same:d,other:h}=dq(t,a,s,r);l|=d&&n.length,f=f||h,o.fullSize||n.push(s)}return l&&rr(n,t,a,r)||f}function Hc(e,t,a,r,n){e.top=a,e.left=t,e.right=t+r,e.bottom=a+n,e.width=r,e.height=n}function Ud(e,t,a,r){const n=a.padding;let{x:i,y:c}=t;for(const s of e){const o=s.box,l=r[s.stack]||{count:1,placed:0,weight:1},f=s.stackWeight/l.weight||1;if(s.horizontal){const d=t.w*f,h=l.size||o.height;Jr(l.start)&&(c=l.start),o.fullSize?Hc(o,n.left,c,a.outerWidth-n.right-n.left,h):Hc(o,t.left+l.placed,c,d,h),l.start=c,l.placed+=d,c=o.bottom}else{const d=t.h*f,h=l.size||o.width;Jr(l.start)&&(i=l.start),o.fullSize?Hc(o,i,n.top,h,a.outerHeight-n.bottom-n.top):Hc(o,i,t.top+l.placed,h,d),l.start=i,l.placed+=d,i=o.right}}t.x=i,t.y=c}var it={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(a){t.draw(a)}}]},e.boxes.push(t)},removeBox(e,t){const a=e.boxes?e.boxes.indexOf(t):-1;a!==-1&&e.boxes.splice(a,1)},configure(e,t,a){t.fullSize=a.fullSize,t.position=a.position,t.weight=a.weight},update(e,t,a,r){if(!e)return;const n=ft(e.options.layout.padding),i=Math.max(t-n.width,0),c=Math.max(a-n.height,0),s=uq(e.boxes),o=s.vertical,l=s.horizontal;R2(e.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});const f=o.reduce((v,g)=>g.box.options&&g.box.options.display===!1?v:v+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:a,padding:n,availableWidth:i,availableHeight:c,vBoxMaxWidth:i/2/f,hBoxMaxHeight:c/2}),h=Object.assign({},n);ex(h,ft(r));const m=Object.assign({maxPadding:h,w:i,h:c,x:n.left,y:n.top},n),p=fq(o.concat(l),d);rr(s.fullSize,m,d,p),rr(o,m,d,p),rr(l,m,d,p)&&rr(o,m,d,p),hq(m),Ud(s.leftAndTop,m,d,p),m.x+=m.w,m.y+=m.h,Ud(s.rightAndBottom,m,d,p),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},R2(s.chartArea,v=>{const g=v.box;Object.assign(g,e.chartArea),g.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class tx{acquireContext(t,a){}releaseContext(t){return!1}addEventListener(t,a,r){}removeEventListener(t,a,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,a,r,n){return a=Math.max(0,a||t.width),r=r||t.height,{width:a,height:Math.max(0,n?Math.floor(a/n):r)}}isAttached(t){return!0}updateConfig(t){}}class pq extends tx{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const si="$chartjs",vq={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},qd=e=>e===null||e==="";function gq(e,t){const a=e.style,r=e.getAttribute("height"),n=e.getAttribute("width");if(e[si]={initial:{height:r,width:n,style:{display:a.display,height:a.height,width:a.width}}},a.display=a.display||"block",a.boxSizing=a.boxSizing||"border-box",qd(n)){const i=Sd(e,"width");i!==void 0&&(e.width=i)}if(qd(r))if(e.style.height==="")e.height=e.width/(t||2);else{const i=Sd(e,"height");i!==void 0&&(e.height=i)}return e}const ax=xU?{passive:!0}:!1;function yq(e,t,a){e&&e.addEventListener(t,a,ax)}function xq(e,t,a){e&&e.canvas&&e.canvas.removeEventListener(t,a,ax)}function bq(e,t){const a=vq[e.type]||e.type,{x:r,y:n}=I0(e,t);return{type:a,chart:t,native:e,x:r!==void 0?r:null,y:n!==void 0?n:null}}function Ii(e,t){for(const a of e)if(a===t||a.contains(t))return!0}function Cq(e,t,a){const r=e.canvas,n=new MutationObserver(i=>{let c=!1;for(const s of i)c=c||Ii(s.addedNodes,r),c=c&&!Ii(s.removedNodes,r);c&&a()});return n.observe(document,{childList:!0,subtree:!0}),n}function Mq(e,t,a){const r=e.canvas,n=new MutationObserver(i=>{let c=!1;for(const s of i)c=c||Ii(s.removedNodes,r),c=c&&!Ii(s.addedNodes,r);c&&a()});return n.observe(document,{childList:!0,subtree:!0}),n}const an=new Map;let jd=0;function rx(){const e=window.devicePixelRatio;e!==jd&&(jd=e,an.forEach((t,a)=>{a.currentDevicePixelRatio!==e&&t()}))}function zq(e,t){an.size||window.addEventListener("resize",rx),an.set(e,t)}function wq(e){an.delete(e),an.size||window.removeEventListener("resize",rx)}function _q(e,t,a){const r=e.canvas,n=r&&Ml(r);if(!n)return;const i=Ey((s,o)=>{const l=n.clientWidth;a(s,o),l<n.clientWidth&&a()},window),c=new ResizeObserver(s=>{const o=s[0],l=o.contentRect.width,f=o.contentRect.height;l===0&&f===0||i(l,f)});return c.observe(n),zq(e,i),c}function cs(e,t,a){a&&a.disconnect(),t==="resize"&&wq(e)}function Hq(e,t,a){const r=e.canvas,n=Ey(i=>{e.ctx!==null&&a(bq(i,e))},e);return yq(r,t,n),n}class Sq extends tx{acquireContext(t,a){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(gq(t,a),r):null}releaseContext(t){const a=t.canvas;if(!a[si])return!1;const r=a[si].initial;["height","width"].forEach(i=>{const c=r[i];L2(c)?a.removeAttribute(i):a.setAttribute(i,c)});const n=r.style||{};return Object.keys(n).forEach(i=>{a.style[i]=n[i]}),a.width=a.width,delete a[si],!0}addEventListener(t,a,r){this.removeEventListener(t,a);const n=t.$proxies||(t.$proxies={}),c={attach:Cq,detach:Mq,resize:_q}[a]||Hq;n[a]=c(t,a,r)}removeEventListener(t,a){const r=t.$proxies||(t.$proxies={}),n=r[a];if(!n)return;({attach:cs,detach:cs,resize:cs}[a]||xq)(t,a,n),r[a]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,a,r,n){return yU(t,a,r,n)}isAttached(t){const a=t&&Ml(t);return!!(a&&a.isConnected)}}function Lq(e){return!Cl()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?pq:Sq}class S3{constructor(){z1(this,"x");z1(this,"y");z1(this,"active",!1);z1(this,"options");z1(this,"$animations")}tooltipPosition(t){const{x:a,y:r}=this.getProps(["x","y"],t);return{x:a,y:r}}hasValue(){return l6(this.x)&&l6(this.y)}getProps(t,a){const r=this.$animations;if(!a||!r)return this;const n={};return t.forEach(i=>{n[i]=r[i]&&r[i].active()?r[i]._to:this[i]}),n}}z1(S3,"defaults",{}),z1(S3,"defaultRoutes");function kq(e,t){const a=e.options.ticks,r=Aq(e),n=Math.min(a.maxTicksLimit||r,r),i=a.major.enabled?Tq(t):[],c=i.length,s=i[0],o=i[c-1],l=[];if(c>n)return Eq(t,l,i,c/n),l;const f=Vq(i,t,n);if(c>0){let d,h;const m=c>1?Math.round((o-s)/(c-1)):null;for(Sc(t,l,f,L2(m)?0:s-m,s),d=0,h=c-1;d<h;d++)Sc(t,l,f,i[d],i[d+1]);return Sc(t,l,f,o,L2(m)?t.length:o+m),l}return Sc(t,l,f),l}function Aq(e){const t=e.options.offset,a=e._tickSize(),r=e._length/a+(t?0:1),n=e._maxLength/a;return Math.floor(Math.min(r,n))}function Vq(e,t,a){const r=Nq(e),n=t.length/a;if(!r)return Math.max(n,1);const i=M$(r);for(let c=0,s=i.length-1;c<s;c++){const o=i[c];if(o>n)return o}return Math.max(n,1)}function Tq(e){const t=[];let a,r;for(a=0,r=e.length;a<r;a++)e[a].major&&t.push(a);return t}function Eq(e,t,a,r){let n=0,i=a[0],c;for(r=Math.ceil(r),c=0;c<e.length;c++)c===i&&(t.push(e[c]),n++,i=a[n*r])}function Sc(e,t,a,r,n){const i=l2(r,0),c=Math.min(l2(n,e.length),e.length);let s=0,o,l,f;for(a=Math.ceil(a),n&&(o=n-r,a=o/Math.floor(o/a)),f=i;f<0;)s++,f=Math.round(i+s*a);for(l=Math.max(i,0);l<c;l++)l===f&&(t.push(e[l]),s++,f=Math.round(i+s*a))}function Nq(e){const t=e.length;let a,r;if(t<2)return!1;for(r=e[0],a=1;a<t;++a)if(e[a]-e[a-1]!==r)return!1;return r}const Oq=e=>e==="left"?"right":e==="right"?"left":e,Wd=(e,t,a)=>t==="top"||t==="left"?e[t]+a:e[t]-a,Gd=(e,t)=>Math.min(t||e,e);function Yd(e,t){const a=[],r=e.length/t,n=e.length;let i=0;for(;i<n;i+=r)a.push(e[Math.floor(i)]);return a}function Pq(e,t,a){const r=e.ticks.length,n=Math.min(t,r-1),i=e._startPixel,c=e._endPixel,s=1e-6;let o=e.getPixelForTick(n),l;if(!(a&&(r===1?l=Math.max(o-i,c-o):t===0?l=(e.getPixelForTick(1)-o)/2:l=(o-e.getPixelForTick(n-1))/2,o+=n<t?l:-l,o<i-s||o>c+s)))return o}function Dq(e,t){R2(e,a=>{const r=a.gc,n=r.length/2;let i;if(n>t){for(i=0;i<n;++i)delete a.data[r[i]];r.splice(0,n)}})}function j6(e){return e.drawTicks?e.tickLength:0}function Xd(e,t){if(!e.display)return 0;const a=Pe(e.font,t),r=ft(e.padding);return(Z2(e.text)?e.text.length:1)*a.lineHeight+r.height}function Rq(e,t){return S0(e,{scale:t,type:"scale"})}function Fq(e,t,a){return S0(e,{tick:a,index:t,type:"tick"})}function Bq(e,t,a){let r=pl(e);return(a&&t!=="right"||!a&&t==="right")&&(r=Oq(r)),r}function Iq(e,t,a,r){const{top:n,left:i,bottom:c,right:s,chart:o}=e,{chartArea:l,scales:f}=o;let d=0,h,m,p;const v=c-n,g=s-i;if(e.isHorizontal()){if(m=tt(r,i,s),x2(a)){const y=Object.keys(a)[0],x=a[y];p=f[y].getPixelForValue(x)+v-t}else a==="center"?p=(l.bottom+l.top)/2+v-t:p=Wd(e,a,t);h=s-i}else{if(x2(a)){const y=Object.keys(a)[0],x=a[y];m=f[y].getPixelForValue(x)-g+t}else a==="center"?m=(l.left+l.right)/2-g+t:m=Wd(e,a,t);p=tt(r,c,n),d=a==="left"?-we:we}return{titleX:m,titleY:p,maxWidth:h,rotation:d}}class Ca extends S3{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,a){return t}getUserBounds(){let{_userMin:t,_userMax:a,_suggestedMin:r,_suggestedMax:n}=this;return t=kt(t,Number.POSITIVE_INFINITY),a=kt(a,Number.NEGATIVE_INFINITY),r=kt(r,Number.POSITIVE_INFINITY),n=kt(n,Number.NEGATIVE_INFINITY),{min:kt(t,r),max:kt(a,n),minDefined:ve(t),maxDefined:ve(a)}}getMinMax(t){let{min:a,max:r,minDefined:n,maxDefined:i}=this.getUserBounds(),c;if(n&&i)return{min:a,max:r};const s=this.getMatchingVisibleMetas();for(let o=0,l=s.length;o<l;++o)c=s[o].controller.getMinMax(this,t),n||(a=Math.min(a,c.min)),i||(r=Math.max(r,c.max));return a=i&&a>r?r:a,r=n&&a>r?a:r,{min:kt(a,kt(r,a)),max:kt(r,kt(a,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$2(this.options.beforeUpdate,[this])}update(t,a,r){const{beginAtZero:n,grace:i,ticks:c}=this.options,s=c.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=a,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=K$(this,i,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const o=s<this.ticks.length;this._convertTicksToLabels(o?Yd(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),c.display&&(c.autoSkip||c.source==="auto")&&(this.ticks=kq(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),o&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,a,r;this.isHorizontal()?(a=this.left,r=this.right):(a=this.top,r=this.bottom,t=!t),this._startPixel=a,this._endPixel=r,this._reversePixels=t,this._length=r-a,this._alignToPixels=this.options.alignToPixels}afterUpdate(){$2(this.options.afterUpdate,[this])}beforeSetDimensions(){$2(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(){$2(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),$2(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){$2(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const a=this.options.ticks;let r,n,i;for(r=0,n=t.length;r<n;r++)i=t[r],i.label=$2(a.callback,[i.value,r,t],this)}afterTickToLabelConversion(){$2(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){$2(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,a=t.ticks,r=Gd(this.ticks.length,t.ticks.maxTicksLimit),n=a.minRotation||0,i=a.maxRotation;let c=n,s,o,l;if(!this._isVisible()||!a.display||n>=i||r<=1||!this.isHorizontal()){this.labelRotation=n;return}const f=this._getLabelSizes(),d=f.widest.width,h=f.highest.height,m=qe(this.chart.width-d,0,this.maxWidth);s=t.offset?this.maxWidth/r:m/(r-1),d+6>s&&(s=m/(r-(t.offset?.5:1)),o=this.maxHeight-j6(t.grid)-a.padding-Xd(t.title,this.chart.options.font),l=Math.sqrt(d*d+h*h),c=hl(Math.min(Math.asin(qe((f.highest.height+6)/s,-1,1)),Math.asin(qe(o/l,-1,1))-Math.asin(qe(h/l,-1,1)))),c=Math.max(n,Math.min(i,c))),this.labelRotation=c}afterCalculateLabelRotation(){$2(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$2(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:a,options:{ticks:r,title:n,grid:i}}=this,c=this._isVisible(),s=this.isHorizontal();if(c){const o=Xd(n,a.options.font);if(s?(t.width=this.maxWidth,t.height=j6(i)+o):(t.height=this.maxHeight,t.width=j6(i)+o),r.display&&this.ticks.length){const{first:l,last:f,widest:d,highest:h}=this._getLabelSizes(),m=r.padding*2,p=v3(this.labelRotation),v=Math.cos(p),g=Math.sin(p);if(s){const y=r.mirror?0:g*d.width+v*h.height;t.height=Math.min(this.maxHeight,t.height+y+m)}else{const y=r.mirror?0:v*d.width+g*h.height;t.width=Math.min(this.maxWidth,t.width+y+m)}this._calculatePadding(l,f,g,v)}}this._handleMargins(),s?(this.width=this._length=a.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=a.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,a,r,n){const{ticks:{align:i,padding:c},position:s}=this.options,o=this.labelRotation!==0,l=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,m=0;o?l?(h=n*t.width,m=r*a.height):(h=r*t.height,m=n*a.width):i==="start"?m=a.width:i==="end"?h=t.width:i!=="inner"&&(h=t.width/2,m=a.width/2),this.paddingLeft=Math.max((h-f+c)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-d+c)*this.width/(this.width-d),0)}else{let f=a.height/2,d=t.height/2;i==="start"?(f=0,d=t.height):i==="end"&&(f=a.height,d=0),this.paddingTop=f+c,this.paddingBottom=d+c}}_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(){$2(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:a}=this.options;return a==="top"||a==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let a,r;for(a=0,r=t.length;a<r;a++)L2(t[a].label)&&(t.splice(a,1),r--,a--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const a=this.options.ticks.sampleSize;let r=this.ticks;a<r.length&&(r=Yd(r,a)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,a,r){const{ctx:n,_longestTextCache:i}=this,c=[],s=[],o=Math.floor(a/Gd(a,r));let l=0,f=0,d,h,m,p,v,g,y,x,C,b,M;for(d=0;d<a;d+=o){if(p=t[d].label,v=this._resolveTickFontOptions(d),n.font=g=v.string,y=i[g]=i[g]||{data:{},gc:[]},x=v.lineHeight,C=b=0,!L2(p)&&!Z2(p))C=Fi(n,y.data,y.gc,C,p),b=x;else if(Z2(p))for(h=0,m=p.length;h<m;++h)M=p[h],!L2(M)&&!Z2(M)&&(C=Fi(n,y.data,y.gc,C,M),b+=x);c.push(C),s.push(b),l=Math.max(C,l),f=Math.max(b,f)}Dq(i,a);const w=c.indexOf(l),z=s.indexOf(f),_=S=>({width:c[S]||0,height:s[S]||0});return{first:_(0),last:_(a-1),widest:_(w),highest:_(z),widths:c,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,a){return NaN}getValueForPixel(t){}getPixelForTick(t){const a=this.ticks;return t<0||t>a.length-1?null:this.getPixelForValue(a[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const a=this._startPixel+t*this._length;return _$(this._alignToPixels?P0(this.chart,a,0):a)}getDecimalForPixel(t){const a=(t-this._startPixel)/this._length;return this._reversePixels?1-a:a}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:a}=this;return t<0&&a<0?a:t>0&&a>0?t:0}getContext(t){const a=this.ticks||[];if(t>=0&&t<a.length){const r=a[t];return r.$context||(r.$context=Fq(this.getContext(),t,r))}return this.$context||(this.$context=Rq(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,a=v3(this.labelRotation),r=Math.abs(Math.cos(a)),n=Math.abs(Math.sin(a)),i=this._getLabelSizes(),c=t.autoSkipPadding||0,s=i?i.widest.width+c:0,o=i?i.highest.height+c:0;return this.isHorizontal()?o*r>s*n?s/r:o/n:o*n<s*r?o/r:s/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const a=this.axis,r=this.chart,n=this.options,{grid:i,position:c,border:s}=n,o=i.offset,l=this.isHorizontal(),d=this.ticks.length+(o?1:0),h=j6(i),m=[],p=s.setContext(this.getContext()),v=p.display?p.width:0,g=v/2,y=function(R){return P0(r,R,v)};let x,C,b,M,w,z,_,S,k,H,L,A;if(c==="top")x=y(this.bottom),z=this.bottom-h,S=x-g,H=y(t.top)+g,A=t.bottom;else if(c==="bottom")x=y(this.top),H=t.top,A=y(t.bottom)-g,z=x+g,S=this.top+h;else if(c==="left")x=y(this.right),w=this.right-h,_=x-g,k=y(t.left)+g,L=t.right;else if(c==="right")x=y(this.left),k=t.left,L=y(t.right)-g,w=x+g,_=this.left+h;else if(a==="x"){if(c==="center")x=y((t.top+t.bottom)/2+.5);else if(x2(c)){const R=Object.keys(c)[0],P=c[R];x=y(this.chart.scales[R].getPixelForValue(P))}H=t.top,A=t.bottom,z=x+g,S=z+h}else if(a==="y"){if(c==="center")x=y((t.left+t.right)/2);else if(x2(c)){const R=Object.keys(c)[0],P=c[R];x=y(this.chart.scales[R].getPixelForValue(P))}w=x-g,_=w-h,k=t.left,L=t.right}const N=l2(n.ticks.maxTicksLimit,d),E=Math.max(1,Math.ceil(d/N));for(C=0;C<d;C+=E){const R=this.getContext(C),P=i.setContext(R),X=s.setContext(R),B=P.lineWidth,Y=P.color,D=X.dash||[],V=X.dashOffset,T=P.tickWidth,I=P.tickColor,W=P.tickBorderDash||[],O=P.tickBorderDashOffset;b=Pq(this,C,o),b!==void 0&&(M=P0(r,b,B),l?w=_=k=L=M:z=S=H=A=M,m.push({tx1:w,ty1:z,tx2:_,ty2:S,x1:k,y1:H,x2:L,y2:A,width:B,color:Y,borderDash:D,borderDashOffset:V,tickWidth:T,tickColor:I,tickBorderDash:W,tickBorderDashOffset:O}))}return this._ticksLength=d,this._borderValue=x,m}_computeLabelItems(t){const a=this.axis,r=this.options,{position:n,ticks:i}=r,c=this.isHorizontal(),s=this.ticks,{align:o,crossAlign:l,padding:f,mirror:d}=i,h=j6(r.grid),m=h+f,p=d?-f:m,v=-v3(this.labelRotation),g=[];let y,x,C,b,M,w,z,_,S,k,H,L,A="middle";if(n==="top")w=this.bottom-p,z=this._getXAxisLabelAlignment();else if(n==="bottom")w=this.top+p,z=this._getXAxisLabelAlignment();else if(n==="left"){const E=this._getYAxisLabelAlignment(h);z=E.textAlign,M=E.x}else if(n==="right"){const E=this._getYAxisLabelAlignment(h);z=E.textAlign,M=E.x}else if(a==="x"){if(n==="center")w=(t.top+t.bottom)/2+m;else if(x2(n)){const E=Object.keys(n)[0],R=n[E];w=this.chart.scales[E].getPixelForValue(R)+m}z=this._getXAxisLabelAlignment()}else if(a==="y"){if(n==="center")M=(t.left+t.right)/2-m;else if(x2(n)){const E=Object.keys(n)[0],R=n[E];M=this.chart.scales[E].getPixelForValue(R)}z=this._getYAxisLabelAlignment(h).textAlign}a==="y"&&(o==="start"?A="top":o==="end"&&(A="bottom"));const N=this._getLabelSizes();for(y=0,x=s.length;y<x;++y){C=s[y],b=C.label;const E=i.setContext(this.getContext(y));_=this.getPixelForTick(y)+i.labelOffset,S=this._resolveTickFontOptions(y),k=S.lineHeight,H=Z2(b)?b.length:1;const R=H/2,P=E.color,X=E.textStrokeColor,B=E.textStrokeWidth;let Y=z;c?(M=_,z==="inner"&&(y===x-1?Y=this.options.reverse?"left":"right":y===0?Y=this.options.reverse?"right":"left":Y="center"),n==="top"?l==="near"||v!==0?L=-H*k+k/2:l==="center"?L=-N.highest.height/2-R*k+k:L=-N.highest.height+k/2:l==="near"||v!==0?L=k/2:l==="center"?L=N.highest.height/2-R*k:L=N.highest.height-H*k,d&&(L*=-1),v!==0&&!E.showLabelBackdrop&&(M+=k/2*Math.sin(v))):(w=_,L=(1-H)*k/2);let D;if(E.showLabelBackdrop){const V=ft(E.backdropPadding),T=N.heights[y],I=N.widths[y];let W=L-V.top,O=0-V.left;switch(A){case"middle":W-=T/2;break;case"bottom":W-=T;break}switch(z){case"center":O-=I/2;break;case"right":O-=I;break;case"inner":y===x-1?O-=I:y>0&&(O-=I/2);break}D={left:O,top:W,width:I+V.width,height:T+V.height,color:E.backdropColor}}g.push({label:b,font:S,textOffset:L,options:{rotation:v,color:P,strokeColor:X,strokeWidth:B,textAlign:Y,textBaseline:A,translation:[M,w],backdrop:D}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:a}=this.options;if(-v3(this.labelRotation))return t==="top"?"left":"right";let n="center";return a.align==="start"?n="left":a.align==="end"?n="right":a.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:a,ticks:{crossAlign:r,mirror:n,padding:i}}=this.options,c=this._getLabelSizes(),s=t+i,o=c.widest.width;let l,f;return a==="left"?n?(f=this.right+i,r==="near"?l="left":r==="center"?(l="center",f+=o/2):(l="right",f+=o)):(f=this.right-s,r==="near"?l="right":r==="center"?(l="center",f-=o/2):(l="left",f=this.left)):a==="right"?n?(f=this.left+i,r==="near"?l="right":r==="center"?(l="center",f-=o/2):(l="left",f-=o)):(f=this.left+s,r==="near"?l="left":r==="center"?(l="center",f+=o/2):(l="right",f=this.right)):l="right",{textAlign:l,x:f}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,a=this.options.position;if(a==="left"||a==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(a==="top"||a==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:a},left:r,top:n,width:i,height:c}=this;a&&(t.save(),t.fillStyle=a,t.fillRect(r,n,i,c),t.restore())}getLineWidthForValue(t){const a=this.options.grid;if(!this._isVisible()||!a.display)return 0;const n=this.ticks.findIndex(i=>i.value===t);return n>=0?a.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const a=this.options.grid,r=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let i,c;const s=(o,l,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(o.x,o.y),r.lineTo(l.x,l.y),r.stroke(),r.restore())};if(a.display)for(i=0,c=n.length;i<c;++i){const o=n[i];a.drawOnChartArea&&s({x:o.x1,y:o.y1},{x:o.x2,y:o.y2},o),a.drawTicks&&s({x:o.tx1,y:o.ty1},{x:o.tx2,y:o.ty2},{color:o.tickColor,width:o.tickWidth,borderDash:o.tickBorderDash,borderDashOffset:o.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:a,options:{border:r,grid:n}}=this,i=r.setContext(this.getContext()),c=r.display?i.width:0;if(!c)return;const s=n.setContext(this.getContext(0)).lineWidth,o=this._borderValue;let l,f,d,h;this.isHorizontal()?(l=P0(t,this.left,c)-c/2,f=P0(t,this.right,s)+s/2,d=h=o):(d=P0(t,this.top,c)-c/2,h=P0(t,this.bottom,s)+s/2,l=f=o),a.save(),a.lineWidth=i.width,a.strokeStyle=i.color,a.beginPath(),a.moveTo(l,d),a.lineTo(f,h),a.stroke(),a.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,n=this._computeLabelArea();n&&D8(r,n);const i=this.getLabelItems(t);for(const c of i){const s=c.options,o=c.font,l=c.label,f=c.textOffset;da(r,l,0,f,o,s)}n&&R8(r)}drawTitle(){const{ctx:t,options:{position:a,title:r,reverse:n}}=this;if(!r.display)return;const i=Pe(r.font),c=ft(r.padding),s=r.align;let o=i.lineHeight/2;a==="bottom"||a==="center"||x2(a)?(o+=c.bottom,Z2(r.text)&&(o+=i.lineHeight*(r.text.length-1))):o+=c.top;const{titleX:l,titleY:f,maxWidth:d,rotation:h}=Iq(this,o,a,s);da(t,r.text,0,0,i,{color:r.color,maxWidth:d,rotation:h,textAlign:Bq(s,a,n),textBaseline:"middle",translation:[l,f]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,a=t.ticks&&t.ticks.z||0,r=l2(t.grid&&t.grid.z,-1),n=l2(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Ca.prototype.draw?[{z:a,draw:i=>{this.draw(i)}}]:[{z:r,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:a,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(t){const a=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",n=[];let i,c;for(i=0,c=a.length;i<c;++i){const s=a[i];s[r]===this.id&&(!t||s.type===t)&&n.push(s)}return n}_resolveTickFontOptions(t){const a=this.options.ticks.setContext(this.getContext(t));return Pe(a.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Lc{constructor(t,a,r){this.type=t,this.scope=a,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const a=Object.getPrototypeOf(t);let r;qq(a)&&(r=this.register(a));const n=this.items,i=t.id,c=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+t);return i in n||(n[i]=t,$q(t,c,r),this.override&&se.override(t.id,t.overrides)),c}get(t){return this.items[t]}unregister(t){const a=this.items,r=t.id,n=this.scope;r in a&&delete a[r],n&&r in se[n]&&(delete se[n][r],this.override&&delete ua[r])}}function $q(e,t,a){const r=Qr(Object.create(null),[a?se.get(a):{},se.get(t),e.defaults]);se.set(t,r),e.defaultRoutes&&Uq(t,e.defaultRoutes),e.descriptors&&se.describe(t,e.descriptors)}function Uq(e,t){Object.keys(t).forEach(a=>{const r=a.split("."),n=r.pop(),i=[e].concat(r).join("."),c=t[a].split("."),s=c.pop(),o=c.join(".");se.route(i,n,o,s)})}function qq(e){return"id"in e&&"defaults"in e}class jq{constructor(){this.controllers=new Lc(C3,"datasets",!0),this.elements=new Lc(S3,"elements"),this.plugins=new Lc(Object,"plugins"),this.scales=new Lc(Ca,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,a,r){[...a].forEach(n=>{const i=r||this._getRegistryForType(n);r||i.isForType(n)||i===this.plugins&&n.id?this._exec(t,i,n):R2(n,c=>{const s=r||this._getRegistryForType(c);this._exec(t,s,c)})})}_exec(t,a,r){const n=dl(t);$2(r["before"+n],[],r),a[t](r),$2(r["after"+n],[],r)}_getRegistryForType(t){for(let a=0;a<this._typedRegistries.length;a++){const r=this._typedRegistries[a];if(r.isForType(t))return r}return this.plugins}_get(t,a,r){const n=a.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return n}}var F3=new jq;class Wq{constructor(){this._init=[]}notify(t,a,r,n){a==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const i=n?this._descriptors(t).filter(n):this._descriptors(t),c=this._notify(i,t,a,r);return a==="afterDestroy"&&(this._notify(i,t,"stop"),this._notify(this._init,t,"uninstall")),c}_notify(t,a,r,n){n=n||{};for(const i of t){const c=i.plugin,s=c[r],o=[a,n,i.options];if($2(s,o,c)===!1&&n.cancelable)return!1}return!0}invalidate(){L2(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const a=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),a}_createDescriptors(t,a){const r=t&&t.config,n=l2(r.options&&r.options.plugins,{}),i=Gq(r);return n===!1&&!a?[]:Xq(t,i,n,a)}_notifyStateChanges(t){const a=this._oldCache||[],r=this._cache,n=(i,c)=>i.filter(s=>!c.some(o=>s.plugin.id===o.plugin.id));this._notify(n(a,r),t,"stop"),this._notify(n(r,a),t,"start")}}function Gq(e){const t={},a=[],r=Object.keys(F3.plugins.items);for(let i=0;i<r.length;i++)a.push(F3.getPlugin(r[i]));const n=e.plugins||[];for(let i=0;i<n.length;i++){const c=n[i];a.indexOf(c)===-1&&(a.push(c),t[c.id]=!0)}return{plugins:a,localIds:t}}function Yq(e,t){return!t&&e===!1?null:e===!0?{}:e}function Xq(e,{plugins:t,localIds:a},r,n){const i=[],c=e.getContext();for(const s of t){const o=s.id,l=Yq(r[o],n);l!==null&&i.push({plugin:s,options:Kq(e.config,{plugin:s,local:a[o]},l,c)})}return i}function Kq(e,{plugin:t,local:a},r,n){const i=e.pluginScopeKeys(t),c=e.getOptionScopes(r,i);return a&&t.defaults&&c.push(t.defaults),e.createResolver(c,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function wo(e,t){const a=se.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||a.indexAxis||"x"}function Zq(e,t){let a=e;return e==="_index_"?a=t:e==="_value_"&&(a=t==="x"?"y":"x"),a}function Qq(e,t){return e===t?"_index_":"_value_"}function Kd(e){if(e==="x"||e==="y"||e==="r")return e}function Jq(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function _o(e,...t){if(Kd(e))return e;for(const a of t){const r=a.axis||Jq(a.position)||e.length>1&&Kd(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Zd(e,t,a){if(a[t+"AxisID"]===e)return{axis:t}}function ej(e,t){if(t.data&&t.data.datasets){const a=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(a.length)return Zd(e,"x",a[0])||Zd(e,"y",a[0])}return{}}function tj(e,t){const a=ua[e.type]||{scales:{}},r=t.scales||{},n=wo(e.type,t),i=Object.create(null);return Object.keys(r).forEach(c=>{const s=r[c];if(!x2(s))return console.error(`Invalid scale configuration for scale: ${c}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${c}`);const o=_o(c,s,ej(c,e),se.scales[s.type]),l=Qq(o,n),f=a.scales||{};i[c]=xr(Object.create(null),[{axis:o},s,f[o],f[l]])}),e.data.datasets.forEach(c=>{const s=c.type||e.type,o=c.indexAxis||wo(s,t),f=(ua[s]||{}).scales||{};Object.keys(f).forEach(d=>{const h=Zq(d,o),m=c[h+"AxisID"]||h;i[m]=i[m]||Object.create(null),xr(i[m],[{axis:h},r[m],f[d]])})}),Object.keys(i).forEach(c=>{const s=i[c];xr(s,[se.scales[s.type],se.scale])}),i}function nx(e){const t=e.options||(e.options={});t.plugins=l2(t.plugins,{}),t.scales=tj(e,t)}function cx(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function aj(e){return e=e||{},e.data=cx(e.data),nx(e),e}const Qd=new Map,ix=new Set;function kc(e,t){let a=Qd.get(e);return a||(a=t(),Qd.set(e,a),ix.add(a)),a}const W6=(e,t,a)=>{const r=C0(t,a);r!==void 0&&e.add(r)};class rj{constructor(t){this._config=aj(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cx(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),nx(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return kc(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,a){return kc(`${t}.transition.${a}`,()=>[[`datasets.${t}.transitions.${a}`,`transitions.${a}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,a){return kc(`${t}-${a}`,()=>[[`datasets.${t}.elements.${a}`,`datasets.${t}`,`elements.${a}`,""]])}pluginScopeKeys(t){const a=t.id,r=this.type;return kc(`${r}-plugin-${a}`,()=>[[`plugins.${a}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,a){const r=this._scopeCache;let n=r.get(t);return(!n||a)&&(n=new Map,r.set(t,n)),n}getOptionScopes(t,a,r){const{options:n,type:i}=this,c=this._cachedScopes(t,r),s=c.get(a);if(s)return s;const o=new Set;a.forEach(f=>{t&&(o.add(t),f.forEach(d=>W6(o,t,d))),f.forEach(d=>W6(o,n,d)),f.forEach(d=>W6(o,ua[i]||{},d)),f.forEach(d=>W6(o,se,d)),f.forEach(d=>W6(o,Co,d))});const l=Array.from(o);return l.length===0&&l.push(Object.create(null)),ix.has(a)&&c.set(a,l),l}chartOptionScopes(){const{options:t,type:a}=this;return[t,ua[a]||{},se.datasets[a]||{},{type:a},se,Co]}resolveNamedOptions(t,a,r,n=[""]){const i={$shared:!0},{resolver:c,subPrefixes:s}=Jd(this._resolverCache,t,n);let o=c;if(cj(c,a)){i.$shared=!1,r=M0(r)?r():r;const l=this.createResolver(t,r,s);o=f6(c,r,l)}for(const l of a)i[l]=o[l];return i}createResolver(t,a,r=[""],n){const{resolver:i}=Jd(this._resolverCache,t,r);return x2(a)?f6(i,a,void 0,n):i}}function Jd(e,t,a){let r=e.get(t);r||(r=new Map,e.set(t,r));const n=a.join();let i=r.get(n);return i||(i={resolver:yl(t,a),subPrefixes:a.filter(s=>!s.toLowerCase().includes("hover"))},r.set(n,i)),i}const nj=e=>x2(e)&&Object.getOwnPropertyNames(e).some(t=>M0(e[t]));function cj(e,t){const{isScriptable:a,isIndexable:r}=Fy(e);for(const n of t){const i=a(n),c=r(n),s=(c||i)&&e[n];if(i&&(M0(s)||nj(s))||c&&Z2(s))return!0}return!1}var ij="4.4.6";const sj=["top","bottom","left","right","chartArea"];function eh(e,t){return e==="top"||e==="bottom"||sj.indexOf(e)===-1&&t==="x"}function th(e,t){return function(a,r){return a[e]===r[e]?a[t]-r[t]:a[e]-r[e]}}function ah(e){const t=e.chart,a=t.options.animation;t.notifyPlugins("afterRender"),$2(a&&a.onComplete,[e],t)}function oj(e){const t=e.chart,a=t.options.animation;$2(a&&a.onProgress,[e],t)}function sx(e){return Cl()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const oi={},rh=e=>{const t=sx(e);return Object.values(oi).filter(a=>a.canvas===t).pop()};function lj(e,t,a){const r=Object.keys(e);for(const n of r){const i=+n;if(i>=t){const c=e[n];delete e[n],(a>0||i>t)&&(e[i+a]=c)}}}function fj(e,t,a,r){return!a||e.type==="mouseout"?null:r?t:e}function Ac(e,t,a){return e.options.clip?e[a]:t[a]}function uj(e,t){const{xScale:a,yScale:r}=e;return a&&r?{left:Ac(a,t,"left"),right:Ac(a,t,"right"),top:Ac(r,t,"top"),bottom:Ac(r,t,"bottom")}:t}class v4{static register(...t){F3.add(...t),nh()}static unregister(...t){F3.remove(...t),nh()}constructor(t,a){const r=this.config=new rj(a),n=sx(t),i=rh(n);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const c=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||Lq(n)),this.platform.updateConfig(r);const s=this.platform.acquireContext(n,c.aspectRatio),o=s&&s.canvas,l=o&&o.height,f=o&&o.width;if(this.id=h$(),this.ctx=s,this.canvas=o,this.width=f,this.height=l,this._options=c,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 Wq,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=k$(d=>this.update(d),c.resizeDelay||0),this._dataChanges=[],oi[this.id]=this,!s||!o){console.error("Failed to create chart: can't acquire context from the given item");return}d4.listen(this,"complete",ah),d4.listen(this,"progress",oj),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:a},width:r,height:n,_aspectRatio:i}=this;return L2(t)?a&&i?i:n?r/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return F3}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Hd(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return zd(this.canvas,this.ctx),this}stop(){return d4.stop(this),this}resize(t,a){d4.running(this)?this._resizeBeforeDraw={width:t,height:a}:this._resize(t,a)}_resize(t,a){const r=this.options,n=this.canvas,i=r.maintainAspectRatio&&this.aspectRatio,c=this.platform.getMaximumSize(n,t,a,i),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),o=this.width?"resize":"attach";this.width=c.width,this.height=c.height,this._aspectRatio=this.aspectRatio,Hd(this,s,!0)&&(this.notifyPlugins("resize",{size:c}),$2(r.onResize,[this,c],this),this.attached&&this._doResize(o)&&this.render())}ensureScalesHaveIDs(){const a=this.options.scales||{};R2(a,(r,n)=>{r.id=n})}buildOrUpdateScales(){const t=this.options,a=t.scales,r=this.scales,n=Object.keys(r).reduce((c,s)=>(c[s]=!1,c),{});let i=[];a&&(i=i.concat(Object.keys(a).map(c=>{const s=a[c],o=_o(c,s),l=o==="r",f=o==="x";return{options:s,dposition:l?"chartArea":f?"bottom":"left",dtype:l?"radialLinear":f?"category":"linear"}}))),R2(i,c=>{const s=c.options,o=s.id,l=_o(o,s),f=l2(s.type,c.dtype);(s.position===void 0||eh(s.position,l)!==eh(c.dposition))&&(s.position=c.dposition),n[o]=!0;let d=null;if(o in r&&r[o].type===f)d=r[o];else{const h=F3.getScale(f);d=new h({id:o,type:f,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(s,t)}),R2(n,(c,s)=>{c||delete r[s]}),R2(r,c=>{it.configure(this,c,c.options),it.addBox(this,c)})}_updateMetasets(){const t=this._metasets,a=this.data.datasets.length,r=t.length;if(t.sort((n,i)=>n.index-i.index),r>a){for(let n=a;n<r;++n)this._destroyDatasetMeta(n);t.splice(a,r-a)}this._sortedMetasets=t.slice(0).sort(th("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:a}}=this;t.length>a.length&&delete this._stacks,t.forEach((r,n)=>{a.filter(i=>i===r._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],a=this.data.datasets;let r,n;for(this._removeUnreferencedMetasets(),r=0,n=a.length;r<n;r++){const i=a[r];let c=this.getDatasetMeta(r);const s=i.type||this.config.type;if(c.type&&c.type!==s&&(this._destroyDatasetMeta(r),c=this.getDatasetMeta(r)),c.type=s,c.indexAxis=i.indexAxis||wo(s,this.options),c.order=i.order||0,c.index=r,c.label=""+i.label,c.visible=this.isDatasetVisible(r),c.controller)c.controller.updateIndex(r),c.controller.linkScales();else{const o=F3.getController(s),{datasetElementType:l,dataElementType:f}=se.datasets[s];Object.assign(o,{dataElementType:F3.getElement(f),datasetElementType:l&&F3.getElement(l)}),c.controller=new o(this,r),t.push(c.controller)}}return this._updateMetasets(),t}_resetElements(){R2(this.data.datasets,(t,a)=>{this.getDatasetMeta(a).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const a=this.config;a.update();const r=this._options=a.createResolver(a.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let c=0;for(let l=0,f=this.data.datasets.length;l<f;l++){const{controller:d}=this.getDatasetMeta(l),h=!n&&i.indexOf(d)===-1;d.buildOrUpdateElements(h),c=Math.max(+d.getMaxOverflow(),c)}c=this._minPadding=r.layout.autoPadding?c:0,this._updateLayout(c),n||R2(i,l=>{l.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(th("z","_idx"));const{_active:s,_lastEvent:o}=this;o?this._eventHandler(o,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){R2(this.scales,t=>{it.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,a=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!md(a,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,a=this._getUniformDataChanges()||[];for(const{method:r,start:n,count:i}of a){const c=r==="_removeElements"?-i:i;lj(t,n,c)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const a=this.data.datasets.length,r=i=>new Set(t.filter(c=>c[0]===i).map((c,s)=>s+","+c.splice(1).join(","))),n=r(0);for(let i=1;i<a;i++)if(!md(n,r(i)))return;return Array.from(n).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;it.update(this,this.width,this.height,t);const a=this.chartArea,r=a.width<=0||a.height<=0;this._layers=[],R2(this.boxes,n=>{r&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,i)=>{n._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let a=0,r=this.data.datasets.length;a<r;++a)this.getDatasetMeta(a).controller.configure();for(let a=0,r=this.data.datasets.length;a<r;++a)this._updateDataset(a,M0(t)?t({datasetIndex:a}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,a){const r=this.getDatasetMeta(t),n={meta:r,index:t,mode:a,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(r.controller._update(a),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(d4.has(this)?this.attached&&!d4.running(this)&&d4.start(this):(this.draw(),ah({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,n)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const a=this._layers;for(t=0;t<a.length&&a[t].z<=0;++t)a[t].draw(this.chartArea);for(this._drawDatasets();t<a.length;++t)a[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const a=this._sortedMetasets,r=[];let n,i;for(n=0,i=a.length;n<i;++n){const c=a[n];(!t||c.visible)&&r.push(c)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let a=t.length-1;a>=0;--a)this._drawDataset(t[a]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const a=this.ctx,r=t._clip,n=!r.disabled,i=uj(t,this.chartArea),c={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",c)!==!1&&(n&&D8(a,{left:r.left===!1?0:i.left-r.left,right:r.right===!1?this.width:i.right+r.right,top:r.top===!1?0:i.top-r.top,bottom:r.bottom===!1?this.height:i.bottom+r.bottom}),t.controller.draw(),n&&R8(a),c.cancelable=!1,this.notifyPlugins("afterDatasetDraw",c))}isPointInArea(t){return M4(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,a,r,n){const i=sq.modes[a];return typeof i=="function"?i(this,t,r,n):[]}getDatasetMeta(t){const a=this.data.datasets[t],r=this._metasets;let n=r.filter(i=>i&&i._dataset===a).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:a&&a.order||0,index:t,_dataset:a,_parsed:[],_sorted:!1},r.push(n)),n}getContext(){return this.$context||(this.$context=S0(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const a=this.data.datasets[t];if(!a)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!a.hidden}setDatasetVisibility(t,a){const r=this.getDatasetMeta(t);r.hidden=!a}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,a,r){const n=r?"show":"hide",i=this.getDatasetMeta(t),c=i.controller._resolveAnimations(void 0,n);Jr(a)?(i.data[a].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),c.update(i,{visible:r}),this.update(s=>s.datasetIndex===t?n:void 0))}hide(t,a){this._updateVisibility(t,a,!1)}show(t,a){this._updateVisibility(t,a,!0)}_destroyDatasetMeta(t){const a=this._metasets[t];a&&a.controller&&a.controller._destroy(),delete this._metasets[t]}_stop(){let t,a;for(this.stop(),d4.remove(this),t=0,a=this.data.datasets.length;t<a;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:a}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),zd(t,a),this.platform.releaseContext(a),this.canvas=null,this.ctx=null),delete oi[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,a=this.platform,r=(i,c)=>{a.addEventListener(this,i,c),t[i]=c},n=(i,c,s)=>{i.offsetX=c,i.offsetY=s,this._eventHandler(i)};R2(this.options.events,i=>r(i,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,a=this.platform,r=(o,l)=>{a.addEventListener(this,o,l),t[o]=l},n=(o,l)=>{t[o]&&(a.removeEventListener(this,o,l),delete t[o])},i=(o,l)=>{this.canvas&&this.resize(o,l)};let c;const s=()=>{n("attach",s),this.attached=!0,this.resize(),r("resize",i),r("detach",c)};c=()=>{this.attached=!1,n("resize",i),this._stop(),this._resize(0,0),r("attach",s)},a.isAttached(this.canvas)?s():c()}unbindEvents(){R2(this._listeners,(t,a)=>{this.platform.removeEventListener(this,a,t)}),this._listeners={},R2(this._responsiveListeners,(t,a)=>{this.platform.removeEventListener(this,a,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,a,r){const n=r?"set":"remove";let i,c,s,o;for(a==="dataset"&&(i=this.getDatasetMeta(t[0].datasetIndex),i.controller["_"+n+"DatasetHoverStyle"]()),s=0,o=t.length;s<o;++s){c=t[s];const l=c&&this.getDatasetMeta(c.datasetIndex).controller;l&&l[n+"HoverStyle"](c.element,c.datasetIndex,c.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const a=this._active||[],r=t.map(({datasetIndex:i,index:c})=>{const s=this.getDatasetMeta(i);if(!s)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:s.data[c],index:c}});!Pi(r,a)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,a))}notifyPlugins(t,a,r){return this._plugins.notify(this,t,a,r)}isPluginEnabled(t){return this._plugins._cache.filter(a=>a.plugin.id===t).length===1}_updateHoverStyles(t,a,r){const n=this.options.hover,i=(o,l)=>o.filter(f=>!l.some(d=>f.datasetIndex===d.datasetIndex&&f.index===d.index)),c=i(a,t),s=r?t:i(t,a);c.length&&this.updateHoverStyle(c,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,a){const r={event:t,replay:a,cancelable:!0,inChartArea:this.isPointInArea(t)},n=c=>(c.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,n)===!1)return;const i=this._handleEvent(t,a,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,n),(i||r.changed)&&this.render(),this}_handleEvent(t,a,r){const{_active:n=[],options:i}=this,c=a,s=this._getActiveElements(t,n,r,c),o=x$(t),l=fj(t,this._lastEvent,r,o);r&&(this._lastEvent=null,$2(i.onHover,[t,s,this],this),o&&$2(i.onClick,[t,s,this],this));const f=!Pi(s,n);return(f||a)&&(this._active=s,this._updateHoverStyles(s,n,a)),this._lastEvent=l,f}_getActiveElements(t,a,r,n){if(t.type==="mouseout")return[];if(!r)return a;const i=this.options.hover;return this.getElementsAtEventForMode(t,i.mode,i,n)}}z1(v4,"defaults",se),z1(v4,"instances",oi),z1(v4,"overrides",ua),z1(v4,"registry",F3),z1(v4,"version",ij),z1(v4,"getChart",rh);function nh(){return R2(v4.instances,e=>e._plugins.invalidate())}function dj(e,t,a){const{startAngle:r,pixelMargin:n,x:i,y:c,outerRadius:s,innerRadius:o}=t;let l=n/s;e.beginPath(),e.arc(i,c,s,r-l,a+l),o>n?(l=n/o,e.arc(i,c,o,a+l,r-l,!0)):e.arc(i,c,n,a+we,r-we),e.closePath(),e.clip()}function hj(e){return gl(e,["outerStart","outerEnd","innerStart","innerEnd"])}function mj(e,t,a,r){const n=hj(e.options.borderRadius),i=(a-t)/2,c=Math.min(i,r*t/2),s=o=>{const l=(a-Math.min(i,o))*r/2;return qe(o,0,Math.min(i,l))};return{outerStart:s(n.outerStart),outerEnd:s(n.outerEnd),innerStart:qe(n.innerStart,0,c),innerEnd:qe(n.innerEnd,0,c)}}function Ra(e,t,a,r){return{x:a+e*Math.cos(t),y:r+e*Math.sin(t)}}function $i(e,t,a,r,n,i){const{x:c,y:s,startAngle:o,pixelMargin:l,innerRadius:f}=t,d=Math.max(t.outerRadius+r+a-l,0),h=f>0?f+r+a+l:0;let m=0;const p=n-o;if(r){const E=f>0?f-r:0,R=d>0?d-r:0,P=(E+R)/2,X=P!==0?p*P/(P+r):p;m=(p-X)/2}const v=Math.max(.001,p*d-a/ee)/d,g=(p-v)/2,y=o+g+m,x=n-g-m,{outerStart:C,outerEnd:b,innerStart:M,innerEnd:w}=mj(t,h,d,x-y),z=d-C,_=d-b,S=y+C/z,k=x-b/_,H=h+M,L=h+w,A=y+M/H,N=x-w/L;if(e.beginPath(),i){const E=(S+k)/2;if(e.arc(c,s,d,S,E),e.arc(c,s,d,E,k),b>0){const B=Ra(_,k,c,s);e.arc(B.x,B.y,b,k,x+we)}const R=Ra(L,x,c,s);if(e.lineTo(R.x,R.y),w>0){const B=Ra(L,N,c,s);e.arc(B.x,B.y,w,x+we,N+Math.PI)}const P=(x-w/h+(y+M/h))/2;if(e.arc(c,s,h,x-w/h,P,!0),e.arc(c,s,h,P,y+M/h,!0),M>0){const B=Ra(H,A,c,s);e.arc(B.x,B.y,M,A+Math.PI,y-we)}const X=Ra(z,y,c,s);if(e.lineTo(X.x,X.y),C>0){const B=Ra(z,S,c,s);e.arc(B.x,B.y,C,y-we,S)}}else{e.moveTo(c,s);const E=Math.cos(S)*d+c,R=Math.sin(S)*d+s;e.lineTo(E,R);const P=Math.cos(k)*d+c,X=Math.sin(k)*d+s;e.lineTo(P,X)}e.closePath()}function pj(e,t,a,r,n){const{fullCircles:i,startAngle:c,circumference:s}=t;let o=t.endAngle;if(i){$i(e,t,a,r,o,n);for(let l=0;l<i;++l)e.fill();isNaN(s)||(o=c+(s%J2||J2))}return $i(e,t,a,r,o,n),e.fill(),o}function vj(e,t,a,r,n){const{fullCircles:i,startAngle:c,circumference:s,options:o}=t,{borderWidth:l,borderJoinStyle:f,borderDash:d,borderDashOffset:h}=o,m=o.borderAlign==="inner";if(!l)return;e.setLineDash(d||[]),e.lineDashOffset=h,m?(e.lineWidth=l*2,e.lineJoin=f||"round"):(e.lineWidth=l,e.lineJoin=f||"bevel");let p=t.endAngle;if(i){$i(e,t,a,r,p,n);for(let v=0;v<i;++v)e.stroke();isNaN(s)||(p=c+(s%J2||J2))}m&&dj(e,t,p),i||($i(e,t,a,r,p,n),e.stroke())}class nr extends S3{constructor(a){super();z1(this,"circumference");z1(this,"endAngle");z1(this,"fullCircles");z1(this,"innerRadius");z1(this,"outerRadius");z1(this,"pixelMargin");z1(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,a&&Object.assign(this,a)}inRange(a,r,n){const i=this.getProps(["x","y"],n),{angle:c,distance:s}=ky(i,{x:a,y:r}),{startAngle:o,endAngle:l,innerRadius:f,outerRadius:d,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),m=(this.options.spacing+this.options.borderWidth)/2,p=l2(h,l-o),v=en(c,o,l)&&o!==l,g=p>=J2||v,y=b4(s,f+m,d+m);return g&&y}getCenterPoint(a){const{x:r,y:n,startAngle:i,endAngle:c,innerRadius:s,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],a),{offset:l,spacing:f}=this.options,d=(i+c)/2,h=(s+o+f+l)/2;return{x:r+Math.cos(d)*h,y:n+Math.sin(d)*h}}tooltipPosition(a){return this.getCenterPoint(a)}draw(a){const{options:r,circumference:n}=this,i=(r.offset||0)/4,c=(r.spacing||0)/2,s=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=n>J2?Math.floor(n/J2):0,n===0||this.innerRadius<0||this.outerRadius<0)return;a.save();const o=(this.startAngle+this.endAngle)/2;a.translate(Math.cos(o)*i,Math.sin(o)*i);const l=1-Math.sin(Math.min(ee,n||0)),f=i*l;a.fillStyle=r.backgroundColor,a.strokeStyle=r.borderColor,pj(a,this,f,c,s),vj(a,this,f,c,s),a.restore()}}z1(nr,"id","arc"),z1(nr,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),z1(nr,"defaultRoutes",{backgroundColor:"backgroundColor"}),z1(nr,"descriptors",{_scriptable:!0,_indexable:a=>a!=="borderDash"});function ox(e,t,a=t){e.lineCap=l2(a.borderCapStyle,t.borderCapStyle),e.setLineDash(l2(a.borderDash,t.borderDash)),e.lineDashOffset=l2(a.borderDashOffset,t.borderDashOffset),e.lineJoin=l2(a.borderJoinStyle,t.borderJoinStyle),e.lineWidth=l2(a.borderWidth,t.borderWidth),e.strokeStyle=l2(a.borderColor,t.borderColor)}function gj(e,t,a){e.lineTo(a.x,a.y)}function yj(e){return e.stepped?I$:e.tension||e.cubicInterpolationMode==="monotone"?$$:gj}function lx(e,t,a={}){const r=e.length,{start:n=0,end:i=r-1}=a,{start:c,end:s}=t,o=Math.max(n,c),l=Math.min(i,s),f=n<c&&i<c||n>s&&i>s;return{count:r,start:o,loop:t.loop,ilen:l<o&&!f?r+l-o:l-o}}function xj(e,t,a,r){const{points:n,options:i}=t,{count:c,start:s,loop:o,ilen:l}=lx(n,a,r),f=yj(i);let{move:d=!0,reverse:h}=r||{},m,p,v;for(m=0;m<=l;++m)p=n[(s+(h?l-m:m))%c],!p.skip&&(d?(e.moveTo(p.x,p.y),d=!1):f(e,v,p,h,i.stepped),v=p);return o&&(p=n[(s+(h?l:0))%c],f(e,v,p,h,i.stepped)),!!o}function bj(e,t,a,r){const n=t.points,{count:i,start:c,ilen:s}=lx(n,a,r),{move:o=!0,reverse:l}=r||{};let f=0,d=0,h,m,p,v,g,y;const x=b=>(c+(l?s-b:b))%i,C=()=>{v!==g&&(e.lineTo(f,g),e.lineTo(f,v),e.lineTo(f,y))};for(o&&(m=n[x(0)],e.moveTo(m.x,m.y)),h=0;h<=s;++h){if(m=n[x(h)],m.skip)continue;const b=m.x,M=m.y,w=b|0;w===p?(M<v?v=M:M>g&&(g=M),f=(d*f+b)/++d):(C(),e.lineTo(b,M),p=w,d=0,v=g=M),y=M}C()}function Ho(e){const t=e.options,a=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!a?bj:xj}function Cj(e){return e.stepped?bU:e.tension||e.cubicInterpolationMode==="monotone"?CU:$0}function Mj(e,t,a,r){let n=t._path;n||(n=t._path=new Path2D,t.path(n,a,r)&&n.closePath()),ox(e,t.options),e.stroke(n)}function zj(e,t,a,r){const{segments:n,options:i}=t,c=Ho(t);for(const s of n)ox(e,i,s.style),e.beginPath(),c(e,t,s,{start:a,end:a+r-1})&&e.closePath(),e.stroke()}const wj=typeof Path2D=="function";function _j(e,t,a,r){wj&&!t.options.segment?Mj(e,t,a,r):zj(e,t,a,r)}class r0 extends S3{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,a){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const n=r.spanGaps?this._loop:this._fullLoop;dU(this._points,r,t,n,a),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=SU(this,this.options.segment))}first(){const t=this.segments,a=this.points;return t.length&&a[t[0].start]}last(){const t=this.segments,a=this.points,r=t.length;return r&&a[t[r-1].end]}interpolate(t,a){const r=this.options,n=t[a],i=this.points,c=Xy(this,{property:a,start:n,end:n});if(!c.length)return;const s=[],o=Cj(r);let l,f;for(l=0,f=c.length;l<f;++l){const{start:d,end:h}=c[l],m=i[d],p=i[h];if(m===p){s.push(m);continue}const v=Math.abs((n-m[a])/(p[a]-m[a])),g=o(m,p,v,r.stepped);g[a]=t[a],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,a,r){return Ho(this)(t,this,a,r)}path(t,a,r){const n=this.segments,i=Ho(this);let c=this._loop;a=a||0,r=r||this.points.length-a;for(const s of n)c&=i(t,this,s,{start:a,end:a+r-1});return!!c}draw(t,a,r,n){const i=this.options||{};(this.points||[]).length&&i.borderWidth&&(t.save(),_j(t,this,r,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}z1(r0,"id","line"),z1(r0,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),z1(r0,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),z1(r0,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function ch(e,t,a,r){const n=e.options,{[a]:i}=e.getProps([a],r);return Math.abs(t-i)<n.radius+n.hitRadius}class li extends S3{constructor(a){super();z1(this,"parsed");z1(this,"skip");z1(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,a&&Object.assign(this,a)}inRange(a,r,n){const i=this.options,{x:c,y:s}=this.getProps(["x","y"],n);return Math.pow(a-c,2)+Math.pow(r-s,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(a,r){return ch(this,a,"x",r)}inYRange(a,r){return ch(this,a,"y",r)}getCenterPoint(a){const{x:r,y:n}=this.getProps(["x","y"],a);return{x:r,y:n}}size(a){a=a||this.options||{};let r=a.radius||0;r=Math.max(r,r&&a.hoverRadius||0);const n=r&&a.borderWidth||0;return(r+n)*2}draw(a,r){const n=this.options;this.skip||n.radius<.1||!M4(this,r,this.size(n)/2)||(a.strokeStyle=n.borderColor,a.lineWidth=n.borderWidth,a.fillStyle=n.backgroundColor,Mo(a,n,this.x,this.y))}getRange(){const a=this.options||{};return a.radius+a.hitRadius}}z1(li,"id","point"),z1(li,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),z1(li,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function fx(e,t){const{x:a,y:r,base:n,width:i,height:c}=e.getProps(["x","y","base","width","height"],t);let s,o,l,f,d;return e.horizontal?(d=c/2,s=Math.min(a,n),o=Math.max(a,n),l=r-d,f=r+d):(d=i/2,s=a-d,o=a+d,l=Math.min(r,n),f=Math.max(r,n)),{left:s,top:l,right:o,bottom:f}}function n0(e,t,a,r){return e?0:qe(t,a,r)}function Hj(e,t,a){const r=e.options.borderWidth,n=e.borderSkipped,i=Ry(r);return{t:n0(n.top,i.top,0,a),r:n0(n.right,i.right,0,t),b:n0(n.bottom,i.bottom,0,a),l:n0(n.left,i.left,0,t)}}function Sj(e,t,a){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),n=e.options.borderRadius,i=ta(n),c=Math.min(t,a),s=e.borderSkipped,o=r||x2(n);return{topLeft:n0(!o||s.top||s.left,i.topLeft,0,c),topRight:n0(!o||s.top||s.right,i.topRight,0,c),bottomLeft:n0(!o||s.bottom||s.left,i.bottomLeft,0,c),bottomRight:n0(!o||s.bottom||s.right,i.bottomRight,0,c)}}function Lj(e){const t=fx(e),a=t.right-t.left,r=t.bottom-t.top,n=Hj(e,a/2,r/2),i=Sj(e,a/2,r/2);return{outer:{x:t.left,y:t.top,w:a,h:r,radius:i},inner:{x:t.left+n.l,y:t.top+n.t,w:a-n.l-n.r,h:r-n.t-n.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,i.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(n.b,n.r))}}}}function is(e,t,a,r){const n=t===null,i=a===null,s=e&&!(n&&i)&&fx(e,r);return s&&(n||b4(t,s.left,s.right))&&(i||b4(a,s.top,s.bottom))}function kj(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Aj(e,t){e.rect(t.x,t.y,t.w,t.h)}function ss(e,t,a={}){const r=e.x!==a.x?-t:0,n=e.y!==a.y?-t:0,i=(e.x+e.w!==a.x+a.w?t:0)-r,c=(e.y+e.h!==a.y+a.h?t:0)-n;return{x:e.x+r,y:e.y+n,w:e.w+i,h:e.h+c,radius:e.radius}}class fi extends S3{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:a,options:{borderColor:r,backgroundColor:n}}=this,{inner:i,outer:c}=Lj(this),s=kj(c.radius)?tn:Aj;t.save(),(c.w!==i.w||c.h!==i.h)&&(t.beginPath(),s(t,ss(c,a,i)),t.clip(),s(t,ss(i,-a,c)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,ss(i,a)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,a,r){return is(this,t,a,r)}inXRange(t,a){return is(this,t,null,a)}inYRange(t,a){return is(this,null,t,a)}getCenterPoint(t){const{x:a,y:r,base:n,horizontal:i}=this.getProps(["x","y","base","horizontal"],t);return{x:i?(a+n)/2:a,y:i?r:(r+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}z1(fi,"id","bar"),z1(fi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),z1(fi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Vj=Object.freeze({__proto__:null,ArcElement:nr,BarElement:fi,LineElement:r0,PointElement:li});const So=["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)"],ih=So.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function ux(e){return So[e%So.length]}function dx(e){return ih[e%ih.length]}function Tj(e,t){return e.borderColor=ux(t),e.backgroundColor=dx(t),++t}function Ej(e,t){return e.backgroundColor=e.data.map(()=>ux(t++)),t}function Nj(e,t){return e.backgroundColor=e.data.map(()=>dx(t++)),t}function Oj(e){let t=0;return(a,r)=>{const n=e.getDatasetMeta(r).controller;n instanceof K0?t=Ej(a,t):n instanceof zr?t=Nj(a,t):n&&(t=Tj(a,t))}}function sh(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function Pj(e){return e&&(e.borderColor||e.backgroundColor)}function Dj(){return se.borderColor!=="rgba(0,0,0,0.1)"||se.backgroundColor!=="rgba(0,0,0,0.1)"}var Rj={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,a){if(!a.enabled)return;const{data:{datasets:r},options:n}=e.config,{elements:i}=n,c=sh(r)||Pj(n)||i&&sh(i)||Dj();if(!a.forceOverride&&c)return;const s=Oj(e);r.forEach(s)}};function Fj(e,t,a,r,n){const i=n.samples||r;if(i>=a)return e.slice(t,t+a);const c=[],s=(a-2)/(i-2);let o=0;const l=t+a-1;let f=t,d,h,m,p,v;for(c[o++]=e[f],d=0;d<i-2;d++){let g=0,y=0,x;const C=Math.floor((d+1)*s)+1+t,b=Math.min(Math.floor((d+2)*s)+1,a)+t,M=b-C;for(x=C;x<b;x++)g+=e[x].x,y+=e[x].y;g/=M,y/=M;const w=Math.floor(d*s)+1+t,z=Math.min(Math.floor((d+1)*s)+1,a)+t,{x:_,y:S}=e[f];for(m=p=-1,x=w;x<z;x++)p=.5*Math.abs((_-g)*(e[x].y-S)-(_-e[x].x)*(y-S)),p>m&&(m=p,h=e[x],v=x);c[o++]=h,f=v}return c[o++]=e[l],c}function Bj(e,t,a,r){let n=0,i=0,c,s,o,l,f,d,h,m,p,v;const g=[],y=t+a-1,x=e[t].x,b=e[y].x-x;for(c=t;c<t+a;++c){s=e[c],o=(s.x-x)/b*r,l=s.y;const M=o|0;if(M===f)l<p?(p=l,d=c):l>v&&(v=l,h=c),n=(i*n+s.x)/++i;else{const w=c-1;if(!L2(d)&&!L2(h)){const z=Math.min(d,h),_=Math.max(d,h);z!==m&&z!==w&&g.push({...e[z],x:n}),_!==m&&_!==w&&g.push({...e[_],x:n})}c>0&&w!==m&&g.push(e[w]),g.push(s),f=M,i=0,p=v=l,d=h=m=c}}return g}function hx(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function oh(e){e.data.datasets.forEach(t=>{hx(t)})}function Ij(e,t){const a=t.length;let r=0,n;const{iScale:i}=e,{min:c,max:s,minDefined:o,maxDefined:l}=i.getUserBounds();return o&&(r=qe(C4(t,i.axis,c).lo,0,a-1)),l?n=qe(C4(t,i.axis,s).hi+1,r,a)-r:n=a-r,{start:r,count:n}}var $j={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,a)=>{if(!a.enabled){oh(e);return}const r=e.width;e.data.datasets.forEach((n,i)=>{const{_data:c,indexAxis:s}=n,o=e.getDatasetMeta(i),l=c||n.data;if(ar([s,e.options.indexAxis])==="y"||!o.controller.supportsDecimation)return;const f=e.scales[o.xAxisID];if(f.type!=="linear"&&f.type!=="time"||e.options.parsing)return;let{start:d,count:h}=Ij(o,l);const m=a.threshold||4*r;if(h<=m){hx(n);return}L2(c)&&(n._data=l,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(v){this._data=v}}));let p;switch(a.algorithm){case"lttb":p=Fj(l,d,h,r,a);break;case"min-max":p=Bj(l,d,h,r);break;default:throw new Error(`Unsupported decimation algorithm '${a.algorithm}'`)}n._decimated=p})},destroy(e){oh(e)}};function Uj(e,t,a){const r=e.segments,n=e.points,i=t.points,c=[];for(const s of r){let{start:o,end:l}=s;l=wl(o,l,n);const f=Lo(a,n[o],n[l],s.loop);if(!t.segments){c.push({source:s,target:f,start:n[o],end:n[l]});continue}const d=Xy(t,f);for(const h of d){const m=Lo(a,i[h.start],i[h.end],h.loop),p=Yy(s,n,m);for(const v of p)c.push({source:v,target:h,start:{[a]:lh(f,m,"start",Math.max)},end:{[a]:lh(f,m,"end",Math.min)}})}}return c}function Lo(e,t,a,r){if(r)return;let n=t[e],i=a[e];return e==="angle"&&(n=At(n),i=At(i)),{property:e,start:n,end:i}}function qj(e,t){const{x:a=null,y:r=null}=e||{},n=t.points,i=[];return t.segments.forEach(({start:c,end:s})=>{s=wl(c,s,n);const o=n[c],l=n[s];r!==null?(i.push({x:o.x,y:r}),i.push({x:l.x,y:r})):a!==null&&(i.push({x:a,y:o.y}),i.push({x:a,y:l.y}))}),i}function wl(e,t,a){for(;t>e;t--){const r=a[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function lh(e,t,a,r){return e&&t?r(e[a],t[a]):e?e[a]:t?t[a]:0}function mx(e,t){let a=[],r=!1;return Z2(e)?(r=!0,a=e):a=qj(e,t),a.length?new r0({points:a,options:{tension:0},_loop:r,_fullLoop:r}):null}function fh(e){return e&&e.fill!==!1}function jj(e,t,a){let n=e[t].fill;const i=[t];let c;if(!a)return n;for(;n!==!1&&i.indexOf(n)===-1;){if(!ve(n))return n;if(c=e[n],!c)return!1;if(c.visible)return n;i.push(n),n=c.fill}return!1}function Wj(e,t,a){const r=Kj(e);if(x2(r))return isNaN(r.value)?!1:r;let n=parseFloat(r);return ve(n)&&Math.floor(n)===n?Gj(r[0],t,n,a):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Gj(e,t,a,r){return(e==="-"||e==="+")&&(a=t+a),a===t||a<0||a>=r?!1:a}function Yj(e,t){let a=null;return e==="start"?a=t.bottom:e==="end"?a=t.top:x2(e)?a=t.getPixelForValue(e.value):t.getBasePixel&&(a=t.getBasePixel()),a}function Xj(e,t,a){let r;return e==="start"?r=a:e==="end"?r=t.options.reverse?t.min:t.max:x2(e)?r=e.value:r=t.getBaseValue(),r}function Kj(e){const t=e.options,a=t.fill;let r=l2(a&&a.target,a);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function Zj(e){const{scale:t,index:a,line:r}=e,n=[],i=r.segments,c=r.points,s=Qj(t,a);s.push(mx({x:null,y:t.bottom},r));for(let o=0;o<i.length;o++){const l=i[o];for(let f=l.start;f<=l.end;f++)Jj(n,c[f],s)}return new r0({points:n,options:{}})}function Qj(e,t){const a=[],r=e.getMatchingVisibleMetas("line");for(let n=0;n<r.length;n++){const i=r[n];if(i.index===t)break;i.hidden||a.unshift(i.dataset)}return a}function Jj(e,t,a){const r=[];for(let n=0;n<a.length;n++){const i=a[n],{first:c,last:s,point:o}=eW(i,t,"x");if(!(!o||c&&s)){if(c)r.unshift(o);else if(e.push(o),!s)break}}e.push(...r)}function eW(e,t,a){const r=e.interpolate(t,a);if(!r)return{};const n=r[a],i=e.segments,c=e.points;let s=!1,o=!1;for(let l=0;l<i.length;l++){const f=i[l],d=c[f.start][a],h=c[f.end][a];if(b4(n,d,h)){s=n===d,o=n===h;break}}return{first:s,last:o,point:r}}class px{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,a,r){const{x:n,y:i,radius:c}=this;return a=a||{start:0,end:J2},t.arc(n,i,c,a.end,a.start,!0),!r.bounds}interpolate(t){const{x:a,y:r,radius:n}=this,i=t.angle;return{x:a+Math.cos(i)*n,y:r+Math.sin(i)*n,angle:i}}}function tW(e){const{chart:t,fill:a,line:r}=e;if(ve(a))return aW(t,a);if(a==="stack")return Zj(e);if(a==="shape")return!0;const n=rW(e);return n instanceof px?n:mx(n,r)}function aW(e,t){const a=e.getDatasetMeta(t);return a&&e.isDatasetVisible(t)?a.dataset:null}function rW(e){return(e.scale||{}).getPointPositionForValue?cW(e):nW(e)}function nW(e){const{scale:t={},fill:a}=e,r=Yj(a,t);if(ve(r)){const n=t.isHorizontal();return{x:n?r:null,y:n?null:r}}return null}function cW(e){const{scale:t,fill:a}=e,r=t.options,n=t.getLabels().length,i=r.reverse?t.max:t.min,c=Xj(a,t,i),s=[];if(r.grid.circular){const o=t.getPointPositionForValue(0,i);return new px({x:o.x,y:o.y,radius:t.getDistanceFromCenterForValue(c)})}for(let o=0;o<n;++o)s.push(t.getPointPositionForValue(o,c));return s}function os(e,t,a){const r=tW(t),{line:n,scale:i,axis:c}=t,s=n.options,o=s.fill,l=s.backgroundColor,{above:f=l,below:d=l}=o||{};r&&n.points.length&&(D8(e,a),iW(e,{line:n,target:r,above:f,below:d,area:a,scale:i,axis:c}),R8(e))}function iW(e,t){const{line:a,target:r,above:n,below:i,area:c,scale:s}=t,o=a._loop?"angle":t.axis;e.save(),o==="x"&&i!==n&&(uh(e,r,c.top),dh(e,{line:a,target:r,color:n,scale:s,property:o}),e.restore(),e.save(),uh(e,r,c.bottom)),dh(e,{line:a,target:r,color:i,scale:s,property:o}),e.restore()}function uh(e,t,a){const{segments:r,points:n}=t;let i=!0,c=!1;e.beginPath();for(const s of r){const{start:o,end:l}=s,f=n[o],d=n[wl(o,l,n)];i?(e.moveTo(f.x,f.y),i=!1):(e.lineTo(f.x,a),e.lineTo(f.x,f.y)),c=!!t.pathSegment(e,s,{move:c}),c?e.closePath():e.lineTo(d.x,a)}e.lineTo(t.first().x,a),e.closePath(),e.clip()}function dh(e,t){const{line:a,target:r,property:n,color:i,scale:c}=t,s=Uj(a,r,n);for(const{source:o,target:l,start:f,end:d}of s){const{style:{backgroundColor:h=i}={}}=o,m=r!==!0;e.save(),e.fillStyle=h,sW(e,c,m&&Lo(n,f,d)),e.beginPath();const p=!!a.pathSegment(e,o);let v;if(m){p?e.closePath():hh(e,r,d,n);const g=!!r.pathSegment(e,l,{move:p,reverse:!0});v=p&&g,v||hh(e,r,f,n)}e.closePath(),e.fill(v?"evenodd":"nonzero"),e.restore()}}function sW(e,t,a){const{top:r,bottom:n}=t.chart.chartArea,{property:i,start:c,end:s}=a||{};i==="x"&&(e.beginPath(),e.rect(c,r,s-c,n-r),e.clip())}function hh(e,t,a,r){const n=t.interpolate(a,r);n&&e.lineTo(n.x,n.y)}var oW={id:"filler",afterDatasetsUpdate(e,t,a){const r=(e.data.datasets||[]).length,n=[];let i,c,s,o;for(c=0;c<r;++c)i=e.getDatasetMeta(c),s=i.dataset,o=null,s&&s.options&&s instanceof r0&&(o={visible:e.isDatasetVisible(c),index:c,fill:Wj(s,c,r),chart:e,axis:i.controller.options.indexAxis,scale:i.vScale,line:s}),i.$filler=o,n.push(o);for(c=0;c<r;++c)o=n[c],!(!o||o.fill===!1)&&(o.fill=jj(n,c,a.propagate))},beforeDraw(e,t,a){const r=a.drawTime==="beforeDraw",n=e.getSortedVisibleDatasetMetas(),i=e.chartArea;for(let c=n.length-1;c>=0;--c){const s=n[c].$filler;s&&(s.line.updateControlPoints(i,s.axis),r&&s.fill&&os(e.ctx,s,i))}},beforeDatasetsDraw(e,t,a){if(a.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let n=r.length-1;n>=0;--n){const i=r[n].$filler;fh(i)&&os(e.ctx,i,e.chartArea)}},beforeDatasetDraw(e,t,a){const r=t.meta.$filler;!fh(r)||a.drawTime!=="beforeDatasetDraw"||os(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const mh=(e,t)=>{let{boxHeight:a=t,boxWidth:r=t}=e;return e.usePointStyle&&(a=Math.min(a,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:a,itemHeight:Math.max(t,a)}},lW=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class ph extends S3{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,a,r){this.maxWidth=t,this.maxHeight=a,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let a=$2(t.generateLabels,[this.chart],this)||[];t.filter&&(a=a.filter(r=>t.filter(r,this.chart.data))),t.sort&&(a=a.sort((r,n)=>t.sort(r,n,this.chart.data))),this.options.reverse&&a.reverse(),this.legendItems=a}fit(){const{options:t,ctx:a}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,n=Pe(r.font),i=n.size,c=this._computeTitleHeight(),{boxWidth:s,itemHeight:o}=mh(r,i);let l,f;a.font=n.string,this.isHorizontal()?(l=this.maxWidth,f=this._fitRows(c,i,s,o)+10):(f=this.maxHeight,l=this._fitCols(c,n,s,o)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,a,r,n){const{ctx:i,maxWidth:c,options:{labels:{padding:s}}}=this,o=this.legendHitBoxes=[],l=this.lineWidths=[0],f=n+s;let d=t;i.textAlign="left",i.textBaseline="middle";let h=-1,m=-f;return this.legendItems.forEach((p,v)=>{const g=r+a/2+i.measureText(p.text).width;(v===0||l[l.length-1]+g+2*s>c)&&(d+=f,l[l.length-(v>0?0:1)]=0,m+=f,h++),o[v]={left:0,top:m,row:h,width:g,height:n},l[l.length-1]+=g+s}),d}_fitCols(t,a,r,n){const{ctx:i,maxHeight:c,options:{labels:{padding:s}}}=this,o=this.legendHitBoxes=[],l=this.columnSizes=[],f=c-t;let d=s,h=0,m=0,p=0,v=0;return this.legendItems.forEach((g,y)=>{const{itemWidth:x,itemHeight:C}=fW(r,a,i,g,n);y>0&&m+C+2*s>f&&(d+=h+s,l.push({width:h,height:m}),p+=h+s,v++,h=m=0),o[y]={left:p,top:m,col:v,width:x,height:C},h=Math.max(h,x),m+=C+s}),d+=h,l.push({width:h,height:m}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:a,options:{align:r,labels:{padding:n},rtl:i}}=this,c=a6(i,this.left,this.width);if(this.isHorizontal()){let s=0,o=tt(r,this.left+n,this.right-this.lineWidths[s]);for(const l of a)s!==l.row&&(s=l.row,o=tt(r,this.left+n,this.right-this.lineWidths[s])),l.top+=this.top+t+n,l.left=c.leftForLtr(c.x(o),l.width),o+=l.width+n}else{let s=0,o=tt(r,this.top+t+n,this.bottom-this.columnSizes[s].height);for(const l of a)l.col!==s&&(s=l.col,o=tt(r,this.top+t+n,this.bottom-this.columnSizes[s].height)),l.top=o,l.left+=this.left+n,l.left=c.leftForLtr(c.x(l.left),l.width),o+=l.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;D8(t,this),this._draw(),R8(t)}}_draw(){const{options:t,columnSizes:a,lineWidths:r,ctx:n}=this,{align:i,labels:c}=t,s=se.color,o=a6(t.rtl,this.left,this.width),l=Pe(c.font),{padding:f}=c,d=l.size,h=d/2;let m;this.drawTitle(),n.textAlign=o.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:p,boxHeight:v,itemHeight:g}=mh(c,d),y=function(w,z,_){if(isNaN(p)||p<=0||isNaN(v)||v<0)return;n.save();const S=l2(_.lineWidth,1);if(n.fillStyle=l2(_.fillStyle,s),n.lineCap=l2(_.lineCap,"butt"),n.lineDashOffset=l2(_.lineDashOffset,0),n.lineJoin=l2(_.lineJoin,"miter"),n.lineWidth=S,n.strokeStyle=l2(_.strokeStyle,s),n.setLineDash(l2(_.lineDash,[])),c.usePointStyle){const k={radius:v*Math.SQRT2/2,pointStyle:_.pointStyle,rotation:_.rotation,borderWidth:S},H=o.xPlus(w,p/2),L=z+h;Dy(n,k,H,L,c.pointStyleWidth&&p)}else{const k=z+Math.max((d-v)/2,0),H=o.leftForLtr(w,p),L=ta(_.borderRadius);n.beginPath(),Object.values(L).some(A=>A!==0)?tn(n,{x:H,y:k,w:p,h:v,radius:L}):n.rect(H,k,p,v),n.fill(),S!==0&&n.stroke()}n.restore()},x=function(w,z,_){da(n,_.text,w,z+g/2,l,{strikethrough:_.hidden,textAlign:o.textAlign(_.textAlign)})},C=this.isHorizontal(),b=this._computeTitleHeight();C?m={x:tt(i,this.left+f,this.right-r[0]),y:this.top+f+b,line:0}:m={x:this.left+f,y:tt(i,this.top+b+f,this.bottom-a[0].height),line:0},jy(this.ctx,t.textDirection);const M=g+f;this.legendItems.forEach((w,z)=>{n.strokeStyle=w.fontColor,n.fillStyle=w.fontColor;const _=n.measureText(w.text).width,S=o.textAlign(w.textAlign||(w.textAlign=c.textAlign)),k=p+h+_;let H=m.x,L=m.y;o.setWidth(this.width),C?z>0&&H+k+f>this.right&&(L=m.y+=M,m.line++,H=m.x=tt(i,this.left+f,this.right-r[m.line])):z>0&&L+M>this.bottom&&(H=m.x=H+a[m.line].width+f,m.line++,L=m.y=tt(i,this.top+b+f,this.bottom-a[m.line].height));const A=o.x(H);if(y(A,L,w),H=A$(S,H+p+h,C?H+k:this.right,t.rtl),x(o.x(H),L,w),C)m.x+=k+f;else if(typeof w.text!="string"){const N=l.lineHeight;m.y+=vx(w,N)+f}else m.y+=M}),Wy(this.ctx,t.textDirection)}drawTitle(){const t=this.options,a=t.title,r=Pe(a.font),n=ft(a.padding);if(!a.display)return;const i=a6(t.rtl,this.left,this.width),c=this.ctx,s=a.position,o=r.size/2,l=n.top+o;let f,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),f=this.top+l,d=tt(t.align,d,this.right-h);else{const p=this.columnSizes.reduce((v,g)=>Math.max(v,g.height),0);f=l+tt(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const m=tt(s,d,d+h);c.textAlign=i.textAlign(pl(s)),c.textBaseline="middle",c.strokeStyle=a.color,c.fillStyle=a.color,c.font=r.string,da(c,a.text,m,f,r)}_computeTitleHeight(){const t=this.options.title,a=Pe(t.font),r=ft(t.padding);return t.display?a.lineHeight+r.height:0}_getLegendItemAt(t,a){let r,n,i;if(b4(t,this.left,this.right)&&b4(a,this.top,this.bottom)){for(i=this.legendHitBoxes,r=0;r<i.length;++r)if(n=i[r],b4(t,n.left,n.left+n.width)&&b4(a,n.top,n.top+n.height))return this.legendItems[r]}return null}handleEvent(t){const a=this.options;if(!hW(t.type,a))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,i=lW(n,r);n&&!i&&$2(a.onLeave,[t,n,this],this),this._hoveredItem=r,r&&!i&&$2(a.onHover,[t,r,this],this)}else r&&$2(a.onClick,[t,r,this],this)}}function fW(e,t,a,r,n){const i=uW(r,e,t,a),c=dW(n,r,t.lineHeight);return{itemWidth:i,itemHeight:c}}function uW(e,t,a,r){let n=e.text;return n&&typeof n!="string"&&(n=n.reduce((i,c)=>i.length>c.length?i:c)),t+a.size/2+r.measureText(n).width}function dW(e,t,a){let r=e;return typeof t.text!="string"&&(r=vx(t,a)),r}function vx(e,t){const a=e.text?e.text.length:0;return t*a}function hW(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var mW={id:"legend",_element:ph,start(e,t,a){const r=e.legend=new ph({ctx:e.ctx,options:a,chart:e});it.configure(e,r,a),it.addBox(e,r)},stop(e){it.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,a){const r=e.legend;it.configure(e,r,a),r.options=a},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,a){const r=t.datasetIndex,n=a.chart;n.isDatasetVisible(r)?(n.hide(r),t.hidden=!0):(n.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:a,pointStyle:r,textAlign:n,color:i,useBorderRadius:c,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(o=>{const l=o.controller.getStyle(a?0:void 0),f=ft(l.borderWidth);return{text:t[o.index].label,fillStyle:l.backgroundColor,fontColor:i,hidden:!o.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:l.borderColor,pointStyle:r||l.pointStyle,rotation:l.rotation,textAlign:n||l.textAlign,borderRadius:c&&(s||l.borderRadius),datasetIndex:o.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class _l extends S3{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,a){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=a;const n=Z2(r.text)?r.text.length:1;this._padding=ft(r.padding);const i=n*Pe(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:a,left:r,bottom:n,right:i,options:c}=this,s=c.align;let o=0,l,f,d;return this.isHorizontal()?(f=tt(s,r,i),d=a+t,l=i-r):(c.position==="left"?(f=r+t,d=tt(s,n,a),o=ee*-.5):(f=i-t,d=tt(s,a,n),o=ee*.5),l=n-a),{titleX:f,titleY:d,maxWidth:l,rotation:o}}draw(){const t=this.ctx,a=this.options;if(!a.display)return;const r=Pe(a.font),i=r.lineHeight/2+this._padding.top,{titleX:c,titleY:s,maxWidth:o,rotation:l}=this._drawArgs(i);da(t,a.text,0,0,r,{color:a.color,maxWidth:o,rotation:l,textAlign:pl(a.align),textBaseline:"middle",translation:[c,s]})}}function pW(e,t){const a=new _l({ctx:e.ctx,options:t,chart:e});it.configure(e,a,t),it.addBox(e,a),e.titleBlock=a}var vW={id:"title",_element:_l,start(e,t,a){pW(e,a)},stop(e){const t=e.titleBlock;it.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,a){const r=e.titleBlock;it.configure(e,r,a),r.options=a},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Vc=new WeakMap;var gW={id:"subtitle",start(e,t,a){const r=new _l({ctx:e.ctx,options:a,chart:e});it.configure(e,r,a),it.addBox(e,r),Vc.set(e,r)},stop(e){it.removeBox(e,Vc.get(e)),Vc.delete(e)},beforeUpdate(e,t,a){const r=Vc.get(e);it.configure(e,r,a),r.options=a},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const cr={average(e){if(!e.length)return!1;let t,a,r=new Set,n=0,i=0;for(t=0,a=e.length;t<a;++t){const s=e[t].element;if(s&&s.hasValue()){const o=s.tooltipPosition();r.add(o.x),n+=o.y,++i}}return i===0||r.size===0?!1:{x:[...r].reduce((s,o)=>s+o)/r.size,y:n/i}},nearest(e,t){if(!e.length)return!1;let a=t.x,r=t.y,n=Number.POSITIVE_INFINITY,i,c,s;for(i=0,c=e.length;i<c;++i){const o=e[i].element;if(o&&o.hasValue()){const l=o.getCenterPoint(),f=bo(t,l);f<n&&(n=f,s=o)}}if(s){const o=s.tooltipPosition();a=o.x,r=o.y}return{x:a,y:r}}};function D3(e,t){return t&&(Z2(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function h4(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
852
852
  `)>-1?e.split(`
853
- `):e}function yW(e,t){const{element:a,datasetIndex:r,index:n}=t,i=e.getDatasetMeta(r).controller,{label:c,value:s}=i.getLabelAndValue(n);return{chart:e,label:c,parsed:i.getParsed(n),raw:e.data.datasets[r].data[n],formattedValue:s,dataset:i.getDataset(),dataIndex:n,datasetIndex:r,element:a}}function vh(e,t){const a=e.chart.ctx,{body:r,footer:n,title:i}=e,{boxWidth:c,boxHeight:s}=t,o=Pe(t.bodyFont),l=Pe(t.titleFont),f=Pe(t.footerFont),d=i.length,h=n.length,m=r.length,p=ft(t.padding);let v=p.height,g=0,y=r.reduce((b,M)=>b+M.before.length+M.lines.length+M.after.length,0);if(y+=e.beforeBody.length+e.afterBody.length,d&&(v+=d*l.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),y){const b=t.displayColors?Math.max(s,o.lineHeight):o.lineHeight;v+=m*b+(y-m)*o.lineHeight+(y-1)*t.bodySpacing}h&&(v+=t.footerMarginTop+h*f.lineHeight+(h-1)*t.footerSpacing);let x=0;const C=function(b){g=Math.max(g,a.measureText(b).width+x)};return a.save(),a.font=l.string,R2(e.title,C),a.font=o.string,R2(e.beforeBody.concat(e.afterBody),C),x=t.displayColors?c+2+t.boxPadding:0,R2(r,b=>{R2(b.before,C),R2(b.lines,C),R2(b.after,C)}),x=0,a.font=f.string,R2(e.footer,C),a.restore(),g+=p.width,{width:g,height:v}}function xW(e,t){const{y:a,height:r}=t;return a<r/2?"top":a>e.height-r/2?"bottom":"center"}function bW(e,t,a,r){const{x:n,width:i}=r,c=a.caretSize+a.caretPadding;if(e==="left"&&n+i+c>t.width||e==="right"&&n-i-c<0)return!0}function CW(e,t,a,r){const{x:n,width:i}=a,{width:c,chartArea:{left:s,right:o}}=e;let l="center";return r==="center"?l=n<=(s+o)/2?"left":"right":n<=i/2?l="left":n>=c-i/2&&(l="right"),bW(l,e,t,a)&&(l="center"),l}function gh(e,t,a){const r=a.yAlign||t.yAlign||xW(e,a);return{xAlign:a.xAlign||t.xAlign||CW(e,t,a,r),yAlign:r}}function MW(e,t){let{x:a,width:r}=e;return t==="right"?a-=r:t==="center"&&(a-=r/2),a}function zW(e,t,a){let{y:r,height:n}=e;return t==="top"?r+=a:t==="bottom"?r-=n+a:r-=n/2,r}function yh(e,t,a,r){const{caretSize:n,caretPadding:i,cornerRadius:c}=e,{xAlign:s,yAlign:o}=a,l=n+i,{topLeft:f,topRight:d,bottomLeft:h,bottomRight:m}=ta(c);let p=MW(t,s);const v=zW(t,o,l);return o==="center"?s==="left"?p+=l:s==="right"&&(p-=l):s==="left"?p-=Math.max(f,h)+n:s==="right"&&(p+=Math.max(d,m)+n),{x:qe(p,0,r.width-t.width),y:qe(v,0,r.height-t.height)}}function Tc(e,t,a){const r=ft(a.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function xh(e){return D3([],h4(e))}function wW(e,t,a){return S0(e,{tooltip:t,tooltipItems:a,type:"tooltip"})}function bh(e,t){const a=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return a?e.override(a):e}const gx={beforeTitle:u4,title(e){if(e.length>0){const t=e[0],a=t.chart.data.labels,r=a?a.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return a[t.dataIndex]}return""},afterTitle:u4,beforeBody:u4,beforeLabel:u4,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const a=e.formattedValue;return L2(a)||(t+=a),t},labelColor(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:a.borderColor,backgroundColor:a.backgroundColor,borderWidth:a.borderWidth,borderDash:a.borderDash,borderDashOffset:a.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:a.pointStyle,rotation:a.rotation}},afterLabel:u4,afterBody:u4,beforeFooter:u4,footer:u4,afterFooter:u4};function zt(e,t,a,r){const n=e[t].call(a,r);return typeof n>"u"?gx[t].call(a,r):n}class ko extends S3{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const a=this.chart,r=this.options.setContext(this.getContext()),n=r.enabled&&a.options.animation&&r.animations,i=new Ky(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=wW(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,a){const{callbacks:r}=a,n=zt(r,"beforeTitle",this,t),i=zt(r,"title",this,t),c=zt(r,"afterTitle",this,t);let s=[];return s=D3(s,h4(n)),s=D3(s,h4(i)),s=D3(s,h4(c)),s}getBeforeBody(t,a){return xh(zt(a.callbacks,"beforeBody",this,t))}getBody(t,a){const{callbacks:r}=a,n=[];return R2(t,i=>{const c={before:[],lines:[],after:[]},s=bh(r,i);D3(c.before,h4(zt(s,"beforeLabel",this,i))),D3(c.lines,zt(s,"label",this,i)),D3(c.after,h4(zt(s,"afterLabel",this,i))),n.push(c)}),n}getAfterBody(t,a){return xh(zt(a.callbacks,"afterBody",this,t))}getFooter(t,a){const{callbacks:r}=a,n=zt(r,"beforeFooter",this,t),i=zt(r,"footer",this,t),c=zt(r,"afterFooter",this,t);let s=[];return s=D3(s,h4(n)),s=D3(s,h4(i)),s=D3(s,h4(c)),s}_createItems(t){const a=this._active,r=this.chart.data,n=[],i=[],c=[];let s=[],o,l;for(o=0,l=a.length;o<l;++o)s.push(yW(this.chart,a[o]));return t.filter&&(s=s.filter((f,d,h)=>t.filter(f,d,h,r))),t.itemSort&&(s=s.sort((f,d)=>t.itemSort(f,d,r))),R2(s,f=>{const d=bh(t.callbacks,f);n.push(zt(d,"labelColor",this,f)),i.push(zt(d,"labelPointStyle",this,f)),c.push(zt(d,"labelTextColor",this,f))}),this.labelColors=n,this.labelPointStyles=i,this.labelTextColors=c,this.dataPoints=s,s}update(t,a){const r=this.options.setContext(this.getContext()),n=this._active;let i,c=[];if(!n.length)this.opacity!==0&&(i={opacity:0});else{const s=cr[r.position].call(this,n,this._eventPosition);c=this._createItems(r),this.title=this.getTitle(c,r),this.beforeBody=this.getBeforeBody(c,r),this.body=this.getBody(c,r),this.afterBody=this.getAfterBody(c,r),this.footer=this.getFooter(c,r);const o=this._size=vh(this,r),l=Object.assign({},s,o),f=gh(this.chart,r,l),d=yh(r,l,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,i={opacity:1,x:d.x,y:d.y,width:o.width,height:o.height,caretX:s.x,caretY:s.y}}this._tooltipItems=c,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:a})}drawCaret(t,a,r,n){const i=this.getCaretPosition(t,r,n);a.lineTo(i.x1,i.y1),a.lineTo(i.x2,i.y2),a.lineTo(i.x3,i.y3)}getCaretPosition(t,a,r){const{xAlign:n,yAlign:i}=this,{caretSize:c,cornerRadius:s}=r,{topLeft:o,topRight:l,bottomLeft:f,bottomRight:d}=ta(s),{x:h,y:m}=t,{width:p,height:v}=a;let g,y,x,C,b,M;return i==="center"?(b=m+v/2,n==="left"?(g=h,y=g-c,C=b+c,M=b-c):(g=h+p,y=g+c,C=b-c,M=b+c),x=g):(n==="left"?y=h+Math.max(o,f)+c:n==="right"?y=h+p-Math.max(l,d)-c:y=this.caretX,i==="top"?(C=m,b=C-c,g=y-c,x=y+c):(C=m+v,b=C+c,g=y+c,x=y-c),M=C),{x1:g,x2:y,x3:x,y1:C,y2:b,y3:M}}drawTitle(t,a,r){const n=this.title,i=n.length;let c,s,o;if(i){const l=a6(r.rtl,this.x,this.width);for(t.x=Tc(this,r.titleAlign,r),a.textAlign=l.textAlign(r.titleAlign),a.textBaseline="middle",c=Pe(r.titleFont),s=r.titleSpacing,a.fillStyle=r.titleColor,a.font=c.string,o=0;o<i;++o)a.fillText(n[o],l.x(t.x),t.y+c.lineHeight/2),t.y+=c.lineHeight+s,o+1===i&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,a,r,n,i){const c=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:o,boxWidth:l}=i,f=Pe(i.bodyFont),d=Tc(this,"left",i),h=n.x(d),m=o<f.lineHeight?(f.lineHeight-o)/2:0,p=a.y+m;if(i.usePointStyle){const v={radius:Math.min(l,o)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=n.leftForLtr(h,l)+l/2,y=p+o/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,Mo(t,v,g,y),t.strokeStyle=c.borderColor,t.fillStyle=c.backgroundColor,Mo(t,v,g,y)}else{t.lineWidth=x2(c.borderWidth)?Math.max(...Object.values(c.borderWidth)):c.borderWidth||1,t.strokeStyle=c.borderColor,t.setLineDash(c.borderDash||[]),t.lineDashOffset=c.borderDashOffset||0;const v=n.leftForLtr(h,l),g=n.leftForLtr(n.xPlus(h,1),l-2),y=ta(c.borderRadius);Object.values(y).some(x=>x!==0)?(t.beginPath(),t.fillStyle=i.multiKeyBackground,tn(t,{x:v,y:p,w:l,h:o,radius:y}),t.fill(),t.stroke(),t.fillStyle=c.backgroundColor,t.beginPath(),tn(t,{x:g,y:p+1,w:l-2,h:o-2,radius:y}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(v,p,l,o),t.strokeRect(v,p,l,o),t.fillStyle=c.backgroundColor,t.fillRect(g,p+1,l-2,o-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,a,r){const{body:n}=this,{bodySpacing:i,bodyAlign:c,displayColors:s,boxHeight:o,boxWidth:l,boxPadding:f}=r,d=Pe(r.bodyFont);let h=d.lineHeight,m=0;const p=a6(r.rtl,this.x,this.width),v=function(_){a.fillText(_,p.x(t.x+m),t.y+h/2),t.y+=h+i},g=p.textAlign(c);let y,x,C,b,M,w,z;for(a.textAlign=c,a.textBaseline="middle",a.font=d.string,t.x=Tc(this,g,r),a.fillStyle=r.bodyColor,R2(this.beforeBody,v),m=s&&g!=="right"?c==="center"?l/2+f:l+2+f:0,b=0,w=n.length;b<w;++b){for(y=n[b],x=this.labelTextColors[b],a.fillStyle=x,R2(y.before,v),C=y.lines,s&&C.length&&(this._drawColorBox(a,t,b,p,r),h=Math.max(d.lineHeight,o)),M=0,z=C.length;M<z;++M)v(C[M]),h=d.lineHeight;R2(y.after,v)}m=0,h=d.lineHeight,R2(this.afterBody,v),t.y-=i}drawFooter(t,a,r){const n=this.footer,i=n.length;let c,s;if(i){const o=a6(r.rtl,this.x,this.width);for(t.x=Tc(this,r.footerAlign,r),t.y+=r.footerMarginTop,a.textAlign=o.textAlign(r.footerAlign),a.textBaseline="middle",c=Pe(r.footerFont),a.fillStyle=r.footerColor,a.font=c.string,s=0;s<i;++s)a.fillText(n[s],o.x(t.x),t.y+c.lineHeight/2),t.y+=c.lineHeight+r.footerSpacing}}drawBackground(t,a,r,n){const{xAlign:i,yAlign:c}=this,{x:s,y:o}=t,{width:l,height:f}=r,{topLeft:d,topRight:h,bottomLeft:m,bottomRight:p}=ta(n.cornerRadius);a.fillStyle=n.backgroundColor,a.strokeStyle=n.borderColor,a.lineWidth=n.borderWidth,a.beginPath(),a.moveTo(s+d,o),c==="top"&&this.drawCaret(t,a,r,n),a.lineTo(s+l-h,o),a.quadraticCurveTo(s+l,o,s+l,o+h),c==="center"&&i==="right"&&this.drawCaret(t,a,r,n),a.lineTo(s+l,o+f-p),a.quadraticCurveTo(s+l,o+f,s+l-p,o+f),c==="bottom"&&this.drawCaret(t,a,r,n),a.lineTo(s+m,o+f),a.quadraticCurveTo(s,o+f,s,o+f-m),c==="center"&&i==="left"&&this.drawCaret(t,a,r,n),a.lineTo(s,o+d),a.quadraticCurveTo(s,o,s+d,o),a.closePath(),a.fill(),n.borderWidth>0&&a.stroke()}_updateAnimationTarget(t){const a=this.chart,r=this.$animations,n=r&&r.x,i=r&&r.y;if(n||i){const c=cr[t.position].call(this,this._active,this._eventPosition);if(!c)return;const s=this._size=vh(this,t),o=Object.assign({},c,this._size),l=gh(a,t,o),f=yh(t,o,l,a);(n._to!==f.x||i._to!==f.y)&&(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=s.width,this.height=s.height,this.caretX=c.x,this.caretY=c.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){const a=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(a);const n={width:this.width,height:this.height},i={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const c=ft(a.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;a.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(i,t,n,a),jy(t,a.textDirection),i.y+=c.top,this.drawTitle(i,t,a),this.drawBody(i,t,a),this.drawFooter(i,t,a),Wy(t,a.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,a){const r=this._active,n=t.map(({datasetIndex:s,index:o})=>{const l=this.chart.getDatasetMeta(s);if(!l)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:l.data[o],index:o}}),i=!Pi(r,n),c=this._positionChanged(n,a);(i||c)&&(this._active=n,this._eventPosition=a,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,a,r=!0){if(a&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,i=this._active||[],c=this._getActiveElements(t,i,a,r),s=this._positionChanged(c,t),o=a||!Pi(c,i)||s;return o&&(this._active=c,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,a))),o}_getActiveElements(t,a,r,n){const i=this.options;if(t.type==="mouseout")return[];if(!n)return a.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const c=this.chart.getElementsAtEventForMode(t,i.mode,i,r);return i.reverse&&c.reverse(),c}_positionChanged(t,a){const{caretX:r,caretY:n,options:i}=this,c=cr[i.position].call(this,t,a);return c!==!1&&(r!==c.x||n!==c.y)}}z1(ko,"positioners",cr);var _W={id:"tooltip",_element:ko,positioners:cr,afterInit(e,t,a){a&&(e.tooltip=new ko({chart:e,options:a}))},beforeUpdate(e,t,a){e.tooltip&&e.tooltip.initialize(a)},reset(e,t,a){e.tooltip&&e.tooltip.initialize(a)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const a={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...a,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",a)}},afterEvent(e,t){if(e.tooltip){const a=t.replay;e.tooltip.handleEvent(t.event,a,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:gx},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},HW=Object.freeze({__proto__:null,Colors:Rj,Decimation:$j,Filler:oW,Legend:mW,SubTitle:gW,Title:vW,Tooltip:_W});const SW=(e,t,a,r)=>(typeof t=="string"?(a=e.push(t)-1,r.unshift({index:a,label:t})):isNaN(t)&&(a=null),a);function LW(e,t,a,r){const n=e.indexOf(t);if(n===-1)return SW(e,t,a,r);const i=e.lastIndexOf(t);return n!==i?a:n}const kW=(e,t)=>e===null?null:qe(Math.round(e),0,t);function Ch(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Ao extends Ca{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const a=this._addedLabels;if(a.length){const r=this.getLabels();for(const{index:n,label:i}of a)r[n]===i&&r.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,a){if(L2(t))return null;const r=this.getLabels();return a=isFinite(a)&&r[a]===t?a:LW(r,t,l2(a,t),this._addedLabels),kW(a,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let{min:r,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),a||(n=this.getLabels().length-1)),this.min=r,this.max=n}buildTicks(){const t=this.min,a=this.max,r=this.options.offset,n=[];let i=this.getLabels();i=t===0&&a===i.length-1?i:i.slice(t,a+1),this._valueRange=Math.max(i.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let c=t;c<=a;c++)n.push({value:c});return n}getLabelForValue(t){return Ch.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const a=this.ticks;return t<0||t>a.length-1?null:this.getPixelForValue(a[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}z1(Ao,"id","category"),z1(Ao,"defaults",{ticks:{callback:Ch}});function AW(e,t){const a=[],{bounds:n,step:i,min:c,max:s,precision:o,count:l,maxTicks:f,maxDigits:d,includeBounds:h}=e,m=i||1,p=f-1,{min:v,max:g}=t,y=!L2(c),x=!L2(s),C=!L2(l),b=(g-v)/(d+1);let M=vd((g-v)/p/m)*m,w,z,_,S;if(M<1e-14&&!y&&!x)return[{value:v},{value:g}];S=Math.ceil(g/M)-Math.floor(v/M),S>p&&(M=vd(S*M/p/m)*m),L2(o)||(w=Math.pow(10,o),M=Math.ceil(M*w)/w),n==="ticks"?(z=Math.floor(v/M)*M,_=Math.ceil(g/M)*M):(z=v,_=g),y&&x&&i&&z$((s-c)/i,M/1e3)?(S=Math.round(Math.min((s-c)/M,f)),M=(s-c)/S,z=c,_=s):C?(z=y?c:z,_=x?s:_,S=l-1,M=(_-z)/S):(S=(_-z)/M,br(S,Math.round(S),M/1e3)?S=Math.round(S):S=Math.ceil(S));const k=Math.max(gd(M),gd(z));w=Math.pow(10,L2(o)?k:o),z=Math.round(z*w)/w,_=Math.round(_*w)/w;let H=0;for(y&&(h&&z!==c?(a.push({value:c}),z<c&&H++,br(Math.round((z+H*M)*w)/w,c,Mh(c,b,e))&&H++):z<c&&H++);H<S;++H){const L=Math.round((z+H*M)*w)/w;if(x&&L>s)break;a.push({value:L})}return x&&h&&_!==s?a.length&&br(a[a.length-1].value,s,Mh(s,b,e))?a[a.length-1].value=s:a.push({value:s}):(!x||_===s)&&a.push({value:_}),a}function Mh(e,t,{horizontal:a,minRotation:r}){const n=v3(r),i=(a?Math.sin(n):Math.cos(n))||.001,c=.75*t*(""+e).length;return Math.min(t/i,c)}class Ui extends Ca{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,a){return L2(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:a,maxDefined:r}=this.getUserBounds();let{min:n,max:i}=this;const c=o=>n=a?n:o,s=o=>i=r?i:o;if(t){const o=Y3(n),l=Y3(i);o<0&&l<0?s(0):o>0&&l>0&&c(0)}if(n===i){let o=i===0?1:Math.abs(i*.05);s(i+o),t||c(n-o)}this.min=n,this.max=i}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:a,stepSize:r}=t,n;return r?(n=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),a=a||11),a&&(n=Math.min(a,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,a=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const n={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:a.precision,step:a.stepSize,count:a.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:a.minRotation||0,includeBounds:a.includeBounds!==!1},i=this._range||this,c=AW(n,i);return t.bounds==="ticks"&&Ly(c,this,"value"),t.reverse?(c.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),c}configure(){const t=this.ticks;let a=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const n=(r-a)/Math.max(t.length-1,1)/2;a-=n,r+=n}this._startValue=a,this._endValue=r,this._valueRange=r-a}getLabelForValue(t){return En(t,this.chart.options.locale,this.options.ticks.format)}}class Vo extends Ui{determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=ve(t)?t:0,this.max=ve(a)?a:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),a=t?this.width:this.height,r=v3(this.options.ticks.minRotation),n=(t?Math.sin(r):Math.cos(r))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(a/Math.min(40,i.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}z1(Vo,"id","linear"),z1(Vo,"defaults",{ticks:{callback:P8.formatters.numeric}});const rn=e=>Math.floor(a0(e)),R0=(e,t)=>Math.pow(10,rn(e)+t);function zh(e){return e/Math.pow(10,rn(e))===1}function wh(e,t,a){const r=Math.pow(10,a),n=Math.floor(e/r);return Math.ceil(t/r)-n}function VW(e,t){const a=t-e;let r=rn(a);for(;wh(e,t,r)>10;)r++;for(;wh(e,t,r)<10;)r--;return Math.min(r,rn(e))}function TW(e,{min:t,max:a}){t=kt(e.min,t);const r=[],n=rn(t);let i=VW(t,a),c=i<0?Math.pow(10,Math.abs(i)):1;const s=Math.pow(10,i),o=n>i?Math.pow(10,n):0,l=Math.round((t-o)*c)/c,f=Math.floor((t-o)/s/10)*s*10;let d=Math.floor((l-f)/Math.pow(10,i)),h=kt(e.min,Math.round((o+f+d*Math.pow(10,i))*c)/c);for(;h<a;)r.push({value:h,major:zh(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(i++,d=2,c=i>=0?1:c),h=Math.round((o+f+d*Math.pow(10,i))*c)/c;const m=kt(e.max,h);return r.push({value:m,major:zh(m),significand:d}),r}class To extends Ca{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,a){const r=Ui.prototype.parse.apply(this,[t,a]);if(r===0){this._zero=!0;return}return ve(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=ve(t)?Math.max(0,t):null,this.max=ve(a)?Math.max(0,a):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ve(this._userMin)&&(this.min=t===R0(this.min,0)?R0(this.min,-1):R0(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let r=this.min,n=this.max;const i=s=>r=t?r:s,c=s=>n=a?n:s;r===n&&(r<=0?(i(1),c(10)):(i(R0(r,-1)),c(R0(n,1)))),r<=0&&i(R0(n,-1)),n<=0&&c(R0(r,1)),this.min=r,this.max=n}buildTicks(){const t=this.options,a={min:this._userMin,max:this._userMax},r=TW(a,this);return t.bounds==="ticks"&&Ly(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":En(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=a0(t),this._valueRange=a0(this.max)-a0(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(a0(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const a=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+a*this._valueRange)}}z1(To,"id","logarithmic"),z1(To,"defaults",{ticks:{callback:P8.formatters.logarithmic,major:{enabled:!0}}});function Eo(e){const t=e.ticks;if(t.display&&e.display){const a=ft(t.backdropPadding);return l2(t.font&&t.font.size,se.font.size)+a.height}return 0}function EW(e,t,a){return a=Z2(a)?a:[a],{w:B$(e,t.string,a),h:a.length*t.lineHeight}}function _h(e,t,a,r,n){return e===r||e===n?{start:t-a/2,end:t+a/2}:e<r||e>n?{start:t-a,end:t}:{start:t,end:t+a}}function NW(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},a=Object.assign({},t),r=[],n=[],i=e._pointLabels.length,c=e.options.pointLabels,s=c.centerPointLabels?ee/i:0;for(let o=0;o<i;o++){const l=c.setContext(e.getPointLabelContext(o));n[o]=l.padding;const f=e.getPointPosition(o,e.drawingArea+n[o],s),d=Pe(l.font),h=EW(e.ctx,d,e._pointLabels[o]);r[o]=h;const m=At(e.getIndexAngle(o)+s),p=Math.round(hl(m)),v=_h(p,f.x,h.w,0,180),g=_h(p,f.y,h.h,90,270);OW(a,t,m,v,g)}e.setCenterPoint(t.l-a.l,a.r-t.r,t.t-a.t,a.b-t.b),e._pointLabelItems=RW(e,r,n)}function OW(e,t,a,r,n){const i=Math.abs(Math.sin(a)),c=Math.abs(Math.cos(a));let s=0,o=0;r.start<t.l?(s=(t.l-r.start)/i,e.l=Math.min(e.l,t.l-s)):r.end>t.r&&(s=(r.end-t.r)/i,e.r=Math.max(e.r,t.r+s)),n.start<t.t?(o=(t.t-n.start)/c,e.t=Math.min(e.t,t.t-o)):n.end>t.b&&(o=(n.end-t.b)/c,e.b=Math.max(e.b,t.b+o))}function PW(e,t,a){const r=e.drawingArea,{extra:n,additionalAngle:i,padding:c,size:s}=a,o=e.getPointPosition(t,r+n+c,i),l=Math.round(hl(At(o.angle+we))),f=IW(o.y,s.h,l),d=FW(l),h=BW(o.x,s.w,d);return{visible:!0,x:o.x,y:f,textAlign:d,left:h,top:f,right:h+s.w,bottom:f+s.h}}function DW(e,t){if(!t)return!0;const{left:a,top:r,right:n,bottom:i}=e;return!(M4({x:a,y:r},t)||M4({x:a,y:i},t)||M4({x:n,y:r},t)||M4({x:n,y:i},t))}function RW(e,t,a){const r=[],n=e._pointLabels.length,i=e.options,{centerPointLabels:c,display:s}=i.pointLabels,o={extra:Eo(i)/2,additionalAngle:c?ee/n:0};let l;for(let f=0;f<n;f++){o.padding=a[f],o.size=t[f];const d=PW(e,f,o);r.push(d),s==="auto"&&(d.visible=DW(d,l),d.visible&&(l=d))}return r}function FW(e){return e===0||e===180?"center":e<180?"left":"right"}function BW(e,t,a){return a==="right"?e-=t:a==="center"&&(e-=t/2),e}function IW(e,t,a){return a===90||a===270?e-=t/2:(a>270||a<90)&&(e-=t),e}function $W(e,t,a){const{left:r,top:n,right:i,bottom:c}=a,{backdropColor:s}=t;if(!L2(s)){const o=ta(t.borderRadius),l=ft(t.backdropPadding);e.fillStyle=s;const f=r-l.left,d=n-l.top,h=i-r+l.width,m=c-n+l.height;Object.values(o).some(p=>p!==0)?(e.beginPath(),tn(e,{x:f,y:d,w:h,h:m,radius:o}),e.fill()):e.fillRect(f,d,h,m)}}function UW(e,t){const{ctx:a,options:{pointLabels:r}}=e;for(let n=t-1;n>=0;n--){const i=e._pointLabelItems[n];if(!i.visible)continue;const c=r.setContext(e.getPointLabelContext(n));$W(a,c,i);const s=Pe(c.font),{x:o,y:l,textAlign:f}=i;da(a,e._pointLabels[n],o,l+s.lineHeight/2,s,{color:c.color,textAlign:f,textBaseline:"middle"})}}function yx(e,t,a,r){const{ctx:n}=e;if(a)n.arc(e.xCenter,e.yCenter,t,0,J2);else{let i=e.getPointPosition(0,t);n.moveTo(i.x,i.y);for(let c=1;c<r;c++)i=e.getPointPosition(c,t),n.lineTo(i.x,i.y)}}function qW(e,t,a,r,n){const i=e.ctx,c=t.circular,{color:s,lineWidth:o}=t;!c&&!r||!s||!o||a<0||(i.save(),i.strokeStyle=s,i.lineWidth=o,i.setLineDash(n.dash||[]),i.lineDashOffset=n.dashOffset,i.beginPath(),yx(e,a,c,r),i.closePath(),i.stroke(),i.restore())}function jW(e,t,a){return S0(e,{label:a,index:t,type:"pointLabel"})}class ir extends Ui{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=ft(Eo(this.options)/2),a=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+a/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(a,r)/2)}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!1);this.min=ve(t)&&!isNaN(t)?t:0,this.max=ve(a)&&!isNaN(a)?a:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Eo(this.options))}generateTickLabels(t){Ui.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((a,r)=>{const n=$2(this.options.pointLabels.callback,[a,r],this);return n||n===0?n:""}).filter((a,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?NW(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,a,r,n){this.xCenter+=Math.floor((t-a)/2),this.yCenter+=Math.floor((r-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,a,r,n))}getIndexAngle(t){const a=J2/(this._pointLabels.length||1),r=this.options.startAngle||0;return At(t*a+v3(r))}getDistanceFromCenterForValue(t){if(L2(t))return NaN;const a=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*a:(t-this.min)*a}getValueForDistanceFromCenter(t){if(L2(t))return NaN;const a=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-a:this.min+a}getPointLabelContext(t){const a=this._pointLabels||[];if(t>=0&&t<a.length){const r=a[t];return jW(this.getContext(),t,r)}}getPointPosition(t,a,r=0){const n=this.getIndexAngle(t)-we+r;return{x:Math.cos(n)*a+this.xCenter,y:Math.sin(n)*a+this.yCenter,angle:n}}getPointPositionForValue(t,a){return this.getPointPosition(t,this.getDistanceFromCenterForValue(a))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:a,top:r,right:n,bottom:i}=this._pointLabelItems[t];return{left:a,top:r,right:n,bottom:i}}drawBackground(){const{backgroundColor:t,grid:{circular:a}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),yx(this,this.getDistanceFromCenterForValue(this._endValue),a,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,a=this.options,{angleLines:r,grid:n,border:i}=a,c=this._pointLabels.length;let s,o,l;if(a.pointLabels.display&&UW(this,c),n.display&&this.ticks.forEach((f,d)=>{if(d!==0||d===0&&this.min<0){o=this.getDistanceFromCenterForValue(f.value);const h=this.getContext(d),m=n.setContext(h),p=i.setContext(h);qW(this,m,o,c,p)}}),r.display){for(t.save(),s=c-1;s>=0;s--){const f=r.setContext(this.getPointLabelContext(s)),{color:d,lineWidth:h}=f;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,o=this.getDistanceFromCenterForValue(a.reverse?this.min:this.max),l=this.getPointPosition(s,o),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,a=this.options,r=a.ticks;if(!r.display)return;const n=this.getIndexAngle(0);let i,c;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,o)=>{if(o===0&&this.min>=0&&!a.reverse)return;const l=r.setContext(this.getContext(o)),f=Pe(l.font);if(i=this.getDistanceFromCenterForValue(this.ticks[o].value),l.showLabelBackdrop){t.font=f.string,c=t.measureText(s.label).width,t.fillStyle=l.backdropColor;const d=ft(l.backdropPadding);t.fillRect(-c/2-d.left,-i-f.size/2-d.top,c+d.width,f.size+d.height)}da(t,s.label,0,-i,f,{color:l.color,strokeColor:l.textStrokeColor,strokeWidth:l.textStrokeWidth})}),t.restore()}drawTitle(){}}z1(ir,"id","radialLinear"),z1(ir,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:P8.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),z1(ir,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),z1(ir,"descriptors",{angleLines:{_fallback:"grid"}});const B8={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}},St=Object.keys(B8);function Hh(e,t){return e-t}function Sh(e,t){if(L2(t))return null;const a=e._adapter,{parser:r,round:n,isoWeekday:i}=e._parseOpts;let c=t;return typeof r=="function"&&(c=r(c)),ve(c)||(c=typeof r=="string"?a.parse(c,r):a.parse(c)),c===null?null:(n&&(c=n==="week"&&(l6(i)||i===!0)?a.startOf(c,"isoWeek",i):a.startOf(c,n)),+c)}function Lh(e,t,a,r){const n=St.length;for(let i=St.indexOf(e);i<n-1;++i){const c=B8[St[i]],s=c.steps?c.steps:Number.MAX_SAFE_INTEGER;if(c.common&&Math.ceil((a-t)/(s*c.size))<=r)return St[i]}return St[n-1]}function WW(e,t,a,r,n){for(let i=St.length-1;i>=St.indexOf(a);i--){const c=St[i];if(B8[c].common&&e._adapter.diff(n,r,c)>=t-1)return c}return St[a?St.indexOf(a):0]}function GW(e){for(let t=St.indexOf(e)+1,a=St.length;t<a;++t)if(B8[St[t]].common)return St[t]}function kh(e,t,a){if(!a)e[t]=!0;else if(a.length){const{lo:r,hi:n}=ml(a,t),i=a[r]>=t?a[r]:a[n];e[i]=!0}}function YW(e,t,a,r){const n=e._adapter,i=+n.startOf(t[0].value,r),c=t[t.length-1].value;let s,o;for(s=i;s<=c;s=+n.add(s,1,r))o=a[s],o>=0&&(t[o].major=!0);return t}function Ah(e,t,a){const r=[],n={},i=t.length;let c,s;for(c=0;c<i;++c)s=t[c],n[s]=c,r.push({value:s,major:!1});return i===0||!a?r:YW(e,r,n,a)}class nn extends Ca{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,a={}){const r=t.time||(t.time={}),n=this._adapter=new aq._date(t.adapters.date);n.init(a),xr(r.displayFormats,n.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=a.normalized}parse(t,a){return t===void 0?null:Sh(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,a=this._adapter,r=t.time.unit||"day";let{min:n,max:i,minDefined:c,maxDefined:s}=this.getUserBounds();function o(l){!c&&!isNaN(l.min)&&(n=Math.min(n,l.min)),!s&&!isNaN(l.max)&&(i=Math.max(i,l.max))}(!c||!s)&&(o(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&o(this.getMinMax(!1))),n=ve(n)&&!isNaN(n)?n:+a.startOf(Date.now(),r),i=ve(i)&&!isNaN(i)?i:+a.endOf(Date.now(),r)+1,this.min=Math.min(n,i-1),this.max=Math.max(n+1,i)}_getLabelBounds(){const t=this.getLabelTimestamps();let a=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(a=t[0],r=t[t.length-1]),{min:a,max:r}}buildTicks(){const t=this.options,a=t.time,r=t.ticks,n=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const i=this.min,c=this.max,s=S$(n,i,c);return this._unit=a.unit||(r.autoSkip?Lh(a.minUnit,this.min,this.max,this._getLabelCapacity(i)):WW(this,s.length,a.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:GW(this._unit),this.initOffsets(n),t.reverse&&s.reverse(),Ah(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let a=0,r=0,n,i;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?a=1-n:a=(this.getDecimalForValue(t[1])-n)/2,i=this.getDecimalForValue(t[t.length-1]),t.length===1?r=i:r=(i-this.getDecimalForValue(t[t.length-2]))/2);const c=t.length<3?.5:.25;a=qe(a,0,c),r=qe(r,0,c),this._offsets={start:a,end:r,factor:1/(a+1+r)}}_generate(){const t=this._adapter,a=this.min,r=this.max,n=this.options,i=n.time,c=i.unit||Lh(i.minUnit,a,r,this._getLabelCapacity(a)),s=l2(n.ticks.stepSize,1),o=c==="week"?i.isoWeekday:!1,l=l6(o)||o===!0,f={};let d=a,h,m;if(l&&(d=+t.startOf(d,"isoWeek",o)),d=+t.startOf(d,l?"day":c),t.diff(r,a,c)>1e5*s)throw new Error(a+" and "+r+" are too far apart with stepSize of "+s+" "+c);const p=n.ticks.source==="data"&&this.getDataTimestamps();for(h=d,m=0;h<r;h=+t.add(h,s,c),m++)kh(f,h,p);return(h===r||n.bounds==="ticks"||m===1)&&kh(f,h,p),Object.keys(f).sort(Hh).map(v=>+v)}getLabelForValue(t){const a=this._adapter,r=this.options.time;return r.tooltipFormat?a.format(t,r.tooltipFormat):a.format(t,r.displayFormats.datetime)}format(t,a){const n=this.options.time.displayFormats,i=this._unit,c=a||n[i];return this._adapter.format(t,c)}_tickFormatFunction(t,a,r,n){const i=this.options,c=i.ticks.callback;if(c)return $2(c,[t,a,r],this);const s=i.time.displayFormats,o=this._unit,l=this._majorUnit,f=o&&s[o],d=l&&s[l],h=r[a],m=l&&d&&h&&h.major;return this._adapter.format(t,n||(m?d:f))}generateTickLabels(t){let a,r,n;for(a=0,r=t.length;a<r;++a)n=t[a],n.label=this._tickFormatFunction(n.value,a,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const a=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((a.start+r)*a.factor)}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const a=this.options.ticks,r=this.ctx.measureText(t).width,n=v3(this.isHorizontal()?a.maxRotation:a.minRotation),i=Math.cos(n),c=Math.sin(n),s=this._resolveTickFontOptions(0).size;return{w:r*i+s*c,h:r*c+s*i}}_getLabelCapacity(t){const a=this.options.time,r=a.displayFormats,n=r[a.unit]||r.millisecond,i=this._tickFormatFunction(t,0,Ah(this,[t],this._majorUnit),n),c=this._getLabelSize(i),s=Math.floor(this.isHorizontal()?this.width/c.w:this.height/c.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],a,r;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(a=0,r=n.length;a<r;++a)t=t.concat(n[a].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let a,r;if(t.length)return t;const n=this.getLabels();for(a=0,r=n.length;a<r;++a)t.push(Sh(this,n[a]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Vy(t.sort(Hh))}}z1(nn,"id","time"),z1(nn,"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 Ec(e,t,a){let r=0,n=e.length-1,i,c,s,o;a?(t>=e[r].pos&&t<=e[n].pos&&({lo:r,hi:n}=C4(e,"pos",t)),{pos:i,time:s}=e[r],{pos:c,time:o}=e[n]):(t>=e[r].time&&t<=e[n].time&&({lo:r,hi:n}=C4(e,"time",t)),{time:i,pos:s}=e[r],{time:c,pos:o}=e[n]);const l=c-i;return l?s+(o-s)*(t-i)/l:s}class No extends nn{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),a=this._table=this.buildLookupTable(t);this._minPos=Ec(a,this.min),this._tableRange=Ec(a,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:a,max:r}=this,n=[],i=[];let c,s,o,l,f;for(c=0,s=t.length;c<s;++c)l=t[c],l>=a&&l<=r&&n.push(l);if(n.length<2)return[{time:a,pos:0},{time:r,pos:1}];for(c=0,s=n.length;c<s;++c)f=n[c+1],o=n[c-1],l=n[c],Math.round((f+o)/2)!==l&&i.push({time:l,pos:c/(s-1)});return i}_generate(){const t=this.min,a=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(a)||r.length===1)&&r.push(a),r.sort((n,i)=>n-i)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const a=this.getDataTimestamps(),r=this.getLabelTimestamps();return a.length&&r.length?t=this.normalize(a.concat(r)):t=a.length?a:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Ec(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return Ec(this._table,r*this._tableRange+this._minPos,!0)}}z1(No,"id","timeseries"),z1(No,"defaults",nn.defaults);var XW=Object.freeze({__proto__:null,CategoryScale:Ao,LinearScale:Vo,LogarithmicScale:To,RadialLinearScale:ir,TimeScale:nn,TimeSeriesScale:No});const KW=[tq,Vj,HW,XW];var ZW=typeof global=="object"&&global&&global.Object===Object&&global;const xx=ZW;var QW=typeof self=="object"&&self&&self.Object===Object&&self,JW=xx||QW||Function("return this")();const n4=JW;var eG=n4.Symbol;const z0=eG;var bx=Object.prototype,tG=bx.hasOwnProperty,aG=bx.toString,G6=z0?z0.toStringTag:void 0;function rG(e){var t=tG.call(e,G6),a=e[G6];try{e[G6]=void 0;var r=!0}catch{}var n=aG.call(e);return r&&(t?e[G6]=a:delete e[G6]),n}var nG=Object.prototype,cG=nG.toString;function iG(e){return cG.call(e)}var sG="[object Null]",oG="[object Undefined]",Vh=z0?z0.toStringTag:void 0;function On(e){return e==null?e===void 0?oG:sG:Vh&&Vh in Object(e)?rG(e):iG(e)}function ha(e){return e!=null&&typeof e=="object"}var lG=Array.isArray;const d6=lG;function Pn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var fG="[object AsyncFunction]",uG="[object Function]",dG="[object GeneratorFunction]",hG="[object Proxy]";function Cx(e){if(!Pn(e))return!1;var t=On(e);return t==uG||t==dG||t==fG||t==hG}var mG=n4["__core-js_shared__"];const ls=mG;var Th=function(){var e=/[^.]+$/.exec(ls&&ls.keys&&ls.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function pG(e){return!!Th&&Th in e}var vG=Function.prototype,gG=vG.toString;function Ma(e){if(e!=null){try{return gG.call(e)}catch{}try{return e+""}catch{}}return""}var yG=/[\\^$.*+?()[\]{}|]/g,xG=/^\[object .+?Constructor\]$/,bG=Function.prototype,CG=Object.prototype,MG=bG.toString,zG=CG.hasOwnProperty,wG=RegExp("^"+MG.call(zG).replace(yG,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _G(e){if(!Pn(e)||pG(e))return!1;var t=Cx(e)?wG:xG;return t.test(Ma(e))}function HG(e,t){return e==null?void 0:e[t]}function za(e,t){var a=HG(e,t);return _G(a)?a:void 0}var SG=za(n4,"WeakMap");const Oo=SG;var Eh=Object.create,LG=function(){function e(){}return function(t){if(!Pn(t))return{};if(Eh)return Eh(t);e.prototype=t;var a=new e;return e.prototype=void 0,a}}();const kG=LG;function AG(e,t){var a=-1,r=e.length;for(t||(t=Array(r));++a<r;)t[a]=e[a];return t}var VG=function(){try{var e=za(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Nh=VG;function TG(e,t){for(var a=-1,r=e==null?0:e.length;++a<r&&t(e[a],a,e)!==!1;);return e}var EG=9007199254740991,NG=/^(?:0|[1-9]\d*)$/;function OG(e,t){var a=typeof e;return t=t??EG,!!t&&(a=="number"||a!="symbol"&&NG.test(e))&&e>-1&&e%1==0&&e<t}function Mx(e,t,a){t=="__proto__"&&Nh?Nh(e,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[t]=a}function Hl(e,t){return e===t||e!==e&&t!==t}var PG=Object.prototype,DG=PG.hasOwnProperty;function zx(e,t,a){var r=e[t];(!(DG.call(e,t)&&Hl(r,a))||a===void 0&&!(t in e))&&Mx(e,t,a)}function I8(e,t,a,r){var n=!a;a||(a={});for(var i=-1,c=t.length;++i<c;){var s=t[i],o=r?r(a[s],e[s],s,a,e):void 0;o===void 0&&(o=e[s]),n?Mx(a,s,o):zx(a,s,o)}return a}var RG=9007199254740991;function wx(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=RG}function Sl(e){return e!=null&&wx(e.length)&&!Cx(e)}var FG=Object.prototype;function $8(e){var t=e&&e.constructor,a=typeof t=="function"&&t.prototype||FG;return e===a}function BG(e,t){for(var a=-1,r=Array(e);++a<e;)r[a]=t(a);return r}var IG="[object Arguments]";function Oh(e){return ha(e)&&On(e)==IG}var _x=Object.prototype,$G=_x.hasOwnProperty,UG=_x.propertyIsEnumerable,qG=Oh(function(){return arguments}())?Oh:function(e){return ha(e)&&$G.call(e,"callee")&&!UG.call(e,"callee")};const Hx=qG;function jG(){return!1}var Sx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ph=Sx&&typeof module=="object"&&module&&!module.nodeType&&module,WG=Ph&&Ph.exports===Sx,Dh=WG?n4.Buffer:void 0,GG=Dh?Dh.isBuffer:void 0,YG=GG||jG;const cn=YG;var XG="[object Arguments]",KG="[object Array]",ZG="[object Boolean]",QG="[object Date]",JG="[object Error]",eY="[object Function]",tY="[object Map]",aY="[object Number]",rY="[object Object]",nY="[object RegExp]",cY="[object Set]",iY="[object String]",sY="[object WeakMap]",oY="[object ArrayBuffer]",lY="[object DataView]",fY="[object Float32Array]",uY="[object Float64Array]",dY="[object Int8Array]",hY="[object Int16Array]",mY="[object Int32Array]",pY="[object Uint8Array]",vY="[object Uint8ClampedArray]",gY="[object Uint16Array]",yY="[object Uint32Array]",X2={};X2[fY]=X2[uY]=X2[dY]=X2[hY]=X2[mY]=X2[pY]=X2[vY]=X2[gY]=X2[yY]=!0;X2[XG]=X2[KG]=X2[oY]=X2[ZG]=X2[lY]=X2[QG]=X2[JG]=X2[eY]=X2[tY]=X2[aY]=X2[rY]=X2[nY]=X2[cY]=X2[iY]=X2[sY]=!1;function xY(e){return ha(e)&&wx(e.length)&&!!X2[On(e)]}function Ll(e){return function(t){return e(t)}}var Lx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wr=Lx&&typeof module=="object"&&module&&!module.nodeType&&module,bY=wr&&wr.exports===Lx,fs=bY&&xx.process,CY=function(){try{var e=wr&&wr.require&&wr.require("util").types;return e||fs&&fs.binding&&fs.binding("util")}catch{}}();const h6=CY;var Rh=h6&&h6.isTypedArray,MY=Rh?Ll(Rh):xY;const kl=MY;var zY=Object.prototype,wY=zY.hasOwnProperty;function kx(e,t){var a=d6(e),r=!a&&Hx(e),n=!a&&!r&&cn(e),i=!a&&!r&&!n&&kl(e),c=a||r||n||i,s=c?BG(e.length,String):[],o=s.length;for(var l in e)(t||wY.call(e,l))&&!(c&&(l=="length"||n&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||OG(l,o)))&&s.push(l);return s}function Ax(e,t){return function(a){return e(t(a))}}var _Y=Ax(Object.keys,Object);const HY=_Y;var SY=Object.prototype,LY=SY.hasOwnProperty;function Vx(e){if(!$8(e))return HY(e);var t=[];for(var a in Object(e))LY.call(e,a)&&a!="constructor"&&t.push(a);return t}function Al(e){return Sl(e)?kx(e):Vx(e)}function kY(e){var t=[];if(e!=null)for(var a in Object(e))t.push(a);return t}var AY=Object.prototype,VY=AY.hasOwnProperty;function TY(e){if(!Pn(e))return kY(e);var t=$8(e),a=[];for(var r in e)r=="constructor"&&(t||!VY.call(e,r))||a.push(r);return a}function Vl(e){return Sl(e)?kx(e,!0):TY(e)}var EY=za(Object,"create");const sn=EY;function NY(){this.__data__=sn?sn(null):{},this.size=0}function OY(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var PY="__lodash_hash_undefined__",DY=Object.prototype,RY=DY.hasOwnProperty;function FY(e){var t=this.__data__;if(sn){var a=t[e];return a===PY?void 0:a}return RY.call(t,e)?t[e]:void 0}var BY=Object.prototype,IY=BY.hasOwnProperty;function $Y(e){var t=this.__data__;return sn?t[e]!==void 0:IY.call(t,e)}var UY="__lodash_hash_undefined__";function qY(e,t){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=sn&&t===void 0?UY:t,this}function ma(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}ma.prototype.clear=NY;ma.prototype.delete=OY;ma.prototype.get=FY;ma.prototype.has=$Y;ma.prototype.set=qY;function jY(){this.__data__=[],this.size=0}function U8(e,t){for(var a=e.length;a--;)if(Hl(e[a][0],t))return a;return-1}var WY=Array.prototype,GY=WY.splice;function YY(e){var t=this.__data__,a=U8(t,e);if(a<0)return!1;var r=t.length-1;return a==r?t.pop():GY.call(t,a,1),--this.size,!0}function XY(e){var t=this.__data__,a=U8(t,e);return a<0?void 0:t[a][1]}function KY(e){return U8(this.__data__,e)>-1}function ZY(e,t){var a=this.__data__,r=U8(a,e);return r<0?(++this.size,a.push([e,t])):a[r][1]=t,this}function B4(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}B4.prototype.clear=jY;B4.prototype.delete=YY;B4.prototype.get=XY;B4.prototype.has=KY;B4.prototype.set=ZY;var QY=za(n4,"Map");const on=QY;function JY(){this.size=0,this.__data__={hash:new ma,map:new(on||B4),string:new ma}}function eX(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function q8(e,t){var a=e.__data__;return eX(t)?a[typeof t=="string"?"string":"hash"]:a.map}function tX(e){var t=q8(this,e).delete(e);return this.size-=t?1:0,t}function aX(e){return q8(this,e).get(e)}function rX(e){return q8(this,e).has(e)}function nX(e,t){var a=q8(this,e),r=a.size;return a.set(e,t),this.size+=a.size==r?0:1,this}function wa(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}wa.prototype.clear=JY;wa.prototype.delete=tX;wa.prototype.get=aX;wa.prototype.has=rX;wa.prototype.set=nX;function Tx(e,t){for(var a=-1,r=t.length,n=e.length;++a<r;)e[n+a]=t[a];return e}var cX=Ax(Object.getPrototypeOf,Object);const Ex=cX;function iX(){this.__data__=new B4,this.size=0}function sX(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a}function oX(e){return this.__data__.get(e)}function lX(e){return this.__data__.has(e)}var fX=200;function uX(e,t){var a=this.__data__;if(a instanceof B4){var r=a.__data__;if(!on||r.length<fX-1)return r.push([e,t]),this.size=++a.size,this;a=this.__data__=new wa(r)}return a.set(e,t),this.size=a.size,this}function L4(e){var t=this.__data__=new B4(e);this.size=t.size}L4.prototype.clear=iX;L4.prototype.delete=sX;L4.prototype.get=oX;L4.prototype.has=lX;L4.prototype.set=uX;function dX(e,t){return e&&I8(t,Al(t),e)}function hX(e,t){return e&&I8(t,Vl(t),e)}var Nx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fh=Nx&&typeof module=="object"&&module&&!module.nodeType&&module,mX=Fh&&Fh.exports===Nx,Bh=mX?n4.Buffer:void 0,Ih=Bh?Bh.allocUnsafe:void 0;function pX(e,t){if(t)return e.slice();var a=e.length,r=Ih?Ih(a):new e.constructor(a);return e.copy(r),r}function vX(e,t){for(var a=-1,r=e==null?0:e.length,n=0,i=[];++a<r;){var c=e[a];t(c,a,e)&&(i[n++]=c)}return i}function Ox(){return[]}var gX=Object.prototype,yX=gX.propertyIsEnumerable,$h=Object.getOwnPropertySymbols,xX=$h?function(e){return e==null?[]:(e=Object(e),vX($h(e),function(t){return yX.call(e,t)}))}:Ox;const Tl=xX;function bX(e,t){return I8(e,Tl(e),t)}var CX=Object.getOwnPropertySymbols,MX=CX?function(e){for(var t=[];e;)Tx(t,Tl(e)),e=Ex(e);return t}:Ox;const Px=MX;function zX(e,t){return I8(e,Px(e),t)}function Dx(e,t,a){var r=t(e);return d6(e)?r:Tx(r,a(e))}function Po(e){return Dx(e,Al,Tl)}function wX(e){return Dx(e,Vl,Px)}var _X=za(n4,"DataView");const Do=_X;var HX=za(n4,"Promise");const Ro=HX;var SX=za(n4,"Set");const Fo=SX;var Uh="[object Map]",LX="[object Object]",qh="[object Promise]",jh="[object Set]",Wh="[object WeakMap]",Gh="[object DataView]",kX=Ma(Do),AX=Ma(on),VX=Ma(Ro),TX=Ma(Fo),EX=Ma(Oo),U0=On;(Do&&U0(new Do(new ArrayBuffer(1)))!=Gh||on&&U0(new on)!=Uh||Ro&&U0(Ro.resolve())!=qh||Fo&&U0(new Fo)!=jh||Oo&&U0(new Oo)!=Wh)&&(U0=function(e){var t=On(e),a=t==LX?e.constructor:void 0,r=a?Ma(a):"";if(r)switch(r){case kX:return Gh;case AX:return Uh;case VX:return qh;case TX:return jh;case EX:return Wh}return t});const m6=U0;var NX=Object.prototype,OX=NX.hasOwnProperty;function PX(e){var t=e.length,a=new e.constructor(t);return t&&typeof e[0]=="string"&&OX.call(e,"index")&&(a.index=e.index,a.input=e.input),a}var DX=n4.Uint8Array;const qi=DX;function El(e){var t=new e.constructor(e.byteLength);return new qi(t).set(new qi(e)),t}function RX(e,t){var a=t?El(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.byteLength)}var FX=/\w*$/;function BX(e){var t=new e.constructor(e.source,FX.exec(e));return t.lastIndex=e.lastIndex,t}var Yh=z0?z0.prototype:void 0,Xh=Yh?Yh.valueOf:void 0;function IX(e){return Xh?Object(Xh.call(e)):{}}function $X(e,t){var a=t?El(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}var UX="[object Boolean]",qX="[object Date]",jX="[object Map]",WX="[object Number]",GX="[object RegExp]",YX="[object Set]",XX="[object String]",KX="[object Symbol]",ZX="[object ArrayBuffer]",QX="[object DataView]",JX="[object Float32Array]",eK="[object Float64Array]",tK="[object Int8Array]",aK="[object Int16Array]",rK="[object Int32Array]",nK="[object Uint8Array]",cK="[object Uint8ClampedArray]",iK="[object Uint16Array]",sK="[object Uint32Array]";function oK(e,t,a){var r=e.constructor;switch(t){case ZX:return El(e);case UX:case qX:return new r(+e);case QX:return RX(e,a);case JX:case eK:case tK:case aK:case rK:case nK:case cK:case iK:case sK:return $X(e,a);case jX:return new r;case WX:case XX:return new r(e);case GX:return BX(e);case YX:return new r;case KX:return IX(e)}}function lK(e){return typeof e.constructor=="function"&&!$8(e)?kG(Ex(e)):{}}var fK="[object Map]";function uK(e){return ha(e)&&m6(e)==fK}var Kh=h6&&h6.isMap,dK=Kh?Ll(Kh):uK;const hK=dK;var mK="[object Set]";function pK(e){return ha(e)&&m6(e)==mK}var Zh=h6&&h6.isSet,vK=Zh?Ll(Zh):pK;const gK=vK;var yK=1,xK=2,bK=4,Rx="[object Arguments]",CK="[object Array]",MK="[object Boolean]",zK="[object Date]",wK="[object Error]",Fx="[object Function]",_K="[object GeneratorFunction]",HK="[object Map]",SK="[object Number]",Bx="[object Object]",LK="[object RegExp]",kK="[object Set]",AK="[object String]",VK="[object Symbol]",TK="[object WeakMap]",EK="[object ArrayBuffer]",NK="[object DataView]",OK="[object Float32Array]",PK="[object Float64Array]",DK="[object Int8Array]",RK="[object Int16Array]",FK="[object Int32Array]",BK="[object Uint8Array]",IK="[object Uint8ClampedArray]",$K="[object Uint16Array]",UK="[object Uint32Array]",I2={};I2[Rx]=I2[CK]=I2[EK]=I2[NK]=I2[MK]=I2[zK]=I2[OK]=I2[PK]=I2[DK]=I2[RK]=I2[FK]=I2[HK]=I2[SK]=I2[Bx]=I2[LK]=I2[kK]=I2[AK]=I2[VK]=I2[BK]=I2[IK]=I2[$K]=I2[UK]=!0;I2[wK]=I2[Fx]=I2[TK]=!1;function ui(e,t,a,r,n,i){var c,s=t&yK,o=t&xK,l=t&bK;if(a&&(c=n?a(e,r,n,i):a(e)),c!==void 0)return c;if(!Pn(e))return e;var f=d6(e);if(f){if(c=PX(e),!s)return AG(e,c)}else{var d=m6(e),h=d==Fx||d==_K;if(cn(e))return pX(e,s);if(d==Bx||d==Rx||h&&!n){if(c=o||h?{}:lK(e),!s)return o?zX(e,hX(c,e)):bX(e,dX(c,e))}else{if(!I2[d])return n?e:{};c=oK(e,d,s)}}i||(i=new L4);var m=i.get(e);if(m)return m;i.set(e,c),gK(e)?e.forEach(function(g){c.add(ui(g,t,a,g,e,i))}):hK(e)&&e.forEach(function(g,y){c.set(y,ui(g,t,a,y,e,i))});var p=l?o?wX:Po:o?Vl:Al,v=f?void 0:p(e);return TG(v||e,function(g,y){v&&(y=g,g=e[y]),zx(c,y,ui(g,t,a,y,e,i))}),c}var qK=1,jK=4;function Y6(e){return ui(e,qK|jK)}var WK="__lodash_hash_undefined__";function GK(e){return this.__data__.set(e,WK),this}function YK(e){return this.__data__.has(e)}function ji(e){var t=-1,a=e==null?0:e.length;for(this.__data__=new wa;++t<a;)this.add(e[t])}ji.prototype.add=ji.prototype.push=GK;ji.prototype.has=YK;function XK(e,t){for(var a=-1,r=e==null?0:e.length;++a<r;)if(t(e[a],a,e))return!0;return!1}function KK(e,t){return e.has(t)}var ZK=1,QK=2;function Ix(e,t,a,r,n,i){var c=a&ZK,s=e.length,o=t.length;if(s!=o&&!(c&&o>s))return!1;var l=i.get(e),f=i.get(t);if(l&&f)return l==t&&f==e;var d=-1,h=!0,m=a&QK?new ji:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var p=e[d],v=t[d];if(r)var g=c?r(v,p,d,t,e,i):r(p,v,d,e,t,i);if(g!==void 0){if(g)continue;h=!1;break}if(m){if(!XK(t,function(y,x){if(!KK(m,x)&&(p===y||n(p,y,a,r,i)))return m.push(x)})){h=!1;break}}else if(!(p===v||n(p,v,a,r,i))){h=!1;break}}return i.delete(e),i.delete(t),h}function JK(e){var t=-1,a=Array(e.size);return e.forEach(function(r,n){a[++t]=[n,r]}),a}function eZ(e){var t=-1,a=Array(e.size);return e.forEach(function(r){a[++t]=r}),a}var tZ=1,aZ=2,rZ="[object Boolean]",nZ="[object Date]",cZ="[object Error]",iZ="[object Map]",sZ="[object Number]",oZ="[object RegExp]",lZ="[object Set]",fZ="[object String]",uZ="[object Symbol]",dZ="[object ArrayBuffer]",hZ="[object DataView]",Qh=z0?z0.prototype:void 0,us=Qh?Qh.valueOf:void 0;function mZ(e,t,a,r,n,i,c){switch(a){case hZ:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case dZ:return!(e.byteLength!=t.byteLength||!i(new qi(e),new qi(t)));case rZ:case nZ:case sZ:return Hl(+e,+t);case cZ:return e.name==t.name&&e.message==t.message;case oZ:case fZ:return e==t+"";case iZ:var s=JK;case lZ:var o=r&tZ;if(s||(s=eZ),e.size!=t.size&&!o)return!1;var l=c.get(e);if(l)return l==t;r|=aZ,c.set(e,t);var f=Ix(s(e),s(t),r,n,i,c);return c.delete(e),f;case uZ:if(us)return us.call(e)==us.call(t)}return!1}var pZ=1,vZ=Object.prototype,gZ=vZ.hasOwnProperty;function yZ(e,t,a,r,n,i){var c=a&pZ,s=Po(e),o=s.length,l=Po(t),f=l.length;if(o!=f&&!c)return!1;for(var d=o;d--;){var h=s[d];if(!(c?h in t:gZ.call(t,h)))return!1}var m=i.get(e),p=i.get(t);if(m&&p)return m==t&&p==e;var v=!0;i.set(e,t),i.set(t,e);for(var g=c;++d<o;){h=s[d];var y=e[h],x=t[h];if(r)var C=c?r(x,y,h,t,e,i):r(y,x,h,e,t,i);if(!(C===void 0?y===x||n(y,x,a,r,i):C)){v=!1;break}g||(g=h=="constructor")}if(v&&!g){var b=e.constructor,M=t.constructor;b!=M&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof M=="function"&&M instanceof M)&&(v=!1)}return i.delete(e),i.delete(t),v}var xZ=1,Jh="[object Arguments]",em="[object Array]",Nc="[object Object]",bZ=Object.prototype,tm=bZ.hasOwnProperty;function CZ(e,t,a,r,n,i){var c=d6(e),s=d6(t),o=c?em:m6(e),l=s?em:m6(t);o=o==Jh?Nc:o,l=l==Jh?Nc:l;var f=o==Nc,d=l==Nc,h=o==l;if(h&&cn(e)){if(!cn(t))return!1;c=!0,f=!1}if(h&&!f)return i||(i=new L4),c||kl(e)?Ix(e,t,a,r,n,i):mZ(e,t,o,a,r,n,i);if(!(a&xZ)){var m=f&&tm.call(e,"__wrapped__"),p=d&&tm.call(t,"__wrapped__");if(m||p){var v=m?e.value():e,g=p?t.value():t;return i||(i=new L4),n(v,g,a,r,i)}}return h?(i||(i=new L4),yZ(e,t,a,r,n,i)):!1}function $x(e,t,a,r,n){return e===t?!0:e==null||t==null||!ha(e)&&!ha(t)?e!==e&&t!==t:CZ(e,t,a,r,$x,n)}var MZ="[object Map]",zZ="[object Set]",wZ=Object.prototype,_Z=wZ.hasOwnProperty;function HZ(e){if(e==null)return!0;if(Sl(e)&&(d6(e)||typeof e=="string"||typeof e.splice=="function"||cn(e)||kl(e)||Hx(e)))return!e.length;var t=m6(e);if(t==MZ||t==zZ)return!e.size;if($8(e))return!Vx(e).length;for(var a in e)if(_Z.call(e,a))return!1;return!0}function am(e,t){return $x(e,t)}var SZ=Object.defineProperty,LZ=Object.defineProperties,kZ=Object.getOwnPropertyDescriptors,rm=Object.getOwnPropertySymbols,AZ=Object.prototype.hasOwnProperty,VZ=Object.prototype.propertyIsEnumerable,nm=(e,t,a)=>t in e?SZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,TZ=(e,t)=>{for(var a in t||(t={}))AZ.call(t,a)&&nm(e,a,t[a]);if(rm)for(var a of rm(t))VZ.call(t,a)&&nm(e,a,t[a]);return e},EZ=(e,t)=>LZ(e,kZ(t));function NZ(e){return(e.match(/[a-zA-Z0-9]+/g)||[]).map(t=>`${t.charAt(0).toUpperCase()}${t.slice(1)}`).join("")}var L0=(e,t)=>{const a={chartData:{type:Object,required:!0},options:{type:Object,required:!1},chartId:{default:e,type:String},width:{default:400,type:Number},height:{default:400,type:Number},cssClasses:{type:String,default:""},styles:{type:Object},plugins:{type:Array,default:()=>[]},onLabelsUpdate:{type:Function},onChartUpdate:{type:Function},onChartDestroy:{type:Function},onChartRender:{type:Function}},r=NZ(e);return u.defineComponent({name:r,props:a,emits:{"labels:update":()=>!0,"chart:update":n=>!0,"chart:destroy":()=>!0,"chart:render":n=>!0},setup(n,{emit:i,expose:c}){const s=u.ref(null),o=`${n.chartId}`;let l=u.shallowRef(null);u.watch(()=>n.chartData,f,{deep:!0}),u.watch(()=>n.options,g=>{l.value&&g&&(l.value.options=Y6(g),p())},{deep:!0});function f(g){if(l.value){let y=l.value;am(g.labels,l.value.data.labels)||(y.data.labels=g.labels,h()),am(g.datasets,l.value.data.datasets)||g.datasets.forEach((x,C)=>{var b,M;if(HZ(x))y.data.datasets=[];else{const w=Y6(y.data),z=Object.keys((M=(b=w.datasets)==null?void 0:b[C])!=null?M:{}),_=Object.keys(x);z.filter(k=>k!=="_meta"&&_.indexOf(k)===-1).forEach(k=>{y.data.datasets[C]&&delete y.data.datasets[C][k]});for(const k in x){const H=Y6(x[k]);y.data.datasets[C]||(y.data.datasets[C]={}),x.hasOwnProperty(k)&&H!=null&&y&&(y.data.datasets[C][k]=H)}}}),p()}else l.value&&v(),d()}function d(){s.value?(l.value=new v4(s.value,{data:Y6(n.chartData),type:t,options:Y6(n.options),plugins:n.plugins}),m()):console.error(`Error on component ${r}, canvas cannot be rendered. Check if the render appends server-side`)}function h(){i("labels:update"),n.onLabelsUpdate&&n.onLabelsUpdate()}function m(){l.value&&(i("chart:render",l.value),n.onChartRender&&n.onChartRender(l.value))}function p(){l.value&&(l.value.update(),i("chart:update",l.value),n.onChartUpdate&&n.onChartUpdate(l.value))}function v(){l.value&&l.value.destroy(),i("chart:destroy"),n.onChartDestroy&&n.onChartDestroy()}return u.onMounted(d),u.onBeforeUnmount(()=>{l.value&&l.value.destroy()}),c({canvasRef:s,renderChart:d,chartInstance:l,canvasId:o,update:p}),()=>u.h("div",{style:EZ(TZ({maxWidth:"100%"},n.styles),{position:"relative"}),class:n.cssClasses},[u.h("canvas",{style:{maxWidth:"100%",maxHeight:"100%"},id:o,width:n.width,height:n.height,ref:s})])}})};L0("bar-chart","bar");var OZ=L0("doughnut-chart","doughnut");L0("line-chart","line");L0("pie-chart","pie");L0("polar-chart","polarArea");L0("radar-chart","radar");L0("bubble-chart","bubble");L0("scatter-chart","scatter");const PZ=u.defineComponent({__name:"PgaDoughnutChart",props:{data:{},options:{}},setup(e){v4.register(...KW);const t={responsive:!0};return(a,r)=>(u.openBlock(),u.createBlock(u.unref(OZ),{chartData:a.data,options:a.options||t},null,8,["chartData","options"]))}}),DZ={key:0},RZ={key:1,class:"barcodes-container"},FZ=u.defineComponent({__name:"PgaDisplayBarcodes",props:{barcodes:{}},setup(e){return(t,a)=>t.barcodes.length?(u.openBlock(),u.createElementBlock("div",RZ,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(t.barcodes,r=>(u.openBlock(),u.createElementBlock("span",{class:"barcode",key:r},[u.createVNode(We,{icon:"barcode"}),u.createTextVNode("   "+u.toDisplayString(r),1)]))),128))])):(u.openBlock(),u.createElementBlock("span",DZ,"-"))}});const BZ=X1(FZ,[["__scopeId","data-v-5291a54d"]]),IZ=["textContent"],$Z=u.defineComponent({__name:"PgaDisplayDatetime",props:{datetime:{},withoutBackground:{type:Boolean}},setup(e){const t=e,a=u.computed(()=>t.datetime instanceof Date),r=u.computed(()=>a.value?i6(t.datetime,{format:"short",withTime:!1}):"-"),n=u.computed(()=>a.value?i6(t.datetime,{justTime:!0}):"");return(i,c)=>{const s=u.resolveDirective("tooltip");return a.value?u.withDirectives((u.openBlock(),u.createElementBlock("div",{key:1,class:u.normalizeClass(["pga-datetime",{"pga-datetime__with-background":!i.withoutBackground}])},[u.createVNode(Be,{icon:"calendar-days",text:r.value,nowrap:""},null,8,["text"])],2)),[[s,n.value]]):(u.openBlock(),u.createElementBlock("span",{key:0,textContent:u.toDisplayString(r.value)},null,8,IZ))}}});const UZ=X1($Z,[["__scopeId","data-v-b6b9d53f"]]),qZ={class:"info-card"},jZ={class:"info-card--icon-container"},WZ={class:"info-card--content-container"},GZ={class:"info-card--content"},YZ=["textContent"],XZ=u.defineComponent({__name:"PgaDisplayInfo",props:{type:{default:"info"},info:{}},setup(e){u.useCssVars(c=>({"25f5bc6c":n.value,"41d953fb":i.value}));const t=e,a=u.computed(()=>{if(t.type==="info")return"circle-info";if(t.type==="success")return"circle-check";if(t.type==="error")return"circle-xmark";if(t.type==="warning")return"circle-exclamation"}),r=u.computed(()=>{if(t.type==="info")return"aqua";if(t.type==="success")return"success";if(t.type==="error")return"danger";if(t.type==="warning")return"warning"}),n=u.computed(()=>`var(--pga-color-${r.value}-08)`),i=u.computed(()=>`var(--pga-color-${r.value}-contrast)`);return(c,s)=>{const o=u.resolveComponent("PgaIcon");return u.openBlock(),u.createElementBlock("div",qZ,[u.createElementVNode("div",jZ,[u.createVNode(o,{class:"info-card--icon",icon:a.value},null,8,["icon"])]),u.createElementVNode("div",WZ,[u.createElementVNode("div",GZ,[c.info?(u.openBlock(),u.createElementBlock("span",{key:0,textContent:u.toDisplayString(c.info)},null,8,YZ)):u.renderSlot(c.$slots,"default",{key:1},void 0,!0)])])])}}});const KZ=X1(XZ,[["__scopeId","data-v-818880c0"]]),ZZ={key:0,class:"no-items-container"},QZ={key:1,class:"no-items"},JZ=u.defineComponent({__name:"PgaDisplayNoItems",props:{items:{},label:{},icon:{default:"filter-circle-xmark"},preventDisplayIcon:{type:Boolean},isLoading:{type:Boolean}},setup(e){const t=e,a=ae("pgaDisplayNoItems"),r=u.computed(()=>{var i;return!(((i=t.items)==null?void 0:i.length)>0)}),n=u.computed(()=>t.label?t.label:a("noItemsText"));return(i,c)=>r.value?(u.openBlock(),u.createElementBlock("div",ZZ,[i.isLoading?(u.openBlock(),u.createBlock(S6,{key:0})):(u.openBlock(),u.createElementBlock("div",QZ,[i.preventDisplayIcon?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(We,{key:0,class:"no-items--icon",icon:i.icon},null,8,["icon"])),u.createVNode(Be,{class:"no-items--text",text:n.value},null,8,["text"])]))])):u.createCommentVNode("",!0)}});const Ux=X1(JZ,[["__scopeId","data-v-2f2a188f"]]),eQ=["textContent"],tQ={key:0,class:"price-sign",textContent:"$"},aQ=["textContent"],rQ=u.defineComponent({__name:"PgaDisplayPrice",props:{price:{},tooltipPrice:{},size:{default:"m"},color:{default:"first"},numOfDecimals:{},withoutSign:{type:Boolean},withoutBackground:{type:Boolean},isPositive:{type:Boolean,default:void 0}},setup(e){u.useCssVars(l=>({"38848f50":c.value,"885cde0a":o.value,"35f9cc2e":i.value,"4d380636":s.value}));const t=e,a=u.computed(()=>t.price!==void 0),r=u.computed(()=>a.value?typeof t.price=="string"?t.price:gi(t.price,t.numOfDecimals):"-"),n=u.computed(()=>t.tooltipPrice===void 0?"":typeof t.tooltipPrice=="string"?t.tooltipPrice:`$ ${gi(t.tooltipPrice,t.numOfDecimals)}`),i=u.computed(()=>{if(t.size==="s")return"0.9rem";if(t.size==="m")return"1rem";if(t.size==="l")return"1.1rem"}),c=u.computed(()=>{if(t.size==="s")return"0.7rem";if(t.size==="m")return"0.8rem";if(t.size==="l")return"0.9rem"}),s=u.computed(()=>`var(--pga-color-${t.color})`),o=u.computed(()=>{if(t.color==="first")return"var(--pga-color-second)";if(t.color==="second")return"var(--pga-color-third)"});return(l,f)=>{const d=u.resolveDirective("tooltip");return a.value?u.withDirectives((u.openBlock(),u.createElementBlock("span",{key:1,class:u.normalizeClass(["price-container",{"price-container__with-background":!l.withoutBackground}])},[l.withoutSign?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("span",tQ)),u.createElementVNode("span",{class:u.normalizeClass(["price",{price__positive:l.isPositive===!0,price__negative:l.isPositive===!1}]),textContent:u.toDisplayString(r.value)},null,10,aQ)],2)),[[d,n.value]]):(u.openBlock(),u.createElementBlock("span",{key:0,textContent:u.toDisplayString(r.value)},null,8,eQ))}}});const nQ=X1(rQ,[["__scopeId","data-v-97b7f73d"]]),cQ=u.defineComponent({__name:"PgaForm",props:{width:{default:"100%"},withBackground:{type:Boolean}},setup(e){return u.useCssVars(t=>({"003f3e5e":t.width})),(t,a)=>(u.openBlock(),u.createElementBlock("form",{class:u.normalizeClass(["pga-form",{"pga-form__with-background":t.withBackground}]),onSubmit:a[0]||(a[0]=u.withModifiers(()=>{},["prevent"]))},[u.renderSlot(t.$slots,"default",{},void 0,!0)],34))}});const qx=X1(cQ,[["__scopeId","data-v-961c938a"]]),jx=u.defineComponent({__name:"PgaFormButton",props:{icon:{},text:{type:[String,Number,Function]},isLoading:{type:Boolean}},setup(e){return(t,a)=>(u.openBlock(),u.createBlock(j2,{type:"submit",icon:t.icon,text:t.text,isLoading:t.isLoading},null,8,["icon","text","isLoading"]))}});const iQ={},sQ={class:"pga-form-row"};function oQ(e,t){return u.openBlock(),u.createElementBlock("div",sQ,[u.renderSlot(e.$slots,"default")])}const lQ=X1(iQ,[["render",oQ]]),fQ=u.defineComponent({__name:"PgaFormSubtitle",props:{title:{type:[String,Number,Function]}},setup(e){return(t,a)=>{const r=u.resolveComponent("PgaDisplayText");return u.openBlock(),u.createBlock(r,{class:"pga-form-title",text:t.title},null,8,["text"])}}});const uQ=X1(fQ,[["__scopeId","data-v-c4eb19ec"]]),dQ=u.defineComponent({__name:"PgaFormTitle",props:{title:{type:[String,Number,Function]}},setup(e){return(t,a)=>{const r=u.resolveComponent("PgaDisplayText");return u.openBlock(),u.createBlock(r,{class:"pga-form-title",text:t.title},null,8,["text"])}}});const hQ=X1(dQ,[["__scopeId","data-v-46e35803"]]),mQ={key:0,class:"input-group--header"},pQ=["textContent"],vQ=["textContent"],gQ={key:1,class:"input-group--errors"},yQ=["textContent"],xQ=u.defineComponent({__name:"PgaInputGroup",props:{label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},fitContent:{type:Boolean},grow:{}},setup(e){u.useCssVars(i=>({"24d6ac48":i.grow}));const t=e,a=ae("pgaInputGroup"),r=u.computed(()=>t.label||t.withLabelSpace),n=u.computed(()=>t.label?t.label:" ");return(i,c)=>{const s=u.resolveComponent("PgaIcon");return u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["input-group",{"input-group__fit-content":i.fitContent,"input-group__with-flex-grow":i.grow!==void 0}])},[r.value||i.withOptionalLabel?(u.openBlock(),u.createElementBlock("div",mQ,[r.value?(u.openBlock(),u.createElementBlock("label",{key:0,class:"header--label",textContent:u.toDisplayString(n.value)},null,8,pQ)):u.createCommentVNode("",!0),i.withOptionalLabel?(u.openBlock(),u.createElementBlock("span",{key:1,class:"header--optional",textContent:u.toDisplayString(u.unref(a)("optionalLabel"))},null,8,vQ)):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0),u.renderSlot(i.$slots,"default",{},void 0,!0),i.errors?(u.openBlock(),u.createElementBlock("div",gQ,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.errors,(o,l)=>(u.openBlock(),u.createElementBlock("div",{key:l,class:"errors--error"},[u.createVNode(s,{class:"error--icon",icon:["fas","triangle-exclamation"]}),u.createElementVNode("span",{class:"error--message",textContent:u.toDisplayString(o.$message)},null,8,yQ)]))),128))])):u.createCommentVNode("",!0)],2)}}});const It=X1(xQ,[["__scopeId","data-v-1521aa1a"]]);function cm(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function K4(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?cm(Object(a),!0).forEach(function(r){bQ(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):cm(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function bQ(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function im(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(e).reduce((a,r)=>(t.includes(r)||(a[r]=u.unref(e[r])),a),{})}function Wi(e){return typeof e=="function"}function CQ(e){return u.isReactive(e)||u.isReadonly(e)}function Wx(e,t,a){let r=e;const n=t.split(".");for(let i=0;i<n.length;i++){if(!r[n[i]])return a;r=r[n[i]]}return r}function ds(e,t,a){return u.computed(()=>e.some(r=>Wx(t,r,{[a]:!1})[a]))}function sm(e,t,a){return u.computed(()=>e.reduce((r,n)=>{const i=Wx(t,n,{[a]:!1})[a]||[];return r.concat(i)},[]))}function Gx(e,t,a,r){return e.call(r,u.unref(t),u.unref(a),r)}function Yx(e){return e.$valid!==void 0?!e.$valid:!e}function MQ(e,t,a,r,n,i,c){let{$lazy:s,$rewardEarly:o}=n,l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],f=arguments.length>8?arguments[8]:void 0,d=arguments.length>9?arguments[9]:void 0,h=arguments.length>10?arguments[10]:void 0;const m=u.ref(!!r.value),p=u.ref(0);a.value=!1;const v=u.watch([t,r].concat(l,h),()=>{if(s&&!r.value||o&&!d.value&&!a.value)return;let g;try{g=Gx(e,t,f,c)}catch(y){g=Promise.reject(y)}p.value++,a.value=!!p.value,m.value=!1,Promise.resolve(g).then(y=>{p.value--,a.value=!!p.value,i.value=y,m.value=Yx(y)}).catch(y=>{p.value--,a.value=!!p.value,i.value=y,m.value=!0})},{immediate:!0,deep:typeof t=="object"});return{$invalid:m,$unwatch:v}}function zQ(e,t,a,r,n,i,c,s){let{$lazy:o,$rewardEarly:l}=r;const f=()=>({}),d=u.computed(()=>{if(o&&!a.value||l&&!s.value)return!1;let h=!0;try{const m=Gx(e,t,c,i);n.value=m,h=Yx(m)}catch(m){n.value=m}return h});return{$unwatch:f,$invalid:d}}function wQ(e,t,a,r,n,i,c,s,o,l,f){const d=u.ref(!1),h=e.$params||{},m=u.ref(null);let p,v;e.$async?{$invalid:p,$unwatch:v}=MQ(e.$validator,t,d,a,r,m,n,e.$watchTargets,o,l,f):{$invalid:p,$unwatch:v}=zQ(e.$validator,t,a,r,m,n,o,l);const g=e.$message;return{$message:Wi(g)?u.computed(()=>g(im({$pending:d,$invalid:p,$params:im(h),$model:t,$response:m,$validator:i,$propertyPath:s,$property:c}))):g||"",$params:h,$pending:d,$invalid:p,$response:m,$unwatch:v}}function _Q(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=u.unref(e),a=Object.keys(t),r={},n={},i={};let c=null;return a.forEach(s=>{const o=t[s];switch(!0){case Wi(o.$validator):r[s]=o;break;case Wi(o):r[s]={$validator:o};break;case s==="$validationGroups":c=o;break;case s.startsWith("$"):i[s]=o;break;default:n[s]=o}}),{rules:r,nestedValidators:n,config:i,validationGroups:c}}const HQ="__root";function SQ(e,t,a,r,n,i,c,s,o){const l=Object.keys(e),f=r.get(n,e),d=u.ref(!1),h=u.ref(!1),m=u.ref(0);if(f){if(!f.$partial)return f;f.$unwatch(),d.value=f.$dirty.value}const p={$dirty:d,$path:n,$touch:()=>{d.value||(d.value=!0)},$reset:()=>{d.value&&(d.value=!1)},$commit:()=>{}};return l.length?(l.forEach(v=>{p[v]=wQ(e[v],t,p.$dirty,i,c,v,a,n,o,h,m)}),p.$externalResults=u.computed(()=>s.value?[].concat(s.value).map((v,g)=>({$propertyPath:n,$property:a,$validator:"$externalResults",$uid:`${n}-externalResult-${g}`,$message:v,$params:{},$response:null,$pending:!1})):[]),p.$invalid=u.computed(()=>{const v=l.some(g=>u.unref(p[g].$invalid));return h.value=v,!!p.$externalResults.value.length||v}),p.$pending=u.computed(()=>l.some(v=>u.unref(p[v].$pending))),p.$error=u.computed(()=>p.$dirty.value?p.$pending.value||p.$invalid.value:!1),p.$silentErrors=u.computed(()=>l.filter(v=>u.unref(p[v].$invalid)).map(v=>{const g=p[v];return u.reactive({$propertyPath:n,$property:a,$validator:v,$uid:`${n}-${v}`,$message:g.$message,$params:g.$params,$response:g.$response,$pending:g.$pending})}).concat(p.$externalResults.value)),p.$errors=u.computed(()=>p.$dirty.value?p.$silentErrors.value:[]),p.$unwatch=()=>l.forEach(v=>{p[v].$unwatch()}),p.$commit=()=>{h.value=!0,m.value=Date.now()},r.set(n,e,p),p):(f&&r.set(n,e,p),p)}function LQ(e,t,a,r,n,i,c){const s=Object.keys(e);return s.length?s.reduce((o,l)=>(o[l]=Bo({validations:e[l],state:t,key:l,parentKey:a,resultsCache:r,globalConfig:n,instance:i,externalResults:c}),o),{}):{}}function kQ(e,t,a){const r=u.computed(()=>[t,a].filter(p=>p).reduce((p,v)=>p.concat(Object.values(u.unref(v))),[])),n=u.computed({get(){return e.$dirty.value||(r.value.length?r.value.every(p=>p.$dirty):!1)},set(p){e.$dirty.value=p}}),i=u.computed(()=>{const p=u.unref(e.$silentErrors)||[],v=r.value.filter(g=>(u.unref(g).$silentErrors||[]).length).reduce((g,y)=>g.concat(...y.$silentErrors),[]);return p.concat(v)}),c=u.computed(()=>{const p=u.unref(e.$errors)||[],v=r.value.filter(g=>(u.unref(g).$errors||[]).length).reduce((g,y)=>g.concat(...y.$errors),[]);return p.concat(v)}),s=u.computed(()=>r.value.some(p=>p.$invalid)||u.unref(e.$invalid)||!1),o=u.computed(()=>r.value.some(p=>u.unref(p.$pending))||u.unref(e.$pending)||!1),l=u.computed(()=>r.value.some(p=>p.$dirty)||r.value.some(p=>p.$anyDirty)||n.value),f=u.computed(()=>n.value?o.value||s.value:!1),d=()=>{e.$touch(),r.value.forEach(p=>{p.$touch()})},h=()=>{e.$commit(),r.value.forEach(p=>{p.$commit()})},m=()=>{e.$reset(),r.value.forEach(p=>{p.$reset()})};return r.value.length&&r.value.every(p=>p.$dirty)&&d(),{$dirty:n,$errors:c,$invalid:s,$anyDirty:l,$error:f,$pending:o,$touch:d,$reset:m,$silentErrors:i,$commit:h}}function Bo(e){let{validations:t,state:a,key:r,parentKey:n,childResults:i,resultsCache:c,globalConfig:s={},instance:o,externalResults:l}=e;const f=n?`${n}.${r}`:r,{rules:d,nestedValidators:h,config:m,validationGroups:p}=_Q(t),v=K4(K4({},s),m),g=r?u.computed(()=>{const Y=u.unref(a);return Y?u.unref(Y[r]):void 0}):a,y=K4({},u.unref(l)||{}),x=u.computed(()=>{const Y=u.unref(l);return r?Y?u.unref(Y[r]):void 0:Y}),C=SQ(d,g,r,c,f,v,o,x,a),b=LQ(h,g,f,c,v,o,x),M={};p&&Object.entries(p).forEach(Y=>{let[D,V]=Y;M[D]={$invalid:ds(V,b,"$invalid"),$error:ds(V,b,"$error"),$pending:ds(V,b,"$pending"),$errors:sm(V,b,"$errors"),$silentErrors:sm(V,b,"$silentErrors")}});const{$dirty:w,$errors:z,$invalid:_,$anyDirty:S,$error:k,$pending:H,$touch:L,$reset:A,$silentErrors:N,$commit:E}=kQ(C,b,i),R=r?u.computed({get:()=>u.unref(g),set:Y=>{w.value=!0;const D=u.unref(a),V=u.unref(l);V&&(V[r]=y[r]),u.isRef(D[r])?D[r].value=Y:D[r]=Y}}):null;r&&v.$autoDirty&&u.watch(g,()=>{w.value||L();const Y=u.unref(l);Y&&(Y[r]=y[r])},{flush:"sync"});async function P(){return L(),v.$rewardEarly&&(E(),await u.nextTick()),await u.nextTick(),new Promise(Y=>{if(!H.value)return Y(!_.value);const D=u.watch(H,()=>{Y(!_.value),D()})})}function X(Y){return(i.value||{})[Y]}function B(){u.isRef(l)?l.value=y:Object.keys(y).length===0?Object.keys(l).forEach(Y=>{delete l[Y]}):Object.assign(l,y)}return u.reactive(K4(K4(K4({},C),{},{$model:R,$dirty:w,$error:k,$errors:z,$invalid:_,$anyDirty:S,$pending:H,$touch:L,$reset:A,$path:f||HQ,$silentErrors:N,$validate:P,$commit:E},i&&{$getResultsForChild:X,$clearExternalResults:B,$validationGroups:M}),b))}class AQ{constructor(){this.storage=new Map}set(t,a,r){this.storage.set(t,{rules:a,result:r})}checkRulesValidity(t,a,r){const n=Object.keys(r),i=Object.keys(a);return i.length!==n.length||!i.every(s=>n.includes(s))?!1:i.every(s=>a[s].$params?Object.keys(a[s].$params).every(o=>u.unref(r[s].$params[o])===u.unref(a[s].$params[o])):!0)}get(t,a){const r=this.storage.get(t);if(!r)return;const{rules:n,result:i}=r,c=this.checkRulesValidity(t,a,n),s=i.$unwatch?i.$unwatch:()=>({});return c?i:{$dirty:i.$dirty,$partial:!0,$unwatch:s}}}const di={COLLECT_ALL:!0,COLLECT_NONE:!1},om=Symbol("vuelidate#injectChildResults"),lm=Symbol("vuelidate#removeChildResults");function VQ(e){let{$scope:t,instance:a}=e;const r={},n=u.ref([]),i=u.computed(()=>n.value.reduce((f,d)=>(f[d]=u.unref(r[d]),f),{}));function c(f,d){let{$registerAs:h,$scope:m,$stopPropagation:p}=d;p||t===di.COLLECT_NONE||m===di.COLLECT_NONE||t!==di.COLLECT_ALL&&t!==m||(r[h]=f,n.value.push(h))}a.__vuelidateInjectInstances=[].concat(a.__vuelidateInjectInstances||[],c);function s(f){n.value=n.value.filter(d=>d!==f),delete r[f]}a.__vuelidateRemoveInstances=[].concat(a.__vuelidateRemoveInstances||[],s);const o=u.inject(om,[]);u.provide(om,a.__vuelidateInjectInstances);const l=u.inject(lm,[]);return u.provide(lm,a.__vuelidateRemoveInstances),{childResults:i,sendValidationResultsToParent:o,removeValidationResultsFromParent:l}}function Xx(e){return new Proxy(e,{get(t,a){return typeof t[a]=="object"?Xx(t[a]):u.computed(()=>t[a])}})}let fm=0;function TQ(e,t){var a;let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(r=e,e=void 0,t=void 0);let{$registerAs:n,$scope:i=di.COLLECT_ALL,$stopPropagation:c,$externalResults:s,currentVueInstance:o}=r;const l=o||((a=u.getCurrentInstance())===null||a===void 0?void 0:a.proxy),f=l?l.$options:{};n||(fm+=1,n=`_vuelidate_${fm}`);const d=u.ref({}),h=new AQ,{childResults:m,sendValidationResultsToParent:p,removeValidationResultsFromParent:v}=l?VQ({$scope:i,instance:l}):{childResults:u.ref({})};if(!e&&f.validations){const g=f.validations;t=u.ref({}),u.onBeforeMount(()=>{t.value=l,u.watch(()=>Wi(g)?g.call(t.value,new Xx(t.value)):g,y=>{d.value=Bo({validations:y,state:t,childResults:m,resultsCache:h,globalConfig:r,instance:l,externalResults:s||l.vuelidateExternalResults})},{immediate:!0})}),r=f.validationsConfig||r}else{const g=u.isRef(e)||CQ(e)?e:u.reactive(e||{});u.watch(g,y=>{d.value=Bo({validations:y,state:t,childResults:m,resultsCache:h,globalConfig:r,instance:l??{},externalResults:s})},{immediate:!0})}return l&&(p.forEach(g=>g(d,{$registerAs:n,$scope:i,$stopPropagation:c})),u.onBeforeUnmount(()=>v.forEach(g=>g(n)))),u.computed(()=>K4(K4({},u.unref(d.value)),m.value))}function um(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function ln(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?um(Object(a),!0).forEach(function(r){EQ(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):um(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function EQ(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Gi(e){return typeof e=="function"}function Io(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function j8(e){return Gi(e.$validator)?ln({},e):{$validator:e}}function Kx(e){return typeof e=="object"?e.$valid:e}function Zx(e){return e.$validator||e}function NQ(e,t){if(!Io(e))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);if(!Io(t)&&!Gi(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=j8(t);return a.$params=ln(ln({},a.$params||{}),e),a}function OQ(e,t){if(!Gi(e)&&typeof u.unref(e)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof e}`);if(!Io(t)&&!Gi(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=j8(t);return a.$message=e,a}function PQ(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const a=j8(e);return ln(ln({},a),{},{$async:!0,$watchTargets:t})}function DQ(e){return{$validator(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),n=1;n<a;n++)r[n-1]=arguments[n];return u.unref(t).reduce((i,c,s)=>{const o=Object.entries(c).reduce((l,f)=>{let[d,h]=f;const m=e[d]||{},p=Object.entries(m).reduce((v,g)=>{let[y,x]=g;const b=Zx(x).call(this,h,c,s,...r),M=Kx(b);if(v.$data[y]=b,v.$data.$invalid=!M||!!v.$data.$invalid,v.$data.$error=v.$data.$invalid,!M){let w=x.$message||"";const z=x.$params||{};typeof w=="function"&&(w=w({$pending:!1,$invalid:!M,$params:z,$model:h,$response:b})),v.$errors.push({$property:d,$message:w,$params:z,$response:b,$model:h,$pending:!1,$validator:y})}return{$valid:v.$valid&&M,$data:v.$data,$errors:v.$errors}},{$valid:!0,$data:{},$errors:[]});return l.$data[d]=p.$data,l.$errors[d]=p.$errors,{$valid:l.$valid&&p.$valid,$data:l.$data,$errors:l.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:i.$valid&&o.$valid,$data:i.$data.concat(o.$data),$errors:i.$errors.concat(o.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:t=>{let{$response:a}=t;return a?a.$errors.map(r=>Object.values(r).map(n=>n.map(i=>i.$message)).reduce((n,i)=>n.concat(i),[])):[]}}}const Dn=e=>{if(e=u.unref(e),Array.isArray(e))return!!e.length;if(e==null)return!1;if(e===!1)return!0;if(e instanceof Date)return!isNaN(e.getTime());if(typeof e=="object"){for(let t in e)return!0;return!1}return!!String(e).length},Nl=e=>(e=u.unref(e),Array.isArray(e)?e.length:typeof e=="object"?Object.keys(e).length:String(e).length);function k0(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return r=>(r=u.unref(r),!Dn(r)||t.every(n=>(n.lastIndex=0,n.test(r))))}var fn=Object.freeze({__proto__:null,forEach:DQ,len:Nl,normalizeValidatorObject:j8,regex:k0,req:Dn,unwrap:u.unref,unwrapNormalizedValidator:Zx,unwrapValidatorResponse:Kx,withAsync:PQ,withMessage:OQ,withParams:NQ});k0(/^[a-zA-Z]*$/);k0(/^[a-zA-Z0-9]*$/);k0(/^\d*(\.\d+)?$/);const RQ=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;k0(RQ);function FQ(e){return t=>!Dn(t)||Nl(t)<=u.unref(e)}function BQ(e){return{$validator:FQ(e),$message:t=>{let{$params:a}=t;return`The maximum length allowed is ${a.max}`},$params:{max:e,type:"maxLength"}}}function IQ(e){return t=>!Dn(t)||Nl(t)>=u.unref(e)}function $Q(e){return{$validator:IQ(e),$message:t=>{let{$params:a}=t;return`This field should be at least ${a.min} characters long`},$params:{min:e,type:"minLength"}}}function UQ(e){return typeof e=="string"&&(e=e.trim()),Dn(e)}var qQ={$validator:UQ,$message:"Value is required",$params:{type:"required"}};const jQ=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;k0(jQ);var WQ=k0(/(^[0-9]*$)|(^-[0-9]+$)/),GQ={$validator:WQ,$message:"Value is not an integer",$params:{type:"integer"}};k0(/^[-]?\d*(\.\d+)?$/);const W8=ae("validations"),$o=fn.withMessage(()=>W8("requiredRuleError"),qQ),Uo=e=>Qx("minLength",e),qo=e=>Qx("maxLength",e),YQ=fn.withMessage(()=>W8("integerRuleError"),GQ),XQ=e=>G8("lessEqual",e),KQ=e=>G8("greaterEqual",e),ZQ=e=>G8("lessThan",e),QQ=e=>G8("greaterThan",e);function Qx(e,t){const a={minLength:$Q,maxLength:BQ};return fn.withMessage(()=>W8(`${e}RuleError`,{length:t}),a[e](t))}function G8(e,t){const a={lessEqual:r=>r<=t,greaterEqual:r=>r>=t,lessThan:r=>r<t,greaterThan:r=>r>t};return fn.withMessage(()=>W8(`${e}RuleError`,{number:t}),fn.withParams({},r=>typeof r!="number"?!0:a[e](r)))}const JQ=u.defineComponent({__name:"PgaInputRightButton",props:{icon:{},withBackground:{type:Boolean}},setup(e){u.useCssVars(a=>({"67ed61c8":u.unref(t).input.height,"2e4c448c":u.unref(t).input.iconWidth,"01e1e082":u.unref(t).input.borderRadius,"745f0de4":u.unref(t).input.backgroundColorFocus,"747b8248":u.unref(t).input.backgroundColorHover}));const{form:t}=Mt();return(a,r)=>(u.openBlock(),u.createBlock(j2,{class:u.normalizeClass(["input-right-button",{"input-right-button__with-background":a.withBackground}]),variant:"flat",icon:a.icon,tabindex:"-1"},null,8,["class","icon"]))}});const Yi=X1(JQ,[["__scopeId","data-v-faa2f056"]]),eJ={class:"input-container"},tJ={class:"input-content"},aJ=["type","placeholder","autofocus","disabled"],hs="",rJ=u.defineComponent({__name:"PgaInput",props:u.mergeModels({type:{default:"text"},integer:{type:Boolean},placeholder:{},label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},autofocus:{type:Boolean},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:u.mergeModels(["change","enter","valueCleared"],["update:modelValue"]),setup(e,{expose:t,emit:a}){u.useCssVars(b=>({80752488:u.unref(c).input.height,"4e021bc8":u.unref(c).input.padding,a1a7eeca:u.unref(c).input.paddingWithIcon,"02743f22":u.unref(c).input.borderColor,"64e354b3":u.unref(c).input.borderRadius,"6da171e0":u.unref(c).input.backgroundColor,"526ee54a":u.unref(c).input.colorFocus,"4182307c":u.unref(c).input.backgroundColorDisabled,c36bdff6:u.unref(c).input.placeholderColor}));const r=u.useModel(e,"modelValue"),n=e,i=a;t({focus:h});const{form:c}=Mt(),s=u.ref(),o=u.ref(hs),l=u.ref(!1),f=u.computed(()=>n.type==="password"),d=u.computed(()=>f.value?!1:!!(!n.disabled&&o.value));u.watch(r,b=>x(b),{immediate:!0});function h(){var b;(b=s.value)==null||b.focus()}function m(){n.type==="number"&&!o.value&&(o.value=hs)}function p(){n.type==="number"&&!o.value&&(o.value=y())}function v(){C(hs),i("valueCleared")}function g(b){return b===""?null:n.type==="number"&&n.integer&&typeof b=="number"?Math.round(b):b}function y(b){const M=typeof b>"u"?r.value:b;return M===null?"":M}function x(b){const M=g(b);return r.value=M,o.value=y(M),M}function C(b){const M=x(b);i("change",M)}return(b,M)=>(u.openBlock(),u.createBlock(It,{label:b.label,withOptionalLabel:b.withOptionalLabel,withLabelSpace:b.withLabelSpace,errors:b.errors,grow:b.grow},{default:u.withCtx(()=>[u.createElementVNode("div",eJ,[u.createElementVNode("div",tJ,[u.withDirectives(u.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":M[0]||(M[0]=w=>o.value=w),class:u.normalizeClass(["input",{input__disabled:b.disabled}]),type:l.value?"text":b.type,placeholder:u.unref(v0)(b.placeholder),autofocus:b.autofocus,disabled:b.disabled,onInput:M[1]||(M[1]=w=>C(o.value)),onKeyup:M[2]||(M[2]=u.withKeys(w=>i("enter"),["enter"])),onFocus:M[3]||(M[3]=w=>m()),onBlur:M[4]||(M[4]=w=>p())},null,42,aJ),[[u.vModelDynamic,o.value]]),f.value?(u.openBlock(),u.createBlock(Yi,{key:0,icon:l.value?"eye-slash":"eye",withBackground:"",onClick:M[5]||(M[5]=w=>l.value=!l.value)},null,8,["icon"])):d.value?(u.openBlock(),u.createBlock(Yi,{key:1,icon:"xmark",onClick:M[6]||(M[6]=w=>v())})):u.createCommentVNode("",!0)]),u.renderSlot(b.$slots,"labelRight",{},void 0,!0)])]),_:3},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const Xi=X1(rJ,[["__scopeId","data-v-42fd19ba"]]),nJ={class:"login-form-container"},cJ={class:"user-icon-container"},iJ=u.defineComponent({__name:"PgaLoginForm",setup(e){class t{constructor(){z1(this,"username","");z1(this,"password","")}}const a=fe.getConfig(),r=Pr.useRoute(),n=ae("pgaLoginForm"),i={username:{requiredRule:$o,minLengthRule:Uo(8),maxLengthRule:qo(a.stringLengths.short)},password:{requiredRule:$o,minLengthRule:Uo(8),maxLengthRule:qo(a.stringLengths.short)}},c=u.ref(new t),s=TQ(i,c),o=u.ref(!1);async function l(){if(!await s.value.$validate())return;const f={isLoadingRef:o,redirectToName:r.query.redirectTo};tv(Kt().currentRouteType,c.value,f)}return(f,d)=>(u.openBlock(),u.createElementBlock("div",nJ,[u.createVNode(qx,{class:"login-form"},{default:u.withCtx(()=>[u.createElementVNode("div",cJ,[u.createVNode(We,{class:"user-icon",icon:"user"})]),u.createVNode(Xi,{modelValue:c.value.username,"onUpdate:modelValue":d[0]||(d[0]=h=>c.value.username=h),label:u.unref(n)("usernameLabel"),errors:u.unref(s).username.$errors,disabled:o.value},null,8,["modelValue","label","errors","disabled"]),u.createVNode(Xi,{modelValue:c.value.password,"onUpdate:modelValue":d[1]||(d[1]=h=>c.value.password=h),type:"password",label:u.unref(n)("passwordLabel"),errors:u.unref(s).password.$errors,disabled:o.value},null,8,["modelValue","label","errors","disabled"]),u.createVNode(jx,{icon:"right-to-bracket",text:u.unref(n)("loginBtn"),isLoading:o.value,onClick:d[2]||(d[2]=h=>l())},null,8,["text","isLoading"])]),_:1})]))}});const sJ=X1(iJ,[["__scopeId","data-v-082ea400"]]),oJ={class:"pga-checkbox"},lJ=["textContent"],fJ=u.defineComponent({__name:"PgaCheckbox",props:u.mergeModels({label:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=u.useModel(e,"modelValue");return(a,r)=>(u.openBlock(),u.createElementBlock("label",oJ,[u.withDirectives(u.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=n=>t.value=n),type:"checkbox"},null,512),[[u.vModelCheckbox,t.value]]),a.label?(u.openBlock(),u.createElementBlock("span",{key:0,class:"checkbox--label",textContent:u.toDisplayString(a.label)},null,8,lJ)):u.createCommentVNode("",!0)]))}});const uJ=X1(fJ,[["__scopeId","data-v-89f11c66"]]),dJ={class:"colors-container"},hJ=u.defineComponent({__name:"PgaColorSelector",props:u.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){u.useCssVars(n=>({"7c4ec157":u.unref(a).input.padding,"62f80e46":u.unref(a).input.borderColor,"1acad258":u.unref(a).input.borderRadius}));const t=u.useModel(e,"modelValue"),{form:a}=Mt();function r(n){var i;return((i=t.value)==null?void 0:i.toLowerCase())===n.toLowerCase()}return(n,i)=>(u.openBlock(),u.createBlock(It,{label:n.label,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,errors:n.errors,grow:n.grow},{default:u.withCtx(()=>[u.createElementVNode("div",dJ,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(u.unref(Kp),c=>(u.openBlock(),u.createBlock(j2,{key:c,variant:r(c)?"outlined":"flat",color:r(c)?"primary":"first",disabled:n.disabled,onClick:s=>t.value=c},{default:u.withCtx(()=>[u.createVNode(py,{color:c},null,8,["color"])]),_:2},1032,["variant","color","disabled","onClick"]))),128))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const mJ=X1(hJ,[["__scopeId","data-v-62412458"]]);function t2(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function N2(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function u3(e,t){const a=t2(e);return isNaN(t)?N2(e,NaN):(t&&a.setDate(a.getDate()+t),a)}function M3(e,t){const a=t2(e);if(isNaN(t))return N2(e,NaN);if(!t)return a;const r=a.getDate(),n=N2(e,a.getTime());n.setMonth(a.getMonth()+t+1,0);const i=n.getDate();return r>=i?n:(a.setFullYear(n.getFullYear(),n.getMonth(),r),a)}function Jx(e,t){const{years:a=0,months:r=0,weeks:n=0,days:i=0,hours:c=0,minutes:s=0,seconds:o=0}=t,l=t2(e),f=r||a?M3(l,r+a*12):l,d=i||n?u3(f,i+n*7):f,h=s+c*60,p=(o+h*60)*1e3;return N2(e,d.getTime()+p)}function pJ(e,t){const a=+t2(e);return N2(e,a+t)}const eb=6048e5,vJ=864e5,gJ=6e4,tb=36e5,yJ=1e3;function xJ(e,t){return pJ(e,t*tb)}let bJ={};function _a(){return bJ}function L3(e,t){var s,o,l,f;const a=_a(),r=(t==null?void 0:t.weekStartsOn)??((o=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:o.weekStartsOn)??a.weekStartsOn??((f=(l=a.locale)==null?void 0:l.options)==null?void 0:f.weekStartsOn)??0,n=t2(e),i=n.getDay(),c=(i<r?7:0)+i-r;return n.setDate(n.getDate()-c),n.setHours(0,0,0,0),n}function p6(e){return L3(e,{weekStartsOn:1})}function ab(e){const t=t2(e),a=t.getFullYear(),r=N2(e,0);r.setFullYear(a+1,0,4),r.setHours(0,0,0,0);const n=p6(r),i=N2(e,0);i.setFullYear(a,0,4),i.setHours(0,0,0,0);const c=p6(i);return t.getTime()>=n.getTime()?a+1:t.getTime()>=c.getTime()?a:a-1}function dm(e){const t=t2(e);return t.setHours(0,0,0,0),t}function Ki(e){const t=t2(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}function rb(e,t){const a=dm(e),r=dm(t),n=+a-Ki(a),i=+r-Ki(r);return Math.round((n-i)/vJ)}function CJ(e){const t=ab(e),a=N2(e,0);return a.setFullYear(t,0,4),a.setHours(0,0,0,0),p6(a)}function MJ(e,t){const a=t*3;return M3(e,a)}function Ol(e,t){return M3(e,t*12)}function nb(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _r(e){if(!nb(e)&&typeof e!="number")return!1;const t=t2(e);return!isNaN(Number(t))}function hm(e){const t=t2(e);return Math.trunc(t.getMonth()/3)+1}function cb(e,t){const a=t2(e.start),r=t2(e.end);let n=+a>+r;const i=n?+a:+r,c=n?r:a;c.setHours(0,0,0,0);let s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,n=!n);const o=[];for(;+c<=i;)o.push(t2(c)),c.setDate(c.getDate()+s),c.setHours(0,0,0,0);return n?o.reverse():o}function Z0(e){const t=t2(e),a=t.getMonth(),r=a-a%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function zJ(e,t){const a=t2(e.start),r=t2(e.end);let n=+a>+r;const i=n?+Z0(a):+Z0(r);let c=Z0(n?r:a),s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,n=!n);const o=[];for(;+c<=i;)o.push(t2(c)),c=MJ(c,s);return n?o.reverse():o}function ib(e){const t=t2(e),a=t.getFullYear();return t.setFullYear(a+1,0,0),t.setHours(23,59,59,999),t}function Pl(e){const t=t2(e),a=N2(e,0);return a.setFullYear(t.getFullYear(),0,1),a.setHours(0,0,0,0),a}function sb(e,t){var s,o,l,f;const a=_a(),r=(t==null?void 0:t.weekStartsOn)??((o=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:o.weekStartsOn)??a.weekStartsOn??((f=(l=a.locale)==null?void 0:l.options)==null?void 0:f.weekStartsOn)??0,n=t2(e),i=n.getDay(),c=(i<r?-7:0)+6-(i-r);return n.setDate(n.getDate()+c),n.setHours(23,59,59,999),n}function mm(e){const t=t2(e),a=t.getMonth(),r=a-a%3+3;return t.setMonth(r,0),t.setHours(23,59,59,999),t}const wJ={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_J=(e,t,a)=>{let r;const n=wJ[e];return typeof n=="string"?r=n:t===1?r=n.one:r=n.other.replace("{{count}}",t.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+r:r+" ago":r};function ms(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}const HJ={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},SJ={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},LJ={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},kJ={date:ms({formats:HJ,defaultWidth:"full"}),time:ms({formats:SJ,defaultWidth:"full"}),dateTime:ms({formats:LJ,defaultWidth:"full"})},AJ={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},VJ=(e,t,a,r)=>AJ[e];function X6(e){return(t,a)=>{const r=a!=null&&a.context?String(a.context):"standalone";let n;if(r==="formatting"&&e.formattingValues){const c=e.defaultFormattingWidth||e.defaultWidth,s=a!=null&&a.width?String(a.width):c;n=e.formattingValues[s]||e.formattingValues[c]}else{const c=e.defaultWidth,s=a!=null&&a.width?String(a.width):e.defaultWidth;n=e.values[s]||e.values[c]}const i=e.argumentCallback?e.argumentCallback(t):t;return n[i]}}const TJ={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},EJ={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},NJ={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},OJ={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},PJ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},DJ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},RJ=(e,t)=>{const a=Number(e),r=a%100;if(r>20||r<10)switch(r%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},FJ={ordinalNumber:RJ,era:X6({values:TJ,defaultWidth:"wide"}),quarter:X6({values:EJ,defaultWidth:"wide",argumentCallback:e=>e-1}),month:X6({values:NJ,defaultWidth:"wide"}),day:X6({values:OJ,defaultWidth:"wide"}),dayPeriod:X6({values:PJ,defaultWidth:"wide",formattingValues:DJ,defaultFormattingWidth:"wide"})};function K6(e){return(t,a={})=>{const r=a.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;const c=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],o=Array.isArray(s)?IJ(s,d=>d.test(c)):BJ(s,d=>d.test(c));let l;l=e.valueCallback?e.valueCallback(o):o,l=a.valueCallback?a.valueCallback(l):l;const f=t.slice(c.length);return{value:l,rest:f}}}function BJ(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}function IJ(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}function $J(e){return(t,a={})=>{const r=t.match(e.matchPattern);if(!r)return null;const n=r[0],i=t.match(e.parsePattern);if(!i)return null;let c=e.valueCallback?e.valueCallback(i[0]):i[0];c=a.valueCallback?a.valueCallback(c):c;const s=t.slice(n.length);return{value:c,rest:s}}}const UJ=/^(\d+)(th|st|nd|rd)?/i,qJ=/\d+/i,jJ={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},WJ={any:[/^b/i,/^(a|c)/i]},GJ={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},YJ={any:[/1/i,/2/i,/3/i,/4/i]},XJ={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},KJ={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ZJ={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},QJ={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},JJ={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},e11={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},t11={ordinalNumber:$J({matchPattern:UJ,parsePattern:qJ,valueCallback:e=>parseInt(e,10)}),era:K6({matchPatterns:jJ,defaultMatchWidth:"wide",parsePatterns:WJ,defaultParseWidth:"any"}),quarter:K6({matchPatterns:GJ,defaultMatchWidth:"wide",parsePatterns:YJ,defaultParseWidth:"any",valueCallback:e=>e+1}),month:K6({matchPatterns:XJ,defaultMatchWidth:"wide",parsePatterns:KJ,defaultParseWidth:"any"}),day:K6({matchPatterns:ZJ,defaultMatchWidth:"wide",parsePatterns:QJ,defaultParseWidth:"any"}),dayPeriod:K6({matchPatterns:JJ,defaultMatchWidth:"any",parsePatterns:e11,defaultParseWidth:"any"})},ob={code:"en-US",formatDistance:_J,formatLong:kJ,formatRelative:VJ,localize:FJ,match:t11,options:{weekStartsOn:0,firstWeekContainsDate:1}};function a11(e){const t=t2(e);return rb(t,Pl(t))+1}function Dl(e){const t=t2(e),a=+p6(t)-+CJ(t);return Math.round(a/eb)+1}function Rl(e,t){var f,d,h,m;const a=t2(e),r=a.getFullYear(),n=_a(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(h=n.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,c=N2(e,0);c.setFullYear(r+1,0,i),c.setHours(0,0,0,0);const s=L3(c,t),o=N2(e,0);o.setFullYear(r,0,i),o.setHours(0,0,0,0);const l=L3(o,t);return a.getTime()>=s.getTime()?r+1:a.getTime()>=l.getTime()?r:r-1}function r11(e,t){var s,o,l,f;const a=_a(),r=(t==null?void 0:t.firstWeekContainsDate)??((o=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:o.firstWeekContainsDate)??a.firstWeekContainsDate??((f=(l=a.locale)==null?void 0:l.options)==null?void 0:f.firstWeekContainsDate)??1,n=Rl(e,t),i=N2(e,0);return i.setFullYear(n,0,r),i.setHours(0,0,0,0),L3(i,t)}function Fl(e,t){const a=t2(e),r=+L3(a,t)-+r11(a,t);return Math.round(r/eb)+1}function D2(e,t){const a=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return a+r}const q4={y(e,t){const a=e.getFullYear(),r=a>0?a:1-a;return D2(t==="yy"?r%100:r,t.length)},M(e,t){const a=e.getMonth();return t==="M"?String(a+1):D2(a+1,2)},d(e,t){return D2(e.getDate(),t.length)},a(e,t){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(e,t){return D2(e.getHours()%12||12,t.length)},H(e,t){return D2(e.getHours(),t.length)},m(e,t){return D2(e.getMinutes(),t.length)},s(e,t){return D2(e.getSeconds(),t.length)},S(e,t){const a=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,a-3));return D2(n,t.length)}},Fa={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},pm={G:function(e,t,a){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})}},y:function(e,t,a){if(t==="yo"){const r=e.getFullYear(),n=r>0?r:1-r;return a.ordinalNumber(n,{unit:"year"})}return q4.y(e,t)},Y:function(e,t,a,r){const n=Rl(e,r),i=n>0?n:1-n;if(t==="YY"){const c=i%100;return D2(c,2)}return t==="Yo"?a.ordinalNumber(i,{unit:"year"}):D2(i,t.length)},R:function(e,t){const a=ab(e);return D2(a,t.length)},u:function(e,t){const a=e.getFullYear();return D2(a,t.length)},Q:function(e,t,a){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return D2(r,2);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,a){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return D2(r,2);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,a){const r=e.getMonth();switch(t){case"M":case"MM":return q4.M(e,t);case"Mo":return a.ordinalNumber(r+1,{unit:"month"});case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,a){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return D2(r+1,2);case"Lo":return a.ordinalNumber(r+1,{unit:"month"});case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,a,r){const n=Fl(e,r);return t==="wo"?a.ordinalNumber(n,{unit:"week"}):D2(n,t.length)},I:function(e,t,a){const r=Dl(e);return t==="Io"?a.ordinalNumber(r,{unit:"week"}):D2(r,t.length)},d:function(e,t,a){return t==="do"?a.ordinalNumber(e.getDate(),{unit:"date"}):q4.d(e,t)},D:function(e,t,a){const r=a11(e);return t==="Do"?a.ordinalNumber(r,{unit:"dayOfYear"}):D2(r,t.length)},E:function(e,t,a){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,a,r){const n=e.getDay(),i=(n-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return D2(i,2);case"eo":return a.ordinalNumber(i,{unit:"day"});case"eee":return a.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(n,{width:"short",context:"formatting"});case"eeee":default:return a.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,a,r){const n=e.getDay(),i=(n-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return D2(i,t.length);case"co":return a.ordinalNumber(i,{unit:"day"});case"ccc":return a.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(n,{width:"narrow",context:"standalone"});case"cccccc":return a.day(n,{width:"short",context:"standalone"});case"cccc":default:return a.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,a){const r=e.getDay(),n=r===0?7:r;switch(t){case"i":return String(n);case"ii":return D2(n,t.length);case"io":return a.ordinalNumber(n,{unit:"day"});case"iii":return a.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(r,{width:"short",context:"formatting"});case"iiii":default:return a.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,a){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,a){const r=e.getHours();let n;switch(r===12?n=Fa.noon:r===0?n=Fa.midnight:n=r/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,a){const r=e.getHours();let n;switch(r>=17?n=Fa.evening:r>=12?n=Fa.afternoon:r>=4?n=Fa.morning:n=Fa.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,a){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),a.ordinalNumber(r,{unit:"hour"})}return q4.h(e,t)},H:function(e,t,a){return t==="Ho"?a.ordinalNumber(e.getHours(),{unit:"hour"}):q4.H(e,t)},K:function(e,t,a){const r=e.getHours()%12;return t==="Ko"?a.ordinalNumber(r,{unit:"hour"}):D2(r,t.length)},k:function(e,t,a){let r=e.getHours();return r===0&&(r=24),t==="ko"?a.ordinalNumber(r,{unit:"hour"}):D2(r,t.length)},m:function(e,t,a){return t==="mo"?a.ordinalNumber(e.getMinutes(),{unit:"minute"}):q4.m(e,t)},s:function(e,t,a){return t==="so"?a.ordinalNumber(e.getSeconds(),{unit:"second"}):q4.s(e,t)},S:function(e,t){return q4.S(e,t)},X:function(e,t,a){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return gm(r);case"XXXX":case"XX":return q0(r);case"XXXXX":case"XXX":default:return q0(r,":")}},x:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"x":return gm(r);case"xxxx":case"xx":return q0(r);case"xxxxx":case"xxx":default:return q0(r,":")}},O:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+vm(r,":");case"OOOO":default:return"GMT"+q0(r,":")}},z:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+vm(r,":");case"zzzz":default:return"GMT"+q0(r,":")}},t:function(e,t,a){const r=Math.trunc(e.getTime()/1e3);return D2(r,t.length)},T:function(e,t,a){const r=e.getTime();return D2(r,t.length)}};function vm(e,t=""){const a=e>0?"-":"+",r=Math.abs(e),n=Math.trunc(r/60),i=r%60;return i===0?a+String(n):a+String(n)+t+D2(i,2)}function gm(e,t){return e%60===0?(e>0?"-":"+")+D2(Math.abs(e)/60,2):q0(e,t)}function q0(e,t=""){const a=e>0?"-":"+",r=Math.abs(e),n=D2(Math.trunc(r/60),2),i=D2(r%60,2);return a+n+t+i}const ym=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},lb=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},n11=(e,t)=>{const a=e.match(/(P+)(p+)?/)||[],r=a[1],n=a[2];if(!n)return ym(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",ym(r,t)).replace("{{time}}",lb(n,t))},jo={p:lb,P:n11},c11=/^D+$/,i11=/^Y+$/,s11=["D","DD","YY","YYYY"];function fb(e){return c11.test(e)}function ub(e){return i11.test(e)}function Wo(e,t,a){const r=o11(e,t,a);if(console.warn(r),s11.includes(e))throw new RangeError(r)}function o11(e,t,a){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const l11=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,f11=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,u11=/^'([^]*?)'?$/,d11=/''/g,h11=/[a-zA-Z]/;function X3(e,t,a){var f,d,h,m,p,v,g,y;const r=_a(),n=(a==null?void 0:a.locale)??r.locale??ob,i=(a==null?void 0:a.firstWeekContainsDate)??((d=(f=a==null?void 0:a.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(h=r.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,c=(a==null?void 0:a.weekStartsOn)??((v=(p=a==null?void 0:a.locale)==null?void 0:p.options)==null?void 0:v.weekStartsOn)??r.weekStartsOn??((y=(g=r.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??0,s=t2(e);if(!_r(s))throw new RangeError("Invalid time value");let o=t.match(f11).map(x=>{const C=x[0];if(C==="p"||C==="P"){const b=jo[C];return b(x,n.formatLong)}return x}).join("").match(l11).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const C=x[0];if(C==="'")return{isToken:!1,value:m11(x)};if(pm[C])return{isToken:!0,value:x};if(C.match(h11))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:x}});n.localize.preprocessor&&(o=n.localize.preprocessor(s,o));const l={firstWeekContainsDate:i,weekStartsOn:c,locale:n};return o.map(x=>{if(!x.isToken)return x.value;const C=x.value;(!(a!=null&&a.useAdditionalWeekYearTokens)&&ub(C)||!(a!=null&&a.useAdditionalDayOfYearTokens)&&fb(C))&&Wo(C,t,String(e));const b=pm[C[0]];return b(s,C,n.localize,l)}).join("")}function m11(e){const t=e.match(u11);return t?t[1].replace(d11,"'"):e}function p11(e){return t2(e).getDay()}function v11(e){const t=t2(e),a=t.getFullYear(),r=t.getMonth(),n=N2(e,0);return n.setFullYear(a,r+1,0),n.setHours(0,0,0,0),n.getDate()}function g11(){return Object.assign({},_a())}function O4(e){return t2(e).getHours()}function y11(e){let a=t2(e).getDay();return a===0&&(a=7),a}function w0(e){return t2(e).getMinutes()}function v2(e){return t2(e).getMonth()}function v6(e){return t2(e).getSeconds()}function d2(e){return t2(e).getFullYear()}function g6(e,t){const a=t2(e),r=t2(t);return a.getTime()>r.getTime()}function un(e,t){const a=t2(e),r=t2(t);return+a<+r}function Xa(e,t){const a=t2(e),r=t2(t);return+a==+r}function x11(e,t){const a=t instanceof Date?N2(t,0):new t(0);return a.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),a.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),a}const b11=10;class db{constructor(){z1(this,"subPriority",0)}validate(t,a){return!0}}class C11 extends db{constructor(t,a,r,n,i){super(),this.value=t,this.validateValue=a,this.setValue=r,this.priority=n,i&&(this.subPriority=i)}validate(t,a){return this.validateValue(t,this.value,a)}set(t,a,r){return this.setValue(t,a,this.value,r)}}class M11 extends db{constructor(){super(...arguments);z1(this,"priority",b11);z1(this,"subPriority",-1)}set(a,r){return r.timestampIsSet?a:N2(a,x11(a,Date))}}class O2{run(t,a,r,n){const i=this.parse(t,a,r,n);return i?{setter:new C11(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,a,r){return!0}}class z11 extends O2{constructor(){super(...arguments);z1(this,"priority",140);z1(this,"incompatibleTokens",["R","u","t","T"])}parse(a,r,n){switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})||n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"})}}set(a,r,n){return r.era=n,a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}}const _e={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},I3={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function He(e,t){return e&&{value:t(e.value),rest:e.rest}}function le(e,t){const a=t.match(e);return a?{value:parseInt(a[0],10),rest:t.slice(a[0].length)}:null}function $3(e,t){const a=t.match(e);if(!a)return null;if(a[0]==="Z")return{value:0,rest:t.slice(1)};const r=a[1]==="+"?1:-1,n=a[2]?parseInt(a[2],10):0,i=a[3]?parseInt(a[3],10):0,c=a[5]?parseInt(a[5],10):0;return{value:r*(n*tb+i*gJ+c*yJ),rest:t.slice(a[0].length)}}function hb(e){return le(_e.anyDigitsSigned,e)}function ge(e,t){switch(e){case 1:return le(_e.singleDigit,t);case 2:return le(_e.twoDigits,t);case 3:return le(_e.threeDigits,t);case 4:return le(_e.fourDigits,t);default:return le(new RegExp("^\\d{1,"+e+"}"),t)}}function Zi(e,t){switch(e){case 1:return le(_e.singleDigitSigned,t);case 2:return le(_e.twoDigitsSigned,t);case 3:return le(_e.threeDigitsSigned,t);case 4:return le(_e.fourDigitsSigned,t);default:return le(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Bl(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function mb(e,t){const a=t>0,r=a?t:1-t;let n;if(r<=50)n=e||100;else{const i=r+50,c=Math.trunc(i/100)*100,s=e>=i%100;n=e+c-(s?100:0)}return a?n:1-n}function pb(e){return e%400===0||e%4===0&&e%100!==0}class w11 extends O2{constructor(){super(...arguments);z1(this,"priority",130);z1(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(a,r,n){const i=c=>({year:c,isTwoDigitYear:r==="yy"});switch(r){case"y":return He(ge(4,a),i);case"yo":return He(n.ordinalNumber(a,{unit:"year"}),i);default:return He(ge(r.length,a),i)}}validate(a,r){return r.isTwoDigitYear||r.year>0}set(a,r,n){const i=a.getFullYear();if(n.isTwoDigitYear){const s=mb(n.year,i);return a.setFullYear(s,0,1),a.setHours(0,0,0,0),a}const c=!("era"in r)||r.era===1?n.year:1-n.year;return a.setFullYear(c,0,1),a.setHours(0,0,0,0),a}}class _11 extends O2{constructor(){super(...arguments);z1(this,"priority",130);z1(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(a,r,n){const i=c=>({year:c,isTwoDigitYear:r==="YY"});switch(r){case"Y":return He(ge(4,a),i);case"Yo":return He(n.ordinalNumber(a,{unit:"year"}),i);default:return He(ge(r.length,a),i)}}validate(a,r){return r.isTwoDigitYear||r.year>0}set(a,r,n,i){const c=Rl(a,i);if(n.isTwoDigitYear){const o=mb(n.year,c);return a.setFullYear(o,0,i.firstWeekContainsDate),a.setHours(0,0,0,0),L3(a,i)}const s=!("era"in r)||r.era===1?n.year:1-n.year;return a.setFullYear(s,0,i.firstWeekContainsDate),a.setHours(0,0,0,0),L3(a,i)}}class H11 extends O2{constructor(){super(...arguments);z1(this,"priority",130);z1(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(a,r){return Zi(r==="R"?4:r.length,a)}set(a,r,n){const i=N2(a,0);return i.setFullYear(n,0,4),i.setHours(0,0,0,0),p6(i)}}class S11 extends O2{constructor(){super(...arguments);z1(this,"priority",130);z1(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(a,r){return Zi(r==="u"?4:r.length,a)}set(a,r,n){return a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}}class L11 extends O2{constructor(){super(...arguments);z1(this,"priority",120);z1(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"Q":case"QQ":return ge(r.length,a);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})||n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=1&&r<=4}set(a,r,n){return a.setMonth((n-1)*3,1),a.setHours(0,0,0,0),a}}class k11 extends O2{constructor(){super(...arguments);z1(this,"priority",120);z1(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"q":case"qq":return ge(r.length,a);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})||n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=1&&r<=4}set(a,r,n){return a.setMonth((n-1)*3,1),a.setHours(0,0,0,0),a}}class A11 extends O2{constructor(){super(...arguments);z1(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);z1(this,"priority",110)}parse(a,r,n){const i=c=>c-1;switch(r){case"M":return He(le(_e.month,a),i);case"MM":return He(ge(2,a),i);case"Mo":return He(n.ordinalNumber(a,{unit:"month"}),i);case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})||n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.setMonth(n,1),a.setHours(0,0,0,0),a}}class V11 extends O2{constructor(){super(...arguments);z1(this,"priority",110);z1(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(a,r,n){const i=c=>c-1;switch(r){case"L":return He(le(_e.month,a),i);case"LL":return He(ge(2,a),i);case"Lo":return He(n.ordinalNumber(a,{unit:"month"}),i);case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})||n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.setMonth(n,1),a.setHours(0,0,0,0),a}}function T11(e,t,a){const r=t2(e),n=Fl(r,a)-t;return r.setDate(r.getDate()-n*7),r}class E11 extends O2{constructor(){super(...arguments);z1(this,"priority",100);z1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(a,r,n){switch(r){case"w":return le(_e.week,a);case"wo":return n.ordinalNumber(a,{unit:"week"});default:return ge(r.length,a)}}validate(a,r){return r>=1&&r<=53}set(a,r,n,i){return L3(T11(a,n,i),i)}}function N11(e,t){const a=t2(e),r=Dl(a)-t;return a.setDate(a.getDate()-r*7),a}class O11 extends O2{constructor(){super(...arguments);z1(this,"priority",100);z1(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(a,r,n){switch(r){case"I":return le(_e.week,a);case"Io":return n.ordinalNumber(a,{unit:"week"});default:return ge(r.length,a)}}validate(a,r){return r>=1&&r<=53}set(a,r,n){return p6(N11(a,n))}}const P11=[31,28,31,30,31,30,31,31,30,31,30,31],D11=[31,29,31,30,31,30,31,31,30,31,30,31];class R11 extends O2{constructor(){super(...arguments);z1(this,"priority",90);z1(this,"subPriority",1);z1(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"d":return le(_e.date,a);case"do":return n.ordinalNumber(a,{unit:"date"});default:return ge(r.length,a)}}validate(a,r){const n=a.getFullYear(),i=pb(n),c=a.getMonth();return i?r>=1&&r<=D11[c]:r>=1&&r<=P11[c]}set(a,r,n){return a.setDate(n),a.setHours(0,0,0,0),a}}class F11 extends O2{constructor(){super(...arguments);z1(this,"priority",90);z1(this,"subpriority",1);z1(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(a,r,n){switch(r){case"D":case"DD":return le(_e.dayOfYear,a);case"Do":return n.ordinalNumber(a,{unit:"date"});default:return ge(r.length,a)}}validate(a,r){const n=a.getFullYear();return pb(n)?r>=1&&r<=366:r>=1&&r<=365}set(a,r,n){return a.setMonth(0,n),a.setHours(0,0,0,0),a}}function Il(e,t,a){var d,h,m,p;const r=_a(),n=(a==null?void 0:a.weekStartsOn)??((h=(d=a==null?void 0:a.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((p=(m=r.locale)==null?void 0:m.options)==null?void 0:p.weekStartsOn)??0,i=t2(e),c=i.getDay(),o=(t%7+7)%7,l=7-n,f=t<0||t>6?t-(c+l)%7:(o+l)%7-(c+l)%7;return u3(i,f)}class B11 extends O2{constructor(){super(...arguments);z1(this,"priority",90);z1(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,i){return a=Il(a,n,i),a.setHours(0,0,0,0),a}}class I11 extends O2{constructor(){super(...arguments);z1(this,"priority",90);z1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(a,r,n,i){const c=s=>{const o=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+o};switch(r){case"e":case"ee":return He(ge(r.length,a),c);case"eo":return He(n.ordinalNumber(a,{unit:"day"}),c);case"eee":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,i){return a=Il(a,n,i),a.setHours(0,0,0,0),a}}class $11 extends O2{constructor(){super(...arguments);z1(this,"priority",90);z1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(a,r,n,i){const c=s=>{const o=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+o};switch(r){case"c":case"cc":return He(ge(r.length,a),c);case"co":return He(n.ordinalNumber(a,{unit:"day"}),c);case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})||n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,i){return a=Il(a,n,i),a.setHours(0,0,0,0),a}}function U11(e,t){const a=t2(e),r=y11(a),n=t-r;return u3(a,n)}class q11 extends O2{constructor(){super(...arguments);z1(this,"priority",90);z1(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(a,r,n){const i=c=>c===0?7:c;switch(r){case"i":case"ii":return ge(r.length,a);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return He(n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),i);case"iiiii":return He(n.day(a,{width:"narrow",context:"formatting"}),i);case"iiiiii":return He(n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),i);case"iiii":default:return He(n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),i)}}validate(a,r){return r>=1&&r<=7}set(a,r,n){return a=U11(a,n),a.setHours(0,0,0,0),a}}class j11 extends O2{constructor(){super(...arguments);z1(this,"priority",80);z1(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(a,r,n){switch(r){case"a":case"aa":case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Bl(n),0,0,0),a}}class W11 extends O2{constructor(){super(...arguments);z1(this,"priority",80);z1(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(a,r,n){switch(r){case"b":case"bb":case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Bl(n),0,0,0),a}}class G11 extends O2{constructor(){super(...arguments);z1(this,"priority",80);z1(this,"incompatibleTokens",["a","b","t","T"])}parse(a,r,n){switch(r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Bl(n),0,0,0),a}}class Y11 extends O2{constructor(){super(...arguments);z1(this,"priority",70);z1(this,"incompatibleTokens",["H","K","k","t","T"])}parse(a,r,n){switch(r){case"h":return le(_e.hour12h,a);case"ho":return n.ordinalNumber(a,{unit:"hour"});default:return ge(r.length,a)}}validate(a,r){return r>=1&&r<=12}set(a,r,n){const i=a.getHours()>=12;return i&&n<12?a.setHours(n+12,0,0,0):!i&&n===12?a.setHours(0,0,0,0):a.setHours(n,0,0,0),a}}class X11 extends O2{constructor(){super(...arguments);z1(this,"priority",70);z1(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(a,r,n){switch(r){case"H":return le(_e.hour23h,a);case"Ho":return n.ordinalNumber(a,{unit:"hour"});default:return ge(r.length,a)}}validate(a,r){return r>=0&&r<=23}set(a,r,n){return a.setHours(n,0,0,0),a}}class K11 extends O2{constructor(){super(...arguments);z1(this,"priority",70);z1(this,"incompatibleTokens",["h","H","k","t","T"])}parse(a,r,n){switch(r){case"K":return le(_e.hour11h,a);case"Ko":return n.ordinalNumber(a,{unit:"hour"});default:return ge(r.length,a)}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.getHours()>=12&&n<12?a.setHours(n+12,0,0,0):a.setHours(n,0,0,0),a}}class Z11 extends O2{constructor(){super(...arguments);z1(this,"priority",70);z1(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(a,r,n){switch(r){case"k":return le(_e.hour24h,a);case"ko":return n.ordinalNumber(a,{unit:"hour"});default:return ge(r.length,a)}}validate(a,r){return r>=1&&r<=24}set(a,r,n){const i=n<=24?n%24:n;return a.setHours(i,0,0,0),a}}class Q11 extends O2{constructor(){super(...arguments);z1(this,"priority",60);z1(this,"incompatibleTokens",["t","T"])}parse(a,r,n){switch(r){case"m":return le(_e.minute,a);case"mo":return n.ordinalNumber(a,{unit:"minute"});default:return ge(r.length,a)}}validate(a,r){return r>=0&&r<=59}set(a,r,n){return a.setMinutes(n,0,0),a}}class J11 extends O2{constructor(){super(...arguments);z1(this,"priority",50);z1(this,"incompatibleTokens",["t","T"])}parse(a,r,n){switch(r){case"s":return le(_e.second,a);case"so":return n.ordinalNumber(a,{unit:"second"});default:return ge(r.length,a)}}validate(a,r){return r>=0&&r<=59}set(a,r,n){return a.setSeconds(n,0),a}}class e21 extends O2{constructor(){super(...arguments);z1(this,"priority",30);z1(this,"incompatibleTokens",["t","T"])}parse(a,r){const n=i=>Math.trunc(i*Math.pow(10,-r.length+3));return He(ge(r.length,a),n)}set(a,r,n){return a.setMilliseconds(n),a}}class t21 extends O2{constructor(){super(...arguments);z1(this,"priority",10);z1(this,"incompatibleTokens",["t","T","x"])}parse(a,r){switch(r){case"X":return $3(I3.basicOptionalMinutes,a);case"XX":return $3(I3.basic,a);case"XXXX":return $3(I3.basicOptionalSeconds,a);case"XXXXX":return $3(I3.extendedOptionalSeconds,a);case"XXX":default:return $3(I3.extended,a)}}set(a,r,n){return r.timestampIsSet?a:N2(a,a.getTime()-Ki(a)-n)}}class a21 extends O2{constructor(){super(...arguments);z1(this,"priority",10);z1(this,"incompatibleTokens",["t","T","X"])}parse(a,r){switch(r){case"x":return $3(I3.basicOptionalMinutes,a);case"xx":return $3(I3.basic,a);case"xxxx":return $3(I3.basicOptionalSeconds,a);case"xxxxx":return $3(I3.extendedOptionalSeconds,a);case"xxx":default:return $3(I3.extended,a)}}set(a,r,n){return r.timestampIsSet?a:N2(a,a.getTime()-Ki(a)-n)}}class r21 extends O2{constructor(){super(...arguments);z1(this,"priority",40);z1(this,"incompatibleTokens","*")}parse(a){return hb(a)}set(a,r,n){return[N2(a,n*1e3),{timestampIsSet:!0}]}}class n21 extends O2{constructor(){super(...arguments);z1(this,"priority",20);z1(this,"incompatibleTokens","*")}parse(a){return hb(a)}set(a,r,n){return[N2(a,n),{timestampIsSet:!0}]}}const c21={G:new z11,y:new w11,Y:new _11,R:new H11,u:new S11,Q:new L11,q:new k11,M:new A11,L:new V11,w:new E11,I:new O11,d:new R11,D:new F11,E:new B11,e:new I11,c:new $11,i:new q11,a:new j11,b:new W11,B:new G11,h:new Y11,H:new X11,K:new K11,k:new Z11,m:new Q11,s:new J11,S:new e21,X:new t21,x:new a21,t:new r21,T:new n21},i21=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,s21=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,o21=/^'([^]*?)'?$/,l21=/''/g,f21=/\S/,u21=/[a-zA-Z]/;function Go(e,t,a,r){var v,g,y,x,C,b,M,w;const n=g11(),i=(r==null?void 0:r.locale)??n.locale??ob,c=(r==null?void 0:r.firstWeekContainsDate)??((g=(v=r==null?void 0:r.locale)==null?void 0:v.options)==null?void 0:g.firstWeekContainsDate)??n.firstWeekContainsDate??((x=(y=n.locale)==null?void 0:y.options)==null?void 0:x.firstWeekContainsDate)??1,s=(r==null?void 0:r.weekStartsOn)??((b=(C=r==null?void 0:r.locale)==null?void 0:C.options)==null?void 0:b.weekStartsOn)??n.weekStartsOn??((w=(M=n.locale)==null?void 0:M.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?t2(a):N2(a,NaN);const o={firstWeekContainsDate:c,weekStartsOn:s,locale:i},l=[new M11],f=t.match(s21).map(z=>{const _=z[0];if(_ in jo){const S=jo[_];return S(z,i.formatLong)}return z}).join("").match(i21),d=[];for(let z of f){!(r!=null&&r.useAdditionalWeekYearTokens)&&ub(z)&&Wo(z,t,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&fb(z)&&Wo(z,t,e);const _=z[0],S=c21[_];if(S){const{incompatibleTokens:k}=S;if(Array.isArray(k)){const L=d.find(A=>k.includes(A.token)||A.token===_);if(L)throw new RangeError(`The format string mustn't contain \`${L.fullToken}\` and \`${z}\` at the same time`)}else if(S.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${z}\` and any other token at the same time`);d.push({token:_,fullToken:z});const H=S.run(e,z,i.match,o);if(!H)return N2(a,NaN);l.push(H.setter),e=H.rest}else{if(_.match(u21))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");if(z==="''"?z="'":_==="'"&&(z=d21(z)),e.indexOf(z)===0)e=e.slice(z.length);else return N2(a,NaN)}}if(e.length>0&&f21.test(e))return N2(a,NaN);const h=l.map(z=>z.priority).sort((z,_)=>_-z).filter((z,_,S)=>S.indexOf(z)===_).map(z=>l.filter(_=>_.priority===z).sort((_,S)=>S.subPriority-_.subPriority)).map(z=>z[0]);let m=t2(a);if(isNaN(m.getTime()))return N2(a,NaN);const p={};for(const z of h){if(!z.validate(m,o))return N2(a,NaN);const _=z.set(m,p,o);Array.isArray(_)?(m=_[0],Object.assign(p,_[1])):m=_}return N2(a,m)}function d21(e){return e.match(o21)[1].replace(l21,"'")}function xm(e,t){const a=Z0(e),r=Z0(t);return+a==+r}function h21(e,t){return u3(e,-t)}function vb(e,t){const a=t2(e),r=a.getFullYear(),n=a.getDate(),i=N2(e,0);i.setFullYear(r,t,15),i.setHours(0,0,0,0);const c=v11(i);return a.setMonth(t,Math.min(n,c)),a}function U2(e,t){let a=t2(e);return isNaN(+a)?N2(e,NaN):(t.year!=null&&a.setFullYear(t.year),t.month!=null&&(a=vb(a,t.month)),t.date!=null&&a.setDate(t.date),t.hours!=null&&a.setHours(t.hours),t.minutes!=null&&a.setMinutes(t.minutes),t.seconds!=null&&a.setSeconds(t.seconds),t.milliseconds!=null&&a.setMilliseconds(t.milliseconds),a)}function gb(e,t){const a=t2(e);return a.setHours(t),a}function $l(e,t){const a=t2(e);return a.setMilliseconds(t),a}function yb(e,t){const a=t2(e);return a.setMinutes(t),a}function Ul(e,t){const a=t2(e);return a.setSeconds(t),a}function j3(e,t){const a=t2(e);return isNaN(+a)?N2(e,NaN):(a.setFullYear(t),a)}function y6(e,t){return M3(e,-t)}function m21(e,t){const{years:a=0,months:r=0,weeks:n=0,days:i=0,hours:c=0,minutes:s=0,seconds:o=0}=t,l=y6(e,r+a*12),f=h21(l,i+n*7),d=s+c*60,m=(o+d*60)*1e3;return N2(e,f.getTime()-m)}function xb(e,t){return Ol(e,-t)}function L6(){return u.openBlock(),u.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[u.createElementVNode("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),u.createElementVNode("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),u.createElementVNode("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),u.createElementVNode("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}L6.compatConfig={MODE:3};function bb(){return u.openBlock(),u.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[u.createElementVNode("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),u.createElementVNode("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}bb.compatConfig={MODE:3};function ql(){return u.openBlock(),u.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[u.createElementVNode("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}ql.compatConfig={MODE:3};function jl(){return u.openBlock(),u.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[u.createElementVNode("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}jl.compatConfig={MODE:3};function Wl(){return u.openBlock(),u.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[u.createElementVNode("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),u.createElementVNode("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}Wl.compatConfig={MODE:3};function Gl(){return u.openBlock(),u.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[u.createElementVNode("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}Gl.compatConfig={MODE:3};function Yl(){return u.openBlock(),u.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[u.createElementVNode("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}Yl.compatConfig={MODE:3};const K3=(e,t)=>t?new Date(e.toLocaleString("en-US",{timeZone:t})):new Date(e),Cb=(e,t)=>Yo(e,t)||R1(),p21=(e,t)=>t.dateInTz?K3(new Date(e),t.dateInTz):R1(e),Yo=(e,t)=>{if(!e)return null;if(!t)return R1(e);const a=R1(e);return t.exactMatch?p21(e,t):K3(a,t.timezone)},v21=e=>{if(!e)return 0;const t=new Date,a=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),r=new Date(t.toLocaleString("en-US",{timeZone:e})),n=r.getTimezoneOffset()/60;return(+a-+r)/(1e3*60*60)-n};var s3=(e=>(e.month="month",e.year="year",e))(s3||{}),j0=(e=>(e.top="top",e.bottom="bottom",e))(j0||{}),ra=(e=>(e.header="header",e.calendar="calendar",e.timePicker="timePicker",e))(ra||{}),at=(e=>(e.month="month",e.year="year",e.calendar="calendar",e.time="time",e.minutes="minutes",e.hours="hours",e.seconds="seconds",e))(at||{});const g21=["timestamp","date","iso"];var pt=(e=>(e.up="up",e.down="down",e.left="left",e.right="right",e))(pt||{}),oe=(e=>(e.arrowUp="ArrowUp",e.arrowDown="ArrowDown",e.arrowLeft="ArrowLeft",e.arrowRight="ArrowRight",e.enter="Enter",e.space=" ",e.esc="Escape",e.tab="Tab",e.home="Home",e.end="End",e.pageUp="PageUp",e.pageDown="PageDown",e))(oe||{});function bm(e){return t=>new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${t}T00:00:00+00:00`)).slice(0,2)}function y21(e){return t=>X3(new Date(`2017-01-0${t}T00:00:00+00:00`),"EEEEEE",{locale:e})}const x21=(e,t,a)=>{const r=[1,2,3,4,5,6,7];let n;if(e!==null)try{n=r.map(y21(e))}catch{n=r.map(bm(t))}else n=r.map(bm(t));const i=n.slice(0,a),c=n.slice(a+1,n.length);return[n[a]].concat(...c).concat(...i)},Xl=(e,t,a)=>{const r=[];for(let n=+e[0];n<=+e[1];n++)r.push({value:+n,text:_b(n,t)});return a?r.reverse():r},Mb=(e,t,a)=>{const r=[1,2,3,4,5,6,7,8,9,10,11,12].map(i=>{const c=i<10?`0${i}`:i;return new Date(`2017-${c}-01T00:00:00+00:00`)});if(e!==null)try{const i=a==="long"?"MMMM":"MMM";return r.map((c,s)=>{const o=X3(K3(c,"UTC"),i,{locale:e});return{text:o.charAt(0).toUpperCase()+o.substring(1),value:s}})}catch{}const n=new Intl.DateTimeFormat(t,{month:a,timeZone:"UTC"});return r.map((i,c)=>{const s=n.format(i);return{text:s.charAt(0).toUpperCase()+s.substring(1),value:c}})},b21=e=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][e],Ne=e=>{const t=u.unref(e);return t!=null&&t.$el?t==null?void 0:t.$el:t},C21=e=>({type:"dot",...e??{}}),zb=e=>Array.isArray(e)?!!e[0]&&!!e[1]:!1,Kl={prop:e=>`"${e}" prop must be enabled!`,dateArr:e=>`You need to use array as "model-value" binding in order to support "${e}"`},$e=e=>e,Cm=e=>e===0?e:!e||isNaN(+e)?null:+e,Mm=e=>e===null,wb=e=>{if(e)return[...e.querySelectorAll("input, button, select, textarea, a[href]")][0]},M21=e=>{const t=[],a=r=>r.filter(n=>n);for(let r=0;r<e.length;r+=3){const n=[e[r],e[r+1],e[r+2]];t.push(a(n))}return t},dn=(e,t,a)=>{const r=a!=null,n=t!=null;if(!r&&!n)return!1;const i=+a,c=+t;return r&&n?+e>i||+e<c:r?+e>i:n?+e<c:!1},x6=(e,t)=>M21(e).map(a=>a.map(r=>{const{active:n,disabled:i,isBetween:c,highlighted:s}=t(r);return{...r,active:n,disabled:i,className:{dp__overlay_cell_active:n,dp__overlay_cell:!n,dp__overlay_cell_disabled:i,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:i&&n,dp__cell_in_between:c,"dp--highlighted":s}}})),h0=(e,t,a=!1)=>{e&&t.allowStopPropagation&&(a&&e.stopImmediatePropagation(),e.stopPropagation())},z21=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function w21(e,t){let a=[...document.querySelectorAll(z21())];a=a.filter(n=>!e.contains(n)||n.hasAttribute("data-datepicker-instance"));const r=a.indexOf(e);if(r>=0&&(t?r-1>=0:r+1<=a.length))return a[r+(t?-1:1)]}const _21=(e,t)=>e==null?void 0:e.querySelector(`[data-dp-element="${t}"]`),_b=(e,t)=>new Intl.NumberFormat(t,{useGrouping:!1,style:"decimal"}).format(e),Zl=e=>X3(e,"dd-MM-yyyy"),ps=e=>Array.isArray(e),Qi=(e,t)=>t.get(Zl(e)),H21=(e,t)=>e?t?t instanceof Map?!!Qi(e,t):t(R1(e)):!1:!0,Lt=(e,t,a=!1)=>{if(e.key===oe.enter||e.key===oe.space)return a&&e.preventDefault(),t()},zm=(e,t,a,r,n,i)=>{const c=Go(e,t.slice(0,e.length),new Date,{locale:i});return _r(c)&&nb(c)?r||n?c:U2(c,{hours:+a.hours,minutes:+(a==null?void 0:a.minutes),seconds:+(a==null?void 0:a.seconds),milliseconds:0}):null},S21=(e,t,a,r,n,i)=>{const c=Array.isArray(a)?a[0]:a;if(typeof t=="string")return zm(e,t,c,r,n,i);if(Array.isArray(t)){let s=null;for(const o of t)if(s=zm(e,o,c,r,n,i),s)break;return s}return typeof t=="function"?t(e):null},R1=e=>e?new Date(e):new Date,L21=(e,t,a)=>{if(t){const n=(e.getMonth()+1).toString().padStart(2,"0"),i=e.getDate().toString().padStart(2,"0"),c=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0"),o=a?e.getSeconds().toString().padStart(2,"0"):"00";return`${e.getFullYear()}-${n}-${i}T${c}:${s}:${o}.000Z`}const r=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds());return new Date(r).toISOString()},Pt=e=>{let t=R1(JSON.parse(JSON.stringify(e)));return t=gb(t,0),t=yb(t,0),t=Ul(t,0),t=$l(t,0),t},m0=(e,t,a,r)=>{let n=e?R1(e):R1();return(t||t===0)&&(n=gb(n,+t)),(a||a===0)&&(n=yb(n,+a)),(r||r===0)&&(n=Ul(n,+r)),$l(n,0)},he=(e,t)=>!e||!t?!1:un(Pt(e),Pt(t)),g2=(e,t)=>!e||!t?!1:Xa(Pt(e),Pt(t)),ze=(e,t)=>!e||!t?!1:g6(Pt(e),Pt(t)),Y8=(e,t,a)=>e!=null&&e[0]&&e!=null&&e[1]?ze(a,e[0])&&he(a,e[1]):e!=null&&e[0]&&t?ze(a,e[0])&&he(a,t)||he(a,e[0])&&ze(a,t):!1,d3=e=>{const t=U2(new Date(e),{date:1});return Pt(t)},vs=(e,t,a)=>t&&(a||a===0)?Object.fromEntries(["hours","minutes","seconds"].map(r=>r===t?[r,a]:[r,isNaN(+e[r])?void 0:+e[r]])):{hours:isNaN(+e.hours)?void 0:+e.hours,minutes:isNaN(+e.minutes)?void 0:+e.minutes,seconds:isNaN(+e.seconds)?void 0:+e.seconds},na=e=>({hours:O4(e),minutes:w0(e),seconds:v6(e)}),Hb=(e,t)=>{if(t){const a=d2(R1(t));if(a>e)return 12;if(a===e)return v2(R1(t))}},Sb=(e,t)=>{if(t){const a=d2(R1(t));return a<e?-1:a===e?v2(R1(t)):void 0}},b6=e=>{if(e)return d2(R1(e))},Lb=(e,t)=>{const a=ze(e,t)?t:e,r=ze(t,e)?t:e;return cb({start:a,end:r})},k21=e=>{const t=M3(e,1);return{month:v2(t),year:d2(t)}},g4=(e,t)=>{const a=L3(e,{weekStartsOn:+t}),r=sb(e,{weekStartsOn:+t});return[a,r]},kb=(e,t)=>{const a={hours:O4(R1()),minutes:w0(R1()),seconds:t?v6(R1()):0};return Object.assign(a,e)},c0=(e,t,a)=>[U2(R1(e),{date:1}),U2(R1(),{month:t,year:a,date:1})],z4=(e,t,a)=>{let r=e?R1(e):R1();return(t||t===0)&&(r=vb(r,t)),a&&(r=j3(r,a)),r},Ab=(e,t,a,r,n)=>{if(!r||n&&!t||!n&&!a)return!1;const i=n?M3(e,1):y6(e,1),c=[v2(i),d2(i)];return n?!V21(...c,t):!A21(...c,a)},A21=(e,t,a)=>he(...c0(a,e,t))||g2(...c0(a,e,t)),V21=(e,t,a)=>ze(...c0(a,e,t))||g2(...c0(a,e,t)),Vb=(e,t,a,r,n,i,c)=>{if(typeof t=="function"&&!c)return t(e);const s=a?{locale:a}:void 0;return Array.isArray(e)?`${X3(e[0],i,s)}${n&&!e[1]?"":r}${e[1]?X3(e[1],i,s):""}`:X3(e,i,s)},Ba=e=>{if(e)return null;throw new Error(Kl.prop("partial-range"))},Oc=(e,t)=>{if(t)return e();throw new Error(Kl.prop("range"))},Xo=e=>Array.isArray(e)?_r(e[0])&&(e[1]?_r(e[1]):!0):e?_r(e):!1,T21=(e,t)=>U2(t??R1(),{hours:+e.hours||0,minutes:+e.minutes||0,seconds:+e.seconds||0}),gs=(e,t,a,r)=>{if(!e)return!0;if(r){const n=a==="max"?un(e,t):g6(e,t),i={seconds:0,milliseconds:0};return n||Xa(U2(e,i),U2(t,i))}return a==="max"?e.getTime()<=t.getTime():e.getTime()>=t.getTime()},ys=(e,t,a)=>e?T21(e,t):R1(a??t),wm=(e,t,a,r,n)=>{if(Array.isArray(r)){const c=ys(e,r[0],t),s=ys(e,r[1],t);return gs(r[0],c,a,!!t)&&gs(r[1],s,a,!!t)&&n}const i=ys(e,r,t);return gs(r,i,a,!!t)&&n},xs=e=>U2(R1(),na(e)),E21=(e,t)=>e instanceof Map?Array.from(e.values()).filter(a=>d2(R1(a))===t).map(a=>v2(a)):[],Tb=(e,t,a)=>typeof e=="function"?e({month:t,year:a}):!!e.months.find(r=>r.month===t&&r.year===a),Ql=(e,t)=>typeof e=="function"?e(t):e.years.includes(t),Z6=u.reactive({menuFocused:!1,shiftKeyInMenu:!1}),Eb=()=>{const e=a=>{Z6.menuFocused=a},t=a=>{Z6.shiftKeyInMenu!==a&&(Z6.shiftKeyInMenu=a)};return{control:u.computed(()=>({shiftKeyInMenu:Z6.shiftKeyInMenu,menuFocused:Z6.menuFocused})),setMenuFocused:e,setShiftKey:t}},Y2=u.reactive({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),bs=u.ref(null),Pc=u.ref(!1),Cs=u.ref(!1),Ms=u.ref(!1),zs=u.ref(!1),Je=u.ref(0),be=u.ref(0),A0=()=>{const e=u.computed(()=>Pc.value?[...Y2.selectionGrid,Y2.actionRow].filter(d=>d.length):Cs.value?[...Y2.timePicker[0],...Y2.timePicker[1],zs.value?[]:[bs.value],Y2.actionRow].filter(d=>d.length):Ms.value?[...Y2.monthPicker,Y2.actionRow]:[Y2.monthYear,...Y2.calendar,Y2.time,Y2.actionRow].filter(d=>d.length)),t=d=>{Je.value=d?Je.value+1:Je.value-1;let h=null;e.value[be.value]&&(h=e.value[be.value][Je.value]),!h&&e.value[be.value+(d?1:-1)]?(be.value=be.value+(d?1:-1),Je.value=d?0:e.value[be.value].length-1):h||(Je.value=d?Je.value-1:Je.value+1)},a=d=>{be.value===0&&!d||be.value===e.value.length&&d||(be.value=d?be.value+1:be.value-1,e.value[be.value]?e.value[be.value]&&!e.value[be.value][Je.value]&&Je.value!==0&&(Je.value=e.value[be.value].length-1):be.value=d?be.value-1:be.value+1)},r=d=>{let h=null;e.value[be.value]&&(h=e.value[be.value][Je.value]),h?h.focus({preventScroll:!Pc.value}):Je.value=d?Je.value-1:Je.value+1},n=()=>{t(!0),r(!0)},i=()=>{t(!1),r(!1)},c=()=>{a(!1),r(!0)},s=()=>{a(!0),r(!0)},o=(d,h)=>{Y2[h]=d},l=(d,h)=>{Y2[h]=d},f=()=>{Je.value=0,be.value=0};return{buildMatrix:o,buildMultiLevelMatrix:l,setTimePickerBackRef:d=>{bs.value=d},setSelectionGrid:d=>{Pc.value=d,f(),d||(Y2.selectionGrid=[])},setTimePicker:(d,h=!1)=>{Cs.value=d,zs.value=h,f(),d||(Y2.timePicker[0]=[],Y2.timePicker[1]=[])},setTimePickerElements:(d,h=0)=>{Y2.timePicker[h]=d},arrowRight:n,arrowLeft:i,arrowUp:c,arrowDown:s,clearArrowNav:()=>{Y2.monthYear=[],Y2.calendar=[],Y2.time=[],Y2.actionRow=[],Y2.selectionGrid=[],Y2.timePicker[0]=[],Y2.timePicker[1]=[],Pc.value=!1,Cs.value=!1,zs.value=!1,Ms.value=!1,f(),bs.value=null},setMonthPicker:d=>{Ms.value=d,f()},refSets:Y2}},_m=e=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...e??{}}),N21=e=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",calendarWrap:"Calendar wrapper",calendarDays:"Calendar days",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:t=>`Increment ${t}`,decrementValue:t=>`Decrement ${t}`,openTpOverlay:t=>`Open ${t} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,...e??{}}),Hm=e=>e?typeof e=="boolean"?e?2:0:+e>=2?+e:2:0,O21=e=>{const t=typeof e=="object"&&e,a={static:!0,solo:!1};if(!e)return{...a,count:Hm(!1)};const r=t?e:{},n=t?r.count??!0:e,i=Hm(n);return Object.assign(a,r,{count:i})},P21=(e,t,a)=>e||(typeof a=="string"?a:t),D21=e=>typeof e=="boolean"?e?_m({}):!1:_m(e),R21=e=>{const t={enterSubmit:!0,tabSubmit:!0,openMenu:!0,selectOnFocus:!1,rangeSeparator:" - "};return typeof e=="object"?{...t,...e??{},enabled:!0}:{...t,enabled:e}},F21=e=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...e??{}}),B21=e=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...e??{}}),I21=e=>{const t={input:!1};return typeof e=="object"?{...t,...e??{},enabled:!0}:{enabled:e,...t}},$21=e=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,...e??{}}),U21=e=>{const t={dates:Array.isArray(e)?e.map(a=>R1(a)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof e=="function"?e:{...t,...e??{}}},q21=e=>typeof e=="object"?{type:(e==null?void 0:e.type)??"local",hideOnOffsetDates:(e==null?void 0:e.hideOnOffsetDates)??!1}:{type:e,hideOnOffsetDates:!1},j21=(e,t)=>typeof e=="object"?{enabled:!0,...{noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1},...e}:{enabled:e,noDisabledRange:t.noDisabledRange,showLastInRange:t.showLastInRange,minMaxRawRange:t.minMaxRawRange,partialRange:t.partialRange,disableTimeRangeValidation:t.disableTimeRangeValidation,maxRange:t.maxRange,minRange:t.minRange,autoRange:t.autoRange,fixedStart:t.fixedStart,fixedEnd:t.fixedEnd},W21=(e,t)=>e?typeof e=="string"?{timezone:e,exactMatch:!1,dateInTz:void 0,emitTimezone:t,convertModel:!0}:{timezone:e.timezone,exactMatch:e.exactMatch??!1,dateInTz:e.dateInTz??void 0,emitTimezone:t??e.emitTimezone,convertModel:e.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:t},ws=(e,t)=>new Map(e.map(a=>{const r=Cb(a,t);return[Zl(r),r]})),G21=(e,t)=>e.length?new Map(e.map(a=>{const r=Cb(a.date,t);return[Zl(r),a]})):null,Y21=(e,t,a,r,n,i,c)=>({minDate:Yo(e,c),maxDate:Yo(t,c),disabledDates:ps(a)?ws(a,c):a,allowedDates:ps(r)?ws(r,c):null,highlight:typeof n=="object"&&ps(n==null?void 0:n.dates)?ws(n.dates,c):n,markers:G21(i,c)}),X21=(e,t)=>typeof e=="boolean"?{enabled:e,dragSelect:!0,limit:+t}:{enabled:!!e,limit:e.limit?+e.limit:null,dragSelect:e.dragSelect??!0},ue=e=>{const t=()=>{const M=e.enableSeconds?":ss":"",w=e.enableMinutes?":mm":"";return e.is24?`HH${w}${M}`:`hh${w}${M} aa`},a=()=>{var M;return e.format?e.format:e.monthPicker?"MM/yyyy":e.timePicker?t():e.weekPicker?`${((M=g.value)==null?void 0:M.type)==="iso"?"RR":"ww"}-yyyy`:e.yearPicker?"yyyy":e.quarterPicker?"QQQ/yyyy":e.enableTimePicker?`MM/dd/yyyy, ${t()}`:"MM/dd/yyyy"},r=M=>kb(M,e.enableSeconds),n=()=>b.value.enabled?e.startTime&&Array.isArray(e.startTime)?[r(e.startTime[0]),r(e.startTime[1])]:null:e.startTime&&!Array.isArray(e.startTime)?r(e.startTime):null,i=u.computed(()=>O21(e.multiCalendars)),c=u.computed(()=>n()),s=u.computed(()=>N21(e.ariaLabels)),o=u.computed(()=>F21(e.filters)),l=u.computed(()=>D21(e.transitions)),f=u.computed(()=>B21(e.actionRow)),d=u.computed(()=>P21(e.previewFormat,e.format,a())),h=u.computed(()=>R21(e.textInput)),m=u.computed(()=>I21(e.inline)),p=u.computed(()=>$21(e.config)),v=u.computed(()=>U21(e.highlight)),g=u.computed(()=>q21(e.weekNumbers)),y=u.computed(()=>W21(e.timezone,e.emitTimezone)),x=u.computed(()=>X21(e.multiDates,e.multiDatesLimit)),C=u.computed(()=>Y21(e.minDate,e.maxDate,e.disabledDates,e.allowedDates,v.value,e.markers,y.value)),b=u.computed(()=>j21(e.range,{minMaxRawRange:!1,maxRange:e.maxRange,minRange:e.minRange,noDisabledRange:e.noDisabledRange,showLastInRange:e.showLastInRange,partialRange:e.partialRange,disableTimeRangeValidation:e.disableTimeRangeValidation,autoRange:e.autoRange,fixedStart:e.fixedStart,fixedEnd:e.fixedEnd}));return{defaultedTransitions:l,defaultedMultiCalendars:i,defaultedStartTime:c,defaultedAriaLabels:s,defaultedFilters:o,defaultedActionRow:f,defaultedPreviewFormat:d,defaultedTextInput:h,defaultedInline:m,defaultedConfig:p,defaultedHighlight:v,defaultedWeekNumbers:g,defaultedRange:b,propDates:C,defaultedTz:y,defaultedMultiDates:x,getDefaultPattern:a,getDefaultStartTime:n}},K21=(e,t,a)=>{const r=u.ref(),{defaultedTextInput:n,defaultedRange:i,defaultedTz:c,defaultedMultiDates:s,getDefaultPattern:o}=ue(t),l=u.ref(""),f=u.toRef(t,"format"),d=u.toRef(t,"formatLocale");u.watch(r,()=>{typeof t.onInternalModelChange=="function"&&e("internal-model-change",r.value,O(!0))},{deep:!0}),u.watch(i,(j,t1)=>{j.enabled!==t1.enabled&&(r.value=null)}),u.watch(f,()=>{X()});const h=j=>c.value.timezone&&c.value.convertModel?K3(j,c.value.timezone):j,m=j=>{if(c.value.timezone&&c.value.convertModel){const t1=v21(c.value.timezone);return xJ(j,t1)}return j},p=(j,t1,r1=!1)=>Vb(j,t.format,t.formatLocale,n.value.rangeSeparator,t.modelAuto,t1??o(),r1),v=j=>j?t.modelType?Y(j):{hours:O4(j),minutes:w0(j),seconds:t.enableSeconds?v6(j):0}:null,g=j=>t.modelType?Y(j):{month:v2(j),year:d2(j)},y=j=>Array.isArray(j)?s.value.enabled?j.map(t1=>x(t1,j3(R1(),t1))):Oc(()=>[j3(R1(),j[0]),j[1]?j3(R1(),j[1]):Ba(i.value.partialRange)],i.value.enabled):j3(R1(),+j),x=(j,t1)=>(typeof j=="string"||typeof j=="number")&&t.modelType?B(j):t1,C=j=>Array.isArray(j)?[x(j[0],m0(null,+j[0].hours,+j[0].minutes,j[0].seconds)),x(j[1],m0(null,+j[1].hours,+j[1].minutes,j[1].seconds))]:x(j,m0(null,j.hours,j.minutes,j.seconds)),b=j=>{const t1=U2(R1(),{date:1});return Array.isArray(j)?s.value.enabled?j.map(r1=>x(r1,z4(t1,+r1.month,+r1.year))):Oc(()=>[x(j[0],z4(t1,+j[0].month,+j[0].year)),x(j[1],j[1]?z4(t1,+j[1].month,+j[1].year):Ba(i.value.partialRange))],i.value.enabled):x(j,z4(t1,+j.month,+j.year))},M=j=>{if(Array.isArray(j))return j.map(t1=>B(t1));throw new Error(Kl.dateArr("multi-dates"))},w=j=>{if(Array.isArray(j)&&i.value.enabled){const t1=j[0],r1=j[1];return[R1(Array.isArray(t1)?t1[0]:null),R1(Array.isArray(r1)?r1[0]:null)]}return R1(j[0])},z=j=>t.modelAuto?Array.isArray(j)?[B(j[0]),B(j[1])]:t.autoApply?[B(j)]:[B(j),null]:Array.isArray(j)?Oc(()=>j[1]?[B(j[0]),j[1]?B(j[1]):Ba(i.value.partialRange)]:[B(j[0])],i.value.enabled):B(j),_=()=>{Array.isArray(r.value)&&i.value.enabled&&r.value.length===1&&r.value.push(Ba(i.value.partialRange))},S=()=>{const j=r.value;return[Y(j[0]),j[1]?Y(j[1]):Ba(i.value.partialRange)]},k=()=>r.value[1]?S():Y($e(r.value[0])),H=()=>(r.value||[]).map(j=>Y(j)),L=(j=!1)=>(j||_(),t.modelAuto?k():s.value.enabled?H():Array.isArray(r.value)?Oc(()=>S(),i.value.enabled):Y($e(r.value))),A=j=>!j||Array.isArray(j)&&!j.length?null:t.timePicker?C($e(j)):t.monthPicker?b($e(j)):t.yearPicker?y($e(j)):s.value.enabled?M($e(j)):t.weekPicker?w($e(j)):z($e(j)),N=j=>{const t1=A(j);Xo($e(t1))?(r.value=$e(t1),X()):(r.value=null,l.value="")},E=()=>{const j=t1=>X3(t1,n.value.format);return`${j(r.value[0])} ${n.value.rangeSeparator} ${r.value[1]?j(r.value[1]):""}`},R=()=>a.value&&r.value?Array.isArray(r.value)?E():X3(r.value,n.value.format):p(r.value),P=()=>r.value?s.value.enabled?r.value.map(j=>p(j)).join("; "):n.value.enabled&&typeof n.value.format=="string"?R():p(r.value):"",X=()=>{!t.format||typeof t.format=="string"||n.value.enabled&&typeof n.value.format=="string"?l.value=P():l.value=t.format(r.value)},B=j=>{if(t.utc){const t1=new Date(j);return t.utc==="preserve"?new Date(t1.getTime()+t1.getTimezoneOffset()*6e4):t1}return t.modelType?g21.includes(t.modelType)?h(new Date(j)):t.modelType==="format"&&(typeof t.format=="string"||!t.format)?h(Go(j,o(),new Date,{locale:d.value})):h(Go(j,t.modelType,new Date,{locale:d.value})):h(new Date(j))},Y=j=>j?t.utc?L21(j,t.utc==="preserve",t.enableSeconds):t.modelType?t.modelType==="timestamp"?+m(j):t.modelType==="iso"?m(j).toISOString():t.modelType==="format"&&(typeof t.format=="string"||!t.format)?p(m(j)):p(m(j),t.modelType,!0):m(j):"",D=(j,t1=!1,r1=!1)=>{if(r1)return j;if(e("update:model-value",j),c.value.emitTimezone&&t1){const Q=Array.isArray(j)?j.map(f1=>K3($e(f1),c.value.emitTimezone)):K3($e(j),c.value.emitTimezone);e("update:model-timezone-value",Q)}},V=j=>Array.isArray(r.value)?s.value.enabled?r.value.map(t1=>j(t1)):[j(r.value[0]),r.value[1]?j(r.value[1]):Ba(i.value.partialRange)]:j($e(r.value)),T=()=>{if(Array.isArray(r.value)){const j=g4(r.value[0],t.weekStart),t1=r.value[1]?g4(r.value[1],t.weekStart):[];return[j.map(r1=>R1(r1)),t1.map(r1=>R1(r1))]}return g4(r.value,t.weekStart).map(j=>R1(j))},I=(j,t1)=>D($e(V(j)),!1,t1),W=j=>{const t1=T();return j?t1:e("update:model-value",T())},O=(j=!1)=>(j||X(),t.monthPicker?I(g,j):t.timePicker?I(v,j):t.yearPicker?I(d2,j):t.weekPicker?W(j):D(L(j),!0,j));return{inputValue:l,internalModelValue:r,checkBeforeEmit:()=>r.value?i.value.enabled?i.value.partialRange?r.value.length>=1:r.value.length===2:!!r.value:!1,parseExternalModelValue:N,formatInputValue:X,emitModelValue:O}},Z21=(e,t)=>{const{defaultedFilters:a,propDates:r}=ue(e),{validateMonthYearInRange:n}=V0(e),i=(f,d)=>{let h=f;return a.value.months.includes(v2(h))?(h=d?M3(f,1):y6(f,1),i(h,d)):h},c=(f,d)=>{let h=f;return a.value.years.includes(d2(h))?(h=d?Ol(f,1):xb(f,1),c(h,d)):h},s=(f,d=!1)=>{const h=U2(R1(),{month:e.month,year:e.year});let m=f?M3(h,1):y6(h,1);e.disableYearSelect&&(m=j3(m,e.year));let p=v2(m),v=d2(m);a.value.months.includes(p)&&(m=i(m,f),p=v2(m),v=d2(m)),a.value.years.includes(v)&&(m=c(m,f),v=d2(m)),n(p,v,f,e.preventMinMaxNavigation)&&o(p,v,d)},o=(f,d,h)=>{t("update-month-year",{month:f,year:d,fromNav:h})},l=u.computed(()=>f=>Ab(U2(R1(),{month:e.month,year:e.year}),r.value.maxDate,r.value.minDate,e.preventMinMaxNavigation,f));return{handleMonthYearChange:s,isDisabled:l,updateMonthYear:o}};var qa=(e=>(e.center="center",e.left="left",e.right="right",e))(qa||{});const Q21=({menuRef:e,menuRefInner:t,inputRef:a,pickerWrapperRef:r,inline:n,emit:i,props:c,slots:s})=>{const o=u.ref({}),l=u.ref(!1),f=u.ref({top:"0",left:"0"}),d=u.ref(!1),h=u.toRef(c,"teleportCenter");u.watch(h,()=>{f.value=JSON.parse(JSON.stringify({})),b()});const m=E=>{if(c.teleport){const R=E.getBoundingClientRect();return{left:R.left+window.scrollX,top:R.top+window.scrollY}}return{top:0,left:0}},p=(E,R)=>{f.value.left=`${E+R-o.value.width}px`},v=E=>{f.value.left=`${E}px`},g=(E,R)=>{c.position===qa.left&&v(E),c.position===qa.right&&p(E,R),c.position===qa.center&&(f.value.left=`${E+R/2-o.value.width/2}px`)},y=E=>{const{width:R,height:P}=E.getBoundingClientRect(),{top:X,left:B}=c.altPosition?c.altPosition(E):m(E);return{top:+X,left:+B,width:R,height:P}},x=()=>{f.value.left="50%",f.value.top="50%",f.value.transform="translate(-50%, -50%)",f.value.position="fixed",delete f.value.opacity},C=()=>{const E=Ne(a),{top:R,left:P,transform:X}=c.altPosition(E);f.value={top:`${R}px`,left:`${P}px`,transform:X??""}},b=(E=!0)=>{var R;if(!n.value.enabled){if(h.value)return x();if(c.altPosition!==null)return C();if(E){const P=c.teleport?(R=t.value)==null?void 0:R.$el:e.value;P&&(o.value=P.getBoundingClientRect()),i("recalculate-position")}return H()}},M=({inputEl:E,left:R,width:P})=>{window.screen.width>768&&!l.value&&g(R,P),_(E)},w=E=>{const{top:R,left:P,height:X,width:B}=y(E);f.value.top=`${X+R+ +c.offset}px`,d.value=!1,l.value||(f.value.left=`${P+B/2-o.value.width/2}px`),M({inputEl:E,left:P,width:B})},z=E=>{const{top:R,left:P,width:X}=y(E);f.value.top=`${R-+c.offset-o.value.height}px`,d.value=!0,M({inputEl:E,left:P,width:X})},_=E=>{if(c.autoPosition){const{left:R,width:P}=y(E),{left:X,right:B}=o.value;if(!l.value){if(Math.abs(X)!==Math.abs(B)){if(X<=0)return l.value=!0,v(R);if(B>=document.documentElement.clientWidth)return l.value=!0,p(R,P)}return g(R,P)}}},S=()=>{const E=Ne(a);if(E){const{height:R}=o.value,{top:P,height:X}=E.getBoundingClientRect(),B=window.innerHeight-P-X,Y=P;return R<=B?j0.bottom:R>B&&R<=Y?j0.top:B>=Y?j0.bottom:j0.top}return j0.bottom},k=E=>S()===j0.bottom?w(E):z(E),H=()=>{const E=Ne(a);if(E)return c.autoPosition?k(E):w(E)},L=function(E){if(E){const R=E.scrollHeight>E.clientHeight,P=window.getComputedStyle(E).overflowY.indexOf("hidden")!==-1;return R&&!P}return!0},A=function(E){return!E||E===document.body||E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:L(E)?E:A(E.assignedSlot?E.assignedSlot.parentNode:E.parentNode)},N=E=>{if(E)switch(c.position){case qa.left:return{left:0,transform:"translateX(0)"};case qa.right:return{left:`${E.width}px`,transform:"translateX(-100%)"};default:return{left:`${E.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:d,menuStyle:f,xCorrect:l,setMenuPosition:b,getScrollableParent:A,shadowRender:(E,R)=>{var P,X,B;const Y=document.createElement("div"),D=(P=Ne(a))==null?void 0:P.getBoundingClientRect();Y.setAttribute("id","dp--temp-container");const V=(X=r.value)!=null&&X.clientWidth?r.value:document.body;V.append(Y);const T=N(D),I=u.h(E,{...R,shadow:!0,style:{opacity:0,position:"absolute",...T}},Object.fromEntries(Object.keys(s).filter(W=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(W)).map(W=>[W,s[W]])));u.render(I,Y),o.value=(B=I.el)==null?void 0:B.getBoundingClientRect(),u.render(null,Y),V.removeChild(Y)}}},j4=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]}],J21=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],ee1={all:()=>j4,monthYear:()=>j4.filter(e=>e.use.includes("month-year")),input:()=>J21,timePicker:()=>j4.filter(e=>e.use.includes("time")),action:()=>j4.filter(e=>e.use.includes("action")),calendar:()=>j4.filter(e=>e.use.includes("calendar")),menu:()=>j4.filter(e=>e.use.includes("menu")),shared:()=>j4.filter(e=>e.use.includes("shared")),yearMode:()=>j4.filter(e=>e.use.includes("year-mode"))},Et=(e,t,a)=>{const r=[];return ee1[t]().forEach(n=>{e[n.name]&&r.push(n.name)}),a!=null&&a.length&&a.forEach(n=>{n.slot&&r.push(n.slot)}),r},Rn=e=>{const t=u.computed(()=>r=>e.value?r?e.value.open:e.value.close:""),a=u.computed(()=>r=>e.value?r?e.value.menuAppearTop:e.value.menuAppearBottom:"");return{transitionName:t,showTransition:!!e.value,menuTransition:a}},Fn=(e,t)=>{const{defaultedRange:a,defaultedTz:r}=ue(e),n=R1(K3(R1(),r.value.timezone)),i=u.ref([{month:v2(n),year:d2(n)}]),c=d=>{const h={hours:O4(n),minutes:w0(n),seconds:0};return a.value.enabled?[h[d],h[d]]:h[d]},s=u.reactive({hours:c("hours"),minutes:c("minutes"),seconds:c("seconds")});u.watch(a,(d,h)=>{d.enabled!==h.enabled&&(s.hours=c("hours"),s.minutes=c("minutes"),s.seconds=c("seconds"))},{deep:!0});const o=u.computed({get:()=>e.internalModelValue,set:d=>{!e.readonly&&!e.disabled&&t("update:internal-model-value",d)}}),l=u.computed(()=>d=>i.value[d]?i.value[d].month:0),f=u.computed(()=>d=>i.value[d]?i.value[d].year:0);return{calendars:i,time:s,modelValue:o,month:l,year:f,today:n}},te1=(e,t)=>{const{defaultedMultiCalendars:a,defaultedMultiDates:r,defaultedHighlight:n,defaultedTz:i,propDates:c,defaultedRange:s}=ue(t),{isDisabled:o}=V0(t),l=u.ref(null),f=u.ref(K3(new Date,i.value.timezone)),d=T=>{!T.current&&t.hideOffsetDates||(l.value=T.value)},h=()=>{l.value=null},m=T=>Array.isArray(e.value)&&s.value.enabled&&e.value[0]&&l.value?T?ze(l.value,e.value[0]):he(l.value,e.value[0]):!0,p=(T,I)=>{const W=()=>e.value?I?e.value[0]||null:e.value[1]:null,O=e.value&&Array.isArray(e.value)?W():null;return g2(R1(T.value),O)},v=T=>{const I=Array.isArray(e.value)?e.value[0]:null;return T?!he(l.value??null,I):!0},g=(T,I=!0)=>(s.value.enabled||t.weekPicker)&&Array.isArray(e.value)&&e.value.length===2?t.hideOffsetDates&&!T.current?!1:g2(R1(T.value),e.value[I?0:1]):s.value.enabled?p(T,I)&&v(I)||g2(T.value,Array.isArray(e.value)?e.value[0]:null)&&m(I):!1,y=(T,I)=>{if(Array.isArray(e.value)&&e.value[0]&&e.value.length===1){const W=g2(T.value,l.value);return I?ze(e.value[0],T.value)&&W:he(e.value[0],T.value)&&W}return!1},x=T=>!e.value||t.hideOffsetDates&&!T.current?!1:s.value.enabled?t.modelAuto&&Array.isArray(e.value)?g2(T.value,e.value[0]?e.value[0]:f.value):!1:r.value.enabled&&Array.isArray(e.value)?e.value.some(I=>g2(I,T.value)):g2(T.value,e.value?e.value:f.value),C=T=>{if(s.value.autoRange||t.weekPicker){if(l.value){if(t.hideOffsetDates&&!T.current)return!1;const I=u3(l.value,+s.value.autoRange),W=g4(R1(l.value),t.weekStart);return t.weekPicker?g2(W[1],R1(T.value)):g2(I,R1(T.value))}return!1}return!1},b=T=>{if(s.value.autoRange||t.weekPicker){if(l.value){const I=u3(l.value,+s.value.autoRange);if(t.hideOffsetDates&&!T.current)return!1;const W=g4(R1(l.value),t.weekStart);return t.weekPicker?ze(T.value,W[0])&&he(T.value,W[1]):ze(T.value,l.value)&&he(T.value,I)}return!1}return!1},M=T=>{if(s.value.autoRange||t.weekPicker){if(l.value){if(t.hideOffsetDates&&!T.current)return!1;const I=g4(R1(l.value),t.weekStart);return t.weekPicker?g2(I[0],T.value):g2(l.value,T.value)}return!1}return!1},w=T=>Y8(e.value,l.value,T.value),z=()=>t.modelAuto&&Array.isArray(t.internalModelValue)?!!t.internalModelValue[0]:!1,_=()=>t.modelAuto?zb(t.internalModelValue):!0,S=T=>{if(t.weekPicker)return!1;const I=s.value.enabled?!g(T)&&!g(T,!1):!0;return!o(T.value)&&!x(T)&&!(!T.current&&t.hideOffsetDates)&&I},k=T=>s.value.enabled?t.modelAuto?z()&&x(T):!1:x(T),H=T=>n.value?H21(T.value,c.value.highlight):!1,L=T=>{const I=o(T.value);return I&&(typeof n.value=="function"?!n.value(T.value,I):!n.value.options.highlightDisabled)},A=T=>{var I;return typeof n.value=="function"?n.value(T.value):(I=n.value.weekdays)==null?void 0:I.includes(T.value.getDay())},N=T=>(s.value.enabled||t.weekPicker)&&(!(a.value.count>0)||T.current)&&_()&&!(!T.current&&t.hideOffsetDates)&&!x(T)?w(T):!1,E=T=>{const{isRangeStart:I,isRangeEnd:W}=B(T),O=s.value.enabled?I||W:!1;return{dp__cell_offset:!T.current,dp__pointer:!t.disabled&&!(!T.current&&t.hideOffsetDates)&&!o(T.value),dp__cell_disabled:o(T.value),dp__cell_highlight:!L(T)&&(H(T)||A(T))&&!k(T)&&!O&&!M(T)&&!(N(T)&&t.weekPicker)&&!W,dp__cell_highlight_active:!L(T)&&(H(T)||A(T))&&k(T),dp__today:!t.noToday&&g2(T.value,f.value)&&T.current,"dp--past":he(T.value,f.value),"dp--future":ze(T.value,f.value)}},R=T=>({dp__active_date:k(T),dp__date_hover:S(T)}),P=T=>{if(e.value&&!Array.isArray(e.value)){const I=g4(e.value,t.weekStart);return{...D(T),dp__range_start:g2(I[0],T.value),dp__range_end:g2(I[1],T.value),dp__range_between_week:ze(T.value,I[0])&&he(T.value,I[1])}}return{...D(T)}},X=T=>{if(e.value&&Array.isArray(e.value)){const I=g4(e.value[0],t.weekStart),W=e.value[1]?g4(e.value[1],t.weekStart):[];return{...D(T),dp__range_start:g2(I[0],T.value)||g2(W[0],T.value),dp__range_end:g2(I[1],T.value)||g2(W[1],T.value),dp__range_between_week:ze(T.value,I[0])&&he(T.value,I[1])||ze(T.value,W[0])&&he(T.value,W[1]),dp__range_between:ze(T.value,I[1])&&he(T.value,W[0])}}return{...D(T)}},B=T=>{const I=a.value.count>0?T.current&&g(T)&&_():g(T)&&_(),W=a.value.count>0?T.current&&g(T,!1)&&_():g(T,!1)&&_();return{isRangeStart:I,isRangeEnd:W}},Y=T=>{const{isRangeStart:I,isRangeEnd:W}=B(T);return{dp__range_start:I,dp__range_end:W,dp__range_between:N(T),dp__date_hover:g2(T.value,l.value)&&!I&&!W&&!t.weekPicker,dp__date_hover_start:y(T,!0),dp__date_hover_end:y(T,!1)}},D=T=>({...Y(T),dp__cell_auto_range:b(T),dp__cell_auto_range_start:M(T),dp__cell_auto_range_end:C(T)}),V=T=>s.value.enabled?s.value.autoRange?D(T):t.modelAuto?{...R(T),...Y(T)}:t.weekPicker?X(T):Y(T):t.weekPicker?P(T):R(T);return{setHoverDate:d,clearHoverDate:h,getDayClassData:T=>t.hideOffsetDates&&!T.current?{}:{...E(T),...V(T),[t.dayClass?t.dayClass(T.value):""]:!0,[t.calendarCellClassName]:!!t.calendarCellClassName}}},V0=e=>{const{defaultedFilters:t,defaultedRange:a,propDates:r,defaultedMultiDates:n}=ue(e),i=L=>r.value.disabledDates?typeof r.value.disabledDates=="function"?r.value.disabledDates(R1(L)):!!Qi(L,r.value.disabledDates):!1,c=L=>{const A=r.value.maxDate?ze(L,r.value.maxDate):!1,N=r.value.minDate?he(L,r.value.minDate):!1,E=i(L),R=t.value.months.map(D=>+D).includes(v2(L)),P=e.disabledWeekDays.length?e.disabledWeekDays.some(D=>+D===p11(L)):!1,X=d(L),B=d2(L),Y=B<+e.yearRange[0]||B>+e.yearRange[1];return!(A||N||E||R||Y||P||X)},s=(L,A)=>he(...c0(r.value.minDate,L,A))||g2(...c0(r.value.minDate,L,A)),o=(L,A)=>ze(...c0(r.value.maxDate,L,A))||g2(...c0(r.value.maxDate,L,A)),l=(L,A,N)=>{let E=!1;return r.value.maxDate&&N&&o(L,A)&&(E=!0),r.value.minDate&&!N&&s(L,A)&&(E=!0),E},f=(L,A,N,E)=>{let R=!1;return E?r.value.minDate&&r.value.maxDate?R=l(L,A,N):(r.value.minDate&&s(L,A)||r.value.maxDate&&o(L,A))&&(R=!0):R=!0,R},d=L=>Array.isArray(r.value.allowedDates)&&!r.value.allowedDates.length?!0:r.value.allowedDates?!Qi(L,r.value.allowedDates):!1,h=L=>!c(L),m=L=>a.value.noDisabledRange?!cb({start:L[0],end:L[1]}).some(A=>h(A)):!0,p=L=>{if(L){const A=d2(L);return A>=+e.yearRange[0]&&A<=e.yearRange[1]}return!0},v=(L,A)=>!!(Array.isArray(L)&&L[A]&&(a.value.maxRange||a.value.minRange)&&p(L[A])),g=(L,A,N=0)=>{if(v(A,N)&&p(L)){const E=rb(L,A[N]),R=Lb(A[N],L),P=R.length===1?0:R.filter(B=>h(B)).length,X=Math.abs(E)-(a.value.minMaxRawRange?0:P);if(a.value.minRange&&a.value.maxRange)return X>=+a.value.minRange&&X<=+a.value.maxRange;if(a.value.minRange)return X>=+a.value.minRange;if(a.value.maxRange)return X<=+a.value.maxRange}return!0},y=()=>!e.enableTimePicker||e.monthPicker||e.yearPicker||e.ignoreTimeValidation,x=L=>Array.isArray(L)?[L[0]?xs(L[0]):null,L[1]?xs(L[1]):null]:xs(L),C=(L,A,N)=>L.find(E=>+E.hours===O4(A)&&E.minutes==="*"?!0:+E.minutes===w0(A)&&+E.hours===O4(A))&&N,b=(L,A,N)=>{const[E,R]=L,[P,X]=A;return!C(E,P,N)&&!C(R,X,N)&&N},M=(L,A)=>{const N=Array.isArray(A)?A:[A];return Array.isArray(e.disabledTimes)?Array.isArray(e.disabledTimes[0])?b(e.disabledTimes,N,L):!N.some(E=>C(e.disabledTimes,E,L)):L},w=(L,A)=>{const N=Array.isArray(A)?[na(A[0]),A[1]?na(A[1]):void 0]:na(A),E=!e.disabledTimes(N);return L&&E},z=(L,A)=>e.disabledTimes?Array.isArray(e.disabledTimes)?M(A,L):w(A,L):A,_=L=>{let A=!0;if(!L||y())return!0;const N=!r.value.minDate&&!r.value.maxDate?x(L):L;return(e.maxTime||r.value.maxDate)&&(A=wm(e.maxTime,r.value.maxDate,"max",$e(N),A)),(e.minTime||r.value.minDate)&&(A=wm(e.minTime,r.value.minDate,"min",$e(N),A)),z(L,A)},S=L=>{if(!e.monthPicker)return!0;let A=!0;const N=R1(d3(L));if(r.value.minDate&&r.value.maxDate){const E=R1(d3(r.value.minDate)),R=R1(d3(r.value.maxDate));return ze(N,E)&&he(N,R)||g2(N,E)||g2(N,R)}if(r.value.minDate){const E=R1(d3(r.value.minDate));A=ze(N,E)||g2(N,E)}if(r.value.maxDate){const E=R1(d3(r.value.maxDate));A=he(N,E)||g2(N,E)}return A},k=u.computed(()=>L=>!e.enableTimePicker||e.ignoreTimeValidation?!0:_(L)),H=u.computed(()=>L=>e.monthPicker?Array.isArray(L)&&(a.value.enabled||n.value.enabled)?!L.filter(A=>!S(A)).length:S(L):!0);return{isDisabled:h,validateDate:c,validateMonthYearInRange:f,isDateRangeAllowed:m,checkMinMaxRange:g,isValidTime:_,isTimeValid:k,isMonthValid:H}},X8=()=>{const e=u.computed(()=>(r,n)=>r==null?void 0:r.includes(n)),t=u.computed(()=>(r,n)=>r.count?r.solo?!0:n===0:!0),a=u.computed(()=>(r,n)=>r.count?r.solo?!0:n===r.count-1:!0);return{hideNavigationButtons:e,showLeftIcon:t,showRightIcon:a}},ae1=(e,t,a)=>{const r=u.ref(0),n=u.reactive({[ra.timePicker]:!e.enableTimePicker||e.timePicker||e.monthPicker,[ra.calendar]:!1,[ra.header]:!1}),i=u.computed(()=>e.monthPicker||e.timePicker),c=d=>{var h;if((h=e.flow)!=null&&h.length){if(!d&&i.value)return f();n[d]=!0,Object.keys(n).filter(m=>!n[m]).length||f()}},s=()=>{var d;(d=e.flow)!=null&&d.length&&r.value!==-1&&(r.value+=1,t("flow-step",r.value),f())},o=()=>{r.value=-1},l=(d,h,...m)=>{var p,v;e.flow[r.value]===d&&a.value&&((v=(p=a.value)[h])==null||v.call(p,...m))},f=()=>{l(at.month,"toggleMonthPicker",!0),l(at.year,"toggleYearPicker",!0),l(at.calendar,"toggleTimePicker",!1,!0),l(at.time,"toggleTimePicker",!0,!0);const d=e.flow[r.value];(d===at.hours||d===at.minutes||d===at.seconds)&&l(d,"toggleTimePicker",!0,!0,d)};return{childMount:c,updateFlowStep:s,resetFlow:o,flowStep:r}},K8={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},emitTimezone:{type:String,default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},menuClassName:{type:String,default:null},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},calendarCellClassName:{type:String,default:null},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},autoRange:{type:[Number,String],default:null},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},minRange:{type:[Number,String],default:null},maxRange:{type:[Number,String],default:null},multiDatesLimit:{type:[Number,String],default:null},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},disableTimeRangeValidation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},calendarClassName:{type:String,default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},partialRange:{type:Boolean,default:!0},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},inputClassName:{type:String,default:null},fixedStart:{type:Boolean,default:!1},fixedEnd:{type:Boolean,default:!1},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},noDisabledRange:{type:Boolean,default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},showLastInRange:{type:Boolean,default:!0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0}},A3={...K8,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})}},re1={key:1,class:"dp__input_wrap"},ne1=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],ce1={key:2,class:"dp__clear_icon"},ie1=u.defineComponent({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...K8},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur"],setup(e,{expose:t,emit:a}){const r=a,n=e,{defaultedTextInput:i,defaultedAriaLabels:c,defaultedInline:s,defaultedConfig:o,defaultedRange:l,defaultedMultiDates:f,getDefaultPattern:d,getDefaultStartTime:h}=ue(n),{checkMinMaxRange:m}=V0(n),p=u.ref(),v=u.ref(null),g=u.ref(!1),y=u.ref(!1),x=u.computed(()=>({dp__pointer:!n.disabled&&!n.readonly&&!i.value.enabled,dp__disabled:n.disabled,dp__input_readonly:!i.value.enabled,dp__input:!0,dp__input_icon_pad:!n.hideInputIcon,dp__input_valid:!!n.state,dp__input_invalid:n.state===!1,dp__input_focus:g.value||n.isMenuOpen,dp__input_reg:!i.value.enabled,[n.inputClassName]:!!n.inputClassName})),C=()=>{r("set-input-date",null),n.clearable&&n.autoApply&&(r("set-empty-date"),p.value=null)},b=R=>{const P=h();return S21(R,i.value.format??d(),P??kb({},n.enableSeconds),n.inputValue,y.value,n.formatLocale)},M=R=>{const{rangeSeparator:P}=i.value,[X,B]=R.split(`${P}`);if(X){const Y=b(X.trim()),D=B?b(B.trim()):null;if(g6(Y,D))return;const V=Y&&D?[Y,D]:[Y];m(D,V,0)&&(p.value=Y?V:null)}},w=()=>{y.value=!0},z=R=>{if(l.value.enabled)M(R);else if(f.value.enabled){const P=R.split(";");p.value=P.map(X=>b(X.trim())).filter(X=>X)}else p.value=b(R)},_=R=>{var P;const X=typeof R=="string"?R:(P=R.target)==null?void 0:P.value;X!==""?(i.value.openMenu&&!n.isMenuOpen&&r("open"),z(X),r("set-input-date",p.value)):C(),y.value=!1,r("update:input-value",X)},S=R=>{i.value.enabled?(z(R.target.value),i.value.enterSubmit&&Xo(p.value)&&n.inputValue!==""?(r("set-input-date",p.value,!0),p.value=null):i.value.enterSubmit&&n.inputValue===""&&(p.value=null,r("clear"))):L(R)},k=R=>{i.value.enabled&&i.value.tabSubmit&&z(R.target.value),i.value.tabSubmit&&Xo(p.value)&&n.inputValue!==""?(r("set-input-date",p.value,!0,!0),p.value=null):i.value.tabSubmit&&n.inputValue===""&&(p.value=null,r("clear",!0))},H=()=>{g.value=!0,r("focus"),u.nextTick().then(()=>{var R;i.value.enabled&&i.value.selectOnFocus&&((R=v.value)==null||R.select())})},L=R=>{R.preventDefault(),h0(R,o.value,!0),i.value.enabled&&i.value.openMenu&&!s.value.input&&!n.isMenuOpen?r("open"):i.value.enabled||r("toggle")},A=()=>{r("real-blur"),g.value=!1,(!n.isMenuOpen||s.value.enabled&&s.value.input)&&r("blur"),n.autoApply&&i.value.enabled&&p.value&&!n.isMenuOpen&&(r("set-input-date",p.value),r("select-date"),p.value=null)},N=R=>{h0(R,o.value,!0),r("clear")},E=R=>{if(R.key==="Tab"&&k(R),R.key==="Enter"&&S(R),!i.value.enabled){if(R.code==="Tab")return;R.preventDefault()}};return t({focusInput:()=>{var R;(R=v.value)==null||R.focus({preventScroll:!0})},setParsedDate:R=>{p.value=R}}),(R,P)=>{var X;return u.openBlock(),u.createElementBlock("div",{onClick:L},[R.$slots.trigger&&!R.$slots["dp-input"]&&!u.unref(s).enabled?u.renderSlot(R.$slots,"trigger",{key:0}):u.createCommentVNode("",!0),!R.$slots.trigger&&(!u.unref(s).enabled||u.unref(s).input)?(u.openBlock(),u.createElementBlock("div",re1,[R.$slots["dp-input"]&&!R.$slots.trigger&&(!u.unref(s).enabled||u.unref(s).enabled&&u.unref(s).input)?u.renderSlot(R.$slots,"dp-input",{key:0,value:e.inputValue,isMenuOpen:e.isMenuOpen,onInput:_,onEnter:S,onTab:k,onClear:N,onBlur:A,onKeypress:E,onPaste:w,openMenu:()=>R.$emit("open"),closeMenu:()=>R.$emit("close"),toggleMenu:()=>R.$emit("toggle")}):u.createCommentVNode("",!0),R.$slots["dp-input"]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("input",{key:1,id:R.uid?`dp-input-${R.uid}`:void 0,ref_key:"inputRef",ref:v,"data-test":"dp-input",name:R.name,class:u.normalizeClass(x.value),inputmode:u.unref(i).enabled?"text":"none",placeholder:R.placeholder,disabled:R.disabled,readonly:R.readonly,required:R.required,value:e.inputValue,autocomplete:R.autocomplete,"aria-label":(X=u.unref(c))==null?void 0:X.input,"aria-disabled":R.disabled||void 0,"aria-invalid":R.state===!1?!0:void 0,onInput:_,onBlur:A,onFocus:H,onKeypress:E,onKeydown:E,onPaste:w},null,42,ne1)),u.createElementVNode("div",{onClick:P[2]||(P[2]=B=>r("toggle"))},[R.$slots["input-icon"]&&!R.hideInputIcon?(u.openBlock(),u.createElementBlock("span",{key:0,class:"dp__input_icon",onClick:P[0]||(P[0]=B=>r("toggle"))},[u.renderSlot(R.$slots,"input-icon")])):u.createCommentVNode("",!0),!R.$slots["input-icon"]&&!R.hideInputIcon&&!R.$slots["dp-input"]?(u.openBlock(),u.createBlock(u.unref(L6),{key:1,class:"dp__input_icon dp__input_icons",onClick:P[1]||(P[1]=B=>r("toggle"))})):u.createCommentVNode("",!0)]),R.$slots["clear-icon"]&&e.inputValue&&R.clearable&&!R.disabled&&!R.readonly?(u.openBlock(),u.createElementBlock("span",ce1,[u.renderSlot(R.$slots,"clear-icon",{clear:N})])):u.createCommentVNode("",!0),R.clearable&&!R.$slots["clear-icon"]&&e.inputValue&&!R.disabled&&!R.readonly?(u.openBlock(),u.createBlock(u.unref(bb),{key:3,class:"dp__clear_icon dp__input_icons","data-test":"clear-icon",onClick:P[3]||(P[3]=u.withModifiers(B=>N(B),["prevent"]))})):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)])}}}),se1=["title"],oe1=["disabled"],le1=u.defineComponent({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...A3},emits:["close-picker","select-date","select-now","invalid-select"],setup(e,{emit:t}){const a=t,r=e,{defaultedActionRow:n,defaultedPreviewFormat:i,defaultedMultiCalendars:c,defaultedTextInput:s,defaultedInline:o,defaultedRange:l,defaultedMultiDates:f,getDefaultPattern:d}=ue(r),{isTimeValid:h,isMonthValid:m}=V0(r),{buildMatrix:p}=A0(),v=u.ref(null),g=u.ref(null),y=u.ref(!1),x=u.ref({}),C=u.ref(null),b=u.ref(null);u.onMounted(()=>{r.arrowNavigation&&p([Ne(v),Ne(g)],"actionRow"),M(),window.addEventListener("resize",M)}),u.onUnmounted(()=>{window.removeEventListener("resize",M)});const M=()=>{y.value=!1,setTimeout(()=>{var E,R;const P=(E=C.value)==null?void 0:E.getBoundingClientRect(),X=(R=b.value)==null?void 0:R.getBoundingClientRect();P&&X&&(x.value.maxWidth=`${X.width-P.width-20}px`),y.value=!0},0)},w=u.computed(()=>l.value.enabled&&!l.value.partialRange&&r.internalModelValue?r.internalModelValue.length===2:!0),z=u.computed(()=>!h.value(r.internalModelValue)||!m.value(r.internalModelValue)||!w.value),_=()=>{const E=i.value;return r.timePicker||r.monthPicker,E($e(r.internalModelValue))},S=()=>{const E=r.internalModelValue;return c.value.count>0?`${k(E[0])} - ${k(E[1])}`:[k(E[0]),k(E[1])]},k=E=>Vb(E,i.value,r.formatLocale,s.value.rangeSeparator,r.modelAuto,d()),H=u.computed(()=>!r.internalModelValue||!r.menuMount?"":typeof i.value=="string"?Array.isArray(r.internalModelValue)?r.internalModelValue.length===2&&r.internalModelValue[1]?S():f.value.enabled?r.internalModelValue.map(E=>`${k(E)}`):r.modelAuto?`${k(r.internalModelValue[0])}`:`${k(r.internalModelValue[0])} -`:k(r.internalModelValue):_()),L=()=>f.value.enabled?"; ":" - ",A=u.computed(()=>Array.isArray(H.value)?H.value.join(L()):H.value),N=()=>{h.value(r.internalModelValue)&&m.value(r.internalModelValue)&&w.value?a("select-date"):a("invalid-select")};return(E,R)=>(u.openBlock(),u.createElementBlock("div",{ref_key:"actionRowRef",ref:b,class:"dp__action_row"},[E.$slots["action-row"]?u.renderSlot(E.$slots,"action-row",u.normalizeProps(u.mergeProps({key:0},{internalModelValue:E.internalModelValue,disabled:z.value,selectDate:()=>E.$emit("select-date"),closePicker:()=>E.$emit("close-picker")}))):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.unref(n).showPreview?(u.openBlock(),u.createElementBlock("div",{key:0,class:"dp__selection_preview",title:A.value,style:u.normalizeStyle(x.value)},[E.$slots["action-preview"]&&y.value?u.renderSlot(E.$slots,"action-preview",{key:0,value:E.internalModelValue}):u.createCommentVNode("",!0),!E.$slots["action-preview"]&&y.value?(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(A.value),1)],64)):u.createCommentVNode("",!0)],12,se1)):u.createCommentVNode("",!0),u.createElementVNode("div",{ref_key:"actionBtnContainer",ref:C,class:"dp__action_buttons","data-dp-element":"action-row"},[E.$slots["action-buttons"]?u.renderSlot(E.$slots,"action-buttons",{key:0,value:E.internalModelValue}):u.createCommentVNode("",!0),E.$slots["action-buttons"]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[!u.unref(o).enabled&&u.unref(n).showCancel?(u.openBlock(),u.createElementBlock("button",{key:0,ref_key:"cancelButtonRef",ref:v,type:"button",class:"dp__action_button dp__action_cancel",onClick:R[0]||(R[0]=P=>E.$emit("close-picker")),onKeydown:R[1]||(R[1]=P=>u.unref(Lt)(P,()=>E.$emit("close-picker")))},u.toDisplayString(E.cancelText),545)):u.createCommentVNode("",!0),u.unref(n).showNow?(u.openBlock(),u.createElementBlock("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:R[2]||(R[2]=P=>E.$emit("select-now")),onKeydown:R[3]||(R[3]=P=>u.unref(Lt)(P,()=>E.$emit("select-now")))},u.toDisplayString(E.nowButtonLabel),33)):u.createCommentVNode("",!0),u.unref(n).showSelect?(u.openBlock(),u.createElementBlock("button",{key:2,ref_key:"selectButtonRef",ref:g,type:"button",class:"dp__action_button dp__action_select",disabled:z.value,"data-test":"select-button",onKeydown:R[4]||(R[4]=P=>u.unref(Lt)(P,()=>N())),onClick:N},u.toDisplayString(E.selectText),41,oe1)):u.createCommentVNode("",!0)],64))],512)],64))],512))}}),fe1={class:"dp__selection_grid_header"},ue1=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],de1=["aria-label"],Bn=u.defineComponent({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(e,{expose:t,emit:a}){const{setSelectionGrid:r,buildMultiLevelMatrix:n,setMonthPicker:i}=A0(),c=a,s=e,{defaultedAriaLabels:o,defaultedTextInput:l,defaultedConfig:f}=ue(s),{hideNavigationButtons:d}=X8(),h=u.ref(!1),m=u.ref(null),p=u.ref(null),v=u.ref([]),g=u.ref(),y=u.ref(null),x=u.ref(0),C=u.ref(null);u.onBeforeUpdate(()=>{m.value=null}),u.onMounted(()=>{u.nextTick().then(()=>H()),s.noOverlayFocus||M(),b(!0)}),u.onUnmounted(()=>b(!1));const b=V=>{var T;s.arrowNavigation&&((T=s.headerRefs)!=null&&T.length?i(V):r(V))},M=()=>{var V;const T=Ne(p);T&&(l.value.enabled||(m.value?(V=m.value)==null||V.focus({preventScroll:!0}):T.focus({preventScroll:!0})),h.value=T.clientHeight<T.scrollHeight)},w=u.computed(()=>({dp__overlay:!0,"dp--overlay-absolute":!s.useRelative,"dp--overlay-relative":s.useRelative})),z=u.computed(()=>s.useRelative?{height:`${s.height}px`,width:"260px"}:void 0),_=u.computed(()=>({dp__overlay_col:!0})),S=u.computed(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:h.value,dp__button_bottom:s.isLast})),k=u.computed(()=>{var V,T;return{dp__overlay_container:!0,dp__container_flex:((V=s.items)==null?void 0:V.length)<=6,dp__container_block:((T=s.items)==null?void 0:T.length)>6}});u.watch(()=>s.items,()=>H(!1),{deep:!0});const H=(V=!0)=>{u.nextTick().then(()=>{const T=Ne(m),I=Ne(p),W=Ne(y),O=Ne(C),j=W?W.getBoundingClientRect().height:0;I&&(I.getBoundingClientRect().height?x.value=I.getBoundingClientRect().height-j:x.value=f.value.modeHeight-j),T&&O&&V&&(O.scrollTop=T.offsetTop-O.offsetTop-(x.value/2-T.getBoundingClientRect().height)-j)})},L=V=>{V.disabled||c("selected",V.value)},A=()=>{c("toggle"),c("reset-flow")},N=()=>{s.escClose&&A()},E=(V,T,I,W)=>{V&&((T.active||T.value===s.focusValue)&&(m.value=V),s.arrowNavigation&&(Array.isArray(v.value[I])?v.value[I][W]=V:v.value[I]=[V],R()))},R=()=>{var V,T;const I=(V=s.headerRefs)!=null&&V.length?[s.headerRefs].concat(v.value):v.value.concat([s.skipButtonRef?[]:[y.value]]);n($e(I),(T=s.headerRefs)!=null&&T.length?"monthPicker":"selectionGrid")},P=V=>{s.arrowNavigation||h0(V,f.value,!0)},X=V=>{g.value=V,c("hover-value",V)},B=()=>{if(A(),!s.isLast){const V=_21(s.menuWrapRef??null,"action-row");if(V){const T=wb(V);T==null||T.focus()}}},Y=V=>{switch(V.key){case oe.esc:return N();case oe.arrowLeft:return P(V);case oe.arrowRight:return P(V);case oe.arrowUp:return P(V);case oe.arrowDown:return P(V);default:return}},D=V=>{if(V.key===oe.enter)return A();if(V.key===oe.tab)return B()};return t({focusGrid:M}),(V,T)=>{var I;return u.openBlock(),u.createElementBlock("div",{ref_key:"gridWrapRef",ref:p,class:u.normalizeClass(w.value),style:u.normalizeStyle(z.value),role:"dialog",tabindex:"0",onKeydown:Y},[u.createElementVNode("div",{ref_key:"containerRef",ref:C,class:u.normalizeClass(k.value),role:"grid",style:u.normalizeStyle({"--dp-overlay-height":`${x.value}px`})},[u.createElementVNode("div",fe1,[u.renderSlot(V.$slots,"header")]),V.$slots.overlay?u.renderSlot(V.$slots,"overlay",{key:0}):(u.openBlock(!0),u.createElementBlock(u.Fragment,{key:1},u.renderList(V.items,(W,O)=>(u.openBlock(),u.createElementBlock("div",{key:O,class:u.normalizeClass(["dp__overlay_row",{dp__flex_row:V.items.length>=3}]),role:"row"},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(W,(j,t1)=>(u.openBlock(),u.createElementBlock("div",{key:j.value,ref_for:!0,ref:r1=>E(r1,j,O,t1),role:"gridcell",class:u.normalizeClass(_.value),"aria-selected":j.active||void 0,"aria-disabled":j.disabled||void 0,tabindex:"0","data-test":j.text,onClick:r1=>L(j),onKeydown:r1=>u.unref(Lt)(r1,()=>L(j),!0),onMouseover:r1=>X(j.value)},[u.createElementVNode("div",{class:u.normalizeClass(j.className)},[V.$slots.item?u.renderSlot(V.$slots,"item",{key:0,item:j}):u.createCommentVNode("",!0),V.$slots.item?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(j.text),1)],64))],2)],42,ue1))),128))],2))),128))],6),V.$slots["button-icon"]?u.withDirectives((u.openBlock(),u.createElementBlock("button",{key:0,ref_key:"toggleButton",ref:y,type:"button","aria-label":(I=u.unref(o))==null?void 0:I.toggleOverlay,class:u.normalizeClass(S.value),tabindex:"0",onClick:A,onKeydown:D},[u.renderSlot(V.$slots,"button-icon")],42,de1)),[[u.vShow,!u.unref(d)(V.hideNavigation,V.type)]]):u.createCommentVNode("",!0)],38)}}}),Z8=u.defineComponent({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(e){const t=e,a=u.computed(()=>t.multiCalendars>0?[...Array(t.multiCalendars).keys()]:[0]),r=u.computed(()=>({dp__instance_calendar:t.multiCalendars>0}));return(n,i)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass({dp__menu_inner:!n.stretch,"dp--menu--inner-stretched":n.stretch,dp__flex_display:n.multiCalendars>0,"dp--flex-display-collapsed":n.collapse})},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.value,(c,s)=>(u.openBlock(),u.createElementBlock("div",{key:c,class:u.normalizeClass(r.value)},[u.renderSlot(n.$slots,"default",{instance:c,index:s})],2))),128))],2))}}),he1=["aria-label","aria-disabled"],Hr=u.defineComponent({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(e,{emit:t}){const a=t,r=u.ref(null);return u.onMounted(()=>a("set-ref",r)),(n,i)=>(u.openBlock(),u.createElementBlock("button",{ref_key:"elRef",ref:r,type:"button",class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":n.ariaLabel,"aria-disabled":n.disabled||void 0,onClick:i[0]||(i[0]=c=>n.$emit("activate")),onKeydown:i[1]||(i[1]=c=>u.unref(Lt)(c,()=>n.$emit("activate"),!0))},[u.createElementVNode("span",{class:u.normalizeClass(["dp__inner_nav",{dp__inner_nav_disabled:n.disabled}])},[u.renderSlot(n.$slots,"default")],2)],40,he1))}}),me1={class:"dp--year-mode-picker"},pe1=["aria-label","data-test"],Nb=u.defineComponent({__name:"YearModePicker",props:{...A3,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(e,{emit:t}){const a=t,r=e,{showRightIcon:n,showLeftIcon:i}=X8(),{defaultedConfig:c,defaultedMultiCalendars:s,defaultedAriaLabels:o,defaultedTransitions:l}=ue(r),{showTransition:f,transitionName:d}=Rn(l),h=(v=!1,g)=>{a("toggle-year-picker",{flow:v,show:g})},m=v=>{a("year-select",v)},p=(v=!1)=>{a("handle-year",v)};return(v,g)=>{var y,x,C;return u.openBlock(),u.createElementBlock("div",me1,[u.unref(i)(u.unref(s),e.instance)?(u.openBlock(),u.createBlock(Hr,{key:0,ref:"mpPrevIconRef","aria-label":(y=u.unref(o))==null?void 0:y.prevYear,disabled:e.isDisabled(!1),onActivate:g[0]||(g[0]=b=>p(!1))},{default:u.withCtx(()=>[v.$slots["arrow-left"]?u.renderSlot(v.$slots,"arrow-left",{key:0}):u.createCommentVNode("",!0),v.$slots["arrow-left"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(ql),{key:1}))]),_:3},8,["aria-label","disabled"])):u.createCommentVNode("",!0),u.createElementVNode("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":(x=u.unref(o))==null?void 0:x.openYearsOverlay,"data-test":`year-mode-btn-${e.instance}`,onClick:g[1]||(g[1]=()=>h(!1)),onKeydown:g[2]||(g[2]=u.withKeys(()=>h(!1),["enter"]))},[v.$slots.year?u.renderSlot(v.$slots,"year",{key:0,year:e.year}):u.createCommentVNode("",!0),v.$slots.year?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(e.year),1)],64))],40,pe1),u.unref(n)(u.unref(s),e.instance)?(u.openBlock(),u.createBlock(Hr,{key:1,ref:"mpNextIconRef","aria-label":(C=u.unref(o))==null?void 0:C.nextYear,disabled:e.isDisabled(!0),onActivate:g[3]||(g[3]=b=>p(!0))},{default:u.withCtx(()=>[v.$slots["arrow-right"]?u.renderSlot(v.$slots,"arrow-right",{key:0}):u.createCommentVNode("",!0),v.$slots["arrow-right"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(jl),{key:1}))]),_:3},8,["aria-label","disabled"])):u.createCommentVNode("",!0),u.createVNode(u.Transition,{name:u.unref(d)(e.showYearPicker),css:u.unref(f)},{default:u.withCtx(()=>[e.showYearPicker?(u.openBlock(),u.createBlock(Bn,{key:0,items:e.items,"text-input":v.textInput,"esc-close":v.escClose,config:v.config,"is-last":v.autoApply&&!u.unref(c).keepActionRow,"hide-navigation":v.hideNavigation,"aria-labels":v.ariaLabels,type:"year",onToggle:h,onSelected:g[4]||(g[4]=b=>m(b))},u.createSlots({"button-icon":u.withCtx(()=>[v.$slots["calendar-icon"]?u.renderSlot(v.$slots,"calendar-icon",{key:0}):u.createCommentVNode("",!0),v.$slots["calendar-icon"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(L6),{key:1}))]),_:2},[v.$slots["year-overlay-value"]?{name:"item",fn:u.withCtx(({item:b})=>[u.renderSlot(v.$slots,"year-overlay-value",{text:b.text,value:b.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels"])):u.createCommentVNode("",!0)]),_:3},8,["name","css"])])}}}),Jl=(e,t,a)=>{if(t.value&&Array.isArray(t.value))if(t.value.some(r=>g2(e,r))){const r=t.value.filter(n=>!g2(n,e));t.value=r.length?r:null}else(a&&+a>t.value.length||!a)&&t.value.push(e);else t.value=[e]},e9=(e,t,a)=>{let r=e.value?e.value.slice():[];return r.length===2&&r[1]!==null&&(r=[]),r.length?he(t,r[0])?(r.unshift(t),a("range-start",r[0]),a("range-start",r[1])):(r[1]=t,a("range-end",t)):(r=[t],a("range-start",t)),r},Q8=(e,t,a,r)=>{e&&(e[0]&&e[1]&&a&&t("auto-apply"),e[0]&&!e[1]&&r&&a&&t("auto-apply"))},Ob=e=>{Array.isArray(e.value)&&e.value.length<=2&&e.range?e.modelValue.value=e.value.map(t=>K3(R1(t),e.timezone)):Array.isArray(e.value)||(e.modelValue.value=K3(R1(e.value),e.timezone))},Pb=(e,t,a,r)=>Array.isArray(t.value)&&(t.value.length===2||t.value.length===1&&r.value.partialRange)?r.value.fixedStart&&(ze(e,t.value[0])||g2(e,t.value[0]))?[t.value[0],e]:r.value.fixedEnd&&(he(e,t.value[1])||g2(e,t.value[1]))?[e,t.value[1]]:(a("invalid-fixed-range",e),t.value):[],Db=({multiCalendars:e,highlight:t,propDates:a,calendars:r,modelValue:n,props:i,filters:c,year:s,month:o,emit:l})=>{const f=u.computed(()=>Xl(i.yearRange,i.locale,i.reverseYears)),d=u.ref([!1]),h=u.computed(()=>(w,z)=>{const _=U2(d3(new Date),{month:o.value(w),year:s.value(w)}),S=z?ib(_):Pl(_);return Ab(S,a.value.maxDate,a.value.minDate,i.preventMinMaxNavigation,z)}),m=()=>{for(let w=0;w<e.value.count;w++)if(w===0)r.value[w]=r.value[0];else{const z=U2(R1(),r.value[w-1]);r.value[w]={month:v2(z),year:d2(Ol(z,1))}}},p=w=>{if(!w)return m();const z=U2(R1(),r.value[w]);return r.value[0].year=d2(xb(z,e.value.count-1)),m()},v=w=>i.focusStartDate?w[0]:w[1]?w[1]:w[0],g=()=>{if(n.value){const w=Array.isArray(n.value)?v(n.value):n.value;r.value[0]={month:v2(w),year:d2(w)}}};u.onMounted(()=>{g(),e.value.count&&m()});const y=(w,z)=>{r.value[z].year=w,l("update-month-year",{instance:z,year:w,month:r.value[z].month}),e.value.count&&!e.value.solo&&p(z)},x=u.computed(()=>w=>x6(f.value,z=>{var _;const S=s.value(w)===z.value,k=dn(z.value,b6(a.value.minDate),b6(a.value.maxDate))||((_=c.value.years)==null?void 0:_.includes(s.value(w))),H=Ql(t.value,z.value);return{active:S,disabled:k,highlighted:H}})),C=(w,z)=>{y(w,z),M(z)},b=(w,z=!1)=>{if(!h.value(w,z)){const _=z?s.value(w)+1:s.value(w)-1;y(_,w)}},M=(w,z=!1,_)=>{z||l("reset-flow"),_!==void 0?d.value[w]=_:d.value[w]=!d.value[w],d.value[w]?l("overlay-toggle",{open:!0,overlay:at.year}):(l("overlay-closed"),l("overlay-toggle",{open:!1,overlay:at.year}))};return{isDisabled:h,groupedYears:x,showYearPicker:d,selectYear:y,toggleYearPicker:M,handleYearSelect:C,handleYear:b}},ve1=(e,t)=>{const{defaultedMultiCalendars:a,defaultedAriaLabels:r,defaultedTransitions:n,defaultedConfig:i,defaultedRange:c,defaultedHighlight:s,propDates:o,defaultedTz:l,defaultedFilters:f,defaultedMultiDates:d}=ue(e),{modelValue:h,year:m,month:p,calendars:v}=Fn(e,t),g=u.computed(()=>Mb(e.formatLocale,e.locale,e.monthNameFormat)),y=u.ref(null),{checkMinMaxRange:x}=V0(e),{selectYear:C,groupedYears:b,showYearPicker:M,toggleYearPicker:w,handleYearSelect:z,handleYear:_,isDisabled:S}=Db({modelValue:h,multiCalendars:a,highlight:s,calendars:v,year:m,propDates:o,month:p,filters:f,props:e,emit:t});u.onMounted(()=>{e.startDate&&(h.value&&e.focusStartDate||!h.value)&&C(d2(R1(e.startDate)),0)});const k=T=>T?{month:v2(T),year:d2(T)}:{month:null,year:null},H=()=>h.value?Array.isArray(h.value)?h.value.map(T=>k(T)):k(h.value):k(),L=(T,I)=>{const W=v.value[T],O=H();return Array.isArray(O)?O.some(j=>j.year===(W==null?void 0:W.year)&&j.month===I):(W==null?void 0:W.year)===O.year&&I===O.month},A=(T,I,W)=>{var O,j;const t1=H();return Array.isArray(t1)?m.value(I)===((O=t1[W])==null?void 0:O.year)&&T===((j=t1[W])==null?void 0:j.month):!1},N=(T,I)=>{if(c.value.enabled){const W=H();if(Array.isArray(h.value)&&Array.isArray(W)){const O=A(T,I,0)||A(T,I,1),j=z4(d3(R1()),T,m.value(I));return Y8(h.value,y.value,j)&&!O}return!1}return!1},E=u.computed(()=>T=>x6(g.value,I=>{var W;const O=L(T,I.value),j=dn(I.value,Hb(m.value(T),o.value.minDate),Sb(m.value(T),o.value.maxDate))||E21(o.value.disabledDates,m.value(T)).includes(I.value)||((W=f.value.months)==null?void 0:W.includes(I.value)),t1=N(I.value,T),r1=Tb(s.value,I.value,m.value(T));return{active:O,disabled:j,isBetween:t1,highlighted:r1}})),R=(T,I)=>z4(d3(R1()),T,m.value(I)),P=(T,I)=>{const W=h.value?h.value:d3(new Date);h.value=z4(W,T,m.value(I)),t("auto-apply"),t("update-flow-step")},X=(T,I)=>{const W=R(T,I);c.value.fixedEnd||c.value.fixedStart?h.value=Pb(W,h,t,c):h.value?x(W,h.value)&&(h.value=e9(h,R(T,I),t)):h.value=[R(T,I)],u.nextTick().then(()=>{Q8(h.value,t,e.autoApply,e.modelAuto)})},B=(T,I)=>{Jl(R(T,I),h,d.value.limit),t("auto-apply",!0)},Y=(T,I)=>(v.value[I].month=T,V(I,v.value[I].year,T),d.value.enabled?B(T,I):c.value.enabled?X(T,I):P(T,I)),D=(T,I)=>{C(T,I),V(I,T,null)},V=(T,I,W)=>{let O=W;if(!O&&O!==0){const j=H();O=Array.isArray(j)?j[T].month:j.month}t("update-month-year",{instance:T,year:I,month:O})};return{groupedMonths:E,groupedYears:b,year:m,isDisabled:S,defaultedMultiCalendars:a,defaultedAriaLabels:r,defaultedTransitions:n,defaultedConfig:i,showYearPicker:M,modelValue:h,presetDate:(T,I)=>{Ob({value:T,modelValue:h,range:c.value.enabled,timezone:I?void 0:l.value.timezone}),t("auto-apply")},setHoverDate:(T,I)=>{y.value=R(T,I)},selectMonth:Y,selectYear:D,toggleYearPicker:w,handleYearSelect:z,handleYear:_,getModelMonthYear:H}},ge1=u.defineComponent({compatConfig:{MODE:3},__name:"MonthPicker",props:{...A3},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=u.useSlots(),i=Et(n,"yearMode"),c=e;u.onMounted(()=>{c.shadow||r("mount",null)});const{groupedMonths:s,groupedYears:o,year:l,isDisabled:f,defaultedMultiCalendars:d,defaultedConfig:h,showYearPicker:m,modelValue:p,presetDate:v,setHoverDate:g,selectMonth:y,selectYear:x,toggleYearPicker:C,handleYearSelect:b,handleYear:M,getModelMonthYear:w}=ve1(c,r);return t({getSidebarProps:()=>({modelValue:p,year:l,getModelMonthYear:w,selectMonth:y,selectYear:x,handleYear:M}),presetDate:v,toggleYearPicker:z=>C(0,z)}),(z,_)=>(u.openBlock(),u.createBlock(Z8,{"multi-calendars":u.unref(d).count,collapse:z.collapse,stretch:""},{default:u.withCtx(({instance:S})=>[z.$slots["top-extra"]?u.renderSlot(z.$slots,"top-extra",{key:0,value:z.internalModelValue}):u.createCommentVNode("",!0),z.$slots["month-year"]?u.renderSlot(z.$slots,"month-year",u.normalizeProps(u.mergeProps({key:1},{year:u.unref(l),months:u.unref(s)(S),years:u.unref(o)(S),selectMonth:u.unref(y),selectYear:u.unref(x),instance:S}))):(u.openBlock(),u.createBlock(Bn,{key:2,items:u.unref(s)(S),"arrow-navigation":z.arrowNavigation,"is-last":z.autoApply&&!u.unref(h).keepActionRow,"esc-close":z.escClose,height:u.unref(h).modeHeight,config:z.config,"no-overlay-focus":!!(z.noOverlayFocus||z.textInput),"use-relative":"",type:"month",onSelected:k=>u.unref(y)(k,S),onHoverValue:k=>u.unref(g)(k,S)},u.createSlots({header:u.withCtx(()=>[u.createVNode(Nb,u.mergeProps(z.$props,{items:u.unref(o)(S),instance:S,"show-year-picker":u.unref(m)[S],year:u.unref(l)(S),"is-disabled":k=>u.unref(f)(S,k),onHandleYear:k=>u.unref(M)(S,k),onYearSelect:k=>u.unref(b)(k,S),onToggleYearPicker:k=>u.unref(C)(S,k==null?void 0:k.flow,k==null?void 0:k.show)}),u.createSlots({_:2},[u.renderList(u.unref(i),(k,H)=>({name:k,fn:u.withCtx(L=>[u.renderSlot(z.$slots,k,u.normalizeProps(u.guardReactiveProps(L)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[z.$slots["month-overlay-value"]?{name:"item",fn:u.withCtx(({item:k})=>[u.renderSlot(z.$slots,"month-overlay-value",{text:k.text,value:k.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse"]))}}),ye1=(e,t)=>{const{modelValue:a}=Fn(e,t),r=u.ref(null),{defaultedHighlight:n,defaultedMultiDates:i,defaultedFilters:c,defaultedRange:s,propDates:o}=ue(e),l=u.ref();u.onMounted(()=>{e.startDate&&(a.value&&e.focusStartDate||!a.value)&&(l.value=d2(R1(e.startDate)))});const f=p=>Array.isArray(a.value)?a.value.some(v=>d2(v)===p):a.value?d2(a.value)===p:!1,d=p=>s.value.enabled&&Array.isArray(a.value)?Y8(a.value,r.value,m(p)):!1,h=u.computed(()=>x6(Xl(e.yearRange,e.locale,e.reverseYears),p=>{const v=f(p.value),g=dn(p.value,b6(o.value.minDate),b6(o.value.maxDate))||c.value.years.includes(p.value),y=d(p.value)&&!v,x=Ql(n.value,p.value);return{active:v,disabled:g,isBetween:y,highlighted:x}})),m=p=>j3(d3(new Date),p);return{groupedYears:h,modelValue:a,focusYear:l,setHoverValue:p=>{r.value=j3(d3(new Date),p)},selectYear:p=>{var v;if(t("update-month-year",{instance:0,year:p}),i.value.enabled)return a.value?Array.isArray(a.value)&&(((v=a.value)==null?void 0:v.map(g=>d2(g))).includes(p)?a.value=a.value.filter(g=>d2(g)!==p):a.value.push(j3(Pt(R1()),p))):a.value=[j3(Pt(R1()),p)],t("auto-apply",!0);s.value.enabled?(a.value=e9(a,m(p),t),u.nextTick().then(()=>{Q8(a.value,t,e.autoApply,e.modelAuto)})):(a.value=m(p),t("auto-apply"))}}},xe1=u.defineComponent({compatConfig:{MODE:3},__name:"YearPicker",props:{...A3},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(e,{expose:t,emit:a}){const r=a,n=e,{groupedYears:i,modelValue:c,focusYear:s,selectYear:o,setHoverValue:l}=ye1(n,r),{defaultedConfig:f}=ue(n);return t({getSidebarProps:()=>({modelValue:c,selectYear:o})}),(d,h)=>(u.openBlock(),u.createElementBlock("div",null,[d.$slots["top-extra"]?u.renderSlot(d.$slots,"top-extra",{key:0,value:d.internalModelValue}):u.createCommentVNode("",!0),d.$slots["month-year"]?u.renderSlot(d.$slots,"month-year",u.normalizeProps(u.mergeProps({key:1},{years:u.unref(i),selectYear:u.unref(o)}))):(u.openBlock(),u.createBlock(Bn,{key:2,items:u.unref(i),"is-last":d.autoApply&&!u.unref(f).keepActionRow,height:u.unref(f).modeHeight,config:d.config,"no-overlay-focus":!!(d.noOverlayFocus||d.textInput),"focus-value":u.unref(s),type:"year","use-relative":"",onSelected:u.unref(o),onHoverValue:u.unref(l)},u.createSlots({_:2},[d.$slots["year-overlay-value"]?{name:"item",fn:u.withCtx(({item:m})=>[u.renderSlot(d.$slots,"year-overlay-value",{text:m.text,value:m.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),be1={key:0,class:"dp__time_input"},Ce1=["data-test","aria-label","onKeydown","onClick","onMousedown"],Me1=u.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),ze1=u.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),we1=["aria-label","disabled","data-test","onKeydown","onClick"],_e1=["data-test","aria-label","onKeydown","onClick","onMousedown"],He1=u.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),Se1=u.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),Le1={key:0},ke1=["aria-label"],Ae1=u.defineComponent({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...A3},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(e,{expose:t,emit:a}){const r=a,n=e,{setTimePickerElements:i,setTimePickerBackRef:c}=A0(),{defaultedAriaLabels:s,defaultedTransitions:o,defaultedFilters:l,defaultedConfig:f,defaultedRange:d}=ue(n),{transitionName:h,showTransition:m}=Rn(o),p=u.reactive({hours:!1,minutes:!1,seconds:!1}),v=u.ref("AM"),g=u.ref(null),y=u.ref([]),x=u.ref();u.onMounted(()=>{r("mounted")});const C=q=>U2(new Date,{hours:q.hours,minutes:q.minutes,seconds:n.enableSeconds?q.seconds:0,milliseconds:0}),b=u.computed(()=>q=>R(q,n[q])||w(q,n[q])),M=u.computed(()=>({hours:n.hours,minutes:n.minutes,seconds:n.seconds})),w=(q,g1)=>d.value.enabled&&!d.value.disableTimeRangeValidation?!n.validateTime(q,g1):!1,z=(q,g1)=>{if(d.value.enabled&&!d.value.disableTimeRangeValidation){const _1=g1?+n[`${q}Increment`]:-+n[`${q}Increment`],m1=n[q]+_1;return!n.validateTime(q,m1)}return!1},_=u.computed(()=>q=>!D(+n[q]+ +n[`${q}Increment`],q)||z(q,!0)),S=u.computed(()=>q=>!D(+n[q]-+n[`${q}Increment`],q)||z(q,!1)),k=(q,g1)=>Jx(U2(R1(),q),g1),H=(q,g1)=>m21(U2(R1(),q),g1),L=u.computed(()=>({dp__time_col:!0,dp__time_col_block:!n.timePickerInline,dp__time_col_reg_block:!n.enableSeconds&&n.is24&&!n.timePickerInline,dp__time_col_reg_inline:!n.enableSeconds&&n.is24&&n.timePickerInline,dp__time_col_reg_with_button:!n.enableSeconds&&!n.is24,dp__time_col_sec:n.enableSeconds&&n.is24,dp__time_col_sec_with_button:n.enableSeconds&&!n.is24})),A=u.computed(()=>{const q=[{type:"hours"}];return n.enableMinutes&&q.push({type:"",separator:!0},{type:"minutes"}),n.enableSeconds&&q.push({type:"",separator:!0},{type:"seconds"}),q}),N=u.computed(()=>A.value.filter(q=>!q.separator)),E=u.computed(()=>q=>{if(q==="hours"){const g1=j(+n.hours);return{text:g1<10?`0${g1}`:`${g1}`,value:g1}}return{text:n[q]<10?`0${n[q]}`:`${n[q]}`,value:n[q]}}),R=(q,g1)=>{var _1;if(!n.disabledTimesConfig)return!1;const m1=n.disabledTimesConfig(n.order,q==="hours"?g1:void 0);return m1[q]?!!((_1=m1[q])!=null&&_1.includes(g1)):!0},P=(q,g1)=>g1!=="hours"||v.value==="AM"?q:q+12,X=q=>{const g1=n.is24?24:12,_1=q==="hours"?g1:60,m1=+n[`${q}GridIncrement`],o1=q==="hours"&&!n.is24?m1:0,u1=[];for(let d1=o1;d1<_1;d1+=m1)u1.push({value:n.is24?d1:P(d1,q),text:d1<10?`0${d1}`:`${d1}`});return q==="hours"&&!n.is24&&u1.unshift({value:v.value==="PM"?12:0,text:"12"}),x6(u1,d1=>({active:!1,disabled:l.value.times[q].includes(d1.value)||!D(d1.value,q)||R(q,d1.value)||w(q,d1.value)}))},B=q=>q>=0?q:59,Y=q=>q>=0?q:23,D=(q,g1)=>{const _1=n.minTime?C(vs(n.minTime)):null,m1=n.maxTime?C(vs(n.maxTime)):null,o1=C(vs(M.value,g1,g1==="minutes"||g1==="seconds"?B(q):Y(q)));return _1&&m1?(un(o1,m1)||Xa(o1,m1))&&(g6(o1,_1)||Xa(o1,_1)):_1?g6(o1,_1)||Xa(o1,_1):m1?un(o1,m1)||Xa(o1,m1):!0},V=q=>n[`no${q[0].toUpperCase()+q.slice(1)}Overlay`],T=q=>{V(q)||(p[q]=!p[q],p[q]?r("overlay-opened",q):r("overlay-closed",q))},I=q=>q==="hours"?O4:q==="minutes"?w0:v6,W=()=>{x.value&&clearTimeout(x.value)},O=(q,g1=!0,_1)=>{const m1=g1?k:H,o1=g1?+n[`${q}Increment`]:-+n[`${q}Increment`];D(+n[q]+o1,q)&&r(`update:${q}`,I(q)(m1({[q]:+n[q]},{[q]:+n[`${q}Increment`]}))),!(_1!=null&&_1.keyboard)&&f.value.timeArrowHoldThreshold&&(x.value=setTimeout(()=>{O(q,g1)},f.value.timeArrowHoldThreshold))},j=q=>n.is24?q:(q>=12?v.value="PM":v.value="AM",b21(q)),t1=()=>{v.value==="PM"?(v.value="AM",r("update:hours",n.hours-12)):(v.value="PM",r("update:hours",n.hours+12)),r("am-pm-change",v.value)},r1=q=>{p[q]=!0},Q=(q,g1,_1)=>{if(q&&n.arrowNavigation){Array.isArray(y.value[g1])?y.value[g1][_1]=q:y.value[g1]=[q];const m1=y.value.reduce((o1,u1)=>u1.map((d1,y1)=>[...o1[y1]||[],u1[y1]]),[]);c(n.closeTimePickerBtn),g.value&&(m1[1]=m1[1].concat(g.value)),i(m1,n.order)}},f1=(q,g1)=>(T(q),r(`update:${q}`,g1));return t({openChildCmp:r1}),(q,g1)=>{var _1;return q.disabled?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("div",be1,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(A.value,(m1,o1)=>{var u1,d1,y1;return u.openBlock(),u.createElementBlock("div",{key:o1,class:u.normalizeClass(L.value)},[m1.separator?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[u.createTextVNode(" : ")],64)):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createElementVNode("button",{ref_for:!0,ref:V1=>Q(V1,o1,0),type:"button",class:u.normalizeClass({dp__btn:!0,dp__inc_dec_button:!q.timePickerInline,dp__inc_dec_button_inline:q.timePickerInline,dp__tp_inline_btn_top:q.timePickerInline,dp__inc_dec_button_disabled:_.value(m1.type)}),"data-test":`${m1.type}-time-inc-btn-${n.order}`,"aria-label":(u1=u.unref(s))==null?void 0:u1.incrementValue(m1.type),tabindex:"0",onKeydown:V1=>u.unref(Lt)(V1,()=>O(m1.type,!0,{keyboard:!0}),!0),onClick:V1=>u.unref(f).timeArrowHoldThreshold?void 0:O(m1.type,!0),onMousedown:V1=>u.unref(f).timeArrowHoldThreshold?O(m1.type,!0):void 0,onMouseup:W},[n.timePickerInline?(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[Me1,ze1],64)):(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[q.$slots["arrow-up"]?u.renderSlot(q.$slots,"arrow-up",{key:0}):u.createCommentVNode("",!0),q.$slots["arrow-up"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(Gl),{key:1}))],64))],42,Ce1),u.createElementVNode("button",{ref_for:!0,ref:V1=>Q(V1,o1,1),type:"button","aria-label":(d1=u.unref(s))==null?void 0:d1.openTpOverlay(m1.type),class:u.normalizeClass({dp__time_display:!0,dp__time_display_block:!q.timePickerInline,dp__time_display_inline:q.timePickerInline,"dp--time-invalid":b.value(m1.type),"dp--time-overlay-btn":!b.value(m1.type)}),disabled:V(m1.type),tabindex:"0","data-test":`${m1.type}-toggle-overlay-btn-${n.order}`,onKeydown:V1=>u.unref(Lt)(V1,()=>T(m1.type),!0),onClick:V1=>T(m1.type)},[q.$slots[m1.type]?u.renderSlot(q.$slots,m1.type,{key:0,text:E.value(m1.type).text,value:E.value(m1.type).value}):u.createCommentVNode("",!0),q.$slots[m1.type]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(E.value(m1.type).text),1)],64))],42,we1),u.createElementVNode("button",{ref_for:!0,ref:V1=>Q(V1,o1,2),type:"button",class:u.normalizeClass({dp__btn:!0,dp__inc_dec_button:!q.timePickerInline,dp__inc_dec_button_inline:q.timePickerInline,dp__tp_inline_btn_bottom:q.timePickerInline,dp__inc_dec_button_disabled:S.value(m1.type)}),"data-test":`${m1.type}-time-dec-btn-${n.order}`,"aria-label":(y1=u.unref(s))==null?void 0:y1.decrementValue(m1.type),tabindex:"0",onKeydown:V1=>u.unref(Lt)(V1,()=>O(m1.type,!1,{keyboard:!0}),!0),onClick:V1=>u.unref(f).timeArrowHoldThreshold?void 0:O(m1.type,!1),onMousedown:V1=>u.unref(f).timeArrowHoldThreshold?O(m1.type,!1):void 0,onMouseup:W},[n.timePickerInline?(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[He1,Se1],64)):(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[q.$slots["arrow-down"]?u.renderSlot(q.$slots,"arrow-down",{key:0}):u.createCommentVNode("",!0),q.$slots["arrow-down"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(Yl),{key:1}))],64))],42,_e1)],64))],2)}),128)),q.is24?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("div",Le1,[q.$slots["am-pm-button"]?u.renderSlot(q.$slots,"am-pm-button",{key:0,toggle:t1,value:v.value}):u.createCommentVNode("",!0),q.$slots["am-pm-button"]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("button",{key:1,ref_key:"amPmButton",ref:g,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(_1=u.unref(s))==null?void 0:_1.amPmButton,tabindex:"0",onClick:t1,onKeydown:g1[0]||(g1[0]=m1=>u.unref(Lt)(m1,()=>t1(),!0))},u.toDisplayString(v.value),41,ke1))])),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(N.value,(m1,o1)=>(u.openBlock(),u.createBlock(u.Transition,{key:o1,name:u.unref(h)(p[m1.type]),css:u.unref(m)},{default:u.withCtx(()=>[p[m1.type]?(u.openBlock(),u.createBlock(Bn,{key:0,items:X(m1.type),"is-last":q.autoApply&&!u.unref(f).keepActionRow,"esc-close":q.escClose,type:m1.type,"text-input":q.textInput,config:q.config,"arrow-navigation":q.arrowNavigation,"aria-labels":q.ariaLabels,onSelected:u1=>f1(m1.type,u1),onToggle:u1=>T(m1.type),onResetFlow:g1[1]||(g1[1]=u1=>q.$emit("reset-flow"))},u.createSlots({"button-icon":u.withCtx(()=>[q.$slots["clock-icon"]?u.renderSlot(q.$slots,"clock-icon",{key:0}):u.createCommentVNode("",!0),q.$slots["clock-icon"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.resolveDynamicComponent(q.timePickerInline?u.unref(L6):u.unref(Wl)),{key:1}))]),_:2},[q.$slots[`${m1.type}-overlay-value`]?{name:"item",fn:u.withCtx(({item:u1})=>[u.renderSlot(q.$slots,`${m1.type}-overlay-value`,{text:u1.text,value:u1.value})]),key:"0"}:void 0,q.$slots[`${m1.type}-overlay-header`]?{name:"header",fn:u.withCtx(()=>[u.renderSlot(q.$slots,`${m1.type}-overlay-header`,{toggle:()=>T(m1.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","onSelected","onToggle"])):u.createCommentVNode("",!0)]),_:2},1032,["name","css"]))),128))]))}}}),Ve1={class:"dp--tp-wrap"},Te1=["aria-label","tabindex"],Ee1=["tabindex"],Ne1=["aria-label"],Rb=u.defineComponent({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...A3},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(e,{expose:t,emit:a}){const r=a,n=e,{buildMatrix:i,setTimePicker:c}=A0(),s=u.useSlots(),{defaultedTransitions:o,defaultedAriaLabels:l,defaultedTextInput:f,defaultedConfig:d,defaultedRange:h}=ue(n),{transitionName:m,showTransition:p}=Rn(o),{hideNavigationButtons:v}=X8(),g=u.ref(null),y=u.ref(null),x=u.ref([]),C=u.ref(null);u.onMounted(()=>{r("mount"),!n.timePicker&&n.arrowNavigation?i([Ne(g.value)],"time"):c(!0,n.timePicker)});const b=u.computed(()=>h.value.enabled&&n.modelAuto?zb(n.internalModelValue):!0),M=u.ref(!1),w=P=>({hours:Array.isArray(n.hours)?n.hours[P]:n.hours,minutes:Array.isArray(n.minutes)?n.minutes[P]:n.minutes,seconds:Array.isArray(n.seconds)?n.seconds[P]:n.seconds}),z=u.computed(()=>{const P=[];if(h.value.enabled)for(let X=0;X<2;X++)P.push(w(X));else P.push(w(0));return P}),_=(P,X=!1,B="")=>{X||r("reset-flow"),M.value=P,r(P?"overlay-opened":"overlay-closed",at.time),n.arrowNavigation&&c(P),u.nextTick(()=>{B!==""&&x.value[0]&&x.value[0].openChildCmp(B)})},S=u.computed(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:n.autoApply&&!d.value.keepActionRow})),k=Et(s,"timePicker"),H=(P,X,B)=>h.value.enabled?X===0?[P,z.value[1][B]]:[z.value[0][B],P]:P,L=P=>{r("update:hours",P)},A=P=>{r("update:minutes",P)},N=P=>{r("update:seconds",P)},E=()=>{if(C.value&&!f.value.enabled&&!n.noOverlayFocus){const P=wb(C.value);P&&P.focus({preventScroll:!0})}},R=P=>{r("overlay-closed",P)};return t({toggleTimePicker:_}),(P,X)=>{var B;return u.openBlock(),u.createElementBlock("div",Ve1,[!P.timePicker&&!P.timePickerInline?u.withDirectives((u.openBlock(),u.createElementBlock("button",{key:0,ref_key:"openTimePickerBtn",ref:g,type:"button",class:u.normalizeClass(S.value),"aria-label":(B=u.unref(l))==null?void 0:B.openTimePicker,tabindex:P.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:X[0]||(X[0]=Y=>u.unref(Lt)(Y,()=>_(!0))),onClick:X[1]||(X[1]=Y=>_(!0))},[P.$slots["clock-icon"]?u.renderSlot(P.$slots,"clock-icon",{key:0}):u.createCommentVNode("",!0),P.$slots["clock-icon"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(Wl),{key:1}))],42,Te1)),[[u.vShow,!u.unref(v)(P.hideNavigation,"time")]]):u.createCommentVNode("",!0),u.createVNode(u.Transition,{name:u.unref(m)(M.value),css:u.unref(p)&&!P.timePickerInline},{default:u.withCtx(()=>{var Y;return[M.value||P.timePicker||P.timePickerInline?(u.openBlock(),u.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:C,class:u.normalizeClass({dp__overlay:!P.timePickerInline,"dp--overlay-absolute":!n.timePicker&&!P.timePickerInline,"dp--overlay-relative":n.timePicker}),style:u.normalizeStyle(P.timePicker?{height:`${u.unref(d).modeHeight}px`}:void 0),tabindex:P.timePickerInline?void 0:0},[u.createElementVNode("div",{class:u.normalizeClass(P.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[P.$slots["time-picker-overlay"]?u.renderSlot(P.$slots,"time-picker-overlay",{key:0,hours:e.hours,minutes:e.minutes,seconds:e.seconds,setHours:L,setMinutes:A,setSeconds:N}):u.createCommentVNode("",!0),P.$slots["time-picker-overlay"]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("div",{key:1,class:u.normalizeClass(P.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(z.value,(D,V)=>u.withDirectives((u.openBlock(),u.createBlock(Ae1,u.mergeProps({key:V,ref_for:!0},{...P.$props,order:V,hours:D.hours,minutes:D.minutes,seconds:D.seconds,closeTimePickerBtn:y.value,disabledTimesConfig:e.disabledTimesConfig,disabled:V===0?P.fixedStart:P.fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:x,"validate-time":(T,I)=>e.validateTime(T,H(I,V,T)),"onUpdate:hours":T=>L(H(T,V,"hours")),"onUpdate:minutes":T=>A(H(T,V,"minutes")),"onUpdate:seconds":T=>N(H(T,V,"seconds")),onMounted:E,onOverlayClosed:R,onOverlayOpened:X[2]||(X[2]=T=>P.$emit("overlay-opened",T)),onAmPmChange:X[3]||(X[3]=T=>P.$emit("am-pm-change",T))}),u.createSlots({_:2},[u.renderList(u.unref(k),(T,I)=>({name:T,fn:u.withCtx(W=>[u.renderSlot(P.$slots,T,u.mergeProps({ref_for:!0},W))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[u.vShow,V===0?!0:b.value]])),128))],2)),!P.timePicker&&!P.timePickerInline?u.withDirectives((u.openBlock(),u.createElementBlock("button",{key:2,ref_key:"closeTimePickerBtn",ref:y,type:"button",class:u.normalizeClass(S.value),"aria-label":(Y=u.unref(l))==null?void 0:Y.closeTimePicker,tabindex:"0",onKeydown:X[4]||(X[4]=D=>u.unref(Lt)(D,()=>_(!1))),onClick:X[5]||(X[5]=D=>_(!1))},[P.$slots["calendar-icon"]?u.renderSlot(P.$slots,"calendar-icon",{key:0}):u.createCommentVNode("",!0),P.$slots["calendar-icon"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(L6),{key:1}))],42,Ne1)),[[u.vShow,!u.unref(v)(P.hideNavigation,"time")]]):u.createCommentVNode("",!0)],2)],14,Ee1)):u.createCommentVNode("",!0)]}),_:3},8,["name","css"])])}}}),Fb=(e,t,a,r)=>{const{defaultedRange:n}=ue(e),i=(C,b)=>Array.isArray(t[C])?t[C][b]:t[C],c=C=>e.enableSeconds?Array.isArray(t.seconds)?t.seconds[C]:t.seconds:0,s=(C,b)=>C?b!==void 0?m0(C,i("hours",b),i("minutes",b),c(b)):m0(C,t.hours,t.minutes,c()):Ul(R1(),c(b)),o=(C,b)=>{t[C]=b},l=u.computed(()=>e.modelAuto&&n.value.enabled?Array.isArray(a.value)?a.value.length>1:!1:n.value.enabled),f=(C,b)=>{const M=Object.fromEntries(Object.keys(t).map(w=>w===C?[w,b]:[w,t[w]].slice()));if(l.value&&!n.value.disableTimeRangeValidation){const w=_=>a.value?m0(a.value[_],M.hours[_],M.minutes[_],M.seconds[_]):null,z=_=>$l(a.value[_],0);return!(g2(w(0),w(1))&&(g6(w(0),z(1))||un(w(1),z(0))))}return!0},d=(C,b)=>{f(C,b)&&(o(C,b),r&&r())},h=C=>{d("hours",C)},m=C=>{d("minutes",C)},p=C=>{d("seconds",C)},v=(C,b,M,w)=>{b&&h(C),!b&&!M&&m(C),M&&p(C),a.value&&w(a.value)},g=C=>{if(C){const b=Array.isArray(C),M=b?[+C[0].hours,+C[1].hours]:+C.hours,w=b?[+C[0].minutes,+C[1].minutes]:+C.minutes,z=b?[+C[0].seconds,+C[1].seconds]:+C.seconds;o("hours",M),o("minutes",w),e.enableSeconds&&o("seconds",z)}},y=(C,b)=>{const M={hours:Array.isArray(t.hours)?t.hours[C]:t.hours,disabledArr:[]};return(b||b===0)&&(M.hours=b),Array.isArray(e.disabledTimes)&&(M.disabledArr=n.value.enabled&&Array.isArray(e.disabledTimes[C])?e.disabledTimes[C]:e.disabledTimes),M},x=u.computed(()=>(C,b)=>{var M;if(Array.isArray(e.disabledTimes)){const{disabledArr:w,hours:z}=y(C,b),_=w.filter(S=>+S.hours===z);return((M=_[0])==null?void 0:M.minutes)==="*"?{hours:[z],minutes:void 0,seconds:void 0}:{hours:[],minutes:(_==null?void 0:_.map(S=>+S.minutes))??[],seconds:(_==null?void 0:_.map(S=>S.seconds?+S.seconds:void 0))??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:o,updateHours:h,updateMinutes:m,updateSeconds:p,getSetDateTime:s,updateTimeValues:v,getSecondsValue:c,assignStartTime:g,validateTime:f,disabledTimesConfig:x}},Oe1=(e,t)=>{const{modelValue:a,time:r}=Fn(e,t),{defaultedStartTime:n,defaultedRange:i}=ue(e),{updateTimeValues:c,getSetDateTime:s,setTime:o,assignStartTime:l,disabledTimesConfig:f,validateTime:d}=Fb(e,r,a,h);function h(){t("update-flow-step")}const m=b=>{const{hours:M,minutes:w,seconds:z}=b;return{hours:+M,minutes:+w,seconds:z?+z:0}},p=()=>{if(e.startTime){if(Array.isArray(e.startTime)){const M=m(e.startTime[0]),w=m(e.startTime[1]);return[U2(R1(),M),U2(R1(),w)]}const b=m(e.startTime);return U2(R1(),b)}return i.value.enabled?[null,null]:null},v=()=>{if(i.value.enabled){const[b,M]=p();a.value=[s(b,0),s(M,1)]}else a.value=s(p())},g=b=>Array.isArray(b)?[na(R1(b[0])),na(R1(b[1]))]:[na(b??R1())],y=(b,M,w)=>{o("hours",b),o("minutes",M),o("seconds",e.enableSeconds?w:0)},x=()=>{const[b,M]=g(a.value);return i.value.enabled?y([b.hours,M.hours],[b.minutes,M.minutes],[b.seconds,M.seconds]):y(b.hours,b.minutes,b.seconds)};u.onMounted(()=>{if(!e.shadow)return l(n.value),a.value?x():v()});const C=()=>{Array.isArray(a.value)?a.value=a.value.map((b,M)=>b&&s(b,M)):a.value=s(a.value),t("time-update")};return{modelValue:a,time:r,disabledTimesConfig:f,updateTime:(b,M=!0,w=!1)=>{c(b,M,w,C)},validateTime:d}},Pe1=u.defineComponent({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...A3},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,i=u.useSlots(),c=Et(i,"timePicker"),s=u.ref(null),{time:o,modelValue:l,disabledTimesConfig:f,updateTime:d,validateTime:h}=Oe1(n,r);return u.onMounted(()=>{n.shadow||r("mount",null)}),t({getSidebarProps:()=>({modelValue:l,time:o,updateTime:d}),toggleTimePicker:(m,p=!1,v="")=>{var g;(g=s.value)==null||g.toggleTimePicker(m,p,v)}}),(m,p)=>(u.openBlock(),u.createBlock(Z8,{"multi-calendars":0,stretch:""},{default:u.withCtx(()=>[u.createVNode(Rb,u.mergeProps({ref_key:"tpRef",ref:s},m.$props,{hours:u.unref(o).hours,minutes:u.unref(o).minutes,seconds:u.unref(o).seconds,"internal-model-value":m.internalModelValue,"disabled-times-config":u.unref(f),"validate-time":u.unref(h),"onUpdate:hours":p[0]||(p[0]=v=>u.unref(d)(v)),"onUpdate:minutes":p[1]||(p[1]=v=>u.unref(d)(v,!1)),"onUpdate:seconds":p[2]||(p[2]=v=>u.unref(d)(v,!1,!0)),onAmPmChange:p[3]||(p[3]=v=>m.$emit("am-pm-change",v)),onResetFlow:p[4]||(p[4]=v=>m.$emit("reset-flow")),onOverlayClosed:p[5]||(p[5]=v=>m.$emit("overlay-toggle",{open:!1,overlay:v})),onOverlayOpened:p[6]||(p[6]=v=>m.$emit("overlay-toggle",{open:!0,overlay:v}))}),u.createSlots({_:2},[u.renderList(u.unref(c),(v,g)=>({name:v,fn:u.withCtx(y=>[u.renderSlot(m.$slots,v,u.normalizeProps(u.guardReactiveProps(y)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),De1={class:"dp--header-wrap"},Re1={key:0,class:"dp__month_year_wrap"},Fe1={key:0},Be1={class:"dp__month_year_wrap"},Ie1=["aria-label","data-test","onClick","onKeydown"],$e1=u.defineComponent({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...A3},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(e,{expose:t,emit:a}){const r=a,n=e,{defaultedTransitions:i,defaultedAriaLabels:c,defaultedMultiCalendars:s,defaultedFilters:o,defaultedConfig:l,defaultedHighlight:f,propDates:d}=ue(n),{transitionName:h,showTransition:m}=Rn(i),{buildMatrix:p}=A0(),{handleMonthYearChange:v,isDisabled:g,updateMonthYear:y}=Z21(n,r),{showLeftIcon:x,showRightIcon:C}=X8(),b=u.ref(!1),M=u.ref(!1),w=u.ref([null,null,null,null]);u.onMounted(()=>{r("mount")});const z=D=>({get:()=>n[D],set:V=>{const T=D===s3.month?s3.year:s3.month;r("update-month-year",{[D]:V,[T]:n[T]}),D===s3.month?E(!0):R(!0)}}),_=u.computed(z(s3.month)),S=u.computed(z(s3.year)),k=u.computed(()=>D=>({month:n.month,year:n.year,items:D===s3.month?n.months:n.years,instance:n.instance,updateMonthYear:y,toggle:D===s3.month?E:R})),H=u.computed(()=>n.months.find(V=>V.value===n.month)||{text:"",value:0}),L=u.computed(()=>x6(n.months,D=>{const V=n.month===D.value,T=dn(D.value,Hb(n.year,d.value.minDate),Sb(n.year,d.value.maxDate))||o.value.months.includes(D.value),I=Tb(f.value,D.value,n.year);return{active:V,disabled:T,highlighted:I}})),A=u.computed(()=>x6(n.years,D=>{const V=n.year===D.value,T=dn(D.value,b6(d.value.minDate),b6(d.value.maxDate))||o.value.years.includes(D.value),I=Ql(f.value,D.value);return{active:V,disabled:T,highlighted:I}})),N=(D,V,T)=>{T!==void 0?D.value=T:D.value=!D.value,D.value?r("overlay-opened",V):r("overlay-closed",V)},E=(D=!1,V)=>{P(D),N(b,at.month,V)},R=(D=!1,V)=>{P(D),N(M,at.year,V)},P=D=>{D||r("reset-flow")},X=(D,V)=>{n.arrowNavigation&&(w.value[V]=Ne(D),p(w.value,"monthYear"))},B=u.computed(()=>{var D,V;return[{type:s3.month,index:1,toggle:E,modelValue:_.value,updateModelValue:T=>_.value=T,text:H.value.text,showSelectionGrid:b.value,items:L.value,ariaLabel:(D=c.value)==null?void 0:D.openMonthsOverlay},{type:s3.year,index:2,toggle:R,modelValue:S.value,updateModelValue:T=>S.value=T,text:_b(n.year,n.locale),showSelectionGrid:M.value,items:A.value,ariaLabel:(V=c.value)==null?void 0:V.openYearsOverlay}]}),Y=u.computed(()=>n.disableYearSelect?[B.value[0]]:n.yearFirst?[...B.value].reverse():B.value);return t({toggleMonthPicker:E,toggleYearPicker:R,handleMonthYearChange:v}),(D,V)=>{var T,I,W;return u.openBlock(),u.createElementBlock("div",De1,[D.$slots["month-year"]?(u.openBlock(),u.createElementBlock("div",Re1,[u.renderSlot(D.$slots,"month-year",u.normalizeProps(u.guardReactiveProps({month:e.month,year:e.year,months:e.months,years:e.years,updateMonthYear:u.unref(y),handleMonthYearChange:u.unref(v),instance:e.instance})))])):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[D.$slots["top-extra"]?(u.openBlock(),u.createElementBlock("div",Fe1,[u.renderSlot(D.$slots,"top-extra",{value:D.internalModelValue})])):u.createCommentVNode("",!0),u.createElementVNode("div",Be1,[u.unref(x)(u.unref(s),e.instance)&&!D.vertical?(u.openBlock(),u.createBlock(Hr,{key:0,"aria-label":(T=u.unref(c))==null?void 0:T.prevMonth,disabled:u.unref(g)(!1),onActivate:V[0]||(V[0]=O=>u.unref(v)(!1,!0)),onSetRef:V[1]||(V[1]=O=>X(O,0))},{default:u.withCtx(()=>[D.$slots["arrow-left"]?u.renderSlot(D.$slots,"arrow-left",{key:0}):u.createCommentVNode("",!0),D.$slots["arrow-left"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(ql),{key:1}))]),_:3},8,["aria-label","disabled"])):u.createCommentVNode("",!0),u.createElementVNode("div",{class:u.normalizeClass(["dp__month_year_wrap",{dp__year_disable_select:D.disableYearSelect}])},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(Y.value,(O,j)=>(u.openBlock(),u.createElementBlock(u.Fragment,{key:O.type},[u.createElementVNode("button",{ref_for:!0,ref:t1=>X(t1,j+1),type:"button",class:"dp__btn dp__month_year_select",tabindex:"0","aria-label":O.ariaLabel,"data-test":`${O.type}-toggle-overlay-${e.instance}`,onClick:O.toggle,onKeydown:t1=>u.unref(Lt)(t1,()=>O.toggle(),!0)},[D.$slots[O.type]?u.renderSlot(D.$slots,O.type,{key:0,text:O.text,value:n[O.type]}):u.createCommentVNode("",!0),D.$slots[O.type]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(O.text),1)],64))],40,Ie1),u.createVNode(u.Transition,{name:u.unref(h)(O.showSelectionGrid),css:u.unref(m)},{default:u.withCtx(()=>[O.showSelectionGrid?(u.openBlock(),u.createBlock(Bn,{key:0,items:O.items,"arrow-navigation":D.arrowNavigation,"hide-navigation":D.hideNavigation,"is-last":D.autoApply&&!u.unref(l).keepActionRow,"skip-button-ref":!1,config:D.config,type:O.type,"header-refs":[],"esc-close":D.escClose,"menu-wrap-ref":D.menuWrapRef,"text-input":D.textInput,"aria-labels":D.ariaLabels,onSelected:O.updateModelValue,onToggle:O.toggle},u.createSlots({"button-icon":u.withCtx(()=>[D.$slots["calendar-icon"]?u.renderSlot(D.$slots,"calendar-icon",{key:0}):u.createCommentVNode("",!0),D.$slots["calendar-icon"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(L6),{key:1}))]),_:2},[D.$slots[`${O.type}-overlay-value`]?{name:"item",fn:u.withCtx(({item:t1})=>[u.renderSlot(D.$slots,`${O.type}-overlay-value`,{text:t1.text,value:t1.value})]),key:"0"}:void 0,D.$slots[`${O.type}-overlay`]?{name:"overlay",fn:u.withCtx(()=>[u.renderSlot(D.$slots,`${O.type}-overlay`,u.mergeProps({ref_for:!0},k.value(O.type)))]),key:"1"}:void 0,D.$slots[`${O.type}-overlay-header`]?{name:"header",fn:u.withCtx(()=>[u.renderSlot(D.$slots,`${O.type}-overlay-header`,{toggle:O.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","onSelected","onToggle"])):u.createCommentVNode("",!0)]),_:2},1032,["name","css"])],64))),128))],2),u.unref(x)(u.unref(s),e.instance)&&D.vertical?(u.openBlock(),u.createBlock(Hr,{key:1,"aria-label":(I=u.unref(c))==null?void 0:I.prevMonth,disabled:u.unref(g)(!1),onActivate:V[2]||(V[2]=O=>u.unref(v)(!1,!0))},{default:u.withCtx(()=>[D.$slots["arrow-up"]?u.renderSlot(D.$slots,"arrow-up",{key:0}):u.createCommentVNode("",!0),D.$slots["arrow-up"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(Gl),{key:1}))]),_:3},8,["aria-label","disabled"])):u.createCommentVNode("",!0),u.unref(C)(u.unref(s),e.instance)?(u.openBlock(),u.createBlock(Hr,{key:2,ref:"rightIcon",disabled:u.unref(g)(!0),"aria-label":(W=u.unref(c))==null?void 0:W.nextMonth,onActivate:V[3]||(V[3]=O=>u.unref(v)(!0,!0)),onSetRef:V[4]||(V[4]=O=>X(O,D.disableYearSelect?2:3))},{default:u.withCtx(()=>[D.$slots[D.vertical?"arrow-down":"arrow-right"]?u.renderSlot(D.$slots,D.vertical?"arrow-down":"arrow-right",{key:0}):u.createCommentVNode("",!0),D.$slots[D.vertical?"arrow-down":"arrow-right"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.resolveDynamicComponent(D.vertical?u.unref(Yl):u.unref(jl)),{key:1}))]),_:3},8,["disabled","aria-label"])):u.createCommentVNode("",!0)])],64))])}}}),Ue1=["aria-label"],qe1={class:"dp__calendar_header",role:"row"},je1={key:0,class:"dp__calendar_header_item",role:"gridcell"},We1=["aria-label"],Ge1=u.createElementVNode("div",{class:"dp__calendar_header_separator"},null,-1),Ye1=["aria-label"],Xe1={key:0,role:"gridcell",class:"dp__calendar_item dp__week_num"},Ke1={class:"dp__cell_inner"},Ze1=["id","aria-selected","aria-disabled","aria-label","data-test","onClick","onKeydown","onMouseenter","onMouseleave","onMousedown"],Qe1=u.defineComponent({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...A3},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(e,{expose:t,emit:a}){const r=a,n=e,{buildMultiLevelMatrix:i}=A0(),{defaultedTransitions:c,defaultedConfig:s,defaultedAriaLabels:o,defaultedMultiCalendars:l,defaultedWeekNumbers:f,defaultedMultiDates:d}=ue(n),h=u.ref(null),m=u.ref({bottom:"",left:"",transform:""}),p=u.ref([]),v=u.ref(null),g=u.ref(!0),y=u.ref(""),x=u.ref({startX:0,endX:0,startY:0,endY:0}),C=u.ref([]),b=u.ref({left:"50%"}),M=u.ref(!1),w=u.computed(()=>n.calendar?n.calendar(n.mappedDates):n.mappedDates),z=u.computed(()=>n.dayNames?Array.isArray(n.dayNames)?n.dayNames:n.dayNames(n.locale,+n.weekStart):x21(n.formatLocale,n.locale,+n.weekStart));u.onMounted(()=>{r("mount",{cmp:"calendar",refs:p}),s.value.noSwipe||v.value&&(v.value.addEventListener("touchstart",B,{passive:!1}),v.value.addEventListener("touchend",Y,{passive:!1}),v.value.addEventListener("touchmove",D,{passive:!1})),n.monthChangeOnScroll&&v.value&&v.value.addEventListener("wheel",I,{passive:!1})});const _=Q=>Q?n.vertical?"vNext":"next":n.vertical?"vPrevious":"previous",S=(Q,f1)=>{if(n.transitions){const q=Pt(z4(R1(),n.month,n.year));y.value=ze(Pt(z4(R1(),Q,f1)),q)?c.value[_(!0)]:c.value[_(!1)],g.value=!1,u.nextTick(()=>{g.value=!0})}},k=u.computed(()=>({[n.calendarClassName]:!!n.calendarClassName})),H=u.computed(()=>Q=>{const f1=C21(Q);return{dp__marker_dot:f1.type==="dot",dp__marker_line:f1.type==="line"}}),L=u.computed(()=>Q=>g2(Q,h.value)),A=u.computed(()=>({dp__calendar:!0,dp__calendar_next:l.value.count>0&&n.instance!==0})),N=u.computed(()=>Q=>n.hideOffsetDates?Q.current:!0),E=Q=>X3(Q,"yyyy-MM-dd"),R=async(Q,f1,q)=>{const g1=Ne(p.value[f1][q]);if(g1){const{width:_1,height:m1}=g1.getBoundingClientRect();h.value=Q.value;let o1={left:`${_1/2}px`},u1=-50;if(await u.nextTick(),C.value[0]){const{left:d1,width:y1}=C.value[0].getBoundingClientRect();d1<0&&(o1={left:"0"},u1=0,b.value.left=`${_1/2}px`),window.innerWidth<d1+y1&&(o1={right:"0"},u1=0,b.value.left=`${y1-_1/2}px`)}m.value={bottom:`${m1}px`,...o1,transform:`translateX(${u1}%)`},r("tooltip-open",Q.marker)}},P=async(Q,f1,q)=>{var g1,_1;if(M.value&&d.value.enabled&&d.value.dragSelect)return r("select-date",Q);r("set-hover-date",Q),(_1=(g1=Q.marker)==null?void 0:g1.tooltip)!=null&&_1.length&&await R(Q,f1,q)},X=Q=>{h.value&&(h.value=null,m.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),r("tooltip-close",Q.marker))},B=Q=>{x.value.startX=Q.changedTouches[0].screenX,x.value.startY=Q.changedTouches[0].screenY},Y=Q=>{x.value.endX=Q.changedTouches[0].screenX,x.value.endY=Q.changedTouches[0].screenY,V()},D=Q=>{n.vertical&&!n.inline&&Q.preventDefault()},V=()=>{const Q=n.vertical?"Y":"X";Math.abs(x.value[`start${Q}`]-x.value[`end${Q}`])>10&&r("handle-swipe",x.value[`start${Q}`]>x.value[`end${Q}`]?"right":"left")},T=(Q,f1,q)=>{Q&&(Array.isArray(p.value[f1])?p.value[f1][q]=Q:p.value[f1]=[Q]),n.arrowNavigation&&i(p.value,"calendar")},I=Q=>{n.monthChangeOnScroll&&(Q.preventDefault(),r("handle-scroll",Q))},W=Q=>f.value.type==="local"?Fl(Q.value,{weekStartsOn:+n.weekStart}):f.value.type==="iso"?Dl(Q.value):typeof f.value.type=="function"?f.value.type(Q.value):"",O=Q=>{const f1=Q[0];return f.value.hideOnOffsetDates?Q.some(q=>q.current)?W(f1):"":W(f1)},j=(Q,f1)=>{d.value.enabled||(h0(Q,s.value),r("select-date",f1))},t1=Q=>{h0(Q,s.value)},r1=Q=>{d.value.enabled&&d.value.dragSelect?(M.value=!0,r("select-date",Q)):d.value.enabled&&r("select-date",Q)};return t({triggerTransition:S}),(Q,f1)=>{var q;return u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(A.value)},[u.createElementVNode("div",{ref_key:"calendarWrapRef",ref:v,role:"grid",class:u.normalizeClass(k.value),"aria-label":(q=u.unref(o))==null?void 0:q.calendarWrap},[u.createElementVNode("div",qe1,[Q.weekNumbers?(u.openBlock(),u.createElementBlock("div",je1,u.toDisplayString(Q.weekNumName),1)):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(z.value,(g1,_1)=>{var m1,o1;return u.openBlock(),u.createElementBlock("div",{key:_1,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(o1=(m1=u.unref(o))==null?void 0:m1.weekDay)==null?void 0:o1.call(m1,_1)},[Q.$slots["calendar-header"]?u.renderSlot(Q.$slots,"calendar-header",{key:0,day:g1,index:_1}):u.createCommentVNode("",!0),Q.$slots["calendar-header"]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(g1),1)],64))],8,We1)}),128))]),Ge1,u.createVNode(u.Transition,{name:y.value,css:!!Q.transitions},{default:u.withCtx(()=>{var g1;return[g.value?(u.openBlock(),u.createElementBlock("div",{key:0,class:"dp__calendar",role:"rowgroup","aria-label":((g1=u.unref(o))==null?void 0:g1.calendarDays)||void 0,onMouseleave:f1[1]||(f1[1]=_1=>M.value=!1)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(w.value,(_1,m1)=>(u.openBlock(),u.createElementBlock("div",{key:m1,class:"dp__calendar_row",role:"row"},[Q.weekNumbers?(u.openBlock(),u.createElementBlock("div",Xe1,[u.createElementVNode("div",Ke1,u.toDisplayString(O(_1.days)),1)])):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(_1.days,(o1,u1)=>{var d1,y1,V1;return u.openBlock(),u.createElementBlock("div",{id:E(o1.value),ref_for:!0,ref:C1=>T(C1,m1,u1),key:u1+m1,role:"gridcell",class:"dp__calendar_item","aria-selected":(o1.classData.dp__active_date||o1.classData.dp__range_start||o1.classData.dp__range_start)??void 0,"aria-disabled":o1.classData.dp__cell_disabled||void 0,"aria-label":(y1=(d1=u.unref(o))==null?void 0:d1.day)==null?void 0:y1.call(d1,o1),tabindex:"0","data-test":o1.value,onClick:u.withModifiers(C1=>j(C1,o1),["prevent"]),onKeydown:C1=>u.unref(Lt)(C1,()=>Q.$emit("select-date",o1)),onMouseenter:C1=>P(o1,m1,u1),onMouseleave:C1=>X(o1),onMousedown:C1=>r1(o1),onMouseup:f1[0]||(f1[0]=C1=>M.value=!1)},[u.createElementVNode("div",{class:u.normalizeClass(["dp__cell_inner",o1.classData])},[Q.$slots.day&&N.value(o1)?u.renderSlot(Q.$slots,"day",{key:0,day:+o1.text,date:o1.value}):u.createCommentVNode("",!0),Q.$slots.day?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(o1.text),1)],64)),o1.marker&&N.value(o1)?(u.openBlock(),u.createElementBlock(u.Fragment,{key:2},[Q.$slots.marker?u.renderSlot(Q.$slots,"marker",{key:0,marker:o1.marker,day:+o1.text,date:o1.value}):(u.openBlock(),u.createElementBlock("div",{key:1,class:u.normalizeClass(H.value(o1.marker)),style:u.normalizeStyle(o1.marker.color?{backgroundColor:o1.marker.color}:{})},null,6))],64)):u.createCommentVNode("",!0),L.value(o1.value)?(u.openBlock(),u.createElementBlock("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:C,class:"dp__marker_tooltip",style:u.normalizeStyle(m.value)},[(V1=o1.marker)!=null&&V1.tooltip?(u.openBlock(),u.createElementBlock("div",{key:0,class:"dp__tooltip_content",onClick:t1},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(o1.marker.tooltip,(C1,S1)=>(u.openBlock(),u.createElementBlock("div",{key:S1,class:"dp__tooltip_text"},[Q.$slots["marker-tooltip"]?u.renderSlot(Q.$slots,"marker-tooltip",{key:0,tooltip:C1,day:o1.value}):u.createCommentVNode("",!0),Q.$slots["marker-tooltip"]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createElementVNode("div",{class:"dp__tooltip_mark",style:u.normalizeStyle(C1.color?{backgroundColor:C1.color}:{})},null,4),u.createElementVNode("div",null,u.toDisplayString(C1.text),1)],64))]))),128)),u.createElementVNode("div",{class:"dp__arrow_bottom_tp",style:u.normalizeStyle(b.value)},null,4)])):u.createCommentVNode("",!0)],4)):u.createCommentVNode("",!0)],2)],40,Ze1)}),128))]))),128))],40,Ye1)):u.createCommentVNode("",!0)]}),_:3},8,["name","css"])],10,Ue1)],2)}}}),Sm=e=>Array.isArray(e),Je1=(e,t,a,r)=>{const n=u.ref([]),i=u.ref(new Date),c=u.ref(),{modelValue:s,calendars:o,time:l,today:f}=Fn(e,t),{defaultedMultiCalendars:d,defaultedStartTime:h,defaultedRange:m,defaultedConfig:p,defaultedTz:v,propDates:g,defaultedMultiDates:y}=ue(e),{validateMonthYearInRange:x,isDisabled:C,isDateRangeAllowed:b,checkMinMaxRange:M}=V0(e),{updateTimeValues:w,getSetDateTime:z,setTime:_,assignStartTime:S,validateTime:k,disabledTimesConfig:H}=Fb(e,l,s,r),L=u.computed(()=>b1=>o.value[b1]?o.value[b1].month:0),A=u.computed(()=>b1=>o.value[b1]?o.value[b1].year:0),N=b1=>!p.value.keepViewOnOffsetClick||b1?!0:!c.value,E=(b1,v1,P1,B1=!1)=>{var n2,W2;N(B1)&&(o.value[b1]||(o.value[b1]={month:0,year:0}),o.value[b1].month=Mm(v1)?(n2=o.value[b1])==null?void 0:n2.month:v1,o.value[b1].year=Mm(P1)?(W2=o.value[b1])==null?void 0:W2.year:P1)},R=()=>{e.autoApply&&t("select-date")};u.watch(s,(b1,v1)=>{JSON.stringify(b1)!==JSON.stringify(v1)&&B()},{deep:!0}),u.onMounted(()=>{e.shadow||(s.value||(Q(),h.value&&S(h.value)),B(!0),e.focusStartDate&&e.startDate&&Q())});const P=u.computed(()=>{var b1;return(b1=e.flow)!=null&&b1.length&&!e.partialFlow?e.flowStep===e.flow.length:!0}),X=()=>{e.autoApply&&P.value&&t("auto-apply")},B=(b1=!1)=>{if(s.value)return Array.isArray(s.value)?(n.value=s.value,O(b1)):V(s.value,b1);if(d.value.count&&b1&&!e.startDate)return D(R1(),b1)},Y=()=>Array.isArray(s.value)&&m.value.enabled?v2(s.value[0])===v2(s.value[1]??s.value[0]):!1,D=(b1,v1=!1)=>{if((!d.value.count||!d.value.static||v1)&&E(0,v2(b1),d2(b1)),d.value.count&&(!d.value.solo||!s.value||Y()))for(let P1=1;P1<d.value.count;P1++){const B1=U2(R1(),{month:L.value(P1-1),year:A.value(P1-1)}),n2=Jx(B1,{months:1});o.value[P1]={month:v2(n2),year:d2(n2)}}},V=(b1,v1)=>{D(b1),_("hours",O4(b1)),_("minutes",w0(b1)),_("seconds",v6(b1)),d.value.count&&v1&&r1()},T=b1=>{if(d.value.count){if(d.value.solo)return 0;const v1=v2(b1[0]),P1=v2(b1[1]);return Math.abs(P1-v1)<d.value.count?0:1}return 1},I=(b1,v1)=>{b1[1]&&m.value.showLastInRange?D(b1[T(b1)],v1):D(b1[0],v1);const P1=(B1,n2)=>[B1(b1[0]),b1[1]?B1(b1[1]):l[n2][1]];_("hours",P1(O4,"hours")),_("minutes",P1(w0,"minutes")),_("seconds",P1(v6,"seconds"))},W=(b1,v1)=>{if((m.value.enabled||e.weekPicker)&&!y.value.enabled)return I(b1,v1);if(y.value.enabled&&v1){const P1=b1[b1.length-1];return V(P1,v1)}},O=b1=>{const v1=s.value;W(v1,b1),d.value.count&&d.value.solo&&r1()},j=(b1,v1)=>{const P1=U2(R1(),{month:L.value(v1),year:A.value(v1)}),B1=b1<0?M3(P1,1):y6(P1,1);x(v2(B1),d2(B1),b1<0,e.preventMinMaxNavigation)&&(E(v1,v2(B1),d2(B1)),t("update-month-year",{instance:v1,month:v2(B1),year:d2(B1)}),d.value.count&&!d.value.solo&&t1(v1),a())},t1=b1=>{for(let v1=b1-1;v1>=0;v1--){const P1=y6(U2(R1(),{month:L.value(v1+1),year:A.value(v1+1)}),1);E(v1,v2(P1),d2(P1))}for(let v1=b1+1;v1<=d.value.count-1;v1++){const P1=M3(U2(R1(),{month:L.value(v1-1),year:A.value(v1-1)}),1);E(v1,v2(P1),d2(P1))}},r1=()=>{if(Array.isArray(s.value)&&s.value.length===2){const b1=R1(R1(s.value[1]?s.value[1]:M3(s.value[0],1))),[v1,P1]=[v2(s.value[0]),d2(s.value[0])],[B1,n2]=[v2(s.value[1]),d2(s.value[1])];(v1!==B1||v1===B1&&P1!==n2)&&d.value.solo&&E(1,v2(b1),d2(b1))}else s.value&&!Array.isArray(s.value)&&(E(0,v2(s.value),d2(s.value)),D(R1()))},Q=()=>{e.startDate&&(E(0,v2(R1(e.startDate)),d2(R1(e.startDate))),d.value.count&&t1(0))},f1=(b1,v1)=>{if(e.monthChangeOnScroll){const P1=new Date().getTime()-i.value.getTime(),B1=Math.abs(b1.deltaY);let n2=500;B1>1&&(n2=100),B1>100&&(n2=0),P1>n2&&(i.value=new Date,j(e.monthChangeOnScroll!=="inverse"?-b1.deltaY:b1.deltaY,v1))}},q=(b1,v1,P1=!1)=>{e.monthChangeOnArrows&&e.vertical===P1&&g1(b1,v1)},g1=(b1,v1)=>{j(b1==="right"?-1:1,v1)},_1=b1=>{if(g.value.markers)return Qi(b1.value,g.value.markers)},m1=(b1,v1)=>{switch(e.sixWeeks===!0?"append":e.sixWeeks){case"prepend":return[!0,!1];case"center":return[b1==0,!0];case"fair":return[b1==0||v1>b1,!0];case"append":return[!1,!1];default:return[!1,!1]}},o1=(b1,v1,P1,B1)=>{if(e.sixWeeks&&b1.length<6){const n2=6-b1.length,W2=(v1.getDay()+7-B1)%7,ne=6-(P1.getDay()+7-B1)%7,[P2,Ge]=m1(W2,ne);for(let S2=1;S2<=n2;S2++)if(Ge?!!(S2%2)==P2:P2){const de=b1[0].days[0],e3=u1(u3(de.value,-7),v2(v1));b1.unshift({days:e3})}else{const de=b1[b1.length-1],e3=de.days[de.days.length-1],t3=u1(u3(e3.value,1),v2(v1));b1.push({days:t3})}}return b1},u1=(b1,v1)=>{const P1=R1(b1),B1=[];for(let n2=0;n2<7;n2++){const W2=u3(P1,n2),ne=v2(W2)!==v1;B1.push({text:e.hideOffsetDates&&ne?"":W2.getDate(),value:W2,current:!ne,classData:{}})}return B1},d1=(b1,v1)=>{const P1=[],B1=new Date(v1,b1),n2=new Date(v1,b1+1,0),W2=e.weekStart,ne=L3(B1,{weekStartsOn:W2}),P2=Ge=>{const S2=u1(Ge,b1);if(P1.push({days:S2}),!P1[P1.length-1].days.some(de=>g2(Pt(de.value),Pt(n2)))){const de=u3(Ge,7);P2(de)}};return P2(ne),o1(P1,B1,n2,W2)},y1=b1=>{const v1=m0(R1(b1.value),l.hours,l.minutes,p1());t("date-update",v1),y.value.enabled?Jl(v1,s,y.value.limit):s.value=v1,r(),u.nextTick().then(()=>{X()})},V1=b1=>m.value.noDisabledRange?Lb(n.value[0],b1).some(v1=>C(v1)):!1,C1=()=>{n.value=s.value?s.value.slice():[],n.value.length===2&&!(m.value.fixedStart||m.value.fixedEnd)&&(n.value=[])},S1=(b1,v1)=>{const P1=[R1(b1.value),u3(R1(b1.value),+m.value.autoRange)];b(P1)?(v1&&L1(b1.value),n.value=P1):t("invalid-date",b1.value)},L1=b1=>{const v1=v2(R1(b1)),P1=d2(R1(b1));if(E(0,v1,P1),d.value.count>0)for(let B1=1;B1<d.value.count;B1++){const n2=k21(U2(R1(b1),{year:L.value(B1-1),month:A.value(B1-1)}));E(B1,n2.month,n2.year)}},H1=b1=>{if(V1(b1.value)||!M(b1.value,s.value,m.value.fixedStart?0:1))return t("invalid-date",b1.value);n.value=Pb(R1(b1.value),s,t,m)},N1=(b1,v1)=>{if(C1(),m.value.autoRange)return S1(b1,v1);if(m.value.fixedStart||m.value.fixedEnd)return H1(b1);n.value[0]?M(R1(b1.value),s.value)&&!V1(b1.value)?he(R1(b1.value),R1(n.value[0]))?(n.value.unshift(R1(b1.value)),t("range-end",n.value[0])):(n.value[1]=R1(b1.value),t("range-end",n.value[1])):(e.autoApply&&t("auto-apply-invalid",b1.value),t("invalid-date",b1.value)):(n.value[0]=R1(b1.value),t("range-start",n.value[0]))},p1=(b1=!0)=>e.enableSeconds?Array.isArray(l.seconds)?b1?l.seconds[0]:l.seconds[1]:l.seconds:0,w1=b1=>{n.value[b1]=m0(n.value[b1],l.hours[b1],l.minutes[b1],p1(b1!==1))},D1=()=>{var b1,v1;n.value[0]&&n.value[1]&&+((b1=n.value)==null?void 0:b1[0])>+((v1=n.value)==null?void 0:v1[1])&&(n.value.reverse(),t("range-start",n.value[0]),t("range-end",n.value[1]))},K1=()=>{n.value.length&&(n.value[0]&&!n.value[1]?w1(0):(w1(0),w1(1),r()),D1(),s.value=n.value.slice(),Q8(n.value,t,e.autoApply,e.modelAuto))},F1=(b1,v1=!1)=>{if(C(b1.value)||!b1.current&&e.hideOffsetDates)return t("invalid-date",b1.value);if(c.value=JSON.parse(JSON.stringify(b1)),!m.value.enabled)return y1(b1);Sm(l.hours)&&Sm(l.minutes)&&!y.value.enabled&&(N1(b1,v1),K1())},Q1=(b1,v1)=>{var P1;E(b1,v1.month,v1.year,!0),d.value.count&&!d.value.solo&&t1(b1),t("update-month-year",{instance:b1,month:v1.month,year:v1.year}),a(d.value.solo?b1:void 0);const B1=(P1=e.flow)!=null&&P1.length?e.flow[e.flowStep]:void 0;!v1.fromNav&&(B1===at.month||B1===at.year)&&r()},h2=(b1,v1)=>{Ob({value:b1,modelValue:s,range:m.value.enabled,timezone:v1?void 0:v.value.timezone}),R(),e.multiCalendars&&u.nextTick().then(()=>B(!0))},a2=()=>{m.value.enabled?s.value&&Array.isArray(s.value)&&s.value[0]?s.value=he(R1(),s.value[0])?[R1(),s.value[0]]:[s.value[0],R1()]:s.value=[R1()]:s.value=R1(),R()},H2=()=>{if(Array.isArray(s.value))if(y.value.enabled){const b1=A2();s.value[s.value.length-1]=z(b1)}else s.value=s.value.map((b1,v1)=>b1&&z(b1,v1));else s.value=z(s.value);t("time-update")},A2=()=>Array.isArray(s.value)&&s.value.length?s.value[s.value.length-1]:null;return{calendars:o,modelValue:s,month:L,year:A,time:l,disabledTimesConfig:H,today:f,validateTime:k,getCalendarDays:d1,getMarker:_1,handleScroll:f1,handleSwipe:g1,handleArrow:q,selectDate:F1,updateMonthYear:Q1,presetDate:h2,selectCurrentDate:a2,updateTime:(b1,v1=!0,P1=!1)=>{w(b1,v1,P1,H2)}}},et1={key:0},tt1=u.defineComponent({__name:"DatePicker",props:{...A3},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,{calendars:i,month:c,year:s,modelValue:o,time:l,disabledTimesConfig:f,today:d,validateTime:h,getCalendarDays:m,getMarker:p,handleArrow:v,handleScroll:g,handleSwipe:y,selectDate:x,updateMonthYear:C,presetDate:b,selectCurrentDate:M,updateTime:w}=Je1(n,r,Y,D),z=u.useSlots(),{setHoverDate:_,getDayClassData:S,clearHoverDate:k}=te1(o,n),{defaultedMultiCalendars:H}=ue(n),L=u.ref([]),A=u.ref([]),N=u.ref(null),E=Et(z,"calendar"),R=Et(z,"monthYear"),P=Et(z,"timePicker"),X=f1=>{n.shadow||r("mount",f1)};u.watch(i,()=>{n.shadow||setTimeout(()=>{r("recalculate-position")},0)},{deep:!0});const B=u.computed(()=>f1=>m(c.value(f1),s.value(f1)).map(q=>({...q,days:q.days.map(g1=>(g1.marker=p(g1),g1.classData=S(g1),g1))})));function Y(f1){var q;f1||f1===0?(q=A.value[f1])==null||q.triggerTransition(c.value(f1),s.value(f1)):A.value.forEach((g1,_1)=>g1.triggerTransition(c.value(_1),s.value(_1)))}function D(){r("update-flow-step")}const V=(f1,q=!1)=>{x(f1,q),n.spaceConfirm&&r("select-date")},T=(f1,q,g1=0)=>{var _1;(_1=L.value[g1])==null||_1.toggleMonthPicker(f1,q)},I=(f1,q,g1=0)=>{var _1;(_1=L.value[g1])==null||_1.toggleYearPicker(f1,q)},W=(f1,q,g1)=>{var _1;(_1=N.value)==null||_1.toggleTimePicker(f1,q,g1)},O=f1=>{if(!n.range){const q=o.value?o.value:d,g1=f1?L3(q,{weekStartsOn:1}):sb(q,{weekStartsOn:1});x({value:g1,current:v2(q)===c.value(0),text:"",classData:{}})}},j=f1=>{var q;(q=L.value[0])==null||q.handleMonthYearChange(f1,!0)},t1=f1=>{C(0,{month:c.value(0),year:s.value(0)+(f1?1:-1),fromNav:!0})},r1=(f1,q)=>{f1===at.time&&r(`time-picker-${q?"open":"close"}`),r("overlay-toggle",{open:q,overlay:f1})},Q=f1=>{r("overlay-toggle",{open:!1,overlay:f1}),r("focus-menu")};return t({clearHoverDate:k,presetDate:b,selectCurrentDate:M,toggleMonthPicker:T,toggleYearPicker:I,toggleTimePicker:W,handleArrow:v,updateMonthYear:C,getSidebarProps:()=>({modelValue:o,month:c,year:s,time:l,updateTime:w,updateMonthYear:C,selectDate:x,presetDate:b}),changeMonth:j,changeYear:t1,selectWeekDate:O}),(f1,q)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createVNode(Z8,{"multi-calendars":u.unref(H).count,collapse:f1.collapse},{default:u.withCtx(({instance:g1,index:_1})=>[f1.disableMonthYearSelect?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock($e1,u.mergeProps({key:0,ref:m1=>{m1&&(L.value[_1]=m1)},months:u.unref(Mb)(f1.formatLocale,f1.locale,f1.monthNameFormat),years:u.unref(Xl)(f1.yearRange,f1.locale,f1.reverseYears),month:u.unref(c)(g1),year:u.unref(s)(g1),instance:g1},f1.$props,{onMount:q[0]||(q[0]=m1=>X(u.unref(ra).header)),onResetFlow:q[1]||(q[1]=m1=>f1.$emit("reset-flow")),onUpdateMonthYear:m1=>u.unref(C)(g1,m1),onOverlayClosed:Q,onOverlayOpened:q[2]||(q[2]=m1=>f1.$emit("overlay-toggle",{open:!0,overlay:m1}))}),u.createSlots({_:2},[u.renderList(u.unref(R),(m1,o1)=>({name:m1,fn:u.withCtx(u1=>[u.renderSlot(f1.$slots,m1,u.normalizeProps(u.guardReactiveProps(u1)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),u.createVNode(Qe1,u.mergeProps({ref:m1=>{m1&&(A.value[_1]=m1)},"mapped-dates":B.value(g1),month:u.unref(c)(g1),year:u.unref(s)(g1),instance:g1},f1.$props,{onSelectDate:m1=>u.unref(x)(m1,g1!==1),onHandleSpace:m1=>V(m1,g1!==1),onSetHoverDate:q[3]||(q[3]=m1=>u.unref(_)(m1)),onHandleScroll:m1=>u.unref(g)(m1,g1),onHandleSwipe:m1=>u.unref(y)(m1,g1),onMount:q[4]||(q[4]=m1=>X(u.unref(ra).calendar)),onResetFlow:q[5]||(q[5]=m1=>f1.$emit("reset-flow")),onTooltipOpen:q[6]||(q[6]=m1=>f1.$emit("tooltip-open",m1)),onTooltipClose:q[7]||(q[7]=m1=>f1.$emit("tooltip-close",m1))}),u.createSlots({_:2},[u.renderList(u.unref(E),(m1,o1)=>({name:m1,fn:u.withCtx(u1=>[u.renderSlot(f1.$slots,m1,u.normalizeProps(u.guardReactiveProps({...u1})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),f1.enableTimePicker?(u.openBlock(),u.createElementBlock("div",et1,[f1.$slots["time-picker"]?u.renderSlot(f1.$slots,"time-picker",u.normalizeProps(u.mergeProps({key:0},{time:u.unref(l),updateTime:u.unref(w)}))):(u.openBlock(),u.createBlock(Rb,u.mergeProps({key:1,ref_key:"timePickerRef",ref:N},f1.$props,{hours:u.unref(l).hours,minutes:u.unref(l).minutes,seconds:u.unref(l).seconds,"internal-model-value":f1.internalModelValue,"disabled-times-config":u.unref(f),"validate-time":u.unref(h),onMount:q[8]||(q[8]=g1=>X(u.unref(ra).timePicker)),"onUpdate:hours":q[9]||(q[9]=g1=>u.unref(w)(g1)),"onUpdate:minutes":q[10]||(q[10]=g1=>u.unref(w)(g1,!1)),"onUpdate:seconds":q[11]||(q[11]=g1=>u.unref(w)(g1,!1,!0)),onResetFlow:q[12]||(q[12]=g1=>f1.$emit("reset-flow")),onOverlayClosed:q[13]||(q[13]=g1=>r1(g1,!1)),onOverlayOpened:q[14]||(q[14]=g1=>r1(g1,!0)),onAmPmChange:q[15]||(q[15]=g1=>f1.$emit("am-pm-change",g1))}),u.createSlots({_:2},[u.renderList(u.unref(P),(g1,_1)=>({name:g1,fn:u.withCtx(m1=>[u.renderSlot(f1.$slots,g1,u.normalizeProps(u.guardReactiveProps(m1)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):u.createCommentVNode("",!0)],64))}}),at1=(e,t)=>{const a=u.ref(),{defaultedMultiCalendars:r,defaultedConfig:n,defaultedHighlight:i,defaultedRange:c,propDates:s,defaultedFilters:o,defaultedMultiDates:l}=ue(e),{modelValue:f,year:d,month:h,calendars:m}=Fn(e,t),{isDisabled:p}=V0(e),{selectYear:v,groupedYears:g,showYearPicker:y,isDisabled:x,toggleYearPicker:C,handleYearSelect:b,handleYear:M}=Db({modelValue:f,multiCalendars:r,highlight:i,calendars:m,propDates:s,month:h,year:d,filters:o,props:e,emit:t}),w=(E,R)=>[E,R].map(P=>X3(P,"MMMM",{locale:e.formatLocale})).join("-"),z=u.computed(()=>E=>f.value?Array.isArray(f.value)?f.value.some(R=>xm(E,R)):xm(f.value,E):!1),_=E=>{if(c.value.enabled){if(Array.isArray(f.value)){const R=g2(E,f.value[0])||g2(E,f.value[1]);return Y8(f.value,a.value,E)&&!R}return!1}return!1},S=(E,R)=>E.quarter===hm(R)&&E.year===d2(R),k=E=>typeof i.value=="function"?i.value({quarter:hm(E),year:d2(E)}):!!i.value.quarters.find(R=>S(R,E)),H=u.computed(()=>E=>{const R=U2(new Date,{year:d.value(E)});return zJ({start:Pl(R),end:ib(R)}).map(P=>{const X=Z0(P),B=mm(P),Y=p(P),D=_(X),V=k(X);return{text:w(X,B),value:X,active:z.value(X),highlighted:V,disabled:Y,isBetween:D}})}),L=E=>{Jl(E,f,l.value.limit),t("auto-apply",!0)},A=E=>{f.value=e9(f,E,t),Q8(f.value,t,e.autoApply,e.modelAuto)},N=E=>{f.value=E,t("auto-apply")};return{defaultedConfig:n,defaultedMultiCalendars:r,groupedYears:g,year:d,isDisabled:x,quarters:H,showYearPicker:y,modelValue:f,setHoverDate:E=>{a.value=E},selectYear:v,selectQuarter:(E,R,P)=>{if(!P)return m.value[R].month=v2(mm(E)),l.value.enabled?L(E):c.value.enabled?A(E):N(E)},toggleYearPicker:C,handleYearSelect:b,handleYear:M}},rt1={class:"dp--quarter-items"},nt1=["data-test","disabled","onClick","onMouseover"],ct1=u.defineComponent({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...A3},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(e,{expose:t,emit:a}){const r=a,n=e,i=u.useSlots(),c=Et(i,"yearMode"),{defaultedMultiCalendars:s,defaultedConfig:o,groupedYears:l,year:f,isDisabled:d,quarters:h,modelValue:m,showYearPicker:p,setHoverDate:v,selectQuarter:g,toggleYearPicker:y,handleYearSelect:x,handleYear:C}=at1(n,r);return t({getSidebarProps:()=>({modelValue:m,year:f,selectQuarter:g,handleYearSelect:x,handleYear:C})}),(b,M)=>(u.openBlock(),u.createBlock(Z8,{"multi-calendars":u.unref(s).count,collapse:b.collapse,stretch:""},{default:u.withCtx(({instance:w})=>[u.createElementVNode("div",{class:"dp-quarter-picker-wrap",style:u.normalizeStyle({minHeight:`${u.unref(o).modeHeight}px`})},[b.$slots["top-extra"]?u.renderSlot(b.$slots,"top-extra",{key:0,value:b.internalModelValue}):u.createCommentVNode("",!0),u.createElementVNode("div",null,[u.createVNode(Nb,u.mergeProps(b.$props,{items:u.unref(l)(w),instance:w,"show-year-picker":u.unref(p)[w],year:u.unref(f)(w),"is-disabled":z=>u.unref(d)(w,z),onHandleYear:z=>u.unref(C)(w,z),onYearSelect:z=>u.unref(x)(z,w),onToggleYearPicker:z=>u.unref(y)(w,z==null?void 0:z.flow,z==null?void 0:z.show)}),u.createSlots({_:2},[u.renderList(u.unref(c),(z,_)=>({name:z,fn:u.withCtx(S=>[u.renderSlot(b.$slots,z,u.normalizeProps(u.guardReactiveProps(S)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),u.createElementVNode("div",rt1,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(u.unref(h)(w),(z,_)=>(u.openBlock(),u.createElementBlock("div",{key:_},[u.createElementVNode("button",{type:"button",class:u.normalizeClass(["dp--qr-btn",{"dp--qr-btn-active":z.active,"dp--qr-btn-between":z.isBetween,"dp--qr-btn-disabled":z.disabled,"dp--highlighted":z.highlighted}]),"data-test":z.value,disabled:z.disabled,onClick:S=>u.unref(g)(z.value,w,z.disabled),onMouseover:S=>u.unref(v)(z.value)},[b.$slots.quarter?u.renderSlot(b.$slots,"quarter",{key:0,value:z.value,text:z.text}):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(z.text),1)],64))],42,nt1)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),it1=["id","aria-label"],st1={key:0,class:"dp--menu-load-container"},ot1=u.createElementVNode("span",{class:"dp--menu-loader"},null,-1),lt1=[ot1],ft1={key:0,class:"dp__sidebar_left"},ut1=["data-test","onClick","onKeydown"],dt1={key:2,class:"dp__sidebar_right"},ht1={key:3,class:"dp__action_extra"},Lm=u.defineComponent({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...K8,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,i=u.ref(null),c=u.computed(()=>{const{openOnTop:o1,...u1}=n;return{...u1,flowStep:_.value,collapse:n.collapse,noOverlayFocus:n.noOverlayFocus,menuWrapRef:i.value}}),{setMenuFocused:s,setShiftKey:o,control:l}=Eb(),f=u.useSlots(),{defaultedTextInput:d,defaultedInline:h,defaultedConfig:m}=ue(n),p=u.ref(null),v=u.ref(0),g=u.ref(null),y=u.ref(!1),x=u.ref(null);u.onMounted(()=>{if(!n.shadow){y.value=!0,C(),window.addEventListener("resize",C);const o1=Ne(i);if(o1&&!d.value.enabled&&!h.value.enabled&&(s(!0),N()),o1){const u1=d1=>{m.value.allowPreventDefault&&d1.preventDefault(),h0(d1,m.value,!0)};o1.addEventListener("pointerdown",u1),o1.addEventListener("mousedown",u1)}}}),u.onUnmounted(()=>{window.removeEventListener("resize",C)});const C=()=>{const o1=Ne(g);o1&&(v.value=o1.getBoundingClientRect().width)},{arrowRight:b,arrowLeft:M,arrowDown:w,arrowUp:z}=A0(),{flowStep:_,updateFlowStep:S,childMount:k,resetFlow:H}=ae1(n,r,x),L=u.computed(()=>n.monthPicker?ge1:n.yearPicker?xe1:n.timePicker?Pe1:n.quarterPicker?ct1:tt1),A=u.computed(()=>{var o1;if(m.value.arrowLeft)return m.value.arrowLeft;const u1=(o1=i.value)==null?void 0:o1.getBoundingClientRect(),d1=n.getInputRect();return d1.width<v.value&&d1.left<=((u1==null?void 0:u1.left)??0)?`${d1.width/2}px`:"50%"}),N=()=>{const o1=Ne(i);o1&&o1.focus({preventScroll:!0})},E=u.computed(()=>{var o1;return((o1=x.value)==null?void 0:o1.getSidebarProps())||{}}),R=()=>{n.openOnTop&&r("recalculate-position")},P=Et(f,"action"),X=u.computed(()=>n.monthPicker||n.yearPicker?Et(f,"monthYear"):n.timePicker?Et(f,"timePicker"):Et(f,"shared")),B=u.computed(()=>n.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),Y=u.computed(()=>({dp__menu_disabled:n.disabled,dp__menu_readonly:n.readonly,"dp-menu-loading":n.loading})),D=u.computed(()=>({dp__menu:!0,dp__menu_index:!h.value.enabled,dp__relative:h.value.enabled,[n.menuClassName]:!!n.menuClassName})),V=o1=>{h0(o1,m.value,!0)},T=()=>{n.escClose&&r("close-picker")},I=o1=>{if(n.arrowNavigation){if(o1===pt.up)return z();if(o1===pt.down)return w();if(o1===pt.left)return M();if(o1===pt.right)return b()}else o1===pt.right||o1===pt.up?r1("handleArrow",pt.left,0,o1===pt.up):r1("handleArrow",pt.right,0,o1===pt.down)},W=o1=>{o(o1.shiftKey),!n.disableMonthYearSelect&&o1.code===oe.tab&&o1.target.classList.contains("dp__menu")&&l.value.shiftKeyInMenu&&(o1.preventDefault(),h0(o1,m.value,!0),r("close-picker"))},O=()=>{N(),r("time-picker-close")},j=o1=>{var u1,d1,y1;(u1=x.value)==null||u1.toggleTimePicker(!1,!1),(d1=x.value)==null||d1.toggleMonthPicker(!1,!1,o1),(y1=x.value)==null||y1.toggleYearPicker(!1,!1,o1)},t1=(o1,u1=0)=>{var d1,y1,V1;return o1==="month"?(d1=x.value)==null?void 0:d1.toggleMonthPicker(!1,!0,u1):o1==="year"?(y1=x.value)==null?void 0:y1.toggleYearPicker(!1,!0,u1):o1==="time"?(V1=x.value)==null?void 0:V1.toggleTimePicker(!0,!1):j(u1)},r1=(o1,...u1)=>{var d1,y1;(d1=x.value)!=null&&d1[o1]&&((y1=x.value)==null||y1[o1](...u1))},Q=()=>{r1("selectCurrentDate")},f1=(o1,u1)=>{r1("presetDate",o1,u1)},q=()=>{r1("clearHoverDate")},g1=(o1,u1)=>{r1("updateMonthYear",o1,u1)},_1=(o1,u1)=>{o1.preventDefault(),I(u1)},m1=o1=>{if(W(o1),o1.key===oe.home||o1.key===oe.end)return r1("selectWeekDate",o1.key===oe.home);if(o1.key===oe.pageUp||o1.key===oe.pageDown)return o1.shiftKey?r1("changeYear",o1.key===oe.pageUp):r1("changeMonth",o1.key===oe.pageUp);switch(o1.key){case oe.esc:return T();case oe.arrowLeft:return _1(o1,pt.left);case oe.arrowRight:return _1(o1,pt.right);case oe.arrowUp:return _1(o1,pt.up);case oe.arrowDown:return _1(o1,pt.down);default:return}};return t({updateMonthYear:g1,switchView:t1}),(o1,u1)=>{var d1,y1,V1;return u.openBlock(),u.createElementBlock("div",{id:o1.uid?`dp-menu-${o1.uid}`:void 0,ref_key:"dpMenuRef",ref:i,tabindex:"0",role:"dialog","aria-label":(d1=o1.ariaLabels)==null?void 0:d1.menu,class:u.normalizeClass(D.value),style:u.normalizeStyle({"--dp-arrow-left":A.value}),onMouseleave:q,onClick:V,onKeydown:m1},[(o1.disabled||o1.readonly)&&u.unref(h).enabled||o1.loading?(u.openBlock(),u.createElementBlock("div",{key:0,class:u.normalizeClass(Y.value)},[o1.loading?(u.openBlock(),u.createElementBlock("div",st1,lt1)):u.createCommentVNode("",!0)],2)):u.createCommentVNode("",!0),!u.unref(h).enabled&&!o1.teleportCenter?(u.openBlock(),u.createElementBlock("div",{key:1,class:u.normalizeClass(B.value)},null,2)):u.createCommentVNode("",!0),u.createElementVNode("div",{ref_key:"innerMenuRef",ref:g,class:u.normalizeClass({dp__menu_content_wrapper:((y1=o1.presetDates)==null?void 0:y1.length)||!!o1.$slots["left-sidebar"]||!!o1.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":e.collapse&&(((V1=o1.presetDates)==null?void 0:V1.length)||!!o1.$slots["left-sidebar"]||!!o1.$slots["right-sidebar"])}),style:u.normalizeStyle({"--dp-menu-width":`${v.value}px`})},[o1.$slots["left-sidebar"]?(u.openBlock(),u.createElementBlock("div",ft1,[u.renderSlot(o1.$slots,"left-sidebar",u.normalizeProps(u.guardReactiveProps(E.value)))])):u.createCommentVNode("",!0),o1.presetDates.length?(u.openBlock(),u.createElementBlock("div",{key:1,class:u.normalizeClass({"dp--preset-dates-collapsed":e.collapse,"dp--preset-dates":!0})},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(o1.presetDates,(C1,S1)=>(u.openBlock(),u.createElementBlock(u.Fragment,{key:S1},[C1.slot?u.renderSlot(o1.$slots,C1.slot,{key:0,presetDate:f1,label:C1.label,value:C1.value}):(u.openBlock(),u.createElementBlock("button",{key:1,type:"button",style:u.normalizeStyle(C1.style||{}),class:u.normalizeClass(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":e.collapse}]),"data-test":C1.testId??void 0,onClick:u.withModifiers(L1=>f1(C1.value,C1.noTz),["prevent"]),onKeydown:L1=>u.unref(Lt)(L1,()=>f1(C1.value,C1.noTz),!0)},u.toDisplayString(C1.label),47,ut1))],64))),128))],2)):u.createCommentVNode("",!0),u.createElementVNode("div",{ref_key:"calendarWrapperRef",ref:p,class:"dp__instance_calendar",role:"document"},[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(L.value),u.mergeProps({ref_key:"dynCmpRef",ref:x},c.value,{"flow-step":u.unref(_),onMount:u.unref(k),onUpdateFlowStep:u.unref(S),onResetFlow:u.unref(H),onFocusMenu:N,onSelectDate:u1[0]||(u1[0]=C1=>o1.$emit("select-date")),onDateUpdate:u1[1]||(u1[1]=C1=>o1.$emit("date-update",C1)),onTooltipOpen:u1[2]||(u1[2]=C1=>o1.$emit("tooltip-open",C1)),onTooltipClose:u1[3]||(u1[3]=C1=>o1.$emit("tooltip-close",C1)),onAutoApply:u1[4]||(u1[4]=C1=>o1.$emit("auto-apply",C1)),onRangeStart:u1[5]||(u1[5]=C1=>o1.$emit("range-start",C1)),onRangeEnd:u1[6]||(u1[6]=C1=>o1.$emit("range-end",C1)),onInvalidFixedRange:u1[7]||(u1[7]=C1=>o1.$emit("invalid-fixed-range",C1)),onTimeUpdate:u1[8]||(u1[8]=C1=>o1.$emit("time-update")),onAmPmChange:u1[9]||(u1[9]=C1=>o1.$emit("am-pm-change",C1)),onTimePickerOpen:u1[10]||(u1[10]=C1=>o1.$emit("time-picker-open",C1)),onTimePickerClose:O,onRecalculatePosition:R,onUpdateMonthYear:u1[11]||(u1[11]=C1=>o1.$emit("update-month-year",C1)),onAutoApplyInvalid:u1[12]||(u1[12]=C1=>o1.$emit("auto-apply-invalid",C1)),onInvalidDate:u1[13]||(u1[13]=C1=>o1.$emit("invalid-date",C1)),onOverlayToggle:u1[14]||(u1[14]=C1=>o1.$emit("overlay-toggle",C1)),"onUpdate:internalModelValue":u1[15]||(u1[15]=C1=>o1.$emit("update:internal-model-value",C1))}),u.createSlots({_:2},[u.renderList(X.value,(C1,S1)=>({name:C1,fn:u.withCtx(L1=>[u.renderSlot(o1.$slots,C1,u.normalizeProps(u.guardReactiveProps({...L1})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),o1.$slots["right-sidebar"]?(u.openBlock(),u.createElementBlock("div",dt1,[u.renderSlot(o1.$slots,"right-sidebar",u.normalizeProps(u.guardReactiveProps(E.value)))])):u.createCommentVNode("",!0),o1.$slots["action-extra"]?(u.openBlock(),u.createElementBlock("div",ht1,[o1.$slots["action-extra"]?u.renderSlot(o1.$slots,"action-extra",{key:0,selectCurrentDate:Q}):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)],6),!o1.autoApply||u.unref(m).keepActionRow?(u.openBlock(),u.createBlock(le1,u.mergeProps({key:2,"menu-mount":y.value},c.value,{"calendar-width":v.value,onClosePicker:u1[16]||(u1[16]=C1=>o1.$emit("close-picker")),onSelectDate:u1[17]||(u1[17]=C1=>o1.$emit("select-date")),onInvalidSelect:u1[18]||(u1[18]=C1=>o1.$emit("invalid-select")),onSelectNow:Q}),u.createSlots({_:2},[u.renderList(u.unref(P),(C1,S1)=>({name:C1,fn:u.withCtx(L1=>[u.renderSlot(o1.$slots,C1,u.normalizeProps(u.guardReactiveProps({...L1})))])}))]),1040,["menu-mount","calendar-width"])):u.createCommentVNode("",!0)],46,it1)}}}),mt1=typeof window<"u"?window:void 0,_s=()=>{},pt1=e=>u.getCurrentScope()?(u.onScopeDispose(e),!0):!1,vt1=(e,t,a,r)=>{if(!e)return _s;let n=_s;const i=u.watch(()=>u.unref(e),s=>{n(),s&&(s.addEventListener(t,a,r),n=()=>{s.removeEventListener(t,a,r),n=_s})},{immediate:!0,flush:"post"}),c=()=>{i(),n()};return pt1(c),c},gt1=(e,t,a,r={})=>{const{window:n=mt1,event:i="pointerdown"}=r;return n?vt1(n,i,c=>{const s=Ne(e),o=Ne(t);!s||!o||s===c.target||c.composedPath().includes(s)||c.composedPath().includes(o)||a(c)},{passive:!0}):void 0},yt1=u.defineComponent({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...K8},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,i=u.useSlots(),c=u.ref(!1),s=u.toRef(n,"modelValue"),o=u.toRef(n,"timezone"),l=u.ref(null),f=u.ref(null),d=u.ref(null),h=u.ref(!1),m=u.ref(null),p=u.ref(!1),v=u.ref(!1),g=u.ref(!1),{setMenuFocused:y,setShiftKey:x}=Eb(),{clearArrowNav:C}=A0(),{validateDate:b,isValidTime:M}=V0(n),{defaultedTransitions:w,defaultedTextInput:z,defaultedInline:_,defaultedConfig:S,defaultedRange:k,defaultedMultiDates:H}=ue(n),{menuTransition:L,showTransition:A}=Rn(w);u.onMounted(()=>{I(n.modelValue),u.nextTick().then(()=>{if(!_.value.enabled){const v1=Y(m.value);v1==null||v1.addEventListener("scroll",_1),window==null||window.addEventListener("resize",m1)}}),_.value.enabled&&(c.value=!0),window==null||window.addEventListener("keyup",o1),window==null||window.addEventListener("keydown",u1)}),u.onUnmounted(()=>{if(!_.value.enabled){const v1=Y(m.value);v1==null||v1.removeEventListener("scroll",_1),window==null||window.removeEventListener("resize",m1)}window==null||window.removeEventListener("keyup",o1),window==null||window.removeEventListener("keydown",u1)});const N=Et(i,"all",n.presetDates),E=Et(i,"input");u.watch([s,o],()=>{I(s.value)},{deep:!0});const{openOnTop:R,menuStyle:P,xCorrect:X,setMenuPosition:B,getScrollableParent:Y,shadowRender:D}=Q21({menuRef:l,menuRefInner:f,inputRef:d,pickerWrapperRef:m,inline:_,emit:r,props:n,slots:i}),{inputValue:V,internalModelValue:T,parseExternalModelValue:I,emitModelValue:W,formatInputValue:O,checkBeforeEmit:j}=K21(r,n,h),t1=u.computed(()=>({dp__main:!0,dp__theme_dark:n.dark,dp__theme_light:!n.dark,dp__flex_display:_.value.enabled,"dp--flex-display-collapsed":g.value,dp__flex_display_with_input:_.value.input})),r1=u.computed(()=>n.dark?"dp__theme_dark":"dp__theme_light"),Q=u.computed(()=>n.teleport?{to:typeof n.teleport=="boolean"?"body":n.teleport,disabled:!n.teleport||_.value.enabled}:{}),f1=u.computed(()=>({class:"dp__outer_menu_wrap"})),q=u.computed(()=>_.value.enabled&&(n.timePicker||n.monthPicker||n.yearPicker||n.quarterPicker)),g1=()=>{var v1,P1;return(P1=(v1=d.value)==null?void 0:v1.$el)==null?void 0:P1.getBoundingClientRect()},_1=()=>{c.value&&(S.value.closeOnScroll?p1():B())},m1=()=>{var v1;c.value&&B();const P1=(v1=f.value)==null?void 0:v1.$el.getBoundingClientRect().width;g.value=document.body.offsetWidth<=P1},o1=v1=>{v1.key==="Tab"&&!_.value.enabled&&!n.teleport&&S.value.tabOutClosesMenu&&(m.value.contains(document.activeElement)||p1()),v.value=v1.shiftKey},u1=v1=>{v.value=v1.shiftKey},d1=()=>{!n.disabled&&!n.readonly&&(D(Lm,n),B(!1),c.value=!0,c.value&&r("open"),c.value||N1(),I(n.modelValue))},y1=()=>{var v1;V.value="",N1(),(v1=d.value)==null||v1.setParsedDate(null),r("update:model-value",null),r("update:model-timezone-value",null),r("cleared"),S.value.closeOnClearValue&&p1()},V1=()=>{const v1=T.value;return!v1||!Array.isArray(v1)&&b(v1)?!0:Array.isArray(v1)?H.value.enabled||v1.length===2&&b(v1[0])&&b(v1[1])?!0:k.value.partialRange&&!n.timePicker?b(v1[0]):!1:!1},C1=()=>{j()&&V1()?(W(),p1()):r("invalid-select",T.value)},S1=v1=>{L1(),W(),S.value.closeOnAutoApply&&!v1&&p1()},L1=()=>{d.value&&z.value.enabled&&d.value.setParsedDate(T.value)},H1=(v1=!1)=>{n.autoApply&&M(T.value)&&V1()&&(k.value.enabled&&Array.isArray(T.value)?(k.value.partialRange||T.value.length===2)&&S1(v1):S1(v1))},N1=()=>{z.value.enabled||(T.value=null)},p1=()=>{_.value.enabled||(c.value&&(c.value=!1,X.value=!1,y(!1),x(!1),C(),r("closed"),V.value&&I(s.value)),N1(),r("blur"))},w1=(v1,P1,B1=!1)=>{if(!v1){T.value=null;return}const n2=Array.isArray(v1)?!v1.some(ne=>!b(ne)):b(v1),W2=M(v1);n2&&W2&&(T.value=v1,P1&&(p.value=B1,C1(),r("text-submit")))},D1=()=>{n.autoApply&&M(T.value)&&W(),L1()},K1=()=>c.value?p1():d1(),F1=v1=>{T.value=v1},Q1=()=>{z.value.enabled&&(h.value=!0,O()),r("focus")},h2=()=>{if(z.value.enabled&&(h.value=!1,I(n.modelValue),p.value)){const v1=w21(m.value,v.value);v1==null||v1.focus()}r("blur")},a2=v1=>{f.value&&f.value.updateMonthYear(0,{month:Cm(v1.month),year:Cm(v1.year)})},H2=v1=>{I(v1??n.modelValue)},A2=(v1,P1)=>{var B1;(B1=f.value)==null||B1.switchView(v1,P1)},b1=v1=>S.value.onClickOutside?S.value.onClickOutside(v1):p1();return gt1(l,d,()=>b1(V1)),t({closeMenu:p1,selectDate:C1,clearValue:y1,openMenu:d1,onScroll:_1,formatInputValue:O,updateInternalModelValue:F1,setMonthYear:a2,parseModel:H2,switchView:A2,toggleMenu:K1}),(v1,P1)=>(u.openBlock(),u.createElementBlock("div",{ref_key:"pickerWrapperRef",ref:m,class:u.normalizeClass(t1.value),"data-datepicker-instance":""},[u.createVNode(ie1,u.mergeProps({ref_key:"inputRef",ref:d,"input-value":u.unref(V),"onUpdate:inputValue":P1[0]||(P1[0]=B1=>u.isRef(V)?V.value=B1:null),"is-menu-open":c.value},v1.$props,{onClear:y1,onOpen:d1,onSetInputDate:w1,onSetEmptyDate:u.unref(W),onSelectDate:C1,onToggle:K1,onClose:p1,onFocus:Q1,onBlur:h2,onRealBlur:P1[1]||(P1[1]=B1=>h.value=!1)}),u.createSlots({_:2},[u.renderList(u.unref(E),(B1,n2)=>({name:B1,fn:u.withCtx(W2=>[u.renderSlot(v1.$slots,B1,u.normalizeProps(u.guardReactiveProps(W2)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(u.openBlock(),u.createBlock(u.resolveDynamicComponent(v1.teleport?u.Teleport:"div"),u.normalizeProps(u.guardReactiveProps(Q.value)),{default:u.withCtx(()=>[u.createVNode(u.Transition,{name:u.unref(L)(u.unref(R)),css:u.unref(A)&&!u.unref(_).enabled},{default:u.withCtx(()=>[c.value?(u.openBlock(),u.createElementBlock("div",u.mergeProps({key:0,ref_key:"dpWrapMenuRef",ref:l},f1.value,{class:{"dp--menu-wrapper":!u.unref(_).enabled},style:u.unref(_).enabled?void 0:u.unref(P)}),[u.createVNode(Lm,u.mergeProps({ref_key:"dpMenuRef",ref:f},v1.$props,{"internal-model-value":u.unref(T),"onUpdate:internalModelValue":P1[2]||(P1[2]=B1=>u.isRef(T)?T.value=B1:null),class:{[r1.value]:!0,"dp--menu-wrapper":v1.teleport},"open-on-top":u.unref(R),"no-overlay-focus":q.value,collapse:g.value,"get-input-rect":g1,onClosePicker:p1,onSelectDate:C1,onAutoApply:H1,onTimeUpdate:D1,onFlowStep:P1[3]||(P1[3]=B1=>v1.$emit("flow-step",B1)),onUpdateMonthYear:P1[4]||(P1[4]=B1=>v1.$emit("update-month-year",B1)),onInvalidSelect:P1[5]||(P1[5]=B1=>v1.$emit("invalid-select",u.unref(T))),onAutoApplyInvalid:P1[6]||(P1[6]=B1=>v1.$emit("invalid-select",B1)),onInvalidFixedRange:P1[7]||(P1[7]=B1=>v1.$emit("invalid-fixed-range",B1)),onRecalculatePosition:u.unref(B),onTooltipOpen:P1[8]||(P1[8]=B1=>v1.$emit("tooltip-open",B1)),onTooltipClose:P1[9]||(P1[9]=B1=>v1.$emit("tooltip-close",B1)),onTimePickerOpen:P1[10]||(P1[10]=B1=>v1.$emit("time-picker-open",B1)),onTimePickerClose:P1[11]||(P1[11]=B1=>v1.$emit("time-picker-close",B1)),onAmPmChange:P1[12]||(P1[12]=B1=>v1.$emit("am-pm-change",B1)),onRangeStart:P1[13]||(P1[13]=B1=>v1.$emit("range-start",B1)),onRangeEnd:P1[14]||(P1[14]=B1=>v1.$emit("range-end",B1)),onDateUpdate:P1[15]||(P1[15]=B1=>v1.$emit("date-update",B1)),onInvalidDate:P1[16]||(P1[16]=B1=>v1.$emit("invalid-date",B1)),onOverlayToggle:P1[17]||(P1[17]=B1=>v1.$emit("overlay-toggle",B1))}),u.createSlots({_:2},[u.renderList(u.unref(N),(B1,n2)=>({name:B1,fn:u.withCtx(W2=>[u.renderSlot(v1.$slots,B1,u.normalizeProps(u.guardReactiveProps({...W2})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","onRecalculatePosition"])],16)):u.createCommentVNode("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),t9=(()=>{const e=yt1;return e.install=t=>{t.component("Vue3DatePicker",e)},e})(),xt1=Object.freeze(Object.defineProperty({__proto__:null,default:t9},Symbol.toStringTag,{value:"Module"}));Object.entries(xt1).forEach(([e,t])=>{e!=="default"&&(t9[e]=t)});const bt1=u.defineComponent({__name:"PgaVueDatePicker",props:u.mergeModels({yearPicker:{type:Boolean},monthPicker:{type:Boolean},range:{type:Boolean},enableTimePicker:{type:Boolean},notClearable:{type:Boolean},disabled:{type:Boolean},format:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){u.useCssVars(i=>({"6e5f2e73":u.unref(r).input.borderColor,"76564f82":u.unref(r).input.borderRadius,"00f250b1":u.unref(r).input.backgroundColor,"2e18a366":u.unref(r).input.backgroundColorDisabled,"6eb047d9":u.unref(r).input.colorFocus}));const t=u.useModel(e,"modelValue"),a=ae("pgaVueDatePicker"),{form:r}=Mt(),n=u.ref(!1);return(i,c)=>(u.openBlock(),u.createBlock(u.unref(t9),{class:u.normalizeClass(["date-picker",{"date-picker__disabled":i.disabled,"date-picker__open":n.value}]),modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=s=>t.value=s),disabled:i.disabled,clearable:!i.notClearable,yearPicker:i.yearPicker,monthPicker:i.monthPicker,range:i.range,enableTimePicker:i.enableTimePicker,timePickerInline:"",is24:"",teleport:!0,locale:u.unref(Q3)().language,format:i.format,previewFormat:i.format,cancelText:u.unref(a)("cancelBtn"),selectText:u.unref(a)("selectBtn"),onOpen:c[1]||(c[1]=s=>n.value=!0),onBlur:c[2]||(c[2]=s=>n.value=!1)},null,8,["class","modelValue","disabled","clearable","yearPicker","monthPicker","range","enableTimePicker","locale","format","previewFormat","cancelText","selectText"]))}});const In=X1(bt1,[["__scopeId","data-v-49b3e1e7"]]),Ct1=u.defineComponent({__name:"PgaDatePicker",props:u.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{},notClearable:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=u.useModel(e,"modelValue"),a=u.computed({get(){if(!t.value)return null;const[n,i,c]=t.value.split("-").map(Number);return new Date(n,i-1,c)},set(n){if(!n){t.value=null;return}t.value=n.toISOString().split("T")[0]}});function r(n){return i6(n,{format:"numeric",withTime:!1})}return(n,i)=>(u.openBlock(),u.createBlock(It,{label:n.label,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,errors:n.errors,grow:n.grow},{default:u.withCtx(()=>[u.createVNode(In,{modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=c=>a.value=c),disabled:n.disabled,notClearable:n.notClearable,format:r},null,8,["modelValue","disabled","notClearable"])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}}),Mt1=u.defineComponent({__name:"PgaDatetimePicker",props:u.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{},notClearable:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=u.useModel(e,"modelValue");function a(r){return i6(r,{format:"short",withTime:!0})}return(r,n)=>(u.openBlock(),u.createBlock(It,{label:r.label,withOptionalLabel:r.withOptionalLabel,withLabelSpace:r.withLabelSpace,errors:r.errors,grow:r.grow},{default:u.withCtx(()=>[u.createVNode(In,{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=i=>t.value=i),enableTimePicker:"",disabled:r.disabled,notClearable:r.notClearable,format:a},null,8,["modelValue","disabled","notClearable"])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}}),zt1={class:"icons-container"},wt1=u.defineComponent({__name:"PgaIconSelector",props:u.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){u.useCssVars(n=>({"853235ac":u.unref(a).input.padding,"872009a0":u.unref(a).input.borderColor,"2b41cb36":u.unref(a).input.borderRadius}));const t=u.useModel(e,"modelValue"),{form:a}=Mt(),r=["star","heart","envelope","plus","minus","pen","edit","check","trash","file","clipboard","bell","calendar","clock","money-check-dollar","gift","percent","magnifying-glass-dollar","house","car","store","gamepad","mobile","school","shirt","user-doctor","face-smile","face-frown-open","cog","lock","bug","camera","code","headphones","wifi","user","search","home","arrow-right-arrow-left","circle"];return(n,i)=>(u.openBlock(),u.createBlock(It,{label:n.label,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,errors:n.errors,grow:n.grow},{default:u.withCtx(()=>[u.createElementVNode("div",zt1,[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList(r,c=>u.createVNode(j2,{key:c,icon:c,variant:t.value===c?"outlined":"flat",color:t.value===c?"primary":"first",width:"2.5rem",disabled:n.disabled,onClick:s=>t.value=c},null,8,["icon","variant","color","disabled","onClick"])),64))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const _t1=X1(wt1,[["__scopeId","data-v-01d838a8"]]),Ht1=["accept","multiple","disabled"],St1={class:"input-file--label-container"},Lt1=u.defineComponent({__name:"PgaInputFile",props:{formats:{},multiple:{type:Boolean},disabled:{type:Boolean},selectFileLabel:{type:[String,Number,Function]}},emits:["newFile","newFiles"],setup(e,{expose:t,emit:a}){u.useCssVars(C=>({bec71a1c:u.unref(i).input.borderColor,e87cca3a:u.unref(i).input.borderRadius,dc2984a0:u.unref(i).input.backgroundColor,"3112a96c":u.unref(i).input.backgroundColorHover,"6f29a768":u.unref(i).input.backgroundColorDisabled}));const r=e,n=a;t({click:g,resetInput:y});const{form:i}=Mt(),c=ae("pgaInputFile"),s=u.ref(),o=u.ref([]),l=u.ref(!1),f=u.ref(!1),d=u.computed(()=>!!o.value.length),h=u.computed(()=>{if(!r.formats)return!0;for(const C of o.value){const b=C.name.split(".").pop();if(!r.formats.includes(b))return!1}return!0}),m=u.computed(()=>r.formats?r.formats.map(C=>`.${C}`).join(","):"*"),p=u.computed(()=>{const C={icon:"upload"};return!d.value||l.value&&!f.value&&!r.disabled?C:h.value?{icon:"circle-check",color:"success"}:{icon:"circle-xmark",color:"danger"}}),v=u.computed(()=>d.value?o.value.map(C=>C.name).join(", "):r.selectFileLabel?r.selectFileLabel:r.multiple?c("selectFilesLabel"):c("selectFileLabel"));function g(){var C;(C=s.value)==null||C.click()}function y(){o.value=[],s.value&&(s.value.value="")}function x(C){l.value=!1;const M=C.target.files;if(M.length){if(o.value=[...M],!h.value){S4("danger",()=>c("newFileError"));return}n("newFile",M[0]),n("newFiles",[...M])}}return(C,b)=>(u.openBlock(),u.createElementBlock("label",{for:"pga-input-file",class:u.normalizeClass(["pga-input-file",{"pga-input-file__disabled":C.disabled}]),onMouseenter:b[4]||(b[4]=M=>l.value=!0),onMouseleave:b[5]||(b[5]=M=>l.value=!1)},[u.createElementVNode("input",{ref_key:"inputRef",ref:s,id:"pga-input-file",class:"input-file--input",type:"file",accept:m.value,multiple:C.multiple,disabled:C.disabled,onChange:b[0]||(b[0]=M=>x(M))},null,40,Ht1),u.createVNode(We,{class:"input-file--icon",icon:p.value.icon,color:p.value.color},null,8,["icon","color"]),u.createElementVNode("div",St1,[u.createVNode(Be,{text:v.value},null,8,["text"])]),d.value?(u.openBlock(),u.createBlock(j2,{key:0,text:u.unref(c)("removeBtn"),variant:"flat",color:"danger",size:"s",disabled:C.disabled,onMouseenter:b[1]||(b[1]=M=>f.value=!0),onMouseleave:b[2]||(b[2]=M=>f.value=!1),onClick:b[3]||(b[3]=u.withModifiers(M=>y(),["prevent"]))},null,8,["text","disabled"])):u.createCommentVNode("",!0)],34))}});const J8=X1(Lt1,[["__scopeId","data-v-1089a950"]]);/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var Bb=1252,kt1=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],a9={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},r9=function(e){kt1.indexOf(e)!=-1&&(Bb=a9[0]=e)};function At1(){r9(1252)}var g3=function(e){r9(e)};function Ib(){g3(1200),At1()}function km(e){for(var t=[],a=0,r=e.length;a<r;++a)t[a]=e.charCodeAt(a);return t}function Vt1(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a)+(e.charCodeAt(2*a+1)<<8));return t.join("")}function $b(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a+1)+(e.charCodeAt(2*a)<<8));return t.join("")}var sr=function(e){var t=e.charCodeAt(0),a=e.charCodeAt(1);return t==255&&a==254?Vt1(e.slice(2)):t==254&&a==255?$b(e.slice(2)):t==65279?e.slice(1):e},Dc=function(t){return String.fromCharCode(t)},Am=function(t){return String.fromCharCode(t)},Z4,i0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Vm(e){for(var t="",a=0,r=0,n=0,i=0,c=0,s=0,o=0,l=0;l<e.length;)a=e.charCodeAt(l++),i=a>>2,r=e.charCodeAt(l++),c=(a&3)<<4|r>>4,n=e.charCodeAt(l++),s=(r&15)<<2|n>>6,o=n&63,isNaN(r)?s=o=64:isNaN(n)&&(o=64),t+=i0.charAt(i)+i0.charAt(c)+i0.charAt(s)+i0.charAt(o);return t}function Dt(e){var t="",a=0,r=0,n=0,i=0,c=0,s=0,o=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var l=0;l<e.length;)i=i0.indexOf(e.charAt(l++)),c=i0.indexOf(e.charAt(l++)),a=i<<2|c>>4,t+=String.fromCharCode(a),s=i0.indexOf(e.charAt(l++)),r=(c&15)<<4|s>>2,s!==64&&(t+=String.fromCharCode(r)),o=i0.indexOf(e.charAt(l++)),n=(s&3)<<6|o,o!==64&&(t+=String.fromCharCode(n));return t}var C2=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),Ha=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,a){return a?new Buffer(t,a):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}}();function _0(e){return C2?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function Tm(e){return C2?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var h3=function(t){return C2?Ha(t,"binary"):t.split("").map(function(a){return a.charCodeAt(0)&255})};function Sa(e){if(Array.isArray(e))return e.map(function(r){return String.fromCharCode(r)}).join("");for(var t=[],a=0;a<e.length;++a)t[a]=String.fromCharCode(e[a]);return t.join("")}function n9(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return n9(new Uint8Array(e));for(var t=new Array(e.length),a=0;a<e.length;++a)t[a]=e[a];return t}var Q4=C2?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:Ha(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,a=0;for(t=0;t<e.length;++t)a+=e[t].length;var r=new Uint8Array(a),n=0;for(t=0,a=0;t<e.length;a+=n,++t)if(n=e[t].length,e[t]instanceof Uint8Array)r.set(e[t],a);else{if(typeof e[t]=="string")throw"wtf";r.set(new Uint8Array(e[t]),a)}return r}return[].concat.apply([],e.map(function(i){return Array.isArray(i)?i:[].slice.call(i)}))};function Tt1(e){for(var t=[],a=0,r=e.length+250,n=_0(e.length+255),i=0;i<e.length;++i){var c=e.charCodeAt(i);if(c<128)n[a++]=c;else if(c<2048)n[a++]=192|c>>6&31,n[a++]=128|c&63;else if(c>=55296&&c<57344){c=(c&1023)+64;var s=e.charCodeAt(++i)&1023;n[a++]=240|c>>8&7,n[a++]=128|c>>2&63,n[a++]=128|s>>6&15|(c&3)<<4,n[a++]=128|s&63}else n[a++]=224|c>>12&15,n[a++]=128|c>>6&63,n[a++]=128|c&63;a>r&&(t.push(n.slice(0,a)),a=0,n=_0(65535),r=65530)}return t.push(n.slice(0,a)),Q4(t)}var xt=/\u0000/g,or=/[\u0001-\u0006]/g;function r6(e){for(var t="",a=e.length-1;a>=0;)t+=e.charAt(a--);return t}function y3(e,t){var a=""+e;return a.length>=t?a:me("0",t-a.length)+a}function c9(e,t){var a=""+e;return a.length>=t?a:me(" ",t-a.length)+a}function Ji(e,t){var a=""+e;return a.length>=t?a:a+me(" ",t-a.length)}function Et1(e,t){var a=""+Math.round(e);return a.length>=t?a:me("0",t-a.length)+a}function Nt1(e,t){var a=""+e;return a.length>=t?a:me("0",t-a.length)+a}var Em=Math.pow(2,32);function Ia(e,t){if(e>Em||e<-Em)return Et1(e,t);var a=Math.round(e);return Nt1(a,t)}function e8(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var Nm=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],Hs=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function Ot1(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var s2={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},Om={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},Pt1={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function t8(e,t,a){for(var r=e<0?-1:1,n=e*r,i=0,c=1,s=0,o=1,l=0,f=0,d=Math.floor(n);l<t&&(d=Math.floor(n),s=d*c+i,f=d*l+o,!(n-d<5e-8));)n=1/(n-d),i=c,c=s,o=l,l=f;if(f>t&&(l>t?(f=o,s=i):(f=l,s=c)),!a)return[0,r*s,f];var h=Math.floor(r*s/f);return[h,r*s-h*f,f]}function Q0(e,t,a){if(e>2958465||e<0)return null;var r=e|0,n=Math.floor(86400*(e-r)),i=0,c=[],s={D:r,T:n,u:86400*(e-r)-n,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(s.u)<1e-6&&(s.u=0),t&&t.date1904&&(r+=1462),s.u>.9999&&(s.u=0,++n==86400&&(s.T=n=0,++r,++s.D)),r===60)c=a?[1317,10,29]:[1900,2,29],i=3;else if(r===0)c=a?[1317,8,29]:[1900,1,0],i=6;else{r>60&&--r;var o=new Date(1900,0,1);o.setDate(o.getDate()+r-1),c=[o.getFullYear(),o.getMonth()+1,o.getDate()],i=o.getDay(),r<60&&(i=(i+6)%7),a&&(i=$t1(o,c))}return s.y=c[0],s.m=c[1],s.d=c[2],s.S=n%60,n=Math.floor(n/60),s.M=n%60,n=Math.floor(n/60),s.H=n,s.q=i,s}var Ub=new Date(1899,11,31,0,0,0),Dt1=Ub.getTime(),Rt1=new Date(1900,2,1,0,0,0);function qb(e,t){var a=e.getTime();return t?a-=1461*24*60*60*1e3:e>=Rt1&&(a+=24*60*60*1e3),(a-(Dt1+(e.getTimezoneOffset()-Ub.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function i9(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function Ft1(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function Bt1(e){var t=e<0?12:11,a=i9(e.toFixed(12));return a.length<=t||(a=e.toPrecision(10),a.length<=t)?a:e.toExponential(5)}function It1(e){var t=i9(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function hn(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),a;return t>=-4&&t<=-1?a=e.toPrecision(10+t):Math.abs(t)<=9?a=Bt1(e):t===10?a=e.toFixed(10).substr(0,12):a=It1(e),i9(Ft1(a.toUpperCase()))}function pa(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):hn(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return Xt(14,qb(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function $t1(e,t){t[0]-=581;var a=e.getDay();return e<60&&(a=(a+6)%7),a}function Ut1(e,t,a,r){var n="",i=0,c=0,s=a.y,o,l=0;switch(e){case 98:s=a.y+543;case 121:switch(t.length){case 1:case 2:o=s%100,l=2;break;default:o=s%1e4,l=4;break}break;case 109:switch(t.length){case 1:case 2:o=a.m,l=t.length;break;case 3:return Hs[a.m-1][1];case 5:return Hs[a.m-1][0];default:return Hs[a.m-1][2]}break;case 100:switch(t.length){case 1:case 2:o=a.d,l=t.length;break;case 3:return Nm[a.q][0];default:return Nm[a.q][1]}break;case 104:switch(t.length){case 1:case 2:o=1+(a.H+11)%12,l=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:o=a.H,l=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:o=a.M,l=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return a.u===0&&(t=="s"||t=="ss")?y3(a.S,t.length):(r>=2?c=r===3?1e3:100:c=r===1?10:1,i=Math.round(c*(a.S+a.u)),i>=60*c&&(i=0),t==="s"?i===0?"0":""+i/c:(n=y3(i,2+r),t==="ss"?n.substr(0,2):"."+n.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":o=a.D*24+a.H;break;case"[m]":case"[mm]":o=(a.D*24+a.H)*60+a.M;break;case"[s]":case"[ss]":o=((a.D*24+a.H)*60+a.M)*60+Math.round(a.S+a.u);break;default:throw"bad abstime format: "+t}l=t.length===3?1:2;break;case 101:o=s,l=1;break}var f=l>0?y3(o,l):"";return f}function s0(e){var t=3;if(e.length<=t)return e;for(var a=e.length%t,r=e.substr(0,a);a!=e.length;a+=t)r+=(r.length>0?",":"")+e.substr(a,t);return r}var jb=/%/g;function qt1(e,t,a){var r=t.replace(jb,""),n=t.length-r.length;return k4(e,r,a*Math.pow(10,2*n))+me("%",n)}function jt1(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return k4(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function Wb(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+Wb(e,-t);var n=e.indexOf(".");n===-1&&(n=e.indexOf("E"));var i=Math.floor(Math.log(t)*Math.LOG10E)%n;if(i<0&&(i+=n),a=(t/Math.pow(10,i)).toPrecision(r+1+(n+i)%n),a.indexOf("e")===-1){var c=Math.floor(Math.log(t)*Math.LOG10E);for(a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(c-a.length+i):a+="E+"+(c-i);a.substr(0,2)==="0.";)a=a.charAt(0)+a.substr(2,n)+"."+a.substr(2+n),a=a.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,o,l,f){return o+l+f.substr(0,(n+i)%n)+"."+f.substr(i)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}var Gb=/# (\?+)( ?)\/( ?)(\d+)/;function Wt1(e,t,a){var r=parseInt(e[4],10),n=Math.round(t*r),i=Math.floor(n/r),c=n-i*r,s=r;return a+(i===0?"":""+i)+" "+(c===0?me(" ",e[1].length+1+e[4].length):c9(c,e[1].length)+e[2]+"/"+e[3]+y3(s,e[4].length))}function Gt1(e,t,a){return a+(t===0?"":""+t)+me(" ",e[1].length+2+e[4].length)}var Yb=/^#*0*\.([0#]+)/,Xb=/\).*[0#]/,Kb=/\(###\) ###\\?-####/;function vt(e){for(var t="",a,r=0;r!=e.length;++r)switch(a=e.charCodeAt(r)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(a)}return t}function Pm(e,t){var a=Math.pow(10,t);return""+Math.round(e*a)/a}function Dm(e,t){var a=e-Math.floor(e),r=Math.pow(10,t);return t<(""+Math.round(a*r)).length?0:Math.round(a*r)}function Yt1(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function Xt1(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function qt(e,t,a){if(e.charCodeAt(0)===40&&!t.match(Xb)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?qt("n",r,a):"("+qt("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return jt1(e,t,a);if(t.indexOf("%")!==-1)return qt1(e,t,a);if(t.indexOf("E")!==-1)return Wb(t,a);if(t.charCodeAt(0)===36)return"$"+qt(e,t.substr(t.charAt(1)==" "?2:1),a);var n,i,c,s,o=Math.abs(a),l=a<0?"-":"";if(t.match(/^00+$/))return l+Ia(o,t.length);if(t.match(/^[#?]+$/))return n=Ia(a,0),n==="0"&&(n=""),n.length>t.length?n:vt(t.substr(0,t.length-n.length))+n;if(i=t.match(Gb))return Wt1(i,o,l);if(t.match(/^#+0+$/))return l+Ia(o,t.length-t.indexOf("0"));if(i=t.match(Yb))return n=Pm(a,i[1].length).replace(/^([^\.]+)$/,"$1."+vt(i[1])).replace(/\.$/,"."+vt(i[1])).replace(/\.(\d*)$/,function(p,v){return"."+v+me("0",vt(i[1]).length-v.length)}),t.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return l+Pm(o,i[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return l+s0(Ia(o,0));if(i=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+qt(e,t,-a):s0(""+(Math.floor(a)+Yt1(a,i[1].length)))+"."+y3(Dm(a,i[1].length),i[1].length);if(i=t.match(/^#,#*,#0/))return qt(e,t.replace(/^#,#*,/,""),a);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=r6(qt(e,t.replace(/[\\-]/g,""),a)),c=0,r6(r6(t.replace(/\\/g,"")).replace(/[0#]/g,function(p){return c<n.length?n.charAt(c++):p==="0"?"0":""}));if(t.match(Kb))return n=qt(e,"##########",a),"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6);var f="";if(i=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return c=Math.min(i[4].length,7),s=t8(o,Math.pow(10,c)-1,!1),n=""+l,f=k4("n",i[1],s[1]),f.charAt(f.length-1)==" "&&(f=f.substr(0,f.length-1)+"0"),n+=f+i[2]+"/"+i[3],f=Ji(s[2],c),f.length<i[4].length&&(f=vt(i[4].substr(i[4].length-f.length))+f),n+=f,n;if(i=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return c=Math.min(Math.max(i[1].length,i[4].length),7),s=t8(o,Math.pow(10,c)-1,!0),l+(s[0]||(s[1]?"":"0"))+" "+(s[1]?c9(s[1],c)+i[2]+"/"+i[3]+Ji(s[2],c):me(" ",2*c+1+i[2].length+i[3].length));if(i=t.match(/^[#0?]+$/))return n=Ia(a,0),t.length<=n.length?n:vt(t.substr(0,t.length-n.length))+n;if(i=t.match(/^([#0?]+)\.([#0]+)$/)){n=""+a.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),c=n.indexOf(".");var d=t.indexOf(".")-c,h=t.length-n.length-d;return vt(t.substr(0,d)+n+t.substr(t.length-h))}if(i=t.match(/^00,000\.([#0]*0)$/))return c=Dm(a,i[1].length),a<0?"-"+qt(e,t,-a):s0(Xt1(a)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?y3(0,3-p.length):"")+p})+"."+y3(c,i[1].length);switch(t){case"###,##0.00":return qt(e,"#,##0.00",a);case"###,###":case"##,###":case"#,###":var m=s0(Ia(o,0));return m!=="0"?l+m:"";case"###,###.00":return qt(e,"###,##0.00",a).replace(/^0\./,".");case"#,###.00":return qt(e,"#,##0.00",a).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function Kt1(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return k4(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function Zt1(e,t,a){var r=t.replace(jb,""),n=t.length-r.length;return k4(e,r,a*Math.pow(10,2*n))+me("%",n)}function Zb(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+Zb(e,-t);var n=e.indexOf(".");n===-1&&(n=e.indexOf("E"));var i=Math.floor(Math.log(t)*Math.LOG10E)%n;if(i<0&&(i+=n),a=(t/Math.pow(10,i)).toPrecision(r+1+(n+i)%n),!a.match(/[Ee]/)){var c=Math.floor(Math.log(t)*Math.LOG10E);a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(c-a.length+i):a+="E+"+(c-i),a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,o,l,f){return o+l+f.substr(0,(n+i)%n)+"."+f.substr(i)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}function R3(e,t,a){if(e.charCodeAt(0)===40&&!t.match(Xb)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?R3("n",r,a):"("+R3("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return Kt1(e,t,a);if(t.indexOf("%")!==-1)return Zt1(e,t,a);if(t.indexOf("E")!==-1)return Zb(t,a);if(t.charCodeAt(0)===36)return"$"+R3(e,t.substr(t.charAt(1)==" "?2:1),a);var n,i,c,s,o=Math.abs(a),l=a<0?"-":"";if(t.match(/^00+$/))return l+y3(o,t.length);if(t.match(/^[#?]+$/))return n=""+a,a===0&&(n=""),n.length>t.length?n:vt(t.substr(0,t.length-n.length))+n;if(i=t.match(Gb))return Gt1(i,o,l);if(t.match(/^#+0+$/))return l+y3(o,t.length-t.indexOf("0"));if(i=t.match(Yb))return n=(""+a).replace(/^([^\.]+)$/,"$1."+vt(i[1])).replace(/\.$/,"."+vt(i[1])),n=n.replace(/\.(\d*)$/,function(p,v){return"."+v+me("0",vt(i[1]).length-v.length)}),t.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return l+(""+o).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return l+s0(""+o);if(i=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+R3(e,t,-a):s0(""+a)+"."+me("0",i[1].length);if(i=t.match(/^#,#*,#0/))return R3(e,t.replace(/^#,#*,/,""),a);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=r6(R3(e,t.replace(/[\\-]/g,""),a)),c=0,r6(r6(t.replace(/\\/g,"")).replace(/[0#]/g,function(p){return c<n.length?n.charAt(c++):p==="0"?"0":""}));if(t.match(Kb))return n=R3(e,"##########",a),"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6);var f="";if(i=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return c=Math.min(i[4].length,7),s=t8(o,Math.pow(10,c)-1,!1),n=""+l,f=k4("n",i[1],s[1]),f.charAt(f.length-1)==" "&&(f=f.substr(0,f.length-1)+"0"),n+=f+i[2]+"/"+i[3],f=Ji(s[2],c),f.length<i[4].length&&(f=vt(i[4].substr(i[4].length-f.length))+f),n+=f,n;if(i=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return c=Math.min(Math.max(i[1].length,i[4].length),7),s=t8(o,Math.pow(10,c)-1,!0),l+(s[0]||(s[1]?"":"0"))+" "+(s[1]?c9(s[1],c)+i[2]+"/"+i[3]+Ji(s[2],c):me(" ",2*c+1+i[2].length+i[3].length));if(i=t.match(/^[#0?]+$/))return n=""+a,t.length<=n.length?n:vt(t.substr(0,t.length-n.length))+n;if(i=t.match(/^([#0]+)\.([#0]+)$/)){n=""+a.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),c=n.indexOf(".");var d=t.indexOf(".")-c,h=t.length-n.length-d;return vt(t.substr(0,d)+n+t.substr(t.length-h))}if(i=t.match(/^00,000\.([#0]*0)$/))return a<0?"-"+R3(e,t,-a):s0(""+a).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?y3(0,3-p.length):"")+p})+"."+y3(0,i[1].length);switch(t){case"###,###":case"##,###":case"#,###":var m=s0(""+o);return m!=="0"?l+m:"";default:if(t.match(/\.[0#?]*$/))return R3(e,t.slice(0,t.lastIndexOf(".")),a)+vt(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function k4(e,t,a){return(a|0)===a?R3(e,t,a):qt(e,t,a)}function Qt1(e){for(var t=[],a=!1,r=0,n=0;r<e.length;++r)switch(e.charCodeAt(r)){case 34:a=!a;break;case 95:case 42:case 92:++r;break;case 59:t[t.length]=e.substr(n,r-n),n=r+1}if(t[t.length]=e.substr(n),a===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var Qb=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function k6(e){for(var t=0,a="",r="";t<e.length;)switch(a=e.charAt(t)){case"G":e8(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="上午/下午")return!0;++t;break;case"[":for(r=a;e.charAt(t++)!=="]"&&t<e.length;)r+=e.charAt(t);if(r.match(Qb))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(a=e.charAt(++t))>-1||a=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===a;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function Jt1(e,t,a,r){for(var n=[],i="",c=0,s="",o="t",l,f,d,h="H";c<e.length;)switch(s=e.charAt(c)){case"G":if(!e8(e,c))throw new Error("unrecognized character "+s+" in "+e);n[n.length]={t:"G",v:"General"},c+=7;break;case'"':for(i="";(d=e.charCodeAt(++c))!==34&&c<e.length;)i+=String.fromCharCode(d);n[n.length]={t:"t",v:i},++c;break;case"\\":var m=e.charAt(++c),p=m==="("||m===")"?m:"t";n[n.length]={t:p,v:m},++c;break;case"_":n[n.length]={t:"t",v:" "},c+=2;break;case"@":n[n.length]={t:"T",v:t},++c;break;case"B":case"b":if(e.charAt(c+1)==="1"||e.charAt(c+1)==="2"){if(l==null&&(l=Q0(t,a,e.charAt(c+1)==="2"),l==null))return"";n[n.length]={t:"X",v:e.substr(c,2)},o=s,c+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":s=s.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||l==null&&(l=Q0(t,a),l==null))return"";for(i=s;++c<e.length&&e.charAt(c).toLowerCase()===s;)i+=s;s==="m"&&o.toLowerCase()==="h"&&(s="M"),s==="h"&&(s=h),n[n.length]={t:s,v:i},o=s;break;case"A":case"a":case"上":var v={t:s,v:s};if(l==null&&(l=Q0(t,a)),e.substr(c,3).toUpperCase()==="A/P"?(l!=null&&(v.v=l.H>=12?"P":"A"),v.t="T",h="h",c+=3):e.substr(c,5).toUpperCase()==="AM/PM"?(l!=null&&(v.v=l.H>=12?"PM":"AM"),v.t="T",c+=5,h="h"):e.substr(c,5).toUpperCase()==="上午/下午"?(l!=null&&(v.v=l.H>=12?"下午":"上午"),v.t="T",c+=5,h="h"):(v.t="t",++c),l==null&&v.t==="T")return"";n[n.length]=v,o=s;break;case"[":for(i=s;e.charAt(c++)!=="]"&&c<e.length;)i+=e.charAt(c);if(i.slice(-1)!=="]")throw'unterminated "[" block: |'+i+"|";if(i.match(Qb)){if(l==null&&(l=Q0(t,a),l==null))return"";n[n.length]={t:"Z",v:i.toLowerCase()},o=i.charAt(1)}else i.indexOf("$")>-1&&(i=(i.match(/\$([^-\[\]]*)/)||[])[1]||"$",k6(e)||(n[n.length]={t:"t",v:i}));break;case".":if(l!=null){for(i=s;++c<e.length&&(s=e.charAt(c))==="0";)i+=s;n[n.length]={t:"s",v:i};break}case"0":case"#":for(i=s;++c<e.length&&"0#?.,E+-%".indexOf(s=e.charAt(c))>-1;)i+=s;n[n.length]={t:"n",v:i};break;case"?":for(i=s;e.charAt(++c)===s;)i+=s;n[n.length]={t:s,v:i},o=s;break;case"*":++c,(e.charAt(c)==" "||e.charAt(c)=="*")&&++c;break;case"(":case")":n[n.length]={t:r===1?"t":s,v:s},++c;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(i=s;c<e.length&&"0123456789".indexOf(e.charAt(++c))>-1;)i+=e.charAt(c);n[n.length]={t:"D",v:i};break;case" ":n[n.length]={t:s,v:s},++c;break;case"$":n[n.length]={t:"t",v:"$"},++c;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(s)===-1)throw new Error("unrecognized character "+s+" in "+e);n[n.length]={t:"t",v:s},++c;break}var g=0,y=0,x;for(c=n.length-1,o="t";c>=0;--c)switch(n[c].t){case"h":case"H":n[c].t=h,o="h",g<1&&(g=1);break;case"s":(x=n[c].v.match(/\.0+$/))&&(y=Math.max(y,x[0].length-1)),g<3&&(g=3);case"d":case"y":case"M":case"e":o=n[c].t;break;case"m":o==="s"&&(n[c].t="M",g<2&&(g=2));break;case"X":break;case"Z":g<1&&n[c].v.match(/[Hh]/)&&(g=1),g<2&&n[c].v.match(/[Mm]/)&&(g=2),g<3&&n[c].v.match(/[Ss]/)&&(g=3)}switch(g){case 0:break;case 1:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M),l.M>=60&&(l.M=0,++l.H);break;case 2:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M);break}var C="",b;for(c=0;c<n.length;++c)switch(n[c].t){case"t":case"T":case" ":case"D":break;case"X":n[c].v="",n[c].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":n[c].v=Ut1(n[c].t.charCodeAt(0),n[c].v,l,y),n[c].t="t";break;case"n":case"?":for(b=c+1;n[b]!=null&&((s=n[b].t)==="?"||s==="D"||(s===" "||s==="t")&&n[b+1]!=null&&(n[b+1].t==="?"||n[b+1].t==="t"&&n[b+1].v==="/")||n[c].t==="("&&(s===" "||s==="n"||s===")")||s==="t"&&(n[b].v==="/"||n[b].v===" "&&n[b+1]!=null&&n[b+1].t=="?"));)n[c].v+=n[b].v,n[b]={v:"",t:";"},++b;C+=n[c].v,c=b-1;break;case"G":n[c].t="t",n[c].v=pa(t,a);break}var M="",w,z;if(C.length>0){C.charCodeAt(0)==40?(w=t<0&&C.charCodeAt(0)===45?-t:t,z=k4("n",C,w)):(w=t<0&&r>1?-t:t,z=k4("n",C,w),w<0&&n[0]&&n[0].t=="t"&&(z=z.substr(1),n[0].v="-"+n[0].v)),b=z.length-1;var _=n.length;for(c=0;c<n.length;++c)if(n[c]!=null&&n[c].t!="t"&&n[c].v.indexOf(".")>-1){_=c;break}var S=n.length;if(_===n.length&&z.indexOf("E")===-1){for(c=n.length-1;c>=0;--c)n[c]==null||"n?".indexOf(n[c].t)===-1||(b>=n[c].v.length-1?(b-=n[c].v.length,n[c].v=z.substr(b+1,n[c].v.length)):b<0?n[c].v="":(n[c].v=z.substr(0,b+1),b=-1),n[c].t="t",S=c);b>=0&&S<n.length&&(n[S].v=z.substr(0,b+1)+n[S].v)}else if(_!==n.length&&z.indexOf("E")===-1){for(b=z.indexOf(".")-1,c=_;c>=0;--c)if(!(n[c]==null||"n?".indexOf(n[c].t)===-1)){for(f=n[c].v.indexOf(".")>-1&&c===_?n[c].v.indexOf(".")-1:n[c].v.length-1,M=n[c].v.substr(f+1);f>=0;--f)b>=0&&(n[c].v.charAt(f)==="0"||n[c].v.charAt(f)==="#")&&(M=z.charAt(b--)+M);n[c].v=M,n[c].t="t",S=c}for(b>=0&&S<n.length&&(n[S].v=z.substr(0,b+1)+n[S].v),b=z.indexOf(".")+1,c=_;c<n.length;++c)if(!(n[c]==null||"n?(".indexOf(n[c].t)===-1&&c!==_)){for(f=n[c].v.indexOf(".")>-1&&c===_?n[c].v.indexOf(".")+1:0,M=n[c].v.substr(0,f);f<n[c].v.length;++f)b<z.length&&(M+=z.charAt(b++));n[c].v=M,n[c].t="t",S=c}}}for(c=0;c<n.length;++c)n[c]!=null&&"n?".indexOf(n[c].t)>-1&&(w=r>1&&t<0&&c>0&&n[c-1].v==="-"?-t:t,n[c].v=k4(n[c].t,n[c].v,w),n[c].t="t");var k="";for(c=0;c!==n.length;++c)n[c]!=null&&(k+=n[c].v);return k}var Rm=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function Fm(e,t){if(t==null)return!1;var a=parseFloat(t[2]);switch(t[1]){case"=":if(e==a)return!0;break;case">":if(e>a)return!0;break;case"<":if(e<a)return!0;break;case"<>":if(e!=a)return!0;break;case">=":if(e>=a)return!0;break;case"<=":if(e<=a)return!0;break}return!1}function e31(e,t){var a=Qt1(e),r=a.length,n=a[r-1].indexOf("@");if(r<4&&n>-1&&--r,a.length>4)throw new Error("cannot find right format for |"+a.join("|")+"|");if(typeof t!="number")return[4,a.length===4||n>-1?a[a.length-1]:"@"];switch(a.length){case 1:a=n>-1?["General","General","General",a[0]]:[a[0],a[0],a[0],"@"];break;case 2:a=n>-1?[a[0],a[0],a[0],a[1]]:[a[0],a[1],a[0],"@"];break;case 3:a=n>-1?[a[0],a[1],a[0],a[2]]:[a[0],a[1],a[2],"@"];break}var i=t>0?a[0]:t<0?a[1]:a[2];if(a[0].indexOf("[")===-1&&a[1].indexOf("[")===-1)return[r,i];if(a[0].match(/\[[=<>]/)!=null||a[1].match(/\[[=<>]/)!=null){var c=a[0].match(Rm),s=a[1].match(Rm);return Fm(t,c)?[r,a[0]]:Fm(t,s)?[r,a[1]]:[r,a[c!=null&&s!=null?2:1]]}return[r,i]}function Xt(e,t,a){a==null&&(a={});var r="";switch(typeof e){case"string":e=="m/d/yy"&&a.dateNF?r=a.dateNF:r=e;break;case"number":e==14&&a.dateNF?r=a.dateNF:r=(a.table!=null?a.table:s2)[e],r==null&&(r=a.table&&a.table[Om[e]]||s2[Om[e]]),r==null&&(r=Pt1[e]||"General");break}if(e8(r,0))return pa(t,a);t instanceof Date&&(t=qb(t,a.date1904));var n=e31(r,t);if(e8(n[1]))return pa(t,a);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return Jt1(n[1],t,a,n[0])}function ca(e,t){if(typeof t!="number"){t=+t||-1;for(var a=0;a<392;++a){if(s2[a]==null){t<0&&(t=a);continue}if(s2[a]==e){t=a;break}}t<0&&(t=391)}return s2[t]=e,t}function Jb(){s2=Ot1()}var t31={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},eC=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function a31(e){var t=typeof e=="number"?s2[e]:e;return t=t.replace(eC,"(\\d+)"),new RegExp("^"+t+"$")}function r31(e,t,a){var r=-1,n=-1,i=-1,c=-1,s=-1,o=-1;(t.match(eC)||[]).forEach(function(d,h){var m=parseInt(a[h+1],10);switch(d.toLowerCase().charAt(0)){case"y":r=m;break;case"d":i=m;break;case"h":c=m;break;case"s":o=m;break;case"m":c>=0?s=m:n=m;break}}),o>=0&&s==-1&&n>=0&&(s=n,n=-1);var l=(""+(r>=0?r:new Date().getFullYear())).slice(-4)+"-"+("00"+(n>=1?n:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);l.length==7&&(l="0"+l),l.length==8&&(l="20"+l);var f=("00"+(c>=0?c:0)).slice(-2)+":"+("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(o>=0?o:0)).slice(-2);return c==-1&&s==-1&&o==-1?l:r==-1&&n==-1&&i==-1?f:l+"T"+f}var n31=function(){var e={};e.version="1.2.0";function t(){for(var z=0,_=new Array(256),S=0;S!=256;++S)z=S,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,_[S]=z;return typeof Int32Array<"u"?new Int32Array(_):_}var a=t();function r(z){var _=0,S=0,k=0,H=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(k=0;k!=256;++k)H[k]=z[k];for(k=0;k!=256;++k)for(S=z[k],_=256+k;_<4096;_+=256)S=H[_]=S>>>8^z[S&255];var L=[];for(k=1;k!=16;++k)L[k-1]=typeof Int32Array<"u"?H.subarray(k*256,k*256+256):H.slice(k*256,k*256+256);return L}var n=r(a),i=n[0],c=n[1],s=n[2],o=n[3],l=n[4],f=n[5],d=n[6],h=n[7],m=n[8],p=n[9],v=n[10],g=n[11],y=n[12],x=n[13],C=n[14];function b(z,_){for(var S=_^-1,k=0,H=z.length;k<H;)S=S>>>8^a[(S^z.charCodeAt(k++))&255];return~S}function M(z,_){for(var S=_^-1,k=z.length-15,H=0;H<k;)S=C[z[H++]^S&255]^x[z[H++]^S>>8&255]^y[z[H++]^S>>16&255]^g[z[H++]^S>>>24]^v[z[H++]]^p[z[H++]]^m[z[H++]]^h[z[H++]]^d[z[H++]]^f[z[H++]]^l[z[H++]]^o[z[H++]]^s[z[H++]]^c[z[H++]]^i[z[H++]]^a[z[H++]];for(k+=15;H<k;)S=S>>>8^a[(S^z[H++])&255];return~S}function w(z,_){for(var S=_^-1,k=0,H=z.length,L=0,A=0;k<H;)L=z.charCodeAt(k++),L<128?S=S>>>8^a[(S^L)&255]:L<2048?(S=S>>>8^a[(S^(192|L>>6&31))&255],S=S>>>8^a[(S^(128|L&63))&255]):L>=55296&&L<57344?(L=(L&1023)+64,A=z.charCodeAt(k++)&1023,S=S>>>8^a[(S^(240|L>>8&7))&255],S=S>>>8^a[(S^(128|L>>2&63))&255],S=S>>>8^a[(S^(128|A>>6&15|(L&3)<<4))&255],S=S>>>8^a[(S^(128|A&63))&255]):(S=S>>>8^a[(S^(224|L>>12&15))&255],S=S>>>8^a[(S^(128|L>>6&63))&255],S=S>>>8^a[(S^(128|L&63))&255]);return~S}return e.table=a,e.bstr=b,e.buf=M,e.str=w,e}(),z2=function(){var t={};t.version="1.2.1";function a(K,c1){for(var e1=K.split("/"),a1=c1.split("/"),n1=0,i1=0,x1=Math.min(e1.length,a1.length);n1<x1;++n1){if(i1=e1[n1].length-a1[n1].length)return i1;if(e1[n1]!=a1[n1])return e1[n1]<a1[n1]?-1:1}return e1.length-a1.length}function r(K){if(K.charAt(K.length-1)=="/")return K.slice(0,-1).indexOf("/")===-1?K:r(K.slice(0,-1));var c1=K.lastIndexOf("/");return c1===-1?K:K.slice(0,c1+1)}function n(K){if(K.charAt(K.length-1)=="/")return n(K.slice(0,-1));var c1=K.lastIndexOf("/");return c1===-1?K:K.slice(c1+1)}function i(K,c1){typeof c1=="string"&&(c1=new Date(c1));var e1=c1.getHours();e1=e1<<6|c1.getMinutes(),e1=e1<<5|c1.getSeconds()>>>1,K.write_shift(2,e1);var a1=c1.getFullYear()-1980;a1=a1<<4|c1.getMonth()+1,a1=a1<<5|c1.getDate(),K.write_shift(2,a1)}function c(K){var c1=K.read_shift(2)&65535,e1=K.read_shift(2)&65535,a1=new Date,n1=e1&31;e1>>>=5;var i1=e1&15;e1>>>=4,a1.setMilliseconds(0),a1.setFullYear(e1+1980),a1.setMonth(i1-1),a1.setDate(n1);var x1=c1&31;c1>>>=5;var k1=c1&63;return c1>>>=6,a1.setHours(c1),a1.setMinutes(k1),a1.setSeconds(x1<<1),a1}function s(K){Ye(K,0);for(var c1={},e1=0;K.l<=K.length-4;){var a1=K.read_shift(2),n1=K.read_shift(2),i1=K.l+n1,x1={};switch(a1){case 21589:e1=K.read_shift(1),e1&1&&(x1.mtime=K.read_shift(4)),n1>5&&(e1&2&&(x1.atime=K.read_shift(4)),e1&4&&(x1.ctime=K.read_shift(4))),x1.mtime&&(x1.mt=new Date(x1.mtime*1e3));break}K.l=i1,c1[a1]=x1}return c1}var o;function l(){return o||(o={})}function f(K,c1){if(K[0]==80&&K[1]==75)return n2(K,c1);if((K[0]|32)==109&&(K[1]|32)==105)return a3(K,c1);if(K.length<512)throw new Error("CFB file size "+K.length+" < 512");var e1=3,a1=512,n1=0,i1=0,x1=0,k1=0,F=0,G=[],U=K.slice(0,512);Ye(U,0);var Z=d(U);switch(e1=Z[0],e1){case 3:a1=512;break;case 4:a1=4096;break;case 0:if(Z[1]==0)return n2(K,c1);default:throw new Error("Major Version: Expected 3 or 4 saw "+e1)}a1!==512&&(U=K.slice(0,a1),Ye(U,28));var J=K.slice(0,a1);h(U,e1);var l1=U.read_shift(4,"i");if(e1===3&&l1!==0)throw new Error("# Directory Sectors: Expected 0 saw "+l1);U.l+=4,x1=U.read_shift(4,"i"),U.l+=4,U.chk("00100000","Mini Stream Cutoff Size: "),k1=U.read_shift(4,"i"),n1=U.read_shift(4,"i"),F=U.read_shift(4,"i"),i1=U.read_shift(4,"i");for(var s1=-1,M1=0;M1<109&&(s1=U.read_shift(4,"i"),!(s1<0));++M1)G[M1]=s1;var E1=m(K,a1);g(F,i1,E1,a1,G);var O1=x(E1,x1,G,a1);O1[x1].name="!Directory",n1>0&&k1!==A&&(O1[k1].name="!MiniFAT"),O1[G[0]].name="!FAT",O1.fat_addrs=G,O1.ssz=a1;var A1={},$1=[],q1=[],c2=[];C(x1,O1,E1,$1,n1,A1,q1,k1),p(q1,c2,$1),$1.shift();var W1={FileIndex:q1,FullPaths:c2};return c1&&c1.raw&&(W1.raw={header:J,sectors:E1}),W1}function d(K){if(K[K.l]==80&&K[K.l+1]==75)return[0,0];K.chk(N,"Header Signature: "),K.l+=16;var c1=K.read_shift(2,"u");return[K.read_shift(2,"u"),c1]}function h(K,c1){var e1=9;switch(K.l+=2,e1=K.read_shift(2)){case 9:if(c1!=3)throw new Error("Sector Shift: Expected 9 saw "+e1);break;case 12:if(c1!=4)throw new Error("Sector Shift: Expected 12 saw "+e1);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+e1)}K.chk("0600","Mini Sector Shift: "),K.chk("000000000000","Reserved: ")}function m(K,c1){for(var e1=Math.ceil(K.length/c1)-1,a1=[],n1=1;n1<e1;++n1)a1[n1-1]=K.slice(n1*c1,(n1+1)*c1);return a1[e1-1]=K.slice(e1*c1),a1}function p(K,c1,e1){for(var a1=0,n1=0,i1=0,x1=0,k1=0,F=e1.length,G=[],U=[];a1<F;++a1)G[a1]=U[a1]=a1,c1[a1]=e1[a1];for(;k1<U.length;++k1)a1=U[k1],n1=K[a1].L,i1=K[a1].R,x1=K[a1].C,G[a1]===a1&&(n1!==-1&&G[n1]!==n1&&(G[a1]=G[n1]),i1!==-1&&G[i1]!==i1&&(G[a1]=G[i1])),x1!==-1&&(G[x1]=a1),n1!==-1&&a1!=G[a1]&&(G[n1]=G[a1],U.lastIndexOf(n1)<k1&&U.push(n1)),i1!==-1&&a1!=G[a1]&&(G[i1]=G[a1],U.lastIndexOf(i1)<k1&&U.push(i1));for(a1=1;a1<F;++a1)G[a1]===a1&&(i1!==-1&&G[i1]!==i1?G[a1]=G[i1]:n1!==-1&&G[n1]!==n1&&(G[a1]=G[n1]));for(a1=1;a1<F;++a1)if(K[a1].type!==0){if(k1=a1,k1!=G[k1])do k1=G[k1],c1[a1]=c1[k1]+"/"+c1[a1];while(k1!==0&&G[k1]!==-1&&k1!=G[k1]);G[a1]=-1}for(c1[0]+="/",a1=1;a1<F;++a1)K[a1].type!==2&&(c1[a1]+="/")}function v(K,c1,e1){for(var a1=K.start,n1=K.size,i1=[],x1=a1;e1&&n1>0&&x1>=0;)i1.push(c1.slice(x1*L,x1*L+L)),n1-=L,x1=W0(e1,x1*4);return i1.length===0?Ee(0):Q4(i1).slice(0,K.size)}function g(K,c1,e1,a1,n1){var i1=A;if(K===A){if(c1!==0)throw new Error("DIFAT chain shorter than expected")}else if(K!==-1){var x1=e1[K],k1=(a1>>>2)-1;if(!x1)return;for(var F=0;F<k1&&(i1=W0(x1,F*4))!==A;++F)n1.push(i1);g(W0(x1,a1-4),c1-1,e1,a1,n1)}}function y(K,c1,e1,a1,n1){var i1=[],x1=[];n1||(n1=[]);var k1=a1-1,F=0,G=0;for(F=c1;F>=0;){n1[F]=!0,i1[i1.length]=F,x1.push(K[F]);var U=e1[Math.floor(F*4/a1)];if(G=F*4&k1,a1<4+G)throw new Error("FAT boundary crossed: "+F+" 4 "+a1);if(!K[U])break;F=W0(K[U],G)}return{nodes:i1,data:Xm([x1])}}function x(K,c1,e1,a1){var n1=K.length,i1=[],x1=[],k1=[],F=[],G=a1-1,U=0,Z=0,J=0,l1=0;for(U=0;U<n1;++U)if(k1=[],J=U+c1,J>=n1&&(J-=n1),!x1[J]){F=[];var s1=[];for(Z=J;Z>=0;){s1[Z]=!0,x1[Z]=!0,k1[k1.length]=Z,F.push(K[Z]);var M1=e1[Math.floor(Z*4/a1)];if(l1=Z*4&G,a1<4+l1)throw new Error("FAT boundary crossed: "+Z+" 4 "+a1);if(!K[M1]||(Z=W0(K[M1],l1),s1[Z]))break}i1[J]={nodes:k1,data:Xm([F])}}return i1}function C(K,c1,e1,a1,n1,i1,x1,k1){for(var F=0,G=a1.length?2:0,U=c1[K].data,Z=0,J=0,l1;Z<U.length;Z+=128){var s1=U.slice(Z,Z+128);Ye(s1,64),J=s1.read_shift(2),l1=u9(s1,0,J-G),a1.push(l1);var M1={name:l1,type:s1.read_shift(1),color:s1.read_shift(1),L:s1.read_shift(4,"i"),R:s1.read_shift(4,"i"),C:s1.read_shift(4,"i"),clsid:s1.read_shift(16),state:s1.read_shift(4,"i"),start:0,size:0},E1=s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2);E1!==0&&(M1.ct=b(s1,s1.l-8));var O1=s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2);O1!==0&&(M1.mt=b(s1,s1.l-8)),M1.start=s1.read_shift(4,"i"),M1.size=s1.read_shift(4,"i"),M1.size<0&&M1.start<0&&(M1.size=M1.type=0,M1.start=A,M1.name=""),M1.type===5?(F=M1.start,n1>0&&F!==A&&(c1[F].name="!StreamData")):M1.size>=4096?(M1.storage="fat",c1[M1.start]===void 0&&(c1[M1.start]=y(e1,M1.start,c1.fat_addrs,c1.ssz)),c1[M1.start].name=M1.name,M1.content=c1[M1.start].data.slice(0,M1.size)):(M1.storage="minifat",M1.size<0?M1.size=0:F!==A&&M1.start!==A&&c1[F]&&(M1.content=v(M1,c1[F].data,(c1[k1]||{}).data))),M1.content&&Ye(M1.content,0),i1[l1]=M1,x1.push(M1)}}function b(K,c1){return new Date((Vt(K,c1+4)/1e7*Math.pow(2,32)+Vt(K,c1)/1e7-11644473600)*1e3)}function M(K,c1){return l(),f(o.readFileSync(K),c1)}function w(K,c1){var e1=c1&&c1.type;switch(e1||C2&&Buffer.isBuffer(K)&&(e1="buffer"),e1||"base64"){case"file":return M(K,c1);case"base64":return f(h3(Dt(K)),c1);case"binary":return f(h3(K),c1)}return f(K,c1)}function z(K,c1){var e1=c1||{},a1=e1.root||"Root Entry";if(K.FullPaths||(K.FullPaths=[]),K.FileIndex||(K.FileIndex=[]),K.FullPaths.length!==K.FileIndex.length)throw new Error("inconsistent CFB structure");K.FullPaths.length===0&&(K.FullPaths[0]=a1+"/",K.FileIndex[0]={name:a1,type:5}),e1.CLSID&&(K.FileIndex[0].clsid=e1.CLSID),_(K)}function _(K){var c1="Sh33tJ5";if(!z2.find(K,"/"+c1)){var e1=Ee(4);e1[0]=55,e1[1]=e1[3]=50,e1[2]=54,K.FileIndex.push({name:c1,type:2,content:e1,size:4,L:69,R:69,C:69}),K.FullPaths.push(K.FullPaths[0]+c1),S(K)}}function S(K,c1){z(K);for(var e1=!1,a1=!1,n1=K.FullPaths.length-1;n1>=0;--n1){var i1=K.FileIndex[n1];switch(i1.type){case 0:a1?e1=!0:(K.FileIndex.pop(),K.FullPaths.pop());break;case 1:case 2:case 5:a1=!0,isNaN(i1.R*i1.L*i1.C)&&(e1=!0),i1.R>-1&&i1.L>-1&&i1.R==i1.L&&(e1=!0);break;default:e1=!0;break}}if(!(!e1&&!c1)){var x1=new Date(1987,1,19),k1=0,F=Object.create?Object.create(null):{},G=[];for(n1=0;n1<K.FullPaths.length;++n1)F[K.FullPaths[n1]]=!0,K.FileIndex[n1].type!==0&&G.push([K.FullPaths[n1],K.FileIndex[n1]]);for(n1=0;n1<G.length;++n1){var U=r(G[n1][0]);a1=F[U],a1||(G.push([U,{name:n(U).replace("/",""),type:1,clsid:R,ct:x1,mt:x1,content:null}]),F[U]=!0)}for(G.sort(function(l1,s1){return a(l1[0],s1[0])}),K.FullPaths=[],K.FileIndex=[],n1=0;n1<G.length;++n1)K.FullPaths[n1]=G[n1][0],K.FileIndex[n1]=G[n1][1];for(n1=0;n1<G.length;++n1){var Z=K.FileIndex[n1],J=K.FullPaths[n1];if(Z.name=n(J).replace("/",""),Z.L=Z.R=Z.C=-(Z.color=1),Z.size=Z.content?Z.content.length:0,Z.start=0,Z.clsid=Z.clsid||R,n1===0)Z.C=G.length>1?1:-1,Z.size=0,Z.type=5;else if(J.slice(-1)=="/"){for(k1=n1+1;k1<G.length&&r(K.FullPaths[k1])!=J;++k1);for(Z.C=k1>=G.length?-1:k1,k1=n1+1;k1<G.length&&r(K.FullPaths[k1])!=r(J);++k1);Z.R=k1>=G.length?-1:k1,Z.type=1}else r(K.FullPaths[n1+1]||"")==r(J)&&(Z.R=n1+1),Z.type=2}}}function k(K,c1){var e1=c1||{};if(e1.fileType=="mad")return xe(K,e1);switch(S(K),e1.fileType){case"zip":return ne(K,e1)}var a1=function(l1){for(var s1=0,M1=0,E1=0;E1<l1.FileIndex.length;++E1){var O1=l1.FileIndex[E1];if(O1.content){var A1=O1.content.length;A1>0&&(A1<4096?s1+=A1+63>>6:M1+=A1+511>>9)}}for(var $1=l1.FullPaths.length+3>>2,q1=s1+7>>3,c2=s1+127>>7,W1=q1+M1+$1+c2,u2=W1+127>>7,F2=u2<=109?0:Math.ceil((u2-109)/127);W1+u2+F2+127>>7>u2;)F2=++u2<=109?0:Math.ceil((u2-109)/127);var G2=[1,F2,u2,c2,$1,M1,s1,0];return l1.FileIndex[0].size=s1<<6,G2[7]=(l1.FileIndex[0].start=G2[0]+G2[1]+G2[2]+G2[3]+G2[4]+G2[5])+(G2[6]+7>>3),G2}(K),n1=Ee(a1[7]<<9),i1=0,x1=0;{for(i1=0;i1<8;++i1)n1.write_shift(1,E[i1]);for(i1=0;i1<8;++i1)n1.write_shift(2,0);for(n1.write_shift(2,62),n1.write_shift(2,3),n1.write_shift(2,65534),n1.write_shift(2,9),n1.write_shift(2,6),i1=0;i1<3;++i1)n1.write_shift(2,0);for(n1.write_shift(4,0),n1.write_shift(4,a1[2]),n1.write_shift(4,a1[0]+a1[1]+a1[2]+a1[3]-1),n1.write_shift(4,0),n1.write_shift(4,4096),n1.write_shift(4,a1[3]?a1[0]+a1[1]+a1[2]-1:A),n1.write_shift(4,a1[3]),n1.write_shift(-4,a1[1]?a1[0]-1:A),n1.write_shift(4,a1[1]),i1=0;i1<109;++i1)n1.write_shift(-4,i1<a1[2]?a1[1]+i1:-1)}if(a1[1])for(x1=0;x1<a1[1];++x1){for(;i1<236+x1*127;++i1)n1.write_shift(-4,i1<a1[2]?a1[1]+i1:-1);n1.write_shift(-4,x1===a1[1]-1?A:x1+1)}var k1=function(l1){for(x1+=l1;i1<x1-1;++i1)n1.write_shift(-4,i1+1);l1&&(++i1,n1.write_shift(-4,A))};for(x1=i1=0,x1+=a1[1];i1<x1;++i1)n1.write_shift(-4,P.DIFSECT);for(x1+=a1[2];i1<x1;++i1)n1.write_shift(-4,P.FATSECT);k1(a1[3]),k1(a1[4]);for(var F=0,G=0,U=K.FileIndex[0];F<K.FileIndex.length;++F)U=K.FileIndex[F],U.content&&(G=U.content.length,!(G<4096)&&(U.start=x1,k1(G+511>>9)));for(k1(a1[6]+7>>3);n1.l&511;)n1.write_shift(-4,P.ENDOFCHAIN);for(x1=i1=0,F=0;F<K.FileIndex.length;++F)U=K.FileIndex[F],U.content&&(G=U.content.length,!(!G||G>=4096)&&(U.start=x1,k1(G+63>>6)));for(;n1.l&511;)n1.write_shift(-4,P.ENDOFCHAIN);for(i1=0;i1<a1[4]<<2;++i1){var Z=K.FullPaths[i1];if(!Z||Z.length===0){for(F=0;F<17;++F)n1.write_shift(4,0);for(F=0;F<3;++F)n1.write_shift(4,-1);for(F=0;F<12;++F)n1.write_shift(4,0);continue}U=K.FileIndex[i1],i1===0&&(U.start=U.size?U.start-1:A);var J=i1===0&&e1.root||U.name;if(G=2*(J.length+1),n1.write_shift(64,J,"utf16le"),n1.write_shift(2,G),n1.write_shift(1,U.type),n1.write_shift(1,U.color),n1.write_shift(-4,U.L),n1.write_shift(-4,U.R),n1.write_shift(-4,U.C),U.clsid)n1.write_shift(16,U.clsid,"hex");else for(F=0;F<4;++F)n1.write_shift(4,0);n1.write_shift(4,U.state||0),n1.write_shift(4,0),n1.write_shift(4,0),n1.write_shift(4,0),n1.write_shift(4,0),n1.write_shift(4,U.start),n1.write_shift(4,U.size),n1.write_shift(4,0)}for(i1=1;i1<K.FileIndex.length;++i1)if(U=K.FileIndex[i1],U.size>=4096)if(n1.l=U.start+1<<9,C2&&Buffer.isBuffer(U.content))U.content.copy(n1,n1.l,0,U.size),n1.l+=U.size+511&-512;else{for(F=0;F<U.size;++F)n1.write_shift(1,U.content[F]);for(;F&511;++F)n1.write_shift(1,0)}for(i1=1;i1<K.FileIndex.length;++i1)if(U=K.FileIndex[i1],U.size>0&&U.size<4096)if(C2&&Buffer.isBuffer(U.content))U.content.copy(n1,n1.l,0,U.size),n1.l+=U.size+63&-64;else{for(F=0;F<U.size;++F)n1.write_shift(1,U.content[F]);for(;F&63;++F)n1.write_shift(1,0)}if(C2)n1.l=n1.length;else for(;n1.l<n1.length;)n1.write_shift(1,0);return n1}function H(K,c1){var e1=K.FullPaths.map(function(F){return F.toUpperCase()}),a1=e1.map(function(F){var G=F.split("/");return G[G.length-(F.slice(-1)=="/"?2:1)]}),n1=!1;c1.charCodeAt(0)===47?(n1=!0,c1=e1[0].slice(0,-1)+c1):n1=c1.indexOf("/")!==-1;var i1=c1.toUpperCase(),x1=n1===!0?e1.indexOf(i1):a1.indexOf(i1);if(x1!==-1)return K.FileIndex[x1];var k1=!i1.match(or);for(i1=i1.replace(xt,""),k1&&(i1=i1.replace(or,"!")),x1=0;x1<e1.length;++x1)if((k1?e1[x1].replace(or,"!"):e1[x1]).replace(xt,"")==i1||(k1?a1[x1].replace(or,"!"):a1[x1]).replace(xt,"")==i1)return K.FileIndex[x1];return null}var L=64,A=-2,N="d0cf11e0a1b11ae1",E=[208,207,17,224,161,177,26,225],R="00000000000000000000000000000000",P={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:A,FREESECT:-1,HEADER_SIGNATURE:N,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:R,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function X(K,c1,e1){l();var a1=k(K,e1);o.writeFileSync(c1,a1)}function B(K){for(var c1=new Array(K.length),e1=0;e1<K.length;++e1)c1[e1]=String.fromCharCode(K[e1]);return c1.join("")}function Y(K,c1){var e1=k(K,c1);switch(c1&&c1.type||"buffer"){case"file":return l(),o.writeFileSync(c1.filename,e1),e1;case"binary":return typeof e1=="string"?e1:B(e1);case"base64":return Vm(typeof e1=="string"?e1:B(e1));case"buffer":if(C2)return Buffer.isBuffer(e1)?e1:Ha(e1);case"array":return typeof e1=="string"?h3(e1):e1}return e1}var D;function V(K){try{var c1=K.InflateRaw,e1=new c1;if(e1._processChunk(new Uint8Array([3,0]),e1._finishFlushFlag),e1.bytesRead)D=K;else throw new Error("zlib does not expose bytesRead")}catch(a1){console.error("cannot use native zlib: "+(a1.message||a1))}}function T(K,c1){if(!D)return P1(K,c1);var e1=D.InflateRaw,a1=new e1,n1=a1._processChunk(K.slice(K.l),a1._finishFlushFlag);return K.l+=a1.bytesRead,n1}function I(K){return D?D.deflateRawSync(K):F1(K)}var W=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],j=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function t1(K){var c1=(K<<1|K<<11)&139536|(K<<5|K<<15)&558144;return(c1>>16|c1>>8|c1)&255}for(var r1=typeof Uint8Array<"u",Q=r1?new Uint8Array(256):[],f1=0;f1<256;++f1)Q[f1]=t1(f1);function q(K,c1){var e1=Q[K&255];return c1<=8?e1>>>8-c1:(e1=e1<<8|Q[K>>8&255],c1<=16?e1>>>16-c1:(e1=e1<<8|Q[K>>16&255],e1>>>24-c1))}function g1(K,c1){var e1=c1&7,a1=c1>>>3;return(K[a1]|(e1<=6?0:K[a1+1]<<8))>>>e1&3}function _1(K,c1){var e1=c1&7,a1=c1>>>3;return(K[a1]|(e1<=5?0:K[a1+1]<<8))>>>e1&7}function m1(K,c1){var e1=c1&7,a1=c1>>>3;return(K[a1]|(e1<=4?0:K[a1+1]<<8))>>>e1&15}function o1(K,c1){var e1=c1&7,a1=c1>>>3;return(K[a1]|(e1<=3?0:K[a1+1]<<8))>>>e1&31}function u1(K,c1){var e1=c1&7,a1=c1>>>3;return(K[a1]|(e1<=1?0:K[a1+1]<<8))>>>e1&127}function d1(K,c1,e1){var a1=c1&7,n1=c1>>>3,i1=(1<<e1)-1,x1=K[n1]>>>a1;return e1<8-a1||(x1|=K[n1+1]<<8-a1,e1<16-a1)||(x1|=K[n1+2]<<16-a1,e1<24-a1)||(x1|=K[n1+3]<<24-a1),x1&i1}function y1(K,c1,e1){var a1=c1&7,n1=c1>>>3;return a1<=5?K[n1]|=(e1&7)<<a1:(K[n1]|=e1<<a1&255,K[n1+1]=(e1&7)>>8-a1),c1+3}function V1(K,c1,e1){var a1=c1&7,n1=c1>>>3;return e1=(e1&1)<<a1,K[n1]|=e1,c1+1}function C1(K,c1,e1){var a1=c1&7,n1=c1>>>3;return e1<<=a1,K[n1]|=e1&255,e1>>>=8,K[n1+1]=e1,c1+8}function S1(K,c1,e1){var a1=c1&7,n1=c1>>>3;return e1<<=a1,K[n1]|=e1&255,e1>>>=8,K[n1+1]=e1&255,K[n1+2]=e1>>>8,c1+16}function L1(K,c1){var e1=K.length,a1=2*e1>c1?2*e1:c1+5,n1=0;if(e1>=c1)return K;if(C2){var i1=Tm(a1);if(K.copy)K.copy(i1);else for(;n1<K.length;++n1)i1[n1]=K[n1];return i1}else if(r1){var x1=new Uint8Array(a1);if(x1.set)x1.set(K);else for(;n1<e1;++n1)x1[n1]=K[n1];return x1}return K.length=a1,K}function H1(K){for(var c1=new Array(K),e1=0;e1<K;++e1)c1[e1]=0;return c1}function N1(K,c1,e1){var a1=1,n1=0,i1=0,x1=0,k1=0,F=K.length,G=r1?new Uint16Array(32):H1(32);for(i1=0;i1<32;++i1)G[i1]=0;for(i1=F;i1<e1;++i1)K[i1]=0;F=K.length;var U=r1?new Uint16Array(F):H1(F);for(i1=0;i1<F;++i1)G[n1=K[i1]]++,a1<n1&&(a1=n1),U[i1]=0;for(G[0]=0,i1=1;i1<=a1;++i1)G[i1+16]=k1=k1+G[i1-1]<<1;for(i1=0;i1<F;++i1)k1=K[i1],k1!=0&&(U[i1]=G[k1+16]++);var Z=0;for(i1=0;i1<F;++i1)if(Z=K[i1],Z!=0)for(k1=q(U[i1],a1)>>a1-Z,x1=(1<<a1+4-Z)-1;x1>=0;--x1)c1[k1|x1<<Z]=Z&15|i1<<4;return a1}var p1=r1?new Uint16Array(512):H1(512),w1=r1?new Uint16Array(32):H1(32);if(!r1){for(var D1=0;D1<512;++D1)p1[D1]=0;for(D1=0;D1<32;++D1)w1[D1]=0}(function(){for(var K=[],c1=0;c1<32;c1++)K.push(5);N1(K,w1,32);var e1=[];for(c1=0;c1<=143;c1++)e1.push(8);for(;c1<=255;c1++)e1.push(9);for(;c1<=279;c1++)e1.push(7);for(;c1<=287;c1++)e1.push(8);N1(e1,p1,288)})();var K1=function(){for(var c1=r1?new Uint8Array(32768):[],e1=0,a1=0;e1<j.length-1;++e1)for(;a1<j[e1+1];++a1)c1[a1]=e1;for(;a1<32768;++a1)c1[a1]=29;var n1=r1?new Uint8Array(259):[];for(e1=0,a1=0;e1<O.length-1;++e1)for(;a1<O[e1+1];++a1)n1[a1]=e1;function i1(k1,F){for(var G=0;G<k1.length;){var U=Math.min(65535,k1.length-G),Z=G+U==k1.length;for(F.write_shift(1,+Z),F.write_shift(2,U),F.write_shift(2,~U&65535);U-- >0;)F[F.l++]=k1[G++]}return F.l}function x1(k1,F){for(var G=0,U=0,Z=r1?new Uint16Array(32768):[];U<k1.length;){var J=Math.min(65535,k1.length-U);if(J<10){for(G=y1(F,G,+(U+J==k1.length)),G&7&&(G+=8-(G&7)),F.l=G/8|0,F.write_shift(2,J),F.write_shift(2,~J&65535);J-- >0;)F[F.l++]=k1[U++];G=F.l*8;continue}G=y1(F,G,+(U+J==k1.length)+2);for(var l1=0;J-- >0;){var s1=k1[U];l1=(l1<<5^s1)&32767;var M1=-1,E1=0;if((M1=Z[l1])&&(M1|=U&-32768,M1>U&&(M1-=32768),M1<U))for(;k1[M1+E1]==k1[U+E1]&&E1<250;)++E1;if(E1>2){s1=n1[E1],s1<=22?G=C1(F,G,Q[s1+1]>>1)-1:(C1(F,G,3),G+=5,C1(F,G,Q[s1-23]>>5),G+=3);var O1=s1<8?0:s1-4>>2;O1>0&&(S1(F,G,E1-O[s1]),G+=O1),s1=c1[U-M1],G=C1(F,G,Q[s1]>>3),G-=3;var A1=s1<4?0:s1-2>>1;A1>0&&(S1(F,G,U-M1-j[s1]),G+=A1);for(var $1=0;$1<E1;++$1)Z[l1]=U&32767,l1=(l1<<5^k1[U])&32767,++U;J-=E1-1}else s1<=143?s1=s1+48:G=V1(F,G,1),G=C1(F,G,Q[s1]),Z[l1]=U&32767,++U}G=C1(F,G,0)-1}return F.l=(G+7)/8|0,F.l}return function(F,G){return F.length<8?i1(F,G):x1(F,G)}}();function F1(K){var c1=Ee(50+Math.floor(K.length*1.1)),e1=K1(K,c1);return c1.slice(0,e1)}var Q1=r1?new Uint16Array(32768):H1(32768),h2=r1?new Uint16Array(32768):H1(32768),a2=r1?new Uint16Array(128):H1(128),H2=1,A2=1;function b1(K,c1){var e1=o1(K,c1)+257;c1+=5;var a1=o1(K,c1)+1;c1+=5;var n1=m1(K,c1)+4;c1+=4;for(var i1=0,x1=r1?new Uint8Array(19):H1(19),k1=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],F=1,G=r1?new Uint8Array(8):H1(8),U=r1?new Uint8Array(8):H1(8),Z=x1.length,J=0;J<n1;++J)x1[W[J]]=i1=_1(K,c1),F<i1&&(F=i1),G[i1]++,c1+=3;var l1=0;for(G[0]=0,J=1;J<=F;++J)U[J]=l1=l1+G[J-1]<<1;for(J=0;J<Z;++J)(l1=x1[J])!=0&&(k1[J]=U[l1]++);var s1=0;for(J=0;J<Z;++J)if(s1=x1[J],s1!=0){l1=Q[k1[J]]>>8-s1;for(var M1=(1<<7-s1)-1;M1>=0;--M1)a2[l1|M1<<s1]=s1&7|J<<3}var E1=[];for(F=1;E1.length<e1+a1;)switch(l1=a2[u1(K,c1)],c1+=l1&7,l1>>>=3){case 16:for(i1=3+g1(K,c1),c1+=2,l1=E1[E1.length-1];i1-- >0;)E1.push(l1);break;case 17:for(i1=3+_1(K,c1),c1+=3;i1-- >0;)E1.push(0);break;case 18:for(i1=11+u1(K,c1),c1+=7;i1-- >0;)E1.push(0);break;default:E1.push(l1),F<l1&&(F=l1);break}var O1=E1.slice(0,e1),A1=E1.slice(e1);for(J=e1;J<286;++J)O1[J]=0;for(J=a1;J<30;++J)A1[J]=0;return H2=N1(O1,Q1,286),A2=N1(A1,h2,30),c1}function v1(K,c1){if(K[0]==3&&!(K[1]&3))return[_0(c1),2];for(var e1=0,a1=0,n1=Tm(c1||1<<18),i1=0,x1=n1.length>>>0,k1=0,F=0;!(a1&1);){if(a1=_1(K,e1),e1+=3,a1>>>1)a1>>1==1?(k1=9,F=5):(e1=b1(K,e1),k1=H2,F=A2);else{e1&7&&(e1+=8-(e1&7));var G=K[e1>>>3]|K[(e1>>>3)+1]<<8;if(e1+=32,G>0)for(!c1&&x1<i1+G&&(n1=L1(n1,i1+G),x1=n1.length);G-- >0;)n1[i1++]=K[e1>>>3],e1+=8;continue}for(;;){!c1&&x1<i1+32767&&(n1=L1(n1,i1+32767),x1=n1.length);var U=d1(K,e1,k1),Z=a1>>>1==1?p1[U]:Q1[U];if(e1+=Z&15,Z>>>=4,!(Z>>>8&255))n1[i1++]=Z;else{if(Z==256)break;Z-=257;var J=Z<8?0:Z-4>>2;J>5&&(J=0);var l1=i1+O[Z];J>0&&(l1+=d1(K,e1,J),e1+=J),U=d1(K,e1,F),Z=a1>>>1==1?w1[U]:h2[U],e1+=Z&15,Z>>>=4;var s1=Z<4?0:Z-2>>1,M1=j[Z];for(s1>0&&(M1+=d1(K,e1,s1),e1+=s1),!c1&&x1<l1&&(n1=L1(n1,l1+100),x1=n1.length);i1<l1;)n1[i1]=n1[i1-M1],++i1}}}return c1?[n1,e1+7>>>3]:[n1.slice(0,i1),e1+7>>>3]}function P1(K,c1){var e1=K.slice(K.l||0),a1=v1(e1,c1);return K.l+=a1[1],a1[0]}function B1(K,c1){if(K)typeof console<"u"&&console.error(c1);else throw new Error(c1)}function n2(K,c1){var e1=K;Ye(e1,0);var a1=[],n1=[],i1={FileIndex:a1,FullPaths:n1};z(i1,{root:c1.root});for(var x1=e1.length-4;(e1[x1]!=80||e1[x1+1]!=75||e1[x1+2]!=5||e1[x1+3]!=6)&&x1>=0;)--x1;e1.l=x1+4,e1.l+=4;var k1=e1.read_shift(2);e1.l+=6;var F=e1.read_shift(4);for(e1.l=F,x1=0;x1<k1;++x1){e1.l+=20;var G=e1.read_shift(4),U=e1.read_shift(4),Z=e1.read_shift(2),J=e1.read_shift(2),l1=e1.read_shift(2);e1.l+=8;var s1=e1.read_shift(4),M1=s(e1.slice(e1.l+Z,e1.l+Z+J));e1.l+=Z+J+l1;var E1=e1.l;e1.l=s1+4,W2(e1,G,U,i1,M1),e1.l=E1}return i1}function W2(K,c1,e1,a1,n1){K.l+=2;var i1=K.read_shift(2),x1=K.read_shift(2),k1=c(K);if(i1&8257)throw new Error("Unsupported ZIP encryption");for(var F=K.read_shift(4),G=K.read_shift(4),U=K.read_shift(4),Z=K.read_shift(2),J=K.read_shift(2),l1="",s1=0;s1<Z;++s1)l1+=String.fromCharCode(K[K.l++]);if(J){var M1=s(K.slice(K.l,K.l+J));(M1[21589]||{}).mt&&(k1=M1[21589].mt),((n1||{})[21589]||{}).mt&&(k1=n1[21589].mt)}K.l+=J;var E1=K.slice(K.l,K.l+G);switch(x1){case 8:E1=T(K,U);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+x1)}var O1=!1;i1&8&&(F=K.read_shift(4),F==134695760&&(F=K.read_shift(4),O1=!0),G=K.read_shift(4),U=K.read_shift(4)),G!=c1&&B1(O1,"Bad compressed size: "+c1+" != "+G),U!=e1&&B1(O1,"Bad uncompressed size: "+e1+" != "+U),Qe(a1,l1,E1,{unsafe:!0,mt:k1})}function ne(K,c1){var e1=c1||{},a1=[],n1=[],i1=Ee(1),x1=e1.compression?8:0,k1=0,F=0,G=0,U=0,Z=0,J=K.FullPaths[0],l1=J,s1=K.FileIndex[0],M1=[],E1=0;for(F=1;F<K.FullPaths.length;++F)if(l1=K.FullPaths[F].slice(J.length),s1=K.FileIndex[F],!(!s1.size||!s1.content||l1=="Sh33tJ5")){var O1=U,A1=Ee(l1.length);for(G=0;G<l1.length;++G)A1.write_shift(1,l1.charCodeAt(G)&127);A1=A1.slice(0,A1.l),M1[Z]=n31.buf(s1.content,0);var $1=s1.content;x1==8&&($1=I($1)),i1=Ee(30),i1.write_shift(4,67324752),i1.write_shift(2,20),i1.write_shift(2,k1),i1.write_shift(2,x1),s1.mt?i(i1,s1.mt):i1.write_shift(4,0),i1.write_shift(-4,M1[Z]),i1.write_shift(4,$1.length),i1.write_shift(4,s1.content.length),i1.write_shift(2,A1.length),i1.write_shift(2,0),U+=i1.length,a1.push(i1),U+=A1.length,a1.push(A1),U+=$1.length,a1.push($1),i1=Ee(46),i1.write_shift(4,33639248),i1.write_shift(2,0),i1.write_shift(2,20),i1.write_shift(2,k1),i1.write_shift(2,x1),i1.write_shift(4,0),i1.write_shift(-4,M1[Z]),i1.write_shift(4,$1.length),i1.write_shift(4,s1.content.length),i1.write_shift(2,A1.length),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(4,0),i1.write_shift(4,O1),E1+=i1.l,n1.push(i1),E1+=A1.length,n1.push(A1),++Z}return i1=Ee(22),i1.write_shift(4,101010256),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,Z),i1.write_shift(2,Z),i1.write_shift(4,E1),i1.write_shift(4,U),i1.write_shift(2,0),Q4([Q4(a1),Q4(n1),i1])}var P2={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function Ge(K,c1){if(K.ctype)return K.ctype;var e1=K.name||"",a1=e1.match(/\.([^\.]+)$/);return a1&&P2[a1[1]]||c1&&(a1=(e1=c1).match(/[\.\\]([^\.\\])+$/),a1&&P2[a1[1]])?P2[a1[1]]:"application/octet-stream"}function S2(K){for(var c1=Vm(K),e1=[],a1=0;a1<c1.length;a1+=76)e1.push(c1.slice(a1,a1+76));return e1.join(`\r
853
+ `):e}function yW(e,t){const{element:a,datasetIndex:r,index:n}=t,i=e.getDatasetMeta(r).controller,{label:c,value:s}=i.getLabelAndValue(n);return{chart:e,label:c,parsed:i.getParsed(n),raw:e.data.datasets[r].data[n],formattedValue:s,dataset:i.getDataset(),dataIndex:n,datasetIndex:r,element:a}}function vh(e,t){const a=e.chart.ctx,{body:r,footer:n,title:i}=e,{boxWidth:c,boxHeight:s}=t,o=Pe(t.bodyFont),l=Pe(t.titleFont),f=Pe(t.footerFont),d=i.length,h=n.length,m=r.length,p=ft(t.padding);let v=p.height,g=0,y=r.reduce((b,M)=>b+M.before.length+M.lines.length+M.after.length,0);if(y+=e.beforeBody.length+e.afterBody.length,d&&(v+=d*l.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),y){const b=t.displayColors?Math.max(s,o.lineHeight):o.lineHeight;v+=m*b+(y-m)*o.lineHeight+(y-1)*t.bodySpacing}h&&(v+=t.footerMarginTop+h*f.lineHeight+(h-1)*t.footerSpacing);let x=0;const C=function(b){g=Math.max(g,a.measureText(b).width+x)};return a.save(),a.font=l.string,R2(e.title,C),a.font=o.string,R2(e.beforeBody.concat(e.afterBody),C),x=t.displayColors?c+2+t.boxPadding:0,R2(r,b=>{R2(b.before,C),R2(b.lines,C),R2(b.after,C)}),x=0,a.font=f.string,R2(e.footer,C),a.restore(),g+=p.width,{width:g,height:v}}function xW(e,t){const{y:a,height:r}=t;return a<r/2?"top":a>e.height-r/2?"bottom":"center"}function bW(e,t,a,r){const{x:n,width:i}=r,c=a.caretSize+a.caretPadding;if(e==="left"&&n+i+c>t.width||e==="right"&&n-i-c<0)return!0}function CW(e,t,a,r){const{x:n,width:i}=a,{width:c,chartArea:{left:s,right:o}}=e;let l="center";return r==="center"?l=n<=(s+o)/2?"left":"right":n<=i/2?l="left":n>=c-i/2&&(l="right"),bW(l,e,t,a)&&(l="center"),l}function gh(e,t,a){const r=a.yAlign||t.yAlign||xW(e,a);return{xAlign:a.xAlign||t.xAlign||CW(e,t,a,r),yAlign:r}}function MW(e,t){let{x:a,width:r}=e;return t==="right"?a-=r:t==="center"&&(a-=r/2),a}function zW(e,t,a){let{y:r,height:n}=e;return t==="top"?r+=a:t==="bottom"?r-=n+a:r-=n/2,r}function yh(e,t,a,r){const{caretSize:n,caretPadding:i,cornerRadius:c}=e,{xAlign:s,yAlign:o}=a,l=n+i,{topLeft:f,topRight:d,bottomLeft:h,bottomRight:m}=ta(c);let p=MW(t,s);const v=zW(t,o,l);return o==="center"?s==="left"?p+=l:s==="right"&&(p-=l):s==="left"?p-=Math.max(f,h)+n:s==="right"&&(p+=Math.max(d,m)+n),{x:qe(p,0,r.width-t.width),y:qe(v,0,r.height-t.height)}}function Tc(e,t,a){const r=ft(a.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function xh(e){return D3([],h4(e))}function wW(e,t,a){return S0(e,{tooltip:t,tooltipItems:a,type:"tooltip"})}function bh(e,t){const a=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return a?e.override(a):e}const gx={beforeTitle:u4,title(e){if(e.length>0){const t=e[0],a=t.chart.data.labels,r=a?a.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return a[t.dataIndex]}return""},afterTitle:u4,beforeBody:u4,beforeLabel:u4,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const a=e.formattedValue;return L2(a)||(t+=a),t},labelColor(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:a.borderColor,backgroundColor:a.backgroundColor,borderWidth:a.borderWidth,borderDash:a.borderDash,borderDashOffset:a.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:a.pointStyle,rotation:a.rotation}},afterLabel:u4,afterBody:u4,beforeFooter:u4,footer:u4,afterFooter:u4};function zt(e,t,a,r){const n=e[t].call(a,r);return typeof n>"u"?gx[t].call(a,r):n}class ko extends S3{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const a=this.chart,r=this.options.setContext(this.getContext()),n=r.enabled&&a.options.animation&&r.animations,i=new Ky(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=wW(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,a){const{callbacks:r}=a,n=zt(r,"beforeTitle",this,t),i=zt(r,"title",this,t),c=zt(r,"afterTitle",this,t);let s=[];return s=D3(s,h4(n)),s=D3(s,h4(i)),s=D3(s,h4(c)),s}getBeforeBody(t,a){return xh(zt(a.callbacks,"beforeBody",this,t))}getBody(t,a){const{callbacks:r}=a,n=[];return R2(t,i=>{const c={before:[],lines:[],after:[]},s=bh(r,i);D3(c.before,h4(zt(s,"beforeLabel",this,i))),D3(c.lines,zt(s,"label",this,i)),D3(c.after,h4(zt(s,"afterLabel",this,i))),n.push(c)}),n}getAfterBody(t,a){return xh(zt(a.callbacks,"afterBody",this,t))}getFooter(t,a){const{callbacks:r}=a,n=zt(r,"beforeFooter",this,t),i=zt(r,"footer",this,t),c=zt(r,"afterFooter",this,t);let s=[];return s=D3(s,h4(n)),s=D3(s,h4(i)),s=D3(s,h4(c)),s}_createItems(t){const a=this._active,r=this.chart.data,n=[],i=[],c=[];let s=[],o,l;for(o=0,l=a.length;o<l;++o)s.push(yW(this.chart,a[o]));return t.filter&&(s=s.filter((f,d,h)=>t.filter(f,d,h,r))),t.itemSort&&(s=s.sort((f,d)=>t.itemSort(f,d,r))),R2(s,f=>{const d=bh(t.callbacks,f);n.push(zt(d,"labelColor",this,f)),i.push(zt(d,"labelPointStyle",this,f)),c.push(zt(d,"labelTextColor",this,f))}),this.labelColors=n,this.labelPointStyles=i,this.labelTextColors=c,this.dataPoints=s,s}update(t,a){const r=this.options.setContext(this.getContext()),n=this._active;let i,c=[];if(!n.length)this.opacity!==0&&(i={opacity:0});else{const s=cr[r.position].call(this,n,this._eventPosition);c=this._createItems(r),this.title=this.getTitle(c,r),this.beforeBody=this.getBeforeBody(c,r),this.body=this.getBody(c,r),this.afterBody=this.getAfterBody(c,r),this.footer=this.getFooter(c,r);const o=this._size=vh(this,r),l=Object.assign({},s,o),f=gh(this.chart,r,l),d=yh(r,l,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,i={opacity:1,x:d.x,y:d.y,width:o.width,height:o.height,caretX:s.x,caretY:s.y}}this._tooltipItems=c,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:a})}drawCaret(t,a,r,n){const i=this.getCaretPosition(t,r,n);a.lineTo(i.x1,i.y1),a.lineTo(i.x2,i.y2),a.lineTo(i.x3,i.y3)}getCaretPosition(t,a,r){const{xAlign:n,yAlign:i}=this,{caretSize:c,cornerRadius:s}=r,{topLeft:o,topRight:l,bottomLeft:f,bottomRight:d}=ta(s),{x:h,y:m}=t,{width:p,height:v}=a;let g,y,x,C,b,M;return i==="center"?(b=m+v/2,n==="left"?(g=h,y=g-c,C=b+c,M=b-c):(g=h+p,y=g+c,C=b-c,M=b+c),x=g):(n==="left"?y=h+Math.max(o,f)+c:n==="right"?y=h+p-Math.max(l,d)-c:y=this.caretX,i==="top"?(C=m,b=C-c,g=y-c,x=y+c):(C=m+v,b=C+c,g=y+c,x=y-c),M=C),{x1:g,x2:y,x3:x,y1:C,y2:b,y3:M}}drawTitle(t,a,r){const n=this.title,i=n.length;let c,s,o;if(i){const l=a6(r.rtl,this.x,this.width);for(t.x=Tc(this,r.titleAlign,r),a.textAlign=l.textAlign(r.titleAlign),a.textBaseline="middle",c=Pe(r.titleFont),s=r.titleSpacing,a.fillStyle=r.titleColor,a.font=c.string,o=0;o<i;++o)a.fillText(n[o],l.x(t.x),t.y+c.lineHeight/2),t.y+=c.lineHeight+s,o+1===i&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,a,r,n,i){const c=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:o,boxWidth:l}=i,f=Pe(i.bodyFont),d=Tc(this,"left",i),h=n.x(d),m=o<f.lineHeight?(f.lineHeight-o)/2:0,p=a.y+m;if(i.usePointStyle){const v={radius:Math.min(l,o)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=n.leftForLtr(h,l)+l/2,y=p+o/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,Mo(t,v,g,y),t.strokeStyle=c.borderColor,t.fillStyle=c.backgroundColor,Mo(t,v,g,y)}else{t.lineWidth=x2(c.borderWidth)?Math.max(...Object.values(c.borderWidth)):c.borderWidth||1,t.strokeStyle=c.borderColor,t.setLineDash(c.borderDash||[]),t.lineDashOffset=c.borderDashOffset||0;const v=n.leftForLtr(h,l),g=n.leftForLtr(n.xPlus(h,1),l-2),y=ta(c.borderRadius);Object.values(y).some(x=>x!==0)?(t.beginPath(),t.fillStyle=i.multiKeyBackground,tn(t,{x:v,y:p,w:l,h:o,radius:y}),t.fill(),t.stroke(),t.fillStyle=c.backgroundColor,t.beginPath(),tn(t,{x:g,y:p+1,w:l-2,h:o-2,radius:y}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(v,p,l,o),t.strokeRect(v,p,l,o),t.fillStyle=c.backgroundColor,t.fillRect(g,p+1,l-2,o-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,a,r){const{body:n}=this,{bodySpacing:i,bodyAlign:c,displayColors:s,boxHeight:o,boxWidth:l,boxPadding:f}=r,d=Pe(r.bodyFont);let h=d.lineHeight,m=0;const p=a6(r.rtl,this.x,this.width),v=function(_){a.fillText(_,p.x(t.x+m),t.y+h/2),t.y+=h+i},g=p.textAlign(c);let y,x,C,b,M,w,z;for(a.textAlign=c,a.textBaseline="middle",a.font=d.string,t.x=Tc(this,g,r),a.fillStyle=r.bodyColor,R2(this.beforeBody,v),m=s&&g!=="right"?c==="center"?l/2+f:l+2+f:0,b=0,w=n.length;b<w;++b){for(y=n[b],x=this.labelTextColors[b],a.fillStyle=x,R2(y.before,v),C=y.lines,s&&C.length&&(this._drawColorBox(a,t,b,p,r),h=Math.max(d.lineHeight,o)),M=0,z=C.length;M<z;++M)v(C[M]),h=d.lineHeight;R2(y.after,v)}m=0,h=d.lineHeight,R2(this.afterBody,v),t.y-=i}drawFooter(t,a,r){const n=this.footer,i=n.length;let c,s;if(i){const o=a6(r.rtl,this.x,this.width);for(t.x=Tc(this,r.footerAlign,r),t.y+=r.footerMarginTop,a.textAlign=o.textAlign(r.footerAlign),a.textBaseline="middle",c=Pe(r.footerFont),a.fillStyle=r.footerColor,a.font=c.string,s=0;s<i;++s)a.fillText(n[s],o.x(t.x),t.y+c.lineHeight/2),t.y+=c.lineHeight+r.footerSpacing}}drawBackground(t,a,r,n){const{xAlign:i,yAlign:c}=this,{x:s,y:o}=t,{width:l,height:f}=r,{topLeft:d,topRight:h,bottomLeft:m,bottomRight:p}=ta(n.cornerRadius);a.fillStyle=n.backgroundColor,a.strokeStyle=n.borderColor,a.lineWidth=n.borderWidth,a.beginPath(),a.moveTo(s+d,o),c==="top"&&this.drawCaret(t,a,r,n),a.lineTo(s+l-h,o),a.quadraticCurveTo(s+l,o,s+l,o+h),c==="center"&&i==="right"&&this.drawCaret(t,a,r,n),a.lineTo(s+l,o+f-p),a.quadraticCurveTo(s+l,o+f,s+l-p,o+f),c==="bottom"&&this.drawCaret(t,a,r,n),a.lineTo(s+m,o+f),a.quadraticCurveTo(s,o+f,s,o+f-m),c==="center"&&i==="left"&&this.drawCaret(t,a,r,n),a.lineTo(s,o+d),a.quadraticCurveTo(s,o,s+d,o),a.closePath(),a.fill(),n.borderWidth>0&&a.stroke()}_updateAnimationTarget(t){const a=this.chart,r=this.$animations,n=r&&r.x,i=r&&r.y;if(n||i){const c=cr[t.position].call(this,this._active,this._eventPosition);if(!c)return;const s=this._size=vh(this,t),o=Object.assign({},c,this._size),l=gh(a,t,o),f=yh(t,o,l,a);(n._to!==f.x||i._to!==f.y)&&(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=s.width,this.height=s.height,this.caretX=c.x,this.caretY=c.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){const a=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(a);const n={width:this.width,height:this.height},i={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const c=ft(a.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;a.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(i,t,n,a),jy(t,a.textDirection),i.y+=c.top,this.drawTitle(i,t,a),this.drawBody(i,t,a),this.drawFooter(i,t,a),Wy(t,a.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,a){const r=this._active,n=t.map(({datasetIndex:s,index:o})=>{const l=this.chart.getDatasetMeta(s);if(!l)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:l.data[o],index:o}}),i=!Pi(r,n),c=this._positionChanged(n,a);(i||c)&&(this._active=n,this._eventPosition=a,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,a,r=!0){if(a&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,i=this._active||[],c=this._getActiveElements(t,i,a,r),s=this._positionChanged(c,t),o=a||!Pi(c,i)||s;return o&&(this._active=c,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,a))),o}_getActiveElements(t,a,r,n){const i=this.options;if(t.type==="mouseout")return[];if(!n)return a.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const c=this.chart.getElementsAtEventForMode(t,i.mode,i,r);return i.reverse&&c.reverse(),c}_positionChanged(t,a){const{caretX:r,caretY:n,options:i}=this,c=cr[i.position].call(this,t,a);return c!==!1&&(r!==c.x||n!==c.y)}}z1(ko,"positioners",cr);var _W={id:"tooltip",_element:ko,positioners:cr,afterInit(e,t,a){a&&(e.tooltip=new ko({chart:e,options:a}))},beforeUpdate(e,t,a){e.tooltip&&e.tooltip.initialize(a)},reset(e,t,a){e.tooltip&&e.tooltip.initialize(a)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const a={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...a,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",a)}},afterEvent(e,t){if(e.tooltip){const a=t.replay;e.tooltip.handleEvent(t.event,a,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:gx},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},HW=Object.freeze({__proto__:null,Colors:Rj,Decimation:$j,Filler:oW,Legend:mW,SubTitle:gW,Title:vW,Tooltip:_W});const SW=(e,t,a,r)=>(typeof t=="string"?(a=e.push(t)-1,r.unshift({index:a,label:t})):isNaN(t)&&(a=null),a);function LW(e,t,a,r){const n=e.indexOf(t);if(n===-1)return SW(e,t,a,r);const i=e.lastIndexOf(t);return n!==i?a:n}const kW=(e,t)=>e===null?null:qe(Math.round(e),0,t);function Ch(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Ao extends Ca{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const a=this._addedLabels;if(a.length){const r=this.getLabels();for(const{index:n,label:i}of a)r[n]===i&&r.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,a){if(L2(t))return null;const r=this.getLabels();return a=isFinite(a)&&r[a]===t?a:LW(r,t,l2(a,t),this._addedLabels),kW(a,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let{min:r,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),a||(n=this.getLabels().length-1)),this.min=r,this.max=n}buildTicks(){const t=this.min,a=this.max,r=this.options.offset,n=[];let i=this.getLabels();i=t===0&&a===i.length-1?i:i.slice(t,a+1),this._valueRange=Math.max(i.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let c=t;c<=a;c++)n.push({value:c});return n}getLabelForValue(t){return Ch.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const a=this.ticks;return t<0||t>a.length-1?null:this.getPixelForValue(a[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}z1(Ao,"id","category"),z1(Ao,"defaults",{ticks:{callback:Ch}});function AW(e,t){const a=[],{bounds:n,step:i,min:c,max:s,precision:o,count:l,maxTicks:f,maxDigits:d,includeBounds:h}=e,m=i||1,p=f-1,{min:v,max:g}=t,y=!L2(c),x=!L2(s),C=!L2(l),b=(g-v)/(d+1);let M=vd((g-v)/p/m)*m,w,z,_,S;if(M<1e-14&&!y&&!x)return[{value:v},{value:g}];S=Math.ceil(g/M)-Math.floor(v/M),S>p&&(M=vd(S*M/p/m)*m),L2(o)||(w=Math.pow(10,o),M=Math.ceil(M*w)/w),n==="ticks"?(z=Math.floor(v/M)*M,_=Math.ceil(g/M)*M):(z=v,_=g),y&&x&&i&&z$((s-c)/i,M/1e3)?(S=Math.round(Math.min((s-c)/M,f)),M=(s-c)/S,z=c,_=s):C?(z=y?c:z,_=x?s:_,S=l-1,M=(_-z)/S):(S=(_-z)/M,br(S,Math.round(S),M/1e3)?S=Math.round(S):S=Math.ceil(S));const k=Math.max(gd(M),gd(z));w=Math.pow(10,L2(o)?k:o),z=Math.round(z*w)/w,_=Math.round(_*w)/w;let H=0;for(y&&(h&&z!==c?(a.push({value:c}),z<c&&H++,br(Math.round((z+H*M)*w)/w,c,Mh(c,b,e))&&H++):z<c&&H++);H<S;++H){const L=Math.round((z+H*M)*w)/w;if(x&&L>s)break;a.push({value:L})}return x&&h&&_!==s?a.length&&br(a[a.length-1].value,s,Mh(s,b,e))?a[a.length-1].value=s:a.push({value:s}):(!x||_===s)&&a.push({value:_}),a}function Mh(e,t,{horizontal:a,minRotation:r}){const n=v3(r),i=(a?Math.sin(n):Math.cos(n))||.001,c=.75*t*(""+e).length;return Math.min(t/i,c)}class Ui extends Ca{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,a){return L2(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:a,maxDefined:r}=this.getUserBounds();let{min:n,max:i}=this;const c=o=>n=a?n:o,s=o=>i=r?i:o;if(t){const o=Y3(n),l=Y3(i);o<0&&l<0?s(0):o>0&&l>0&&c(0)}if(n===i){let o=i===0?1:Math.abs(i*.05);s(i+o),t||c(n-o)}this.min=n,this.max=i}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:a,stepSize:r}=t,n;return r?(n=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),a=a||11),a&&(n=Math.min(a,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,a=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const n={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:a.precision,step:a.stepSize,count:a.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:a.minRotation||0,includeBounds:a.includeBounds!==!1},i=this._range||this,c=AW(n,i);return t.bounds==="ticks"&&Ly(c,this,"value"),t.reverse?(c.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),c}configure(){const t=this.ticks;let a=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const n=(r-a)/Math.max(t.length-1,1)/2;a-=n,r+=n}this._startValue=a,this._endValue=r,this._valueRange=r-a}getLabelForValue(t){return En(t,this.chart.options.locale,this.options.ticks.format)}}class Vo extends Ui{determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=ve(t)?t:0,this.max=ve(a)?a:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),a=t?this.width:this.height,r=v3(this.options.ticks.minRotation),n=(t?Math.sin(r):Math.cos(r))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(a/Math.min(40,i.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}z1(Vo,"id","linear"),z1(Vo,"defaults",{ticks:{callback:P8.formatters.numeric}});const rn=e=>Math.floor(a0(e)),R0=(e,t)=>Math.pow(10,rn(e)+t);function zh(e){return e/Math.pow(10,rn(e))===1}function wh(e,t,a){const r=Math.pow(10,a),n=Math.floor(e/r);return Math.ceil(t/r)-n}function VW(e,t){const a=t-e;let r=rn(a);for(;wh(e,t,r)>10;)r++;for(;wh(e,t,r)<10;)r--;return Math.min(r,rn(e))}function TW(e,{min:t,max:a}){t=kt(e.min,t);const r=[],n=rn(t);let i=VW(t,a),c=i<0?Math.pow(10,Math.abs(i)):1;const s=Math.pow(10,i),o=n>i?Math.pow(10,n):0,l=Math.round((t-o)*c)/c,f=Math.floor((t-o)/s/10)*s*10;let d=Math.floor((l-f)/Math.pow(10,i)),h=kt(e.min,Math.round((o+f+d*Math.pow(10,i))*c)/c);for(;h<a;)r.push({value:h,major:zh(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(i++,d=2,c=i>=0?1:c),h=Math.round((o+f+d*Math.pow(10,i))*c)/c;const m=kt(e.max,h);return r.push({value:m,major:zh(m),significand:d}),r}class To extends Ca{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,a){const r=Ui.prototype.parse.apply(this,[t,a]);if(r===0){this._zero=!0;return}return ve(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=ve(t)?Math.max(0,t):null,this.max=ve(a)?Math.max(0,a):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ve(this._userMin)&&(this.min=t===R0(this.min,0)?R0(this.min,-1):R0(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let r=this.min,n=this.max;const i=s=>r=t?r:s,c=s=>n=a?n:s;r===n&&(r<=0?(i(1),c(10)):(i(R0(r,-1)),c(R0(n,1)))),r<=0&&i(R0(n,-1)),n<=0&&c(R0(r,1)),this.min=r,this.max=n}buildTicks(){const t=this.options,a={min:this._userMin,max:this._userMax},r=TW(a,this);return t.bounds==="ticks"&&Ly(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":En(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=a0(t),this._valueRange=a0(this.max)-a0(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(a0(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const a=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+a*this._valueRange)}}z1(To,"id","logarithmic"),z1(To,"defaults",{ticks:{callback:P8.formatters.logarithmic,major:{enabled:!0}}});function Eo(e){const t=e.ticks;if(t.display&&e.display){const a=ft(t.backdropPadding);return l2(t.font&&t.font.size,se.font.size)+a.height}return 0}function EW(e,t,a){return a=Z2(a)?a:[a],{w:B$(e,t.string,a),h:a.length*t.lineHeight}}function _h(e,t,a,r,n){return e===r||e===n?{start:t-a/2,end:t+a/2}:e<r||e>n?{start:t-a,end:t}:{start:t,end:t+a}}function NW(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},a=Object.assign({},t),r=[],n=[],i=e._pointLabels.length,c=e.options.pointLabels,s=c.centerPointLabels?ee/i:0;for(let o=0;o<i;o++){const l=c.setContext(e.getPointLabelContext(o));n[o]=l.padding;const f=e.getPointPosition(o,e.drawingArea+n[o],s),d=Pe(l.font),h=EW(e.ctx,d,e._pointLabels[o]);r[o]=h;const m=At(e.getIndexAngle(o)+s),p=Math.round(hl(m)),v=_h(p,f.x,h.w,0,180),g=_h(p,f.y,h.h,90,270);OW(a,t,m,v,g)}e.setCenterPoint(t.l-a.l,a.r-t.r,t.t-a.t,a.b-t.b),e._pointLabelItems=RW(e,r,n)}function OW(e,t,a,r,n){const i=Math.abs(Math.sin(a)),c=Math.abs(Math.cos(a));let s=0,o=0;r.start<t.l?(s=(t.l-r.start)/i,e.l=Math.min(e.l,t.l-s)):r.end>t.r&&(s=(r.end-t.r)/i,e.r=Math.max(e.r,t.r+s)),n.start<t.t?(o=(t.t-n.start)/c,e.t=Math.min(e.t,t.t-o)):n.end>t.b&&(o=(n.end-t.b)/c,e.b=Math.max(e.b,t.b+o))}function PW(e,t,a){const r=e.drawingArea,{extra:n,additionalAngle:i,padding:c,size:s}=a,o=e.getPointPosition(t,r+n+c,i),l=Math.round(hl(At(o.angle+we))),f=IW(o.y,s.h,l),d=FW(l),h=BW(o.x,s.w,d);return{visible:!0,x:o.x,y:f,textAlign:d,left:h,top:f,right:h+s.w,bottom:f+s.h}}function DW(e,t){if(!t)return!0;const{left:a,top:r,right:n,bottom:i}=e;return!(M4({x:a,y:r},t)||M4({x:a,y:i},t)||M4({x:n,y:r},t)||M4({x:n,y:i},t))}function RW(e,t,a){const r=[],n=e._pointLabels.length,i=e.options,{centerPointLabels:c,display:s}=i.pointLabels,o={extra:Eo(i)/2,additionalAngle:c?ee/n:0};let l;for(let f=0;f<n;f++){o.padding=a[f],o.size=t[f];const d=PW(e,f,o);r.push(d),s==="auto"&&(d.visible=DW(d,l),d.visible&&(l=d))}return r}function FW(e){return e===0||e===180?"center":e<180?"left":"right"}function BW(e,t,a){return a==="right"?e-=t:a==="center"&&(e-=t/2),e}function IW(e,t,a){return a===90||a===270?e-=t/2:(a>270||a<90)&&(e-=t),e}function $W(e,t,a){const{left:r,top:n,right:i,bottom:c}=a,{backdropColor:s}=t;if(!L2(s)){const o=ta(t.borderRadius),l=ft(t.backdropPadding);e.fillStyle=s;const f=r-l.left,d=n-l.top,h=i-r+l.width,m=c-n+l.height;Object.values(o).some(p=>p!==0)?(e.beginPath(),tn(e,{x:f,y:d,w:h,h:m,radius:o}),e.fill()):e.fillRect(f,d,h,m)}}function UW(e,t){const{ctx:a,options:{pointLabels:r}}=e;for(let n=t-1;n>=0;n--){const i=e._pointLabelItems[n];if(!i.visible)continue;const c=r.setContext(e.getPointLabelContext(n));$W(a,c,i);const s=Pe(c.font),{x:o,y:l,textAlign:f}=i;da(a,e._pointLabels[n],o,l+s.lineHeight/2,s,{color:c.color,textAlign:f,textBaseline:"middle"})}}function yx(e,t,a,r){const{ctx:n}=e;if(a)n.arc(e.xCenter,e.yCenter,t,0,J2);else{let i=e.getPointPosition(0,t);n.moveTo(i.x,i.y);for(let c=1;c<r;c++)i=e.getPointPosition(c,t),n.lineTo(i.x,i.y)}}function qW(e,t,a,r,n){const i=e.ctx,c=t.circular,{color:s,lineWidth:o}=t;!c&&!r||!s||!o||a<0||(i.save(),i.strokeStyle=s,i.lineWidth=o,i.setLineDash(n.dash||[]),i.lineDashOffset=n.dashOffset,i.beginPath(),yx(e,a,c,r),i.closePath(),i.stroke(),i.restore())}function jW(e,t,a){return S0(e,{label:a,index:t,type:"pointLabel"})}class ir extends Ui{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=ft(Eo(this.options)/2),a=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+a/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(a,r)/2)}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!1);this.min=ve(t)&&!isNaN(t)?t:0,this.max=ve(a)&&!isNaN(a)?a:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Eo(this.options))}generateTickLabels(t){Ui.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((a,r)=>{const n=$2(this.options.pointLabels.callback,[a,r],this);return n||n===0?n:""}).filter((a,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?NW(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,a,r,n){this.xCenter+=Math.floor((t-a)/2),this.yCenter+=Math.floor((r-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,a,r,n))}getIndexAngle(t){const a=J2/(this._pointLabels.length||1),r=this.options.startAngle||0;return At(t*a+v3(r))}getDistanceFromCenterForValue(t){if(L2(t))return NaN;const a=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*a:(t-this.min)*a}getValueForDistanceFromCenter(t){if(L2(t))return NaN;const a=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-a:this.min+a}getPointLabelContext(t){const a=this._pointLabels||[];if(t>=0&&t<a.length){const r=a[t];return jW(this.getContext(),t,r)}}getPointPosition(t,a,r=0){const n=this.getIndexAngle(t)-we+r;return{x:Math.cos(n)*a+this.xCenter,y:Math.sin(n)*a+this.yCenter,angle:n}}getPointPositionForValue(t,a){return this.getPointPosition(t,this.getDistanceFromCenterForValue(a))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:a,top:r,right:n,bottom:i}=this._pointLabelItems[t];return{left:a,top:r,right:n,bottom:i}}drawBackground(){const{backgroundColor:t,grid:{circular:a}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),yx(this,this.getDistanceFromCenterForValue(this._endValue),a,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,a=this.options,{angleLines:r,grid:n,border:i}=a,c=this._pointLabels.length;let s,o,l;if(a.pointLabels.display&&UW(this,c),n.display&&this.ticks.forEach((f,d)=>{if(d!==0||d===0&&this.min<0){o=this.getDistanceFromCenterForValue(f.value);const h=this.getContext(d),m=n.setContext(h),p=i.setContext(h);qW(this,m,o,c,p)}}),r.display){for(t.save(),s=c-1;s>=0;s--){const f=r.setContext(this.getPointLabelContext(s)),{color:d,lineWidth:h}=f;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,o=this.getDistanceFromCenterForValue(a.reverse?this.min:this.max),l=this.getPointPosition(s,o),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,a=this.options,r=a.ticks;if(!r.display)return;const n=this.getIndexAngle(0);let i,c;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,o)=>{if(o===0&&this.min>=0&&!a.reverse)return;const l=r.setContext(this.getContext(o)),f=Pe(l.font);if(i=this.getDistanceFromCenterForValue(this.ticks[o].value),l.showLabelBackdrop){t.font=f.string,c=t.measureText(s.label).width,t.fillStyle=l.backdropColor;const d=ft(l.backdropPadding);t.fillRect(-c/2-d.left,-i-f.size/2-d.top,c+d.width,f.size+d.height)}da(t,s.label,0,-i,f,{color:l.color,strokeColor:l.textStrokeColor,strokeWidth:l.textStrokeWidth})}),t.restore()}drawTitle(){}}z1(ir,"id","radialLinear"),z1(ir,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:P8.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),z1(ir,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),z1(ir,"descriptors",{angleLines:{_fallback:"grid"}});const B8={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}},St=Object.keys(B8);function Hh(e,t){return e-t}function Sh(e,t){if(L2(t))return null;const a=e._adapter,{parser:r,round:n,isoWeekday:i}=e._parseOpts;let c=t;return typeof r=="function"&&(c=r(c)),ve(c)||(c=typeof r=="string"?a.parse(c,r):a.parse(c)),c===null?null:(n&&(c=n==="week"&&(l6(i)||i===!0)?a.startOf(c,"isoWeek",i):a.startOf(c,n)),+c)}function Lh(e,t,a,r){const n=St.length;for(let i=St.indexOf(e);i<n-1;++i){const c=B8[St[i]],s=c.steps?c.steps:Number.MAX_SAFE_INTEGER;if(c.common&&Math.ceil((a-t)/(s*c.size))<=r)return St[i]}return St[n-1]}function WW(e,t,a,r,n){for(let i=St.length-1;i>=St.indexOf(a);i--){const c=St[i];if(B8[c].common&&e._adapter.diff(n,r,c)>=t-1)return c}return St[a?St.indexOf(a):0]}function GW(e){for(let t=St.indexOf(e)+1,a=St.length;t<a;++t)if(B8[St[t]].common)return St[t]}function kh(e,t,a){if(!a)e[t]=!0;else if(a.length){const{lo:r,hi:n}=ml(a,t),i=a[r]>=t?a[r]:a[n];e[i]=!0}}function YW(e,t,a,r){const n=e._adapter,i=+n.startOf(t[0].value,r),c=t[t.length-1].value;let s,o;for(s=i;s<=c;s=+n.add(s,1,r))o=a[s],o>=0&&(t[o].major=!0);return t}function Ah(e,t,a){const r=[],n={},i=t.length;let c,s;for(c=0;c<i;++c)s=t[c],n[s]=c,r.push({value:s,major:!1});return i===0||!a?r:YW(e,r,n,a)}class nn extends Ca{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,a={}){const r=t.time||(t.time={}),n=this._adapter=new aq._date(t.adapters.date);n.init(a),xr(r.displayFormats,n.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=a.normalized}parse(t,a){return t===void 0?null:Sh(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,a=this._adapter,r=t.time.unit||"day";let{min:n,max:i,minDefined:c,maxDefined:s}=this.getUserBounds();function o(l){!c&&!isNaN(l.min)&&(n=Math.min(n,l.min)),!s&&!isNaN(l.max)&&(i=Math.max(i,l.max))}(!c||!s)&&(o(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&o(this.getMinMax(!1))),n=ve(n)&&!isNaN(n)?n:+a.startOf(Date.now(),r),i=ve(i)&&!isNaN(i)?i:+a.endOf(Date.now(),r)+1,this.min=Math.min(n,i-1),this.max=Math.max(n+1,i)}_getLabelBounds(){const t=this.getLabelTimestamps();let a=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(a=t[0],r=t[t.length-1]),{min:a,max:r}}buildTicks(){const t=this.options,a=t.time,r=t.ticks,n=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const i=this.min,c=this.max,s=S$(n,i,c);return this._unit=a.unit||(r.autoSkip?Lh(a.minUnit,this.min,this.max,this._getLabelCapacity(i)):WW(this,s.length,a.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:GW(this._unit),this.initOffsets(n),t.reverse&&s.reverse(),Ah(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let a=0,r=0,n,i;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?a=1-n:a=(this.getDecimalForValue(t[1])-n)/2,i=this.getDecimalForValue(t[t.length-1]),t.length===1?r=i:r=(i-this.getDecimalForValue(t[t.length-2]))/2);const c=t.length<3?.5:.25;a=qe(a,0,c),r=qe(r,0,c),this._offsets={start:a,end:r,factor:1/(a+1+r)}}_generate(){const t=this._adapter,a=this.min,r=this.max,n=this.options,i=n.time,c=i.unit||Lh(i.minUnit,a,r,this._getLabelCapacity(a)),s=l2(n.ticks.stepSize,1),o=c==="week"?i.isoWeekday:!1,l=l6(o)||o===!0,f={};let d=a,h,m;if(l&&(d=+t.startOf(d,"isoWeek",o)),d=+t.startOf(d,l?"day":c),t.diff(r,a,c)>1e5*s)throw new Error(a+" and "+r+" are too far apart with stepSize of "+s+" "+c);const p=n.ticks.source==="data"&&this.getDataTimestamps();for(h=d,m=0;h<r;h=+t.add(h,s,c),m++)kh(f,h,p);return(h===r||n.bounds==="ticks"||m===1)&&kh(f,h,p),Object.keys(f).sort(Hh).map(v=>+v)}getLabelForValue(t){const a=this._adapter,r=this.options.time;return r.tooltipFormat?a.format(t,r.tooltipFormat):a.format(t,r.displayFormats.datetime)}format(t,a){const n=this.options.time.displayFormats,i=this._unit,c=a||n[i];return this._adapter.format(t,c)}_tickFormatFunction(t,a,r,n){const i=this.options,c=i.ticks.callback;if(c)return $2(c,[t,a,r],this);const s=i.time.displayFormats,o=this._unit,l=this._majorUnit,f=o&&s[o],d=l&&s[l],h=r[a],m=l&&d&&h&&h.major;return this._adapter.format(t,n||(m?d:f))}generateTickLabels(t){let a,r,n;for(a=0,r=t.length;a<r;++a)n=t[a],n.label=this._tickFormatFunction(n.value,a,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const a=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((a.start+r)*a.factor)}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const a=this.options.ticks,r=this.ctx.measureText(t).width,n=v3(this.isHorizontal()?a.maxRotation:a.minRotation),i=Math.cos(n),c=Math.sin(n),s=this._resolveTickFontOptions(0).size;return{w:r*i+s*c,h:r*c+s*i}}_getLabelCapacity(t){const a=this.options.time,r=a.displayFormats,n=r[a.unit]||r.millisecond,i=this._tickFormatFunction(t,0,Ah(this,[t],this._majorUnit),n),c=this._getLabelSize(i),s=Math.floor(this.isHorizontal()?this.width/c.w:this.height/c.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],a,r;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(a=0,r=n.length;a<r;++a)t=t.concat(n[a].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let a,r;if(t.length)return t;const n=this.getLabels();for(a=0,r=n.length;a<r;++a)t.push(Sh(this,n[a]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Vy(t.sort(Hh))}}z1(nn,"id","time"),z1(nn,"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 Ec(e,t,a){let r=0,n=e.length-1,i,c,s,o;a?(t>=e[r].pos&&t<=e[n].pos&&({lo:r,hi:n}=C4(e,"pos",t)),{pos:i,time:s}=e[r],{pos:c,time:o}=e[n]):(t>=e[r].time&&t<=e[n].time&&({lo:r,hi:n}=C4(e,"time",t)),{time:i,pos:s}=e[r],{time:c,pos:o}=e[n]);const l=c-i;return l?s+(o-s)*(t-i)/l:s}class No extends nn{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),a=this._table=this.buildLookupTable(t);this._minPos=Ec(a,this.min),this._tableRange=Ec(a,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:a,max:r}=this,n=[],i=[];let c,s,o,l,f;for(c=0,s=t.length;c<s;++c)l=t[c],l>=a&&l<=r&&n.push(l);if(n.length<2)return[{time:a,pos:0},{time:r,pos:1}];for(c=0,s=n.length;c<s;++c)f=n[c+1],o=n[c-1],l=n[c],Math.round((f+o)/2)!==l&&i.push({time:l,pos:c/(s-1)});return i}_generate(){const t=this.min,a=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(a)||r.length===1)&&r.push(a),r.sort((n,i)=>n-i)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const a=this.getDataTimestamps(),r=this.getLabelTimestamps();return a.length&&r.length?t=this.normalize(a.concat(r)):t=a.length?a:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Ec(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return Ec(this._table,r*this._tableRange+this._minPos,!0)}}z1(No,"id","timeseries"),z1(No,"defaults",nn.defaults);var XW=Object.freeze({__proto__:null,CategoryScale:Ao,LinearScale:Vo,LogarithmicScale:To,RadialLinearScale:ir,TimeScale:nn,TimeSeriesScale:No});const KW=[tq,Vj,HW,XW];var ZW=typeof global=="object"&&global&&global.Object===Object&&global;const xx=ZW;var QW=typeof self=="object"&&self&&self.Object===Object&&self,JW=xx||QW||Function("return this")();const n4=JW;var eG=n4.Symbol;const z0=eG;var bx=Object.prototype,tG=bx.hasOwnProperty,aG=bx.toString,G6=z0?z0.toStringTag:void 0;function rG(e){var t=tG.call(e,G6),a=e[G6];try{e[G6]=void 0;var r=!0}catch{}var n=aG.call(e);return r&&(t?e[G6]=a:delete e[G6]),n}var nG=Object.prototype,cG=nG.toString;function iG(e){return cG.call(e)}var sG="[object Null]",oG="[object Undefined]",Vh=z0?z0.toStringTag:void 0;function On(e){return e==null?e===void 0?oG:sG:Vh&&Vh in Object(e)?rG(e):iG(e)}function ha(e){return e!=null&&typeof e=="object"}var lG=Array.isArray;const d6=lG;function Pn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var fG="[object AsyncFunction]",uG="[object Function]",dG="[object GeneratorFunction]",hG="[object Proxy]";function Cx(e){if(!Pn(e))return!1;var t=On(e);return t==uG||t==dG||t==fG||t==hG}var mG=n4["__core-js_shared__"];const ls=mG;var Th=function(){var e=/[^.]+$/.exec(ls&&ls.keys&&ls.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function pG(e){return!!Th&&Th in e}var vG=Function.prototype,gG=vG.toString;function Ma(e){if(e!=null){try{return gG.call(e)}catch{}try{return e+""}catch{}}return""}var yG=/[\\^$.*+?()[\]{}|]/g,xG=/^\[object .+?Constructor\]$/,bG=Function.prototype,CG=Object.prototype,MG=bG.toString,zG=CG.hasOwnProperty,wG=RegExp("^"+MG.call(zG).replace(yG,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _G(e){if(!Pn(e)||pG(e))return!1;var t=Cx(e)?wG:xG;return t.test(Ma(e))}function HG(e,t){return e==null?void 0:e[t]}function za(e,t){var a=HG(e,t);return _G(a)?a:void 0}var SG=za(n4,"WeakMap");const Oo=SG;var Eh=Object.create,LG=function(){function e(){}return function(t){if(!Pn(t))return{};if(Eh)return Eh(t);e.prototype=t;var a=new e;return e.prototype=void 0,a}}();const kG=LG;function AG(e,t){var a=-1,r=e.length;for(t||(t=Array(r));++a<r;)t[a]=e[a];return t}var VG=function(){try{var e=za(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Nh=VG;function TG(e,t){for(var a=-1,r=e==null?0:e.length;++a<r&&t(e[a],a,e)!==!1;);return e}var EG=9007199254740991,NG=/^(?:0|[1-9]\d*)$/;function OG(e,t){var a=typeof e;return t=t??EG,!!t&&(a=="number"||a!="symbol"&&NG.test(e))&&e>-1&&e%1==0&&e<t}function Mx(e,t,a){t=="__proto__"&&Nh?Nh(e,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[t]=a}function Hl(e,t){return e===t||e!==e&&t!==t}var PG=Object.prototype,DG=PG.hasOwnProperty;function zx(e,t,a){var r=e[t];(!(DG.call(e,t)&&Hl(r,a))||a===void 0&&!(t in e))&&Mx(e,t,a)}function I8(e,t,a,r){var n=!a;a||(a={});for(var i=-1,c=t.length;++i<c;){var s=t[i],o=r?r(a[s],e[s],s,a,e):void 0;o===void 0&&(o=e[s]),n?Mx(a,s,o):zx(a,s,o)}return a}var RG=9007199254740991;function wx(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=RG}function Sl(e){return e!=null&&wx(e.length)&&!Cx(e)}var FG=Object.prototype;function $8(e){var t=e&&e.constructor,a=typeof t=="function"&&t.prototype||FG;return e===a}function BG(e,t){for(var a=-1,r=Array(e);++a<e;)r[a]=t(a);return r}var IG="[object Arguments]";function Oh(e){return ha(e)&&On(e)==IG}var _x=Object.prototype,$G=_x.hasOwnProperty,UG=_x.propertyIsEnumerable,qG=Oh(function(){return arguments}())?Oh:function(e){return ha(e)&&$G.call(e,"callee")&&!UG.call(e,"callee")};const Hx=qG;function jG(){return!1}var Sx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ph=Sx&&typeof module=="object"&&module&&!module.nodeType&&module,WG=Ph&&Ph.exports===Sx,Dh=WG?n4.Buffer:void 0,GG=Dh?Dh.isBuffer:void 0,YG=GG||jG;const cn=YG;var XG="[object Arguments]",KG="[object Array]",ZG="[object Boolean]",QG="[object Date]",JG="[object Error]",eY="[object Function]",tY="[object Map]",aY="[object Number]",rY="[object Object]",nY="[object RegExp]",cY="[object Set]",iY="[object String]",sY="[object WeakMap]",oY="[object ArrayBuffer]",lY="[object DataView]",fY="[object Float32Array]",uY="[object Float64Array]",dY="[object Int8Array]",hY="[object Int16Array]",mY="[object Int32Array]",pY="[object Uint8Array]",vY="[object Uint8ClampedArray]",gY="[object Uint16Array]",yY="[object Uint32Array]",X2={};X2[fY]=X2[uY]=X2[dY]=X2[hY]=X2[mY]=X2[pY]=X2[vY]=X2[gY]=X2[yY]=!0;X2[XG]=X2[KG]=X2[oY]=X2[ZG]=X2[lY]=X2[QG]=X2[JG]=X2[eY]=X2[tY]=X2[aY]=X2[rY]=X2[nY]=X2[cY]=X2[iY]=X2[sY]=!1;function xY(e){return ha(e)&&wx(e.length)&&!!X2[On(e)]}function Ll(e){return function(t){return e(t)}}var Lx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wr=Lx&&typeof module=="object"&&module&&!module.nodeType&&module,bY=wr&&wr.exports===Lx,fs=bY&&xx.process,CY=function(){try{var e=wr&&wr.require&&wr.require("util").types;return e||fs&&fs.binding&&fs.binding("util")}catch{}}();const h6=CY;var Rh=h6&&h6.isTypedArray,MY=Rh?Ll(Rh):xY;const kl=MY;var zY=Object.prototype,wY=zY.hasOwnProperty;function kx(e,t){var a=d6(e),r=!a&&Hx(e),n=!a&&!r&&cn(e),i=!a&&!r&&!n&&kl(e),c=a||r||n||i,s=c?BG(e.length,String):[],o=s.length;for(var l in e)(t||wY.call(e,l))&&!(c&&(l=="length"||n&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||OG(l,o)))&&s.push(l);return s}function Ax(e,t){return function(a){return e(t(a))}}var _Y=Ax(Object.keys,Object);const HY=_Y;var SY=Object.prototype,LY=SY.hasOwnProperty;function Vx(e){if(!$8(e))return HY(e);var t=[];for(var a in Object(e))LY.call(e,a)&&a!="constructor"&&t.push(a);return t}function Al(e){return Sl(e)?kx(e):Vx(e)}function kY(e){var t=[];if(e!=null)for(var a in Object(e))t.push(a);return t}var AY=Object.prototype,VY=AY.hasOwnProperty;function TY(e){if(!Pn(e))return kY(e);var t=$8(e),a=[];for(var r in e)r=="constructor"&&(t||!VY.call(e,r))||a.push(r);return a}function Vl(e){return Sl(e)?kx(e,!0):TY(e)}var EY=za(Object,"create");const sn=EY;function NY(){this.__data__=sn?sn(null):{},this.size=0}function OY(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var PY="__lodash_hash_undefined__",DY=Object.prototype,RY=DY.hasOwnProperty;function FY(e){var t=this.__data__;if(sn){var a=t[e];return a===PY?void 0:a}return RY.call(t,e)?t[e]:void 0}var BY=Object.prototype,IY=BY.hasOwnProperty;function $Y(e){var t=this.__data__;return sn?t[e]!==void 0:IY.call(t,e)}var UY="__lodash_hash_undefined__";function qY(e,t){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=sn&&t===void 0?UY:t,this}function ma(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}ma.prototype.clear=NY;ma.prototype.delete=OY;ma.prototype.get=FY;ma.prototype.has=$Y;ma.prototype.set=qY;function jY(){this.__data__=[],this.size=0}function U8(e,t){for(var a=e.length;a--;)if(Hl(e[a][0],t))return a;return-1}var WY=Array.prototype,GY=WY.splice;function YY(e){var t=this.__data__,a=U8(t,e);if(a<0)return!1;var r=t.length-1;return a==r?t.pop():GY.call(t,a,1),--this.size,!0}function XY(e){var t=this.__data__,a=U8(t,e);return a<0?void 0:t[a][1]}function KY(e){return U8(this.__data__,e)>-1}function ZY(e,t){var a=this.__data__,r=U8(a,e);return r<0?(++this.size,a.push([e,t])):a[r][1]=t,this}function B4(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}B4.prototype.clear=jY;B4.prototype.delete=YY;B4.prototype.get=XY;B4.prototype.has=KY;B4.prototype.set=ZY;var QY=za(n4,"Map");const on=QY;function JY(){this.size=0,this.__data__={hash:new ma,map:new(on||B4),string:new ma}}function eX(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function q8(e,t){var a=e.__data__;return eX(t)?a[typeof t=="string"?"string":"hash"]:a.map}function tX(e){var t=q8(this,e).delete(e);return this.size-=t?1:0,t}function aX(e){return q8(this,e).get(e)}function rX(e){return q8(this,e).has(e)}function nX(e,t){var a=q8(this,e),r=a.size;return a.set(e,t),this.size+=a.size==r?0:1,this}function wa(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}wa.prototype.clear=JY;wa.prototype.delete=tX;wa.prototype.get=aX;wa.prototype.has=rX;wa.prototype.set=nX;function Tx(e,t){for(var a=-1,r=t.length,n=e.length;++a<r;)e[n+a]=t[a];return e}var cX=Ax(Object.getPrototypeOf,Object);const Ex=cX;function iX(){this.__data__=new B4,this.size=0}function sX(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a}function oX(e){return this.__data__.get(e)}function lX(e){return this.__data__.has(e)}var fX=200;function uX(e,t){var a=this.__data__;if(a instanceof B4){var r=a.__data__;if(!on||r.length<fX-1)return r.push([e,t]),this.size=++a.size,this;a=this.__data__=new wa(r)}return a.set(e,t),this.size=a.size,this}function L4(e){var t=this.__data__=new B4(e);this.size=t.size}L4.prototype.clear=iX;L4.prototype.delete=sX;L4.prototype.get=oX;L4.prototype.has=lX;L4.prototype.set=uX;function dX(e,t){return e&&I8(t,Al(t),e)}function hX(e,t){return e&&I8(t,Vl(t),e)}var Nx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fh=Nx&&typeof module=="object"&&module&&!module.nodeType&&module,mX=Fh&&Fh.exports===Nx,Bh=mX?n4.Buffer:void 0,Ih=Bh?Bh.allocUnsafe:void 0;function pX(e,t){if(t)return e.slice();var a=e.length,r=Ih?Ih(a):new e.constructor(a);return e.copy(r),r}function vX(e,t){for(var a=-1,r=e==null?0:e.length,n=0,i=[];++a<r;){var c=e[a];t(c,a,e)&&(i[n++]=c)}return i}function Ox(){return[]}var gX=Object.prototype,yX=gX.propertyIsEnumerable,$h=Object.getOwnPropertySymbols,xX=$h?function(e){return e==null?[]:(e=Object(e),vX($h(e),function(t){return yX.call(e,t)}))}:Ox;const Tl=xX;function bX(e,t){return I8(e,Tl(e),t)}var CX=Object.getOwnPropertySymbols,MX=CX?function(e){for(var t=[];e;)Tx(t,Tl(e)),e=Ex(e);return t}:Ox;const Px=MX;function zX(e,t){return I8(e,Px(e),t)}function Dx(e,t,a){var r=t(e);return d6(e)?r:Tx(r,a(e))}function Po(e){return Dx(e,Al,Tl)}function wX(e){return Dx(e,Vl,Px)}var _X=za(n4,"DataView");const Do=_X;var HX=za(n4,"Promise");const Ro=HX;var SX=za(n4,"Set");const Fo=SX;var Uh="[object Map]",LX="[object Object]",qh="[object Promise]",jh="[object Set]",Wh="[object WeakMap]",Gh="[object DataView]",kX=Ma(Do),AX=Ma(on),VX=Ma(Ro),TX=Ma(Fo),EX=Ma(Oo),U0=On;(Do&&U0(new Do(new ArrayBuffer(1)))!=Gh||on&&U0(new on)!=Uh||Ro&&U0(Ro.resolve())!=qh||Fo&&U0(new Fo)!=jh||Oo&&U0(new Oo)!=Wh)&&(U0=function(e){var t=On(e),a=t==LX?e.constructor:void 0,r=a?Ma(a):"";if(r)switch(r){case kX:return Gh;case AX:return Uh;case VX:return qh;case TX:return jh;case EX:return Wh}return t});const m6=U0;var NX=Object.prototype,OX=NX.hasOwnProperty;function PX(e){var t=e.length,a=new e.constructor(t);return t&&typeof e[0]=="string"&&OX.call(e,"index")&&(a.index=e.index,a.input=e.input),a}var DX=n4.Uint8Array;const qi=DX;function El(e){var t=new e.constructor(e.byteLength);return new qi(t).set(new qi(e)),t}function RX(e,t){var a=t?El(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.byteLength)}var FX=/\w*$/;function BX(e){var t=new e.constructor(e.source,FX.exec(e));return t.lastIndex=e.lastIndex,t}var Yh=z0?z0.prototype:void 0,Xh=Yh?Yh.valueOf:void 0;function IX(e){return Xh?Object(Xh.call(e)):{}}function $X(e,t){var a=t?El(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}var UX="[object Boolean]",qX="[object Date]",jX="[object Map]",WX="[object Number]",GX="[object RegExp]",YX="[object Set]",XX="[object String]",KX="[object Symbol]",ZX="[object ArrayBuffer]",QX="[object DataView]",JX="[object Float32Array]",eK="[object Float64Array]",tK="[object Int8Array]",aK="[object Int16Array]",rK="[object Int32Array]",nK="[object Uint8Array]",cK="[object Uint8ClampedArray]",iK="[object Uint16Array]",sK="[object Uint32Array]";function oK(e,t,a){var r=e.constructor;switch(t){case ZX:return El(e);case UX:case qX:return new r(+e);case QX:return RX(e,a);case JX:case eK:case tK:case aK:case rK:case nK:case cK:case iK:case sK:return $X(e,a);case jX:return new r;case WX:case XX:return new r(e);case GX:return BX(e);case YX:return new r;case KX:return IX(e)}}function lK(e){return typeof e.constructor=="function"&&!$8(e)?kG(Ex(e)):{}}var fK="[object Map]";function uK(e){return ha(e)&&m6(e)==fK}var Kh=h6&&h6.isMap,dK=Kh?Ll(Kh):uK;const hK=dK;var mK="[object Set]";function pK(e){return ha(e)&&m6(e)==mK}var Zh=h6&&h6.isSet,vK=Zh?Ll(Zh):pK;const gK=vK;var yK=1,xK=2,bK=4,Rx="[object Arguments]",CK="[object Array]",MK="[object Boolean]",zK="[object Date]",wK="[object Error]",Fx="[object Function]",_K="[object GeneratorFunction]",HK="[object Map]",SK="[object Number]",Bx="[object Object]",LK="[object RegExp]",kK="[object Set]",AK="[object String]",VK="[object Symbol]",TK="[object WeakMap]",EK="[object ArrayBuffer]",NK="[object DataView]",OK="[object Float32Array]",PK="[object Float64Array]",DK="[object Int8Array]",RK="[object Int16Array]",FK="[object Int32Array]",BK="[object Uint8Array]",IK="[object Uint8ClampedArray]",$K="[object Uint16Array]",UK="[object Uint32Array]",I2={};I2[Rx]=I2[CK]=I2[EK]=I2[NK]=I2[MK]=I2[zK]=I2[OK]=I2[PK]=I2[DK]=I2[RK]=I2[FK]=I2[HK]=I2[SK]=I2[Bx]=I2[LK]=I2[kK]=I2[AK]=I2[VK]=I2[BK]=I2[IK]=I2[$K]=I2[UK]=!0;I2[wK]=I2[Fx]=I2[TK]=!1;function ui(e,t,a,r,n,i){var c,s=t&yK,o=t&xK,l=t&bK;if(a&&(c=n?a(e,r,n,i):a(e)),c!==void 0)return c;if(!Pn(e))return e;var f=d6(e);if(f){if(c=PX(e),!s)return AG(e,c)}else{var d=m6(e),h=d==Fx||d==_K;if(cn(e))return pX(e,s);if(d==Bx||d==Rx||h&&!n){if(c=o||h?{}:lK(e),!s)return o?zX(e,hX(c,e)):bX(e,dX(c,e))}else{if(!I2[d])return n?e:{};c=oK(e,d,s)}}i||(i=new L4);var m=i.get(e);if(m)return m;i.set(e,c),gK(e)?e.forEach(function(g){c.add(ui(g,t,a,g,e,i))}):hK(e)&&e.forEach(function(g,y){c.set(y,ui(g,t,a,y,e,i))});var p=l?o?wX:Po:o?Vl:Al,v=f?void 0:p(e);return TG(v||e,function(g,y){v&&(y=g,g=e[y]),zx(c,y,ui(g,t,a,y,e,i))}),c}var qK=1,jK=4;function Y6(e){return ui(e,qK|jK)}var WK="__lodash_hash_undefined__";function GK(e){return this.__data__.set(e,WK),this}function YK(e){return this.__data__.has(e)}function ji(e){var t=-1,a=e==null?0:e.length;for(this.__data__=new wa;++t<a;)this.add(e[t])}ji.prototype.add=ji.prototype.push=GK;ji.prototype.has=YK;function XK(e,t){for(var a=-1,r=e==null?0:e.length;++a<r;)if(t(e[a],a,e))return!0;return!1}function KK(e,t){return e.has(t)}var ZK=1,QK=2;function Ix(e,t,a,r,n,i){var c=a&ZK,s=e.length,o=t.length;if(s!=o&&!(c&&o>s))return!1;var l=i.get(e),f=i.get(t);if(l&&f)return l==t&&f==e;var d=-1,h=!0,m=a&QK?new ji:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var p=e[d],v=t[d];if(r)var g=c?r(v,p,d,t,e,i):r(p,v,d,e,t,i);if(g!==void 0){if(g)continue;h=!1;break}if(m){if(!XK(t,function(y,x){if(!KK(m,x)&&(p===y||n(p,y,a,r,i)))return m.push(x)})){h=!1;break}}else if(!(p===v||n(p,v,a,r,i))){h=!1;break}}return i.delete(e),i.delete(t),h}function JK(e){var t=-1,a=Array(e.size);return e.forEach(function(r,n){a[++t]=[n,r]}),a}function eZ(e){var t=-1,a=Array(e.size);return e.forEach(function(r){a[++t]=r}),a}var tZ=1,aZ=2,rZ="[object Boolean]",nZ="[object Date]",cZ="[object Error]",iZ="[object Map]",sZ="[object Number]",oZ="[object RegExp]",lZ="[object Set]",fZ="[object String]",uZ="[object Symbol]",dZ="[object ArrayBuffer]",hZ="[object DataView]",Qh=z0?z0.prototype:void 0,us=Qh?Qh.valueOf:void 0;function mZ(e,t,a,r,n,i,c){switch(a){case hZ:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case dZ:return!(e.byteLength!=t.byteLength||!i(new qi(e),new qi(t)));case rZ:case nZ:case sZ:return Hl(+e,+t);case cZ:return e.name==t.name&&e.message==t.message;case oZ:case fZ:return e==t+"";case iZ:var s=JK;case lZ:var o=r&tZ;if(s||(s=eZ),e.size!=t.size&&!o)return!1;var l=c.get(e);if(l)return l==t;r|=aZ,c.set(e,t);var f=Ix(s(e),s(t),r,n,i,c);return c.delete(e),f;case uZ:if(us)return us.call(e)==us.call(t)}return!1}var pZ=1,vZ=Object.prototype,gZ=vZ.hasOwnProperty;function yZ(e,t,a,r,n,i){var c=a&pZ,s=Po(e),o=s.length,l=Po(t),f=l.length;if(o!=f&&!c)return!1;for(var d=o;d--;){var h=s[d];if(!(c?h in t:gZ.call(t,h)))return!1}var m=i.get(e),p=i.get(t);if(m&&p)return m==t&&p==e;var v=!0;i.set(e,t),i.set(t,e);for(var g=c;++d<o;){h=s[d];var y=e[h],x=t[h];if(r)var C=c?r(x,y,h,t,e,i):r(y,x,h,e,t,i);if(!(C===void 0?y===x||n(y,x,a,r,i):C)){v=!1;break}g||(g=h=="constructor")}if(v&&!g){var b=e.constructor,M=t.constructor;b!=M&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof M=="function"&&M instanceof M)&&(v=!1)}return i.delete(e),i.delete(t),v}var xZ=1,Jh="[object Arguments]",em="[object Array]",Nc="[object Object]",bZ=Object.prototype,tm=bZ.hasOwnProperty;function CZ(e,t,a,r,n,i){var c=d6(e),s=d6(t),o=c?em:m6(e),l=s?em:m6(t);o=o==Jh?Nc:o,l=l==Jh?Nc:l;var f=o==Nc,d=l==Nc,h=o==l;if(h&&cn(e)){if(!cn(t))return!1;c=!0,f=!1}if(h&&!f)return i||(i=new L4),c||kl(e)?Ix(e,t,a,r,n,i):mZ(e,t,o,a,r,n,i);if(!(a&xZ)){var m=f&&tm.call(e,"__wrapped__"),p=d&&tm.call(t,"__wrapped__");if(m||p){var v=m?e.value():e,g=p?t.value():t;return i||(i=new L4),n(v,g,a,r,i)}}return h?(i||(i=new L4),yZ(e,t,a,r,n,i)):!1}function $x(e,t,a,r,n){return e===t?!0:e==null||t==null||!ha(e)&&!ha(t)?e!==e&&t!==t:CZ(e,t,a,r,$x,n)}var MZ="[object Map]",zZ="[object Set]",wZ=Object.prototype,_Z=wZ.hasOwnProperty;function HZ(e){if(e==null)return!0;if(Sl(e)&&(d6(e)||typeof e=="string"||typeof e.splice=="function"||cn(e)||kl(e)||Hx(e)))return!e.length;var t=m6(e);if(t==MZ||t==zZ)return!e.size;if($8(e))return!Vx(e).length;for(var a in e)if(_Z.call(e,a))return!1;return!0}function am(e,t){return $x(e,t)}var SZ=Object.defineProperty,LZ=Object.defineProperties,kZ=Object.getOwnPropertyDescriptors,rm=Object.getOwnPropertySymbols,AZ=Object.prototype.hasOwnProperty,VZ=Object.prototype.propertyIsEnumerable,nm=(e,t,a)=>t in e?SZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,TZ=(e,t)=>{for(var a in t||(t={}))AZ.call(t,a)&&nm(e,a,t[a]);if(rm)for(var a of rm(t))VZ.call(t,a)&&nm(e,a,t[a]);return e},EZ=(e,t)=>LZ(e,kZ(t));function NZ(e){return(e.match(/[a-zA-Z0-9]+/g)||[]).map(t=>`${t.charAt(0).toUpperCase()}${t.slice(1)}`).join("")}var L0=(e,t)=>{const a={chartData:{type:Object,required:!0},options:{type:Object,required:!1},chartId:{default:e,type:String},width:{default:400,type:Number},height:{default:400,type:Number},cssClasses:{type:String,default:""},styles:{type:Object},plugins:{type:Array,default:()=>[]},onLabelsUpdate:{type:Function},onChartUpdate:{type:Function},onChartDestroy:{type:Function},onChartRender:{type:Function}},r=NZ(e);return u.defineComponent({name:r,props:a,emits:{"labels:update":()=>!0,"chart:update":n=>!0,"chart:destroy":()=>!0,"chart:render":n=>!0},setup(n,{emit:i,expose:c}){const s=u.ref(null),o=`${n.chartId}`;let l=u.shallowRef(null);u.watch(()=>n.chartData,f,{deep:!0}),u.watch(()=>n.options,g=>{l.value&&g&&(l.value.options=Y6(g),p())},{deep:!0});function f(g){if(l.value){let y=l.value;am(g.labels,l.value.data.labels)||(y.data.labels=g.labels,h()),am(g.datasets,l.value.data.datasets)||g.datasets.forEach((x,C)=>{var b,M;if(HZ(x))y.data.datasets=[];else{const w=Y6(y.data),z=Object.keys((M=(b=w.datasets)==null?void 0:b[C])!=null?M:{}),_=Object.keys(x);z.filter(k=>k!=="_meta"&&_.indexOf(k)===-1).forEach(k=>{y.data.datasets[C]&&delete y.data.datasets[C][k]});for(const k in x){const H=Y6(x[k]);y.data.datasets[C]||(y.data.datasets[C]={}),x.hasOwnProperty(k)&&H!=null&&y&&(y.data.datasets[C][k]=H)}}}),p()}else l.value&&v(),d()}function d(){s.value?(l.value=new v4(s.value,{data:Y6(n.chartData),type:t,options:Y6(n.options),plugins:n.plugins}),m()):console.error(`Error on component ${r}, canvas cannot be rendered. Check if the render appends server-side`)}function h(){i("labels:update"),n.onLabelsUpdate&&n.onLabelsUpdate()}function m(){l.value&&(i("chart:render",l.value),n.onChartRender&&n.onChartRender(l.value))}function p(){l.value&&(l.value.update(),i("chart:update",l.value),n.onChartUpdate&&n.onChartUpdate(l.value))}function v(){l.value&&l.value.destroy(),i("chart:destroy"),n.onChartDestroy&&n.onChartDestroy()}return u.onMounted(d),u.onBeforeUnmount(()=>{l.value&&l.value.destroy()}),c({canvasRef:s,renderChart:d,chartInstance:l,canvasId:o,update:p}),()=>u.h("div",{style:EZ(TZ({maxWidth:"100%"},n.styles),{position:"relative"}),class:n.cssClasses},[u.h("canvas",{style:{maxWidth:"100%",maxHeight:"100%"},id:o,width:n.width,height:n.height,ref:s})])}})};L0("bar-chart","bar");var OZ=L0("doughnut-chart","doughnut");L0("line-chart","line");L0("pie-chart","pie");L0("polar-chart","polarArea");L0("radar-chart","radar");L0("bubble-chart","bubble");L0("scatter-chart","scatter");const PZ=u.defineComponent({__name:"PgaDoughnutChart",props:{data:{},options:{}},setup(e){v4.register(...KW);const t={responsive:!0};return(a,r)=>(u.openBlock(),u.createBlock(u.unref(OZ),{chartData:a.data,options:a.options||t},null,8,["chartData","options"]))}}),DZ={key:0},RZ={key:1,class:"barcodes-container"},FZ=u.defineComponent({__name:"PgaDisplayBarcodes",props:{barcodes:{}},setup(e){return(t,a)=>t.barcodes.length?(u.openBlock(),u.createElementBlock("div",RZ,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(t.barcodes,r=>(u.openBlock(),u.createElementBlock("span",{class:"barcode",key:r},[u.createVNode(We,{icon:"barcode"}),u.createTextVNode("   "+u.toDisplayString(r),1)]))),128))])):(u.openBlock(),u.createElementBlock("span",DZ,"-"))}});const BZ=X1(FZ,[["__scopeId","data-v-5291a54d"]]),IZ=["textContent"],$Z=u.defineComponent({__name:"PgaDisplayDatetime",props:{datetime:{},withoutBackground:{type:Boolean}},setup(e){const t=e,a=u.computed(()=>t.datetime instanceof Date),r=u.computed(()=>a.value?i6(t.datetime,{format:"short",withTime:!1}):"-"),n=u.computed(()=>a.value?i6(t.datetime,{justTime:!0}):"");return(i,c)=>{const s=u.resolveDirective("tooltip");return a.value?u.withDirectives((u.openBlock(),u.createElementBlock("div",{key:1,class:u.normalizeClass(["pga-datetime",{"pga-datetime__with-background":!i.withoutBackground}])},[u.createVNode(Be,{icon:"calendar-days",text:r.value,nowrap:""},null,8,["text"])],2)),[[s,n.value]]):(u.openBlock(),u.createElementBlock("span",{key:0,textContent:u.toDisplayString(r.value)},null,8,IZ))}}});const UZ=X1($Z,[["__scopeId","data-v-b6b9d53f"]]),qZ={class:"info-card"},jZ={class:"info-card--icon-container"},WZ={class:"info-card--content-container"},GZ={class:"info-card--content"},YZ=["textContent"],XZ=u.defineComponent({__name:"PgaDisplayInfo",props:{type:{default:"info"},info:{}},setup(e){u.useCssVars(c=>({"25f5bc6c":n.value,"41d953fb":i.value}));const t=e,a=u.computed(()=>{if(t.type==="info")return"circle-info";if(t.type==="success")return"circle-check";if(t.type==="error")return"circle-xmark";if(t.type==="warning")return"circle-exclamation"}),r=u.computed(()=>{if(t.type==="info")return"aqua";if(t.type==="success")return"success";if(t.type==="error")return"danger";if(t.type==="warning")return"warning"}),n=u.computed(()=>`var(--pga-color-${r.value}-08)`),i=u.computed(()=>`var(--pga-color-${r.value}-contrast)`);return(c,s)=>{const o=u.resolveComponent("PgaIcon");return u.openBlock(),u.createElementBlock("div",qZ,[u.createElementVNode("div",jZ,[u.createVNode(o,{class:"info-card--icon",icon:a.value},null,8,["icon"])]),u.createElementVNode("div",WZ,[u.createElementVNode("div",GZ,[c.info?(u.openBlock(),u.createElementBlock("span",{key:0,textContent:u.toDisplayString(c.info)},null,8,YZ)):u.renderSlot(c.$slots,"default",{key:1},void 0,!0)])])])}}});const KZ=X1(XZ,[["__scopeId","data-v-818880c0"]]),ZZ={key:0,class:"no-items-container"},QZ={key:1,class:"no-items"},JZ=u.defineComponent({__name:"PgaDisplayNoItems",props:{items:{},label:{},icon:{default:"filter-circle-xmark"},preventDisplayIcon:{type:Boolean},isLoading:{type:Boolean}},setup(e){const t=e,a=ae("pgaDisplayNoItems"),r=u.computed(()=>{var i;return!(((i=t.items)==null?void 0:i.length)>0)}),n=u.computed(()=>t.label?t.label:a("noItemsText"));return(i,c)=>r.value?(u.openBlock(),u.createElementBlock("div",ZZ,[i.isLoading?(u.openBlock(),u.createBlock(S6,{key:0})):(u.openBlock(),u.createElementBlock("div",QZ,[i.preventDisplayIcon?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(We,{key:0,class:"no-items--icon",icon:i.icon},null,8,["icon"])),u.createVNode(Be,{class:"no-items--text",text:n.value},null,8,["text"])]))])):u.createCommentVNode("",!0)}});const Ux=X1(JZ,[["__scopeId","data-v-2f2a188f"]]),eQ=["textContent"],tQ={key:0,class:"price-sign",textContent:"$"},aQ=["textContent"],rQ=u.defineComponent({__name:"PgaDisplayPrice",props:{price:{},tooltipPrice:{},size:{default:"m"},color:{default:"first"},numOfDecimals:{},withoutSign:{type:Boolean},withoutBackground:{type:Boolean},isPositive:{type:Boolean,default:void 0}},setup(e){u.useCssVars(l=>({"38848f50":c.value,"885cde0a":o.value,"35f9cc2e":i.value,"4d380636":s.value}));const t=e,a=u.computed(()=>t.price!==void 0),r=u.computed(()=>a.value?typeof t.price=="string"?t.price:gi(t.price,t.numOfDecimals):"-"),n=u.computed(()=>t.tooltipPrice===void 0?"":typeof t.tooltipPrice=="string"?t.tooltipPrice:`$ ${gi(t.tooltipPrice,t.numOfDecimals)}`),i=u.computed(()=>{if(t.size==="s")return"0.9rem";if(t.size==="m")return"1rem";if(t.size==="l")return"1.1rem"}),c=u.computed(()=>{if(t.size==="s")return"0.7rem";if(t.size==="m")return"0.8rem";if(t.size==="l")return"0.9rem"}),s=u.computed(()=>`var(--pga-color-${t.color})`),o=u.computed(()=>{if(t.color==="first")return"var(--pga-color-second)";if(t.color==="second")return"var(--pga-color-third)"});return(l,f)=>{const d=u.resolveDirective("tooltip");return a.value?u.withDirectives((u.openBlock(),u.createElementBlock("span",{key:1,class:u.normalizeClass(["price-container",{"price-container__with-background":!l.withoutBackground}])},[l.withoutSign?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("span",tQ)),u.createElementVNode("span",{class:u.normalizeClass(["price",{price__positive:l.isPositive===!0,price__negative:l.isPositive===!1}]),textContent:u.toDisplayString(r.value)},null,10,aQ)],2)),[[d,n.value]]):(u.openBlock(),u.createElementBlock("span",{key:0,textContent:u.toDisplayString(r.value)},null,8,eQ))}}});const nQ=X1(rQ,[["__scopeId","data-v-97b7f73d"]]),cQ=u.defineComponent({__name:"PgaForm",props:{width:{default:"100%"},withBackground:{type:Boolean}},setup(e){return u.useCssVars(t=>({"2c76cdb4":t.width})),(t,a)=>(u.openBlock(),u.createElementBlock("form",{class:u.normalizeClass(["pga-form",{"pga-form__with-background":t.withBackground}]),onSubmit:a[0]||(a[0]=u.withModifiers(()=>{},["prevent"]))},[u.renderSlot(t.$slots,"default",{},void 0,!0)],34))}});const qx=X1(cQ,[["__scopeId","data-v-a4b040e2"]]),jx=u.defineComponent({__name:"PgaFormButton",props:{icon:{},text:{type:[String,Number,Function]},isLoading:{type:Boolean}},setup(e){return(t,a)=>(u.openBlock(),u.createBlock(j2,{type:"submit",icon:t.icon,text:t.text,isLoading:t.isLoading},null,8,["icon","text","isLoading"]))}});const iQ={},sQ={class:"pga-form-row"};function oQ(e,t){return u.openBlock(),u.createElementBlock("div",sQ,[u.renderSlot(e.$slots,"default")])}const lQ=X1(iQ,[["render",oQ]]),fQ=u.defineComponent({__name:"PgaFormSubtitle",props:{title:{type:[String,Number,Function]}},setup(e){return(t,a)=>{const r=u.resolveComponent("PgaDisplayText");return u.openBlock(),u.createBlock(r,{class:"pga-form-subtitle",text:t.title},null,8,["text"])}}});const uQ=X1(fQ,[["__scopeId","data-v-488b1ab9"]]),dQ=u.defineComponent({__name:"PgaFormTitle",props:{title:{type:[String,Number,Function]}},setup(e){return(t,a)=>{const r=u.resolveComponent("PgaDisplayText");return u.openBlock(),u.createBlock(r,{class:"pga-form-title",text:t.title},null,8,["text"])}}});const hQ=X1(dQ,[["__scopeId","data-v-46e35803"]]),mQ={key:0,class:"input-group--header"},pQ=["textContent"],vQ=["textContent"],gQ={key:1,class:"input-group--errors"},yQ=["textContent"],xQ=u.defineComponent({__name:"PgaInputGroup",props:{label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},fitContent:{type:Boolean},grow:{}},setup(e){u.useCssVars(i=>({"24d6ac48":i.grow}));const t=e,a=ae("pgaInputGroup"),r=u.computed(()=>t.label||t.withLabelSpace),n=u.computed(()=>t.label?t.label:" ");return(i,c)=>{const s=u.resolveComponent("PgaIcon");return u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["input-group",{"input-group__fit-content":i.fitContent,"input-group__with-flex-grow":i.grow!==void 0}])},[r.value||i.withOptionalLabel?(u.openBlock(),u.createElementBlock("div",mQ,[r.value?(u.openBlock(),u.createElementBlock("label",{key:0,class:"header--label",textContent:u.toDisplayString(n.value)},null,8,pQ)):u.createCommentVNode("",!0),i.withOptionalLabel?(u.openBlock(),u.createElementBlock("span",{key:1,class:"header--optional",textContent:u.toDisplayString(u.unref(a)("optionalLabel"))},null,8,vQ)):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0),u.renderSlot(i.$slots,"default",{},void 0,!0),i.errors?(u.openBlock(),u.createElementBlock("div",gQ,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.errors,(o,l)=>(u.openBlock(),u.createElementBlock("div",{key:l,class:"errors--error"},[u.createVNode(s,{class:"error--icon",icon:["fas","triangle-exclamation"]}),u.createElementVNode("span",{class:"error--message",textContent:u.toDisplayString(o.$message)},null,8,yQ)]))),128))])):u.createCommentVNode("",!0)],2)}}});const It=X1(xQ,[["__scopeId","data-v-1521aa1a"]]);function cm(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function K4(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?cm(Object(a),!0).forEach(function(r){bQ(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):cm(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function bQ(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function im(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(e).reduce((a,r)=>(t.includes(r)||(a[r]=u.unref(e[r])),a),{})}function Wi(e){return typeof e=="function"}function CQ(e){return u.isReactive(e)||u.isReadonly(e)}function Wx(e,t,a){let r=e;const n=t.split(".");for(let i=0;i<n.length;i++){if(!r[n[i]])return a;r=r[n[i]]}return r}function ds(e,t,a){return u.computed(()=>e.some(r=>Wx(t,r,{[a]:!1})[a]))}function sm(e,t,a){return u.computed(()=>e.reduce((r,n)=>{const i=Wx(t,n,{[a]:!1})[a]||[];return r.concat(i)},[]))}function Gx(e,t,a,r){return e.call(r,u.unref(t),u.unref(a),r)}function Yx(e){return e.$valid!==void 0?!e.$valid:!e}function MQ(e,t,a,r,n,i,c){let{$lazy:s,$rewardEarly:o}=n,l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],f=arguments.length>8?arguments[8]:void 0,d=arguments.length>9?arguments[9]:void 0,h=arguments.length>10?arguments[10]:void 0;const m=u.ref(!!r.value),p=u.ref(0);a.value=!1;const v=u.watch([t,r].concat(l,h),()=>{if(s&&!r.value||o&&!d.value&&!a.value)return;let g;try{g=Gx(e,t,f,c)}catch(y){g=Promise.reject(y)}p.value++,a.value=!!p.value,m.value=!1,Promise.resolve(g).then(y=>{p.value--,a.value=!!p.value,i.value=y,m.value=Yx(y)}).catch(y=>{p.value--,a.value=!!p.value,i.value=y,m.value=!0})},{immediate:!0,deep:typeof t=="object"});return{$invalid:m,$unwatch:v}}function zQ(e,t,a,r,n,i,c,s){let{$lazy:o,$rewardEarly:l}=r;const f=()=>({}),d=u.computed(()=>{if(o&&!a.value||l&&!s.value)return!1;let h=!0;try{const m=Gx(e,t,c,i);n.value=m,h=Yx(m)}catch(m){n.value=m}return h});return{$unwatch:f,$invalid:d}}function wQ(e,t,a,r,n,i,c,s,o,l,f){const d=u.ref(!1),h=e.$params||{},m=u.ref(null);let p,v;e.$async?{$invalid:p,$unwatch:v}=MQ(e.$validator,t,d,a,r,m,n,e.$watchTargets,o,l,f):{$invalid:p,$unwatch:v}=zQ(e.$validator,t,a,r,m,n,o,l);const g=e.$message;return{$message:Wi(g)?u.computed(()=>g(im({$pending:d,$invalid:p,$params:im(h),$model:t,$response:m,$validator:i,$propertyPath:s,$property:c}))):g||"",$params:h,$pending:d,$invalid:p,$response:m,$unwatch:v}}function _Q(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=u.unref(e),a=Object.keys(t),r={},n={},i={};let c=null;return a.forEach(s=>{const o=t[s];switch(!0){case Wi(o.$validator):r[s]=o;break;case Wi(o):r[s]={$validator:o};break;case s==="$validationGroups":c=o;break;case s.startsWith("$"):i[s]=o;break;default:n[s]=o}}),{rules:r,nestedValidators:n,config:i,validationGroups:c}}const HQ="__root";function SQ(e,t,a,r,n,i,c,s,o){const l=Object.keys(e),f=r.get(n,e),d=u.ref(!1),h=u.ref(!1),m=u.ref(0);if(f){if(!f.$partial)return f;f.$unwatch(),d.value=f.$dirty.value}const p={$dirty:d,$path:n,$touch:()=>{d.value||(d.value=!0)},$reset:()=>{d.value&&(d.value=!1)},$commit:()=>{}};return l.length?(l.forEach(v=>{p[v]=wQ(e[v],t,p.$dirty,i,c,v,a,n,o,h,m)}),p.$externalResults=u.computed(()=>s.value?[].concat(s.value).map((v,g)=>({$propertyPath:n,$property:a,$validator:"$externalResults",$uid:`${n}-externalResult-${g}`,$message:v,$params:{},$response:null,$pending:!1})):[]),p.$invalid=u.computed(()=>{const v=l.some(g=>u.unref(p[g].$invalid));return h.value=v,!!p.$externalResults.value.length||v}),p.$pending=u.computed(()=>l.some(v=>u.unref(p[v].$pending))),p.$error=u.computed(()=>p.$dirty.value?p.$pending.value||p.$invalid.value:!1),p.$silentErrors=u.computed(()=>l.filter(v=>u.unref(p[v].$invalid)).map(v=>{const g=p[v];return u.reactive({$propertyPath:n,$property:a,$validator:v,$uid:`${n}-${v}`,$message:g.$message,$params:g.$params,$response:g.$response,$pending:g.$pending})}).concat(p.$externalResults.value)),p.$errors=u.computed(()=>p.$dirty.value?p.$silentErrors.value:[]),p.$unwatch=()=>l.forEach(v=>{p[v].$unwatch()}),p.$commit=()=>{h.value=!0,m.value=Date.now()},r.set(n,e,p),p):(f&&r.set(n,e,p),p)}function LQ(e,t,a,r,n,i,c){const s=Object.keys(e);return s.length?s.reduce((o,l)=>(o[l]=Bo({validations:e[l],state:t,key:l,parentKey:a,resultsCache:r,globalConfig:n,instance:i,externalResults:c}),o),{}):{}}function kQ(e,t,a){const r=u.computed(()=>[t,a].filter(p=>p).reduce((p,v)=>p.concat(Object.values(u.unref(v))),[])),n=u.computed({get(){return e.$dirty.value||(r.value.length?r.value.every(p=>p.$dirty):!1)},set(p){e.$dirty.value=p}}),i=u.computed(()=>{const p=u.unref(e.$silentErrors)||[],v=r.value.filter(g=>(u.unref(g).$silentErrors||[]).length).reduce((g,y)=>g.concat(...y.$silentErrors),[]);return p.concat(v)}),c=u.computed(()=>{const p=u.unref(e.$errors)||[],v=r.value.filter(g=>(u.unref(g).$errors||[]).length).reduce((g,y)=>g.concat(...y.$errors),[]);return p.concat(v)}),s=u.computed(()=>r.value.some(p=>p.$invalid)||u.unref(e.$invalid)||!1),o=u.computed(()=>r.value.some(p=>u.unref(p.$pending))||u.unref(e.$pending)||!1),l=u.computed(()=>r.value.some(p=>p.$dirty)||r.value.some(p=>p.$anyDirty)||n.value),f=u.computed(()=>n.value?o.value||s.value:!1),d=()=>{e.$touch(),r.value.forEach(p=>{p.$touch()})},h=()=>{e.$commit(),r.value.forEach(p=>{p.$commit()})},m=()=>{e.$reset(),r.value.forEach(p=>{p.$reset()})};return r.value.length&&r.value.every(p=>p.$dirty)&&d(),{$dirty:n,$errors:c,$invalid:s,$anyDirty:l,$error:f,$pending:o,$touch:d,$reset:m,$silentErrors:i,$commit:h}}function Bo(e){let{validations:t,state:a,key:r,parentKey:n,childResults:i,resultsCache:c,globalConfig:s={},instance:o,externalResults:l}=e;const f=n?`${n}.${r}`:r,{rules:d,nestedValidators:h,config:m,validationGroups:p}=_Q(t),v=K4(K4({},s),m),g=r?u.computed(()=>{const Y=u.unref(a);return Y?u.unref(Y[r]):void 0}):a,y=K4({},u.unref(l)||{}),x=u.computed(()=>{const Y=u.unref(l);return r?Y?u.unref(Y[r]):void 0:Y}),C=SQ(d,g,r,c,f,v,o,x,a),b=LQ(h,g,f,c,v,o,x),M={};p&&Object.entries(p).forEach(Y=>{let[D,V]=Y;M[D]={$invalid:ds(V,b,"$invalid"),$error:ds(V,b,"$error"),$pending:ds(V,b,"$pending"),$errors:sm(V,b,"$errors"),$silentErrors:sm(V,b,"$silentErrors")}});const{$dirty:w,$errors:z,$invalid:_,$anyDirty:S,$error:k,$pending:H,$touch:L,$reset:A,$silentErrors:N,$commit:E}=kQ(C,b,i),R=r?u.computed({get:()=>u.unref(g),set:Y=>{w.value=!0;const D=u.unref(a),V=u.unref(l);V&&(V[r]=y[r]),u.isRef(D[r])?D[r].value=Y:D[r]=Y}}):null;r&&v.$autoDirty&&u.watch(g,()=>{w.value||L();const Y=u.unref(l);Y&&(Y[r]=y[r])},{flush:"sync"});async function P(){return L(),v.$rewardEarly&&(E(),await u.nextTick()),await u.nextTick(),new Promise(Y=>{if(!H.value)return Y(!_.value);const D=u.watch(H,()=>{Y(!_.value),D()})})}function X(Y){return(i.value||{})[Y]}function B(){u.isRef(l)?l.value=y:Object.keys(y).length===0?Object.keys(l).forEach(Y=>{delete l[Y]}):Object.assign(l,y)}return u.reactive(K4(K4(K4({},C),{},{$model:R,$dirty:w,$error:k,$errors:z,$invalid:_,$anyDirty:S,$pending:H,$touch:L,$reset:A,$path:f||HQ,$silentErrors:N,$validate:P,$commit:E},i&&{$getResultsForChild:X,$clearExternalResults:B,$validationGroups:M}),b))}class AQ{constructor(){this.storage=new Map}set(t,a,r){this.storage.set(t,{rules:a,result:r})}checkRulesValidity(t,a,r){const n=Object.keys(r),i=Object.keys(a);return i.length!==n.length||!i.every(s=>n.includes(s))?!1:i.every(s=>a[s].$params?Object.keys(a[s].$params).every(o=>u.unref(r[s].$params[o])===u.unref(a[s].$params[o])):!0)}get(t,a){const r=this.storage.get(t);if(!r)return;const{rules:n,result:i}=r,c=this.checkRulesValidity(t,a,n),s=i.$unwatch?i.$unwatch:()=>({});return c?i:{$dirty:i.$dirty,$partial:!0,$unwatch:s}}}const di={COLLECT_ALL:!0,COLLECT_NONE:!1},om=Symbol("vuelidate#injectChildResults"),lm=Symbol("vuelidate#removeChildResults");function VQ(e){let{$scope:t,instance:a}=e;const r={},n=u.ref([]),i=u.computed(()=>n.value.reduce((f,d)=>(f[d]=u.unref(r[d]),f),{}));function c(f,d){let{$registerAs:h,$scope:m,$stopPropagation:p}=d;p||t===di.COLLECT_NONE||m===di.COLLECT_NONE||t!==di.COLLECT_ALL&&t!==m||(r[h]=f,n.value.push(h))}a.__vuelidateInjectInstances=[].concat(a.__vuelidateInjectInstances||[],c);function s(f){n.value=n.value.filter(d=>d!==f),delete r[f]}a.__vuelidateRemoveInstances=[].concat(a.__vuelidateRemoveInstances||[],s);const o=u.inject(om,[]);u.provide(om,a.__vuelidateInjectInstances);const l=u.inject(lm,[]);return u.provide(lm,a.__vuelidateRemoveInstances),{childResults:i,sendValidationResultsToParent:o,removeValidationResultsFromParent:l}}function Xx(e){return new Proxy(e,{get(t,a){return typeof t[a]=="object"?Xx(t[a]):u.computed(()=>t[a])}})}let fm=0;function TQ(e,t){var a;let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(r=e,e=void 0,t=void 0);let{$registerAs:n,$scope:i=di.COLLECT_ALL,$stopPropagation:c,$externalResults:s,currentVueInstance:o}=r;const l=o||((a=u.getCurrentInstance())===null||a===void 0?void 0:a.proxy),f=l?l.$options:{};n||(fm+=1,n=`_vuelidate_${fm}`);const d=u.ref({}),h=new AQ,{childResults:m,sendValidationResultsToParent:p,removeValidationResultsFromParent:v}=l?VQ({$scope:i,instance:l}):{childResults:u.ref({})};if(!e&&f.validations){const g=f.validations;t=u.ref({}),u.onBeforeMount(()=>{t.value=l,u.watch(()=>Wi(g)?g.call(t.value,new Xx(t.value)):g,y=>{d.value=Bo({validations:y,state:t,childResults:m,resultsCache:h,globalConfig:r,instance:l,externalResults:s||l.vuelidateExternalResults})},{immediate:!0})}),r=f.validationsConfig||r}else{const g=u.isRef(e)||CQ(e)?e:u.reactive(e||{});u.watch(g,y=>{d.value=Bo({validations:y,state:t,childResults:m,resultsCache:h,globalConfig:r,instance:l??{},externalResults:s})},{immediate:!0})}return l&&(p.forEach(g=>g(d,{$registerAs:n,$scope:i,$stopPropagation:c})),u.onBeforeUnmount(()=>v.forEach(g=>g(n)))),u.computed(()=>K4(K4({},u.unref(d.value)),m.value))}function um(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function ln(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?um(Object(a),!0).forEach(function(r){EQ(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):um(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function EQ(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Gi(e){return typeof e=="function"}function Io(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function j8(e){return Gi(e.$validator)?ln({},e):{$validator:e}}function Kx(e){return typeof e=="object"?e.$valid:e}function Zx(e){return e.$validator||e}function NQ(e,t){if(!Io(e))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);if(!Io(t)&&!Gi(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=j8(t);return a.$params=ln(ln({},a.$params||{}),e),a}function OQ(e,t){if(!Gi(e)&&typeof u.unref(e)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof e}`);if(!Io(t)&&!Gi(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=j8(t);return a.$message=e,a}function PQ(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const a=j8(e);return ln(ln({},a),{},{$async:!0,$watchTargets:t})}function DQ(e){return{$validator(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),n=1;n<a;n++)r[n-1]=arguments[n];return u.unref(t).reduce((i,c,s)=>{const o=Object.entries(c).reduce((l,f)=>{let[d,h]=f;const m=e[d]||{},p=Object.entries(m).reduce((v,g)=>{let[y,x]=g;const b=Zx(x).call(this,h,c,s,...r),M=Kx(b);if(v.$data[y]=b,v.$data.$invalid=!M||!!v.$data.$invalid,v.$data.$error=v.$data.$invalid,!M){let w=x.$message||"";const z=x.$params||{};typeof w=="function"&&(w=w({$pending:!1,$invalid:!M,$params:z,$model:h,$response:b})),v.$errors.push({$property:d,$message:w,$params:z,$response:b,$model:h,$pending:!1,$validator:y})}return{$valid:v.$valid&&M,$data:v.$data,$errors:v.$errors}},{$valid:!0,$data:{},$errors:[]});return l.$data[d]=p.$data,l.$errors[d]=p.$errors,{$valid:l.$valid&&p.$valid,$data:l.$data,$errors:l.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:i.$valid&&o.$valid,$data:i.$data.concat(o.$data),$errors:i.$errors.concat(o.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:t=>{let{$response:a}=t;return a?a.$errors.map(r=>Object.values(r).map(n=>n.map(i=>i.$message)).reduce((n,i)=>n.concat(i),[])):[]}}}const Dn=e=>{if(e=u.unref(e),Array.isArray(e))return!!e.length;if(e==null)return!1;if(e===!1)return!0;if(e instanceof Date)return!isNaN(e.getTime());if(typeof e=="object"){for(let t in e)return!0;return!1}return!!String(e).length},Nl=e=>(e=u.unref(e),Array.isArray(e)?e.length:typeof e=="object"?Object.keys(e).length:String(e).length);function k0(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return r=>(r=u.unref(r),!Dn(r)||t.every(n=>(n.lastIndex=0,n.test(r))))}var fn=Object.freeze({__proto__:null,forEach:DQ,len:Nl,normalizeValidatorObject:j8,regex:k0,req:Dn,unwrap:u.unref,unwrapNormalizedValidator:Zx,unwrapValidatorResponse:Kx,withAsync:PQ,withMessage:OQ,withParams:NQ});k0(/^[a-zA-Z]*$/);k0(/^[a-zA-Z0-9]*$/);k0(/^\d*(\.\d+)?$/);const RQ=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;k0(RQ);function FQ(e){return t=>!Dn(t)||Nl(t)<=u.unref(e)}function BQ(e){return{$validator:FQ(e),$message:t=>{let{$params:a}=t;return`The maximum length allowed is ${a.max}`},$params:{max:e,type:"maxLength"}}}function IQ(e){return t=>!Dn(t)||Nl(t)>=u.unref(e)}function $Q(e){return{$validator:IQ(e),$message:t=>{let{$params:a}=t;return`This field should be at least ${a.min} characters long`},$params:{min:e,type:"minLength"}}}function UQ(e){return typeof e=="string"&&(e=e.trim()),Dn(e)}var qQ={$validator:UQ,$message:"Value is required",$params:{type:"required"}};const jQ=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;k0(jQ);var WQ=k0(/(^[0-9]*$)|(^-[0-9]+$)/),GQ={$validator:WQ,$message:"Value is not an integer",$params:{type:"integer"}};k0(/^[-]?\d*(\.\d+)?$/);const W8=ae("validations"),$o=fn.withMessage(()=>W8("requiredRuleError"),qQ),Uo=e=>Qx("minLength",e),qo=e=>Qx("maxLength",e),YQ=fn.withMessage(()=>W8("integerRuleError"),GQ),XQ=e=>G8("lessEqual",e),KQ=e=>G8("greaterEqual",e),ZQ=e=>G8("lessThan",e),QQ=e=>G8("greaterThan",e);function Qx(e,t){const a={minLength:$Q,maxLength:BQ};return fn.withMessage(()=>W8(`${e}RuleError`,{length:t}),a[e](t))}function G8(e,t){const a={lessEqual:r=>r<=t,greaterEqual:r=>r>=t,lessThan:r=>r<t,greaterThan:r=>r>t};return fn.withMessage(()=>W8(`${e}RuleError`,{number:t}),fn.withParams({},r=>typeof r!="number"?!0:a[e](r)))}const JQ=u.defineComponent({__name:"PgaInputRightButton",props:{icon:{},withBackground:{type:Boolean}},setup(e){u.useCssVars(a=>({"67ed61c8":u.unref(t).input.height,"2e4c448c":u.unref(t).input.iconWidth,"01e1e082":u.unref(t).input.borderRadius,"745f0de4":u.unref(t).input.backgroundColorFocus,"747b8248":u.unref(t).input.backgroundColorHover}));const{form:t}=Mt();return(a,r)=>(u.openBlock(),u.createBlock(j2,{class:u.normalizeClass(["input-right-button",{"input-right-button__with-background":a.withBackground}]),variant:"flat",icon:a.icon,tabindex:"-1"},null,8,["class","icon"]))}});const Yi=X1(JQ,[["__scopeId","data-v-faa2f056"]]),eJ={class:"input-container"},tJ={class:"input-content"},aJ=["type","placeholder","autofocus","disabled"],hs="",rJ=u.defineComponent({__name:"PgaInput",props:u.mergeModels({type:{default:"text"},integer:{type:Boolean},placeholder:{},label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},autofocus:{type:Boolean},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:u.mergeModels(["change","enter","valueCleared"],["update:modelValue"]),setup(e,{expose:t,emit:a}){u.useCssVars(b=>({80752488:u.unref(c).input.height,"4e021bc8":u.unref(c).input.padding,a1a7eeca:u.unref(c).input.paddingWithIcon,"02743f22":u.unref(c).input.borderColor,"64e354b3":u.unref(c).input.borderRadius,"6da171e0":u.unref(c).input.backgroundColor,"526ee54a":u.unref(c).input.colorFocus,"4182307c":u.unref(c).input.backgroundColorDisabled,c36bdff6:u.unref(c).input.placeholderColor}));const r=u.useModel(e,"modelValue"),n=e,i=a;t({focus:h});const{form:c}=Mt(),s=u.ref(),o=u.ref(hs),l=u.ref(!1),f=u.computed(()=>n.type==="password"),d=u.computed(()=>f.value?!1:!!(!n.disabled&&o.value));u.watch(r,b=>x(b),{immediate:!0});function h(){var b;(b=s.value)==null||b.focus()}function m(){n.type==="number"&&!o.value&&(o.value=hs)}function p(){n.type==="number"&&!o.value&&(o.value=y())}function v(){C(hs),i("valueCleared")}function g(b){return b===""?null:n.type==="number"&&n.integer&&typeof b=="number"?Math.round(b):b}function y(b){const M=typeof b>"u"?r.value:b;return M===null?"":M}function x(b){const M=g(b);return r.value=M,o.value=y(M),M}function C(b){const M=x(b);i("change",M)}return(b,M)=>(u.openBlock(),u.createBlock(It,{label:b.label,withOptionalLabel:b.withOptionalLabel,withLabelSpace:b.withLabelSpace,errors:b.errors,grow:b.grow},{default:u.withCtx(()=>[u.createElementVNode("div",eJ,[u.createElementVNode("div",tJ,[u.withDirectives(u.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":M[0]||(M[0]=w=>o.value=w),class:u.normalizeClass(["input",{input__disabled:b.disabled}]),type:l.value?"text":b.type,placeholder:u.unref(v0)(b.placeholder),autofocus:b.autofocus,disabled:b.disabled,onInput:M[1]||(M[1]=w=>C(o.value)),onKeyup:M[2]||(M[2]=u.withKeys(w=>i("enter"),["enter"])),onFocus:M[3]||(M[3]=w=>m()),onBlur:M[4]||(M[4]=w=>p())},null,42,aJ),[[u.vModelDynamic,o.value]]),f.value?(u.openBlock(),u.createBlock(Yi,{key:0,icon:l.value?"eye-slash":"eye",withBackground:"",onClick:M[5]||(M[5]=w=>l.value=!l.value)},null,8,["icon"])):d.value?(u.openBlock(),u.createBlock(Yi,{key:1,icon:"xmark",onClick:M[6]||(M[6]=w=>v())})):u.createCommentVNode("",!0)]),u.renderSlot(b.$slots,"labelRight",{},void 0,!0)])]),_:3},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const Xi=X1(rJ,[["__scopeId","data-v-42fd19ba"]]),nJ={class:"login-form-container"},cJ={class:"user-icon-container"},iJ=u.defineComponent({__name:"PgaLoginForm",setup(e){class t{constructor(){z1(this,"username","");z1(this,"password","")}}const a=fe.getConfig(),r=Pr.useRoute(),n=ae("pgaLoginForm"),i={username:{requiredRule:$o,minLengthRule:Uo(8),maxLengthRule:qo(a.stringLengths.short)},password:{requiredRule:$o,minLengthRule:Uo(8),maxLengthRule:qo(a.stringLengths.short)}},c=u.ref(new t),s=TQ(i,c),o=u.ref(!1);async function l(){if(!await s.value.$validate())return;const f={isLoadingRef:o,redirectToName:r.query.redirectTo};tv(Kt().currentRouteType,c.value,f)}return(f,d)=>(u.openBlock(),u.createElementBlock("div",nJ,[u.createVNode(qx,{class:"login-form"},{default:u.withCtx(()=>[u.createElementVNode("div",cJ,[u.createVNode(We,{class:"user-icon",icon:"user"})]),u.createVNode(Xi,{modelValue:c.value.username,"onUpdate:modelValue":d[0]||(d[0]=h=>c.value.username=h),label:u.unref(n)("usernameLabel"),errors:u.unref(s).username.$errors,disabled:o.value},null,8,["modelValue","label","errors","disabled"]),u.createVNode(Xi,{modelValue:c.value.password,"onUpdate:modelValue":d[1]||(d[1]=h=>c.value.password=h),type:"password",label:u.unref(n)("passwordLabel"),errors:u.unref(s).password.$errors,disabled:o.value},null,8,["modelValue","label","errors","disabled"]),u.createVNode(jx,{icon:"right-to-bracket",text:u.unref(n)("loginBtn"),isLoading:o.value,onClick:d[2]||(d[2]=h=>l())},null,8,["text","isLoading"])]),_:1})]))}});const sJ=X1(iJ,[["__scopeId","data-v-082ea400"]]),oJ={class:"pga-checkbox"},lJ=["textContent"],fJ=u.defineComponent({__name:"PgaCheckbox",props:u.mergeModels({label:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=u.useModel(e,"modelValue");return(a,r)=>(u.openBlock(),u.createElementBlock("label",oJ,[u.withDirectives(u.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=n=>t.value=n),type:"checkbox"},null,512),[[u.vModelCheckbox,t.value]]),a.label?(u.openBlock(),u.createElementBlock("span",{key:0,class:"checkbox--label",textContent:u.toDisplayString(a.label)},null,8,lJ)):u.createCommentVNode("",!0)]))}});const uJ=X1(fJ,[["__scopeId","data-v-89f11c66"]]),dJ={class:"colors-container"},hJ=u.defineComponent({__name:"PgaColorSelector",props:u.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){u.useCssVars(n=>({"7c4ec157":u.unref(a).input.padding,"62f80e46":u.unref(a).input.borderColor,"1acad258":u.unref(a).input.borderRadius}));const t=u.useModel(e,"modelValue"),{form:a}=Mt();function r(n){var i;return((i=t.value)==null?void 0:i.toLowerCase())===n.toLowerCase()}return(n,i)=>(u.openBlock(),u.createBlock(It,{label:n.label,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,errors:n.errors,grow:n.grow},{default:u.withCtx(()=>[u.createElementVNode("div",dJ,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(u.unref(Kp),c=>(u.openBlock(),u.createBlock(j2,{key:c,variant:r(c)?"outlined":"flat",color:r(c)?"primary":"first",disabled:n.disabled,onClick:s=>t.value=c},{default:u.withCtx(()=>[u.createVNode(py,{color:c},null,8,["color"])]),_:2},1032,["variant","color","disabled","onClick"]))),128))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const mJ=X1(hJ,[["__scopeId","data-v-62412458"]]);function t2(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function N2(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function u3(e,t){const a=t2(e);return isNaN(t)?N2(e,NaN):(t&&a.setDate(a.getDate()+t),a)}function M3(e,t){const a=t2(e);if(isNaN(t))return N2(e,NaN);if(!t)return a;const r=a.getDate(),n=N2(e,a.getTime());n.setMonth(a.getMonth()+t+1,0);const i=n.getDate();return r>=i?n:(a.setFullYear(n.getFullYear(),n.getMonth(),r),a)}function Jx(e,t){const{years:a=0,months:r=0,weeks:n=0,days:i=0,hours:c=0,minutes:s=0,seconds:o=0}=t,l=t2(e),f=r||a?M3(l,r+a*12):l,d=i||n?u3(f,i+n*7):f,h=s+c*60,p=(o+h*60)*1e3;return N2(e,d.getTime()+p)}function pJ(e,t){const a=+t2(e);return N2(e,a+t)}const eb=6048e5,vJ=864e5,gJ=6e4,tb=36e5,yJ=1e3;function xJ(e,t){return pJ(e,t*tb)}let bJ={};function _a(){return bJ}function L3(e,t){var s,o,l,f;const a=_a(),r=(t==null?void 0:t.weekStartsOn)??((o=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:o.weekStartsOn)??a.weekStartsOn??((f=(l=a.locale)==null?void 0:l.options)==null?void 0:f.weekStartsOn)??0,n=t2(e),i=n.getDay(),c=(i<r?7:0)+i-r;return n.setDate(n.getDate()-c),n.setHours(0,0,0,0),n}function p6(e){return L3(e,{weekStartsOn:1})}function ab(e){const t=t2(e),a=t.getFullYear(),r=N2(e,0);r.setFullYear(a+1,0,4),r.setHours(0,0,0,0);const n=p6(r),i=N2(e,0);i.setFullYear(a,0,4),i.setHours(0,0,0,0);const c=p6(i);return t.getTime()>=n.getTime()?a+1:t.getTime()>=c.getTime()?a:a-1}function dm(e){const t=t2(e);return t.setHours(0,0,0,0),t}function Ki(e){const t=t2(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}function rb(e,t){const a=dm(e),r=dm(t),n=+a-Ki(a),i=+r-Ki(r);return Math.round((n-i)/vJ)}function CJ(e){const t=ab(e),a=N2(e,0);return a.setFullYear(t,0,4),a.setHours(0,0,0,0),p6(a)}function MJ(e,t){const a=t*3;return M3(e,a)}function Ol(e,t){return M3(e,t*12)}function nb(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _r(e){if(!nb(e)&&typeof e!="number")return!1;const t=t2(e);return!isNaN(Number(t))}function hm(e){const t=t2(e);return Math.trunc(t.getMonth()/3)+1}function cb(e,t){const a=t2(e.start),r=t2(e.end);let n=+a>+r;const i=n?+a:+r,c=n?r:a;c.setHours(0,0,0,0);let s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,n=!n);const o=[];for(;+c<=i;)o.push(t2(c)),c.setDate(c.getDate()+s),c.setHours(0,0,0,0);return n?o.reverse():o}function Z0(e){const t=t2(e),a=t.getMonth(),r=a-a%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function zJ(e,t){const a=t2(e.start),r=t2(e.end);let n=+a>+r;const i=n?+Z0(a):+Z0(r);let c=Z0(n?r:a),s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,n=!n);const o=[];for(;+c<=i;)o.push(t2(c)),c=MJ(c,s);return n?o.reverse():o}function ib(e){const t=t2(e),a=t.getFullYear();return t.setFullYear(a+1,0,0),t.setHours(23,59,59,999),t}function Pl(e){const t=t2(e),a=N2(e,0);return a.setFullYear(t.getFullYear(),0,1),a.setHours(0,0,0,0),a}function sb(e,t){var s,o,l,f;const a=_a(),r=(t==null?void 0:t.weekStartsOn)??((o=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:o.weekStartsOn)??a.weekStartsOn??((f=(l=a.locale)==null?void 0:l.options)==null?void 0:f.weekStartsOn)??0,n=t2(e),i=n.getDay(),c=(i<r?-7:0)+6-(i-r);return n.setDate(n.getDate()+c),n.setHours(23,59,59,999),n}function mm(e){const t=t2(e),a=t.getMonth(),r=a-a%3+3;return t.setMonth(r,0),t.setHours(23,59,59,999),t}const wJ={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_J=(e,t,a)=>{let r;const n=wJ[e];return typeof n=="string"?r=n:t===1?r=n.one:r=n.other.replace("{{count}}",t.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+r:r+" ago":r};function ms(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}const HJ={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},SJ={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},LJ={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},kJ={date:ms({formats:HJ,defaultWidth:"full"}),time:ms({formats:SJ,defaultWidth:"full"}),dateTime:ms({formats:LJ,defaultWidth:"full"})},AJ={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},VJ=(e,t,a,r)=>AJ[e];function X6(e){return(t,a)=>{const r=a!=null&&a.context?String(a.context):"standalone";let n;if(r==="formatting"&&e.formattingValues){const c=e.defaultFormattingWidth||e.defaultWidth,s=a!=null&&a.width?String(a.width):c;n=e.formattingValues[s]||e.formattingValues[c]}else{const c=e.defaultWidth,s=a!=null&&a.width?String(a.width):e.defaultWidth;n=e.values[s]||e.values[c]}const i=e.argumentCallback?e.argumentCallback(t):t;return n[i]}}const TJ={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},EJ={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},NJ={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},OJ={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},PJ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},DJ={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},RJ=(e,t)=>{const a=Number(e),r=a%100;if(r>20||r<10)switch(r%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},FJ={ordinalNumber:RJ,era:X6({values:TJ,defaultWidth:"wide"}),quarter:X6({values:EJ,defaultWidth:"wide",argumentCallback:e=>e-1}),month:X6({values:NJ,defaultWidth:"wide"}),day:X6({values:OJ,defaultWidth:"wide"}),dayPeriod:X6({values:PJ,defaultWidth:"wide",formattingValues:DJ,defaultFormattingWidth:"wide"})};function K6(e){return(t,a={})=>{const r=a.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;const c=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],o=Array.isArray(s)?IJ(s,d=>d.test(c)):BJ(s,d=>d.test(c));let l;l=e.valueCallback?e.valueCallback(o):o,l=a.valueCallback?a.valueCallback(l):l;const f=t.slice(c.length);return{value:l,rest:f}}}function BJ(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}function IJ(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}function $J(e){return(t,a={})=>{const r=t.match(e.matchPattern);if(!r)return null;const n=r[0],i=t.match(e.parsePattern);if(!i)return null;let c=e.valueCallback?e.valueCallback(i[0]):i[0];c=a.valueCallback?a.valueCallback(c):c;const s=t.slice(n.length);return{value:c,rest:s}}}const UJ=/^(\d+)(th|st|nd|rd)?/i,qJ=/\d+/i,jJ={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},WJ={any:[/^b/i,/^(a|c)/i]},GJ={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},YJ={any:[/1/i,/2/i,/3/i,/4/i]},XJ={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},KJ={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ZJ={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},QJ={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},JJ={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},e11={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},t11={ordinalNumber:$J({matchPattern:UJ,parsePattern:qJ,valueCallback:e=>parseInt(e,10)}),era:K6({matchPatterns:jJ,defaultMatchWidth:"wide",parsePatterns:WJ,defaultParseWidth:"any"}),quarter:K6({matchPatterns:GJ,defaultMatchWidth:"wide",parsePatterns:YJ,defaultParseWidth:"any",valueCallback:e=>e+1}),month:K6({matchPatterns:XJ,defaultMatchWidth:"wide",parsePatterns:KJ,defaultParseWidth:"any"}),day:K6({matchPatterns:ZJ,defaultMatchWidth:"wide",parsePatterns:QJ,defaultParseWidth:"any"}),dayPeriod:K6({matchPatterns:JJ,defaultMatchWidth:"any",parsePatterns:e11,defaultParseWidth:"any"})},ob={code:"en-US",formatDistance:_J,formatLong:kJ,formatRelative:VJ,localize:FJ,match:t11,options:{weekStartsOn:0,firstWeekContainsDate:1}};function a11(e){const t=t2(e);return rb(t,Pl(t))+1}function Dl(e){const t=t2(e),a=+p6(t)-+CJ(t);return Math.round(a/eb)+1}function Rl(e,t){var f,d,h,m;const a=t2(e),r=a.getFullYear(),n=_a(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(h=n.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,c=N2(e,0);c.setFullYear(r+1,0,i),c.setHours(0,0,0,0);const s=L3(c,t),o=N2(e,0);o.setFullYear(r,0,i),o.setHours(0,0,0,0);const l=L3(o,t);return a.getTime()>=s.getTime()?r+1:a.getTime()>=l.getTime()?r:r-1}function r11(e,t){var s,o,l,f;const a=_a(),r=(t==null?void 0:t.firstWeekContainsDate)??((o=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:o.firstWeekContainsDate)??a.firstWeekContainsDate??((f=(l=a.locale)==null?void 0:l.options)==null?void 0:f.firstWeekContainsDate)??1,n=Rl(e,t),i=N2(e,0);return i.setFullYear(n,0,r),i.setHours(0,0,0,0),L3(i,t)}function Fl(e,t){const a=t2(e),r=+L3(a,t)-+r11(a,t);return Math.round(r/eb)+1}function D2(e,t){const a=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return a+r}const q4={y(e,t){const a=e.getFullYear(),r=a>0?a:1-a;return D2(t==="yy"?r%100:r,t.length)},M(e,t){const a=e.getMonth();return t==="M"?String(a+1):D2(a+1,2)},d(e,t){return D2(e.getDate(),t.length)},a(e,t){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(e,t){return D2(e.getHours()%12||12,t.length)},H(e,t){return D2(e.getHours(),t.length)},m(e,t){return D2(e.getMinutes(),t.length)},s(e,t){return D2(e.getSeconds(),t.length)},S(e,t){const a=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,a-3));return D2(n,t.length)}},Fa={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},pm={G:function(e,t,a){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})}},y:function(e,t,a){if(t==="yo"){const r=e.getFullYear(),n=r>0?r:1-r;return a.ordinalNumber(n,{unit:"year"})}return q4.y(e,t)},Y:function(e,t,a,r){const n=Rl(e,r),i=n>0?n:1-n;if(t==="YY"){const c=i%100;return D2(c,2)}return t==="Yo"?a.ordinalNumber(i,{unit:"year"}):D2(i,t.length)},R:function(e,t){const a=ab(e);return D2(a,t.length)},u:function(e,t){const a=e.getFullYear();return D2(a,t.length)},Q:function(e,t,a){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return D2(r,2);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,a){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return D2(r,2);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,a){const r=e.getMonth();switch(t){case"M":case"MM":return q4.M(e,t);case"Mo":return a.ordinalNumber(r+1,{unit:"month"});case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,a){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return D2(r+1,2);case"Lo":return a.ordinalNumber(r+1,{unit:"month"});case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,a,r){const n=Fl(e,r);return t==="wo"?a.ordinalNumber(n,{unit:"week"}):D2(n,t.length)},I:function(e,t,a){const r=Dl(e);return t==="Io"?a.ordinalNumber(r,{unit:"week"}):D2(r,t.length)},d:function(e,t,a){return t==="do"?a.ordinalNumber(e.getDate(),{unit:"date"}):q4.d(e,t)},D:function(e,t,a){const r=a11(e);return t==="Do"?a.ordinalNumber(r,{unit:"dayOfYear"}):D2(r,t.length)},E:function(e,t,a){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,a,r){const n=e.getDay(),i=(n-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return D2(i,2);case"eo":return a.ordinalNumber(i,{unit:"day"});case"eee":return a.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(n,{width:"short",context:"formatting"});case"eeee":default:return a.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,a,r){const n=e.getDay(),i=(n-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return D2(i,t.length);case"co":return a.ordinalNumber(i,{unit:"day"});case"ccc":return a.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(n,{width:"narrow",context:"standalone"});case"cccccc":return a.day(n,{width:"short",context:"standalone"});case"cccc":default:return a.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,a){const r=e.getDay(),n=r===0?7:r;switch(t){case"i":return String(n);case"ii":return D2(n,t.length);case"io":return a.ordinalNumber(n,{unit:"day"});case"iii":return a.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(r,{width:"short",context:"formatting"});case"iiii":default:return a.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,a){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,a){const r=e.getHours();let n;switch(r===12?n=Fa.noon:r===0?n=Fa.midnight:n=r/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,a){const r=e.getHours();let n;switch(r>=17?n=Fa.evening:r>=12?n=Fa.afternoon:r>=4?n=Fa.morning:n=Fa.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,a){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),a.ordinalNumber(r,{unit:"hour"})}return q4.h(e,t)},H:function(e,t,a){return t==="Ho"?a.ordinalNumber(e.getHours(),{unit:"hour"}):q4.H(e,t)},K:function(e,t,a){const r=e.getHours()%12;return t==="Ko"?a.ordinalNumber(r,{unit:"hour"}):D2(r,t.length)},k:function(e,t,a){let r=e.getHours();return r===0&&(r=24),t==="ko"?a.ordinalNumber(r,{unit:"hour"}):D2(r,t.length)},m:function(e,t,a){return t==="mo"?a.ordinalNumber(e.getMinutes(),{unit:"minute"}):q4.m(e,t)},s:function(e,t,a){return t==="so"?a.ordinalNumber(e.getSeconds(),{unit:"second"}):q4.s(e,t)},S:function(e,t){return q4.S(e,t)},X:function(e,t,a){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return gm(r);case"XXXX":case"XX":return q0(r);case"XXXXX":case"XXX":default:return q0(r,":")}},x:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"x":return gm(r);case"xxxx":case"xx":return q0(r);case"xxxxx":case"xxx":default:return q0(r,":")}},O:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+vm(r,":");case"OOOO":default:return"GMT"+q0(r,":")}},z:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+vm(r,":");case"zzzz":default:return"GMT"+q0(r,":")}},t:function(e,t,a){const r=Math.trunc(e.getTime()/1e3);return D2(r,t.length)},T:function(e,t,a){const r=e.getTime();return D2(r,t.length)}};function vm(e,t=""){const a=e>0?"-":"+",r=Math.abs(e),n=Math.trunc(r/60),i=r%60;return i===0?a+String(n):a+String(n)+t+D2(i,2)}function gm(e,t){return e%60===0?(e>0?"-":"+")+D2(Math.abs(e)/60,2):q0(e,t)}function q0(e,t=""){const a=e>0?"-":"+",r=Math.abs(e),n=D2(Math.trunc(r/60),2),i=D2(r%60,2);return a+n+t+i}const ym=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},lb=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},n11=(e,t)=>{const a=e.match(/(P+)(p+)?/)||[],r=a[1],n=a[2];if(!n)return ym(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",ym(r,t)).replace("{{time}}",lb(n,t))},jo={p:lb,P:n11},c11=/^D+$/,i11=/^Y+$/,s11=["D","DD","YY","YYYY"];function fb(e){return c11.test(e)}function ub(e){return i11.test(e)}function Wo(e,t,a){const r=o11(e,t,a);if(console.warn(r),s11.includes(e))throw new RangeError(r)}function o11(e,t,a){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const l11=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,f11=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,u11=/^'([^]*?)'?$/,d11=/''/g,h11=/[a-zA-Z]/;function X3(e,t,a){var f,d,h,m,p,v,g,y;const r=_a(),n=(a==null?void 0:a.locale)??r.locale??ob,i=(a==null?void 0:a.firstWeekContainsDate)??((d=(f=a==null?void 0:a.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(h=r.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,c=(a==null?void 0:a.weekStartsOn)??((v=(p=a==null?void 0:a.locale)==null?void 0:p.options)==null?void 0:v.weekStartsOn)??r.weekStartsOn??((y=(g=r.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??0,s=t2(e);if(!_r(s))throw new RangeError("Invalid time value");let o=t.match(f11).map(x=>{const C=x[0];if(C==="p"||C==="P"){const b=jo[C];return b(x,n.formatLong)}return x}).join("").match(l11).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const C=x[0];if(C==="'")return{isToken:!1,value:m11(x)};if(pm[C])return{isToken:!0,value:x};if(C.match(h11))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:x}});n.localize.preprocessor&&(o=n.localize.preprocessor(s,o));const l={firstWeekContainsDate:i,weekStartsOn:c,locale:n};return o.map(x=>{if(!x.isToken)return x.value;const C=x.value;(!(a!=null&&a.useAdditionalWeekYearTokens)&&ub(C)||!(a!=null&&a.useAdditionalDayOfYearTokens)&&fb(C))&&Wo(C,t,String(e));const b=pm[C[0]];return b(s,C,n.localize,l)}).join("")}function m11(e){const t=e.match(u11);return t?t[1].replace(d11,"'"):e}function p11(e){return t2(e).getDay()}function v11(e){const t=t2(e),a=t.getFullYear(),r=t.getMonth(),n=N2(e,0);return n.setFullYear(a,r+1,0),n.setHours(0,0,0,0),n.getDate()}function g11(){return Object.assign({},_a())}function O4(e){return t2(e).getHours()}function y11(e){let a=t2(e).getDay();return a===0&&(a=7),a}function w0(e){return t2(e).getMinutes()}function v2(e){return t2(e).getMonth()}function v6(e){return t2(e).getSeconds()}function d2(e){return t2(e).getFullYear()}function g6(e,t){const a=t2(e),r=t2(t);return a.getTime()>r.getTime()}function un(e,t){const a=t2(e),r=t2(t);return+a<+r}function Xa(e,t){const a=t2(e),r=t2(t);return+a==+r}function x11(e,t){const a=t instanceof Date?N2(t,0):new t(0);return a.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),a.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),a}const b11=10;class db{constructor(){z1(this,"subPriority",0)}validate(t,a){return!0}}class C11 extends db{constructor(t,a,r,n,i){super(),this.value=t,this.validateValue=a,this.setValue=r,this.priority=n,i&&(this.subPriority=i)}validate(t,a){return this.validateValue(t,this.value,a)}set(t,a,r){return this.setValue(t,a,this.value,r)}}class M11 extends db{constructor(){super(...arguments);z1(this,"priority",b11);z1(this,"subPriority",-1)}set(a,r){return r.timestampIsSet?a:N2(a,x11(a,Date))}}class O2{run(t,a,r,n){const i=this.parse(t,a,r,n);return i?{setter:new C11(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,a,r){return!0}}class z11 extends O2{constructor(){super(...arguments);z1(this,"priority",140);z1(this,"incompatibleTokens",["R","u","t","T"])}parse(a,r,n){switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})||n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"})}}set(a,r,n){return r.era=n,a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}}const _e={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},I3={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function He(e,t){return e&&{value:t(e.value),rest:e.rest}}function le(e,t){const a=t.match(e);return a?{value:parseInt(a[0],10),rest:t.slice(a[0].length)}:null}function $3(e,t){const a=t.match(e);if(!a)return null;if(a[0]==="Z")return{value:0,rest:t.slice(1)};const r=a[1]==="+"?1:-1,n=a[2]?parseInt(a[2],10):0,i=a[3]?parseInt(a[3],10):0,c=a[5]?parseInt(a[5],10):0;return{value:r*(n*tb+i*gJ+c*yJ),rest:t.slice(a[0].length)}}function hb(e){return le(_e.anyDigitsSigned,e)}function ge(e,t){switch(e){case 1:return le(_e.singleDigit,t);case 2:return le(_e.twoDigits,t);case 3:return le(_e.threeDigits,t);case 4:return le(_e.fourDigits,t);default:return le(new RegExp("^\\d{1,"+e+"}"),t)}}function Zi(e,t){switch(e){case 1:return le(_e.singleDigitSigned,t);case 2:return le(_e.twoDigitsSigned,t);case 3:return le(_e.threeDigitsSigned,t);case 4:return le(_e.fourDigitsSigned,t);default:return le(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Bl(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function mb(e,t){const a=t>0,r=a?t:1-t;let n;if(r<=50)n=e||100;else{const i=r+50,c=Math.trunc(i/100)*100,s=e>=i%100;n=e+c-(s?100:0)}return a?n:1-n}function pb(e){return e%400===0||e%4===0&&e%100!==0}class w11 extends O2{constructor(){super(...arguments);z1(this,"priority",130);z1(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(a,r,n){const i=c=>({year:c,isTwoDigitYear:r==="yy"});switch(r){case"y":return He(ge(4,a),i);case"yo":return He(n.ordinalNumber(a,{unit:"year"}),i);default:return He(ge(r.length,a),i)}}validate(a,r){return r.isTwoDigitYear||r.year>0}set(a,r,n){const i=a.getFullYear();if(n.isTwoDigitYear){const s=mb(n.year,i);return a.setFullYear(s,0,1),a.setHours(0,0,0,0),a}const c=!("era"in r)||r.era===1?n.year:1-n.year;return a.setFullYear(c,0,1),a.setHours(0,0,0,0),a}}class _11 extends O2{constructor(){super(...arguments);z1(this,"priority",130);z1(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(a,r,n){const i=c=>({year:c,isTwoDigitYear:r==="YY"});switch(r){case"Y":return He(ge(4,a),i);case"Yo":return He(n.ordinalNumber(a,{unit:"year"}),i);default:return He(ge(r.length,a),i)}}validate(a,r){return r.isTwoDigitYear||r.year>0}set(a,r,n,i){const c=Rl(a,i);if(n.isTwoDigitYear){const o=mb(n.year,c);return a.setFullYear(o,0,i.firstWeekContainsDate),a.setHours(0,0,0,0),L3(a,i)}const s=!("era"in r)||r.era===1?n.year:1-n.year;return a.setFullYear(s,0,i.firstWeekContainsDate),a.setHours(0,0,0,0),L3(a,i)}}class H11 extends O2{constructor(){super(...arguments);z1(this,"priority",130);z1(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(a,r){return Zi(r==="R"?4:r.length,a)}set(a,r,n){const i=N2(a,0);return i.setFullYear(n,0,4),i.setHours(0,0,0,0),p6(i)}}class S11 extends O2{constructor(){super(...arguments);z1(this,"priority",130);z1(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(a,r){return Zi(r==="u"?4:r.length,a)}set(a,r,n){return a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}}class L11 extends O2{constructor(){super(...arguments);z1(this,"priority",120);z1(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"Q":case"QQ":return ge(r.length,a);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})||n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=1&&r<=4}set(a,r,n){return a.setMonth((n-1)*3,1),a.setHours(0,0,0,0),a}}class k11 extends O2{constructor(){super(...arguments);z1(this,"priority",120);z1(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"q":case"qq":return ge(r.length,a);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})||n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=1&&r<=4}set(a,r,n){return a.setMonth((n-1)*3,1),a.setHours(0,0,0,0),a}}class A11 extends O2{constructor(){super(...arguments);z1(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);z1(this,"priority",110)}parse(a,r,n){const i=c=>c-1;switch(r){case"M":return He(le(_e.month,a),i);case"MM":return He(ge(2,a),i);case"Mo":return He(n.ordinalNumber(a,{unit:"month"}),i);case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})||n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.setMonth(n,1),a.setHours(0,0,0,0),a}}class V11 extends O2{constructor(){super(...arguments);z1(this,"priority",110);z1(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(a,r,n){const i=c=>c-1;switch(r){case"L":return He(le(_e.month,a),i);case"LL":return He(ge(2,a),i);case"Lo":return He(n.ordinalNumber(a,{unit:"month"}),i);case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})||n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.setMonth(n,1),a.setHours(0,0,0,0),a}}function T11(e,t,a){const r=t2(e),n=Fl(r,a)-t;return r.setDate(r.getDate()-n*7),r}class E11 extends O2{constructor(){super(...arguments);z1(this,"priority",100);z1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(a,r,n){switch(r){case"w":return le(_e.week,a);case"wo":return n.ordinalNumber(a,{unit:"week"});default:return ge(r.length,a)}}validate(a,r){return r>=1&&r<=53}set(a,r,n,i){return L3(T11(a,n,i),i)}}function N11(e,t){const a=t2(e),r=Dl(a)-t;return a.setDate(a.getDate()-r*7),a}class O11 extends O2{constructor(){super(...arguments);z1(this,"priority",100);z1(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(a,r,n){switch(r){case"I":return le(_e.week,a);case"Io":return n.ordinalNumber(a,{unit:"week"});default:return ge(r.length,a)}}validate(a,r){return r>=1&&r<=53}set(a,r,n){return p6(N11(a,n))}}const P11=[31,28,31,30,31,30,31,31,30,31,30,31],D11=[31,29,31,30,31,30,31,31,30,31,30,31];class R11 extends O2{constructor(){super(...arguments);z1(this,"priority",90);z1(this,"subPriority",1);z1(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"d":return le(_e.date,a);case"do":return n.ordinalNumber(a,{unit:"date"});default:return ge(r.length,a)}}validate(a,r){const n=a.getFullYear(),i=pb(n),c=a.getMonth();return i?r>=1&&r<=D11[c]:r>=1&&r<=P11[c]}set(a,r,n){return a.setDate(n),a.setHours(0,0,0,0),a}}class F11 extends O2{constructor(){super(...arguments);z1(this,"priority",90);z1(this,"subpriority",1);z1(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(a,r,n){switch(r){case"D":case"DD":return le(_e.dayOfYear,a);case"Do":return n.ordinalNumber(a,{unit:"date"});default:return ge(r.length,a)}}validate(a,r){const n=a.getFullYear();return pb(n)?r>=1&&r<=366:r>=1&&r<=365}set(a,r,n){return a.setMonth(0,n),a.setHours(0,0,0,0),a}}function Il(e,t,a){var d,h,m,p;const r=_a(),n=(a==null?void 0:a.weekStartsOn)??((h=(d=a==null?void 0:a.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((p=(m=r.locale)==null?void 0:m.options)==null?void 0:p.weekStartsOn)??0,i=t2(e),c=i.getDay(),o=(t%7+7)%7,l=7-n,f=t<0||t>6?t-(c+l)%7:(o+l)%7-(c+l)%7;return u3(i,f)}class B11 extends O2{constructor(){super(...arguments);z1(this,"priority",90);z1(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,i){return a=Il(a,n,i),a.setHours(0,0,0,0),a}}class I11 extends O2{constructor(){super(...arguments);z1(this,"priority",90);z1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(a,r,n,i){const c=s=>{const o=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+o};switch(r){case"e":case"ee":return He(ge(r.length,a),c);case"eo":return He(n.ordinalNumber(a,{unit:"day"}),c);case"eee":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,i){return a=Il(a,n,i),a.setHours(0,0,0,0),a}}class $11 extends O2{constructor(){super(...arguments);z1(this,"priority",90);z1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(a,r,n,i){const c=s=>{const o=Math.floor((s-1)/7)*7;return(s+i.weekStartsOn+6)%7+o};switch(r){case"c":case"cc":return He(ge(r.length,a),c);case"co":return He(n.ordinalNumber(a,{unit:"day"}),c);case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})||n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,i){return a=Il(a,n,i),a.setHours(0,0,0,0),a}}function U11(e,t){const a=t2(e),r=y11(a),n=t-r;return u3(a,n)}class q11 extends O2{constructor(){super(...arguments);z1(this,"priority",90);z1(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(a,r,n){const i=c=>c===0?7:c;switch(r){case"i":case"ii":return ge(r.length,a);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return He(n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),i);case"iiiii":return He(n.day(a,{width:"narrow",context:"formatting"}),i);case"iiiiii":return He(n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),i);case"iiii":default:return He(n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),i)}}validate(a,r){return r>=1&&r<=7}set(a,r,n){return a=U11(a,n),a.setHours(0,0,0,0),a}}class j11 extends O2{constructor(){super(...arguments);z1(this,"priority",80);z1(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(a,r,n){switch(r){case"a":case"aa":case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Bl(n),0,0,0),a}}class W11 extends O2{constructor(){super(...arguments);z1(this,"priority",80);z1(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(a,r,n){switch(r){case"b":case"bb":case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Bl(n),0,0,0),a}}class G11 extends O2{constructor(){super(...arguments);z1(this,"priority",80);z1(this,"incompatibleTokens",["a","b","t","T"])}parse(a,r,n){switch(r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Bl(n),0,0,0),a}}class Y11 extends O2{constructor(){super(...arguments);z1(this,"priority",70);z1(this,"incompatibleTokens",["H","K","k","t","T"])}parse(a,r,n){switch(r){case"h":return le(_e.hour12h,a);case"ho":return n.ordinalNumber(a,{unit:"hour"});default:return ge(r.length,a)}}validate(a,r){return r>=1&&r<=12}set(a,r,n){const i=a.getHours()>=12;return i&&n<12?a.setHours(n+12,0,0,0):!i&&n===12?a.setHours(0,0,0,0):a.setHours(n,0,0,0),a}}class X11 extends O2{constructor(){super(...arguments);z1(this,"priority",70);z1(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(a,r,n){switch(r){case"H":return le(_e.hour23h,a);case"Ho":return n.ordinalNumber(a,{unit:"hour"});default:return ge(r.length,a)}}validate(a,r){return r>=0&&r<=23}set(a,r,n){return a.setHours(n,0,0,0),a}}class K11 extends O2{constructor(){super(...arguments);z1(this,"priority",70);z1(this,"incompatibleTokens",["h","H","k","t","T"])}parse(a,r,n){switch(r){case"K":return le(_e.hour11h,a);case"Ko":return n.ordinalNumber(a,{unit:"hour"});default:return ge(r.length,a)}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.getHours()>=12&&n<12?a.setHours(n+12,0,0,0):a.setHours(n,0,0,0),a}}class Z11 extends O2{constructor(){super(...arguments);z1(this,"priority",70);z1(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(a,r,n){switch(r){case"k":return le(_e.hour24h,a);case"ko":return n.ordinalNumber(a,{unit:"hour"});default:return ge(r.length,a)}}validate(a,r){return r>=1&&r<=24}set(a,r,n){const i=n<=24?n%24:n;return a.setHours(i,0,0,0),a}}class Q11 extends O2{constructor(){super(...arguments);z1(this,"priority",60);z1(this,"incompatibleTokens",["t","T"])}parse(a,r,n){switch(r){case"m":return le(_e.minute,a);case"mo":return n.ordinalNumber(a,{unit:"minute"});default:return ge(r.length,a)}}validate(a,r){return r>=0&&r<=59}set(a,r,n){return a.setMinutes(n,0,0),a}}class J11 extends O2{constructor(){super(...arguments);z1(this,"priority",50);z1(this,"incompatibleTokens",["t","T"])}parse(a,r,n){switch(r){case"s":return le(_e.second,a);case"so":return n.ordinalNumber(a,{unit:"second"});default:return ge(r.length,a)}}validate(a,r){return r>=0&&r<=59}set(a,r,n){return a.setSeconds(n,0),a}}class e21 extends O2{constructor(){super(...arguments);z1(this,"priority",30);z1(this,"incompatibleTokens",["t","T"])}parse(a,r){const n=i=>Math.trunc(i*Math.pow(10,-r.length+3));return He(ge(r.length,a),n)}set(a,r,n){return a.setMilliseconds(n),a}}class t21 extends O2{constructor(){super(...arguments);z1(this,"priority",10);z1(this,"incompatibleTokens",["t","T","x"])}parse(a,r){switch(r){case"X":return $3(I3.basicOptionalMinutes,a);case"XX":return $3(I3.basic,a);case"XXXX":return $3(I3.basicOptionalSeconds,a);case"XXXXX":return $3(I3.extendedOptionalSeconds,a);case"XXX":default:return $3(I3.extended,a)}}set(a,r,n){return r.timestampIsSet?a:N2(a,a.getTime()-Ki(a)-n)}}class a21 extends O2{constructor(){super(...arguments);z1(this,"priority",10);z1(this,"incompatibleTokens",["t","T","X"])}parse(a,r){switch(r){case"x":return $3(I3.basicOptionalMinutes,a);case"xx":return $3(I3.basic,a);case"xxxx":return $3(I3.basicOptionalSeconds,a);case"xxxxx":return $3(I3.extendedOptionalSeconds,a);case"xxx":default:return $3(I3.extended,a)}}set(a,r,n){return r.timestampIsSet?a:N2(a,a.getTime()-Ki(a)-n)}}class r21 extends O2{constructor(){super(...arguments);z1(this,"priority",40);z1(this,"incompatibleTokens","*")}parse(a){return hb(a)}set(a,r,n){return[N2(a,n*1e3),{timestampIsSet:!0}]}}class n21 extends O2{constructor(){super(...arguments);z1(this,"priority",20);z1(this,"incompatibleTokens","*")}parse(a){return hb(a)}set(a,r,n){return[N2(a,n),{timestampIsSet:!0}]}}const c21={G:new z11,y:new w11,Y:new _11,R:new H11,u:new S11,Q:new L11,q:new k11,M:new A11,L:new V11,w:new E11,I:new O11,d:new R11,D:new F11,E:new B11,e:new I11,c:new $11,i:new q11,a:new j11,b:new W11,B:new G11,h:new Y11,H:new X11,K:new K11,k:new Z11,m:new Q11,s:new J11,S:new e21,X:new t21,x:new a21,t:new r21,T:new n21},i21=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,s21=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,o21=/^'([^]*?)'?$/,l21=/''/g,f21=/\S/,u21=/[a-zA-Z]/;function Go(e,t,a,r){var v,g,y,x,C,b,M,w;const n=g11(),i=(r==null?void 0:r.locale)??n.locale??ob,c=(r==null?void 0:r.firstWeekContainsDate)??((g=(v=r==null?void 0:r.locale)==null?void 0:v.options)==null?void 0:g.firstWeekContainsDate)??n.firstWeekContainsDate??((x=(y=n.locale)==null?void 0:y.options)==null?void 0:x.firstWeekContainsDate)??1,s=(r==null?void 0:r.weekStartsOn)??((b=(C=r==null?void 0:r.locale)==null?void 0:C.options)==null?void 0:b.weekStartsOn)??n.weekStartsOn??((w=(M=n.locale)==null?void 0:M.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?t2(a):N2(a,NaN);const o={firstWeekContainsDate:c,weekStartsOn:s,locale:i},l=[new M11],f=t.match(s21).map(z=>{const _=z[0];if(_ in jo){const S=jo[_];return S(z,i.formatLong)}return z}).join("").match(i21),d=[];for(let z of f){!(r!=null&&r.useAdditionalWeekYearTokens)&&ub(z)&&Wo(z,t,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&fb(z)&&Wo(z,t,e);const _=z[0],S=c21[_];if(S){const{incompatibleTokens:k}=S;if(Array.isArray(k)){const L=d.find(A=>k.includes(A.token)||A.token===_);if(L)throw new RangeError(`The format string mustn't contain \`${L.fullToken}\` and \`${z}\` at the same time`)}else if(S.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${z}\` and any other token at the same time`);d.push({token:_,fullToken:z});const H=S.run(e,z,i.match,o);if(!H)return N2(a,NaN);l.push(H.setter),e=H.rest}else{if(_.match(u21))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");if(z==="''"?z="'":_==="'"&&(z=d21(z)),e.indexOf(z)===0)e=e.slice(z.length);else return N2(a,NaN)}}if(e.length>0&&f21.test(e))return N2(a,NaN);const h=l.map(z=>z.priority).sort((z,_)=>_-z).filter((z,_,S)=>S.indexOf(z)===_).map(z=>l.filter(_=>_.priority===z).sort((_,S)=>S.subPriority-_.subPriority)).map(z=>z[0]);let m=t2(a);if(isNaN(m.getTime()))return N2(a,NaN);const p={};for(const z of h){if(!z.validate(m,o))return N2(a,NaN);const _=z.set(m,p,o);Array.isArray(_)?(m=_[0],Object.assign(p,_[1])):m=_}return N2(a,m)}function d21(e){return e.match(o21)[1].replace(l21,"'")}function xm(e,t){const a=Z0(e),r=Z0(t);return+a==+r}function h21(e,t){return u3(e,-t)}function vb(e,t){const a=t2(e),r=a.getFullYear(),n=a.getDate(),i=N2(e,0);i.setFullYear(r,t,15),i.setHours(0,0,0,0);const c=v11(i);return a.setMonth(t,Math.min(n,c)),a}function U2(e,t){let a=t2(e);return isNaN(+a)?N2(e,NaN):(t.year!=null&&a.setFullYear(t.year),t.month!=null&&(a=vb(a,t.month)),t.date!=null&&a.setDate(t.date),t.hours!=null&&a.setHours(t.hours),t.minutes!=null&&a.setMinutes(t.minutes),t.seconds!=null&&a.setSeconds(t.seconds),t.milliseconds!=null&&a.setMilliseconds(t.milliseconds),a)}function gb(e,t){const a=t2(e);return a.setHours(t),a}function $l(e,t){const a=t2(e);return a.setMilliseconds(t),a}function yb(e,t){const a=t2(e);return a.setMinutes(t),a}function Ul(e,t){const a=t2(e);return a.setSeconds(t),a}function j3(e,t){const a=t2(e);return isNaN(+a)?N2(e,NaN):(a.setFullYear(t),a)}function y6(e,t){return M3(e,-t)}function m21(e,t){const{years:a=0,months:r=0,weeks:n=0,days:i=0,hours:c=0,minutes:s=0,seconds:o=0}=t,l=y6(e,r+a*12),f=h21(l,i+n*7),d=s+c*60,m=(o+d*60)*1e3;return N2(e,f.getTime()-m)}function xb(e,t){return Ol(e,-t)}function L6(){return u.openBlock(),u.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[u.createElementVNode("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),u.createElementVNode("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),u.createElementVNode("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),u.createElementVNode("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}L6.compatConfig={MODE:3};function bb(){return u.openBlock(),u.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[u.createElementVNode("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),u.createElementVNode("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}bb.compatConfig={MODE:3};function ql(){return u.openBlock(),u.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[u.createElementVNode("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}ql.compatConfig={MODE:3};function jl(){return u.openBlock(),u.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[u.createElementVNode("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}jl.compatConfig={MODE:3};function Wl(){return u.openBlock(),u.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[u.createElementVNode("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),u.createElementVNode("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}Wl.compatConfig={MODE:3};function Gl(){return u.openBlock(),u.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[u.createElementVNode("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}Gl.compatConfig={MODE:3};function Yl(){return u.openBlock(),u.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[u.createElementVNode("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}Yl.compatConfig={MODE:3};const K3=(e,t)=>t?new Date(e.toLocaleString("en-US",{timeZone:t})):new Date(e),Cb=(e,t)=>Yo(e,t)||R1(),p21=(e,t)=>t.dateInTz?K3(new Date(e),t.dateInTz):R1(e),Yo=(e,t)=>{if(!e)return null;if(!t)return R1(e);const a=R1(e);return t.exactMatch?p21(e,t):K3(a,t.timezone)},v21=e=>{if(!e)return 0;const t=new Date,a=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),r=new Date(t.toLocaleString("en-US",{timeZone:e})),n=r.getTimezoneOffset()/60;return(+a-+r)/(1e3*60*60)-n};var s3=(e=>(e.month="month",e.year="year",e))(s3||{}),j0=(e=>(e.top="top",e.bottom="bottom",e))(j0||{}),ra=(e=>(e.header="header",e.calendar="calendar",e.timePicker="timePicker",e))(ra||{}),at=(e=>(e.month="month",e.year="year",e.calendar="calendar",e.time="time",e.minutes="minutes",e.hours="hours",e.seconds="seconds",e))(at||{});const g21=["timestamp","date","iso"];var pt=(e=>(e.up="up",e.down="down",e.left="left",e.right="right",e))(pt||{}),oe=(e=>(e.arrowUp="ArrowUp",e.arrowDown="ArrowDown",e.arrowLeft="ArrowLeft",e.arrowRight="ArrowRight",e.enter="Enter",e.space=" ",e.esc="Escape",e.tab="Tab",e.home="Home",e.end="End",e.pageUp="PageUp",e.pageDown="PageDown",e))(oe||{});function bm(e){return t=>new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${t}T00:00:00+00:00`)).slice(0,2)}function y21(e){return t=>X3(new Date(`2017-01-0${t}T00:00:00+00:00`),"EEEEEE",{locale:e})}const x21=(e,t,a)=>{const r=[1,2,3,4,5,6,7];let n;if(e!==null)try{n=r.map(y21(e))}catch{n=r.map(bm(t))}else n=r.map(bm(t));const i=n.slice(0,a),c=n.slice(a+1,n.length);return[n[a]].concat(...c).concat(...i)},Xl=(e,t,a)=>{const r=[];for(let n=+e[0];n<=+e[1];n++)r.push({value:+n,text:_b(n,t)});return a?r.reverse():r},Mb=(e,t,a)=>{const r=[1,2,3,4,5,6,7,8,9,10,11,12].map(i=>{const c=i<10?`0${i}`:i;return new Date(`2017-${c}-01T00:00:00+00:00`)});if(e!==null)try{const i=a==="long"?"MMMM":"MMM";return r.map((c,s)=>{const o=X3(K3(c,"UTC"),i,{locale:e});return{text:o.charAt(0).toUpperCase()+o.substring(1),value:s}})}catch{}const n=new Intl.DateTimeFormat(t,{month:a,timeZone:"UTC"});return r.map((i,c)=>{const s=n.format(i);return{text:s.charAt(0).toUpperCase()+s.substring(1),value:c}})},b21=e=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][e],Ne=e=>{const t=u.unref(e);return t!=null&&t.$el?t==null?void 0:t.$el:t},C21=e=>({type:"dot",...e??{}}),zb=e=>Array.isArray(e)?!!e[0]&&!!e[1]:!1,Kl={prop:e=>`"${e}" prop must be enabled!`,dateArr:e=>`You need to use array as "model-value" binding in order to support "${e}"`},$e=e=>e,Cm=e=>e===0?e:!e||isNaN(+e)?null:+e,Mm=e=>e===null,wb=e=>{if(e)return[...e.querySelectorAll("input, button, select, textarea, a[href]")][0]},M21=e=>{const t=[],a=r=>r.filter(n=>n);for(let r=0;r<e.length;r+=3){const n=[e[r],e[r+1],e[r+2]];t.push(a(n))}return t},dn=(e,t,a)=>{const r=a!=null,n=t!=null;if(!r&&!n)return!1;const i=+a,c=+t;return r&&n?+e>i||+e<c:r?+e>i:n?+e<c:!1},x6=(e,t)=>M21(e).map(a=>a.map(r=>{const{active:n,disabled:i,isBetween:c,highlighted:s}=t(r);return{...r,active:n,disabled:i,className:{dp__overlay_cell_active:n,dp__overlay_cell:!n,dp__overlay_cell_disabled:i,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:i&&n,dp__cell_in_between:c,"dp--highlighted":s}}})),h0=(e,t,a=!1)=>{e&&t.allowStopPropagation&&(a&&e.stopImmediatePropagation(),e.stopPropagation())},z21=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function w21(e,t){let a=[...document.querySelectorAll(z21())];a=a.filter(n=>!e.contains(n)||n.hasAttribute("data-datepicker-instance"));const r=a.indexOf(e);if(r>=0&&(t?r-1>=0:r+1<=a.length))return a[r+(t?-1:1)]}const _21=(e,t)=>e==null?void 0:e.querySelector(`[data-dp-element="${t}"]`),_b=(e,t)=>new Intl.NumberFormat(t,{useGrouping:!1,style:"decimal"}).format(e),Zl=e=>X3(e,"dd-MM-yyyy"),ps=e=>Array.isArray(e),Qi=(e,t)=>t.get(Zl(e)),H21=(e,t)=>e?t?t instanceof Map?!!Qi(e,t):t(R1(e)):!1:!0,Lt=(e,t,a=!1)=>{if(e.key===oe.enter||e.key===oe.space)return a&&e.preventDefault(),t()},zm=(e,t,a,r,n,i)=>{const c=Go(e,t.slice(0,e.length),new Date,{locale:i});return _r(c)&&nb(c)?r||n?c:U2(c,{hours:+a.hours,minutes:+(a==null?void 0:a.minutes),seconds:+(a==null?void 0:a.seconds),milliseconds:0}):null},S21=(e,t,a,r,n,i)=>{const c=Array.isArray(a)?a[0]:a;if(typeof t=="string")return zm(e,t,c,r,n,i);if(Array.isArray(t)){let s=null;for(const o of t)if(s=zm(e,o,c,r,n,i),s)break;return s}return typeof t=="function"?t(e):null},R1=e=>e?new Date(e):new Date,L21=(e,t,a)=>{if(t){const n=(e.getMonth()+1).toString().padStart(2,"0"),i=e.getDate().toString().padStart(2,"0"),c=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0"),o=a?e.getSeconds().toString().padStart(2,"0"):"00";return`${e.getFullYear()}-${n}-${i}T${c}:${s}:${o}.000Z`}const r=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds());return new Date(r).toISOString()},Pt=e=>{let t=R1(JSON.parse(JSON.stringify(e)));return t=gb(t,0),t=yb(t,0),t=Ul(t,0),t=$l(t,0),t},m0=(e,t,a,r)=>{let n=e?R1(e):R1();return(t||t===0)&&(n=gb(n,+t)),(a||a===0)&&(n=yb(n,+a)),(r||r===0)&&(n=Ul(n,+r)),$l(n,0)},he=(e,t)=>!e||!t?!1:un(Pt(e),Pt(t)),g2=(e,t)=>!e||!t?!1:Xa(Pt(e),Pt(t)),ze=(e,t)=>!e||!t?!1:g6(Pt(e),Pt(t)),Y8=(e,t,a)=>e!=null&&e[0]&&e!=null&&e[1]?ze(a,e[0])&&he(a,e[1]):e!=null&&e[0]&&t?ze(a,e[0])&&he(a,t)||he(a,e[0])&&ze(a,t):!1,d3=e=>{const t=U2(new Date(e),{date:1});return Pt(t)},vs=(e,t,a)=>t&&(a||a===0)?Object.fromEntries(["hours","minutes","seconds"].map(r=>r===t?[r,a]:[r,isNaN(+e[r])?void 0:+e[r]])):{hours:isNaN(+e.hours)?void 0:+e.hours,minutes:isNaN(+e.minutes)?void 0:+e.minutes,seconds:isNaN(+e.seconds)?void 0:+e.seconds},na=e=>({hours:O4(e),minutes:w0(e),seconds:v6(e)}),Hb=(e,t)=>{if(t){const a=d2(R1(t));if(a>e)return 12;if(a===e)return v2(R1(t))}},Sb=(e,t)=>{if(t){const a=d2(R1(t));return a<e?-1:a===e?v2(R1(t)):void 0}},b6=e=>{if(e)return d2(R1(e))},Lb=(e,t)=>{const a=ze(e,t)?t:e,r=ze(t,e)?t:e;return cb({start:a,end:r})},k21=e=>{const t=M3(e,1);return{month:v2(t),year:d2(t)}},g4=(e,t)=>{const a=L3(e,{weekStartsOn:+t}),r=sb(e,{weekStartsOn:+t});return[a,r]},kb=(e,t)=>{const a={hours:O4(R1()),minutes:w0(R1()),seconds:t?v6(R1()):0};return Object.assign(a,e)},c0=(e,t,a)=>[U2(R1(e),{date:1}),U2(R1(),{month:t,year:a,date:1})],z4=(e,t,a)=>{let r=e?R1(e):R1();return(t||t===0)&&(r=vb(r,t)),a&&(r=j3(r,a)),r},Ab=(e,t,a,r,n)=>{if(!r||n&&!t||!n&&!a)return!1;const i=n?M3(e,1):y6(e,1),c=[v2(i),d2(i)];return n?!V21(...c,t):!A21(...c,a)},A21=(e,t,a)=>he(...c0(a,e,t))||g2(...c0(a,e,t)),V21=(e,t,a)=>ze(...c0(a,e,t))||g2(...c0(a,e,t)),Vb=(e,t,a,r,n,i,c)=>{if(typeof t=="function"&&!c)return t(e);const s=a?{locale:a}:void 0;return Array.isArray(e)?`${X3(e[0],i,s)}${n&&!e[1]?"":r}${e[1]?X3(e[1],i,s):""}`:X3(e,i,s)},Ba=e=>{if(e)return null;throw new Error(Kl.prop("partial-range"))},Oc=(e,t)=>{if(t)return e();throw new Error(Kl.prop("range"))},Xo=e=>Array.isArray(e)?_r(e[0])&&(e[1]?_r(e[1]):!0):e?_r(e):!1,T21=(e,t)=>U2(t??R1(),{hours:+e.hours||0,minutes:+e.minutes||0,seconds:+e.seconds||0}),gs=(e,t,a,r)=>{if(!e)return!0;if(r){const n=a==="max"?un(e,t):g6(e,t),i={seconds:0,milliseconds:0};return n||Xa(U2(e,i),U2(t,i))}return a==="max"?e.getTime()<=t.getTime():e.getTime()>=t.getTime()},ys=(e,t,a)=>e?T21(e,t):R1(a??t),wm=(e,t,a,r,n)=>{if(Array.isArray(r)){const c=ys(e,r[0],t),s=ys(e,r[1],t);return gs(r[0],c,a,!!t)&&gs(r[1],s,a,!!t)&&n}const i=ys(e,r,t);return gs(r,i,a,!!t)&&n},xs=e=>U2(R1(),na(e)),E21=(e,t)=>e instanceof Map?Array.from(e.values()).filter(a=>d2(R1(a))===t).map(a=>v2(a)):[],Tb=(e,t,a)=>typeof e=="function"?e({month:t,year:a}):!!e.months.find(r=>r.month===t&&r.year===a),Ql=(e,t)=>typeof e=="function"?e(t):e.years.includes(t),Z6=u.reactive({menuFocused:!1,shiftKeyInMenu:!1}),Eb=()=>{const e=a=>{Z6.menuFocused=a},t=a=>{Z6.shiftKeyInMenu!==a&&(Z6.shiftKeyInMenu=a)};return{control:u.computed(()=>({shiftKeyInMenu:Z6.shiftKeyInMenu,menuFocused:Z6.menuFocused})),setMenuFocused:e,setShiftKey:t}},Y2=u.reactive({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),bs=u.ref(null),Pc=u.ref(!1),Cs=u.ref(!1),Ms=u.ref(!1),zs=u.ref(!1),Je=u.ref(0),be=u.ref(0),A0=()=>{const e=u.computed(()=>Pc.value?[...Y2.selectionGrid,Y2.actionRow].filter(d=>d.length):Cs.value?[...Y2.timePicker[0],...Y2.timePicker[1],zs.value?[]:[bs.value],Y2.actionRow].filter(d=>d.length):Ms.value?[...Y2.monthPicker,Y2.actionRow]:[Y2.monthYear,...Y2.calendar,Y2.time,Y2.actionRow].filter(d=>d.length)),t=d=>{Je.value=d?Je.value+1:Je.value-1;let h=null;e.value[be.value]&&(h=e.value[be.value][Je.value]),!h&&e.value[be.value+(d?1:-1)]?(be.value=be.value+(d?1:-1),Je.value=d?0:e.value[be.value].length-1):h||(Je.value=d?Je.value-1:Je.value+1)},a=d=>{be.value===0&&!d||be.value===e.value.length&&d||(be.value=d?be.value+1:be.value-1,e.value[be.value]?e.value[be.value]&&!e.value[be.value][Je.value]&&Je.value!==0&&(Je.value=e.value[be.value].length-1):be.value=d?be.value-1:be.value+1)},r=d=>{let h=null;e.value[be.value]&&(h=e.value[be.value][Je.value]),h?h.focus({preventScroll:!Pc.value}):Je.value=d?Je.value-1:Je.value+1},n=()=>{t(!0),r(!0)},i=()=>{t(!1),r(!1)},c=()=>{a(!1),r(!0)},s=()=>{a(!0),r(!0)},o=(d,h)=>{Y2[h]=d},l=(d,h)=>{Y2[h]=d},f=()=>{Je.value=0,be.value=0};return{buildMatrix:o,buildMultiLevelMatrix:l,setTimePickerBackRef:d=>{bs.value=d},setSelectionGrid:d=>{Pc.value=d,f(),d||(Y2.selectionGrid=[])},setTimePicker:(d,h=!1)=>{Cs.value=d,zs.value=h,f(),d||(Y2.timePicker[0]=[],Y2.timePicker[1]=[])},setTimePickerElements:(d,h=0)=>{Y2.timePicker[h]=d},arrowRight:n,arrowLeft:i,arrowUp:c,arrowDown:s,clearArrowNav:()=>{Y2.monthYear=[],Y2.calendar=[],Y2.time=[],Y2.actionRow=[],Y2.selectionGrid=[],Y2.timePicker[0]=[],Y2.timePicker[1]=[],Pc.value=!1,Cs.value=!1,zs.value=!1,Ms.value=!1,f(),bs.value=null},setMonthPicker:d=>{Ms.value=d,f()},refSets:Y2}},_m=e=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...e??{}}),N21=e=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",calendarWrap:"Calendar wrapper",calendarDays:"Calendar days",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:t=>`Increment ${t}`,decrementValue:t=>`Decrement ${t}`,openTpOverlay:t=>`Open ${t} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,...e??{}}),Hm=e=>e?typeof e=="boolean"?e?2:0:+e>=2?+e:2:0,O21=e=>{const t=typeof e=="object"&&e,a={static:!0,solo:!1};if(!e)return{...a,count:Hm(!1)};const r=t?e:{},n=t?r.count??!0:e,i=Hm(n);return Object.assign(a,r,{count:i})},P21=(e,t,a)=>e||(typeof a=="string"?a:t),D21=e=>typeof e=="boolean"?e?_m({}):!1:_m(e),R21=e=>{const t={enterSubmit:!0,tabSubmit:!0,openMenu:!0,selectOnFocus:!1,rangeSeparator:" - "};return typeof e=="object"?{...t,...e??{},enabled:!0}:{...t,enabled:e}},F21=e=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...e??{}}),B21=e=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...e??{}}),I21=e=>{const t={input:!1};return typeof e=="object"?{...t,...e??{},enabled:!0}:{enabled:e,...t}},$21=e=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,...e??{}}),U21=e=>{const t={dates:Array.isArray(e)?e.map(a=>R1(a)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof e=="function"?e:{...t,...e??{}}},q21=e=>typeof e=="object"?{type:(e==null?void 0:e.type)??"local",hideOnOffsetDates:(e==null?void 0:e.hideOnOffsetDates)??!1}:{type:e,hideOnOffsetDates:!1},j21=(e,t)=>typeof e=="object"?{enabled:!0,...{noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1},...e}:{enabled:e,noDisabledRange:t.noDisabledRange,showLastInRange:t.showLastInRange,minMaxRawRange:t.minMaxRawRange,partialRange:t.partialRange,disableTimeRangeValidation:t.disableTimeRangeValidation,maxRange:t.maxRange,minRange:t.minRange,autoRange:t.autoRange,fixedStart:t.fixedStart,fixedEnd:t.fixedEnd},W21=(e,t)=>e?typeof e=="string"?{timezone:e,exactMatch:!1,dateInTz:void 0,emitTimezone:t,convertModel:!0}:{timezone:e.timezone,exactMatch:e.exactMatch??!1,dateInTz:e.dateInTz??void 0,emitTimezone:t??e.emitTimezone,convertModel:e.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:t},ws=(e,t)=>new Map(e.map(a=>{const r=Cb(a,t);return[Zl(r),r]})),G21=(e,t)=>e.length?new Map(e.map(a=>{const r=Cb(a.date,t);return[Zl(r),a]})):null,Y21=(e,t,a,r,n,i,c)=>({minDate:Yo(e,c),maxDate:Yo(t,c),disabledDates:ps(a)?ws(a,c):a,allowedDates:ps(r)?ws(r,c):null,highlight:typeof n=="object"&&ps(n==null?void 0:n.dates)?ws(n.dates,c):n,markers:G21(i,c)}),X21=(e,t)=>typeof e=="boolean"?{enabled:e,dragSelect:!0,limit:+t}:{enabled:!!e,limit:e.limit?+e.limit:null,dragSelect:e.dragSelect??!0},ue=e=>{const t=()=>{const M=e.enableSeconds?":ss":"",w=e.enableMinutes?":mm":"";return e.is24?`HH${w}${M}`:`hh${w}${M} aa`},a=()=>{var M;return e.format?e.format:e.monthPicker?"MM/yyyy":e.timePicker?t():e.weekPicker?`${((M=g.value)==null?void 0:M.type)==="iso"?"RR":"ww"}-yyyy`:e.yearPicker?"yyyy":e.quarterPicker?"QQQ/yyyy":e.enableTimePicker?`MM/dd/yyyy, ${t()}`:"MM/dd/yyyy"},r=M=>kb(M,e.enableSeconds),n=()=>b.value.enabled?e.startTime&&Array.isArray(e.startTime)?[r(e.startTime[0]),r(e.startTime[1])]:null:e.startTime&&!Array.isArray(e.startTime)?r(e.startTime):null,i=u.computed(()=>O21(e.multiCalendars)),c=u.computed(()=>n()),s=u.computed(()=>N21(e.ariaLabels)),o=u.computed(()=>F21(e.filters)),l=u.computed(()=>D21(e.transitions)),f=u.computed(()=>B21(e.actionRow)),d=u.computed(()=>P21(e.previewFormat,e.format,a())),h=u.computed(()=>R21(e.textInput)),m=u.computed(()=>I21(e.inline)),p=u.computed(()=>$21(e.config)),v=u.computed(()=>U21(e.highlight)),g=u.computed(()=>q21(e.weekNumbers)),y=u.computed(()=>W21(e.timezone,e.emitTimezone)),x=u.computed(()=>X21(e.multiDates,e.multiDatesLimit)),C=u.computed(()=>Y21(e.minDate,e.maxDate,e.disabledDates,e.allowedDates,v.value,e.markers,y.value)),b=u.computed(()=>j21(e.range,{minMaxRawRange:!1,maxRange:e.maxRange,minRange:e.minRange,noDisabledRange:e.noDisabledRange,showLastInRange:e.showLastInRange,partialRange:e.partialRange,disableTimeRangeValidation:e.disableTimeRangeValidation,autoRange:e.autoRange,fixedStart:e.fixedStart,fixedEnd:e.fixedEnd}));return{defaultedTransitions:l,defaultedMultiCalendars:i,defaultedStartTime:c,defaultedAriaLabels:s,defaultedFilters:o,defaultedActionRow:f,defaultedPreviewFormat:d,defaultedTextInput:h,defaultedInline:m,defaultedConfig:p,defaultedHighlight:v,defaultedWeekNumbers:g,defaultedRange:b,propDates:C,defaultedTz:y,defaultedMultiDates:x,getDefaultPattern:a,getDefaultStartTime:n}},K21=(e,t,a)=>{const r=u.ref(),{defaultedTextInput:n,defaultedRange:i,defaultedTz:c,defaultedMultiDates:s,getDefaultPattern:o}=ue(t),l=u.ref(""),f=u.toRef(t,"format"),d=u.toRef(t,"formatLocale");u.watch(r,()=>{typeof t.onInternalModelChange=="function"&&e("internal-model-change",r.value,O(!0))},{deep:!0}),u.watch(i,(j,t1)=>{j.enabled!==t1.enabled&&(r.value=null)}),u.watch(f,()=>{X()});const h=j=>c.value.timezone&&c.value.convertModel?K3(j,c.value.timezone):j,m=j=>{if(c.value.timezone&&c.value.convertModel){const t1=v21(c.value.timezone);return xJ(j,t1)}return j},p=(j,t1,r1=!1)=>Vb(j,t.format,t.formatLocale,n.value.rangeSeparator,t.modelAuto,t1??o(),r1),v=j=>j?t.modelType?Y(j):{hours:O4(j),minutes:w0(j),seconds:t.enableSeconds?v6(j):0}:null,g=j=>t.modelType?Y(j):{month:v2(j),year:d2(j)},y=j=>Array.isArray(j)?s.value.enabled?j.map(t1=>x(t1,j3(R1(),t1))):Oc(()=>[j3(R1(),j[0]),j[1]?j3(R1(),j[1]):Ba(i.value.partialRange)],i.value.enabled):j3(R1(),+j),x=(j,t1)=>(typeof j=="string"||typeof j=="number")&&t.modelType?B(j):t1,C=j=>Array.isArray(j)?[x(j[0],m0(null,+j[0].hours,+j[0].minutes,j[0].seconds)),x(j[1],m0(null,+j[1].hours,+j[1].minutes,j[1].seconds))]:x(j,m0(null,j.hours,j.minutes,j.seconds)),b=j=>{const t1=U2(R1(),{date:1});return Array.isArray(j)?s.value.enabled?j.map(r1=>x(r1,z4(t1,+r1.month,+r1.year))):Oc(()=>[x(j[0],z4(t1,+j[0].month,+j[0].year)),x(j[1],j[1]?z4(t1,+j[1].month,+j[1].year):Ba(i.value.partialRange))],i.value.enabled):x(j,z4(t1,+j.month,+j.year))},M=j=>{if(Array.isArray(j))return j.map(t1=>B(t1));throw new Error(Kl.dateArr("multi-dates"))},w=j=>{if(Array.isArray(j)&&i.value.enabled){const t1=j[0],r1=j[1];return[R1(Array.isArray(t1)?t1[0]:null),R1(Array.isArray(r1)?r1[0]:null)]}return R1(j[0])},z=j=>t.modelAuto?Array.isArray(j)?[B(j[0]),B(j[1])]:t.autoApply?[B(j)]:[B(j),null]:Array.isArray(j)?Oc(()=>j[1]?[B(j[0]),j[1]?B(j[1]):Ba(i.value.partialRange)]:[B(j[0])],i.value.enabled):B(j),_=()=>{Array.isArray(r.value)&&i.value.enabled&&r.value.length===1&&r.value.push(Ba(i.value.partialRange))},S=()=>{const j=r.value;return[Y(j[0]),j[1]?Y(j[1]):Ba(i.value.partialRange)]},k=()=>r.value[1]?S():Y($e(r.value[0])),H=()=>(r.value||[]).map(j=>Y(j)),L=(j=!1)=>(j||_(),t.modelAuto?k():s.value.enabled?H():Array.isArray(r.value)?Oc(()=>S(),i.value.enabled):Y($e(r.value))),A=j=>!j||Array.isArray(j)&&!j.length?null:t.timePicker?C($e(j)):t.monthPicker?b($e(j)):t.yearPicker?y($e(j)):s.value.enabled?M($e(j)):t.weekPicker?w($e(j)):z($e(j)),N=j=>{const t1=A(j);Xo($e(t1))?(r.value=$e(t1),X()):(r.value=null,l.value="")},E=()=>{const j=t1=>X3(t1,n.value.format);return`${j(r.value[0])} ${n.value.rangeSeparator} ${r.value[1]?j(r.value[1]):""}`},R=()=>a.value&&r.value?Array.isArray(r.value)?E():X3(r.value,n.value.format):p(r.value),P=()=>r.value?s.value.enabled?r.value.map(j=>p(j)).join("; "):n.value.enabled&&typeof n.value.format=="string"?R():p(r.value):"",X=()=>{!t.format||typeof t.format=="string"||n.value.enabled&&typeof n.value.format=="string"?l.value=P():l.value=t.format(r.value)},B=j=>{if(t.utc){const t1=new Date(j);return t.utc==="preserve"?new Date(t1.getTime()+t1.getTimezoneOffset()*6e4):t1}return t.modelType?g21.includes(t.modelType)?h(new Date(j)):t.modelType==="format"&&(typeof t.format=="string"||!t.format)?h(Go(j,o(),new Date,{locale:d.value})):h(Go(j,t.modelType,new Date,{locale:d.value})):h(new Date(j))},Y=j=>j?t.utc?L21(j,t.utc==="preserve",t.enableSeconds):t.modelType?t.modelType==="timestamp"?+m(j):t.modelType==="iso"?m(j).toISOString():t.modelType==="format"&&(typeof t.format=="string"||!t.format)?p(m(j)):p(m(j),t.modelType,!0):m(j):"",D=(j,t1=!1,r1=!1)=>{if(r1)return j;if(e("update:model-value",j),c.value.emitTimezone&&t1){const Q=Array.isArray(j)?j.map(f1=>K3($e(f1),c.value.emitTimezone)):K3($e(j),c.value.emitTimezone);e("update:model-timezone-value",Q)}},V=j=>Array.isArray(r.value)?s.value.enabled?r.value.map(t1=>j(t1)):[j(r.value[0]),r.value[1]?j(r.value[1]):Ba(i.value.partialRange)]:j($e(r.value)),T=()=>{if(Array.isArray(r.value)){const j=g4(r.value[0],t.weekStart),t1=r.value[1]?g4(r.value[1],t.weekStart):[];return[j.map(r1=>R1(r1)),t1.map(r1=>R1(r1))]}return g4(r.value,t.weekStart).map(j=>R1(j))},I=(j,t1)=>D($e(V(j)),!1,t1),W=j=>{const t1=T();return j?t1:e("update:model-value",T())},O=(j=!1)=>(j||X(),t.monthPicker?I(g,j):t.timePicker?I(v,j):t.yearPicker?I(d2,j):t.weekPicker?W(j):D(L(j),!0,j));return{inputValue:l,internalModelValue:r,checkBeforeEmit:()=>r.value?i.value.enabled?i.value.partialRange?r.value.length>=1:r.value.length===2:!!r.value:!1,parseExternalModelValue:N,formatInputValue:X,emitModelValue:O}},Z21=(e,t)=>{const{defaultedFilters:a,propDates:r}=ue(e),{validateMonthYearInRange:n}=V0(e),i=(f,d)=>{let h=f;return a.value.months.includes(v2(h))?(h=d?M3(f,1):y6(f,1),i(h,d)):h},c=(f,d)=>{let h=f;return a.value.years.includes(d2(h))?(h=d?Ol(f,1):xb(f,1),c(h,d)):h},s=(f,d=!1)=>{const h=U2(R1(),{month:e.month,year:e.year});let m=f?M3(h,1):y6(h,1);e.disableYearSelect&&(m=j3(m,e.year));let p=v2(m),v=d2(m);a.value.months.includes(p)&&(m=i(m,f),p=v2(m),v=d2(m)),a.value.years.includes(v)&&(m=c(m,f),v=d2(m)),n(p,v,f,e.preventMinMaxNavigation)&&o(p,v,d)},o=(f,d,h)=>{t("update-month-year",{month:f,year:d,fromNav:h})},l=u.computed(()=>f=>Ab(U2(R1(),{month:e.month,year:e.year}),r.value.maxDate,r.value.minDate,e.preventMinMaxNavigation,f));return{handleMonthYearChange:s,isDisabled:l,updateMonthYear:o}};var qa=(e=>(e.center="center",e.left="left",e.right="right",e))(qa||{});const Q21=({menuRef:e,menuRefInner:t,inputRef:a,pickerWrapperRef:r,inline:n,emit:i,props:c,slots:s})=>{const o=u.ref({}),l=u.ref(!1),f=u.ref({top:"0",left:"0"}),d=u.ref(!1),h=u.toRef(c,"teleportCenter");u.watch(h,()=>{f.value=JSON.parse(JSON.stringify({})),b()});const m=E=>{if(c.teleport){const R=E.getBoundingClientRect();return{left:R.left+window.scrollX,top:R.top+window.scrollY}}return{top:0,left:0}},p=(E,R)=>{f.value.left=`${E+R-o.value.width}px`},v=E=>{f.value.left=`${E}px`},g=(E,R)=>{c.position===qa.left&&v(E),c.position===qa.right&&p(E,R),c.position===qa.center&&(f.value.left=`${E+R/2-o.value.width/2}px`)},y=E=>{const{width:R,height:P}=E.getBoundingClientRect(),{top:X,left:B}=c.altPosition?c.altPosition(E):m(E);return{top:+X,left:+B,width:R,height:P}},x=()=>{f.value.left="50%",f.value.top="50%",f.value.transform="translate(-50%, -50%)",f.value.position="fixed",delete f.value.opacity},C=()=>{const E=Ne(a),{top:R,left:P,transform:X}=c.altPosition(E);f.value={top:`${R}px`,left:`${P}px`,transform:X??""}},b=(E=!0)=>{var R;if(!n.value.enabled){if(h.value)return x();if(c.altPosition!==null)return C();if(E){const P=c.teleport?(R=t.value)==null?void 0:R.$el:e.value;P&&(o.value=P.getBoundingClientRect()),i("recalculate-position")}return H()}},M=({inputEl:E,left:R,width:P})=>{window.screen.width>768&&!l.value&&g(R,P),_(E)},w=E=>{const{top:R,left:P,height:X,width:B}=y(E);f.value.top=`${X+R+ +c.offset}px`,d.value=!1,l.value||(f.value.left=`${P+B/2-o.value.width/2}px`),M({inputEl:E,left:P,width:B})},z=E=>{const{top:R,left:P,width:X}=y(E);f.value.top=`${R-+c.offset-o.value.height}px`,d.value=!0,M({inputEl:E,left:P,width:X})},_=E=>{if(c.autoPosition){const{left:R,width:P}=y(E),{left:X,right:B}=o.value;if(!l.value){if(Math.abs(X)!==Math.abs(B)){if(X<=0)return l.value=!0,v(R);if(B>=document.documentElement.clientWidth)return l.value=!0,p(R,P)}return g(R,P)}}},S=()=>{const E=Ne(a);if(E){const{height:R}=o.value,{top:P,height:X}=E.getBoundingClientRect(),B=window.innerHeight-P-X,Y=P;return R<=B?j0.bottom:R>B&&R<=Y?j0.top:B>=Y?j0.bottom:j0.top}return j0.bottom},k=E=>S()===j0.bottom?w(E):z(E),H=()=>{const E=Ne(a);if(E)return c.autoPosition?k(E):w(E)},L=function(E){if(E){const R=E.scrollHeight>E.clientHeight,P=window.getComputedStyle(E).overflowY.indexOf("hidden")!==-1;return R&&!P}return!0},A=function(E){return!E||E===document.body||E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:L(E)?E:A(E.assignedSlot?E.assignedSlot.parentNode:E.parentNode)},N=E=>{if(E)switch(c.position){case qa.left:return{left:0,transform:"translateX(0)"};case qa.right:return{left:`${E.width}px`,transform:"translateX(-100%)"};default:return{left:`${E.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:d,menuStyle:f,xCorrect:l,setMenuPosition:b,getScrollableParent:A,shadowRender:(E,R)=>{var P,X,B;const Y=document.createElement("div"),D=(P=Ne(a))==null?void 0:P.getBoundingClientRect();Y.setAttribute("id","dp--temp-container");const V=(X=r.value)!=null&&X.clientWidth?r.value:document.body;V.append(Y);const T=N(D),I=u.h(E,{...R,shadow:!0,style:{opacity:0,position:"absolute",...T}},Object.fromEntries(Object.keys(s).filter(W=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(W)).map(W=>[W,s[W]])));u.render(I,Y),o.value=(B=I.el)==null?void 0:B.getBoundingClientRect(),u.render(null,Y),V.removeChild(Y)}}},j4=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]}],J21=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],ee1={all:()=>j4,monthYear:()=>j4.filter(e=>e.use.includes("month-year")),input:()=>J21,timePicker:()=>j4.filter(e=>e.use.includes("time")),action:()=>j4.filter(e=>e.use.includes("action")),calendar:()=>j4.filter(e=>e.use.includes("calendar")),menu:()=>j4.filter(e=>e.use.includes("menu")),shared:()=>j4.filter(e=>e.use.includes("shared")),yearMode:()=>j4.filter(e=>e.use.includes("year-mode"))},Et=(e,t,a)=>{const r=[];return ee1[t]().forEach(n=>{e[n.name]&&r.push(n.name)}),a!=null&&a.length&&a.forEach(n=>{n.slot&&r.push(n.slot)}),r},Rn=e=>{const t=u.computed(()=>r=>e.value?r?e.value.open:e.value.close:""),a=u.computed(()=>r=>e.value?r?e.value.menuAppearTop:e.value.menuAppearBottom:"");return{transitionName:t,showTransition:!!e.value,menuTransition:a}},Fn=(e,t)=>{const{defaultedRange:a,defaultedTz:r}=ue(e),n=R1(K3(R1(),r.value.timezone)),i=u.ref([{month:v2(n),year:d2(n)}]),c=d=>{const h={hours:O4(n),minutes:w0(n),seconds:0};return a.value.enabled?[h[d],h[d]]:h[d]},s=u.reactive({hours:c("hours"),minutes:c("minutes"),seconds:c("seconds")});u.watch(a,(d,h)=>{d.enabled!==h.enabled&&(s.hours=c("hours"),s.minutes=c("minutes"),s.seconds=c("seconds"))},{deep:!0});const o=u.computed({get:()=>e.internalModelValue,set:d=>{!e.readonly&&!e.disabled&&t("update:internal-model-value",d)}}),l=u.computed(()=>d=>i.value[d]?i.value[d].month:0),f=u.computed(()=>d=>i.value[d]?i.value[d].year:0);return{calendars:i,time:s,modelValue:o,month:l,year:f,today:n}},te1=(e,t)=>{const{defaultedMultiCalendars:a,defaultedMultiDates:r,defaultedHighlight:n,defaultedTz:i,propDates:c,defaultedRange:s}=ue(t),{isDisabled:o}=V0(t),l=u.ref(null),f=u.ref(K3(new Date,i.value.timezone)),d=T=>{!T.current&&t.hideOffsetDates||(l.value=T.value)},h=()=>{l.value=null},m=T=>Array.isArray(e.value)&&s.value.enabled&&e.value[0]&&l.value?T?ze(l.value,e.value[0]):he(l.value,e.value[0]):!0,p=(T,I)=>{const W=()=>e.value?I?e.value[0]||null:e.value[1]:null,O=e.value&&Array.isArray(e.value)?W():null;return g2(R1(T.value),O)},v=T=>{const I=Array.isArray(e.value)?e.value[0]:null;return T?!he(l.value??null,I):!0},g=(T,I=!0)=>(s.value.enabled||t.weekPicker)&&Array.isArray(e.value)&&e.value.length===2?t.hideOffsetDates&&!T.current?!1:g2(R1(T.value),e.value[I?0:1]):s.value.enabled?p(T,I)&&v(I)||g2(T.value,Array.isArray(e.value)?e.value[0]:null)&&m(I):!1,y=(T,I)=>{if(Array.isArray(e.value)&&e.value[0]&&e.value.length===1){const W=g2(T.value,l.value);return I?ze(e.value[0],T.value)&&W:he(e.value[0],T.value)&&W}return!1},x=T=>!e.value||t.hideOffsetDates&&!T.current?!1:s.value.enabled?t.modelAuto&&Array.isArray(e.value)?g2(T.value,e.value[0]?e.value[0]:f.value):!1:r.value.enabled&&Array.isArray(e.value)?e.value.some(I=>g2(I,T.value)):g2(T.value,e.value?e.value:f.value),C=T=>{if(s.value.autoRange||t.weekPicker){if(l.value){if(t.hideOffsetDates&&!T.current)return!1;const I=u3(l.value,+s.value.autoRange),W=g4(R1(l.value),t.weekStart);return t.weekPicker?g2(W[1],R1(T.value)):g2(I,R1(T.value))}return!1}return!1},b=T=>{if(s.value.autoRange||t.weekPicker){if(l.value){const I=u3(l.value,+s.value.autoRange);if(t.hideOffsetDates&&!T.current)return!1;const W=g4(R1(l.value),t.weekStart);return t.weekPicker?ze(T.value,W[0])&&he(T.value,W[1]):ze(T.value,l.value)&&he(T.value,I)}return!1}return!1},M=T=>{if(s.value.autoRange||t.weekPicker){if(l.value){if(t.hideOffsetDates&&!T.current)return!1;const I=g4(R1(l.value),t.weekStart);return t.weekPicker?g2(I[0],T.value):g2(l.value,T.value)}return!1}return!1},w=T=>Y8(e.value,l.value,T.value),z=()=>t.modelAuto&&Array.isArray(t.internalModelValue)?!!t.internalModelValue[0]:!1,_=()=>t.modelAuto?zb(t.internalModelValue):!0,S=T=>{if(t.weekPicker)return!1;const I=s.value.enabled?!g(T)&&!g(T,!1):!0;return!o(T.value)&&!x(T)&&!(!T.current&&t.hideOffsetDates)&&I},k=T=>s.value.enabled?t.modelAuto?z()&&x(T):!1:x(T),H=T=>n.value?H21(T.value,c.value.highlight):!1,L=T=>{const I=o(T.value);return I&&(typeof n.value=="function"?!n.value(T.value,I):!n.value.options.highlightDisabled)},A=T=>{var I;return typeof n.value=="function"?n.value(T.value):(I=n.value.weekdays)==null?void 0:I.includes(T.value.getDay())},N=T=>(s.value.enabled||t.weekPicker)&&(!(a.value.count>0)||T.current)&&_()&&!(!T.current&&t.hideOffsetDates)&&!x(T)?w(T):!1,E=T=>{const{isRangeStart:I,isRangeEnd:W}=B(T),O=s.value.enabled?I||W:!1;return{dp__cell_offset:!T.current,dp__pointer:!t.disabled&&!(!T.current&&t.hideOffsetDates)&&!o(T.value),dp__cell_disabled:o(T.value),dp__cell_highlight:!L(T)&&(H(T)||A(T))&&!k(T)&&!O&&!M(T)&&!(N(T)&&t.weekPicker)&&!W,dp__cell_highlight_active:!L(T)&&(H(T)||A(T))&&k(T),dp__today:!t.noToday&&g2(T.value,f.value)&&T.current,"dp--past":he(T.value,f.value),"dp--future":ze(T.value,f.value)}},R=T=>({dp__active_date:k(T),dp__date_hover:S(T)}),P=T=>{if(e.value&&!Array.isArray(e.value)){const I=g4(e.value,t.weekStart);return{...D(T),dp__range_start:g2(I[0],T.value),dp__range_end:g2(I[1],T.value),dp__range_between_week:ze(T.value,I[0])&&he(T.value,I[1])}}return{...D(T)}},X=T=>{if(e.value&&Array.isArray(e.value)){const I=g4(e.value[0],t.weekStart),W=e.value[1]?g4(e.value[1],t.weekStart):[];return{...D(T),dp__range_start:g2(I[0],T.value)||g2(W[0],T.value),dp__range_end:g2(I[1],T.value)||g2(W[1],T.value),dp__range_between_week:ze(T.value,I[0])&&he(T.value,I[1])||ze(T.value,W[0])&&he(T.value,W[1]),dp__range_between:ze(T.value,I[1])&&he(T.value,W[0])}}return{...D(T)}},B=T=>{const I=a.value.count>0?T.current&&g(T)&&_():g(T)&&_(),W=a.value.count>0?T.current&&g(T,!1)&&_():g(T,!1)&&_();return{isRangeStart:I,isRangeEnd:W}},Y=T=>{const{isRangeStart:I,isRangeEnd:W}=B(T);return{dp__range_start:I,dp__range_end:W,dp__range_between:N(T),dp__date_hover:g2(T.value,l.value)&&!I&&!W&&!t.weekPicker,dp__date_hover_start:y(T,!0),dp__date_hover_end:y(T,!1)}},D=T=>({...Y(T),dp__cell_auto_range:b(T),dp__cell_auto_range_start:M(T),dp__cell_auto_range_end:C(T)}),V=T=>s.value.enabled?s.value.autoRange?D(T):t.modelAuto?{...R(T),...Y(T)}:t.weekPicker?X(T):Y(T):t.weekPicker?P(T):R(T);return{setHoverDate:d,clearHoverDate:h,getDayClassData:T=>t.hideOffsetDates&&!T.current?{}:{...E(T),...V(T),[t.dayClass?t.dayClass(T.value):""]:!0,[t.calendarCellClassName]:!!t.calendarCellClassName}}},V0=e=>{const{defaultedFilters:t,defaultedRange:a,propDates:r,defaultedMultiDates:n}=ue(e),i=L=>r.value.disabledDates?typeof r.value.disabledDates=="function"?r.value.disabledDates(R1(L)):!!Qi(L,r.value.disabledDates):!1,c=L=>{const A=r.value.maxDate?ze(L,r.value.maxDate):!1,N=r.value.minDate?he(L,r.value.minDate):!1,E=i(L),R=t.value.months.map(D=>+D).includes(v2(L)),P=e.disabledWeekDays.length?e.disabledWeekDays.some(D=>+D===p11(L)):!1,X=d(L),B=d2(L),Y=B<+e.yearRange[0]||B>+e.yearRange[1];return!(A||N||E||R||Y||P||X)},s=(L,A)=>he(...c0(r.value.minDate,L,A))||g2(...c0(r.value.minDate,L,A)),o=(L,A)=>ze(...c0(r.value.maxDate,L,A))||g2(...c0(r.value.maxDate,L,A)),l=(L,A,N)=>{let E=!1;return r.value.maxDate&&N&&o(L,A)&&(E=!0),r.value.minDate&&!N&&s(L,A)&&(E=!0),E},f=(L,A,N,E)=>{let R=!1;return E?r.value.minDate&&r.value.maxDate?R=l(L,A,N):(r.value.minDate&&s(L,A)||r.value.maxDate&&o(L,A))&&(R=!0):R=!0,R},d=L=>Array.isArray(r.value.allowedDates)&&!r.value.allowedDates.length?!0:r.value.allowedDates?!Qi(L,r.value.allowedDates):!1,h=L=>!c(L),m=L=>a.value.noDisabledRange?!cb({start:L[0],end:L[1]}).some(A=>h(A)):!0,p=L=>{if(L){const A=d2(L);return A>=+e.yearRange[0]&&A<=e.yearRange[1]}return!0},v=(L,A)=>!!(Array.isArray(L)&&L[A]&&(a.value.maxRange||a.value.minRange)&&p(L[A])),g=(L,A,N=0)=>{if(v(A,N)&&p(L)){const E=rb(L,A[N]),R=Lb(A[N],L),P=R.length===1?0:R.filter(B=>h(B)).length,X=Math.abs(E)-(a.value.minMaxRawRange?0:P);if(a.value.minRange&&a.value.maxRange)return X>=+a.value.minRange&&X<=+a.value.maxRange;if(a.value.minRange)return X>=+a.value.minRange;if(a.value.maxRange)return X<=+a.value.maxRange}return!0},y=()=>!e.enableTimePicker||e.monthPicker||e.yearPicker||e.ignoreTimeValidation,x=L=>Array.isArray(L)?[L[0]?xs(L[0]):null,L[1]?xs(L[1]):null]:xs(L),C=(L,A,N)=>L.find(E=>+E.hours===O4(A)&&E.minutes==="*"?!0:+E.minutes===w0(A)&&+E.hours===O4(A))&&N,b=(L,A,N)=>{const[E,R]=L,[P,X]=A;return!C(E,P,N)&&!C(R,X,N)&&N},M=(L,A)=>{const N=Array.isArray(A)?A:[A];return Array.isArray(e.disabledTimes)?Array.isArray(e.disabledTimes[0])?b(e.disabledTimes,N,L):!N.some(E=>C(e.disabledTimes,E,L)):L},w=(L,A)=>{const N=Array.isArray(A)?[na(A[0]),A[1]?na(A[1]):void 0]:na(A),E=!e.disabledTimes(N);return L&&E},z=(L,A)=>e.disabledTimes?Array.isArray(e.disabledTimes)?M(A,L):w(A,L):A,_=L=>{let A=!0;if(!L||y())return!0;const N=!r.value.minDate&&!r.value.maxDate?x(L):L;return(e.maxTime||r.value.maxDate)&&(A=wm(e.maxTime,r.value.maxDate,"max",$e(N),A)),(e.minTime||r.value.minDate)&&(A=wm(e.minTime,r.value.minDate,"min",$e(N),A)),z(L,A)},S=L=>{if(!e.monthPicker)return!0;let A=!0;const N=R1(d3(L));if(r.value.minDate&&r.value.maxDate){const E=R1(d3(r.value.minDate)),R=R1(d3(r.value.maxDate));return ze(N,E)&&he(N,R)||g2(N,E)||g2(N,R)}if(r.value.minDate){const E=R1(d3(r.value.minDate));A=ze(N,E)||g2(N,E)}if(r.value.maxDate){const E=R1(d3(r.value.maxDate));A=he(N,E)||g2(N,E)}return A},k=u.computed(()=>L=>!e.enableTimePicker||e.ignoreTimeValidation?!0:_(L)),H=u.computed(()=>L=>e.monthPicker?Array.isArray(L)&&(a.value.enabled||n.value.enabled)?!L.filter(A=>!S(A)).length:S(L):!0);return{isDisabled:h,validateDate:c,validateMonthYearInRange:f,isDateRangeAllowed:m,checkMinMaxRange:g,isValidTime:_,isTimeValid:k,isMonthValid:H}},X8=()=>{const e=u.computed(()=>(r,n)=>r==null?void 0:r.includes(n)),t=u.computed(()=>(r,n)=>r.count?r.solo?!0:n===0:!0),a=u.computed(()=>(r,n)=>r.count?r.solo?!0:n===r.count-1:!0);return{hideNavigationButtons:e,showLeftIcon:t,showRightIcon:a}},ae1=(e,t,a)=>{const r=u.ref(0),n=u.reactive({[ra.timePicker]:!e.enableTimePicker||e.timePicker||e.monthPicker,[ra.calendar]:!1,[ra.header]:!1}),i=u.computed(()=>e.monthPicker||e.timePicker),c=d=>{var h;if((h=e.flow)!=null&&h.length){if(!d&&i.value)return f();n[d]=!0,Object.keys(n).filter(m=>!n[m]).length||f()}},s=()=>{var d;(d=e.flow)!=null&&d.length&&r.value!==-1&&(r.value+=1,t("flow-step",r.value),f())},o=()=>{r.value=-1},l=(d,h,...m)=>{var p,v;e.flow[r.value]===d&&a.value&&((v=(p=a.value)[h])==null||v.call(p,...m))},f=()=>{l(at.month,"toggleMonthPicker",!0),l(at.year,"toggleYearPicker",!0),l(at.calendar,"toggleTimePicker",!1,!0),l(at.time,"toggleTimePicker",!0,!0);const d=e.flow[r.value];(d===at.hours||d===at.minutes||d===at.seconds)&&l(d,"toggleTimePicker",!0,!0,d)};return{childMount:c,updateFlowStep:s,resetFlow:o,flowStep:r}},K8={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},emitTimezone:{type:String,default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},menuClassName:{type:String,default:null},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},calendarCellClassName:{type:String,default:null},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},autoRange:{type:[Number,String],default:null},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},minRange:{type:[Number,String],default:null},maxRange:{type:[Number,String],default:null},multiDatesLimit:{type:[Number,String],default:null},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},disableTimeRangeValidation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},calendarClassName:{type:String,default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},partialRange:{type:Boolean,default:!0},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},inputClassName:{type:String,default:null},fixedStart:{type:Boolean,default:!1},fixedEnd:{type:Boolean,default:!1},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},noDisabledRange:{type:Boolean,default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},showLastInRange:{type:Boolean,default:!0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0}},A3={...K8,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})}},re1={key:1,class:"dp__input_wrap"},ne1=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],ce1={key:2,class:"dp__clear_icon"},ie1=u.defineComponent({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...K8},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur"],setup(e,{expose:t,emit:a}){const r=a,n=e,{defaultedTextInput:i,defaultedAriaLabels:c,defaultedInline:s,defaultedConfig:o,defaultedRange:l,defaultedMultiDates:f,getDefaultPattern:d,getDefaultStartTime:h}=ue(n),{checkMinMaxRange:m}=V0(n),p=u.ref(),v=u.ref(null),g=u.ref(!1),y=u.ref(!1),x=u.computed(()=>({dp__pointer:!n.disabled&&!n.readonly&&!i.value.enabled,dp__disabled:n.disabled,dp__input_readonly:!i.value.enabled,dp__input:!0,dp__input_icon_pad:!n.hideInputIcon,dp__input_valid:!!n.state,dp__input_invalid:n.state===!1,dp__input_focus:g.value||n.isMenuOpen,dp__input_reg:!i.value.enabled,[n.inputClassName]:!!n.inputClassName})),C=()=>{r("set-input-date",null),n.clearable&&n.autoApply&&(r("set-empty-date"),p.value=null)},b=R=>{const P=h();return S21(R,i.value.format??d(),P??kb({},n.enableSeconds),n.inputValue,y.value,n.formatLocale)},M=R=>{const{rangeSeparator:P}=i.value,[X,B]=R.split(`${P}`);if(X){const Y=b(X.trim()),D=B?b(B.trim()):null;if(g6(Y,D))return;const V=Y&&D?[Y,D]:[Y];m(D,V,0)&&(p.value=Y?V:null)}},w=()=>{y.value=!0},z=R=>{if(l.value.enabled)M(R);else if(f.value.enabled){const P=R.split(";");p.value=P.map(X=>b(X.trim())).filter(X=>X)}else p.value=b(R)},_=R=>{var P;const X=typeof R=="string"?R:(P=R.target)==null?void 0:P.value;X!==""?(i.value.openMenu&&!n.isMenuOpen&&r("open"),z(X),r("set-input-date",p.value)):C(),y.value=!1,r("update:input-value",X)},S=R=>{i.value.enabled?(z(R.target.value),i.value.enterSubmit&&Xo(p.value)&&n.inputValue!==""?(r("set-input-date",p.value,!0),p.value=null):i.value.enterSubmit&&n.inputValue===""&&(p.value=null,r("clear"))):L(R)},k=R=>{i.value.enabled&&i.value.tabSubmit&&z(R.target.value),i.value.tabSubmit&&Xo(p.value)&&n.inputValue!==""?(r("set-input-date",p.value,!0,!0),p.value=null):i.value.tabSubmit&&n.inputValue===""&&(p.value=null,r("clear",!0))},H=()=>{g.value=!0,r("focus"),u.nextTick().then(()=>{var R;i.value.enabled&&i.value.selectOnFocus&&((R=v.value)==null||R.select())})},L=R=>{R.preventDefault(),h0(R,o.value,!0),i.value.enabled&&i.value.openMenu&&!s.value.input&&!n.isMenuOpen?r("open"):i.value.enabled||r("toggle")},A=()=>{r("real-blur"),g.value=!1,(!n.isMenuOpen||s.value.enabled&&s.value.input)&&r("blur"),n.autoApply&&i.value.enabled&&p.value&&!n.isMenuOpen&&(r("set-input-date",p.value),r("select-date"),p.value=null)},N=R=>{h0(R,o.value,!0),r("clear")},E=R=>{if(R.key==="Tab"&&k(R),R.key==="Enter"&&S(R),!i.value.enabled){if(R.code==="Tab")return;R.preventDefault()}};return t({focusInput:()=>{var R;(R=v.value)==null||R.focus({preventScroll:!0})},setParsedDate:R=>{p.value=R}}),(R,P)=>{var X;return u.openBlock(),u.createElementBlock("div",{onClick:L},[R.$slots.trigger&&!R.$slots["dp-input"]&&!u.unref(s).enabled?u.renderSlot(R.$slots,"trigger",{key:0}):u.createCommentVNode("",!0),!R.$slots.trigger&&(!u.unref(s).enabled||u.unref(s).input)?(u.openBlock(),u.createElementBlock("div",re1,[R.$slots["dp-input"]&&!R.$slots.trigger&&(!u.unref(s).enabled||u.unref(s).enabled&&u.unref(s).input)?u.renderSlot(R.$slots,"dp-input",{key:0,value:e.inputValue,isMenuOpen:e.isMenuOpen,onInput:_,onEnter:S,onTab:k,onClear:N,onBlur:A,onKeypress:E,onPaste:w,openMenu:()=>R.$emit("open"),closeMenu:()=>R.$emit("close"),toggleMenu:()=>R.$emit("toggle")}):u.createCommentVNode("",!0),R.$slots["dp-input"]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("input",{key:1,id:R.uid?`dp-input-${R.uid}`:void 0,ref_key:"inputRef",ref:v,"data-test":"dp-input",name:R.name,class:u.normalizeClass(x.value),inputmode:u.unref(i).enabled?"text":"none",placeholder:R.placeholder,disabled:R.disabled,readonly:R.readonly,required:R.required,value:e.inputValue,autocomplete:R.autocomplete,"aria-label":(X=u.unref(c))==null?void 0:X.input,"aria-disabled":R.disabled||void 0,"aria-invalid":R.state===!1?!0:void 0,onInput:_,onBlur:A,onFocus:H,onKeypress:E,onKeydown:E,onPaste:w},null,42,ne1)),u.createElementVNode("div",{onClick:P[2]||(P[2]=B=>r("toggle"))},[R.$slots["input-icon"]&&!R.hideInputIcon?(u.openBlock(),u.createElementBlock("span",{key:0,class:"dp__input_icon",onClick:P[0]||(P[0]=B=>r("toggle"))},[u.renderSlot(R.$slots,"input-icon")])):u.createCommentVNode("",!0),!R.$slots["input-icon"]&&!R.hideInputIcon&&!R.$slots["dp-input"]?(u.openBlock(),u.createBlock(u.unref(L6),{key:1,class:"dp__input_icon dp__input_icons",onClick:P[1]||(P[1]=B=>r("toggle"))})):u.createCommentVNode("",!0)]),R.$slots["clear-icon"]&&e.inputValue&&R.clearable&&!R.disabled&&!R.readonly?(u.openBlock(),u.createElementBlock("span",ce1,[u.renderSlot(R.$slots,"clear-icon",{clear:N})])):u.createCommentVNode("",!0),R.clearable&&!R.$slots["clear-icon"]&&e.inputValue&&!R.disabled&&!R.readonly?(u.openBlock(),u.createBlock(u.unref(bb),{key:3,class:"dp__clear_icon dp__input_icons","data-test":"clear-icon",onClick:P[3]||(P[3]=u.withModifiers(B=>N(B),["prevent"]))})):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)])}}}),se1=["title"],oe1=["disabled"],le1=u.defineComponent({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...A3},emits:["close-picker","select-date","select-now","invalid-select"],setup(e,{emit:t}){const a=t,r=e,{defaultedActionRow:n,defaultedPreviewFormat:i,defaultedMultiCalendars:c,defaultedTextInput:s,defaultedInline:o,defaultedRange:l,defaultedMultiDates:f,getDefaultPattern:d}=ue(r),{isTimeValid:h,isMonthValid:m}=V0(r),{buildMatrix:p}=A0(),v=u.ref(null),g=u.ref(null),y=u.ref(!1),x=u.ref({}),C=u.ref(null),b=u.ref(null);u.onMounted(()=>{r.arrowNavigation&&p([Ne(v),Ne(g)],"actionRow"),M(),window.addEventListener("resize",M)}),u.onUnmounted(()=>{window.removeEventListener("resize",M)});const M=()=>{y.value=!1,setTimeout(()=>{var E,R;const P=(E=C.value)==null?void 0:E.getBoundingClientRect(),X=(R=b.value)==null?void 0:R.getBoundingClientRect();P&&X&&(x.value.maxWidth=`${X.width-P.width-20}px`),y.value=!0},0)},w=u.computed(()=>l.value.enabled&&!l.value.partialRange&&r.internalModelValue?r.internalModelValue.length===2:!0),z=u.computed(()=>!h.value(r.internalModelValue)||!m.value(r.internalModelValue)||!w.value),_=()=>{const E=i.value;return r.timePicker||r.monthPicker,E($e(r.internalModelValue))},S=()=>{const E=r.internalModelValue;return c.value.count>0?`${k(E[0])} - ${k(E[1])}`:[k(E[0]),k(E[1])]},k=E=>Vb(E,i.value,r.formatLocale,s.value.rangeSeparator,r.modelAuto,d()),H=u.computed(()=>!r.internalModelValue||!r.menuMount?"":typeof i.value=="string"?Array.isArray(r.internalModelValue)?r.internalModelValue.length===2&&r.internalModelValue[1]?S():f.value.enabled?r.internalModelValue.map(E=>`${k(E)}`):r.modelAuto?`${k(r.internalModelValue[0])}`:`${k(r.internalModelValue[0])} -`:k(r.internalModelValue):_()),L=()=>f.value.enabled?"; ":" - ",A=u.computed(()=>Array.isArray(H.value)?H.value.join(L()):H.value),N=()=>{h.value(r.internalModelValue)&&m.value(r.internalModelValue)&&w.value?a("select-date"):a("invalid-select")};return(E,R)=>(u.openBlock(),u.createElementBlock("div",{ref_key:"actionRowRef",ref:b,class:"dp__action_row"},[E.$slots["action-row"]?u.renderSlot(E.$slots,"action-row",u.normalizeProps(u.mergeProps({key:0},{internalModelValue:E.internalModelValue,disabled:z.value,selectDate:()=>E.$emit("select-date"),closePicker:()=>E.$emit("close-picker")}))):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.unref(n).showPreview?(u.openBlock(),u.createElementBlock("div",{key:0,class:"dp__selection_preview",title:A.value,style:u.normalizeStyle(x.value)},[E.$slots["action-preview"]&&y.value?u.renderSlot(E.$slots,"action-preview",{key:0,value:E.internalModelValue}):u.createCommentVNode("",!0),!E.$slots["action-preview"]&&y.value?(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(A.value),1)],64)):u.createCommentVNode("",!0)],12,se1)):u.createCommentVNode("",!0),u.createElementVNode("div",{ref_key:"actionBtnContainer",ref:C,class:"dp__action_buttons","data-dp-element":"action-row"},[E.$slots["action-buttons"]?u.renderSlot(E.$slots,"action-buttons",{key:0,value:E.internalModelValue}):u.createCommentVNode("",!0),E.$slots["action-buttons"]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[!u.unref(o).enabled&&u.unref(n).showCancel?(u.openBlock(),u.createElementBlock("button",{key:0,ref_key:"cancelButtonRef",ref:v,type:"button",class:"dp__action_button dp__action_cancel",onClick:R[0]||(R[0]=P=>E.$emit("close-picker")),onKeydown:R[1]||(R[1]=P=>u.unref(Lt)(P,()=>E.$emit("close-picker")))},u.toDisplayString(E.cancelText),545)):u.createCommentVNode("",!0),u.unref(n).showNow?(u.openBlock(),u.createElementBlock("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:R[2]||(R[2]=P=>E.$emit("select-now")),onKeydown:R[3]||(R[3]=P=>u.unref(Lt)(P,()=>E.$emit("select-now")))},u.toDisplayString(E.nowButtonLabel),33)):u.createCommentVNode("",!0),u.unref(n).showSelect?(u.openBlock(),u.createElementBlock("button",{key:2,ref_key:"selectButtonRef",ref:g,type:"button",class:"dp__action_button dp__action_select",disabled:z.value,"data-test":"select-button",onKeydown:R[4]||(R[4]=P=>u.unref(Lt)(P,()=>N())),onClick:N},u.toDisplayString(E.selectText),41,oe1)):u.createCommentVNode("",!0)],64))],512)],64))],512))}}),fe1={class:"dp__selection_grid_header"},ue1=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],de1=["aria-label"],Bn=u.defineComponent({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(e,{expose:t,emit:a}){const{setSelectionGrid:r,buildMultiLevelMatrix:n,setMonthPicker:i}=A0(),c=a,s=e,{defaultedAriaLabels:o,defaultedTextInput:l,defaultedConfig:f}=ue(s),{hideNavigationButtons:d}=X8(),h=u.ref(!1),m=u.ref(null),p=u.ref(null),v=u.ref([]),g=u.ref(),y=u.ref(null),x=u.ref(0),C=u.ref(null);u.onBeforeUpdate(()=>{m.value=null}),u.onMounted(()=>{u.nextTick().then(()=>H()),s.noOverlayFocus||M(),b(!0)}),u.onUnmounted(()=>b(!1));const b=V=>{var T;s.arrowNavigation&&((T=s.headerRefs)!=null&&T.length?i(V):r(V))},M=()=>{var V;const T=Ne(p);T&&(l.value.enabled||(m.value?(V=m.value)==null||V.focus({preventScroll:!0}):T.focus({preventScroll:!0})),h.value=T.clientHeight<T.scrollHeight)},w=u.computed(()=>({dp__overlay:!0,"dp--overlay-absolute":!s.useRelative,"dp--overlay-relative":s.useRelative})),z=u.computed(()=>s.useRelative?{height:`${s.height}px`,width:"260px"}:void 0),_=u.computed(()=>({dp__overlay_col:!0})),S=u.computed(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:h.value,dp__button_bottom:s.isLast})),k=u.computed(()=>{var V,T;return{dp__overlay_container:!0,dp__container_flex:((V=s.items)==null?void 0:V.length)<=6,dp__container_block:((T=s.items)==null?void 0:T.length)>6}});u.watch(()=>s.items,()=>H(!1),{deep:!0});const H=(V=!0)=>{u.nextTick().then(()=>{const T=Ne(m),I=Ne(p),W=Ne(y),O=Ne(C),j=W?W.getBoundingClientRect().height:0;I&&(I.getBoundingClientRect().height?x.value=I.getBoundingClientRect().height-j:x.value=f.value.modeHeight-j),T&&O&&V&&(O.scrollTop=T.offsetTop-O.offsetTop-(x.value/2-T.getBoundingClientRect().height)-j)})},L=V=>{V.disabled||c("selected",V.value)},A=()=>{c("toggle"),c("reset-flow")},N=()=>{s.escClose&&A()},E=(V,T,I,W)=>{V&&((T.active||T.value===s.focusValue)&&(m.value=V),s.arrowNavigation&&(Array.isArray(v.value[I])?v.value[I][W]=V:v.value[I]=[V],R()))},R=()=>{var V,T;const I=(V=s.headerRefs)!=null&&V.length?[s.headerRefs].concat(v.value):v.value.concat([s.skipButtonRef?[]:[y.value]]);n($e(I),(T=s.headerRefs)!=null&&T.length?"monthPicker":"selectionGrid")},P=V=>{s.arrowNavigation||h0(V,f.value,!0)},X=V=>{g.value=V,c("hover-value",V)},B=()=>{if(A(),!s.isLast){const V=_21(s.menuWrapRef??null,"action-row");if(V){const T=wb(V);T==null||T.focus()}}},Y=V=>{switch(V.key){case oe.esc:return N();case oe.arrowLeft:return P(V);case oe.arrowRight:return P(V);case oe.arrowUp:return P(V);case oe.arrowDown:return P(V);default:return}},D=V=>{if(V.key===oe.enter)return A();if(V.key===oe.tab)return B()};return t({focusGrid:M}),(V,T)=>{var I;return u.openBlock(),u.createElementBlock("div",{ref_key:"gridWrapRef",ref:p,class:u.normalizeClass(w.value),style:u.normalizeStyle(z.value),role:"dialog",tabindex:"0",onKeydown:Y},[u.createElementVNode("div",{ref_key:"containerRef",ref:C,class:u.normalizeClass(k.value),role:"grid",style:u.normalizeStyle({"--dp-overlay-height":`${x.value}px`})},[u.createElementVNode("div",fe1,[u.renderSlot(V.$slots,"header")]),V.$slots.overlay?u.renderSlot(V.$slots,"overlay",{key:0}):(u.openBlock(!0),u.createElementBlock(u.Fragment,{key:1},u.renderList(V.items,(W,O)=>(u.openBlock(),u.createElementBlock("div",{key:O,class:u.normalizeClass(["dp__overlay_row",{dp__flex_row:V.items.length>=3}]),role:"row"},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(W,(j,t1)=>(u.openBlock(),u.createElementBlock("div",{key:j.value,ref_for:!0,ref:r1=>E(r1,j,O,t1),role:"gridcell",class:u.normalizeClass(_.value),"aria-selected":j.active||void 0,"aria-disabled":j.disabled||void 0,tabindex:"0","data-test":j.text,onClick:r1=>L(j),onKeydown:r1=>u.unref(Lt)(r1,()=>L(j),!0),onMouseover:r1=>X(j.value)},[u.createElementVNode("div",{class:u.normalizeClass(j.className)},[V.$slots.item?u.renderSlot(V.$slots,"item",{key:0,item:j}):u.createCommentVNode("",!0),V.$slots.item?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(j.text),1)],64))],2)],42,ue1))),128))],2))),128))],6),V.$slots["button-icon"]?u.withDirectives((u.openBlock(),u.createElementBlock("button",{key:0,ref_key:"toggleButton",ref:y,type:"button","aria-label":(I=u.unref(o))==null?void 0:I.toggleOverlay,class:u.normalizeClass(S.value),tabindex:"0",onClick:A,onKeydown:D},[u.renderSlot(V.$slots,"button-icon")],42,de1)),[[u.vShow,!u.unref(d)(V.hideNavigation,V.type)]]):u.createCommentVNode("",!0)],38)}}}),Z8=u.defineComponent({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(e){const t=e,a=u.computed(()=>t.multiCalendars>0?[...Array(t.multiCalendars).keys()]:[0]),r=u.computed(()=>({dp__instance_calendar:t.multiCalendars>0}));return(n,i)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass({dp__menu_inner:!n.stretch,"dp--menu--inner-stretched":n.stretch,dp__flex_display:n.multiCalendars>0,"dp--flex-display-collapsed":n.collapse})},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.value,(c,s)=>(u.openBlock(),u.createElementBlock("div",{key:c,class:u.normalizeClass(r.value)},[u.renderSlot(n.$slots,"default",{instance:c,index:s})],2))),128))],2))}}),he1=["aria-label","aria-disabled"],Hr=u.defineComponent({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(e,{emit:t}){const a=t,r=u.ref(null);return u.onMounted(()=>a("set-ref",r)),(n,i)=>(u.openBlock(),u.createElementBlock("button",{ref_key:"elRef",ref:r,type:"button",class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":n.ariaLabel,"aria-disabled":n.disabled||void 0,onClick:i[0]||(i[0]=c=>n.$emit("activate")),onKeydown:i[1]||(i[1]=c=>u.unref(Lt)(c,()=>n.$emit("activate"),!0))},[u.createElementVNode("span",{class:u.normalizeClass(["dp__inner_nav",{dp__inner_nav_disabled:n.disabled}])},[u.renderSlot(n.$slots,"default")],2)],40,he1))}}),me1={class:"dp--year-mode-picker"},pe1=["aria-label","data-test"],Nb=u.defineComponent({__name:"YearModePicker",props:{...A3,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(e,{emit:t}){const a=t,r=e,{showRightIcon:n,showLeftIcon:i}=X8(),{defaultedConfig:c,defaultedMultiCalendars:s,defaultedAriaLabels:o,defaultedTransitions:l}=ue(r),{showTransition:f,transitionName:d}=Rn(l),h=(v=!1,g)=>{a("toggle-year-picker",{flow:v,show:g})},m=v=>{a("year-select",v)},p=(v=!1)=>{a("handle-year",v)};return(v,g)=>{var y,x,C;return u.openBlock(),u.createElementBlock("div",me1,[u.unref(i)(u.unref(s),e.instance)?(u.openBlock(),u.createBlock(Hr,{key:0,ref:"mpPrevIconRef","aria-label":(y=u.unref(o))==null?void 0:y.prevYear,disabled:e.isDisabled(!1),onActivate:g[0]||(g[0]=b=>p(!1))},{default:u.withCtx(()=>[v.$slots["arrow-left"]?u.renderSlot(v.$slots,"arrow-left",{key:0}):u.createCommentVNode("",!0),v.$slots["arrow-left"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(ql),{key:1}))]),_:3},8,["aria-label","disabled"])):u.createCommentVNode("",!0),u.createElementVNode("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":(x=u.unref(o))==null?void 0:x.openYearsOverlay,"data-test":`year-mode-btn-${e.instance}`,onClick:g[1]||(g[1]=()=>h(!1)),onKeydown:g[2]||(g[2]=u.withKeys(()=>h(!1),["enter"]))},[v.$slots.year?u.renderSlot(v.$slots,"year",{key:0,year:e.year}):u.createCommentVNode("",!0),v.$slots.year?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(e.year),1)],64))],40,pe1),u.unref(n)(u.unref(s),e.instance)?(u.openBlock(),u.createBlock(Hr,{key:1,ref:"mpNextIconRef","aria-label":(C=u.unref(o))==null?void 0:C.nextYear,disabled:e.isDisabled(!0),onActivate:g[3]||(g[3]=b=>p(!0))},{default:u.withCtx(()=>[v.$slots["arrow-right"]?u.renderSlot(v.$slots,"arrow-right",{key:0}):u.createCommentVNode("",!0),v.$slots["arrow-right"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(jl),{key:1}))]),_:3},8,["aria-label","disabled"])):u.createCommentVNode("",!0),u.createVNode(u.Transition,{name:u.unref(d)(e.showYearPicker),css:u.unref(f)},{default:u.withCtx(()=>[e.showYearPicker?(u.openBlock(),u.createBlock(Bn,{key:0,items:e.items,"text-input":v.textInput,"esc-close":v.escClose,config:v.config,"is-last":v.autoApply&&!u.unref(c).keepActionRow,"hide-navigation":v.hideNavigation,"aria-labels":v.ariaLabels,type:"year",onToggle:h,onSelected:g[4]||(g[4]=b=>m(b))},u.createSlots({"button-icon":u.withCtx(()=>[v.$slots["calendar-icon"]?u.renderSlot(v.$slots,"calendar-icon",{key:0}):u.createCommentVNode("",!0),v.$slots["calendar-icon"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(L6),{key:1}))]),_:2},[v.$slots["year-overlay-value"]?{name:"item",fn:u.withCtx(({item:b})=>[u.renderSlot(v.$slots,"year-overlay-value",{text:b.text,value:b.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels"])):u.createCommentVNode("",!0)]),_:3},8,["name","css"])])}}}),Jl=(e,t,a)=>{if(t.value&&Array.isArray(t.value))if(t.value.some(r=>g2(e,r))){const r=t.value.filter(n=>!g2(n,e));t.value=r.length?r:null}else(a&&+a>t.value.length||!a)&&t.value.push(e);else t.value=[e]},e9=(e,t,a)=>{let r=e.value?e.value.slice():[];return r.length===2&&r[1]!==null&&(r=[]),r.length?he(t,r[0])?(r.unshift(t),a("range-start",r[0]),a("range-start",r[1])):(r[1]=t,a("range-end",t)):(r=[t],a("range-start",t)),r},Q8=(e,t,a,r)=>{e&&(e[0]&&e[1]&&a&&t("auto-apply"),e[0]&&!e[1]&&r&&a&&t("auto-apply"))},Ob=e=>{Array.isArray(e.value)&&e.value.length<=2&&e.range?e.modelValue.value=e.value.map(t=>K3(R1(t),e.timezone)):Array.isArray(e.value)||(e.modelValue.value=K3(R1(e.value),e.timezone))},Pb=(e,t,a,r)=>Array.isArray(t.value)&&(t.value.length===2||t.value.length===1&&r.value.partialRange)?r.value.fixedStart&&(ze(e,t.value[0])||g2(e,t.value[0]))?[t.value[0],e]:r.value.fixedEnd&&(he(e,t.value[1])||g2(e,t.value[1]))?[e,t.value[1]]:(a("invalid-fixed-range",e),t.value):[],Db=({multiCalendars:e,highlight:t,propDates:a,calendars:r,modelValue:n,props:i,filters:c,year:s,month:o,emit:l})=>{const f=u.computed(()=>Xl(i.yearRange,i.locale,i.reverseYears)),d=u.ref([!1]),h=u.computed(()=>(w,z)=>{const _=U2(d3(new Date),{month:o.value(w),year:s.value(w)}),S=z?ib(_):Pl(_);return Ab(S,a.value.maxDate,a.value.minDate,i.preventMinMaxNavigation,z)}),m=()=>{for(let w=0;w<e.value.count;w++)if(w===0)r.value[w]=r.value[0];else{const z=U2(R1(),r.value[w-1]);r.value[w]={month:v2(z),year:d2(Ol(z,1))}}},p=w=>{if(!w)return m();const z=U2(R1(),r.value[w]);return r.value[0].year=d2(xb(z,e.value.count-1)),m()},v=w=>i.focusStartDate?w[0]:w[1]?w[1]:w[0],g=()=>{if(n.value){const w=Array.isArray(n.value)?v(n.value):n.value;r.value[0]={month:v2(w),year:d2(w)}}};u.onMounted(()=>{g(),e.value.count&&m()});const y=(w,z)=>{r.value[z].year=w,l("update-month-year",{instance:z,year:w,month:r.value[z].month}),e.value.count&&!e.value.solo&&p(z)},x=u.computed(()=>w=>x6(f.value,z=>{var _;const S=s.value(w)===z.value,k=dn(z.value,b6(a.value.minDate),b6(a.value.maxDate))||((_=c.value.years)==null?void 0:_.includes(s.value(w))),H=Ql(t.value,z.value);return{active:S,disabled:k,highlighted:H}})),C=(w,z)=>{y(w,z),M(z)},b=(w,z=!1)=>{if(!h.value(w,z)){const _=z?s.value(w)+1:s.value(w)-1;y(_,w)}},M=(w,z=!1,_)=>{z||l("reset-flow"),_!==void 0?d.value[w]=_:d.value[w]=!d.value[w],d.value[w]?l("overlay-toggle",{open:!0,overlay:at.year}):(l("overlay-closed"),l("overlay-toggle",{open:!1,overlay:at.year}))};return{isDisabled:h,groupedYears:x,showYearPicker:d,selectYear:y,toggleYearPicker:M,handleYearSelect:C,handleYear:b}},ve1=(e,t)=>{const{defaultedMultiCalendars:a,defaultedAriaLabels:r,defaultedTransitions:n,defaultedConfig:i,defaultedRange:c,defaultedHighlight:s,propDates:o,defaultedTz:l,defaultedFilters:f,defaultedMultiDates:d}=ue(e),{modelValue:h,year:m,month:p,calendars:v}=Fn(e,t),g=u.computed(()=>Mb(e.formatLocale,e.locale,e.monthNameFormat)),y=u.ref(null),{checkMinMaxRange:x}=V0(e),{selectYear:C,groupedYears:b,showYearPicker:M,toggleYearPicker:w,handleYearSelect:z,handleYear:_,isDisabled:S}=Db({modelValue:h,multiCalendars:a,highlight:s,calendars:v,year:m,propDates:o,month:p,filters:f,props:e,emit:t});u.onMounted(()=>{e.startDate&&(h.value&&e.focusStartDate||!h.value)&&C(d2(R1(e.startDate)),0)});const k=T=>T?{month:v2(T),year:d2(T)}:{month:null,year:null},H=()=>h.value?Array.isArray(h.value)?h.value.map(T=>k(T)):k(h.value):k(),L=(T,I)=>{const W=v.value[T],O=H();return Array.isArray(O)?O.some(j=>j.year===(W==null?void 0:W.year)&&j.month===I):(W==null?void 0:W.year)===O.year&&I===O.month},A=(T,I,W)=>{var O,j;const t1=H();return Array.isArray(t1)?m.value(I)===((O=t1[W])==null?void 0:O.year)&&T===((j=t1[W])==null?void 0:j.month):!1},N=(T,I)=>{if(c.value.enabled){const W=H();if(Array.isArray(h.value)&&Array.isArray(W)){const O=A(T,I,0)||A(T,I,1),j=z4(d3(R1()),T,m.value(I));return Y8(h.value,y.value,j)&&!O}return!1}return!1},E=u.computed(()=>T=>x6(g.value,I=>{var W;const O=L(T,I.value),j=dn(I.value,Hb(m.value(T),o.value.minDate),Sb(m.value(T),o.value.maxDate))||E21(o.value.disabledDates,m.value(T)).includes(I.value)||((W=f.value.months)==null?void 0:W.includes(I.value)),t1=N(I.value,T),r1=Tb(s.value,I.value,m.value(T));return{active:O,disabled:j,isBetween:t1,highlighted:r1}})),R=(T,I)=>z4(d3(R1()),T,m.value(I)),P=(T,I)=>{const W=h.value?h.value:d3(new Date);h.value=z4(W,T,m.value(I)),t("auto-apply"),t("update-flow-step")},X=(T,I)=>{const W=R(T,I);c.value.fixedEnd||c.value.fixedStart?h.value=Pb(W,h,t,c):h.value?x(W,h.value)&&(h.value=e9(h,R(T,I),t)):h.value=[R(T,I)],u.nextTick().then(()=>{Q8(h.value,t,e.autoApply,e.modelAuto)})},B=(T,I)=>{Jl(R(T,I),h,d.value.limit),t("auto-apply",!0)},Y=(T,I)=>(v.value[I].month=T,V(I,v.value[I].year,T),d.value.enabled?B(T,I):c.value.enabled?X(T,I):P(T,I)),D=(T,I)=>{C(T,I),V(I,T,null)},V=(T,I,W)=>{let O=W;if(!O&&O!==0){const j=H();O=Array.isArray(j)?j[T].month:j.month}t("update-month-year",{instance:T,year:I,month:O})};return{groupedMonths:E,groupedYears:b,year:m,isDisabled:S,defaultedMultiCalendars:a,defaultedAriaLabels:r,defaultedTransitions:n,defaultedConfig:i,showYearPicker:M,modelValue:h,presetDate:(T,I)=>{Ob({value:T,modelValue:h,range:c.value.enabled,timezone:I?void 0:l.value.timezone}),t("auto-apply")},setHoverDate:(T,I)=>{y.value=R(T,I)},selectMonth:Y,selectYear:D,toggleYearPicker:w,handleYearSelect:z,handleYear:_,getModelMonthYear:H}},ge1=u.defineComponent({compatConfig:{MODE:3},__name:"MonthPicker",props:{...A3},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=u.useSlots(),i=Et(n,"yearMode"),c=e;u.onMounted(()=>{c.shadow||r("mount",null)});const{groupedMonths:s,groupedYears:o,year:l,isDisabled:f,defaultedMultiCalendars:d,defaultedConfig:h,showYearPicker:m,modelValue:p,presetDate:v,setHoverDate:g,selectMonth:y,selectYear:x,toggleYearPicker:C,handleYearSelect:b,handleYear:M,getModelMonthYear:w}=ve1(c,r);return t({getSidebarProps:()=>({modelValue:p,year:l,getModelMonthYear:w,selectMonth:y,selectYear:x,handleYear:M}),presetDate:v,toggleYearPicker:z=>C(0,z)}),(z,_)=>(u.openBlock(),u.createBlock(Z8,{"multi-calendars":u.unref(d).count,collapse:z.collapse,stretch:""},{default:u.withCtx(({instance:S})=>[z.$slots["top-extra"]?u.renderSlot(z.$slots,"top-extra",{key:0,value:z.internalModelValue}):u.createCommentVNode("",!0),z.$slots["month-year"]?u.renderSlot(z.$slots,"month-year",u.normalizeProps(u.mergeProps({key:1},{year:u.unref(l),months:u.unref(s)(S),years:u.unref(o)(S),selectMonth:u.unref(y),selectYear:u.unref(x),instance:S}))):(u.openBlock(),u.createBlock(Bn,{key:2,items:u.unref(s)(S),"arrow-navigation":z.arrowNavigation,"is-last":z.autoApply&&!u.unref(h).keepActionRow,"esc-close":z.escClose,height:u.unref(h).modeHeight,config:z.config,"no-overlay-focus":!!(z.noOverlayFocus||z.textInput),"use-relative":"",type:"month",onSelected:k=>u.unref(y)(k,S),onHoverValue:k=>u.unref(g)(k,S)},u.createSlots({header:u.withCtx(()=>[u.createVNode(Nb,u.mergeProps(z.$props,{items:u.unref(o)(S),instance:S,"show-year-picker":u.unref(m)[S],year:u.unref(l)(S),"is-disabled":k=>u.unref(f)(S,k),onHandleYear:k=>u.unref(M)(S,k),onYearSelect:k=>u.unref(b)(k,S),onToggleYearPicker:k=>u.unref(C)(S,k==null?void 0:k.flow,k==null?void 0:k.show)}),u.createSlots({_:2},[u.renderList(u.unref(i),(k,H)=>({name:k,fn:u.withCtx(L=>[u.renderSlot(z.$slots,k,u.normalizeProps(u.guardReactiveProps(L)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[z.$slots["month-overlay-value"]?{name:"item",fn:u.withCtx(({item:k})=>[u.renderSlot(z.$slots,"month-overlay-value",{text:k.text,value:k.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse"]))}}),ye1=(e,t)=>{const{modelValue:a}=Fn(e,t),r=u.ref(null),{defaultedHighlight:n,defaultedMultiDates:i,defaultedFilters:c,defaultedRange:s,propDates:o}=ue(e),l=u.ref();u.onMounted(()=>{e.startDate&&(a.value&&e.focusStartDate||!a.value)&&(l.value=d2(R1(e.startDate)))});const f=p=>Array.isArray(a.value)?a.value.some(v=>d2(v)===p):a.value?d2(a.value)===p:!1,d=p=>s.value.enabled&&Array.isArray(a.value)?Y8(a.value,r.value,m(p)):!1,h=u.computed(()=>x6(Xl(e.yearRange,e.locale,e.reverseYears),p=>{const v=f(p.value),g=dn(p.value,b6(o.value.minDate),b6(o.value.maxDate))||c.value.years.includes(p.value),y=d(p.value)&&!v,x=Ql(n.value,p.value);return{active:v,disabled:g,isBetween:y,highlighted:x}})),m=p=>j3(d3(new Date),p);return{groupedYears:h,modelValue:a,focusYear:l,setHoverValue:p=>{r.value=j3(d3(new Date),p)},selectYear:p=>{var v;if(t("update-month-year",{instance:0,year:p}),i.value.enabled)return a.value?Array.isArray(a.value)&&(((v=a.value)==null?void 0:v.map(g=>d2(g))).includes(p)?a.value=a.value.filter(g=>d2(g)!==p):a.value.push(j3(Pt(R1()),p))):a.value=[j3(Pt(R1()),p)],t("auto-apply",!0);s.value.enabled?(a.value=e9(a,m(p),t),u.nextTick().then(()=>{Q8(a.value,t,e.autoApply,e.modelAuto)})):(a.value=m(p),t("auto-apply"))}}},xe1=u.defineComponent({compatConfig:{MODE:3},__name:"YearPicker",props:{...A3},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(e,{expose:t,emit:a}){const r=a,n=e,{groupedYears:i,modelValue:c,focusYear:s,selectYear:o,setHoverValue:l}=ye1(n,r),{defaultedConfig:f}=ue(n);return t({getSidebarProps:()=>({modelValue:c,selectYear:o})}),(d,h)=>(u.openBlock(),u.createElementBlock("div",null,[d.$slots["top-extra"]?u.renderSlot(d.$slots,"top-extra",{key:0,value:d.internalModelValue}):u.createCommentVNode("",!0),d.$slots["month-year"]?u.renderSlot(d.$slots,"month-year",u.normalizeProps(u.mergeProps({key:1},{years:u.unref(i),selectYear:u.unref(o)}))):(u.openBlock(),u.createBlock(Bn,{key:2,items:u.unref(i),"is-last":d.autoApply&&!u.unref(f).keepActionRow,height:u.unref(f).modeHeight,config:d.config,"no-overlay-focus":!!(d.noOverlayFocus||d.textInput),"focus-value":u.unref(s),type:"year","use-relative":"",onSelected:u.unref(o),onHoverValue:u.unref(l)},u.createSlots({_:2},[d.$slots["year-overlay-value"]?{name:"item",fn:u.withCtx(({item:m})=>[u.renderSlot(d.$slots,"year-overlay-value",{text:m.text,value:m.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),be1={key:0,class:"dp__time_input"},Ce1=["data-test","aria-label","onKeydown","onClick","onMousedown"],Me1=u.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),ze1=u.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),we1=["aria-label","disabled","data-test","onKeydown","onClick"],_e1=["data-test","aria-label","onKeydown","onClick","onMousedown"],He1=u.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),Se1=u.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),Le1={key:0},ke1=["aria-label"],Ae1=u.defineComponent({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...A3},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(e,{expose:t,emit:a}){const r=a,n=e,{setTimePickerElements:i,setTimePickerBackRef:c}=A0(),{defaultedAriaLabels:s,defaultedTransitions:o,defaultedFilters:l,defaultedConfig:f,defaultedRange:d}=ue(n),{transitionName:h,showTransition:m}=Rn(o),p=u.reactive({hours:!1,minutes:!1,seconds:!1}),v=u.ref("AM"),g=u.ref(null),y=u.ref([]),x=u.ref();u.onMounted(()=>{r("mounted")});const C=q=>U2(new Date,{hours:q.hours,minutes:q.minutes,seconds:n.enableSeconds?q.seconds:0,milliseconds:0}),b=u.computed(()=>q=>R(q,n[q])||w(q,n[q])),M=u.computed(()=>({hours:n.hours,minutes:n.minutes,seconds:n.seconds})),w=(q,g1)=>d.value.enabled&&!d.value.disableTimeRangeValidation?!n.validateTime(q,g1):!1,z=(q,g1)=>{if(d.value.enabled&&!d.value.disableTimeRangeValidation){const _1=g1?+n[`${q}Increment`]:-+n[`${q}Increment`],m1=n[q]+_1;return!n.validateTime(q,m1)}return!1},_=u.computed(()=>q=>!D(+n[q]+ +n[`${q}Increment`],q)||z(q,!0)),S=u.computed(()=>q=>!D(+n[q]-+n[`${q}Increment`],q)||z(q,!1)),k=(q,g1)=>Jx(U2(R1(),q),g1),H=(q,g1)=>m21(U2(R1(),q),g1),L=u.computed(()=>({dp__time_col:!0,dp__time_col_block:!n.timePickerInline,dp__time_col_reg_block:!n.enableSeconds&&n.is24&&!n.timePickerInline,dp__time_col_reg_inline:!n.enableSeconds&&n.is24&&n.timePickerInline,dp__time_col_reg_with_button:!n.enableSeconds&&!n.is24,dp__time_col_sec:n.enableSeconds&&n.is24,dp__time_col_sec_with_button:n.enableSeconds&&!n.is24})),A=u.computed(()=>{const q=[{type:"hours"}];return n.enableMinutes&&q.push({type:"",separator:!0},{type:"minutes"}),n.enableSeconds&&q.push({type:"",separator:!0},{type:"seconds"}),q}),N=u.computed(()=>A.value.filter(q=>!q.separator)),E=u.computed(()=>q=>{if(q==="hours"){const g1=j(+n.hours);return{text:g1<10?`0${g1}`:`${g1}`,value:g1}}return{text:n[q]<10?`0${n[q]}`:`${n[q]}`,value:n[q]}}),R=(q,g1)=>{var _1;if(!n.disabledTimesConfig)return!1;const m1=n.disabledTimesConfig(n.order,q==="hours"?g1:void 0);return m1[q]?!!((_1=m1[q])!=null&&_1.includes(g1)):!0},P=(q,g1)=>g1!=="hours"||v.value==="AM"?q:q+12,X=q=>{const g1=n.is24?24:12,_1=q==="hours"?g1:60,m1=+n[`${q}GridIncrement`],o1=q==="hours"&&!n.is24?m1:0,u1=[];for(let d1=o1;d1<_1;d1+=m1)u1.push({value:n.is24?d1:P(d1,q),text:d1<10?`0${d1}`:`${d1}`});return q==="hours"&&!n.is24&&u1.unshift({value:v.value==="PM"?12:0,text:"12"}),x6(u1,d1=>({active:!1,disabled:l.value.times[q].includes(d1.value)||!D(d1.value,q)||R(q,d1.value)||w(q,d1.value)}))},B=q=>q>=0?q:59,Y=q=>q>=0?q:23,D=(q,g1)=>{const _1=n.minTime?C(vs(n.minTime)):null,m1=n.maxTime?C(vs(n.maxTime)):null,o1=C(vs(M.value,g1,g1==="minutes"||g1==="seconds"?B(q):Y(q)));return _1&&m1?(un(o1,m1)||Xa(o1,m1))&&(g6(o1,_1)||Xa(o1,_1)):_1?g6(o1,_1)||Xa(o1,_1):m1?un(o1,m1)||Xa(o1,m1):!0},V=q=>n[`no${q[0].toUpperCase()+q.slice(1)}Overlay`],T=q=>{V(q)||(p[q]=!p[q],p[q]?r("overlay-opened",q):r("overlay-closed",q))},I=q=>q==="hours"?O4:q==="minutes"?w0:v6,W=()=>{x.value&&clearTimeout(x.value)},O=(q,g1=!0,_1)=>{const m1=g1?k:H,o1=g1?+n[`${q}Increment`]:-+n[`${q}Increment`];D(+n[q]+o1,q)&&r(`update:${q}`,I(q)(m1({[q]:+n[q]},{[q]:+n[`${q}Increment`]}))),!(_1!=null&&_1.keyboard)&&f.value.timeArrowHoldThreshold&&(x.value=setTimeout(()=>{O(q,g1)},f.value.timeArrowHoldThreshold))},j=q=>n.is24?q:(q>=12?v.value="PM":v.value="AM",b21(q)),t1=()=>{v.value==="PM"?(v.value="AM",r("update:hours",n.hours-12)):(v.value="PM",r("update:hours",n.hours+12)),r("am-pm-change",v.value)},r1=q=>{p[q]=!0},Q=(q,g1,_1)=>{if(q&&n.arrowNavigation){Array.isArray(y.value[g1])?y.value[g1][_1]=q:y.value[g1]=[q];const m1=y.value.reduce((o1,u1)=>u1.map((d1,y1)=>[...o1[y1]||[],u1[y1]]),[]);c(n.closeTimePickerBtn),g.value&&(m1[1]=m1[1].concat(g.value)),i(m1,n.order)}},f1=(q,g1)=>(T(q),r(`update:${q}`,g1));return t({openChildCmp:r1}),(q,g1)=>{var _1;return q.disabled?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("div",be1,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(A.value,(m1,o1)=>{var u1,d1,y1;return u.openBlock(),u.createElementBlock("div",{key:o1,class:u.normalizeClass(L.value)},[m1.separator?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[u.createTextVNode(" : ")],64)):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createElementVNode("button",{ref_for:!0,ref:V1=>Q(V1,o1,0),type:"button",class:u.normalizeClass({dp__btn:!0,dp__inc_dec_button:!q.timePickerInline,dp__inc_dec_button_inline:q.timePickerInline,dp__tp_inline_btn_top:q.timePickerInline,dp__inc_dec_button_disabled:_.value(m1.type)}),"data-test":`${m1.type}-time-inc-btn-${n.order}`,"aria-label":(u1=u.unref(s))==null?void 0:u1.incrementValue(m1.type),tabindex:"0",onKeydown:V1=>u.unref(Lt)(V1,()=>O(m1.type,!0,{keyboard:!0}),!0),onClick:V1=>u.unref(f).timeArrowHoldThreshold?void 0:O(m1.type,!0),onMousedown:V1=>u.unref(f).timeArrowHoldThreshold?O(m1.type,!0):void 0,onMouseup:W},[n.timePickerInline?(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[Me1,ze1],64)):(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[q.$slots["arrow-up"]?u.renderSlot(q.$slots,"arrow-up",{key:0}):u.createCommentVNode("",!0),q.$slots["arrow-up"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(Gl),{key:1}))],64))],42,Ce1),u.createElementVNode("button",{ref_for:!0,ref:V1=>Q(V1,o1,1),type:"button","aria-label":(d1=u.unref(s))==null?void 0:d1.openTpOverlay(m1.type),class:u.normalizeClass({dp__time_display:!0,dp__time_display_block:!q.timePickerInline,dp__time_display_inline:q.timePickerInline,"dp--time-invalid":b.value(m1.type),"dp--time-overlay-btn":!b.value(m1.type)}),disabled:V(m1.type),tabindex:"0","data-test":`${m1.type}-toggle-overlay-btn-${n.order}`,onKeydown:V1=>u.unref(Lt)(V1,()=>T(m1.type),!0),onClick:V1=>T(m1.type)},[q.$slots[m1.type]?u.renderSlot(q.$slots,m1.type,{key:0,text:E.value(m1.type).text,value:E.value(m1.type).value}):u.createCommentVNode("",!0),q.$slots[m1.type]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(E.value(m1.type).text),1)],64))],42,we1),u.createElementVNode("button",{ref_for:!0,ref:V1=>Q(V1,o1,2),type:"button",class:u.normalizeClass({dp__btn:!0,dp__inc_dec_button:!q.timePickerInline,dp__inc_dec_button_inline:q.timePickerInline,dp__tp_inline_btn_bottom:q.timePickerInline,dp__inc_dec_button_disabled:S.value(m1.type)}),"data-test":`${m1.type}-time-dec-btn-${n.order}`,"aria-label":(y1=u.unref(s))==null?void 0:y1.decrementValue(m1.type),tabindex:"0",onKeydown:V1=>u.unref(Lt)(V1,()=>O(m1.type,!1,{keyboard:!0}),!0),onClick:V1=>u.unref(f).timeArrowHoldThreshold?void 0:O(m1.type,!1),onMousedown:V1=>u.unref(f).timeArrowHoldThreshold?O(m1.type,!1):void 0,onMouseup:W},[n.timePickerInline?(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[He1,Se1],64)):(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[q.$slots["arrow-down"]?u.renderSlot(q.$slots,"arrow-down",{key:0}):u.createCommentVNode("",!0),q.$slots["arrow-down"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(Yl),{key:1}))],64))],42,_e1)],64))],2)}),128)),q.is24?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("div",Le1,[q.$slots["am-pm-button"]?u.renderSlot(q.$slots,"am-pm-button",{key:0,toggle:t1,value:v.value}):u.createCommentVNode("",!0),q.$slots["am-pm-button"]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("button",{key:1,ref_key:"amPmButton",ref:g,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(_1=u.unref(s))==null?void 0:_1.amPmButton,tabindex:"0",onClick:t1,onKeydown:g1[0]||(g1[0]=m1=>u.unref(Lt)(m1,()=>t1(),!0))},u.toDisplayString(v.value),41,ke1))])),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(N.value,(m1,o1)=>(u.openBlock(),u.createBlock(u.Transition,{key:o1,name:u.unref(h)(p[m1.type]),css:u.unref(m)},{default:u.withCtx(()=>[p[m1.type]?(u.openBlock(),u.createBlock(Bn,{key:0,items:X(m1.type),"is-last":q.autoApply&&!u.unref(f).keepActionRow,"esc-close":q.escClose,type:m1.type,"text-input":q.textInput,config:q.config,"arrow-navigation":q.arrowNavigation,"aria-labels":q.ariaLabels,onSelected:u1=>f1(m1.type,u1),onToggle:u1=>T(m1.type),onResetFlow:g1[1]||(g1[1]=u1=>q.$emit("reset-flow"))},u.createSlots({"button-icon":u.withCtx(()=>[q.$slots["clock-icon"]?u.renderSlot(q.$slots,"clock-icon",{key:0}):u.createCommentVNode("",!0),q.$slots["clock-icon"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.resolveDynamicComponent(q.timePickerInline?u.unref(L6):u.unref(Wl)),{key:1}))]),_:2},[q.$slots[`${m1.type}-overlay-value`]?{name:"item",fn:u.withCtx(({item:u1})=>[u.renderSlot(q.$slots,`${m1.type}-overlay-value`,{text:u1.text,value:u1.value})]),key:"0"}:void 0,q.$slots[`${m1.type}-overlay-header`]?{name:"header",fn:u.withCtx(()=>[u.renderSlot(q.$slots,`${m1.type}-overlay-header`,{toggle:()=>T(m1.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","onSelected","onToggle"])):u.createCommentVNode("",!0)]),_:2},1032,["name","css"]))),128))]))}}}),Ve1={class:"dp--tp-wrap"},Te1=["aria-label","tabindex"],Ee1=["tabindex"],Ne1=["aria-label"],Rb=u.defineComponent({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...A3},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(e,{expose:t,emit:a}){const r=a,n=e,{buildMatrix:i,setTimePicker:c}=A0(),s=u.useSlots(),{defaultedTransitions:o,defaultedAriaLabels:l,defaultedTextInput:f,defaultedConfig:d,defaultedRange:h}=ue(n),{transitionName:m,showTransition:p}=Rn(o),{hideNavigationButtons:v}=X8(),g=u.ref(null),y=u.ref(null),x=u.ref([]),C=u.ref(null);u.onMounted(()=>{r("mount"),!n.timePicker&&n.arrowNavigation?i([Ne(g.value)],"time"):c(!0,n.timePicker)});const b=u.computed(()=>h.value.enabled&&n.modelAuto?zb(n.internalModelValue):!0),M=u.ref(!1),w=P=>({hours:Array.isArray(n.hours)?n.hours[P]:n.hours,minutes:Array.isArray(n.minutes)?n.minutes[P]:n.minutes,seconds:Array.isArray(n.seconds)?n.seconds[P]:n.seconds}),z=u.computed(()=>{const P=[];if(h.value.enabled)for(let X=0;X<2;X++)P.push(w(X));else P.push(w(0));return P}),_=(P,X=!1,B="")=>{X||r("reset-flow"),M.value=P,r(P?"overlay-opened":"overlay-closed",at.time),n.arrowNavigation&&c(P),u.nextTick(()=>{B!==""&&x.value[0]&&x.value[0].openChildCmp(B)})},S=u.computed(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:n.autoApply&&!d.value.keepActionRow})),k=Et(s,"timePicker"),H=(P,X,B)=>h.value.enabled?X===0?[P,z.value[1][B]]:[z.value[0][B],P]:P,L=P=>{r("update:hours",P)},A=P=>{r("update:minutes",P)},N=P=>{r("update:seconds",P)},E=()=>{if(C.value&&!f.value.enabled&&!n.noOverlayFocus){const P=wb(C.value);P&&P.focus({preventScroll:!0})}},R=P=>{r("overlay-closed",P)};return t({toggleTimePicker:_}),(P,X)=>{var B;return u.openBlock(),u.createElementBlock("div",Ve1,[!P.timePicker&&!P.timePickerInline?u.withDirectives((u.openBlock(),u.createElementBlock("button",{key:0,ref_key:"openTimePickerBtn",ref:g,type:"button",class:u.normalizeClass(S.value),"aria-label":(B=u.unref(l))==null?void 0:B.openTimePicker,tabindex:P.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:X[0]||(X[0]=Y=>u.unref(Lt)(Y,()=>_(!0))),onClick:X[1]||(X[1]=Y=>_(!0))},[P.$slots["clock-icon"]?u.renderSlot(P.$slots,"clock-icon",{key:0}):u.createCommentVNode("",!0),P.$slots["clock-icon"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(Wl),{key:1}))],42,Te1)),[[u.vShow,!u.unref(v)(P.hideNavigation,"time")]]):u.createCommentVNode("",!0),u.createVNode(u.Transition,{name:u.unref(m)(M.value),css:u.unref(p)&&!P.timePickerInline},{default:u.withCtx(()=>{var Y;return[M.value||P.timePicker||P.timePickerInline?(u.openBlock(),u.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:C,class:u.normalizeClass({dp__overlay:!P.timePickerInline,"dp--overlay-absolute":!n.timePicker&&!P.timePickerInline,"dp--overlay-relative":n.timePicker}),style:u.normalizeStyle(P.timePicker?{height:`${u.unref(d).modeHeight}px`}:void 0),tabindex:P.timePickerInline?void 0:0},[u.createElementVNode("div",{class:u.normalizeClass(P.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[P.$slots["time-picker-overlay"]?u.renderSlot(P.$slots,"time-picker-overlay",{key:0,hours:e.hours,minutes:e.minutes,seconds:e.seconds,setHours:L,setMinutes:A,setSeconds:N}):u.createCommentVNode("",!0),P.$slots["time-picker-overlay"]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("div",{key:1,class:u.normalizeClass(P.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(z.value,(D,V)=>u.withDirectives((u.openBlock(),u.createBlock(Ae1,u.mergeProps({key:V,ref_for:!0},{...P.$props,order:V,hours:D.hours,minutes:D.minutes,seconds:D.seconds,closeTimePickerBtn:y.value,disabledTimesConfig:e.disabledTimesConfig,disabled:V===0?P.fixedStart:P.fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:x,"validate-time":(T,I)=>e.validateTime(T,H(I,V,T)),"onUpdate:hours":T=>L(H(T,V,"hours")),"onUpdate:minutes":T=>A(H(T,V,"minutes")),"onUpdate:seconds":T=>N(H(T,V,"seconds")),onMounted:E,onOverlayClosed:R,onOverlayOpened:X[2]||(X[2]=T=>P.$emit("overlay-opened",T)),onAmPmChange:X[3]||(X[3]=T=>P.$emit("am-pm-change",T))}),u.createSlots({_:2},[u.renderList(u.unref(k),(T,I)=>({name:T,fn:u.withCtx(W=>[u.renderSlot(P.$slots,T,u.mergeProps({ref_for:!0},W))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[u.vShow,V===0?!0:b.value]])),128))],2)),!P.timePicker&&!P.timePickerInline?u.withDirectives((u.openBlock(),u.createElementBlock("button",{key:2,ref_key:"closeTimePickerBtn",ref:y,type:"button",class:u.normalizeClass(S.value),"aria-label":(Y=u.unref(l))==null?void 0:Y.closeTimePicker,tabindex:"0",onKeydown:X[4]||(X[4]=D=>u.unref(Lt)(D,()=>_(!1))),onClick:X[5]||(X[5]=D=>_(!1))},[P.$slots["calendar-icon"]?u.renderSlot(P.$slots,"calendar-icon",{key:0}):u.createCommentVNode("",!0),P.$slots["calendar-icon"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(L6),{key:1}))],42,Ne1)),[[u.vShow,!u.unref(v)(P.hideNavigation,"time")]]):u.createCommentVNode("",!0)],2)],14,Ee1)):u.createCommentVNode("",!0)]}),_:3},8,["name","css"])])}}}),Fb=(e,t,a,r)=>{const{defaultedRange:n}=ue(e),i=(C,b)=>Array.isArray(t[C])?t[C][b]:t[C],c=C=>e.enableSeconds?Array.isArray(t.seconds)?t.seconds[C]:t.seconds:0,s=(C,b)=>C?b!==void 0?m0(C,i("hours",b),i("minutes",b),c(b)):m0(C,t.hours,t.minutes,c()):Ul(R1(),c(b)),o=(C,b)=>{t[C]=b},l=u.computed(()=>e.modelAuto&&n.value.enabled?Array.isArray(a.value)?a.value.length>1:!1:n.value.enabled),f=(C,b)=>{const M=Object.fromEntries(Object.keys(t).map(w=>w===C?[w,b]:[w,t[w]].slice()));if(l.value&&!n.value.disableTimeRangeValidation){const w=_=>a.value?m0(a.value[_],M.hours[_],M.minutes[_],M.seconds[_]):null,z=_=>$l(a.value[_],0);return!(g2(w(0),w(1))&&(g6(w(0),z(1))||un(w(1),z(0))))}return!0},d=(C,b)=>{f(C,b)&&(o(C,b),r&&r())},h=C=>{d("hours",C)},m=C=>{d("minutes",C)},p=C=>{d("seconds",C)},v=(C,b,M,w)=>{b&&h(C),!b&&!M&&m(C),M&&p(C),a.value&&w(a.value)},g=C=>{if(C){const b=Array.isArray(C),M=b?[+C[0].hours,+C[1].hours]:+C.hours,w=b?[+C[0].minutes,+C[1].minutes]:+C.minutes,z=b?[+C[0].seconds,+C[1].seconds]:+C.seconds;o("hours",M),o("minutes",w),e.enableSeconds&&o("seconds",z)}},y=(C,b)=>{const M={hours:Array.isArray(t.hours)?t.hours[C]:t.hours,disabledArr:[]};return(b||b===0)&&(M.hours=b),Array.isArray(e.disabledTimes)&&(M.disabledArr=n.value.enabled&&Array.isArray(e.disabledTimes[C])?e.disabledTimes[C]:e.disabledTimes),M},x=u.computed(()=>(C,b)=>{var M;if(Array.isArray(e.disabledTimes)){const{disabledArr:w,hours:z}=y(C,b),_=w.filter(S=>+S.hours===z);return((M=_[0])==null?void 0:M.minutes)==="*"?{hours:[z],minutes:void 0,seconds:void 0}:{hours:[],minutes:(_==null?void 0:_.map(S=>+S.minutes))??[],seconds:(_==null?void 0:_.map(S=>S.seconds?+S.seconds:void 0))??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:o,updateHours:h,updateMinutes:m,updateSeconds:p,getSetDateTime:s,updateTimeValues:v,getSecondsValue:c,assignStartTime:g,validateTime:f,disabledTimesConfig:x}},Oe1=(e,t)=>{const{modelValue:a,time:r}=Fn(e,t),{defaultedStartTime:n,defaultedRange:i}=ue(e),{updateTimeValues:c,getSetDateTime:s,setTime:o,assignStartTime:l,disabledTimesConfig:f,validateTime:d}=Fb(e,r,a,h);function h(){t("update-flow-step")}const m=b=>{const{hours:M,minutes:w,seconds:z}=b;return{hours:+M,minutes:+w,seconds:z?+z:0}},p=()=>{if(e.startTime){if(Array.isArray(e.startTime)){const M=m(e.startTime[0]),w=m(e.startTime[1]);return[U2(R1(),M),U2(R1(),w)]}const b=m(e.startTime);return U2(R1(),b)}return i.value.enabled?[null,null]:null},v=()=>{if(i.value.enabled){const[b,M]=p();a.value=[s(b,0),s(M,1)]}else a.value=s(p())},g=b=>Array.isArray(b)?[na(R1(b[0])),na(R1(b[1]))]:[na(b??R1())],y=(b,M,w)=>{o("hours",b),o("minutes",M),o("seconds",e.enableSeconds?w:0)},x=()=>{const[b,M]=g(a.value);return i.value.enabled?y([b.hours,M.hours],[b.minutes,M.minutes],[b.seconds,M.seconds]):y(b.hours,b.minutes,b.seconds)};u.onMounted(()=>{if(!e.shadow)return l(n.value),a.value?x():v()});const C=()=>{Array.isArray(a.value)?a.value=a.value.map((b,M)=>b&&s(b,M)):a.value=s(a.value),t("time-update")};return{modelValue:a,time:r,disabledTimesConfig:f,updateTime:(b,M=!0,w=!1)=>{c(b,M,w,C)},validateTime:d}},Pe1=u.defineComponent({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...A3},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,i=u.useSlots(),c=Et(i,"timePicker"),s=u.ref(null),{time:o,modelValue:l,disabledTimesConfig:f,updateTime:d,validateTime:h}=Oe1(n,r);return u.onMounted(()=>{n.shadow||r("mount",null)}),t({getSidebarProps:()=>({modelValue:l,time:o,updateTime:d}),toggleTimePicker:(m,p=!1,v="")=>{var g;(g=s.value)==null||g.toggleTimePicker(m,p,v)}}),(m,p)=>(u.openBlock(),u.createBlock(Z8,{"multi-calendars":0,stretch:""},{default:u.withCtx(()=>[u.createVNode(Rb,u.mergeProps({ref_key:"tpRef",ref:s},m.$props,{hours:u.unref(o).hours,minutes:u.unref(o).minutes,seconds:u.unref(o).seconds,"internal-model-value":m.internalModelValue,"disabled-times-config":u.unref(f),"validate-time":u.unref(h),"onUpdate:hours":p[0]||(p[0]=v=>u.unref(d)(v)),"onUpdate:minutes":p[1]||(p[1]=v=>u.unref(d)(v,!1)),"onUpdate:seconds":p[2]||(p[2]=v=>u.unref(d)(v,!1,!0)),onAmPmChange:p[3]||(p[3]=v=>m.$emit("am-pm-change",v)),onResetFlow:p[4]||(p[4]=v=>m.$emit("reset-flow")),onOverlayClosed:p[5]||(p[5]=v=>m.$emit("overlay-toggle",{open:!1,overlay:v})),onOverlayOpened:p[6]||(p[6]=v=>m.$emit("overlay-toggle",{open:!0,overlay:v}))}),u.createSlots({_:2},[u.renderList(u.unref(c),(v,g)=>({name:v,fn:u.withCtx(y=>[u.renderSlot(m.$slots,v,u.normalizeProps(u.guardReactiveProps(y)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),De1={class:"dp--header-wrap"},Re1={key:0,class:"dp__month_year_wrap"},Fe1={key:0},Be1={class:"dp__month_year_wrap"},Ie1=["aria-label","data-test","onClick","onKeydown"],$e1=u.defineComponent({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...A3},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(e,{expose:t,emit:a}){const r=a,n=e,{defaultedTransitions:i,defaultedAriaLabels:c,defaultedMultiCalendars:s,defaultedFilters:o,defaultedConfig:l,defaultedHighlight:f,propDates:d}=ue(n),{transitionName:h,showTransition:m}=Rn(i),{buildMatrix:p}=A0(),{handleMonthYearChange:v,isDisabled:g,updateMonthYear:y}=Z21(n,r),{showLeftIcon:x,showRightIcon:C}=X8(),b=u.ref(!1),M=u.ref(!1),w=u.ref([null,null,null,null]);u.onMounted(()=>{r("mount")});const z=D=>({get:()=>n[D],set:V=>{const T=D===s3.month?s3.year:s3.month;r("update-month-year",{[D]:V,[T]:n[T]}),D===s3.month?E(!0):R(!0)}}),_=u.computed(z(s3.month)),S=u.computed(z(s3.year)),k=u.computed(()=>D=>({month:n.month,year:n.year,items:D===s3.month?n.months:n.years,instance:n.instance,updateMonthYear:y,toggle:D===s3.month?E:R})),H=u.computed(()=>n.months.find(V=>V.value===n.month)||{text:"",value:0}),L=u.computed(()=>x6(n.months,D=>{const V=n.month===D.value,T=dn(D.value,Hb(n.year,d.value.minDate),Sb(n.year,d.value.maxDate))||o.value.months.includes(D.value),I=Tb(f.value,D.value,n.year);return{active:V,disabled:T,highlighted:I}})),A=u.computed(()=>x6(n.years,D=>{const V=n.year===D.value,T=dn(D.value,b6(d.value.minDate),b6(d.value.maxDate))||o.value.years.includes(D.value),I=Ql(f.value,D.value);return{active:V,disabled:T,highlighted:I}})),N=(D,V,T)=>{T!==void 0?D.value=T:D.value=!D.value,D.value?r("overlay-opened",V):r("overlay-closed",V)},E=(D=!1,V)=>{P(D),N(b,at.month,V)},R=(D=!1,V)=>{P(D),N(M,at.year,V)},P=D=>{D||r("reset-flow")},X=(D,V)=>{n.arrowNavigation&&(w.value[V]=Ne(D),p(w.value,"monthYear"))},B=u.computed(()=>{var D,V;return[{type:s3.month,index:1,toggle:E,modelValue:_.value,updateModelValue:T=>_.value=T,text:H.value.text,showSelectionGrid:b.value,items:L.value,ariaLabel:(D=c.value)==null?void 0:D.openMonthsOverlay},{type:s3.year,index:2,toggle:R,modelValue:S.value,updateModelValue:T=>S.value=T,text:_b(n.year,n.locale),showSelectionGrid:M.value,items:A.value,ariaLabel:(V=c.value)==null?void 0:V.openYearsOverlay}]}),Y=u.computed(()=>n.disableYearSelect?[B.value[0]]:n.yearFirst?[...B.value].reverse():B.value);return t({toggleMonthPicker:E,toggleYearPicker:R,handleMonthYearChange:v}),(D,V)=>{var T,I,W;return u.openBlock(),u.createElementBlock("div",De1,[D.$slots["month-year"]?(u.openBlock(),u.createElementBlock("div",Re1,[u.renderSlot(D.$slots,"month-year",u.normalizeProps(u.guardReactiveProps({month:e.month,year:e.year,months:e.months,years:e.years,updateMonthYear:u.unref(y),handleMonthYearChange:u.unref(v),instance:e.instance})))])):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[D.$slots["top-extra"]?(u.openBlock(),u.createElementBlock("div",Fe1,[u.renderSlot(D.$slots,"top-extra",{value:D.internalModelValue})])):u.createCommentVNode("",!0),u.createElementVNode("div",Be1,[u.unref(x)(u.unref(s),e.instance)&&!D.vertical?(u.openBlock(),u.createBlock(Hr,{key:0,"aria-label":(T=u.unref(c))==null?void 0:T.prevMonth,disabled:u.unref(g)(!1),onActivate:V[0]||(V[0]=O=>u.unref(v)(!1,!0)),onSetRef:V[1]||(V[1]=O=>X(O,0))},{default:u.withCtx(()=>[D.$slots["arrow-left"]?u.renderSlot(D.$slots,"arrow-left",{key:0}):u.createCommentVNode("",!0),D.$slots["arrow-left"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(ql),{key:1}))]),_:3},8,["aria-label","disabled"])):u.createCommentVNode("",!0),u.createElementVNode("div",{class:u.normalizeClass(["dp__month_year_wrap",{dp__year_disable_select:D.disableYearSelect}])},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(Y.value,(O,j)=>(u.openBlock(),u.createElementBlock(u.Fragment,{key:O.type},[u.createElementVNode("button",{ref_for:!0,ref:t1=>X(t1,j+1),type:"button",class:"dp__btn dp__month_year_select",tabindex:"0","aria-label":O.ariaLabel,"data-test":`${O.type}-toggle-overlay-${e.instance}`,onClick:O.toggle,onKeydown:t1=>u.unref(Lt)(t1,()=>O.toggle(),!0)},[D.$slots[O.type]?u.renderSlot(D.$slots,O.type,{key:0,text:O.text,value:n[O.type]}):u.createCommentVNode("",!0),D.$slots[O.type]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(O.text),1)],64))],40,Ie1),u.createVNode(u.Transition,{name:u.unref(h)(O.showSelectionGrid),css:u.unref(m)},{default:u.withCtx(()=>[O.showSelectionGrid?(u.openBlock(),u.createBlock(Bn,{key:0,items:O.items,"arrow-navigation":D.arrowNavigation,"hide-navigation":D.hideNavigation,"is-last":D.autoApply&&!u.unref(l).keepActionRow,"skip-button-ref":!1,config:D.config,type:O.type,"header-refs":[],"esc-close":D.escClose,"menu-wrap-ref":D.menuWrapRef,"text-input":D.textInput,"aria-labels":D.ariaLabels,onSelected:O.updateModelValue,onToggle:O.toggle},u.createSlots({"button-icon":u.withCtx(()=>[D.$slots["calendar-icon"]?u.renderSlot(D.$slots,"calendar-icon",{key:0}):u.createCommentVNode("",!0),D.$slots["calendar-icon"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(L6),{key:1}))]),_:2},[D.$slots[`${O.type}-overlay-value`]?{name:"item",fn:u.withCtx(({item:t1})=>[u.renderSlot(D.$slots,`${O.type}-overlay-value`,{text:t1.text,value:t1.value})]),key:"0"}:void 0,D.$slots[`${O.type}-overlay`]?{name:"overlay",fn:u.withCtx(()=>[u.renderSlot(D.$slots,`${O.type}-overlay`,u.mergeProps({ref_for:!0},k.value(O.type)))]),key:"1"}:void 0,D.$slots[`${O.type}-overlay-header`]?{name:"header",fn:u.withCtx(()=>[u.renderSlot(D.$slots,`${O.type}-overlay-header`,{toggle:O.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","onSelected","onToggle"])):u.createCommentVNode("",!0)]),_:2},1032,["name","css"])],64))),128))],2),u.unref(x)(u.unref(s),e.instance)&&D.vertical?(u.openBlock(),u.createBlock(Hr,{key:1,"aria-label":(I=u.unref(c))==null?void 0:I.prevMonth,disabled:u.unref(g)(!1),onActivate:V[2]||(V[2]=O=>u.unref(v)(!1,!0))},{default:u.withCtx(()=>[D.$slots["arrow-up"]?u.renderSlot(D.$slots,"arrow-up",{key:0}):u.createCommentVNode("",!0),D.$slots["arrow-up"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(Gl),{key:1}))]),_:3},8,["aria-label","disabled"])):u.createCommentVNode("",!0),u.unref(C)(u.unref(s),e.instance)?(u.openBlock(),u.createBlock(Hr,{key:2,ref:"rightIcon",disabled:u.unref(g)(!0),"aria-label":(W=u.unref(c))==null?void 0:W.nextMonth,onActivate:V[3]||(V[3]=O=>u.unref(v)(!0,!0)),onSetRef:V[4]||(V[4]=O=>X(O,D.disableYearSelect?2:3))},{default:u.withCtx(()=>[D.$slots[D.vertical?"arrow-down":"arrow-right"]?u.renderSlot(D.$slots,D.vertical?"arrow-down":"arrow-right",{key:0}):u.createCommentVNode("",!0),D.$slots[D.vertical?"arrow-down":"arrow-right"]?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.resolveDynamicComponent(D.vertical?u.unref(Yl):u.unref(jl)),{key:1}))]),_:3},8,["disabled","aria-label"])):u.createCommentVNode("",!0)])],64))])}}}),Ue1=["aria-label"],qe1={class:"dp__calendar_header",role:"row"},je1={key:0,class:"dp__calendar_header_item",role:"gridcell"},We1=["aria-label"],Ge1=u.createElementVNode("div",{class:"dp__calendar_header_separator"},null,-1),Ye1=["aria-label"],Xe1={key:0,role:"gridcell",class:"dp__calendar_item dp__week_num"},Ke1={class:"dp__cell_inner"},Ze1=["id","aria-selected","aria-disabled","aria-label","data-test","onClick","onKeydown","onMouseenter","onMouseleave","onMousedown"],Qe1=u.defineComponent({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...A3},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(e,{expose:t,emit:a}){const r=a,n=e,{buildMultiLevelMatrix:i}=A0(),{defaultedTransitions:c,defaultedConfig:s,defaultedAriaLabels:o,defaultedMultiCalendars:l,defaultedWeekNumbers:f,defaultedMultiDates:d}=ue(n),h=u.ref(null),m=u.ref({bottom:"",left:"",transform:""}),p=u.ref([]),v=u.ref(null),g=u.ref(!0),y=u.ref(""),x=u.ref({startX:0,endX:0,startY:0,endY:0}),C=u.ref([]),b=u.ref({left:"50%"}),M=u.ref(!1),w=u.computed(()=>n.calendar?n.calendar(n.mappedDates):n.mappedDates),z=u.computed(()=>n.dayNames?Array.isArray(n.dayNames)?n.dayNames:n.dayNames(n.locale,+n.weekStart):x21(n.formatLocale,n.locale,+n.weekStart));u.onMounted(()=>{r("mount",{cmp:"calendar",refs:p}),s.value.noSwipe||v.value&&(v.value.addEventListener("touchstart",B,{passive:!1}),v.value.addEventListener("touchend",Y,{passive:!1}),v.value.addEventListener("touchmove",D,{passive:!1})),n.monthChangeOnScroll&&v.value&&v.value.addEventListener("wheel",I,{passive:!1})});const _=Q=>Q?n.vertical?"vNext":"next":n.vertical?"vPrevious":"previous",S=(Q,f1)=>{if(n.transitions){const q=Pt(z4(R1(),n.month,n.year));y.value=ze(Pt(z4(R1(),Q,f1)),q)?c.value[_(!0)]:c.value[_(!1)],g.value=!1,u.nextTick(()=>{g.value=!0})}},k=u.computed(()=>({[n.calendarClassName]:!!n.calendarClassName})),H=u.computed(()=>Q=>{const f1=C21(Q);return{dp__marker_dot:f1.type==="dot",dp__marker_line:f1.type==="line"}}),L=u.computed(()=>Q=>g2(Q,h.value)),A=u.computed(()=>({dp__calendar:!0,dp__calendar_next:l.value.count>0&&n.instance!==0})),N=u.computed(()=>Q=>n.hideOffsetDates?Q.current:!0),E=Q=>X3(Q,"yyyy-MM-dd"),R=async(Q,f1,q)=>{const g1=Ne(p.value[f1][q]);if(g1){const{width:_1,height:m1}=g1.getBoundingClientRect();h.value=Q.value;let o1={left:`${_1/2}px`},u1=-50;if(await u.nextTick(),C.value[0]){const{left:d1,width:y1}=C.value[0].getBoundingClientRect();d1<0&&(o1={left:"0"},u1=0,b.value.left=`${_1/2}px`),window.innerWidth<d1+y1&&(o1={right:"0"},u1=0,b.value.left=`${y1-_1/2}px`)}m.value={bottom:`${m1}px`,...o1,transform:`translateX(${u1}%)`},r("tooltip-open",Q.marker)}},P=async(Q,f1,q)=>{var g1,_1;if(M.value&&d.value.enabled&&d.value.dragSelect)return r("select-date",Q);r("set-hover-date",Q),(_1=(g1=Q.marker)==null?void 0:g1.tooltip)!=null&&_1.length&&await R(Q,f1,q)},X=Q=>{h.value&&(h.value=null,m.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),r("tooltip-close",Q.marker))},B=Q=>{x.value.startX=Q.changedTouches[0].screenX,x.value.startY=Q.changedTouches[0].screenY},Y=Q=>{x.value.endX=Q.changedTouches[0].screenX,x.value.endY=Q.changedTouches[0].screenY,V()},D=Q=>{n.vertical&&!n.inline&&Q.preventDefault()},V=()=>{const Q=n.vertical?"Y":"X";Math.abs(x.value[`start${Q}`]-x.value[`end${Q}`])>10&&r("handle-swipe",x.value[`start${Q}`]>x.value[`end${Q}`]?"right":"left")},T=(Q,f1,q)=>{Q&&(Array.isArray(p.value[f1])?p.value[f1][q]=Q:p.value[f1]=[Q]),n.arrowNavigation&&i(p.value,"calendar")},I=Q=>{n.monthChangeOnScroll&&(Q.preventDefault(),r("handle-scroll",Q))},W=Q=>f.value.type==="local"?Fl(Q.value,{weekStartsOn:+n.weekStart}):f.value.type==="iso"?Dl(Q.value):typeof f.value.type=="function"?f.value.type(Q.value):"",O=Q=>{const f1=Q[0];return f.value.hideOnOffsetDates?Q.some(q=>q.current)?W(f1):"":W(f1)},j=(Q,f1)=>{d.value.enabled||(h0(Q,s.value),r("select-date",f1))},t1=Q=>{h0(Q,s.value)},r1=Q=>{d.value.enabled&&d.value.dragSelect?(M.value=!0,r("select-date",Q)):d.value.enabled&&r("select-date",Q)};return t({triggerTransition:S}),(Q,f1)=>{var q;return u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(A.value)},[u.createElementVNode("div",{ref_key:"calendarWrapRef",ref:v,role:"grid",class:u.normalizeClass(k.value),"aria-label":(q=u.unref(o))==null?void 0:q.calendarWrap},[u.createElementVNode("div",qe1,[Q.weekNumbers?(u.openBlock(),u.createElementBlock("div",je1,u.toDisplayString(Q.weekNumName),1)):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(z.value,(g1,_1)=>{var m1,o1;return u.openBlock(),u.createElementBlock("div",{key:_1,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(o1=(m1=u.unref(o))==null?void 0:m1.weekDay)==null?void 0:o1.call(m1,_1)},[Q.$slots["calendar-header"]?u.renderSlot(Q.$slots,"calendar-header",{key:0,day:g1,index:_1}):u.createCommentVNode("",!0),Q.$slots["calendar-header"]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(g1),1)],64))],8,We1)}),128))]),Ge1,u.createVNode(u.Transition,{name:y.value,css:!!Q.transitions},{default:u.withCtx(()=>{var g1;return[g.value?(u.openBlock(),u.createElementBlock("div",{key:0,class:"dp__calendar",role:"rowgroup","aria-label":((g1=u.unref(o))==null?void 0:g1.calendarDays)||void 0,onMouseleave:f1[1]||(f1[1]=_1=>M.value=!1)},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(w.value,(_1,m1)=>(u.openBlock(),u.createElementBlock("div",{key:m1,class:"dp__calendar_row",role:"row"},[Q.weekNumbers?(u.openBlock(),u.createElementBlock("div",Xe1,[u.createElementVNode("div",Ke1,u.toDisplayString(O(_1.days)),1)])):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(_1.days,(o1,u1)=>{var d1,y1,V1;return u.openBlock(),u.createElementBlock("div",{id:E(o1.value),ref_for:!0,ref:C1=>T(C1,m1,u1),key:u1+m1,role:"gridcell",class:"dp__calendar_item","aria-selected":(o1.classData.dp__active_date||o1.classData.dp__range_start||o1.classData.dp__range_start)??void 0,"aria-disabled":o1.classData.dp__cell_disabled||void 0,"aria-label":(y1=(d1=u.unref(o))==null?void 0:d1.day)==null?void 0:y1.call(d1,o1),tabindex:"0","data-test":o1.value,onClick:u.withModifiers(C1=>j(C1,o1),["prevent"]),onKeydown:C1=>u.unref(Lt)(C1,()=>Q.$emit("select-date",o1)),onMouseenter:C1=>P(o1,m1,u1),onMouseleave:C1=>X(o1),onMousedown:C1=>r1(o1),onMouseup:f1[0]||(f1[0]=C1=>M.value=!1)},[u.createElementVNode("div",{class:u.normalizeClass(["dp__cell_inner",o1.classData])},[Q.$slots.day&&N.value(o1)?u.renderSlot(Q.$slots,"day",{key:0,day:+o1.text,date:o1.value}):u.createCommentVNode("",!0),Q.$slots.day?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(o1.text),1)],64)),o1.marker&&N.value(o1)?(u.openBlock(),u.createElementBlock(u.Fragment,{key:2},[Q.$slots.marker?u.renderSlot(Q.$slots,"marker",{key:0,marker:o1.marker,day:+o1.text,date:o1.value}):(u.openBlock(),u.createElementBlock("div",{key:1,class:u.normalizeClass(H.value(o1.marker)),style:u.normalizeStyle(o1.marker.color?{backgroundColor:o1.marker.color}:{})},null,6))],64)):u.createCommentVNode("",!0),L.value(o1.value)?(u.openBlock(),u.createElementBlock("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:C,class:"dp__marker_tooltip",style:u.normalizeStyle(m.value)},[(V1=o1.marker)!=null&&V1.tooltip?(u.openBlock(),u.createElementBlock("div",{key:0,class:"dp__tooltip_content",onClick:t1},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(o1.marker.tooltip,(C1,S1)=>(u.openBlock(),u.createElementBlock("div",{key:S1,class:"dp__tooltip_text"},[Q.$slots["marker-tooltip"]?u.renderSlot(Q.$slots,"marker-tooltip",{key:0,tooltip:C1,day:o1.value}):u.createCommentVNode("",!0),Q.$slots["marker-tooltip"]?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createElementVNode("div",{class:"dp__tooltip_mark",style:u.normalizeStyle(C1.color?{backgroundColor:C1.color}:{})},null,4),u.createElementVNode("div",null,u.toDisplayString(C1.text),1)],64))]))),128)),u.createElementVNode("div",{class:"dp__arrow_bottom_tp",style:u.normalizeStyle(b.value)},null,4)])):u.createCommentVNode("",!0)],4)):u.createCommentVNode("",!0)],2)],40,Ze1)}),128))]))),128))],40,Ye1)):u.createCommentVNode("",!0)]}),_:3},8,["name","css"])],10,Ue1)],2)}}}),Sm=e=>Array.isArray(e),Je1=(e,t,a,r)=>{const n=u.ref([]),i=u.ref(new Date),c=u.ref(),{modelValue:s,calendars:o,time:l,today:f}=Fn(e,t),{defaultedMultiCalendars:d,defaultedStartTime:h,defaultedRange:m,defaultedConfig:p,defaultedTz:v,propDates:g,defaultedMultiDates:y}=ue(e),{validateMonthYearInRange:x,isDisabled:C,isDateRangeAllowed:b,checkMinMaxRange:M}=V0(e),{updateTimeValues:w,getSetDateTime:z,setTime:_,assignStartTime:S,validateTime:k,disabledTimesConfig:H}=Fb(e,l,s,r),L=u.computed(()=>b1=>o.value[b1]?o.value[b1].month:0),A=u.computed(()=>b1=>o.value[b1]?o.value[b1].year:0),N=b1=>!p.value.keepViewOnOffsetClick||b1?!0:!c.value,E=(b1,v1,P1,B1=!1)=>{var n2,W2;N(B1)&&(o.value[b1]||(o.value[b1]={month:0,year:0}),o.value[b1].month=Mm(v1)?(n2=o.value[b1])==null?void 0:n2.month:v1,o.value[b1].year=Mm(P1)?(W2=o.value[b1])==null?void 0:W2.year:P1)},R=()=>{e.autoApply&&t("select-date")};u.watch(s,(b1,v1)=>{JSON.stringify(b1)!==JSON.stringify(v1)&&B()},{deep:!0}),u.onMounted(()=>{e.shadow||(s.value||(Q(),h.value&&S(h.value)),B(!0),e.focusStartDate&&e.startDate&&Q())});const P=u.computed(()=>{var b1;return(b1=e.flow)!=null&&b1.length&&!e.partialFlow?e.flowStep===e.flow.length:!0}),X=()=>{e.autoApply&&P.value&&t("auto-apply")},B=(b1=!1)=>{if(s.value)return Array.isArray(s.value)?(n.value=s.value,O(b1)):V(s.value,b1);if(d.value.count&&b1&&!e.startDate)return D(R1(),b1)},Y=()=>Array.isArray(s.value)&&m.value.enabled?v2(s.value[0])===v2(s.value[1]??s.value[0]):!1,D=(b1,v1=!1)=>{if((!d.value.count||!d.value.static||v1)&&E(0,v2(b1),d2(b1)),d.value.count&&(!d.value.solo||!s.value||Y()))for(let P1=1;P1<d.value.count;P1++){const B1=U2(R1(),{month:L.value(P1-1),year:A.value(P1-1)}),n2=Jx(B1,{months:1});o.value[P1]={month:v2(n2),year:d2(n2)}}},V=(b1,v1)=>{D(b1),_("hours",O4(b1)),_("minutes",w0(b1)),_("seconds",v6(b1)),d.value.count&&v1&&r1()},T=b1=>{if(d.value.count){if(d.value.solo)return 0;const v1=v2(b1[0]),P1=v2(b1[1]);return Math.abs(P1-v1)<d.value.count?0:1}return 1},I=(b1,v1)=>{b1[1]&&m.value.showLastInRange?D(b1[T(b1)],v1):D(b1[0],v1);const P1=(B1,n2)=>[B1(b1[0]),b1[1]?B1(b1[1]):l[n2][1]];_("hours",P1(O4,"hours")),_("minutes",P1(w0,"minutes")),_("seconds",P1(v6,"seconds"))},W=(b1,v1)=>{if((m.value.enabled||e.weekPicker)&&!y.value.enabled)return I(b1,v1);if(y.value.enabled&&v1){const P1=b1[b1.length-1];return V(P1,v1)}},O=b1=>{const v1=s.value;W(v1,b1),d.value.count&&d.value.solo&&r1()},j=(b1,v1)=>{const P1=U2(R1(),{month:L.value(v1),year:A.value(v1)}),B1=b1<0?M3(P1,1):y6(P1,1);x(v2(B1),d2(B1),b1<0,e.preventMinMaxNavigation)&&(E(v1,v2(B1),d2(B1)),t("update-month-year",{instance:v1,month:v2(B1),year:d2(B1)}),d.value.count&&!d.value.solo&&t1(v1),a())},t1=b1=>{for(let v1=b1-1;v1>=0;v1--){const P1=y6(U2(R1(),{month:L.value(v1+1),year:A.value(v1+1)}),1);E(v1,v2(P1),d2(P1))}for(let v1=b1+1;v1<=d.value.count-1;v1++){const P1=M3(U2(R1(),{month:L.value(v1-1),year:A.value(v1-1)}),1);E(v1,v2(P1),d2(P1))}},r1=()=>{if(Array.isArray(s.value)&&s.value.length===2){const b1=R1(R1(s.value[1]?s.value[1]:M3(s.value[0],1))),[v1,P1]=[v2(s.value[0]),d2(s.value[0])],[B1,n2]=[v2(s.value[1]),d2(s.value[1])];(v1!==B1||v1===B1&&P1!==n2)&&d.value.solo&&E(1,v2(b1),d2(b1))}else s.value&&!Array.isArray(s.value)&&(E(0,v2(s.value),d2(s.value)),D(R1()))},Q=()=>{e.startDate&&(E(0,v2(R1(e.startDate)),d2(R1(e.startDate))),d.value.count&&t1(0))},f1=(b1,v1)=>{if(e.monthChangeOnScroll){const P1=new Date().getTime()-i.value.getTime(),B1=Math.abs(b1.deltaY);let n2=500;B1>1&&(n2=100),B1>100&&(n2=0),P1>n2&&(i.value=new Date,j(e.monthChangeOnScroll!=="inverse"?-b1.deltaY:b1.deltaY,v1))}},q=(b1,v1,P1=!1)=>{e.monthChangeOnArrows&&e.vertical===P1&&g1(b1,v1)},g1=(b1,v1)=>{j(b1==="right"?-1:1,v1)},_1=b1=>{if(g.value.markers)return Qi(b1.value,g.value.markers)},m1=(b1,v1)=>{switch(e.sixWeeks===!0?"append":e.sixWeeks){case"prepend":return[!0,!1];case"center":return[b1==0,!0];case"fair":return[b1==0||v1>b1,!0];case"append":return[!1,!1];default:return[!1,!1]}},o1=(b1,v1,P1,B1)=>{if(e.sixWeeks&&b1.length<6){const n2=6-b1.length,W2=(v1.getDay()+7-B1)%7,ne=6-(P1.getDay()+7-B1)%7,[P2,Ge]=m1(W2,ne);for(let S2=1;S2<=n2;S2++)if(Ge?!!(S2%2)==P2:P2){const de=b1[0].days[0],e3=u1(u3(de.value,-7),v2(v1));b1.unshift({days:e3})}else{const de=b1[b1.length-1],e3=de.days[de.days.length-1],t3=u1(u3(e3.value,1),v2(v1));b1.push({days:t3})}}return b1},u1=(b1,v1)=>{const P1=R1(b1),B1=[];for(let n2=0;n2<7;n2++){const W2=u3(P1,n2),ne=v2(W2)!==v1;B1.push({text:e.hideOffsetDates&&ne?"":W2.getDate(),value:W2,current:!ne,classData:{}})}return B1},d1=(b1,v1)=>{const P1=[],B1=new Date(v1,b1),n2=new Date(v1,b1+1,0),W2=e.weekStart,ne=L3(B1,{weekStartsOn:W2}),P2=Ge=>{const S2=u1(Ge,b1);if(P1.push({days:S2}),!P1[P1.length-1].days.some(de=>g2(Pt(de.value),Pt(n2)))){const de=u3(Ge,7);P2(de)}};return P2(ne),o1(P1,B1,n2,W2)},y1=b1=>{const v1=m0(R1(b1.value),l.hours,l.minutes,p1());t("date-update",v1),y.value.enabled?Jl(v1,s,y.value.limit):s.value=v1,r(),u.nextTick().then(()=>{X()})},V1=b1=>m.value.noDisabledRange?Lb(n.value[0],b1).some(v1=>C(v1)):!1,C1=()=>{n.value=s.value?s.value.slice():[],n.value.length===2&&!(m.value.fixedStart||m.value.fixedEnd)&&(n.value=[])},S1=(b1,v1)=>{const P1=[R1(b1.value),u3(R1(b1.value),+m.value.autoRange)];b(P1)?(v1&&L1(b1.value),n.value=P1):t("invalid-date",b1.value)},L1=b1=>{const v1=v2(R1(b1)),P1=d2(R1(b1));if(E(0,v1,P1),d.value.count>0)for(let B1=1;B1<d.value.count;B1++){const n2=k21(U2(R1(b1),{year:L.value(B1-1),month:A.value(B1-1)}));E(B1,n2.month,n2.year)}},H1=b1=>{if(V1(b1.value)||!M(b1.value,s.value,m.value.fixedStart?0:1))return t("invalid-date",b1.value);n.value=Pb(R1(b1.value),s,t,m)},N1=(b1,v1)=>{if(C1(),m.value.autoRange)return S1(b1,v1);if(m.value.fixedStart||m.value.fixedEnd)return H1(b1);n.value[0]?M(R1(b1.value),s.value)&&!V1(b1.value)?he(R1(b1.value),R1(n.value[0]))?(n.value.unshift(R1(b1.value)),t("range-end",n.value[0])):(n.value[1]=R1(b1.value),t("range-end",n.value[1])):(e.autoApply&&t("auto-apply-invalid",b1.value),t("invalid-date",b1.value)):(n.value[0]=R1(b1.value),t("range-start",n.value[0]))},p1=(b1=!0)=>e.enableSeconds?Array.isArray(l.seconds)?b1?l.seconds[0]:l.seconds[1]:l.seconds:0,w1=b1=>{n.value[b1]=m0(n.value[b1],l.hours[b1],l.minutes[b1],p1(b1!==1))},D1=()=>{var b1,v1;n.value[0]&&n.value[1]&&+((b1=n.value)==null?void 0:b1[0])>+((v1=n.value)==null?void 0:v1[1])&&(n.value.reverse(),t("range-start",n.value[0]),t("range-end",n.value[1]))},K1=()=>{n.value.length&&(n.value[0]&&!n.value[1]?w1(0):(w1(0),w1(1),r()),D1(),s.value=n.value.slice(),Q8(n.value,t,e.autoApply,e.modelAuto))},F1=(b1,v1=!1)=>{if(C(b1.value)||!b1.current&&e.hideOffsetDates)return t("invalid-date",b1.value);if(c.value=JSON.parse(JSON.stringify(b1)),!m.value.enabled)return y1(b1);Sm(l.hours)&&Sm(l.minutes)&&!y.value.enabled&&(N1(b1,v1),K1())},Q1=(b1,v1)=>{var P1;E(b1,v1.month,v1.year,!0),d.value.count&&!d.value.solo&&t1(b1),t("update-month-year",{instance:b1,month:v1.month,year:v1.year}),a(d.value.solo?b1:void 0);const B1=(P1=e.flow)!=null&&P1.length?e.flow[e.flowStep]:void 0;!v1.fromNav&&(B1===at.month||B1===at.year)&&r()},h2=(b1,v1)=>{Ob({value:b1,modelValue:s,range:m.value.enabled,timezone:v1?void 0:v.value.timezone}),R(),e.multiCalendars&&u.nextTick().then(()=>B(!0))},a2=()=>{m.value.enabled?s.value&&Array.isArray(s.value)&&s.value[0]?s.value=he(R1(),s.value[0])?[R1(),s.value[0]]:[s.value[0],R1()]:s.value=[R1()]:s.value=R1(),R()},H2=()=>{if(Array.isArray(s.value))if(y.value.enabled){const b1=A2();s.value[s.value.length-1]=z(b1)}else s.value=s.value.map((b1,v1)=>b1&&z(b1,v1));else s.value=z(s.value);t("time-update")},A2=()=>Array.isArray(s.value)&&s.value.length?s.value[s.value.length-1]:null;return{calendars:o,modelValue:s,month:L,year:A,time:l,disabledTimesConfig:H,today:f,validateTime:k,getCalendarDays:d1,getMarker:_1,handleScroll:f1,handleSwipe:g1,handleArrow:q,selectDate:F1,updateMonthYear:Q1,presetDate:h2,selectCurrentDate:a2,updateTime:(b1,v1=!0,P1=!1)=>{w(b1,v1,P1,H2)}}},et1={key:0},tt1=u.defineComponent({__name:"DatePicker",props:{...A3},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,{calendars:i,month:c,year:s,modelValue:o,time:l,disabledTimesConfig:f,today:d,validateTime:h,getCalendarDays:m,getMarker:p,handleArrow:v,handleScroll:g,handleSwipe:y,selectDate:x,updateMonthYear:C,presetDate:b,selectCurrentDate:M,updateTime:w}=Je1(n,r,Y,D),z=u.useSlots(),{setHoverDate:_,getDayClassData:S,clearHoverDate:k}=te1(o,n),{defaultedMultiCalendars:H}=ue(n),L=u.ref([]),A=u.ref([]),N=u.ref(null),E=Et(z,"calendar"),R=Et(z,"monthYear"),P=Et(z,"timePicker"),X=f1=>{n.shadow||r("mount",f1)};u.watch(i,()=>{n.shadow||setTimeout(()=>{r("recalculate-position")},0)},{deep:!0});const B=u.computed(()=>f1=>m(c.value(f1),s.value(f1)).map(q=>({...q,days:q.days.map(g1=>(g1.marker=p(g1),g1.classData=S(g1),g1))})));function Y(f1){var q;f1||f1===0?(q=A.value[f1])==null||q.triggerTransition(c.value(f1),s.value(f1)):A.value.forEach((g1,_1)=>g1.triggerTransition(c.value(_1),s.value(_1)))}function D(){r("update-flow-step")}const V=(f1,q=!1)=>{x(f1,q),n.spaceConfirm&&r("select-date")},T=(f1,q,g1=0)=>{var _1;(_1=L.value[g1])==null||_1.toggleMonthPicker(f1,q)},I=(f1,q,g1=0)=>{var _1;(_1=L.value[g1])==null||_1.toggleYearPicker(f1,q)},W=(f1,q,g1)=>{var _1;(_1=N.value)==null||_1.toggleTimePicker(f1,q,g1)},O=f1=>{if(!n.range){const q=o.value?o.value:d,g1=f1?L3(q,{weekStartsOn:1}):sb(q,{weekStartsOn:1});x({value:g1,current:v2(q)===c.value(0),text:"",classData:{}})}},j=f1=>{var q;(q=L.value[0])==null||q.handleMonthYearChange(f1,!0)},t1=f1=>{C(0,{month:c.value(0),year:s.value(0)+(f1?1:-1),fromNav:!0})},r1=(f1,q)=>{f1===at.time&&r(`time-picker-${q?"open":"close"}`),r("overlay-toggle",{open:q,overlay:f1})},Q=f1=>{r("overlay-toggle",{open:!1,overlay:f1}),r("focus-menu")};return t({clearHoverDate:k,presetDate:b,selectCurrentDate:M,toggleMonthPicker:T,toggleYearPicker:I,toggleTimePicker:W,handleArrow:v,updateMonthYear:C,getSidebarProps:()=>({modelValue:o,month:c,year:s,time:l,updateTime:w,updateMonthYear:C,selectDate:x,presetDate:b}),changeMonth:j,changeYear:t1,selectWeekDate:O}),(f1,q)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createVNode(Z8,{"multi-calendars":u.unref(H).count,collapse:f1.collapse},{default:u.withCtx(({instance:g1,index:_1})=>[f1.disableMonthYearSelect?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock($e1,u.mergeProps({key:0,ref:m1=>{m1&&(L.value[_1]=m1)},months:u.unref(Mb)(f1.formatLocale,f1.locale,f1.monthNameFormat),years:u.unref(Xl)(f1.yearRange,f1.locale,f1.reverseYears),month:u.unref(c)(g1),year:u.unref(s)(g1),instance:g1},f1.$props,{onMount:q[0]||(q[0]=m1=>X(u.unref(ra).header)),onResetFlow:q[1]||(q[1]=m1=>f1.$emit("reset-flow")),onUpdateMonthYear:m1=>u.unref(C)(g1,m1),onOverlayClosed:Q,onOverlayOpened:q[2]||(q[2]=m1=>f1.$emit("overlay-toggle",{open:!0,overlay:m1}))}),u.createSlots({_:2},[u.renderList(u.unref(R),(m1,o1)=>({name:m1,fn:u.withCtx(u1=>[u.renderSlot(f1.$slots,m1,u.normalizeProps(u.guardReactiveProps(u1)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),u.createVNode(Qe1,u.mergeProps({ref:m1=>{m1&&(A.value[_1]=m1)},"mapped-dates":B.value(g1),month:u.unref(c)(g1),year:u.unref(s)(g1),instance:g1},f1.$props,{onSelectDate:m1=>u.unref(x)(m1,g1!==1),onHandleSpace:m1=>V(m1,g1!==1),onSetHoverDate:q[3]||(q[3]=m1=>u.unref(_)(m1)),onHandleScroll:m1=>u.unref(g)(m1,g1),onHandleSwipe:m1=>u.unref(y)(m1,g1),onMount:q[4]||(q[4]=m1=>X(u.unref(ra).calendar)),onResetFlow:q[5]||(q[5]=m1=>f1.$emit("reset-flow")),onTooltipOpen:q[6]||(q[6]=m1=>f1.$emit("tooltip-open",m1)),onTooltipClose:q[7]||(q[7]=m1=>f1.$emit("tooltip-close",m1))}),u.createSlots({_:2},[u.renderList(u.unref(E),(m1,o1)=>({name:m1,fn:u.withCtx(u1=>[u.renderSlot(f1.$slots,m1,u.normalizeProps(u.guardReactiveProps({...u1})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),f1.enableTimePicker?(u.openBlock(),u.createElementBlock("div",et1,[f1.$slots["time-picker"]?u.renderSlot(f1.$slots,"time-picker",u.normalizeProps(u.mergeProps({key:0},{time:u.unref(l),updateTime:u.unref(w)}))):(u.openBlock(),u.createBlock(Rb,u.mergeProps({key:1,ref_key:"timePickerRef",ref:N},f1.$props,{hours:u.unref(l).hours,minutes:u.unref(l).minutes,seconds:u.unref(l).seconds,"internal-model-value":f1.internalModelValue,"disabled-times-config":u.unref(f),"validate-time":u.unref(h),onMount:q[8]||(q[8]=g1=>X(u.unref(ra).timePicker)),"onUpdate:hours":q[9]||(q[9]=g1=>u.unref(w)(g1)),"onUpdate:minutes":q[10]||(q[10]=g1=>u.unref(w)(g1,!1)),"onUpdate:seconds":q[11]||(q[11]=g1=>u.unref(w)(g1,!1,!0)),onResetFlow:q[12]||(q[12]=g1=>f1.$emit("reset-flow")),onOverlayClosed:q[13]||(q[13]=g1=>r1(g1,!1)),onOverlayOpened:q[14]||(q[14]=g1=>r1(g1,!0)),onAmPmChange:q[15]||(q[15]=g1=>f1.$emit("am-pm-change",g1))}),u.createSlots({_:2},[u.renderList(u.unref(P),(g1,_1)=>({name:g1,fn:u.withCtx(m1=>[u.renderSlot(f1.$slots,g1,u.normalizeProps(u.guardReactiveProps(m1)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):u.createCommentVNode("",!0)],64))}}),at1=(e,t)=>{const a=u.ref(),{defaultedMultiCalendars:r,defaultedConfig:n,defaultedHighlight:i,defaultedRange:c,propDates:s,defaultedFilters:o,defaultedMultiDates:l}=ue(e),{modelValue:f,year:d,month:h,calendars:m}=Fn(e,t),{isDisabled:p}=V0(e),{selectYear:v,groupedYears:g,showYearPicker:y,isDisabled:x,toggleYearPicker:C,handleYearSelect:b,handleYear:M}=Db({modelValue:f,multiCalendars:r,highlight:i,calendars:m,propDates:s,month:h,year:d,filters:o,props:e,emit:t}),w=(E,R)=>[E,R].map(P=>X3(P,"MMMM",{locale:e.formatLocale})).join("-"),z=u.computed(()=>E=>f.value?Array.isArray(f.value)?f.value.some(R=>xm(E,R)):xm(f.value,E):!1),_=E=>{if(c.value.enabled){if(Array.isArray(f.value)){const R=g2(E,f.value[0])||g2(E,f.value[1]);return Y8(f.value,a.value,E)&&!R}return!1}return!1},S=(E,R)=>E.quarter===hm(R)&&E.year===d2(R),k=E=>typeof i.value=="function"?i.value({quarter:hm(E),year:d2(E)}):!!i.value.quarters.find(R=>S(R,E)),H=u.computed(()=>E=>{const R=U2(new Date,{year:d.value(E)});return zJ({start:Pl(R),end:ib(R)}).map(P=>{const X=Z0(P),B=mm(P),Y=p(P),D=_(X),V=k(X);return{text:w(X,B),value:X,active:z.value(X),highlighted:V,disabled:Y,isBetween:D}})}),L=E=>{Jl(E,f,l.value.limit),t("auto-apply",!0)},A=E=>{f.value=e9(f,E,t),Q8(f.value,t,e.autoApply,e.modelAuto)},N=E=>{f.value=E,t("auto-apply")};return{defaultedConfig:n,defaultedMultiCalendars:r,groupedYears:g,year:d,isDisabled:x,quarters:H,showYearPicker:y,modelValue:f,setHoverDate:E=>{a.value=E},selectYear:v,selectQuarter:(E,R,P)=>{if(!P)return m.value[R].month=v2(mm(E)),l.value.enabled?L(E):c.value.enabled?A(E):N(E)},toggleYearPicker:C,handleYearSelect:b,handleYear:M}},rt1={class:"dp--quarter-items"},nt1=["data-test","disabled","onClick","onMouseover"],ct1=u.defineComponent({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...A3},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(e,{expose:t,emit:a}){const r=a,n=e,i=u.useSlots(),c=Et(i,"yearMode"),{defaultedMultiCalendars:s,defaultedConfig:o,groupedYears:l,year:f,isDisabled:d,quarters:h,modelValue:m,showYearPicker:p,setHoverDate:v,selectQuarter:g,toggleYearPicker:y,handleYearSelect:x,handleYear:C}=at1(n,r);return t({getSidebarProps:()=>({modelValue:m,year:f,selectQuarter:g,handleYearSelect:x,handleYear:C})}),(b,M)=>(u.openBlock(),u.createBlock(Z8,{"multi-calendars":u.unref(s).count,collapse:b.collapse,stretch:""},{default:u.withCtx(({instance:w})=>[u.createElementVNode("div",{class:"dp-quarter-picker-wrap",style:u.normalizeStyle({minHeight:`${u.unref(o).modeHeight}px`})},[b.$slots["top-extra"]?u.renderSlot(b.$slots,"top-extra",{key:0,value:b.internalModelValue}):u.createCommentVNode("",!0),u.createElementVNode("div",null,[u.createVNode(Nb,u.mergeProps(b.$props,{items:u.unref(l)(w),instance:w,"show-year-picker":u.unref(p)[w],year:u.unref(f)(w),"is-disabled":z=>u.unref(d)(w,z),onHandleYear:z=>u.unref(C)(w,z),onYearSelect:z=>u.unref(x)(z,w),onToggleYearPicker:z=>u.unref(y)(w,z==null?void 0:z.flow,z==null?void 0:z.show)}),u.createSlots({_:2},[u.renderList(u.unref(c),(z,_)=>({name:z,fn:u.withCtx(S=>[u.renderSlot(b.$slots,z,u.normalizeProps(u.guardReactiveProps(S)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),u.createElementVNode("div",rt1,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(u.unref(h)(w),(z,_)=>(u.openBlock(),u.createElementBlock("div",{key:_},[u.createElementVNode("button",{type:"button",class:u.normalizeClass(["dp--qr-btn",{"dp--qr-btn-active":z.active,"dp--qr-btn-between":z.isBetween,"dp--qr-btn-disabled":z.disabled,"dp--highlighted":z.highlighted}]),"data-test":z.value,disabled:z.disabled,onClick:S=>u.unref(g)(z.value,w,z.disabled),onMouseover:S=>u.unref(v)(z.value)},[b.$slots.quarter?u.renderSlot(b.$slots,"quarter",{key:0,value:z.value,text:z.text}):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(z.text),1)],64))],42,nt1)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),it1=["id","aria-label"],st1={key:0,class:"dp--menu-load-container"},ot1=u.createElementVNode("span",{class:"dp--menu-loader"},null,-1),lt1=[ot1],ft1={key:0,class:"dp__sidebar_left"},ut1=["data-test","onClick","onKeydown"],dt1={key:2,class:"dp__sidebar_right"},ht1={key:3,class:"dp__action_extra"},Lm=u.defineComponent({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...K8,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,i=u.ref(null),c=u.computed(()=>{const{openOnTop:o1,...u1}=n;return{...u1,flowStep:_.value,collapse:n.collapse,noOverlayFocus:n.noOverlayFocus,menuWrapRef:i.value}}),{setMenuFocused:s,setShiftKey:o,control:l}=Eb(),f=u.useSlots(),{defaultedTextInput:d,defaultedInline:h,defaultedConfig:m}=ue(n),p=u.ref(null),v=u.ref(0),g=u.ref(null),y=u.ref(!1),x=u.ref(null);u.onMounted(()=>{if(!n.shadow){y.value=!0,C(),window.addEventListener("resize",C);const o1=Ne(i);if(o1&&!d.value.enabled&&!h.value.enabled&&(s(!0),N()),o1){const u1=d1=>{m.value.allowPreventDefault&&d1.preventDefault(),h0(d1,m.value,!0)};o1.addEventListener("pointerdown",u1),o1.addEventListener("mousedown",u1)}}}),u.onUnmounted(()=>{window.removeEventListener("resize",C)});const C=()=>{const o1=Ne(g);o1&&(v.value=o1.getBoundingClientRect().width)},{arrowRight:b,arrowLeft:M,arrowDown:w,arrowUp:z}=A0(),{flowStep:_,updateFlowStep:S,childMount:k,resetFlow:H}=ae1(n,r,x),L=u.computed(()=>n.monthPicker?ge1:n.yearPicker?xe1:n.timePicker?Pe1:n.quarterPicker?ct1:tt1),A=u.computed(()=>{var o1;if(m.value.arrowLeft)return m.value.arrowLeft;const u1=(o1=i.value)==null?void 0:o1.getBoundingClientRect(),d1=n.getInputRect();return d1.width<v.value&&d1.left<=((u1==null?void 0:u1.left)??0)?`${d1.width/2}px`:"50%"}),N=()=>{const o1=Ne(i);o1&&o1.focus({preventScroll:!0})},E=u.computed(()=>{var o1;return((o1=x.value)==null?void 0:o1.getSidebarProps())||{}}),R=()=>{n.openOnTop&&r("recalculate-position")},P=Et(f,"action"),X=u.computed(()=>n.monthPicker||n.yearPicker?Et(f,"monthYear"):n.timePicker?Et(f,"timePicker"):Et(f,"shared")),B=u.computed(()=>n.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),Y=u.computed(()=>({dp__menu_disabled:n.disabled,dp__menu_readonly:n.readonly,"dp-menu-loading":n.loading})),D=u.computed(()=>({dp__menu:!0,dp__menu_index:!h.value.enabled,dp__relative:h.value.enabled,[n.menuClassName]:!!n.menuClassName})),V=o1=>{h0(o1,m.value,!0)},T=()=>{n.escClose&&r("close-picker")},I=o1=>{if(n.arrowNavigation){if(o1===pt.up)return z();if(o1===pt.down)return w();if(o1===pt.left)return M();if(o1===pt.right)return b()}else o1===pt.right||o1===pt.up?r1("handleArrow",pt.left,0,o1===pt.up):r1("handleArrow",pt.right,0,o1===pt.down)},W=o1=>{o(o1.shiftKey),!n.disableMonthYearSelect&&o1.code===oe.tab&&o1.target.classList.contains("dp__menu")&&l.value.shiftKeyInMenu&&(o1.preventDefault(),h0(o1,m.value,!0),r("close-picker"))},O=()=>{N(),r("time-picker-close")},j=o1=>{var u1,d1,y1;(u1=x.value)==null||u1.toggleTimePicker(!1,!1),(d1=x.value)==null||d1.toggleMonthPicker(!1,!1,o1),(y1=x.value)==null||y1.toggleYearPicker(!1,!1,o1)},t1=(o1,u1=0)=>{var d1,y1,V1;return o1==="month"?(d1=x.value)==null?void 0:d1.toggleMonthPicker(!1,!0,u1):o1==="year"?(y1=x.value)==null?void 0:y1.toggleYearPicker(!1,!0,u1):o1==="time"?(V1=x.value)==null?void 0:V1.toggleTimePicker(!0,!1):j(u1)},r1=(o1,...u1)=>{var d1,y1;(d1=x.value)!=null&&d1[o1]&&((y1=x.value)==null||y1[o1](...u1))},Q=()=>{r1("selectCurrentDate")},f1=(o1,u1)=>{r1("presetDate",o1,u1)},q=()=>{r1("clearHoverDate")},g1=(o1,u1)=>{r1("updateMonthYear",o1,u1)},_1=(o1,u1)=>{o1.preventDefault(),I(u1)},m1=o1=>{if(W(o1),o1.key===oe.home||o1.key===oe.end)return r1("selectWeekDate",o1.key===oe.home);if(o1.key===oe.pageUp||o1.key===oe.pageDown)return o1.shiftKey?r1("changeYear",o1.key===oe.pageUp):r1("changeMonth",o1.key===oe.pageUp);switch(o1.key){case oe.esc:return T();case oe.arrowLeft:return _1(o1,pt.left);case oe.arrowRight:return _1(o1,pt.right);case oe.arrowUp:return _1(o1,pt.up);case oe.arrowDown:return _1(o1,pt.down);default:return}};return t({updateMonthYear:g1,switchView:t1}),(o1,u1)=>{var d1,y1,V1;return u.openBlock(),u.createElementBlock("div",{id:o1.uid?`dp-menu-${o1.uid}`:void 0,ref_key:"dpMenuRef",ref:i,tabindex:"0",role:"dialog","aria-label":(d1=o1.ariaLabels)==null?void 0:d1.menu,class:u.normalizeClass(D.value),style:u.normalizeStyle({"--dp-arrow-left":A.value}),onMouseleave:q,onClick:V,onKeydown:m1},[(o1.disabled||o1.readonly)&&u.unref(h).enabled||o1.loading?(u.openBlock(),u.createElementBlock("div",{key:0,class:u.normalizeClass(Y.value)},[o1.loading?(u.openBlock(),u.createElementBlock("div",st1,lt1)):u.createCommentVNode("",!0)],2)):u.createCommentVNode("",!0),!u.unref(h).enabled&&!o1.teleportCenter?(u.openBlock(),u.createElementBlock("div",{key:1,class:u.normalizeClass(B.value)},null,2)):u.createCommentVNode("",!0),u.createElementVNode("div",{ref_key:"innerMenuRef",ref:g,class:u.normalizeClass({dp__menu_content_wrapper:((y1=o1.presetDates)==null?void 0:y1.length)||!!o1.$slots["left-sidebar"]||!!o1.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":e.collapse&&(((V1=o1.presetDates)==null?void 0:V1.length)||!!o1.$slots["left-sidebar"]||!!o1.$slots["right-sidebar"])}),style:u.normalizeStyle({"--dp-menu-width":`${v.value}px`})},[o1.$slots["left-sidebar"]?(u.openBlock(),u.createElementBlock("div",ft1,[u.renderSlot(o1.$slots,"left-sidebar",u.normalizeProps(u.guardReactiveProps(E.value)))])):u.createCommentVNode("",!0),o1.presetDates.length?(u.openBlock(),u.createElementBlock("div",{key:1,class:u.normalizeClass({"dp--preset-dates-collapsed":e.collapse,"dp--preset-dates":!0})},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(o1.presetDates,(C1,S1)=>(u.openBlock(),u.createElementBlock(u.Fragment,{key:S1},[C1.slot?u.renderSlot(o1.$slots,C1.slot,{key:0,presetDate:f1,label:C1.label,value:C1.value}):(u.openBlock(),u.createElementBlock("button",{key:1,type:"button",style:u.normalizeStyle(C1.style||{}),class:u.normalizeClass(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":e.collapse}]),"data-test":C1.testId??void 0,onClick:u.withModifiers(L1=>f1(C1.value,C1.noTz),["prevent"]),onKeydown:L1=>u.unref(Lt)(L1,()=>f1(C1.value,C1.noTz),!0)},u.toDisplayString(C1.label),47,ut1))],64))),128))],2)):u.createCommentVNode("",!0),u.createElementVNode("div",{ref_key:"calendarWrapperRef",ref:p,class:"dp__instance_calendar",role:"document"},[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(L.value),u.mergeProps({ref_key:"dynCmpRef",ref:x},c.value,{"flow-step":u.unref(_),onMount:u.unref(k),onUpdateFlowStep:u.unref(S),onResetFlow:u.unref(H),onFocusMenu:N,onSelectDate:u1[0]||(u1[0]=C1=>o1.$emit("select-date")),onDateUpdate:u1[1]||(u1[1]=C1=>o1.$emit("date-update",C1)),onTooltipOpen:u1[2]||(u1[2]=C1=>o1.$emit("tooltip-open",C1)),onTooltipClose:u1[3]||(u1[3]=C1=>o1.$emit("tooltip-close",C1)),onAutoApply:u1[4]||(u1[4]=C1=>o1.$emit("auto-apply",C1)),onRangeStart:u1[5]||(u1[5]=C1=>o1.$emit("range-start",C1)),onRangeEnd:u1[6]||(u1[6]=C1=>o1.$emit("range-end",C1)),onInvalidFixedRange:u1[7]||(u1[7]=C1=>o1.$emit("invalid-fixed-range",C1)),onTimeUpdate:u1[8]||(u1[8]=C1=>o1.$emit("time-update")),onAmPmChange:u1[9]||(u1[9]=C1=>o1.$emit("am-pm-change",C1)),onTimePickerOpen:u1[10]||(u1[10]=C1=>o1.$emit("time-picker-open",C1)),onTimePickerClose:O,onRecalculatePosition:R,onUpdateMonthYear:u1[11]||(u1[11]=C1=>o1.$emit("update-month-year",C1)),onAutoApplyInvalid:u1[12]||(u1[12]=C1=>o1.$emit("auto-apply-invalid",C1)),onInvalidDate:u1[13]||(u1[13]=C1=>o1.$emit("invalid-date",C1)),onOverlayToggle:u1[14]||(u1[14]=C1=>o1.$emit("overlay-toggle",C1)),"onUpdate:internalModelValue":u1[15]||(u1[15]=C1=>o1.$emit("update:internal-model-value",C1))}),u.createSlots({_:2},[u.renderList(X.value,(C1,S1)=>({name:C1,fn:u.withCtx(L1=>[u.renderSlot(o1.$slots,C1,u.normalizeProps(u.guardReactiveProps({...L1})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),o1.$slots["right-sidebar"]?(u.openBlock(),u.createElementBlock("div",dt1,[u.renderSlot(o1.$slots,"right-sidebar",u.normalizeProps(u.guardReactiveProps(E.value)))])):u.createCommentVNode("",!0),o1.$slots["action-extra"]?(u.openBlock(),u.createElementBlock("div",ht1,[o1.$slots["action-extra"]?u.renderSlot(o1.$slots,"action-extra",{key:0,selectCurrentDate:Q}):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)],6),!o1.autoApply||u.unref(m).keepActionRow?(u.openBlock(),u.createBlock(le1,u.mergeProps({key:2,"menu-mount":y.value},c.value,{"calendar-width":v.value,onClosePicker:u1[16]||(u1[16]=C1=>o1.$emit("close-picker")),onSelectDate:u1[17]||(u1[17]=C1=>o1.$emit("select-date")),onInvalidSelect:u1[18]||(u1[18]=C1=>o1.$emit("invalid-select")),onSelectNow:Q}),u.createSlots({_:2},[u.renderList(u.unref(P),(C1,S1)=>({name:C1,fn:u.withCtx(L1=>[u.renderSlot(o1.$slots,C1,u.normalizeProps(u.guardReactiveProps({...L1})))])}))]),1040,["menu-mount","calendar-width"])):u.createCommentVNode("",!0)],46,it1)}}}),mt1=typeof window<"u"?window:void 0,_s=()=>{},pt1=e=>u.getCurrentScope()?(u.onScopeDispose(e),!0):!1,vt1=(e,t,a,r)=>{if(!e)return _s;let n=_s;const i=u.watch(()=>u.unref(e),s=>{n(),s&&(s.addEventListener(t,a,r),n=()=>{s.removeEventListener(t,a,r),n=_s})},{immediate:!0,flush:"post"}),c=()=>{i(),n()};return pt1(c),c},gt1=(e,t,a,r={})=>{const{window:n=mt1,event:i="pointerdown"}=r;return n?vt1(n,i,c=>{const s=Ne(e),o=Ne(t);!s||!o||s===c.target||c.composedPath().includes(s)||c.composedPath().includes(o)||a(c)},{passive:!0}):void 0},yt1=u.defineComponent({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...K8},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,i=u.useSlots(),c=u.ref(!1),s=u.toRef(n,"modelValue"),o=u.toRef(n,"timezone"),l=u.ref(null),f=u.ref(null),d=u.ref(null),h=u.ref(!1),m=u.ref(null),p=u.ref(!1),v=u.ref(!1),g=u.ref(!1),{setMenuFocused:y,setShiftKey:x}=Eb(),{clearArrowNav:C}=A0(),{validateDate:b,isValidTime:M}=V0(n),{defaultedTransitions:w,defaultedTextInput:z,defaultedInline:_,defaultedConfig:S,defaultedRange:k,defaultedMultiDates:H}=ue(n),{menuTransition:L,showTransition:A}=Rn(w);u.onMounted(()=>{I(n.modelValue),u.nextTick().then(()=>{if(!_.value.enabled){const v1=Y(m.value);v1==null||v1.addEventListener("scroll",_1),window==null||window.addEventListener("resize",m1)}}),_.value.enabled&&(c.value=!0),window==null||window.addEventListener("keyup",o1),window==null||window.addEventListener("keydown",u1)}),u.onUnmounted(()=>{if(!_.value.enabled){const v1=Y(m.value);v1==null||v1.removeEventListener("scroll",_1),window==null||window.removeEventListener("resize",m1)}window==null||window.removeEventListener("keyup",o1),window==null||window.removeEventListener("keydown",u1)});const N=Et(i,"all",n.presetDates),E=Et(i,"input");u.watch([s,o],()=>{I(s.value)},{deep:!0});const{openOnTop:R,menuStyle:P,xCorrect:X,setMenuPosition:B,getScrollableParent:Y,shadowRender:D}=Q21({menuRef:l,menuRefInner:f,inputRef:d,pickerWrapperRef:m,inline:_,emit:r,props:n,slots:i}),{inputValue:V,internalModelValue:T,parseExternalModelValue:I,emitModelValue:W,formatInputValue:O,checkBeforeEmit:j}=K21(r,n,h),t1=u.computed(()=>({dp__main:!0,dp__theme_dark:n.dark,dp__theme_light:!n.dark,dp__flex_display:_.value.enabled,"dp--flex-display-collapsed":g.value,dp__flex_display_with_input:_.value.input})),r1=u.computed(()=>n.dark?"dp__theme_dark":"dp__theme_light"),Q=u.computed(()=>n.teleport?{to:typeof n.teleport=="boolean"?"body":n.teleport,disabled:!n.teleport||_.value.enabled}:{}),f1=u.computed(()=>({class:"dp__outer_menu_wrap"})),q=u.computed(()=>_.value.enabled&&(n.timePicker||n.monthPicker||n.yearPicker||n.quarterPicker)),g1=()=>{var v1,P1;return(P1=(v1=d.value)==null?void 0:v1.$el)==null?void 0:P1.getBoundingClientRect()},_1=()=>{c.value&&(S.value.closeOnScroll?p1():B())},m1=()=>{var v1;c.value&&B();const P1=(v1=f.value)==null?void 0:v1.$el.getBoundingClientRect().width;g.value=document.body.offsetWidth<=P1},o1=v1=>{v1.key==="Tab"&&!_.value.enabled&&!n.teleport&&S.value.tabOutClosesMenu&&(m.value.contains(document.activeElement)||p1()),v.value=v1.shiftKey},u1=v1=>{v.value=v1.shiftKey},d1=()=>{!n.disabled&&!n.readonly&&(D(Lm,n),B(!1),c.value=!0,c.value&&r("open"),c.value||N1(),I(n.modelValue))},y1=()=>{var v1;V.value="",N1(),(v1=d.value)==null||v1.setParsedDate(null),r("update:model-value",null),r("update:model-timezone-value",null),r("cleared"),S.value.closeOnClearValue&&p1()},V1=()=>{const v1=T.value;return!v1||!Array.isArray(v1)&&b(v1)?!0:Array.isArray(v1)?H.value.enabled||v1.length===2&&b(v1[0])&&b(v1[1])?!0:k.value.partialRange&&!n.timePicker?b(v1[0]):!1:!1},C1=()=>{j()&&V1()?(W(),p1()):r("invalid-select",T.value)},S1=v1=>{L1(),W(),S.value.closeOnAutoApply&&!v1&&p1()},L1=()=>{d.value&&z.value.enabled&&d.value.setParsedDate(T.value)},H1=(v1=!1)=>{n.autoApply&&M(T.value)&&V1()&&(k.value.enabled&&Array.isArray(T.value)?(k.value.partialRange||T.value.length===2)&&S1(v1):S1(v1))},N1=()=>{z.value.enabled||(T.value=null)},p1=()=>{_.value.enabled||(c.value&&(c.value=!1,X.value=!1,y(!1),x(!1),C(),r("closed"),V.value&&I(s.value)),N1(),r("blur"))},w1=(v1,P1,B1=!1)=>{if(!v1){T.value=null;return}const n2=Array.isArray(v1)?!v1.some(ne=>!b(ne)):b(v1),W2=M(v1);n2&&W2&&(T.value=v1,P1&&(p.value=B1,C1(),r("text-submit")))},D1=()=>{n.autoApply&&M(T.value)&&W(),L1()},K1=()=>c.value?p1():d1(),F1=v1=>{T.value=v1},Q1=()=>{z.value.enabled&&(h.value=!0,O()),r("focus")},h2=()=>{if(z.value.enabled&&(h.value=!1,I(n.modelValue),p.value)){const v1=w21(m.value,v.value);v1==null||v1.focus()}r("blur")},a2=v1=>{f.value&&f.value.updateMonthYear(0,{month:Cm(v1.month),year:Cm(v1.year)})},H2=v1=>{I(v1??n.modelValue)},A2=(v1,P1)=>{var B1;(B1=f.value)==null||B1.switchView(v1,P1)},b1=v1=>S.value.onClickOutside?S.value.onClickOutside(v1):p1();return gt1(l,d,()=>b1(V1)),t({closeMenu:p1,selectDate:C1,clearValue:y1,openMenu:d1,onScroll:_1,formatInputValue:O,updateInternalModelValue:F1,setMonthYear:a2,parseModel:H2,switchView:A2,toggleMenu:K1}),(v1,P1)=>(u.openBlock(),u.createElementBlock("div",{ref_key:"pickerWrapperRef",ref:m,class:u.normalizeClass(t1.value),"data-datepicker-instance":""},[u.createVNode(ie1,u.mergeProps({ref_key:"inputRef",ref:d,"input-value":u.unref(V),"onUpdate:inputValue":P1[0]||(P1[0]=B1=>u.isRef(V)?V.value=B1:null),"is-menu-open":c.value},v1.$props,{onClear:y1,onOpen:d1,onSetInputDate:w1,onSetEmptyDate:u.unref(W),onSelectDate:C1,onToggle:K1,onClose:p1,onFocus:Q1,onBlur:h2,onRealBlur:P1[1]||(P1[1]=B1=>h.value=!1)}),u.createSlots({_:2},[u.renderList(u.unref(E),(B1,n2)=>({name:B1,fn:u.withCtx(W2=>[u.renderSlot(v1.$slots,B1,u.normalizeProps(u.guardReactiveProps(W2)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(u.openBlock(),u.createBlock(u.resolveDynamicComponent(v1.teleport?u.Teleport:"div"),u.normalizeProps(u.guardReactiveProps(Q.value)),{default:u.withCtx(()=>[u.createVNode(u.Transition,{name:u.unref(L)(u.unref(R)),css:u.unref(A)&&!u.unref(_).enabled},{default:u.withCtx(()=>[c.value?(u.openBlock(),u.createElementBlock("div",u.mergeProps({key:0,ref_key:"dpWrapMenuRef",ref:l},f1.value,{class:{"dp--menu-wrapper":!u.unref(_).enabled},style:u.unref(_).enabled?void 0:u.unref(P)}),[u.createVNode(Lm,u.mergeProps({ref_key:"dpMenuRef",ref:f},v1.$props,{"internal-model-value":u.unref(T),"onUpdate:internalModelValue":P1[2]||(P1[2]=B1=>u.isRef(T)?T.value=B1:null),class:{[r1.value]:!0,"dp--menu-wrapper":v1.teleport},"open-on-top":u.unref(R),"no-overlay-focus":q.value,collapse:g.value,"get-input-rect":g1,onClosePicker:p1,onSelectDate:C1,onAutoApply:H1,onTimeUpdate:D1,onFlowStep:P1[3]||(P1[3]=B1=>v1.$emit("flow-step",B1)),onUpdateMonthYear:P1[4]||(P1[4]=B1=>v1.$emit("update-month-year",B1)),onInvalidSelect:P1[5]||(P1[5]=B1=>v1.$emit("invalid-select",u.unref(T))),onAutoApplyInvalid:P1[6]||(P1[6]=B1=>v1.$emit("invalid-select",B1)),onInvalidFixedRange:P1[7]||(P1[7]=B1=>v1.$emit("invalid-fixed-range",B1)),onRecalculatePosition:u.unref(B),onTooltipOpen:P1[8]||(P1[8]=B1=>v1.$emit("tooltip-open",B1)),onTooltipClose:P1[9]||(P1[9]=B1=>v1.$emit("tooltip-close",B1)),onTimePickerOpen:P1[10]||(P1[10]=B1=>v1.$emit("time-picker-open",B1)),onTimePickerClose:P1[11]||(P1[11]=B1=>v1.$emit("time-picker-close",B1)),onAmPmChange:P1[12]||(P1[12]=B1=>v1.$emit("am-pm-change",B1)),onRangeStart:P1[13]||(P1[13]=B1=>v1.$emit("range-start",B1)),onRangeEnd:P1[14]||(P1[14]=B1=>v1.$emit("range-end",B1)),onDateUpdate:P1[15]||(P1[15]=B1=>v1.$emit("date-update",B1)),onInvalidDate:P1[16]||(P1[16]=B1=>v1.$emit("invalid-date",B1)),onOverlayToggle:P1[17]||(P1[17]=B1=>v1.$emit("overlay-toggle",B1))}),u.createSlots({_:2},[u.renderList(u.unref(N),(B1,n2)=>({name:B1,fn:u.withCtx(W2=>[u.renderSlot(v1.$slots,B1,u.normalizeProps(u.guardReactiveProps({...W2})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","onRecalculatePosition"])],16)):u.createCommentVNode("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),t9=(()=>{const e=yt1;return e.install=t=>{t.component("Vue3DatePicker",e)},e})(),xt1=Object.freeze(Object.defineProperty({__proto__:null,default:t9},Symbol.toStringTag,{value:"Module"}));Object.entries(xt1).forEach(([e,t])=>{e!=="default"&&(t9[e]=t)});const bt1=u.defineComponent({__name:"PgaVueDatePicker",props:u.mergeModels({yearPicker:{type:Boolean},monthPicker:{type:Boolean},range:{type:Boolean},enableTimePicker:{type:Boolean},notClearable:{type:Boolean},disabled:{type:Boolean},format:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){u.useCssVars(i=>({"6e5f2e73":u.unref(r).input.borderColor,"76564f82":u.unref(r).input.borderRadius,"00f250b1":u.unref(r).input.backgroundColor,"2e18a366":u.unref(r).input.backgroundColorDisabled,"6eb047d9":u.unref(r).input.colorFocus}));const t=u.useModel(e,"modelValue"),a=ae("pgaVueDatePicker"),{form:r}=Mt(),n=u.ref(!1);return(i,c)=>(u.openBlock(),u.createBlock(u.unref(t9),{class:u.normalizeClass(["date-picker",{"date-picker__disabled":i.disabled,"date-picker__open":n.value}]),modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=s=>t.value=s),disabled:i.disabled,clearable:!i.notClearable,yearPicker:i.yearPicker,monthPicker:i.monthPicker,range:i.range,enableTimePicker:i.enableTimePicker,timePickerInline:"",is24:"",teleport:!0,locale:u.unref(Q3)().language,format:i.format,previewFormat:i.format,cancelText:u.unref(a)("cancelBtn"),selectText:u.unref(a)("selectBtn"),onOpen:c[1]||(c[1]=s=>n.value=!0),onBlur:c[2]||(c[2]=s=>n.value=!1)},null,8,["class","modelValue","disabled","clearable","yearPicker","monthPicker","range","enableTimePicker","locale","format","previewFormat","cancelText","selectText"]))}});const In=X1(bt1,[["__scopeId","data-v-49b3e1e7"]]),Ct1=u.defineComponent({__name:"PgaDatePicker",props:u.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{},notClearable:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=u.useModel(e,"modelValue"),a=u.computed({get(){if(!t.value)return null;const[n,i,c]=t.value.split("-").map(Number);return new Date(n,i-1,c)},set(n){if(!n){t.value=null;return}t.value=n.toISOString().split("T")[0]}});function r(n){return i6(n,{format:"numeric",withTime:!1})}return(n,i)=>(u.openBlock(),u.createBlock(It,{label:n.label,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,errors:n.errors,grow:n.grow},{default:u.withCtx(()=>[u.createVNode(In,{modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=c=>a.value=c),disabled:n.disabled,notClearable:n.notClearable,format:r},null,8,["modelValue","disabled","notClearable"])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}}),Mt1=u.defineComponent({__name:"PgaDatetimePicker",props:u.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{},notClearable:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=u.useModel(e,"modelValue");function a(r){return i6(r,{format:"short",withTime:!0})}return(r,n)=>(u.openBlock(),u.createBlock(It,{label:r.label,withOptionalLabel:r.withOptionalLabel,withLabelSpace:r.withLabelSpace,errors:r.errors,grow:r.grow},{default:u.withCtx(()=>[u.createVNode(In,{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=i=>t.value=i),enableTimePicker:"",disabled:r.disabled,notClearable:r.notClearable,format:a},null,8,["modelValue","disabled","notClearable"])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}}),zt1={class:"icons-container"},wt1=u.defineComponent({__name:"PgaIconSelector",props:u.mergeModels({label:{},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){u.useCssVars(n=>({"853235ac":u.unref(a).input.padding,"872009a0":u.unref(a).input.borderColor,"2b41cb36":u.unref(a).input.borderRadius}));const t=u.useModel(e,"modelValue"),{form:a}=Mt(),r=["star","heart","envelope","plus","minus","pen","edit","check","trash","file","clipboard","bell","calendar","clock","money-check-dollar","gift","percent","magnifying-glass-dollar","house","car","store","gamepad","mobile","school","shirt","user-doctor","face-smile","face-frown-open","cog","lock","bug","camera","code","headphones","wifi","user","search","home","arrow-right-arrow-left","circle"];return(n,i)=>(u.openBlock(),u.createBlock(It,{label:n.label,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,errors:n.errors,grow:n.grow},{default:u.withCtx(()=>[u.createElementVNode("div",zt1,[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList(r,c=>u.createVNode(j2,{key:c,icon:c,variant:t.value===c?"outlined":"flat",color:t.value===c?"primary":"first",width:"2.5rem",disabled:n.disabled,onClick:s=>t.value=c},null,8,["icon","variant","color","disabled","onClick"])),64))])]),_:1},8,["label","withOptionalLabel","withLabelSpace","errors","grow"]))}});const _t1=X1(wt1,[["__scopeId","data-v-01d838a8"]]),Ht1=["accept","multiple","disabled"],St1={class:"input-file--label-container"},Lt1=u.defineComponent({__name:"PgaInputFile",props:{formats:{},multiple:{type:Boolean},disabled:{type:Boolean},selectFileLabel:{type:[String,Number,Function]}},emits:["newFile","newFiles"],setup(e,{expose:t,emit:a}){u.useCssVars(C=>({bec71a1c:u.unref(i).input.borderColor,e87cca3a:u.unref(i).input.borderRadius,dc2984a0:u.unref(i).input.backgroundColor,"3112a96c":u.unref(i).input.backgroundColorHover,"6f29a768":u.unref(i).input.backgroundColorDisabled}));const r=e,n=a;t({click:g,resetInput:y});const{form:i}=Mt(),c=ae("pgaInputFile"),s=u.ref(),o=u.ref([]),l=u.ref(!1),f=u.ref(!1),d=u.computed(()=>!!o.value.length),h=u.computed(()=>{if(!r.formats)return!0;for(const C of o.value){const b=C.name.split(".").pop();if(!r.formats.includes(b))return!1}return!0}),m=u.computed(()=>r.formats?r.formats.map(C=>`.${C}`).join(","):"*"),p=u.computed(()=>{const C={icon:"upload"};return!d.value||l.value&&!f.value&&!r.disabled?C:h.value?{icon:"circle-check",color:"success"}:{icon:"circle-xmark",color:"danger"}}),v=u.computed(()=>d.value?o.value.map(C=>C.name).join(", "):r.selectFileLabel?r.selectFileLabel:r.multiple?c("selectFilesLabel"):c("selectFileLabel"));function g(){var C;(C=s.value)==null||C.click()}function y(){o.value=[],s.value&&(s.value.value="")}function x(C){l.value=!1;const M=C.target.files;if(M.length){if(o.value=[...M],!h.value){S4("danger",()=>c("newFileError"));return}n("newFile",M[0]),n("newFiles",[...M])}}return(C,b)=>(u.openBlock(),u.createElementBlock("label",{for:"pga-input-file",class:u.normalizeClass(["pga-input-file",{"pga-input-file__disabled":C.disabled}]),onMouseenter:b[4]||(b[4]=M=>l.value=!0),onMouseleave:b[5]||(b[5]=M=>l.value=!1)},[u.createElementVNode("input",{ref_key:"inputRef",ref:s,id:"pga-input-file",class:"input-file--input",type:"file",accept:m.value,multiple:C.multiple,disabled:C.disabled,onChange:b[0]||(b[0]=M=>x(M))},null,40,Ht1),u.createVNode(We,{class:"input-file--icon",icon:p.value.icon,color:p.value.color},null,8,["icon","color"]),u.createElementVNode("div",St1,[u.createVNode(Be,{text:v.value},null,8,["text"])]),d.value?(u.openBlock(),u.createBlock(j2,{key:0,text:u.unref(c)("removeBtn"),variant:"flat",color:"danger",size:"s",disabled:C.disabled,onMouseenter:b[1]||(b[1]=M=>f.value=!0),onMouseleave:b[2]||(b[2]=M=>f.value=!1),onClick:b[3]||(b[3]=u.withModifiers(M=>y(),["prevent"]))},null,8,["text","disabled"])):u.createCommentVNode("",!0)],34))}});const J8=X1(Lt1,[["__scopeId","data-v-1089a950"]]);/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var Bb=1252,kt1=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],a9={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},r9=function(e){kt1.indexOf(e)!=-1&&(Bb=a9[0]=e)};function At1(){r9(1252)}var g3=function(e){r9(e)};function Ib(){g3(1200),At1()}function km(e){for(var t=[],a=0,r=e.length;a<r;++a)t[a]=e.charCodeAt(a);return t}function Vt1(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a)+(e.charCodeAt(2*a+1)<<8));return t.join("")}function $b(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a+1)+(e.charCodeAt(2*a)<<8));return t.join("")}var sr=function(e){var t=e.charCodeAt(0),a=e.charCodeAt(1);return t==255&&a==254?Vt1(e.slice(2)):t==254&&a==255?$b(e.slice(2)):t==65279?e.slice(1):e},Dc=function(t){return String.fromCharCode(t)},Am=function(t){return String.fromCharCode(t)},Z4,i0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Vm(e){for(var t="",a=0,r=0,n=0,i=0,c=0,s=0,o=0,l=0;l<e.length;)a=e.charCodeAt(l++),i=a>>2,r=e.charCodeAt(l++),c=(a&3)<<4|r>>4,n=e.charCodeAt(l++),s=(r&15)<<2|n>>6,o=n&63,isNaN(r)?s=o=64:isNaN(n)&&(o=64),t+=i0.charAt(i)+i0.charAt(c)+i0.charAt(s)+i0.charAt(o);return t}function Dt(e){var t="",a=0,r=0,n=0,i=0,c=0,s=0,o=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var l=0;l<e.length;)i=i0.indexOf(e.charAt(l++)),c=i0.indexOf(e.charAt(l++)),a=i<<2|c>>4,t+=String.fromCharCode(a),s=i0.indexOf(e.charAt(l++)),r=(c&15)<<4|s>>2,s!==64&&(t+=String.fromCharCode(r)),o=i0.indexOf(e.charAt(l++)),n=(s&3)<<6|o,o!==64&&(t+=String.fromCharCode(n));return t}var C2=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),Ha=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,a){return a?new Buffer(t,a):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}}();function _0(e){return C2?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function Tm(e){return C2?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var h3=function(t){return C2?Ha(t,"binary"):t.split("").map(function(a){return a.charCodeAt(0)&255})};function Sa(e){if(Array.isArray(e))return e.map(function(r){return String.fromCharCode(r)}).join("");for(var t=[],a=0;a<e.length;++a)t[a]=String.fromCharCode(e[a]);return t.join("")}function n9(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return n9(new Uint8Array(e));for(var t=new Array(e.length),a=0;a<e.length;++a)t[a]=e[a];return t}var Q4=C2?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:Ha(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,a=0;for(t=0;t<e.length;++t)a+=e[t].length;var r=new Uint8Array(a),n=0;for(t=0,a=0;t<e.length;a+=n,++t)if(n=e[t].length,e[t]instanceof Uint8Array)r.set(e[t],a);else{if(typeof e[t]=="string")throw"wtf";r.set(new Uint8Array(e[t]),a)}return r}return[].concat.apply([],e.map(function(i){return Array.isArray(i)?i:[].slice.call(i)}))};function Tt1(e){for(var t=[],a=0,r=e.length+250,n=_0(e.length+255),i=0;i<e.length;++i){var c=e.charCodeAt(i);if(c<128)n[a++]=c;else if(c<2048)n[a++]=192|c>>6&31,n[a++]=128|c&63;else if(c>=55296&&c<57344){c=(c&1023)+64;var s=e.charCodeAt(++i)&1023;n[a++]=240|c>>8&7,n[a++]=128|c>>2&63,n[a++]=128|s>>6&15|(c&3)<<4,n[a++]=128|s&63}else n[a++]=224|c>>12&15,n[a++]=128|c>>6&63,n[a++]=128|c&63;a>r&&(t.push(n.slice(0,a)),a=0,n=_0(65535),r=65530)}return t.push(n.slice(0,a)),Q4(t)}var xt=/\u0000/g,or=/[\u0001-\u0006]/g;function r6(e){for(var t="",a=e.length-1;a>=0;)t+=e.charAt(a--);return t}function y3(e,t){var a=""+e;return a.length>=t?a:me("0",t-a.length)+a}function c9(e,t){var a=""+e;return a.length>=t?a:me(" ",t-a.length)+a}function Ji(e,t){var a=""+e;return a.length>=t?a:a+me(" ",t-a.length)}function Et1(e,t){var a=""+Math.round(e);return a.length>=t?a:me("0",t-a.length)+a}function Nt1(e,t){var a=""+e;return a.length>=t?a:me("0",t-a.length)+a}var Em=Math.pow(2,32);function Ia(e,t){if(e>Em||e<-Em)return Et1(e,t);var a=Math.round(e);return Nt1(a,t)}function e8(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var Nm=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],Hs=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function Ot1(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var s2={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},Om={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},Pt1={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function t8(e,t,a){for(var r=e<0?-1:1,n=e*r,i=0,c=1,s=0,o=1,l=0,f=0,d=Math.floor(n);l<t&&(d=Math.floor(n),s=d*c+i,f=d*l+o,!(n-d<5e-8));)n=1/(n-d),i=c,c=s,o=l,l=f;if(f>t&&(l>t?(f=o,s=i):(f=l,s=c)),!a)return[0,r*s,f];var h=Math.floor(r*s/f);return[h,r*s-h*f,f]}function Q0(e,t,a){if(e>2958465||e<0)return null;var r=e|0,n=Math.floor(86400*(e-r)),i=0,c=[],s={D:r,T:n,u:86400*(e-r)-n,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(s.u)<1e-6&&(s.u=0),t&&t.date1904&&(r+=1462),s.u>.9999&&(s.u=0,++n==86400&&(s.T=n=0,++r,++s.D)),r===60)c=a?[1317,10,29]:[1900,2,29],i=3;else if(r===0)c=a?[1317,8,29]:[1900,1,0],i=6;else{r>60&&--r;var o=new Date(1900,0,1);o.setDate(o.getDate()+r-1),c=[o.getFullYear(),o.getMonth()+1,o.getDate()],i=o.getDay(),r<60&&(i=(i+6)%7),a&&(i=$t1(o,c))}return s.y=c[0],s.m=c[1],s.d=c[2],s.S=n%60,n=Math.floor(n/60),s.M=n%60,n=Math.floor(n/60),s.H=n,s.q=i,s}var Ub=new Date(1899,11,31,0,0,0),Dt1=Ub.getTime(),Rt1=new Date(1900,2,1,0,0,0);function qb(e,t){var a=e.getTime();return t?a-=1461*24*60*60*1e3:e>=Rt1&&(a+=24*60*60*1e3),(a-(Dt1+(e.getTimezoneOffset()-Ub.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function i9(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function Ft1(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function Bt1(e){var t=e<0?12:11,a=i9(e.toFixed(12));return a.length<=t||(a=e.toPrecision(10),a.length<=t)?a:e.toExponential(5)}function It1(e){var t=i9(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function hn(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),a;return t>=-4&&t<=-1?a=e.toPrecision(10+t):Math.abs(t)<=9?a=Bt1(e):t===10?a=e.toFixed(10).substr(0,12):a=It1(e),i9(Ft1(a.toUpperCase()))}function pa(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):hn(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return Xt(14,qb(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function $t1(e,t){t[0]-=581;var a=e.getDay();return e<60&&(a=(a+6)%7),a}function Ut1(e,t,a,r){var n="",i=0,c=0,s=a.y,o,l=0;switch(e){case 98:s=a.y+543;case 121:switch(t.length){case 1:case 2:o=s%100,l=2;break;default:o=s%1e4,l=4;break}break;case 109:switch(t.length){case 1:case 2:o=a.m,l=t.length;break;case 3:return Hs[a.m-1][1];case 5:return Hs[a.m-1][0];default:return Hs[a.m-1][2]}break;case 100:switch(t.length){case 1:case 2:o=a.d,l=t.length;break;case 3:return Nm[a.q][0];default:return Nm[a.q][1]}break;case 104:switch(t.length){case 1:case 2:o=1+(a.H+11)%12,l=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:o=a.H,l=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:o=a.M,l=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return a.u===0&&(t=="s"||t=="ss")?y3(a.S,t.length):(r>=2?c=r===3?1e3:100:c=r===1?10:1,i=Math.round(c*(a.S+a.u)),i>=60*c&&(i=0),t==="s"?i===0?"0":""+i/c:(n=y3(i,2+r),t==="ss"?n.substr(0,2):"."+n.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":o=a.D*24+a.H;break;case"[m]":case"[mm]":o=(a.D*24+a.H)*60+a.M;break;case"[s]":case"[ss]":o=((a.D*24+a.H)*60+a.M)*60+Math.round(a.S+a.u);break;default:throw"bad abstime format: "+t}l=t.length===3?1:2;break;case 101:o=s,l=1;break}var f=l>0?y3(o,l):"";return f}function s0(e){var t=3;if(e.length<=t)return e;for(var a=e.length%t,r=e.substr(0,a);a!=e.length;a+=t)r+=(r.length>0?",":"")+e.substr(a,t);return r}var jb=/%/g;function qt1(e,t,a){var r=t.replace(jb,""),n=t.length-r.length;return k4(e,r,a*Math.pow(10,2*n))+me("%",n)}function jt1(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return k4(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function Wb(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+Wb(e,-t);var n=e.indexOf(".");n===-1&&(n=e.indexOf("E"));var i=Math.floor(Math.log(t)*Math.LOG10E)%n;if(i<0&&(i+=n),a=(t/Math.pow(10,i)).toPrecision(r+1+(n+i)%n),a.indexOf("e")===-1){var c=Math.floor(Math.log(t)*Math.LOG10E);for(a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(c-a.length+i):a+="E+"+(c-i);a.substr(0,2)==="0.";)a=a.charAt(0)+a.substr(2,n)+"."+a.substr(2+n),a=a.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,o,l,f){return o+l+f.substr(0,(n+i)%n)+"."+f.substr(i)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}var Gb=/# (\?+)( ?)\/( ?)(\d+)/;function Wt1(e,t,a){var r=parseInt(e[4],10),n=Math.round(t*r),i=Math.floor(n/r),c=n-i*r,s=r;return a+(i===0?"":""+i)+" "+(c===0?me(" ",e[1].length+1+e[4].length):c9(c,e[1].length)+e[2]+"/"+e[3]+y3(s,e[4].length))}function Gt1(e,t,a){return a+(t===0?"":""+t)+me(" ",e[1].length+2+e[4].length)}var Yb=/^#*0*\.([0#]+)/,Xb=/\).*[0#]/,Kb=/\(###\) ###\\?-####/;function vt(e){for(var t="",a,r=0;r!=e.length;++r)switch(a=e.charCodeAt(r)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(a)}return t}function Pm(e,t){var a=Math.pow(10,t);return""+Math.round(e*a)/a}function Dm(e,t){var a=e-Math.floor(e),r=Math.pow(10,t);return t<(""+Math.round(a*r)).length?0:Math.round(a*r)}function Yt1(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function Xt1(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function qt(e,t,a){if(e.charCodeAt(0)===40&&!t.match(Xb)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?qt("n",r,a):"("+qt("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return jt1(e,t,a);if(t.indexOf("%")!==-1)return qt1(e,t,a);if(t.indexOf("E")!==-1)return Wb(t,a);if(t.charCodeAt(0)===36)return"$"+qt(e,t.substr(t.charAt(1)==" "?2:1),a);var n,i,c,s,o=Math.abs(a),l=a<0?"-":"";if(t.match(/^00+$/))return l+Ia(o,t.length);if(t.match(/^[#?]+$/))return n=Ia(a,0),n==="0"&&(n=""),n.length>t.length?n:vt(t.substr(0,t.length-n.length))+n;if(i=t.match(Gb))return Wt1(i,o,l);if(t.match(/^#+0+$/))return l+Ia(o,t.length-t.indexOf("0"));if(i=t.match(Yb))return n=Pm(a,i[1].length).replace(/^([^\.]+)$/,"$1."+vt(i[1])).replace(/\.$/,"."+vt(i[1])).replace(/\.(\d*)$/,function(p,v){return"."+v+me("0",vt(i[1]).length-v.length)}),t.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return l+Pm(o,i[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return l+s0(Ia(o,0));if(i=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+qt(e,t,-a):s0(""+(Math.floor(a)+Yt1(a,i[1].length)))+"."+y3(Dm(a,i[1].length),i[1].length);if(i=t.match(/^#,#*,#0/))return qt(e,t.replace(/^#,#*,/,""),a);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=r6(qt(e,t.replace(/[\\-]/g,""),a)),c=0,r6(r6(t.replace(/\\/g,"")).replace(/[0#]/g,function(p){return c<n.length?n.charAt(c++):p==="0"?"0":""}));if(t.match(Kb))return n=qt(e,"##########",a),"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6);var f="";if(i=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return c=Math.min(i[4].length,7),s=t8(o,Math.pow(10,c)-1,!1),n=""+l,f=k4("n",i[1],s[1]),f.charAt(f.length-1)==" "&&(f=f.substr(0,f.length-1)+"0"),n+=f+i[2]+"/"+i[3],f=Ji(s[2],c),f.length<i[4].length&&(f=vt(i[4].substr(i[4].length-f.length))+f),n+=f,n;if(i=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return c=Math.min(Math.max(i[1].length,i[4].length),7),s=t8(o,Math.pow(10,c)-1,!0),l+(s[0]||(s[1]?"":"0"))+" "+(s[1]?c9(s[1],c)+i[2]+"/"+i[3]+Ji(s[2],c):me(" ",2*c+1+i[2].length+i[3].length));if(i=t.match(/^[#0?]+$/))return n=Ia(a,0),t.length<=n.length?n:vt(t.substr(0,t.length-n.length))+n;if(i=t.match(/^([#0?]+)\.([#0]+)$/)){n=""+a.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),c=n.indexOf(".");var d=t.indexOf(".")-c,h=t.length-n.length-d;return vt(t.substr(0,d)+n+t.substr(t.length-h))}if(i=t.match(/^00,000\.([#0]*0)$/))return c=Dm(a,i[1].length),a<0?"-"+qt(e,t,-a):s0(Xt1(a)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?y3(0,3-p.length):"")+p})+"."+y3(c,i[1].length);switch(t){case"###,##0.00":return qt(e,"#,##0.00",a);case"###,###":case"##,###":case"#,###":var m=s0(Ia(o,0));return m!=="0"?l+m:"";case"###,###.00":return qt(e,"###,##0.00",a).replace(/^0\./,".");case"#,###.00":return qt(e,"#,##0.00",a).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function Kt1(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return k4(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function Zt1(e,t,a){var r=t.replace(jb,""),n=t.length-r.length;return k4(e,r,a*Math.pow(10,2*n))+me("%",n)}function Zb(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+Zb(e,-t);var n=e.indexOf(".");n===-1&&(n=e.indexOf("E"));var i=Math.floor(Math.log(t)*Math.LOG10E)%n;if(i<0&&(i+=n),a=(t/Math.pow(10,i)).toPrecision(r+1+(n+i)%n),!a.match(/[Ee]/)){var c=Math.floor(Math.log(t)*Math.LOG10E);a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(c-a.length+i):a+="E+"+(c-i),a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,o,l,f){return o+l+f.substr(0,(n+i)%n)+"."+f.substr(i)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}function R3(e,t,a){if(e.charCodeAt(0)===40&&!t.match(Xb)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?R3("n",r,a):"("+R3("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return Kt1(e,t,a);if(t.indexOf("%")!==-1)return Zt1(e,t,a);if(t.indexOf("E")!==-1)return Zb(t,a);if(t.charCodeAt(0)===36)return"$"+R3(e,t.substr(t.charAt(1)==" "?2:1),a);var n,i,c,s,o=Math.abs(a),l=a<0?"-":"";if(t.match(/^00+$/))return l+y3(o,t.length);if(t.match(/^[#?]+$/))return n=""+a,a===0&&(n=""),n.length>t.length?n:vt(t.substr(0,t.length-n.length))+n;if(i=t.match(Gb))return Gt1(i,o,l);if(t.match(/^#+0+$/))return l+y3(o,t.length-t.indexOf("0"));if(i=t.match(Yb))return n=(""+a).replace(/^([^\.]+)$/,"$1."+vt(i[1])).replace(/\.$/,"."+vt(i[1])),n=n.replace(/\.(\d*)$/,function(p,v){return"."+v+me("0",vt(i[1]).length-v.length)}),t.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return l+(""+o).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return l+s0(""+o);if(i=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+R3(e,t,-a):s0(""+a)+"."+me("0",i[1].length);if(i=t.match(/^#,#*,#0/))return R3(e,t.replace(/^#,#*,/,""),a);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=r6(R3(e,t.replace(/[\\-]/g,""),a)),c=0,r6(r6(t.replace(/\\/g,"")).replace(/[0#]/g,function(p){return c<n.length?n.charAt(c++):p==="0"?"0":""}));if(t.match(Kb))return n=R3(e,"##########",a),"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6);var f="";if(i=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return c=Math.min(i[4].length,7),s=t8(o,Math.pow(10,c)-1,!1),n=""+l,f=k4("n",i[1],s[1]),f.charAt(f.length-1)==" "&&(f=f.substr(0,f.length-1)+"0"),n+=f+i[2]+"/"+i[3],f=Ji(s[2],c),f.length<i[4].length&&(f=vt(i[4].substr(i[4].length-f.length))+f),n+=f,n;if(i=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return c=Math.min(Math.max(i[1].length,i[4].length),7),s=t8(o,Math.pow(10,c)-1,!0),l+(s[0]||(s[1]?"":"0"))+" "+(s[1]?c9(s[1],c)+i[2]+"/"+i[3]+Ji(s[2],c):me(" ",2*c+1+i[2].length+i[3].length));if(i=t.match(/^[#0?]+$/))return n=""+a,t.length<=n.length?n:vt(t.substr(0,t.length-n.length))+n;if(i=t.match(/^([#0]+)\.([#0]+)$/)){n=""+a.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),c=n.indexOf(".");var d=t.indexOf(".")-c,h=t.length-n.length-d;return vt(t.substr(0,d)+n+t.substr(t.length-h))}if(i=t.match(/^00,000\.([#0]*0)$/))return a<0?"-"+R3(e,t,-a):s0(""+a).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?y3(0,3-p.length):"")+p})+"."+y3(0,i[1].length);switch(t){case"###,###":case"##,###":case"#,###":var m=s0(""+o);return m!=="0"?l+m:"";default:if(t.match(/\.[0#?]*$/))return R3(e,t.slice(0,t.lastIndexOf(".")),a)+vt(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function k4(e,t,a){return(a|0)===a?R3(e,t,a):qt(e,t,a)}function Qt1(e){for(var t=[],a=!1,r=0,n=0;r<e.length;++r)switch(e.charCodeAt(r)){case 34:a=!a;break;case 95:case 42:case 92:++r;break;case 59:t[t.length]=e.substr(n,r-n),n=r+1}if(t[t.length]=e.substr(n),a===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var Qb=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function k6(e){for(var t=0,a="",r="";t<e.length;)switch(a=e.charAt(t)){case"G":e8(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="上午/下午")return!0;++t;break;case"[":for(r=a;e.charAt(t++)!=="]"&&t<e.length;)r+=e.charAt(t);if(r.match(Qb))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(a=e.charAt(++t))>-1||a=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===a;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function Jt1(e,t,a,r){for(var n=[],i="",c=0,s="",o="t",l,f,d,h="H";c<e.length;)switch(s=e.charAt(c)){case"G":if(!e8(e,c))throw new Error("unrecognized character "+s+" in "+e);n[n.length]={t:"G",v:"General"},c+=7;break;case'"':for(i="";(d=e.charCodeAt(++c))!==34&&c<e.length;)i+=String.fromCharCode(d);n[n.length]={t:"t",v:i},++c;break;case"\\":var m=e.charAt(++c),p=m==="("||m===")"?m:"t";n[n.length]={t:p,v:m},++c;break;case"_":n[n.length]={t:"t",v:" "},c+=2;break;case"@":n[n.length]={t:"T",v:t},++c;break;case"B":case"b":if(e.charAt(c+1)==="1"||e.charAt(c+1)==="2"){if(l==null&&(l=Q0(t,a,e.charAt(c+1)==="2"),l==null))return"";n[n.length]={t:"X",v:e.substr(c,2)},o=s,c+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":s=s.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||l==null&&(l=Q0(t,a),l==null))return"";for(i=s;++c<e.length&&e.charAt(c).toLowerCase()===s;)i+=s;s==="m"&&o.toLowerCase()==="h"&&(s="M"),s==="h"&&(s=h),n[n.length]={t:s,v:i},o=s;break;case"A":case"a":case"上":var v={t:s,v:s};if(l==null&&(l=Q0(t,a)),e.substr(c,3).toUpperCase()==="A/P"?(l!=null&&(v.v=l.H>=12?"P":"A"),v.t="T",h="h",c+=3):e.substr(c,5).toUpperCase()==="AM/PM"?(l!=null&&(v.v=l.H>=12?"PM":"AM"),v.t="T",c+=5,h="h"):e.substr(c,5).toUpperCase()==="上午/下午"?(l!=null&&(v.v=l.H>=12?"下午":"上午"),v.t="T",c+=5,h="h"):(v.t="t",++c),l==null&&v.t==="T")return"";n[n.length]=v,o=s;break;case"[":for(i=s;e.charAt(c++)!=="]"&&c<e.length;)i+=e.charAt(c);if(i.slice(-1)!=="]")throw'unterminated "[" block: |'+i+"|";if(i.match(Qb)){if(l==null&&(l=Q0(t,a),l==null))return"";n[n.length]={t:"Z",v:i.toLowerCase()},o=i.charAt(1)}else i.indexOf("$")>-1&&(i=(i.match(/\$([^-\[\]]*)/)||[])[1]||"$",k6(e)||(n[n.length]={t:"t",v:i}));break;case".":if(l!=null){for(i=s;++c<e.length&&(s=e.charAt(c))==="0";)i+=s;n[n.length]={t:"s",v:i};break}case"0":case"#":for(i=s;++c<e.length&&"0#?.,E+-%".indexOf(s=e.charAt(c))>-1;)i+=s;n[n.length]={t:"n",v:i};break;case"?":for(i=s;e.charAt(++c)===s;)i+=s;n[n.length]={t:s,v:i},o=s;break;case"*":++c,(e.charAt(c)==" "||e.charAt(c)=="*")&&++c;break;case"(":case")":n[n.length]={t:r===1?"t":s,v:s},++c;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(i=s;c<e.length&&"0123456789".indexOf(e.charAt(++c))>-1;)i+=e.charAt(c);n[n.length]={t:"D",v:i};break;case" ":n[n.length]={t:s,v:s},++c;break;case"$":n[n.length]={t:"t",v:"$"},++c;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(s)===-1)throw new Error("unrecognized character "+s+" in "+e);n[n.length]={t:"t",v:s},++c;break}var g=0,y=0,x;for(c=n.length-1,o="t";c>=0;--c)switch(n[c].t){case"h":case"H":n[c].t=h,o="h",g<1&&(g=1);break;case"s":(x=n[c].v.match(/\.0+$/))&&(y=Math.max(y,x[0].length-1)),g<3&&(g=3);case"d":case"y":case"M":case"e":o=n[c].t;break;case"m":o==="s"&&(n[c].t="M",g<2&&(g=2));break;case"X":break;case"Z":g<1&&n[c].v.match(/[Hh]/)&&(g=1),g<2&&n[c].v.match(/[Mm]/)&&(g=2),g<3&&n[c].v.match(/[Ss]/)&&(g=3)}switch(g){case 0:break;case 1:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M),l.M>=60&&(l.M=0,++l.H);break;case 2:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M);break}var C="",b;for(c=0;c<n.length;++c)switch(n[c].t){case"t":case"T":case" ":case"D":break;case"X":n[c].v="",n[c].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":n[c].v=Ut1(n[c].t.charCodeAt(0),n[c].v,l,y),n[c].t="t";break;case"n":case"?":for(b=c+1;n[b]!=null&&((s=n[b].t)==="?"||s==="D"||(s===" "||s==="t")&&n[b+1]!=null&&(n[b+1].t==="?"||n[b+1].t==="t"&&n[b+1].v==="/")||n[c].t==="("&&(s===" "||s==="n"||s===")")||s==="t"&&(n[b].v==="/"||n[b].v===" "&&n[b+1]!=null&&n[b+1].t=="?"));)n[c].v+=n[b].v,n[b]={v:"",t:";"},++b;C+=n[c].v,c=b-1;break;case"G":n[c].t="t",n[c].v=pa(t,a);break}var M="",w,z;if(C.length>0){C.charCodeAt(0)==40?(w=t<0&&C.charCodeAt(0)===45?-t:t,z=k4("n",C,w)):(w=t<0&&r>1?-t:t,z=k4("n",C,w),w<0&&n[0]&&n[0].t=="t"&&(z=z.substr(1),n[0].v="-"+n[0].v)),b=z.length-1;var _=n.length;for(c=0;c<n.length;++c)if(n[c]!=null&&n[c].t!="t"&&n[c].v.indexOf(".")>-1){_=c;break}var S=n.length;if(_===n.length&&z.indexOf("E")===-1){for(c=n.length-1;c>=0;--c)n[c]==null||"n?".indexOf(n[c].t)===-1||(b>=n[c].v.length-1?(b-=n[c].v.length,n[c].v=z.substr(b+1,n[c].v.length)):b<0?n[c].v="":(n[c].v=z.substr(0,b+1),b=-1),n[c].t="t",S=c);b>=0&&S<n.length&&(n[S].v=z.substr(0,b+1)+n[S].v)}else if(_!==n.length&&z.indexOf("E")===-1){for(b=z.indexOf(".")-1,c=_;c>=0;--c)if(!(n[c]==null||"n?".indexOf(n[c].t)===-1)){for(f=n[c].v.indexOf(".")>-1&&c===_?n[c].v.indexOf(".")-1:n[c].v.length-1,M=n[c].v.substr(f+1);f>=0;--f)b>=0&&(n[c].v.charAt(f)==="0"||n[c].v.charAt(f)==="#")&&(M=z.charAt(b--)+M);n[c].v=M,n[c].t="t",S=c}for(b>=0&&S<n.length&&(n[S].v=z.substr(0,b+1)+n[S].v),b=z.indexOf(".")+1,c=_;c<n.length;++c)if(!(n[c]==null||"n?(".indexOf(n[c].t)===-1&&c!==_)){for(f=n[c].v.indexOf(".")>-1&&c===_?n[c].v.indexOf(".")+1:0,M=n[c].v.substr(0,f);f<n[c].v.length;++f)b<z.length&&(M+=z.charAt(b++));n[c].v=M,n[c].t="t",S=c}}}for(c=0;c<n.length;++c)n[c]!=null&&"n?".indexOf(n[c].t)>-1&&(w=r>1&&t<0&&c>0&&n[c-1].v==="-"?-t:t,n[c].v=k4(n[c].t,n[c].v,w),n[c].t="t");var k="";for(c=0;c!==n.length;++c)n[c]!=null&&(k+=n[c].v);return k}var Rm=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function Fm(e,t){if(t==null)return!1;var a=parseFloat(t[2]);switch(t[1]){case"=":if(e==a)return!0;break;case">":if(e>a)return!0;break;case"<":if(e<a)return!0;break;case"<>":if(e!=a)return!0;break;case">=":if(e>=a)return!0;break;case"<=":if(e<=a)return!0;break}return!1}function e31(e,t){var a=Qt1(e),r=a.length,n=a[r-1].indexOf("@");if(r<4&&n>-1&&--r,a.length>4)throw new Error("cannot find right format for |"+a.join("|")+"|");if(typeof t!="number")return[4,a.length===4||n>-1?a[a.length-1]:"@"];switch(a.length){case 1:a=n>-1?["General","General","General",a[0]]:[a[0],a[0],a[0],"@"];break;case 2:a=n>-1?[a[0],a[0],a[0],a[1]]:[a[0],a[1],a[0],"@"];break;case 3:a=n>-1?[a[0],a[1],a[0],a[2]]:[a[0],a[1],a[2],"@"];break}var i=t>0?a[0]:t<0?a[1]:a[2];if(a[0].indexOf("[")===-1&&a[1].indexOf("[")===-1)return[r,i];if(a[0].match(/\[[=<>]/)!=null||a[1].match(/\[[=<>]/)!=null){var c=a[0].match(Rm),s=a[1].match(Rm);return Fm(t,c)?[r,a[0]]:Fm(t,s)?[r,a[1]]:[r,a[c!=null&&s!=null?2:1]]}return[r,i]}function Xt(e,t,a){a==null&&(a={});var r="";switch(typeof e){case"string":e=="m/d/yy"&&a.dateNF?r=a.dateNF:r=e;break;case"number":e==14&&a.dateNF?r=a.dateNF:r=(a.table!=null?a.table:s2)[e],r==null&&(r=a.table&&a.table[Om[e]]||s2[Om[e]]),r==null&&(r=Pt1[e]||"General");break}if(e8(r,0))return pa(t,a);t instanceof Date&&(t=qb(t,a.date1904));var n=e31(r,t);if(e8(n[1]))return pa(t,a);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return Jt1(n[1],t,a,n[0])}function ca(e,t){if(typeof t!="number"){t=+t||-1;for(var a=0;a<392;++a){if(s2[a]==null){t<0&&(t=a);continue}if(s2[a]==e){t=a;break}}t<0&&(t=391)}return s2[t]=e,t}function Jb(){s2=Ot1()}var t31={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},eC=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function a31(e){var t=typeof e=="number"?s2[e]:e;return t=t.replace(eC,"(\\d+)"),new RegExp("^"+t+"$")}function r31(e,t,a){var r=-1,n=-1,i=-1,c=-1,s=-1,o=-1;(t.match(eC)||[]).forEach(function(d,h){var m=parseInt(a[h+1],10);switch(d.toLowerCase().charAt(0)){case"y":r=m;break;case"d":i=m;break;case"h":c=m;break;case"s":o=m;break;case"m":c>=0?s=m:n=m;break}}),o>=0&&s==-1&&n>=0&&(s=n,n=-1);var l=(""+(r>=0?r:new Date().getFullYear())).slice(-4)+"-"+("00"+(n>=1?n:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);l.length==7&&(l="0"+l),l.length==8&&(l="20"+l);var f=("00"+(c>=0?c:0)).slice(-2)+":"+("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(o>=0?o:0)).slice(-2);return c==-1&&s==-1&&o==-1?l:r==-1&&n==-1&&i==-1?f:l+"T"+f}var n31=function(){var e={};e.version="1.2.0";function t(){for(var z=0,_=new Array(256),S=0;S!=256;++S)z=S,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,_[S]=z;return typeof Int32Array<"u"?new Int32Array(_):_}var a=t();function r(z){var _=0,S=0,k=0,H=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(k=0;k!=256;++k)H[k]=z[k];for(k=0;k!=256;++k)for(S=z[k],_=256+k;_<4096;_+=256)S=H[_]=S>>>8^z[S&255];var L=[];for(k=1;k!=16;++k)L[k-1]=typeof Int32Array<"u"?H.subarray(k*256,k*256+256):H.slice(k*256,k*256+256);return L}var n=r(a),i=n[0],c=n[1],s=n[2],o=n[3],l=n[4],f=n[5],d=n[6],h=n[7],m=n[8],p=n[9],v=n[10],g=n[11],y=n[12],x=n[13],C=n[14];function b(z,_){for(var S=_^-1,k=0,H=z.length;k<H;)S=S>>>8^a[(S^z.charCodeAt(k++))&255];return~S}function M(z,_){for(var S=_^-1,k=z.length-15,H=0;H<k;)S=C[z[H++]^S&255]^x[z[H++]^S>>8&255]^y[z[H++]^S>>16&255]^g[z[H++]^S>>>24]^v[z[H++]]^p[z[H++]]^m[z[H++]]^h[z[H++]]^d[z[H++]]^f[z[H++]]^l[z[H++]]^o[z[H++]]^s[z[H++]]^c[z[H++]]^i[z[H++]]^a[z[H++]];for(k+=15;H<k;)S=S>>>8^a[(S^z[H++])&255];return~S}function w(z,_){for(var S=_^-1,k=0,H=z.length,L=0,A=0;k<H;)L=z.charCodeAt(k++),L<128?S=S>>>8^a[(S^L)&255]:L<2048?(S=S>>>8^a[(S^(192|L>>6&31))&255],S=S>>>8^a[(S^(128|L&63))&255]):L>=55296&&L<57344?(L=(L&1023)+64,A=z.charCodeAt(k++)&1023,S=S>>>8^a[(S^(240|L>>8&7))&255],S=S>>>8^a[(S^(128|L>>2&63))&255],S=S>>>8^a[(S^(128|A>>6&15|(L&3)<<4))&255],S=S>>>8^a[(S^(128|A&63))&255]):(S=S>>>8^a[(S^(224|L>>12&15))&255],S=S>>>8^a[(S^(128|L>>6&63))&255],S=S>>>8^a[(S^(128|L&63))&255]);return~S}return e.table=a,e.bstr=b,e.buf=M,e.str=w,e}(),z2=function(){var t={};t.version="1.2.1";function a(K,c1){for(var e1=K.split("/"),a1=c1.split("/"),n1=0,i1=0,x1=Math.min(e1.length,a1.length);n1<x1;++n1){if(i1=e1[n1].length-a1[n1].length)return i1;if(e1[n1]!=a1[n1])return e1[n1]<a1[n1]?-1:1}return e1.length-a1.length}function r(K){if(K.charAt(K.length-1)=="/")return K.slice(0,-1).indexOf("/")===-1?K:r(K.slice(0,-1));var c1=K.lastIndexOf("/");return c1===-1?K:K.slice(0,c1+1)}function n(K){if(K.charAt(K.length-1)=="/")return n(K.slice(0,-1));var c1=K.lastIndexOf("/");return c1===-1?K:K.slice(c1+1)}function i(K,c1){typeof c1=="string"&&(c1=new Date(c1));var e1=c1.getHours();e1=e1<<6|c1.getMinutes(),e1=e1<<5|c1.getSeconds()>>>1,K.write_shift(2,e1);var a1=c1.getFullYear()-1980;a1=a1<<4|c1.getMonth()+1,a1=a1<<5|c1.getDate(),K.write_shift(2,a1)}function c(K){var c1=K.read_shift(2)&65535,e1=K.read_shift(2)&65535,a1=new Date,n1=e1&31;e1>>>=5;var i1=e1&15;e1>>>=4,a1.setMilliseconds(0),a1.setFullYear(e1+1980),a1.setMonth(i1-1),a1.setDate(n1);var x1=c1&31;c1>>>=5;var k1=c1&63;return c1>>>=6,a1.setHours(c1),a1.setMinutes(k1),a1.setSeconds(x1<<1),a1}function s(K){Ye(K,0);for(var c1={},e1=0;K.l<=K.length-4;){var a1=K.read_shift(2),n1=K.read_shift(2),i1=K.l+n1,x1={};switch(a1){case 21589:e1=K.read_shift(1),e1&1&&(x1.mtime=K.read_shift(4)),n1>5&&(e1&2&&(x1.atime=K.read_shift(4)),e1&4&&(x1.ctime=K.read_shift(4))),x1.mtime&&(x1.mt=new Date(x1.mtime*1e3));break}K.l=i1,c1[a1]=x1}return c1}var o;function l(){return o||(o={})}function f(K,c1){if(K[0]==80&&K[1]==75)return n2(K,c1);if((K[0]|32)==109&&(K[1]|32)==105)return a3(K,c1);if(K.length<512)throw new Error("CFB file size "+K.length+" < 512");var e1=3,a1=512,n1=0,i1=0,x1=0,k1=0,F=0,G=[],U=K.slice(0,512);Ye(U,0);var Z=d(U);switch(e1=Z[0],e1){case 3:a1=512;break;case 4:a1=4096;break;case 0:if(Z[1]==0)return n2(K,c1);default:throw new Error("Major Version: Expected 3 or 4 saw "+e1)}a1!==512&&(U=K.slice(0,a1),Ye(U,28));var J=K.slice(0,a1);h(U,e1);var l1=U.read_shift(4,"i");if(e1===3&&l1!==0)throw new Error("# Directory Sectors: Expected 0 saw "+l1);U.l+=4,x1=U.read_shift(4,"i"),U.l+=4,U.chk("00100000","Mini Stream Cutoff Size: "),k1=U.read_shift(4,"i"),n1=U.read_shift(4,"i"),F=U.read_shift(4,"i"),i1=U.read_shift(4,"i");for(var s1=-1,M1=0;M1<109&&(s1=U.read_shift(4,"i"),!(s1<0));++M1)G[M1]=s1;var E1=m(K,a1);g(F,i1,E1,a1,G);var O1=x(E1,x1,G,a1);O1[x1].name="!Directory",n1>0&&k1!==A&&(O1[k1].name="!MiniFAT"),O1[G[0]].name="!FAT",O1.fat_addrs=G,O1.ssz=a1;var A1={},$1=[],q1=[],c2=[];C(x1,O1,E1,$1,n1,A1,q1,k1),p(q1,c2,$1),$1.shift();var W1={FileIndex:q1,FullPaths:c2};return c1&&c1.raw&&(W1.raw={header:J,sectors:E1}),W1}function d(K){if(K[K.l]==80&&K[K.l+1]==75)return[0,0];K.chk(N,"Header Signature: "),K.l+=16;var c1=K.read_shift(2,"u");return[K.read_shift(2,"u"),c1]}function h(K,c1){var e1=9;switch(K.l+=2,e1=K.read_shift(2)){case 9:if(c1!=3)throw new Error("Sector Shift: Expected 9 saw "+e1);break;case 12:if(c1!=4)throw new Error("Sector Shift: Expected 12 saw "+e1);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+e1)}K.chk("0600","Mini Sector Shift: "),K.chk("000000000000","Reserved: ")}function m(K,c1){for(var e1=Math.ceil(K.length/c1)-1,a1=[],n1=1;n1<e1;++n1)a1[n1-1]=K.slice(n1*c1,(n1+1)*c1);return a1[e1-1]=K.slice(e1*c1),a1}function p(K,c1,e1){for(var a1=0,n1=0,i1=0,x1=0,k1=0,F=e1.length,G=[],U=[];a1<F;++a1)G[a1]=U[a1]=a1,c1[a1]=e1[a1];for(;k1<U.length;++k1)a1=U[k1],n1=K[a1].L,i1=K[a1].R,x1=K[a1].C,G[a1]===a1&&(n1!==-1&&G[n1]!==n1&&(G[a1]=G[n1]),i1!==-1&&G[i1]!==i1&&(G[a1]=G[i1])),x1!==-1&&(G[x1]=a1),n1!==-1&&a1!=G[a1]&&(G[n1]=G[a1],U.lastIndexOf(n1)<k1&&U.push(n1)),i1!==-1&&a1!=G[a1]&&(G[i1]=G[a1],U.lastIndexOf(i1)<k1&&U.push(i1));for(a1=1;a1<F;++a1)G[a1]===a1&&(i1!==-1&&G[i1]!==i1?G[a1]=G[i1]:n1!==-1&&G[n1]!==n1&&(G[a1]=G[n1]));for(a1=1;a1<F;++a1)if(K[a1].type!==0){if(k1=a1,k1!=G[k1])do k1=G[k1],c1[a1]=c1[k1]+"/"+c1[a1];while(k1!==0&&G[k1]!==-1&&k1!=G[k1]);G[a1]=-1}for(c1[0]+="/",a1=1;a1<F;++a1)K[a1].type!==2&&(c1[a1]+="/")}function v(K,c1,e1){for(var a1=K.start,n1=K.size,i1=[],x1=a1;e1&&n1>0&&x1>=0;)i1.push(c1.slice(x1*L,x1*L+L)),n1-=L,x1=W0(e1,x1*4);return i1.length===0?Ee(0):Q4(i1).slice(0,K.size)}function g(K,c1,e1,a1,n1){var i1=A;if(K===A){if(c1!==0)throw new Error("DIFAT chain shorter than expected")}else if(K!==-1){var x1=e1[K],k1=(a1>>>2)-1;if(!x1)return;for(var F=0;F<k1&&(i1=W0(x1,F*4))!==A;++F)n1.push(i1);g(W0(x1,a1-4),c1-1,e1,a1,n1)}}function y(K,c1,e1,a1,n1){var i1=[],x1=[];n1||(n1=[]);var k1=a1-1,F=0,G=0;for(F=c1;F>=0;){n1[F]=!0,i1[i1.length]=F,x1.push(K[F]);var U=e1[Math.floor(F*4/a1)];if(G=F*4&k1,a1<4+G)throw new Error("FAT boundary crossed: "+F+" 4 "+a1);if(!K[U])break;F=W0(K[U],G)}return{nodes:i1,data:Xm([x1])}}function x(K,c1,e1,a1){var n1=K.length,i1=[],x1=[],k1=[],F=[],G=a1-1,U=0,Z=0,J=0,l1=0;for(U=0;U<n1;++U)if(k1=[],J=U+c1,J>=n1&&(J-=n1),!x1[J]){F=[];var s1=[];for(Z=J;Z>=0;){s1[Z]=!0,x1[Z]=!0,k1[k1.length]=Z,F.push(K[Z]);var M1=e1[Math.floor(Z*4/a1)];if(l1=Z*4&G,a1<4+l1)throw new Error("FAT boundary crossed: "+Z+" 4 "+a1);if(!K[M1]||(Z=W0(K[M1],l1),s1[Z]))break}i1[J]={nodes:k1,data:Xm([F])}}return i1}function C(K,c1,e1,a1,n1,i1,x1,k1){for(var F=0,G=a1.length?2:0,U=c1[K].data,Z=0,J=0,l1;Z<U.length;Z+=128){var s1=U.slice(Z,Z+128);Ye(s1,64),J=s1.read_shift(2),l1=u9(s1,0,J-G),a1.push(l1);var M1={name:l1,type:s1.read_shift(1),color:s1.read_shift(1),L:s1.read_shift(4,"i"),R:s1.read_shift(4,"i"),C:s1.read_shift(4,"i"),clsid:s1.read_shift(16),state:s1.read_shift(4,"i"),start:0,size:0},E1=s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2);E1!==0&&(M1.ct=b(s1,s1.l-8));var O1=s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2);O1!==0&&(M1.mt=b(s1,s1.l-8)),M1.start=s1.read_shift(4,"i"),M1.size=s1.read_shift(4,"i"),M1.size<0&&M1.start<0&&(M1.size=M1.type=0,M1.start=A,M1.name=""),M1.type===5?(F=M1.start,n1>0&&F!==A&&(c1[F].name="!StreamData")):M1.size>=4096?(M1.storage="fat",c1[M1.start]===void 0&&(c1[M1.start]=y(e1,M1.start,c1.fat_addrs,c1.ssz)),c1[M1.start].name=M1.name,M1.content=c1[M1.start].data.slice(0,M1.size)):(M1.storage="minifat",M1.size<0?M1.size=0:F!==A&&M1.start!==A&&c1[F]&&(M1.content=v(M1,c1[F].data,(c1[k1]||{}).data))),M1.content&&Ye(M1.content,0),i1[l1]=M1,x1.push(M1)}}function b(K,c1){return new Date((Vt(K,c1+4)/1e7*Math.pow(2,32)+Vt(K,c1)/1e7-11644473600)*1e3)}function M(K,c1){return l(),f(o.readFileSync(K),c1)}function w(K,c1){var e1=c1&&c1.type;switch(e1||C2&&Buffer.isBuffer(K)&&(e1="buffer"),e1||"base64"){case"file":return M(K,c1);case"base64":return f(h3(Dt(K)),c1);case"binary":return f(h3(K),c1)}return f(K,c1)}function z(K,c1){var e1=c1||{},a1=e1.root||"Root Entry";if(K.FullPaths||(K.FullPaths=[]),K.FileIndex||(K.FileIndex=[]),K.FullPaths.length!==K.FileIndex.length)throw new Error("inconsistent CFB structure");K.FullPaths.length===0&&(K.FullPaths[0]=a1+"/",K.FileIndex[0]={name:a1,type:5}),e1.CLSID&&(K.FileIndex[0].clsid=e1.CLSID),_(K)}function _(K){var c1="Sh33tJ5";if(!z2.find(K,"/"+c1)){var e1=Ee(4);e1[0]=55,e1[1]=e1[3]=50,e1[2]=54,K.FileIndex.push({name:c1,type:2,content:e1,size:4,L:69,R:69,C:69}),K.FullPaths.push(K.FullPaths[0]+c1),S(K)}}function S(K,c1){z(K);for(var e1=!1,a1=!1,n1=K.FullPaths.length-1;n1>=0;--n1){var i1=K.FileIndex[n1];switch(i1.type){case 0:a1?e1=!0:(K.FileIndex.pop(),K.FullPaths.pop());break;case 1:case 2:case 5:a1=!0,isNaN(i1.R*i1.L*i1.C)&&(e1=!0),i1.R>-1&&i1.L>-1&&i1.R==i1.L&&(e1=!0);break;default:e1=!0;break}}if(!(!e1&&!c1)){var x1=new Date(1987,1,19),k1=0,F=Object.create?Object.create(null):{},G=[];for(n1=0;n1<K.FullPaths.length;++n1)F[K.FullPaths[n1]]=!0,K.FileIndex[n1].type!==0&&G.push([K.FullPaths[n1],K.FileIndex[n1]]);for(n1=0;n1<G.length;++n1){var U=r(G[n1][0]);a1=F[U],a1||(G.push([U,{name:n(U).replace("/",""),type:1,clsid:R,ct:x1,mt:x1,content:null}]),F[U]=!0)}for(G.sort(function(l1,s1){return a(l1[0],s1[0])}),K.FullPaths=[],K.FileIndex=[],n1=0;n1<G.length;++n1)K.FullPaths[n1]=G[n1][0],K.FileIndex[n1]=G[n1][1];for(n1=0;n1<G.length;++n1){var Z=K.FileIndex[n1],J=K.FullPaths[n1];if(Z.name=n(J).replace("/",""),Z.L=Z.R=Z.C=-(Z.color=1),Z.size=Z.content?Z.content.length:0,Z.start=0,Z.clsid=Z.clsid||R,n1===0)Z.C=G.length>1?1:-1,Z.size=0,Z.type=5;else if(J.slice(-1)=="/"){for(k1=n1+1;k1<G.length&&r(K.FullPaths[k1])!=J;++k1);for(Z.C=k1>=G.length?-1:k1,k1=n1+1;k1<G.length&&r(K.FullPaths[k1])!=r(J);++k1);Z.R=k1>=G.length?-1:k1,Z.type=1}else r(K.FullPaths[n1+1]||"")==r(J)&&(Z.R=n1+1),Z.type=2}}}function k(K,c1){var e1=c1||{};if(e1.fileType=="mad")return xe(K,e1);switch(S(K),e1.fileType){case"zip":return ne(K,e1)}var a1=function(l1){for(var s1=0,M1=0,E1=0;E1<l1.FileIndex.length;++E1){var O1=l1.FileIndex[E1];if(O1.content){var A1=O1.content.length;A1>0&&(A1<4096?s1+=A1+63>>6:M1+=A1+511>>9)}}for(var $1=l1.FullPaths.length+3>>2,q1=s1+7>>3,c2=s1+127>>7,W1=q1+M1+$1+c2,u2=W1+127>>7,F2=u2<=109?0:Math.ceil((u2-109)/127);W1+u2+F2+127>>7>u2;)F2=++u2<=109?0:Math.ceil((u2-109)/127);var G2=[1,F2,u2,c2,$1,M1,s1,0];return l1.FileIndex[0].size=s1<<6,G2[7]=(l1.FileIndex[0].start=G2[0]+G2[1]+G2[2]+G2[3]+G2[4]+G2[5])+(G2[6]+7>>3),G2}(K),n1=Ee(a1[7]<<9),i1=0,x1=0;{for(i1=0;i1<8;++i1)n1.write_shift(1,E[i1]);for(i1=0;i1<8;++i1)n1.write_shift(2,0);for(n1.write_shift(2,62),n1.write_shift(2,3),n1.write_shift(2,65534),n1.write_shift(2,9),n1.write_shift(2,6),i1=0;i1<3;++i1)n1.write_shift(2,0);for(n1.write_shift(4,0),n1.write_shift(4,a1[2]),n1.write_shift(4,a1[0]+a1[1]+a1[2]+a1[3]-1),n1.write_shift(4,0),n1.write_shift(4,4096),n1.write_shift(4,a1[3]?a1[0]+a1[1]+a1[2]-1:A),n1.write_shift(4,a1[3]),n1.write_shift(-4,a1[1]?a1[0]-1:A),n1.write_shift(4,a1[1]),i1=0;i1<109;++i1)n1.write_shift(-4,i1<a1[2]?a1[1]+i1:-1)}if(a1[1])for(x1=0;x1<a1[1];++x1){for(;i1<236+x1*127;++i1)n1.write_shift(-4,i1<a1[2]?a1[1]+i1:-1);n1.write_shift(-4,x1===a1[1]-1?A:x1+1)}var k1=function(l1){for(x1+=l1;i1<x1-1;++i1)n1.write_shift(-4,i1+1);l1&&(++i1,n1.write_shift(-4,A))};for(x1=i1=0,x1+=a1[1];i1<x1;++i1)n1.write_shift(-4,P.DIFSECT);for(x1+=a1[2];i1<x1;++i1)n1.write_shift(-4,P.FATSECT);k1(a1[3]),k1(a1[4]);for(var F=0,G=0,U=K.FileIndex[0];F<K.FileIndex.length;++F)U=K.FileIndex[F],U.content&&(G=U.content.length,!(G<4096)&&(U.start=x1,k1(G+511>>9)));for(k1(a1[6]+7>>3);n1.l&511;)n1.write_shift(-4,P.ENDOFCHAIN);for(x1=i1=0,F=0;F<K.FileIndex.length;++F)U=K.FileIndex[F],U.content&&(G=U.content.length,!(!G||G>=4096)&&(U.start=x1,k1(G+63>>6)));for(;n1.l&511;)n1.write_shift(-4,P.ENDOFCHAIN);for(i1=0;i1<a1[4]<<2;++i1){var Z=K.FullPaths[i1];if(!Z||Z.length===0){for(F=0;F<17;++F)n1.write_shift(4,0);for(F=0;F<3;++F)n1.write_shift(4,-1);for(F=0;F<12;++F)n1.write_shift(4,0);continue}U=K.FileIndex[i1],i1===0&&(U.start=U.size?U.start-1:A);var J=i1===0&&e1.root||U.name;if(G=2*(J.length+1),n1.write_shift(64,J,"utf16le"),n1.write_shift(2,G),n1.write_shift(1,U.type),n1.write_shift(1,U.color),n1.write_shift(-4,U.L),n1.write_shift(-4,U.R),n1.write_shift(-4,U.C),U.clsid)n1.write_shift(16,U.clsid,"hex");else for(F=0;F<4;++F)n1.write_shift(4,0);n1.write_shift(4,U.state||0),n1.write_shift(4,0),n1.write_shift(4,0),n1.write_shift(4,0),n1.write_shift(4,0),n1.write_shift(4,U.start),n1.write_shift(4,U.size),n1.write_shift(4,0)}for(i1=1;i1<K.FileIndex.length;++i1)if(U=K.FileIndex[i1],U.size>=4096)if(n1.l=U.start+1<<9,C2&&Buffer.isBuffer(U.content))U.content.copy(n1,n1.l,0,U.size),n1.l+=U.size+511&-512;else{for(F=0;F<U.size;++F)n1.write_shift(1,U.content[F]);for(;F&511;++F)n1.write_shift(1,0)}for(i1=1;i1<K.FileIndex.length;++i1)if(U=K.FileIndex[i1],U.size>0&&U.size<4096)if(C2&&Buffer.isBuffer(U.content))U.content.copy(n1,n1.l,0,U.size),n1.l+=U.size+63&-64;else{for(F=0;F<U.size;++F)n1.write_shift(1,U.content[F]);for(;F&63;++F)n1.write_shift(1,0)}if(C2)n1.l=n1.length;else for(;n1.l<n1.length;)n1.write_shift(1,0);return n1}function H(K,c1){var e1=K.FullPaths.map(function(F){return F.toUpperCase()}),a1=e1.map(function(F){var G=F.split("/");return G[G.length-(F.slice(-1)=="/"?2:1)]}),n1=!1;c1.charCodeAt(0)===47?(n1=!0,c1=e1[0].slice(0,-1)+c1):n1=c1.indexOf("/")!==-1;var i1=c1.toUpperCase(),x1=n1===!0?e1.indexOf(i1):a1.indexOf(i1);if(x1!==-1)return K.FileIndex[x1];var k1=!i1.match(or);for(i1=i1.replace(xt,""),k1&&(i1=i1.replace(or,"!")),x1=0;x1<e1.length;++x1)if((k1?e1[x1].replace(or,"!"):e1[x1]).replace(xt,"")==i1||(k1?a1[x1].replace(or,"!"):a1[x1]).replace(xt,"")==i1)return K.FileIndex[x1];return null}var L=64,A=-2,N="d0cf11e0a1b11ae1",E=[208,207,17,224,161,177,26,225],R="00000000000000000000000000000000",P={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:A,FREESECT:-1,HEADER_SIGNATURE:N,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:R,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function X(K,c1,e1){l();var a1=k(K,e1);o.writeFileSync(c1,a1)}function B(K){for(var c1=new Array(K.length),e1=0;e1<K.length;++e1)c1[e1]=String.fromCharCode(K[e1]);return c1.join("")}function Y(K,c1){var e1=k(K,c1);switch(c1&&c1.type||"buffer"){case"file":return l(),o.writeFileSync(c1.filename,e1),e1;case"binary":return typeof e1=="string"?e1:B(e1);case"base64":return Vm(typeof e1=="string"?e1:B(e1));case"buffer":if(C2)return Buffer.isBuffer(e1)?e1:Ha(e1);case"array":return typeof e1=="string"?h3(e1):e1}return e1}var D;function V(K){try{var c1=K.InflateRaw,e1=new c1;if(e1._processChunk(new Uint8Array([3,0]),e1._finishFlushFlag),e1.bytesRead)D=K;else throw new Error("zlib does not expose bytesRead")}catch(a1){console.error("cannot use native zlib: "+(a1.message||a1))}}function T(K,c1){if(!D)return P1(K,c1);var e1=D.InflateRaw,a1=new e1,n1=a1._processChunk(K.slice(K.l),a1._finishFlushFlag);return K.l+=a1.bytesRead,n1}function I(K){return D?D.deflateRawSync(K):F1(K)}var W=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],j=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function t1(K){var c1=(K<<1|K<<11)&139536|(K<<5|K<<15)&558144;return(c1>>16|c1>>8|c1)&255}for(var r1=typeof Uint8Array<"u",Q=r1?new Uint8Array(256):[],f1=0;f1<256;++f1)Q[f1]=t1(f1);function q(K,c1){var e1=Q[K&255];return c1<=8?e1>>>8-c1:(e1=e1<<8|Q[K>>8&255],c1<=16?e1>>>16-c1:(e1=e1<<8|Q[K>>16&255],e1>>>24-c1))}function g1(K,c1){var e1=c1&7,a1=c1>>>3;return(K[a1]|(e1<=6?0:K[a1+1]<<8))>>>e1&3}function _1(K,c1){var e1=c1&7,a1=c1>>>3;return(K[a1]|(e1<=5?0:K[a1+1]<<8))>>>e1&7}function m1(K,c1){var e1=c1&7,a1=c1>>>3;return(K[a1]|(e1<=4?0:K[a1+1]<<8))>>>e1&15}function o1(K,c1){var e1=c1&7,a1=c1>>>3;return(K[a1]|(e1<=3?0:K[a1+1]<<8))>>>e1&31}function u1(K,c1){var e1=c1&7,a1=c1>>>3;return(K[a1]|(e1<=1?0:K[a1+1]<<8))>>>e1&127}function d1(K,c1,e1){var a1=c1&7,n1=c1>>>3,i1=(1<<e1)-1,x1=K[n1]>>>a1;return e1<8-a1||(x1|=K[n1+1]<<8-a1,e1<16-a1)||(x1|=K[n1+2]<<16-a1,e1<24-a1)||(x1|=K[n1+3]<<24-a1),x1&i1}function y1(K,c1,e1){var a1=c1&7,n1=c1>>>3;return a1<=5?K[n1]|=(e1&7)<<a1:(K[n1]|=e1<<a1&255,K[n1+1]=(e1&7)>>8-a1),c1+3}function V1(K,c1,e1){var a1=c1&7,n1=c1>>>3;return e1=(e1&1)<<a1,K[n1]|=e1,c1+1}function C1(K,c1,e1){var a1=c1&7,n1=c1>>>3;return e1<<=a1,K[n1]|=e1&255,e1>>>=8,K[n1+1]=e1,c1+8}function S1(K,c1,e1){var a1=c1&7,n1=c1>>>3;return e1<<=a1,K[n1]|=e1&255,e1>>>=8,K[n1+1]=e1&255,K[n1+2]=e1>>>8,c1+16}function L1(K,c1){var e1=K.length,a1=2*e1>c1?2*e1:c1+5,n1=0;if(e1>=c1)return K;if(C2){var i1=Tm(a1);if(K.copy)K.copy(i1);else for(;n1<K.length;++n1)i1[n1]=K[n1];return i1}else if(r1){var x1=new Uint8Array(a1);if(x1.set)x1.set(K);else for(;n1<e1;++n1)x1[n1]=K[n1];return x1}return K.length=a1,K}function H1(K){for(var c1=new Array(K),e1=0;e1<K;++e1)c1[e1]=0;return c1}function N1(K,c1,e1){var a1=1,n1=0,i1=0,x1=0,k1=0,F=K.length,G=r1?new Uint16Array(32):H1(32);for(i1=0;i1<32;++i1)G[i1]=0;for(i1=F;i1<e1;++i1)K[i1]=0;F=K.length;var U=r1?new Uint16Array(F):H1(F);for(i1=0;i1<F;++i1)G[n1=K[i1]]++,a1<n1&&(a1=n1),U[i1]=0;for(G[0]=0,i1=1;i1<=a1;++i1)G[i1+16]=k1=k1+G[i1-1]<<1;for(i1=0;i1<F;++i1)k1=K[i1],k1!=0&&(U[i1]=G[k1+16]++);var Z=0;for(i1=0;i1<F;++i1)if(Z=K[i1],Z!=0)for(k1=q(U[i1],a1)>>a1-Z,x1=(1<<a1+4-Z)-1;x1>=0;--x1)c1[k1|x1<<Z]=Z&15|i1<<4;return a1}var p1=r1?new Uint16Array(512):H1(512),w1=r1?new Uint16Array(32):H1(32);if(!r1){for(var D1=0;D1<512;++D1)p1[D1]=0;for(D1=0;D1<32;++D1)w1[D1]=0}(function(){for(var K=[],c1=0;c1<32;c1++)K.push(5);N1(K,w1,32);var e1=[];for(c1=0;c1<=143;c1++)e1.push(8);for(;c1<=255;c1++)e1.push(9);for(;c1<=279;c1++)e1.push(7);for(;c1<=287;c1++)e1.push(8);N1(e1,p1,288)})();var K1=function(){for(var c1=r1?new Uint8Array(32768):[],e1=0,a1=0;e1<j.length-1;++e1)for(;a1<j[e1+1];++a1)c1[a1]=e1;for(;a1<32768;++a1)c1[a1]=29;var n1=r1?new Uint8Array(259):[];for(e1=0,a1=0;e1<O.length-1;++e1)for(;a1<O[e1+1];++a1)n1[a1]=e1;function i1(k1,F){for(var G=0;G<k1.length;){var U=Math.min(65535,k1.length-G),Z=G+U==k1.length;for(F.write_shift(1,+Z),F.write_shift(2,U),F.write_shift(2,~U&65535);U-- >0;)F[F.l++]=k1[G++]}return F.l}function x1(k1,F){for(var G=0,U=0,Z=r1?new Uint16Array(32768):[];U<k1.length;){var J=Math.min(65535,k1.length-U);if(J<10){for(G=y1(F,G,+(U+J==k1.length)),G&7&&(G+=8-(G&7)),F.l=G/8|0,F.write_shift(2,J),F.write_shift(2,~J&65535);J-- >0;)F[F.l++]=k1[U++];G=F.l*8;continue}G=y1(F,G,+(U+J==k1.length)+2);for(var l1=0;J-- >0;){var s1=k1[U];l1=(l1<<5^s1)&32767;var M1=-1,E1=0;if((M1=Z[l1])&&(M1|=U&-32768,M1>U&&(M1-=32768),M1<U))for(;k1[M1+E1]==k1[U+E1]&&E1<250;)++E1;if(E1>2){s1=n1[E1],s1<=22?G=C1(F,G,Q[s1+1]>>1)-1:(C1(F,G,3),G+=5,C1(F,G,Q[s1-23]>>5),G+=3);var O1=s1<8?0:s1-4>>2;O1>0&&(S1(F,G,E1-O[s1]),G+=O1),s1=c1[U-M1],G=C1(F,G,Q[s1]>>3),G-=3;var A1=s1<4?0:s1-2>>1;A1>0&&(S1(F,G,U-M1-j[s1]),G+=A1);for(var $1=0;$1<E1;++$1)Z[l1]=U&32767,l1=(l1<<5^k1[U])&32767,++U;J-=E1-1}else s1<=143?s1=s1+48:G=V1(F,G,1),G=C1(F,G,Q[s1]),Z[l1]=U&32767,++U}G=C1(F,G,0)-1}return F.l=(G+7)/8|0,F.l}return function(F,G){return F.length<8?i1(F,G):x1(F,G)}}();function F1(K){var c1=Ee(50+Math.floor(K.length*1.1)),e1=K1(K,c1);return c1.slice(0,e1)}var Q1=r1?new Uint16Array(32768):H1(32768),h2=r1?new Uint16Array(32768):H1(32768),a2=r1?new Uint16Array(128):H1(128),H2=1,A2=1;function b1(K,c1){var e1=o1(K,c1)+257;c1+=5;var a1=o1(K,c1)+1;c1+=5;var n1=m1(K,c1)+4;c1+=4;for(var i1=0,x1=r1?new Uint8Array(19):H1(19),k1=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],F=1,G=r1?new Uint8Array(8):H1(8),U=r1?new Uint8Array(8):H1(8),Z=x1.length,J=0;J<n1;++J)x1[W[J]]=i1=_1(K,c1),F<i1&&(F=i1),G[i1]++,c1+=3;var l1=0;for(G[0]=0,J=1;J<=F;++J)U[J]=l1=l1+G[J-1]<<1;for(J=0;J<Z;++J)(l1=x1[J])!=0&&(k1[J]=U[l1]++);var s1=0;for(J=0;J<Z;++J)if(s1=x1[J],s1!=0){l1=Q[k1[J]]>>8-s1;for(var M1=(1<<7-s1)-1;M1>=0;--M1)a2[l1|M1<<s1]=s1&7|J<<3}var E1=[];for(F=1;E1.length<e1+a1;)switch(l1=a2[u1(K,c1)],c1+=l1&7,l1>>>=3){case 16:for(i1=3+g1(K,c1),c1+=2,l1=E1[E1.length-1];i1-- >0;)E1.push(l1);break;case 17:for(i1=3+_1(K,c1),c1+=3;i1-- >0;)E1.push(0);break;case 18:for(i1=11+u1(K,c1),c1+=7;i1-- >0;)E1.push(0);break;default:E1.push(l1),F<l1&&(F=l1);break}var O1=E1.slice(0,e1),A1=E1.slice(e1);for(J=e1;J<286;++J)O1[J]=0;for(J=a1;J<30;++J)A1[J]=0;return H2=N1(O1,Q1,286),A2=N1(A1,h2,30),c1}function v1(K,c1){if(K[0]==3&&!(K[1]&3))return[_0(c1),2];for(var e1=0,a1=0,n1=Tm(c1||1<<18),i1=0,x1=n1.length>>>0,k1=0,F=0;!(a1&1);){if(a1=_1(K,e1),e1+=3,a1>>>1)a1>>1==1?(k1=9,F=5):(e1=b1(K,e1),k1=H2,F=A2);else{e1&7&&(e1+=8-(e1&7));var G=K[e1>>>3]|K[(e1>>>3)+1]<<8;if(e1+=32,G>0)for(!c1&&x1<i1+G&&(n1=L1(n1,i1+G),x1=n1.length);G-- >0;)n1[i1++]=K[e1>>>3],e1+=8;continue}for(;;){!c1&&x1<i1+32767&&(n1=L1(n1,i1+32767),x1=n1.length);var U=d1(K,e1,k1),Z=a1>>>1==1?p1[U]:Q1[U];if(e1+=Z&15,Z>>>=4,!(Z>>>8&255))n1[i1++]=Z;else{if(Z==256)break;Z-=257;var J=Z<8?0:Z-4>>2;J>5&&(J=0);var l1=i1+O[Z];J>0&&(l1+=d1(K,e1,J),e1+=J),U=d1(K,e1,F),Z=a1>>>1==1?w1[U]:h2[U],e1+=Z&15,Z>>>=4;var s1=Z<4?0:Z-2>>1,M1=j[Z];for(s1>0&&(M1+=d1(K,e1,s1),e1+=s1),!c1&&x1<l1&&(n1=L1(n1,l1+100),x1=n1.length);i1<l1;)n1[i1]=n1[i1-M1],++i1}}}return c1?[n1,e1+7>>>3]:[n1.slice(0,i1),e1+7>>>3]}function P1(K,c1){var e1=K.slice(K.l||0),a1=v1(e1,c1);return K.l+=a1[1],a1[0]}function B1(K,c1){if(K)typeof console<"u"&&console.error(c1);else throw new Error(c1)}function n2(K,c1){var e1=K;Ye(e1,0);var a1=[],n1=[],i1={FileIndex:a1,FullPaths:n1};z(i1,{root:c1.root});for(var x1=e1.length-4;(e1[x1]!=80||e1[x1+1]!=75||e1[x1+2]!=5||e1[x1+3]!=6)&&x1>=0;)--x1;e1.l=x1+4,e1.l+=4;var k1=e1.read_shift(2);e1.l+=6;var F=e1.read_shift(4);for(e1.l=F,x1=0;x1<k1;++x1){e1.l+=20;var G=e1.read_shift(4),U=e1.read_shift(4),Z=e1.read_shift(2),J=e1.read_shift(2),l1=e1.read_shift(2);e1.l+=8;var s1=e1.read_shift(4),M1=s(e1.slice(e1.l+Z,e1.l+Z+J));e1.l+=Z+J+l1;var E1=e1.l;e1.l=s1+4,W2(e1,G,U,i1,M1),e1.l=E1}return i1}function W2(K,c1,e1,a1,n1){K.l+=2;var i1=K.read_shift(2),x1=K.read_shift(2),k1=c(K);if(i1&8257)throw new Error("Unsupported ZIP encryption");for(var F=K.read_shift(4),G=K.read_shift(4),U=K.read_shift(4),Z=K.read_shift(2),J=K.read_shift(2),l1="",s1=0;s1<Z;++s1)l1+=String.fromCharCode(K[K.l++]);if(J){var M1=s(K.slice(K.l,K.l+J));(M1[21589]||{}).mt&&(k1=M1[21589].mt),((n1||{})[21589]||{}).mt&&(k1=n1[21589].mt)}K.l+=J;var E1=K.slice(K.l,K.l+G);switch(x1){case 8:E1=T(K,U);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+x1)}var O1=!1;i1&8&&(F=K.read_shift(4),F==134695760&&(F=K.read_shift(4),O1=!0),G=K.read_shift(4),U=K.read_shift(4)),G!=c1&&B1(O1,"Bad compressed size: "+c1+" != "+G),U!=e1&&B1(O1,"Bad uncompressed size: "+e1+" != "+U),Qe(a1,l1,E1,{unsafe:!0,mt:k1})}function ne(K,c1){var e1=c1||{},a1=[],n1=[],i1=Ee(1),x1=e1.compression?8:0,k1=0,F=0,G=0,U=0,Z=0,J=K.FullPaths[0],l1=J,s1=K.FileIndex[0],M1=[],E1=0;for(F=1;F<K.FullPaths.length;++F)if(l1=K.FullPaths[F].slice(J.length),s1=K.FileIndex[F],!(!s1.size||!s1.content||l1=="Sh33tJ5")){var O1=U,A1=Ee(l1.length);for(G=0;G<l1.length;++G)A1.write_shift(1,l1.charCodeAt(G)&127);A1=A1.slice(0,A1.l),M1[Z]=n31.buf(s1.content,0);var $1=s1.content;x1==8&&($1=I($1)),i1=Ee(30),i1.write_shift(4,67324752),i1.write_shift(2,20),i1.write_shift(2,k1),i1.write_shift(2,x1),s1.mt?i(i1,s1.mt):i1.write_shift(4,0),i1.write_shift(-4,M1[Z]),i1.write_shift(4,$1.length),i1.write_shift(4,s1.content.length),i1.write_shift(2,A1.length),i1.write_shift(2,0),U+=i1.length,a1.push(i1),U+=A1.length,a1.push(A1),U+=$1.length,a1.push($1),i1=Ee(46),i1.write_shift(4,33639248),i1.write_shift(2,0),i1.write_shift(2,20),i1.write_shift(2,k1),i1.write_shift(2,x1),i1.write_shift(4,0),i1.write_shift(-4,M1[Z]),i1.write_shift(4,$1.length),i1.write_shift(4,s1.content.length),i1.write_shift(2,A1.length),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(4,0),i1.write_shift(4,O1),E1+=i1.l,n1.push(i1),E1+=A1.length,n1.push(A1),++Z}return i1=Ee(22),i1.write_shift(4,101010256),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,Z),i1.write_shift(2,Z),i1.write_shift(4,E1),i1.write_shift(4,U),i1.write_shift(2,0),Q4([Q4(a1),Q4(n1),i1])}var P2={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function Ge(K,c1){if(K.ctype)return K.ctype;var e1=K.name||"",a1=e1.match(/\.([^\.]+)$/);return a1&&P2[a1[1]]||c1&&(a1=(e1=c1).match(/[\.\\]([^\.\\])+$/),a1&&P2[a1[1]])?P2[a1[1]]:"application/octet-stream"}function S2(K){for(var c1=Vm(K),e1=[],a1=0;a1<c1.length;a1+=76)e1.push(c1.slice(a1,a1+76));return e1.join(`\r
854
854
  `)+`\r
855
855
  `}function de(K){var c1=K.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(G){var U=G.charCodeAt(0).toString(16).toUpperCase();return"="+(U.length==1?"0"+U:U)});c1=c1.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),c1.charAt(0)==`
856
856
  `&&(c1="=0D"+c1.slice(1)),c1=c1.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`