mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-04-19 08:55:12 +00:00
77 lines
763 KiB
JavaScript
77 lines
763 KiB
JavaScript
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Q_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sS(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function iS(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:function(){return t[s]}})}),n}var oS={exports:{}},bn="top",Ln="bottom",Nn="right",yn="left",Tc="auto",Dr=[bn,Ln,Nn,yn],So="start",lr="end",Z_="clippingParents",fh="viewport",Qo="popper",ev="reference",bd=Dr.reduce(function(t,e){return t.concat([e+"-"+So,e+"-"+lr])},[]),ph=[].concat(Dr,[Tc]).reduce(function(t,e){return t.concat([e,e+"-"+So,e+"-"+lr])},[]),tv="beforeRead",nv="read",sv="afterRead",iv="beforeMain",ov="main",rv="afterMain",av="beforeWrite",lv="write",cv="afterWrite",uv=[tv,nv,sv,iv,ov,rv,av,lv,cv];function Cs(t){return t?(t.nodeName||"").toLowerCase():null}function Fn(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function $o(t){var e=Fn(t).Element;return t instanceof e||t instanceof Element}function Gn(t){var e=Fn(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function gh(t){if(typeof ShadowRoot>"u")return!1;var e=Fn(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function rS(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var s=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!Gn(o)||!Cs(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(r){var a=i[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function aS(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(s){var i=e.elements[s],o=e.attributes[s]||{},r=Object.keys(e.styles.hasOwnProperty(s)?e.styles[s]:n[s]),a=r.reduce(function(l,c){return l[c]="",l},{});!Gn(i)||!Cs(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const mh={name:"applyStyles",enabled:!0,phase:"write",fn:rS,effect:aS,requires:["computeStyles"]};function Ss(t){return t.split("-")[0]}var mo=Math.max,rc=Math.min,cr=Math.round;function yd(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function dv(){return!/^((?!chrome|android).)*safari/i.test(yd())}function ur(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var s=t.getBoundingClientRect(),i=1,o=1;e&&Gn(t)&&(i=t.offsetWidth>0&&cr(s.width)/t.offsetWidth||1,o=t.offsetHeight>0&&cr(s.height)/t.offsetHeight||1);var r=$o(t)?Fn(t):window,a=r.visualViewport,l=!dv()&&n,c=(s.left+(l&&a?a.offsetLeft:0))/i,u=(s.top+(l&&a?a.offsetTop:0))/o,d=s.width/i,f=s.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function _h(t){var e=ur(t),n=t.offsetWidth,s=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-s)<=1&&(s=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:s}}function hv(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&gh(n)){var s=e;do{if(s&&t.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Js(t){return Fn(t).getComputedStyle(t)}function lS(t){return["table","td","th"].indexOf(Cs(t))>=0}function Li(t){return(($o(t)?t.ownerDocument:t.document)||window.document).documentElement}function Mc(t){return Cs(t)==="html"?t:t.assignedSlot||t.parentNode||(gh(t)?t.host:null)||Li(t)}function Lp(t){return!Gn(t)||Js(t).position==="fixed"?null:t.offsetParent}function cS(t){var e=/firefox/i.test(yd()),n=/Trident/i.test(yd());if(n&&Gn(t)){var s=Js(t);if(s.position==="fixed")return null}var i=Mc(t);for(gh(i)&&(i=i.host);Gn(i)&&["html","body"].indexOf(Cs(i))<0;){var o=Js(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Ua(t){for(var e=Fn(t),n=Lp(t);n&&lS(n)&&Js(n).position==="static";)n=Lp(n);return n&&(Cs(n)==="html"||Cs(n)==="body"&&Js(n).position==="static")?e:n||cS(t)||e}function vh(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function la(t,e,n){return mo(t,rc(e,n))}function uS(t,e,n){var s=la(t,e,n);return s>n?n:s}function fv(){return{top:0,right:0,bottom:0,left:0}}function pv(t){return Object.assign({},fv(),t)}function gv(t,e){return e.reduce(function(n,s){return n[s]=t,n},{})}var dS=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,pv(typeof e!="number"?e:gv(e,Dr))};function hS(t){var e,n=t.state,s=t.name,i=t.options,o=n.elements.arrow,r=n.modifiersData.popperOffsets,a=Ss(n.placement),l=vh(a),c=[yn,Nn].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!r)){var d=dS(i.padding,n),f=_h(o),g=l==="y"?bn:yn,_=l==="y"?Ln:Nn,m=n.rects.reference[u]+n.rects.reference[l]-r[l]-n.rects.popper[u],b=r[l]-n.rects.reference[l],w=Ua(o),$=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,A=m/2-b/2,D=d[g],x=$-f[u]-d[_],y=$/2-f[u]/2+A,S=la(D,y,x),E=l;n.modifiersData[s]=(e={},e[E]=S,e.centerOffset=S-y,e)}}function fS(t){var e=t.state,n=t.options,s=n.element,i=s===void 0?"[data-popper-arrow]":s;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||hv(e.elements.popper,i)&&(e.elements.arrow=i))}const mv={name:"arrow",enabled:!0,phase:"main",fn:hS,effect:fS,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function dr(t){return t.split("-")[1]}var pS={top:"auto",right:"auto",bottom:"auto",left:"auto"};function gS(t,e){var n=t.x,s=t.y,i=e.devicePixelRatio||1;return{x:cr(n*i)/i||0,y:cr(s*i)/i||0}}function Np(t){var e,n=t.popper,s=t.popperRect,i=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,d=t.isFixed,f=r.x,g=f===void 0?0:f,_=r.y,m=_===void 0?0:_,b=typeof u=="function"?u({x:g,y:m}):{x:g,y:m};g=b.x,m=b.y;var w=r.hasOwnProperty("x"),$=r.hasOwnProperty("y"),A=yn,D=bn,x=window;if(c){var y=Ua(n),S="clientHeight",E="clientWidth";if(y===Fn(n)&&(y=Li(n),Js(y).position!=="static"&&a==="absolute"&&(S="scrollHeight",E="scrollWidth")),y=y,i===bn||(i===yn||i===Nn)&&o===lr){D=Ln;var T=d&&y===x&&x.visualViewport?x.visualViewport.height:y[S];m-=T-s.height,m*=l?1:-1}if(i===yn||(i===bn||i===Ln)&&o===lr){A=Nn;var C=d&&y===x&&x.visualViewport?x.visualViewport.width:y[E];g-=C-s.width,g*=l?1:-1}}var B=Object.assign({position:a},c&&pS),J=u===!0?gS({x:g,y:m},Fn(n)):{x:g,y:m};if(g=J.x,m=J.y,l){var ae;return Object.assign({},B,(ae={},ae[D]=$?"0":"",ae[A]=w?"0":"",ae.transform=(x.devicePixelRatio||1)<=1?"translate("+g+"px, "+m+"px)":"translate3d("+g+"px, "+m+"px, 0)",ae))}return Object.assign({},B,(e={},e[D]=$?m+"px":"",e[A]=w?g+"px":"",e.transform="",e))}function mS(t){var e=t.state,n=t.options,s=n.gpuAcceleration,i=s===void 0?!0:s,o=n.adaptive,r=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Ss(e.placement),variation:dr(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Np(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Np(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const bh={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:mS,data:{}};var bl={passive:!0};function _S(t){var e=t.state,n=t.instance,s=t.options,i=s.scroll,o=i===void 0?!0:i,r=s.resize,a=r===void 0?!0:r,l=Fn(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,bl)}),a&&l.addEventListener("resize",n.update,bl),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,bl)}),a&&l.removeEventListener("resize",n.update,bl)}}const yh={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:_S,data:{}};var vS={left:"right",right:"left",bottom:"top",top:"bottom"};function ql(t){return t.replace(/left|right|bottom|top/g,function(e){return vS[e]})}var bS={start:"end",end:"start"};function Fp(t){return t.replace(/start|end/g,function(e){return bS[e]})}function wh(t){var e=Fn(t),n=e.pageXOffset,s=e.pageYOffset;return{scrollLeft:n,scrollTop:s}}function xh(t){return ur(Li(t)).left+wh(t).scrollLeft}function yS(t,e){var n=Fn(t),s=Li(t),i=n.visualViewport,o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;var c=dv();(c||!c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:r,x:a+xh(t),y:l}}function wS(t){var e,n=Li(t),s=wh(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=mo(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),r=mo(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-s.scrollLeft+xh(t),l=-s.scrollTop;return Js(i||n).direction==="rtl"&&(a+=mo(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function kh(t){var e=Js(t),n=e.overflow,s=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+s)}function _v(t){return["html","body","#document"].indexOf(Cs(t))>=0?t.ownerDocument.body:Gn(t)&&kh(t)?t:_v(Mc(t))}function ca(t,e){var n;e===void 0&&(e=[]);var s=_v(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=Fn(s),r=i?[o].concat(o.visualViewport||[],kh(s)?s:[]):s,a=e.concat(r);return i?a:a.concat(ca(Mc(r)))}function wd(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function xS(t,e){var n=ur(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Bp(t,e,n){return e===fh?wd(yS(t,n)):$o(e)?xS(e,n):wd(wS(Li(t)))}function kS(t){var e=ca(Mc(t)),n=["absolute","fixed"].indexOf(Js(t).position)>=0,s=n&&Gn(t)?Ua(t):t;return $o(s)?e.filter(function(i){return $o(i)&&hv(i,s)&&Cs(i)!=="body"}):[]}function SS(t,e,n,s){var i=e==="clippingParents"?kS(t):[].concat(e),o=[].concat(i,[n]),r=o[0],a=o.reduce(function(l,c){var u=Bp(t,c,s);return l.top=mo(u.top,l.top),l.right=rc(u.right,l.right),l.bottom=rc(u.bottom,l.bottom),l.left=mo(u.left,l.left),l},Bp(t,r,s));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function vv(t){var e=t.reference,n=t.element,s=t.placement,i=s?Ss(s):null,o=s?dr(s):null,r=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(i){case bn:l={x:r,y:e.y-n.height};break;case Ln:l={x:r,y:e.y+e.height};break;case Nn:l={x:e.x+e.width,y:a};break;case yn:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=i?vh(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case So:l[c]=l[c]-(e[u]/2-n[u]/2);break;case lr:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function hr(t,e){e===void 0&&(e={});var n=e,s=n.placement,i=s===void 0?t.placement:s,o=n.strategy,r=o===void 0?t.strategy:o,a=n.boundary,l=a===void 0?Z_:a,c=n.rootBoundary,u=c===void 0?fh:c,d=n.elementContext,f=d===void 0?Qo:d,g=n.altBoundary,_=g===void 0?!1:g,m=n.padding,b=m===void 0?0:m,w=pv(typeof b!="number"?b:gv(b,Dr)),$=f===Qo?ev:Qo,A=t.rects.popper,D=t.elements[_?$:f],x=SS($o(D)?D:D.contextElement||Li(t.elements.popper),l,u,r),y=ur(t.elements.reference),S=vv({reference:y,element:A,strategy:"absolute",placement:i}),E=wd(Object.assign({},A,S)),T=f===Qo?E:y,C={top:x.top-T.top+w.top,bottom:T.bottom-x.bottom+w.bottom,left:x.left-T.left+w.left,right:T.right-x.right+w.right},B=t.modifiersData.offset;if(f===Qo&&B){var J=B[i];Object.keys(C).forEach(function(ae){var Y=[Nn,Ln].indexOf(ae)>=0?1:-1,L=[bn,Ln].indexOf(ae)>=0?"y":"x";C[ae]+=J[L]*Y})}return C}function $S(t,e){e===void 0&&(e={});var n=e,s=n.placement,i=n.boundary,o=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?ph:l,u=dr(s),d=u?a?bd:bd.filter(function(_){return dr(_)===u}):Dr,f=d.filter(function(_){return c.indexOf(_)>=0});f.length===0&&(f=d);var g=f.reduce(function(_,m){return _[m]=hr(t,{placement:m,boundary:i,rootBoundary:o,padding:r})[Ss(m)],_},{});return Object.keys(g).sort(function(_,m){return g[_]-g[m]})}function AS(t){if(Ss(t)===Tc)return[];var e=ql(t);return[Fp(t),e,Fp(e)]}function CS(t){var e=t.state,n=t.options,s=t.name;if(!e.modifiersData[s]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,r=n.altAxis,a=r===void 0?!0:r,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,g=n.flipVariations,_=g===void 0?!0:g,m=n.allowedAutoPlacements,b=e.options.placement,w=Ss(b),$=w===b,A=l||($||!_?[ql(b)]:AS(b)),D=[b].concat(A).reduce(function(R,ee){return R.concat(Ss(ee)===Tc?$S(e,{placement:ee,boundary:u,rootBoundary:d,padding:c,flipVariations:_,allowedAutoPlacements:m}):ee)},[]),x=e.rects.reference,y=e.rects.popper,S=new Map,E=!0,T=D[0],C=0;C<D.length;C++){var B=D[C],J=Ss(B),ae=dr(B)===So,Y=[bn,Ln].indexOf(J)>=0,L=Y?"width":"height",I=hr(e,{placement:B,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),V=Y?ae?Nn:yn:ae?Ln:bn;x[L]>y[L]&&(V=ql(V));var Q=ql(V),Z=[];if(o&&Z.push(I[J]<=0),a&&Z.push(I[V]<=0,I[Q]<=0),Z.every(function(R){return R})){T=B,E=!1;break}S.set(B,Z)}if(E)for(var le=_?3:1,ye=function(ee){var oe=D.find(function(P){var se=S.get(P);if(se)return se.slice(0,ee).every(function(ue){return ue})});if(oe)return T=oe,"break"},U=le;U>0;U--){var X=ye(U);if(X==="break")break}e.placement!==T&&(e.modifiersData[s]._skip=!0,e.placement=T,e.reset=!0)}}const bv={name:"flip",enabled:!0,phase:"main",fn:CS,requiresIfExists:["offset"],data:{_skip:!1}};function Vp(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Hp(t){return[bn,Nn,Ln,yn].some(function(e){return t[e]>=0})}function ES(t){var e=t.state,n=t.name,s=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,r=hr(e,{elementContext:"reference"}),a=hr(e,{altBoundary:!0}),l=Vp(r,s),c=Vp(a,i,o),u=Hp(l),d=Hp(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const yv={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ES};function PS(t,e,n){var s=Ss(t),i=[yn,bn].indexOf(s)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,r=o[0],a=o[1];return r=r||0,a=(a||0)*i,[yn,Nn].indexOf(s)>=0?{x:a,y:r}:{x:r,y:a}}function TS(t){var e=t.state,n=t.options,s=t.name,i=n.offset,o=i===void 0?[0,0]:i,r=ph.reduce(function(u,d){return u[d]=PS(d,e.rects,o),u},{}),a=r[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[s]=r}const wv={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:TS};function MS(t){var e=t.state,n=t.name;e.modifiersData[n]=vv({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const Sh={name:"popperOffsets",enabled:!0,phase:"read",fn:MS,data:{}};function DS(t){return t==="x"?"y":"x"}function OS(t){var e=t.state,n=t.options,s=t.name,i=n.mainAxis,o=i===void 0?!0:i,r=n.altAxis,a=r===void 0?!1:r,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,g=f===void 0?!0:f,_=n.tetherOffset,m=_===void 0?0:_,b=hr(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),w=Ss(e.placement),$=dr(e.placement),A=!$,D=vh(w),x=DS(D),y=e.modifiersData.popperOffsets,S=e.rects.reference,E=e.rects.popper,T=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,C=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),B=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,J={x:0,y:0};if(y){if(o){var ae,Y=D==="y"?bn:yn,L=D==="y"?Ln:Nn,I=D==="y"?"height":"width",V=y[D],Q=V+b[Y],Z=V-b[L],le=g?-E[I]/2:0,ye=$===So?S[I]:E[I],U=$===So?-E[I]:-S[I],X=e.elements.arrow,R=g&&X?_h(X):{width:0,height:0},ee=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:fv(),oe=ee[Y],P=ee[L],se=la(0,S[I],R[I]),ue=A?S[I]/2-le-se-oe-C.mainAxis:ye-se-oe-C.mainAxis,xe=A?-S[I]/2+le+se+P+C.mainAxis:U+se+P+C.mainAxis,N=e.elements.arrow&&Ua(e.elements.arrow),he=N?D==="y"?N.clientTop||0:N.clientLeft||0:0,v=(ae=B?.[D])!=null?ae:0,O=V+ue-v-he,H=V+xe-v,W=la(g?rc(Q,O):Q,V,g?mo(Z,H):Z);y[D]=W,J[D]=W-V}if(a){var ie,j=D==="x"?bn:yn,te=D==="x"?Ln:Nn,G=y[x],de=x==="y"?"height":"width",ge=G+b[j],fe=G-b[te],Re=[bn,yn].indexOf(w)!==-1,De=(ie=B?.[x])!=null?ie:0,Ve=Re?ge:G-S[de]-E[de]-De+C.altAxis,Be=Re?G+S[de]+E[de]-De-C.altAxis:fe,et=g&&Re?uS(Ve,G,Be):la(g?Ve:ge,G,g?Be:fe);y[x]=et,J[x]=et-G}e.modifiersData[s]=J}}const xv={name:"preventOverflow",enabled:!0,phase:"main",fn:OS,requiresIfExists:["offset"]};function IS(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function RS(t){return t===Fn(t)||!Gn(t)?wh(t):IS(t)}function LS(t){var e=t.getBoundingClientRect(),n=cr(e.width)/t.offsetWidth||1,s=cr(e.height)/t.offsetHeight||1;return n!==1||s!==1}function NS(t,e,n){n===void 0&&(n=!1);var s=Gn(e),i=Gn(e)&&LS(e),o=Li(e),r=ur(t,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(s||!s&&!n)&&((Cs(e)!=="body"||kh(o))&&(a=RS(e)),Gn(e)?(l=ur(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=xh(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function FS(t){var e=new Map,n=new Set,s=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&i(l)}}),s.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),s}function BS(t){var e=FS(t);return uv.reduce(function(n,s){return n.concat(e.filter(function(i){return i.phase===s}))},[])}function VS(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function HS(t){var e=t.reduce(function(n,s){var i=n[s.name];return n[s.name]=i?Object.assign({},i,s,{options:Object.assign({},i.options,s.options),data:Object.assign({},i.data,s.data)}):s,n},{});return Object.keys(e).map(function(n){return e[n]})}var jp={placement:"bottom",modifiers:[],strategy:"absolute"};function Wp(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(s){return!(s&&typeof s.getBoundingClientRect=="function")})}function Dc(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,s=n===void 0?[]:n,i=e.defaultOptions,o=i===void 0?jp:i;return function(a,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},jp,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],f=!1,g={state:u,setOptions:function(w){var $=typeof w=="function"?w(u.options):w;m(),u.options=Object.assign({},o,u.options,$),u.scrollParents={reference:$o(a)?ca(a):a.contextElement?ca(a.contextElement):[],popper:ca(l)};var A=BS(HS([].concat(s,u.options.modifiers)));return u.orderedModifiers=A.filter(function(D){return D.enabled}),_(),g.update()},forceUpdate:function(){if(!f){var w=u.elements,$=w.reference,A=w.popper;if(Wp($,A)){u.rects={reference:NS($,Ua(A),u.options.strategy==="fixed"),popper:_h(A)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(C){return u.modifiersData[C.name]=Object.assign({},C.data)});for(var D=0;D<u.orderedModifiers.length;D++){if(u.reset===!0){u.reset=!1,D=-1;continue}var x=u.orderedModifiers[D],y=x.fn,S=x.options,E=S===void 0?{}:S,T=x.name;typeof y=="function"&&(u=y({state:u,options:E,name:T,instance:g})||u)}}}},update:VS(function(){return new Promise(function(b){g.forceUpdate(),b(u)})}),destroy:function(){m(),f=!0}};if(!Wp(a,l))return g;g.setOptions(c).then(function(b){!f&&c.onFirstUpdate&&c.onFirstUpdate(b)});function _(){u.orderedModifiers.forEach(function(b){var w=b.name,$=b.options,A=$===void 0?{}:$,D=b.effect;if(typeof D=="function"){var x=D({state:u,name:w,instance:g,options:A}),y=function(){};d.push(x||y)}})}function m(){d.forEach(function(b){return b()}),d=[]}return g}}var jS=Dc(),WS=[yh,Sh,bh,mh],zS=Dc({defaultModifiers:WS}),YS=[yh,Sh,bh,mh,wv,bv,xv,mv,yv],US=Dc({defaultModifiers:YS});const KS=Object.freeze(Object.defineProperty({__proto__:null,afterMain:rv,afterRead:sv,afterWrite:cv,applyStyles:mh,arrow:mv,auto:Tc,basePlacements:Dr,beforeMain:iv,beforeRead:tv,beforeWrite:av,bottom:Ln,clippingParents:Z_,computeStyles:bh,createPopper:US,createPopperBase:jS,createPopperLite:zS,detectOverflow:hr,end:lr,eventListeners:yh,flip:bv,hide:yv,left:yn,main:ov,modifierPhases:uv,offset:wv,placements:ph,popper:Qo,popperGenerator:Dc,popperOffsets:Sh,preventOverflow:xv,read:nv,reference:ev,right:Nn,start:So,top:bn,variationPlacements:bd,viewport:fh,write:lv},Symbol.toStringTag,{value:"Module"})),qS=iS(KS);/*!
|
|
* Bootstrap v5.3.2 (https://getbootstrap.com/)
|
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
*/(function(t,e){(function(n,s){t.exports=s(qS)})(Q_,function(n){function s(z){const p=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(z){for(const k in z)if(k!=="default"){const K=Object.getOwnPropertyDescriptor(z,k);Object.defineProperty(p,k,K.get?K:{enumerable:!0,get:()=>z[k]})}}return p.default=z,Object.freeze(p)}const i=s(n),o=new Map,r={set(z,p,k){o.has(z)||o.set(z,new Map);const K=o.get(z);if(!K.has(p)&&K.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(K.keys())[0]}.`);return}K.set(p,k)},get(z,p){return o.has(z)&&o.get(z).get(p)||null},remove(z,p){if(!o.has(z))return;const k=o.get(z);k.delete(p),k.size===0&&o.delete(z)}},a=1e6,l=1e3,c="transitionend",u=z=>(z&&window.CSS&&window.CSS.escape&&(z=z.replace(/#([^\s"#']+)/g,(p,k)=>`#${CSS.escape(k)}`)),z),d=z=>z==null?`${z}`:Object.prototype.toString.call(z).match(/\s([a-z]+)/i)[1].toLowerCase(),f=z=>{do z+=Math.floor(Math.random()*a);while(document.getElementById(z));return z},g=z=>{if(!z)return 0;let{transitionDuration:p,transitionDelay:k}=window.getComputedStyle(z);const K=Number.parseFloat(p),pe=Number.parseFloat(k);return!K&&!pe?0:(p=p.split(",")[0],k=k.split(",")[0],(Number.parseFloat(p)+Number.parseFloat(k))*l)},_=z=>{z.dispatchEvent(new Event(c))},m=z=>!z||typeof z!="object"?!1:(typeof z.jquery<"u"&&(z=z[0]),typeof z.nodeType<"u"),b=z=>m(z)?z.jquery?z[0]:z:typeof z=="string"&&z.length>0?document.querySelector(u(z)):null,w=z=>{if(!m(z)||z.getClientRects().length===0)return!1;const p=getComputedStyle(z).getPropertyValue("visibility")==="visible",k=z.closest("details:not([open])");if(!k)return p;if(k!==z){const K=z.closest("summary");if(K&&K.parentNode!==k||K===null)return!1}return p},$=z=>!z||z.nodeType!==Node.ELEMENT_NODE||z.classList.contains("disabled")?!0:typeof z.disabled<"u"?z.disabled:z.hasAttribute("disabled")&&z.getAttribute("disabled")!=="false",A=z=>{if(!document.documentElement.attachShadow)return null;if(typeof z.getRootNode=="function"){const p=z.getRootNode();return p instanceof ShadowRoot?p:null}return z instanceof ShadowRoot?z:z.parentNode?A(z.parentNode):null},D=()=>{},x=z=>{z.offsetHeight},y=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,S=[],E=z=>{document.readyState==="loading"?(S.length||document.addEventListener("DOMContentLoaded",()=>{for(const p of S)p()}),S.push(z)):z()},T=()=>document.documentElement.dir==="rtl",C=z=>{E(()=>{const p=y();if(p){const k=z.NAME,K=p.fn[k];p.fn[k]=z.jQueryInterface,p.fn[k].Constructor=z,p.fn[k].noConflict=()=>(p.fn[k]=K,z.jQueryInterface)}})},B=(z,p=[],k=z)=>typeof z=="function"?z(...p):k,J=(z,p,k=!0)=>{if(!k){B(z);return}const pe=g(p)+5;let Ee=!1;const Ae=({target:Je})=>{Je===p&&(Ee=!0,p.removeEventListener(c,Ae),B(z))};p.addEventListener(c,Ae),setTimeout(()=>{Ee||_(p)},pe)},ae=(z,p,k,K)=>{const pe=z.length;let Ee=z.indexOf(p);return Ee===-1?!k&&K?z[pe-1]:z[0]:(Ee+=k?1:-1,K&&(Ee=(Ee+pe)%pe),z[Math.max(0,Math.min(Ee,pe-1))])},Y=/[^.]*(?=\..*)\.|.*/,L=/\..*/,I=/::\d+$/,V={};let Q=1;const Z={mouseenter:"mouseover",mouseleave:"mouseout"},le=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function ye(z,p){return p&&`${p}::${Q++}`||z.uidEvent||Q++}function U(z){const p=ye(z);return z.uidEvent=p,V[p]=V[p]||{},V[p]}function X(z,p){return function k(K){return he(K,{delegateTarget:z}),k.oneOff&&N.off(z,K.type,p),p.apply(z,[K])}}function R(z,p,k){return function K(pe){const Ee=z.querySelectorAll(p);for(let{target:Ae}=pe;Ae&&Ae!==this;Ae=Ae.parentNode)for(const Je of Ee)if(Je===Ae)return he(pe,{delegateTarget:Ae}),K.oneOff&&N.off(z,pe.type,p,k),k.apply(Ae,[pe])}}function ee(z,p,k=null){return Object.values(z).find(K=>K.callable===p&&K.delegationSelector===k)}function oe(z,p,k){const K=typeof p=="string",pe=K?k:p||k;let Ee=xe(z);return le.has(Ee)||(Ee=z),[K,pe,Ee]}function P(z,p,k,K,pe){if(typeof p!="string"||!z)return;let[Ee,Ae,Je]=oe(p,k,K);p in Z&&(Ae=(nS=>function(Yo){if(!Yo.relatedTarget||Yo.relatedTarget!==Yo.delegateTarget&&!Yo.delegateTarget.contains(Yo.relatedTarget))return nS.call(this,Yo)})(Ae));const kn=U(z),Wn=kn[Je]||(kn[Je]={}),Gt=ee(Wn,Ae,Ee?k:null);if(Gt){Gt.oneOff=Gt.oneOff&&pe;return}const ps=ye(Ae,p.replace(Y,"")),es=Ee?R(z,k,Ae):X(z,Ae);es.delegationSelector=Ee?k:null,es.callable=Ae,es.oneOff=pe,es.uidEvent=ps,Wn[ps]=es,z.addEventListener(Je,es,Ee)}function se(z,p,k,K,pe){const Ee=ee(p[k],K,pe);Ee&&(z.removeEventListener(k,Ee,!!pe),delete p[k][Ee.uidEvent])}function ue(z,p,k,K){const pe=p[k]||{};for(const[Ee,Ae]of Object.entries(pe))Ee.includes(K)&&se(z,p,k,Ae.callable,Ae.delegationSelector)}function xe(z){return z=z.replace(L,""),Z[z]||z}const N={on(z,p,k,K){P(z,p,k,K,!1)},one(z,p,k,K){P(z,p,k,K,!0)},off(z,p,k,K){if(typeof p!="string"||!z)return;const[pe,Ee,Ae]=oe(p,k,K),Je=Ae!==p,kn=U(z),Wn=kn[Ae]||{},Gt=p.startsWith(".");if(typeof Ee<"u"){if(!Object.keys(Wn).length)return;se(z,kn,Ae,Ee,pe?k:null);return}if(Gt)for(const ps of Object.keys(kn))ue(z,kn,ps,p.slice(1));for(const[ps,es]of Object.entries(Wn)){const vl=ps.replace(I,"");(!Je||p.includes(vl))&&se(z,kn,Ae,es.callable,es.delegationSelector)}},trigger(z,p,k){if(typeof p!="string"||!z)return null;const K=y(),pe=xe(p),Ee=p!==pe;let Ae=null,Je=!0,kn=!0,Wn=!1;Ee&&K&&(Ae=K.Event(p,k),K(z).trigger(Ae),Je=!Ae.isPropagationStopped(),kn=!Ae.isImmediatePropagationStopped(),Wn=Ae.isDefaultPrevented());const Gt=he(new Event(p,{bubbles:Je,cancelable:!0}),k);return Wn&&Gt.preventDefault(),kn&&z.dispatchEvent(Gt),Gt.defaultPrevented&&Ae&&Ae.preventDefault(),Gt}};function he(z,p={}){for(const[k,K]of Object.entries(p))try{z[k]=K}catch{Object.defineProperty(z,k,{configurable:!0,get(){return K}})}return z}function v(z){if(z==="true")return!0;if(z==="false")return!1;if(z===Number(z).toString())return Number(z);if(z===""||z==="null")return null;if(typeof z!="string")return z;try{return JSON.parse(decodeURIComponent(z))}catch{return z}}function O(z){return z.replace(/[A-Z]/g,p=>`-${p.toLowerCase()}`)}const H={setDataAttribute(z,p,k){z.setAttribute(`data-bs-${O(p)}`,k)},removeDataAttribute(z,p){z.removeAttribute(`data-bs-${O(p)}`)},getDataAttributes(z){if(!z)return{};const p={},k=Object.keys(z.dataset).filter(K=>K.startsWith("bs")&&!K.startsWith("bsConfig"));for(const K of k){let pe=K.replace(/^bs/,"");pe=pe.charAt(0).toLowerCase()+pe.slice(1,pe.length),p[pe]=v(z.dataset[K])}return p},getDataAttribute(z,p){return v(z.getAttribute(`data-bs-${O(p)}`))}};class W{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(p){return p=this._mergeConfigObj(p),p=this._configAfterMerge(p),this._typeCheckConfig(p),p}_configAfterMerge(p){return p}_mergeConfigObj(p,k){const K=m(k)?H.getDataAttribute(k,"config"):{};return{...this.constructor.Default,...typeof K=="object"?K:{},...m(k)?H.getDataAttributes(k):{},...typeof p=="object"?p:{}}}_typeCheckConfig(p,k=this.constructor.DefaultType){for(const[K,pe]of Object.entries(k)){const Ee=p[K],Ae=m(Ee)?"element":d(Ee);if(!new RegExp(pe).test(Ae))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${K}" provided type "${Ae}" but expected type "${pe}".`)}}}const ie="5.3.2";class j extends W{constructor(p,k){super(),p=b(p),p&&(this._element=p,this._config=this._getConfig(k),r.set(this._element,this.constructor.DATA_KEY,this))}dispose(){r.remove(this._element,this.constructor.DATA_KEY),N.off(this._element,this.constructor.EVENT_KEY);for(const p of Object.getOwnPropertyNames(this))this[p]=null}_queueCallback(p,k,K=!0){J(p,k,K)}_getConfig(p){return p=this._mergeConfigObj(p,this._element),p=this._configAfterMerge(p),this._typeCheckConfig(p),p}static getInstance(p){return r.get(b(p),this.DATA_KEY)}static getOrCreateInstance(p,k={}){return this.getInstance(p)||new this(p,typeof k=="object"?k:null)}static get VERSION(){return ie}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(p){return`${p}${this.EVENT_KEY}`}}const te=z=>{let p=z.getAttribute("data-bs-target");if(!p||p==="#"){let k=z.getAttribute("href");if(!k||!k.includes("#")&&!k.startsWith("."))return null;k.includes("#")&&!k.startsWith("#")&&(k=`#${k.split("#")[1]}`),p=k&&k!=="#"?u(k.trim()):null}return p},G={find(z,p=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(p,z))},findOne(z,p=document.documentElement){return Element.prototype.querySelector.call(p,z)},children(z,p){return[].concat(...z.children).filter(k=>k.matches(p))},parents(z,p){const k=[];let K=z.parentNode.closest(p);for(;K;)k.push(K),K=K.parentNode.closest(p);return k},prev(z,p){let k=z.previousElementSibling;for(;k;){if(k.matches(p))return[k];k=k.previousElementSibling}return[]},next(z,p){let k=z.nextElementSibling;for(;k;){if(k.matches(p))return[k];k=k.nextElementSibling}return[]},focusableChildren(z){const p=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(k=>`${k}:not([tabindex^="-"])`).join(",");return this.find(p,z).filter(k=>!$(k)&&w(k))},getSelectorFromElement(z){const p=te(z);return p&&G.findOne(p)?p:null},getElementFromSelector(z){const p=te(z);return p?G.findOne(p):null},getMultipleElementsFromSelector(z){const p=te(z);return p?G.find(p):[]}},de=(z,p="hide")=>{const k=`click.dismiss${z.EVENT_KEY}`,K=z.NAME;N.on(document,k,`[data-bs-dismiss="${K}"]`,function(pe){if(["A","AREA"].includes(this.tagName)&&pe.preventDefault(),$(this))return;const Ee=G.getElementFromSelector(this)||this.closest(`.${K}`);z.getOrCreateInstance(Ee)[p]()})},ge="alert",Re=".bs.alert",De=`close${Re}`,Ve=`closed${Re}`,Be="fade",et="show";class Ge extends j{static get NAME(){return ge}close(){if(N.trigger(this._element,De).defaultPrevented)return;this._element.classList.remove(et);const k=this._element.classList.contains(Be);this._queueCallback(()=>this._destroyElement(),this._element,k)}_destroyElement(){this._element.remove(),N.trigger(this._element,Ve),this.dispose()}static jQueryInterface(p){return this.each(function(){const k=Ge.getOrCreateInstance(this);if(typeof p=="string"){if(k[p]===void 0||p.startsWith("_")||p==="constructor")throw new TypeError(`No method named "${p}"`);k[p](this)}})}}de(Ge,"close"),C(Ge);const pt="button",Hn=".bs.button",ii=".data-api",Qn="active",Ds='[data-bs-toggle="button"]',Vt=`click${Hn}${ii}`;class ne extends j{static get NAME(){return pt}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(Qn))}static jQueryInterface(p){return this.each(function(){const k=ne.getOrCreateInstance(this);p==="toggle"&&k[p]()})}}N.on(document,Vt,Ds,z=>{z.preventDefault();const p=z.target.closest(Ds);ne.getOrCreateInstance(p).toggle()}),C(ne);const ke="swipe",ce=".bs.swipe",$e=`touchstart${ce}`,Me=`touchmove${ce}`,nn=`touchend${ce}`,xn=`pointerdown${ce}`,Os=`pointerup${ce}`,No="touch",Ki="pen",fs="pointer-event",Br=40,gu={endCallback:null,leftCallback:null,rightCallback:null},N1={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class al extends W{constructor(p,k){super(),this._element=p,!(!p||!al.isSupported())&&(this._config=this._getConfig(k),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return gu}static get DefaultType(){return N1}static get NAME(){return ke}dispose(){N.off(this._element,ce)}_start(p){if(!this._supportPointerEvents){this._deltaX=p.touches[0].clientX;return}this._eventIsPointerPenTouch(p)&&(this._deltaX=p.clientX)}_end(p){this._eventIsPointerPenTouch(p)&&(this._deltaX=p.clientX-this._deltaX),this._handleSwipe(),B(this._config.endCallback)}_move(p){this._deltaX=p.touches&&p.touches.length>1?0:p.touches[0].clientX-this._deltaX}_handleSwipe(){const p=Math.abs(this._deltaX);if(p<=Br)return;const k=p/this._deltaX;this._deltaX=0,k&&B(k>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(N.on(this._element,xn,p=>this._start(p)),N.on(this._element,Os,p=>this._end(p)),this._element.classList.add(fs)):(N.on(this._element,$e,p=>this._start(p)),N.on(this._element,Me,p=>this._move(p)),N.on(this._element,nn,p=>this._end(p)))}_eventIsPointerPenTouch(p){return this._supportPointerEvents&&(p.pointerType===Ki||p.pointerType===No)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const F1="carousel",oi=".bs.carousel",Gf=".data-api",B1="ArrowLeft",V1="ArrowRight",H1=500,Vr="next",Fo="prev",Bo="left",ll="right",j1=`slide${oi}`,mu=`slid${oi}`,W1=`keydown${oi}`,z1=`mouseenter${oi}`,Y1=`mouseleave${oi}`,U1=`dragstart${oi}`,K1=`load${oi}${Gf}`,q1=`click${oi}${Gf}`,Jf="carousel",cl="active",G1="slide",J1="carousel-item-end",X1="carousel-item-start",Q1="carousel-item-next",Z1="carousel-item-prev",Xf=".active",Qf=".carousel-item",ew=Xf+Qf,tw=".carousel-item img",nw=".carousel-indicators",sw="[data-bs-slide], [data-bs-slide-to]",iw='[data-bs-ride="carousel"]',ow={[B1]:ll,[V1]:Bo},rw={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},aw={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Vo extends j{constructor(p,k){super(p,k),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=G.findOne(nw,this._element),this._addEventListeners(),this._config.ride===Jf&&this.cycle()}static get Default(){return rw}static get DefaultType(){return aw}static get NAME(){return F1}next(){this._slide(Vr)}nextWhenVisible(){!document.hidden&&w(this._element)&&this.next()}prev(){this._slide(Fo)}pause(){this._isSliding&&_(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){N.one(this._element,mu,()=>this.cycle());return}this.cycle()}}to(p){const k=this._getItems();if(p>k.length-1||p<0)return;if(this._isSliding){N.one(this._element,mu,()=>this.to(p));return}const K=this._getItemIndex(this._getActive());if(K===p)return;const pe=p>K?Vr:Fo;this._slide(pe,k[p])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(p){return p.defaultInterval=p.interval,p}_addEventListeners(){this._config.keyboard&&N.on(this._element,W1,p=>this._keydown(p)),this._config.pause==="hover"&&(N.on(this._element,z1,()=>this.pause()),N.on(this._element,Y1,()=>this._maybeEnableCycle())),this._config.touch&&al.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const K of G.find(tw,this._element))N.on(K,U1,pe=>pe.preventDefault());const k={leftCallback:()=>this._slide(this._directionToOrder(Bo)),rightCallback:()=>this._slide(this._directionToOrder(ll)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),H1+this._config.interval))}};this._swipeHelper=new al(this._element,k)}_keydown(p){if(/input|textarea/i.test(p.target.tagName))return;const k=ow[p.key];k&&(p.preventDefault(),this._slide(this._directionToOrder(k)))}_getItemIndex(p){return this._getItems().indexOf(p)}_setActiveIndicatorElement(p){if(!this._indicatorsElement)return;const k=G.findOne(Xf,this._indicatorsElement);k.classList.remove(cl),k.removeAttribute("aria-current");const K=G.findOne(`[data-bs-slide-to="${p}"]`,this._indicatorsElement);K&&(K.classList.add(cl),K.setAttribute("aria-current","true"))}_updateInterval(){const p=this._activeElement||this._getActive();if(!p)return;const k=Number.parseInt(p.getAttribute("data-bs-interval"),10);this._config.interval=k||this._config.defaultInterval}_slide(p,k=null){if(this._isSliding)return;const K=this._getActive(),pe=p===Vr,Ee=k||ae(this._getItems(),K,pe,this._config.wrap);if(Ee===K)return;const Ae=this._getItemIndex(Ee),Je=vl=>N.trigger(this._element,vl,{relatedTarget:Ee,direction:this._orderToDirection(p),from:this._getItemIndex(K),to:Ae});if(Je(j1).defaultPrevented||!K||!Ee)return;const Wn=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(Ae),this._activeElement=Ee;const Gt=pe?X1:J1,ps=pe?Q1:Z1;Ee.classList.add(ps),x(Ee),K.classList.add(Gt),Ee.classList.add(Gt);const es=()=>{Ee.classList.remove(Gt,ps),Ee.classList.add(cl),K.classList.remove(cl,ps,Gt),this._isSliding=!1,Je(mu)};this._queueCallback(es,K,this._isAnimated()),Wn&&this.cycle()}_isAnimated(){return this._element.classList.contains(G1)}_getActive(){return G.findOne(ew,this._element)}_getItems(){return G.find(Qf,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(p){return T()?p===Bo?Fo:Vr:p===Bo?Vr:Fo}_orderToDirection(p){return T()?p===Fo?Bo:ll:p===Fo?ll:Bo}static jQueryInterface(p){return this.each(function(){const k=Vo.getOrCreateInstance(this,p);if(typeof p=="number"){k.to(p);return}if(typeof p=="string"){if(k[p]===void 0||p.startsWith("_")||p==="constructor")throw new TypeError(`No method named "${p}"`);k[p]()}})}}N.on(document,q1,sw,function(z){const p=G.getElementFromSelector(this);if(!p||!p.classList.contains(Jf))return;z.preventDefault();const k=Vo.getOrCreateInstance(p),K=this.getAttribute("data-bs-slide-to");if(K){k.to(K),k._maybeEnableCycle();return}if(H.getDataAttribute(this,"slide")==="next"){k.next(),k._maybeEnableCycle();return}k.prev(),k._maybeEnableCycle()}),N.on(window,K1,()=>{const z=G.find(iw);for(const p of z)Vo.getOrCreateInstance(p)}),C(Vo);const lw="collapse",Hr=".bs.collapse",cw=".data-api",uw=`show${Hr}`,dw=`shown${Hr}`,hw=`hide${Hr}`,fw=`hidden${Hr}`,pw=`click${Hr}${cw}`,_u="show",Ho="collapse",ul="collapsing",gw="collapsed",mw=`:scope .${Ho} .${Ho}`,_w="collapse-horizontal",vw="width",bw="height",yw=".collapse.show, .collapse.collapsing",vu='[data-bs-toggle="collapse"]',ww={parent:null,toggle:!0},xw={parent:"(null|element)",toggle:"boolean"};class jo extends j{constructor(p,k){super(p,k),this._isTransitioning=!1,this._triggerArray=[];const K=G.find(vu);for(const pe of K){const Ee=G.getSelectorFromElement(pe),Ae=G.find(Ee).filter(Je=>Je===this._element);Ee!==null&&Ae.length&&this._triggerArray.push(pe)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ww}static get DefaultType(){return xw}static get NAME(){return lw}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let p=[];if(this._config.parent&&(p=this._getFirstLevelChildren(yw).filter(Je=>Je!==this._element).map(Je=>jo.getOrCreateInstance(Je,{toggle:!1}))),p.length&&p[0]._isTransitioning||N.trigger(this._element,uw).defaultPrevented)return;for(const Je of p)Je.hide();const K=this._getDimension();this._element.classList.remove(Ho),this._element.classList.add(ul),this._element.style[K]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const pe=()=>{this._isTransitioning=!1,this._element.classList.remove(ul),this._element.classList.add(Ho,_u),this._element.style[K]="",N.trigger(this._element,dw)},Ae=`scroll${K[0].toUpperCase()+K.slice(1)}`;this._queueCallback(pe,this._element,!0),this._element.style[K]=`${this._element[Ae]}px`}hide(){if(this._isTransitioning||!this._isShown()||N.trigger(this._element,hw).defaultPrevented)return;const k=this._getDimension();this._element.style[k]=`${this._element.getBoundingClientRect()[k]}px`,x(this._element),this._element.classList.add(ul),this._element.classList.remove(Ho,_u);for(const pe of this._triggerArray){const Ee=G.getElementFromSelector(pe);Ee&&!this._isShown(Ee)&&this._addAriaAndCollapsedClass([pe],!1)}this._isTransitioning=!0;const K=()=>{this._isTransitioning=!1,this._element.classList.remove(ul),this._element.classList.add(Ho),N.trigger(this._element,fw)};this._element.style[k]="",this._queueCallback(K,this._element,!0)}_isShown(p=this._element){return p.classList.contains(_u)}_configAfterMerge(p){return p.toggle=!!p.toggle,p.parent=b(p.parent),p}_getDimension(){return this._element.classList.contains(_w)?vw:bw}_initializeChildren(){if(!this._config.parent)return;const p=this._getFirstLevelChildren(vu);for(const k of p){const K=G.getElementFromSelector(k);K&&this._addAriaAndCollapsedClass([k],this._isShown(K))}}_getFirstLevelChildren(p){const k=G.find(mw,this._config.parent);return G.find(p,this._config.parent).filter(K=>!k.includes(K))}_addAriaAndCollapsedClass(p,k){if(p.length)for(const K of p)K.classList.toggle(gw,!k),K.setAttribute("aria-expanded",k)}static jQueryInterface(p){const k={};return typeof p=="string"&&/show|hide/.test(p)&&(k.toggle=!1),this.each(function(){const K=jo.getOrCreateInstance(this,k);if(typeof p=="string"){if(typeof K[p]>"u")throw new TypeError(`No method named "${p}"`);K[p]()}})}}N.on(document,pw,vu,function(z){(z.target.tagName==="A"||z.delegateTarget&&z.delegateTarget.tagName==="A")&&z.preventDefault();for(const p of G.getMultipleElementsFromSelector(this))jo.getOrCreateInstance(p,{toggle:!1}).toggle()}),C(jo);const Zf="dropdown",qi=".bs.dropdown",bu=".data-api",kw="Escape",ep="Tab",Sw="ArrowUp",tp="ArrowDown",$w=2,Aw=`hide${qi}`,Cw=`hidden${qi}`,Ew=`show${qi}`,Pw=`shown${qi}`,np=`click${qi}${bu}`,sp=`keydown${qi}${bu}`,Tw=`keyup${qi}${bu}`,Wo="show",Mw="dropup",Dw="dropend",Ow="dropstart",Iw="dropup-center",Rw="dropdown-center",Gi='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Lw=`${Gi}.${Wo}`,dl=".dropdown-menu",Nw=".navbar",Fw=".navbar-nav",Bw=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Vw=T()?"top-end":"top-start",Hw=T()?"top-start":"top-end",jw=T()?"bottom-end":"bottom-start",Ww=T()?"bottom-start":"bottom-end",zw=T()?"left-start":"right-start",Yw=T()?"right-start":"left-start",Uw="top",Kw="bottom",qw={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Gw={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Zn extends j{constructor(p,k){super(p,k),this._popper=null,this._parent=this._element.parentNode,this._menu=G.next(this._element,dl)[0]||G.prev(this._element,dl)[0]||G.findOne(dl,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return qw}static get DefaultType(){return Gw}static get NAME(){return Zf}toggle(){return this._isShown()?this.hide():this.show()}show(){if($(this._element)||this._isShown())return;const p={relatedTarget:this._element};if(!N.trigger(this._element,Ew,p).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Fw))for(const K of[].concat(...document.body.children))N.on(K,"mouseover",D);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Wo),this._element.classList.add(Wo),N.trigger(this._element,Pw,p)}}hide(){if($(this._element)||!this._isShown())return;const p={relatedTarget:this._element};this._completeHide(p)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(p){if(!N.trigger(this._element,Aw,p).defaultPrevented){if("ontouchstart"in document.documentElement)for(const K of[].concat(...document.body.children))N.off(K,"mouseover",D);this._popper&&this._popper.destroy(),this._menu.classList.remove(Wo),this._element.classList.remove(Wo),this._element.setAttribute("aria-expanded","false"),H.removeDataAttribute(this._menu,"popper"),N.trigger(this._element,Cw,p)}}_getConfig(p){if(p=super._getConfig(p),typeof p.reference=="object"&&!m(p.reference)&&typeof p.reference.getBoundingClientRect!="function")throw new TypeError(`${Zf.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return p}_createPopper(){if(typeof i>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let p=this._element;this._config.reference==="parent"?p=this._parent:m(this._config.reference)?p=b(this._config.reference):typeof this._config.reference=="object"&&(p=this._config.reference);const k=this._getPopperConfig();this._popper=i.createPopper(p,this._menu,k)}_isShown(){return this._menu.classList.contains(Wo)}_getPlacement(){const p=this._parent;if(p.classList.contains(Dw))return zw;if(p.classList.contains(Ow))return Yw;if(p.classList.contains(Iw))return Uw;if(p.classList.contains(Rw))return Kw;const k=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return p.classList.contains(Mw)?k?Hw:Vw:k?Ww:jw}_detectNavbar(){return this._element.closest(Nw)!==null}_getOffset(){const{offset:p}=this._config;return typeof p=="string"?p.split(",").map(k=>Number.parseInt(k,10)):typeof p=="function"?k=>p(k,this._element):p}_getPopperConfig(){const p={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(H.setDataAttribute(this._menu,"popper","static"),p.modifiers=[{name:"applyStyles",enabled:!1}]),{...p,...B(this._config.popperConfig,[p])}}_selectMenuItem({key:p,target:k}){const K=G.find(Bw,this._menu).filter(pe=>w(pe));K.length&&ae(K,k,p===tp,!K.includes(k)).focus()}static jQueryInterface(p){return this.each(function(){const k=Zn.getOrCreateInstance(this,p);if(typeof p=="string"){if(typeof k[p]>"u")throw new TypeError(`No method named "${p}"`);k[p]()}})}static clearMenus(p){if(p.button===$w||p.type==="keyup"&&p.key!==ep)return;const k=G.find(Lw);for(const K of k){const pe=Zn.getInstance(K);if(!pe||pe._config.autoClose===!1)continue;const Ee=p.composedPath(),Ae=Ee.includes(pe._menu);if(Ee.includes(pe._element)||pe._config.autoClose==="inside"&&!Ae||pe._config.autoClose==="outside"&&Ae||pe._menu.contains(p.target)&&(p.type==="keyup"&&p.key===ep||/input|select|option|textarea|form/i.test(p.target.tagName)))continue;const Je={relatedTarget:pe._element};p.type==="click"&&(Je.clickEvent=p),pe._completeHide(Je)}}static dataApiKeydownHandler(p){const k=/input|textarea/i.test(p.target.tagName),K=p.key===kw,pe=[Sw,tp].includes(p.key);if(!pe&&!K||k&&!K)return;p.preventDefault();const Ee=this.matches(Gi)?this:G.prev(this,Gi)[0]||G.next(this,Gi)[0]||G.findOne(Gi,p.delegateTarget.parentNode),Ae=Zn.getOrCreateInstance(Ee);if(pe){p.stopPropagation(),Ae.show(),Ae._selectMenuItem(p);return}Ae._isShown()&&(p.stopPropagation(),Ae.hide(),Ee.focus())}}N.on(document,sp,Gi,Zn.dataApiKeydownHandler),N.on(document,sp,dl,Zn.dataApiKeydownHandler),N.on(document,np,Zn.clearMenus),N.on(document,Tw,Zn.clearMenus),N.on(document,np,Gi,function(z){z.preventDefault(),Zn.getOrCreateInstance(this).toggle()}),C(Zn);const ip="backdrop",Jw="fade",op="show",rp=`mousedown.bs.${ip}`,Xw={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Qw={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class ap extends W{constructor(p){super(),this._config=this._getConfig(p),this._isAppended=!1,this._element=null}static get Default(){return Xw}static get DefaultType(){return Qw}static get NAME(){return ip}show(p){if(!this._config.isVisible){B(p);return}this._append();const k=this._getElement();this._config.isAnimated&&x(k),k.classList.add(op),this._emulateAnimation(()=>{B(p)})}hide(p){if(!this._config.isVisible){B(p);return}this._getElement().classList.remove(op),this._emulateAnimation(()=>{this.dispose(),B(p)})}dispose(){this._isAppended&&(N.off(this._element,rp),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const p=document.createElement("div");p.className=this._config.className,this._config.isAnimated&&p.classList.add(Jw),this._element=p}return this._element}_configAfterMerge(p){return p.rootElement=b(p.rootElement),p}_append(){if(this._isAppended)return;const p=this._getElement();this._config.rootElement.append(p),N.on(p,rp,()=>{B(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(p){J(p,this._getElement(),this._config.isAnimated)}}const Zw="focustrap",hl=".bs.focustrap",ex=`focusin${hl}`,tx=`keydown.tab${hl}`,nx="Tab",sx="forward",lp="backward",ix={autofocus:!0,trapElement:null},ox={autofocus:"boolean",trapElement:"element"};class cp extends W{constructor(p){super(),this._config=this._getConfig(p),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return ix}static get DefaultType(){return ox}static get NAME(){return Zw}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),N.off(document,hl),N.on(document,ex,p=>this._handleFocusin(p)),N.on(document,tx,p=>this._handleKeydown(p)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,N.off(document,hl))}_handleFocusin(p){const{trapElement:k}=this._config;if(p.target===document||p.target===k||k.contains(p.target))return;const K=G.focusableChildren(k);K.length===0?k.focus():this._lastTabNavDirection===lp?K[K.length-1].focus():K[0].focus()}_handleKeydown(p){p.key===nx&&(this._lastTabNavDirection=p.shiftKey?lp:sx)}}const up=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",dp=".sticky-top",fl="padding-right",hp="margin-right";class yu{constructor(){this._element=document.body}getWidth(){const p=document.documentElement.clientWidth;return Math.abs(window.innerWidth-p)}hide(){const p=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,fl,k=>k+p),this._setElementAttributes(up,fl,k=>k+p),this._setElementAttributes(dp,hp,k=>k-p)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,fl),this._resetElementAttributes(up,fl),this._resetElementAttributes(dp,hp)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(p,k,K){const pe=this.getWidth(),Ee=Ae=>{if(Ae!==this._element&&window.innerWidth>Ae.clientWidth+pe)return;this._saveInitialAttribute(Ae,k);const Je=window.getComputedStyle(Ae).getPropertyValue(k);Ae.style.setProperty(k,`${K(Number.parseFloat(Je))}px`)};this._applyManipulationCallback(p,Ee)}_saveInitialAttribute(p,k){const K=p.style.getPropertyValue(k);K&&H.setDataAttribute(p,k,K)}_resetElementAttributes(p,k){const K=pe=>{const Ee=H.getDataAttribute(pe,k);if(Ee===null){pe.style.removeProperty(k);return}H.removeDataAttribute(pe,k),pe.style.setProperty(k,Ee)};this._applyManipulationCallback(p,K)}_applyManipulationCallback(p,k){if(m(p)){k(p);return}for(const K of G.find(p,this._element))k(K)}}const rx="modal",jn=".bs.modal",ax=".data-api",lx="Escape",cx=`hide${jn}`,ux=`hidePrevented${jn}`,fp=`hidden${jn}`,pp=`show${jn}`,dx=`shown${jn}`,hx=`resize${jn}`,fx=`click.dismiss${jn}`,px=`mousedown.dismiss${jn}`,gx=`keydown.dismiss${jn}`,mx=`click${jn}${ax}`,gp="modal-open",_x="fade",mp="show",wu="modal-static",vx=".modal.show",bx=".modal-dialog",yx=".modal-body",wx='[data-bs-toggle="modal"]',xx={backdrop:!0,focus:!0,keyboard:!0},kx={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ji extends j{constructor(p,k){super(p,k),this._dialog=G.findOne(bx,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new yu,this._addEventListeners()}static get Default(){return xx}static get DefaultType(){return kx}static get NAME(){return rx}toggle(p){return this._isShown?this.hide():this.show(p)}show(p){this._isShown||this._isTransitioning||N.trigger(this._element,pp,{relatedTarget:p}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(gp),this._adjustDialog(),this._backdrop.show(()=>this._showElement(p)))}hide(){!this._isShown||this._isTransitioning||N.trigger(this._element,cx).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(mp),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){N.off(window,jn),N.off(this._dialog,jn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ap({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new cp({trapElement:this._element})}_showElement(p){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const k=G.findOne(yx,this._dialog);k&&(k.scrollTop=0),x(this._element),this._element.classList.add(mp);const K=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,N.trigger(this._element,dx,{relatedTarget:p})};this._queueCallback(K,this._dialog,this._isAnimated())}_addEventListeners(){N.on(this._element,gx,p=>{if(p.key===lx){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),N.on(window,hx,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),N.on(this._element,px,p=>{N.one(this._element,fx,k=>{if(!(this._element!==p.target||this._element!==k.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(gp),this._resetAdjustments(),this._scrollBar.reset(),N.trigger(this._element,fp)})}_isAnimated(){return this._element.classList.contains(_x)}_triggerBackdropTransition(){if(N.trigger(this._element,ux).defaultPrevented)return;const k=this._element.scrollHeight>document.documentElement.clientHeight,K=this._element.style.overflowY;K==="hidden"||this._element.classList.contains(wu)||(k||(this._element.style.overflowY="hidden"),this._element.classList.add(wu),this._queueCallback(()=>{this._element.classList.remove(wu),this._queueCallback(()=>{this._element.style.overflowY=K},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const p=this._element.scrollHeight>document.documentElement.clientHeight,k=this._scrollBar.getWidth(),K=k>0;if(K&&!p){const pe=T()?"paddingLeft":"paddingRight";this._element.style[pe]=`${k}px`}if(!K&&p){const pe=T()?"paddingRight":"paddingLeft";this._element.style[pe]=`${k}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(p,k){return this.each(function(){const K=Ji.getOrCreateInstance(this,p);if(typeof p=="string"){if(typeof K[p]>"u")throw new TypeError(`No method named "${p}"`);K[p](k)}})}}N.on(document,mx,wx,function(z){const p=G.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&z.preventDefault(),N.one(p,pp,pe=>{pe.defaultPrevented||N.one(p,fp,()=>{w(this)&&this.focus()})});const k=G.findOne(vx);k&&Ji.getInstance(k).hide(),Ji.getOrCreateInstance(p).toggle(this)}),de(Ji),C(Ji);const Sx="offcanvas",Is=".bs.offcanvas",_p=".data-api",$x=`load${Is}${_p}`,Ax="Escape",vp="show",bp="showing",yp="hiding",Cx="offcanvas-backdrop",wp=".offcanvas.show",Ex=`show${Is}`,Px=`shown${Is}`,Tx=`hide${Is}`,xp=`hidePrevented${Is}`,kp=`hidden${Is}`,Mx=`resize${Is}`,Dx=`click${Is}${_p}`,Ox=`keydown.dismiss${Is}`,Ix='[data-bs-toggle="offcanvas"]',Rx={backdrop:!0,keyboard:!0,scroll:!1},Lx={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Rs extends j{constructor(p,k){super(p,k),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Rx}static get DefaultType(){return Lx}static get NAME(){return Sx}toggle(p){return this._isShown?this.hide():this.show(p)}show(p){if(this._isShown||N.trigger(this._element,Ex,{relatedTarget:p}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new yu().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(bp);const K=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(vp),this._element.classList.remove(bp),N.trigger(this._element,Px,{relatedTarget:p})};this._queueCallback(K,this._element,!0)}hide(){if(!this._isShown||N.trigger(this._element,Tx).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(yp),this._backdrop.hide();const k=()=>{this._element.classList.remove(vp,yp),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new yu().reset(),N.trigger(this._element,kp)};this._queueCallback(k,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const p=()=>{if(this._config.backdrop==="static"){N.trigger(this._element,xp);return}this.hide()},k=!!this._config.backdrop;return new ap({className:Cx,isVisible:k,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:k?p:null})}_initializeFocusTrap(){return new cp({trapElement:this._element})}_addEventListeners(){N.on(this._element,Ox,p=>{if(p.key===Ax){if(this._config.keyboard){this.hide();return}N.trigger(this._element,xp)}})}static jQueryInterface(p){return this.each(function(){const k=Rs.getOrCreateInstance(this,p);if(typeof p=="string"){if(k[p]===void 0||p.startsWith("_")||p==="constructor")throw new TypeError(`No method named "${p}"`);k[p](this)}})}}N.on(document,Dx,Ix,function(z){const p=G.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&z.preventDefault(),$(this))return;N.one(p,kp,()=>{w(this)&&this.focus()});const k=G.findOne(wp);k&&k!==p&&Rs.getInstance(k).hide(),Rs.getOrCreateInstance(p).toggle(this)}),N.on(window,$x,()=>{for(const z of G.find(wp))Rs.getOrCreateInstance(z).show()}),N.on(window,Mx,()=>{for(const z of G.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(z).position!=="fixed"&&Rs.getOrCreateInstance(z).hide()}),de(Rs),C(Rs);const Sp={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Nx=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Fx=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Bx=(z,p)=>{const k=z.nodeName.toLowerCase();return p.includes(k)?Nx.has(k)?!!Fx.test(z.nodeValue):!0:p.filter(K=>K instanceof RegExp).some(K=>K.test(k))};function Vx(z,p,k){if(!z.length)return z;if(k&&typeof k=="function")return k(z);const pe=new window.DOMParser().parseFromString(z,"text/html"),Ee=[].concat(...pe.body.querySelectorAll("*"));for(const Ae of Ee){const Je=Ae.nodeName.toLowerCase();if(!Object.keys(p).includes(Je)){Ae.remove();continue}const kn=[].concat(...Ae.attributes),Wn=[].concat(p["*"]||[],p[Je]||[]);for(const Gt of kn)Bx(Gt,Wn)||Ae.removeAttribute(Gt.nodeName)}return pe.body.innerHTML}const Hx="TemplateFactory",jx={allowList:Sp,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Wx={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},zx={entry:"(string|element|function|null)",selector:"(string|element)"};class Yx extends W{constructor(p){super(),this._config=this._getConfig(p)}static get Default(){return jx}static get DefaultType(){return Wx}static get NAME(){return Hx}getContent(){return Object.values(this._config.content).map(p=>this._resolvePossibleFunction(p)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(p){return this._checkContent(p),this._config.content={...this._config.content,...p},this}toHtml(){const p=document.createElement("div");p.innerHTML=this._maybeSanitize(this._config.template);for(const[pe,Ee]of Object.entries(this._config.content))this._setContent(p,Ee,pe);const k=p.children[0],K=this._resolvePossibleFunction(this._config.extraClass);return K&&k.classList.add(...K.split(" ")),k}_typeCheckConfig(p){super._typeCheckConfig(p),this._checkContent(p.content)}_checkContent(p){for(const[k,K]of Object.entries(p))super._typeCheckConfig({selector:k,entry:K},zx)}_setContent(p,k,K){const pe=G.findOne(K,p);if(pe){if(k=this._resolvePossibleFunction(k),!k){pe.remove();return}if(m(k)){this._putElementInTemplate(b(k),pe);return}if(this._config.html){pe.innerHTML=this._maybeSanitize(k);return}pe.textContent=k}}_maybeSanitize(p){return this._config.sanitize?Vx(p,this._config.allowList,this._config.sanitizeFn):p}_resolvePossibleFunction(p){return B(p,[this])}_putElementInTemplate(p,k){if(this._config.html){k.innerHTML="",k.append(p);return}k.textContent=p.textContent}}const Ux="tooltip",Kx=new Set(["sanitize","allowList","sanitizeFn"]),xu="fade",qx="modal",pl="show",Gx=".tooltip-inner",$p=`.${qx}`,Ap="hide.bs.modal",jr="hover",ku="focus",Jx="click",Xx="manual",Qx="hide",Zx="hidden",ek="show",tk="shown",nk="inserted",sk="click",ik="focusin",ok="focusout",rk="mouseenter",ak="mouseleave",lk={AUTO:"auto",TOP:"top",RIGHT:T()?"left":"right",BOTTOM:"bottom",LEFT:T()?"right":"left"},ck={allowList:Sp,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},uk={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Xi extends j{constructor(p,k){if(typeof i>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(p,k),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return ck}static get DefaultType(){return uk}static get NAME(){return Ux}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),N.off(this._element.closest($p),Ap,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const p=N.trigger(this._element,this.constructor.eventName(ek)),K=(A(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(p.defaultPrevented||!K)return;this._disposePopper();const pe=this._getTipElement();this._element.setAttribute("aria-describedby",pe.getAttribute("id"));const{container:Ee}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(Ee.append(pe),N.trigger(this._element,this.constructor.eventName(nk))),this._popper=this._createPopper(pe),pe.classList.add(pl),"ontouchstart"in document.documentElement)for(const Je of[].concat(...document.body.children))N.on(Je,"mouseover",D);const Ae=()=>{N.trigger(this._element,this.constructor.eventName(tk)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(Ae,this.tip,this._isAnimated())}hide(){if(!this._isShown()||N.trigger(this._element,this.constructor.eventName(Qx)).defaultPrevented)return;if(this._getTipElement().classList.remove(pl),"ontouchstart"in document.documentElement)for(const pe of[].concat(...document.body.children))N.off(pe,"mouseover",D);this._activeTrigger[Jx]=!1,this._activeTrigger[ku]=!1,this._activeTrigger[jr]=!1,this._isHovered=null;const K=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),N.trigger(this._element,this.constructor.eventName(Zx)))};this._queueCallback(K,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(p){const k=this._getTemplateFactory(p).toHtml();if(!k)return null;k.classList.remove(xu,pl),k.classList.add(`bs-${this.constructor.NAME}-auto`);const K=f(this.constructor.NAME).toString();return k.setAttribute("id",K),this._isAnimated()&&k.classList.add(xu),k}setContent(p){this._newContent=p,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(p){return this._templateFactory?this._templateFactory.changeContent(p):this._templateFactory=new Yx({...this._config,content:p,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Gx]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(p){return this.constructor.getOrCreateInstance(p.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(xu)}_isShown(){return this.tip&&this.tip.classList.contains(pl)}_createPopper(p){const k=B(this._config.placement,[this,p,this._element]),K=lk[k.toUpperCase()];return i.createPopper(this._element,p,this._getPopperConfig(K))}_getOffset(){const{offset:p}=this._config;return typeof p=="string"?p.split(",").map(k=>Number.parseInt(k,10)):typeof p=="function"?k=>p(k,this._element):p}_resolvePossibleFunction(p){return B(p,[this._element])}_getPopperConfig(p){const k={placement:p,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:K=>{this._getTipElement().setAttribute("data-popper-placement",K.state.placement)}}]};return{...k,...B(this._config.popperConfig,[k])}}_setListeners(){const p=this._config.trigger.split(" ");for(const k of p)if(k==="click")N.on(this._element,this.constructor.eventName(sk),this._config.selector,K=>{this._initializeOnDelegatedTarget(K).toggle()});else if(k!==Xx){const K=k===jr?this.constructor.eventName(rk):this.constructor.eventName(ik),pe=k===jr?this.constructor.eventName(ak):this.constructor.eventName(ok);N.on(this._element,K,this._config.selector,Ee=>{const Ae=this._initializeOnDelegatedTarget(Ee);Ae._activeTrigger[Ee.type==="focusin"?ku:jr]=!0,Ae._enter()}),N.on(this._element,pe,this._config.selector,Ee=>{const Ae=this._initializeOnDelegatedTarget(Ee);Ae._activeTrigger[Ee.type==="focusout"?ku:jr]=Ae._element.contains(Ee.relatedTarget),Ae._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},N.on(this._element.closest($p),Ap,this._hideModalHandler)}_fixTitle(){const p=this._element.getAttribute("title");p&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",p),this._element.setAttribute("data-bs-original-title",p),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(p,k){clearTimeout(this._timeout),this._timeout=setTimeout(p,k)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(p){const k=H.getDataAttributes(this._element);for(const K of Object.keys(k))Kx.has(K)&&delete k[K];return p={...k,...typeof p=="object"&&p?p:{}},p=this._mergeConfigObj(p),p=this._configAfterMerge(p),this._typeCheckConfig(p),p}_configAfterMerge(p){return p.container=p.container===!1?document.body:b(p.container),typeof p.delay=="number"&&(p.delay={show:p.delay,hide:p.delay}),typeof p.title=="number"&&(p.title=p.title.toString()),typeof p.content=="number"&&(p.content=p.content.toString()),p}_getDelegateConfig(){const p={};for(const[k,K]of Object.entries(this._config))this.constructor.Default[k]!==K&&(p[k]=K);return p.selector=!1,p.trigger="manual",p}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(p){return this.each(function(){const k=Xi.getOrCreateInstance(this,p);if(typeof p=="string"){if(typeof k[p]>"u")throw new TypeError(`No method named "${p}"`);k[p]()}})}}C(Xi);const dk="popover",hk=".popover-header",fk=".popover-body",pk={...Xi.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},gk={...Xi.DefaultType,content:"(null|string|element|function)"};class gl extends Xi{static get Default(){return pk}static get DefaultType(){return gk}static get NAME(){return dk}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[hk]:this._getTitle(),[fk]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(p){return this.each(function(){const k=gl.getOrCreateInstance(this,p);if(typeof p=="string"){if(typeof k[p]>"u")throw new TypeError(`No method named "${p}"`);k[p]()}})}}C(gl);const mk="scrollspy",Su=".bs.scrollspy",_k=".data-api",vk=`activate${Su}`,Cp=`click${Su}`,bk=`load${Su}${_k}`,yk="dropdown-item",zo="active",wk='[data-bs-spy="scroll"]',$u="[href]",xk=".nav, .list-group",Ep=".nav-link",kk=`${Ep}, .nav-item > ${Ep}, .list-group-item`,Sk=".dropdown",$k=".dropdown-toggle",Ak={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Ck={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Wr extends j{constructor(p,k){super(p,k),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ak}static get DefaultType(){return Ck}static get NAME(){return mk}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const p of this._observableSections.values())this._observer.observe(p)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(p){return p.target=b(p.target)||document.body,p.rootMargin=p.offset?`${p.offset}px 0px -30%`:p.rootMargin,typeof p.threshold=="string"&&(p.threshold=p.threshold.split(",").map(k=>Number.parseFloat(k))),p}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(N.off(this._config.target,Cp),N.on(this._config.target,Cp,$u,p=>{const k=this._observableSections.get(p.target.hash);if(k){p.preventDefault();const K=this._rootElement||window,pe=k.offsetTop-this._element.offsetTop;if(K.scrollTo){K.scrollTo({top:pe,behavior:"smooth"});return}K.scrollTop=pe}}))}_getNewObserver(){const p={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(k=>this._observerCallback(k),p)}_observerCallback(p){const k=Ae=>this._targetLinks.get(`#${Ae.target.id}`),K=Ae=>{this._previousScrollData.visibleEntryTop=Ae.target.offsetTop,this._process(k(Ae))},pe=(this._rootElement||document.documentElement).scrollTop,Ee=pe>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=pe;for(const Ae of p){if(!Ae.isIntersecting){this._activeTarget=null,this._clearActiveClass(k(Ae));continue}const Je=Ae.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(Ee&&Je){if(K(Ae),!pe)return;continue}!Ee&&!Je&&K(Ae)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const p=G.find($u,this._config.target);for(const k of p){if(!k.hash||$(k))continue;const K=G.findOne(decodeURI(k.hash),this._element);w(K)&&(this._targetLinks.set(decodeURI(k.hash),k),this._observableSections.set(k.hash,K))}}_process(p){this._activeTarget!==p&&(this._clearActiveClass(this._config.target),this._activeTarget=p,p.classList.add(zo),this._activateParents(p),N.trigger(this._element,vk,{relatedTarget:p}))}_activateParents(p){if(p.classList.contains(yk)){G.findOne($k,p.closest(Sk)).classList.add(zo);return}for(const k of G.parents(p,xk))for(const K of G.prev(k,kk))K.classList.add(zo)}_clearActiveClass(p){p.classList.remove(zo);const k=G.find(`${$u}.${zo}`,p);for(const K of k)K.classList.remove(zo)}static jQueryInterface(p){return this.each(function(){const k=Wr.getOrCreateInstance(this,p);if(typeof p=="string"){if(k[p]===void 0||p.startsWith("_")||p==="constructor")throw new TypeError(`No method named "${p}"`);k[p]()}})}}N.on(window,bk,()=>{for(const z of G.find(wk))Wr.getOrCreateInstance(z)}),C(Wr);const Ek="tab",Qi=".bs.tab",Pk=`hide${Qi}`,Tk=`hidden${Qi}`,Mk=`show${Qi}`,Dk=`shown${Qi}`,Ok=`click${Qi}`,Ik=`keydown${Qi}`,Rk=`load${Qi}`,Lk="ArrowLeft",Pp="ArrowRight",Nk="ArrowUp",Tp="ArrowDown",Au="Home",Mp="End",Zi="active",Dp="fade",Cu="show",Fk="dropdown",Op=".dropdown-toggle",Bk=".dropdown-menu",Eu=`:not(${Op})`,Vk='.list-group, .nav, [role="tablist"]',Hk=".nav-item, .list-group-item",jk=`.nav-link${Eu}, .list-group-item${Eu}, [role="tab"]${Eu}`,Ip='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Pu=`${jk}, ${Ip}`,Wk=`.${Zi}[data-bs-toggle="tab"], .${Zi}[data-bs-toggle="pill"], .${Zi}[data-bs-toggle="list"]`;class eo extends j{constructor(p){super(p),this._parent=this._element.closest(Vk),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),N.on(this._element,Ik,k=>this._keydown(k)))}static get NAME(){return Ek}show(){const p=this._element;if(this._elemIsActive(p))return;const k=this._getActiveElem(),K=k?N.trigger(k,Pk,{relatedTarget:p}):null;N.trigger(p,Mk,{relatedTarget:k}).defaultPrevented||K&&K.defaultPrevented||(this._deactivate(k,p),this._activate(p,k))}_activate(p,k){if(!p)return;p.classList.add(Zi),this._activate(G.getElementFromSelector(p));const K=()=>{if(p.getAttribute("role")!=="tab"){p.classList.add(Cu);return}p.removeAttribute("tabindex"),p.setAttribute("aria-selected",!0),this._toggleDropDown(p,!0),N.trigger(p,Dk,{relatedTarget:k})};this._queueCallback(K,p,p.classList.contains(Dp))}_deactivate(p,k){if(!p)return;p.classList.remove(Zi),p.blur(),this._deactivate(G.getElementFromSelector(p));const K=()=>{if(p.getAttribute("role")!=="tab"){p.classList.remove(Cu);return}p.setAttribute("aria-selected",!1),p.setAttribute("tabindex","-1"),this._toggleDropDown(p,!1),N.trigger(p,Tk,{relatedTarget:k})};this._queueCallback(K,p,p.classList.contains(Dp))}_keydown(p){if(![Lk,Pp,Nk,Tp,Au,Mp].includes(p.key))return;p.stopPropagation(),p.preventDefault();const k=this._getChildren().filter(pe=>!$(pe));let K;if([Au,Mp].includes(p.key))K=k[p.key===Au?0:k.length-1];else{const pe=[Pp,Tp].includes(p.key);K=ae(k,p.target,pe,!0)}K&&(K.focus({preventScroll:!0}),eo.getOrCreateInstance(K).show())}_getChildren(){return G.find(Pu,this._parent)}_getActiveElem(){return this._getChildren().find(p=>this._elemIsActive(p))||null}_setInitialAttributes(p,k){this._setAttributeIfNotExists(p,"role","tablist");for(const K of k)this._setInitialAttributesOnChild(K)}_setInitialAttributesOnChild(p){p=this._getInnerElement(p);const k=this._elemIsActive(p),K=this._getOuterElement(p);p.setAttribute("aria-selected",k),K!==p&&this._setAttributeIfNotExists(K,"role","presentation"),k||p.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(p,"role","tab"),this._setInitialAttributesOnTargetPanel(p)}_setInitialAttributesOnTargetPanel(p){const k=G.getElementFromSelector(p);k&&(this._setAttributeIfNotExists(k,"role","tabpanel"),p.id&&this._setAttributeIfNotExists(k,"aria-labelledby",`${p.id}`))}_toggleDropDown(p,k){const K=this._getOuterElement(p);if(!K.classList.contains(Fk))return;const pe=(Ee,Ae)=>{const Je=G.findOne(Ee,K);Je&&Je.classList.toggle(Ae,k)};pe(Op,Zi),pe(Bk,Cu),K.setAttribute("aria-expanded",k)}_setAttributeIfNotExists(p,k,K){p.hasAttribute(k)||p.setAttribute(k,K)}_elemIsActive(p){return p.classList.contains(Zi)}_getInnerElement(p){return p.matches(Pu)?p:G.findOne(Pu,p)}_getOuterElement(p){return p.closest(Hk)||p}static jQueryInterface(p){return this.each(function(){const k=eo.getOrCreateInstance(this);if(typeof p=="string"){if(k[p]===void 0||p.startsWith("_")||p==="constructor")throw new TypeError(`No method named "${p}"`);k[p]()}})}}N.on(document,Ok,Ip,function(z){["A","AREA"].includes(this.tagName)&&z.preventDefault(),!$(this)&&eo.getOrCreateInstance(this).show()}),N.on(window,Rk,()=>{for(const z of G.find(Wk))eo.getOrCreateInstance(z)}),C(eo);const zk="toast",ri=".bs.toast",Yk=`mouseover${ri}`,Uk=`mouseout${ri}`,Kk=`focusin${ri}`,qk=`focusout${ri}`,Gk=`hide${ri}`,Jk=`hidden${ri}`,Xk=`show${ri}`,Qk=`shown${ri}`,Zk="fade",Rp="hide",ml="show",_l="showing",eS={animation:"boolean",autohide:"boolean",delay:"number"},tS={animation:!0,autohide:!0,delay:5e3};class zr extends j{constructor(p,k){super(p,k),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return tS}static get DefaultType(){return eS}static get NAME(){return zk}show(){if(N.trigger(this._element,Xk).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Zk);const k=()=>{this._element.classList.remove(_l),N.trigger(this._element,Qk),this._maybeScheduleHide()};this._element.classList.remove(Rp),x(this._element),this._element.classList.add(ml,_l),this._queueCallback(k,this._element,this._config.animation)}hide(){if(!this.isShown()||N.trigger(this._element,Gk).defaultPrevented)return;const k=()=>{this._element.classList.add(Rp),this._element.classList.remove(_l,ml),N.trigger(this._element,Jk)};this._element.classList.add(_l),this._queueCallback(k,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ml),super.dispose()}isShown(){return this._element.classList.contains(ml)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(p,k){switch(p.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=k;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=k;break}}if(k){this._clearTimeout();return}const K=p.relatedTarget;this._element===K||this._element.contains(K)||this._maybeScheduleHide()}_setListeners(){N.on(this._element,Yk,p=>this._onInteraction(p,!0)),N.on(this._element,Uk,p=>this._onInteraction(p,!1)),N.on(this._element,Kk,p=>this._onInteraction(p,!0)),N.on(this._element,qk,p=>this._onInteraction(p,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(p){return this.each(function(){const k=zr.getOrCreateInstance(this,p);if(typeof p=="string"){if(typeof k[p]>"u")throw new TypeError(`No method named "${p}"`);k[p](this)}})}}return de(zr),C(zr),{Alert:Ge,Button:ne,Carousel:Vo,Collapse:jo,Dropdown:Zn,Modal:Ji,Offcanvas:Rs,Popover:gl,ScrollSpy:Wr,Tab:eo,Toast:zr,Tooltip:Xi}})})(oS);/**
|
|
* @vue/shared v3.4.29
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**//*! #__NO_SIDE_EFFECTS__ */function $h(t,e){const n=new Set(t.split(","));return e?s=>n.has(s.toLowerCase()):s=>n.has(s)}const _t={},nr=[],Un=()=>{},GS=()=>!1,Oc=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Ah=t=>t.startsWith("onUpdate:"),Lt=Object.assign,Ch=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},JS=Object.prototype.hasOwnProperty,st=(t,e)=>JS.call(t,e),Fe=Array.isArray,sr=t=>Ka(t)==="[object Map]",Or=t=>Ka(t)==="[object Set]",zp=t=>Ka(t)==="[object Date]",Ye=t=>typeof t=="function",St=t=>typeof t=="string",Xs=t=>typeof t=="symbol",ut=t=>t!==null&&typeof t=="object",kv=t=>(ut(t)||Ye(t))&&Ye(t.then)&&Ye(t.catch),Sv=Object.prototype.toString,Ka=t=>Sv.call(t),XS=t=>Ka(t).slice(8,-1),$v=t=>Ka(t)==="[object Object]",Eh=t=>St(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,ua=$h(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ic=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},QS=/-(\w)/g,Es=Ic(t=>t.replace(QS,(e,n)=>n?n.toUpperCase():"")),ZS=/\B([A-Z])/g,To=Ic(t=>t.replace(ZS,"-$1").toLowerCase()),Rc=Ic(t=>t.charAt(0).toUpperCase()+t.slice(1)),Tu=Ic(t=>t?`on${Rc(t)}`:""),Ti=(t,e)=>!Object.is(t,e),Gl=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},Av=(t,e,n,s=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:s,value:n})},ac=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Cv=t=>{const e=St(t)?Number(t):NaN;return isNaN(e)?t:e};let Yp;const Ev=()=>Yp||(Yp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function jt(t){if(Fe(t)){const e={};for(let n=0;n<t.length;n++){const s=t[n],i=St(s)?s$(s):jt(s);if(i)for(const o in i)e[o]=i[o]}return e}else if(St(t)||ut(t))return t}const e$=/;(?![^(]*\))/g,t$=/:([^]+)/,n$=/\/\*[^]*?\*\//g;function s$(t){const e={};return t.replace(n$,"").split(e$).forEach(n=>{if(n){const s=n.split(t$);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function Ce(t){let e="";if(St(t))e=t;else if(Fe(t))for(let n=0;n<t.length;n++){const s=Ce(t[n]);s&&(e+=s+" ")}else if(ut(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function Qt(t){if(!t)return null;let{class:e,style:n}=t;return e&&!St(e)&&(t.class=Ce(e)),n&&(t.style=jt(n)),t}const i$="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",o$=$h(i$);function Pv(t){return!!t||t===""}function r$(t,e){if(t.length!==e.length)return!1;let n=!0;for(let s=0;n&&s<t.length;s++)n=Ao(t[s],e[s]);return n}function Ao(t,e){if(t===e)return!0;let n=zp(t),s=zp(e);if(n||s)return n&&s?t.getTime()===e.getTime():!1;if(n=Xs(t),s=Xs(e),n||s)return t===e;if(n=Fe(t),s=Fe(e),n||s)return n&&s?r$(t,e):!1;if(n=ut(t),s=ut(e),n||s){if(!n||!s)return!1;const i=Object.keys(t).length,o=Object.keys(e).length;if(i!==o)return!1;for(const r in t){const a=t.hasOwnProperty(r),l=e.hasOwnProperty(r);if(a&&!l||!a&&l||!Ao(t[r],e[r]))return!1}}return String(t)===String(e)}function Ph(t,e){return t.findIndex(n=>Ao(n,e))}const me=t=>St(t)?t:t==null?"":Fe(t)||ut(t)&&(t.toString===Sv||!Ye(t.toString))?JSON.stringify(t,Tv,2):String(t),Tv=(t,e)=>e&&e.__v_isRef?Tv(t,e.value):sr(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[s,i],o)=>(n[Mu(s,o)+" =>"]=i,n),{})}:Or(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>Mu(n))}:Xs(e)?Mu(e):ut(e)&&!Fe(e)&&!$v(e)?String(e):e,Mu=(t,e="")=>{var n;return Xs(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/**
|
|
* @vue/reactivity v3.4.29
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let Dn;class Mv{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Dn,!e&&Dn&&(this.index=(Dn.scopes||(Dn.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const n=Dn;try{return Dn=this,e()}finally{Dn=n}}}on(){Dn=this}off(){Dn=this.parent}stop(e){if(this._active){let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.scopes)for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!e){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function Dv(t){return new Mv(t)}function a$(t,e=Dn){e&&e.active&&e.effects.push(t)}function Lc(){return Dn}function Th(t){Dn&&Dn.cleanups.push(t)}let _o;class Mh{constructor(e,n,s,i){this.fn=e,this.trigger=n,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=5,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,a$(this,i)}get dirty(){if(this._dirtyLevel===2)return!1;if(this._dirtyLevel===3||this._dirtyLevel===4){this._dirtyLevel=1,Ni();for(let e=0;e<this._depsLength;e++){const n=this.deps[e];if(n.computed){if(n.computed.effect._dirtyLevel===2)return!0;if(l$(n.computed),this._dirtyLevel>=5)break}}this._dirtyLevel===1&&(this._dirtyLevel=0),Fi()}return this._dirtyLevel>=5}set dirty(e){this._dirtyLevel=e?5:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=$i,n=_o;try{return $i=!0,_o=this,this._runnings++,Up(this),this.fn()}finally{Kp(this),this._runnings--,_o=n,$i=e}}stop(){this.active&&(Up(this),Kp(this),this.onStop&&this.onStop(),this.active=!1)}}function l$(t){return t.value}function Up(t){t._trackId++,t._depsLength=0}function Kp(t){if(t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)Ov(t.deps[e],t);t.deps.length=t._depsLength}}function Ov(t,e){const n=t.get(e);n!==void 0&&e._trackId!==n&&(t.delete(e),t.size===0&&t.cleanup())}let $i=!0,xd=0;const Iv=[];function Ni(){Iv.push($i),$i=!1}function Fi(){const t=Iv.pop();$i=t===void 0?!0:t}function Dh(){xd++}function Oh(){for(xd--;!xd&&kd.length;)kd.shift()()}function Rv(t,e,n){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&Ov(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const kd=[];function Lv(t,e,n){Dh();for(const s of t.keys()){if(!t.computed&&s.computed&&t.get(s)===s._trackId&&s._runnings>0){s._dirtyLevel=2;continue}let i;s._dirtyLevel<e&&(i??(i=t.get(s)===s._trackId))&&(s._shouldSchedule||(s._shouldSchedule=s._dirtyLevel===0),s.computed&&s._dirtyLevel===2&&(s._shouldSchedule=!0),s._dirtyLevel=e),s._shouldSchedule&&(i??(i=t.get(s)===s._trackId))&&(s.trigger(),(!s._runnings||s.allowRecurse)&&s._dirtyLevel!==3&&(s._shouldSchedule=!1,s.scheduler&&kd.push(s.scheduler)))}Oh()}const Nv=(t,e)=>{const n=new Map;return n.cleanup=t,n.computed=e,n},lc=new WeakMap,vo=Symbol(""),Sd=Symbol("");function Pn(t,e,n){if($i&&_o){let s=lc.get(t);s||lc.set(t,s=new Map);let i=s.get(n);i||s.set(n,i=Nv(()=>s.delete(n))),Rv(_o,i)}}function Gs(t,e,n,s,i,o){const r=lc.get(t);if(!r)return;let a=[];if(e==="clear")a=[...r.values()];else if(n==="length"&&Fe(t)){const l=Number(s);r.forEach((c,u)=>{(u==="length"||!Xs(u)&&u>=l)&&a.push(c)})}else switch(n!==void 0&&a.push(r.get(n)),e){case"add":Fe(t)?Eh(n)&&a.push(r.get("length")):(a.push(r.get(vo)),sr(t)&&a.push(r.get(Sd)));break;case"delete":Fe(t)||(a.push(r.get(vo)),sr(t)&&a.push(r.get(Sd)));break;case"set":sr(t)&&a.push(r.get(vo));break}Dh();for(const l of a)l&&Lv(l,5);Oh()}function c$(t,e){const n=lc.get(t);return n&&n.get(e)}const u$=$h("__proto__,__v_isRef,__isVue"),Fv=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Xs)),qp=d$();function d$(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const s=Ze(this);for(let o=0,r=this.length;o<r;o++)Pn(s,"get",o+"");const i=s[e](...n);return i===-1||i===!1?s[e](...n.map(Ze)):i}}),["push","pop","shift","unshift","splice"].forEach(e=>{t[e]=function(...n){Ni(),Dh();const s=Ze(this)[e].apply(this,n);return Oh(),Fi(),s}}),t}function h$(t){Xs(t)||(t=String(t));const e=Ze(this);return Pn(e,"has",t),e.hasOwnProperty(t)}class Bv{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,s){const i=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(i?o?$$:Wv:o?jv:Hv).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(s)?e:void 0;const r=Fe(e);if(!i){if(r&&st(qp,n))return Reflect.get(qp,n,s);if(n==="hasOwnProperty")return h$}const a=Reflect.get(e,n,s);return(Xs(n)?Fv.has(n):u$(n))||(i||Pn(e,"get",n),o)?a:Pt(a)?r&&Eh(n)?a:a.value:ut(a)?i?Yv(a):Ts(a):a}}class Vv extends Bv{constructor(e=!1){super(!1,e)}set(e,n,s,i){let o=e[n];if(!this._isShallow){const l=$a(o);if(!cc(s)&&!$a(s)&&(o=Ze(o),s=Ze(s)),!Fe(e)&&Pt(o)&&!Pt(s))return l?!1:(o.value=s,!0)}const r=Fe(e)&&Eh(n)?Number(n)<e.length:st(e,n),a=Reflect.set(e,n,s,i);return e===Ze(i)&&(r?Ti(s,o)&&Gs(e,"set",n,s):Gs(e,"add",n,s)),a}deleteProperty(e,n){const s=st(e,n);e[n];const i=Reflect.deleteProperty(e,n);return i&&s&&Gs(e,"delete",n,void 0),i}has(e,n){const s=Reflect.has(e,n);return(!Xs(n)||!Fv.has(n))&&Pn(e,"has",n),s}ownKeys(e){return Pn(e,"iterate",Fe(e)?"length":vo),Reflect.ownKeys(e)}}class f$ extends Bv{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const p$=new Vv,g$=new f$,m$=new Vv(!0);const Ih=t=>t,Nc=t=>Reflect.getPrototypeOf(t);function yl(t,e,n=!1,s=!1){t=t.__v_raw;const i=Ze(t),o=Ze(e);n||(Ti(e,o)&&Pn(i,"get",e),Pn(i,"get",o));const{has:r}=Nc(i),a=s?Ih:n?Nh:Aa;if(r.call(i,e))return a(t.get(e));if(r.call(i,o))return a(t.get(o));t!==i&&t.get(e)}function wl(t,e=!1){const n=this.__v_raw,s=Ze(n),i=Ze(t);return e||(Ti(t,i)&&Pn(s,"has",t),Pn(s,"has",i)),t===i?n.has(t):n.has(t)||n.has(i)}function xl(t,e=!1){return t=t.__v_raw,!e&&Pn(Ze(t),"iterate",vo),Reflect.get(t,"size",t)}function Gp(t){t=Ze(t);const e=Ze(this);return Nc(e).has.call(e,t)||(e.add(t),Gs(e,"add",t,t)),this}function Jp(t,e){e=Ze(e);const n=Ze(this),{has:s,get:i}=Nc(n);let o=s.call(n,t);o||(t=Ze(t),o=s.call(n,t));const r=i.call(n,t);return n.set(t,e),o?Ti(e,r)&&Gs(n,"set",t,e):Gs(n,"add",t,e),this}function Xp(t){const e=Ze(this),{has:n,get:s}=Nc(e);let i=n.call(e,t);i||(t=Ze(t),i=n.call(e,t)),s&&s.call(e,t);const o=e.delete(t);return i&&Gs(e,"delete",t,void 0),o}function Qp(){const t=Ze(this),e=t.size!==0,n=t.clear();return e&&Gs(t,"clear",void 0,void 0),n}function kl(t,e){return function(s,i){const o=this,r=o.__v_raw,a=Ze(r),l=e?Ih:t?Nh:Aa;return!t&&Pn(a,"iterate",vo),r.forEach((c,u)=>s.call(i,l(c),l(u),o))}}function Sl(t,e,n){return function(...s){const i=this.__v_raw,o=Ze(i),r=sr(o),a=t==="entries"||t===Symbol.iterator&&r,l=t==="keys"&&r,c=i[t](...s),u=n?Ih:e?Nh:Aa;return!e&&Pn(o,"iterate",l?Sd:vo),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:a?[u(d[0]),u(d[1])]:u(d),done:f}},[Symbol.iterator](){return this}}}}function ai(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function _$(){const t={get(o){return yl(this,o)},get size(){return xl(this)},has:wl,add:Gp,set:Jp,delete:Xp,clear:Qp,forEach:kl(!1,!1)},e={get(o){return yl(this,o,!1,!0)},get size(){return xl(this)},has:wl,add:Gp,set:Jp,delete:Xp,clear:Qp,forEach:kl(!1,!0)},n={get(o){return yl(this,o,!0)},get size(){return xl(this,!0)},has(o){return wl.call(this,o,!0)},add:ai("add"),set:ai("set"),delete:ai("delete"),clear:ai("clear"),forEach:kl(!0,!1)},s={get(o){return yl(this,o,!0,!0)},get size(){return xl(this,!0)},has(o){return wl.call(this,o,!0)},add:ai("add"),set:ai("set"),delete:ai("delete"),clear:ai("clear"),forEach:kl(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{t[o]=Sl(o,!1,!1),n[o]=Sl(o,!0,!1),e[o]=Sl(o,!1,!0),s[o]=Sl(o,!0,!0)}),[t,n,e,s]}const[v$,b$,y$,w$]=_$();function Rh(t,e){const n=e?t?w$:y$:t?b$:v$;return(s,i,o)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?s:Reflect.get(st(n,i)&&i in s?n:s,i,o)}const x$={get:Rh(!1,!1)},k$={get:Rh(!1,!0)},S$={get:Rh(!0,!1)};const Hv=new WeakMap,jv=new WeakMap,Wv=new WeakMap,$$=new WeakMap;function A$(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function C$(t){return t.__v_skip||!Object.isExtensible(t)?0:A$(XS(t))}function Ts(t){return $a(t)?t:Lh(t,!1,p$,x$,Hv)}function zv(t){return Lh(t,!1,m$,k$,jv)}function Yv(t){return Lh(t,!0,g$,S$,Wv)}function Lh(t,e,n,s,i){if(!ut(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=i.get(t);if(o)return o;const r=C$(t);if(r===0)return t;const a=new Proxy(t,r===2?s:n);return i.set(t,a),a}function bo(t){return $a(t)?bo(t.__v_raw):!!(t&&t.__v_isReactive)}function $a(t){return!!(t&&t.__v_isReadonly)}function cc(t){return!!(t&&t.__v_isShallow)}function Fc(t){return t?!!t.__v_raw:!1}function Ze(t){const e=t&&t.__v_raw;return e?Ze(e):t}function Bc(t){return Object.isExtensible(t)&&Av(t,"__v_skip",!0),t}const Aa=t=>ut(t)?Ts(t):t,Nh=t=>ut(t)?Yv(t):t;class Uv{constructor(e,n,s,i){this.getter=e,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Mh(()=>e(this._value),()=>Jl(this,this.effect._dirtyLevel===3?3:4)),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=s}get value(){const e=Ze(this);return(!e._cacheable||e.effect.dirty)&&Ti(e._value,e._value=e.effect.run())&&Jl(e,5),Kv(e),e.effect._dirtyLevel>=2&&Jl(e,3),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function E$(t,e,n=!1){let s,i;const o=Ye(t);return o?(s=t,i=Un):(s=t.get,i=t.set),new Uv(s,i,o||!i,n)}function Kv(t){var e;$i&&_o&&(t=Ze(t),Rv(_o,(e=t.dep)!=null?e:t.dep=Nv(()=>t.dep=void 0,t instanceof Uv?t:void 0)))}function Jl(t,e=5,n,s){t=Ze(t);const i=t.dep;i&&Lv(i,e)}function Pt(t){return!!(t&&t.__v_isRef===!0)}function ve(t){return qv(t,!1)}function Fh(t){return qv(t,!0)}function qv(t,e){return Pt(t)?t:new P$(t,e)}class P${constructor(e,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?e:Ze(e),this._value=n?e:Aa(e)}get value(){return Kv(this),this._value}set value(e){const n=this.__v_isShallow||cc(e)||$a(e);e=n?e:Ze(e),Ti(e,this._rawValue)&&(this._rawValue,this._rawValue=e,this._value=n?e:Aa(e),Jl(this,5))}}function q(t){return Pt(t)?t.value:t}const T$={get:(t,e,n)=>q(Reflect.get(t,e,n)),set:(t,e,n,s)=>{const i=t[e];return Pt(i)&&!Pt(n)?(i.value=n,!0):Reflect.set(t,e,n,s)}};function Gv(t){return bo(t)?t:new Proxy(t,T$)}function M$(t){const e=Fe(t)?new Array(t.length):{};for(const n in t)e[n]=Jv(t,n);return e}class D${constructor(e,n,s){this._object=e,this._key=n,this._defaultValue=s,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return c$(Ze(this._object),this._key)}}class O${constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Ca(t,e,n){return Pt(t)?t:Ye(t)?new O$(t):ut(t)&&arguments.length>1?Jv(t,e,n):ve(t)}function Jv(t,e,n){const s=t[e];return Pt(s)?s:new D$(t,e,n)}/**
|
|
* @vue/runtime-core v3.4.29
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function Ai(t,e,n,s){try{return s?t(...s):t()}catch(i){qa(i,e,n)}}function Jn(t,e,n,s){if(Ye(t)){const i=Ai(t,e,n,s);return i&&kv(i)&&i.catch(o=>{qa(o,e,n)}),i}if(Fe(t)){const i=[];for(let o=0;o<t.length;o++)i.push(Jn(t[o],e,n,s));return i}}function qa(t,e,n,s=!0){const i=e?e.vnode:null;if(e){let o=e.parent;const r=e.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const c=o.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](t,r,a)===!1)return}o=o.parent}const l=e.appContext.config.errorHandler;if(l){Ni(),Ai(l,null,10,[t,r,a]),Fi();return}}I$(t,n,i,s)}function I$(t,e,n,s=!0){console.error(t)}let Ea=!1,$d=!1;const cn=[];let vs=0;const ir=[];let pi=null,fo=0;const Xv=Promise.resolve();let Bh=null;function en(t){const e=Bh||Xv;return t?e.then(this?t.bind(this):t):e}function R$(t){let e=vs+1,n=cn.length;for(;e<n;){const s=e+n>>>1,i=cn[s],o=Pa(i);o<t||o===t&&i.pre?e=s+1:n=s}return e}function Vh(t){(!cn.length||!cn.includes(t,Ea&&t.allowRecurse?vs+1:vs))&&(t.id==null?cn.push(t):cn.splice(R$(t.id),0,t),Qv())}function Qv(){!Ea&&!$d&&($d=!0,Bh=Xv.then(eb))}function L$(t){const e=cn.indexOf(t);e>vs&&cn.splice(e,1)}function Ad(t){Fe(t)?ir.push(...t):(!pi||!pi.includes(t,t.allowRecurse?fo+1:fo))&&ir.push(t),Qv()}function Zp(t,e,n=Ea?vs+1:0){for(;n<cn.length;n++){const s=cn[n];if(s&&s.pre){if(t&&s.id!==t.uid)continue;cn.splice(n,1),n--,s()}}}function Zv(t){if(ir.length){const e=[...new Set(ir)].sort((n,s)=>Pa(n)-Pa(s));if(ir.length=0,pi){pi.push(...e);return}for(pi=e,fo=0;fo<pi.length;fo++){const n=pi[fo];n.active!==!1&&n()}pi=null,fo=0}}const Pa=t=>t.id==null?1/0:t.id,N$=(t,e)=>{const n=Pa(t)-Pa(e);if(n===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return n};function eb(t){$d=!1,Ea=!0,cn.sort(N$);try{for(vs=0;vs<cn.length;vs++){const e=cn[vs];e&&e.active!==!1&&Ai(e,null,14)}}finally{vs=0,cn.length=0,Zv(),Ea=!1,Bh=null,(cn.length||ir.length)&&eb()}}function F$(t,e,...n){if(t.isUnmounted)return;const s=t.vnode.props||_t;let i=n;const o=e.startsWith("update:"),r=o&&e.slice(7);if(r&&r in s){const u=`${r==="modelValue"?"model":r}Modifiers`,{number:d,trim:f}=s[u]||_t;f&&(i=n.map(g=>St(g)?g.trim():g)),d&&(i=n.map(ac))}let a,l=s[a=Tu(e)]||s[a=Tu(Es(e))];!l&&o&&(l=s[a=Tu(To(e))]),l&&Jn(l,t,6,i);const c=s[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,Jn(c,t,6,i)}}function tb(t,e,n=!1){const s=e.emitsCache,i=s.get(t);if(i!==void 0)return i;const o=t.emits;let r={},a=!1;if(!Ye(t)){const l=c=>{const u=tb(c,e,!0);u&&(a=!0,Lt(r,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!o&&!a?(ut(t)&&s.set(t,null),null):(Fe(o)?o.forEach(l=>r[l]=null):Lt(r,o),ut(t)&&s.set(t,r),r)}function Vc(t,e){return!t||!Oc(e)?!1:(e=e.slice(2).replace(/Once$/,""),st(t,e[0].toLowerCase()+e.slice(1))||st(t,To(e))||st(t,e))}let Wt=null,Hc=null;function uc(t){const e=Wt;return Wt=t,Hc=t&&t.type.__scopeId||null,e}function Ut(t){Hc=t}function Kt(){Hc=null}function Pe(t,e=Wt,n){if(!e||t._n)return t;const s=(...i)=>{s._d&&gg(-1);const o=uc(e);let r;try{r=t(...i)}finally{uc(o),s._d&&gg(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function Du(t){const{type:e,vnode:n,proxy:s,withProxy:i,propsOptions:[o],slots:r,attrs:a,emit:l,render:c,renderCache:u,props:d,data:f,setupState:g,ctx:_,inheritAttrs:m}=t,b=uc(t);let w,$;try{if(n.shapeFlag&4){const D=i||s,x=D;w=ss(c.call(x,D,u,d,g,f,_)),$=a}else{const D=e;w=ss(D.length>1?D(d,{attrs:a,slots:r,emit:l}):D(d,null)),$=e.props?a:V$(a)}}catch(D){pa.length=0,qa(D,t,1),w=Se(un)}let A=w;if($&&m!==!1){const D=Object.keys($),{shapeFlag:x}=A;D.length&&x&7&&(o&&D.some(Ah)&&($=H$($,o)),A=Mi(A,$,!1,!0))}return n.dirs&&(A=Mi(A,null,!1,!0),A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&(A.transition=n.transition),w=A,uc(b),w}function B$(t,e=!0){let n;for(let s=0;s<t.length;s++){const i=t[s];if(Da(i)){if(i.type!==un||i.children==="v-if"){if(n)return;n=i}}else return}return n}const V$=t=>{let e;for(const n in t)(n==="class"||n==="style"||Oc(n))&&((e||(e={}))[n]=t[n]);return e},H$=(t,e)=>{const n={};for(const s in t)(!Ah(s)||!(s.slice(9)in e))&&(n[s]=t[s]);return n};function j$(t,e,n){const{props:s,children:i,component:o}=t,{props:r,children:a,patchFlag:l}=e,c=o.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?eg(s,r,c):!!r;if(l&8){const u=e.dynamicProps;for(let d=0;d<u.length;d++){const f=u[d];if(r[f]!==s[f]&&!Vc(c,f))return!0}}}else return(i||a)&&(!a||!a.$stable)?!0:s===r?!1:s?r?eg(s,r,c):!0:!!r;return!1}function eg(t,e,n){const s=Object.keys(e);if(s.length!==Object.keys(t).length)return!0;for(let i=0;i<s.length;i++){const o=s[i];if(e[o]!==t[o]&&!Vc(n,o))return!0}return!1}function Hh({vnode:t,parent:e},n){for(;e;){const s=e.subTree;if(s.suspense&&s.suspense.activeBranch===t&&(s.el=t.el),s===t)(t=e.vnode).el=n,e=e.parent;else break}}const jh="components";function He(t,e){return sb(jh,t,!0,e)||t}const nb=Symbol.for("v-ndc");function Mo(t){return St(t)?sb(jh,t,!1)||t:t||nb}function sb(t,e,n=!0,s=!1){const i=Wt||Xt;if(i){const o=i.type;if(t===jh){const a=HA(o,!1);if(a&&(a===e||a===Es(e)||a===Rc(Es(e))))return o}const r=tg(i[t]||o[t],e)||tg(i.appContext[t],e);return!r&&s?o:r}}function tg(t,e){return t&&(t[e]||t[Es(e)]||t[Rc(Es(e))])}const W$=t=>t.__isSuspense;let Cd=0;const z$={name:"Suspense",__isSuspense:!0,process(t,e,n,s,i,o,r,a,l,c){if(t==null)Y$(e,n,s,i,o,r,a,l,c);else{if(o&&o.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}U$(t,e,n,s,i,r,a,l,c)}},hydrate:K$,create:zh,normalize:q$},Wh=z$;function Ta(t,e){const n=t.props&&t.props[e];Ye(n)&&n()}function Y$(t,e,n,s,i,o,r,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),f=t.suspense=zh(t,i,s,e,d,n,o,r,a,l);c(null,f.pendingBranch=t.ssContent,d,null,s,f,o,r),f.deps>0?(Ta(t,"onPending"),Ta(t,"onFallback"),c(null,t.ssFallback,e,n,s,null,o,r),or(f,t.ssFallback)):f.resolve(!1,!0)}function U$(t,e,n,s,i,o,r,a,{p:l,um:c,o:{createElement:u}}){const d=e.suspense=t.suspense;d.vnode=e,e.el=t.el;const f=e.ssContent,g=e.ssFallback,{activeBranch:_,pendingBranch:m,isInFallback:b,isHydrating:w}=d;if(m)d.pendingBranch=f,bs(f,m)?(l(m,f,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0?d.resolve():b&&(w||(l(_,g,n,s,i,null,o,r,a),or(d,g)))):(d.pendingId=Cd++,w?(d.isHydrating=!1,d.activeBranch=m):c(m,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),b?(l(null,f,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0?d.resolve():(l(_,g,n,s,i,null,o,r,a),or(d,g))):_&&bs(f,_)?(l(_,f,n,s,i,d,o,r,a),d.resolve(!0)):(l(null,f,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0&&d.resolve()));else if(_&&bs(f,_))l(_,f,n,s,i,d,o,r,a),or(d,f);else if(Ta(e,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=Cd++,l(null,f,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0)d.resolve();else{const{timeout:$,pendingId:A}=d;$>0?setTimeout(()=>{d.pendingId===A&&d.fallback(g)},$):$===0&&d.fallback(g)}}function zh(t,e,n,s,i,o,r,a,l,c,u=!1){const{p:d,m:f,um:g,n:_,o:{parentNode:m,remove:b}}=c;let w;const $=J$(t);$&&e&&e.pendingBranch&&(w=e.pendingId,e.deps++);const A=t.props?Cv(t.props.timeout):void 0,D=o,x={vnode:t,parent:e,parentComponent:n,namespace:r,container:s,hiddenContainer:i,deps:0,pendingId:Cd++,timeout:typeof A=="number"?A:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(y=!1,S=!1){const{vnode:E,activeBranch:T,pendingBranch:C,pendingId:B,effects:J,parentComponent:ae,container:Y}=x;let L=!1;x.isHydrating?x.isHydrating=!1:y||(L=T&&C.transition&&C.transition.mode==="out-in",L&&(T.transition.afterLeave=()=>{B===x.pendingId&&(f(C,Y,o===D?_(T):o,0),Ad(J))}),T&&(m(T.el)!==x.hiddenContainer&&(o=_(T)),g(T,ae,x,!0)),L||f(C,Y,o,0)),or(x,C),x.pendingBranch=null,x.isInFallback=!1;let I=x.parent,V=!1;for(;I;){if(I.pendingBranch){I.effects.push(...J),V=!0;break}I=I.parent}!V&&!L&&Ad(J),x.effects=[],$&&e&&e.pendingBranch&&w===e.pendingId&&(e.deps--,e.deps===0&&!S&&e.resolve()),Ta(E,"onResolve")},fallback(y){if(!x.pendingBranch)return;const{vnode:S,activeBranch:E,parentComponent:T,container:C,namespace:B}=x;Ta(S,"onFallback");const J=_(E),ae=()=>{x.isInFallback&&(d(null,y,C,J,T,null,B,a,l),or(x,y))},Y=y.transition&&y.transition.mode==="out-in";Y&&(E.transition.afterLeave=ae),x.isInFallback=!0,g(E,T,null,!0),Y||ae()},move(y,S,E){x.activeBranch&&f(x.activeBranch,y,S,E),x.container=y},next(){return x.activeBranch&&_(x.activeBranch)},registerDep(y,S,E){const T=!!x.pendingBranch;T&&x.deps++;const C=y.vnode.el;y.asyncDep.catch(B=>{qa(B,y,0)}).then(B=>{if(y.isUnmounted||x.isUnmounted||x.pendingId!==y.suspenseId)return;y.asyncResolved=!0;const{vnode:J}=y;Rd(y,B,!1),C&&(J.el=C);const ae=!C&&y.subTree.el;S(y,J,m(C||y.subTree.el),C?null:_(y.subTree),x,r,E),ae&&b(ae),Hh(y,J.el),T&&--x.deps===0&&x.resolve()})},unmount(y,S){x.isUnmounted=!0,x.activeBranch&&g(x.activeBranch,n,y,S),x.pendingBranch&&g(x.pendingBranch,n,y,S)}};return x}function K$(t,e,n,s,i,o,r,a,l){const c=e.suspense=zh(e,s,n,t.parentNode,document.createElement("div"),null,i,o,r,a,!0),u=l(t,c.pendingBranch=e.ssContent,n,c,o,r);return c.deps===0&&c.resolve(!1,!0),u}function q$(t){const{shapeFlag:e,children:n}=t,s=e&32;t.ssContent=ng(s?n.default:n),t.ssFallback=s?ng(n.fallback):Se(un)}function ng(t){let e;if(Ye(t)){const n=pr&&t._c;n&&(t._d=!1,M()),t=t(),n&&(t._d=!0,e=Kn,Cb())}return Fe(t)&&(t=B$(t)),t=ss(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function G$(t,e){e&&e.pendingBranch?Fe(t)?e.effects.push(...t):e.effects.push(t):Ad(t)}function or(t,e){t.activeBranch=e;const{vnode:n,parentComponent:s}=t;let i=e.el;for(;!i&&e.component;)e=e.component.subTree,i=e.el;n.el=i,s&&s.subTree===n&&(s.vnode.el=i,Hh(s,i))}function J$(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}function jc(t,e,n=Xt,s=!1){if(n){const i=n[t]||(n[t]=[]),o=e.__weh||(e.__weh=(...r)=>{Ni();const a=Ga(n),l=Jn(e,n,t,r);return a(),Fi(),l});return s?i.unshift(o):i.push(o),o}}const ei=t=>(e,n=Xt)=>{(!Yc||t==="sp")&&jc(t,(...s)=>e(...s),n)},X$=ei("bm"),qt=ei("m"),ib=ei("bu"),ob=ei("u"),Yh=ei("bum"),Ir=ei("um"),Q$=ei("sp"),Z$=ei("rtg"),eA=ei("rtc");function tA(t,e=Xt){jc("ec",t,e)}function Oe(t,e){if(Wt===null)return t;const n=Uc(Wt),s=t.dirs||(t.dirs=[]);for(let i=0;i<e.length;i++){let[o,r,a,l=_t]=e[i];o&&(Ye(o)&&(o={mounted:o,updated:o}),o.deep&&vi(r),s.push({dir:o,instance:n,value:r,oldValue:void 0,arg:a,modifiers:l}))}return t}function to(t,e,n,s){const i=t.dirs,o=e&&e.dirs;for(let r=0;r<i.length;r++){const a=i[r];o&&(a.oldValue=o[r].value);let l=a.dir[s];l&&(Ni(),Jn(l,n,8,[t.el,a,t,e]),Fi())}}function Ue(t,e,n,s){let i;const o=n&&n[s];if(Fe(t)||St(t)){i=new Array(t.length);for(let r=0,a=t.length;r<a;r++)i[r]=e(t[r],r,void 0,o&&o[r])}else if(typeof t=="number"){i=new Array(t);for(let r=0;r<t;r++)i[r]=e(r+1,r,void 0,o&&o[r])}else if(ut(t))if(t[Symbol.iterator])i=Array.from(t,(r,a)=>e(r,a,void 0,o&&o[a]));else{const r=Object.keys(t);i=new Array(r.length);for(let a=0,l=r.length;a<l;a++){const c=r[a];i[a]=e(t[c],c,a,o&&o[a])}}else i=[];return n&&(n[s]=i),i}function dn(t,e){for(let n=0;n<e.length;n++){const s=e[n];if(Fe(s))for(let i=0;i<s.length;i++)t[s[i].name]=s[i].fn;else s&&(t[s.name]=s.key?(...i)=>{const o=s.fn(...i);return o&&(o.key=s.key),o}:s.fn)}return t}/*! #__NO_SIDE_EFFECTS__ */function Nt(t,e){return Ye(t)?Lt({name:t.name},e,{setup:t}):t}const da=t=>!!t.type.__asyncLoader;function Ie(t,e,n={},s,i){if(Wt.isCE||Wt.parent&&da(Wt.parent)&&Wt.parent.isCE)return e!=="default"&&(n.name=e),Se("slot",n,s&&s());let o=t[e];o&&o._c&&(o._d=!1),M();const r=o&&rb(o(n)),a=Le(Te,{key:n.key||r&&r.key||`_${e}`},r||(s?s():[]),r&&t._===1?64:-2);return!i&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a}function rb(t){return t.some(e=>Da(e)?!(e.type===un||e.type===Te&&!rb(e.children)):!0)?t:null}const Ed=t=>t?Tb(t)?Uc(t):Ed(t.parent):null,ha=Lt(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Ed(t.parent),$root:t=>Ed(t.root),$emit:t=>t.emit,$options:t=>Uh(t),$forceUpdate:t=>t.f||(t.f=()=>{t.effect.dirty=!0,Vh(t.update)}),$nextTick:t=>t.n||(t.n=en.bind(t.proxy)),$watch:t=>kA.bind(t)}),Ou=(t,e)=>t!==_t&&!t.__isScriptSetup&&st(t,e),nA={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:s,data:i,props:o,accessCache:r,type:a,appContext:l}=t;let c;if(e[0]!=="$"){const g=r[e];if(g!==void 0)switch(g){case 1:return s[e];case 2:return i[e];case 4:return n[e];case 3:return o[e]}else{if(Ou(s,e))return r[e]=1,s[e];if(i!==_t&&st(i,e))return r[e]=2,i[e];if((c=t.propsOptions[0])&&st(c,e))return r[e]=3,o[e];if(n!==_t&&st(n,e))return r[e]=4,n[e];Pd&&(r[e]=0)}}const u=ha[e];let d,f;if(u)return e==="$attrs"&&Pn(t.attrs,"get",""),u(t);if((d=a.__cssModules)&&(d=d[e]))return d;if(n!==_t&&st(n,e))return r[e]=4,n[e];if(f=l.config.globalProperties,st(f,e))return f[e]},set({_:t},e,n){const{data:s,setupState:i,ctx:o}=t;return Ou(i,e)?(i[e]=n,!0):s!==_t&&st(s,e)?(s[e]=n,!0):st(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(o[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:s,appContext:i,propsOptions:o}},r){let a;return!!n[r]||t!==_t&&st(t,r)||Ou(e,r)||(a=o[0])&&st(a,r)||st(s,r)||st(ha,r)||st(i.config.globalProperties,r)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:st(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function Do(){return ab().slots}function sA(){return ab().attrs}function ab(){const t=Xh();return t.setupContext||(t.setupContext=Db(t))}function sg(t){return Fe(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}let Pd=!0;function iA(t){const e=Uh(t),n=t.proxy,s=t.ctx;Pd=!1,e.beforeCreate&&ig(e.beforeCreate,t,"bc");const{data:i,computed:o,methods:r,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:g,updated:_,activated:m,deactivated:b,beforeDestroy:w,beforeUnmount:$,destroyed:A,unmounted:D,render:x,renderTracked:y,renderTriggered:S,errorCaptured:E,serverPrefetch:T,expose:C,inheritAttrs:B,components:J,directives:ae,filters:Y}=e;if(c&&oA(c,s,null),r)for(const V in r){const Q=r[V];Ye(Q)&&(s[V]=Q.bind(n))}if(i){const V=i.call(n,n);ut(V)&&(t.data=Ts(V))}if(Pd=!0,o)for(const V in o){const Q=o[V],Z=Ye(Q)?Q.bind(n,n):Ye(Q.get)?Q.get.bind(n,n):Un,le=!Ye(Q)&&Ye(Q.set)?Q.set.bind(n):Un,ye=_e({get:Z,set:le});Object.defineProperty(s,V,{enumerable:!0,configurable:!0,get:()=>ye.value,set:U=>ye.value=U})}if(a)for(const V in a)lb(a[V],s,n,V);if(l){const V=Ye(l)?l.call(n):l;Reflect.ownKeys(V).forEach(Q=>{Xl(Q,V[Q])})}u&&ig(u,t,"c");function I(V,Q){Fe(Q)?Q.forEach(Z=>V(Z.bind(n))):Q&&V(Q.bind(n))}if(I(X$,d),I(qt,f),I(ib,g),I(ob,_),I(SA,m),I($A,b),I(tA,E),I(eA,y),I(Z$,S),I(Yh,$),I(Ir,D),I(Q$,T),Fe(C))if(C.length){const V=t.exposed||(t.exposed={});C.forEach(Q=>{Object.defineProperty(V,Q,{get:()=>n[Q],set:Z=>n[Q]=Z})})}else t.exposed||(t.exposed={});x&&t.render===Un&&(t.render=x),B!=null&&(t.inheritAttrs=B),J&&(t.components=J),ae&&(t.directives=ae)}function oA(t,e,n=Un){Fe(t)&&(t=Td(t));for(const s in t){const i=t[s];let o;ut(i)?"default"in i?o=as(i.from||s,i.default,!0):o=as(i.from||s):o=as(i),Pt(o)?Object.defineProperty(e,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):e[s]=o}}function ig(t,e,n){Jn(Fe(t)?t.map(s=>s.bind(e.proxy)):t.bind(e.proxy),e,n)}function lb(t,e,n,s){const i=s.includes(".")?yb(n,s):()=>n[s];if(St(t)){const o=e[t];Ye(o)&&Bt(i,o)}else if(Ye(t))Bt(i,t.bind(n));else if(ut(t))if(Fe(t))t.forEach(o=>lb(o,e,n,s));else{const o=Ye(t.handler)?t.handler.bind(n):e[t.handler];Ye(o)&&Bt(i,o,t)}}function Uh(t){const e=t.type,{mixins:n,extends:s}=e,{mixins:i,optionsCache:o,config:{optionMergeStrategies:r}}=t.appContext,a=o.get(e);let l;return a?l=a:!i.length&&!n&&!s?l=e:(l={},i.length&&i.forEach(c=>dc(l,c,r,!0)),dc(l,e,r)),ut(e)&&o.set(e,l),l}function dc(t,e,n,s=!1){const{mixins:i,extends:o}=e;o&&dc(t,o,n,!0),i&&i.forEach(r=>dc(t,r,n,!0));for(const r in e)if(!(s&&r==="expose")){const a=rA[r]||n&&n[r];t[r]=a?a(t[r],e[r]):e[r]}return t}const rA={data:og,props:rg,emits:rg,methods:na,computed:na,beforeCreate:pn,created:pn,beforeMount:pn,mounted:pn,beforeUpdate:pn,updated:pn,beforeDestroy:pn,beforeUnmount:pn,destroyed:pn,unmounted:pn,activated:pn,deactivated:pn,errorCaptured:pn,serverPrefetch:pn,components:na,directives:na,watch:lA,provide:og,inject:aA};function og(t,e){return e?t?function(){return Lt(Ye(t)?t.call(this,this):t,Ye(e)?e.call(this,this):e)}:e:t}function aA(t,e){return na(Td(t),Td(e))}function Td(t){if(Fe(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function pn(t,e){return t?[...new Set([].concat(t,e))]:e}function na(t,e){return t?Lt(Object.create(null),t,e):e}function rg(t,e){return t?Fe(t)&&Fe(e)?[...new Set([...t,...e])]:Lt(Object.create(null),sg(t),sg(e??{})):e}function lA(t,e){if(!t)return e;if(!e)return t;const n=Lt(Object.create(null),t);for(const s in e)n[s]=pn(t[s],e[s]);return n}function cb(){return{app:null,config:{isNativeTag:GS,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let cA=0;function uA(t,e){return function(s,i=null){Ye(s)||(s=Lt({},s)),i!=null&&!ut(i)&&(i=null);const o=cb(),r=new WeakSet;let a=!1;const l=o.app={_uid:cA++,_component:s,_props:i,_container:null,_context:o,_instance:null,version:Ob,get config(){return o.config},set config(c){},use(c,...u){return r.has(c)||(c&&Ye(c.install)?(r.add(c),c.install(l,...u)):Ye(c)&&(r.add(c),c(l,...u))),l},mixin(c){return o.mixins.includes(c)||o.mixins.push(c),l},component(c,u){return u?(o.components[c]=u,l):o.components[c]},directive(c,u){return u?(o.directives[c]=u,l):o.directives[c]},mount(c,u,d){if(!a){const f=Se(s,i);return f.appContext=o,d===!0?d="svg":d===!1&&(d=void 0),u&&e?e(f,c):t(f,c,d),a=!0,l._container=c,c.__vue_app__=l,Uc(f.component)}},unmount(){a&&(t(null,l._container),delete l._container.__vue_app__)},provide(c,u){return o.provides[c]=u,l},runWithContext(c){const u=rr;rr=l;try{return c()}finally{rr=u}}};return l}}let rr=null;function Xl(t,e){if(Xt){let n=Xt.provides;const s=Xt.parent&&Xt.parent.provides;s===n&&(n=Xt.provides=Object.create(s)),n[t]=e}}function as(t,e,n=!1){const s=Xt||Wt;if(s||rr){const i=s?s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:rr._context.provides;if(i&&t in i)return i[t];if(arguments.length>1)return n&&Ye(e)?e.call(s&&s.proxy):e}}function dA(){return!!(Xt||Wt||rr)}const ub={},db=()=>Object.create(ub),hb=t=>Object.getPrototypeOf(t)===ub;function hA(t,e,n,s=!1){const i={},o=db();t.propsDefaults=Object.create(null),fb(t,e,i,o);for(const r in t.propsOptions[0])r in i||(i[r]=void 0);n?t.props=s?i:zv(i):t.type.props?t.props=i:t.props=o,t.attrs=o}function fA(t,e,n,s){const{props:i,attrs:o,vnode:{patchFlag:r}}=t,a=Ze(i),[l]=t.propsOptions;let c=!1;if((s||r>0)&&!(r&16)){if(r&8){const u=t.vnode.dynamicProps;for(let d=0;d<u.length;d++){let f=u[d];if(Vc(t.emitsOptions,f))continue;const g=e[f];if(l)if(st(o,f))g!==o[f]&&(o[f]=g,c=!0);else{const _=Es(f);i[_]=Md(l,a,_,g,t,!1)}else g!==o[f]&&(o[f]=g,c=!0)}}}else{fb(t,e,i,o)&&(c=!0);let u;for(const d in a)(!e||!st(e,d)&&((u=To(d))===d||!st(e,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(i[d]=Md(l,a,d,void 0,t,!0)):delete i[d]);if(o!==a)for(const d in o)(!e||!st(e,d))&&(delete o[d],c=!0)}c&&Gs(t.attrs,"set","")}function fb(t,e,n,s){const[i,o]=t.propsOptions;let r=!1,a;if(e)for(let l in e){if(ua(l))continue;const c=e[l];let u;i&&st(i,u=Es(l))?!o||!o.includes(u)?n[u]=c:(a||(a={}))[u]=c:Vc(t.emitsOptions,l)||(!(l in s)||c!==s[l])&&(s[l]=c,r=!0)}if(o){const l=Ze(n),c=a||_t;for(let u=0;u<o.length;u++){const d=o[u];n[d]=Md(i,l,d,c[d],t,!st(c,d))}}return r}function Md(t,e,n,s,i,o){const r=t[n];if(r!=null){const a=st(r,"default");if(a&&s===void 0){const l=r.default;if(r.type!==Function&&!r.skipFactory&&Ye(l)){const{propsDefaults:c}=i;if(n in c)s=c[n];else{const u=Ga(i);s=c[n]=l.call(null,e),u()}}else s=l}r[0]&&(o&&!a?s=!1:r[1]&&(s===""||s===To(n))&&(s=!0))}return s}function pb(t,e,n=!1){const s=e.propsCache,i=s.get(t);if(i)return i;const o=t.props,r={},a=[];let l=!1;if(!Ye(t)){const u=d=>{l=!0;const[f,g]=pb(d,e,!0);Lt(r,f),g&&a.push(...g)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!o&&!l)return ut(t)&&s.set(t,nr),nr;if(Fe(o))for(let u=0;u<o.length;u++){const d=Es(o[u]);ag(d)&&(r[d]=_t)}else if(o)for(const u in o){const d=Es(u);if(ag(d)){const f=o[u],g=r[d]=Fe(f)||Ye(f)?{type:f}:Lt({},f);if(g){const _=ug(Boolean,g.type),m=ug(String,g.type);g[0]=_>-1,g[1]=m<0||_<m,(_>-1||st(g,"default"))&&a.push(d)}}}const c=[r,a];return ut(t)&&s.set(t,c),c}function ag(t){return t[0]!=="$"&&!ua(t)}function lg(t){return t===null?"null":typeof t=="function"?t.name||"":typeof t=="object"&&t.constructor&&t.constructor.name||""}function cg(t,e){return lg(t)===lg(e)}function ug(t,e){return Fe(e)?e.findIndex(n=>cg(n,t)):Ye(e)&&cg(e,t)?0:-1}const gb=t=>t[0]==="_"||t==="$stable",Kh=t=>Fe(t)?t.map(ss):[ss(t)],pA=(t,e,n)=>{if(e._n)return e;const s=Pe((...i)=>Kh(e(...i)),n);return s._c=!1,s},mb=(t,e,n)=>{const s=t._ctx;for(const i in t){if(gb(i))continue;const o=t[i];if(Ye(o))e[i]=pA(i,o,s);else if(o!=null){const r=Kh(o);e[i]=()=>r}}},_b=(t,e)=>{const n=Kh(e);t.slots.default=()=>n},gA=(t,e)=>{const n=t.slots=db();if(t.vnode.shapeFlag&32){const s=e._;s?(Lt(n,e),Av(n,"_",s,!0)):mb(e,n)}else e&&_b(t,e)},mA=(t,e,n)=>{const{vnode:s,slots:i}=t;let o=!0,r=_t;if(s.shapeFlag&32){const a=e._;a?n&&a===1?o=!1:(Lt(i,e),!n&&a===1&&delete i._):(o=!e.$stable,mb(e,i)),r=e}else e&&(_b(t,e),r={default:1});if(o)for(const a in i)!gb(a)&&r[a]==null&&delete i[a]};function Dd(t,e,n,s,i=!1){if(Fe(t)){t.forEach((f,g)=>Dd(f,e&&(Fe(e)?e[g]:e),n,s,i));return}if(da(s)&&!i)return;const o=s.shapeFlag&4?Uc(s.component):s.el,r=i?null:o,{i:a,r:l}=t,c=e&&e.r,u=a.refs===_t?a.refs={}:a.refs,d=a.setupState;if(c!=null&&c!==l&&(St(c)?(u[c]=null,st(d,c)&&(d[c]=null)):Pt(c)&&(c.value=null)),Ye(l))Ai(l,a,12,[r,u]);else{const f=St(l),g=Pt(l);if(f||g){const _=()=>{if(t.f){const m=f?st(d,l)?d[l]:u[l]:l.value;i?Fe(m)&&Ch(m,o):Fe(m)?m.includes(o)||m.push(o):f?(u[l]=[o],st(d,l)&&(d[l]=u[l])):(l.value=[o],t.k&&(u[t.k]=l.value))}else f?(u[l]=r,st(d,l)&&(d[l]=r)):g&&(l.value=r,t.k&&(u[t.k]=r))};r?(_.id=-1,$n(_,n)):_()}}}const $n=G$;function _A(t){return vA(t)}function vA(t,e){const n=Ev();n.__VUE__=!0;const{insert:s,remove:i,patchProp:o,createElement:r,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:g=Un,insertStaticContent:_}=t,m=(v,O,H,W=null,ie=null,j=null,te=void 0,G=null,de=!!O.dynamicChildren)=>{if(v===O)return;v&&!bs(v,O)&&(W=P(v),U(v,ie,j,!0),v=null),O.patchFlag===-2&&(de=!1,O.dynamicChildren=null);const{type:ge,ref:fe,shapeFlag:Re}=O;switch(ge){case zc:b(v,O,H,W);break;case un:w(v,O,H,W);break;case Ql:v==null&&$(O,H,W,te);break;case Te:J(v,O,H,W,ie,j,te,G,de);break;default:Re&1?x(v,O,H,W,ie,j,te,G,de):Re&6?ae(v,O,H,W,ie,j,te,G,de):(Re&64||Re&128)&&ge.process(v,O,H,W,ie,j,te,G,de,xe)}fe!=null&&ie&&Dd(fe,v&&v.ref,j,O||v,!O)},b=(v,O,H,W)=>{if(v==null)s(O.el=a(O.children),H,W);else{const ie=O.el=v.el;O.children!==v.children&&c(ie,O.children)}},w=(v,O,H,W)=>{v==null?s(O.el=l(O.children||""),H,W):O.el=v.el},$=(v,O,H,W)=>{[v.el,v.anchor]=_(v.children,O,H,W,v.el,v.anchor)},A=({el:v,anchor:O},H,W)=>{let ie;for(;v&&v!==O;)ie=f(v),s(v,H,W),v=ie;s(O,H,W)},D=({el:v,anchor:O})=>{let H;for(;v&&v!==O;)H=f(v),i(v),v=H;i(O)},x=(v,O,H,W,ie,j,te,G,de)=>{O.type==="svg"?te="svg":O.type==="math"&&(te="mathml"),v==null?y(O,H,W,ie,j,te,G,de):T(v,O,ie,j,te,G,de)},y=(v,O,H,W,ie,j,te,G)=>{let de,ge;const{props:fe,shapeFlag:Re,transition:De,dirs:Ve}=v;if(de=v.el=r(v.type,j,fe&&fe.is,fe),Re&8?u(de,v.children):Re&16&&E(v.children,de,null,W,ie,Iu(v,j),te,G),Ve&&to(v,null,W,"created"),S(de,v,v.scopeId,te,W),fe){for(const et in fe)et!=="value"&&!ua(et)&&o(de,et,null,fe[et],j,v.children,W,ie,oe);"value"in fe&&o(de,"value",null,fe.value,j),(ge=fe.onVnodeBeforeMount)&&gs(ge,W,v)}Ve&&to(v,null,W,"beforeMount");const Be=bA(ie,De);Be&&De.beforeEnter(de),s(de,O,H),((ge=fe&&fe.onVnodeMounted)||Be||Ve)&&$n(()=>{ge&&gs(ge,W,v),Be&&De.enter(de),Ve&&to(v,null,W,"mounted")},ie)},S=(v,O,H,W,ie)=>{if(H&&g(v,H),W)for(let j=0;j<W.length;j++)g(v,W[j]);if(ie){let j=ie.subTree;if(O===j){const te=ie.vnode;S(v,te,te.scopeId,te.slotScopeIds,ie.parent)}}},E=(v,O,H,W,ie,j,te,G,de=0)=>{for(let ge=de;ge<v.length;ge++){const fe=v[ge]=G?mi(v[ge]):ss(v[ge]);m(null,fe,O,H,W,ie,j,te,G)}},T=(v,O,H,W,ie,j,te)=>{const G=O.el=v.el;let{patchFlag:de,dynamicChildren:ge,dirs:fe}=O;de|=v.patchFlag&16;const Re=v.props||_t,De=O.props||_t;let Ve;if(H&&no(H,!1),(Ve=De.onVnodeBeforeUpdate)&&gs(Ve,H,O,v),fe&&to(O,v,H,"beforeUpdate"),H&&no(H,!0),ge?C(v.dynamicChildren,ge,G,H,W,Iu(O,ie),j):te||Q(v,O,G,null,H,W,Iu(O,ie),j,!1),de>0){if(de&16)B(G,O,Re,De,H,W,ie);else if(de&2&&Re.class!==De.class&&o(G,"class",null,De.class,ie),de&4&&o(G,"style",Re.style,De.style,ie),de&8){const Be=O.dynamicProps;for(let et=0;et<Be.length;et++){const Ge=Be[et],pt=Re[Ge],on=De[Ge];(on!==pt||Ge==="value")&&o(G,Ge,pt,on,ie,v.children,H,W,oe)}}de&1&&v.children!==O.children&&u(G,O.children)}else!te&&ge==null&&B(G,O,Re,De,H,W,ie);((Ve=De.onVnodeUpdated)||fe)&&$n(()=>{Ve&&gs(Ve,H,O,v),fe&&to(O,v,H,"updated")},W)},C=(v,O,H,W,ie,j,te)=>{for(let G=0;G<O.length;G++){const de=v[G],ge=O[G],fe=de.el&&(de.type===Te||!bs(de,ge)||de.shapeFlag&70)?d(de.el):H;m(de,ge,fe,null,W,ie,j,te,!0)}},B=(v,O,H,W,ie,j,te)=>{if(H!==W){if(H!==_t)for(const G in H)!ua(G)&&!(G in W)&&o(v,G,H[G],null,te,O.children,ie,j,oe);for(const G in W){if(ua(G))continue;const de=W[G],ge=H[G];de!==ge&&G!=="value"&&o(v,G,ge,de,te,O.children,ie,j,oe)}"value"in W&&o(v,"value",H.value,W.value,te)}},J=(v,O,H,W,ie,j,te,G,de)=>{const ge=O.el=v?v.el:a(""),fe=O.anchor=v?v.anchor:a("");let{patchFlag:Re,dynamicChildren:De,slotScopeIds:Ve}=O;Ve&&(G=G?G.concat(Ve):Ve),v==null?(s(ge,H,W),s(fe,H,W),E(O.children||[],H,fe,ie,j,te,G,de)):Re>0&&Re&64&&De&&v.dynamicChildren?(C(v.dynamicChildren,De,H,ie,j,te,G),(O.key!=null||ie&&O===ie.subTree)&&qh(v,O,!0)):Q(v,O,H,fe,ie,j,te,G,de)},ae=(v,O,H,W,ie,j,te,G,de)=>{O.slotScopeIds=G,v==null?O.shapeFlag&512?ie.ctx.activate(O,H,W,te,de):Y(O,H,W,ie,j,te,de):L(v,O,de)},Y=(v,O,H,W,ie,j,te)=>{const G=v.component=NA(v,W,ie);if(Wc(v)&&(G.ctx.renderer=xe),FA(G),G.asyncDep){if(ie&&ie.registerDep(G,I,te),!v.el){const de=G.subTree=Se(un);w(null,de,O,H)}}else I(G,v,O,H,ie,j,te)},L=(v,O,H)=>{const W=O.component=v.component;if(j$(v,O,H))if(W.asyncDep&&!W.asyncResolved){V(W,O,H);return}else W.next=O,L$(W.update),W.effect.dirty=!0,W.update();else O.el=v.el,W.vnode=O},I=(v,O,H,W,ie,j,te)=>{const G=()=>{if(v.isMounted){let{next:fe,bu:Re,u:De,parent:Ve,vnode:Be}=v;{const Hn=vb(v);if(Hn){fe&&(fe.el=Be.el,V(v,fe,te)),Hn.asyncDep.then(()=>{v.isUnmounted||G()});return}}let et=fe,Ge;no(v,!1),fe?(fe.el=Be.el,V(v,fe,te)):fe=Be,Re&&Gl(Re),(Ge=fe.props&&fe.props.onVnodeBeforeUpdate)&&gs(Ge,Ve,fe,Be),no(v,!0);const pt=Du(v),on=v.subTree;v.subTree=pt,m(on,pt,d(on.el),P(on),v,ie,j),fe.el=pt.el,et===null&&Hh(v,pt.el),De&&$n(De,ie),(Ge=fe.props&&fe.props.onVnodeUpdated)&&$n(()=>gs(Ge,Ve,fe,Be),ie)}else{let fe;const{el:Re,props:De}=O,{bm:Ve,m:Be,parent:et}=v,Ge=da(O);if(no(v,!1),Ve&&Gl(Ve),!Ge&&(fe=De&&De.onVnodeBeforeMount)&&gs(fe,et,O),no(v,!0),Re&&he){const pt=()=>{v.subTree=Du(v),he(Re,v.subTree,v,ie,null)};Ge?O.type.__asyncLoader().then(()=>!v.isUnmounted&&pt()):pt()}else{const pt=v.subTree=Du(v);m(null,pt,H,W,v,ie,j),O.el=pt.el}if(Be&&$n(Be,ie),!Ge&&(fe=De&&De.onVnodeMounted)){const pt=O;$n(()=>gs(fe,et,pt),ie)}(O.shapeFlag&256||et&&da(et.vnode)&&et.vnode.shapeFlag&256)&&v.a&&$n(v.a,ie),v.isMounted=!0,O=H=W=null}},de=v.effect=new Mh(G,Un,()=>Vh(ge),v.scope),ge=v.update=()=>{de.dirty&&de.run()};ge.id=v.uid,no(v,!0),ge()},V=(v,O,H)=>{O.component=v;const W=v.vnode.props;v.vnode=O,v.next=null,fA(v,O.props,W,H),mA(v,O.children,H),Ni(),Zp(v),Fi()},Q=(v,O,H,W,ie,j,te,G,de=!1)=>{const ge=v&&v.children,fe=v?v.shapeFlag:0,Re=O.children,{patchFlag:De,shapeFlag:Ve}=O;if(De>0){if(De&128){le(ge,Re,H,W,ie,j,te,G,de);return}else if(De&256){Z(ge,Re,H,W,ie,j,te,G,de);return}}Ve&8?(fe&16&&oe(ge,ie,j),Re!==ge&&u(H,Re)):fe&16?Ve&16?le(ge,Re,H,W,ie,j,te,G,de):oe(ge,ie,j,!0):(fe&8&&u(H,""),Ve&16&&E(Re,H,W,ie,j,te,G,de))},Z=(v,O,H,W,ie,j,te,G,de)=>{v=v||nr,O=O||nr;const ge=v.length,fe=O.length,Re=Math.min(ge,fe);let De;for(De=0;De<Re;De++){const Ve=O[De]=de?mi(O[De]):ss(O[De]);m(v[De],Ve,H,null,ie,j,te,G,de)}ge>fe?oe(v,ie,j,!0,!1,Re):E(O,H,W,ie,j,te,G,de,Re)},le=(v,O,H,W,ie,j,te,G,de)=>{let ge=0;const fe=O.length;let Re=v.length-1,De=fe-1;for(;ge<=Re&&ge<=De;){const Ve=v[ge],Be=O[ge]=de?mi(O[ge]):ss(O[ge]);if(bs(Ve,Be))m(Ve,Be,H,null,ie,j,te,G,de);else break;ge++}for(;ge<=Re&&ge<=De;){const Ve=v[Re],Be=O[De]=de?mi(O[De]):ss(O[De]);if(bs(Ve,Be))m(Ve,Be,H,null,ie,j,te,G,de);else break;Re--,De--}if(ge>Re){if(ge<=De){const Ve=De+1,Be=Ve<fe?O[Ve].el:W;for(;ge<=De;)m(null,O[ge]=de?mi(O[ge]):ss(O[ge]),H,Be,ie,j,te,G,de),ge++}}else if(ge>De)for(;ge<=Re;)U(v[ge],ie,j,!0),ge++;else{const Ve=ge,Be=ge,et=new Map;for(ge=Be;ge<=De;ge++){const Vt=O[ge]=de?mi(O[ge]):ss(O[ge]);Vt.key!=null&&et.set(Vt.key,ge)}let Ge,pt=0;const on=De-Be+1;let Hn=!1,ii=0;const Qn=new Array(on);for(ge=0;ge<on;ge++)Qn[ge]=0;for(ge=Ve;ge<=Re;ge++){const Vt=v[ge];if(pt>=on){U(Vt,ie,j,!0);continue}let ne;if(Vt.key!=null)ne=et.get(Vt.key);else for(Ge=Be;Ge<=De;Ge++)if(Qn[Ge-Be]===0&&bs(Vt,O[Ge])){ne=Ge;break}ne===void 0?U(Vt,ie,j,!0):(Qn[ne-Be]=ge+1,ne>=ii?ii=ne:Hn=!0,m(Vt,O[ne],H,null,ie,j,te,G,de),pt++)}const Ds=Hn?yA(Qn):nr;for(Ge=Ds.length-1,ge=on-1;ge>=0;ge--){const Vt=Be+ge,ne=O[Vt],ke=Vt+1<fe?O[Vt+1].el:W;Qn[ge]===0?m(null,ne,H,ke,ie,j,te,G,de):Hn&&(Ge<0||ge!==Ds[Ge]?ye(ne,H,ke,2):Ge--)}}},ye=(v,O,H,W,ie=null)=>{const{el:j,type:te,transition:G,children:de,shapeFlag:ge}=v;if(ge&6){ye(v.component.subTree,O,H,W);return}if(ge&128){v.suspense.move(O,H,W);return}if(ge&64){te.move(v,O,H,xe);return}if(te===Te){s(j,O,H);for(let Re=0;Re<de.length;Re++)ye(de[Re],O,H,W);s(v.anchor,O,H);return}if(te===Ql){A(v,O,H);return}if(W!==2&&ge&1&&G)if(W===0)G.beforeEnter(j),s(j,O,H),$n(()=>G.enter(j),ie);else{const{leave:Re,delayLeave:De,afterLeave:Ve}=G,Be=()=>s(j,O,H),et=()=>{Re(j,()=>{Be(),Ve&&Ve()})};De?De(j,Be,et):et()}else s(j,O,H)},U=(v,O,H,W=!1,ie=!1)=>{const{type:j,props:te,ref:G,children:de,dynamicChildren:ge,shapeFlag:fe,patchFlag:Re,dirs:De,memoIndex:Ve}=v;if(G!=null&&Dd(G,null,H,v,!0),Ve!=null&&(O.renderCache[Ve]=void 0),fe&256){O.ctx.deactivate(v);return}const Be=fe&1&&De,et=!da(v);let Ge;if(et&&(Ge=te&&te.onVnodeBeforeUnmount)&&gs(Ge,O,v),fe&6)ee(v.component,H,W);else{if(fe&128){v.suspense.unmount(H,W);return}Be&&to(v,null,O,"beforeUnmount"),fe&64?v.type.remove(v,O,H,ie,xe,W):ge&&(j!==Te||Re>0&&Re&64)?oe(ge,O,H,!1,!0):(j===Te&&Re&384||!ie&&fe&16)&&oe(de,O,H),W&&X(v)}(et&&(Ge=te&&te.onVnodeUnmounted)||Be)&&$n(()=>{Ge&&gs(Ge,O,v),Be&&to(v,null,O,"unmounted")},H)},X=v=>{const{type:O,el:H,anchor:W,transition:ie}=v;if(O===Te){R(H,W);return}if(O===Ql){D(v);return}const j=()=>{i(H),ie&&!ie.persisted&&ie.afterLeave&&ie.afterLeave()};if(v.shapeFlag&1&&ie&&!ie.persisted){const{leave:te,delayLeave:G}=ie,de=()=>te(H,j);G?G(v.el,j,de):de()}else j()},R=(v,O)=>{let H;for(;v!==O;)H=f(v),i(v),v=H;i(O)},ee=(v,O,H)=>{const{bum:W,scope:ie,update:j,subTree:te,um:G,m:de,a:ge}=v;dg(de),dg(ge),W&&Gl(W),ie.stop(),j&&(j.active=!1,U(te,v,O,H)),G&&$n(G,O),$n(()=>{v.isUnmounted=!0},O),O&&O.pendingBranch&&!O.isUnmounted&&v.asyncDep&&!v.asyncResolved&&v.suspenseId===O.pendingId&&(O.deps--,O.deps===0&&O.resolve())},oe=(v,O,H,W=!1,ie=!1,j=0)=>{for(let te=j;te<v.length;te++)U(v[te],O,H,W,ie)},P=v=>v.shapeFlag&6?P(v.component.subTree):v.shapeFlag&128?v.suspense.next():f(v.anchor||v.el);let se=!1;const ue=(v,O,H)=>{v==null?O._vnode&&U(O._vnode,null,null,!0):m(O._vnode||null,v,O,null,null,null,H),se||(se=!0,Zp(),Zv(),se=!1),O._vnode=v},xe={p:m,um:U,m:ye,r:X,mt:Y,mc:E,pc:Q,pbc:C,n:P,o:t};let N,he;return e&&([N,he]=e(xe)),{render:ue,hydrate:N,createApp:uA(ue,N)}}function Iu({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function no({effect:t,update:e},n){t.allowRecurse=e.allowRecurse=n}function bA(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function qh(t,e,n=!1){const s=t.children,i=e.children;if(Fe(s)&&Fe(i))for(let o=0;o<s.length;o++){const r=s[o];let a=i[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[o]=mi(i[o]),a.el=r.el),!n&&a.patchFlag!==-2&&qh(r,a)),a.type===zc&&(a.el=r.el)}}function yA(t){const e=t.slice(),n=[0];let s,i,o,r,a;const l=t.length;for(s=0;s<l;s++){const c=t[s];if(c!==0){if(i=n[n.length-1],t[i]<c){e[s]=i,n.push(s);continue}for(o=0,r=n.length-1;o<r;)a=o+r>>1,t[n[a]]<c?o=a+1:r=a;c<t[n[o]]&&(o>0&&(e[s]=n[o-1]),n[o]=s)}}for(o=n.length,r=n[o-1];o-- >0;)n[o]=r,r=e[r];return n}function vb(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:vb(e)}function dg(t){if(t)for(let e=0;e<t.length;e++)t[e].active=!1}const wA=Symbol.for("v-scx"),xA=()=>as(wA),$l={};function Bt(t,e,n){return bb(t,e,n)}function bb(t,e,{immediate:n,deep:s,flush:i,once:o,onTrack:r,onTrigger:a}=_t){if(e&&o){const y=e;e=(...S)=>{y(...S),x()}}const l=Xt,c=y=>s===!0?y:vi(y,s===!1?1:void 0);let u,d=!1,f=!1;if(Pt(t)?(u=()=>t.value,d=cc(t)):bo(t)?(u=()=>c(t),d=!0):Fe(t)?(f=!0,d=t.some(y=>bo(y)||cc(y)),u=()=>t.map(y=>{if(Pt(y))return y.value;if(bo(y))return c(y);if(Ye(y))return Ai(y,l,2)})):Ye(t)?e?u=()=>Ai(t,l,2):u=()=>(g&&g(),Jn(t,l,3,[_])):u=Un,e&&s){const y=u;u=()=>vi(y())}let g,_=y=>{g=A.onStop=()=>{Ai(y,l,4),g=A.onStop=void 0}},m;if(Yc)if(_=Un,e?n&&Jn(e,l,3,[u(),f?[]:void 0,_]):u(),i==="sync"){const y=xA();m=y.__watcherHandles||(y.__watcherHandles=[])}else return Un;let b=f?new Array(t.length).fill($l):$l;const w=()=>{if(!(!A.active||!A.dirty))if(e){const y=A.run();(s||d||(f?y.some((S,E)=>Ti(S,b[E])):Ti(y,b)))&&(g&&g(),Jn(e,l,3,[y,b===$l?void 0:f&&b[0]===$l?[]:b,_]),b=y)}else A.run()};w.allowRecurse=!!e;let $;i==="sync"?$=w:i==="post"?$=()=>$n(w,l&&l.suspense):(w.pre=!0,l&&(w.id=l.uid),$=()=>Vh(w));const A=new Mh(u,Un,$),D=Lc(),x=()=>{A.stop(),D&&Ch(D.effects,A)};return e?n?w():b=A.run():i==="post"?$n(A.run.bind(A),l&&l.suspense):A.run(),m&&m.push(x),x}function kA(t,e,n){const s=this.proxy,i=St(t)?t.includes(".")?yb(s,t):()=>s[t]:t.bind(s,s);let o;Ye(e)?o=e:(o=e.handler,n=e);const r=Ga(this),a=bb(i,o.bind(s),n);return r(),a}function yb(t,e){const n=e.split(".");return()=>{let s=t;for(let i=0;i<n.length&&s;i++)s=s[n[i]];return s}}function vi(t,e=1/0,n){if(e<=0||!ut(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,Pt(t))vi(t.value,e,n);else if(Fe(t))for(let s=0;s<t.length;s++)vi(t[s],e,n);else if(Or(t)||sr(t))t.forEach(s=>{vi(s,e,n)});else if($v(t)){for(const s in t)vi(t[s],e,n);for(const s of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,s)&&vi(t[s],e,n)}return t}const Wc=t=>t.type.__isKeepAlive;function SA(t,e){wb(t,"a",e)}function $A(t,e){wb(t,"da",e)}function wb(t,e,n=Xt){const s=t.__wdc||(t.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(jc(e,s,n),n){let i=n.parent;for(;i&&i.parent;)Wc(i.parent.vnode)&&AA(s,e,n,i),i=i.parent}}function AA(t,e,n,s){const i=jc(e,t,s,!0);Ir(()=>{Ch(s[e],i)},n)}const gi=Symbol("_leaveCb"),Al=Symbol("_enterCb");function xb(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return qt(()=>{t.isMounted=!0}),Yh(()=>{t.isUnmounting=!0}),t}const zn=[Function,Array],kb={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:zn,onEnter:zn,onAfterEnter:zn,onEnterCancelled:zn,onBeforeLeave:zn,onLeave:zn,onAfterLeave:zn,onLeaveCancelled:zn,onBeforeAppear:zn,onAppear:zn,onAfterAppear:zn,onAppearCancelled:zn},Sb=t=>{const e=t.subTree;return e.component?Sb(e.component):e},CA={name:"BaseTransition",props:kb,setup(t,{slots:e}){const n=Xh(),s=xb();return()=>{const i=e.default&&Gh(e.default(),!0);if(!i||!i.length)return;let o=i[0];if(i.length>1){for(const f of i)if(f.type!==un){o=f;break}}const r=Ze(t),{mode:a}=r;if(s.isLeaving)return Ru(o);const l=hg(o);if(!l)return Ru(o);let c=Ma(l,r,s,n,f=>c=f);fr(l,c);const u=n.subTree,d=u&&hg(u);if(d&&d.type!==un&&!bs(l,d)&&Sb(n).type!==un){const f=Ma(d,r,s,n);if(fr(d,f),a==="out-in"&&l.type!==un)return s.isLeaving=!0,f.afterLeave=()=>{s.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Ru(o);a==="in-out"&&l.type!==un&&(f.delayLeave=(g,_,m)=>{const b=$b(s,d);b[String(d.key)]=d,g[gi]=()=>{_(),g[gi]=void 0,delete c.delayedLeave},c.delayedLeave=m})}return o}}},EA=CA;function $b(t,e){const{leavingVNodes:n}=t;let s=n.get(e.type);return s||(s=Object.create(null),n.set(e.type,s)),s}function Ma(t,e,n,s,i){const{appear:o,mode:r,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:g,onAfterLeave:_,onLeaveCancelled:m,onBeforeAppear:b,onAppear:w,onAfterAppear:$,onAppearCancelled:A}=e,D=String(t.key),x=$b(n,t),y=(T,C)=>{T&&Jn(T,s,9,C)},S=(T,C)=>{const B=C[1];y(T,C),Fe(T)?T.every(J=>J.length<=1)&&B():T.length<=1&&B()},E={mode:r,persisted:a,beforeEnter(T){let C=l;if(!n.isMounted)if(o)C=b||l;else return;T[gi]&&T[gi](!0);const B=x[D];B&&bs(t,B)&&B.el[gi]&&B.el[gi](),y(C,[T])},enter(T){let C=c,B=u,J=d;if(!n.isMounted)if(o)C=w||c,B=$||u,J=A||d;else return;let ae=!1;const Y=T[Al]=L=>{ae||(ae=!0,L?y(J,[T]):y(B,[T]),E.delayedLeave&&E.delayedLeave(),T[Al]=void 0)};C?S(C,[T,Y]):Y()},leave(T,C){const B=String(t.key);if(T[Al]&&T[Al](!0),n.isUnmounting)return C();y(f,[T]);let J=!1;const ae=T[gi]=Y=>{J||(J=!0,C(),Y?y(m,[T]):y(_,[T]),T[gi]=void 0,x[B]===t&&delete x[B])};x[B]=t,g?S(g,[T,ae]):ae()},clone(T){const C=Ma(T,e,n,s,i);return i&&i(C),C}};return E}function Ru(t){if(Wc(t))return t=Mi(t),t.children=null,t}function hg(t){if(!Wc(t))return t;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&Ye(n.default))return n.default()}}function fr(t,e){t.shapeFlag&6&&t.component?fr(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function Gh(t,e=!1,n){let s=[],i=0;for(let o=0;o<t.length;o++){let r=t[o];const a=n==null?r.key:String(n)+String(r.key!=null?r.key:o);r.type===Te?(r.patchFlag&128&&i++,s=s.concat(Gh(r.children,e,a))):(e||r.type!==un)&&s.push(a!=null?Mi(r,{key:a}):r)}if(i>1)for(let o=0;o<s.length;o++)s[o].patchFlag=-2;return s}const PA=t=>t.__isTeleport,fa=t=>t&&(t.disabled||t.disabled===""),fg=t=>typeof SVGElement<"u"&&t instanceof SVGElement,pg=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,Od=(t,e)=>{const n=t&&t.to;return St(n)?e?e(n):null:n},TA={name:"Teleport",__isTeleport:!0,process(t,e,n,s,i,o,r,a,l,c){const{mc:u,pc:d,pbc:f,o:{insert:g,querySelector:_,createText:m,createComment:b}}=c,w=fa(e.props);let{shapeFlag:$,children:A,dynamicChildren:D}=e;if(t==null){const x=e.el=m(""),y=e.anchor=m("");g(x,n,s),g(y,n,s);const S=e.target=Od(e.props,_),E=e.targetAnchor=m("");S&&(g(E,S),r==="svg"||fg(S)?r="svg":(r==="mathml"||pg(S))&&(r="mathml"));const T=(C,B)=>{$&16&&u(A,C,B,i,o,r,a,l)};w?T(n,y):S&&T(S,E)}else{e.el=t.el;const x=e.anchor=t.anchor,y=e.target=t.target,S=e.targetAnchor=t.targetAnchor,E=fa(t.props),T=E?n:y,C=E?x:S;if(r==="svg"||fg(y)?r="svg":(r==="mathml"||pg(y))&&(r="mathml"),D?(f(t.dynamicChildren,D,T,i,o,r,a),qh(t,e,!0)):l||d(t,e,T,C,i,o,r,a,!1),w)E?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):Cl(e,n,x,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const B=e.target=Od(e.props,_);B&&Cl(e,B,null,c,0)}else E&&Cl(e,y,S,c,1)}Ab(e)},remove(t,e,n,s,{um:i,o:{remove:o}},r){const{shapeFlag:a,children:l,anchor:c,targetAnchor:u,target:d,props:f}=t;if(d&&o(u),r&&o(c),a&16){const g=r||!fa(f);for(let _=0;_<l.length;_++){const m=l[_];i(m,e,n,g,!!m.dynamicChildren)}}},move:Cl,hydrate:MA};function Cl(t,e,n,{o:{insert:s},m:i},o=2){o===0&&s(t.targetAnchor,e,n);const{el:r,anchor:a,shapeFlag:l,children:c,props:u}=t,d=o===2;if(d&&s(r,e,n),(!d||fa(u))&&l&16)for(let f=0;f<c.length;f++)i(c[f],e,n,2);d&&s(a,e,n)}function MA(t,e,n,s,i,o,{o:{nextSibling:r,parentNode:a,querySelector:l}},c){const u=e.target=Od(e.props,l);if(u){const d=u._lpa||u.firstChild;if(e.shapeFlag&16)if(fa(e.props))e.anchor=c(r(t),e,a(t),n,s,i,o),e.targetAnchor=d;else{e.anchor=r(t);let f=d;for(;f;)if(f=r(f),f&&f.nodeType===8&&f.data==="teleport anchor"){e.targetAnchor=f,u._lpa=e.targetAnchor&&r(e.targetAnchor);break}c(d,e,u,n,s,i,o)}Ab(e)}return e.anchor&&r(e.anchor)}const DA=TA;function Ab(t){const e=t.ctx;if(e&&e.ut){let n=t.children[0].el;for(;n&&n!==t.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",e.uid),n=n.nextSibling;e.ut()}}const Te=Symbol.for("v-fgt"),zc=Symbol.for("v-txt"),un=Symbol.for("v-cmt"),Ql=Symbol.for("v-stc"),pa=[];let Kn=null;function M(t=!1){pa.push(Kn=t?null:[])}function Cb(){pa.pop(),Kn=pa[pa.length-1]||null}let pr=1;function gg(t){pr+=t}function Eb(t){return t.dynamicChildren=pr>0?Kn||nr:null,Cb(),pr>0&&Kn&&Kn.push(t),t}function F(t,e,n,s,i,o){return Eb(h(t,e,n,s,i,o,!0))}function Le(t,e,n,s,i){return Eb(Se(t,e,n,s,i,!0))}function Da(t){return t?t.__v_isVNode===!0:!1}function bs(t,e){return t.type===e.type&&t.key===e.key}const Pb=({key:t})=>t??null,Zl=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?St(t)||Pt(t)||Ye(t)?{i:Wt,r:t,k:e,f:!!n}:t:null);function h(t,e=null,n=null,s=0,i=null,o=t===Te?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Pb(e),ref:e&&Zl(e),scopeId:Hc,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Wt};return a?(Jh(l,n),o&128&&t.normalize(l)):n&&(l.shapeFlag|=St(n)?8:16),pr>0&&!r&&Kn&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Kn.push(l),l}const Se=OA;function OA(t,e=null,n=null,s=0,i=null,o=!1){if((!t||t===nb)&&(t=un),Da(t)){const a=Mi(t,e,!0);return n&&Jh(a,n),pr>0&&!o&&Kn&&(a.shapeFlag&6?Kn[Kn.indexOf(t)]=a:Kn.push(a)),a.patchFlag=-2,a}if(jA(t)&&(t=t.__vccOpts),e){e=mn(e);let{class:a,style:l}=e;a&&!St(a)&&(e.class=Ce(a)),ut(l)&&(Fc(l)&&!Fe(l)&&(l=Lt({},l)),e.style=jt(l))}const r=St(t)?1:W$(t)?128:PA(t)?64:ut(t)?4:Ye(t)?2:0;return h(t,e,n,s,i,r,o,!0)}function mn(t){return t?Fc(t)||hb(t)?Lt({},t):t:null}function Mi(t,e,n=!1,s=!1){const{props:i,ref:o,patchFlag:r,children:a,transition:l}=t,c=e?zt(i||{},e):i,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&Pb(c),ref:e&&e.ref?n&&o?Fe(o)?o.concat(Zl(e)):[o,Zl(e)]:Zl(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Te?r===-1?16:r|16:r,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Mi(t.ssContent),ssFallback:t.ssFallback&&Mi(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&s&&fr(u,l.clone(u)),u}function be(t=" ",e=0){return Se(zc,null,t,e)}function IA(t,e){const n=Se(Ql,null,t);return n.staticCount=e,n}function re(t="",e=!1){return e?(M(),Le(un,null,t)):Se(un,null,t)}function ss(t){return t==null||typeof t=="boolean"?Se(un):Fe(t)?Se(Te,null,t.slice()):typeof t=="object"?mi(t):Se(zc,null,String(t))}function mi(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Mi(t)}function Jh(t,e){let n=0;const{shapeFlag:s}=t;if(e==null)e=null;else if(Fe(e))n=16;else if(typeof e=="object")if(s&65){const i=e.default;i&&(i._c&&(i._d=!1),Jh(t,i()),i._c&&(i._d=!0));return}else{n=32;const i=e._;!i&&!hb(e)?e._ctx=Wt:i===3&&Wt&&(Wt.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Ye(e)?(e={default:e,_ctx:Wt},n=32):(e=String(e),s&64?(n=16,e=[be(e)]):n=8);t.children=e,t.shapeFlag|=n}function zt(...t){const e={};for(let n=0;n<t.length;n++){const s=t[n];for(const i in s)if(i==="class")e.class!==s.class&&(e.class=Ce([e.class,s.class]));else if(i==="style")e.style=jt([e.style,s.style]);else if(Oc(i)){const o=e[i],r=s[i];r&&o!==r&&!(Fe(o)&&o.includes(r))&&(e[i]=o?[].concat(o,r):r)}else i!==""&&(e[i]=s[i])}return e}function gs(t,e,n,s=null){Jn(t,e,7,[n,s])}const RA=cb();let LA=0;function NA(t,e,n){const s=t.type,i=(e?e.appContext:t.appContext)||RA,o={uid:LA++,vnode:t,type:s,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new Mv(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:pb(s,i),emitsOptions:tb(s,i),emit:null,emitted:null,propsDefaults:_t,inheritAttrs:s.inheritAttrs,ctx:_t,data:_t,props:_t,attrs:_t,slots:_t,refs:_t,setupState:_t,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=e?e.root:o,o.emit=F$.bind(null,o),t.ce&&t.ce(o),o}let Xt=null;const Xh=()=>Xt||Wt;let hc,Id;{const t=Ev(),e=(n,s)=>{let i;return(i=t[n])||(i=t[n]=[]),i.push(s),o=>{i.length>1?i.forEach(r=>r(o)):i[0](o)}};hc=e("__VUE_INSTANCE_SETTERS__",n=>Xt=n),Id=e("__VUE_SSR_SETTERS__",n=>Yc=n)}const Ga=t=>{const e=Xt;return hc(t),t.scope.on(),()=>{t.scope.off(),hc(e)}},mg=()=>{Xt&&Xt.scope.off(),hc(null)};function Tb(t){return t.vnode.shapeFlag&4}let Yc=!1;function FA(t,e=!1){e&&Id(e);const{props:n,children:s}=t.vnode,i=Tb(t);hA(t,n,i,e),gA(t,s);const o=i?BA(t,e):void 0;return e&&Id(!1),o}function BA(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,nA);const{setup:s}=n;if(s){const i=t.setupContext=s.length>1?Db(t):null,o=Ga(t);Ni();const r=Ai(s,t,0,[t.props,i]);if(Fi(),o(),kv(r)){if(r.then(mg,mg),e)return r.then(a=>{Rd(t,a,e)}).catch(a=>{qa(a,t,0)});t.asyncDep=r}else Rd(t,r,e)}else Mb(t,e)}function Rd(t,e,n){Ye(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:ut(e)&&(t.setupState=Gv(e)),Mb(t,n)}let _g;function Mb(t,e,n){const s=t.type;if(!t.render){if(!e&&_g&&!s.render){const i=s.template||Uh(t).template;if(i){const{isCustomElement:o,compilerOptions:r}=t.appContext.config,{delimiters:a,compilerOptions:l}=s,c=Lt(Lt({isCustomElement:o,delimiters:a},r),l);s.render=_g(i,c)}}t.render=s.render||Un}{const i=Ga(t);Ni();try{iA(t)}finally{Fi(),i()}}}const VA={get(t,e){return Pn(t,"get",""),t[e]}};function Db(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,VA),slots:t.slots,emit:t.emit,expose:e}}function Uc(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(Gv(Bc(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in ha)return ha[n](t)},has(e,n){return n in e||n in ha}})):t.proxy}function HA(t,e=!0){return Ye(t)?t.displayName||t.name:t.name||e&&t.__name}function jA(t){return Ye(t)&&"__vccOpts"in t}const _e=(t,e)=>E$(t,e,Yc);function Co(t,e,n){const s=arguments.length;return s===2?ut(e)&&!Fe(e)?Da(e)?Se(t,null,[e]):Se(t,e):Se(t,null,e):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Da(n)&&(n=[n]),Se(t,e,n))}const Ob="3.4.29";/**
|
|
* @vue/runtime-dom v3.4.29
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/const WA="http://www.w3.org/2000/svg",zA="http://www.w3.org/1998/Math/MathML",Hs=typeof document<"u"?document:null,vg=Hs&&Hs.createElement("template"),YA={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,s)=>{const i=e==="svg"?Hs.createElementNS(WA,t):e==="mathml"?Hs.createElementNS(zA,t):n?Hs.createElement(t,{is:n}):Hs.createElement(t);return t==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:t=>Hs.createTextNode(t),createComment:t=>Hs.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Hs.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,s,i,o){const r=n?n.previousSibling:e.lastChild;if(i&&(i===o||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{vg.innerHTML=s==="svg"?`<svg>${t}</svg>`:s==="mathml"?`<math>${t}</math>`:t;const a=vg.content;if(s==="svg"||s==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[r?r.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},li="transition",Yr="animation",gr=Symbol("_vtc"),At=(t,{slots:e})=>Co(EA,Rb(t),e);At.displayName="Transition";const Ib={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},UA=At.props=Lt({},kb,Ib),so=(t,e=[])=>{Fe(t)?t.forEach(n=>n(...e)):t&&t(...e)},bg=t=>t?Fe(t)?t.some(e=>e.length>1):t.length>1:!1;function Rb(t){const e={};for(const J in t)J in Ib||(e[J]=t[J]);if(t.css===!1)return e;const{name:n="v",type:s,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:c=r,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=t,_=KA(i),m=_&&_[0],b=_&&_[1],{onBeforeEnter:w,onEnter:$,onEnterCancelled:A,onLeave:D,onLeaveCancelled:x,onBeforeAppear:y=w,onAppear:S=$,onAppearCancelled:E=A}=e,T=(J,ae,Y)=>{hi(J,ae?u:a),hi(J,ae?c:r),Y&&Y()},C=(J,ae)=>{J._isLeaving=!1,hi(J,d),hi(J,g),hi(J,f),ae&&ae()},B=J=>(ae,Y)=>{const L=J?S:$,I=()=>T(ae,J,Y);so(L,[ae,I]),yg(()=>{hi(ae,J?l:o),Fs(ae,J?u:a),bg(L)||wg(ae,s,m,I)})};return Lt(e,{onBeforeEnter(J){so(w,[J]),Fs(J,o),Fs(J,r)},onBeforeAppear(J){so(y,[J]),Fs(J,l),Fs(J,c)},onEnter:B(!1),onAppear:B(!0),onLeave(J,ae){J._isLeaving=!0;const Y=()=>C(J,ae);Fs(J,d),Fs(J,f),Nb(),yg(()=>{J._isLeaving&&(hi(J,d),Fs(J,g),bg(D)||wg(J,s,b,Y))}),so(D,[J,Y])},onEnterCancelled(J){T(J,!1),so(A,[J])},onAppearCancelled(J){T(J,!0),so(E,[J])},onLeaveCancelled(J){C(J),so(x,[J])}})}function KA(t){if(t==null)return null;if(ut(t))return[Lu(t.enter),Lu(t.leave)];{const e=Lu(t);return[e,e]}}function Lu(t){return Cv(t)}function Fs(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[gr]||(t[gr]=new Set)).add(e)}function hi(t,e){e.split(/\s+/).forEach(s=>s&&t.classList.remove(s));const n=t[gr];n&&(n.delete(e),n.size||(t[gr]=void 0))}function yg(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let qA=0;function wg(t,e,n,s){const i=t._endId=++qA,o=()=>{i===t._endId&&s()};if(n)return setTimeout(o,n);const{type:r,timeout:a,propCount:l}=Lb(t,e);if(!r)return s();const c=r+"end";let u=0;const d=()=>{t.removeEventListener(c,f),o()},f=g=>{g.target===t&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),t.addEventListener(c,f)}function Lb(t,e){const n=window.getComputedStyle(t),s=_=>(n[_]||"").split(", "),i=s(`${li}Delay`),o=s(`${li}Duration`),r=xg(i,o),a=s(`${Yr}Delay`),l=s(`${Yr}Duration`),c=xg(a,l);let u=null,d=0,f=0;e===li?r>0&&(u=li,d=r,f=o.length):e===Yr?c>0&&(u=Yr,d=c,f=l.length):(d=Math.max(r,c),u=d>0?r>c?li:Yr:null,f=u?u===li?o.length:l.length:0);const g=u===li&&/\b(transform|all)(,|$)/.test(s(`${li}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:g}}function xg(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,s)=>kg(n)+kg(t[s])))}function kg(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Nb(){return document.body.offsetHeight}function GA(t,e,n){const s=t[gr];s&&(e=(e?[e,...s]:[...s]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const fc=Symbol("_vod"),Fb=Symbol("_vsh"),ec={beforeMount(t,{value:e},{transition:n}){t[fc]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):Ur(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:s}){!e!=!n&&(s?e?(s.beforeEnter(t),Ur(t,!0),s.enter(t)):s.leave(t,()=>{Ur(t,!1)}):Ur(t,e))},beforeUnmount(t,{value:e}){Ur(t,e)}};function Ur(t,e){t.style.display=e?t[fc]:"none",t[Fb]=!e}const JA=Symbol(""),XA=/(^|;)\s*display\s*:/;function QA(t,e,n){const s=t.style,i=St(n);let o=!1;if(n&&!i){if(e)if(St(e))for(const r of e.split(";")){const a=r.slice(0,r.indexOf(":")).trim();n[a]==null&&tc(s,a,"")}else for(const r in e)n[r]==null&&tc(s,r,"");for(const r in n)r==="display"&&(o=!0),tc(s,r,n[r])}else if(i){if(e!==n){const r=s[JA];r&&(n+=";"+r),s.cssText=n,o=XA.test(n)}}else e&&t.removeAttribute("style");fc in t&&(t[fc]=o?s.display:"",t[Fb]&&(s.display="none"))}const Sg=/\s*!important$/;function tc(t,e,n){if(Fe(n))n.forEach(s=>tc(t,e,s));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const s=ZA(t,e);Sg.test(n)?t.setProperty(To(s),n.replace(Sg,""),"important"):t[s]=n}}const $g=["Webkit","Moz","ms"],Nu={};function ZA(t,e){const n=Nu[e];if(n)return n;let s=Es(e);if(s!=="filter"&&s in t)return Nu[e]=s;s=Rc(s);for(let i=0;i<$g.length;i++){const o=$g[i]+s;if(o in t)return Nu[e]=o}return e}const Ag="http://www.w3.org/1999/xlink";function Cg(t,e,n,s,i,o=o$(e)){s&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(Ag,e.slice(6,e.length)):t.setAttributeNS(Ag,e,n):n==null||o&&!Pv(n)?t.removeAttribute(e):t.setAttribute(e,o?"":String(n))}function eC(t,e,n,s,i,o,r){if(e==="innerHTML"||e==="textContent"){s&&r(s,i,o),t[e]=n??"";return}const a=t.tagName;if(e==="value"&&a!=="PROGRESS"&&!a.includes("-")){const c=a==="OPTION"?t.getAttribute("value")||"":t.value,u=n==null?"":String(n);(c!==u||!("_value"in t))&&(t.value=u),n==null&&t.removeAttribute(e),t._value=n;return}let l=!1;if(n===""||n==null){const c=typeof t[e];c==="boolean"?n=Pv(n):n==null&&c==="string"?(n="",l=!0):c==="number"&&(n=0,l=!0)}try{t[e]=n}catch{}l&&t.removeAttribute(e)}function zs(t,e,n,s){t.addEventListener(e,n,s)}function tC(t,e,n,s){t.removeEventListener(e,n,s)}const Eg=Symbol("_vei");function nC(t,e,n,s,i=null){const o=t[Eg]||(t[Eg]={}),r=o[e];if(s&&r)r.value=s;else{const[a,l]=sC(e);if(s){const c=o[e]=rC(s,i);zs(t,a,c,l)}else r&&(tC(t,a,r,l),o[e]=void 0)}}const Pg=/(?:Once|Passive|Capture)$/;function sC(t){let e;if(Pg.test(t)){e={};let s;for(;s=t.match(Pg);)t=t.slice(0,t.length-s[0].length),e[s[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):To(t.slice(2)),e]}let Fu=0;const iC=Promise.resolve(),oC=()=>Fu||(iC.then(()=>Fu=0),Fu=Date.now());function rC(t,e){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Jn(aC(s,n.value),e,5,[s])};return n.value=t,n.attached=oC(),n}function aC(t,e){if(Fe(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(s=>i=>!i._stopped&&s&&s(i))}else return e}const Tg=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,lC=(t,e,n,s,i,o,r,a,l)=>{const c=i==="svg";e==="class"?GA(t,s,c):e==="style"?QA(t,n,s):Oc(e)?Ah(e)||nC(t,e,n,s,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):cC(t,e,s,c))?(eC(t,e,s,o,r,a,l),(e==="value"||e==="checked"||e==="selected")&&Cg(t,e,s,c,r,e!=="value")):(e==="true-value"?t._trueValue=s:e==="false-value"&&(t._falseValue=s),Cg(t,e,s,c))};function cC(t,e,n,s){if(s)return!!(e==="innerHTML"||e==="textContent"||e in t&&Tg(e)&&Ye(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const i=t.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Tg(e)&&St(n)?!1:e in t}const Bb=new WeakMap,Vb=new WeakMap,pc=Symbol("_moveCb"),Mg=Symbol("_enterCb"),Hb={name:"TransitionGroup",props:Lt({},UA,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=Xh(),s=xb();let i,o;return ob(()=>{if(!i.length)return;const r=t.moveClass||`${t.name||"v"}-move`;if(!pC(i[0].el,n.vnode.el,r))return;i.forEach(dC),i.forEach(hC);const a=i.filter(fC);Nb(),a.forEach(l=>{const c=l.el,u=c.style;Fs(c,r),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[pc]=f=>{f&&f.target!==c||(!f||/transform$/.test(f.propertyName))&&(c.removeEventListener("transitionend",d),c[pc]=null,hi(c,r))};c.addEventListener("transitionend",d)})}),()=>{const r=Ze(t),a=Rb(r);let l=r.tag||Te;if(i=[],o)for(let c=0;c<o.length;c++){const u=o[c];u.el&&u.el instanceof Element&&(i.push(u),fr(u,Ma(u,a,s,n)),Bb.set(u,u.el.getBoundingClientRect()))}o=e.default?Gh(e.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&fr(u,Ma(u,a,s,n))}return Se(l,null,o)}}},uC=t=>delete t.mode;Hb.props;const Bi=Hb;function dC(t){const e=t.el;e[pc]&&e[pc](),e[Mg]&&e[Mg]()}function hC(t){Vb.set(t,t.el.getBoundingClientRect())}function fC(t){const e=Bb.get(t),n=Vb.get(t),s=e.left-n.left,i=e.top-n.top;if(s||i){const o=t.el.style;return o.transform=o.webkitTransform=`translate(${s}px,${i}px)`,o.transitionDuration="0s",t}}function pC(t,e,n){const s=t.cloneNode(),i=t[gr];i&&i.forEach(a=>{a.split(/\s+/).forEach(l=>l&&s.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&s.classList.add(a)),s.style.display="none";const o=e.nodeType===1?e:e.parentNode;o.appendChild(s);const{hasTransform:r}=Lb(s);return o.removeChild(s),r}const Di=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Fe(e)?n=>Gl(e,n):e};function gC(t){t.target.composing=!0}function Dg(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Xn=Symbol("_assign"),je={created(t,{modifiers:{lazy:e,trim:n,number:s}},i){t[Xn]=Di(i);const o=s||i.props&&i.props.type==="number";zs(t,e?"change":"input",r=>{if(r.target.composing)return;let a=t.value;n&&(a=a.trim()),o&&(a=ac(a)),t[Xn](a)}),n&&zs(t,"change",()=>{t.value=t.value.trim()}),e||(zs(t,"compositionstart",gC),zs(t,"compositionend",Dg),zs(t,"change",Dg))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:s,trim:i,number:o}},r){if(t[Xn]=Di(r),t.composing)return;const a=(o||t.type==="number")&&!/^0\d/.test(t.value)?ac(t.value):t.value,l=e??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(s&&e===n||i&&t.value.trim()===l)||(t.value=l))}},_n={deep:!0,created(t,e,n){t[Xn]=Di(n),zs(t,"change",()=>{const s=t._modelValue,i=mr(t),o=t.checked,r=t[Xn];if(Fe(s)){const a=Ph(s,i),l=a!==-1;if(o&&!l)r(s.concat(i));else if(!o&&l){const c=[...s];c.splice(a,1),r(c)}}else if(Or(s)){const a=new Set(s);o?a.add(i):a.delete(i),r(a)}else r(jb(t,o))})},mounted:Og,beforeUpdate(t,e,n){t[Xn]=Di(n),Og(t,e,n)}};function Og(t,{value:e,oldValue:n},s){t._modelValue=e,Fe(e)?t.checked=Ph(e,s.props.value)>-1:Or(e)?t.checked=e.has(s.props.value):e!==n&&(t.checked=Ao(e,jb(t,!0)))}const mC={created(t,{value:e},n){t.checked=Ao(e,n.props.value),t[Xn]=Di(n),zs(t,"change",()=>{t[Xn](mr(t))})},beforeUpdate(t,{value:e,oldValue:n},s){t[Xn]=Di(s),e!==n&&(t.checked=Ao(e,s.props.value))}},nc={deep:!0,created(t,{value:e,modifiers:{number:n}},s){const i=Or(e);zs(t,"change",()=>{const o=Array.prototype.filter.call(t.options,r=>r.selected).map(r=>n?ac(mr(r)):mr(r));t[Xn](t.multiple?i?new Set(o):o:o[0]),t._assigning=!0,en(()=>{t._assigning=!1})}),t[Xn]=Di(s)},mounted(t,{value:e,modifiers:{number:n}}){Ig(t,e)},beforeUpdate(t,e,n){t[Xn]=Di(n)},updated(t,{value:e,modifiers:{number:n}}){t._assigning||Ig(t,e)}};function Ig(t,e,n){const s=t.multiple,i=Fe(e);if(!(s&&!i&&!Or(e))){for(let o=0,r=t.options.length;o<r;o++){const a=t.options[o],l=mr(a);if(s)if(i){const c=typeof l;c==="string"||c==="number"?a.selected=e.some(u=>String(u)===String(l)):a.selected=Ph(e,l)>-1}else a.selected=e.has(l);else if(Ao(mr(a),e)){t.selectedIndex!==o&&(t.selectedIndex=o);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function mr(t){return"_value"in t?t._value:t.value}function jb(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const _C={created(t,e,n){El(t,e,n,null,"created")},mounted(t,e,n){El(t,e,n,null,"mounted")},beforeUpdate(t,e,n,s){El(t,e,n,s,"beforeUpdate")},updated(t,e,n,s){El(t,e,n,s,"updated")}};function vC(t,e){switch(t){case"SELECT":return nc;case"TEXTAREA":return je;default:switch(e){case"checkbox":return _n;case"radio":return mC;default:return je}}}function El(t,e,n,s,i){const r=vC(t.tagName,n.props&&n.props.type)[i];r&&r(t,e,n,s)}const bC=["ctrl","shift","alt","meta"],yC={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>bC.some(n=>t[`${n}Key`]&&!e.includes(n))},Oa=(t,e)=>{const n=t._withMods||(t._withMods={}),s=e.join(".");return n[s]||(n[s]=(i,...o)=>{for(let r=0;r<e.length;r++){const a=yC[e[r]];if(a&&a(i,e))return}return t(i,...o)})},wC={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},xC=(t,e)=>{const n=t._withKeys||(t._withKeys={}),s=e.join(".");return n[s]||(n[s]=i=>{if(!("key"in i))return;const o=To(i.key);if(e.some(r=>r===o||wC[r]===o))return t(i)})},kC=Lt({patchProp:lC},YA);let Rg;function Wb(){return Rg||(Rg=_A(kC))}const Lg=(...t)=>{Wb().render(...t)},SC=(...t)=>{const e=Wb().createApp(...t),{mount:n}=e;return e.mount=s=>{const i=AC(s);if(!i)return;const o=e._component;!Ye(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const r=n(i,!1,$C(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},e};function $C(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function AC(t){return St(t)?document.querySelector(t):t}var CC=!1;/*!
|
|
* pinia v2.1.7
|
|
* (c) 2023 Eduardo San Martin Morote
|
|
* @license MIT
|
|
*/let zb;const Kc=t=>zb=t,Yb=Symbol();function Ld(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var ga;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(ga||(ga={}));function EC(){const t=Dv(!0),e=t.run(()=>ve({}));let n=[],s=[];const i=Bc({install(o){Kc(i),i._a=o,o.provide(Yb,i),o.config.globalProperties.$pinia=i,s.forEach(r=>n.push(r)),s=[]},use(o){return!this._a&&!CC?s.push(o):n.push(o),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return i}const Ub=()=>{};function Ng(t,e,n,s=Ub){t.push(e);const i=()=>{const o=t.indexOf(e);o>-1&&(t.splice(o,1),s())};return!n&&Lc()&&Th(i),i}function Uo(t,...e){t.slice().forEach(n=>{n(...e)})}const PC=t=>t();function Nd(t,e){t instanceof Map&&e instanceof Map&&e.forEach((n,s)=>t.set(s,n)),t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const s=e[n],i=t[n];Ld(i)&&Ld(s)&&t.hasOwnProperty(n)&&!Pt(s)&&!bo(s)?t[n]=Nd(i,s):t[n]=s}return t}const TC=Symbol();function MC(t){return!Ld(t)||!t.hasOwnProperty(TC)}const{assign:fi}=Object;function DC(t){return!!(Pt(t)&&t.effect)}function OC(t,e,n,s){const{state:i,actions:o,getters:r}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=i?i():{});const u=M$(n.state.value[t]);return fi(u,o,Object.keys(r||{}).reduce((d,f)=>(d[f]=Bc(_e(()=>{Kc(n);const g=n._s.get(t);return r[f].call(g,g)})),d),{}))}return l=Kb(t,c,e,n,s,!0),l}function Kb(t,e,n={},s,i,o){let r;const a=fi({actions:{}},n),l={deep:!0};let c,u,d=[],f=[],g;const _=s.state.value[t];!o&&!_&&(s.state.value[t]={}),ve({});let m;function b(E){let T;c=u=!1,typeof E=="function"?(E(s.state.value[t]),T={type:ga.patchFunction,storeId:t,events:g}):(Nd(s.state.value[t],E),T={type:ga.patchObject,payload:E,storeId:t,events:g});const C=m=Symbol();en().then(()=>{m===C&&(c=!0)}),u=!0,Uo(d,T,s.state.value[t])}const w=o?function(){const{state:T}=n,C=T?T():{};this.$patch(B=>{fi(B,C)})}:Ub;function $(){r.stop(),d=[],f=[],s._s.delete(t)}function A(E,T){return function(){Kc(s);const C=Array.from(arguments),B=[],J=[];function ae(I){B.push(I)}function Y(I){J.push(I)}Uo(f,{args:C,name:E,store:x,after:ae,onError:Y});let L;try{L=T.apply(this&&this.$id===t?this:x,C)}catch(I){throw Uo(J,I),I}return L instanceof Promise?L.then(I=>(Uo(B,I),I)).catch(I=>(Uo(J,I),Promise.reject(I))):(Uo(B,L),L)}}const D={_p:s,$id:t,$onAction:Ng.bind(null,f),$patch:b,$reset:w,$subscribe(E,T={}){const C=Ng(d,E,T.detached,()=>B()),B=r.run(()=>Bt(()=>s.state.value[t],J=>{(T.flush==="sync"?u:c)&&E({storeId:t,type:ga.direct,events:g},J)},fi({},l,T)));return C},$dispose:$},x=Ts(D);s._s.set(t,x);const S=(s._a&&s._a.runWithContext||PC)(()=>s._e.run(()=>(r=Dv()).run(e)));for(const E in S){const T=S[E];if(Pt(T)&&!DC(T)||bo(T))o||(_&&MC(T)&&(Pt(T)?T.value=_[E]:Nd(T,_[E])),s.state.value[t][E]=T);else if(typeof T=="function"){const C=A(E,T);S[E]=C,a.actions[E]=T}}return fi(x,S),fi(Ze(x),S),Object.defineProperty(x,"$state",{get:()=>s.state.value[t],set:E=>{b(T=>{fi(T,E)})}}),s._p.forEach(E=>{fi(x,r.run(()=>E({store:x,app:s._a,pinia:s,options:a})))}),_&&o&&n.hydrate&&n.hydrate(x.$state,_),c=!0,u=!0,x}function Qh(t,e,n){let s,i;const o=typeof e=="function";typeof t=="string"?(s=t,i=o?n:e):(i=t,s=t.id);function r(a,l){const c=dA();return a=a||(c?as(Yb,null):null),a&&Kc(a),a=zb,a._s.has(s)||(o?Kb(s,e,i,a):OC(s,i,a)),a._s.get(s)}return r.$id=s,r}/*!
|
|
* vue-router v4.2.5
|
|
* (c) 2023 Eduardo San Martin Morote
|
|
* @license MIT
|
|
*/const Zo=typeof window<"u";function IC(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const lt=Object.assign;function Bu(t,e){const n={};for(const s in e){const i=e[s];n[s]=cs(i)?i.map(t):t(i)}return n}const ma=()=>{},cs=Array.isArray,RC=/\/$/,LC=t=>t.replace(RC,"");function Vu(t,e,n="/"){let s,i={},o="",r="";const a=e.indexOf("#");let l=e.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(s=e.slice(0,l),o=e.slice(l+1,a>-1?a:e.length),i=t(o)),a>-1&&(s=s||e.slice(0,a),r=e.slice(a,e.length)),s=VC(s??e,n),{fullPath:s+(o&&"?")+o+r,path:s,query:i,hash:r}}function NC(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function Fg(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function FC(t,e,n){const s=e.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&_r(e.matched[s],n.matched[i])&&qb(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function _r(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function qb(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!BC(t[n],e[n]))return!1;return!0}function BC(t,e){return cs(t)?Bg(t,e):cs(e)?Bg(e,t):t===e}function Bg(t,e){return cs(e)?t.length===e.length&&t.every((n,s)=>n===e[s]):t.length===1&&t[0]===e}function VC(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),s=t.split("/"),i=s[s.length-1];(i===".."||i===".")&&s.push("");let o=n.length-1,r,a;for(r=0;r<s.length;r++)if(a=s[r],a!==".")if(a==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(r-(r===s.length?1:0)).join("/")}var Ia;(function(t){t.pop="pop",t.push="push"})(Ia||(Ia={}));var _a;(function(t){t.back="back",t.forward="forward",t.unknown=""})(_a||(_a={}));function HC(t){if(!t)if(Zo){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),LC(t)}const jC=/^[^#]+#/;function WC(t,e){return t.replace(jC,"#")+e}function zC(t,e){const n=document.documentElement.getBoundingClientRect(),s=t.getBoundingClientRect();return{behavior:e.behavior,left:s.left-n.left-(e.left||0),top:s.top-n.top-(e.top||0)}}const qc=()=>({left:window.pageXOffset,top:window.pageYOffset});function YC(t){let e;if("el"in t){const n=t.el,s=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;e=zC(i,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function Vg(t,e){return(history.state?history.state.position-e:-1)+t}const Fd=new Map;function UC(t,e){Fd.set(t,e)}function KC(t){const e=Fd.get(t);return Fd.delete(t),e}let qC=()=>location.protocol+"//"+location.host;function Gb(t,e){const{pathname:n,search:s,hash:i}=e,o=t.indexOf("#");if(o>-1){let a=i.includes(t.slice(o))?t.slice(o).length:1,l=i.slice(a);return l[0]!=="/"&&(l="/"+l),Fg(l,"")}return Fg(n,t)+s+i}function GC(t,e,n,s){let i=[],o=[],r=null;const a=({state:f})=>{const g=Gb(t,location),_=n.value,m=e.value;let b=0;if(f){if(n.value=g,e.value=f,r&&r===_){r=null;return}b=m?f.position-m.position:0}else s(g);i.forEach(w=>{w(n.value,_,{delta:b,type:Ia.pop,direction:b?b>0?_a.forward:_a.back:_a.unknown})})};function l(){r=n.value}function c(f){i.push(f);const g=()=>{const _=i.indexOf(f);_>-1&&i.splice(_,1)};return o.push(g),g}function u(){const{history:f}=window;f.state&&f.replaceState(lt({},f.state,{scroll:qc()}),"")}function d(){for(const f of o)f();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function Hg(t,e,n,s=!1,i=!1){return{back:t,current:e,forward:n,replaced:s,position:window.history.length,scroll:i?qc():null}}function JC(t){const{history:e,location:n}=window,s={value:Gb(t,n)},i={value:e.state};i.value||o(s.value,{back:null,current:s.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function o(l,c,u){const d=t.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?t:t.slice(d))+l:qC()+t+l;try{e[u?"replaceState":"pushState"](c,"",f),i.value=c}catch(g){console.error(g),n[u?"replace":"assign"](f)}}function r(l,c){const u=lt({},e.state,Hg(i.value.back,l,i.value.forward,!0),c,{position:i.value.position});o(l,u,!0),s.value=l}function a(l,c){const u=lt({},i.value,e.state,{forward:l,scroll:qc()});o(u.current,u,!0);const d=lt({},Hg(s.value,l,null),{position:u.position+1},c);o(l,d,!1),s.value=l}return{location:s,state:i,push:a,replace:r}}function XC(t){t=HC(t);const e=JC(t),n=GC(t,e.state,e.location,e.replace);function s(o,r=!0){r||n.pauseListeners(),history.go(o)}const i=lt({location:"",base:t,go:s,createHref:WC.bind(null,t)},e,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}function QC(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),XC(t)}function ZC(t){return typeof t=="string"||t&&typeof t=="object"}function Jb(t){return typeof t=="string"||typeof t=="symbol"}const ci={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Xb=Symbol("");var jg;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(jg||(jg={}));function vr(t,e){return lt(new Error,{type:t,[Xb]:!0},e)}function Ls(t,e){return t instanceof Error&&Xb in t&&(e==null||!!(t.type&e))}const Wg="[^/]+?",eE={sensitive:!1,strict:!1,start:!0,end:!0},tE=/[.+*?^${}()[\]/\\]/g;function nE(t,e){const n=lt({},eE,e),s=[];let i=n.start?"^":"";const o=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(i+="/");for(let d=0;d<c.length;d++){const f=c[d];let g=40+(n.sensitive?.25:0);if(f.type===0)d||(i+="/"),i+=f.value.replace(tE,"\\$&"),g+=40;else if(f.type===1){const{value:_,repeatable:m,optional:b,regexp:w}=f;o.push({name:_,repeatable:m,optional:b});const $=w||Wg;if($!==Wg){g+=10;try{new RegExp(`(${$})`)}catch(D){throw new Error(`Invalid custom RegExp for param "${_}" (${$}): `+D.message)}}let A=m?`((?:${$})(?:/(?:${$}))*)`:`(${$})`;d||(A=b&&c.length<2?`(?:/${A})`:"/"+A),b&&(A+="?"),i+=A,g+=20,b&&(g+=-8),m&&(g+=-20),$===".*"&&(g+=-50)}u.push(g)}s.push(u)}if(n.strict&&n.end){const c=s.length-1;s[c][s[c].length-1]+=.7000000000000001}n.strict||(i+="/?"),n.end?i+="$":n.strict&&(i+="(?:/|$)");const r=new RegExp(i,n.sensitive?"":"i");function a(c){const u=c.match(r),d={};if(!u)return null;for(let f=1;f<u.length;f++){const g=u[f]||"",_=o[f-1];d[_.name]=g&&_.repeatable?g.split("/"):g}return d}function l(c){let u="",d=!1;for(const f of t){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const g of f)if(g.type===0)u+=g.value;else if(g.type===1){const{value:_,repeatable:m,optional:b}=g,w=_ in c?c[_]:"";if(cs(w)&&!m)throw new Error(`Provided param "${_}" is an array but it is not repeatable (* or + modifiers)`);const $=cs(w)?w.join("/"):w;if(!$)if(b)f.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${_}"`);u+=$}}return u||"/"}return{re:r,score:s,keys:o,parse:a,stringify:l}}function sE(t,e){let n=0;for(;n<t.length&&n<e.length;){const s=e[n]-t[n];if(s)return s;n++}return t.length<e.length?t.length===1&&t[0]===80?-1:1:t.length>e.length?e.length===1&&e[0]===80?1:-1:0}function iE(t,e){let n=0;const s=t.score,i=e.score;for(;n<s.length&&n<i.length;){const o=sE(s[n],i[n]);if(o)return o;n++}if(Math.abs(i.length-s.length)===1){if(zg(s))return 1;if(zg(i))return-1}return i.length-s.length}function zg(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const oE={type:0,value:""},rE=/[a-zA-Z0-9_]/;function aE(t){if(!t)return[[]];if(t==="/")return[[oE]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(g){throw new Error(`ERR (${n})/"${c}": ${g}`)}let n=0,s=n;const i=[];let o;function r(){o&&i.push(o),o=[]}let a=0,l,c="",u="";function d(){c&&(n===0?o.push({type:0,value:c}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;a<t.length;){if(l=t[a++],l==="\\"&&n!==2){s=n,n=4;continue}switch(n){case 0:l==="/"?(c&&d(),r()):l===":"?(d(),n=1):f();break;case 4:f(),n=s;break;case 1:l==="("?n=2:rE.test(l)?f():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=3:u+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return n===2&&e(`Unfinished custom RegExp for param "${c}"`),d(),r(),i}function lE(t,e,n){const s=nE(aE(t.path),n),i=lt(s,{record:t,parent:e,children:[],alias:[]});return e&&!i.record.aliasOf==!e.record.aliasOf&&e.children.push(i),i}function cE(t,e){const n=[],s=new Map;e=Kg({strict:!1,end:!0,sensitive:!1},e);function i(u){return s.get(u)}function o(u,d,f){const g=!f,_=uE(u);_.aliasOf=f&&f.record;const m=Kg(e,u),b=[_];if("alias"in u){const A=typeof u.alias=="string"?[u.alias]:u.alias;for(const D of A)b.push(lt({},_,{components:f?f.record.components:_.components,path:D,aliasOf:f?f.record:_}))}let w,$;for(const A of b){const{path:D}=A;if(d&&D[0]!=="/"){const x=d.record.path,y=x[x.length-1]==="/"?"":"/";A.path=d.record.path+(D&&y+D)}if(w=lE(A,d,m),f?f.alias.push(w):($=$||w,$!==w&&$.alias.push(w),g&&u.name&&!Ug(w)&&r(u.name)),_.children){const x=_.children;for(let y=0;y<x.length;y++)o(x[y],w,f&&f.children[y])}f=f||w,(w.record.components&&Object.keys(w.record.components).length||w.record.name||w.record.redirect)&&l(w)}return $?()=>{r($)}:ma}function r(u){if(Jb(u)){const d=s.get(u);d&&(s.delete(u),n.splice(n.indexOf(d),1),d.children.forEach(r),d.alias.forEach(r))}else{const d=n.indexOf(u);d>-1&&(n.splice(d,1),u.record.name&&s.delete(u.record.name),u.children.forEach(r),u.alias.forEach(r))}}function a(){return n}function l(u){let d=0;for(;d<n.length&&iE(u,n[d])>=0&&(u.record.path!==n[d].record.path||!Qb(u,n[d]));)d++;n.splice(d,0,u),u.record.name&&!Ug(u)&&s.set(u.record.name,u)}function c(u,d){let f,g={},_,m;if("name"in u&&u.name){if(f=s.get(u.name),!f)throw vr(1,{location:u});m=f.record.name,g=lt(Yg(d.params,f.keys.filter($=>!$.optional).map($=>$.name)),u.params&&Yg(u.params,f.keys.map($=>$.name))),_=f.stringify(g)}else if("path"in u)_=u.path,f=n.find($=>$.re.test(_)),f&&(g=f.parse(_),m=f.record.name);else{if(f=d.name?s.get(d.name):n.find($=>$.re.test(d.path)),!f)throw vr(1,{location:u,currentLocation:d});m=f.record.name,g=lt({},d.params,u.params),_=f.stringify(g)}const b=[];let w=f;for(;w;)b.unshift(w.record),w=w.parent;return{name:m,path:_,params:g,matched:b,meta:hE(b)}}return t.forEach(u=>o(u)),{addRoute:o,resolve:c,removeRoute:r,getRoutes:a,getRecordMatcher:i}}function Yg(t,e){const n={};for(const s of e)s in t&&(n[s]=t[s]);return n}function uE(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:dE(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function dE(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const s in t.components)e[s]=typeof n=="object"?n[s]:n;return e}function Ug(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function hE(t){return t.reduce((e,n)=>lt(e,n.meta),{})}function Kg(t,e){const n={};for(const s in t)n[s]=s in e?e[s]:t[s];return n}function Qb(t,e){return e.children.some(n=>n===t||Qb(t,n))}const Zb=/#/g,fE=/&/g,pE=/\//g,gE=/=/g,mE=/\?/g,ey=/\+/g,_E=/%5B/g,vE=/%5D/g,ty=/%5E/g,bE=/%60/g,ny=/%7B/g,yE=/%7C/g,sy=/%7D/g,wE=/%20/g;function Zh(t){return encodeURI(""+t).replace(yE,"|").replace(_E,"[").replace(vE,"]")}function xE(t){return Zh(t).replace(ny,"{").replace(sy,"}").replace(ty,"^")}function Bd(t){return Zh(t).replace(ey,"%2B").replace(wE,"+").replace(Zb,"%23").replace(fE,"%26").replace(bE,"`").replace(ny,"{").replace(sy,"}").replace(ty,"^")}function kE(t){return Bd(t).replace(gE,"%3D")}function SE(t){return Zh(t).replace(Zb,"%23").replace(mE,"%3F")}function $E(t){return t==null?"":SE(t).replace(pE,"%2F")}function gc(t){try{return decodeURIComponent(""+t)}catch{}return""+t}function AE(t){const e={};if(t===""||t==="?")return e;const s=(t[0]==="?"?t.slice(1):t).split("&");for(let i=0;i<s.length;++i){const o=s[i].replace(ey," "),r=o.indexOf("="),a=gc(r<0?o:o.slice(0,r)),l=r<0?null:gc(o.slice(r+1));if(a in e){let c=e[a];cs(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function qg(t){let e="";for(let n in t){const s=t[n];if(n=kE(n),s==null){s!==void 0&&(e+=(e.length?"&":"")+n);continue}(cs(s)?s.map(o=>o&&Bd(o)):[s&&Bd(s)]).forEach(o=>{o!==void 0&&(e+=(e.length?"&":"")+n,o!=null&&(e+="="+o))})}return e}function CE(t){const e={};for(const n in t){const s=t[n];s!==void 0&&(e[n]=cs(s)?s.map(i=>i==null?null:""+i):s==null?s:""+s)}return e}const EE=Symbol(""),Gg=Symbol(""),ef=Symbol(""),tf=Symbol(""),Vd=Symbol("");function Kr(){let t=[];function e(s){return t.push(s),()=>{const i=t.indexOf(s);i>-1&&t.splice(i,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function _i(t,e,n,s,i){const o=s&&(s.enterCallbacks[i]=s.enterCallbacks[i]||[]);return()=>new Promise((r,a)=>{const l=d=>{d===!1?a(vr(4,{from:n,to:e})):d instanceof Error?a(d):ZC(d)?a(vr(2,{from:e,to:d})):(o&&s.enterCallbacks[i]===o&&typeof d=="function"&&o.push(d),r())},c=t.call(s&&s.instances[i],e,n,l);let u=Promise.resolve(c);t.length<3&&(u=u.then(l)),u.catch(d=>a(d))})}function Hu(t,e,n,s){const i=[];for(const o of t)for(const r in o.components){let a=o.components[r];if(!(e!=="beforeRouteEnter"&&!o.instances[r]))if(PE(a)){const c=(a.__vccOpts||a)[e];c&&i.push(_i(c,n,s,o,r))}else{let l=a();i.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${r}" at "${o.path}"`));const u=IC(c)?c.default:c;o.components[r]=u;const f=(u.__vccOpts||u)[e];return f&&_i(f,n,s,o,r)()}))}}return i}function PE(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function Jg(t){const e=as(ef),n=as(tf),s=_e(()=>e.resolve(q(t.to))),i=_e(()=>{const{matched:l}=s.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(_r.bind(null,u));if(f>-1)return f;const g=Xg(l[c-2]);return c>1&&Xg(u)===g&&d[d.length-1].path!==g?d.findIndex(_r.bind(null,l[c-2])):f}),o=_e(()=>i.value>-1&&OE(n.params,s.value.params)),r=_e(()=>i.value>-1&&i.value===n.matched.length-1&&qb(n.params,s.value.params));function a(l={}){return DE(l)?e[q(t.replace)?"replace":"push"](q(t.to)).catch(ma):Promise.resolve()}return{route:s,href:_e(()=>s.value.href),isActive:o,isExactActive:r,navigate:a}}const TE=Nt({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Jg,setup(t,{slots:e}){const n=Ts(Jg(t)),{options:s}=as(ef),i=_e(()=>({[Qg(t.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Qg(t.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=e.default&&e.default(n);return t.custom?o:Co("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},o)}}}),ME=TE;function DE(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function OE(t,e){for(const n in e){const s=e[n],i=t[n];if(typeof s=="string"){if(s!==i)return!1}else if(!cs(i)||i.length!==s.length||s.some((o,r)=>o!==i[r]))return!1}return!0}function Xg(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const Qg=(t,e,n)=>t??e??n,IE=Nt({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const s=as(Vd),i=_e(()=>t.route||s.value),o=as(Gg,0),r=_e(()=>{let c=q(o);const{matched:u}=i.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=_e(()=>i.value.matched[r.value]);Xl(Gg,_e(()=>r.value+1)),Xl(EE,a),Xl(Vd,i);const l=ve();return Bt(()=>[l.value,a.value,t.name],([c,u,d],[f,g,_])=>{u&&(u.instances[d]=c,g&&g!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=g.leaveGuards),u.updateGuards.size||(u.updateGuards=g.updateGuards))),c&&u&&(!g||!_r(u,g)||!f)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=i.value,u=t.name,d=a.value,f=d&&d.components[u];if(!f)return Zg(n.default,{Component:f,route:c});const g=d.props[u],_=g?g===!0?c.params:typeof g=="function"?g(c):g:null,b=Co(f,lt({},_,e,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return Zg(n.default,{Component:b,route:c})||b}}});function Zg(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const iy=IE;function RE(t){const e=cE(t.routes,t),n=t.parseQuery||AE,s=t.stringifyQuery||qg,i=t.history,o=Kr(),r=Kr(),a=Kr(),l=Fh(ci);let c=ci;Zo&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Bu.bind(null,P=>""+P),d=Bu.bind(null,$E),f=Bu.bind(null,gc);function g(P,se){let ue,xe;return Jb(P)?(ue=e.getRecordMatcher(P),xe=se):xe=P,e.addRoute(xe,ue)}function _(P){const se=e.getRecordMatcher(P);se&&e.removeRoute(se)}function m(){return e.getRoutes().map(P=>P.record)}function b(P){return!!e.getRecordMatcher(P)}function w(P,se){if(se=lt({},se||l.value),typeof P=="string"){const O=Vu(n,P,se.path),H=e.resolve({path:O.path},se),W=i.createHref(O.fullPath);return lt(O,H,{params:f(H.params),hash:gc(O.hash),redirectedFrom:void 0,href:W})}let ue;if("path"in P)ue=lt({},P,{path:Vu(n,P.path,se.path).path});else{const O=lt({},P.params);for(const H in O)O[H]==null&&delete O[H];ue=lt({},P,{params:d(O)}),se.params=d(se.params)}const xe=e.resolve(ue,se),N=P.hash||"";xe.params=u(f(xe.params));const he=NC(s,lt({},P,{hash:xE(N),path:xe.path})),v=i.createHref(he);return lt({fullPath:he,hash:N,query:s===qg?CE(P.query):P.query||{}},xe,{redirectedFrom:void 0,href:v})}function $(P){return typeof P=="string"?Vu(n,P,l.value.path):lt({},P)}function A(P,se){if(c!==P)return vr(8,{from:se,to:P})}function D(P){return S(P)}function x(P){return D(lt($(P),{replace:!0}))}function y(P){const se=P.matched[P.matched.length-1];if(se&&se.redirect){const{redirect:ue}=se;let xe=typeof ue=="function"?ue(P):ue;return typeof xe=="string"&&(xe=xe.includes("?")||xe.includes("#")?xe=$(xe):{path:xe},xe.params={}),lt({query:P.query,hash:P.hash,params:"path"in xe?{}:P.params},xe)}}function S(P,se){const ue=c=w(P),xe=l.value,N=P.state,he=P.force,v=P.replace===!0,O=y(ue);if(O)return S(lt($(O),{state:typeof O=="object"?lt({},N,O.state):N,force:he,replace:v}),se||ue);const H=ue;H.redirectedFrom=se;let W;return!he&&FC(s,xe,ue)&&(W=vr(16,{to:H,from:xe}),ye(xe,xe,!0,!1)),(W?Promise.resolve(W):C(H,xe)).catch(ie=>Ls(ie)?Ls(ie,2)?ie:le(ie):Q(ie,H,xe)).then(ie=>{if(ie){if(Ls(ie,2))return S(lt({replace:v},$(ie.to),{state:typeof ie.to=="object"?lt({},N,ie.to.state):N,force:he}),se||H)}else ie=J(H,xe,!0,v,N);return B(H,xe,ie),ie})}function E(P,se){const ue=A(P,se);return ue?Promise.reject(ue):Promise.resolve()}function T(P){const se=R.values().next().value;return se&&typeof se.runWithContext=="function"?se.runWithContext(P):P()}function C(P,se){let ue;const[xe,N,he]=LE(P,se);ue=Hu(xe.reverse(),"beforeRouteLeave",P,se);for(const O of xe)O.leaveGuards.forEach(H=>{ue.push(_i(H,P,se))});const v=E.bind(null,P,se);return ue.push(v),oe(ue).then(()=>{ue=[];for(const O of o.list())ue.push(_i(O,P,se));return ue.push(v),oe(ue)}).then(()=>{ue=Hu(N,"beforeRouteUpdate",P,se);for(const O of N)O.updateGuards.forEach(H=>{ue.push(_i(H,P,se))});return ue.push(v),oe(ue)}).then(()=>{ue=[];for(const O of he)if(O.beforeEnter)if(cs(O.beforeEnter))for(const H of O.beforeEnter)ue.push(_i(H,P,se));else ue.push(_i(O.beforeEnter,P,se));return ue.push(v),oe(ue)}).then(()=>(P.matched.forEach(O=>O.enterCallbacks={}),ue=Hu(he,"beforeRouteEnter",P,se),ue.push(v),oe(ue))).then(()=>{ue=[];for(const O of r.list())ue.push(_i(O,P,se));return ue.push(v),oe(ue)}).catch(O=>Ls(O,8)?O:Promise.reject(O))}function B(P,se,ue){a.list().forEach(xe=>T(()=>xe(P,se,ue)))}function J(P,se,ue,xe,N){const he=A(P,se);if(he)return he;const v=se===ci,O=Zo?history.state:{};ue&&(xe||v?i.replace(P.fullPath,lt({scroll:v&&O&&O.scroll},N)):i.push(P.fullPath,N)),l.value=P,ye(P,se,ue,v),le()}let ae;function Y(){ae||(ae=i.listen((P,se,ue)=>{if(!ee.listening)return;const xe=w(P),N=y(xe);if(N){S(lt(N,{replace:!0}),xe).catch(ma);return}c=xe;const he=l.value;Zo&&UC(Vg(he.fullPath,ue.delta),qc()),C(xe,he).catch(v=>Ls(v,12)?v:Ls(v,2)?(S(v.to,xe).then(O=>{Ls(O,20)&&!ue.delta&&ue.type===Ia.pop&&i.go(-1,!1)}).catch(ma),Promise.reject()):(ue.delta&&i.go(-ue.delta,!1),Q(v,xe,he))).then(v=>{v=v||J(xe,he,!1),v&&(ue.delta&&!Ls(v,8)?i.go(-ue.delta,!1):ue.type===Ia.pop&&Ls(v,20)&&i.go(-1,!1)),B(xe,he,v)}).catch(ma)}))}let L=Kr(),I=Kr(),V;function Q(P,se,ue){le(P);const xe=I.list();return xe.length?xe.forEach(N=>N(P,se,ue)):console.error(P),Promise.reject(P)}function Z(){return V&&l.value!==ci?Promise.resolve():new Promise((P,se)=>{L.add([P,se])})}function le(P){return V||(V=!P,Y(),L.list().forEach(([se,ue])=>P?ue(P):se()),L.reset()),P}function ye(P,se,ue,xe){const{scrollBehavior:N}=t;if(!Zo||!N)return Promise.resolve();const he=!ue&&KC(Vg(P.fullPath,0))||(xe||!ue)&&history.state&&history.state.scroll||null;return en().then(()=>N(P,se,he)).then(v=>v&&YC(v)).catch(v=>Q(v,P,se))}const U=P=>i.go(P);let X;const R=new Set,ee={currentRoute:l,listening:!0,addRoute:g,removeRoute:_,hasRoute:b,getRoutes:m,resolve:w,options:t,push:D,replace:x,go:U,back:()=>U(-1),forward:()=>U(1),beforeEach:o.add,beforeResolve:r.add,afterEach:a.add,onError:I.add,isReady:Z,install(P){const se=this;P.component("RouterLink",ME),P.component("RouterView",iy),P.config.globalProperties.$router=se,Object.defineProperty(P.config.globalProperties,"$route",{enumerable:!0,get:()=>q(l)}),Zo&&!X&&l.value===ci&&(X=!0,D(i.location).catch(N=>{}));const ue={};for(const N in ci)Object.defineProperty(ue,N,{get:()=>l.value[N],enumerable:!0});P.provide(ef,se),P.provide(tf,zv(ue)),P.provide(Vd,l);const xe=P.unmount;R.add(P),P.unmount=function(){R.delete(P),R.size<1&&(c=ci,ae&&ae(),ae=null,l.value=ci,X=!1,V=!1),xe()}}};function oe(P){return P.reduce((se,ue)=>se.then(()=>T(ue)),Promise.resolve())}return ee}function LE(t,e){const n=[],s=[],i=[],o=Math.max(e.matched.length,t.matched.length);for(let r=0;r<o;r++){const a=e.matched[r];a&&(t.matched.find(c=>_r(c,a))?s.push(a):n.push(a));const l=t.matched[r];l&&(e.matched.find(c=>_r(c,l))||i.push(l))}return[n,s,i]}function NE(){return as(tf)}const FE={getCookie(t){const n=`; ${document.cookie}`.split(`; ${t}=`);if(n.length===2)return n.pop().split(";").shift()}};Qh("WGDashboardStore",{state:()=>({WireguardConfigurations:void 0,DashboardConfiguration:void 0}),actions:{async getDashboardConfiguration(){await wt("/api/getDashboardConfiguration",{},t=>{console.log(t.status),t.status&&(this.DashboardConfiguration=t.data)})}}});const em="[a-fA-F\\d:]",bi=t=>t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${em})|(?<=${em})(?=\\s|$))`:"",ns="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",Ft="[a-fA-F\\d]{1,4}",Gc=`
|
|
|
|
(?:
|
|
(?:${Ft}:){7}(?:${Ft}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
(?:${Ft}:){6}(?:${ns}|:${Ft}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
|
(?:${Ft}:){5}(?::${ns}|(?::${Ft}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
|
(?:${Ft}:){4}(?:(?::${Ft}){0,1}:${ns}|(?::${Ft}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
|
(?:${Ft}:){3}(?:(?::${Ft}){0,2}:${ns}|(?::${Ft}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
|
(?:${Ft}:){2}(?:(?::${Ft}){0,3}:${ns}|(?::${Ft}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
|
(?:${Ft}:){1}(?:(?::${Ft}){0,4}:${ns}|(?::${Ft}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
(?::(?:(?::${Ft}){0,5}:${ns}|(?::${Ft}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
|
|
`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),BE=new RegExp(`(?:^${ns}$)|(?:^${Gc}$)`),VE=new RegExp(`^${ns}$`),HE=new RegExp(`^${Gc}$`),Jc=t=>t&&t.exact?BE:new RegExp(`(?:${bi(t)}${ns}${bi(t)})|(?:${bi(t)}${Gc}${bi(t)})`,"g");Jc.v4=t=>t&&t.exact?VE:new RegExp(`${bi(t)}${ns}${bi(t)}`,"g");Jc.v6=t=>t&&t.exact?HE:new RegExp(`${bi(t)}${Gc}${bi(t)}`,"g");const oy={exact:!1},ry=`${Jc.v4().source}\\/(3[0-2]|[12]?[0-9])`,ay=`${Jc.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,jE=new RegExp(`^${ry}$`),WE=new RegExp(`^${ay}$`),zE=({exact:t}=oy)=>t?jE:new RegExp(ry,"g"),YE=({exact:t}=oy)=>t?WE:new RegExp(ay,"g"),ly=zE({exact:!0}),cy=YE({exact:!0}),nf=t=>ly.test(t)?4:cy.test(t)?6:0;nf.v4=t=>ly.test(t);nf.v6=t=>cy.test(t);const Tn=Qh("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",ConfigurationListInterval:void 0,PeerScheduleJobs:{dropdowns:{Field:[{display:"Total Received",value:"total_receive",unit:"GB",type:"number"},{display:"Total Sent",value:"total_sent",unit:"GB",type:"number"},{display:"Total Data",value:"total_data",unit:"GB",type:"number"},{display:"Date",value:"date",type:"date"}],Operator:[{display:"equal",value:"eq"},{display:"not equal",value:"neq"},{display:"larger than",value:"lgt"},{display:"less than",value:"lst"}],Action:[{display:"Restrict Peer",value:"restrict"},{display:"Delete Peer",value:"delete"}]}}}),actions:{async getConfigurations(){await wt("/api/getWireguardConfigurations",{},t=>{t.status&&(this.Configurations=t.data)})},regexCheckIP(t){return/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/.test(t)},checkCIDR(t){return nf(t)!==0}}}),We=(t,e)=>{const n=t.__vccOpts||t;for(const[s,i]of e)n[s]=i;return n},UE={name:"navbar",setup(){const t=Tn(),e=Xe();return{wireguardConfigurationsStore:t,dashboardConfigurationStore:e}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:""}},mounted(){wt("/api/getDashboardUpdate",{},t=>{t.status?(t.data&&(this.updateAvailable=!0,this.updateUrl=t.data),this.updateMessage=t.message):(this.updateMessage="Failed to check available update",console.log(`Failed to get update: ${t.message}`))})}},Vi=t=>(Ut("data-v-a0b378dd"),t=t(),Kt(),t),KE=["data-bs-theme"],qE={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},GE={class:"sidebar-sticky pt-3"},JE={class:"nav flex-column px-2"},XE={class:"nav-item"},QE=Vi(()=>h("i",{class:"bi bi-house me-2"},null,-1)),ZE={class:"nav-item"},eP=Vi(()=>h("i",{class:"bi bi-gear me-2"},null,-1)),tP=Vi(()=>h("hr",{class:"text-body"},null,-1)),nP=Vi(()=>h("h6",{class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},[h("i",{class:"bi bi-body-text me-2"}),be(" Configurations ")],-1)),sP={class:"nav flex-column px-2"},iP={class:"nav-item"},oP=Vi(()=>h("hr",{class:"text-body"},null,-1)),rP=Vi(()=>h("h6",{class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},[h("i",{class:"bi bi-tools me-2"}),be(" Tools ")],-1)),aP={class:"nav flex-column px-2"},lP={class:"nav-item"},cP={class:"nav-item"},uP=Vi(()=>h("hr",{class:"text-body"},null,-1)),dP={class:"nav flex-column px-2"},hP={class:"nav-item"},fP=Vi(()=>h("i",{class:"bi bi-box-arrow-left me-2"},null,-1)),pP={class:"nav-item",style:{"font-size":"0.8rem"}},gP=["href"],mP={class:"nav-link text-muted rounded-3"},_P={key:1,class:"nav-link text-muted"};function vP(t,e,n,s,i,o){const r=He("RouterLink");return M(),F("div",{class:Ce(["col-md-3 col-lg-2 d-md-block p-3 navbar-container",{active:this.dashboardConfigurationStore.ShowNavBar}]),"data-bs-theme":s.dashboardConfigurationStore.Configuration.Server.dashboard_theme,style:{height:"calc(-50px + 100vh)"}},[h("nav",qE,[h("div",GE,[h("ul",JE,[h("li",XE,[Se(r,{class:"nav-link rounded-3",to:"/","exact-active-class":"active"},{default:Pe(()=>[QE,be(" Home")]),_:1})]),h("li",ZE,[Se(r,{class:"nav-link rounded-3",to:"/settings","exact-active-class":"active"},{default:Pe(()=>[eP,be(" Settings")]),_:1})])]),tP,nP,h("ul",sP,[h("li",iP,[(M(!0),F(Te,null,Ue(this.wireguardConfigurationsStore.Configurations,a=>(M(),Le(r,{to:"/configuration/"+a.Name+"/peers",class:"nav-link nav-conf-link rounded-3","active-class":"active"},{default:Pe(()=>[h("span",{class:Ce(["dot me-2",{active:a.Status}])},null,2),be(" "+me(a.Name),1)]),_:2},1032,["to"]))),256))])]),oP,rP,h("ul",aP,[h("li",lP,[Se(r,{to:"/ping",class:"nav-link rounded-3","active-class":"active"},{default:Pe(()=>[be("Ping")]),_:1})]),h("li",cP,[Se(r,{to:"/traceroute",class:"nav-link rounded-3","active-class":"active"},{default:Pe(()=>[be("Traceroute")]),_:1})])]),uP,h("ul",dP,[h("li",hP,[h("a",{class:"nav-link text-danger rounded-3",onClick:e[0]||(e[0]=a=>this.dashboardConfigurationStore.signOut()),role:"button",style:{"font-weight":"bold"}},[fP,be(" Sign Out")])]),h("li",pP,[this.updateAvailable?(M(),F("a",{key:0,href:this.updateUrl,class:"text-decoration-none",target:"_blank"},[h("small",mP,me(this.updateMessage),1)],8,gP)):(M(),F("small",_P,me(this.updateMessage),1))])])])])],10,KE)}const bP=We(UE,[["render",vP],["__scopeId","data-v-a0b378dd"]]),yP={name:"message",props:{message:Object},mounted(){setTimeout(()=>{this.message.show=!1},5e3)}},wP=["id"],xP={class:"card-body"},kP={class:"fw-bold d-block",style:{"text-transform":"uppercase"}};function SP(t,e,n,s,i,o){return M(),F("div",{class:Ce(["card shadow rounded-3 position-relative mb-2",{"text-bg-danger":this.message.type==="danger","text-bg-success":this.message.type==="success","text-bg-warning":this.message.type==="warning"}]),id:this.message.id,style:{width:"400px"}},[h("div",xP,[h("small",kP,"FROM "+me(this.message.from),1),be(" "+me(this.message.content),1)])],10,wP)}const uy=We(yP,[["render",SP]]),$P={name:"index",components:{Message:uy,Navbar:bP},async setup(){return{dashboardConfigurationStore:Xe()}},computed:{getMessages(){return this.dashboardConfigurationStore.Messages.filter(t=>t.show)}}},AP=["data-bs-theme"],CP={class:"row h-100"},EP={class:"col-md-9 ml-sm-auto col-lg-10 px-md-4 overflow-y-scroll mb-0",style:{height:"calc(100vh - 50px)"}},PP={class:"messageCentre text-body position-fixed"};function TP(t,e,n,s,i,o){const r=He("Navbar"),a=He("RouterView"),l=He("Message");return M(),F("div",{class:"container-fluid flex-grow-1 main","data-bs-theme":this.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[h("div",CP,[Se(r),h("main",EP,[(M(),Le(Wh,null,{default:Pe(()=>[Se(a,null,{default:Pe(({Component:c})=>[Se(At,{name:"fade2",mode:"out-in"},{default:Pe(()=>[(M(),Le(Mo(c)))]),_:2},1024)]),_:1})]),_:1})),h("div",PP,[Se(Bi,{name:"message",tag:"div",class:"position-relative"},{default:Pe(()=>[(M(!0),F(Te,null,Ue(o.getMessages.slice().reverse(),c=>(M(),Le(l,{message:c,key:c.id},null,8,["message"]))),128))]),_:1})])])])],8,AP)}const MP=We($P,[["render",TP],["__scopeId","data-v-b776d181"]]);var dy={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(Q_,function(){var n=1e3,s=6e4,i=36e5,o="millisecond",r="second",a="minute",l="hour",c="day",u="week",d="month",f="quarter",g="year",_="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,$={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Y){var L=["th","st","nd","rd"],I=Y%100;return"["+Y+(L[(I-20)%10]||L[I]||L[0])+"]"}},A=function(Y,L,I){var V=String(Y);return!V||V.length>=L?Y:""+Array(L+1-V.length).join(I)+Y},D={s:A,z:function(Y){var L=-Y.utcOffset(),I=Math.abs(L),V=Math.floor(I/60),Q=I%60;return(L<=0?"+":"-")+A(V,2,"0")+":"+A(Q,2,"0")},m:function Y(L,I){if(L.date()<I.date())return-Y(I,L);var V=12*(I.year()-L.year())+(I.month()-L.month()),Q=L.clone().add(V,d),Z=I-Q<0,le=L.clone().add(V+(Z?-1:1),d);return+(-(V+(I-Q)/(Z?Q-le:le-Q))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:d,y:g,w:u,d:c,D:_,h:l,m:a,s:r,ms:o,Q:f}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},x="en",y={};y[x]=$;var S="$isDayjsObject",E=function(Y){return Y instanceof J||!(!Y||!Y[S])},T=function Y(L,I,V){var Q;if(!L)return x;if(typeof L=="string"){var Z=L.toLowerCase();y[Z]&&(Q=Z),I&&(y[Z]=I,Q=Z);var le=L.split("-");if(!Q&&le.length>1)return Y(le[0])}else{var ye=L.name;y[ye]=L,Q=ye}return!V&&Q&&(x=Q),Q||!V&&x},C=function(Y,L){if(E(Y))return Y.clone();var I=typeof L=="object"?L:{};return I.date=Y,I.args=arguments,new J(I)},B=D;B.l=T,B.i=E,B.w=function(Y,L){return C(Y,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var J=function(){function Y(I){this.$L=T(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[S]=!0}var L=Y.prototype;return L.parse=function(I){this.$d=function(V){var Q=V.date,Z=V.utc;if(Q===null)return new Date(NaN);if(B.u(Q))return new Date;if(Q instanceof Date)return new Date(Q);if(typeof Q=="string"&&!/Z$/i.test(Q)){var le=Q.match(b);if(le){var ye=le[2]-1||0,U=(le[7]||"0").substring(0,3);return Z?new Date(Date.UTC(le[1],ye,le[3]||1,le[4]||0,le[5]||0,le[6]||0,U)):new Date(le[1],ye,le[3]||1,le[4]||0,le[5]||0,le[6]||0,U)}}return new Date(Q)}(I),this.init()},L.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},L.$utils=function(){return B},L.isValid=function(){return this.$d.toString()!==m},L.isSame=function(I,V){var Q=C(I);return this.startOf(V)<=Q&&Q<=this.endOf(V)},L.isAfter=function(I,V){return C(I)<this.startOf(V)},L.isBefore=function(I,V){return this.endOf(V)<C(I)},L.$g=function(I,V,Q){return B.u(I)?this[V]:this.set(Q,I)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(I,V){var Q=this,Z=!!B.u(V)||V,le=B.p(I),ye=function(ue,xe){var N=B.w(Q.$u?Date.UTC(Q.$y,xe,ue):new Date(Q.$y,xe,ue),Q);return Z?N:N.endOf(c)},U=function(ue,xe){return B.w(Q.toDate()[ue].apply(Q.toDate("s"),(Z?[0,0,0,0]:[23,59,59,999]).slice(xe)),Q)},X=this.$W,R=this.$M,ee=this.$D,oe="set"+(this.$u?"UTC":"");switch(le){case g:return Z?ye(1,0):ye(31,11);case d:return Z?ye(1,R):ye(0,R+1);case u:var P=this.$locale().weekStart||0,se=(X<P?X+7:X)-P;return ye(Z?ee-se:ee+(6-se),R);case c:case _:return U(oe+"Hours",0);case l:return U(oe+"Minutes",1);case a:return U(oe+"Seconds",2);case r:return U(oe+"Milliseconds",3);default:return this.clone()}},L.endOf=function(I){return this.startOf(I,!1)},L.$set=function(I,V){var Q,Z=B.p(I),le="set"+(this.$u?"UTC":""),ye=(Q={},Q[c]=le+"Date",Q[_]=le+"Date",Q[d]=le+"Month",Q[g]=le+"FullYear",Q[l]=le+"Hours",Q[a]=le+"Minutes",Q[r]=le+"Seconds",Q[o]=le+"Milliseconds",Q)[Z],U=Z===c?this.$D+(V-this.$W):V;if(Z===d||Z===g){var X=this.clone().set(_,1);X.$d[ye](U),X.init(),this.$d=X.set(_,Math.min(this.$D,X.daysInMonth())).$d}else ye&&this.$d[ye](U);return this.init(),this},L.set=function(I,V){return this.clone().$set(I,V)},L.get=function(I){return this[B.p(I)]()},L.add=function(I,V){var Q,Z=this;I=Number(I);var le=B.p(V),ye=function(R){var ee=C(Z);return B.w(ee.date(ee.date()+Math.round(R*I)),Z)};if(le===d)return this.set(d,this.$M+I);if(le===g)return this.set(g,this.$y+I);if(le===c)return ye(1);if(le===u)return ye(7);var U=(Q={},Q[a]=s,Q[l]=i,Q[r]=n,Q)[le]||1,X=this.$d.getTime()+I*U;return B.w(X,this)},L.subtract=function(I,V){return this.add(-1*I,V)},L.format=function(I){var V=this,Q=this.$locale();if(!this.isValid())return Q.invalidDate||m;var Z=I||"YYYY-MM-DDTHH:mm:ssZ",le=B.z(this),ye=this.$H,U=this.$m,X=this.$M,R=Q.weekdays,ee=Q.months,oe=Q.meridiem,P=function(xe,N,he,v){return xe&&(xe[N]||xe(V,Z))||he[N].slice(0,v)},se=function(xe){return B.s(ye%12||12,xe,"0")},ue=oe||function(xe,N,he){var v=xe<12?"AM":"PM";return he?v.toLowerCase():v};return Z.replace(w,function(xe,N){return N||function(he){switch(he){case"YY":return String(V.$y).slice(-2);case"YYYY":return B.s(V.$y,4,"0");case"M":return X+1;case"MM":return B.s(X+1,2,"0");case"MMM":return P(Q.monthsShort,X,ee,3);case"MMMM":return P(ee,X);case"D":return V.$D;case"DD":return B.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return P(Q.weekdaysMin,V.$W,R,2);case"ddd":return P(Q.weekdaysShort,V.$W,R,3);case"dddd":return R[V.$W];case"H":return String(ye);case"HH":return B.s(ye,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return ue(ye,U,!0);case"A":return ue(ye,U,!1);case"m":return String(U);case"mm":return B.s(U,2,"0");case"s":return String(V.$s);case"ss":return B.s(V.$s,2,"0");case"SSS":return B.s(V.$ms,3,"0");case"Z":return le}return null}(xe)||le.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(I,V,Q){var Z,le=this,ye=B.p(V),U=C(I),X=(U.utcOffset()-this.utcOffset())*s,R=this-U,ee=function(){return B.m(le,U)};switch(ye){case g:Z=ee()/12;break;case d:Z=ee();break;case f:Z=ee()/3;break;case u:Z=(R-X)/6048e5;break;case c:Z=(R-X)/864e5;break;case l:Z=R/i;break;case a:Z=R/s;break;case r:Z=R/n;break;default:Z=R}return Q?Z:B.a(Z)},L.daysInMonth=function(){return this.endOf(d).$D},L.$locale=function(){return y[this.$L]},L.locale=function(I,V){if(!I)return this.$L;var Q=this.clone(),Z=T(I,V,!0);return Z&&(Q.$L=Z),Q},L.clone=function(){return B.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},Y}(),ae=J.prototype;return C.prototype=ae,[["$ms",o],["$s",r],["$m",a],["$H",l],["$W",c],["$M",d],["$y",g],["$D",_]].forEach(function(Y){ae[Y[1]]=function(L){return this.$g(L,Y[0],Y[1])}}),C.extend=function(Y,L){return Y.$i||(Y(L,J,C),Y.$i=!0),C},C.locale=T,C.isDayjs=E,C.unix=function(Y){return C(1e3*Y)},C.en=y[x],C.Ls=y,C.p={},C})})(dy);var DP=dy.exports;const Cn=sS(DP),OP={name:"RemoteServer",props:{server:Object},data(){return{active:!1,startTime:void 0,endTime:void 0,errorMsg:"",refreshing:!1}},methods:{async handshake(){this.active=!1,this.server.host&&this.server.apiKey&&(this.refreshing=!0,this.startTime=void 0,this.endTime=void 0,this.startTime=Cn(),await fetch(`${this.server.host}/api/handshake`,{headers:{"content-type":"application/json","wg-dashboard-apikey":this.server.apiKey},method:"GET",signal:AbortSignal.timeout(5e3)}).then(t=>{if(t.status===200)return t.json();throw new Error(t.statusText)}).then(()=>{this.endTime=Cn(),this.active=!0}).catch(t=>{this.active=!1,this.errorMsg=t}),this.refreshing=!1)},async connect(){await fetch(`${this.server.host}/api/authenticate`,{headers:{"content-type":"application/json","wg-dashboard-apikey":this.server.apiKey},body:JSON.stringify({host:window.location.hostname}),method:"POST",signal:AbortSignal.timeout(5e3)}).then(t=>t.json()).then(t=>{this.$emit("setActiveServer"),this.$router.push("/")})}},mounted(){this.handshake()},computed:{getHandshakeTime(){return this.startTime&&this.endTime?`${Cn().subtract(this.startTime).millisecond()}ms`:this.refreshing?"Pinging...":this.errorMsg?this.errorMsg:"N/A"}}},Rr=t=>(Ut("data-v-03a1c13c"),t=t(),Kt(),t),IP={class:"card rounded-3"},RP={class:"card-body"},LP={class:"d-flex gap-3 w-100 remoteServerContainer"},NP={class:"d-flex gap-3 align-items-center flex-grow-1"},FP=Rr(()=>h("i",{class:"bi bi-server"},null,-1)),BP={class:"d-flex gap-3 align-items-center flex-grow-1"},VP=Rr(()=>h("i",{class:"bi bi-key-fill"},null,-1)),HP={class:"d-flex gap-2 button-group"},jP=Rr(()=>h("i",{class:"bi bi-trash"},null,-1)),WP=[jP],zP=Rr(()=>h("i",{class:"bi bi-arrow-right-circle"},null,-1)),YP=[zP],UP={class:"card-footer gap-2 d-flex align-items-center"},KP={key:0,class:"spin ms-auto text-primary-emphasis"},qP=Rr(()=>h("i",{class:"bi bi-arrow-clockwise"},null,-1)),GP=[qP],JP=Rr(()=>h("i",{class:"bi bi-arrow-clockwise me"},null,-1)),XP=[JP];function QP(t,e,n,s,i,o){return M(),F("div",IP,[h("div",RP,[h("div",LP,[h("div",NP,[FP,Oe(h("input",{class:"form-control form-control-sm",onBlur:e[0]||(e[0]=r=>this.handshake()),"onUpdate:modelValue":e[1]||(e[1]=r=>this.server.host=r),type:"url"},null,544),[[je,this.server.host]])]),h("div",BP,[VP,Oe(h("input",{class:"form-control form-control-sm",onBlur:e[2]||(e[2]=r=>this.handshake()),"onUpdate:modelValue":e[3]||(e[3]=r=>this.server.apiKey=r),type:"text"},null,544),[[je,this.server.apiKey]])]),h("div",HP,[h("button",{onClick:e[4]||(e[4]=r=>this.$emit("delete")),class:"ms-auto btn btn-sm bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle"},WP),h("button",{onClick:e[5]||(e[5]=r=>this.connect()),class:Ce([{disabled:!this.active},"ms-auto btn btn-sm bg-success-subtle text-success-emphasis border-1 border-success-subtle"])},YP,2)])])]),h("div",UP,[h("span",{class:Ce(["dot ms-0 me-2",[this.active?"active":"inactive"]])},null,2),h("small",null,me(this.getHandshakeTime),1),this.refreshing?(M(),F("div",KP,GP)):(M(),F("a",{key:1,role:"button",onClick:e[6]||(e[6]=r=>this.handshake()),class:"text-primary-emphasis text-decoration-none ms-auto disabled"},XP))])])}const ZP=We(OP,[["render",QP],["__scopeId","data-v-03a1c13c"]]),eT={name:"RemoteServerList",setup(){return{store:Xe()}},components:{RemoteServer:ZP}},tT={class:"w-100 mt-3"},nT={class:"d-flex align-items-center mb-3"},sT=h("h5",{class:"mb-0"},"Server List",-1),iT=h("i",{class:"bi bi-plus-circle-fill me-2"},null,-1),oT={class:"w-100 d-flex gap-3 flex-column p-3 border border-1 border-secondary-subtle rounded-3",style:{height:"400px","overflow-y":"scroll"}},rT={key:0,class:"text-muted m-auto"},aT=h("i",{class:"bi bi-plus-circle-fill mx-1"},null,-1);function lT(t,e,n,s,i,o){const r=He("RemoteServer");return M(),F("div",tT,[h("div",nT,[sT,h("button",{onClick:e[0]||(e[0]=a=>this.store.addCrossServerConfiguration()),class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle shadow-sm ms-auto"},[iT,be("Server ")])]),h("div",oT,[(M(!0),F(Te,null,Ue(this.store.CrossServerConfiguration.ServerList,(a,l)=>(M(),Le(r,{onSetActiveServer:c=>this.store.setActiveCrossServer(l),onDelete:c=>this.store.deleteCrossServerConfiguration(l),key:l,server:a},null,8,["onSetActiveServer","onDelete","server"]))),128)),Object.keys(this.store.CrossServerConfiguration.ServerList).length===0?(M(),F("h6",rT,[be(" Click"),aT,be("to add your server")])):re("",!0)])])}const cT=We(eT,[["render",lT]]),uT={name:"signin",components:{RemoteServerList:cT,Message:uy},async setup(){const t=Xe();let e="dark",n=!1,s;return t.IsElectronApp||await Promise.all([wt("/api/getDashboardTheme",{},i=>{e=i.data}),wt("/api/isTotpEnabled",{},i=>{n=i.data}),wt("/api/getDashboardVersion",{},i=>{s=i.data})]),t.removeActiveCrossServer(),{store:t,theme:e,totpEnabled:n,version:s}},data(){return{username:"",password:"",totp:"",loginError:!1,loginErrorMessage:"",loading:!1}},computed:{getMessages(){return this.store.Messages.filter(t=>t.show)}},methods:{async auth(){this.username&&this.password&&(this.totpEnabled&&this.totp||!this.totpEnabled)?(this.loading=!0,await ht("/api/authenticate",{username:this.username,password:this.password,totp:this.totp},t=>{t.status?(this.loginError=!1,this.$refs.signInBtn.classList.add("signedIn"),t.message?this.$router.push("/welcome"):this.store.Redirect!==void 0?this.$router.push(this.store.Redirect):this.$router.push("/")):(this.loginError=!0,this.loginErrorMessage=t.message,document.querySelectorAll("input[required]").forEach(e=>{e.classList.remove("is-valid"),e.classList.add("is-invalid")}),this.loading=!1)})):document.querySelectorAll("input[required]").forEach(t=>{t.value.length===0?(t.classList.remove("is-valid"),t.classList.add("is-invalid")):(t.classList.remove("is-invalid"),t.classList.add("is-valid"))})}}},ti=t=>(Ut("data-v-e351e82c"),t=t(),Kt(),t),dT=["data-bs-theme"],hT={class:"login-box m-auto"},fT={class:"m-auto",style:{width:"700px"}},pT=ti(()=>h("h4",{class:"mb-0 text-body"},"Welcome to",-1)),gT=ti(()=>h("span",{class:"dashboardLogo display-3"},[h("strong",null,"WGDashboard")],-1)),mT={key:0,class:"alert alert-danger mt-2 mb-0",role:"alert"},_T={class:"form-group text-body"},vT=ti(()=>h("label",{for:"username",class:"text-left",style:{"font-size":"1rem"}},[h("i",{class:"bi bi-person-circle"})],-1)),bT={class:"form-group text-body"},yT=ti(()=>h("label",{for:"password",class:"text-left",style:{"font-size":"1rem"}},[h("i",{class:"bi bi-key-fill"})],-1)),wT={key:0,class:"form-group text-body"},xT=ti(()=>h("label",{for:"totp",class:"text-left",style:{"font-size":"1rem"}},[h("i",{class:"bi bi-lock-fill"})],-1)),kT={class:"btn btn-lg btn-dark ms-auto mt-4 w-100 d-flex btn-brand signInBtn",ref:"signInBtn"},ST={key:0,class:"d-flex w-100"},$T=ti(()=>h("i",{class:"ms-auto bi bi-chevron-right"},null,-1)),AT={key:1,class:"d-flex w-100 align-items-center"},CT=ti(()=>h("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},[h("span",{class:"visually-hidden"},"Loading...")],-1)),ET={key:3,class:"d-flex mt-3"},PT={class:"form-check form-switch ms-auto"},TT=ti(()=>h("label",{class:"form-check-label",for:"flexSwitchCheckChecked"},"Access Remote Server",-1)),MT={class:"text-muted pb-3 d-block w-100 text-center mt-3"},DT=ti(()=>h("a",{href:"https://github.com/donaldzou",target:"_blank"},[h("strong",null,"Donald Zou")],-1)),OT={class:"messageCentre text-body position-absolute end-0 m-3"};function IT(t,e,n,s,i,o){const r=He("RemoteServerList"),a=He("Message");return M(),F("div",{class:"container-fluid login-container-fluid d-flex main flex-column py-4 text-body",style:{"overflow-y":"scroll"},"data-bs-theme":this.theme},[h("div",hT,[h("div",fT,[pT,gT,i.loginError?(M(),F("div",mT,me(this.loginErrorMessage),1)):re("",!0),this.store.CrossServerConfiguration.Enable?(M(),Le(r,{key:2})):(M(),F("form",{key:1,onSubmit:e[3]||(e[3]=l=>{l.preventDefault(),this.auth()})},[h("div",_T,[vT,Oe(h("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=l=>i.username=l),class:"form-control",id:"username",name:"username",autocomplete:"on",placeholder:"Username",required:""},null,512),[[je,i.username]])]),h("div",bT,[yT,Oe(h("input",{type:"password","onUpdate:modelValue":e[1]||(e[1]=l=>i.password=l),class:"form-control",id:"password",name:"password",autocomplete:"on",placeholder:"Password",required:""},null,512),[[je,i.password]])]),s.totpEnabled?(M(),F("div",wT,[xT,Oe(h("input",{class:"form-control totp",required:"",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code",placeholder:"OTP from your authenticator","onUpdate:modelValue":e[2]||(e[2]=l=>this.totp=l)},null,512),[[je,this.totp]])])):re("",!0),h("button",kT,[this.loading?(M(),F("span",AT,[be(" Signing In... "),CT])):(M(),F("span",ST,[be(" Sign In"),$T]))],512)],32)),this.store.IsElectronApp?re("",!0):(M(),F("div",ET,[h("div",PT,[Oe(h("input",{"onUpdate:modelValue":e[4]||(e[4]=l=>this.store.CrossServerConfiguration.Enable=l),class:"form-check-input",type:"checkbox",role:"switch",id:"flexSwitchCheckChecked"},null,512),[[_n,this.store.CrossServerConfiguration.Enable]]),TT])]))])]),h("small",MT,[be(" WGDashboard "+me(this.version)+" | Developed with ❤️ by ",1),DT]),h("div",OT,[Se(Bi,{name:"message",tag:"div",class:"position-relative"},{default:Pe(()=>[(M(!0),F(Te,null,Ue(o.getMessages.slice().reverse(),l=>(M(),Le(a,{message:l,key:l.id},null,8,["message"]))),128))]),_:1})])],8,dT)}const RT=We(uT,[["render",IT],["__scopeId","data-v-e351e82c"]]),LT={name:"configurationCard",props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String}},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:Xe()}},methods:{toggle(){this.configurationToggling=!0,wt("/api/toggleWireguardConfiguration/",{configurationName:this.c.Name},t=>{t.status?this.dashboardConfigurationStore.newMessage("Server",`${this.c.Name} is ${t.data?"is on":"is off"}`):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.c.Status=t.data,this.configurationToggling=!1})}}},NT={class:"card conf_card rounded-3 shadow text-decoration-none"},FT={class:"mb-0"},BT={class:"card-title mb-0"},VT=h("h6",{class:"mb-0 ms-auto"},[h("i",{class:"bi bi-chevron-right"})],-1),HT={class:"card-footer d-flex gap-2 flex-column"},jT={class:"row"},WT={class:"col-6 col-md-3"},zT=h("i",{class:"bi bi-arrow-down-up me-2"},null,-1),YT={class:"text-primary-emphasis col-6 col-md-3"},UT=h("i",{class:"bi bi-arrow-down me-2"},null,-1),KT={class:"text-success-emphasis col-6 col-md-3"},qT=h("i",{class:"bi bi-arrow-up me-2"},null,-1),GT={class:"text-md-end col-6 col-md-3"},JT={class:"d-flex align-items-center gap-2"},XT=h("small",{class:"text-muted"},[h("strong",{style:{"word-break":"keep-all"}},"Public Key")],-1),QT={class:"mb-0 d-block d-lg-inline-block"},ZT={style:{"line-break":"anywhere"}},eM={class:"form-check form-switch ms-auto"},tM=["for"],nM={key:0,class:"spinner-border spinner-border-sm","aria-hidden":"true"},sM=["disabled","id"];function iM(t,e,n,s,i,o){const r=He("RouterLink");return M(),F("div",NT,[Se(r,{to:"/configuration/"+n.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:Pe(()=>[h("h6",FT,[h("span",{class:Ce(["dot",{active:n.c.Status}])},null,2)]),h("h6",BT,[h("samp",null,me(n.c.Name),1)]),VT]),_:1},8,["to"]),h("div",HT,[h("div",jT,[h("small",WT,[zT,be(me(n.c.DataUsage.Total>0?n.c.DataUsage.Total.toFixed(4):0)+" GB ",1)]),h("small",YT,[UT,be(me(n.c.DataUsage.Receive>0?n.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)]),h("small",KT,[qT,be(me(n.c.DataUsage.Sent>0?n.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)]),h("small",GT,[h("span",{class:Ce(["dot me-2",{active:n.c.ConnectedPeers>0}])},null,2),be(me(n.c.ConnectedPeers)+" Peers ",1)])]),h("div",JT,[XT,h("small",QT,[h("samp",ZT,me(n.c.PublicKey),1)]),h("div",eM,[h("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+n.c.PrivateKey},[be(me(this.configurationToggling?"Turning ":"")+" "+me(n.c.Status?"On":"Off")+" ",1),this.configurationToggling?(M(),F("span",nM)):re("",!0)],8,tM),Oe(h("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+n.c.PrivateKey,onChange:e[0]||(e[0]=a=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=a=>n.c.Status=a)},null,40,sM),[[_n,n.c.Status]])])])])])}const oM=We(LT,[["render",iM]]),rM={name:"configurationList",components:{ConfigurationCard:oM},async setup(){return{wireguardConfigurationsStore:Tn()}},data(){return{configurationLoaded:!1}},async mounted(){await this.wireguardConfigurationsStore.getConfigurations(),this.configurationLoaded=!0,this.wireguardConfigurationsStore.ConfigurationListInterval=setInterval(()=>{this.wireguardConfigurationsStore.getConfigurations()},1e4)},beforeUnmount(){clearInterval(this.wireguardConfigurationsStore.ConfigurationListInterval)}},hy=t=>(Ut("data-v-bff52ca5"),t=t(),Kt(),t),aM={class:"mt-md-5 mt-3"},lM={class:"container-md"},cM={class:"d-flex mb-4 configurationListTitle"},uM=hy(()=>h("h3",{class:"text-body d-flex"},[h("i",{class:"bi bi-body-text me-2"}),h("span",null,"WireGuard Configurations")],-1)),dM=hy(()=>h("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),hM={key:0},fM={key:0,class:"text-muted"},pM={key:1,class:"d-flex gap-3 flex-column mb-3"};function gM(t,e,n,s,i,o){const r=He("RouterLink"),a=He("ConfigurationCard");return M(),F("div",aM,[h("div",lM,[h("div",cM,[uM,Se(r,{to:"/new_configuration",class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto rounded-3"},{default:Pe(()=>[dM,be(" Configuration ")]),_:1})]),Se(At,{name:"fade",mode:"out-in"},{default:Pe(()=>[this.configurationLoaded?(M(),F("div",hM,[this.wireguardConfigurationsStore.Configurations.length===0?(M(),F("p",fM,` You don't have any WireGuard configurations yet. Please check the configuration folder or change it in "Settings". By default the folder is "/etc/wireguard". `)):(M(),F("div",pM,[(M(!0),F(Te,null,Ue(this.wireguardConfigurationsStore.Configurations,l=>(M(),Le(a,{key:l.Name,c:l},null,8,["c"]))),128))]))])):re("",!0)]),_:1})])])}const mM=We(rM,[["render",gM],["__scopeId","data-v-bff52ca5"]]);let Pl;const _M=new Uint8Array(16);function vM(){if(!Pl&&(Pl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Pl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Pl(_M)}const sn=[];for(let t=0;t<256;++t)sn.push((t+256).toString(16).slice(1));function bM(t,e=0){return sn[t[e+0]]+sn[t[e+1]]+sn[t[e+2]]+sn[t[e+3]]+"-"+sn[t[e+4]]+sn[t[e+5]]+"-"+sn[t[e+6]]+sn[t[e+7]]+"-"+sn[t[e+8]]+sn[t[e+9]]+"-"+sn[t[e+10]]+sn[t[e+11]]+sn[t[e+12]]+sn[t[e+13]]+sn[t[e+14]]+sn[t[e+15]]}const yM=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),tm={randomUUID:yM};function Ps(t,e,n){if(tm.randomUUID&&!e&&!t)return tm.randomUUID();t=t||{};const s=t.random||(t.rng||vM)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=s[i];return e}return bM(s)}const wM={props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=Xe(),e=`input_${Ps()}`;return{store:t,uuid:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Peers[this.targetData]},methods:{async useValidation(){this.changed&&await ht("/api/updateDashboardConfigurationItem",{section:"Peers",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Peers[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message),this.changed=!1,this.updating=!1})}}},xM={class:"form-group mb-2"},kM=["for"],SM=["id","disabled"],$M={class:"invalid-feedback"},AM={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1"},CM=h("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1),EM=["innerHTML"];function PM(t,e,n,s,i,o){return M(),F("div",xM,[h("label",{for:this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,me(this.title),1)])],8,kM),Oe(h("input",{type:"text",class:Ce(["form-control",{"is-invalid":i.showInvalidFeedback,"is-valid":i.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=r=>this.value=r),onKeydown:e[1]||(e[1]=r=>this.changed=!0),onBlur:e[2]||(e[2]=r=>o.useValidation()),disabled:this.updating},null,42,SM),[[je,this.value]]),h("div",$M,me(this.invalidFeedback),1),n.warning?(M(),F("div",AM,[h("small",null,[CM,h("span",{innerHTML:n.warningText},null,8,EM)])])):re("",!0)])}const TM=We(wM,[["render",PM]]),MM=t=>{},DM={name:"accountSettingsInputUsername",props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=Xe(),e=`input_${Ps()}`;return{store:t,uuid:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Account[this.targetData]},methods:{async useValidation(){this.changed&&(this.updating=!0,await ht("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message),this.changed=!1,this.updating=!1}))}}},OM={class:"form-group mb-2"},IM=["for"],RM=["id","disabled"],LM={class:"invalid-feedback"},NM={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1"},FM=h("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1),BM=["innerHTML"];function VM(t,e,n,s,i,o){return M(),F("div",OM,[h("label",{for:this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,me(this.title),1)])],8,IM),Oe(h("input",{type:"text",class:Ce(["form-control",{"is-invalid":i.showInvalidFeedback,"is-valid":i.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=r=>this.value=r),onKeydown:e[1]||(e[1]=r=>this.changed=!0),onBlur:e[2]||(e[2]=r=>o.useValidation()),disabled:this.updating},null,42,RM),[[je,this.value]]),h("div",LM,me(this.invalidFeedback),1),n.warning?(M(),F("div",NM,[h("small",null,[FM,h("span",{innerHTML:n.warningText},null,8,BM)])])):re("",!0)])}const HM=We(DM,[["render",VM]]),jM={name:"accountSettingsInputPassword",props:{targetData:String,warning:!1,warningText:""},setup(){const t=Xe(),e=`input_${Ps()}`;return{store:t,uuid:e}},data(){return{value:{currentPassword:"",newPassword:"",repeatNewPassword:""},invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0}},methods:{async useValidation(){Object.values(this.value).find(t=>t.length===0)===void 0?this.value.newPassword===this.value.repeatNewPassword?await ht("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.isValid=!1,this.value={currentPassword:"",newPassword:"",repeatNewPassword:""}},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message)}):(this.showInvalidFeedback=!0,this.invalidFeedback="New passwords does not match"):(this.showInvalidFeedback=!0,this.invalidFeedback="Please fill in all required fields.")}},computed:{passwordValid(){return Object.values(this.value).find(t=>t.length===0)===void 0&&this.value.newPassword===this.value.repeatNewPassword}}},WM={class:"d-flex flex-column"},zM={class:"row"},YM={class:"col-sm"},UM={class:"form-group mb-2"},KM=["for"],qM=h("strong",null,[h("small",null,"Current Password")],-1),GM=[qM],JM=["id"],XM={key:0,class:"invalid-feedback d-block"},QM={class:"col-sm"},ZM={class:"form-group mb-2"},eD=["for"],tD=h("strong",null,[h("small",null,"New Password")],-1),nD=[tD],sD=["id"],iD={class:"col-sm"},oD={class:"form-group mb-2"},rD=["for"],aD=h("strong",null,[h("small",null,"Repeat New Password")],-1),lD=[aD],cD=["id"],uD=["disabled"],dD=h("i",{class:"bi bi-save2-fill me-2"},null,-1);function hD(t,e,n,s,i,o){return M(),F("div",WM,[h("div",zM,[h("div",YM,[h("div",UM,[h("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},GM,8,KM),Oe(h("input",{type:"password",class:Ce(["form-control mb-2",{"is-invalid":i.showInvalidFeedback,"is-valid":i.isValid}]),"onUpdate:modelValue":e[0]||(e[0]=r=>this.value.currentPassword=r),id:"currentPassword_"+this.uuid},null,10,JM),[[je,this.value.currentPassword]]),i.showInvalidFeedback?(M(),F("div",XM,me(this.invalidFeedback),1)):re("",!0)])]),h("div",QM,[h("div",ZM,[h("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},nD,8,eD),Oe(h("input",{type:"password",class:Ce(["form-control mb-2",{"is-invalid":i.showInvalidFeedback,"is-valid":i.isValid}]),"onUpdate:modelValue":e[1]||(e[1]=r=>this.value.newPassword=r),id:"newPassword_"+this.uuid},null,10,sD),[[je,this.value.newPassword]])])]),h("div",iD,[h("div",oD,[h("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},lD,8,rD),Oe(h("input",{type:"password",class:Ce(["form-control mb-2",{"is-invalid":i.showInvalidFeedback,"is-valid":i.isValid}]),"onUpdate:modelValue":e[2]||(e[2]=r=>this.value.repeatNewPassword=r),id:"repeatNewPassword_"+this.uuid},null,10,cD),[[je,this.value.repeatNewPassword]])])])]),h("button",{disabled:!this.passwordValid,class:"ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",onClick:e[3]||(e[3]=r=>this.useValidation())},[dD,be("Update Password ")],8,uD)])}const fD=We(jM,[["render",hD]]),pD={name:"dashboardSettingsInputWireguardConfigurationPath",props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=Xe(),e=Tn(),n=`input_${Ps()}`;return{store:t,uuid:n,WireguardConfigurationStore:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Server[this.targetData]},methods:{async useValidation(){this.changed&&(this.updating=!0,await ht("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3),this.WireguardConfigurationStore.getConfigurations(),this.store.newMessage("Server","WireGuard configuration path saved","success")):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message),this.changed=!1,this.updating=!1}))}}},gD={class:"form-group"},mD=["for"],_D={class:"d-flex gap-2 align-items-start mb-2"},vD={class:"flex-grow-1"},bD=["id","disabled"],yD={class:"invalid-feedback fw-bold"},wD=["disabled"],xD={key:0,class:"bi bi-save2-fill"},kD={key:1,class:"spinner-border spinner-border-sm"},SD={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1 mb-2"},$D=h("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1),AD=["innerHTML"];function CD(t,e,n,s,i,o){return M(),F("div",gD,[h("label",{for:this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,me(this.title),1)])],8,mD),h("div",_D,[h("div",vD,[Oe(h("input",{type:"text",class:Ce(["form-control rounded-3",{"is-invalid":this.showInvalidFeedback,"is-valid":this.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=r=>this.value=r),onKeydown:e[1]||(e[1]=r=>this.changed=!0),disabled:this.updating},null,42,bD),[[je,this.value]]),h("div",yD,me(this.invalidFeedback),1)]),h("button",{onClick:e[2]||(e[2]=r=>this.useValidation()),disabled:!this.changed,class:"ms-auto btn rounded-3 border-success-subtle bg-success-subtle text-success-emphasis"},[this.updating?(M(),F("span",kD)):(M(),F("i",xD))],8,wD)]),n.warning?(M(),F("div",SD,[h("small",null,[$D,h("span",{innerHTML:n.warningText},null,8,AD)])])):re("",!0)])}const ED=We(pD,[["render",CD]]),PD={name:"dashboardTheme",setup(){return{dashboardConfigurationStore:Xe()}},methods:{async switchTheme(t){await ht("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:t},e=>{e.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=t)})}}},TD={class:"card mb-4 shadow rounded-3"},MD=h("p",{class:"card-header"},"Dashboard Theme",-1),DD={class:"card-body d-flex gap-2"},OD=h("i",{class:"bi bi-sun-fill"},null,-1),ID=h("i",{class:"bi bi-moon-fill"},null,-1);function RD(t,e,n,s,i,o){return M(),F("div",TD,[MD,h("div",DD,[h("button",{class:Ce(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="light"}]),onClick:e[0]||(e[0]=r=>this.switchTheme("light"))},[OD,be(" Light ")],2),h("button",{class:Ce(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="dark"}]),onClick:e[1]||(e[1]=r=>this.switchTheme("dark"))},[ID,be(" Dark ")],2)])])}const LD=We(PD,[["render",RD]]),ND={name:"dashboardSettingsInputIPAddressAndPort",props:{},setup(){const t=Xe(),e=`input_${Ps()}`;return{store:t,uuid:e}},data(){return{app_ip:"",app_port:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.app_ip=this.store.Configuration.Server.app_ip,this.app_port=this.store.Configuration.Server.app_port},methods:{async useValidation(){this.changed&&await ht("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message)})}}},FD={class:"invalid-feedback d-block mt-0"},BD={class:"row"},VD={class:"form-group mb-2 col-sm"},HD=["for"],jD=h("strong",null,[h("small",null,"Dashboard IP Address")],-1),WD=[jD],zD=["id"],YD=h("div",{class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block"},[h("small",null,[h("i",{class:"bi bi-exclamation-triangle-fill me-2"}),h("code",null,"0.0.0.0"),be(" means it can be access by anyone with your server IP Address.")])],-1),UD={class:"form-group col-sm"},KD=["for"],qD=h("strong",null,[h("small",null,"Dashboard Port")],-1),GD=[qD],JD=["id"],XD=h("button",{class:"btn btn-success btn-sm fw-bold rounded-3"},[h("i",{class:"bi bi-floppy-fill me-2"}),be("Update Dashboard Settings & Restart ")],-1);function QD(t,e,n,s,i,o){return M(),F("div",null,[h("div",FD,me(this.invalidFeedback),1),h("div",BD,[h("div",VD,[h("label",{for:"app_ip_"+this.uuid,class:"text-muted mb-1"},WD,8,HD),Oe(h("input",{type:"text",class:"form-control mb-2",id:"app_ip_"+this.uuid,"onUpdate:modelValue":e[0]||(e[0]=r=>this.app_ip=r)},null,8,zD),[[je,this.app_ip]]),YD]),h("div",UD,[h("label",{for:"app_port_"+this.uuid,class:"text-muted mb-1"},GD,8,KD),Oe(h("input",{type:"text",class:"form-control mb-2",id:"app_port_"+this.uuid,"onUpdate:modelValue":e[1]||(e[1]=r=>this.app_port=r)},null,8,JD),[[je,this.app_port]])])]),XD])}const ZD=We(ND,[["render",QD]]);function Ne(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function ot(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function is(t,e){const n=Ne(t);return isNaN(e)?ot(t,NaN):(e&&n.setDate(n.getDate()+e),n)}function ls(t,e){const n=Ne(t);if(isNaN(e))return ot(t,NaN);if(!e)return n;const s=n.getDate(),i=ot(t,n.getTime());i.setMonth(n.getMonth()+e+1,0);const o=i.getDate();return s>=o?i:(n.setFullYear(i.getFullYear(),i.getMonth(),s),n)}function fy(t,e){const{years:n=0,months:s=0,weeks:i=0,days:o=0,hours:r=0,minutes:a=0,seconds:l=0}=e,c=Ne(t),u=s||n?ls(c,s+n*12):c,d=o||i?is(u,o+i*7):u,f=a+r*60,_=(l+f*60)*1e3;return ot(t,d.getTime()+_)}function e2(t,e){const n=+Ne(t);return ot(t,n+e)}const py=6048e5,t2=864e5,n2=6e4,gy=36e5,s2=1e3;function i2(t,e){return e2(t,e*gy)}let o2={};function Oo(){return o2}function us(t,e){const n=Oo(),s=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Ne(t),o=i.getDay(),r=(o<s?7:0)+o-s;return i.setDate(i.getDate()-r),i.setHours(0,0,0,0),i}function br(t){return us(t,{weekStartsOn:1})}function my(t){const e=Ne(t),n=e.getFullYear(),s=ot(t,0);s.setFullYear(n+1,0,4),s.setHours(0,0,0,0);const i=br(s),o=ot(t,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const r=br(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=r.getTime()?n:n-1}function nm(t){const e=Ne(t);return e.setHours(0,0,0,0),e}function mc(t){const e=Ne(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function _y(t,e){const n=nm(t),s=nm(e),i=+n-mc(n),o=+s-mc(s);return Math.round((i-o)/t2)}function r2(t){const e=my(t),n=ot(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),br(n)}function a2(t,e){const n=e*3;return ls(t,n)}function sf(t,e){return ls(t,e*12)}function sm(t,e){const n=Ne(t),s=Ne(e),i=n.getTime()-s.getTime();return i<0?-1:i>0?1:i}function vy(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function va(t){if(!vy(t)&&typeof t!="number")return!1;const e=Ne(t);return!isNaN(Number(e))}function im(t){const e=Ne(t);return Math.trunc(e.getMonth()/3)+1}function l2(t,e){const n=Ne(t),s=Ne(e);return n.getFullYear()-s.getFullYear()}function c2(t,e){const n=Ne(t),s=Ne(e),i=sm(n,s),o=Math.abs(l2(n,s));n.setFullYear(1584),s.setFullYear(1584);const r=sm(n,s)===-i,a=i*(o-+r);return a===0?0:a}function by(t,e){const n=Ne(t.start),s=Ne(t.end);let i=+n>+s;const o=i?+n:+s,r=i?s:n;r.setHours(0,0,0,0);let a=e?.step??1;if(!a)return[];a<0&&(a=-a,i=!i);const l=[];for(;+r<=o;)l.push(Ne(r)),r.setDate(r.getDate()+a),r.setHours(0,0,0,0);return i?l.reverse():l}function go(t){const e=Ne(t),n=e.getMonth(),s=n-n%3;return e.setMonth(s,1),e.setHours(0,0,0,0),e}function u2(t,e){const n=Ne(t.start),s=Ne(t.end);let i=+n>+s;const o=i?+go(n):+go(s);let r=go(i?s:n),a=e?.step??1;if(!a)return[];a<0&&(a=-a,i=!i);const l=[];for(;+r<=o;)l.push(Ne(r)),r=a2(r,a);return i?l.reverse():l}function d2(t){const e=Ne(t);return e.setDate(1),e.setHours(0,0,0,0),e}function yy(t){const e=Ne(t),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}function Ra(t){const e=Ne(t),n=ot(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function wy(t,e){const n=Oo(),s=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Ne(t),o=i.getDay(),r=(o<s?-7:0)+6-(o-s);return i.setDate(i.getDate()+r),i.setHours(23,59,59,999),i}function om(t){const e=Ne(t),n=e.getMonth(),s=n-n%3+3;return e.setMonth(s,0),e.setHours(23,59,59,999),e}const h2={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"}},f2=(t,e,n)=>{let s;const i=h2[t];return typeof i=="string"?s=i:e===1?s=i.one:s=i.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+s:s+" ago":s};function ju(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const p2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},g2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},m2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_2={date:ju({formats:p2,defaultWidth:"full"}),time:ju({formats:g2,defaultWidth:"full"}),dateTime:ju({formats:m2,defaultWidth:"full"})},v2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},b2=(t,e,n,s)=>v2[t];function qr(t){return(e,n)=>{const s=n?.context?String(n.context):"standalone";let i;if(s==="formatting"&&t.formattingValues){const r=t.defaultFormattingWidth||t.defaultWidth,a=n?.width?String(n.width):r;i=t.formattingValues[a]||t.formattingValues[r]}else{const r=t.defaultWidth,a=n?.width?String(n.width):t.defaultWidth;i=t.values[a]||t.values[r]}const o=t.argumentCallback?t.argumentCallback(e):e;return i[o]}}const y2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},w2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},x2={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"]},k2={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"]},S2={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"}},$2={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"}},A2=(t,e)=>{const n=Number(t),s=n%100;if(s>20||s<10)switch(s%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},C2={ordinalNumber:A2,era:qr({values:y2,defaultWidth:"wide"}),quarter:qr({values:w2,defaultWidth:"wide",argumentCallback:t=>t-1}),month:qr({values:x2,defaultWidth:"wide"}),day:qr({values:k2,defaultWidth:"wide"}),dayPeriod:qr({values:S2,defaultWidth:"wide",formattingValues:$2,defaultFormattingWidth:"wide"})};function Gr(t){return(e,n={})=>{const s=n.width,i=s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth],o=e.match(i);if(!o)return null;const r=o[0],a=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?P2(a,d=>d.test(r)):E2(a,d=>d.test(r));let c;c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=e.slice(r.length);return{value:c,rest:u}}}function E2(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function P2(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function T2(t){return(e,n={})=>{const s=e.match(t.matchPattern);if(!s)return null;const i=s[0],o=e.match(t.parsePattern);if(!o)return null;let r=t.valueCallback?t.valueCallback(o[0]):o[0];r=n.valueCallback?n.valueCallback(r):r;const a=e.slice(i.length);return{value:r,rest:a}}}const M2=/^(\d+)(th|st|nd|rd)?/i,D2=/\d+/i,O2={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},I2={any:[/^b/i,/^(a|c)/i]},R2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},L2={any:[/1/i,/2/i,/3/i,/4/i]},N2={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},F2={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]},B2={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},V2={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]},H2={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},j2={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}},W2={ordinalNumber:T2({matchPattern:M2,parsePattern:D2,valueCallback:t=>parseInt(t,10)}),era:Gr({matchPatterns:O2,defaultMatchWidth:"wide",parsePatterns:I2,defaultParseWidth:"any"}),quarter:Gr({matchPatterns:R2,defaultMatchWidth:"wide",parsePatterns:L2,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Gr({matchPatterns:N2,defaultMatchWidth:"wide",parsePatterns:F2,defaultParseWidth:"any"}),day:Gr({matchPatterns:B2,defaultMatchWidth:"wide",parsePatterns:V2,defaultParseWidth:"any"}),dayPeriod:Gr({matchPatterns:H2,defaultMatchWidth:"any",parsePatterns:j2,defaultParseWidth:"any"})},xy={code:"en-US",formatDistance:f2,formatLong:_2,formatRelative:b2,localize:C2,match:W2,options:{weekStartsOn:0,firstWeekContainsDate:1}};function z2(t){const e=Ne(t);return _y(e,Ra(e))+1}function of(t){const e=Ne(t),n=+br(e)-+r2(e);return Math.round(n/py)+1}function rf(t,e){const n=Ne(t),s=n.getFullYear(),i=Oo(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,r=ot(t,0);r.setFullYear(s+1,0,o),r.setHours(0,0,0,0);const a=us(r,e),l=ot(t,0);l.setFullYear(s,0,o),l.setHours(0,0,0,0);const c=us(l,e);return n.getTime()>=a.getTime()?s+1:n.getTime()>=c.getTime()?s:s-1}function Y2(t,e){const n=Oo(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=rf(t,e),o=ot(t,0);return o.setFullYear(i,0,s),o.setHours(0,0,0,0),us(o,e)}function af(t,e){const n=Ne(t),s=+us(n,e)-+Y2(n,e);return Math.round(s/py)+1}function at(t,e){const n=t<0?"-":"",s=Math.abs(t).toString().padStart(e,"0");return n+s}const ui={y(t,e){const n=t.getFullYear(),s=n>0?n:1-n;return at(e==="yy"?s%100:s,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):at(n+1,2)},d(t,e){return at(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return at(t.getHours()%12||12,e.length)},H(t,e){return at(t.getHours(),e.length)},m(t,e){return at(t.getMinutes(),e.length)},s(t,e){return at(t.getSeconds(),e.length)},S(t,e){const n=e.length,s=t.getMilliseconds(),i=Math.trunc(s*Math.pow(10,n-3));return at(i,e.length)}},Ko={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},rm={G:function(t,e,n){const s=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(s,{width:"abbreviated"});case"GGGGG":return n.era(s,{width:"narrow"});case"GGGG":default:return n.era(s,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const s=t.getFullYear(),i=s>0?s:1-s;return n.ordinalNumber(i,{unit:"year"})}return ui.y(t,e)},Y:function(t,e,n,s){const i=rf(t,s),o=i>0?i:1-i;if(e==="YY"){const r=o%100;return at(r,2)}return e==="Yo"?n.ordinalNumber(o,{unit:"year"}):at(o,e.length)},R:function(t,e){const n=my(t);return at(n,e.length)},u:function(t,e){const n=t.getFullYear();return at(n,e.length)},Q:function(t,e,n){const s=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return at(s,2);case"Qo":return n.ordinalNumber(s,{unit:"quarter"});case"QQQ":return n.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,n){const s=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return at(s,2);case"qo":return n.ordinalNumber(s,{unit:"quarter"});case"qqq":return n.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,n){const s=t.getMonth();switch(e){case"M":case"MM":return ui.M(t,e);case"Mo":return n.ordinalNumber(s+1,{unit:"month"});case"MMM":return n.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,n){const s=t.getMonth();switch(e){case"L":return String(s+1);case"LL":return at(s+1,2);case"Lo":return n.ordinalNumber(s+1,{unit:"month"});case"LLL":return n.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,n,s){const i=af(t,s);return e==="wo"?n.ordinalNumber(i,{unit:"week"}):at(i,e.length)},I:function(t,e,n){const s=of(t);return e==="Io"?n.ordinalNumber(s,{unit:"week"}):at(s,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):ui.d(t,e)},D:function(t,e,n){const s=z2(t);return e==="Do"?n.ordinalNumber(s,{unit:"dayOfYear"}):at(s,e.length)},E:function(t,e,n){const s=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(s,{width:"short",context:"formatting"});case"EEEE":default:return n.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,n,s){const i=t.getDay(),o=(i-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return at(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,s){const i=t.getDay(),o=(i-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return at(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){const s=t.getDay(),i=s===0?7:s;switch(e){case"i":return String(i);case"ii":return at(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(s,{width:"short",context:"formatting"});case"iiii":default:return n.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,n){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,n){const s=t.getHours();let i;switch(s===12?i=Ko.noon:s===0?i=Ko.midnight:i=s/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){const s=t.getHours();let i;switch(s>=17?i=Ko.evening:s>=12?i=Ko.afternoon:s>=4?i=Ko.morning:i=Ko.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let s=t.getHours()%12;return s===0&&(s=12),n.ordinalNumber(s,{unit:"hour"})}return ui.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):ui.H(t,e)},K:function(t,e,n){const s=t.getHours()%12;return e==="Ko"?n.ordinalNumber(s,{unit:"hour"}):at(s,e.length)},k:function(t,e,n){let s=t.getHours();return s===0&&(s=24),e==="ko"?n.ordinalNumber(s,{unit:"hour"}):at(s,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):ui.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):ui.s(t,e)},S:function(t,e){return ui.S(t,e)},X:function(t,e,n){const s=t.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return lm(s);case"XXXX":case"XX":return lo(s);case"XXXXX":case"XXX":default:return lo(s,":")}},x:function(t,e,n){const s=t.getTimezoneOffset();switch(e){case"x":return lm(s);case"xxxx":case"xx":return lo(s);case"xxxxx":case"xxx":default:return lo(s,":")}},O:function(t,e,n){const s=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+am(s,":");case"OOOO":default:return"GMT"+lo(s,":")}},z:function(t,e,n){const s=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+am(s,":");case"zzzz":default:return"GMT"+lo(s,":")}},t:function(t,e,n){const s=Math.trunc(t.getTime()/1e3);return at(s,e.length)},T:function(t,e,n){const s=t.getTime();return at(s,e.length)}};function am(t,e=""){const n=t>0?"-":"+",s=Math.abs(t),i=Math.trunc(s/60),o=s%60;return o===0?n+String(i):n+String(i)+e+at(o,2)}function lm(t,e){return t%60===0?(t>0?"-":"+")+at(Math.abs(t)/60,2):lo(t,e)}function lo(t,e=""){const n=t>0?"-":"+",s=Math.abs(t),i=at(Math.trunc(s/60),2),o=at(s%60,2);return n+i+e+o}const cm=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},ky=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},U2=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],s=n[1],i=n[2];if(!i)return cm(t,e);let o;switch(s){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;case"PPPP":default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",cm(s,e)).replace("{{time}}",ky(i,e))},Hd={p:ky,P:U2},K2=/^D+$/,q2=/^Y+$/,G2=["D","DD","YY","YYYY"];function Sy(t){return K2.test(t)}function $y(t){return q2.test(t)}function jd(t,e,n){const s=J2(t,e,n);if(console.warn(s),G2.includes(t))throw new RangeError(s)}function J2(t,e,n){const s=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${s} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const X2=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Q2=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Z2=/^'([^]*?)'?$/,eO=/''/g,tO=/[a-zA-Z]/;function $s(t,e,n){const s=Oo(),i=n?.locale??s.locale??xy,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,a=Ne(t);if(!va(a))throw new RangeError("Invalid time value");let l=e.match(Q2).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=Hd[d];return f(u,i.formatLong)}return u}).join("").match(X2).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:nO(u)};if(rm[d])return{isToken:!0,value:u};if(d.match(tO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const c={firstWeekContainsDate:o,weekStartsOn:r,locale:i};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!n?.useAdditionalWeekYearTokens&&$y(d)||!n?.useAdditionalDayOfYearTokens&&Sy(d))&&jd(d,e,String(t));const f=rm[d[0]];return f(a,d,i.localize,c)}).join("")}function nO(t){const e=t.match(Z2);return e?e[1].replace(eO,"'"):t}function sO(t){return Ne(t).getDay()}function iO(t){const e=Ne(t),n=e.getFullYear(),s=e.getMonth(),i=ot(t,0);return i.setFullYear(n,s+1,0),i.setHours(0,0,0,0),i.getDate()}function oO(){return Object.assign({},Oo())}function Qs(t){return Ne(t).getHours()}function rO(t){let n=Ne(t).getDay();return n===0&&(n=7),n}function Oi(t){return Ne(t).getMinutes()}function Qe(t){return Ne(t).getMonth()}function yr(t){return Ne(t).getSeconds()}function ze(t){return Ne(t).getFullYear()}function wr(t,e){const n=Ne(t),s=Ne(e);return n.getTime()>s.getTime()}function La(t,e){const n=Ne(t),s=Ne(e);return+n<+s}function tr(t,e){const n=Ne(t),s=Ne(e);return+n==+s}function aO(t,e){const n=e instanceof Date?ot(e,0):new e(0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}const lO=10;class Ay{subPriority=0;validate(e,n){return!0}}class cO extends Ay{constructor(e,n,s,i,o){super(),this.value=e,this.validateValue=n,this.setValue=s,this.priority=i,o&&(this.subPriority=o)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,s){return this.setValue(e,n,this.value,s)}}class uO extends Ay{priority=lO;subPriority=-1;set(e,n){return n.timestampIsSet?e:ot(e,aO(e,Date))}}class rt{run(e,n,s,i){const o=this.parse(e,n,s,i);return o?{setter:new cO(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,n,s){return!0}}class dO extends rt{priority=140;parse(e,n,s){switch(n){case"G":case"GG":case"GGG":return s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"});case"GGGGG":return s.era(e,{width:"narrow"});case"GGGG":default:return s.era(e,{width:"wide"})||s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"})}}set(e,n,s){return n.era=s,e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const Ot={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}/},ys={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 It(t,e){return t&&{value:e(t.value),rest:t.rest}}function kt(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function ws(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const s=n[1]==="+"?1:-1,i=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,r=n[5]?parseInt(n[5],10):0;return{value:s*(i*gy+o*n2+r*s2),rest:e.slice(n[0].length)}}function Cy(t){return kt(Ot.anyDigitsSigned,t)}function Tt(t,e){switch(t){case 1:return kt(Ot.singleDigit,e);case 2:return kt(Ot.twoDigits,e);case 3:return kt(Ot.threeDigits,e);case 4:return kt(Ot.fourDigits,e);default:return kt(new RegExp("^\\d{1,"+t+"}"),e)}}function _c(t,e){switch(t){case 1:return kt(Ot.singleDigitSigned,e);case 2:return kt(Ot.twoDigitsSigned,e);case 3:return kt(Ot.threeDigitsSigned,e);case 4:return kt(Ot.fourDigitsSigned,e);default:return kt(new RegExp("^-?\\d{1,"+t+"}"),e)}}function lf(t){switch(t){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 Ey(t,e){const n=e>0,s=n?e:1-e;let i;if(s<=50)i=t||100;else{const o=s+50,r=Math.trunc(o/100)*100,a=t>=o%100;i=t+r-(a?100:0)}return n?i:1-i}function Py(t){return t%400===0||t%4===0&&t%100!==0}class hO extends rt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,n,s){const i=o=>({year:o,isTwoDigitYear:n==="yy"});switch(n){case"y":return It(Tt(4,e),i);case"yo":return It(s.ordinalNumber(e,{unit:"year"}),i);default:return It(Tt(n.length,e),i)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,s){const i=e.getFullYear();if(s.isTwoDigitYear){const r=Ey(s.year,i);return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}const o=!("era"in n)||n.era===1?s.year:1-s.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class fO extends rt{priority=130;parse(e,n,s){const i=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return It(Tt(4,e),i);case"Yo":return It(s.ordinalNumber(e,{unit:"year"}),i);default:return It(Tt(n.length,e),i)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,s,i){const o=rf(e,i);if(s.isTwoDigitYear){const a=Ey(s.year,o);return e.setFullYear(a,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),us(e,i)}const r=!("era"in n)||n.era===1?s.year:1-s.year;return e.setFullYear(r,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),us(e,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class pO extends rt{priority=130;parse(e,n){return _c(n==="R"?4:n.length,e)}set(e,n,s){const i=ot(e,0);return i.setFullYear(s,0,4),i.setHours(0,0,0,0),br(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class gO extends rt{priority=130;parse(e,n){return _c(n==="u"?4:n.length,e)}set(e,n,s){return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class mO extends rt{priority=120;parse(e,n,s){switch(n){case"Q":case"QQ":return Tt(n.length,e);case"Qo":return s.ordinalNumber(e,{unit:"quarter"});case"QQQ":return s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(e,{width:"wide",context:"formatting"})||s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,s){return e.setMonth((s-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class _O extends rt{priority=120;parse(e,n,s){switch(n){case"q":case"qq":return Tt(n.length,e);case"qo":return s.ordinalNumber(e,{unit:"quarter"});case"qqq":return s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(e,{width:"wide",context:"standalone"})||s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,s){return e.setMonth((s-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class vO extends rt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,n,s){const i=o=>o-1;switch(n){case"M":return It(kt(Ot.month,e),i);case"MM":return It(Tt(2,e),i);case"Mo":return It(s.ordinalNumber(e,{unit:"month"}),i);case"MMM":return s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(e,{width:"wide",context:"formatting"})||s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}}class bO extends rt{priority=110;parse(e,n,s){const i=o=>o-1;switch(n){case"L":return It(kt(Ot.month,e),i);case"LL":return It(Tt(2,e),i);case"Lo":return It(s.ordinalNumber(e,{unit:"month"}),i);case"LLL":return s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(e,{width:"wide",context:"standalone"})||s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function yO(t,e,n){const s=Ne(t),i=af(s,n)-e;return s.setDate(s.getDate()-i*7),s}class wO extends rt{priority=100;parse(e,n,s){switch(n){case"w":return kt(Ot.week,e);case"wo":return s.ordinalNumber(e,{unit:"week"});default:return Tt(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,s,i){return us(yO(e,s,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function xO(t,e){const n=Ne(t),s=of(n)-e;return n.setDate(n.getDate()-s*7),n}class kO extends rt{priority=100;parse(e,n,s){switch(n){case"I":return kt(Ot.week,e);case"Io":return s.ordinalNumber(e,{unit:"week"});default:return Tt(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,s){return br(xO(e,s))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const SO=[31,28,31,30,31,30,31,31,30,31,30,31],$O=[31,29,31,30,31,30,31,31,30,31,30,31];class AO extends rt{priority=90;subPriority=1;parse(e,n,s){switch(n){case"d":return kt(Ot.date,e);case"do":return s.ordinalNumber(e,{unit:"date"});default:return Tt(n.length,e)}}validate(e,n){const s=e.getFullYear(),i=Py(s),o=e.getMonth();return i?n>=1&&n<=$O[o]:n>=1&&n<=SO[o]}set(e,n,s){return e.setDate(s),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class CO extends rt{priority=90;subpriority=1;parse(e,n,s){switch(n){case"D":case"DD":return kt(Ot.dayOfYear,e);case"Do":return s.ordinalNumber(e,{unit:"date"});default:return Tt(n.length,e)}}validate(e,n){const s=e.getFullYear();return Py(s)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,s){return e.setMonth(0,s),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function cf(t,e,n){const s=Oo(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,o=Ne(t),r=o.getDay(),l=(e%7+7)%7,c=7-i,u=e<0||e>6?e-(r+c)%7:(l+c)%7-(r+c)%7;return is(o,u)}class EO extends rt{priority=90;parse(e,n,s){switch(n){case"E":case"EE":case"EEE":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,s,i){return e=cf(e,s,i),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class PO extends rt{priority=90;parse(e,n,s,i){const o=r=>{const a=Math.floor((r-1)/7)*7;return(r+i.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return It(Tt(n.length,e),o);case"eo":return It(s.ordinalNumber(e,{unit:"day"}),o);case"eee":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"eeeee":return s.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,s,i){return e=cf(e,s,i),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class TO extends rt{priority=90;parse(e,n,s,i){const o=r=>{const a=Math.floor((r-1)/7)*7;return(r+i.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return It(Tt(n.length,e),o);case"co":return It(s.ordinalNumber(e,{unit:"day"}),o);case"ccc":return s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});case"ccccc":return s.day(e,{width:"narrow",context:"standalone"});case"cccccc":return s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(e,{width:"wide",context:"standalone"})||s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,s,i){return e=cf(e,s,i),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function MO(t,e){const n=Ne(t),s=rO(n),i=e-s;return is(n,i)}class DO extends rt{priority=90;parse(e,n,s){const i=o=>o===0?7:o;switch(n){case"i":case"ii":return Tt(n.length,e);case"io":return s.ordinalNumber(e,{unit:"day"});case"iii":return It(s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i);case"iiiii":return It(s.day(e,{width:"narrow",context:"formatting"}),i);case"iiiiii":return It(s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i);case"iiii":default:return It(s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i)}}validate(e,n){return n>=1&&n<=7}set(e,n,s){return e=MO(e,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class OO extends rt{priority=80;parse(e,n,s){switch(n){case"a":case"aa":case"aaa":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,s){return e.setHours(lf(s),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class IO extends rt{priority=80;parse(e,n,s){switch(n){case"b":case"bb":case"bbb":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,s){return e.setHours(lf(s),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class RO extends rt{priority=80;parse(e,n,s){switch(n){case"B":case"BB":case"BBB":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,s){return e.setHours(lf(s),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class LO extends rt{priority=70;parse(e,n,s){switch(n){case"h":return kt(Ot.hour12h,e);case"ho":return s.ordinalNumber(e,{unit:"hour"});default:return Tt(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,s){const i=e.getHours()>=12;return i&&s<12?e.setHours(s+12,0,0,0):!i&&s===12?e.setHours(0,0,0,0):e.setHours(s,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class NO extends rt{priority=70;parse(e,n,s){switch(n){case"H":return kt(Ot.hour23h,e);case"Ho":return s.ordinalNumber(e,{unit:"hour"});default:return Tt(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,s){return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class FO extends rt{priority=70;parse(e,n,s){switch(n){case"K":return kt(Ot.hour11h,e);case"Ko":return s.ordinalNumber(e,{unit:"hour"});default:return Tt(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,s){return e.getHours()>=12&&s<12?e.setHours(s+12,0,0,0):e.setHours(s,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class BO extends rt{priority=70;parse(e,n,s){switch(n){case"k":return kt(Ot.hour24h,e);case"ko":return s.ordinalNumber(e,{unit:"hour"});default:return Tt(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,s){const i=s<=24?s%24:s;return e.setHours(i,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class VO extends rt{priority=60;parse(e,n,s){switch(n){case"m":return kt(Ot.minute,e);case"mo":return s.ordinalNumber(e,{unit:"minute"});default:return Tt(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,s){return e.setMinutes(s,0,0),e}incompatibleTokens=["t","T"]}class HO extends rt{priority=50;parse(e,n,s){switch(n){case"s":return kt(Ot.second,e);case"so":return s.ordinalNumber(e,{unit:"second"});default:return Tt(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,s){return e.setSeconds(s,0),e}incompatibleTokens=["t","T"]}class jO extends rt{priority=30;parse(e,n){const s=i=>Math.trunc(i*Math.pow(10,-n.length+3));return It(Tt(n.length,e),s)}set(e,n,s){return e.setMilliseconds(s),e}incompatibleTokens=["t","T"]}class WO extends rt{priority=10;parse(e,n){switch(n){case"X":return ws(ys.basicOptionalMinutes,e);case"XX":return ws(ys.basic,e);case"XXXX":return ws(ys.basicOptionalSeconds,e);case"XXXXX":return ws(ys.extendedOptionalSeconds,e);case"XXX":default:return ws(ys.extended,e)}}set(e,n,s){return n.timestampIsSet?e:ot(e,e.getTime()-mc(e)-s)}incompatibleTokens=["t","T","x"]}class zO extends rt{priority=10;parse(e,n){switch(n){case"x":return ws(ys.basicOptionalMinutes,e);case"xx":return ws(ys.basic,e);case"xxxx":return ws(ys.basicOptionalSeconds,e);case"xxxxx":return ws(ys.extendedOptionalSeconds,e);case"xxx":default:return ws(ys.extended,e)}}set(e,n,s){return n.timestampIsSet?e:ot(e,e.getTime()-mc(e)-s)}incompatibleTokens=["t","T","X"]}class YO extends rt{priority=40;parse(e){return Cy(e)}set(e,n,s){return[ot(e,s*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class UO extends rt{priority=20;parse(e){return Cy(e)}set(e,n,s){return[ot(e,s),{timestampIsSet:!0}]}incompatibleTokens="*"}const KO={G:new dO,y:new hO,Y:new fO,R:new pO,u:new gO,Q:new mO,q:new _O,M:new vO,L:new bO,w:new wO,I:new kO,d:new AO,D:new CO,E:new EO,e:new PO,c:new TO,i:new DO,a:new OO,b:new IO,B:new RO,h:new LO,H:new NO,K:new FO,k:new BO,m:new VO,s:new HO,S:new jO,X:new WO,x:new zO,t:new YO,T:new UO},qO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,GO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,JO=/^'([^]*?)'?$/,XO=/''/g,QO=/\S/,ZO=/[a-zA-Z]/;function Wd(t,e,n,s){const i=oO(),o=s?.locale??i.locale??xy,r=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(e==="")return t===""?Ne(n):ot(n,NaN);const l={firstWeekContainsDate:r,weekStartsOn:a,locale:o},c=[new uO],u=e.match(GO).map(m=>{const b=m[0];if(b in Hd){const w=Hd[b];return w(m,o.formatLong)}return m}).join("").match(qO),d=[];for(let m of u){!s?.useAdditionalWeekYearTokens&&$y(m)&&jd(m,e,t),!s?.useAdditionalDayOfYearTokens&&Sy(m)&&jd(m,e,t);const b=m[0],w=KO[b];if(w){const{incompatibleTokens:$}=w;if(Array.isArray($)){const D=d.find(x=>$.includes(x.token)||x.token===b);if(D)throw new RangeError(`The format string mustn't contain \`${D.fullToken}\` and \`${m}\` at the same time`)}else if(w.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);d.push({token:b,fullToken:m});const A=w.run(t,m,o.match,l);if(!A)return ot(n,NaN);c.push(A.setter),t=A.rest}else{if(b.match(ZO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");if(m==="''"?m="'":b==="'"&&(m=eI(m)),t.indexOf(m)===0)t=t.slice(m.length);else return ot(n,NaN)}}if(t.length>0&&QO.test(t))return ot(n,NaN);const f=c.map(m=>m.priority).sort((m,b)=>b-m).filter((m,b,w)=>w.indexOf(m)===b).map(m=>c.filter(b=>b.priority===m).sort((b,w)=>w.subPriority-b.subPriority)).map(m=>m[0]);let g=Ne(n);if(isNaN(g.getTime()))return ot(n,NaN);const _={};for(const m of f){if(!m.validate(g,l))return ot(n,NaN);const b=m.set(g,_,l);Array.isArray(b)?(g=b[0],Object.assign(_,b[1])):g=b}return ot(n,g)}function eI(t){return t.match(JO)[1].replace(XO,"'")}function um(t,e){const n=go(t),s=go(e);return+n==+s}function tI(t,e){return is(t,-e)}function Ty(t,e){const n=Ne(t),s=n.getFullYear(),i=n.getDate(),o=ot(t,0);o.setFullYear(s,e,15),o.setHours(0,0,0,0);const r=iO(o);return n.setMonth(e,Math.min(i,r)),n}function dt(t,e){let n=Ne(t);return isNaN(+n)?ot(t,NaN):(e.year!=null&&n.setFullYear(e.year),e.month!=null&&(n=Ty(n,e.month)),e.date!=null&&n.setDate(e.date),e.hours!=null&&n.setHours(e.hours),e.minutes!=null&&n.setMinutes(e.minutes),e.seconds!=null&&n.setSeconds(e.seconds),e.milliseconds!=null&&n.setMilliseconds(e.milliseconds),n)}function nI(t,e){const n=Ne(t);return n.setHours(e),n}function My(t,e){const n=Ne(t);return n.setMilliseconds(e),n}function sI(t,e){const n=Ne(t);return n.setMinutes(e),n}function Dy(t,e){const n=Ne(t);return n.setSeconds(e),n}function xs(t,e){const n=Ne(t);return isNaN(+n)?ot(t,NaN):(n.setFullYear(e),n)}function xr(t,e){return ls(t,-e)}function iI(t,e){const{years:n=0,months:s=0,weeks:i=0,days:o=0,hours:r=0,minutes:a=0,seconds:l=0}=e,c=xr(t,s+n*12),u=tI(c,o+i*7),d=a+r*60,g=(l+d*60)*1e3;return ot(t,u.getTime()-g)}function Oy(t,e){return sf(t,-e)}function Lr(){const t=sA();return M(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img",...t},[h("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"}),h("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"}),h("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"}),h("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"})])}Lr.compatConfig={MODE:3};function Iy(){return M(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("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"}),h("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"})])}Iy.compatConfig={MODE:3};function uf(){return M(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("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"})])}uf.compatConfig={MODE:3};function df(){return M(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("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"})])}df.compatConfig={MODE:3};function hf(){return M(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("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"}),h("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"})])}hf.compatConfig={MODE:3};function ff(){return M(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("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"})])}ff.compatConfig={MODE:3};function pf(){return M(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("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"})])}pf.compatConfig={MODE:3};const En=(t,e)=>e?new Date(t.toLocaleString("en-US",{timeZone:e})):new Date(t),gf=(t,e,n)=>zd(t,e,n)||we(),oI=(t,e,n)=>{const s=e.dateInTz?En(new Date(t),e.dateInTz):we(t);return n?wn(s,!0):s},zd=(t,e,n)=>{if(!t)return null;const s=n?wn(we(t),!0):we(t);return e?e.exactMatch?oI(t,e,n):En(s,e.timezone):s},rI=t=>{if(!t)return 0;const e=new Date,n=new Date(e.toLocaleString("en-US",{timeZone:"UTC"})),s=new Date(e.toLocaleString("en-US",{timeZone:t})),i=s.getTimezoneOffset()/60;return(+n-+s)/(1e3*60*60)-i};var ts=(t=>(t.month="month",t.year="year",t))(ts||{}),co=(t=>(t.top="top",t.bottom="bottom",t))(co||{}),yo=(t=>(t.header="header",t.calendar="calendar",t.timePicker="timePicker",t))(yo||{}),ln=(t=>(t.month="month",t.year="year",t.calendar="calendar",t.time="time",t.minutes="minutes",t.hours="hours",t.seconds="seconds",t))(ln||{});const aI=["timestamp","date","iso"];var gn=(t=>(t.up="up",t.down="down",t.left="left",t.right="right",t))(gn||{}),mt=(t=>(t.arrowUp="ArrowUp",t.arrowDown="ArrowDown",t.arrowLeft="ArrowLeft",t.arrowRight="ArrowRight",t.enter="Enter",t.space=" ",t.esc="Escape",t.tab="Tab",t.home="Home",t.end="End",t.pageUp="PageUp",t.pageDown="PageDown",t))(mt||{});function dm(t){return e=>new Intl.DateTimeFormat(t,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${e}T00:00:00+00:00`)).slice(0,2)}function lI(t){return e=>$s(En(new Date(`2017-01-0${e}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:t})}const cI=(t,e,n)=>{const s=[1,2,3,4,5,6,7];let i;if(t!==null)try{i=s.map(lI(t))}catch{i=s.map(dm(e))}else i=s.map(dm(e));const o=i.slice(0,n),r=i.slice(n+1,i.length);return[i[n]].concat(...r).concat(...o)},mf=(t,e,n)=>{const s=[];for(let i=+t[0];i<=+t[1];i++)s.push({value:+i,text:Fy(i,e)});return n?s.reverse():s},Ry=(t,e,n)=>{const s=[1,2,3,4,5,6,7,8,9,10,11,12].map(o=>{const r=o<10?`0${o}`:o;return new Date(`2017-${r}-01T00:00:00+00:00`)});if(t!==null)try{const o=n==="long"?"LLLL":"LLL";return s.map((r,a)=>{const l=$s(En(r,"UTC"),o,{locale:t});return{text:l.charAt(0).toUpperCase()+l.substring(1),value:a}})}catch{}const i=new Intl.DateTimeFormat(e,{month:n,timeZone:"UTC"});return s.map((o,r)=>{const a=i.format(o);return{text:a.charAt(0).toUpperCase()+a.substring(1),value:r}})},uI=t=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][t],Ht=t=>{const e=q(t);return e!=null&&e.$el?e?.$el:e},dI=t=>({type:"dot",...t??{}}),Ly=t=>Array.isArray(t)?!!t[0]&&!!t[1]:!1,_f={prop:t=>`"${t}" prop must be enabled!`,dateArr:t=>`You need to use array as "model-value" binding in order to support "${t}"`},Jt=t=>t,hm=t=>t===0?t:!t||isNaN(+t)?null:+t,fm=t=>t===null,Ny=t=>{if(t)return[...t.querySelectorAll("input, button, select, textarea, a[href]")][0]},hI=t=>{const e=[],n=s=>s.filter(i=>i);for(let s=0;s<t.length;s+=3){const i=[t[s],t[s+1],t[s+2]];e.push(n(i))}return e},Na=(t,e,n)=>{const s=n!=null,i=e!=null;if(!s&&!i)return!1;const o=+n,r=+e;return s&&i?+t>o||+t<r:s?+t>o:i?+t<r:!1},kr=(t,e)=>hI(t).map(n=>n.map(s=>{const{active:i,disabled:o,isBetween:r,highlighted:a}=e(s);return{...s,active:i,disabled:o,className:{dp__overlay_cell_active:i,dp__overlay_cell:!i,dp__overlay_cell_disabled:o,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:o&&i,dp__cell_in_between:r,"dp--highlighted":a}}})),Ci=(t,e,n=!1)=>{t&&e.allowStopPropagation&&(n&&t.stopImmediatePropagation(),t.stopPropagation())},fI=()=>["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 pI(t,e){let n=[...document.querySelectorAll(fI())];n=n.filter(i=>!t.contains(i)||i.hasAttribute("data-datepicker-instance"));const s=n.indexOf(t);if(s>=0&&(e?s-1>=0:s+1<=n.length))return n[s+(e?-1:1)]}const Yd=(t,e)=>t?.querySelector(`[data-dp-element="${e}"]`),Fy=(t,e)=>new Intl.NumberFormat(e,{useGrouping:!1,style:"decimal"}).format(t),vf=t=>$s(t,"dd-MM-yyyy"),Wu=t=>Array.isArray(t),vc=(t,e)=>e.get(vf(t)),gI=(t,e)=>t?e?e instanceof Map?!!vc(t,e):e(we(t)):!1:!0,vn=(t,e,n=!1,s)=>{if(t.key===mt.enter||t.key===mt.space)return n&&t.preventDefault(),e();if(s)return s(t)},mI=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].some(t=>navigator.userAgent.includes(t))||navigator.userAgent.includes("Mac")&&"ontouchend"in document,pm=(t,e,n,s,i,o)=>{const r=Wd(t,e.slice(0,t.length),new Date,{locale:o});return va(r)&&vy(r)?s||i?r:dt(r,{hours:+n.hours,minutes:+n?.minutes,seconds:+n?.seconds,milliseconds:0}):null},_I=(t,e,n,s,i,o)=>{const r=Array.isArray(n)?n[0]:n;if(typeof e=="string")return pm(t,e,r,s,i,o);if(Array.isArray(e)){let a=null;for(const l of e)if(a=pm(t,l,r,s,i,o),a)break;return a}return typeof e=="function"?e(t):null},we=t=>t?new Date(t):new Date,vI=(t,e,n)=>{if(e){const i=(t.getMonth()+1).toString().padStart(2,"0"),o=t.getDate().toString().padStart(2,"0"),r=t.getHours().toString().padStart(2,"0"),a=t.getMinutes().toString().padStart(2,"0"),l=n?t.getSeconds().toString().padStart(2,"0"):"00";return`${t.getFullYear()}-${i}-${o}T${r}:${a}:${l}.000Z`}const s=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds());return new Date(s).toISOString()},wn=(t,e)=>{const n=we(JSON.parse(JSON.stringify(t))),s=dt(n,{hours:0,minutes:0,seconds:0,milliseconds:0});return e?d2(s):s},Ei=(t,e,n,s)=>{let i=t?we(t):we();return(e||e===0)&&(i=nI(i,+e)),(n||n===0)&&(i=sI(i,+n)),(s||s===0)&&(i=Dy(i,+s)),My(i,0)},$t=(t,e)=>!t||!e?!1:La(wn(t),wn(e)),tt=(t,e)=>!t||!e?!1:tr(wn(t),wn(e)),Dt=(t,e)=>!t||!e?!1:wr(wn(t),wn(e)),Xc=(t,e,n)=>t!=null&&t[0]&&t!=null&&t[1]?Dt(n,t[0])&&$t(n,t[1]):t!=null&&t[0]&&e?Dt(n,t[0])&&$t(n,e)||$t(n,t[0])&&Dt(n,e):!1,os=t=>{const e=dt(new Date(t),{date:1});return wn(e)},zu=(t,e,n)=>e&&(n||n===0)?Object.fromEntries(["hours","minutes","seconds"].map(s=>s===e?[s,n]:[s,isNaN(+t[s])?void 0:+t[s]])):{hours:isNaN(+t.hours)?void 0:+t.hours,minutes:isNaN(+t.minutes)?void 0:+t.minutes,seconds:isNaN(+t.seconds)?void 0:+t.seconds},wo=t=>({hours:Qs(t),minutes:Oi(t),seconds:yr(t)}),By=(t,e)=>{if(e){const n=ze(we(e));if(n>t)return 12;if(n===t)return Qe(we(e))}},Vy=(t,e)=>{if(e){const n=ze(we(e));return n<t?-1:n===t?Qe(we(e)):void 0}},Sr=t=>{if(t)return ze(we(t))},Hy=(t,e)=>{const n=Dt(t,e)?e:t,s=Dt(e,t)?e:t;return by({start:n,end:s})},bI=t=>{const e=ls(t,1);return{month:Qe(e),year:ze(e)}},js=(t,e)=>{const n=us(t,{weekStartsOn:+e}),s=wy(t,{weekStartsOn:+e});return[n,s]},jy=(t,e)=>{const n={hours:Qs(we()),minutes:Oi(we()),seconds:e?yr(we()):0};return Object.assign(n,t)},yi=(t,e,n)=>[dt(we(t),{date:1}),dt(we(),{month:e,year:n,date:1})],Ys=(t,e,n)=>{let s=t?we(t):we();return(e||e===0)&&(s=Ty(s,e)),n&&(s=xs(s,n)),s},Wy=(t,e,n,s,i)=>{if(!s||i&&!e||!i&&!n)return!1;const o=i?ls(t,1):xr(t,1),r=[Qe(o),ze(o)];return i?!wI(...r,e):!yI(...r,n)},yI=(t,e,n)=>$t(...yi(n,t,e))||tt(...yi(n,t,e)),wI=(t,e,n)=>Dt(...yi(n,t,e))||tt(...yi(n,t,e)),zy=(t,e,n,s,i,o,r)=>{if(typeof e=="function"&&!r)return e(t);const a=n?{locale:n}:void 0;return Array.isArray(t)?`${$s(t[0],o,a)}${i&&!t[1]?"":s}${t[1]?$s(t[1],o,a):""}`:$s(t,o,a)},qo=t=>{if(t)return null;throw new Error(_f.prop("partial-range"))},Tl=(t,e)=>{if(e)return t();throw new Error(_f.prop("range"))},Ud=t=>Array.isArray(t)?va(t[0])&&(t[1]?va(t[1]):!0):t?va(t):!1,xI=(t,e)=>dt(e??we(),{hours:+t.hours||0,minutes:+t.minutes||0,seconds:+t.seconds||0}),Yu=(t,e,n,s)=>{if(!t)return!0;if(s){const i=n==="max"?La(t,e):wr(t,e),o={seconds:0,milliseconds:0};return i||tr(dt(t,o),dt(e,o))}return n==="max"?t.getTime()<=e.getTime():t.getTime()>=e.getTime()},Uu=(t,e,n)=>t?xI(t,e):we(n??e),gm=(t,e,n,s,i)=>{if(Array.isArray(s)){const r=Uu(t,s[0],e),a=Uu(t,s[1],e);return Yu(s[0],r,n,!!e)&&Yu(s[1],a,n,!!e)&&i}const o=Uu(t,s,e);return Yu(s,o,n,!!e)&&i},Ku=t=>dt(we(),wo(t)),kI=(t,e)=>t instanceof Map?Array.from(t.values()).filter(n=>ze(we(n))===e).map(n=>Qe(n)):[],Yy=(t,e,n)=>typeof t=="function"?t({month:e,year:n}):!!t.months.find(s=>s.month===e&&s.year===n),bf=(t,e)=>typeof t=="function"?t(e):t.years.includes(e),Uy=t=>$s(t,"yyyy-MM-dd"),Jr=Ts({menuFocused:!1,shiftKeyInMenu:!1}),Ky=()=>{const t=n=>{Jr.menuFocused=n},e=n=>{Jr.shiftKeyInMenu!==n&&(Jr.shiftKeyInMenu=n)};return{control:_e(()=>({shiftKeyInMenu:Jr.shiftKeyInMenu,menuFocused:Jr.menuFocused})),setMenuFocused:t,setShiftKey:e}},gt=Ts({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),qu=ve(null),Ml=ve(!1),Gu=ve(!1),Ju=ve(!1),Xu=ve(!1),rn=ve(0),Mt=ve(0),Hi=()=>{const t=_e(()=>Ml.value?[...gt.selectionGrid,gt.actionRow].filter(d=>d.length):Gu.value?[...gt.timePicker[0],...gt.timePicker[1],Xu.value?[]:[qu.value],gt.actionRow].filter(d=>d.length):Ju.value?[...gt.monthPicker,gt.actionRow]:[gt.monthYear,...gt.calendar,gt.time,gt.actionRow].filter(d=>d.length)),e=d=>{rn.value=d?rn.value+1:rn.value-1;let f=null;t.value[Mt.value]&&(f=t.value[Mt.value][rn.value]),!f&&t.value[Mt.value+(d?1:-1)]?(Mt.value=Mt.value+(d?1:-1),rn.value=d?0:t.value[Mt.value].length-1):f||(rn.value=d?rn.value-1:rn.value+1)},n=d=>{Mt.value===0&&!d||Mt.value===t.value.length&&d||(Mt.value=d?Mt.value+1:Mt.value-1,t.value[Mt.value]?t.value[Mt.value]&&!t.value[Mt.value][rn.value]&&rn.value!==0&&(rn.value=t.value[Mt.value].length-1):Mt.value=d?Mt.value-1:Mt.value+1)},s=d=>{let f=null;t.value[Mt.value]&&(f=t.value[Mt.value][rn.value]),f?f.focus({preventScroll:!Ml.value}):rn.value=d?rn.value-1:rn.value+1},i=()=>{e(!0),s(!0)},o=()=>{e(!1),s(!1)},r=()=>{n(!1),s(!0)},a=()=>{n(!0),s(!0)},l=(d,f)=>{gt[f]=d},c=(d,f)=>{gt[f]=d},u=()=>{rn.value=0,Mt.value=0};return{buildMatrix:l,buildMultiLevelMatrix:c,setTimePickerBackRef:d=>{qu.value=d},setSelectionGrid:d=>{Ml.value=d,u(),d||(gt.selectionGrid=[])},setTimePicker:(d,f=!1)=>{Gu.value=d,Xu.value=f,u(),d||(gt.timePicker[0]=[],gt.timePicker[1]=[])},setTimePickerElements:(d,f=0)=>{gt.timePicker[f]=d},arrowRight:i,arrowLeft:o,arrowUp:r,arrowDown:a,clearArrowNav:()=>{gt.monthYear=[],gt.calendar=[],gt.time=[],gt.actionRow=[],gt.selectionGrid=[],gt.timePicker[0]=[],gt.timePicker[1]=[],Ml.value=!1,Gu.value=!1,Xu.value=!1,Ju.value=!1,u(),qu.value=null},setMonthPicker:d=>{Ju.value=d,u()},refSets:gt}},mm=t=>({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",...t??{}}),SI=t=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:e=>`Increment ${e}`,decrementValue:e=>`Decrement ${e}`,openTpOverlay:e=>`Open ${e} 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,clearInput:"Clear value",calendarIcon:"Calendar icon",timePicker:"Time picker",monthPicker:e=>`Month picker${e?" overlay":""}`,yearPicker:e=>`Year picker${e?" overlay":""}`,timeOverlay:e=>`${e} overlay`,...t??{}}),_m=t=>t?typeof t=="boolean"?t?2:0:+t>=2?+t:2:0,$I=t=>{const e=typeof t=="object"&&t,n={static:!0,solo:!1};if(!t)return{...n,count:_m(!1)};const s=e?t:{},i=e?s.count??!0:t,o=_m(i);return Object.assign(n,s,{count:o})},AI=(t,e,n)=>t||(typeof n=="string"?n:e),CI=t=>typeof t=="boolean"?t?mm({}):!1:mm(t),EI=t=>{const e={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - "};return typeof t=="object"?{...e,...t??{},enabled:!0}:{...e,enabled:t}},PI=t=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...t??{}}),TI=t=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...t??{}}),MI=t=>{const e={input:!1};return typeof t=="object"?{...e,...t??{},enabled:!0}:{enabled:t,...e}},DI=t=>({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,shadowDom:!1,...t??{}}),OI=t=>{const e={dates:Array.isArray(t)?t.map(n=>we(n)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof t=="function"?t:{...e,...t??{}}},II=t=>typeof t=="object"?{type:t?.type??"local",hideOnOffsetDates:t?.hideOnOffsetDates??!1}:{type:t,hideOnOffsetDates:!1},RI=t=>{const e={noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1};return typeof t=="object"?{enabled:!0,...e,...t}:{enabled:t,...e}},LI=t=>t?typeof t=="string"?{timezone:t,exactMatch:!1,dateInTz:void 0,emitTimezone:void 0,convertModel:!0}:{timezone:t.timezone,exactMatch:t.exactMatch??!1,dateInTz:t.dateInTz??void 0,emitTimezone:t.emitTimezone??void 0,convertModel:t.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:void 0},Qu=(t,e,n)=>new Map(t.map(s=>{const i=gf(s,e,n);return[vf(i),i]})),NI=(t,e)=>t.length?new Map(t.map(n=>{const s=gf(n.date,e);return[vf(s),n]})):null,FI=t=>{var e;return{minDate:zd(t.minDate,t.timezone,t.isSpecific),maxDate:zd(t.maxDate,t.timezone,t.isSpecific),disabledDates:Wu(t.disabledDates)?Qu(t.disabledDates,t.timezone,t.isSpecific):t.disabledDates,allowedDates:Wu(t.allowedDates)?Qu(t.allowedDates,t.timezone,t.isSpecific):null,highlight:typeof t.highlight=="object"&&Wu((e=t.highlight)==null?void 0:e.dates)?Qu(t.highlight.dates,t.timezone):t.highlight,markers:NI(t.markers,t.timezone)}},BI=t=>typeof t=="boolean"?{enabled:t,dragSelect:!0,limit:null}:{enabled:!!t,limit:t.limit?+t.limit:null,dragSelect:t.dragSelect??!0},VI=t=>({...Object.fromEntries(Object.keys(t).map(e=>{const n=e,s=t[n],i=typeof t[n]=="string"?{[s]:!0}:Object.fromEntries(s.map(o=>[o,!0]));return[e,i]}))}),xt=t=>{const e=()=>{const y=t.enableSeconds?":ss":"",S=t.enableMinutes?":mm":"";return t.is24?`HH${S}${y}`:`hh${S}${y} aa`},n=()=>{var y;return t.format?t.format:t.monthPicker?"MM/yyyy":t.timePicker?e():t.weekPicker?`${((y=b.value)==null?void 0:y.type)==="iso"?"RR":"ww"}-yyyy`:t.yearPicker?"yyyy":t.quarterPicker?"QQQ/yyyy":t.enableTimePicker?`MM/dd/yyyy, ${e()}`:"MM/dd/yyyy"},s=y=>jy(y,t.enableSeconds),i=()=>D.value.enabled?t.startTime&&Array.isArray(t.startTime)?[s(t.startTime[0]),s(t.startTime[1])]:null:t.startTime&&!Array.isArray(t.startTime)?s(t.startTime):null,o=_e(()=>$I(t.multiCalendars)),r=_e(()=>i()),a=_e(()=>SI(t.ariaLabels)),l=_e(()=>PI(t.filters)),c=_e(()=>CI(t.transitions)),u=_e(()=>TI(t.actionRow)),d=_e(()=>AI(t.previewFormat,t.format,n())),f=_e(()=>EI(t.textInput)),g=_e(()=>MI(t.inline)),_=_e(()=>DI(t.config)),m=_e(()=>OI(t.highlight)),b=_e(()=>II(t.weekNumbers)),w=_e(()=>LI(t.timezone)),$=_e(()=>BI(t.multiDates)),A=_e(()=>FI({minDate:t.minDate,maxDate:t.maxDate,disabledDates:t.disabledDates,allowedDates:t.allowedDates,highlight:m.value,markers:t.markers,timezone:w.value,isSpecific:t.monthPicker||t.yearPicker||t.quarterPicker})),D=_e(()=>RI(t.range)),x=_e(()=>VI(t.ui));return{defaultedTransitions:c,defaultedMultiCalendars:o,defaultedStartTime:r,defaultedAriaLabels:a,defaultedFilters:l,defaultedActionRow:u,defaultedPreviewFormat:d,defaultedTextInput:f,defaultedInline:g,defaultedConfig:_,defaultedHighlight:m,defaultedWeekNumbers:b,defaultedRange:D,propDates:A,defaultedTz:w,defaultedMultiDates:$,defaultedUI:x,getDefaultPattern:n,getDefaultStartTime:i}},HI=(t,e,n)=>{const s=ve(),{defaultedTextInput:i,defaultedRange:o,defaultedTz:r,defaultedMultiDates:a,getDefaultPattern:l}=xt(e),c=ve(""),u=Ca(e,"format"),d=Ca(e,"formatLocale");Bt(s,()=>{typeof e.onInternalModelChange=="function"&&t("internal-model-change",s.value,oe(!0))},{deep:!0}),Bt(o,(P,se)=>{P.enabled!==se.enabled&&(s.value=null)}),Bt(u,()=>{Q()});const f=P=>r.value.timezone&&r.value.convertModel?En(P,r.value.timezone):P,g=P=>{if(r.value.timezone&&r.value.convertModel){const se=rI(r.value.timezone);return i2(P,se)}return P},_=(P,se,ue=!1)=>zy(P,e.format,e.formatLocale,i.value.rangeSeparator,e.modelAuto,se??l(),ue),m=P=>P?e.modelType?le(P):{hours:Qs(P),minutes:Oi(P),seconds:e.enableSeconds?yr(P):0}:null,b=P=>e.modelType?le(P):{month:Qe(P),year:ze(P)},w=P=>Array.isArray(P)?a.value.enabled?P.map(se=>$(se,xs(we(),se))):Tl(()=>[xs(we(),P[0]),P[1]?xs(we(),P[1]):qo(o.value.partialRange)],o.value.enabled):xs(we(),+P),$=(P,se)=>(typeof P=="string"||typeof P=="number")&&e.modelType?Z(P):se,A=P=>Array.isArray(P)?[$(P[0],Ei(null,+P[0].hours,+P[0].minutes,P[0].seconds)),$(P[1],Ei(null,+P[1].hours,+P[1].minutes,P[1].seconds))]:$(P,Ei(null,P.hours,P.minutes,P.seconds)),D=P=>{const se=dt(we(),{date:1});return Array.isArray(P)?a.value.enabled?P.map(ue=>$(ue,Ys(se,+ue.month,+ue.year))):Tl(()=>[$(P[0],Ys(se,+P[0].month,+P[0].year)),$(P[1],P[1]?Ys(se,+P[1].month,+P[1].year):qo(o.value.partialRange))],o.value.enabled):$(P,Ys(se,+P.month,+P.year))},x=P=>{if(Array.isArray(P))return P.map(se=>Z(se));throw new Error(_f.dateArr("multi-dates"))},y=P=>{if(Array.isArray(P)&&o.value.enabled){const se=P[0],ue=P[1];return[we(Array.isArray(se)?se[0]:null),we(Array.isArray(ue)?ue[0]:null)]}return we(P[0])},S=P=>e.modelAuto?Array.isArray(P)?[Z(P[0]),Z(P[1])]:e.autoApply?[Z(P)]:[Z(P),null]:Array.isArray(P)?Tl(()=>P[1]?[Z(P[0]),P[1]?Z(P[1]):qo(o.value.partialRange)]:[Z(P[0])],o.value.enabled):Z(P),E=()=>{Array.isArray(s.value)&&o.value.enabled&&s.value.length===1&&s.value.push(qo(o.value.partialRange))},T=()=>{const P=s.value;return[le(P[0]),P[1]?le(P[1]):qo(o.value.partialRange)]},C=()=>s.value[1]?T():le(Jt(s.value[0])),B=()=>(s.value||[]).map(P=>le(P)),J=(P=!1)=>(P||E(),e.modelAuto?C():a.value.enabled?B():Array.isArray(s.value)?Tl(()=>T(),o.value.enabled):le(Jt(s.value))),ae=P=>!P||Array.isArray(P)&&!P.length?null:e.timePicker?A(Jt(P)):e.monthPicker?D(Jt(P)):e.yearPicker?w(Jt(P)):a.value.enabled?x(Jt(P)):e.weekPicker?y(Jt(P)):S(Jt(P)),Y=P=>{const se=ae(P);Ud(Jt(se))?(s.value=Jt(se),Q()):(s.value=null,c.value="")},L=()=>{const P=se=>$s(se,i.value.format);return`${P(s.value[0])} ${i.value.rangeSeparator} ${s.value[1]?P(s.value[1]):""}`},I=()=>n.value&&s.value?Array.isArray(s.value)?L():$s(s.value,i.value.format):_(s.value),V=()=>s.value?a.value.enabled?s.value.map(P=>_(P)).join("; "):i.value.enabled&&typeof i.value.format=="string"?I():_(s.value):"",Q=()=>{!e.format||typeof e.format=="string"||i.value.enabled&&typeof i.value.format=="string"?c.value=V():c.value=e.format(s.value)},Z=P=>{if(e.utc){const se=new Date(P);return e.utc==="preserve"?new Date(se.getTime()+se.getTimezoneOffset()*6e4):se}return e.modelType?aI.includes(e.modelType)?f(new Date(P)):e.modelType==="format"&&(typeof e.format=="string"||!e.format)?f(Wd(P,l(),new Date,{locale:d.value})):f(Wd(P,e.modelType,new Date,{locale:d.value})):f(new Date(P))},le=P=>P?e.utc?vI(P,e.utc==="preserve",e.enableSeconds):e.modelType?e.modelType==="timestamp"?+g(P):e.modelType==="iso"?g(P).toISOString():e.modelType==="format"&&(typeof e.format=="string"||!e.format)?_(g(P)):_(g(P),e.modelType,!0):g(P):"",ye=(P,se=!1,ue=!1)=>{if(ue)return P;if(t("update:model-value",P),r.value.emitTimezone&&se){const xe=Array.isArray(P)?P.map(N=>En(Jt(N),r.value.emitTimezone)):En(Jt(P),r.value.emitTimezone);t("update:model-timezone-value",xe)}},U=P=>Array.isArray(s.value)?a.value.enabled?s.value.map(se=>P(se)):[P(s.value[0]),s.value[1]?P(s.value[1]):qo(o.value.partialRange)]:P(Jt(s.value)),X=()=>{if(Array.isArray(s.value)){const P=js(s.value[0],e.weekStart),se=s.value[1]?js(s.value[1],e.weekStart):[];return[P.map(ue=>we(ue)),se.map(ue=>we(ue))]}return js(s.value,e.weekStart).map(P=>we(P))},R=(P,se)=>ye(Jt(U(P)),!1,se),ee=P=>{const se=X();return P?se:t("update:model-value",X())},oe=(P=!1)=>(P||Q(),e.monthPicker?R(b,P):e.timePicker?R(m,P):e.yearPicker?R(ze,P):e.weekPicker?ee(P):ye(J(P),!0,P));return{inputValue:c,internalModelValue:s,checkBeforeEmit:()=>s.value?o.value.enabled?o.value.partialRange?s.value.length>=1:s.value.length===2:!!s.value:!1,parseExternalModelValue:Y,formatInputValue:Q,emitModelValue:oe}},jI=(t,e)=>{const{defaultedFilters:n,propDates:s}=xt(t),{validateMonthYearInRange:i}=ji(t),o=(u,d)=>{let f=u;return n.value.months.includes(Qe(f))?(f=d?ls(u,1):xr(u,1),o(f,d)):f},r=(u,d)=>{let f=u;return n.value.years.includes(ze(f))?(f=d?sf(u,1):Oy(u,1),r(f,d)):f},a=(u,d=!1)=>{const f=dt(we(),{month:t.month,year:t.year});let g=u?ls(f,1):xr(f,1);t.disableYearSelect&&(g=xs(g,t.year));let _=Qe(g),m=ze(g);n.value.months.includes(_)&&(g=o(g,u),_=Qe(g),m=ze(g)),n.value.years.includes(m)&&(g=r(g,u),m=ze(g)),i(_,m,u,t.preventMinMaxNavigation)&&l(_,m,d)},l=(u,d,f)=>{e("update-month-year",{month:u,year:d,fromNav:f})},c=_e(()=>u=>Wy(dt(we(),{month:t.month,year:t.year}),s.value.maxDate,s.value.minDate,t.preventMinMaxNavigation,u));return{handleMonthYearChange:a,isDisabled:c,updateMonthYear:l}},Qc={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},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},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},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},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{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},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},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"},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},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 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},ui:{type:Object,default:()=>({})}},ds={...Qc,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:()=>({})},isTextInputDate:{type:Boolean,default:!1}},WI=["title"],zI=["disabled"],YI=Nt({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...ds},emits:["close-picker","select-date","select-now","invalid-select"],setup(t,{emit:e}){const n=e,s=t,{defaultedActionRow:i,defaultedPreviewFormat:o,defaultedMultiCalendars:r,defaultedTextInput:a,defaultedInline:l,defaultedRange:c,defaultedMultiDates:u,getDefaultPattern:d}=xt(s),{isTimeValid:f,isMonthValid:g}=ji(s),{buildMatrix:_}=Hi(),m=ve(null),b=ve(null),w=ve(!1),$=ve({}),A=ve(null),D=ve(null);qt(()=>{s.arrowNavigation&&_([Ht(m),Ht(b)],"actionRow"),x(),window.addEventListener("resize",x)}),Ir(()=>{window.removeEventListener("resize",x)});const x=()=>{w.value=!1,setTimeout(()=>{var L,I;const V=(L=A.value)==null?void 0:L.getBoundingClientRect(),Q=(I=D.value)==null?void 0:I.getBoundingClientRect();V&&Q&&($.value.maxWidth=`${Q.width-V.width-20}px`),w.value=!0},0)},y=_e(()=>c.value.enabled&&!c.value.partialRange&&s.internalModelValue?s.internalModelValue.length===2:!0),S=_e(()=>!f.value(s.internalModelValue)||!g.value(s.internalModelValue)||!y.value),E=()=>{const L=o.value;return s.timePicker||s.monthPicker,L(Jt(s.internalModelValue))},T=()=>{const L=s.internalModelValue;return r.value.count>0?`${C(L[0])} - ${C(L[1])}`:[C(L[0]),C(L[1])]},C=L=>zy(L,o.value,s.formatLocale,a.value.rangeSeparator,s.modelAuto,d()),B=_e(()=>!s.internalModelValue||!s.menuMount?"":typeof o.value=="string"?Array.isArray(s.internalModelValue)?s.internalModelValue.length===2&&s.internalModelValue[1]?T():u.value.enabled?s.internalModelValue.map(L=>`${C(L)}`):s.modelAuto?`${C(s.internalModelValue[0])}`:`${C(s.internalModelValue[0])} -`:C(s.internalModelValue):E()),J=()=>u.value.enabled?"; ":" - ",ae=_e(()=>Array.isArray(B.value)?B.value.join(J()):B.value),Y=()=>{f.value(s.internalModelValue)&&g.value(s.internalModelValue)&&y.value?n("select-date"):n("invalid-select")};return(L,I)=>(M(),F("div",{ref_key:"actionRowRef",ref:D,class:"dp__action_row"},[L.$slots["action-row"]?Ie(L.$slots,"action-row",Qt(zt({key:0},{internalModelValue:L.internalModelValue,disabled:S.value,selectDate:()=>L.$emit("select-date"),closePicker:()=>L.$emit("close-picker")}))):(M(),F(Te,{key:1},[q(i).showPreview?(M(),F("div",{key:0,class:"dp__selection_preview",title:ae.value,style:jt($.value)},[L.$slots["action-preview"]&&w.value?Ie(L.$slots,"action-preview",{key:0,value:L.internalModelValue}):re("",!0),!L.$slots["action-preview"]&&w.value?(M(),F(Te,{key:1},[be(me(ae.value),1)],64)):re("",!0)],12,WI)):re("",!0),h("div",{ref_key:"actionBtnContainer",ref:A,class:"dp__action_buttons","data-dp-element":"action-row"},[L.$slots["action-buttons"]?Ie(L.$slots,"action-buttons",{key:0,value:L.internalModelValue}):re("",!0),L.$slots["action-buttons"]?re("",!0):(M(),F(Te,{key:1},[!q(l).enabled&&q(i).showCancel?(M(),F("button",{key:0,ref_key:"cancelButtonRef",ref:m,type:"button",class:"dp__action_button dp__action_cancel",onClick:I[0]||(I[0]=V=>L.$emit("close-picker")),onKeydown:I[1]||(I[1]=V=>q(vn)(V,()=>L.$emit("close-picker")))},me(L.cancelText),545)):re("",!0),q(i).showNow?(M(),F("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:I[2]||(I[2]=V=>L.$emit("select-now")),onKeydown:I[3]||(I[3]=V=>q(vn)(V,()=>L.$emit("select-now")))},me(L.nowButtonLabel),33)):re("",!0),q(i).showSelect?(M(),F("button",{key:2,ref_key:"selectButtonRef",ref:b,type:"button",class:"dp__action_button dp__action_select",disabled:S.value,"data-test":"select-button",onKeydown:I[4]||(I[4]=V=>q(vn)(V,()=>Y())),onClick:Y},me(L.selectText),41,zI)):re("",!0)],64))],512)],64))],512))}}),UI=["role","aria-label","tabindex"],KI={class:"dp__selection_grid_header"},qI=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],GI=["aria-label"],Ja=Nt({__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:{},overlayLabel:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(t,{expose:e,emit:n}){const{setSelectionGrid:s,buildMultiLevelMatrix:i,setMonthPicker:o}=Hi(),r=n,a=t,{defaultedAriaLabels:l,defaultedTextInput:c,defaultedConfig:u}=xt(a),{hideNavigationButtons:d}=tu(),f=ve(!1),g=ve(null),_=ve(null),m=ve([]),b=ve(),w=ve(null),$=ve(0),A=ve(null);ib(()=>{g.value=null}),qt(()=>{en().then(()=>B()),a.noOverlayFocus||x(),D(!0)}),Ir(()=>D(!1));const D=U=>{var X;a.arrowNavigation&&((X=a.headerRefs)!=null&&X.length?o(U):s(U))},x=()=>{var U;const X=Ht(_);X&&(c.value.enabled||(g.value?(U=g.value)==null||U.focus({preventScroll:!0}):X.focus({preventScroll:!0})),f.value=X.clientHeight<X.scrollHeight)},y=_e(()=>({dp__overlay:!0,"dp--overlay-absolute":!a.useRelative,"dp--overlay-relative":a.useRelative})),S=_e(()=>a.useRelative?{height:`${a.height}px`,width:"260px"}:void 0),E=_e(()=>({dp__overlay_col:!0})),T=_e(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:f.value,dp__button_bottom:a.isLast})),C=_e(()=>{var U,X;return{dp__overlay_container:!0,dp__container_flex:((U=a.items)==null?void 0:U.length)<=6,dp__container_block:((X=a.items)==null?void 0:X.length)>6}});Bt(()=>a.items,()=>B(!1),{deep:!0});const B=(U=!0)=>{en().then(()=>{const X=Ht(g),R=Ht(_),ee=Ht(w),oe=Ht(A),P=ee?ee.getBoundingClientRect().height:0;R&&(R.getBoundingClientRect().height?$.value=R.getBoundingClientRect().height-P:$.value=u.value.modeHeight-P),X&&oe&&U&&(oe.scrollTop=X.offsetTop-oe.offsetTop-($.value/2-X.getBoundingClientRect().height)-P)})},J=U=>{U.disabled||r("selected",U.value)},ae=()=>{r("toggle"),r("reset-flow")},Y=()=>{a.escClose&&ae()},L=(U,X,R,ee)=>{U&&((X.active||X.value===a.focusValue)&&(g.value=U),a.arrowNavigation&&(Array.isArray(m.value[R])?m.value[R][ee]=U:m.value[R]=[U],I()))},I=()=>{var U,X;const R=(U=a.headerRefs)!=null&&U.length?[a.headerRefs].concat(m.value):m.value.concat([a.skipButtonRef?[]:[w.value]]);i(Jt(R),(X=a.headerRefs)!=null&&X.length?"monthPicker":"selectionGrid")},V=U=>{a.arrowNavigation||Ci(U,u.value,!0)},Q=U=>{b.value=U,r("hover-value",U)},Z=()=>{if(ae(),!a.isLast){const U=Yd(a.menuWrapRef??null,"action-row");if(U){const X=Ny(U);X?.focus()}}},le=U=>{switch(U.key){case mt.esc:return Y();case mt.arrowLeft:return V(U);case mt.arrowRight:return V(U);case mt.arrowUp:return V(U);case mt.arrowDown:return V(U);default:return}},ye=U=>{if(U.key===mt.enter)return ae();if(U.key===mt.tab)return Z()};return e({focusGrid:x}),(U,X)=>{var R;return M(),F("div",{ref_key:"gridWrapRef",ref:_,class:Ce(y.value),style:jt(S.value),role:U.useRelative?void 0:"dialog","aria-label":U.overlayLabel,tabindex:U.useRelative?void 0:"0",onKeydown:le,onClick:X[0]||(X[0]=Oa(()=>{},["prevent"]))},[h("div",{ref_key:"containerRef",ref:A,class:Ce(C.value),style:jt({"--dp-overlay-height":`${$.value}px`}),role:"grid"},[h("div",KI,[Ie(U.$slots,"header")]),U.$slots.overlay?Ie(U.$slots,"overlay",{key:0}):(M(!0),F(Te,{key:1},Ue(U.items,(ee,oe)=>(M(),F("div",{key:oe,class:Ce(["dp__overlay_row",{dp__flex_row:U.items.length>=3}]),role:"row"},[(M(!0),F(Te,null,Ue(ee,(P,se)=>(M(),F("div",{key:P.value,ref_for:!0,ref:ue=>L(ue,P,oe,se),role:"gridcell",class:Ce(E.value),"aria-selected":P.active||void 0,"aria-disabled":P.disabled||void 0,tabindex:"0","data-test":P.text,onClick:Oa(ue=>J(P),["prevent"]),onKeydown:ue=>q(vn)(ue,()=>J(P),!0),onMouseover:ue=>Q(P.value)},[h("div",{class:Ce(P.className)},[U.$slots.item?Ie(U.$slots,"item",{key:0,item:P}):re("",!0),U.$slots.item?re("",!0):(M(),F(Te,{key:1},[be(me(P.text),1)],64))],2)],42,qI))),128))],2))),128))],6),U.$slots["button-icon"]?Oe((M(),F("button",{key:0,ref_key:"toggleButton",ref:w,type:"button","aria-label":(R=q(l))==null?void 0:R.toggleOverlay,class:Ce(T.value),tabindex:"0",onClick:ae,onKeydown:ye},[Ie(U.$slots,"button-icon")],42,GI)),[[ec,!q(d)(U.hideNavigation,U.type)]]):re("",!0)],46,UI)}}}),Zc=Nt({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(t){const e=t,n=_e(()=>e.multiCalendars>0?[...Array(e.multiCalendars).keys()]:[0]),s=_e(()=>({dp__instance_calendar:e.multiCalendars>0}));return(i,o)=>(M(),F("div",{class:Ce({dp__menu_inner:!i.stretch,"dp--menu--inner-stretched":i.stretch,dp__flex_display:i.multiCalendars>0,"dp--flex-display-collapsed":i.collapse})},[(M(!0),F(Te,null,Ue(n.value,(r,a)=>(M(),F("div",{key:r,class:Ce(s.value)},[Ie(i.$slots,"default",{instance:r,index:a})],2))),128))],2))}}),JI=["data-dp-element","aria-label","aria-disabled"],ba=Nt({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(t,{emit:e}){const n=e,s=ve(null);return qt(()=>n("set-ref",s)),(i,o)=>(M(),F("button",{ref_key:"elRef",ref:s,type:"button","data-dp-element":i.elName,class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":i.ariaLabel,"aria-disabled":i.disabled||void 0,onClick:o[0]||(o[0]=r=>i.$emit("activate")),onKeydown:o[1]||(o[1]=r=>q(vn)(r,()=>i.$emit("activate"),!0))},[h("span",{class:Ce(["dp__inner_nav",{dp__inner_nav_disabled:i.disabled}])},[Ie(i.$slots,"default")],2)],40,JI))}}),XI=["aria-label","data-test"],qy=Nt({__name:"YearModePicker",props:{...ds,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(t,{emit:e}){const n=e,s=t,{showRightIcon:i,showLeftIcon:o}=tu(),{defaultedConfig:r,defaultedMultiCalendars:a,defaultedAriaLabels:l,defaultedTransitions:c,defaultedUI:u}=xt(s),{showTransition:d,transitionName:f}=Xa(c),g=ve(!1),_=(w=!1,$)=>{g.value=!g.value,n("toggle-year-picker",{flow:w,show:$})},m=w=>{g.value=!1,n("year-select",w)},b=(w=!1)=>{n("handle-year",w)};return(w,$)=>{var A,D,x,y,S;return M(),F(Te,null,[h("div",{class:Ce(["dp--year-mode-picker",{"dp--hidden-el":g.value}])},[q(o)(q(a),t.instance)?(M(),Le(ba,{key:0,ref:"mpPrevIconRef","aria-label":(A=q(l))==null?void 0:A.prevYear,disabled:t.isDisabled(!1),class:Ce((D=q(u))==null?void 0:D.navBtnPrev),onActivate:$[0]||($[0]=E=>b(!1))},{default:Pe(()=>[w.$slots["arrow-left"]?Ie(w.$slots,"arrow-left",{key:0}):re("",!0),w.$slots["arrow-left"]?re("",!0):(M(),Le(q(uf),{key:1}))]),_:3},8,["aria-label","disabled","class"])):re("",!0),h("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${t.year}-${(x=q(l))==null?void 0:x.openYearsOverlay}`,"data-test":`year-mode-btn-${t.instance}`,onClick:$[1]||($[1]=()=>_(!1)),onKeydown:$[2]||($[2]=xC(()=>_(!1),["enter"]))},[w.$slots.year?Ie(w.$slots,"year",{key:0,year:t.year}):re("",!0),w.$slots.year?re("",!0):(M(),F(Te,{key:1},[be(me(t.year),1)],64))],40,XI),q(i)(q(a),t.instance)?(M(),Le(ba,{key:1,ref:"mpNextIconRef","aria-label":(y=q(l))==null?void 0:y.nextYear,disabled:t.isDisabled(!0),class:Ce((S=q(u))==null?void 0:S.navBtnNext),onActivate:$[3]||($[3]=E=>b(!0))},{default:Pe(()=>[w.$slots["arrow-right"]?Ie(w.$slots,"arrow-right",{key:0}):re("",!0),w.$slots["arrow-right"]?re("",!0):(M(),Le(q(df),{key:1}))]),_:3},8,["aria-label","disabled","class"])):re("",!0)],2),Se(At,{name:q(f)(t.showYearPicker),css:q(d)},{default:Pe(()=>{var E,T;return[t.showYearPicker?(M(),Le(Ja,{key:0,items:t.items,"text-input":w.textInput,"esc-close":w.escClose,config:w.config,"is-last":w.autoApply&&!q(r).keepActionRow,"hide-navigation":w.hideNavigation,"aria-labels":w.ariaLabels,"overlay-label":(T=(E=q(l))==null?void 0:E.yearPicker)==null?void 0:T.call(E,!0),type:"year",onToggle:_,onSelected:$[4]||($[4]=C=>m(C))},dn({"button-icon":Pe(()=>[w.$slots["calendar-icon"]?Ie(w.$slots,"calendar-icon",{key:0}):re("",!0),w.$slots["calendar-icon"]?re("",!0):(M(),Le(q(Lr),{key:1}))]),_:2},[w.$slots["year-overlay-value"]?{name:"item",fn:Pe(({item:C})=>[Ie(w.$slots,"year-overlay-value",{text:C.text,value:C.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels","overlay-label"])):re("",!0)]}),_:3},8,["name","css"])],64)}}}),yf=(t,e,n)=>{if(e.value&&Array.isArray(e.value))if(e.value.some(s=>tt(t,s))){const s=e.value.filter(i=>!tt(i,t));e.value=s.length?s:null}else(n&&+n>e.value.length||!n)&&e.value.push(t);else e.value=[t]},wf=(t,e,n)=>{let s=t.value?t.value.slice():[];return s.length===2&&s[1]!==null&&(s=[]),s.length?$t(e,s[0])?(s.unshift(e),n("range-start",s[0]),n("range-start",s[1])):(s[1]=e,n("range-end",e)):(s=[e],n("range-start",e)),s},eu=(t,e,n,s)=>{t&&(t[0]&&t[1]&&n&&e("auto-apply"),t[0]&&!t[1]&&s&&n&&e("auto-apply"))},Gy=t=>{Array.isArray(t.value)&&t.value.length<=2&&t.range?t.modelValue.value=t.value.map(e=>En(we(e),t.timezone)):Array.isArray(t.value)||(t.modelValue.value=En(we(t.value),t.timezone))},Jy=(t,e,n,s)=>Array.isArray(e.value)&&(e.value.length===2||e.value.length===1&&s.value.partialRange)?s.value.fixedStart&&(Dt(t,e.value[0])||tt(t,e.value[0]))?[e.value[0],t]:s.value.fixedEnd&&($t(t,e.value[1])||tt(t,e.value[1]))?[t,e.value[1]]:(n("invalid-fixed-range",t),e.value):[],Xy=({multiCalendars:t,range:e,highlight:n,propDates:s,calendars:i,modelValue:o,props:r,filters:a,year:l,month:c,emit:u})=>{const d=_e(()=>mf(r.yearRange,r.locale,r.reverseYears)),f=ve([!1]),g=_e(()=>(C,B)=>{const J=dt(os(new Date),{month:c.value(C),year:l.value(C)}),ae=B?yy(J):Ra(J);return Wy(ae,s.value.maxDate,s.value.minDate,r.preventMinMaxNavigation,B)}),_=()=>Array.isArray(o.value)&&t.value.solo&&o.value[1],m=()=>{for(let C=0;C<t.value.count;C++)if(C===0)i.value[C]=i.value[0];else if(C===t.value.count-1&&_())i.value[C]={month:Qe(o.value[1]),year:ze(o.value[1])};else{const B=dt(we(),i.value[C-1]);i.value[C]={month:Qe(B),year:ze(sf(B,1))}}},b=C=>{if(!C)return m();const B=dt(we(),i.value[C]);return i.value[0].year=ze(Oy(B,t.value.count-1)),m()},w=(C,B)=>{const J=c2(B,C);return e.value.showLastInRange&&J>1?B:C},$=C=>r.focusStartDate||t.value.solo?C[0]:C[1]?w(C[0],C[1]):C[0],A=()=>{if(o.value){const C=Array.isArray(o.value)?$(o.value):o.value;i.value[0]={month:Qe(C),year:ze(C)}}},D=()=>{A(),t.value.count&&m()};Bt(o,(C,B)=>{r.isTextInputDate&&JSON.stringify(C??{})!==JSON.stringify(B??{})&&D()}),qt(()=>{D()});const x=(C,B)=>{i.value[B].year=C,u("update-month-year",{instance:B,year:C,month:i.value[B].month}),t.value.count&&!t.value.solo&&b(B)},y=_e(()=>C=>kr(d.value,B=>{var J;const ae=l.value(C)===B.value,Y=Na(B.value,Sr(s.value.minDate),Sr(s.value.maxDate))||((J=a.value.years)==null?void 0:J.includes(l.value(C))),L=bf(n.value,B.value);return{active:ae,disabled:Y,highlighted:L}})),S=(C,B)=>{x(C,B),T(B)},E=(C,B=!1)=>{if(!g.value(C,B)){const J=B?l.value(C)+1:l.value(C)-1;x(J,C)}},T=(C,B=!1,J)=>{B||u("reset-flow"),J!==void 0?f.value[C]=J:f.value[C]=!f.value[C],f.value[C]?u("overlay-toggle",{open:!0,overlay:ln.year}):(u("overlay-closed"),u("overlay-toggle",{open:!1,overlay:ln.year}))};return{isDisabled:g,groupedYears:y,showYearPicker:f,selectYear:x,toggleYearPicker:T,handleYearSelect:S,handleYear:E}},QI=(t,e)=>{const{defaultedMultiCalendars:n,defaultedAriaLabels:s,defaultedTransitions:i,defaultedConfig:o,defaultedRange:r,defaultedHighlight:a,propDates:l,defaultedTz:c,defaultedFilters:u,defaultedMultiDates:d}=xt(t),f=()=>{t.isTextInputDate&&D(ze(we(t.startDate)),0)},{modelValue:g,year:_,month:m,calendars:b}=Qa(t,e,f),w=_e(()=>Ry(t.formatLocale,t.locale,t.monthNameFormat)),$=ve(null),{checkMinMaxRange:A}=ji(t),{selectYear:D,groupedYears:x,showYearPicker:y,toggleYearPicker:S,handleYearSelect:E,handleYear:T,isDisabled:C}=Xy({modelValue:g,multiCalendars:n,range:r,highlight:a,calendars:b,year:_,propDates:l,month:m,filters:u,props:t,emit:e});qt(()=>{t.startDate&&(g.value&&t.focusStartDate||!g.value)&&D(ze(we(t.startDate)),0)});const B=R=>R?{month:Qe(R),year:ze(R)}:{month:null,year:null},J=()=>g.value?Array.isArray(g.value)?g.value.map(R=>B(R)):B(g.value):B(),ae=(R,ee)=>{const oe=b.value[R],P=J();return Array.isArray(P)?P.some(se=>se.year===oe?.year&&se.month===ee):oe?.year===P.year&&ee===P.month},Y=(R,ee,oe)=>{var P,se;const ue=J();return Array.isArray(ue)?_.value(ee)===((P=ue[oe])==null?void 0:P.year)&&R===((se=ue[oe])==null?void 0:se.month):!1},L=(R,ee)=>{if(r.value.enabled){const oe=J();if(Array.isArray(g.value)&&Array.isArray(oe)){const P=Y(R,ee,0)||Y(R,ee,1),se=Ys(os(we()),R,_.value(ee));return Xc(g.value,$.value,se)&&!P}return!1}return!1},I=_e(()=>R=>kr(w.value,ee=>{var oe;const P=ae(R,ee.value),se=Na(ee.value,By(_.value(R),l.value.minDate),Vy(_.value(R),l.value.maxDate))||kI(l.value.disabledDates,_.value(R)).includes(ee.value)||((oe=u.value.months)==null?void 0:oe.includes(ee.value)),ue=L(ee.value,R),xe=Yy(a.value,ee.value,_.value(R));return{active:P,disabled:se,isBetween:ue,highlighted:xe}})),V=(R,ee)=>Ys(os(we()),R,_.value(ee)),Q=(R,ee)=>{const oe=g.value?g.value:os(new Date);g.value=Ys(oe,R,_.value(ee)),e("auto-apply"),e("update-flow-step")},Z=(R,ee)=>{const oe=V(R,ee);r.value.fixedEnd||r.value.fixedStart?g.value=Jy(oe,g,e,r):g.value?A(oe,g.value)&&(g.value=wf(g,V(R,ee),e)):g.value=[V(R,ee)],en().then(()=>{eu(g.value,e,t.autoApply,t.modelAuto)})},le=(R,ee)=>{yf(V(R,ee),g,d.value.limit),e("auto-apply",!0)},ye=(R,ee)=>(b.value[ee].month=R,X(ee,b.value[ee].year,R),d.value.enabled?le(R,ee):r.value.enabled?Z(R,ee):Q(R,ee)),U=(R,ee)=>{D(R,ee),X(ee,R,null)},X=(R,ee,oe)=>{let P=oe;if(!P&&P!==0){const se=J();P=Array.isArray(se)?se[R].month:se.month}e("update-month-year",{instance:R,year:ee,month:P})};return{groupedMonths:I,groupedYears:x,year:_,isDisabled:C,defaultedMultiCalendars:n,defaultedAriaLabels:s,defaultedTransitions:i,defaultedConfig:o,showYearPicker:y,modelValue:g,presetDate:(R,ee)=>{Gy({value:R,modelValue:g,range:r.value.enabled,timezone:ee?void 0:c.value.timezone}),e("auto-apply")},setHoverDate:(R,ee)=>{$.value=V(R,ee)},selectMonth:ye,selectYear:U,toggleYearPicker:S,handleYearSelect:E,handleYear:T,getModelMonthYear:J}},ZI=Nt({compatConfig:{MODE:3},__name:"MonthPicker",props:{...ds},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(t,{expose:e,emit:n}){const s=n,i=Do(),o=Rn(i,"yearMode"),r=t;qt(()=>{r.shadow||s("mount",null)});const{groupedMonths:a,groupedYears:l,year:c,isDisabled:u,defaultedMultiCalendars:d,defaultedConfig:f,showYearPicker:g,modelValue:_,presetDate:m,setHoverDate:b,selectMonth:w,selectYear:$,toggleYearPicker:A,handleYearSelect:D,handleYear:x,getModelMonthYear:y}=QI(r,s);return e({getSidebarProps:()=>({modelValue:_,year:c,getModelMonthYear:y,selectMonth:w,selectYear:$,handleYear:x}),presetDate:m,toggleYearPicker:S=>A(0,S)}),(S,E)=>(M(),Le(Zc,{"multi-calendars":q(d).count,collapse:S.collapse,stretch:""},{default:Pe(({instance:T})=>[S.$slots["top-extra"]?Ie(S.$slots,"top-extra",{key:0,value:S.internalModelValue}):re("",!0),S.$slots["month-year"]?Ie(S.$slots,"month-year",Qt(zt({key:1},{year:q(c),months:q(a)(T),years:q(l)(T),selectMonth:q(w),selectYear:q($),instance:T}))):(M(),Le(Ja,{key:2,items:q(a)(T),"arrow-navigation":S.arrowNavigation,"is-last":S.autoApply&&!q(f).keepActionRow,"esc-close":S.escClose,height:q(f).modeHeight,config:S.config,"no-overlay-focus":!!(S.noOverlayFocus||S.textInput),"use-relative":"",type:"month",onSelected:C=>q(w)(C,T),onHoverValue:C=>q(b)(C,T)},dn({header:Pe(()=>[Se(qy,zt(S.$props,{items:q(l)(T),instance:T,"show-year-picker":q(g)[T],year:q(c)(T),"is-disabled":C=>q(u)(T,C),onHandleYear:C=>q(x)(T,C),onYearSelect:C=>q(D)(C,T),onToggleYearPicker:C=>q(A)(T,C?.flow,C?.show)}),dn({_:2},[Ue(q(o),(C,B)=>({name:C,fn:Pe(J=>[Ie(S.$slots,C,Qt(mn(J)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[S.$slots["month-overlay-value"]?{name:"item",fn:Pe(({item:C})=>[Ie(S.$slots,"month-overlay-value",{text:C.text,value:C.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"]))}}),eR=(t,e)=>{const n=()=>{t.isTextInputDate&&(u.value=ze(we(t.startDate)))},{modelValue:s}=Qa(t,e,n),i=ve(null),{defaultedHighlight:o,defaultedMultiDates:r,defaultedFilters:a,defaultedRange:l,propDates:c}=xt(t),u=ve();qt(()=>{t.startDate&&(s.value&&t.focusStartDate||!s.value)&&(u.value=ze(we(t.startDate)))});const d=m=>Array.isArray(s.value)?s.value.some(b=>ze(b)===m):s.value?ze(s.value)===m:!1,f=m=>l.value.enabled&&Array.isArray(s.value)?Xc(s.value,i.value,_(m)):!1,g=_e(()=>kr(mf(t.yearRange,t.locale,t.reverseYears),m=>{const b=d(m.value),w=Na(m.value,Sr(c.value.minDate),Sr(c.value.maxDate))||a.value.years.includes(m.value),$=f(m.value)&&!b,A=bf(o.value,m.value);return{active:b,disabled:w,isBetween:$,highlighted:A}})),_=m=>xs(os(Ra(new Date)),m);return{groupedYears:g,modelValue:s,focusYear:u,setHoverValue:m=>{i.value=xs(os(new Date),m)},selectYear:m=>{var b;if(e("update-month-year",{instance:0,year:m}),r.value.enabled)return s.value?Array.isArray(s.value)&&(((b=s.value)==null?void 0:b.map(w=>ze(w))).includes(m)?s.value=s.value.filter(w=>ze(w)!==m):s.value.push(xs(wn(we()),m))):s.value=[xs(wn(Ra(we())),m)],e("auto-apply",!0);l.value.enabled?(s.value=wf(s,_(m),e),en().then(()=>{eu(s.value,e,t.autoApply,t.modelAuto)})):(s.value=_(m),e("auto-apply"))}}},tR=Nt({compatConfig:{MODE:3},__name:"YearPicker",props:{...ds},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(t,{expose:e,emit:n}){const s=n,i=t,{groupedYears:o,modelValue:r,focusYear:a,selectYear:l,setHoverValue:c}=eR(i,s),{defaultedConfig:u}=xt(i);return e({getSidebarProps:()=>({modelValue:r,selectYear:l})}),(d,f)=>(M(),F("div",null,[d.$slots["top-extra"]?Ie(d.$slots,"top-extra",{key:0,value:d.internalModelValue}):re("",!0),d.$slots["month-year"]?Ie(d.$slots,"month-year",Qt(zt({key:1},{years:q(o),selectYear:q(l)}))):(M(),Le(Ja,{key:2,items:q(o),"is-last":d.autoApply&&!q(u).keepActionRow,height:q(u).modeHeight,config:d.config,"no-overlay-focus":!!(d.noOverlayFocus||d.textInput),"focus-value":q(a),type:"year","use-relative":"",onSelected:q(l),onHoverValue:q(c)},dn({_:2},[d.$slots["year-overlay-value"]?{name:"item",fn:Pe(({item:g})=>[Ie(d.$slots,"year-overlay-value",{text:g.text,value:g.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),nR={key:0,class:"dp__time_input"},sR=["data-test","aria-label","onKeydown","onClick","onMousedown"],iR=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),oR=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),rR=["aria-label","disabled","data-test","onKeydown","onClick"],aR=["data-test","aria-label","onKeydown","onClick","onMousedown"],lR=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),cR=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),uR={key:0},dR=["aria-label"],hR=Nt({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},...ds},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(t,{expose:e,emit:n}){const s=n,i=t,{setTimePickerElements:o,setTimePickerBackRef:r}=Hi(),{defaultedAriaLabels:a,defaultedTransitions:l,defaultedFilters:c,defaultedConfig:u,defaultedRange:d}=xt(i),{transitionName:f,showTransition:g}=Xa(l),_=Ts({hours:!1,minutes:!1,seconds:!1}),m=ve("AM"),b=ve(null),w=ve([]),$=ve(),A=ve(!1);qt(()=>{s("mounted")});const D=v=>dt(new Date,{hours:v.hours,minutes:v.minutes,seconds:i.enableSeconds?v.seconds:0,milliseconds:0}),x=_e(()=>v=>V(v,i[v])||S(v,i[v])),y=_e(()=>({hours:i.hours,minutes:i.minutes,seconds:i.seconds})),S=(v,O)=>d.value.enabled&&!d.value.disableTimeRangeValidation?!i.validateTime(v,O):!1,E=(v,O)=>{if(d.value.enabled&&!d.value.disableTimeRangeValidation){const H=O?+i[`${v}Increment`]:-+i[`${v}Increment`],W=i[v]+H;return!i.validateTime(v,W)}return!1},T=_e(()=>v=>!U(+i[v]+ +i[`${v}Increment`],v)||E(v,!0)),C=_e(()=>v=>!U(+i[v]-+i[`${v}Increment`],v)||E(v,!1)),B=(v,O)=>fy(dt(we(),v),O),J=(v,O)=>iI(dt(we(),v),O),ae=_e(()=>({dp__time_col:!0,dp__time_col_block:!i.timePickerInline,dp__time_col_reg_block:!i.enableSeconds&&i.is24&&!i.timePickerInline,dp__time_col_reg_inline:!i.enableSeconds&&i.is24&&i.timePickerInline,dp__time_col_reg_with_button:!i.enableSeconds&&!i.is24,dp__time_col_sec:i.enableSeconds&&i.is24,dp__time_col_sec_with_button:i.enableSeconds&&!i.is24})),Y=_e(()=>{const v=[{type:"hours"}];return i.enableMinutes&&v.push({type:"",separator:!0},{type:"minutes"}),i.enableSeconds&&v.push({type:"",separator:!0},{type:"seconds"}),v}),L=_e(()=>Y.value.filter(v=>!v.separator)),I=_e(()=>v=>{if(v==="hours"){const O=se(+i.hours);return{text:O<10?`0${O}`:`${O}`,value:O}}return{text:i[v]<10?`0${i[v]}`:`${i[v]}`,value:i[v]}}),V=(v,O)=>{var H;if(!i.disabledTimesConfig)return!1;const W=i.disabledTimesConfig(i.order,v==="hours"?O:void 0);return W[v]?!!((H=W[v])!=null&&H.includes(O)):!0},Q=(v,O)=>O!=="hours"||m.value==="AM"?v:v+12,Z=v=>{const O=i.is24?24:12,H=v==="hours"?O:60,W=+i[`${v}GridIncrement`],ie=v==="hours"&&!i.is24?W:0,j=[];for(let te=ie;te<H;te+=W)j.push({value:i.is24?te:Q(te,v),text:te<10?`0${te}`:`${te}`});return v==="hours"&&!i.is24&&j.unshift({value:m.value==="PM"?12:0,text:"12"}),kr(j,te=>({active:!1,disabled:c.value.times[v].includes(te.value)||!U(te.value,v)||V(v,te.value)||S(v,te.value)}))},le=v=>v>=0?v:59,ye=v=>v>=0?v:23,U=(v,O)=>{const H=i.minTime?D(zu(i.minTime)):null,W=i.maxTime?D(zu(i.maxTime)):null,ie=D(zu(y.value,O,O==="minutes"||O==="seconds"?le(v):ye(v)));return H&&W?(La(ie,W)||tr(ie,W))&&(wr(ie,H)||tr(ie,H)):H?wr(ie,H)||tr(ie,H):W?La(ie,W)||tr(ie,W):!0},X=v=>i[`no${v[0].toUpperCase()+v.slice(1)}Overlay`],R=v=>{X(v)||(_[v]=!_[v],_[v]?(A.value=!0,s("overlay-opened",v)):(A.value=!1,s("overlay-closed",v)))},ee=v=>v==="hours"?Qs:v==="minutes"?Oi:yr,oe=()=>{$.value&&clearTimeout($.value)},P=(v,O=!0,H)=>{const W=O?B:J,ie=O?+i[`${v}Increment`]:-+i[`${v}Increment`];U(+i[v]+ie,v)&&s(`update:${v}`,ee(v)(W({[v]:+i[v]},{[v]:+i[`${v}Increment`]}))),!(H!=null&&H.keyboard)&&u.value.timeArrowHoldThreshold&&($.value=setTimeout(()=>{P(v,O)},u.value.timeArrowHoldThreshold))},se=v=>i.is24?v:(v>=12?m.value="PM":m.value="AM",uI(v)),ue=()=>{m.value==="PM"?(m.value="AM",s("update:hours",i.hours-12)):(m.value="PM",s("update:hours",i.hours+12)),s("am-pm-change",m.value)},xe=v=>{_[v]=!0},N=(v,O,H)=>{if(v&&i.arrowNavigation){Array.isArray(w.value[O])?w.value[O][H]=v:w.value[O]=[v];const W=w.value.reduce((ie,j)=>j.map((te,G)=>[...ie[G]||[],j[G]]),[]);r(i.closeTimePickerBtn),b.value&&(W[1]=W[1].concat(b.value)),o(W,i.order)}},he=(v,O)=>(R(v),s(`update:${v}`,O));return e({openChildCmp:xe}),(v,O)=>{var H;return v.disabled?re("",!0):(M(),F("div",nR,[(M(!0),F(Te,null,Ue(Y.value,(W,ie)=>{var j,te,G;return M(),F("div",{key:ie,class:Ce(ae.value)},[W.separator?(M(),F(Te,{key:0},[A.value?re("",!0):(M(),F(Te,{key:0},[be(":")],64))],64)):(M(),F(Te,{key:1},[h("button",{ref_for:!0,ref:de=>N(de,ie,0),type:"button",class:Ce({dp__btn:!0,dp__inc_dec_button:!v.timePickerInline,dp__inc_dec_button_inline:v.timePickerInline,dp__tp_inline_btn_top:v.timePickerInline,dp__inc_dec_button_disabled:T.value(W.type),"dp--hidden-el":A.value}),"data-test":`${W.type}-time-inc-btn-${i.order}`,"aria-label":(j=q(a))==null?void 0:j.incrementValue(W.type),tabindex:"0",onKeydown:de=>q(vn)(de,()=>P(W.type,!0,{keyboard:!0}),!0),onClick:de=>q(u).timeArrowHoldThreshold?void 0:P(W.type,!0),onMousedown:de=>q(u).timeArrowHoldThreshold?P(W.type,!0):void 0,onMouseup:oe},[i.timePickerInline?(M(),F(Te,{key:1},[v.$slots["tp-inline-arrow-up"]?Ie(v.$slots,"tp-inline-arrow-up",{key:0}):(M(),F(Te,{key:1},[iR,oR],64))],64)):(M(),F(Te,{key:0},[v.$slots["arrow-up"]?Ie(v.$slots,"arrow-up",{key:0}):re("",!0),v.$slots["arrow-up"]?re("",!0):(M(),Le(q(ff),{key:1}))],64))],42,sR),h("button",{ref_for:!0,ref:de=>N(de,ie,1),type:"button","aria-label":`${I.value(W.type).text}-${(te=q(a))==null?void 0:te.openTpOverlay(W.type)}`,class:Ce({dp__time_display:!0,dp__time_display_block:!v.timePickerInline,dp__time_display_inline:v.timePickerInline,"dp--time-invalid":x.value(W.type),"dp--time-overlay-btn":!x.value(W.type),"dp--hidden-el":A.value}),disabled:X(W.type),tabindex:"0","data-test":`${W.type}-toggle-overlay-btn-${i.order}`,onKeydown:de=>q(vn)(de,()=>R(W.type),!0),onClick:de=>R(W.type)},[v.$slots[W.type]?Ie(v.$slots,W.type,{key:0,text:I.value(W.type).text,value:I.value(W.type).value}):re("",!0),v.$slots[W.type]?re("",!0):(M(),F(Te,{key:1},[be(me(I.value(W.type).text),1)],64))],42,rR),h("button",{ref_for:!0,ref:de=>N(de,ie,2),type:"button",class:Ce({dp__btn:!0,dp__inc_dec_button:!v.timePickerInline,dp__inc_dec_button_inline:v.timePickerInline,dp__tp_inline_btn_bottom:v.timePickerInline,dp__inc_dec_button_disabled:C.value(W.type),"dp--hidden-el":A.value}),"data-test":`${W.type}-time-dec-btn-${i.order}`,"aria-label":(G=q(a))==null?void 0:G.decrementValue(W.type),tabindex:"0",onKeydown:de=>q(vn)(de,()=>P(W.type,!1,{keyboard:!0}),!0),onClick:de=>q(u).timeArrowHoldThreshold?void 0:P(W.type,!1),onMousedown:de=>q(u).timeArrowHoldThreshold?P(W.type,!1):void 0,onMouseup:oe},[i.timePickerInline?(M(),F(Te,{key:1},[v.$slots["tp-inline-arrow-down"]?Ie(v.$slots,"tp-inline-arrow-down",{key:0}):(M(),F(Te,{key:1},[lR,cR],64))],64)):(M(),F(Te,{key:0},[v.$slots["arrow-down"]?Ie(v.$slots,"arrow-down",{key:0}):re("",!0),v.$slots["arrow-down"]?re("",!0):(M(),Le(q(pf),{key:1}))],64))],42,aR)],64))],2)}),128)),v.is24?re("",!0):(M(),F("div",uR,[v.$slots["am-pm-button"]?Ie(v.$slots,"am-pm-button",{key:0,toggle:ue,value:m.value}):re("",!0),v.$slots["am-pm-button"]?re("",!0):(M(),F("button",{key:1,ref_key:"amPmButton",ref:b,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(H=q(a))==null?void 0:H.amPmButton,tabindex:"0",onClick:ue,onKeydown:O[0]||(O[0]=W=>q(vn)(W,()=>ue(),!0))},me(m.value),41,dR))])),(M(!0),F(Te,null,Ue(L.value,(W,ie)=>(M(),Le(At,{key:ie,name:q(f)(_[W.type]),css:q(g)},{default:Pe(()=>{var j,te;return[_[W.type]?(M(),Le(Ja,{key:0,items:Z(W.type),"is-last":v.autoApply&&!q(u).keepActionRow,"esc-close":v.escClose,type:W.type,"text-input":v.textInput,config:v.config,"arrow-navigation":v.arrowNavigation,"aria-labels":v.ariaLabels,"overlay-label":(te=(j=q(a)).timeOverlay)==null?void 0:te.call(j,W.type),onSelected:G=>he(W.type,G),onToggle:G=>R(W.type),onResetFlow:O[1]||(O[1]=G=>v.$emit("reset-flow"))},dn({"button-icon":Pe(()=>[v.$slots["clock-icon"]?Ie(v.$slots,"clock-icon",{key:0}):re("",!0),v.$slots["clock-icon"]?re("",!0):(M(),Le(Mo(v.timePickerInline?q(Lr):q(hf)),{key:1}))]),_:2},[v.$slots[`${W.type}-overlay-value`]?{name:"item",fn:Pe(({item:G})=>[Ie(v.$slots,`${W.type}-overlay-value`,{text:G.text,value:G.value})]),key:"0"}:void 0,v.$slots[`${W.type}-overlay-header`]?{name:"header",fn:Pe(()=>[Ie(v.$slots,`${W.type}-overlay-header`,{toggle:()=>R(W.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","overlay-label","onSelected","onToggle"])):re("",!0)]}),_:2},1032,["name","css"]))),128))]))}}}),fR={class:"dp--tp-wrap"},pR=["aria-label","tabindex"],gR=["role","aria-label","tabindex"],mR=["aria-label"],Qy=Nt({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},...ds},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(t,{expose:e,emit:n}){const s=n,i=t,{buildMatrix:o,setTimePicker:r}=Hi(),a=Do(),{defaultedTransitions:l,defaultedAriaLabels:c,defaultedTextInput:u,defaultedConfig:d,defaultedRange:f}=xt(i),{transitionName:g,showTransition:_}=Xa(l),{hideNavigationButtons:m}=tu(),b=ve(null),w=ve(null),$=ve([]),A=ve(null),D=ve(!1);qt(()=>{s("mount"),!i.timePicker&&i.arrowNavigation?o([Ht(b.value)],"time"):r(!0,i.timePicker)});const x=_e(()=>f.value.enabled&&i.modelAuto?Ly(i.internalModelValue):!0),y=ve(!1),S=Z=>({hours:Array.isArray(i.hours)?i.hours[Z]:i.hours,minutes:Array.isArray(i.minutes)?i.minutes[Z]:i.minutes,seconds:Array.isArray(i.seconds)?i.seconds[Z]:i.seconds}),E=_e(()=>{const Z=[];if(f.value.enabled)for(let le=0;le<2;le++)Z.push(S(le));else Z.push(S(0));return Z}),T=(Z,le=!1,ye="")=>{le||s("reset-flow"),y.value=Z,s(Z?"overlay-opened":"overlay-closed",ln.time),i.arrowNavigation&&r(Z),en(()=>{ye!==""&&$.value[0]&&$.value[0].openChildCmp(ye)})},C=_e(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:i.autoApply&&!d.value.keepActionRow})),B=Rn(a,"timePicker"),J=(Z,le,ye)=>f.value.enabled?le===0?[Z,E.value[1][ye]]:[E.value[0][ye],Z]:Z,ae=Z=>{s("update:hours",Z)},Y=Z=>{s("update:minutes",Z)},L=Z=>{s("update:seconds",Z)},I=()=>{if(A.value&&!u.value.enabled&&!i.noOverlayFocus){const Z=Ny(A.value);Z&&Z.focus({preventScroll:!0})}},V=Z=>{D.value=!1,s("overlay-closed",Z)},Q=Z=>{D.value=!0,s("overlay-opened",Z)};return e({toggleTimePicker:T}),(Z,le)=>{var ye;return M(),F("div",fR,[!Z.timePicker&&!Z.timePickerInline?Oe((M(),F("button",{key:0,ref_key:"openTimePickerBtn",ref:b,type:"button",class:Ce({...C.value,"dp--hidden-el":y.value}),"aria-label":(ye=q(c))==null?void 0:ye.openTimePicker,tabindex:Z.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:le[0]||(le[0]=U=>q(vn)(U,()=>T(!0))),onClick:le[1]||(le[1]=U=>T(!0))},[Z.$slots["clock-icon"]?Ie(Z.$slots,"clock-icon",{key:0}):re("",!0),Z.$slots["clock-icon"]?re("",!0):(M(),Le(q(hf),{key:1}))],42,pR)),[[ec,!q(m)(Z.hideNavigation,"time")]]):re("",!0),Se(At,{name:q(g)(y.value),css:q(_)&&!Z.timePickerInline},{default:Pe(()=>{var U,X;return[y.value||Z.timePicker||Z.timePickerInline?(M(),F("div",{key:0,ref_key:"overlayRef",ref:A,role:Z.timePickerInline?void 0:"dialog",class:Ce({dp__overlay:!Z.timePickerInline,"dp--overlay-absolute":!i.timePicker&&!Z.timePickerInline,"dp--overlay-relative":i.timePicker}),style:jt(Z.timePicker?{height:`${q(d).modeHeight}px`}:void 0),"aria-label":(U=q(c))==null?void 0:U.timePicker,tabindex:Z.timePickerInline?void 0:0},[h("div",{class:Ce(Z.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[Z.$slots["time-picker-overlay"]?Ie(Z.$slots,"time-picker-overlay",{key:0,hours:t.hours,minutes:t.minutes,seconds:t.seconds,setHours:ae,setMinutes:Y,setSeconds:L}):re("",!0),Z.$slots["time-picker-overlay"]?re("",!0):(M(),F("div",{key:1,class:Ce(Z.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(M(!0),F(Te,null,Ue(E.value,(R,ee)=>Oe((M(),Le(hR,zt({key:ee,ref_for:!0},{...Z.$props,order:ee,hours:R.hours,minutes:R.minutes,seconds:R.seconds,closeTimePickerBtn:w.value,disabledTimesConfig:t.disabledTimesConfig,disabled:ee===0?q(f).fixedStart:q(f).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:$,"validate-time":(oe,P)=>t.validateTime(oe,J(P,ee,oe)),"onUpdate:hours":oe=>ae(J(oe,ee,"hours")),"onUpdate:minutes":oe=>Y(J(oe,ee,"minutes")),"onUpdate:seconds":oe=>L(J(oe,ee,"seconds")),onMounted:I,onOverlayClosed:V,onOverlayOpened:Q,onAmPmChange:le[2]||(le[2]=oe=>Z.$emit("am-pm-change",oe))}),dn({_:2},[Ue(q(B),(oe,P)=>({name:oe,fn:Pe(se=>[Ie(Z.$slots,oe,zt({ref_for:!0},se))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[ec,ee===0?!0:x.value]])),128))],2)),!Z.timePicker&&!Z.timePickerInline?Oe((M(),F("button",{key:2,ref_key:"closeTimePickerBtn",ref:w,type:"button",class:Ce({...C.value,"dp--hidden-el":D.value}),"aria-label":(X=q(c))==null?void 0:X.closeTimePicker,tabindex:"0",onKeydown:le[3]||(le[3]=R=>q(vn)(R,()=>T(!1))),onClick:le[4]||(le[4]=R=>T(!1))},[Z.$slots["calendar-icon"]?Ie(Z.$slots,"calendar-icon",{key:0}):re("",!0),Z.$slots["calendar-icon"]?re("",!0):(M(),Le(q(Lr),{key:1}))],42,mR)),[[ec,!q(m)(Z.hideNavigation,"time")]]):re("",!0)],2)],14,gR)):re("",!0)]}),_:3},8,["name","css"])])}}}),Zy=(t,e,n,s)=>{const{defaultedRange:i}=xt(t),o=(A,D)=>Array.isArray(e[A])?e[A][D]:e[A],r=A=>t.enableSeconds?Array.isArray(e.seconds)?e.seconds[A]:e.seconds:0,a=(A,D)=>A?D!==void 0?Ei(A,o("hours",D),o("minutes",D),r(D)):Ei(A,e.hours,e.minutes,r()):Dy(we(),r(D)),l=(A,D)=>{e[A]=D},c=_e(()=>t.modelAuto&&i.value.enabled?Array.isArray(n.value)?n.value.length>1:!1:i.value.enabled),u=(A,D)=>{const x=Object.fromEntries(Object.keys(e).map(y=>y===A?[y,D]:[y,e[y]].slice()));if(c.value&&!i.value.disableTimeRangeValidation){const y=E=>n.value?Ei(n.value[E],x.hours[E],x.minutes[E],x.seconds[E]):null,S=E=>My(n.value[E],0);return!(tt(y(0),y(1))&&(wr(y(0),S(1))||La(y(1),S(0))))}return!0},d=(A,D)=>{u(A,D)&&(l(A,D),s&&s())},f=A=>{d("hours",A)},g=A=>{d("minutes",A)},_=A=>{d("seconds",A)},m=(A,D,x,y)=>{D&&f(A),!D&&!x&&g(A),x&&_(A),n.value&&y(n.value)},b=A=>{if(A){const D=Array.isArray(A),x=D?[+A[0].hours,+A[1].hours]:+A.hours,y=D?[+A[0].minutes,+A[1].minutes]:+A.minutes,S=D?[+A[0].seconds,+A[1].seconds]:+A.seconds;l("hours",x),l("minutes",y),t.enableSeconds&&l("seconds",S)}},w=(A,D)=>{const x={hours:Array.isArray(e.hours)?e.hours[A]:e.hours,disabledArr:[]};return(D||D===0)&&(x.hours=D),Array.isArray(t.disabledTimes)&&(x.disabledArr=i.value.enabled&&Array.isArray(t.disabledTimes[A])?t.disabledTimes[A]:t.disabledTimes),x},$=_e(()=>(A,D)=>{var x;if(Array.isArray(t.disabledTimes)){const{disabledArr:y,hours:S}=w(A,D),E=y.filter(T=>+T.hours===S);return((x=E[0])==null?void 0:x.minutes)==="*"?{hours:[S],minutes:void 0,seconds:void 0}:{hours:[],minutes:E?.map(T=>+T.minutes)??[],seconds:E?.map(T=>T.seconds?+T.seconds:void 0)??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:l,updateHours:f,updateMinutes:g,updateSeconds:_,getSetDateTime:a,updateTimeValues:m,getSecondsValue:r,assignStartTime:b,validateTime:u,disabledTimesConfig:$}},_R=(t,e)=>{const n=()=>{t.isTextInputDate&&D()},{modelValue:s,time:i}=Qa(t,e,n),{defaultedStartTime:o,defaultedRange:r,defaultedTz:a}=xt(t),{updateTimeValues:l,getSetDateTime:c,setTime:u,assignStartTime:d,disabledTimesConfig:f,validateTime:g}=Zy(t,i,s,_);function _(){e("update-flow-step")}const m=y=>{const{hours:S,minutes:E,seconds:T}=y;return{hours:+S,minutes:+E,seconds:T?+T:0}},b=()=>{if(t.startTime){if(Array.isArray(t.startTime)){const S=m(t.startTime[0]),E=m(t.startTime[1]);return[dt(we(),S),dt(we(),E)]}const y=m(t.startTime);return dt(we(),y)}return r.value.enabled?[null,null]:null},w=()=>{if(r.value.enabled){const[y,S]=b();s.value=[En(c(y,0),a.value.timezone),En(c(S,1),a.value.timezone)]}else s.value=En(c(b()),a.value.timezone)},$=y=>Array.isArray(y)?[wo(we(y[0])),wo(we(y[1]))]:[wo(y??we())],A=(y,S,E)=>{u("hours",y),u("minutes",S),u("seconds",t.enableSeconds?E:0)},D=()=>{const[y,S]=$(s.value);return r.value.enabled?A([y.hours,S.hours],[y.minutes,S.minutes],[y.seconds,S.seconds]):A(y.hours,y.minutes,y.seconds)};qt(()=>{if(!t.shadow)return d(o.value),s.value?D():w()});const x=()=>{Array.isArray(s.value)?s.value=s.value.map((y,S)=>y&&c(y,S)):s.value=c(s.value),e("time-update")};return{modelValue:s,time:i,disabledTimesConfig:f,updateTime:(y,S=!0,E=!1)=>{l(y,S,E,x)},validateTime:g}},vR=Nt({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...ds},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(t,{expose:e,emit:n}){const s=n,i=t,o=Do(),r=Rn(o,"timePicker"),a=ve(null),{time:l,modelValue:c,disabledTimesConfig:u,updateTime:d,validateTime:f}=_R(i,s);return qt(()=>{i.shadow||s("mount",null)}),e({getSidebarProps:()=>({modelValue:c,time:l,updateTime:d}),toggleTimePicker:(g,_=!1,m="")=>{var b;(b=a.value)==null||b.toggleTimePicker(g,_,m)}}),(g,_)=>(M(),Le(Zc,{"multi-calendars":0,stretch:""},{default:Pe(()=>[Se(Qy,zt({ref_key:"tpRef",ref:a},g.$props,{hours:q(l).hours,minutes:q(l).minutes,seconds:q(l).seconds,"internal-model-value":g.internalModelValue,"disabled-times-config":q(u),"validate-time":q(f),"onUpdate:hours":_[0]||(_[0]=m=>q(d)(m)),"onUpdate:minutes":_[1]||(_[1]=m=>q(d)(m,!1)),"onUpdate:seconds":_[2]||(_[2]=m=>q(d)(m,!1,!0)),onAmPmChange:_[3]||(_[3]=m=>g.$emit("am-pm-change",m)),onResetFlow:_[4]||(_[4]=m=>g.$emit("reset-flow")),onOverlayClosed:_[5]||(_[5]=m=>g.$emit("overlay-toggle",{open:!1,overlay:m})),onOverlayOpened:_[6]||(_[6]=m=>g.$emit("overlay-toggle",{open:!0,overlay:m}))}),dn({_:2},[Ue(q(r),(m,b)=>({name:m,fn:Pe(w=>[Ie(g.$slots,m,Qt(mn(w)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),bR={class:"dp--header-wrap"},yR={key:0,class:"dp__month_year_wrap"},wR={key:0},xR={class:"dp__month_year_wrap"},kR=["data-dp-element","aria-label","data-test","onClick","onKeydown"],SR=Nt({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:()=>[]},...ds},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(t,{expose:e,emit:n}){const s=n,i=t,{defaultedTransitions:o,defaultedAriaLabels:r,defaultedMultiCalendars:a,defaultedFilters:l,defaultedConfig:c,defaultedHighlight:u,propDates:d,defaultedUI:f}=xt(i),{transitionName:g,showTransition:_}=Xa(o),{buildMatrix:m}=Hi(),{handleMonthYearChange:b,isDisabled:w,updateMonthYear:$}=jI(i,s),{showLeftIcon:A,showRightIcon:D}=tu(),x=ve(!1),y=ve(!1),S=ve(!1),E=ve([null,null,null,null]);qt(()=>{s("mount")});const T=X=>({get:()=>i[X],set:R=>{const ee=X===ts.month?ts.year:ts.month;s("update-month-year",{[X]:R,[ee]:i[ee]}),X===ts.month?V(!0):Q(!0)}}),C=_e(T(ts.month)),B=_e(T(ts.year)),J=_e(()=>X=>({month:i.month,year:i.year,items:X===ts.month?i.months:i.years,instance:i.instance,updateMonthYear:$,toggle:X===ts.month?V:Q})),ae=_e(()=>i.months.find(R=>R.value===i.month)||{text:"",value:0}),Y=_e(()=>kr(i.months,X=>{const R=i.month===X.value,ee=Na(X.value,By(i.year,d.value.minDate),Vy(i.year,d.value.maxDate))||l.value.months.includes(X.value),oe=Yy(u.value,X.value,i.year);return{active:R,disabled:ee,highlighted:oe}})),L=_e(()=>kr(i.years,X=>{const R=i.year===X.value,ee=Na(X.value,Sr(d.value.minDate),Sr(d.value.maxDate))||l.value.years.includes(X.value),oe=bf(u.value,X.value);return{active:R,disabled:ee,highlighted:oe}})),I=(X,R,ee)=>{ee!==void 0?X.value=ee:X.value=!X.value,X.value?(S.value=!0,s("overlay-opened",R)):(S.value=!1,s("overlay-closed",R))},V=(X=!1,R)=>{Z(X),I(x,ln.month,R)},Q=(X=!1,R)=>{Z(X),I(y,ln.year,R)},Z=X=>{X||s("reset-flow")},le=(X,R)=>{i.arrowNavigation&&(E.value[R]=Ht(X),m(E.value,"monthYear"))},ye=_e(()=>{var X,R,ee,oe,P,se;return[{type:ts.month,index:1,toggle:V,modelValue:C.value,updateModelValue:ue=>C.value=ue,text:ae.value.text,showSelectionGrid:x.value,items:Y.value,ariaLabel:(X=r.value)==null?void 0:X.openMonthsOverlay,overlayLabel:((ee=(R=r.value).monthPicker)==null?void 0:ee.call(R,!0))??void 0},{type:ts.year,index:2,toggle:Q,modelValue:B.value,updateModelValue:ue=>B.value=ue,text:Fy(i.year,i.locale),showSelectionGrid:y.value,items:L.value,ariaLabel:(oe=r.value)==null?void 0:oe.openYearsOverlay,overlayLabel:((se=(P=r.value).yearPicker)==null?void 0:se.call(P,!0))??void 0}]}),U=_e(()=>i.disableYearSelect?[ye.value[0]]:i.yearFirst?[...ye.value].reverse():ye.value);return e({toggleMonthPicker:V,toggleYearPicker:Q,handleMonthYearChange:b}),(X,R)=>{var ee,oe,P,se,ue,xe;return M(),F("div",bR,[X.$slots["month-year"]?(M(),F("div",yR,[Ie(X.$slots,"month-year",Qt(mn({month:t.month,year:t.year,months:t.months,years:t.years,updateMonthYear:q($),handleMonthYearChange:q(b),instance:t.instance})))])):(M(),F(Te,{key:1},[X.$slots["top-extra"]?(M(),F("div",wR,[Ie(X.$slots,"top-extra",{value:X.internalModelValue})])):re("",!0),h("div",xR,[q(A)(q(a),t.instance)&&!X.vertical?(M(),Le(ba,{key:0,"aria-label":(ee=q(r))==null?void 0:ee.prevMonth,disabled:q(w)(!1),class:Ce((oe=q(f))==null?void 0:oe.navBtnPrev),"el-name":"action-prev",onActivate:R[0]||(R[0]=N=>q(b)(!1,!0)),onSetRef:R[1]||(R[1]=N=>le(N,0))},{default:Pe(()=>[X.$slots["arrow-left"]?Ie(X.$slots,"arrow-left",{key:0}):re("",!0),X.$slots["arrow-left"]?re("",!0):(M(),Le(q(uf),{key:1}))]),_:3},8,["aria-label","disabled","class"])):re("",!0),h("div",{class:Ce(["dp__month_year_wrap",{dp__year_disable_select:X.disableYearSelect}])},[(M(!0),F(Te,null,Ue(U.value,(N,he)=>(M(),F(Te,{key:N.type},[h("button",{ref_for:!0,ref:v=>le(v,he+1),type:"button","data-dp-element":`overlay-${N.type}`,class:Ce(["dp__btn dp__month_year_select",{"dp--hidden-el":S.value}]),"aria-label":`${N.text}-${N.ariaLabel}`,"data-test":`${N.type}-toggle-overlay-${t.instance}`,onClick:N.toggle,onKeydown:v=>q(vn)(v,()=>N.toggle(),!0)},[X.$slots[N.type]?Ie(X.$slots,N.type,{key:0,text:N.text,value:i[N.type]}):re("",!0),X.$slots[N.type]?re("",!0):(M(),F(Te,{key:1},[be(me(N.text),1)],64))],42,kR),Se(At,{name:q(g)(N.showSelectionGrid),css:q(_)},{default:Pe(()=>[N.showSelectionGrid?(M(),Le(Ja,{key:0,items:N.items,"arrow-navigation":X.arrowNavigation,"hide-navigation":X.hideNavigation,"is-last":X.autoApply&&!q(c).keepActionRow,"skip-button-ref":!1,config:X.config,type:N.type,"header-refs":[],"esc-close":X.escClose,"menu-wrap-ref":X.menuWrapRef,"text-input":X.textInput,"aria-labels":X.ariaLabels,"overlay-label":N.overlayLabel,onSelected:N.updateModelValue,onToggle:N.toggle},dn({"button-icon":Pe(()=>[X.$slots["calendar-icon"]?Ie(X.$slots,"calendar-icon",{key:0}):re("",!0),X.$slots["calendar-icon"]?re("",!0):(M(),Le(q(Lr),{key:1}))]),_:2},[X.$slots[`${N.type}-overlay-value`]?{name:"item",fn:Pe(({item:v})=>[Ie(X.$slots,`${N.type}-overlay-value`,{text:v.text,value:v.value})]),key:"0"}:void 0,X.$slots[`${N.type}-overlay`]?{name:"overlay",fn:Pe(()=>[Ie(X.$slots,`${N.type}-overlay`,zt({ref_for:!0},J.value(N.type)))]),key:"1"}:void 0,X.$slots[`${N.type}-overlay-header`]?{name:"header",fn:Pe(()=>[Ie(X.$slots,`${N.type}-overlay-header`,{toggle:N.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","overlay-label","onSelected","onToggle"])):re("",!0)]),_:2},1032,["name","css"])],64))),128))],2),q(A)(q(a),t.instance)&&X.vertical?(M(),Le(ba,{key:1,"aria-label":(P=q(r))==null?void 0:P.prevMonth,"el-name":"action-prev",disabled:q(w)(!1),class:Ce((se=q(f))==null?void 0:se.navBtnPrev),onActivate:R[2]||(R[2]=N=>q(b)(!1,!0))},{default:Pe(()=>[X.$slots["arrow-up"]?Ie(X.$slots,"arrow-up",{key:0}):re("",!0),X.$slots["arrow-up"]?re("",!0):(M(),Le(q(ff),{key:1}))]),_:3},8,["aria-label","disabled","class"])):re("",!0),q(D)(q(a),t.instance)?(M(),Le(ba,{key:2,ref:"rightIcon","el-name":"action-next",disabled:q(w)(!0),"aria-label":(ue=q(r))==null?void 0:ue.nextMonth,class:Ce((xe=q(f))==null?void 0:xe.navBtnNext),onActivate:R[3]||(R[3]=N=>q(b)(!0,!0)),onSetRef:R[4]||(R[4]=N=>le(N,X.disableYearSelect?2:3))},{default:Pe(()=>[X.$slots[X.vertical?"arrow-down":"arrow-right"]?Ie(X.$slots,X.vertical?"arrow-down":"arrow-right",{key:0}):re("",!0),X.$slots[X.vertical?"arrow-down":"arrow-right"]?re("",!0):(M(),Le(Mo(X.vertical?q(pf):q(df)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):re("",!0)])],64))])}}}),$R={class:"dp__calendar_header",role:"row"},AR={key:0,class:"dp__calendar_header_item",role:"gridcell"},CR=["aria-label"],ER=h("div",{class:"dp__calendar_header_separator"},null,-1),PR={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},TR={class:"dp__cell_inner"},MR=["id","aria-pressed","aria-disabled","aria-label","data-test","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],DR=Nt({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},...ds},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(t,{expose:e,emit:n}){const s=n,i=t,{buildMultiLevelMatrix:o}=Hi(),{defaultedTransitions:r,defaultedConfig:a,defaultedAriaLabels:l,defaultedMultiCalendars:c,defaultedWeekNumbers:u,defaultedMultiDates:d,defaultedUI:f}=xt(i),g=ve(null),_=ve({bottom:"",left:"",transform:""}),m=ve([]),b=ve(null),w=ve(!0),$=ve(""),A=ve({startX:0,endX:0,startY:0,endY:0}),D=ve([]),x=ve({left:"50%"}),y=ve(!1),S=_e(()=>i.calendar?i.calendar(i.mappedDates):i.mappedDates),E=_e(()=>i.dayNames?Array.isArray(i.dayNames)?i.dayNames:i.dayNames(i.locale,+i.weekStart):cI(i.formatLocale,i.locale,+i.weekStart));qt(()=>{s("mount",{cmp:"calendar",refs:m}),a.value.noSwipe||b.value&&(b.value.addEventListener("touchstart",le,{passive:!1}),b.value.addEventListener("touchend",ye,{passive:!1}),b.value.addEventListener("touchmove",U,{passive:!1})),i.monthChangeOnScroll&&b.value&&b.value.addEventListener("wheel",ee,{passive:!1})});const T=N=>N?i.vertical?"vNext":"next":i.vertical?"vPrevious":"previous",C=(N,he)=>{if(i.transitions){const v=wn(Ys(we(),i.month,i.year));$.value=Dt(wn(Ys(we(),N,he)),v)?r.value[T(!0)]:r.value[T(!1)],w.value=!1,en(()=>{w.value=!0})}},B=_e(()=>({...f.value.calendar??{}})),J=_e(()=>N=>{const he=dI(N);return{dp__marker_dot:he.type==="dot",dp__marker_line:he.type==="line"}}),ae=_e(()=>N=>tt(N,g.value)),Y=_e(()=>({dp__calendar:!0,dp__calendar_next:c.value.count>0&&i.instance!==0})),L=_e(()=>N=>i.hideOffsetDates?N.current:!0),I=async(N,he)=>{const{width:v,height:O}=N.getBoundingClientRect();g.value=he.value;let H={left:`${v/2}px`},W=-50;if(await en(),D.value[0]){const{left:ie,width:j}=D.value[0].getBoundingClientRect();ie<0&&(H={left:"0"},W=0,x.value.left=`${v/2}px`),window.innerWidth<ie+j&&(H={right:"0"},W=0,x.value.left=`${j-v/2}px`)}_.value={bottom:`${O}px`,...H,transform:`translateX(${W}%)`}},V=async(N,he,v)=>{var O,H,W;const ie=Ht(m.value[he][v]);ie&&((O=N.marker)!=null&&O.customPosition&&(W=(H=N.marker)==null?void 0:H.tooltip)!=null&&W.length?_.value=N.marker.customPosition(ie):await I(ie,N),s("tooltip-open",N.marker))},Q=async(N,he,v)=>{var O,H;if(y.value&&d.value.enabled&&d.value.dragSelect)return s("select-date",N);s("set-hover-date",N),(H=(O=N.marker)==null?void 0:O.tooltip)!=null&&H.length&&await V(N,he,v)},Z=N=>{g.value&&(g.value=null,_.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),s("tooltip-close",N.marker))},le=N=>{A.value.startX=N.changedTouches[0].screenX,A.value.startY=N.changedTouches[0].screenY},ye=N=>{A.value.endX=N.changedTouches[0].screenX,A.value.endY=N.changedTouches[0].screenY,X()},U=N=>{i.vertical&&!i.inline&&N.preventDefault()},X=()=>{const N=i.vertical?"Y":"X";Math.abs(A.value[`start${N}`]-A.value[`end${N}`])>10&&s("handle-swipe",A.value[`start${N}`]>A.value[`end${N}`]?"right":"left")},R=(N,he,v)=>{N&&(Array.isArray(m.value[he])?m.value[he][v]=N:m.value[he]=[N]),i.arrowNavigation&&o(m.value,"calendar")},ee=N=>{i.monthChangeOnScroll&&(N.preventDefault(),s("handle-scroll",N))},oe=N=>u.value.type==="local"?af(N.value,{weekStartsOn:+i.weekStart}):u.value.type==="iso"?of(N.value):typeof u.value.type=="function"?u.value.type(N.value):"",P=N=>{const he=N[0];return u.value.hideOnOffsetDates?N.some(v=>v.current)?oe(he):"":oe(he)},se=(N,he,v=!0)=>{v&&mI()||d.value.enabled||(Ci(N,a.value),s("select-date",he))},ue=N=>{Ci(N,a.value)},xe=N=>{d.value.enabled&&d.value.dragSelect?(y.value=!0,s("select-date",N)):d.value.enabled&&s("select-date",N)};return e({triggerTransition:C}),(N,he)=>(M(),F("div",{class:Ce(Y.value)},[h("div",{ref_key:"calendarWrapRef",ref:b,class:Ce(B.value),role:"grid"},[h("div",$R,[N.weekNumbers?(M(),F("div",AR,me(N.weekNumName),1)):re("",!0),(M(!0),F(Te,null,Ue(E.value,(v,O)=>{var H,W;return M(),F("div",{key:O,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(W=(H=q(l))==null?void 0:H.weekDay)==null?void 0:W.call(H,O)},[N.$slots["calendar-header"]?Ie(N.$slots,"calendar-header",{key:0,day:v,index:O}):re("",!0),N.$slots["calendar-header"]?re("",!0):(M(),F(Te,{key:1},[be(me(v),1)],64))],8,CR)}),128))]),ER,Se(At,{name:$.value,css:!!N.transitions},{default:Pe(()=>[w.value?(M(),F("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:he[1]||(he[1]=v=>y.value=!1)},[(M(!0),F(Te,null,Ue(S.value,(v,O)=>(M(),F("div",{key:O,class:"dp__calendar_row",role:"row"},[N.weekNumbers?(M(),F("div",PR,[h("div",TR,me(P(v.days)),1)])):re("",!0),(M(!0),F(Te,null,Ue(v.days,(H,W)=>{var ie,j,te;return M(),F("div",{id:q(Uy)(H.value),ref_for:!0,ref:G=>R(G,O,W),key:W+O,role:"gridcell",class:"dp__calendar_item","aria-pressed":(H.classData.dp__active_date||H.classData.dp__range_start||H.classData.dp__range_start)??void 0,"aria-disabled":H.classData.dp__cell_disabled||void 0,"aria-label":(j=(ie=q(l))==null?void 0:ie.day)==null?void 0:j.call(ie,H),tabindex:"0","data-test":H.value,onClick:Oa(G=>se(G,H),["prevent"]),onTouchend:G=>se(G,H,!1),onKeydown:G=>q(vn)(G,()=>N.$emit("select-date",H)),onMouseenter:G=>Q(H,O,W),onMouseleave:G=>Z(H),onMousedown:G=>xe(H),onMouseup:he[0]||(he[0]=G=>y.value=!1)},[h("div",{class:Ce(["dp__cell_inner",H.classData])},[N.$slots.day&&L.value(H)?Ie(N.$slots,"day",{key:0,day:+H.text,date:H.value}):re("",!0),N.$slots.day?re("",!0):(M(),F(Te,{key:1},[be(me(H.text),1)],64)),H.marker&&L.value(H)?(M(),F(Te,{key:2},[N.$slots.marker?Ie(N.$slots,"marker",{key:0,marker:H.marker,day:+H.text,date:H.value}):(M(),F("div",{key:1,class:Ce(J.value(H.marker)),style:jt(H.marker.color?{backgroundColor:H.marker.color}:{})},null,6))],64)):re("",!0),ae.value(H.value)?(M(),F("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:D,class:"dp__marker_tooltip",style:jt(_.value)},[(te=H.marker)!=null&&te.tooltip?(M(),F("div",{key:0,class:"dp__tooltip_content",onClick:ue},[(M(!0),F(Te,null,Ue(H.marker.tooltip,(G,de)=>(M(),F("div",{key:de,class:"dp__tooltip_text"},[N.$slots["marker-tooltip"]?Ie(N.$slots,"marker-tooltip",{key:0,tooltip:G,day:H.value}):re("",!0),N.$slots["marker-tooltip"]?re("",!0):(M(),F(Te,{key:1},[h("div",{class:"dp__tooltip_mark",style:jt(G.color?{backgroundColor:G.color}:{})},null,4),h("div",null,me(G.text),1)],64))]))),128)),h("div",{class:"dp__arrow_bottom_tp",style:jt(x.value)},null,4)])):re("",!0)],4)):re("",!0)],2)],40,MR)}),128))]))),128))],32)):re("",!0)]),_:3},8,["name","css"])],2)],2))}}),vm=t=>Array.isArray(t),OR=(t,e,n,s)=>{const i=ve([]),o=ve(new Date),r=ve(),a=()=>le(t.isTextInputDate),{modelValue:l,calendars:c,time:u,today:d}=Qa(t,e,a),{defaultedMultiCalendars:f,defaultedStartTime:g,defaultedRange:_,defaultedConfig:m,defaultedTz:b,propDates:w,defaultedMultiDates:$}=xt(t),{validateMonthYearInRange:A,isDisabled:D,isDateRangeAllowed:x,checkMinMaxRange:y}=ji(t),{updateTimeValues:S,getSetDateTime:E,setTime:T,assignStartTime:C,validateTime:B,disabledTimesConfig:J}=Zy(t,u,l,s),ae=_e(()=>ne=>c.value[ne]?c.value[ne].month:0),Y=_e(()=>ne=>c.value[ne]?c.value[ne].year:0),L=ne=>!m.value.keepViewOnOffsetClick||ne?!0:!r.value,I=(ne,ke,ce,$e=!1)=>{var Me,nn;L($e)&&(c.value[ne]||(c.value[ne]={month:0,year:0}),c.value[ne].month=fm(ke)?(Me=c.value[ne])==null?void 0:Me.month:ke,c.value[ne].year=fm(ce)?(nn=c.value[ne])==null?void 0:nn.year:ce)},V=()=>{t.autoApply&&e("select-date")};qt(()=>{t.shadow||(l.value||(N(),g.value&&C(g.value)),le(!0),t.focusStartDate&&t.startDate&&N())});const Q=_e(()=>{var ne;return(ne=t.flow)!=null&&ne.length&&!t.partialFlow?t.flowStep===t.flow.length:!0}),Z=()=>{t.autoApply&&Q.value&&e("auto-apply",t.partialFlow?t.flowStep!==t.flow.length:!1)},le=(ne=!1)=>{if(l.value)return Array.isArray(l.value)?(i.value=l.value,P(ne)):X(l.value,ne);if(f.value.count&&ne&&!t.startDate)return U(we(),ne)},ye=()=>Array.isArray(l.value)&&_.value.enabled?Qe(l.value[0])===Qe(l.value[1]??l.value[0]):!1,U=(ne=new Date,ke=!1)=>{if((!f.value.count||!f.value.static||ke)&&I(0,Qe(ne),ze(ne)),f.value.count&&(!f.value.solo||!l.value||ye()))for(let ce=1;ce<f.value.count;ce++){const $e=dt(we(),{month:ae.value(ce-1),year:Y.value(ce-1)}),Me=fy($e,{months:1});c.value[ce]={month:Qe(Me),year:ze(Me)}}},X=(ne,ke)=>{U(ne),T("hours",Qs(ne)),T("minutes",Oi(ne)),T("seconds",yr(ne)),f.value.count&&ke&&xe()},R=ne=>{if(f.value.count){if(f.value.solo)return 0;const ke=Qe(ne[0]),ce=Qe(ne[1]);return Math.abs(ce-ke)<f.value.count?0:1}return 1},ee=(ne,ke)=>{ne[1]&&_.value.showLastInRange?U(ne[R(ne)],ke):U(ne[0],ke);const ce=($e,Me)=>[$e(ne[0]),ne[1]?$e(ne[1]):u[Me][1]];T("hours",ce(Qs,"hours")),T("minutes",ce(Oi,"minutes")),T("seconds",ce(yr,"seconds"))},oe=(ne,ke)=>{if((_.value.enabled||t.weekPicker)&&!$.value.enabled)return ee(ne,ke);if($.value.enabled&&ke){const ce=ne[ne.length-1];return X(ce,ke)}},P=ne=>{const ke=l.value;oe(ke,ne),f.value.count&&f.value.solo&&xe()},se=(ne,ke)=>{const ce=dt(we(),{month:ae.value(ke),year:Y.value(ke)}),$e=ne<0?ls(ce,1):xr(ce,1);A(Qe($e),ze($e),ne<0,t.preventMinMaxNavigation)&&(I(ke,Qe($e),ze($e)),e("update-month-year",{instance:ke,month:Qe($e),year:ze($e)}),f.value.count&&!f.value.solo&&ue(ke),n())},ue=ne=>{for(let ke=ne-1;ke>=0;ke--){const ce=xr(dt(we(),{month:ae.value(ke+1),year:Y.value(ke+1)}),1);I(ke,Qe(ce),ze(ce))}for(let ke=ne+1;ke<=f.value.count-1;ke++){const ce=ls(dt(we(),{month:ae.value(ke-1),year:Y.value(ke-1)}),1);I(ke,Qe(ce),ze(ce))}},xe=()=>{if(Array.isArray(l.value)&&l.value.length===2){const ne=we(we(l.value[1]?l.value[1]:ls(l.value[0],1))),[ke,ce]=[Qe(l.value[0]),ze(l.value[0])],[$e,Me]=[Qe(l.value[1]),ze(l.value[1])];(ke!==$e||ke===$e&&ce!==Me)&&f.value.solo&&I(1,Qe(ne),ze(ne))}else l.value&&!Array.isArray(l.value)&&(I(0,Qe(l.value),ze(l.value)),U(we()))},N=()=>{t.startDate&&(I(0,Qe(we(t.startDate)),ze(we(t.startDate))),f.value.count&&ue(0))},he=(ne,ke)=>{if(t.monthChangeOnScroll){const ce=new Date().getTime()-o.value.getTime(),$e=Math.abs(ne.deltaY);let Me=500;$e>1&&(Me=100),$e>100&&(Me=0),ce>Me&&(o.value=new Date,se(t.monthChangeOnScroll!=="inverse"?-ne.deltaY:ne.deltaY,ke))}},v=(ne,ke,ce=!1)=>{t.monthChangeOnArrows&&t.vertical===ce&&O(ne,ke)},O=(ne,ke)=>{se(ne==="right"?-1:1,ke)},H=ne=>{if(w.value.markers)return vc(ne.value,w.value.markers)},W=(ne,ke)=>{switch(t.sixWeeks===!0?"append":t.sixWeeks){case"prepend":return[!0,!1];case"center":return[ne==0,!0];case"fair":return[ne==0||ke>ne,!0];case"append":return[!1,!1];default:return[!1,!1]}},ie=(ne,ke,ce,$e)=>{if(t.sixWeeks&&ne.length<6){const Me=6-ne.length,nn=(ke.getDay()+7-$e)%7,xn=6-(ce.getDay()+7-$e)%7,[Os,No]=W(nn,xn);for(let Ki=1;Ki<=Me;Ki++)if(No?!!(Ki%2)==Os:Os){const fs=ne[0].days[0],Br=j(is(fs.value,-7),Qe(ke));ne.unshift({days:Br})}else{const fs=ne[ne.length-1],Br=fs.days[fs.days.length-1],gu=j(is(Br.value,1),Qe(ke));ne.push({days:gu})}}return ne},j=(ne,ke)=>{const ce=we(ne),$e=[];for(let Me=0;Me<7;Me++){const nn=is(ce,Me),xn=Qe(nn)!==ke;$e.push({text:t.hideOffsetDates&&xn?"":nn.getDate(),value:nn,current:!xn,classData:{}})}return $e},te=(ne,ke)=>{const ce=[],$e=new Date(ke,ne),Me=new Date(ke,ne+1,0),nn=t.weekStart,xn=us($e,{weekStartsOn:nn}),Os=No=>{const Ki=j(No,ne);if(ce.push({days:Ki}),!ce[ce.length-1].days.some(fs=>tt(wn(fs.value),wn(Me)))){const fs=is(No,7);Os(fs)}};return Os(xn),ie(ce,$e,Me,nn)},G=ne=>{const ke=Ei(we(ne.value),u.hours,u.minutes,Be());e("date-update",ke),$.value.enabled?yf(ke,l,$.value.limit):l.value=ke,s(),en().then(()=>{Z()})},de=ne=>_.value.noDisabledRange?Hy(i.value[0],ne).some(ke=>D(ke)):!1,ge=()=>{i.value=l.value?l.value.slice():[],i.value.length===2&&!(_.value.fixedStart||_.value.fixedEnd)&&(i.value=[])},fe=(ne,ke)=>{const ce=[we(ne.value),is(we(ne.value),+_.value.autoRange)];x(ce)?(ke&&Re(ne.value),i.value=ce):e("invalid-date",ne.value)},Re=ne=>{const ke=Qe(we(ne)),ce=ze(we(ne));if(I(0,ke,ce),f.value.count>0)for(let $e=1;$e<f.value.count;$e++){const Me=bI(dt(we(ne),{year:Y.value($e-1),month:ae.value($e-1)}));I($e,Me.month,Me.year)}},De=ne=>{if(de(ne.value)||!y(ne.value,l.value,_.value.fixedStart?0:1))return e("invalid-date",ne.value);i.value=Jy(we(ne.value),l,e,_)},Ve=(ne,ke)=>{if(ge(),_.value.autoRange)return fe(ne,ke);if(_.value.fixedStart||_.value.fixedEnd)return De(ne);i.value[0]?y(we(ne.value),l.value)&&!de(ne.value)?$t(we(ne.value),we(i.value[0]))?(i.value.unshift(we(ne.value)),e("range-end",i.value[0])):(i.value[1]=we(ne.value),e("range-end",i.value[1])):(t.autoApply&&e("auto-apply-invalid",ne.value),e("invalid-date",ne.value)):(i.value[0]=we(ne.value),e("range-start",i.value[0]))},Be=(ne=!0)=>t.enableSeconds?Array.isArray(u.seconds)?ne?u.seconds[0]:u.seconds[1]:u.seconds:0,et=ne=>{i.value[ne]=Ei(i.value[ne],u.hours[ne],u.minutes[ne],Be(ne!==1))},Ge=()=>{var ne,ke;i.value[0]&&i.value[1]&&+((ne=i.value)==null?void 0:ne[0])>+((ke=i.value)==null?void 0:ke[1])&&(i.value.reverse(),e("range-start",i.value[0]),e("range-end",i.value[1]))},pt=()=>{i.value.length&&(i.value[0]&&!i.value[1]?et(0):(et(0),et(1),s()),Ge(),l.value=i.value.slice(),eu(i.value,e,t.autoApply,t.modelAuto))},on=(ne,ke=!1)=>{if(D(ne.value)||!ne.current&&t.hideOffsetDates)return e("invalid-date",ne.value);if(r.value=JSON.parse(JSON.stringify(ne)),!_.value.enabled)return G(ne);vm(u.hours)&&vm(u.minutes)&&!$.value.enabled&&(Ve(ne,ke),pt())},Hn=(ne,ke)=>{var ce;I(ne,ke.month,ke.year,!0),f.value.count&&!f.value.solo&&ue(ne),e("update-month-year",{instance:ne,month:ke.month,year:ke.year}),n(f.value.solo?ne:void 0);const $e=(ce=t.flow)!=null&&ce.length?t.flow[t.flowStep]:void 0;!ke.fromNav&&($e===ln.month||$e===ln.year)&&s()},ii=(ne,ke)=>{Gy({value:ne,modelValue:l,range:_.value.enabled,timezone:ke?void 0:b.value.timezone}),V(),t.multiCalendars&&en().then(()=>le(!0))},Qn=()=>{const ne=gf(we(),b.value);_.value.enabled?l.value&&Array.isArray(l.value)&&l.value[0]?l.value=$t(ne,l.value[0])?[ne,l.value[0]]:[l.value[0],ne]:l.value=[ne]:l.value=ne,V()},Ds=()=>{if(Array.isArray(l.value))if($.value.enabled){const ne=Vt();l.value[l.value.length-1]=E(ne)}else l.value=l.value.map((ne,ke)=>ne&&E(ne,ke));else l.value=E(l.value);e("time-update")},Vt=()=>Array.isArray(l.value)&&l.value.length?l.value[l.value.length-1]:null;return{calendars:c,modelValue:l,month:ae,year:Y,time:u,disabledTimesConfig:J,today:d,validateTime:B,getCalendarDays:te,getMarker:H,handleScroll:he,handleSwipe:O,handleArrow:v,selectDate:on,updateMonthYear:Hn,presetDate:ii,selectCurrentDate:Qn,updateTime:(ne,ke=!0,ce=!1)=>{S(ne,ke,ce,Ds)},assignMonthAndYear:U}},IR={key:0},RR=Nt({__name:"DatePicker",props:{...ds},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(t,{expose:e,emit:n}){const s=n,i=t,{calendars:o,month:r,year:a,modelValue:l,time:c,disabledTimesConfig:u,today:d,validateTime:f,getCalendarDays:g,getMarker:_,handleArrow:m,handleScroll:b,handleSwipe:w,selectDate:$,updateMonthYear:A,presetDate:D,selectCurrentDate:x,updateTime:y,assignMonthAndYear:S}=OR(i,s,ye,U),E=Do(),{setHoverDate:T,getDayClassData:C,clearHoverDate:B}=QR(l,i),{defaultedMultiCalendars:J}=xt(i),ae=ve([]),Y=ve([]),L=ve(null),I=Rn(E,"calendar"),V=Rn(E,"monthYear"),Q=Rn(E,"timePicker"),Z=he=>{i.shadow||s("mount",he)};Bt(o,()=>{i.shadow||setTimeout(()=>{s("recalculate-position")},0)},{deep:!0}),Bt(J,(he,v)=>{he.count-v.count>0&&S()},{deep:!0});const le=_e(()=>he=>g(r.value(he),a.value(he)).map(v=>({...v,days:v.days.map(O=>(O.marker=_(O),O.classData=C(O),O))})));function ye(he){var v;he||he===0?(v=Y.value[he])==null||v.triggerTransition(r.value(he),a.value(he)):Y.value.forEach((O,H)=>O.triggerTransition(r.value(H),a.value(H)))}function U(){s("update-flow-step")}const X=(he,v=!1)=>{$(he,v),i.spaceConfirm&&s("select-date")},R=(he,v,O=0)=>{var H;(H=ae.value[O])==null||H.toggleMonthPicker(he,v)},ee=(he,v,O=0)=>{var H;(H=ae.value[O])==null||H.toggleYearPicker(he,v)},oe=(he,v,O)=>{var H;(H=L.value)==null||H.toggleTimePicker(he,v,O)},P=(he,v)=>{var O;if(!i.range){const H=l.value?l.value:d,W=v?new Date(v):H,ie=he?us(W,{weekStartsOn:1}):wy(W,{weekStartsOn:1});$({value:ie,current:Qe(W)===r.value(0),text:"",classData:{}}),(O=document.getElementById(Uy(ie)))==null||O.focus()}},se=he=>{var v;(v=ae.value[0])==null||v.handleMonthYearChange(he,!0)},ue=he=>{A(0,{month:r.value(0),year:a.value(0)+(he?1:-1),fromNav:!0})},xe=(he,v)=>{he===ln.time&&s(`time-picker-${v?"open":"close"}`),s("overlay-toggle",{open:v,overlay:he})},N=he=>{s("overlay-toggle",{open:!1,overlay:he}),s("focus-menu")};return e({clearHoverDate:B,presetDate:D,selectCurrentDate:x,toggleMonthPicker:R,toggleYearPicker:ee,toggleTimePicker:oe,handleArrow:m,updateMonthYear:A,getSidebarProps:()=>({modelValue:l,month:r,year:a,time:c,updateTime:y,updateMonthYear:A,selectDate:$,presetDate:D}),changeMonth:se,changeYear:ue,selectWeekDate:P}),(he,v)=>(M(),F(Te,null,[Se(Zc,{"multi-calendars":q(J).count,collapse:he.collapse},{default:Pe(({instance:O,index:H})=>[he.disableMonthYearSelect?re("",!0):(M(),Le(SR,zt({key:0,ref:W=>{W&&(ae.value[H]=W)},months:q(Ry)(he.formatLocale,he.locale,he.monthNameFormat),years:q(mf)(he.yearRange,he.locale,he.reverseYears),month:q(r)(O),year:q(a)(O),instance:O},he.$props,{onMount:v[0]||(v[0]=W=>Z(q(yo).header)),onResetFlow:v[1]||(v[1]=W=>he.$emit("reset-flow")),onUpdateMonthYear:W=>q(A)(O,W),onOverlayClosed:N,onOverlayOpened:v[2]||(v[2]=W=>he.$emit("overlay-toggle",{open:!0,overlay:W}))}),dn({_:2},[Ue(q(V),(W,ie)=>({name:W,fn:Pe(j=>[Ie(he.$slots,W,Qt(mn(j)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),Se(DR,zt({ref:W=>{W&&(Y.value[H]=W)},"mapped-dates":le.value(O),month:q(r)(O),year:q(a)(O),instance:O},he.$props,{onSelectDate:W=>q($)(W,O!==1),onHandleSpace:W=>X(W,O!==1),onSetHoverDate:v[3]||(v[3]=W=>q(T)(W)),onHandleScroll:W=>q(b)(W,O),onHandleSwipe:W=>q(w)(W,O),onMount:v[4]||(v[4]=W=>Z(q(yo).calendar)),onResetFlow:v[5]||(v[5]=W=>he.$emit("reset-flow")),onTooltipOpen:v[6]||(v[6]=W=>he.$emit("tooltip-open",W)),onTooltipClose:v[7]||(v[7]=W=>he.$emit("tooltip-close",W))}),dn({_:2},[Ue(q(I),(W,ie)=>({name:W,fn:Pe(j=>[Ie(he.$slots,W,Qt(mn({...j})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),he.enableTimePicker?(M(),F("div",IR,[he.$slots["time-picker"]?Ie(he.$slots,"time-picker",Qt(zt({key:0},{time:q(c),updateTime:q(y)}))):(M(),Le(Qy,zt({key:1,ref_key:"timePickerRef",ref:L},he.$props,{hours:q(c).hours,minutes:q(c).minutes,seconds:q(c).seconds,"internal-model-value":he.internalModelValue,"disabled-times-config":q(u),"validate-time":q(f),onMount:v[8]||(v[8]=O=>Z(q(yo).timePicker)),"onUpdate:hours":v[9]||(v[9]=O=>q(y)(O)),"onUpdate:minutes":v[10]||(v[10]=O=>q(y)(O,!1)),"onUpdate:seconds":v[11]||(v[11]=O=>q(y)(O,!1,!0)),onResetFlow:v[12]||(v[12]=O=>he.$emit("reset-flow")),onOverlayClosed:v[13]||(v[13]=O=>xe(O,!1)),onOverlayOpened:v[14]||(v[14]=O=>xe(O,!0)),onAmPmChange:v[15]||(v[15]=O=>he.$emit("am-pm-change",O))}),dn({_:2},[Ue(q(Q),(O,H)=>({name:O,fn:Pe(W=>[Ie(he.$slots,O,Qt(mn(W)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):re("",!0)],64))}}),LR=(t,e)=>{const n=ve(),{defaultedMultiCalendars:s,defaultedConfig:i,defaultedHighlight:o,defaultedRange:r,propDates:a,defaultedFilters:l,defaultedMultiDates:c}=xt(t),{modelValue:u,year:d,month:f,calendars:g}=Qa(t,e),{isDisabled:_}=ji(t),{selectYear:m,groupedYears:b,showYearPicker:w,isDisabled:$,toggleYearPicker:A,handleYearSelect:D,handleYear:x}=Xy({modelValue:u,multiCalendars:s,range:r,highlight:o,calendars:g,propDates:a,month:f,year:d,filters:l,props:t,emit:e}),y=(L,I)=>[L,I].map(V=>$s(V,"MMMM",{locale:t.formatLocale})).join("-"),S=_e(()=>L=>u.value?Array.isArray(u.value)?u.value.some(I=>um(L,I)):um(u.value,L):!1),E=L=>{if(r.value.enabled){if(Array.isArray(u.value)){const I=tt(L,u.value[0])||tt(L,u.value[1]);return Xc(u.value,n.value,L)&&!I}return!1}return!1},T=(L,I)=>L.quarter===im(I)&&L.year===ze(I),C=L=>typeof o.value=="function"?o.value({quarter:im(L),year:ze(L)}):!!o.value.quarters.find(I=>T(I,L)),B=_e(()=>L=>{const I=dt(new Date,{year:d.value(L)});return u2({start:Ra(I),end:yy(I)}).map(V=>{const Q=go(V),Z=om(V),le=_(V),ye=E(Q),U=C(Q);return{text:y(Q,Z),value:Q,active:S.value(Q),highlighted:U,disabled:le,isBetween:ye}})}),J=L=>{yf(L,u,c.value.limit),e("auto-apply",!0)},ae=L=>{u.value=wf(u,L,e),eu(u.value,e,t.autoApply,t.modelAuto)},Y=L=>{u.value=L,e("auto-apply")};return{defaultedConfig:i,defaultedMultiCalendars:s,groupedYears:b,year:d,isDisabled:$,quarters:B,showYearPicker:w,modelValue:u,setHoverDate:L=>{n.value=L},selectYear:m,selectQuarter:(L,I,V)=>{if(!V)return g.value[I].month=Qe(om(L)),c.value.enabled?J(L):r.value.enabled?ae(L):Y(L)},toggleYearPicker:A,handleYearSelect:D,handleYear:x}},NR={class:"dp--quarter-items"},FR=["data-test","disabled","onClick","onMouseover"],BR=Nt({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...ds},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(t,{expose:e,emit:n}){const s=n,i=t,o=Do(),r=Rn(o,"yearMode"),{defaultedMultiCalendars:a,defaultedConfig:l,groupedYears:c,year:u,isDisabled:d,quarters:f,modelValue:g,showYearPicker:_,setHoverDate:m,selectQuarter:b,toggleYearPicker:w,handleYearSelect:$,handleYear:A}=LR(i,s);return e({getSidebarProps:()=>({modelValue:g,year:u,selectQuarter:b,handleYearSelect:$,handleYear:A})}),(D,x)=>(M(),Le(Zc,{"multi-calendars":q(a).count,collapse:D.collapse,stretch:""},{default:Pe(({instance:y})=>[h("div",{class:"dp-quarter-picker-wrap",style:jt({minHeight:`${q(l).modeHeight}px`})},[D.$slots["top-extra"]?Ie(D.$slots,"top-extra",{key:0,value:D.internalModelValue}):re("",!0),h("div",null,[Se(qy,zt(D.$props,{items:q(c)(y),instance:y,"show-year-picker":q(_)[y],year:q(u)(y),"is-disabled":S=>q(d)(y,S),onHandleYear:S=>q(A)(y,S),onYearSelect:S=>q($)(S,y),onToggleYearPicker:S=>q(w)(y,S?.flow,S?.show)}),dn({_:2},[Ue(q(r),(S,E)=>({name:S,fn:Pe(T=>[Ie(D.$slots,S,Qt(mn(T)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),h("div",NR,[(M(!0),F(Te,null,Ue(q(f)(y),(S,E)=>(M(),F("div",{key:E},[h("button",{type:"button",class:Ce(["dp--qr-btn",{"dp--qr-btn-active":S.active,"dp--qr-btn-between":S.isBetween,"dp--qr-btn-disabled":S.disabled,"dp--highlighted":S.highlighted}]),"data-test":S.value,disabled:S.disabled,onClick:T=>q(b)(S.value,y,S.disabled),onMouseover:T=>q(m)(S.value)},[D.$slots.quarter?Ie(D.$slots,"quarter",{key:0,value:S.value,text:S.text}):(M(),F(Te,{key:1},[be(me(S.text),1)],64))],42,FR)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),VR=["id","tabindex","role","aria-label"],HR={key:0,class:"dp--menu-load-container"},jR=h("span",{class:"dp--menu-loader"},null,-1),WR=[jR],zR={key:1,class:"dp--menu-header"},YR={key:0,class:"dp__sidebar_left"},UR=["data-test","onClick","onKeydown"],KR={key:2,class:"dp__sidebar_right"},qR={key:3,class:"dp__action_extra"},bm=Nt({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...Qc,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:()=>({})},isTextInputDate:{type:Boolean,default:!1}},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(t,{expose:e,emit:n}){const s=n,i=t,o=ve(null),r=_e(()=>{const{openOnTop:j,...te}=i;return{...te,flowStep:T.value,collapse:i.collapse,noOverlayFocus:i.noOverlayFocus,menuWrapRef:o.value}}),{setMenuFocused:a,setShiftKey:l,control:c}=Ky(),u=Do(),{defaultedTextInput:d,defaultedInline:f,defaultedConfig:g,defaultedUI:_}=xt(i),m=ve(null),b=ve(0),w=ve(null),$=ve(!1),A=ve(null);qt(()=>{if(!i.shadow){$.value=!0,D(),window.addEventListener("resize",D);const j=Ht(o);if(j&&!d.value.enabled&&!f.value.enabled&&(a(!0),I()),j){const te=G=>{g.value.allowPreventDefault&&G.preventDefault(),Ci(G,g.value,!0)};j.addEventListener("pointerdown",te),j.addEventListener("mousedown",te)}}}),Ir(()=>{window.removeEventListener("resize",D)});const D=()=>{const j=Ht(w);j&&(b.value=j.getBoundingClientRect().width)},{arrowRight:x,arrowLeft:y,arrowDown:S,arrowUp:E}=Hi(),{flowStep:T,updateFlowStep:C,childMount:B,resetFlow:J,handleFlow:ae}=ZR(i,s,A),Y=_e(()=>i.monthPicker?ZI:i.yearPicker?tR:i.timePicker?vR:i.quarterPicker?BR:RR),L=_e(()=>{var j;if(g.value.arrowLeft)return g.value.arrowLeft;const te=(j=o.value)==null?void 0:j.getBoundingClientRect(),G=i.getInputRect();return G?.width<b?.value&&G?.left<=(te?.left??0)?`${G?.width/2}px`:G?.right>=(te?.right??0)&&G?.width<b?.value?`${b?.value-G?.width/2}px`:"50%"}),I=()=>{const j=Ht(o);j&&j.focus({preventScroll:!0})},V=_e(()=>{var j;return((j=A.value)==null?void 0:j.getSidebarProps())||{}}),Q=()=>{i.openOnTop&&s("recalculate-position")},Z=Rn(u,"action"),le=_e(()=>i.monthPicker||i.yearPicker?Rn(u,"monthYear"):i.timePicker?Rn(u,"timePicker"):Rn(u,"shared")),ye=_e(()=>i.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),U=_e(()=>({dp__menu_disabled:i.disabled,dp__menu_readonly:i.readonly,"dp-menu-loading":i.loading})),X=_e(()=>({dp__menu:!0,dp__menu_index:!f.value.enabled,dp__relative:f.value.enabled,..._.value.menu??{}})),R=j=>{Ci(j,g.value,!0)},ee=()=>{i.escClose&&s("close-picker")},oe=j=>{if(i.arrowNavigation){if(j===gn.up)return E();if(j===gn.down)return S();if(j===gn.left)return y();if(j===gn.right)return x()}else j===gn.left||j===gn.up?N("handleArrow",gn.left,0,j===gn.up):N("handleArrow",gn.right,0,j===gn.down)},P=j=>{l(j.shiftKey),!i.disableMonthYearSelect&&j.code===mt.tab&&j.target.classList.contains("dp__menu")&&c.value.shiftKeyInMenu&&(j.preventDefault(),Ci(j,g.value,!0),s("close-picker"))},se=()=>{I(),s("time-picker-close")},ue=j=>{var te,G,de;(te=A.value)==null||te.toggleTimePicker(!1,!1),(G=A.value)==null||G.toggleMonthPicker(!1,!1,j),(de=A.value)==null||de.toggleYearPicker(!1,!1,j)},xe=(j,te=0)=>{var G,de,ge;return j==="month"?(G=A.value)==null?void 0:G.toggleMonthPicker(!1,!0,te):j==="year"?(de=A.value)==null?void 0:de.toggleYearPicker(!1,!0,te):j==="time"?(ge=A.value)==null?void 0:ge.toggleTimePicker(!0,!1):ue(te)},N=(j,...te)=>{var G,de;(G=A.value)!=null&&G[j]&&((de=A.value)==null||de[j](...te))},he=()=>{N("selectCurrentDate")},v=(j,te)=>{N("presetDate",j,te)},O=()=>{N("clearHoverDate")},H=(j,te)=>{N("updateMonthYear",j,te)},W=(j,te)=>{j.preventDefault(),oe(te)},ie=j=>{var te,G,de;if(P(j),j.key===mt.home||j.key===mt.end)return N("selectWeekDate",j.key===mt.home,j.target.getAttribute("id"));switch((j.key===mt.pageUp||j.key===mt.pageDown)&&(j.shiftKey?(N("changeYear",j.key===mt.pageUp),(te=Yd(o.value,"overlay-year"))==null||te.focus()):(N("changeMonth",j.key===mt.pageUp),(G=Yd(o.value,j.key===mt.pageUp?"action-prev":"action-next"))==null||G.focus()),j.target.getAttribute("id")&&((de=o.value)==null||de.focus({preventScroll:!0}))),j.key){case mt.esc:return ee();case mt.arrowLeft:return W(j,gn.left);case mt.arrowRight:return W(j,gn.right);case mt.arrowUp:return W(j,gn.up);case mt.arrowDown:return W(j,gn.down);default:return}};return e({updateMonthYear:H,switchView:xe,handleFlow:ae}),(j,te)=>{var G,de,ge;return M(),F("div",{id:j.uid?`dp-menu-${j.uid}`:void 0,ref_key:"dpMenuRef",ref:o,tabindex:q(f).enabled?void 0:"0",role:q(f).enabled?void 0:"dialog","aria-label":(G=j.ariaLabels)==null?void 0:G.menu,class:Ce(X.value),style:jt({"--dp-arrow-left":L.value}),onMouseleave:O,onClick:R,onKeydown:ie},[(j.disabled||j.readonly)&&q(f).enabled||j.loading?(M(),F("div",{key:0,class:Ce(U.value)},[j.loading?(M(),F("div",HR,WR)):re("",!0)],2)):re("",!0),j.$slots["menu-header"]?(M(),F("div",zR,[Ie(j.$slots,"menu-header")])):re("",!0),!q(f).enabled&&!j.teleportCenter?(M(),F("div",{key:2,class:Ce(ye.value)},null,2)):re("",!0),h("div",{ref_key:"innerMenuRef",ref:w,class:Ce({dp__menu_content_wrapper:((de=j.presetDates)==null?void 0:de.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":t.collapse&&(((ge=j.presetDates)==null?void 0:ge.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"])}),style:jt({"--dp-menu-width":`${b.value}px`})},[j.$slots["left-sidebar"]?(M(),F("div",YR,[Ie(j.$slots,"left-sidebar",Qt(mn(V.value)))])):re("",!0),j.presetDates.length?(M(),F("div",{key:1,class:Ce({"dp--preset-dates-collapsed":t.collapse,"dp--preset-dates":!0})},[(M(!0),F(Te,null,Ue(j.presetDates,(fe,Re)=>(M(),F(Te,{key:Re},[fe.slot?Ie(j.$slots,fe.slot,{key:0,presetDate:v,label:fe.label,value:fe.value}):(M(),F("button",{key:1,type:"button",style:jt(fe.style||{}),class:Ce(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":t.collapse}]),"data-test":fe.testId??void 0,onClick:Oa(De=>v(fe.value,fe.noTz),["prevent"]),onKeydown:De=>q(vn)(De,()=>v(fe.value,fe.noTz),!0)},me(fe.label),47,UR))],64))),128))],2)):re("",!0),h("div",{ref_key:"calendarWrapperRef",ref:m,class:"dp__instance_calendar",role:"document"},[(M(),Le(Mo(Y.value),zt({ref_key:"dynCmpRef",ref:A},r.value,{"flow-step":q(T),onMount:q(B),onUpdateFlowStep:q(C),onResetFlow:q(J),onFocusMenu:I,onSelectDate:te[0]||(te[0]=fe=>j.$emit("select-date")),onDateUpdate:te[1]||(te[1]=fe=>j.$emit("date-update",fe)),onTooltipOpen:te[2]||(te[2]=fe=>j.$emit("tooltip-open",fe)),onTooltipClose:te[3]||(te[3]=fe=>j.$emit("tooltip-close",fe)),onAutoApply:te[4]||(te[4]=fe=>j.$emit("auto-apply",fe)),onRangeStart:te[5]||(te[5]=fe=>j.$emit("range-start",fe)),onRangeEnd:te[6]||(te[6]=fe=>j.$emit("range-end",fe)),onInvalidFixedRange:te[7]||(te[7]=fe=>j.$emit("invalid-fixed-range",fe)),onTimeUpdate:te[8]||(te[8]=fe=>j.$emit("time-update")),onAmPmChange:te[9]||(te[9]=fe=>j.$emit("am-pm-change",fe)),onTimePickerOpen:te[10]||(te[10]=fe=>j.$emit("time-picker-open",fe)),onTimePickerClose:se,onRecalculatePosition:Q,onUpdateMonthYear:te[11]||(te[11]=fe=>j.$emit("update-month-year",fe)),onAutoApplyInvalid:te[12]||(te[12]=fe=>j.$emit("auto-apply-invalid",fe)),onInvalidDate:te[13]||(te[13]=fe=>j.$emit("invalid-date",fe)),onOverlayToggle:te[14]||(te[14]=fe=>j.$emit("overlay-toggle",fe)),"onUpdate:internalModelValue":te[15]||(te[15]=fe=>j.$emit("update:internal-model-value",fe))}),dn({_:2},[Ue(le.value,(fe,Re)=>({name:fe,fn:Pe(De=>[Ie(j.$slots,fe,Qt(mn({...De})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),j.$slots["right-sidebar"]?(M(),F("div",KR,[Ie(j.$slots,"right-sidebar",Qt(mn(V.value)))])):re("",!0),j.$slots["action-extra"]?(M(),F("div",qR,[j.$slots["action-extra"]?Ie(j.$slots,"action-extra",{key:0,selectCurrentDate:he}):re("",!0)])):re("",!0)],6),!j.autoApply||q(g).keepActionRow?(M(),Le(YI,zt({key:3,"menu-mount":$.value},r.value,{"calendar-width":b.value,onClosePicker:te[16]||(te[16]=fe=>j.$emit("close-picker")),onSelectDate:te[17]||(te[17]=fe=>j.$emit("select-date")),onInvalidSelect:te[18]||(te[18]=fe=>j.$emit("invalid-select")),onSelectNow:he}),dn({_:2},[Ue(q(Z),(fe,Re)=>({name:fe,fn:Pe(De=>[Ie(j.$slots,fe,Qt(mn({...De})))])}))]),1040,["menu-mount","calendar-width"])):re("",!0)],46,VR)}}});var er=(t=>(t.center="center",t.left="left",t.right="right",t))(er||{});const GR=({menuRef:t,menuRefInner:e,inputRef:n,pickerWrapperRef:s,inline:i,emit:o,props:r,slots:a})=>{const{defaultedConfig:l}=xt(r),c=ve({}),u=ve(!1),d=ve({top:"0",left:"0"}),f=ve(!1),g=Ca(r,"teleportCenter");Bt(g,()=>{d.value=JSON.parse(JSON.stringify({})),x()});const _=I=>{if(r.teleport){const V=I.getBoundingClientRect();return{left:V.left+window.scrollX,top:V.top+window.scrollY}}return{top:0,left:0}},m=(I,V)=>{d.value.left=`${I+V-c.value.width}px`},b=I=>{d.value.left=`${I}px`},w=(I,V)=>{r.position===er.left&&b(I),r.position===er.right&&m(I,V),r.position===er.center&&(d.value.left=`${I+V/2-c.value.width/2}px`)},$=I=>{const{width:V,height:Q}=I.getBoundingClientRect(),{top:Z,left:le}=r.altPosition?r.altPosition(I):_(I);return{top:+Z,left:+le,width:V,height:Q}},A=()=>{d.value.left="50%",d.value.top="50%",d.value.transform="translate(-50%, -50%)",d.value.position="fixed",delete d.value.opacity},D=()=>{const I=Ht(n),{top:V,left:Q,transform:Z}=r.altPosition(I);d.value={top:`${V}px`,left:`${Q}px`,transform:Z??""}},x=(I=!0)=>{var V;if(!i.value.enabled){if(g.value)return A();if(r.altPosition!==null)return D();if(I){const Q=r.teleport?(V=e.value)==null?void 0:V.$el:t.value;Q&&(c.value=Q.getBoundingClientRect()),o("recalculate-position")}return J()}},y=({inputEl:I,left:V,width:Q})=>{window.screen.width>768&&!u.value&&w(V,Q),T(I)},S=I=>{const{top:V,left:Q,height:Z,width:le}=$(I);d.value.top=`${Z+V+ +r.offset}px`,f.value=!1,u.value||(d.value.left=`${Q+le/2-c.value.width/2}px`),y({inputEl:I,left:Q,width:le})},E=I=>{const{top:V,left:Q,width:Z}=$(I);d.value.top=`${V-+r.offset-c.value.height}px`,f.value=!0,y({inputEl:I,left:Q,width:Z})},T=I=>{if(r.autoPosition){const{left:V,width:Q}=$(I),{left:Z,right:le}=c.value;if(!u.value){if(Math.abs(Z)!==Math.abs(le)){if(Z<=0)return u.value=!0,b(V);if(le>=document.documentElement.clientWidth)return u.value=!0,m(V,Q)}return w(V,Q)}}},C=()=>{const I=Ht(n);if(I){const{height:V}=c.value,{top:Q,height:Z}=I.getBoundingClientRect(),le=window.innerHeight-Q-Z,ye=Q;return V<=le?co.bottom:V>le&&V<=ye?co.top:le>=ye?co.bottom:co.top}return co.bottom},B=I=>C()===co.bottom?S(I):E(I),J=()=>{const I=Ht(n);if(I)return r.autoPosition?B(I):S(I)},ae=function(I){if(I){const V=I.scrollHeight>I.clientHeight,Q=window.getComputedStyle(I).overflowY.indexOf("hidden")!==-1;return V&&!Q}return!0},Y=function(I){return!I||I===document.body||I.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:ae(I)?I:Y(I.assignedSlot&&l.value.shadowDom?I.assignedSlot.parentNode:I.parentNode)},L=I=>{if(I)switch(r.position){case er.left:return{left:0,transform:"translateX(0)"};case er.right:return{left:`${I.width}px`,transform:"translateX(-100%)"};default:return{left:`${I.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:f,menuStyle:d,xCorrect:u,setMenuPosition:x,getScrollableParent:Y,shadowRender:(I,V)=>{var Q,Z,le;const ye=document.createElement("div"),U=(Q=Ht(n))==null?void 0:Q.getBoundingClientRect();ye.setAttribute("id","dp--temp-container");const X=(Z=s.value)!=null&&Z.clientWidth?s.value:document.body;X.append(ye);const R=L(U),ee=l.value.shadowDom?Object.keys(a).filter(P=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(P)):Object.keys(a),oe=Co(I,{...V,shadow:!0,style:{opacity:0,position:"absolute",...R}},Object.fromEntries(ee.map(P=>[P,a[P]])));Lg(oe,ye),c.value=(le=oe.el)==null?void 0:le.getBoundingClientRect(),Lg(null,ye),X.removeChild(ye)}}},di=[{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"]},{name:"tp-inline-arrow-up",use:["shared","time"]},{name:"tp-inline-arrow-down",use:["shared","time"]},{name:"menu-header",use:["menu"]}],JR=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],XR={all:()=>di,monthYear:()=>di.filter(t=>t.use.includes("month-year")),input:()=>JR,timePicker:()=>di.filter(t=>t.use.includes("time")),action:()=>di.filter(t=>t.use.includes("action")),calendar:()=>di.filter(t=>t.use.includes("calendar")),menu:()=>di.filter(t=>t.use.includes("menu")),shared:()=>di.filter(t=>t.use.includes("shared")),yearMode:()=>di.filter(t=>t.use.includes("year-mode"))},Rn=(t,e,n)=>{const s=[];return XR[e]().forEach(i=>{t[i.name]&&s.push(i.name)}),n!=null&&n.length&&n.forEach(i=>{i.slot&&s.push(i.slot)}),s},Xa=t=>{const e=_e(()=>s=>t.value?s?t.value.open:t.value.close:""),n=_e(()=>s=>t.value?s?t.value.menuAppearTop:t.value.menuAppearBottom:"");return{transitionName:e,showTransition:!!t.value,menuTransition:n}},Qa=(t,e,n)=>{const{defaultedRange:s,defaultedTz:i}=xt(t),o=we(En(we(),i.value.timezone)),r=ve([{month:Qe(o),year:ze(o)}]),a=f=>{const g={hours:Qs(o),minutes:Oi(o),seconds:0};return s.value.enabled?[g[f],g[f]]:g[f]},l=Ts({hours:a("hours"),minutes:a("minutes"),seconds:a("seconds")});Bt(s,(f,g)=>{f.enabled!==g.enabled&&(l.hours=a("hours"),l.minutes=a("minutes"),l.seconds=a("seconds"))},{deep:!0});const c=_e({get:()=>t.internalModelValue,set:f=>{!t.readonly&&!t.disabled&&e("update:internal-model-value",f)}}),u=_e(()=>f=>r.value[f]?r.value[f].month:0),d=_e(()=>f=>r.value[f]?r.value[f].year:0);return Bt(c,(f,g)=>{n&&JSON.stringify(f??{})!==JSON.stringify(g??{})&&n()},{deep:!0}),{calendars:r,time:l,modelValue:c,month:u,year:d,today:o}},QR=(t,e)=>{const{defaultedMultiCalendars:n,defaultedMultiDates:s,defaultedUI:i,defaultedHighlight:o,defaultedTz:r,propDates:a,defaultedRange:l}=xt(e),{isDisabled:c}=ji(e),u=ve(null),d=ve(En(new Date,r.value.timezone)),f=R=>{!R.current&&e.hideOffsetDates||(u.value=R.value)},g=()=>{u.value=null},_=R=>Array.isArray(t.value)&&l.value.enabled&&t.value[0]&&u.value?R?Dt(u.value,t.value[0]):$t(u.value,t.value[0]):!0,m=(R,ee)=>{const oe=()=>t.value?ee?t.value[0]||null:t.value[1]:null,P=t.value&&Array.isArray(t.value)?oe():null;return tt(we(R.value),P)},b=R=>{const ee=Array.isArray(t.value)?t.value[0]:null;return R?!$t(u.value??null,ee):!0},w=(R,ee=!0)=>(l.value.enabled||e.weekPicker)&&Array.isArray(t.value)&&t.value.length===2?e.hideOffsetDates&&!R.current?!1:tt(we(R.value),t.value[ee?0:1]):l.value.enabled?m(R,ee)&&b(ee)||tt(R.value,Array.isArray(t.value)?t.value[0]:null)&&_(ee):!1,$=(R,ee)=>{if(Array.isArray(t.value)&&t.value[0]&&t.value.length===1){const oe=tt(R.value,u.value);return ee?Dt(t.value[0],R.value)&&oe:$t(t.value[0],R.value)&&oe}return!1},A=R=>!t.value||e.hideOffsetDates&&!R.current?!1:l.value.enabled?e.modelAuto&&Array.isArray(t.value)?tt(R.value,t.value[0]?t.value[0]:d.value):!1:s.value.enabled&&Array.isArray(t.value)?t.value.some(ee=>tt(ee,R.value)):tt(R.value,t.value?t.value:d.value),D=R=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!R.current)return!1;const ee=is(u.value,+l.value.autoRange),oe=js(we(u.value),e.weekStart);return e.weekPicker?tt(oe[1],we(R.value)):tt(ee,we(R.value))}return!1}return!1},x=R=>{if(l.value.autoRange||e.weekPicker){if(u.value){const ee=is(u.value,+l.value.autoRange);if(e.hideOffsetDates&&!R.current)return!1;const oe=js(we(u.value),e.weekStart);return e.weekPicker?Dt(R.value,oe[0])&&$t(R.value,oe[1]):Dt(R.value,u.value)&&$t(R.value,ee)}return!1}return!1},y=R=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!R.current)return!1;const ee=js(we(u.value),e.weekStart);return e.weekPicker?tt(ee[0],R.value):tt(u.value,R.value)}return!1}return!1},S=R=>Xc(t.value,u.value,R.value),E=()=>e.modelAuto&&Array.isArray(e.internalModelValue)?!!e.internalModelValue[0]:!1,T=()=>e.modelAuto?Ly(e.internalModelValue):!0,C=R=>{if(e.weekPicker)return!1;const ee=l.value.enabled?!w(R)&&!w(R,!1):!0;return!c(R.value)&&!A(R)&&!(!R.current&&e.hideOffsetDates)&&ee},B=R=>l.value.enabled?e.modelAuto?E()&&A(R):!1:A(R),J=R=>o.value?gI(R.value,a.value.highlight):!1,ae=R=>{const ee=c(R.value);return ee&&(typeof o.value=="function"?!o.value(R.value,ee):!o.value.options.highlightDisabled)},Y=R=>{var ee;return typeof o.value=="function"?o.value(R.value):(ee=o.value.weekdays)==null?void 0:ee.includes(R.value.getDay())},L=R=>(l.value.enabled||e.weekPicker)&&(!(n.value.count>0)||R.current)&&T()&&!(!R.current&&e.hideOffsetDates)&&!A(R)?S(R):!1,I=R=>{const{isRangeStart:ee,isRangeEnd:oe}=le(R),P=l.value.enabled?ee||oe:!1;return{dp__cell_offset:!R.current,dp__pointer:!e.disabled&&!(!R.current&&e.hideOffsetDates)&&!c(R.value),dp__cell_disabled:c(R.value),dp__cell_highlight:!ae(R)&&(J(R)||Y(R))&&!B(R)&&!P&&!y(R)&&!(L(R)&&e.weekPicker)&&!oe,dp__cell_highlight_active:!ae(R)&&(J(R)||Y(R))&&B(R),dp__today:!e.noToday&&tt(R.value,d.value)&&R.current,"dp--past":$t(R.value,d.value),"dp--future":Dt(R.value,d.value)}},V=R=>({dp__active_date:B(R),dp__date_hover:C(R)}),Q=R=>{if(t.value&&!Array.isArray(t.value)){const ee=js(t.value,e.weekStart);return{...U(R),dp__range_start:tt(ee[0],R.value),dp__range_end:tt(ee[1],R.value),dp__range_between_week:Dt(R.value,ee[0])&&$t(R.value,ee[1])}}return{...U(R)}},Z=R=>{if(t.value&&Array.isArray(t.value)){const ee=js(t.value[0],e.weekStart),oe=t.value[1]?js(t.value[1],e.weekStart):[];return{...U(R),dp__range_start:tt(ee[0],R.value)||tt(oe[0],R.value),dp__range_end:tt(ee[1],R.value)||tt(oe[1],R.value),dp__range_between_week:Dt(R.value,ee[0])&&$t(R.value,ee[1])||Dt(R.value,oe[0])&&$t(R.value,oe[1]),dp__range_between:Dt(R.value,ee[1])&&$t(R.value,oe[0])}}return{...U(R)}},le=R=>{const ee=n.value.count>0?R.current&&w(R)&&T():w(R)&&T(),oe=n.value.count>0?R.current&&w(R,!1)&&T():w(R,!1)&&T();return{isRangeStart:ee,isRangeEnd:oe}},ye=R=>{const{isRangeStart:ee,isRangeEnd:oe}=le(R);return{dp__range_start:ee,dp__range_end:oe,dp__range_between:L(R),dp__date_hover:tt(R.value,u.value)&&!ee&&!oe&&!e.weekPicker,dp__date_hover_start:$(R,!0),dp__date_hover_end:$(R,!1)}},U=R=>({...ye(R),dp__cell_auto_range:x(R),dp__cell_auto_range_start:y(R),dp__cell_auto_range_end:D(R)}),X=R=>l.value.enabled?l.value.autoRange?U(R):e.modelAuto?{...V(R),...ye(R)}:e.weekPicker?Z(R):ye(R):e.weekPicker?Q(R):V(R);return{setHoverDate:f,clearHoverDate:g,getDayClassData:R=>e.hideOffsetDates&&!R.current?{}:{...I(R),...X(R),[e.dayClass?e.dayClass(R.value,e.internalModelValue):""]:!0,...i.value.calendarCell??{}}}},ji=t=>{const{defaultedFilters:e,defaultedRange:n,propDates:s,defaultedMultiDates:i}=xt(t),o=Y=>s.value.disabledDates?typeof s.value.disabledDates=="function"?s.value.disabledDates(we(Y)):!!vc(Y,s.value.disabledDates):!1,r=Y=>s.value.maxDate?t.yearPicker?ze(Y)>ze(s.value.maxDate):Dt(Y,s.value.maxDate):!1,a=Y=>s.value.minDate?t.yearPicker?ze(Y)<ze(s.value.minDate):$t(Y,s.value.minDate):!1,l=Y=>{const L=r(Y),I=a(Y),V=o(Y),Q=e.value.months.map(X=>+X).includes(Qe(Y)),Z=t.disabledWeekDays.length?t.disabledWeekDays.some(X=>+X===sO(Y)):!1,le=g(Y),ye=ze(Y),U=ye<+t.yearRange[0]||ye>+t.yearRange[1];return!(L||I||V||Q||U||Z||le)},c=(Y,L)=>$t(...yi(s.value.minDate,Y,L))||tt(...yi(s.value.minDate,Y,L)),u=(Y,L)=>Dt(...yi(s.value.maxDate,Y,L))||tt(...yi(s.value.maxDate,Y,L)),d=(Y,L,I)=>{let V=!1;return s.value.maxDate&&I&&u(Y,L)&&(V=!0),s.value.minDate&&!I&&c(Y,L)&&(V=!0),V},f=(Y,L,I,V)=>{let Q=!1;return V?s.value.minDate&&s.value.maxDate?Q=d(Y,L,I):(s.value.minDate&&c(Y,L)||s.value.maxDate&&u(Y,L))&&(Q=!0):Q=!0,Q},g=Y=>Array.isArray(s.value.allowedDates)&&!s.value.allowedDates.length?!0:s.value.allowedDates?!vc(Y,s.value.allowedDates):!1,_=Y=>!l(Y),m=Y=>n.value.noDisabledRange?!by({start:Y[0],end:Y[1]}).some(L=>_(L)):!0,b=Y=>{if(Y){const L=ze(Y);return L>=+t.yearRange[0]&&L<=t.yearRange[1]}return!0},w=(Y,L)=>!!(Array.isArray(Y)&&Y[L]&&(n.value.maxRange||n.value.minRange)&&b(Y[L])),$=(Y,L,I=0)=>{if(w(L,I)&&b(Y)){const V=_y(Y,L[I]),Q=Hy(L[I],Y),Z=Q.length===1?0:Q.filter(ye=>_(ye)).length,le=Math.abs(V)-(n.value.minMaxRawRange?0:Z);if(n.value.minRange&&n.value.maxRange)return le>=+n.value.minRange&&le<=+n.value.maxRange;if(n.value.minRange)return le>=+n.value.minRange;if(n.value.maxRange)return le<=+n.value.maxRange}return!0},A=()=>!t.enableTimePicker||t.monthPicker||t.yearPicker||t.ignoreTimeValidation,D=Y=>Array.isArray(Y)?[Y[0]?Ku(Y[0]):null,Y[1]?Ku(Y[1]):null]:Ku(Y),x=(Y,L,I)=>Y.find(V=>+V.hours===Qs(L)&&V.minutes==="*"?!0:+V.minutes===Oi(L)&&+V.hours===Qs(L))&&I,y=(Y,L,I)=>{const[V,Q]=Y,[Z,le]=L;return!x(V,Z,I)&&!x(Q,le,I)&&I},S=(Y,L)=>{const I=Array.isArray(L)?L:[L];return Array.isArray(t.disabledTimes)?Array.isArray(t.disabledTimes[0])?y(t.disabledTimes,I,Y):!I.some(V=>x(t.disabledTimes,V,Y)):Y},E=(Y,L)=>{const I=Array.isArray(L)?[wo(L[0]),L[1]?wo(L[1]):void 0]:wo(L),V=!t.disabledTimes(I);return Y&&V},T=(Y,L)=>t.disabledTimes?Array.isArray(t.disabledTimes)?S(L,Y):E(L,Y):L,C=Y=>{let L=!0;if(!Y||A())return!0;const I=!s.value.minDate&&!s.value.maxDate?D(Y):Y;return(t.maxTime||s.value.maxDate)&&(L=gm(t.maxTime,s.value.maxDate,"max",Jt(I),L)),(t.minTime||s.value.minDate)&&(L=gm(t.minTime,s.value.minDate,"min",Jt(I),L)),T(Y,L)},B=Y=>{if(!t.monthPicker)return!0;let L=!0;const I=we(os(Y));if(s.value.minDate&&s.value.maxDate){const V=we(os(s.value.minDate)),Q=we(os(s.value.maxDate));return Dt(I,V)&&$t(I,Q)||tt(I,V)||tt(I,Q)}if(s.value.minDate){const V=we(os(s.value.minDate));L=Dt(I,V)||tt(I,V)}if(s.value.maxDate){const V=we(os(s.value.maxDate));L=$t(I,V)||tt(I,V)}return L},J=_e(()=>Y=>!t.enableTimePicker||t.ignoreTimeValidation?!0:C(Y)),ae=_e(()=>Y=>t.monthPicker?Array.isArray(Y)&&(n.value.enabled||i.value.enabled)?!Y.filter(L=>!B(L)).length:B(Y):!0);return{isDisabled:_,validateDate:l,validateMonthYearInRange:f,isDateRangeAllowed:m,checkMinMaxRange:$,isValidTime:C,isTimeValid:J,isMonthValid:ae}},tu=()=>{const t=_e(()=>(s,i)=>s?.includes(i)),e=_e(()=>(s,i)=>s.count?s.solo?!0:i===0:!0),n=_e(()=>(s,i)=>s.count?s.solo?!0:i===s.count-1:!0);return{hideNavigationButtons:t,showLeftIcon:e,showRightIcon:n}},ZR=(t,e,n)=>{const s=ve(0),i=Ts({[yo.timePicker]:!t.enableTimePicker||t.timePicker||t.monthPicker,[yo.calendar]:!1,[yo.header]:!1}),o=_e(()=>t.monthPicker||t.timePicker),r=d=>{var f;if((f=t.flow)!=null&&f.length){if(!d&&o.value)return u();i[d]=!0,Object.keys(i).filter(g=>!i[g]).length||u()}},a=()=>{var d,f;(d=t.flow)!=null&&d.length&&s.value!==-1&&(s.value+=1,e("flow-step",s.value),u()),((f=t.flow)==null?void 0:f.length)===s.value&&en().then(()=>l())},l=()=>{s.value=-1},c=(d,f,...g)=>{var _,m;t.flow[s.value]===d&&n.value&&((m=(_=n.value)[f])==null||m.call(_,...g))},u=(d=0)=>{d&&(s.value+=d),c(ln.month,"toggleMonthPicker",!0),c(ln.year,"toggleYearPicker",!0),c(ln.calendar,"toggleTimePicker",!1,!0),c(ln.time,"toggleTimePicker",!0,!0);const f=t.flow[s.value];(f===ln.hours||f===ln.minutes||f===ln.seconds)&&c(f,"toggleTimePicker",!0,!0,f)};return{childMount:r,updateFlowStep:a,resetFlow:l,handleFlow:u,flowStep:s}},eL={key:1,class:"dp__input_wrap"},tL=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-disabled","aria-invalid"],nL={key:2,class:"dp--clear-btn"},sL=["aria-label"],iL=Nt({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...Qc},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur","text-input"],setup(t,{expose:e,emit:n}){const s=n,i=t,{defaultedTextInput:o,defaultedAriaLabels:r,defaultedInline:a,defaultedConfig:l,defaultedRange:c,defaultedMultiDates:u,defaultedUI:d,getDefaultPattern:f,getDefaultStartTime:g}=xt(i),{checkMinMaxRange:_}=ji(i),m=ve(),b=ve(null),w=ve(!1),$=ve(!1),A=ve(!1),D=ve(null),x=_e(()=>({dp__pointer:!i.disabled&&!i.readonly&&!o.value.enabled,dp__disabled:i.disabled,dp__input_readonly:!o.value.enabled,dp__input:!0,dp__input_icon_pad:!i.hideInputIcon,dp__input_valid:typeof i.state=="boolean"?i.state:!1,dp__input_invalid:typeof i.state=="boolean"?!i.state:!1,dp__input_focus:w.value||i.isMenuOpen,dp__input_reg:!o.value.enabled,...d.value.input??{}})),y=()=>{s("set-input-date",null),i.clearable&&i.autoApply&&(s("set-empty-date"),m.value=null)},S=U=>{const X=g();return _I(U,o.value.format??f(),X??jy({},i.enableSeconds),i.inputValue,A.value,i.formatLocale)},E=U=>{const{rangeSeparator:X}=o.value,[R,ee]=U.split(`${X}`);if(R){const oe=S(R.trim()),P=ee?S(ee.trim()):null;if(wr(oe,P))return;const se=oe&&P?[oe,P]:[oe];_(P,se,0)&&(m.value=oe?se:null)}},T=()=>{A.value=!0},C=U=>{if(c.value.enabled)E(U);else if(u.value.enabled){const X=U.split(";");m.value=X.map(R=>S(R.trim())).filter(R=>R)}else m.value=S(U)},B=U=>{var X;const R=typeof U=="string"?U:(X=U.target)==null?void 0:X.value;R!==""?(o.value.openMenu&&!i.isMenuOpen&&s("open"),C(R),s("set-input-date",m.value)):y(),A.value=!1,s("update:input-value",R),s("text-input",U,m.value)},J=U=>{o.value.enabled?(C(U.target.value),o.value.enterSubmit&&Ud(m.value)&&i.inputValue!==""?(s("set-input-date",m.value,!0),m.value=null):o.value.enterSubmit&&i.inputValue===""&&(m.value=null,s("clear"))):L(U)},ae=(U,X)=>{var R;if(D.value&&X&&!$.value)return U.preventDefault(),$.value=!0,(R=D.value)==null?void 0:R.focus();o.value.enabled&&o.value.tabSubmit&&C(U.target.value),o.value.tabSubmit&&Ud(m.value)&&i.inputValue!==""?(s("set-input-date",m.value,!0,!0),m.value=null):o.value.tabSubmit&&i.inputValue===""&&(m.value=null,s("clear",!0))},Y=()=>{w.value=!0,s("focus"),en().then(()=>{var U;o.value.enabled&&o.value.selectOnFocus&&((U=b.value)==null||U.select())})},L=U=>{if(U.preventDefault(),Ci(U,l.value,!0),o.value.enabled&&o.value.openMenu&&!a.value.input){if(o.value.openMenu==="open"&&!i.isMenuOpen)return s("open");if(o.value.openMenu==="toggle")return s("toggle")}else o.value.enabled||s("toggle")},I=()=>{s("real-blur"),w.value=!1,(!i.isMenuOpen||a.value.enabled&&a.value.input)&&s("blur"),i.autoApply&&o.value.enabled&&m.value&&!i.isMenuOpen&&(s("set-input-date",m.value),s("select-date"),m.value=null)},V=U=>{Ci(U,l.value,!0),s("clear")},Q=(U,X)=>{if(U.key==="Tab"&&ae(U,X),U.key==="Enter"&&J(U),!o.value.enabled){if(U.code==="Tab")return;U.preventDefault()}},Z=()=>{var U;(U=b.value)==null||U.focus({preventScroll:!0})},le=U=>{m.value=U},ye=U=>{U.key===mt.tab&&($.value=!1,ae(U))};return e({focusInput:Z,setParsedDate:le}),(U,X)=>{var R,ee;return M(),F("div",{onClick:L},[U.$slots.trigger&&!U.$slots["dp-input"]&&!q(a).enabled?Ie(U.$slots,"trigger",{key:0}):re("",!0),!U.$slots.trigger&&(!q(a).enabled||q(a).input)?(M(),F("div",eL,[U.$slots["dp-input"]&&!U.$slots.trigger&&(!q(a).enabled||q(a).enabled&&q(a).input)?Ie(U.$slots,"dp-input",{key:0,value:t.inputValue,isMenuOpen:t.isMenuOpen,onInput:B,onEnter:J,onTab:ae,onClear:V,onBlur:I,onKeypress:Q,onPaste:T,onFocus:Y,openMenu:()=>U.$emit("open"),closeMenu:()=>U.$emit("close"),toggleMenu:()=>U.$emit("toggle")}):re("",!0),U.$slots["dp-input"]?re("",!0):(M(),F("input",{key:1,id:U.uid?`dp-input-${U.uid}`:void 0,ref_key:"inputRef",ref:b,"data-test":"dp-input",name:U.name,class:Ce(x.value),inputmode:q(o).enabled?"text":"none",placeholder:U.placeholder,disabled:U.disabled,readonly:U.readonly,required:U.required,value:t.inputValue,autocomplete:U.autocomplete,"aria-disabled":U.disabled||void 0,"aria-invalid":U.state===!1?!0:void 0,onInput:B,onBlur:I,onFocus:Y,onKeypress:Q,onKeydown:X[0]||(X[0]=oe=>Q(oe,!0)),onPaste:T},null,42,tL)),h("div",{onClick:X[3]||(X[3]=oe=>s("toggle"))},[U.$slots["input-icon"]&&!U.hideInputIcon?(M(),F("span",{key:0,class:"dp__input_icon",onClick:X[1]||(X[1]=oe=>s("toggle"))},[Ie(U.$slots,"input-icon")])):re("",!0),!U.$slots["input-icon"]&&!U.hideInputIcon&&!U.$slots["dp-input"]?(M(),Le(q(Lr),{key:1,"aria-label":(R=q(r))==null?void 0:R.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:X[2]||(X[2]=oe=>s("toggle"))},null,8,["aria-label"])):re("",!0)]),U.$slots["clear-icon"]&&t.inputValue&&U.clearable&&!U.disabled&&!U.readonly?(M(),F("span",nL,[Ie(U.$slots,"clear-icon",{clear:V})])):re("",!0),U.clearable&&!U.$slots["clear-icon"]&&t.inputValue&&!U.disabled&&!U.readonly?(M(),F("button",{key:3,ref_key:"clearBtnRef",ref:D,"aria-label":(ee=q(r))==null?void 0:ee.clearInput,class:"dp--clear-btn",type:"button",onBlur:X[4]||(X[4]=oe=>$.value=!1),onKeydown:X[5]||(X[5]=oe=>q(vn)(oe,()=>V(oe),!0,ye)),onClick:X[6]||(X[6]=Oa(oe=>V(oe),["prevent"]))},[Se(q(Iy),{class:"dp__input_icons","data-test":"clear-icon"})],40,sL)):re("",!0)])):re("",!0)])}}}),oL=typeof window<"u"?window:void 0,Zu=()=>{},rL=t=>Lc()?(Th(t),!0):!1,aL=(t,e,n,s)=>{if(!t)return Zu;let i=Zu;const o=Bt(()=>q(t),a=>{i(),a&&(a.addEventListener(e,n,s),i=()=>{a.removeEventListener(e,n,s),i=Zu})},{immediate:!0,flush:"post"}),r=()=>{o(),i()};return rL(r),r},lL=(t,e,n,s={})=>{const{window:i=oL,event:o="pointerdown"}=s;return i?aL(i,o,r=>{const a=Ht(t),l=Ht(e);!a||!l||a===r.target||r.composedPath().includes(a)||r.composedPath().includes(l)||n(r)},{passive:!0}):void 0},cL=Nt({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...Qc},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","text-input"],setup(t,{expose:e,emit:n}){const s=n,i=t,o=Do(),r=ve(!1),a=Ca(i,"modelValue"),l=Ca(i,"timezone"),c=ve(null),u=ve(null),d=ve(null),f=ve(!1),g=ve(null),_=ve(!1),m=ve(!1),b=ve(!1),w=ve(!1),{setMenuFocused:$,setShiftKey:A}=Ky(),{clearArrowNav:D}=Hi(),{validateDate:x,isValidTime:y}=ji(i),{defaultedTransitions:S,defaultedTextInput:E,defaultedInline:T,defaultedConfig:C,defaultedRange:B,defaultedMultiDates:J}=xt(i),{menuTransition:ae,showTransition:Y}=Xa(S);qt(()=>{ee(i.modelValue),en().then(()=>{if(!T.value.enabled){const ce=ye(g.value);ce?.addEventListener("scroll",H),window?.addEventListener("resize",W)}}),T.value.enabled&&(r.value=!0),window?.addEventListener("keyup",ie),window?.addEventListener("keydown",j)}),Ir(()=>{if(!T.value.enabled){const ce=ye(g.value);ce?.removeEventListener("scroll",H),window?.removeEventListener("resize",W)}window?.removeEventListener("keyup",ie),window?.removeEventListener("keydown",j)});const L=Rn(o,"all",i.presetDates),I=Rn(o,"input");Bt([a,l],()=>{ee(a.value)},{deep:!0});const{openOnTop:V,menuStyle:Q,xCorrect:Z,setMenuPosition:le,getScrollableParent:ye,shadowRender:U}=GR({menuRef:c,menuRefInner:u,inputRef:d,pickerWrapperRef:g,inline:T,emit:s,props:i,slots:o}),{inputValue:X,internalModelValue:R,parseExternalModelValue:ee,emitModelValue:oe,formatInputValue:P,checkBeforeEmit:se}=HI(s,i,f),ue=_e(()=>({dp__main:!0,dp__theme_dark:i.dark,dp__theme_light:!i.dark,dp__flex_display:T.value.enabled,"dp--flex-display-collapsed":b.value,dp__flex_display_with_input:T.value.input})),xe=_e(()=>i.dark?"dp__theme_dark":"dp__theme_light"),N=_e(()=>i.teleport?{to:typeof i.teleport=="boolean"?"body":i.teleport,disabled:!i.teleport||T.value.enabled}:{}),he=_e(()=>({class:"dp__outer_menu_wrap"})),v=_e(()=>T.value.enabled&&(i.timePicker||i.monthPicker||i.yearPicker||i.quarterPicker)),O=()=>{var ce,$e;return($e=(ce=d.value)==null?void 0:ce.$el)==null?void 0:$e.getBoundingClientRect()},H=()=>{r.value&&(C.value.closeOnScroll?Be():le())},W=()=>{var ce;r.value&&le();const $e=(ce=u.value)==null?void 0:ce.$el.getBoundingClientRect().width;b.value=document.body.offsetWidth<=$e},ie=ce=>{ce.key==="Tab"&&!T.value.enabled&&!i.teleport&&C.value.tabOutClosesMenu&&(g.value.contains(document.activeElement)||Be()),m.value=ce.shiftKey},j=ce=>{m.value=ce.shiftKey},te=()=>{!i.disabled&&!i.readonly&&(U(bm,i),le(!1),r.value=!0,r.value&&s("open"),r.value||Ve(),ee(i.modelValue))},G=()=>{var ce;X.value="",Ve(),(ce=d.value)==null||ce.setParsedDate(null),s("update:model-value",null),s("update:model-timezone-value",null),s("cleared"),C.value.closeOnClearValue&&Be()},de=()=>{const ce=R.value;return!ce||!Array.isArray(ce)&&x(ce)?!0:Array.isArray(ce)?J.value.enabled||ce.length===2&&x(ce[0])&&x(ce[1])?!0:B.value.partialRange&&!i.timePicker?x(ce[0]):!1:!1},ge=()=>{se()&&de()?(oe(),Be()):s("invalid-select",R.value)},fe=ce=>{Re(),oe(),C.value.closeOnAutoApply&&!ce&&Be()},Re=()=>{d.value&&E.value.enabled&&d.value.setParsedDate(R.value)},De=(ce=!1)=>{i.autoApply&&y(R.value)&&de()&&(B.value.enabled&&Array.isArray(R.value)?(B.value.partialRange||R.value.length===2)&&fe(ce):fe(ce))},Ve=()=>{E.value.enabled||(R.value=null)},Be=()=>{T.value.enabled||(r.value&&(r.value=!1,Z.value=!1,$(!1),A(!1),D(),s("closed"),X.value&&ee(a.value)),Ve(),s("blur"))},et=(ce,$e,Me=!1)=>{if(!ce){R.value=null;return}const nn=Array.isArray(ce)?!ce.some(Os=>!x(Os)):x(ce),xn=y(ce);nn&&xn&&(w.value=!0,R.value=ce,$e&&(_.value=Me,ge(),s("text-submit")),en().then(()=>{w.value=!1}))},Ge=()=>{i.autoApply&&y(R.value)&&oe(),Re()},pt=()=>r.value?Be():te(),on=ce=>{R.value=ce},Hn=()=>{E.value.enabled&&(f.value=!0,P()),s("focus")},ii=()=>{if(E.value.enabled&&(f.value=!1,ee(i.modelValue),_.value)){const ce=pI(g.value,m.value);ce?.focus()}s("blur")},Qn=ce=>{u.value&&u.value.updateMonthYear(0,{month:hm(ce.month),year:hm(ce.year)})},Ds=ce=>{ee(ce??i.modelValue)},Vt=(ce,$e)=>{var Me;(Me=u.value)==null||Me.switchView(ce,$e)},ne=ce=>C.value.onClickOutside?C.value.onClickOutside(ce):Be(),ke=(ce=0)=>{var $e;($e=u.value)==null||$e.handleFlow(ce)};return lL(c,d,()=>ne(de)),e({closeMenu:Be,selectDate:ge,clearValue:G,openMenu:te,onScroll:H,formatInputValue:P,updateInternalModelValue:on,setMonthYear:Qn,parseModel:Ds,switchView:Vt,toggleMenu:pt,handleFlow:ke,dpWrapMenuRef:c}),(ce,$e)=>(M(),F("div",{ref_key:"pickerWrapperRef",ref:g,class:Ce(ue.value),"data-datepicker-instance":""},[Se(iL,zt({ref_key:"inputRef",ref:d,"input-value":q(X),"onUpdate:inputValue":$e[0]||($e[0]=Me=>Pt(X)?X.value=Me:null),"is-menu-open":r.value},ce.$props,{onClear:G,onOpen:te,onSetInputDate:et,onSetEmptyDate:q(oe),onSelectDate:ge,onToggle:pt,onClose:Be,onFocus:Hn,onBlur:ii,onRealBlur:$e[1]||($e[1]=Me=>f.value=!1),onTextInput:$e[2]||($e[2]=Me=>ce.$emit("text-input",Me))}),dn({_:2},[Ue(q(I),(Me,nn)=>({name:Me,fn:Pe(xn=>[Ie(ce.$slots,Me,Qt(mn(xn)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(M(),Le(Mo(ce.teleport?DA:"div"),Qt(mn(N.value)),{default:Pe(()=>[Se(At,{name:q(ae)(q(V)),css:q(Y)&&!q(T).enabled},{default:Pe(()=>[r.value?(M(),F("div",zt({key:0,ref_key:"dpWrapMenuRef",ref:c},he.value,{class:{"dp--menu-wrapper":!q(T).enabled},style:q(T).enabled?void 0:q(Q)}),[Se(bm,zt({ref_key:"dpMenuRef",ref:u},ce.$props,{"internal-model-value":q(R),"onUpdate:internalModelValue":$e[3]||($e[3]=Me=>Pt(R)?R.value=Me:null),class:{[xe.value]:!0,"dp--menu-wrapper":ce.teleport},"open-on-top":q(V),"no-overlay-focus":v.value,collapse:b.value,"get-input-rect":O,"is-text-input-date":w.value,onClosePicker:Be,onSelectDate:ge,onAutoApply:De,onTimeUpdate:Ge,onFlowStep:$e[4]||($e[4]=Me=>ce.$emit("flow-step",Me)),onUpdateMonthYear:$e[5]||($e[5]=Me=>ce.$emit("update-month-year",Me)),onInvalidSelect:$e[6]||($e[6]=Me=>ce.$emit("invalid-select",q(R))),onAutoApplyInvalid:$e[7]||($e[7]=Me=>ce.$emit("invalid-select",Me)),onInvalidFixedRange:$e[8]||($e[8]=Me=>ce.$emit("invalid-fixed-range",Me)),onRecalculatePosition:q(le),onTooltipOpen:$e[9]||($e[9]=Me=>ce.$emit("tooltip-open",Me)),onTooltipClose:$e[10]||($e[10]=Me=>ce.$emit("tooltip-close",Me)),onTimePickerOpen:$e[11]||($e[11]=Me=>ce.$emit("time-picker-open",Me)),onTimePickerClose:$e[12]||($e[12]=Me=>ce.$emit("time-picker-close",Me)),onAmPmChange:$e[13]||($e[13]=Me=>ce.$emit("am-pm-change",Me)),onRangeStart:$e[14]||($e[14]=Me=>ce.$emit("range-start",Me)),onRangeEnd:$e[15]||($e[15]=Me=>ce.$emit("range-end",Me)),onDateUpdate:$e[16]||($e[16]=Me=>ce.$emit("date-update",Me)),onInvalidDate:$e[17]||($e[17]=Me=>ce.$emit("invalid-date",Me)),onOverlayToggle:$e[18]||($e[18]=Me=>ce.$emit("overlay-toggle",Me))}),dn({_:2},[Ue(q(L),(Me,nn)=>({name:Me,fn:Pe(xn=>[Ie(ce.$slots,Me,Qt(mn({...xn})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","is-text-input-date","onRecalculatePosition"])],16)):re("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),Za=(()=>{const t=cL;return t.install=e=>{e.component("Vue3DatePicker",t)},t})(),uL=Object.freeze(Object.defineProperty({__proto__:null,default:Za},Symbol.toStringTag,{value:"Module"}));Object.entries(uL).forEach(([t,e])=>{t!=="default"&&(Za[t]=e)});const dL={name:"newDashboardAPIKey",components:{VueDatePicker:Za},data(){return{newKeyData:{ExpiredAt:Cn().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),neverExpire:!1},submitting:!1}},setup(){return{store:Xe()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,ht("/api/newDashboardAPIKey",this.newKeyData,t=>{t.status?(this.$emit("created",t.data),this.store.newMessage("Server","New API Key created","success"),this.$emit("close")):this.store.newMessage("Server",t.message,"danger"),this.submitting=!1})},fixDate(t){return console.log(Cn(t).format("YYYY-MM-DDTHH:mm:ss")),Cn(t).format("YYYY-MM-DDTHH:mm:ss")},parseTime(t){t?this.newKeyData.ExpiredAt=Cn(t).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},hL={class:"position-absolute w-100 h-100 top-0 start-0 rounded-bottom-3 p-3 d-flex",style:{"background-color":"#00000060","backdrop-filter":"blur(3px)"}},fL={class:"card m-auto rounded-3 mt-5"},pL={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},gL=h("h6",{class:"mb-0"},"Create API Key",-1),mL={class:"card-body d-flex gap-2 p-4 flex-column"},_L=h("small",{class:"text-muted"},"When should this API Key expire?",-1),vL={class:"d-flex align-items-center gap-2"},bL={class:"form-check"},yL=["disabled"],wL=h("label",{class:"form-check-label",for:"neverExpire"},[be(" Never Expire ("),h("i",{class:"bi bi-emoji-grimace-fill"}),be(" Don't think that's a good idea) ")],-1),xL={key:0,class:"bi bi-check-lg me-2"};function kL(t,e,n,s,i,o){const r=He("VueDatePicker");return M(),F("div",hL,[h("div",fL,[h("div",pL,[gL,h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),h("div",mL,[_L,h("div",vL,[Se(r,{is24:!0,"min-date":new Date,"model-value":this.newKeyData.ExpiredAt,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:this.newKeyData.neverExpire||this.submitting,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])]),h("div",bL,[Oe(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=a=>this.newKeyData.neverExpire=a),id:"neverExpire",disabled:this.submitting},null,8,yL),[[_n,this.newKeyData.neverExpire]]),wL]),h("button",{class:Ce(["ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",{disabled:this.submitting}]),onClick:e[2]||(e[2]=a=>this.submitNewAPIKey())},[this.submitting?re("",!0):(M(),F("i",xL)),be(" "+me(this.submitting?"Creating...":"Done"),1)],2)])])])}const SL=We(dL,[["render",kL]]),$L={name:"dashboardAPIKey",props:{apiKey:Object},setup(){return{store:Xe()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){ht("/api/deleteDashboardAPIKey",{Key:this.apiKey.Key},t=>{t.status?(this.$emit("deleted",t.data),this.store.newMessage("Server","API Key deleted","success")):this.store.newMessage("Server",t.message,"danger")})}}},el=t=>(Ut("data-v-0cc2f367"),t=t(),Kt(),t),AL={class:"card rounded-3 shadow-sm"},CL={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},EL={class:"d-flex align-items-center gap-2"},PL=el(()=>h("small",{class:"text-muted"},"Key",-1)),TL={style:{"word-break":"break-all"}},ML={class:"d-flex align-items-center gap-2 ms-auto"},DL=el(()=>h("small",{class:"text-muted"},"Expire At",-1)),OL=el(()=>h("i",{class:"bi bi-trash-fill"},null,-1)),IL=[OL],RL={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"},LL=el(()=>h("i",{class:"bi bi-check-lg"},null,-1)),NL=[LL],FL=el(()=>h("i",{class:"bi bi-x-lg"},null,-1)),BL=[FL];function VL(t,e,n,s,i,o){return M(),F("div",AL,[this.confirmDelete?(M(),F(Te,{key:1},[this.store.getActiveCrossServer()?re("",!0):(M(),F("div",RL,[be(" Are you sure to delete this API key? "),h("a",{role:"button",class:"btn btn-sm bg-success-subtle text-success-emphasis rounded-3",onClick:e[1]||(e[1]=r=>this.deleteAPIKey())},NL),h("a",{role:"button",class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:e[2]||(e[2]=r=>this.confirmDelete=!1)},BL)]))],64)):(M(),F("div",CL,[h("div",EL,[PL,h("span",TL,me(this.apiKey.Key),1)]),h("div",ML,[DL,be(" "+me(this.apiKey.ExpiredAt?this.apiKey.ExpiredAt:"Never"),1)]),this.store.getActiveCrossServer()?re("",!0):(M(),F("a",{key:0,role:"button",class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3",onClick:e[0]||(e[0]=r=>this.confirmDelete=!0)},IL))]))])}const HL=We($L,[["render",VL],["__scopeId","data-v-0cc2f367"]]),jL={name:"dashboardAPIKeys",components:{DashboardAPIKey:HL,NewDashboardAPIKey:SL},setup(){return{store:Xe()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await ht("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_api_key",value:this.value},t=>{t.status?(this.store.Configuration.Peers[this.targetData]=this.value,this.store.newMessage("Server",`API Keys function is successfully ${this.value?"enabled":"disabled"}`,"success")):(this.value=this.store.Configuration.Peers[this.targetData],this.store.newMessage("Server",`API Keys function is failed ${this.value?"enabled":"disabled"}`,"danger"))})}},watch:{value:{immediate:!0,handler(t){t?wt("/api/getDashboardAPIKeys",{},e=>{console.log(e),e.status?this.apiKeys=e.data:(this.apiKeys=[],this.store.newMessage("Server",e.message,"danger"))}):this.apiKeys=[]}}}},e0=t=>(Ut("data-v-45b66fb8"),t=t(),Kt(),t),WL={class:"card mb-4 shadow rounded-3"},zL={class:"card-header d-flex"},YL={key:0,class:"form-check form-switch ms-auto"},UL={class:"form-check-label",for:"allowAPIKeysSwitch"},KL={key:0,class:"card-body position-relative d-flex flex-column gap-2"},qL=e0(()=>h("i",{class:"bi bi-key me-2"},null,-1)),GL={key:1,class:"card",style:{height:"300px"}},JL=e0(()=>h("div",{class:"card-body d-flex text-muted"},[h("span",{class:"m-auto"}," No Dashboard API Key ")],-1)),XL=[JL],QL={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function ZL(t,e,n,s,i,o){const r=He("DashboardAPIKey"),a=He("NewDashboardAPIKey");return M(),F("div",WL,[h("div",zL,[be(" API Keys "),this.store.getActiveCrossServer()?re("",!0):(M(),F("div",YL,[Oe(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=l=>this.value=l),onChange:e[1]||(e[1]=l=>this.toggleDashboardAPIKeys()),role:"switch",id:"allowAPIKeysSwitch"},null,544),[[_n,this.value]]),h("label",UL,me(this.value?"Enabled":"Disabled"),1)]))]),this.value?(M(),F("div",KL,[this.store.getActiveCrossServer()?re("",!0):(M(),F("button",{key:0,class:"ms-auto btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm",onClick:e[2]||(e[2]=l=>this.newDashboardAPIKey=!0)},[qL,be(" Create ")])),this.apiKeys.length===0?(M(),F("div",GL,XL)):(M(),F("div",QL,[Se(Bi,{name:"apiKey"},{default:Pe(()=>[(M(!0),F(Te,null,Ue(this.apiKeys,l=>(M(),Le(r,{apiKey:l,key:l.Key,onDeleted:e[3]||(e[3]=c=>this.apiKeys=c)},null,8,["apiKey"]))),128))]),_:1})])),Se(At,{name:"zoomReversed"},{default:Pe(()=>[this.newDashboardAPIKey?(M(),Le(a,{key:0,onCreated:e[4]||(e[4]=l=>this.apiKeys=l),onClose:e[5]||(e[5]=l=>this.newDashboardAPIKey=!1)})):re("",!0)]),_:1})])):re("",!0)])}const e3=We(jL,[["render",ZL],["__scopeId","data-v-45b66fb8"]]),t3={name:"accountSettingsMFA",setup(){const t=Xe(),e=`input_${Ps()}`;return{store:t,uuid:e}},data(){return{status:!1}},mounted(){this.status=this.store.Configuration.Account.enable_totp},methods:{async resetMFA(){await ht("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async t=>{await ht("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},e=>{e.status&&this.$router.push("/2FASetup")})})}}},n3={class:"d-flex align-items-center"},s3=h("strong",null,"Multi-Factor Authentication",-1),i3={class:"form-check form-switch ms-3"},o3=h("i",{class:"bi bi-shield-lock-fill me-2"},null,-1);function r3(t,e,n,s,i,o){return M(),F("div",null,[h("div",n3,[s3,h("div",i3,[Oe(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=r=>this.status=r),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[_n,this.status]])]),this.status?(M(),F("button",{key:0,class:"btn bg-warning-subtle text-warning-emphasis border-1 border-warning-subtle ms-auto rounded-3 shadow-sm",onClick:e[1]||(e[1]=r=>this.resetMFA())},[o3,be(" "+me(this.store.Configuration.Account.totp_verified?"Reset":"Setup")+" MFA ",1)])):re("",!0)])])}const a3=We(t3,[["render",r3]]),l3={name:"settings",methods:{ipV46RegexCheck:MM},components:{AccountSettingsMFA:a3,DashboardAPIKeys:e3,DashboardSettingsInputIPAddressAndPort:ZD,DashboardTheme:LD,DashboardSettingsInputWireguardConfigurationPath:ED,AccountSettingsInputPassword:fD,AccountSettingsInputUsername:HM,PeersDefaultSettingsInput:TM},setup(){return{dashboardConfigurationStore:Xe()}},watch:{}},c3={class:"mt-md-5 mt-3"},u3={class:"container-md"},d3=h("h3",{class:"mb-3 text-body"},"Settings",-1),h3={class:"card mb-4 shadow rounded-3"},f3=h("p",{class:"card-header"},"Peers Default Settings",-1),p3={class:"card-body"},g3={class:"card mb-4 shadow rounded-3"},m3=h("p",{class:"card-header"},"WireGuard Configurations Settings",-1),_3={class:"card-body"},v3={class:"card mb-4 shadow rounded-3"},b3=h("p",{class:"card-header"},"Account Settings",-1),y3={class:"card-body d-flex gap-4 flex-column"},w3=h("hr",{class:"m-0"},null,-1),x3={key:0,class:"m-0"};function k3(t,e,n,s,i,o){const r=He("DashboardTheme"),a=He("PeersDefaultSettingsInput"),l=He("DashboardSettingsInputWireguardConfigurationPath"),c=He("AccountSettingsInputUsername"),u=He("AccountSettingsInputPassword"),d=He("AccountSettingsMFA"),f=He("DashboardAPIKeys");return M(),F("div",c3,[h("div",u3,[d3,Se(r),h("div",h3,[f3,h("div",p3,[Se(a,{targetData:"peer_global_dns",title:"DNS"}),Se(a,{targetData:"peer_endpoint_allowed_ip",title:"Peer Endpoint Allowed IPs"}),Se(a,{targetData:"peer_mtu",title:"MTU (Max Transmission Unit)"}),Se(a,{targetData:"peer_keep_alive",title:"Persistent Keepalive"}),Se(a,{targetData:"remote_endpoint",title:"Peer Remote Endpoint",warning:!0,warningText:"This will be changed globally, and will be apply to all peer's QR code and configuration file."})])]),h("div",g3,[m3,h("div",_3,[Se(l,{targetData:"wg_conf_path",title:"Configurations Directory",warning:!0,"warning-text":"Remember to remove <code>/</code> at the end of your path. e.g <code>/etc/wireguard</code>"})])]),h("div",v3,[b3,h("div",y3,[Se(c,{targetData:"username",title:"Username"}),w3,Se(u,{targetData:"password"}),this.dashboardConfigurationStore.getActiveCrossServer()?re("",!0):(M(),F("hr",x3)),this.dashboardConfigurationStore.getActiveCrossServer()?re("",!0):(M(),Le(d,{key:1}))])]),Se(f)])])}const S3=We(l3,[["render",k3]]),$3={name:"setup",components:{},setup(){return{store:Xe()}},data(){return{setup:{username:"",newPassword:"",repeatNewPassword:"",enable_totp:!0},loading:!1,errorMessage:"",done:!1}},computed:{goodToSubmit(){return this.setup.username&&this.setup.newPassword.length>=8&&this.setup.repeatNewPassword.length>=8&&this.setup.newPassword===this.setup.repeatNewPassword}},methods:{submit(){this.loading=!0,ht("/api/Welcome_Finish",this.setup,t=>{t.status?(this.done=!0,this.$router.push("/2FASetup")):(document.querySelectorAll("#createAccount input").forEach(e=>e.classList.add("is-invalid")),this.errorMessage=t.message,document.querySelector(".login-container-fluid").scrollTo({top:0,left:0,behavior:"smooth"})),this.loading=!1})}}},A3=["data-bs-theme"],C3={class:"m-auto text-body",style:{width:"500px"}},E3=h("span",{class:"dashboardLogo display-4"},"Nice to meet you!",-1),P3=h("p",{class:"mb-5"},"Please fill in the following fields to finish setup 😊",-1),T3=h("h3",null,"Create an account",-1),M3={key:0,class:"alert alert-danger"},D3={class:"d-flex flex-column gap-3"},O3={id:"createAccount",class:"d-flex flex-column gap-2"},I3={class:"form-group text-body"},R3=h("label",{for:"username",class:"mb-1 text-muted"},[h("small",null,"Pick an username you like")],-1),L3={class:"form-group text-body"},N3=h("label",{for:"password",class:"mb-1 text-muted"},[h("small",null,"Create a password (at least 8 characters)")],-1),F3={class:"form-group text-body"},B3=h("label",{for:"confirmPassword",class:"mb-1 text-muted"},[h("small",null,"Confirm password")],-1),V3=["disabled"],H3={key:0,class:"d-flex align-items-center w-100"},j3=h("i",{class:"bi bi-chevron-right ms-auto"},null,-1),W3={key:1,class:"d-flex align-items-center w-100"},z3=h("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},[h("span",{class:"visually-hidden"},"Loading...")],-1);function Y3(t,e,n,s,i,o){return M(),F("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[h("div",C3,[E3,P3,h("div",null,[T3,this.errorMessage?(M(),F("div",M3,me(this.errorMessage),1)):re("",!0),h("div",D3,[h("div",O3,[h("div",I3,[R3,Oe(h("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=r=>this.setup.username=r),class:"form-control",id:"username",name:"username",placeholder:"Maybe something like 'wiredragon'?",required:""},null,512),[[je,this.setup.username]])]),h("div",L3,[N3,Oe(h("input",{type:"password","onUpdate:modelValue":e[1]||(e[1]=r=>this.setup.newPassword=r),class:"form-control",id:"password",name:"password",placeholder:"Make sure is strong enough",required:""},null,512),[[je,this.setup.newPassword]])]),h("div",F3,[B3,Oe(h("input",{type:"password","onUpdate:modelValue":e[2]||(e[2]=r=>this.setup.repeatNewPassword=r),class:"form-control",id:"confirmPassword",name:"confirmPassword",placeholder:"and you can remember it :)",required:""},null,512),[[je,this.setup.repeatNewPassword]])])]),h("button",{class:"btn btn-dark btn-lg mb-5 d-flex btn-brand shadow align-items-center",ref:"signInBtn",disabled:!this.goodToSubmit||this.loading||this.done,onClick:e[3]||(e[3]=r=>this.submit())},[!this.loading&&!this.done?(M(),F("span",H3,[be(" Next"),j3])):(M(),F("span",W3,[be(" Saving..."),z3]))],8,V3)])])])],8,A3)}const U3=We($3,[["render",Y3]]);function xf(t){return t.includes(":")?6:t.includes(".")?4:0}function K3(t){const e=xf(t);if(!e)throw new Error(`Invalid IP address: ${t}`);let n=0n,s=0n;const i=Object.create(null);if(e===4)for(const o of t.split(".").map(BigInt).reverse())n+=o*2n**s,s+=8n;else{if(t.includes(".")&&(i.ipv4mapped=!0,t=t.split(":").map(a=>{if(a.includes(".")){const[l,c,u,d]=a.split(".").map(f=>Number(f).toString(16).padStart(2,"0"));return`${l}${c}:${u}${d}`}else return a}).join(":")),t.includes("%")){let a;[,t,a]=/(.+)%(.+)/.exec(t),i.scopeid=a}const o=t.split(":"),r=o.indexOf("");if(r!==-1)for(;o.length<8;)o.splice(r,0,"");for(const a of o.map(l=>BigInt(parseInt(l||0,16))).reverse())n+=a*2n**s,s+=16n}return i.number=n,i.version=e,i}const ym={4:32,6:128},q3=t=>t.includes("/")?xf(t):0;function G3(t){const e=q3(t),n=Object.create(null);if(n.single=!1,e)n.cidr=t,n.version=e;else{const d=xf(t);if(d)n.cidr=`${t}/${ym[d]}`,n.version=d,n.single=!0;else throw new Error(`Network is not a CIDR or IP: ${t}`)}const[s,i]=n.cidr.split("/");n.prefix=i;const{number:o,version:r}=K3(s),a=ym[r],l=o.toString(2).padStart(a,"0"),c=Number(a-i),u=l.substring(0,a-c);return n.start=BigInt(`0b${u}${"0".repeat(c)}`),n.end=BigInt(`0b${u}${"1".repeat(c)}`),n}/*! SPDX-License-Identifier: GPL-2.0
|
|
*
|
|
* Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
|
*/(function(){function t(x){var y=new Float64Array(16);if(x)for(var S=0;S<x.length;++S)y[S]=x[S];return y}function e(x,y){for(var S,E=t(),T=t(),C=0;C<16;++C)T[C]=y[C];n(T),n(T),n(T);for(var B=0;B<2;++B){E[0]=T[0]-65517;for(var C=1;C<15;++C)E[C]=T[C]-65535-(E[C-1]>>16&1),E[C-1]&=65535;E[15]=T[15]-32767-(E[14]>>16&1),S=E[15]>>16&1,E[14]&=65535,s(T,E,1-S)}for(var C=0;C<16;++C)x[2*C]=T[C]&255,x[2*C+1]=T[C]>>8}function n(x){for(var y=0;y<16;++y)x[(y+1)%16]+=(y<15?1:38)*Math.floor(x[y]/65536),x[y]&=65535}function s(x,y,S){for(var E,T=~(S-1),C=0;C<16;++C)E=T&(x[C]^y[C]),x[C]^=E,y[C]^=E}function i(x,y,S){for(var E=0;E<16;++E)x[E]=y[E]+S[E]|0}function o(x,y,S){for(var E=0;E<16;++E)x[E]=y[E]-S[E]|0}function r(x,y,S){for(var E=new Float64Array(31),T=0;T<16;++T)for(var C=0;C<16;++C)E[T+C]+=y[T]*S[C];for(var T=0;T<15;++T)E[T]+=38*E[T+16];for(var T=0;T<16;++T)x[T]=E[T];n(x),n(x)}function a(x,y){for(var S=t(),E=0;E<16;++E)S[E]=y[E];for(var E=253;E>=0;--E)r(S,S,S),E!==2&&E!==4&&r(S,S,y);for(var E=0;E<16;++E)x[E]=S[E]}function l(x){x[31]=x[31]&127|64,x[0]&=248}function c(x){for(var y,S=new Uint8Array(32),E=t([1]),T=t([9]),C=t(),B=t([1]),J=t(),ae=t(),Y=t([56129,1]),L=t([9]),I=0;I<32;++I)S[I]=x[I];l(S);for(var I=254;I>=0;--I)y=S[I>>>3]>>>(I&7)&1,s(E,T,y),s(C,B,y),i(J,E,C),o(E,E,C),i(C,T,B),o(T,T,B),r(B,J,J),r(ae,E,E),r(E,C,E),r(C,T,J),i(J,E,C),o(E,E,C),r(T,E,E),o(C,B,ae),r(E,C,Y),i(E,E,B),r(C,C,E),r(E,B,ae),r(B,T,L),r(T,J,J),s(E,T,y),s(C,B,y);return a(C,C),r(E,E,C),e(S,E),S}function u(){var x=new Uint8Array(32);return window.crypto.getRandomValues(x),x}function d(){var x=u();return l(x),x}function f(x,y){for(var S=Uint8Array.from([y[0]>>2&63,(y[0]<<4|y[1]>>4)&63,(y[1]<<2|y[2]>>6)&63,y[2]&63]),E=0;E<4;++E)x[E]=S[E]+65+(25-S[E]>>8&6)-(51-S[E]>>8&75)-(61-S[E]>>8&15)+(62-S[E]>>8&3)}function g(x){var y,S=new Uint8Array(44);for(y=0;y<32/3;++y)f(S.subarray(y*4),x.subarray(y*3));return f(S.subarray(y*4),Uint8Array.from([x[y*3+0],x[y*3+1],0])),S[43]=61,String.fromCharCode.apply(null,S)}function _(x){let y=window.atob(x),S=y.length,E=new Uint8Array(S);for(let C=0;C<S;C++)E[C]=y.charCodeAt(C);return new Uint8Array(E.buffer)}function m(x,y){x.push(y&255,y>>>8&255,y>>>16&255,y>>>24&255)}function b(x,y){x.push(y&255,y>>>8&255)}function w(x,y){for(var S=0;S<y.length;++S)x.push(y[S]&255)}function $(x){for(var y=unescape(encodeURIComponent(x)),S=new Uint8Array(y.length),E=0;E<y.length;++E)S[E]=y.charCodeAt(E);return S}function A(x){if(!A.table){A.table=[];for(var y=0,S=0;S<256;y=++S){for(var E=0;E<8;++E)y=y&1?3988292384^y>>>1:y>>>1;A.table[S]=y}}for(var T=-1,C=0;C<x.length;++C)T=T>>>8^A.table[(T^x[C])&255];return(T^-1)>>>0}function D(x){for(var y=[],S=[],E=0,T=0;T<x.length;++T){var C=$(x[T].fileName),B=$(x[T].file),J=A(B);m(y,67324752),b(y,20),b(y,0),b(y,0),b(y,0),b(y,0),m(y,J),m(y,B.length),m(y,B.length),b(y,C.length),b(y,0),w(y,C),w(y,B),m(S,33639248),b(S,0),b(S,20),b(S,0),b(S,0),b(S,0),b(S,0),m(S,J),m(S,B.length),m(S,B.length),b(S,C.length),b(S,0),b(S,0),b(S,0),b(S,0),m(S,32),m(S,E),w(S,C),E+=30+B.length+C.length}return w(y,S),m(y,101010256),b(y,0),b(y,0),b(y,x.length),b(y,x.length),m(y,S.length),m(y,E),b(y,0),Uint8Array.from(y)}window.wireguard={generateKeypair:function(){var x=d(),y=c(x),S=u();return{publicKey:g(y),privateKey:g(x),presharedKey:g(S)}},generatePublicKey:function(x){return x=_(x),g(c(x))},generateZipFiles:function(x,y){var S=x.data,E=D(S),T=new Blob([E],{type:"application/zip"}),C=document.createElement("a");C.download=y,C.href=URL.createObjectURL(T),C.style.display="none",document.body.appendChild(C),C.click(),document.body.removeChild(C)}}})();const J3={name:"newConfiguration",setup(){return{store:Tn()}},data(){return{newConfiguration:{ConfigurationName:"",Address:"",ListenPort:"",PrivateKey:"",PublicKey:"",PresharedKey:"",PreUp:"",PreDown:"",PostUp:"",PostDown:""},numberOfAvailableIPs:"0",error:!1,errorMessage:"",success:!1,loading:!1}},created(){this.wireguardGenerateKeypair()},methods:{wireguardGenerateKeypair(){const t=window.wireguard.generateKeypair();this.newConfiguration.PrivateKey=t.privateKey,this.newConfiguration.PublicKey=t.publicKey,this.newConfiguration.PresharedKey=t.presharedKey},async saveNewConfiguration(){this.goodToSubmit&&(this.loading=!0,await ht("/api/addWireguardConfiguration",this.newConfiguration,async t=>{t.status?(this.success=!0,await this.store.getConfigurations(),setTimeout(()=>{this.$router.push("/")},1e3)):(this.error=!0,this.errorMessage=t.message,document.querySelector(`#${t.data}`).classList.remove("is-valid"),document.querySelector(`#${t.data}`).classList.add("is-invalid"),this.loading=!1)}))}},computed:{goodToSubmit(){let t=["ConfigurationName","Address","ListenPort","PrivateKey"],e=[...document.querySelectorAll("input[required]")];return t.find(n=>this.newConfiguration[n].length===0)===void 0&&e.find(n=>n.classList.contains("is-invalid"))===void 0}},watch:{"newConfiguration.Address"(t){let e=document.querySelector("#Address");e.classList.remove("is-invalid","is-valid");try{if(t.trim().split("/").filter(i=>i.length>0).length!==2)throw Error();let n=G3(t),s=n.end-n.start;this.numberOfAvailableIPs=s.toLocaleString(),e.classList.add("is-valid")}catch{this.numberOfAvailableIPs="0",e.classList.add("is-invalid")}},"newConfiguration.ListenPort"(t){let e=document.querySelector("#ListenPort");e.classList.remove("is-invalid","is-valid"),t<0||t>65353||!Number.isInteger(t)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.ConfigurationName"(t){let e=document.querySelector("#ConfigurationName");e.classList.remove("is-invalid","is-valid"),!/^[a-zA-Z0-9_=+.-]{1,15}$/.test(t)||t.length===0||this.store.Configurations.find(n=>n.Name===t)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.PrivateKey"(t){let e=document.querySelector("#PrivateKey");e.classList.remove("is-invalid","is-valid");try{wireguard.generatePublicKey(t),e.classList.add("is-valid")}catch{e.classList.add("is-invalid")}}}},X3={class:"mt-5"},Q3={class:"container mb-4"},Z3={class:"mb-4 d-flex align-items-center gap-4"},eN=h("h3",{class:"mb-0 text-body"},[h("i",{class:"bi bi-chevron-left me-4"}),be(" New Configuration ")],-1),tN={class:"card rounded-3 shadow"},nN=h("div",{class:"card-header"},"Configuration Name",-1),sN={class:"card-body"},iN=["disabled"],oN={class:"invalid-feedback"},rN={key:0},aN={key:1},lN=h("ul",{class:"mb-0"},[h("li",null,"Configuration name already exist."),h("li",null,'Configuration name can only contain 15 lower/uppercase alphabet, numbers, "_"(underscore), "="(equal), "+"(plus), "."(period/dot), "-"(dash/hyphen)')],-1),cN={class:"card rounded-3 shadow"},uN=h("div",{class:"card-header"},"Private Key / Public Key / Pre-Shared Key",-1),dN={class:"card-body",style:{"font-family":"var(--bs-font-monospace)"}},hN={class:"mb-2"},fN=h("label",{class:"text-muted fw-bold mb-1"},[h("small",null,"PRIVATE KEY")],-1),pN={class:"input-group"},gN=["disabled"],mN=h("i",{class:"bi bi-arrow-repeat"},null,-1),_N=[mN],vN=h("label",{class:"text-muted fw-bold mb-1"},[h("small",null,"PUBLIC KEY")],-1),bN={class:"card rounded-3 shadow"},yN=h("div",{class:"card-header"},"Listen Port",-1),wN={class:"card-body"},xN=["disabled"],kN={class:"invalid-feedback"},SN={key:0},$N={key:1},AN={class:"card rounded-3 shadow"},CN={class:"card-header d-flex align-items-center"},EN={class:"badge rounded-pill text-bg-success ms-auto"},PN={class:"card-body"},TN=["disabled"],MN={class:"invalid-feedback"},DN={key:0},ON={key:1},IN=h("hr",null,null,-1),RN={class:"accordion",id:"newConfigurationOptionalAccordion"},LN={class:"accordion-item"},NN=h("h2",{class:"accordion-header"},[h("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"}," Optional Settings ")],-1),FN={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},BN={class:"accordion-body d-flex flex-column gap-3"},VN={class:"card rounded-3"},HN=h("div",{class:"card-header"},"PreUp",-1),jN={class:"card-body"},WN={class:"card rounded-3"},zN=h("div",{class:"card-header"},"PreDown",-1),YN={class:"card-body"},UN={class:"card rounded-3"},KN=h("div",{class:"card-header"},"PostUp",-1),qN={class:"card-body"},GN={class:"card rounded-3"},JN=h("div",{class:"card-header"},"PostDown",-1),XN={class:"card-body"},QN=["disabled"],ZN={key:0,class:"d-flex w-100"},e5=h("i",{class:"bi bi-check-circle-fill ms-2"},null,-1),t5={key:1,class:"d-flex w-100"},n5=h("i",{class:"bi bi-save-fill ms-2"},null,-1),s5={key:2,class:"d-flex w-100 align-items-center"},i5=h("span",{class:"ms-2 spinner-border spinner-border-sm",role:"status"},null,-1);function o5(t,e,n,s,i,o){const r=He("RouterLink");return M(),F("div",X3,[h("div",Q3,[h("div",Z3,[Se(r,{to:"/",class:"text-decoration-none"},{default:Pe(()=>[eN]),_:1})]),h("form",{class:"text-body d-flex flex-column gap-3",onSubmit:e[10]||(e[10]=a=>{a.preventDefault(),this.saveNewConfiguration()})},[h("div",tN,[nN,h("div",sN,[Oe(h("input",{type:"text",class:"form-control",placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":e[0]||(e[0]=a=>this.newConfiguration.ConfigurationName=a),disabled:this.loading,required:""},null,8,iN),[[je,this.newConfiguration.ConfigurationName]]),h("div",oN,[this.error?(M(),F("div",rN,me(this.errorMessage),1)):(M(),F("div",aN,[be(" Configuration name is invalid. Possible reasons: "),lN]))])])]),h("div",cN,[uN,h("div",dN,[h("div",hN,[fN,h("div",pN,[Oe(h("input",{type:"text",class:"form-control",id:"PrivateKey",required:"",disabled:this.loading,"onUpdate:modelValue":e[1]||(e[1]=a=>this.newConfiguration.PrivateKey=a)},null,8,gN),[[je,this.newConfiguration.PrivateKey]]),h("button",{class:"btn btn-outline-primary",type:"button",title:"Regenerate Private Key",onClick:e[2]||(e[2]=a=>o.wireguardGenerateKeypair())},_N)])]),h("div",null,[vN,Oe(h("input",{type:"text",class:"form-control",id:"PublicKey","onUpdate:modelValue":e[3]||(e[3]=a=>this.newConfiguration.PublicKey=a),disabled:""},null,512),[[je,this.newConfiguration.PublicKey]])])])]),h("div",bN,[yN,h("div",wN,[Oe(h("input",{type:"number",class:"form-control",placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":e[4]||(e[4]=a=>this.newConfiguration.ListenPort=a),disabled:this.loading,required:""},null,8,xN),[[je,this.newConfiguration.ListenPort]]),h("div",kN,[this.error?(M(),F("div",SN,me(this.errorMessage),1)):(M(),F("div",$N," Invalid port "))])])]),h("div",AN,[h("div",CN,[be(" IP Address & Range "),h("span",EN,me(i.numberOfAvailableIPs)+" Available IPs",1)]),h("div",PN,[Oe(h("input",{type:"text",class:"form-control",placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":e[5]||(e[5]=a=>this.newConfiguration.Address=a),disabled:this.loading,required:""},null,8,TN),[[je,this.newConfiguration.Address]]),h("div",MN,[this.error?(M(),F("div",DN,me(this.errorMessage),1)):(M(),F("div",ON," IP address & range is invalid. "))])])]),IN,h("div",RN,[h("div",LN,[NN,h("div",FN,[h("div",BN,[h("div",VN,[HN,h("div",jN,[Oe(h("input",{type:"text",class:"form-control",id:"preUp","onUpdate:modelValue":e[6]||(e[6]=a=>this.newConfiguration.PreUp=a)},null,512),[[je,this.newConfiguration.PreUp]])])]),h("div",WN,[zN,h("div",YN,[Oe(h("input",{type:"text",class:"form-control",id:"preDown","onUpdate:modelValue":e[7]||(e[7]=a=>this.newConfiguration.PreDown=a)},null,512),[[je,this.newConfiguration.PreDown]])])]),h("div",UN,[KN,h("div",qN,[Oe(h("input",{type:"text",class:"form-control",id:"postUp","onUpdate:modelValue":e[8]||(e[8]=a=>this.newConfiguration.PostUp=a)},null,512),[[je,this.newConfiguration.PostUp]])])]),h("div",GN,[JN,h("div",XN,[Oe(h("input",{type:"text",class:"form-control",id:"postDown","onUpdate:modelValue":e[9]||(e[9]=a=>this.newConfiguration.PostDown=a)},null,512),[[je,this.newConfiguration.PostDown]])])])])])])]),h("button",{class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto",disabled:!this.goodToSubmit},[this.success?(M(),F("span",ZN,[be(" Success! "),e5])):this.loading?(M(),F("span",s5,[be(" Saving... "),i5])):(M(),F("span",t5,[be(" Save Configuration "),n5]))],8,QN)],32)])])}const r5=We(J3,[["render",o5]]),a5={name:"configuration"},l5={class:"mt-md-5 mt-3 text-body"};function c5(t,e,n,s,i,o){const r=He("RouterView");return M(),F("div",l5,[Se(r,null,{default:Pe(({Component:a,route:l})=>[Se(At,{name:"fade2",mode:"out-in"},{default:Pe(()=>[(M(),Le(Wh,null,{default:Pe(()=>[(M(),Le(Mo(a),{key:l.path}))]),_:2},1024))]),_:2},1024)]),_:1})])}const u5=We(a5,[["render",c5]]),d5={name:"peerSearch",setup(){const t=Xe(),e=Tn();return{store:t,wireguardConfigurationStore:e}},props:{configuration:Object},data(){return{sort:{status:"Status",name:"Name",allowed_ip:"Allowed IP",restricted:"Restricted"},interval:{5e3:"5 Seconds",1e4:"10 Seconds",3e4:"30 Seconds",6e4:"1 Minutes"},searchString:"",searchStringTimeout:void 0,showDisplaySettings:!1,showMoreSettings:!1}},methods:{debounce(){this.searchStringTimeout?(clearTimeout(this.searchStringTimeout),this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)):this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)},updateSort(t){ht("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_sort",value:t},e=>{e.status&&this.store.getConfiguration()})},updateRefreshInterval(t){ht("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_refresh_interval",value:t},e=>{e.status&&this.store.getConfiguration()})},downloadAllPeer(){wt(`/api/downloadAllPeers/${this.configuration.Name}`,{},t=>{console.log(t),window.wireguard.generateZipFiles(t,this.configuration.Name)})}},mounted(){}},ni=t=>(Ut("data-v-8d540b8b"),t=t(),Kt(),t),h5={class:"mb-3"},f5={class:"d-flex gap-2 z-3 peerSearchContainer"},p5=ni(()=>h("i",{class:"bi bi-plus-lg me-2"},null,-1)),g5=ni(()=>h("i",{class:"bi bi-download me-2"},null,-1)),m5={class:"mt-3 mt-md-0 flex-grow-1"},_5=ni(()=>h("i",{class:"bi bi-filter-circle me-2"},null,-1)),v5=ni(()=>h("i",{class:"bi bi-three-dots"},null,-1)),b5=[v5],y5={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},w5={class:"container-md d-flex h-100 w-100"},x5={class:"m-auto modal-dialog-centered dashboardModal"},k5={class:"card rounded-3 shadow w-100"},S5={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},$5=ni(()=>h("h4",{class:"mb-0 fw-normal"},"Display ",-1)),A5={class:"card-body px-4 pb-4 d-flex gap-3 flex-column"},C5=ni(()=>h("p",{class:"text-muted fw-bold mb-2"},[h("small",null,"Sort by")],-1)),E5={class:"list-group"},P5=["onClick"],T5={class:"me-auto"},M5={key:0,class:"bi bi-check text-primary"},D5=ni(()=>h("p",{class:"text-muted fw-bold mb-2"},[h("small",null,"Refresh interval")],-1)),O5={class:"list-group"},I5=["onClick"],R5={class:"me-auto"},L5={key:0,class:"bi bi-check text-primary"},N5={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},F5={class:"container-md d-flex h-100 w-100"},B5={class:"m-auto modal-dialog-centered dashboardModal"},V5={class:"card rounded-3 shadow w-100"},H5={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},j5=ni(()=>h("h4",{class:"mb-0 fw-normal"},"Configuration Settings ",-1)),W5={class:"card-body px-4 pb-4 d-flex gap-3 flex-column"},z5=ni(()=>h("p",{class:"text-muted fw-bold mb-2"},[h("small",null,"Peer Jobs")],-1)),Y5={class:"list-group"};function U5(t,e,n,s,i,o){const r=He("RouterLink");return M(),F("div",h5,[h("div",f5,[Se(r,{to:"create",class:"text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm"},{default:Pe(()=>[p5,be("Peer ")]),_:1}),h("button",{class:"btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm",onClick:e[0]||(e[0]=a=>this.downloadAllPeer())},[g5,be(" Download All ")]),h("div",m5,[Oe(h("input",{class:"form-control rounded-3 bg-secondary-subtle border-1 border-secondary-subtle shadow-sm w-100",placeholder:"Search Peers...",id:"searchPeers",onKeyup:e[1]||(e[1]=a=>this.debounce()),"onUpdate:modelValue":e[2]||(e[2]=a=>this.searchString=a)},null,544),[[je,this.searchString]])]),h("button",{onClick:e[3]||(e[3]=a=>this.showDisplaySettings=!0),class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",type:"button","aria-expanded":"false"},[_5,be(" Display ")]),h("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",onClick:e[4]||(e[4]=a=>this.showMoreSettings=!0),type:"button","aria-expanded":"false"},b5),Se(At,{name:"zoom"},{default:Pe(()=>[this.showDisplaySettings?(M(),F("div",y5,[h("div",w5,[h("div",x5,[h("div",k5,[h("div",S5,[$5,h("button",{type:"button",class:"btn-close ms-auto",onClick:e[5]||(e[5]=a=>this.showDisplaySettings=!1)})]),h("div",A5,[h("div",null,[C5,h("div",E5,[(M(!0),F(Te,null,Ue(this.sort,(a,l)=>(M(),F("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:c=>this.updateSort(l)},[h("span",T5,me(a),1),s.store.Configuration.Server.dashboard_sort===l?(M(),F("i",M5)):re("",!0)],8,P5))),256))])]),h("div",null,[D5,h("div",O5,[(M(!0),F(Te,null,Ue(this.interval,(a,l)=>(M(),F("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:c=>this.updateRefreshInterval(l)},[h("span",R5,me(a),1),s.store.Configuration.Server.dashboard_refresh_interval===l?(M(),F("i",L5)):re("",!0)],8,I5))),256))])])])])])])])):re("",!0)]),_:1}),Se(At,{name:"zoom"},{default:Pe(()=>[this.showMoreSettings?(M(),F("div",N5,[h("div",F5,[h("div",B5,[h("div",V5,[h("div",H5,[j5,h("button",{type:"button",class:"btn-close ms-auto",onClick:e[6]||(e[6]=a=>this.showMoreSettings=!1)})]),h("div",W5,[h("div",null,[z5,h("div",Y5,[h("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[7]||(e[7]=a=>this.$emit("jobsAll"))}," Active Jobs "),h("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[8]||(e[8]=a=>this.$emit("jobLogs"))}," Logs ")])])])])])])])):re("",!0)]),_:1})])])}const K5=We(d5,[["render",U5],["__scopeId","data-v-8d540b8b"]]);function q5(t){return Lc()?(Th(t),!0):!1}function t0(t){return typeof t=="function"?t():q(t)}const n0=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const G5=Object.prototype.toString,J5=t=>G5.call(t)==="[object Object]",sc=()=>{},X5=Q5();function Q5(){var t,e;return n0&&((t=window?.navigator)==null?void 0:t.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window?.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function sa(t){var e;const n=t0(t);return(e=n?.$el)!=null?e:n}const s0=n0?window:void 0;function ed(...t){let e,n,s,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,s,i]=t,e=s0):[e,n,s,i]=t,!e)return sc;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const o=[],r=()=>{o.forEach(u=>u()),o.length=0},a=(u,d,f,g)=>(u.addEventListener(d,f,g),()=>u.removeEventListener(d,f,g)),l=Bt(()=>[sa(e),t0(i)],([u,d])=>{if(r(),!u)return;const f=J5(d)?{...d}:d;o.push(...n.flatMap(g=>s.map(_=>a(u,g,_,f))))},{immediate:!0,flush:"post"}),c=()=>{l(),r()};return q5(c),c}let wm=!1;function Z5(t,e,n={}){const{window:s=s0,ignore:i=[],capture:o=!0,detectIframe:r=!1}=n;if(!s)return sc;X5&&!wm&&(wm=!0,Array.from(s.document.body.children).forEach(f=>f.addEventListener("click",sc)),s.document.documentElement.addEventListener("click",sc));let a=!0;const l=f=>i.some(g=>{if(typeof g=="string")return Array.from(s.document.querySelectorAll(g)).some(_=>_===f.target||f.composedPath().includes(_));{const _=sa(g);return _&&(f.target===_||f.composedPath().includes(_))}}),u=[ed(s,"click",f=>{const g=sa(t);if(!(!g||g===f.target||f.composedPath().includes(g))){if(f.detail===0&&(a=!l(f)),!a){a=!0;return}e(f)}},{passive:!0,capture:o}),ed(s,"pointerdown",f=>{const g=sa(t);a=!l(f)&&!!(g&&!f.composedPath().includes(g))},{passive:!0}),r&&ed(s,"blur",f=>{setTimeout(()=>{var g;const _=sa(t);((g=s.document.activeElement)==null?void 0:g.tagName)==="IFRAME"&&!_?.contains(s.document.activeElement)&&e(f)},0)})].filter(Boolean);return()=>u.forEach(f=>f())}const eF={name:"peerSettingsDropdown",setup(){return{dashboardStore:Xe()}},props:{Peer:Object},data(){return{deleteBtnDisabled:!1,restrictBtnDisabled:!1,allowAccessBtnDisabled:!1}},methods:{downloadPeer(){wt("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{if(t.status){const e=new Blob([t.data.file],{type:"text/plain"}),n=URL.createObjectURL(e),s=`${t.data.fileName}.conf`,i=document.createElement("a");i.href=n,i.download=s,i.click(),this.dashboardStore.newMessage("WGDashboard","Peer download started","success")}else this.dashboardStore.newMessage("Server",t.message,"danger")})},downloadQRCode(){wt("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{t.status?this.$emit("qrcode",t.data.file):this.dashboardStore.newMessage("Server",t.message,"danger")})},deletePeer(){this.deleteBtnDisabled=!0,ht(`/api/deletePeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.deleteBtnDisabled=!1})},restrictPeer(){this.restrictBtnDisabled=!0,ht(`/api/restrictPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.restrictBtnDisabled=!1})},allowAccessPeer(){this.allowAccessBtnDisabled=!0,ht(`/api/allowAccessPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.allowAccessBtnDisabled=!1})}}},hs=t=>(Ut("data-v-772e5b77"),t=t(),Kt(),t),tF={class:"dropdown-menu mt-2 shadow-lg d-block rounded-3",style:{"max-width":"200px"}},nF={key:0},sF=hs(()=>h("small",{class:"w-100 dropdown-item text-muted",style:{"white-space":"break-spaces","font-size":"0.7rem"}},[be("Download & QR Code is not available due to no "),h("code",null,"private key"),be(" set for this peer ")],-1)),iF=[sF],oF={key:1,class:"d-flex",style:{"padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},rF=hs(()=>h("i",{class:"me-auto bi bi-download"},null,-1)),aF=[rF],lF=hs(()=>h("i",{class:"me-auto bi bi-qr-code"},null,-1)),cF=[lF],uF=hs(()=>h("i",{class:"me-auto bi bi-share"},null,-1)),dF=[uF],hF=hs(()=>h("li",null,[h("hr",{class:"dropdown-divider"})],-1)),fF=hs(()=>h("i",{class:"me-auto bi bi-pen"},null,-1)),pF=hs(()=>h("i",{class:"me-auto bi bi-app-indicator"},null,-1)),gF=hs(()=>h("li",null,[h("hr",{class:"dropdown-divider"})],-1)),mF=hs(()=>h("i",{class:"me-auto bi bi-lock"},null,-1)),_F=hs(()=>h("i",{class:"me-auto bi bi-trash"},null,-1)),vF={key:1},bF=hs(()=>h("i",{class:"me-auto bi bi-unlock"},null,-1));function yF(t,e,n,s,i,o){return M(),F("ul",tF,[this.Peer.restricted?(M(),F("li",vF,[h("a",{class:Ce(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:e[7]||(e[7]=r=>this.allowAccessPeer()),role:"button"},[bF,be(" "+me(this.allowAccessBtnDisabled?"Allowing...":"Allow Access"),1)],2)])):(M(),F(Te,{key:0},[this.Peer.private_key?(M(),F("li",oF,[h("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[0]||(e[0]=r=>this.downloadPeer())},aF),h("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[1]||(e[1]=r=>this.downloadQRCode())},cF),h("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[2]||(e[2]=r=>this.$emit("share"))},dF)])):(M(),F("li",nF,iF)),hF,h("li",null,[h("a",{class:"dropdown-item d-flex",role:"button",onClick:e[3]||(e[3]=r=>this.$emit("setting"))},[fF,be(" Edit ")])]),h("li",null,[h("a",{class:"dropdown-item d-flex",role:"button",onClick:e[4]||(e[4]=r=>this.$emit("jobs"))},[pF,be(" Schedule Jobs ")])]),gF,h("li",null,[h("a",{class:Ce(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:e[5]||(e[5]=r=>this.restrictPeer()),role:"button"},[mF,be(" "+me(this.restrictBtnDisabled?"Restricting...":"Restrict Access"),1)],2)]),h("li",null,[h("a",{class:Ce(["dropdown-item d-flex fw-bold text-danger",{disabled:this.deleteBtnDisabled}]),onClick:e[6]||(e[6]=r=>this.deletePeer()),role:"button"},[_F,be(" "+me(this.deleteBtnDisabled?"Deleting...":"Delete"),1)],2)])],64))])}const wF=We(eF,[["render",yF],["__scopeId","data-v-772e5b77"]]),xF={name:"peer",components:{PeerSettingsDropdown:wF},props:{Peer:Object},data(){return{}},setup(){const t=ve(null),e=ve(!1);return Z5(t,n=>{e.value=!1}),{target:t,subMenuOpened:e}},computed:{getLatestHandshake(){return this.Peer.latest_handshake.includes(",")?this.Peer.latest_handshake.split(",")[0]:this.Peer.latest_handshake}}},Io=t=>(Ut("data-v-f311ec95"),t=t(),Kt(),t),kF={key:0,class:"card-header bg-transparent d-flex align-items-center gap-2 border-0"},SF={style:{"font-size":"0.8rem"},class:"ms-auto d-flex gap-2"},$F={class:"text-primary"},AF=Io(()=>h("i",{class:"bi bi-arrow-down"},null,-1)),CF={class:"text-success"},EF=Io(()=>h("i",{class:"bi bi-arrow-up"},null,-1)),PF={key:0,class:"text-secondary"},TF=Io(()=>h("i",{class:"bi bi-arrows-angle-contract"},null,-1)),MF={key:1,class:"border-0 card-header bg-transparent text-warning fw-bold",style:{"font-size":"0.8rem"}},DF=Io(()=>h("i",{class:"bi-lock-fill me-2"},null,-1)),OF={class:"card-body pt-1",style:{"font-size":"0.9rem"}},IF={class:"mb-2"},RF=Io(()=>h("small",{class:"text-muted"},"Public Key",-1)),LF={class:"mb-0"},NF={class:"d-flex align-items-end"},FF=Io(()=>h("small",{class:"text-muted"},"Allowed IP",-1)),BF={class:"mb-0"},VF=Io(()=>h("h5",{class:"mb-0"},[h("i",{class:"bi bi-three-dots"})],-1)),HF=[VF];function jF(t,e,n,s,i,o){const r=He("PeerSettingsDropdown");return M(),F("div",{class:Ce(["card shadow-sm rounded-3 peerCard bg-transparent",{"border-warning":n.Peer.restricted}])},[h("div",null,[n.Peer.restricted?(M(),F("div",MF,[DF,be(" Access Restricted ")])):(M(),F("div",kF,[h("div",{class:Ce(["dot ms-0",{active:n.Peer.status==="running"}])},null,2),h("div",SF,[h("span",$F,[AF,h("strong",null,me((n.Peer.cumu_receive+n.Peer.total_receive).toFixed(4)),1),be(" GB ")]),h("span",CF,[EF,h("strong",null,me((n.Peer.cumu_sent+n.Peer.total_sent).toFixed(4)),1),be(" GB ")]),n.Peer.latest_handshake!=="No Handshake"?(M(),F("span",PF,[TF,be(" "+me(o.getLatestHandshake)+" ago ",1)])):re("",!0)])]))]),h("div",OF,[h("h6",null,me(n.Peer.name?n.Peer.name:"Untitled Peer"),1),h("div",IF,[RF,h("p",LF,[h("samp",null,me(n.Peer.id),1)])]),h("div",NF,[h("div",null,[FF,h("p",BF,[h("samp",null,me(n.Peer.allowed_ip),1)])]),h("div",{class:Ce(["ms-auto px-2 rounded-3 subMenuBtn",{active:this.subMenuOpened}])},[h("a",{role:"button",class:"text-body",onClick:e[0]||(e[0]=a=>this.subMenuOpened=!0)},HF),Se(At,{name:"slide-fade"},{default:Pe(()=>[this.subMenuOpened?(M(),Le(r,{key:0,onQrcode:e[1]||(e[1]=a=>this.$emit("qrcode",a)),onSetting:e[2]||(e[2]=a=>this.$emit("setting")),onJobs:e[3]||(e[3]=a=>this.$emit("jobs")),onRefresh:e[4]||(e[4]=a=>this.$emit("refresh")),onShare:e[5]||(e[5]=a=>this.$emit("share")),Peer:n.Peer,ref:"target"},null,8,["Peer"])):re("",!0)]),_:1})],2)])])],2)}const WF=We(xF,[["render",jF],["__scopeId","data-v-f311ec95"]]);/*!
|
|
|
|
* @kurkle/color v0.3.2
|
|
* https://github.com/kurkle/color#readme
|
|
* (c) 2023 Jukka Kurkela
|
|
* Released under the MIT License
|
|
|
|
*/function tl(t){return t+.5|0}const wi=(t,e,n)=>Math.max(Math.min(t,n),e);function ia(t){return wi(tl(t*2.55),0,255)}function Pi(t){return wi(tl(t*255),0,255)}function Ws(t){return wi(tl(t/2.55)/100,0,1)}function xm(t){return wi(tl(t*100),0,100)}const Yn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Kd=[..."0123456789ABCDEF"],zF=t=>Kd[t&15],YF=t=>Kd[(t&240)>>4]+Kd[t&15],Dl=t=>(t&240)>>4===(t&15),UF=t=>Dl(t.r)&&Dl(t.g)&&Dl(t.b)&&Dl(t.a);function KF(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Yn[t[1]]*17,g:255&Yn[t[2]]*17,b:255&Yn[t[3]]*17,a:e===5?Yn[t[4]]*17:255}:(e===7||e===9)&&(n={r:Yn[t[1]]<<4|Yn[t[2]],g:Yn[t[3]]<<4|Yn[t[4]],b:Yn[t[5]]<<4|Yn[t[6]],a:e===9?Yn[t[7]]<<4|Yn[t[8]]:255})),n}const qF=(t,e)=>t<255?e(t):"";function GF(t){var e=UF(t)?zF:YF;return t?"#"+e(t.r)+e(t.g)+e(t.b)+qF(t.a,e):void 0}const JF=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function i0(t,e,n){const s=e*Math.min(n,1-n),i=(o,r=(o+t/30)%12)=>n-s*Math.max(Math.min(r-3,9-r,1),-1);return[i(0),i(8),i(4)]}function XF(t,e,n){const s=(i,o=(i+t/60)%6)=>n-n*e*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function QF(t,e,n){const s=i0(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)s[i]*=1-e-n,s[i]+=e;return s}function ZF(t,e,n,s,i){return t===i?(e-n)/s+(e<n?6:0):e===i?(n-t)/s+2:(t-e)/s+4}function kf(t){const n=t.r/255,s=t.g/255,i=t.b/255,o=Math.max(n,s,i),r=Math.min(n,s,i),a=(o+r)/2;let l,c,u;return o!==r&&(u=o-r,c=a>.5?u/(2-o-r):u/(o+r),l=ZF(n,s,i,u,o),l=l*60+.5),[l|0,c||0,a]}function Sf(t,e,n,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,s)).map(Pi)}function $f(t,e,n){return Sf(i0,t,e,n)}function eB(t,e,n){return Sf(QF,t,e,n)}function tB(t,e,n){return Sf(XF,t,e,n)}function o0(t){return(t%360+360)%360}function nB(t){const e=JF.exec(t);let n=255,s;if(!e)return;e[5]!==s&&(n=e[6]?ia(+e[5]):Pi(+e[5]));const i=o0(+e[2]),o=+e[3]/100,r=+e[4]/100;return e[1]==="hwb"?s=eB(i,o,r):e[1]==="hsv"?s=tB(i,o,r):s=$f(i,o,r),{r:s[0],g:s[1],b:s[2],a:n}}function sB(t,e){var n=kf(t);n[0]=o0(n[0]+e),n=$f(n),t.r=n[0],t.g=n[1],t.b=n[2]}function iB(t){if(!t)return;const e=kf(t),n=e[0],s=xm(e[1]),i=xm(e[2]);return t.a<255?`hsla(${n}, ${s}%, ${i}%, ${Ws(t.a)})`:`hsl(${n}, ${s}%, ${i}%)`}const km={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Sm={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function oB(){const t={},e=Object.keys(Sm),n=Object.keys(km);let s,i,o,r,a;for(s=0;s<e.length;s++){for(r=a=e[s],i=0;i<n.length;i++)o=n[i],a=a.replace(o,km[o]);o=parseInt(Sm[r],16),t[a]=[o>>16&255,o>>8&255,o&255]}return t}let Ol;function rB(t){Ol||(Ol=oB(),Ol.transparent=[0,0,0,0]);const e=Ol[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const aB=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function lB(t){const e=aB.exec(t);let n=255,s,i,o;if(e){if(e[7]!==s){const r=+e[7];n=e[8]?ia(r):wi(r*255,0,255)}return s=+e[1],i=+e[3],o=+e[5],s=255&(e[2]?ia(s):wi(s,0,255)),i=255&(e[4]?ia(i):wi(i,0,255)),o=255&(e[6]?ia(o):wi(o,0,255)),{r:s,g:i,b:o,a:n}}}function cB(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ws(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const td=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Go=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function uB(t,e,n){const s=Go(Ws(t.r)),i=Go(Ws(t.g)),o=Go(Ws(t.b));return{r:Pi(td(s+n*(Go(Ws(e.r))-s))),g:Pi(td(i+n*(Go(Ws(e.g))-i))),b:Pi(td(o+n*(Go(Ws(e.b))-o))),a:t.a+n*(e.a-t.a)}}function Il(t,e,n){if(t){let s=kf(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*n,e===0?360:1)),s=$f(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function r0(t,e){return t&&Object.assign(e||{},t)}function $m(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Pi(t[3]))):(e=r0(t,{r:0,g:0,b:0,a:1}),e.a=Pi(e.a)),e}function dB(t){return t.charAt(0)==="r"?lB(t):nB(t)}class Fa{constructor(e){if(e instanceof Fa)return e;const n=typeof e;let s;n==="object"?s=$m(e):n==="string"&&(s=KF(e)||rB(e)||dB(e)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var e=r0(this._rgb);return e&&(e.a=Ws(e.a)),e}set rgb(e){this._rgb=$m(e)}rgbString(){return this._valid?cB(this._rgb):void 0}hexString(){return this._valid?GF(this._rgb):void 0}hslString(){return this._valid?iB(this._rgb):void 0}mix(e,n){if(e){const s=this.rgb,i=e.rgb;let o;const r=n===o?.5:n,a=2*r-1,l=s.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,s.r=255&c*s.r+o*i.r+.5,s.g=255&c*s.g+o*i.g+.5,s.b=255&c*s.b+o*i.b+.5,s.a=r*s.a+(1-r)*i.a,this.rgb=s}return this}interpolate(e,n){return e&&(this._rgb=uB(this._rgb,e._rgb,n)),this}clone(){return new Fa(this.rgb)}alpha(e){return this._rgb.a=Pi(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=tl(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Il(this._rgb,2,e),this}darken(e){return Il(this._rgb,2,-e),this}saturate(e){return Il(this._rgb,1,e),this}desaturate(e){return Il(this._rgb,1,-e),this}rotate(e){return sB(this._rgb,e),this}}/*!
|
|
|
|
* Chart.js v4.4.1
|
|
* https://www.chartjs.org
|
|
* (c) 2023 Chart.js Contributors
|
|
* Released under the MIT License
|
|
|
|
*/function Ns(){}const hB=(()=>{let t=0;return()=>t++})();function it(t){return t===null||typeof t>"u"}function vt(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function nt(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Ct(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Mn(t,e){return Ct(t)?t:e}function qe(t,e){return typeof t>"u"?e:t}const fB=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,a0=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ft(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function ct(t,e,n,s){let i,o,r;if(vt(t))if(o=t.length,s)for(i=o-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i<o;i++)e.call(n,t[i],i);else if(nt(t))for(r=Object.keys(t),o=r.length,i=0;i<o;i++)e.call(n,t[r[i]],r[i])}function bc(t,e){let n,s,i,o;if(!t||!e||t.length!==e.length)return!1;for(n=0,s=t.length;n<s;++n)if(i=t[n],o=e[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function yc(t){if(vt(t))return t.map(yc);if(nt(t)){const e=Object.create(null),n=Object.keys(t),s=n.length;let i=0;for(;i<s;++i)e[n[i]]=yc(t[n[i]]);return e}return t}function l0(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function pB(t,e,n,s){if(!l0(t))return;const i=e[t],o=n[t];nt(i)&&nt(o)?Ba(i,o,s):e[t]=yc(o)}function Ba(t,e,n){const s=vt(e)?e:[e],i=s.length;if(!nt(t))return t;n=n||{};const o=n.merger||pB;let r;for(let a=0;a<i;++a){if(r=s[a],!nt(r))continue;const l=Object.keys(r);for(let c=0,u=l.length;c<u;++c)o(l[c],t,r,n)}return t}function ya(t,e){return Ba(t,e,{merger:gB})}function gB(t,e,n){if(!l0(t))return;const s=e[t],i=n[t];nt(s)&&nt(i)?ya(s,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=yc(i))}const Am={"":t=>t,x:t=>t.x,y:t=>t.y};function mB(t){const e=t.split("."),n=[];let s="";for(const i of e)s+=i,s.endsWith("\\")?s=s.slice(0,-1)+".":(n.push(s),s="");return n}function _B(t){const e=mB(t);return n=>{for(const s of e){if(s==="")break;n=n&&n[s]}return n}}function Ii(t,e){return(Am[e]||(Am[e]=_B(e)))(t)}function Af(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Va=t=>typeof t<"u",Ri=t=>typeof t=="function",Cm=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function vB(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const yt=Math.PI,bt=2*yt,bB=bt+yt,wc=Number.POSITIVE_INFINITY,yB=yt/180,Rt=yt/2,io=yt/4,Em=yt*2/3,xi=Math.log10,As=Math.sign;function wa(t,e,n){return Math.abs(t-e)<n}function Pm(t){const e=Math.round(t);t=wa(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(xi(t))),s=t/n;return(s<=1?1:s<=2?2:s<=5?5:10)*n}function wB(t){const e=[],n=Math.sqrt(t);let s;for(s=1;s<n;s++)t%s===0&&(e.push(s),e.push(t/s));return n===(n|0)&&e.push(n),e.sort((i,o)=>i-o).pop(),e}function $r(t){return!isNaN(parseFloat(t))&&isFinite(t)}function xB(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function c0(t,e,n){let s,i,o;for(s=0,i=t.length;s<i;s++)o=t[s][n],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function rs(t){return t*(yt/180)}function Cf(t){return t*(180/yt)}function Tm(t){if(!Ct(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function u0(t,e){const n=e.x-t.x,s=e.y-t.y,i=Math.sqrt(n*n+s*s);let o=Math.atan2(s,n);return o<-.5*yt&&(o+=bt),{angle:o,distance:i}}function qd(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function kB(t,e){return(t-e+bB)%bt-yt}function On(t){return(t%bt+bt)%bt}function Ha(t,e,n,s){const i=On(t),o=On(e),r=On(n),a=On(o-i),l=On(r-i),c=On(i-o),u=On(i-r);return i===o||i===r||s&&o===r||a>l&&c<u}function Zt(t,e,n){return Math.max(e,Math.min(n,t))}function SB(t){return Zt(t,-32768,32767)}function Us(t,e,n,s=1e-6){return t>=Math.min(e,n)-s&&t<=Math.max(e,n)+s}function Ef(t,e,n){n=n||(r=>t[r]<e);let s=t.length-1,i=0,o;for(;s-i>1;)o=i+s>>1,n(o)?i=o:s=o;return{lo:i,hi:s}}const Ks=(t,e,n,s)=>Ef(t,n,s?i=>{const o=t[i][e];return o<n||o===n&&t[i+1][e]===n}:i=>t[i][e]<n),$B=(t,e,n)=>Ef(t,n,s=>t[s][e]>=n);function AB(t,e,n){let s=0,i=t.length;for(;s<i&&t[s]<e;)s++;for(;i>s&&t[i-1]>n;)i--;return s>0||i<t.length?t.slice(s,i):t}const d0=["push","pop","shift","splice","unshift"];function CB(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),d0.forEach(n=>{const s="_onData"+Af(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...o){const r=i.apply(this,o);return t._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function Mm(t,e){const n=t._chartjs;if(!n)return;const s=n.listeners,i=s.indexOf(e);i!==-1&&s.splice(i,1),!(s.length>0)&&(d0.forEach(o=>{delete t[o]}),delete t._chartjs)}function h0(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const f0=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function p0(t,e){let n=[],s=!1;return function(...i){n=i,s||(s=!0,f0.call(window,()=>{s=!1,t.apply(e,n)}))}}function EB(t,e){let n;return function(...s){return e?(clearTimeout(n),n=setTimeout(t,e,s)):t.apply(this,s),e}}const Pf=t=>t==="start"?"left":t==="end"?"right":"center",an=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,PB=(t,e,n,s)=>t===(s?"left":"right")?n:t==="center"?(e+n)/2:e;function g0(t,e,n){const s=e.length;let i=0,o=s;if(t._sorted){const{iScale:r,_parsed:a}=t,l=r.axis,{min:c,max:u,minDefined:d,maxDefined:f}=r.getUserBounds();d&&(i=Zt(Math.min(Ks(a,l,c).lo,n?s:Ks(e,l,r.getPixelForValue(c)).lo),0,s-1)),f?o=Zt(Math.max(Ks(a,r.axis,u,!0).hi+1,n?0:Ks(e,l,r.getPixelForValue(u),!0).hi+1),i,s)-i:o=s-i}return{start:i,count:o}}function m0(t){const{xScale:e,yScale:n,_scaleRanges:s}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!s)return t._scaleRanges=i,!0;const o=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==n.min||s.ymax!==n.max;return Object.assign(s,i),o}const Rl=t=>t===0||t===1,Dm=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*bt/n)),Om=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*bt/n)+1,xa={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Rt)+1,easeOutSine:t=>Math.sin(t*Rt),easeInOutSine:t=>-.5*(Math.cos(yt*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Rl(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Rl(t)?t:Dm(t,.075,.3),easeOutElastic:t=>Rl(t)?t:Om(t,.075,.3),easeInOutElastic(t){return Rl(t)?t:t<.5?.5*Dm(t*2,.1125,.45):.5+.5*Om(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-xa.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?xa.easeInBounce(t*2)*.5:xa.easeOutBounce(t*2-1)*.5+.5};function Tf(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Im(t){return Tf(t)?t:new Fa(t)}function nd(t){return Tf(t)?t:new Fa(t).saturate(.5).darken(.1).hexString()}const TB=["x","y","borderWidth","radius","tension"],MB=["color","borderColor","backgroundColor"];function DB(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:MB},numbers:{type:"number",properties:TB}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function OB(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Rm=new Map;function IB(t,e){e=e||{};const n=t+JSON.stringify(e);let s=Rm.get(n);return s||(s=new Intl.NumberFormat(t,e),Rm.set(n,s)),s}function nl(t,e,n){return IB(e,n).format(t)}const _0={values(t){return vt(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const s=this.chart.options.locale;let i,o=t;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=RB(t,n)}const r=xi(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),nl(t,s,l)},logarithmic(t,e,n){if(t===0)return"0";const s=n[e].significand||t/Math.pow(10,Math.floor(xi(t)));return[1,2,3,5,10,15].includes(s)||e>.8*n.length?_0.numeric.call(this,t,e,n):""}};function RB(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var nu={formatters:_0};function LB(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:nu.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Eo=Object.create(null),Gd=Object.create(null);function ka(t,e){if(!e)return t;const n=e.split(".");for(let s=0,i=n.length;s<i;++s){const o=n[s];t=t[o]||(t[o]=Object.create(null))}return t}function sd(t,e,n){return typeof e=="string"?Ba(ka(t,e),n):Ba(ka(t,""),e)}class NB{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=s=>s.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,i)=>nd(i.backgroundColor),this.hoverBorderColor=(s,i)=>nd(i.borderColor),this.hoverColor=(s,i)=>nd(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return sd(this,e,n)}get(e){return ka(this,e)}describe(e,n){return sd(Gd,e,n)}override(e,n){return sd(Eo,e,n)}route(e,n,s,i){const o=ka(this,e),r=ka(this,s),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=r[i];return nt(l)?Object.assign({},c,l):qe(l,c)},set(l){this[a]=l}}})}apply(e){e.forEach(n=>n(this))}}var Et=new NB({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[DB,OB,LB]);function FB(t){return!t||it(t.size)||it(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function xc(t,e,n,s,i){let o=e[i];return o||(o=e[i]=t.measureText(i).width,n.push(i)),o>s&&(s=o),s}function BB(t,e,n,s){s=s||{};let i=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==e&&(i=s.data={},o=s.garbageCollect=[],s.font=e),t.save(),t.font=e;let r=0;const a=n.length;let l,c,u,d,f;for(l=0;l<a;l++)if(d=n[l],d!=null&&!vt(d))r=xc(t,i,o,r,d);else if(vt(d))for(c=0,u=d.length;c<u;c++)f=d[c],f!=null&&!vt(f)&&(r=xc(t,i,o,r,f));t.restore();const g=o.length/2;if(g>n.length){for(l=0;l<g;l++)delete i[o[l]];o.splice(0,g)}return r}function oo(t,e,n){const s=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*s)/s+i}function Lm(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Jd(t,e,n,s){v0(t,e,n,s,null)}function v0(t,e,n,s,i){let o,r,a,l,c,u,d,f;const g=e.pointStyle,_=e.rotation,m=e.radius;let b=(_||0)*yB;if(g&&typeof g=="object"&&(o=g.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){t.save(),t.translate(n,s),t.rotate(b),t.drawImage(g,-g.width/2,-g.height/2,g.width,g.height),t.restore();return}if(!(isNaN(m)||m<=0)){switch(t.beginPath(),g){default:i?t.ellipse(n,s,i/2,m,0,0,bt):t.arc(n,s,m,0,bt),t.closePath();break;case"triangle":u=i?i/2:m,t.moveTo(n+Math.sin(b)*u,s-Math.cos(b)*m),b+=Em,t.lineTo(n+Math.sin(b)*u,s-Math.cos(b)*m),b+=Em,t.lineTo(n+Math.sin(b)*u,s-Math.cos(b)*m),t.closePath();break;case"rectRounded":c=m*.516,l=m-c,r=Math.cos(b+io)*l,d=Math.cos(b+io)*(i?i/2-c:l),a=Math.sin(b+io)*l,f=Math.sin(b+io)*(i?i/2-c:l),t.arc(n-d,s-a,c,b-yt,b-Rt),t.arc(n+f,s-r,c,b-Rt,b),t.arc(n+d,s+a,c,b,b+Rt),t.arc(n-f,s+r,c,b+Rt,b+yt),t.closePath();break;case"rect":if(!_){l=Math.SQRT1_2*m,u=i?i/2:l,t.rect(n-u,s-l,2*u,2*l);break}b+=io;case"rectRot":d=Math.cos(b)*(i?i/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,f=Math.sin(b)*(i?i/2:m),t.moveTo(n-d,s-a),t.lineTo(n+f,s-r),t.lineTo(n+d,s+a),t.lineTo(n-f,s+r),t.closePath();break;case"crossRot":b+=io;case"cross":d=Math.cos(b)*(i?i/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,f=Math.sin(b)*(i?i/2:m),t.moveTo(n-d,s-a),t.lineTo(n+d,s+a),t.moveTo(n+f,s-r),t.lineTo(n-f,s+r);break;case"star":d=Math.cos(b)*(i?i/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,f=Math.sin(b)*(i?i/2:m),t.moveTo(n-d,s-a),t.lineTo(n+d,s+a),t.moveTo(n+f,s-r),t.lineTo(n-f,s+r),b+=io,d=Math.cos(b)*(i?i/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,f=Math.sin(b)*(i?i/2:m),t.moveTo(n-d,s-a),t.lineTo(n+d,s+a),t.moveTo(n+f,s-r),t.lineTo(n-f,s+r);break;case"line":r=i?i/2:Math.cos(b)*m,a=Math.sin(b)*m,t.moveTo(n-r,s-a),t.lineTo(n+r,s+a);break;case"dash":t.moveTo(n,s),t.lineTo(n+Math.cos(b)*(i?i/2:m),s+Math.sin(b)*m);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function qs(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function su(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function iu(t){t.restore()}function VB(t,e,n,s,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const o=(e.x+n.x)/2;t.lineTo(o,e.y),t.lineTo(o,n.y)}else i==="after"!=!!s?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function HB(t,e,n,s){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?n.cp2x:n.cp1x,s?n.cp2y:n.cp1y,n.x,n.y)}function jB(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),it(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function WB(t,e,n,s,i){if(i.strikethrough||i.underline){const o=t.measureText(s),r=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(r,u),t.lineTo(a,u),t.stroke()}}function zB(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Po(t,e,n,s,i,o={}){const r=vt(e)?e:[e],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(t.save(),t.font=i.string,jB(t,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&zB(t,o.backdrop),a&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),it(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(c,n,s,o.maxWidth)),t.fillText(c,n,s,o.maxWidth),WB(t,n,s,c,o),s+=Number(i.lineHeight);t.restore()}function ja(t,e){const{x:n,y:s,w:i,h:o,radius:r}=e;t.arc(n+r.topLeft,s+r.topLeft,r.topLeft,1.5*yt,yt,!0),t.lineTo(n,s+o-r.bottomLeft),t.arc(n+r.bottomLeft,s+o-r.bottomLeft,r.bottomLeft,yt,Rt,!0),t.lineTo(n+i-r.bottomRight,s+o),t.arc(n+i-r.bottomRight,s+o-r.bottomRight,r.bottomRight,Rt,0,!0),t.lineTo(n+i,s+r.topRight),t.arc(n+i-r.topRight,s+r.topRight,r.topRight,0,-Rt,!0),t.lineTo(n+r.topLeft,s)}const YB=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,UB=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function KB(t,e){const n=(""+t).match(YB);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const qB=t=>+t||0;function Mf(t,e){const n={},s=nt(e),i=s?Object.keys(e):e,o=nt(t)?s?r=>qe(t[r],t[e[r]]):r=>t[r]:()=>t;for(const r of i)n[r]=qB(o(r));return n}function b0(t){return Mf(t,{top:"y",right:"x",bottom:"y",left:"x"})}function xo(t){return Mf(t,["topLeft","topRight","bottomLeft","bottomRight"])}function hn(t){const e=b0(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Yt(t,e){t=t||{},e=e||Et.font;let n=qe(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let s=qe(t.style,e.style);s&&!(""+s).match(UB)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const i={family:qe(t.family,e.family),lineHeight:KB(qe(t.lineHeight,e.lineHeight),n),size:n,style:s,weight:qe(t.weight,e.weight),string:""};return i.string=FB(i),i}function oa(t,e,n,s){let i=!0,o,r,a;for(o=0,r=t.length;o<r;++o)if(a=t[o],a!==void 0&&(e!==void 0&&typeof a=="function"&&(a=a(e),i=!1),n!==void 0&&vt(a)&&(a=a[n%a.length],i=!1),a!==void 0))return s&&!i&&(s.cacheable=!1),a}function GB(t,e,n){const{min:s,max:i}=t,o=a0(e,(i-s)/2),r=(a,l)=>n&&a===0?0:a+l;return{min:r(s,-Math.abs(o)),max:r(i,o)}}function Wi(t,e){return Object.assign(Object.create(t),e)}function Df(t,e=[""],n,s,i=()=>t[0]){const o=n||t;typeof s>"u"&&(s=k0("_fallback",t));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:s,_getTarget:i,override:a=>Df([a,...t],e,o,s)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete t[0][l],!0},get(a,l){return w0(a,l,()=>s4(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return Fm(a).includes(l)},ownKeys(a){return Fm(a)},set(a,l,c){const u=a._storage||(a._storage=i());return a[l]=u[l]=c,delete a._keys,!0}})}function Ar(t,e,n,s){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:y0(t,s),setContext:o=>Ar(t,o,n,s),override:o=>Ar(t.override(o),e,n,s)};return new Proxy(i,{deleteProperty(o,r){return delete o[r],delete t[r],!0},get(o,r,a){return w0(o,r,()=>XB(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(t,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,r)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(o,r){return Reflect.has(t,r)},ownKeys(){return Reflect.ownKeys(t)},set(o,r,a){return t[r]=a,delete o[r],!0}})}function y0(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:s=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:s,isScriptable:Ri(n)?n:()=>n,isIndexable:Ri(s)?s:()=>s}}const JB=(t,e)=>t?t+Af(e):e,Of=(t,e)=>nt(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function w0(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const s=n();return t[e]=s,s}function XB(t,e,n){const{_proxy:s,_context:i,_subProxy:o,_descriptors:r}=t;let a=s[e];return Ri(a)&&r.isScriptable(e)&&(a=QB(e,a,t,n)),vt(a)&&a.length&&(a=ZB(e,a,t,r.isIndexable)),Of(e,a)&&(a=Ar(a,i,o&&o[e],r)),a}function QB(t,e,n,s){const{_proxy:i,_context:o,_subProxy:r,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(o,r||s);return a.delete(t),Of(t,l)&&(l=If(i._scopes,i,t,l)),l}function ZB(t,e,n,s){const{_proxy:i,_context:o,_subProxy:r,_descriptors:a}=n;if(typeof o.index<"u"&&s(t))return e[o.index%e.length];if(nt(e[0])){const l=e,c=i._scopes.filter(u=>u!==l);e=[];for(const u of l){const d=If(c,i,t,u);e.push(Ar(d,o,r&&r[t],a))}}return e}function x0(t,e,n){return Ri(t)?t(e,n):t}const e4=(t,e)=>t===!0?e:typeof t=="string"?Ii(e,t):void 0;function t4(t,e,n,s,i){for(const o of e){const r=e4(n,o);if(r){t.add(r);const a=x0(r._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==s)return a}else if(r===!1&&typeof s<"u"&&n!==s)return null}return!1}function If(t,e,n,s){const i=e._rootScopes,o=x0(e._fallback,n,s),r=[...t,...i],a=new Set;a.add(s);let l=Nm(a,r,n,o||n,s);return l===null||typeof o<"u"&&o!==n&&(l=Nm(a,r,o,l,s),l===null)?!1:Df(Array.from(a),[""],i,o,()=>n4(e,n,s))}function Nm(t,e,n,s,i){for(;n;)n=t4(t,e,n,s,i);return n}function n4(t,e,n){const s=t._getTarget();e in s||(s[e]={});const i=s[e];return vt(i)&&nt(n)?n:i||{}}function s4(t,e,n,s){let i;for(const o of e)if(i=k0(JB(o,t),n),typeof i<"u")return Of(t,i)?If(n,s,t,i):i}function k0(t,e){for(const n of e){if(!n)continue;const s=n[t];if(typeof s<"u")return s}}function Fm(t){let e=t._keys;return e||(e=t._keys=i4(t._scopes)),e}function i4(t){const e=new Set;for(const n of t)for(const s of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(s);return Array.from(e)}function S0(t,e,n,s){const{iScale:i}=t,{key:o="r"}=this._parsing,r=new Array(s);let a,l,c,u;for(a=0,l=s;a<l;++a)c=a+n,u=e[c],r[a]={r:i.parse(Ii(u,o),c)};return r}const o4=Number.EPSILON||1e-14,Cr=(t,e)=>e<t.length&&!t[e].skip&&t[e],$0=t=>t==="x"?"y":"x";function r4(t,e,n,s){const i=t.skip?e:t,o=e,r=n.skip?e:n,a=qd(o,i),l=qd(r,o);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=s*c,f=s*u;return{previous:{x:o.x-d*(r.x-i.x),y:o.y-d*(r.y-i.y)},next:{x:o.x+f*(r.x-i.x),y:o.y+f*(r.y-i.y)}}}function a4(t,e,n){const s=t.length;let i,o,r,a,l,c=Cr(t,0);for(let u=0;u<s-1;++u)if(l=c,c=Cr(t,u+1),!(!l||!c)){if(wa(e[u],0,o4)){n[u]=n[u+1]=0;continue}i=n[u]/e[u],o=n[u+1]/e[u],a=Math.pow(i,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),n[u]=i*r*e[u],n[u+1]=o*r*e[u])}}function l4(t,e,n="x"){const s=$0(n),i=t.length;let o,r,a,l=Cr(t,0);for(let c=0;c<i;++c){if(r=a,a=l,l=Cr(t,c+1),!a)continue;const u=a[n],d=a[s];r&&(o=(u-r[n])/3,a[`cp1${n}`]=u-o,a[`cp1${s}`]=d-o*e[c]),l&&(o=(l[n]-u)/3,a[`cp2${n}`]=u+o,a[`cp2${s}`]=d+o*e[c])}}function c4(t,e="x"){const n=$0(e),s=t.length,i=Array(s).fill(0),o=Array(s);let r,a,l,c=Cr(t,0);for(r=0;r<s;++r)if(a=l,l=c,c=Cr(t,r+1),!!l){if(c){const u=c[e]-l[e];i[r]=u!==0?(c[n]-l[n])/u:0}o[r]=a?c?As(i[r-1])!==As(i[r])?0:(i[r-1]+i[r])/2:i[r-1]:i[r]}a4(t,i,o),l4(t,o,e)}function Ll(t,e,n){return Math.max(Math.min(t,n),e)}function u4(t,e){let n,s,i,o,r,a=qs(t[0],e);for(n=0,s=t.length;n<s;++n)r=o,o=a,a=n<s-1&&qs(t[n+1],e),o&&(i=t[n],r&&(i.cp1x=Ll(i.cp1x,e.left,e.right),i.cp1y=Ll(i.cp1y,e.top,e.bottom)),a&&(i.cp2x=Ll(i.cp2x,e.left,e.right),i.cp2y=Ll(i.cp2y,e.top,e.bottom)))}function d4(t,e,n,s,i){let o,r,a,l;if(e.spanGaps&&(t=t.filter(c=>!c.skip)),e.cubicInterpolationMode==="monotone")c4(t,i);else{let c=s?t[t.length-1]:t[0];for(o=0,r=t.length;o<r;++o)a=t[o],l=r4(c,a,t[Math.min(o+1,r-(s?0:1))%r],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}e.capBezierPoints&&u4(t,n)}function Rf(){return typeof window<"u"&&typeof document<"u"}function Lf(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function kc(t,e,n){let s;return typeof t=="string"?(s=parseInt(t,10),t.indexOf("%")!==-1&&(s=s/100*e.parentNode[n])):s=t,s}const ou=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function h4(t,e){return ou(t).getPropertyValue(e)}const f4=["top","right","bottom","left"];function ko(t,e,n){const s={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=f4[i];s[o]=parseFloat(t[e+"-"+o+n])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const p4=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function g4(t,e){const n=t.touches,s=n&&n.length?n[0]:t,{offsetX:i,offsetY:o}=s;let r=!1,a,l;if(p4(i,o,t.target))a=i,l=o;else{const c=e.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function uo(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:s}=e,i=ou(n),o=i.boxSizing==="border-box",r=ko(i,"padding"),a=ko(i,"border","width"),{x:l,y:c,box:u}=g4(t,n),d=r.left+(u&&a.left),f=r.top+(u&&a.top);let{width:g,height:_}=e;return o&&(g-=r.width+a.width,_-=r.height+a.height),{x:Math.round((l-d)/g*n.width/s),y:Math.round((c-f)/_*n.height/s)}}function m4(t,e,n){let s,i;if(e===void 0||n===void 0){const o=Lf(t);if(!o)e=t.clientWidth,n=t.clientHeight;else{const r=o.getBoundingClientRect(),a=ou(o),l=ko(a,"border","width"),c=ko(a,"padding");e=r.width-c.width-l.width,n=r.height-c.height-l.height,s=kc(a.maxWidth,o,"clientWidth"),i=kc(a.maxHeight,o,"clientHeight")}}return{width:e,height:n,maxWidth:s||wc,maxHeight:i||wc}}const Nl=t=>Math.round(t*10)/10;function _4(t,e,n,s){const i=ou(t),o=ko(i,"margin"),r=kc(i.maxWidth,t,"clientWidth")||wc,a=kc(i.maxHeight,t,"clientHeight")||wc,l=m4(t,e,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=ko(i,"border","width"),g=ko(i,"padding");c-=g.width+f.width,u-=g.height+f.height}return c=Math.max(0,c-o.width),u=Math.max(0,s?c/s:u-o.height),c=Nl(Math.min(c,r,l.maxWidth)),u=Nl(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Nl(c/2)),(e!==void 0||n!==void 0)&&s&&l.height&&u>l.height&&(u=l.height,c=Nl(Math.floor(u*s))),{width:c,height:u}}function Bm(t,e,n){const s=e||1,i=Math.floor(t.height*s),o=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const r=t.canvas;return r.style&&(n||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),t.currentDevicePixelRatio!==s||r.height!==i||r.width!==o?(t.currentDevicePixelRatio=s,r.height=i,r.width=o,t.ctx.setTransform(s,0,0,s,0,0),!0):!1}const v4=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Rf()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function Vm(t,e){const n=h4(t,e),s=n&&n.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function ho(t,e,n,s){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function b4(t,e,n,s){return{x:t.x+n*(e.x-t.x),y:s==="middle"?n<.5?t.y:e.y:s==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function y4(t,e,n,s){const i={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},r=ho(t,i,n),a=ho(i,o,n),l=ho(o,e,n),c=ho(r,a,n),u=ho(a,l,n);return ho(c,u,n)}const w4=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,s){return n-s},leftForLtr(n,s){return n-s}}},x4=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ar(t,e,n){return t?w4(e,n):x4()}function A0(t,e){let n,s;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,s=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=s)}function C0(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function E0(t){return t==="angle"?{between:Ha,compare:kB,normalize:On}:{between:Us,compare:(e,n)=>e-n,normalize:e=>e}}function Hm({start:t,end:e,count:n,loop:s,style:i}){return{start:t%n,end:e%n,loop:s&&(e-t+1)%n===0,style:i}}function k4(t,e,n){const{property:s,start:i,end:o}=n,{between:r,normalize:a}=E0(s),l=e.length;let{start:c,end:u,loop:d}=t,f,g;if(d){for(c+=l,u+=l,f=0,g=l;f<g&&r(a(e[c%l][s]),i,o);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:t.style}}function P0(t,e,n){if(!n)return[t];const{property:s,start:i,end:o}=n,r=e.length,{compare:a,between:l,normalize:c}=E0(s),{start:u,end:d,loop:f,style:g}=k4(t,e,n),_=[];let m=!1,b=null,w,$,A;const D=()=>l(i,A,w)&&a(i,A)!==0,x=()=>a(o,w)===0||l(o,A,w),y=()=>m||D(),S=()=>!m||x();for(let E=u,T=u;E<=d;++E)$=e[E%r],!$.skip&&(w=c($[s]),w!==A&&(m=l(w,i,o),b===null&&y()&&(b=a(w,i)===0?E:T),b!==null&&S()&&(_.push(Hm({start:b,end:E,loop:f,count:r,style:g})),b=null),T=E,A=w));return b!==null&&_.push(Hm({start:b,end:d,loop:f,count:r,style:g})),_}function T0(t,e){const n=[],s=t.segments;for(let i=0;i<s.length;i++){const o=P0(s[i],t.points,e);o.length&&n.push(...o)}return n}function S4(t,e,n,s){let i=0,o=e-1;if(n&&!s)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(o+=i);o>i&&t[o%e].skip;)o--;return o%=e,{start:i,end:o}}function $4(t,e,n,s){const i=t.length,o=[];let r=e,a=t[e],l;for(l=e+1;l<=n;++l){const c=t[l%i];c.skip||c.stop?a.skip||(s=!1,o.push({start:e%i,end:(l-1)%i,loop:s}),e=r=c.stop?l:null):(r=l,a.skip&&(e=l)),a=c}return r!==null&&o.push({start:e%i,end:r%i,loop:s}),o}function A4(t,e){const n=t.points,s=t.options.spanGaps,i=n.length;if(!i)return[];const o=!!t._loop,{start:r,end:a}=S4(n,i,o,s);if(s===!0)return jm(t,[{start:r,end:a,loop:o}],n,e);const l=a<r?a+i:a,c=!!t._fullLoop&&r===0&&a===i-1;return jm(t,$4(n,r,l,c),n,e)}function jm(t,e,n,s){return!s||!s.setContext||!n?e:C4(t,e,n,s)}function C4(t,e,n,s){const i=t._chart.getContext(),o=Wm(t.options),{_datasetIndex:r,options:{spanGaps:a}}=t,l=n.length,c=[];let u=o,d=e[0].start,f=d;function g(_,m,b,w){const $=a?-1:1;if(_!==m){for(_+=l;n[_%l].skip;)_-=$;for(;n[m%l].skip;)m+=$;_%l!==m%l&&(c.push({start:_%l,end:m%l,loop:b,style:w}),u=w,d=m%l)}}for(const _ of e){d=a?d:_.start;let m=n[d%l],b;for(f=d+1;f<=_.end;f++){const w=n[f%l];b=Wm(s.setContext(Wi(i,{type:"segment",p0:m,p1:w,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:r}))),E4(b,u)&&g(d,f-1,_.loop,u),m=w,u=b}d<f-1&&g(d,f-1,_.loop,u)}return c}function Wm(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function E4(t,e){if(!e)return!1;const n=[],s=function(i,o){return Tf(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(t,s)!==JSON.stringify(e,s)}/*!
|
|
|
|
* Chart.js v4.4.1
|
|
* https://www.chartjs.org
|
|
* (c) 2023 Chart.js Contributors
|
|
* Released under the MIT License
|
|
|
|
*/class P4{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,s,i){const o=n.listeners[i],r=n.duration;o.forEach(a=>a({chart:e,initial:n.initial,numSteps:r,currentStep:Math.min(s-n.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=f0.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((s,i)=>{if(!s.running||!s.items.length)return;const o=s.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(e),a=!0):(o[r]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,s,e,"progress")),o.length||(s.running=!1,this._notify(i,s,e,"complete"),s.initial=!1),n+=o.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let s=n.get(e);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,s)),s}listen(e,n,s){this._getAnims(e).listeners[n].push(s)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((s,i)=>Math.max(s,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const s=n.items;let i=s.length-1;for(;i>=0;--i)s[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Bs=new P4;const zm="transparent",T4={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const s=Im(t||zm),i=s.valid&&Im(e||zm);return i&&i.valid?i.mix(s,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class M4{constructor(e,n,s,i){const o=n[s];i=oa([e.to,i,o,e.from]);const r=oa([e.from,o,i]);this._active=!0,this._fn=e.fn||T4[e.type||typeof r],this._easing=xa[e.easing]||xa.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=s,this._from=r,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,s){if(this._active){this._notify(!1);const i=this._target[this._prop],o=s-this._start,r=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(r,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=oa([e.to,n,i,e.from]),this._from=oa([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,s=this._duration,i=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||n<s),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=o;return}l=n/s%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,s)=>{e.push({res:n,rej:s})})}_notify(e){const n=e?"res":"rej",s=this._promises||[];for(let i=0;i<s.length;i++)s[i][n]()}}class M0{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!nt(e))return;const n=Object.keys(Et.animation),s=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const o=e[i];if(!nt(o))return;const r={};for(const a of n)r[a]=o[a];(vt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!s.has(a))&&s.set(a,r)})})}_animateOptions(e,n){const s=n.options,i=O4(e,s);if(!i)return[];const o=this._createAnimations(i,s);return s.$shared&&D4(e.options.$animations,s).then(()=>{e.options=s},()=>{}),o}_createAnimations(e,n){const s=this._properties,i=[],o=e.$animations||(e.$animations={}),r=Object.keys(n),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(e,n));continue}const u=n[c];let d=o[c];const f=s.get(c);if(d)if(f&&d.active()){d.update(f,u,a);continue}else d.cancel();if(!f||!f.duration){e[c]=u;continue}o[c]=d=new M4(f,e,c,u),i.push(d)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const s=this._createAnimations(e,n);if(s.length)return Bs.add(this._chart,s),!0}}function D4(t,e){const n=[],s=Object.keys(e);for(let i=0;i<s.length;i++){const o=t[s[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function O4(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Ym(t,e){const n=t&&t.options||{},s=n.reverse,i=n.min===void 0?e:0,o=n.max===void 0?e:0;return{start:s?o:i,end:s?i:o}}function I4(t,e,n){if(n===!1)return!1;const s=Ym(t,n),i=Ym(e,n);return{top:i.end,right:s.end,bottom:i.start,left:s.start}}function R4(t){let e,n,s,i;return nt(t)?(e=t.top,n=t.right,s=t.bottom,i=t.left):e=n=s=i=t,{top:e,right:n,bottom:s,left:i,disabled:t===!1}}function D0(t,e){const n=[],s=t._getSortedDatasetMetas(e);let i,o;for(i=0,o=s.length;i<o;++i)n.push(s[i].index);return n}function Um(t,e,n,s={}){const i=t.keys,o=s.mode==="single";let r,a,l,c;if(e!==null){for(r=0,a=i.length;r<a;++r){if(l=+i[r],l===n){if(s.all)continue;break}c=t.values[l],Ct(c)&&(o||e===0||As(e)===As(c))&&(e+=c)}return e}}function L4(t){const e=Object.keys(t),n=new Array(e.length);let s,i,o;for(s=0,i=e.length;s<i;++s)o=e[s],n[s]={x:o,y:t[o]};return n}function Km(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function N4(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function F4(t){const{min:e,max:n,minDefined:s,maxDefined:i}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function B4(t,e,n){const s=t[e]||(t[e]={});return s[n]||(s[n]={})}function qm(t,e,n,s){for(const i of e.getMatchingVisibleMetas(s).reverse()){const o=t[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function Gm(t,e){const{chart:n,_cachedMeta:s}=t,i=n._stacks||(n._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,c=r.axis,u=N4(o,r,s),d=e.length;let f;for(let g=0;g<d;++g){const _=e[g],{[l]:m,[c]:b}=_,w=_._stacks||(_._stacks={});f=w[c]=B4(i,u,m),f[a]=b,f._top=qm(f,r,!0,s.type),f._bottom=qm(f,r,!1,s.type);const $=f._visualValues||(f._visualValues={});$[a]=b}}function id(t,e){const n=t.scales;return Object.keys(n).filter(s=>n[s].axis===e).shift()}function V4(t,e){return Wi(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function H4(t,e,n){return Wi(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Xr(t,e){const n=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const i of e){const o=i._stacks;if(!o||o[s]===void 0||o[s][n]===void 0)return;delete o[s][n],o[s]._visualValues!==void 0&&o[s]._visualValues[n]!==void 0&&delete o[s]._visualValues[n]}}}const od=t=>t==="reset"||t==="none",Jm=(t,e)=>e?t:Object.assign({},t),j4=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:D0(n,!0),values:null};class zi{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Km(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Xr(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,s=this.getDataset(),i=(d,f,g,_)=>d==="x"?f:d==="r"?_:g,o=n.xAxisID=qe(s.xAxisID,id(e,"x")),r=n.yAxisID=qe(s.yAxisID,id(e,"y")),a=n.rAxisID=qe(s.rAxisID,id(e,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,r,a),u=n.vAxisID=i(l,r,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(r),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Mm(this._data,this),e._stacked&&Xr(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),s=this._data;if(nt(n))this._data=L4(n);else if(s!==n){if(s){Mm(s,this);const i=this._cachedMeta;Xr(i),i._parsed=[]}n&&Object.isExtensible(n)&&CB(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,s=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=Km(n.vScale,n),n.stack!==s.stack&&(i=!0,Xr(n),n.stack=s.stack),this._resyncElements(e),(i||o!==n._stacked)&&Gm(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),s=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:s,_data:i}=this,{iScale:o,_stacked:r}=s,a=o.axis;let l=e===0&&n===i.length?!0:s._sorted,c=e>0&&s._parsed[e-1],u,d,f;if(this._parsing===!1)s._parsed=i,s._sorted=!0,f=i;else{vt(i[e])?f=this.parseArrayData(s,i,e,n):nt(i[e])?f=this.parseObjectData(s,i,e,n):f=this.parsePrimitiveData(s,i,e,n);const g=()=>d[a]===null||c&&d[a]<c[a];for(u=0;u<n;++u)s._parsed[u+e]=d=f[u],l&&(g()&&(l=!1),c=d);s._sorted=l}r&&Gm(this,f)}parsePrimitiveData(e,n,s,i){const{iScale:o,vScale:r}=e,a=o.axis,l=r.axis,c=o.getLabels(),u=o===r,d=new Array(i);let f,g,_;for(f=0,g=i;f<g;++f)_=f+s,d[f]={[a]:u||o.parse(c[_],_),[l]:r.parse(n[_],_)};return d}parseArrayData(e,n,s,i){const{xScale:o,yScale:r}=e,a=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+s,d=n[u],a[l]={x:o.parse(d[0],u),y:r.parse(d[1],u)};return a}parseObjectData(e,n,s,i){const{xScale:o,yScale:r}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,g;for(u=0,d=i;u<d;++u)f=u+s,g=n[f],c[u]={x:o.parse(Ii(g,a),f),y:r.parse(Ii(g,l),f)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,s){const i=this.chart,o=this._cachedMeta,r=n[e.axis],a={keys:D0(i,!0),values:n._stacks[e.axis]._visualValues};return Um(a,r,o.index,{mode:s})}updateRangeFromParsed(e,n,s,i){const o=s[n.axis];let r=o===null?NaN:o;const a=i&&s._stacks[n.axis];i&&a&&(i.values=a,r=Um(i,o,this._cachedMeta.index)),e.min=Math.min(e.min,r),e.max=Math.max(e.max,r)}getMinMax(e,n){const s=this._cachedMeta,i=s._parsed,o=s._sorted&&e===s.iScale,r=i.length,a=this._getOtherScale(e),l=j4(n,s,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=F4(a);let f,g;function _(){g=i[f];const m=g[a.axis];return!Ct(g[e.axis])||u>m||d<m}for(f=0;f<r&&!(!_()&&(this.updateRangeFromParsed(c,e,g,l),o));++f);if(o){for(f=r-1;f>=0;--f)if(!_()){this.updateRangeFromParsed(c,e,g,l);break}}return c}getAllParsedValues(e){const n=this._cachedMeta._parsed,s=[];let i,o,r;for(i=0,o=n.length;i<o;++i)r=n[i][e.axis],Ct(r)&&s.push(r);return s}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,s=n.iScale,i=n.vScale,o=this.getParsed(e);return{label:s?""+s.getLabelForValue(o[s.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=R4(qe(this.options.clip,I4(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,s=this._cachedMeta,i=s.data||[],o=n.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(s.dataset&&s.dataset.draw(e,o,a,l),u=a;u<a+l;++u){const d=i[u];d.hidden||(d.active&&c?r.push(d):d.draw(e,o))}for(u=0;u<r.length;++u)r[u].draw(e,o)}getStyle(e,n){const s=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(e||0,s)}getContext(e,n,s){const i=this.getDataset();let o;if(e>=0&&e<this._cachedMeta.data.length){const r=this._cachedMeta.data[e];o=r.$context||(r.$context=H4(this.getContext(),e,r)),o.parsed=this.getParsed(e),o.raw=i.data[e],o.index=o.dataIndex=e}else o=this.$context||(this.$context=V4(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=s,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",s){const i=n==="active",o=this._cachedDataOpts,r=e+"-"+n,a=o[r],l=this.enableOptionSharing&&Va(s);if(a)return Jm(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,e),d=i?[`${e}Hover`,"hover",e,""]:[e,""],f=c.getOptionScopes(this.getDataset(),u),g=Object.keys(Et.elements[e]),_=()=>this.getContext(s,i,n),m=c.resolveNamedOptions(f,g,_,d);return m.$shared&&(m.$shared=l,o[r]=Object.freeze(Jm(m,l))),m}_resolveAnimations(e,n,s){const i=this.chart,o=this._cachedDataOpts,r=`animation-${n}`,a=o[r];if(a)return a;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(e,s,n))}const c=new M0(i,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||od(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const s=this.resolveDataElementOptions(e,n),i=this._sharedOptions,o=this.getSharedOptions(s),r=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,s),{sharedOptions:o,includeOptions:r}}updateElement(e,n,s,i){od(i)?Object.assign(e,s):this._resolveAnimations(n,i).update(e,s)}updateSharedOptions(e,n,s){e&&!od(n)&&this._resolveAnimations(void 0,n).update(e,s)}_setStyle(e,n,s,i){e.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,s,i).update(e,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(e,n,s){this._setStyle(e,s,"active",!1)}setHoverStyle(e,n,s){this._setStyle(e,s,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,s=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=s.length,o=n.length,r=Math.min(o,i);r&&this.parse(0,r),o>i?this._insertElements(i,o-i,e):o<i&&this._removeElements(o,i-o)}_insertElements(e,n,s=!0){const i=this._cachedMeta,o=i.data,r=e+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=r;a--)c[a]=c[a-n]};for(l(o),a=e;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(e,n),s&&this.updateElements(o,e,n,"reset")}updateElements(e,n,s,i){}_removeElements(e,n){const s=this._cachedMeta;if(this._parsing){const i=s._parsed.splice(e,n);s._stacked&&Xr(s,i)}s.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,s,i]=e;this[n](s,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const s=arguments.length-2;s&&this._sync(["_insertElements",e,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function W4(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let s=[];for(let i=0,o=n.length;i<o;i++)s=s.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=h0(s.sort((i,o)=>i-o))}return t._cache.$bar}function z4(t){const e=t.iScale,n=W4(e,t.type);let s=e._length,i,o,r,a;const l=()=>{r===32767||r===-32768||(Va(a)&&(s=Math.min(s,Math.abs(r-a)||s)),a=r)};for(i=0,o=n.length;i<o;++i)r=e.getPixelForValue(n[i]),l();for(a=void 0,i=0,o=e.ticks.length;i<o;++i)r=e.getPixelForTick(i),l();return s}function Y4(t,e,n,s){const i=n.barThickness;let o,r;return it(i)?(o=e.min*n.categoryPercentage,r=n.barPercentage):(o=i*s,r=1),{chunk:o/s,ratio:r,start:e.pixels[t]-o/2}}function U4(t,e,n,s){const i=e.pixels,o=i[t];let r=t>0?i[t-1]:null,a=t<i.length-1?i[t+1]:null;const l=n.categoryPercentage;r===null&&(r=o-(a===null?e.end-e.start:a-o)),a===null&&(a=o+o-r);const c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/s,ratio:n.barPercentage,start:c}}function K4(t,e,n,s){const i=n.parse(t[0],s),o=n.parse(t[1],s),r=Math.min(i,o),a=Math.max(i,o);let l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:i,end:o,min:r,max:a}}function O0(t,e,n,s){return vt(t)?K4(t,e,n,s):e[n.axis]=n.parse(t,s),e}function Xm(t,e,n,s){const i=t.iScale,o=t.vScale,r=i.getLabels(),a=i===o,l=[];let c,u,d,f;for(c=n,u=n+s;c<u;++c)f=e[c],d={},d[i.axis]=a||i.parse(r[c],c),l.push(O0(f,d,o,c));return l}function rd(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function q4(t,e,n){return t!==0?As(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function G4(t){let e,n,s,i,o;return t.horizontal?(e=t.base>t.x,n="left",s="right"):(e=t.base<t.y,n="bottom",s="top"),e?(i="end",o="start"):(i="start",o="end"),{start:n,end:s,reverse:e,top:i,bottom:o}}function J4(t,e,n,s){let i=e.borderSkipped;const o={};if(!i){t.borderSkipped=o;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:a,reverse:l,top:c,bottom:u}=G4(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===s?i=c:(n._bottom||0)===s?i=u:(o[Qm(u,r,a,l)]=!0,i=c)),o[Qm(i,r,a,l)]=!0,t.borderSkipped=o}function Qm(t,e,n,s){return s?(t=X4(t,e,n),t=Zm(t,n,e)):t=Zm(t,e,n),t}function X4(t,e,n){return t===e?n:t===n?e:t}function Zm(t,e,n){return t==="start"?e:t==="end"?n:t}function Q4(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class I0 extends zi{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,n,s,i){return Xm(e,n,s,i)}parseArrayData(e,n,s,i){return Xm(e,n,s,i)}parseObjectData(e,n,s,i){const{iScale:o,vScale:r}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,u=r.axis==="x"?a:l,d=[];let f,g,_,m;for(f=s,g=s+i;f<g;++f)m=n[f],_={},_[o.axis]=o.parse(Ii(m,c),f),d.push(O0(Ii(m,u),_,r,f));return d}updateRangeFromParsed(e,n,s,i){super.updateRangeFromParsed(e,n,s,i);const o=s._custom;o&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:s,vScale:i}=n,o=this.getParsed(e),r=o._custom,a=rd(r)?"["+r.start+", "+r.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+s.getLabelForValue(o[s.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,s,i){const o=i==="reset",{index:r,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i);for(let g=n;g<n+s;g++){const _=this.getParsed(g),m=o||it(_[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(g),b=this._calculateBarIndexPixels(g,u),w=(_._stacks||{})[a.axis],$={horizontal:c,base:m.base,enableBorderRadius:!w||rd(_._custom)||r===w._top||r===w._bottom,x:c?m.head:b.center,y:c?b.center:m.head,height:c?b.size:Math.abs(m.size),width:c?Math.abs(m.size):b.size};f&&($.options=d||this.resolveDataElementOptions(g,e[g].active?"active":i));const A=$.options||e[g].options;J4($,A,w,r),Q4($,A,u.ratio),this.updateElement(e[g],g,$,i)}}_getStacks(e,n){const{iScale:s}=this._cachedMeta,i=s.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=s.options.stacked,r=[],a=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(it(u)||isNaN(u))return!0};for(const l of i)if(!(n!==void 0&&a(l))&&((o===!1||r.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&r.push(l.stack),l.index===e))break;return r.length||r.push(void 0),r}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,s){const i=this._getStacks(e,s),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const e=this.options,n=this._cachedMeta,s=n.iScale,i=[];let o,r;for(o=0,r=n.data.length;o<r;++o)i.push(s.getPixelForValue(this.getParsed(o)[s.axis],o));const a=e.barThickness;return{min:a||z4(n),pixels:i,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:s,index:i},options:{base:o,minBarLength:r}}=this,a=o||0,l=this.getParsed(e),c=l._custom,u=rd(c);let d=l[n.axis],f=0,g=s?this.applyStack(n,l,s):d,_,m;g!==d&&(f=g-d,g=d),u&&(d=c.barStart,g=c.barEnd-c.barStart,d!==0&&As(d)!==As(c.barEnd)&&(f=0),f+=d);const b=!it(o)&&!u?o:f;let w=n.getPixelForValue(b);if(this.chart.getDataVisibility(e)?_=n.getPixelForValue(f+g):_=w,m=_-w,Math.abs(m)<r){m=q4(m,n,a)*r,d===a&&(w-=m/2);const $=n.getPixelForDecimal(0),A=n.getPixelForDecimal(1),D=Math.min($,A),x=Math.max($,A);w=Math.max(Math.min(w,x),D),_=w+m,s&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(_)-n.getValueForPixel(w))}if(w===n.getPixelForValue(a)){const $=As(m)*n.getLineWidthForValue(a)/2;w+=$,m-=$}return{size:m,base:w,head:_,center:_+m/2}}_calculateBarIndexPixels(e,n){const s=n.scale,i=this.options,o=i.skipNull,r=qe(i.maxBarThickness,1/0);let a,l;if(n.grouped){const c=o?this._getStackCount(e):n.stackCount,u=i.barThickness==="flex"?U4(e,n,i,c):Y4(e,n,i,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?e:void 0);a=u.start+u.chunk*d+u.chunk/2,l=Math.min(r,u.chunk*u.ratio)}else a=s.getPixelForValue(this.getParsed(e)[s.axis],e),l=Math.min(r,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const e=this._cachedMeta,n=e.vScale,s=e.data,i=s.length;let o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&s[o].draw(this._ctx)}}class Z4 extends zi{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,s,i){const o=super.parsePrimitiveData(e,n,s,i);for(let r=0;r<o.length;r++)o[r]._custom=this.resolveDataElementOptions(r+s).radius;return o}parseArrayData(e,n,s,i){const o=super.parseArrayData(e,n,s,i);for(let r=0;r<o.length;r++){const a=n[s+r];o[r]._custom=qe(a[2],this.resolveDataElementOptions(r+s).radius)}return o}parseObjectData(e,n,s,i){const o=super.parseObjectData(e,n,s,i);for(let r=0;r<o.length;r++){const a=n[s+r];o[r]._custom=qe(a&&a.r&&+a.r,this.resolveDataElementOptions(r+s).radius)}return o}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let s=e.length-1;s>=0;--s)n=Math.max(n,e[s].size(this.resolveDataElementOptions(s))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,s=this.chart.data.labels||[],{xScale:i,yScale:o}=n,r=this.getParsed(e),a=i.getLabelForValue(r.x),l=o.getLabelForValue(r.y),c=r._custom;return{label:s[e]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,s,i){const o=i==="reset",{iScale:r,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),u=r.axis,d=a.axis;for(let f=n;f<n+s;f++){const g=e[f],_=!o&&this.getParsed(f),m={},b=m[u]=o?r.getPixelForDecimal(.5):r.getPixelForValue(_[u]),w=m[d]=o?a.getBasePixel():a.getPixelForValue(_[d]);m.skip=isNaN(b)||isNaN(w),c&&(m.options=l||this.resolveDataElementOptions(f,g.active?"active":i),o&&(m.options.radius=0)),this.updateElement(g,f,m,i)}}resolveDataElementOptions(e,n){const s=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const o=i.radius;return n!=="active"&&(i.radius=0),i.radius+=qe(s&&s._custom,o),i}}function eV(t,e,n){let s=1,i=1,o=0,r=0;if(e<bt){const a=t,l=a+e,c=Math.cos(a),u=Math.sin(a),d=Math.cos(l),f=Math.sin(l),g=(A,D,x)=>Ha(A,a,l,!0)?1:Math.max(D,D*n,x,x*n),_=(A,D,x)=>Ha(A,a,l,!0)?-1:Math.min(D,D*n,x,x*n),m=g(0,c,d),b=g(Rt,u,f),w=_(yt,c,d),$=_(yt+Rt,u,f);s=(m-w)/2,i=(b-$)/2,o=-(m+w)/2,r=-(b+$)/2}return{ratioX:s,ratioY:i,offsetX:o,offsetY:r}}class R0 extends zi{static id="doughnut";static 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"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:s,color:i}}=e.legend.options;return n.labels.map((o,r)=>{const l=e.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:s,hidden:!e.getDataVisibility(r),index:r}})}return[]}},onClick(e,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}}};constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const s=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=s;else{let o=l=>+s[l];if(nt(s[e])){const{key:l="value"}=this._parsing;o=c=>+Ii(s[c],l)}let r,a;for(r=e,a=e+n;r<a;++r)i._parsed[r]=o(r)}}_getRotation(){return rs(this.options.rotation-90)}_getCircumference(){return rs(this.options.circumference)}_getRotationExtents(){let e=bt,n=-bt;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const i=this.chart.getDatasetMeta(s).controller,o=i._getRotation(),r=i._getCircumference();e=Math.min(e,o),n=Math.max(n,o+r)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:s}=n,i=this._cachedMeta,o=i.data,r=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(s.width,s.height)-r)/2,0),l=Math.min(fB(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:g,offsetX:_,offsetY:m}=eV(d,u,l),b=(s.width-r)/f,w=(s.height-r)/g,$=Math.max(Math.min(b,w)/2,0),A=a0(this.options.radius,$),D=Math.max(A*l,0),x=(A-D)/this._getVisibleDatasetWeightTotal();this.offsetX=_*A,this.offsetY=m*A,i.total=this.calculateTotal(),this.outerRadius=A-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(o,0,o.length,e)}_circumference(e,n){const s=this.options,i=this._cachedMeta,o=this._getCircumference();return n&&s.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*o/bt)}updateElements(e,n,s,i){const o=i==="reset",r=this.chart,a=r.chartArea,c=r.options.animation,u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,f=o&&c.animateScale,g=f?0:this.innerRadius,_=f?0:this.outerRadius,{sharedOptions:m,includeOptions:b}=this._getSharedOptions(n,i);let w=this._getRotation(),$;for($=0;$<n;++$)w+=this._circumference($,o);for($=n;$<n+s;++$){const A=this._circumference($,o),D=e[$],x={x:u+this.offsetX,y:d+this.offsetY,startAngle:w,endAngle:w+A,circumference:A,outerRadius:_,innerRadius:g};b&&(x.options=m||this.resolveDataElementOptions($,D.active?"active":i)),w+=A,this.updateElement(D,$,x,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let s=0,i;for(i=0;i<n.length;i++){const o=e._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(s+=Math.abs(o))}return s}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?bt*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,s=this.chart,i=s.data.labels||[],o=nl(n._parsed[e],s.options.locale);return{label:i[e]||"",value:o}}getMaxBorderWidth(e){let n=0;const s=this.chart;let i,o,r,a,l;if(!e){for(i=0,o=s.data.datasets.length;i<o;++i)if(s.isDatasetVisible(i)){r=s.getDatasetMeta(i),e=r.data,a=r.controller;break}}if(!e)return 0;for(i=0,o=e.length;i<o;++i)l=a.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let s=0,i=e.length;s<i;++s){const o=this.resolveDataElementOptions(s);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let s=0;s<e;++s)this.chart.isDatasetVisible(s)&&(n+=this._getRingWeight(s));return n}_getRingWeight(e){return Math.max(qe(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class L0 extends zi{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:s,data:i=[],_dataset:o}=n,r=this.chart._animationsDisabled;let{start:a,count:l}=g0(n,i,r);this._drawStart=a,this._drawCount=l,m0(n)&&(a=0,l=i.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=i;const c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!r,options:c},e),this.updateElements(i,a,l,e)}updateElements(e,n,s,i){const o=i==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=r.axis,g=a.axis,{spanGaps:_,segment:m}=this.options,b=$r(_)?_:Number.POSITIVE_INFINITY,w=this.chart._animationsDisabled||o||i==="none",$=n+s,A=e.length;let D=n>0&&this.getParsed(n-1);for(let x=0;x<A;++x){const y=e[x],S=w?y:{};if(x<n||x>=$){S.skip=!0;continue}const E=this.getParsed(x),T=it(E[g]),C=S[f]=r.getPixelForValue(E[f],x),B=S[g]=o||T?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,E,l):E[g],x);S.skip=isNaN(C)||isNaN(B)||T,S.stop=x>0&&Math.abs(E[f]-D[f])>b,m&&(S.parsed=E,S.raw=c.data[x]),d&&(S.options=u||this.resolveDataElementOptions(x,y.active?"active":i)),w||this.updateElement(y,x,S,i),D=E}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,s=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return s;const o=i[0].size(this.resolveDataElementOptions(0)),r=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(s,o,r)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}class tV extends zi{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:s,color:i}}=e.legend.options;return n.labels.map((o,r)=>{const l=e.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:s,hidden:!e.getDataVisibility(r),index:r}})}return[]}},onClick(e,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,s=this.chart,i=s.data.labels||[],o=nl(n._parsed[e].r,s.options.locale);return{label:i[e]||"",value:o}}parseObjectData(e,n,s,i){return S0.bind(this)(e,n,s,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((s,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(o<n.min&&(n.min=o),o>n.max&&(n.max=o))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,s=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),r=Math.max(s.cutoutPercentage?o/100*s.cutoutPercentage:1,0),a=(o-r)/e.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,n,s,i){const o=i==="reset",r=this.chart,l=r.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*yt;let g=f,_;const m=360/this.countVisibleElements();for(_=0;_<n;++_)g+=this._computeAngle(_,i,m);for(_=n;_<n+s;_++){const b=e[_];let w=g,$=g+this._computeAngle(_,i,m),A=r.getDataVisibility(_)?c.getDistanceFromCenterForValue(this.getParsed(_).r):0;g=$,o&&(l.animateScale&&(A=0),l.animateRotate&&(w=$=f));const D={x:u,y:d,innerRadius:0,outerRadius:A,startAngle:w,endAngle:$,options:this.resolveDataElementOptions(_,b.active?"active":i)};this.updateElement(b,_,D,i)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((s,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,s){return this.chart.getDataVisibility(e)?rs(this.resolveDataElementOptions(e,n).angle||s):0}}class nV extends R0{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class sV extends zi{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(e){const n=this._cachedMeta.vScale,s=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(s[n.axis])}}parseObjectData(e,n,s,i){return S0.bind(this)(e,n,s,i)}update(e){const n=this._cachedMeta,s=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(s.points=i,e!=="resize"){const r=this.resolveDatasetElementOptions(e);this.options.showLine||(r.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===i.length,options:r};this.updateElement(s,void 0,a,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,s,i){const o=this._cachedMeta.rScale,r=i==="reset";for(let a=n;a<n+s;a++){const l=e[a],c=this.resolveDataElementOptions(a,l.active?"active":i),u=o.getPointPositionForValue(a,this.getParsed(a).r),d=r?o.xCenter:u.x,f=r?o.yCenter:u.y,g={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,a,g,i)}}}class iV extends zi{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(e){const n=this._cachedMeta,s=this.chart.data.labels||[],{xScale:i,yScale:o}=n,r=this.getParsed(e),a=i.getLabelForValue(r.x),l=o.getLabelForValue(r.y);return{label:s[e]||"",value:"("+a+", "+l+")"}}update(e){const n=this._cachedMeta,{data:s=[]}=n,i=this.chart._animationsDisabled;let{start:o,count:r}=g0(n,s,i);if(this._drawStart=o,this._drawCount=r,m0(n)&&(o=0,r=s.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:l}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=s;const c=this.resolveDatasetElementOptions(e);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!i,options:c},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(s,o,r,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,s,i){const o=i==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),d=this.getSharedOptions(u),f=this.includeOptions(i,d),g=r.axis,_=a.axis,{spanGaps:m,segment:b}=this.options,w=$r(m)?m:Number.POSITIVE_INFINITY,$=this.chart._animationsDisabled||o||i==="none";let A=n>0&&this.getParsed(n-1);for(let D=n;D<n+s;++D){const x=e[D],y=this.getParsed(D),S=$?x:{},E=it(y[_]),T=S[g]=r.getPixelForValue(y[g],D),C=S[_]=o||E?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,y,l):y[_],D);S.skip=isNaN(T)||isNaN(C)||E,S.stop=D>0&&Math.abs(y[g]-A[g])>w,b&&(S.parsed=y,S.raw=c.data[D]),f&&(S.options=d||this.resolveDataElementOptions(D,x.active?"active":i)),$||this.updateElement(x,D,S,i),A=y}this.updateSharedOptions(d,i,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const s=e.dataset,i=s.options&&s.options.borderWidth||0;if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,r)/2}}function ro(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Nf{static override(e){Object.assign(Nf.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return ro()}parse(){return ro()}format(){return ro()}add(){return ro()}diff(){return ro()}startOf(){return ro()}endOf(){return ro()}}var oV={_date:Nf};function rV(t,e,n,s){const{controller:i,data:o,_sorted:r}=t,a=i._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&r&&o.length){const l=a._reversePixels?$B:Ks;if(s){if(i._sharedOptions){const c=o[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const d=l(o,e,n-u),f=l(o,e,n+u);return{lo:d.lo,hi:f.hi}}}}else return l(o,e,n)}return{lo:0,hi:o.length-1}}function sl(t,e,n,s,i){const o=t.getSortedVisibleDatasetMetas(),r=n[e];for(let a=0,l=o.length;a<l;++a){const{index:c,data:u}=o[a],{lo:d,hi:f}=rV(o[a],e,r,i);for(let g=d;g<=f;++g){const _=u[g];_.skip||s(_,c,g)}}}function aV(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(s,i){const o=e?Math.abs(s.x-i.x):0,r=n?Math.abs(s.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function ad(t,e,n,s,i){const o=[];return!i&&!t.isPointInArea(e)||sl(t,n,e,function(a,l,c){!i&&!qs(a,t.chartArea,0)||a.inRange(e.x,e.y,s)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function lV(t,e,n,s){let i=[];function o(r,a,l){const{startAngle:c,endAngle:u}=r.getProps(["startAngle","endAngle"],s),{angle:d}=u0(r,{x:e.x,y:e.y});Ha(d,c,u)&&i.push({element:r,datasetIndex:a,index:l})}return sl(t,n,e,o),i}function cV(t,e,n,s,i,o){let r=[];const a=aV(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const g=u.inRange(e.x,e.y,i);if(s&&!g)return;const _=u.getCenterPoint(i);if(!(!!o||t.isPointInArea(_))&&!g)return;const b=a(e,_);b<l?(r=[{element:u,datasetIndex:d,index:f}],l=b):b===l&&r.push({element:u,datasetIndex:d,index:f})}return sl(t,n,e,c),r}function ld(t,e,n,s,i,o){return!o&&!t.isPointInArea(e)?[]:n==="r"&&!s?lV(t,e,n,i):cV(t,e,n,s,i,o)}function e_(t,e,n,s,i){const o=[],r=n==="x"?"inXRange":"inYRange";let a=!1;return sl(t,n,e,(l,c,u)=>{l[r](e[n],i)&&(o.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(e.x,e.y,i))}),s&&!a?[]:o}var uV={evaluateInteractionItems:sl,modes:{index(t,e,n,s){const i=uo(e,t),o=n.axis||"x",r=n.includeInvisible||!1,a=n.intersect?ad(t,i,o,s,r):ld(t,i,o,!1,s,r),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(t,e,n,s){const i=uo(e,t),o=n.axis||"xy",r=n.includeInvisible||!1;let a=n.intersect?ad(t,i,o,s,r):ld(t,i,o,!1,s,r);if(a.length>0){const l=a[0].datasetIndex,c=t.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(t,e,n,s){const i=uo(e,t),o=n.axis||"xy",r=n.includeInvisible||!1;return ad(t,i,o,s,r)},nearest(t,e,n,s){const i=uo(e,t),o=n.axis||"xy",r=n.includeInvisible||!1;return ld(t,i,o,n.intersect,s,r)},x(t,e,n,s){const i=uo(e,t);return e_(t,i,"x",n.intersect,s)},y(t,e,n,s){const i=uo(e,t);return e_(t,i,"y",n.intersect,s)}}};const N0=["left","top","right","bottom"];function Qr(t,e){return t.filter(n=>n.pos===e)}function t_(t,e){return t.filter(n=>N0.indexOf(n.pos)===-1&&n.box.axis===e)}function Zr(t,e){return t.sort((n,s)=>{const i=e?s:n,o=e?n:s;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function dV(t){const e=[];let n,s,i,o,r,a;for(n=0,s=(t||[]).length;n<s;++n)i=t[n],{position:o,options:{stack:r,stackWeight:a=1}}=i,e.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:r&&o+r,stackWeight:a});return e}function hV(t){const e={};for(const n of t){const{stack:s,pos:i,stackWeight:o}=n;if(!s||!N0.includes(i))continue;const r=e[s]||(e[s]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return e}function fV(t,e){const n=hV(t),{vBoxMaxWidth:s,hBoxMaxHeight:i}=e;let o,r,a;for(o=0,r=t.length;o<r;++o){a=t[o];const{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*s:l&&e.availableWidth,a.height=i):(a.width=s,a.height=u?u*i:l&&e.availableHeight)}return n}function pV(t){const e=dV(t),n=Zr(e.filter(c=>c.box.fullSize),!0),s=Zr(Qr(e,"left"),!0),i=Zr(Qr(e,"right")),o=Zr(Qr(e,"top"),!0),r=Zr(Qr(e,"bottom")),a=t_(e,"x"),l=t_(e,"y");return{fullSize:n,leftAndTop:s.concat(o),rightAndBottom:i.concat(l).concat(r).concat(a),chartArea:Qr(e,"chartArea"),vertical:s.concat(i).concat(l),horizontal:o.concat(r).concat(a)}}function n_(t,e,n,s){return Math.max(t[n],e[n])+Math.max(t[s],e[s])}function F0(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function gV(t,e,n,s){const{pos:i,box:o}=n,r=t.maxPadding;if(!nt(i)){n.size&&(t[i]-=n.size);const d=s[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,t[i]+=n.size}o.getPadding&&F0(r,o.getPadding());const a=Math.max(0,e.outerWidth-n_(r,t,"left","right")),l=Math.max(0,e.outerHeight-n_(r,t,"top","bottom")),c=a!==t.w,u=l!==t.h;return t.w=a,t.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function mV(t){const e=t.maxPadding;function n(s){const i=Math.max(e[s]-t[s],0);return t[s]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function _V(t,e){const n=e.maxPadding;function s(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(r=>{o[r]=Math.max(e[r],n[r])}),o}return s(t?["left","right"]:["top","bottom"])}function ra(t,e,n,s){const i=[];let o,r,a,l,c,u;for(o=0,r=t.length,c=0;o<r;++o){a=t[o],l=a.box,l.update(a.width||e.w,a.height||e.h,_V(a.horizontal,e));const{same:d,other:f}=gV(e,n,a,s);c|=d&&i.length,u=u||f,l.fullSize||i.push(a)}return c&&ra(i,e,n,s)||u}function Fl(t,e,n,s,i){t.top=n,t.left=e,t.right=e+s,t.bottom=n+i,t.width=s,t.height=i}function s_(t,e,n,s){const i=n.padding;let{x:o,y:r}=e;for(const a of t){const l=a.box,c=s[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const d=e.w*u,f=c.size||l.height;Va(c.start)&&(r=c.start),l.fullSize?Fl(l,i.left,r,n.outerWidth-i.right-i.left,f):Fl(l,e.left+c.placed,r,d,f),c.start=r,c.placed+=d,r=l.bottom}else{const d=e.h*u,f=c.size||l.width;Va(c.start)&&(o=c.start),l.fullSize?Fl(l,o,i.top,f,n.outerHeight-i.bottom-i.top):Fl(l,o,e.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}e.x=o,e.y=r}var qn={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,s){if(!t)return;const i=hn(t.options.layout.padding),o=Math.max(e-i.width,0),r=Math.max(n-i.height,0),a=pV(t.boxes),l=a.vertical,c=a.horizontal;ct(t.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=l.reduce((m,b)=>b.box.options&&b.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/u,hBoxMaxHeight:r/2}),f=Object.assign({},i);F0(f,hn(s));const g=Object.assign({maxPadding:f,w:o,h:r,x:i.left,y:i.top},i),_=fV(l.concat(c),d);ra(a.fullSize,g,d,_),ra(l,g,d,_),ra(c,g,d,_)&&ra(l,g,d,_),mV(g),s_(a.leftAndTop,g,d,_),g.x+=g.w,g.y+=g.h,s_(a.rightAndBottom,g,d,_),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},ct(a.chartArea,m=>{const b=m.box;Object.assign(b,t.chartArea),b.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}};class B0{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,s){}removeEventListener(e,n,s){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,s,i){return n=Math.max(0,n||e.width),s=s||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):s)}}isAttached(e){return!0}updateConfig(e){}}class vV extends B0{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const ic="$chartjs",bV={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},i_=t=>t===null||t==="";function yV(t,e){const n=t.style,s=t.getAttribute("height"),i=t.getAttribute("width");if(t[ic]={initial:{height:s,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",i_(i)){const o=Vm(t,"width");o!==void 0&&(t.width=o)}if(i_(s))if(t.style.height==="")t.height=t.width/(e||2);else{const o=Vm(t,"height");o!==void 0&&(t.height=o)}return t}const V0=v4?{passive:!0}:!1;function wV(t,e,n){t.addEventListener(e,n,V0)}function xV(t,e,n){t.canvas.removeEventListener(e,n,V0)}function kV(t,e){const n=bV[t.type]||t.type,{x:s,y:i}=uo(t,e);return{type:n,chart:e,native:t,x:s!==void 0?s:null,y:i!==void 0?i:null}}function Sc(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function SV(t,e,n){const s=t.canvas,i=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Sc(a.addedNodes,s),r=r&&!Sc(a.removedNodes,s);r&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function $V(t,e,n){const s=t.canvas,i=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Sc(a.removedNodes,s),r=r&&!Sc(a.addedNodes,s);r&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Wa=new Map;let o_=0;function H0(){const t=window.devicePixelRatio;t!==o_&&(o_=t,Wa.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function AV(t,e){Wa.size||window.addEventListener("resize",H0),Wa.set(t,e)}function CV(t){Wa.delete(t),Wa.size||window.removeEventListener("resize",H0)}function EV(t,e,n){const s=t.canvas,i=s&&Lf(s);if(!i)return;const o=p0((a,l)=>{const c=i.clientWidth;n(a,l),c<i.clientWidth&&n()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return r.observe(i),AV(t,o),r}function cd(t,e,n){n&&n.disconnect(),e==="resize"&&CV(t)}function PV(t,e,n){const s=t.canvas,i=p0(o=>{t.ctx!==null&&n(kV(o,t))},t);return wV(s,e,i),i}class TV extends B0{acquireContext(e,n){const s=e&&e.getContext&&e.getContext("2d");return s&&s.canvas===e?(yV(e,n),s):null}releaseContext(e){const n=e.canvas;if(!n[ic])return!1;const s=n[ic].initial;["height","width"].forEach(o=>{const r=s[o];it(r)?n.removeAttribute(o):n.setAttribute(o,r)});const i=s.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[ic],!0}addEventListener(e,n,s){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),r={attach:SV,detach:$V,resize:EV}[n]||PV;i[n]=r(e,n,s)}removeEventListener(e,n){const s=e.$proxies||(e.$proxies={}),i=s[n];if(!i)return;({attach:cd,detach:cd,resize:cd}[n]||xV)(e,n,i),s[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,s,i){return _4(e,n,s,i)}isAttached(e){const n=Lf(e);return!!(n&&n.isConnected)}}function MV(t){return!Rf()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?vV:TV}let si=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}hasValue(){return $r(this.x)&&$r(this.y)}getProps(e,n){const s=this.$animations;if(!n||!s)return this;const i={};return e.forEach(o=>{i[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),i}};function DV(t,e){const n=t.options.ticks,s=OV(t),i=Math.min(n.maxTicksLimit||s,s),o=n.major.enabled?RV(e):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>i)return LV(e,c,o,r/i),c;const u=IV(o,e,i);if(r>0){let d,f;const g=r>1?Math.round((l-a)/(r-1)):null;for(Bl(e,c,u,it(g)?0:a-g,a),d=0,f=r-1;d<f;d++)Bl(e,c,u,o[d],o[d+1]);return Bl(e,c,u,l,it(g)?e.length:l+g),c}return Bl(e,c,u),c}function OV(t){const e=t.options.offset,n=t._tickSize(),s=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(s,i))}function IV(t,e,n){const s=NV(t),i=e.length/n;if(!s)return Math.max(i,1);const o=wB(s);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>i)return l}return Math.max(i,1)}function RV(t){const e=[];let n,s;for(n=0,s=t.length;n<s;n++)t[n].major&&e.push(n);return e}function LV(t,e,n,s){let i=0,o=n[0],r;for(s=Math.ceil(s),r=0;r<t.length;r++)r===o&&(e.push(t[r]),i++,o=n[i*s])}function Bl(t,e,n,s,i){const o=qe(s,0),r=Math.min(qe(i,t.length),t.length);let a=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-s,n=l/Math.floor(l/n)),u=o;u<0;)a++,u=Math.round(o+a*n);for(c=Math.max(o,0);c<r;c++)c===u&&(e.push(t[c]),a++,u=Math.round(o+a*n))}function NV(t){const e=t.length;let n,s;if(e<2)return!1;for(s=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==s)return!1;return s}const FV=t=>t==="left"?"right":t==="right"?"left":t,r_=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,a_=(t,e)=>Math.min(e||t,t);function l_(t,e){const n=[],s=t.length/e,i=t.length;let o=0;for(;o<i;o+=s)n.push(t[Math.floor(o)]);return n}function BV(t,e,n){const s=t.ticks.length,i=Math.min(e,s-1),o=t._startPixel,r=t._endPixel,a=1e-6;let l=t.getPixelForTick(i),c;if(!(n&&(s===1?c=Math.max(l-o,r-l):e===0?c=(t.getPixelForTick(1)-l)/2:c=(l-t.getPixelForTick(i-1))/2,l+=i<e?c:-c,l<o-a||l>r+a)))return l}function VV(t,e){ct(t,n=>{const s=n.gc,i=s.length/2;let o;if(i>e){for(o=0;o<i;++o)delete n.data[s[o]];s.splice(0,i)}})}function ea(t){return t.drawTicks?t.tickLength:0}function c_(t,e){if(!t.display)return 0;const n=Yt(t.font,e),s=hn(t.padding);return(vt(t.text)?t.text.length:1)*n.lineHeight+s.height}function HV(t,e){return Wi(t,{scale:e,type:"scale"})}function jV(t,e,n){return Wi(t,{tick:n,index:e,type:"tick"})}function WV(t,e,n){let s=Pf(t);return(n&&e!=="right"||!n&&e==="right")&&(s=FV(s)),s}function zV(t,e,n,s){const{top:i,left:o,bottom:r,right:a,chart:l}=t,{chartArea:c,scales:u}=l;let d=0,f,g,_;const m=r-i,b=a-o;if(t.isHorizontal()){if(g=an(s,o,a),nt(n)){const w=Object.keys(n)[0],$=n[w];_=u[w].getPixelForValue($)+m-e}else n==="center"?_=(c.bottom+c.top)/2+m-e:_=r_(t,n,e);f=a-o}else{if(nt(n)){const w=Object.keys(n)[0],$=n[w];g=u[w].getPixelForValue($)-b+e}else n==="center"?g=(c.left+c.right)/2-b+e:g=r_(t,n,e);_=an(s,r,i),d=n==="left"?-Rt:Rt}return{titleX:g,titleY:_,maxWidth:f,rotation:d}}class Ro extends si{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:s,_suggestedMax:i}=this;return e=Mn(e,Number.POSITIVE_INFINITY),n=Mn(n,Number.NEGATIVE_INFINITY),s=Mn(s,Number.POSITIVE_INFINITY),i=Mn(i,Number.NEGATIVE_INFINITY),{min:Mn(e,s),max:Mn(n,i),minDefined:Ct(e),maxDefined:Ct(n)}}getMinMax(e){let{min:n,max:s,minDefined:i,maxDefined:o}=this.getUserBounds(),r;if(i&&o)return{min:n,max:s};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,e),i||(n=Math.min(n,r.min)),o||(s=Math.max(s,r.max));return n=o&&n>s?s:n,s=i&&n>s?n:s,{min:Mn(n,Mn(s,n)),max:Mn(s,Mn(n,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ft(this.options.beforeUpdate,[this])}update(e,n,s){const{beginAtZero:i,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=GB(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?l_(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=DV(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,s;this.isHorizontal()?(n=this.left,s=this.right):(n=this.top,s=this.bottom,e=!e),this._startPixel=n,this._endPixel=s,this._reversePixels=e,this._length=s-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ft(this.options.afterUpdate,[this])}beforeSetDimensions(){ft(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(){ft(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),ft(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ft(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let s,i,o;for(s=0,i=e.length;s<i;s++)o=e[s],o.label=ft(n.callback,[o.value,s,e],this)}afterTickToLabelConversion(){ft(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ft(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,s=a_(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,o=n.maxRotation;let r=i,a,l,c;if(!this._isVisible()||!n.display||i>=o||s<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,g=Zt(this.chart.width-d,0,this.maxWidth);a=e.offset?this.maxWidth/s:g/(s-1),d+6>a&&(a=g/(s-(e.offset?.5:1)),l=this.maxHeight-ea(e.grid)-n.padding-c_(e.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),r=Cf(Math.min(Math.asin(Zt((u.highest.height+6)/a,-1,1)),Math.asin(Zt(l/c,-1,1))-Math.asin(Zt(f/c,-1,1)))),r=Math.max(i,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){ft(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ft(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:s,title:i,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=c_(i,n.options.font);if(a?(e.width=this.maxWidth,e.height=ea(o)+l):(e.height=this.maxHeight,e.width=ea(o)+l),s.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),g=s.padding*2,_=rs(this.labelRotation),m=Math.cos(_),b=Math.sin(_);if(a){const w=s.mirror?0:b*d.width+m*f.height;e.height=Math.min(this.maxHeight,e.height+w+g)}else{const w=s.mirror?0:m*d.width+b*f.height;e.width=Math.min(this.maxWidth,e.width+w+g)}this._calculatePadding(c,u,b,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,s,i){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,g=0;l?c?(f=i*e.width,g=s*n.height):(f=s*e.height,g=i*n.width):o==="start"?g=n.width:o==="end"?f=e.width:o!=="inner"&&(f=e.width/2,g=n.width/2),this.paddingLeft=Math.max((f-u+r)*this.width/(this.width-u),0),this.paddingRight=Math.max((g-d+r)*this.width/(this.width-d),0)}else{let u=n.height/2,d=e.height/2;o==="start"?(u=0,d=e.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+r,this.paddingBottom=d+r}}_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(){ft(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,s;for(n=0,s=e.length;n<s;n++)it(e[n].label)&&(e.splice(n,1),s--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let s=this.ticks;n<s.length&&(s=l_(s,n)),this._labelSizes=e=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,s){const{ctx:i,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(n/a_(n,s));let c=0,u=0,d,f,g,_,m,b,w,$,A,D,x;for(d=0;d<n;d+=l){if(_=e[d].label,m=this._resolveTickFontOptions(d),i.font=b=m.string,w=o[b]=o[b]||{data:{},gc:[]},$=m.lineHeight,A=D=0,!it(_)&&!vt(_))A=xc(i,w.data,w.gc,A,_),D=$;else if(vt(_))for(f=0,g=_.length;f<g;++f)x=_[f],!it(x)&&!vt(x)&&(A=xc(i,w.data,w.gc,A,x),D+=$);r.push(A),a.push(D),c=Math.max(A,c),u=Math.max(D,u)}VV(o,n);const y=r.indexOf(c),S=a.indexOf(u),E=T=>({width:r[T]||0,height:a[T]||0});return{first:E(0),last:E(n-1),widest:E(y),highest:E(S),widths:r,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return SB(this._alignToPixels?oo(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const s=n[e];return s.$context||(s.$context=jV(this.getContext(),e,s))}return this.$context||(this.$context=HV(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=rs(this.labelRotation),s=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),r=e.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*s>a*i?a/s:l/i:l*i<a*s?l/s:a/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,s=this.chart,i=this.options,{grid:o,position:r,border:a}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=ea(o),g=[],_=a.setContext(this.getContext()),m=_.display?_.width:0,b=m/2,w=function(I){return oo(s,I,m)};let $,A,D,x,y,S,E,T,C,B,J,ae;if(r==="top")$=w(this.bottom),S=this.bottom-f,T=$-b,B=w(e.top)+b,ae=e.bottom;else if(r==="bottom")$=w(this.top),B=e.top,ae=w(e.bottom)-b,S=$+b,T=this.top+f;else if(r==="left")$=w(this.right),y=this.right-f,E=$-b,C=w(e.left)+b,J=e.right;else if(r==="right")$=w(this.left),C=e.left,J=w(e.right)-b,y=$+b,E=this.left+f;else if(n==="x"){if(r==="center")$=w((e.top+e.bottom)/2+.5);else if(nt(r)){const I=Object.keys(r)[0],V=r[I];$=w(this.chart.scales[I].getPixelForValue(V))}B=e.top,ae=e.bottom,S=$+b,T=S+f}else if(n==="y"){if(r==="center")$=w((e.left+e.right)/2);else if(nt(r)){const I=Object.keys(r)[0],V=r[I];$=w(this.chart.scales[I].getPixelForValue(V))}y=$-b,E=y-f,C=e.left,J=e.right}const Y=qe(i.ticks.maxTicksLimit,d),L=Math.max(1,Math.ceil(d/Y));for(A=0;A<d;A+=L){const I=this.getContext(A),V=o.setContext(I),Q=a.setContext(I),Z=V.lineWidth,le=V.color,ye=Q.dash||[],U=Q.dashOffset,X=V.tickWidth,R=V.tickColor,ee=V.tickBorderDash||[],oe=V.tickBorderDashOffset;D=BV(this,A,l),D!==void 0&&(x=oo(s,D,Z),c?y=E=C=J=x:S=T=B=ae=x,g.push({tx1:y,ty1:S,tx2:E,ty2:T,x1:C,y1:B,x2:J,y2:ae,width:Z,color:le,borderDash:ye,borderDashOffset:U,tickWidth:X,tickColor:R,tickBorderDash:ee,tickBorderDashOffset:oe}))}return this._ticksLength=d,this._borderValue=$,g}_computeLabelItems(e){const n=this.axis,s=this.options,{position:i,ticks:o}=s,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=o,f=ea(s.grid),g=f+u,_=d?-u:g,m=-rs(this.labelRotation),b=[];let w,$,A,D,x,y,S,E,T,C,B,J,ae="middle";if(i==="top")y=this.bottom-_,S=this._getXAxisLabelAlignment();else if(i==="bottom")y=this.top+_,S=this._getXAxisLabelAlignment();else if(i==="left"){const L=this._getYAxisLabelAlignment(f);S=L.textAlign,x=L.x}else if(i==="right"){const L=this._getYAxisLabelAlignment(f);S=L.textAlign,x=L.x}else if(n==="x"){if(i==="center")y=(e.top+e.bottom)/2+g;else if(nt(i)){const L=Object.keys(i)[0],I=i[L];y=this.chart.scales[L].getPixelForValue(I)+g}S=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")x=(e.left+e.right)/2-g;else if(nt(i)){const L=Object.keys(i)[0],I=i[L];x=this.chart.scales[L].getPixelForValue(I)}S=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?ae="top":l==="end"&&(ae="bottom"));const Y=this._getLabelSizes();for(w=0,$=a.length;w<$;++w){A=a[w],D=A.label;const L=o.setContext(this.getContext(w));E=this.getPixelForTick(w)+o.labelOffset,T=this._resolveTickFontOptions(w),C=T.lineHeight,B=vt(D)?D.length:1;const I=B/2,V=L.color,Q=L.textStrokeColor,Z=L.textStrokeWidth;let le=S;r?(x=E,S==="inner"&&(w===$-1?le=this.options.reverse?"left":"right":w===0?le=this.options.reverse?"right":"left":le="center"),i==="top"?c==="near"||m!==0?J=-B*C+C/2:c==="center"?J=-Y.highest.height/2-I*C+C:J=-Y.highest.height+C/2:c==="near"||m!==0?J=C/2:c==="center"?J=Y.highest.height/2-I*C:J=Y.highest.height-B*C,d&&(J*=-1),m!==0&&!L.showLabelBackdrop&&(x+=C/2*Math.sin(m))):(y=E,J=(1-B)*C/2);let ye;if(L.showLabelBackdrop){const U=hn(L.backdropPadding),X=Y.heights[w],R=Y.widths[w];let ee=J-U.top,oe=0-U.left;switch(ae){case"middle":ee-=X/2;break;case"bottom":ee-=X;break}switch(S){case"center":oe-=R/2;break;case"right":oe-=R;break;case"inner":w===$-1?oe-=R:w>0&&(oe-=R/2);break}ye={left:oe,top:ee,width:R+U.width,height:X+U.height,color:L.backdropColor}}b.push({label:D,font:T,textOffset:J,options:{rotation:m,color:V,strokeColor:Q,strokeWidth:Z,textAlign:le,textBaseline:ae,translation:[x,y],backdrop:ye}})}return b}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-rs(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:s,mirror:i,padding:o}}=this.options,r=this._getLabelSizes(),a=e+o,l=r.widest.width;let c,u;return n==="left"?i?(u=this.right+o,s==="near"?c="left":s==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,s==="near"?c="right":s==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+o,s==="near"?c="right":s==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,s==="near"?c="left":s==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:s,top:i,width:o,height:r}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(s,i,o,r),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,s=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,r;const a=(l,c,u)=>{!u.width||!u.color||(s.save(),s.lineWidth=u.width,s.strokeStyle=u.color,s.setLineDash(u.borderDash||[]),s.lineDashOffset=u.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(n.display)for(o=0,r=i.length;o<r;++o){const l=i[o];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:s,grid:i}}=this,o=s.setContext(this.getContext()),r=s.display?o.width:0;if(!r)return;const a=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=oo(e,this.left,r)-r/2,u=oo(e,this.right,a)+a/2,d=f=l):(d=oo(e,this.top,r)-r/2,f=oo(e,this.bottom,a)+a/2,c=u=l),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const s=this.ctx,i=this._computeLabelArea();i&&su(s,i);const o=this.getLabelItems(e);for(const r of o){const a=r.options,l=r.font,c=r.label,u=r.textOffset;Po(s,c,0,u,l,a)}i&&iu(s)}drawTitle(){const{ctx:e,options:{position:n,title:s,reverse:i}}=this;if(!s.display)return;const o=Yt(s.font),r=hn(s.padding),a=s.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||nt(n)?(l+=r.bottom,vt(s.text)&&(l+=o.lineHeight*(s.text.length-1))):l+=r.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=zV(this,l,n,a);Po(e,s.text,0,0,o,{color:s.color,maxWidth:d,rotation:f,textAlign:WV(a,n,i),textBaseline:"middle",translation:[c,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,s=qe(e.grid&&e.grid.z,-1),i=qe(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Ro.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",i=[];let o,r;for(o=0,r=n.length;o<r;++o){const a=n[o];a[s]===this.id&&(!e||a.type===e)&&i.push(a)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return Yt(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Vl{constructor(e,n,s){this.type=e,this.scope=n,this.override=s,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let s;KV(n)&&(s=this.register(n));const i=this.items,o=e.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in i||(i[o]=e,YV(e,r,s),this.override&&Et.override(e.id,e.overrides)),r}get(e){return this.items[e]}unregister(e){const n=this.items,s=e.id,i=this.scope;s in n&&delete n[s],i&&s in Et[i]&&(delete Et[i][s],this.override&&delete Eo[s])}}function YV(t,e,n){const s=Ba(Object.create(null),[n?Et.get(n):{},Et.get(e),t.defaults]);Et.set(e,s),t.defaultRoutes&&UV(e,t.defaultRoutes),t.descriptors&&Et.describe(e,t.descriptors)}function UV(t,e){Object.keys(e).forEach(n=>{const s=n.split("."),i=s.pop(),o=[t].concat(s).join("."),r=e[n].split("."),a=r.pop(),l=r.join(".");Et.route(o,i,l,a)})}function KV(t){return"id"in t&&"defaults"in t}class qV{constructor(){this.controllers=new Vl(zi,"datasets",!0),this.elements=new Vl(si,"elements"),this.plugins=new Vl(Object,"plugins"),this.scales=new Vl(Ro,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,s){[...n].forEach(i=>{const o=s||this._getRegistryForType(i);s||o.isForType(i)||o===this.plugins&&i.id?this._exec(e,o,i):ct(i,r=>{const a=s||this._getRegistryForType(r);this._exec(e,a,r)})})}_exec(e,n,s){const i=Af(e);ft(s["before"+i],[],s),n[e](s),ft(s["after"+i],[],s)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const s=this._typedRegistries[n];if(s.isForType(e))return s}return this.plugins}_get(e,n,s){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+s+".");return i}}var _s=new qV;class GV{constructor(){this._init=[]}notify(e,n,s,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const o=i?this._descriptors(e).filter(i):this._descriptors(e),r=this._notify(o,e,n,s);return n==="afterDestroy"&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),r}_notify(e,n,s,i){i=i||{};for(const o of e){const r=o.plugin,a=r[s],l=[n,i,o.options];if(ft(a,l,r)===!1&&i.cancelable)return!1}return!0}invalidate(){it(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const s=e&&e.config,i=qe(s.options&&s.options.plugins,{}),o=JV(s);return i===!1&&!n?[]:QV(e,o,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],s=this._cache,i=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,s),e,"stop"),this._notify(i(s,n),e,"start")}}function JV(t){const e={},n=[],s=Object.keys(_s.plugins.items);for(let o=0;o<s.length;o++)n.push(_s.getPlugin(s[o]));const i=t.plugins||[];for(let o=0;o<i.length;o++){const r=i[o];n.indexOf(r)===-1&&(n.push(r),e[r.id]=!0)}return{plugins:n,localIds:e}}function XV(t,e){return!e&&t===!1?null:t===!0?{}:t}function QV(t,{plugins:e,localIds:n},s,i){const o=[],r=t.getContext();for(const a of e){const l=a.id,c=XV(s[l],i);c!==null&&o.push({plugin:a,options:ZV(t.config,{plugin:a,local:n[l]},c,r)})}return o}function ZV(t,{plugin:e,local:n},s,i){const o=t.pluginScopeKeys(e),r=t.getOptionScopes(s,o);return n&&e.defaults&&r.push(e.defaults),t.createResolver(r,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Xd(t,e){const n=Et.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function e6(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function t6(t,e){return t===e?"_index_":"_value_"}function u_(t){if(t==="x"||t==="y"||t==="r")return t}function n6(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Qd(t,...e){if(u_(t))return t;for(const n of e){const s=n.axis||n6(n.position)||t.length>1&&u_(t[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function d_(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function s6(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(s=>s.xAxisID===t||s.yAxisID===t);if(n.length)return d_(t,"x",n[0])||d_(t,"y",n[0])}return{}}function i6(t,e){const n=Eo[t.type]||{scales:{}},s=e.scales||{},i=Xd(t.type,e),o=Object.create(null);return Object.keys(s).forEach(r=>{const a=s[r];if(!nt(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=Qd(r,a,s6(r,t),Et.scales[a.type]),c=t6(l,i),u=n.scales||{};o[r]=ya(Object.create(null),[{axis:l},a,u[l],u[c]])}),t.data.datasets.forEach(r=>{const a=r.type||t.type,l=r.indexAxis||Xd(a,e),u=(Eo[a]||{}).scales||{};Object.keys(u).forEach(d=>{const f=e6(d,l),g=r[f+"AxisID"]||f;o[g]=o[g]||Object.create(null),ya(o[g],[{axis:f},s[g],u[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];ya(a,[Et.scales[a.type],Et.scale])}),o}function j0(t){const e=t.options||(t.options={});e.plugins=qe(e.plugins,{}),e.scales=i6(t,e)}function W0(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function o6(t){return t=t||{},t.data=W0(t.data),j0(t),t}const h_=new Map,z0=new Set;function Hl(t,e){let n=h_.get(t);return n||(n=e(),h_.set(t,n),z0.add(n)),n}const ta=(t,e,n)=>{const s=Ii(e,n);s!==void 0&&t.add(s)};let r6=class{constructor(e){this._config=o6(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=W0(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),j0(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Hl(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Hl(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Hl(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,s=this.type;return Hl(`${s}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const s=this._scopeCache;let i=s.get(e);return(!i||n)&&(i=new Map,s.set(e,i)),i}getOptionScopes(e,n,s){const{options:i,type:o}=this,r=this._cachedScopes(e,s),a=r.get(n);if(a)return a;const l=new Set;n.forEach(u=>{e&&(l.add(e),u.forEach(d=>ta(l,e,d))),u.forEach(d=>ta(l,i,d)),u.forEach(d=>ta(l,Eo[o]||{},d)),u.forEach(d=>ta(l,Et,d)),u.forEach(d=>ta(l,Gd,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),z0.has(n)&&r.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,Eo[n]||{},Et.datasets[n]||{},{type:n},Et,Gd]}resolveNamedOptions(e,n,s,i=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=f_(this._resolverCache,e,i);let l=r;if(l6(r,n)){o.$shared=!1,s=Ri(s)?s():s;const c=this.createResolver(e,s,a);l=Ar(r,s,c)}for(const c of n)o[c]=l[c];return o}createResolver(e,n,s=[""],i){const{resolver:o}=f_(this._resolverCache,e,s);return nt(n)?Ar(o,n,void 0,i):o}};function f_(t,e,n){let s=t.get(e);s||(s=new Map,t.set(e,s));const i=n.join();let o=s.get(i);return o||(o={resolver:Df(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},s.set(i,o)),o}const a6=t=>nt(t)&&Object.getOwnPropertyNames(t).some(e=>Ri(t[e]));function l6(t,e){const{isScriptable:n,isIndexable:s}=y0(t);for(const i of e){const o=n(i),r=s(i),a=(r||o)&&t[i];if(o&&(Ri(a)||a6(a))||r&&vt(a))return!0}return!1}var c6="4.4.1";const u6=["top","bottom","left","right","chartArea"];function p_(t,e){return t==="top"||t==="bottom"||u6.indexOf(t)===-1&&e==="x"}function g_(t,e){return function(n,s){return n[t]===s[t]?n[e]-s[e]:n[t]-s[t]}}function m_(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),ft(n&&n.onComplete,[t],e)}function d6(t){const e=t.chart,n=e.options.animation;ft(n&&n.onProgress,[t],e)}function Y0(t){return Rf()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const oc={},__=t=>{const e=Y0(t);return Object.values(oc).filter(n=>n.canvas===e).pop()};function h6(t,e,n){const s=Object.keys(t);for(const i of s){const o=+i;if(o>=e){const r=t[i];delete t[i],(n>0||o>e)&&(t[o+n]=r)}}}function f6(t,e,n,s){return!n||t.type==="mouseout"?null:s?e:t}function jl(t,e,n){return t.options.clip?t[n]:e[n]}function p6(t,e){const{xScale:n,yScale:s}=t;return n&&s?{left:jl(n,e,"left"),right:jl(n,e,"right"),top:jl(s,e,"top"),bottom:jl(s,e,"bottom")}:e}let ru=class{static defaults=Et;static instances=oc;static overrides=Eo;static registry=_s;static version=c6;static getChart=__;static register(...e){_s.add(...e),v_()}static unregister(...e){_s.remove(...e),v_()}constructor(e,n){const s=this.config=new r6(n),i=Y0(e),o=__(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||MV(i)),this.platform.updateConfig(s);const a=this.platform.acquireContext(i,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=hB(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=r,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 GV,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=EB(d=>this.update(d),r.resizeDelay||0),this._dataChanges=[],oc[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Bs.listen(this,"complete",m_),Bs.listen(this,"progress",d6),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:s,height:i,_aspectRatio:o}=this;return it(e)?n&&o?o:i?s/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return _s}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Bm(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Lm(this.canvas,this.ctx),this}stop(){return Bs.stop(this),this}resize(e,n){Bs.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const s=this.options,i=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(i,e,n,o),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Bm(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),ft(s.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ct(n,(s,i)=>{s.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,s=this.scales,i=Object.keys(s).reduce((r,a)=>(r[a]=!1,r),{});let o=[];n&&(o=o.concat(Object.keys(n).map(r=>{const a=n[r],l=Qd(r,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),ct(o,r=>{const a=r.options,l=a.id,c=Qd(l,a),u=qe(a.type,r.dtype);(a.position===void 0||p_(a.position,c)!==p_(r.dposition))&&(a.position=r.dposition),i[l]=!0;let d=null;if(l in s&&s[l].type===u)d=s[l];else{const f=_s.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(a,e)}),ct(i,(r,a)=>{r||delete s[a]}),ct(s,r=>{qn.configure(this,r,r.options),qn.addBox(this,r)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,s=e.length;if(e.sort((i,o)=>i.index-o.index),s>n){for(let i=n;i<s;++i)this._destroyDatasetMeta(i);e.splice(n,s-n)}this._sortedMetasets=e.slice(0).sort(g_("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((s,i)=>{n.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let s,i;for(this._removeUnreferencedMetasets(),s=0,i=n.length;s<i;s++){const o=n[s];let r=this.getDatasetMeta(s);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(s),r=this.getDatasetMeta(s)),r.type=a,r.indexAxis=o.indexAxis||Xd(a,this.options),r.order=o.order||0,r.index=s,r.label=""+o.label,r.visible=this.isDatasetVisible(s),r.controller)r.controller.updateIndex(s),r.controller.linkScales();else{const l=_s.getController(a),{datasetElementType:c,dataElementType:u}=Et.datasets[a];Object.assign(l,{dataElementType:_s.getElement(u),datasetElementType:c&&_s.getElement(c)}),r.controller=new l(this,s),e.push(r.controller)}}return this._updateMetasets(),e}_resetElements(){ct(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const s=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&o.indexOf(d)===-1;d.buildOrUpdateElements(f),r=Math.max(+d.getMaxOverflow(),r)}r=this._minPadding=s.layout.autoPadding?r:0,this._updateLayout(r),i||ct(o,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(g_("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){ct(this.scales,e=>{qn.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),s=new Set(e.events);(!Cm(n,s)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:s,start:i,count:o}of n){const r=s==="_removeElements"?-o:o;h6(e,i,r)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,s=o=>new Set(e.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),i=s(0);for(let o=1;o<n;o++)if(!Cm(i,s(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;qn.update(this,this.width,this.height,e);const n=this.chartArea,s=n.width<=0||n.height<=0;this._layers=[],ct(this.boxes,i=>{s&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,s=this.data.datasets.length;n<s;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,s=this.data.datasets.length;n<s;++n)this._updateDataset(n,Ri(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const s=this.getDatasetMeta(e),i={meta:s,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(s.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Bs.has(this)?this.attached&&!Bs.running(this)&&Bs.start(this):(this.draw(),m_({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:s,height:i}=this._resizeBeforeDraw;this._resize(s,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,s=[];let i,o;for(i=0,o=n.length;i<o;++i){const r=n[i];(!e||r.visible)&&s.push(r)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,s=e._clip,i=!s.disabled,o=p6(e,this.chartArea),r={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&su(n,{left:s.left===!1?0:o.left-s.left,right:s.right===!1?this.width:o.right+s.right,top:s.top===!1?0:o.top-s.top,bottom:s.bottom===!1?this.height:o.bottom+s.bottom}),e.controller.draw(),i&&iu(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return qs(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,s,i){const o=uV.modes[n];return typeof o=="function"?o(this,e,s,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],s=this._metasets;let i=s.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},s.push(i)),i}getContext(){return this.$context||(this.$context=Wi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const s=this.getDatasetMeta(e);return typeof s.hidden=="boolean"?!s.hidden:!n.hidden}setDatasetVisibility(e,n){const s=this.getDatasetMeta(e);s.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,s){const i=s?"show":"hide",o=this.getDatasetMeta(e),r=o.controller._resolveAnimations(void 0,i);Va(n)?(o.data[n].hidden=!s,this.update()):(this.setDatasetVisibility(e,s),r.update(o,{visible:s}),this.update(a=>a.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Bs.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Lm(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete oc[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,s=(o,r)=>{n.addEventListener(this,o,r),e[o]=r},i=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};ct(this.options.events,o=>s(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,s=(l,c)=>{n.addEventListener(this,l,c),e[l]=c},i=(l,c)=>{e[l]&&(n.removeEventListener(this,l,c),delete e[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{i("attach",a),this.attached=!0,this.resize(),s("resize",o),s("detach",r)};r=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),s("attach",a)},n.isAttached(this.canvas)?a():r()}unbindEvents(){ct(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},ct(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,s){const i=s?"set":"remove";let o,r,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=e.length;a<l;++a){r=e[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[i+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],s=e.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!bc(s,n)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,n))}notifyPlugins(e,n,s){return this._plugins.notify(this,e,n,s)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,s){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),r=o(n,e),a=s?e:o(e,n);r.length&&this.updateHoverStyle(r,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(e,n){const s={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=r=>(r.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",s,i)===!1)return;const o=this._handleEvent(e,n,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,i),(o||s.changed)&&this.render(),this}_handleEvent(e,n,s){const{_active:i=[],options:o}=this,r=n,a=this._getActiveElements(e,i,s,r),l=vB(e),c=f6(e,this._lastEvent,s,l);s&&(this._lastEvent=null,ft(o.onHover,[e,a,this],this),l&&ft(o.onClick,[e,a,this],this));const u=!bc(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(e,n,s,i){if(e.type==="mouseout")return[];if(!s)return n;const o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,i)}};function v_(){return ct(ru.instances,t=>t._plugins.invalidate())}function g6(t,e,n){const{startAngle:s,pixelMargin:i,x:o,y:r,outerRadius:a,innerRadius:l}=e;let c=i/a;t.beginPath(),t.arc(o,r,a,s-c,n+c),l>i?(c=i/l,t.arc(o,r,l,n+c,s-c,!0)):t.arc(o,r,i,n+Rt,s-Rt),t.closePath(),t.clip()}function m6(t){return Mf(t,["outerStart","outerEnd","innerStart","innerEnd"])}function _6(t,e,n,s){const i=m6(t.options.borderRadius),o=(n-e)/2,r=Math.min(o,s*e/2),a=l=>{const c=(n-Math.min(o,l))*s/2;return Zt(l,0,Math.min(o,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:Zt(i.innerStart,0,r),innerEnd:Zt(i.innerEnd,0,r)}}function Jo(t,e,n,s){return{x:n+t*Math.cos(e),y:s+t*Math.sin(e)}}function $c(t,e,n,s,i,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=e,d=Math.max(e.outerRadius+s+n-c,0),f=u>0?u+s+n+c:0;let g=0;const _=i-l;if(s){const L=u>0?u-s:0,I=d>0?d-s:0,V=(L+I)/2,Q=V!==0?_*V/(V+s):_;g=(_-Q)/2}const m=Math.max(.001,_*d-n/yt)/d,b=(_-m)/2,w=l+b+g,$=i-b-g,{outerStart:A,outerEnd:D,innerStart:x,innerEnd:y}=_6(e,f,d,$-w),S=d-A,E=d-D,T=w+A/S,C=$-D/E,B=f+x,J=f+y,ae=w+x/B,Y=$-y/J;if(t.beginPath(),o){const L=(T+C)/2;if(t.arc(r,a,d,T,L),t.arc(r,a,d,L,C),D>0){const Z=Jo(E,C,r,a);t.arc(Z.x,Z.y,D,C,$+Rt)}const I=Jo(J,$,r,a);if(t.lineTo(I.x,I.y),y>0){const Z=Jo(J,Y,r,a);t.arc(Z.x,Z.y,y,$+Rt,Y+Math.PI)}const V=($-y/f+(w+x/f))/2;if(t.arc(r,a,f,$-y/f,V,!0),t.arc(r,a,f,V,w+x/f,!0),x>0){const Z=Jo(B,ae,r,a);t.arc(Z.x,Z.y,x,ae+Math.PI,w-Rt)}const Q=Jo(S,w,r,a);if(t.lineTo(Q.x,Q.y),A>0){const Z=Jo(S,T,r,a);t.arc(Z.x,Z.y,A,w-Rt,T)}}else{t.moveTo(r,a);const L=Math.cos(T)*d+r,I=Math.sin(T)*d+a;t.lineTo(L,I);const V=Math.cos(C)*d+r,Q=Math.sin(C)*d+a;t.lineTo(V,Q)}t.closePath()}function v6(t,e,n,s,i){const{fullCircles:o,startAngle:r,circumference:a}=e;let l=e.endAngle;if(o){$c(t,e,n,s,l,i);for(let c=0;c<o;++c)t.fill();isNaN(a)||(l=r+(a%bt||bt))}return $c(t,e,n,s,l,i),t.fill(),l}function b6(t,e,n,s,i){const{fullCircles:o,startAngle:r,circumference:a,options:l}=e,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f}=l,g=l.borderAlign==="inner";if(!c)return;t.setLineDash(d||[]),t.lineDashOffset=f,g?(t.lineWidth=c*2,t.lineJoin=u||"round"):(t.lineWidth=c,t.lineJoin=u||"bevel");let _=e.endAngle;if(o){$c(t,e,n,s,_,i);for(let m=0;m<o;++m)t.stroke();isNaN(a)||(_=r+(a%bt||bt))}g&&g6(t,e,_),o||($c(t,e,n,s,_,i),t.stroke())}class y6 extends si{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,s){const i=this.getProps(["x","y"],s),{angle:o,distance:r}=u0(i,{x:e,y:n}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),f=(this.options.spacing+this.options.borderWidth)/2,_=qe(d,l-a)>=bt||Ha(o,a,l),m=Us(r,c+f,u+f);return _&&m}getCenterPoint(e){const{x:n,y:s,startAngle:i,endAngle:o,innerRadius:r,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:l,spacing:c}=this.options,u=(i+o)/2,d=(r+a+c+l)/2;return{x:n+Math.cos(u)*d,y:s+Math.sin(u)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:s}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,r=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>bt?Math.floor(s/bt):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*i,Math.sin(a)*i);const l=1-Math.sin(Math.min(yt,s||0)),c=i*l;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,v6(e,this,c,o,r),b6(e,this,c,o,r),e.restore()}}function U0(t,e,n=e){t.lineCap=qe(n.borderCapStyle,e.borderCapStyle),t.setLineDash(qe(n.borderDash,e.borderDash)),t.lineDashOffset=qe(n.borderDashOffset,e.borderDashOffset),t.lineJoin=qe(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=qe(n.borderWidth,e.borderWidth),t.strokeStyle=qe(n.borderColor,e.borderColor)}function w6(t,e,n){t.lineTo(n.x,n.y)}function x6(t){return t.stepped?VB:t.tension||t.cubicInterpolationMode==="monotone"?HB:w6}function K0(t,e,n={}){const s=t.length,{start:i=0,end:o=s-1}=n,{start:r,end:a}=e,l=Math.max(i,r),c=Math.min(o,a),u=i<r&&o<r||i>a&&o>a;return{count:s,start:l,loop:e.loop,ilen:c<l&&!u?s+c-l:c-l}}function k6(t,e,n,s){const{points:i,options:o}=e,{count:r,start:a,loop:l,ilen:c}=K0(i,n,s),u=x6(o);let{move:d=!0,reverse:f}=s||{},g,_,m;for(g=0;g<=c;++g)_=i[(a+(f?c-g:g))%r],!_.skip&&(d?(t.moveTo(_.x,_.y),d=!1):u(t,m,_,f,o.stepped),m=_);return l&&(_=i[(a+(f?c:0))%r],u(t,m,_,f,o.stepped)),!!l}function S6(t,e,n,s){const i=e.points,{count:o,start:r,ilen:a}=K0(i,n,s),{move:l=!0,reverse:c}=s||{};let u=0,d=0,f,g,_,m,b,w;const $=D=>(r+(c?a-D:D))%o,A=()=>{m!==b&&(t.lineTo(u,b),t.lineTo(u,m),t.lineTo(u,w))};for(l&&(g=i[$(0)],t.moveTo(g.x,g.y)),f=0;f<=a;++f){if(g=i[$(f)],g.skip)continue;const D=g.x,x=g.y,y=D|0;y===_?(x<m?m=x:x>b&&(b=x),u=(d*u+D)/++d):(A(),t.lineTo(D,x),_=y,d=0,m=b=x),w=x}A()}function Zd(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?S6:k6}function $6(t){return t.stepped?b4:t.tension||t.cubicInterpolationMode==="monotone"?y4:ho}function A6(t,e,n,s){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,s)&&i.closePath()),U0(t,e.options),t.stroke(i)}function C6(t,e,n,s){const{segments:i,options:o}=e,r=Zd(e);for(const a of i)U0(t,o,a.style),t.beginPath(),r(t,e,a,{start:n,end:n+s-1})&&t.closePath(),t.stroke()}const E6=typeof Path2D=="function";function P6(t,e,n,s){E6&&!e.options.segment?A6(t,e,n,s):C6(t,e,n,s)}class au extends si{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const i=s.spanGaps?this._loop:this._fullLoop;d4(this._points,s,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=A4(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,s=e.length;return s&&n[e[s-1].end]}interpolate(e,n){const s=this.options,i=e[n],o=this.points,r=T0(this,{property:n,start:i,end:i});if(!r.length)return;const a=[],l=$6(s);let c,u;for(c=0,u=r.length;c<u;++c){const{start:d,end:f}=r[c],g=o[d],_=o[f];if(g===_){a.push(g);continue}const m=Math.abs((i-g[n])/(_[n]-g[n])),b=l(g,_,m,s.stepped);b[n]=e[n],a.push(b)}return a.length===1?a[0]:a}pathSegment(e,n,s){return Zd(this)(e,this,n,s)}path(e,n,s){const i=this.segments,o=Zd(this);let r=this._loop;n=n||0,s=s||this.points.length-n;for(const a of i)r&=o(e,this,a,{start:n,end:n+s-1});return!!r}draw(e,n,s,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(e.save(),P6(e,this,s,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function b_(t,e,n,s){const i=t.options,{[n]:o}=t.getProps([n],s);return Math.abs(e-o)<i.radius+i.hitRadius}class T6 extends si{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,s){const i=this.options,{x:o,y:r}=this.getProps(["x","y"],s);return Math.pow(e-o,2)+Math.pow(n-r,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(e,n){return b_(this,e,"x",n)}inYRange(e,n){return b_(this,e,"y",n)}getCenterPoint(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);const s=n&&e.borderWidth||0;return(n+s)*2}draw(e,n){const s=this.options;this.skip||s.radius<.1||!qs(this,n,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,Jd(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function q0(t,e){const{x:n,y:s,base:i,width:o,height:r}=t.getProps(["x","y","base","width","height"],e);let a,l,c,u,d;return t.horizontal?(d=r/2,a=Math.min(n,i),l=Math.max(n,i),c=s-d,u=s+d):(d=o/2,a=n-d,l=n+d,c=Math.min(s,i),u=Math.max(s,i)),{left:a,top:c,right:l,bottom:u}}function ki(t,e,n,s){return t?0:Zt(e,n,s)}function M6(t,e,n){const s=t.options.borderWidth,i=t.borderSkipped,o=b0(s);return{t:ki(i.top,o.top,0,n),r:ki(i.right,o.right,0,e),b:ki(i.bottom,o.bottom,0,n),l:ki(i.left,o.left,0,e)}}function D6(t,e,n){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,o=xo(i),r=Math.min(e,n),a=t.borderSkipped,l=s||nt(i);return{topLeft:ki(!l||a.top||a.left,o.topLeft,0,r),topRight:ki(!l||a.top||a.right,o.topRight,0,r),bottomLeft:ki(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:ki(!l||a.bottom||a.right,o.bottomRight,0,r)}}function O6(t){const e=q0(t),n=e.right-e.left,s=e.bottom-e.top,i=M6(t,n/2,s/2),o=D6(t,n/2,s/2);return{outer:{x:e.left,y:e.top,w:n,h:s,radius:o},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:s-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function ud(t,e,n,s){const i=e===null,o=n===null,a=t&&!(i&&o)&&q0(t,s);return a&&(i||Us(e,a.left,a.right))&&(o||Us(n,a.top,a.bottom))}function I6(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function R6(t,e){t.rect(e.x,e.y,e.w,e.h)}function dd(t,e,n={}){const s=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,o=(t.x+t.w!==n.x+n.w?e:0)-s,r=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+s,y:t.y+i,w:t.w+o,h:t.h+r,radius:t.radius}}class L6 extends si{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:s,backgroundColor:i}}=this,{inner:o,outer:r}=O6(this),a=I6(r.radius)?ja:R6;e.save(),(r.w!==o.w||r.h!==o.h)&&(e.beginPath(),a(e,dd(r,n,o)),e.clip(),a(e,dd(o,-n,r)),e.fillStyle=s,e.fill("evenodd")),e.beginPath(),a(e,dd(o,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,s){return ud(this,e,n,s)}inXRange(e,n){return ud(this,e,null,n)}inYRange(e,n){return ud(this,null,e,n)}getCenterPoint(e){const{x:n,y:s,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return{x:o?(n+i)/2:n,y:o?s:(s+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}function N6(t,e,n,s,i){const o=i.samples||s;if(o>=n)return t.slice(e,e+n);const r=[],a=(n-2)/(o-2);let l=0;const c=e+n-1;let u=e,d,f,g,_,m;for(r[l++]=t[u],d=0;d<o-2;d++){let b=0,w=0,$;const A=Math.floor((d+1)*a)+1+e,D=Math.min(Math.floor((d+2)*a)+1,n)+e,x=D-A;for($=A;$<D;$++)b+=t[$].x,w+=t[$].y;b/=x,w/=x;const y=Math.floor(d*a)+1+e,S=Math.min(Math.floor((d+1)*a)+1,n)+e,{x:E,y:T}=t[u];for(g=_=-1,$=y;$<S;$++)_=.5*Math.abs((E-b)*(t[$].y-T)-(E-t[$].x)*(w-T)),_>g&&(g=_,f=t[$],m=$);r[l++]=f,u=m}return r[l++]=t[c],r}function F6(t,e,n,s){let i=0,o=0,r,a,l,c,u,d,f,g,_,m;const b=[],w=e+n-1,$=t[e].x,D=t[w].x-$;for(r=e;r<e+n;++r){a=t[r],l=(a.x-$)/D*s,c=a.y;const x=l|0;if(x===u)c<_?(_=c,d=r):c>m&&(m=c,f=r),i=(o*i+a.x)/++o;else{const y=r-1;if(!it(d)&&!it(f)){const S=Math.min(d,f),E=Math.max(d,f);S!==g&&S!==y&&b.push({...t[S],x:i}),E!==g&&E!==y&&b.push({...t[E],x:i})}r>0&&y!==g&&b.push(t[y]),b.push(a),u=x,o=0,_=m=c,d=f=g=r}}return b}function G0(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function y_(t){t.data.datasets.forEach(e=>{G0(e)})}function B6(t,e){const n=e.length;let s=0,i;const{iScale:o}=t,{min:r,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(s=Zt(Ks(e,o.axis,r).lo,0,n-1)),c?i=Zt(Ks(e,o.axis,a).hi+1,s,n)-s:i=n-s,{start:s,count:i}}var V6={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){y_(t);return}const s=t.width;t.data.datasets.forEach((i,o)=>{const{_data:r,indexAxis:a}=i,l=t.getDatasetMeta(o),c=r||i.data;if(oa([a,t.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=t.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:d,count:f}=B6(l,c);const g=n.threshold||4*s;if(f<=g){G0(i);return}it(r)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}}));let _;switch(n.algorithm){case"lttb":_=N6(c,d,f,s,n);break;case"min-max":_=F6(c,d,f,s);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=_})},destroy(t){y_(t)}};function H6(t,e,n){const s=t.segments,i=t.points,o=e.points,r=[];for(const a of s){let{start:l,end:c}=a;c=Ff(l,c,i);const u=eh(n,i[l],i[c],a.loop);if(!e.segments){r.push({source:a,target:u,start:i[l],end:i[c]});continue}const d=T0(e,u);for(const f of d){const g=eh(n,o[f.start],o[f.end],f.loop),_=P0(a,i,g);for(const m of _)r.push({source:m,target:f,start:{[n]:w_(u,g,"start",Math.max)},end:{[n]:w_(u,g,"end",Math.min)}})}}return r}function eh(t,e,n,s){if(s)return;let i=e[t],o=n[t];return t==="angle"&&(i=On(i),o=On(o)),{property:t,start:i,end:o}}function j6(t,e){const{x:n=null,y:s=null}=t||{},i=e.points,o=[];return e.segments.forEach(({start:r,end:a})=>{a=Ff(r,a,i);const l=i[r],c=i[a];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):n!==null&&(o.push({x:n,y:l.y}),o.push({x:n,y:c.y}))}),o}function Ff(t,e,n){for(;e>t;e--){const s=n[e];if(!isNaN(s.x)&&!isNaN(s.y))break}return e}function w_(t,e,n,s){return t&&e?s(t[n],e[n]):t?t[n]:e?e[n]:0}function J0(t,e){let n=[],s=!1;return vt(t)?(s=!0,n=t):n=j6(t,e),n.length?new au({points:n,options:{tension:0},_loop:s,_fullLoop:s}):null}function x_(t){return t&&t.fill!==!1}function W6(t,e,n){let i=t[e].fill;const o=[e];let r;if(!n)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!Ct(i))return i;if(r=t[i],!r)return!1;if(r.visible)return i;o.push(i),i=r.fill}return!1}function z6(t,e,n){const s=q6(t);if(nt(s))return isNaN(s.value)?!1:s;let i=parseFloat(s);return Ct(i)&&Math.floor(i)===i?Y6(s[0],e,i,n):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Y6(t,e,n,s){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=s?!1:n}function U6(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:nt(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function K6(t,e,n){let s;return t==="start"?s=n:t==="end"?s=e.options.reverse?e.min:e.max:nt(t)?s=t.value:s=e.getBaseValue(),s}function q6(t){const e=t.options,n=e.fill;let s=qe(n&&n.target,n);return s===void 0&&(s=!!e.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function G6(t){const{scale:e,index:n,line:s}=t,i=[],o=s.segments,r=s.points,a=J6(e,n);a.push(J0({x:null,y:e.bottom},s));for(let l=0;l<o.length;l++){const c=o[l];for(let u=c.start;u<=c.end;u++)X6(i,r[u],a)}return new au({points:i,options:{}})}function J6(t,e){const n=[],s=t.getMatchingVisibleMetas("line");for(let i=0;i<s.length;i++){const o=s[i];if(o.index===e)break;o.hidden||n.unshift(o.dataset)}return n}function X6(t,e,n){const s=[];for(let i=0;i<n.length;i++){const o=n[i],{first:r,last:a,point:l}=Q6(o,e,"x");if(!(!l||r&&a)){if(r)s.unshift(l);else if(t.push(l),!a)break}}t.push(...s)}function Q6(t,e,n){const s=t.interpolate(e,n);if(!s)return{};const i=s[n],o=t.segments,r=t.points;let a=!1,l=!1;for(let c=0;c<o.length;c++){const u=o[c],d=r[u.start][n],f=r[u.end][n];if(Us(i,d,f)){a=i===d,l=i===f;break}}return{first:a,last:l,point:s}}class X0{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,s){const{x:i,y:o,radius:r}=this;return n=n||{start:0,end:bt},e.arc(i,o,r,n.end,n.start,!0),!s.bounds}interpolate(e){const{x:n,y:s,radius:i}=this,o=e.angle;return{x:n+Math.cos(o)*i,y:s+Math.sin(o)*i,angle:o}}}function Z6(t){const{chart:e,fill:n,line:s}=t;if(Ct(n))return eH(e,n);if(n==="stack")return G6(t);if(n==="shape")return!0;const i=tH(t);return i instanceof X0?i:J0(i,s)}function eH(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function tH(t){return(t.scale||{}).getPointPositionForValue?sH(t):nH(t)}function nH(t){const{scale:e={},fill:n}=t,s=U6(n,e);if(Ct(s)){const i=e.isHorizontal();return{x:i?s:null,y:i?null:s}}return null}function sH(t){const{scale:e,fill:n}=t,s=e.options,i=e.getLabels().length,o=s.reverse?e.max:e.min,r=K6(n,e,o),a=[];if(s.grid.circular){const l=e.getPointPositionForValue(0,o);return new X0({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(r)})}for(let l=0;l<i;++l)a.push(e.getPointPositionForValue(l,r));return a}function hd(t,e,n){const s=Z6(e),{line:i,scale:o,axis:r}=e,a=i.options,l=a.fill,c=a.backgroundColor,{above:u=c,below:d=c}=l||{};s&&i.points.length&&(su(t,n),iH(t,{line:i,target:s,above:u,below:d,area:n,scale:o,axis:r}),iu(t))}function iH(t,e){const{line:n,target:s,above:i,below:o,area:r,scale:a}=e,l=n._loop?"angle":e.axis;t.save(),l==="x"&&o!==i&&(k_(t,s,r.top),S_(t,{line:n,target:s,color:i,scale:a,property:l}),t.restore(),t.save(),k_(t,s,r.bottom)),S_(t,{line:n,target:s,color:o,scale:a,property:l}),t.restore()}function k_(t,e,n){const{segments:s,points:i}=e;let o=!0,r=!1;t.beginPath();for(const a of s){const{start:l,end:c}=a,u=i[l],d=i[Ff(l,c,i)];o?(t.moveTo(u.x,u.y),o=!1):(t.lineTo(u.x,n),t.lineTo(u.x,u.y)),r=!!e.pathSegment(t,a,{move:r}),r?t.closePath():t.lineTo(d.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function S_(t,e){const{line:n,target:s,property:i,color:o,scale:r}=e,a=H6(n,s,i);for(const{source:l,target:c,start:u,end:d}of a){const{style:{backgroundColor:f=o}={}}=l,g=s!==!0;t.save(),t.fillStyle=f,oH(t,r,g&&eh(i,u,d)),t.beginPath();const _=!!n.pathSegment(t,l);let m;if(g){_?t.closePath():$_(t,s,d,i);const b=!!s.pathSegment(t,c,{move:_,reverse:!0});m=_&&b,m||$_(t,s,u,i)}t.closePath(),t.fill(m?"evenodd":"nonzero"),t.restore()}}function oH(t,e,n){const{top:s,bottom:i}=e.chart.chartArea,{property:o,start:r,end:a}=n||{};o==="x"&&(t.beginPath(),t.rect(r,s,a-r,i-s),t.clip())}function $_(t,e,n,s){const i=e.interpolate(n,s);i&&t.lineTo(i.x,i.y)}var rH={id:"filler",afterDatasetsUpdate(t,e,n){const s=(t.data.datasets||[]).length,i=[];let o,r,a,l;for(r=0;r<s;++r)o=t.getDatasetMeta(r),a=o.dataset,l=null,a&&a.options&&a instanceof au&&(l={visible:t.isDatasetVisible(r),index:r,fill:z6(a,r,s),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,i.push(l);for(r=0;r<s;++r)l=i[r],!(!l||l.fill===!1)&&(l.fill=W6(i,r,n.propagate))},beforeDraw(t,e,n){const s=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let r=i.length-1;r>=0;--r){const a=i[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),s&&a.fill&&hd(t.ctx,a,o))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const s=t.getSortedVisibleDatasetMetas();for(let i=s.length-1;i>=0;--i){const o=s[i].$filler;x_(o)&&hd(t.ctx,o,t.chartArea)}},beforeDatasetDraw(t,e,n){const s=e.meta.$filler;!x_(s)||n.drawTime!=="beforeDatasetDraw"||hd(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const A_=(t,e)=>{let{boxHeight:n=e,boxWidth:s=e}=t;return t.usePointStyle&&(n=Math.min(n,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:n,itemHeight:Math.max(e,n)}},aH=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class C_ extends si{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,s){this.maxWidth=e,this.maxHeight=n,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=ft(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(s=>e.filter(s,this.chart.data))),e.sort&&(n=n.sort((s,i)=>e.sort(s,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const s=e.labels,i=Yt(s.font),o=i.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=A_(s,o);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(r,o,a,l)+10):(u=this.maxHeight,c=this._fitCols(r,i,a,l)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,s,i){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let d=e;o.textAlign="left",o.textBaseline="middle";let f=-1,g=-u;return this.legendItems.forEach((_,m)=>{const b=s+n/2+o.measureText(_.text).width;(m===0||c[c.length-1]+b+2*a>r)&&(d+=u,c[c.length-(m>0?0:1)]=0,g+=u,f++),l[m]={left:0,top:g,row:f,width:b,height:i},c[c.length-1]+=b+a}),d}_fitCols(e,n,s,i){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=r-e;let d=a,f=0,g=0,_=0,m=0;return this.legendItems.forEach((b,w)=>{const{itemWidth:$,itemHeight:A}=lH(s,n,o,b,i);w>0&&g+A+2*a>u&&(d+=f+a,c.push({width:f,height:g}),_+=f+a,m++,f=g=0),l[w]={left:_,top:g,col:m,width:$,height:A},f=Math.max(f,$),g+=A+a}),d+=f,c.push({width:f,height:g}),d}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:s,labels:{padding:i},rtl:o}}=this,r=ar(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=an(s,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=an(s,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+e+i,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+i}else{let a=0,l=an(s,this.top+e+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=an(s,this.top+e+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;su(e,this),this._draw(),iu(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:s,ctx:i}=this,{align:o,labels:r}=e,a=Et.color,l=ar(e.rtl,this.left,this.width),c=Yt(r.font),{padding:u}=r,d=c.size,f=d/2;let g;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:_,boxHeight:m,itemHeight:b}=A_(r,d),w=function(y,S,E){if(isNaN(_)||_<=0||isNaN(m)||m<0)return;i.save();const T=qe(E.lineWidth,1);if(i.fillStyle=qe(E.fillStyle,a),i.lineCap=qe(E.lineCap,"butt"),i.lineDashOffset=qe(E.lineDashOffset,0),i.lineJoin=qe(E.lineJoin,"miter"),i.lineWidth=T,i.strokeStyle=qe(E.strokeStyle,a),i.setLineDash(qe(E.lineDash,[])),r.usePointStyle){const C={radius:m*Math.SQRT2/2,pointStyle:E.pointStyle,rotation:E.rotation,borderWidth:T},B=l.xPlus(y,_/2),J=S+f;v0(i,C,B,J,r.pointStyleWidth&&_)}else{const C=S+Math.max((d-m)/2,0),B=l.leftForLtr(y,_),J=xo(E.borderRadius);i.beginPath(),Object.values(J).some(ae=>ae!==0)?ja(i,{x:B,y:C,w:_,h:m,radius:J}):i.rect(B,C,_,m),i.fill(),T!==0&&i.stroke()}i.restore()},$=function(y,S,E){Po(i,E.text,y,S+b/2,c,{strikethrough:E.hidden,textAlign:l.textAlign(E.textAlign)})},A=this.isHorizontal(),D=this._computeTitleHeight();A?g={x:an(o,this.left+u,this.right-s[0]),y:this.top+u+D,line:0}:g={x:this.left+u,y:an(o,this.top+D+u,this.bottom-n[0].height),line:0},A0(this.ctx,e.textDirection);const x=b+u;this.legendItems.forEach((y,S)=>{i.strokeStyle=y.fontColor,i.fillStyle=y.fontColor;const E=i.measureText(y.text).width,T=l.textAlign(y.textAlign||(y.textAlign=r.textAlign)),C=_+f+E;let B=g.x,J=g.y;l.setWidth(this.width),A?S>0&&B+C+u>this.right&&(J=g.y+=x,g.line++,B=g.x=an(o,this.left+u,this.right-s[g.line])):S>0&&J+x>this.bottom&&(B=g.x=B+n[g.line].width+u,g.line++,J=g.y=an(o,this.top+D+u,this.bottom-n[g.line].height));const ae=l.x(B);if(w(ae,J,y),B=PB(T,B+_+f,A?B+C:this.right,e.rtl),$(l.x(B),J,y),A)g.x+=C+u;else if(typeof y.text!="string"){const Y=c.lineHeight;g.y+=Q0(y,Y)+u}else g.y+=x}),C0(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,s=Yt(n.font),i=hn(n.padding);if(!n.display)return;const o=ar(e.rtl,this.left,this.width),r=this.ctx,a=n.position,l=s.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=an(e.align,d,this.right-f);else{const _=this.columnSizes.reduce((m,b)=>Math.max(m,b.height),0);u=c+an(e.align,this.top,this.bottom-_-e.labels.padding-this._computeTitleHeight())}const g=an(a,d,d+f);r.textAlign=o.textAlign(Pf(a)),r.textBaseline="middle",r.strokeStyle=n.color,r.fillStyle=n.color,r.font=s.string,Po(r,n.text,g,u,s)}_computeTitleHeight(){const e=this.options.title,n=Yt(e.font),s=hn(e.padding);return e.display?n.lineHeight+s.height:0}_getLegendItemAt(e,n){let s,i,o;if(Us(e,this.left,this.right)&&Us(n,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;s<o.length;++s)if(i=o[s],Us(e,i.left,i.left+i.width)&&Us(n,i.top,i.top+i.height))return this.legendItems[s]}return null}handleEvent(e){const n=this.options;if(!dH(e.type,n))return;const s=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,o=aH(i,s);i&&!o&&ft(n.onLeave,[e,i,this],this),this._hoveredItem=s,s&&!o&&ft(n.onHover,[e,s,this],this)}else s&&ft(n.onClick,[e,s,this],this)}}function lH(t,e,n,s,i){const o=cH(s,t,e,n),r=uH(i,s,e.lineHeight);return{itemWidth:o,itemHeight:r}}function cH(t,e,n,s){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((o,r)=>o.length>r.length?o:r)),e+n.size/2+s.measureText(i).width}function uH(t,e,n){let s=t;return typeof e.text!="string"&&(s=Q0(e,n)),s}function Q0(t,e){const n=t.text?t.text.length:0;return e*n}function dH(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var hH={id:"legend",_element:C_,start(t,e,n){const s=t.legend=new C_({ctx:t.ctx,options:n,chart:t});qn.configure(t,s,n),qn.addBox(t,s)},stop(t){qn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const s=t.legend;qn.configure(t,s,n),s.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const s=e.datasetIndex,i=n.chart;i.isDatasetVisible(s)?(i.hide(s),e.hidden=!0):(i.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:s,textAlign:i,color:o,useBorderRadius:r,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=hn(c.borderWidth);return{text:e[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Z0 extends si{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=vt(s.text)?s.text.length:1;this._padding=hn(s.padding);const o=i*Yt(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:s,bottom:i,right:o,options:r}=this,a=r.align;let l=0,c,u,d;return this.isHorizontal()?(u=an(a,s,o),d=n+e,c=o-s):(r.position==="left"?(u=s+e,d=an(a,i,n),l=yt*-.5):(u=o-e,d=an(a,n,i),l=yt*.5),c=i-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const s=Yt(n.font),o=s.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Po(e,n.text,0,0,s,{color:n.color,maxWidth:l,rotation:c,textAlign:Pf(n.align),textBaseline:"middle",translation:[r,a]})}}function fH(t,e){const n=new Z0({ctx:t.ctx,options:e,chart:t});qn.configure(t,n,e),qn.addBox(t,n),t.titleBlock=n}var pH={id:"title",_element:Z0,start(t,e,n){fH(t,n)},stop(t){const e=t.titleBlock;qn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const s=t.titleBlock;qn.configure(t,s,n),s.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const aa={average(t){if(!t.length)return!1;let e,n,s=0,i=0,o=0;for(e=0,n=t.length;e<n;++e){const r=t[e].element;if(r&&r.hasValue()){const a=r.tooltipPosition();s+=a.x,i+=a.y,++o}}return{x:s/o,y:i/o}},nearest(t,e){if(!t.length)return!1;let n=e.x,s=e.y,i=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=t.length;o<r;++o){const l=t[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=qd(e,c);u<i&&(i=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,s=l.y}return{x:n,y:s}}};function ms(t,e){return e&&(vt(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Vs(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
`)>-1?t.split(`
|
|
`):t}function gH(t,e){const{element:n,datasetIndex:s,index:i}=e,o=t.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(i);return{chart:t,label:r,parsed:o.getParsed(i),raw:t.data.datasets[s].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:s,element:n}}function E_(t,e){const n=t.chart.ctx,{body:s,footer:i,title:o}=t,{boxWidth:r,boxHeight:a}=e,l=Yt(e.bodyFont),c=Yt(e.titleFont),u=Yt(e.footerFont),d=o.length,f=i.length,g=s.length,_=hn(e.padding);let m=_.height,b=0,w=s.reduce((D,x)=>D+x.before.length+x.lines.length+x.after.length,0);if(w+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),w){const D=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=g*D+(w-g)*l.lineHeight+(w-1)*e.bodySpacing}f&&(m+=e.footerMarginTop+f*u.lineHeight+(f-1)*e.footerSpacing);let $=0;const A=function(D){b=Math.max(b,n.measureText(D).width+$)};return n.save(),n.font=c.string,ct(t.title,A),n.font=l.string,ct(t.beforeBody.concat(t.afterBody),A),$=e.displayColors?r+2+e.boxPadding:0,ct(s,D=>{ct(D.before,A),ct(D.lines,A),ct(D.after,A)}),$=0,n.font=u.string,ct(t.footer,A),n.restore(),b+=_.width,{width:b,height:m}}function mH(t,e){const{y:n,height:s}=e;return n<s/2?"top":n>t.height-s/2?"bottom":"center"}function _H(t,e,n,s){const{x:i,width:o}=s,r=n.caretSize+n.caretPadding;if(t==="left"&&i+o+r>e.width||t==="right"&&i-o-r<0)return!0}function vH(t,e,n,s){const{x:i,width:o}=n,{width:r,chartArea:{left:a,right:l}}=t;let c="center";return s==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=r-o/2&&(c="right"),_H(c,t,e,n)&&(c="center"),c}function P_(t,e,n){const s=n.yAlign||e.yAlign||mH(t,n);return{xAlign:n.xAlign||e.xAlign||vH(t,e,n,s),yAlign:s}}function bH(t,e){let{x:n,width:s}=t;return e==="right"?n-=s:e==="center"&&(n-=s/2),n}function yH(t,e,n){let{y:s,height:i}=t;return e==="top"?s+=n:e==="bottom"?s-=i+n:s-=i/2,s}function T_(t,e,n,s){const{caretSize:i,caretPadding:o,cornerRadius:r}=t,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:g}=xo(r);let _=bH(e,a);const m=yH(e,l,c);return l==="center"?a==="left"?_+=c:a==="right"&&(_-=c):a==="left"?_-=Math.max(u,f)+i:a==="right"&&(_+=Math.max(d,g)+i),{x:Zt(_,0,s.width-e.width),y:Zt(m,0,s.height-e.height)}}function Wl(t,e,n){const s=hn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-s.right:t.x+s.left}function M_(t){return ms([],Vs(t))}function wH(t,e,n){return Wi(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function D_(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const e1={beforeTitle:Ns,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,s=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return n[e.dataIndex]}return""},afterTitle:Ns,beforeBody:Ns,beforeLabel:Ns,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return it(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Ns,afterBody:Ns,beforeFooter:Ns,footer:Ns,afterFooter:Ns};function Sn(t,e,n,s){const i=t[e].call(n,s);return typeof i>"u"?e1[e].call(n,s):i}class O_ extends si{static positioners=aa;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,s=this.options.setContext(this.getContext()),i=s.enabled&&n.options.animation&&s.animations,o=new M0(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=wH(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:s}=n,i=Sn(s,"beforeTitle",this,e),o=Sn(s,"title",this,e),r=Sn(s,"afterTitle",this,e);let a=[];return a=ms(a,Vs(i)),a=ms(a,Vs(o)),a=ms(a,Vs(r)),a}getBeforeBody(e,n){return M_(Sn(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:s}=n,i=[];return ct(e,o=>{const r={before:[],lines:[],after:[]},a=D_(s,o);ms(r.before,Vs(Sn(a,"beforeLabel",this,o))),ms(r.lines,Sn(a,"label",this,o)),ms(r.after,Vs(Sn(a,"afterLabel",this,o))),i.push(r)}),i}getAfterBody(e,n){return M_(Sn(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:s}=n,i=Sn(s,"beforeFooter",this,e),o=Sn(s,"footer",this,e),r=Sn(s,"afterFooter",this,e);let a=[];return a=ms(a,Vs(i)),a=ms(a,Vs(o)),a=ms(a,Vs(r)),a}_createItems(e){const n=this._active,s=this.chart.data,i=[],o=[],r=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(gH(this.chart,n[l]));return e.filter&&(a=a.filter((u,d,f)=>e.filter(u,d,f,s))),e.itemSort&&(a=a.sort((u,d)=>e.itemSort(u,d,s))),ct(a,u=>{const d=D_(e.callbacks,u);i.push(Sn(d,"labelColor",this,u)),o.push(Sn(d,"labelPointStyle",this,u)),r.push(Sn(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(e,n){const s=this.options.setContext(this.getContext()),i=this._active;let o,r=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=aa[s.position].call(this,i,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);const l=this._size=E_(this,s),c=Object.assign({},a,l),u=P_(this.chart,s,c),d=T_(s,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,s,i){const o=this.getCaretPosition(e,s,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(e,n,s){const{xAlign:i,yAlign:o}=this,{caretSize:r,cornerRadius:a}=s,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=xo(a),{x:f,y:g}=e,{width:_,height:m}=n;let b,w,$,A,D,x;return o==="center"?(D=g+m/2,i==="left"?(b=f,w=b-r,A=D+r,x=D-r):(b=f+_,w=b+r,A=D-r,x=D+r),$=b):(i==="left"?w=f+Math.max(l,u)+r:i==="right"?w=f+_-Math.max(c,d)-r:w=this.caretX,o==="top"?(A=g,D=A-r,b=w-r,$=w+r):(A=g+m,D=A+r,b=w+r,$=w-r),x=A),{x1:b,x2:w,x3:$,y1:A,y2:D,y3:x}}drawTitle(e,n,s){const i=this.title,o=i.length;let r,a,l;if(o){const c=ar(s.rtl,this.x,this.width);for(e.x=Wl(this,s.titleAlign,s),n.textAlign=c.textAlign(s.titleAlign),n.textBaseline="middle",r=Yt(s.titleFont),a=s.titleSpacing,n.fillStyle=s.titleColor,n.font=r.string,l=0;l<o;++l)n.fillText(i[l],c.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+a,l+1===o&&(e.y+=s.titleMarginBottom-a)}}_drawColorBox(e,n,s,i,o){const r=this.labelColors[s],a=this.labelPointStyles[s],{boxHeight:l,boxWidth:c}=o,u=Yt(o.bodyFont),d=Wl(this,"left",o),f=i.x(d),g=l<u.lineHeight?(u.lineHeight-l)/2:0,_=n.y+g;if(o.usePointStyle){const m={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},b=i.leftForLtr(f,c)+c/2,w=_+l/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,Jd(e,m,b,w),e.strokeStyle=r.borderColor,e.fillStyle=r.backgroundColor,Jd(e,m,b,w)}else{e.lineWidth=nt(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,e.strokeStyle=r.borderColor,e.setLineDash(r.borderDash||[]),e.lineDashOffset=r.borderDashOffset||0;const m=i.leftForLtr(f,c),b=i.leftForLtr(i.xPlus(f,1),c-2),w=xo(r.borderRadius);Object.values(w).some($=>$!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,ja(e,{x:m,y:_,w:c,h:l,radius:w}),e.fill(),e.stroke(),e.fillStyle=r.backgroundColor,e.beginPath(),ja(e,{x:b,y:_+1,w:c-2,h:l-2,radius:w}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(m,_,c,l),e.strokeRect(m,_,c,l),e.fillStyle=r.backgroundColor,e.fillRect(b,_+1,c-2,l-2))}e.fillStyle=this.labelTextColors[s]}drawBody(e,n,s){const{body:i}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=s,d=Yt(s.bodyFont);let f=d.lineHeight,g=0;const _=ar(s.rtl,this.x,this.width),m=function(E){n.fillText(E,_.x(e.x+g),e.y+f/2),e.y+=f+o},b=_.textAlign(r);let w,$,A,D,x,y,S;for(n.textAlign=r,n.textBaseline="middle",n.font=d.string,e.x=Wl(this,b,s),n.fillStyle=s.bodyColor,ct(this.beforeBody,m),g=a&&b!=="right"?r==="center"?c/2+u:c+2+u:0,D=0,y=i.length;D<y;++D){for(w=i[D],$=this.labelTextColors[D],n.fillStyle=$,ct(w.before,m),A=w.lines,a&&A.length&&(this._drawColorBox(n,e,D,_,s),f=Math.max(d.lineHeight,l)),x=0,S=A.length;x<S;++x)m(A[x]),f=d.lineHeight;ct(w.after,m)}g=0,f=d.lineHeight,ct(this.afterBody,m),e.y-=o}drawFooter(e,n,s){const i=this.footer,o=i.length;let r,a;if(o){const l=ar(s.rtl,this.x,this.width);for(e.x=Wl(this,s.footerAlign,s),e.y+=s.footerMarginTop,n.textAlign=l.textAlign(s.footerAlign),n.textBaseline="middle",r=Yt(s.footerFont),n.fillStyle=s.footerColor,n.font=r.string,a=0;a<o;++a)n.fillText(i[a],l.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+s.footerSpacing}}drawBackground(e,n,s,i){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=e,{width:c,height:u}=s,{topLeft:d,topRight:f,bottomLeft:g,bottomRight:_}=xo(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+d,l),r==="top"&&this.drawCaret(e,n,s,i),n.lineTo(a+c-f,l),n.quadraticCurveTo(a+c,l,a+c,l+f),r==="center"&&o==="right"&&this.drawCaret(e,n,s,i),n.lineTo(a+c,l+u-_),n.quadraticCurveTo(a+c,l+u,a+c-_,l+u),r==="bottom"&&this.drawCaret(e,n,s,i),n.lineTo(a+g,l+u),n.quadraticCurveTo(a,l+u,a,l+u-g),r==="center"&&o==="left"&&this.drawCaret(e,n,s,i),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,s=this.$animations,i=s&&s.x,o=s&&s.y;if(i||o){const r=aa[e.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=E_(this,e),l=Object.assign({},r,this._size),c=P_(n,e,l),u=T_(e,l,c,n);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const r=hn(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=s,this.drawBackground(o,e,i,n),A0(e,n.textDirection),o.y+=r.top,this.drawTitle(o,e,n),this.drawBody(o,e,n),this.drawFooter(o,e,n),C0(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const s=this._active,i=e.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!bc(s,i),r=this._positionChanged(i,n);(o||r)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,s=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],r=this._getActiveElements(e,o,n,s),a=this._positionChanged(r,e),l=n||!bc(r,o)||a;return l&&(this._active=r,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,s,i){const o=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(e,o.mode,o,s);return o.reverse&&r.reverse(),r}_positionChanged(e,n){const{caretX:s,caretY:i,options:o}=this,r=aa[o.position].call(this,e,n);return r!==!1&&(s!==r.x||i!==r.y)}}var xH={id:"tooltip",_element:O_,positioners:aa,afterInit(t,e,n){n&&(t.tooltip=new O_({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:e1},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const kH=(t,e,n,s)=>(typeof e=="string"?(n=t.push(e)-1,s.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function SH(t,e,n,s){const i=t.indexOf(e);if(i===-1)return kH(t,e,n,s);const o=t.lastIndexOf(e);return i!==o?n:i}const $H=(t,e)=>t===null?null:Zt(Math.round(t),0,e);function I_(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class AH extends Ro{static id="category";static defaults={ticks:{callback:I_}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const s=this.getLabels();for(const{index:i,label:o}of n)s[i]===o&&s.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(it(e))return null;const s=this.getLabels();return n=isFinite(n)&&s[n]===e?n:SH(s,e,qe(n,e),this._addedLabels),$H(n,s.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:s,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(s=0),n||(i=this.getLabels().length-1)),this.min=s,this.max=i}buildTicks(){const e=this.min,n=this.max,s=this.options.offset,i=[];let o=this.getLabels();o=e===0&&n===o.length-1?o:o.slice(e,n+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let r=e;r<=n;r++)i.push({value:r});return i}getLabelForValue(e){return I_.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function CH(t,e){const n=[],{bounds:i,step:o,min:r,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=t,g=o||1,_=u-1,{min:m,max:b}=e,w=!it(r),$=!it(a),A=!it(c),D=(b-m)/(d+1);let x=Pm((b-m)/_/g)*g,y,S,E,T;if(x<1e-14&&!w&&!$)return[{value:m},{value:b}];T=Math.ceil(b/x)-Math.floor(m/x),T>_&&(x=Pm(T*x/_/g)*g),it(l)||(y=Math.pow(10,l),x=Math.ceil(x*y)/y),i==="ticks"?(S=Math.floor(m/x)*x,E=Math.ceil(b/x)*x):(S=m,E=b),w&&$&&o&&xB((a-r)/o,x/1e3)?(T=Math.round(Math.min((a-r)/x,u)),x=(a-r)/T,S=r,E=a):A?(S=w?r:S,E=$?a:E,T=c-1,x=(E-S)/T):(T=(E-S)/x,wa(T,Math.round(T),x/1e3)?T=Math.round(T):T=Math.ceil(T));const C=Math.max(Tm(x),Tm(S));y=Math.pow(10,it(l)?C:l),S=Math.round(S*y)/y,E=Math.round(E*y)/y;let B=0;for(w&&(f&&S!==r?(n.push({value:r}),S<r&&B++,wa(Math.round((S+B*x)*y)/y,r,R_(r,D,t))&&B++):S<r&&B++);B<T;++B){const J=Math.round((S+B*x)*y)/y;if($&&J>a)break;n.push({value:J})}return $&&f&&E!==a?n.length&&wa(n[n.length-1].value,a,R_(a,D,t))?n[n.length-1].value=a:n.push({value:a}):(!$||E===a)&&n.push({value:E}),n}function R_(t,e,{horizontal:n,minRotation:s}){const i=rs(s),o=(n?Math.sin(i):Math.cos(i))||.001,r=.75*e*(""+t).length;return Math.min(e/o,r)}class Ac extends Ro{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return it(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:s}=this.getUserBounds();let{min:i,max:o}=this;const r=l=>i=n?i:l,a=l=>o=s?o:l;if(e){const l=As(i),c=As(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);a(o+l),e||r(i-l)}this.min=i,this.max=o}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:s}=e,i;return s?(i=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let s=this.getTickLimit();s=Math.max(2,s);const i={maxTicks:s,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,r=CH(i,o);return e.bounds==="ticks"&&c0(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let n=this.min,s=this.max;if(super.configure(),this.options.offset&&e.length){const i=(s-n)/Math.max(e.length-1,1)/2;n-=i,s+=i}this._startValue=n,this._endValue=s,this._valueRange=s-n}getLabelForValue(e){return nl(e,this.chart.options.locale,this.options.ticks.format)}}class EH extends Ac{static id="linear";static defaults={ticks:{callback:nu.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Ct(e)?e:0,this.max=Ct(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,s=rs(this.options.ticks.minRotation),i=(e?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const za=t=>Math.floor(xi(t)),ao=(t,e)=>Math.pow(10,za(t)+e);function L_(t){return t/Math.pow(10,za(t))===1}function N_(t,e,n){const s=Math.pow(10,n),i=Math.floor(t/s);return Math.ceil(e/s)-i}function PH(t,e){const n=e-t;let s=za(n);for(;N_(t,e,s)>10;)s++;for(;N_(t,e,s)<10;)s--;return Math.min(s,za(t))}function TH(t,{min:e,max:n}){e=Mn(t.min,e);const s=[],i=za(e);let o=PH(e,n),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((e-l)*r)/r,u=Math.floor((e-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,o)),f=Mn(t.min,Math.round((l+u+d*Math.pow(10,o))*r)/r);for(;f<n;)s.push({value:f,major:L_(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,r=o>=0?1:r),f=Math.round((l+u+d*Math.pow(10,o))*r)/r;const g=Mn(t.max,f);return s.push({value:g,major:L_(g),significand:d}),s}class MH extends Ro{static id="logarithmic";static defaults={ticks:{callback:nu.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const s=Ac.prototype.parse.apply(this,[e,n]);if(s===0){this._zero=!0;return}return Ct(s)&&s>0?s:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Ct(e)?Math.max(0,e):null,this.max=Ct(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Ct(this._userMin)&&(this.min=e===ao(this.min,0)?ao(this.min,-1):ao(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let s=this.min,i=this.max;const o=a=>s=e?s:a,r=a=>i=n?i:a;s===i&&(s<=0?(o(1),r(10)):(o(ao(s,-1)),r(ao(i,1)))),s<=0&&o(ao(i,-1)),i<=0&&r(ao(s,1)),this.min=s,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},s=TH(n,this);return e.bounds==="ticks"&&c0(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(e){return e===void 0?"0":nl(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=xi(e),this._valueRange=xi(this.max)-xi(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(xi(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}function th(t){const e=t.ticks;if(e.display&&t.display){const n=hn(e.backdropPadding);return qe(e.font&&e.font.size,Et.font.size)+n.height}return 0}function DH(t,e,n){return n=vt(n)?n:[n],{w:BB(t,e.string,n),h:n.length*e.lineHeight}}function F_(t,e,n,s,i){return t===s||t===i?{start:e-n/2,end:e+n/2}:t<s||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function OH(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),s=[],i=[],o=t._pointLabels.length,r=t.options.pointLabels,a=r.centerPointLabels?yt/o:0;for(let l=0;l<o;l++){const c=r.setContext(t.getPointLabelContext(l));i[l]=c.padding;const u=t.getPointPosition(l,t.drawingArea+i[l],a),d=Yt(c.font),f=DH(t.ctx,d,t._pointLabels[l]);s[l]=f;const g=On(t.getIndexAngle(l)+a),_=Math.round(Cf(g)),m=F_(_,u.x,f.w,0,180),b=F_(_,u.y,f.h,90,270);IH(n,e,g,m,b)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=NH(t,s,i)}function IH(t,e,n,s,i){const o=Math.abs(Math.sin(n)),r=Math.abs(Math.cos(n));let a=0,l=0;s.start<e.l?(a=(e.l-s.start)/o,t.l=Math.min(t.l,e.l-a)):s.end>e.r&&(a=(s.end-e.r)/o,t.r=Math.max(t.r,e.r+a)),i.start<e.t?(l=(e.t-i.start)/r,t.t=Math.min(t.t,e.t-l)):i.end>e.b&&(l=(i.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}function RH(t,e,n){const s=t.drawingArea,{extra:i,additionalAngle:o,padding:r,size:a}=n,l=t.getPointPosition(e,s+i+r,o),c=Math.round(Cf(On(l.angle+Rt))),u=VH(l.y,a.h,c),d=FH(c),f=BH(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+a.w,bottom:u+a.h}}function LH(t,e){if(!e)return!0;const{left:n,top:s,right:i,bottom:o}=t;return!(qs({x:n,y:s},e)||qs({x:n,y:o},e)||qs({x:i,y:s},e)||qs({x:i,y:o},e))}function NH(t,e,n){const s=[],i=t._pointLabels.length,o=t.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:th(o)/2,additionalAngle:r?yt/i:0};let c;for(let u=0;u<i;u++){l.padding=n[u],l.size=e[u];const d=RH(t,u,l);s.push(d),a==="auto"&&(d.visible=LH(d,c),d.visible&&(c=d))}return s}function FH(t){return t===0||t===180?"center":t<180?"left":"right"}function BH(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function VH(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function HH(t,e,n){const{left:s,top:i,right:o,bottom:r}=n,{backdropColor:a}=e;if(!it(a)){const l=xo(e.borderRadius),c=hn(e.backdropPadding);t.fillStyle=a;const u=s-c.left,d=i-c.top,f=o-s+c.width,g=r-i+c.height;Object.values(l).some(_=>_!==0)?(t.beginPath(),ja(t,{x:u,y:d,w:f,h:g,radius:l}),t.fill()):t.fillRect(u,d,f,g)}}function jH(t,e){const{ctx:n,options:{pointLabels:s}}=t;for(let i=e-1;i>=0;i--){const o=t._pointLabelItems[i];if(!o.visible)continue;const r=s.setContext(t.getPointLabelContext(i));HH(n,r,o);const a=Yt(r.font),{x:l,y:c,textAlign:u}=o;Po(n,t._pointLabels[i],l,c+a.lineHeight/2,a,{color:r.color,textAlign:u,textBaseline:"middle"})}}function t1(t,e,n,s){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,bt);else{let o=t.getPointPosition(0,e);i.moveTo(o.x,o.y);for(let r=1;r<s;r++)o=t.getPointPosition(r,e),i.lineTo(o.x,o.y)}}function WH(t,e,n,s,i){const o=t.ctx,r=e.circular,{color:a,lineWidth:l}=e;!r&&!s||!a||!l||n<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(i.dash),o.lineDashOffset=i.dashOffset,o.beginPath(),t1(t,n,r,s),o.closePath(),o.stroke(),o.restore())}function zH(t,e,n){return Wi(t,{label:n,index:e,type:"pointLabel"})}class YH extends Ac{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:nu.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=hn(th(this.options)/2),n=this.width=this.maxWidth-e.width,s=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+s/2+e.top),this.drawingArea=Math.floor(Math.min(n,s)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=Ct(e)&&!isNaN(e)?e:0,this.max=Ct(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/th(this.options))}generateTickLabels(e){Ac.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,s)=>{const i=ft(this.options.pointLabels.callback,[n,s],this);return i||i===0?i:""}).filter((n,s)=>this.chart.getDataVisibility(s))}fit(){const e=this.options;e.display&&e.pointLabels.display?OH(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,s,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((s-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,s,i))}getIndexAngle(e){const n=bt/(this._pointLabels.length||1),s=this.options.startAngle||0;return On(e*n+rs(s))}getDistanceFromCenterForValue(e){if(it(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(it(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const s=n[e];return zH(this.getContext(),e,s)}}getPointPosition(e,n,s=0){const i=this.getIndexAngle(e)-Rt+s;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:s,right:i,bottom:o}=this._pointLabelItems[e];return{left:n,top:s,right:i,bottom:o}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const s=this.ctx;s.save(),s.beginPath(),t1(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),s.closePath(),s.fillStyle=e,s.fill(),s.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:s,grid:i,border:o}=n,r=this._pointLabels.length;let a,l,c;if(n.pointLabels.display&&jH(this,r),i.display&&this.ticks.forEach((u,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),g=i.setContext(f),_=o.setContext(f);WH(this,g,l,r,_)}}),s.display){for(e.save(),a=r-1;a>=0;a--){const u=s.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=u;!f||!d||(e.lineWidth=f,e.strokeStyle=d,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,s=n.ticks;if(!s.display)return;const i=this.getIndexAngle(0);let o,r;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!n.reverse)return;const c=s.setContext(this.getContext(l)),u=Yt(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){e.font=u.string,r=e.measureText(a.label).width,e.fillStyle=c.backdropColor;const d=hn(c.backdropPadding);e.fillRect(-r/2-d.left,-o-u.size/2-d.top,r+d.width,u.size+d.height)}Po(e,a.label,0,-o,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}const lu={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},An=Object.keys(lu);function B_(t,e){return t-e}function V_(t,e){if(it(e))return null;const n=t._adapter,{parser:s,round:i,isoWeekday:o}=t._parseOpts;let r=e;return typeof s=="function"&&(r=s(r)),Ct(r)||(r=typeof s=="string"?n.parse(r,s):n.parse(r)),r===null?null:(i&&(r=i==="week"&&($r(o)||o===!0)?n.startOf(r,"isoWeek",o):n.startOf(r,i)),+r)}function H_(t,e,n,s){const i=An.length;for(let o=An.indexOf(t);o<i-1;++o){const r=lu[An[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((n-e)/(a*r.size))<=s)return An[o]}return An[i-1]}function UH(t,e,n,s,i){for(let o=An.length-1;o>=An.indexOf(n);o--){const r=An[o];if(lu[r].common&&t._adapter.diff(i,s,r)>=e-1)return r}return An[n?An.indexOf(n):0]}function KH(t){for(let e=An.indexOf(t)+1,n=An.length;e<n;++e)if(lu[An[e]].common)return An[e]}function j_(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:s,hi:i}=Ef(n,e),o=n[s]>=e?n[s]:n[i];t[o]=!0}}function qH(t,e,n,s){const i=t._adapter,o=+i.startOf(e[0].value,s),r=e[e.length-1].value;let a,l;for(a=o;a<=r;a=+i.add(a,1,s))l=n[a],l>=0&&(e[l].major=!0);return e}function W_(t,e,n){const s=[],i={},o=e.length;let r,a;for(r=0;r<o;++r)a=e[r],i[a]=r,s.push({value:a,major:!1});return o===0||!n?s:qH(t,s,i,n)}class nh extends Ro{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const s=e.time||(e.time={}),i=this._adapter=new oV._date(e.adapters.date);i.init(n),ya(s.displayFormats,i.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:V_(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,s=e.time.unit||"day";let{min:i,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=Ct(i)&&!isNaN(i)?i:+n.startOf(Date.now(),s),o=Ct(o)&&!isNaN(o)?o:+n.endOf(Date.now(),s)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],s=e[e.length-1]),{min:n,max:s}}buildTicks(){const e=this.options,n=e.time,s=e.ticks,i=s.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,r=this.max,a=AB(i,o,r);return this._unit=n.unit||(s.autoSkip?H_(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):UH(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:KH(this._unit),this.initOffsets(i),e.reverse&&a.reverse(),W_(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,s=0,i,o;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?s=o:s=(o-this.getDecimalForValue(e[e.length-2]))/2);const r=e.length<3?.5:.25;n=Zt(n,0,r),s=Zt(s,0,r),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){const e=this._adapter,n=this.min,s=this.max,i=this.options,o=i.time,r=o.unit||H_(o.minUnit,n,s,this._getLabelCapacity(n)),a=qe(i.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=$r(l)||l===!0,u={};let d=n,f,g;if(c&&(d=+e.startOf(d,"isoWeek",l)),d=+e.startOf(d,c?"day":r),e.diff(s,n,r)>1e5*a)throw new Error(n+" and "+s+" are too far apart with stepSize of "+a+" "+r);const _=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,g=0;f<s;f=+e.add(f,a,r),g++)j_(u,f,_);return(f===s||i.bounds==="ticks"||g===1)&&j_(u,f,_),Object.keys(u).sort(B_).map(m=>+m)}getLabelForValue(e){const n=this._adapter,s=this.options.time;return s.tooltipFormat?n.format(e,s.tooltipFormat):n.format(e,s.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,o=this._unit,r=n||i[o];return this._adapter.format(e,r)}_tickFormatFunction(e,n,s,i){const o=this.options,r=o.ticks.callback;if(r)return ft(r,[e,n,s],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],f=s[n],g=c&&d&&f&&f.major;return this._adapter.format(e,i||(g?d:u))}generateTickLabels(e){let n,s,i;for(n=0,s=e.length;n<s;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,s=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+s)*n.factor)}getValueForPixel(e){const n=this._offsets,s=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+s*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,s=this.ctx.measureText(e).width,i=rs(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),r=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:s*o+a*r,h:s*r+a*o}}_getLabelCapacity(e){const n=this.options.time,s=n.displayFormats,i=s[n.unit]||s.millisecond,o=this._tickFormatFunction(e,0,W_(this,[e],this._majorUnit),i),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,s;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,s=i.length;n<s;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,s;if(e.length)return e;const i=this.getLabels();for(n=0,s=i.length;n<s;++n)e.push(V_(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return h0(e.sort(B_))}}function zl(t,e,n){let s=0,i=t.length-1,o,r,a,l;n?(e>=t[s].pos&&e<=t[i].pos&&({lo:s,hi:i}=Ks(t,"pos",e)),{pos:o,time:a}=t[s],{pos:r,time:l}=t[i]):(e>=t[s].time&&e<=t[i].time&&({lo:s,hi:i}=Ks(t,"time",e)),{time:o,pos:a}=t[s],{time:r,pos:l}=t[i]);const c=r-o;return c?a+(l-a)*(e-o)/c:a}class GH extends nh{static id="timeseries";static defaults=nh.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=zl(n,this.min),this._tableRange=zl(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:s}=this,i=[],o=[];let r,a,l,c,u;for(r=0,a=e.length;r<a;++r)c=e[r],c>=n&&c<=s&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:s,pos:1}];for(r=0,a=i.length;r<a;++r)u=i[r+1],l=i[r-1],c=i[r],Math.round((u+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){const e=this.min,n=this.max;let s=super.getDataTimestamps();return(!s.includes(e)||!s.length)&&s.splice(0,0,e),(!s.includes(n)||s.length===1)&&s.push(n),s.sort((i,o)=>i-o)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),s=this.getLabelTimestamps();return n.length&&s.length?e=this.normalize(n.concat(s)):e=n.length?n:s,e=this._cache.all=e,e}getDecimalForValue(e){return(zl(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,s=this.getDecimalForPixel(e)/n.factor-n.end;return zl(this._table,s*this._tableRange+this._minPos,!0)}}const n1={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},JH={ariaLabel:{type:String},ariaDescribedby:{type:String}},XH={type:{type:String,required:!0},...n1,...JH},QH=Ob[0]==="2"?(t,e)=>Object.assign(t,{attrs:e}):(t,e)=>Object.assign(t,e);function Xo(t){return Fc(t)?Ze(t):t}function ZH(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return Fc(e)?new Proxy(t,{}):t}function e8(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function s1(t,e){t.labels=e}function i1(t,e,n){const s=[];t.datasets=e.map(i=>{const o=t.datasets.find(r=>r[n]===i[n]);return!o||!i.data||s.includes(o)?{...i}:(s.push(o),Object.assign(o,i),o)})}function t8(t,e){const n={labels:[],datasets:[]};return s1(n,t.labels),i1(n,t.datasets,e),n}const n8=Nt({props:XH,setup(t,e){let{expose:n,slots:s}=e;const i=ve(null),o=Fh(null);n({chart:o});const r=()=>{if(!i.value)return;const{type:c,data:u,options:d,plugins:f,datasetIdKey:g}=t,_=t8(u,g),m=ZH(_,u);o.value=new ru(i.value,{type:c,data:m,options:{...d},plugins:f})},a=()=>{const c=Ze(o.value);c&&(c.destroy(),o.value=null)},l=c=>{c.update(t.updateMode)};return qt(r),Yh(a),Bt([()=>t.options,()=>t.data],(c,u)=>{let[d,f]=c,[g,_]=u;const m=Ze(o.value);if(!m)return;let b=!1;if(d){const w=Xo(d),$=Xo(g);w&&w!==$&&(e8(m,w),b=!0)}if(f){const w=Xo(f.labels),$=Xo(_.labels),A=Xo(f.datasets),D=Xo(_.datasets);w!==$&&(s1(m.config.data,w),b=!0),A&&A!==D&&(i1(m.config.data,A,t.datasetIdKey),b=!0)}b&&en(()=>{l(m)})},{deep:!0}),()=>Co("canvas",{role:"img",ariaLabel:t.ariaLabel,ariaDescribedby:t.ariaDescribedby,ref:i},[Co("p",{},[s.default?s.default():""])])}});function o1(t,e){return ru.register(e),Nt({props:n1,setup(n,s){let{expose:i}=s;const o=Fh(null),r=a=>{o.value=a?.chart};return i({chart:o}),()=>Co(n8,QH({ref:r},{type:t,...n}))}})}const s8=o1("bar",I0),i8=o1("line",L0);function Zs(t){return Array.isArray?Array.isArray(t):l1(t)==="[object Array]"}const o8=1/0;function r8(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-o8?"-0":e}function a8(t){return t==null?"":r8(t)}function ks(t){return typeof t=="string"}function r1(t){return typeof t=="number"}function l8(t){return t===!0||t===!1||c8(t)&&l1(t)=="[object Boolean]"}function a1(t){return typeof t=="object"}function c8(t){return a1(t)&&t!==null}function In(t){return t!=null}function fd(t){return!t.trim().length}function l1(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const u8="Incorrect 'index' type",d8=t=>`Invalid value for key ${t}`,h8=t=>`Pattern length exceeds max of ${t}.`,f8=t=>`Missing ${t} property in key`,p8=t=>`Property 'weight' in key '${t}' must be a positive integer`,z_=Object.prototype.hasOwnProperty;class g8{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(s=>{let i=c1(s);this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(s=>{s.weight/=n})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function c1(t){let e=null,n=null,s=null,i=1,o=null;if(ks(t)||Zs(t))s=t,e=Y_(t),n=sh(t);else{if(!z_.call(t,"name"))throw new Error(f8("name"));const r=t.name;if(s=r,z_.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(p8(r));e=Y_(r),n=sh(r),o=t.getFn}return{path:e,id:n,weight:i,src:s,getFn:o}}function Y_(t){return Zs(t)?t:t.split(".")}function sh(t){return Zs(t)?t.join("."):t}function m8(t,e){let n=[],s=!1;const i=(o,r,a)=>{if(In(o))if(!r[a])n.push(o);else{let l=r[a];const c=o[l];if(!In(c))return;if(a===r.length-1&&(ks(c)||r1(c)||l8(c)))n.push(a8(c));else if(Zs(c)){s=!0;for(let u=0,d=c.length;u<d;u+=1)i(c[u],r,a+1)}else r.length&&i(c,r,a+1)}};return i(t,ks(e)?e.split("."):e,0),s?n:n[0]}const _8={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},v8={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},b8={location:0,threshold:.6,distance:100},y8={useExtendedSearch:!1,getFn:m8,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Ke={...v8,..._8,...b8,...y8};const w8=/[^ ]+/g;function x8(t=1,e=3){const n=new Map,s=Math.pow(10,e);return{get(i){const o=i.match(w8).length;if(n.has(o))return n.get(o);const r=1/Math.pow(o,.5*t),a=parseFloat(Math.round(r*s)/s);return n.set(o,a),a},clear(){n.clear()}}}class Bf{constructor({getFn:e=Ke.getFn,fieldNormWeight:n=Ke.fieldNormWeight}={}){this.norm=x8(n,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((n,s)=>{this._keysMap[n.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,ks(this.docs[0])?this.docs.forEach((e,n)=>{this._addString(e,n)}):this.docs.forEach((e,n)=>{this._addObject(e,n)}),this.norm.clear())}add(e){const n=this.size();ks(e)?this._addString(e,n):this._addObject(e,n)}removeAt(e){this.records.splice(e,1);for(let n=e,s=this.size();n<s;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(e,n){return e[this._keysMap[n]]}size(){return this.records.length}_addString(e,n){if(!In(e)||fd(e))return;let s={v:e,i:n,n:this.norm.get(e)};this.records.push(s)}_addObject(e,n){let s={i:n,$:{}};this.keys.forEach((i,o)=>{let r=i.getFn?i.getFn(e):this.getFn(e,i.path);if(In(r)){if(Zs(r)){let a=[];const l=[{nestedArrIndex:-1,value:r}];for(;l.length;){const{nestedArrIndex:c,value:u}=l.pop();if(In(u))if(ks(u)&&!fd(u)){let d={v:u,i:c,n:this.norm.get(u)};a.push(d)}else Zs(u)&&u.forEach((d,f)=>{l.push({nestedArrIndex:f,value:d})})}s.$[o]=a}else if(ks(r)&&!fd(r)){let a={v:r,n:this.norm.get(r)};s.$[o]=a}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function u1(t,e,{getFn:n=Ke.getFn,fieldNormWeight:s=Ke.fieldNormWeight}={}){const i=new Bf({getFn:n,fieldNormWeight:s});return i.setKeys(t.map(c1)),i.setSources(e),i.create(),i}function k8(t,{getFn:e=Ke.getFn,fieldNormWeight:n=Ke.fieldNormWeight}={}){const{keys:s,records:i}=t,o=new Bf({getFn:e,fieldNormWeight:n});return o.setKeys(s),o.setIndexRecords(i),o}function Yl(t,{errors:e=0,currentLocation:n=0,expectedLocation:s=0,distance:i=Ke.distance,ignoreLocation:o=Ke.ignoreLocation}={}){const r=e/t.length;if(o)return r;const a=Math.abs(s-n);return i?r+a/i:a?1:r}function S8(t=[],e=Ke.minMatchCharLength){let n=[],s=-1,i=-1,o=0;for(let r=t.length;o<r;o+=1){let a=t[o];a&&s===-1?s=o:!a&&s!==-1&&(i=o-1,i-s+1>=e&&n.push([s,i]),s=-1)}return t[o-1]&&o-s>=e&&n.push([s,o-1]),n}const po=32;function $8(t,e,n,{location:s=Ke.location,distance:i=Ke.distance,threshold:o=Ke.threshold,findAllMatches:r=Ke.findAllMatches,minMatchCharLength:a=Ke.minMatchCharLength,includeMatches:l=Ke.includeMatches,ignoreLocation:c=Ke.ignoreLocation}={}){if(e.length>po)throw new Error(h8(po));const u=e.length,d=t.length,f=Math.max(0,Math.min(s,d));let g=o,_=f;const m=a>1||l,b=m?Array(d):[];let w;for(;(w=t.indexOf(e,_))>-1;){let S=Yl(e,{currentLocation:w,expectedLocation:f,distance:i,ignoreLocation:c});if(g=Math.min(S,g),_=w+u,m){let E=0;for(;E<u;)b[w+E]=1,E+=1}}_=-1;let $=[],A=1,D=u+d;const x=1<<u-1;for(let S=0;S<u;S+=1){let E=0,T=D;for(;E<T;)Yl(e,{errors:S,currentLocation:f+T,expectedLocation:f,distance:i,ignoreLocation:c})<=g?E=T:D=T,T=Math.floor((D-E)/2+E);D=T;let C=Math.max(1,f-T+1),B=r?d:Math.min(f+T,d)+u,J=Array(B+2);J[B+1]=(1<<S)-1;for(let Y=B;Y>=C;Y-=1){let L=Y-1,I=n[t.charAt(L)];if(m&&(b[L]=+!!I),J[Y]=(J[Y+1]<<1|1)&I,S&&(J[Y]|=($[Y+1]|$[Y])<<1|1|$[Y+1]),J[Y]&x&&(A=Yl(e,{errors:S,currentLocation:L,expectedLocation:f,distance:i,ignoreLocation:c}),A<=g)){if(g=A,_=L,_<=f)break;C=Math.max(1,2*f-_)}}if(Yl(e,{errors:S+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:c})>g)break;$=J}const y={isMatch:_>=0,score:Math.max(.001,A)};if(m){const S=S8(b,a);S.length?l&&(y.indices=S):y.isMatch=!1}return y}function A8(t){let e={};for(let n=0,s=t.length;n<s;n+=1){const i=t.charAt(n);e[i]=(e[i]||0)|1<<s-n-1}return e}class d1{constructor(e,{location:n=Ke.location,threshold:s=Ke.threshold,distance:i=Ke.distance,includeMatches:o=Ke.includeMatches,findAllMatches:r=Ke.findAllMatches,minMatchCharLength:a=Ke.minMatchCharLength,isCaseSensitive:l=Ke.isCaseSensitive,ignoreLocation:c=Ke.ignoreLocation}={}){if(this.options={location:n,threshold:s,distance:i,includeMatches:o,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c},this.pattern=l?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const u=(f,g)=>{this.chunks.push({pattern:f,alphabet:A8(f),startIndex:g})},d=this.pattern.length;if(d>po){let f=0;const g=d%po,_=d-g;for(;f<_;)u(this.pattern.substr(f,po),f),f+=po;if(g){const m=d-po;u(this.pattern.substr(m),m)}}else u(this.pattern,0)}searchIn(e){const{isCaseSensitive:n,includeMatches:s}=this.options;if(n||(e=e.toLowerCase()),this.pattern===e){let _={isMatch:!0,score:0};return s&&(_.indices=[[0,e.length-1]]),_}const{location:i,distance:o,threshold:r,findAllMatches:a,minMatchCharLength:l,ignoreLocation:c}=this.options;let u=[],d=0,f=!1;this.chunks.forEach(({pattern:_,alphabet:m,startIndex:b})=>{const{isMatch:w,score:$,indices:A}=$8(e,_,m,{location:i+b,distance:o,threshold:r,findAllMatches:a,minMatchCharLength:l,includeMatches:s,ignoreLocation:c});w&&(f=!0),d+=$,w&&A&&(u=[...u,...A])});let g={isMatch:f,score:f?d/this.chunks.length:1};return f&&s&&(g.indices=u),g}}class Yi{constructor(e){this.pattern=e}static isMultiMatch(e){return U_(e,this.multiRegex)}static isSingleMatch(e){return U_(e,this.singleRegex)}search(){}}function U_(t,e){const n=t.match(e);return n?n[1]:null}class C8 extends Yi{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const n=e===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class E8 extends Yi{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const s=e.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class P8 extends Yi{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const n=e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class T8 extends Yi{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const n=!e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class M8 extends Yi{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const n=e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class D8 extends Yi{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const n=!e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class h1 extends Yi{constructor(e,{location:n=Ke.location,threshold:s=Ke.threshold,distance:i=Ke.distance,includeMatches:o=Ke.includeMatches,findAllMatches:r=Ke.findAllMatches,minMatchCharLength:a=Ke.minMatchCharLength,isCaseSensitive:l=Ke.isCaseSensitive,ignoreLocation:c=Ke.ignoreLocation}={}){super(e),this._bitapSearch=new d1(e,{location:n,threshold:s,distance:i,includeMatches:o,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class f1 extends Yi{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,s;const i=[],o=this.pattern.length;for(;(s=e.indexOf(this.pattern,n))>-1;)n=s+o,i.push([s,n-1]);const r=!!i.length;return{isMatch:r,score:r?0:1,indices:i}}}const ih=[C8,f1,P8,T8,D8,M8,E8,h1],K_=ih.length,O8=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,I8="|";function R8(t,e={}){return t.split(I8).map(n=>{let s=n.trim().split(O8).filter(o=>o&&!!o.trim()),i=[];for(let o=0,r=s.length;o<r;o+=1){const a=s[o];let l=!1,c=-1;for(;!l&&++c<K_;){const u=ih[c];let d=u.isMultiMatch(a);d&&(i.push(new u(d,e)),l=!0)}if(!l)for(c=-1;++c<K_;){const u=ih[c];let d=u.isSingleMatch(a);if(d){i.push(new u(d,e));break}}}return i})}const L8=new Set([h1.type,f1.type]);class N8{constructor(e,{isCaseSensitive:n=Ke.isCaseSensitive,includeMatches:s=Ke.includeMatches,minMatchCharLength:i=Ke.minMatchCharLength,ignoreLocation:o=Ke.ignoreLocation,findAllMatches:r=Ke.findAllMatches,location:a=Ke.location,threshold:l=Ke.threshold,distance:c=Ke.distance}={}){this.query=null,this.options={isCaseSensitive:n,includeMatches:s,minMatchCharLength:i,findAllMatches:r,ignoreLocation:o,location:a,threshold:l,distance:c},this.pattern=n?e:e.toLowerCase(),this.query=R8(this.pattern,this.options)}static condition(e,n){return n.useExtendedSearch}searchIn(e){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:i}=this.options;e=i?e:e.toLowerCase();let o=0,r=[],a=0;for(let l=0,c=n.length;l<c;l+=1){const u=n[l];r.length=0,o=0;for(let d=0,f=u.length;d<f;d+=1){const g=u[d],{isMatch:_,indices:m,score:b}=g.search(e);if(_){if(o+=1,a+=b,s){const w=g.constructor.type;L8.has(w)?r=[...r,...m]:r.push(m)}}else{a=0,o=0,r.length=0;break}}if(o){let d={isMatch:!0,score:a/o};return s&&(d.indices=r),d}}return{isMatch:!1,score:1}}}const oh=[];function F8(...t){oh.push(...t)}function rh(t,e){for(let n=0,s=oh.length;n<s;n+=1){let i=oh[n];if(i.condition(t,e))return new i(t,e)}return new d1(t,e)}const Cc={AND:"$and",OR:"$or"},ah={PATH:"$path",PATTERN:"$val"},lh=t=>!!(t[Cc.AND]||t[Cc.OR]),B8=t=>!!t[ah.PATH],V8=t=>!Zs(t)&&a1(t)&&!lh(t),q_=t=>({[Cc.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function p1(t,e,{auto:n=!0}={}){const s=i=>{let o=Object.keys(i);const r=B8(i);if(!r&&o.length>1&&!lh(i))return s(q_(i));if(V8(i)){const l=r?i[ah.PATH]:o[0],c=r?i[ah.PATTERN]:i[l];if(!ks(c))throw new Error(d8(l));const u={keyId:sh(l),pattern:c};return n&&(u.searcher=rh(c,e)),u}let a={children:[],operator:o[0]};return o.forEach(l=>{const c=i[l];Zs(c)&&c.forEach(u=>{a.children.push(s(u))})}),a};return lh(t)||(t=q_(t)),s(t)}function H8(t,{ignoreFieldNorm:e=Ke.ignoreFieldNorm}){t.forEach(n=>{let s=1;n.matches.forEach(({key:i,norm:o,score:r})=>{const a=i?i.weight:null;s*=Math.pow(r===0&&a?Number.EPSILON:r,(a||1)*(e?1:o))}),n.score=s})}function j8(t,e){const n=t.matches;e.matches=[],In(n)&&n.forEach(s=>{if(!In(s.indices)||!s.indices.length)return;const{indices:i,value:o}=s;let r={indices:i,value:o};s.key&&(r.key=s.key.src),s.idx>-1&&(r.refIndex=s.idx),e.matches.push(r)})}function W8(t,e){e.score=t.score}function z8(t,e,{includeMatches:n=Ke.includeMatches,includeScore:s=Ke.includeScore}={}){const i=[];return n&&i.push(j8),s&&i.push(W8),t.map(o=>{const{idx:r}=o,a={item:e[r],refIndex:r};return i.length&&i.forEach(l=>{l(o,a)}),a})}class Nr{constructor(e,n={},s){this.options={...Ke,...n},this.options.useExtendedSearch,this._keyStore=new g8(this.options.keys),this.setCollection(e,s)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof Bf))throw new Error(u8);this._myIndex=n||u1(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){In(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const n=[];for(let s=0,i=this._docs.length;s<i;s+=1){const o=this._docs[s];e(o,s)&&(this.removeAt(s),s-=1,i-=1,n.push(o))}return n}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:n=-1}={}){const{includeMatches:s,includeScore:i,shouldSort:o,sortFn:r,ignoreFieldNorm:a}=this.options;let l=ks(e)?ks(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return H8(l,{ignoreFieldNorm:a}),o&&l.sort(r),r1(n)&&n>-1&&(l=l.slice(0,n)),z8(l,this._docs,{includeMatches:s,includeScore:i})}_searchStringList(e){const n=rh(e,this.options),{records:s}=this._myIndex,i=[];return s.forEach(({v:o,i:r,n:a})=>{if(!In(o))return;const{isMatch:l,score:c,indices:u}=n.searchIn(o);l&&i.push({item:o,idx:r,matches:[{score:c,value:o,norm:a,indices:u}]})}),i}_searchLogical(e){const n=p1(e,this.options),s=(a,l,c)=>{if(!a.children){const{keyId:d,searcher:f}=a,g=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(l,d),searcher:f});return g&&g.length?[{idx:c,item:l,matches:g}]:[]}const u=[];for(let d=0,f=a.children.length;d<f;d+=1){const g=a.children[d],_=s(g,l,c);if(_.length)u.push(..._);else if(a.operator===Cc.AND)return[]}return u},i=this._myIndex.records,o={},r=[];return i.forEach(({$:a,i:l})=>{if(In(a)){let c=s(n,a,l);c.length&&(o[l]||(o[l]={idx:l,item:a,matches:[]},r.push(o[l])),c.forEach(({matches:u})=>{o[l].matches.push(...u)}))}}),r}_searchObjectList(e){const n=rh(e,this.options),{keys:s,records:i}=this._myIndex,o=[];return i.forEach(({$:r,i:a})=>{if(!In(r))return;let l=[];s.forEach((c,u)=>{l.push(...this._findMatches({key:c,value:r[u],searcher:n}))}),l.length&&o.push({idx:a,item:r,matches:l})}),o}_findMatches({key:e,value:n,searcher:s}){if(!In(n))return[];let i=[];if(Zs(n))n.forEach(({v:o,i:r,n:a})=>{if(!In(o))return;const{isMatch:l,score:c,indices:u}=s.searchIn(o);l&&i.push({score:c,key:e,value:o,idx:r,norm:a,indices:u})});else{const{v:o,n:r}=n,{isMatch:a,score:l,indices:c}=s.searchIn(o);a&&i.push({score:l,key:e,value:o,norm:r,indices:c})}return i}}Nr.version="7.0.0";Nr.createIndex=u1;Nr.parseIndex=k8;Nr.config=Ke;Nr.parseQuery=p1;F8(N8);const Y8={name:"peerSettings",props:{selectedPeer:Object},data(){return{data:void 0,dataChanged:!1,showKey:!1,saving:!1}},setup(){return{dashboardConfigurationStore:Xe()}},methods:{reset(){this.selectedPeer&&(this.data=JSON.parse(JSON.stringify(this.selectedPeer)),this.dataChanged=!1)},savePeer(){this.saving=!0,ht(`/api/updatePeerSettings/${this.$route.params.id}`,this.data,t=>{this.saving=!1,t.status?this.dashboardConfigurationStore.newMessage("Server","Peer Updated!","success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.$emit("refresh")})},resetPeerData(t){this.saving=!0,ht(`/api/resetPeerData/${this.$route.params.id}`,{id:this.data.id,type:t},e=>{this.saving=!1,e.status?this.dashboardConfigurationStore.newMessage("Server","Peer data usage reset successfully.","success"):this.dashboardConfigurationStore.newMessage("Server",e.message,"danger"),this.$emit("refresh")})}},beforeMount(){this.reset()},mounted(){this.$el.querySelectorAll("input").forEach(t=>{t.addEventListener("keyup",()=>{this.dataChanged=!0})})}},tn=t=>(Ut("data-v-5c34b056"),t=t(),Kt(),t),U8={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},K8={class:"container d-flex h-100 w-100"},q8={class:"m-auto modal-dialog-centered dashboardModal"},G8={class:"card rounded-3 shadow flex-grow-1"},J8={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},X8=tn(()=>h("h4",{class:"mb-0"},"Peer Settings",-1)),Q8={key:0,class:"card-body px-4 pb-4"},Z8={class:"d-flex flex-column gap-2 mb-4"},ej={class:"d-flex align-items-center"},tj=tn(()=>h("small",{class:"text-muted"},"Public Key",-1)),nj={class:"ms-auto"},sj=tn(()=>h("label",{for:"peer_name_textbox",class:"form-label"},[h("small",{class:"text-muted"},"Name")],-1)),ij=["disabled"],oj={class:"d-flex position-relative"},rj=tn(()=>h("label",{for:"peer_private_key_textbox",class:"form-label"},[h("small",{class:"text-muted"},[be("Private Key "),h("code",null,"(Required for QR Code and Download)")])],-1)),aj=["type","disabled"],lj=tn(()=>h("label",{for:"peer_allowed_ip_textbox",class:"form-label"},[h("small",{class:"text-muted"},[be("Allowed IPs "),h("code",null,"(Required)")])],-1)),cj=["disabled"],uj=tn(()=>h("label",{for:"peer_endpoint_allowed_ips",class:"form-label"},[h("small",{class:"text-muted"},[be("Endpoint Allowed IPs "),h("code",null,"(Required)")])],-1)),dj=["disabled"],hj=tn(()=>h("label",{for:"peer_DNS_textbox",class:"form-label"},[h("small",{class:"text-muted"},"DNS")],-1)),fj=["disabled"],pj={class:"accordion mt-3",id:"peerSettingsAccordion"},gj={class:"accordion-item"},mj=tn(()=>h("h2",{class:"accordion-header"},[h("button",{class:"accordion-button rounded-3 collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#peerSettingsAccordionOptional"}," Optional Settings ")],-1)),_j={id:"peerSettingsAccordionOptional",class:"accordion-collapse collapse","data-bs-parent":"#peerSettingsAccordion"},vj={class:"accordion-body d-flex flex-column gap-2 mb-2"},bj=tn(()=>h("label",{for:"peer_preshared_key_textbox",class:"form-label"},[h("small",{class:"text-muted"},"Pre-Shared Key")],-1)),yj=["disabled"],wj=tn(()=>h("label",{for:"peer_mtu",class:"form-label"},[h("small",{class:"text-muted"},"MTU")],-1)),xj=["disabled"],kj=tn(()=>h("label",{for:"peer_keep_alive",class:"form-label"},[h("small",{class:"text-muted"},"Persistent Keepalive")],-1)),Sj=["disabled"],$j=tn(()=>h("hr",null,null,-1)),Aj={class:"d-flex gap-2 align-items-center"},Cj=tn(()=>h("strong",null,"Reset Data Usage",-1)),Ej={class:"d-flex gap-2 ms-auto"},Pj=tn(()=>h("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),Tj=tn(()=>h("i",{class:"bi bi-arrow-down me-2"},null,-1)),Mj=tn(()=>h("i",{class:"bi bi-arrow-up me-2"},null,-1)),Dj={class:"d-flex align-items-center gap-2"},Oj=["disabled"],Ij=tn(()=>h("i",{class:"bi bi-arrow-clockwise ms-2"},null,-1)),Rj=["disabled"],Lj=tn(()=>h("i",{class:"bi bi-save-fill ms-2"},null,-1));function Nj(t,e,n,s,i,o){return M(),F("div",U8,[h("div",K8,[h("div",q8,[h("div",G8,[h("div",J8,[X8,h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=r=>this.$emit("close"))})]),this.data?(M(),F("div",Q8,[h("div",Z8,[h("div",ej,[tj,h("small",nj,[h("samp",null,me(this.data.id),1)])]),h("div",null,[sj,Oe(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[1]||(e[1]=r=>this.data.name=r),id:"peer_name_textbox",placeholder:""},null,8,ij),[[je,this.data.name]])]),h("div",null,[h("div",oj,[rj,h("a",{role:"button",class:"ms-auto text-decoration-none toggleShowKey",onClick:e[2]||(e[2]=r=>this.showKey=!this.showKey)},[h("i",{class:Ce(["bi",[this.showKey?"bi-eye-slash-fill":"bi-eye-fill"]])},null,2)])]),Oe(h("input",{type:[this.showKey?"text":"password"],class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[3]||(e[3]=r=>this.data.private_key=r),id:"peer_private_key_textbox",style:{"padding-right":"40px"}},null,8,aj),[[_C,this.data.private_key]])]),h("div",null,[lj,Oe(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[4]||(e[4]=r=>this.data.allowed_ip=r),id:"peer_allowed_ip_textbox"},null,8,cj),[[je,this.data.allowed_ip]])]),h("div",null,[uj,Oe(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[5]||(e[5]=r=>this.data.endpoint_allowed_ip=r),id:"peer_endpoint_allowed_ips"},null,8,dj),[[je,this.data.endpoint_allowed_ip]])]),h("div",null,[hj,Oe(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[6]||(e[6]=r=>this.data.DNS=r),id:"peer_DNS_textbox"},null,8,fj),[[je,this.data.DNS]])]),h("div",pj,[h("div",gj,[mj,h("div",_j,[h("div",vj,[h("div",null,[bj,Oe(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[7]||(e[7]=r=>this.data.preshared_key=r),id:"peer_preshared_key_textbox"},null,8,yj),[[je,this.data.preshared_key]])]),h("div",null,[wj,Oe(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[8]||(e[8]=r=>this.data.mtu=r),id:"peer_mtu"},null,8,xj),[[je,this.data.mtu]])]),h("div",null,[kj,Oe(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[9]||(e[9]=r=>this.data.keepalive=r),id:"peer_keep_alive"},null,8,Sj),[[je,this.data.keepalive]])])])])])]),$j,h("div",Aj,[Cj,h("div",Ej,[h("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[10]||(e[10]=r=>this.resetPeerData("total"))},[Pj,be(" Total ")]),h("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[11]||(e[11]=r=>this.resetPeerData("receive"))},[Tj,be(" Received ")]),h("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[12]||(e[12]=r=>this.resetPeerData("sent"))},[Mj,be(" Sent ")])])])]),h("div",Dj,[h("button",{class:"btn btn-secondary rounded-3 shadow",onClick:e[13]||(e[13]=r=>this.reset()),disabled:!this.dataChanged||this.saving},[be(" Revert "),Ij],8,Oj),h("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!this.dataChanged||this.saving,onClick:e[14]||(e[14]=r=>this.savePeer())},[be(" Save Peer"),Lj],8,Rj)])])):re("",!0)])])])])}const Fj=We(Y8,[["render",Nj],["__scopeId","data-v-5c34b056"]]);var Lo={},Bj=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},g1={},Bn={};let Vf;const Vj=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Bn.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};Bn.getSymbolTotalCodewords=function(e){return Vj[e]};Bn.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};Bn.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Vf=e};Bn.isKanjiModeEnabled=function(){return typeof Vf<"u"};Bn.toSJIS=function(e){return Vf(e)};var cu={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(s){return s&&typeof s.bit<"u"&&s.bit>=0&&s.bit<4},t.from=function(s,i){if(t.isValid(s))return s;try{return e(s)}catch{return i}}})(cu);function m1(){this.buffer=[],this.length=0}m1.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n<e;n++)this.putBit((t>>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Hj=m1;function il(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}il.prototype.set=function(t,e,n,s){const i=t*this.size+e;this.data[i]=n,s&&(this.reservedBit[i]=!0)};il.prototype.get=function(t,e){return this.data[t*this.size+e]};il.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};il.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var jj=il,_1={};(function(t){const e=Bn.getSymbolSize;t.getRowColCoords=function(s){if(s===1)return[];const i=Math.floor(s/7)+2,o=e(s),r=o===145?26:Math.ceil((o-13)/(2*i-2))*2,a=[o-7];for(let l=1;l<i-1;l++)a[l]=a[l-1]-r;return a.push(6),a.reverse()},t.getPositions=function(s){const i=[],o=t.getRowColCoords(s),r=o.length;for(let a=0;a<r;a++)for(let l=0;l<r;l++)a===0&&l===0||a===0&&l===r-1||a===r-1&&l===0||i.push([o[a],o[l]]);return i}})(_1);var v1={};const Wj=Bn.getSymbolSize,G_=7;v1.getPositions=function(e){const n=Wj(e);return[[0,0],[n-G_,0],[0,n-G_]]};var b1={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},t.from=function(i){return t.isValid(i)?parseInt(i,10):void 0},t.getPenaltyN1=function(i){const o=i.size;let r=0,a=0,l=0,c=null,u=null;for(let d=0;d<o;d++){a=l=0,c=u=null;for(let f=0;f<o;f++){let g=i.get(d,f);g===c?a++:(a>=5&&(r+=e.N1+(a-5)),c=g,a=1),g=i.get(f,d),g===u?l++:(l>=5&&(r+=e.N1+(l-5)),u=g,l=1)}a>=5&&(r+=e.N1+(a-5)),l>=5&&(r+=e.N1+(l-5))}return r},t.getPenaltyN2=function(i){const o=i.size;let r=0;for(let a=0;a<o-1;a++)for(let l=0;l<o-1;l++){const c=i.get(a,l)+i.get(a,l+1)+i.get(a+1,l)+i.get(a+1,l+1);(c===4||c===0)&&r++}return r*e.N2},t.getPenaltyN3=function(i){const o=i.size;let r=0,a=0,l=0;for(let c=0;c<o;c++){a=l=0;for(let u=0;u<o;u++)a=a<<1&2047|i.get(c,u),u>=10&&(a===1488||a===93)&&r++,l=l<<1&2047|i.get(u,c),u>=10&&(l===1488||l===93)&&r++}return r*e.N3},t.getPenaltyN4=function(i){let o=0;const r=i.data.length;for(let l=0;l<r;l++)o+=i.data[l];return Math.abs(Math.ceil(o*100/r/5)-10)*e.N4};function n(s,i,o){switch(s){case t.Patterns.PATTERN000:return(i+o)%2===0;case t.Patterns.PATTERN001:return i%2===0;case t.Patterns.PATTERN010:return o%3===0;case t.Patterns.PATTERN011:return(i+o)%3===0;case t.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(o/3))%2===0;case t.Patterns.PATTERN101:return i*o%2+i*o%3===0;case t.Patterns.PATTERN110:return(i*o%2+i*o%3)%2===0;case t.Patterns.PATTERN111:return(i*o%3+(i+o)%2)%2===0;default:throw new Error("bad maskPattern:"+s)}}t.applyMask=function(i,o){const r=o.size;for(let a=0;a<r;a++)for(let l=0;l<r;l++)o.isReserved(l,a)||o.xor(l,a,n(i,l,a))},t.getBestMask=function(i,o){const r=Object.keys(t.Patterns).length;let a=0,l=1/0;for(let c=0;c<r;c++){o(c),t.applyMask(c,i);const u=t.getPenaltyN1(i)+t.getPenaltyN2(i)+t.getPenaltyN3(i)+t.getPenaltyN4(i);t.applyMask(c,i),u<l&&(l=u,a=c)}return a}})(b1);var uu={};const Si=cu,Ul=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Kl=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];uu.getBlocksCount=function(e,n){switch(n){case Si.L:return Ul[(e-1)*4+0];case Si.M:return Ul[(e-1)*4+1];case Si.Q:return Ul[(e-1)*4+2];case Si.H:return Ul[(e-1)*4+3];default:return}};uu.getTotalCodewordsCount=function(e,n){switch(n){case Si.L:return Kl[(e-1)*4+0];case Si.M:return Kl[(e-1)*4+1];case Si.Q:return Kl[(e-1)*4+2];case Si.H:return Kl[(e-1)*4+3];default:return}};var y1={},du={};const Sa=new Uint8Array(512),Ec=new Uint8Array(256);(function(){let e=1;for(let n=0;n<255;n++)Sa[n]=e,Ec[e]=n,e<<=1,e&256&&(e^=285);for(let n=255;n<512;n++)Sa[n]=Sa[n-255]})();du.log=function(e){if(e<1)throw new Error("log("+e+")");return Ec[e]};du.exp=function(e){return Sa[e]};du.mul=function(e,n){return e===0||n===0?0:Sa[Ec[e]+Ec[n]]};(function(t){const e=du;t.mul=function(s,i){const o=new Uint8Array(s.length+i.length-1);for(let r=0;r<s.length;r++)for(let a=0;a<i.length;a++)o[r+a]^=e.mul(s[r],i[a]);return o},t.mod=function(s,i){let o=new Uint8Array(s);for(;o.length-i.length>=0;){const r=o[0];for(let l=0;l<i.length;l++)o[l]^=e.mul(i[l],r);let a=0;for(;a<o.length&&o[a]===0;)a++;o=o.slice(a)}return o},t.generateECPolynomial=function(s){let i=new Uint8Array([1]);for(let o=0;o<s;o++)i=t.mul(i,new Uint8Array([1,e.exp(o)]));return i}})(y1);const w1=y1;function Hf(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}Hf.prototype.initialize=function(e){this.degree=e,this.genPoly=w1.generateECPolynomial(this.degree)};Hf.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(e.length+this.degree);n.set(e);const s=w1.mod(n,this.genPoly),i=this.degree-s.length;if(i>0){const o=new Uint8Array(this.degree);return o.set(s,i),o}return s};var zj=Hf,x1={},Ui={},jf={};jf.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Ms={};const k1="[0-9]+",Yj="[A-Z $%*+\\-./:]+";let Ya="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ya=Ya.replace(/u/g,"\\u");const Uj="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ya+`)(?:.|[\r
|
|
]))+`;Ms.KANJI=new RegExp(Ya,"g");Ms.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Ms.BYTE=new RegExp(Uj,"g");Ms.NUMERIC=new RegExp(k1,"g");Ms.ALPHANUMERIC=new RegExp(Yj,"g");const Kj=new RegExp("^"+Ya+"$"),qj=new RegExp("^"+k1+"$"),Gj=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Ms.testKanji=function(e){return Kj.test(e)};Ms.testNumeric=function(e){return qj.test(e)};Ms.testAlphanumeric=function(e){return Gj.test(e)};(function(t){const e=jf,n=Ms;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(o,r){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?o.ccBits[0]:r<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return n.testNumeric(o)?t.NUMERIC:n.testAlphanumeric(o)?t.ALPHANUMERIC:n.testKanji(o)?t.KANJI:t.BYTE},t.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},t.isValid=function(o){return o&&o.bit&&o.ccBits};function s(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+i)}}t.from=function(o,r){if(t.isValid(o))return o;try{return s(o)}catch{return r}}})(Ui);(function(t){const e=Bn,n=uu,s=cu,i=Ui,o=jf,r=7973,a=e.getBCHDigit(r);function l(f,g,_){for(let m=1;m<=40;m++)if(g<=t.getCapacity(m,_,f))return m}function c(f,g){return i.getCharCountIndicator(f,g)+4}function u(f,g){let _=0;return f.forEach(function(m){const b=c(m.mode,g);_+=b+m.getBitsLength()}),_}function d(f,g){for(let _=1;_<=40;_++)if(u(f,_)<=t.getCapacity(_,g,i.MIXED))return _}t.from=function(g,_){return o.isValid(g)?parseInt(g,10):_},t.getCapacity=function(g,_,m){if(!o.isValid(g))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=i.BYTE);const b=e.getSymbolTotalCodewords(g),w=n.getTotalCodewordsCount(g,_),$=(b-w)*8;if(m===i.MIXED)return $;const A=$-c(m,g);switch(m){case i.NUMERIC:return Math.floor(A/10*3);case i.ALPHANUMERIC:return Math.floor(A/11*2);case i.KANJI:return Math.floor(A/13);case i.BYTE:default:return Math.floor(A/8)}},t.getBestVersionForData=function(g,_){let m;const b=s.from(_,s.M);if(Array.isArray(g)){if(g.length>1)return d(g,b);if(g.length===0)return 1;m=g[0]}else m=g;return l(m.mode,m.getLength(),b)},t.getEncodedBits=function(g){if(!o.isValid(g)||g<7)throw new Error("Invalid QR Code version");let _=g<<12;for(;e.getBCHDigit(_)-a>=0;)_^=r<<e.getBCHDigit(_)-a;return g<<12|_}})(x1);var S1={};const ch=Bn,$1=1335,Jj=21522,J_=ch.getBCHDigit($1);S1.getEncodedBits=function(e,n){const s=e.bit<<3|n;let i=s<<10;for(;ch.getBCHDigit(i)-J_>=0;)i^=$1<<ch.getBCHDigit(i)-J_;return(s<<10|i)^Jj};var A1={};const Xj=Ui;function Er(t){this.mode=Xj.NUMERIC,this.data=t.toString()}Er.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};Er.prototype.getLength=function(){return this.data.length};Er.prototype.getBitsLength=function(){return Er.getBitsLength(this.data.length)};Er.prototype.write=function(e){let n,s,i;for(n=0;n+3<=this.data.length;n+=3)s=this.data.substr(n,3),i=parseInt(s,10),e.put(i,10);const o=this.data.length-n;o>0&&(s=this.data.substr(n),i=parseInt(s,10),e.put(i,o*3+1))};var Qj=Er;const Zj=Ui,pd=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Pr(t){this.mode=Zj.ALPHANUMERIC,this.data=t}Pr.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Pr.prototype.getLength=function(){return this.data.length};Pr.prototype.getBitsLength=function(){return Pr.getBitsLength(this.data.length)};Pr.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let s=pd.indexOf(this.data[n])*45;s+=pd.indexOf(this.data[n+1]),e.put(s,11)}this.data.length%2&&e.put(pd.indexOf(this.data[n]),6)};var eW=Pr,tW=function(e){for(var n=[],s=e.length,i=0;i<s;i++){var o=e.charCodeAt(i);if(o>=55296&&o<=56319&&s>i+1){var r=e.charCodeAt(i+1);r>=56320&&r<=57343&&(o=(o-55296)*1024+r-56320+65536,i+=1)}if(o<128){n.push(o);continue}if(o<2048){n.push(o>>6|192),n.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){n.push(o>>12|224),n.push(o>>6&63|128),n.push(o&63|128);continue}if(o>=65536&&o<=1114111){n.push(o>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const nW=tW,sW=Ui;function Tr(t){this.mode=sW.BYTE,typeof t=="string"&&(t=nW(t)),this.data=new Uint8Array(t)}Tr.getBitsLength=function(e){return e*8};Tr.prototype.getLength=function(){return this.data.length};Tr.prototype.getBitsLength=function(){return Tr.getBitsLength(this.data.length)};Tr.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)};var iW=Tr;const oW=Ui,rW=Bn;function Mr(t){this.mode=oW.KANJI,this.data=t}Mr.getBitsLength=function(e){return e*13};Mr.prototype.getLength=function(){return this.data.length};Mr.prototype.getBitsLength=function(){return Mr.getBitsLength(this.data.length)};Mr.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=rW.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
|
|
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var aW=Mr,C1={exports:{}};(function(t){var e={single_source_shortest_paths:function(n,s,i){var o={},r={};r[s]=0;var a=e.PriorityQueue.make();a.push(s,0);for(var l,c,u,d,f,g,_,m,b;!a.empty();){l=a.pop(),c=l.value,d=l.cost,f=n[c]||{};for(u in f)f.hasOwnProperty(u)&&(g=f[u],_=d+g,m=r[u],b=typeof r[u]>"u",(b||m>_)&&(r[u]=_,a.push(u,_),o[u]=c))}if(typeof i<"u"&&typeof r[i]>"u"){var w=["Could not find a path from ",s," to ",i,"."].join("");throw new Error(w)}return o},extract_shortest_path_from_predecessor_list:function(n,s){for(var i=[],o=s;o;)i.push(o),n[o],o=n[o];return i.reverse(),i},find_path:function(n,s,i){var o=e.single_source_shortest_paths(n,s,i);return e.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(n){var s=e.PriorityQueue,i={},o;n=n||{};for(o in s)s.hasOwnProperty(o)&&(i[o]=s[o]);return i.queue=[],i.sorter=n.sorter||s.default_sorter,i},default_sorter:function(n,s){return n.cost-s.cost},push:function(n,s){var i={value:n,cost:s};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(C1);var lW=C1.exports;(function(t){const e=Ui,n=Qj,s=eW,i=iW,o=aW,r=Ms,a=Bn,l=lW;function c(w){return unescape(encodeURIComponent(w)).length}function u(w,$,A){const D=[];let x;for(;(x=w.exec(A))!==null;)D.push({data:x[0],index:x.index,mode:$,length:x[0].length});return D}function d(w){const $=u(r.NUMERIC,e.NUMERIC,w),A=u(r.ALPHANUMERIC,e.ALPHANUMERIC,w);let D,x;return a.isKanjiModeEnabled()?(D=u(r.BYTE,e.BYTE,w),x=u(r.KANJI,e.KANJI,w)):(D=u(r.BYTE_KANJI,e.BYTE,w),x=[]),$.concat(A,D,x).sort(function(S,E){return S.index-E.index}).map(function(S){return{data:S.data,mode:S.mode,length:S.length}})}function f(w,$){switch($){case e.NUMERIC:return n.getBitsLength(w);case e.ALPHANUMERIC:return s.getBitsLength(w);case e.KANJI:return o.getBitsLength(w);case e.BYTE:return i.getBitsLength(w)}}function g(w){return w.reduce(function($,A){const D=$.length-1>=0?$[$.length-1]:null;return D&&D.mode===A.mode?($[$.length-1].data+=A.data,$):($.push(A),$)},[])}function _(w){const $=[];for(let A=0;A<w.length;A++){const D=w[A];switch(D.mode){case e.NUMERIC:$.push([D,{data:D.data,mode:e.ALPHANUMERIC,length:D.length},{data:D.data,mode:e.BYTE,length:D.length}]);break;case e.ALPHANUMERIC:$.push([D,{data:D.data,mode:e.BYTE,length:D.length}]);break;case e.KANJI:$.push([D,{data:D.data,mode:e.BYTE,length:c(D.data)}]);break;case e.BYTE:$.push([{data:D.data,mode:e.BYTE,length:c(D.data)}])}}return $}function m(w,$){const A={},D={start:{}};let x=["start"];for(let y=0;y<w.length;y++){const S=w[y],E=[];for(let T=0;T<S.length;T++){const C=S[T],B=""+y+T;E.push(B),A[B]={node:C,lastCount:0},D[B]={};for(let J=0;J<x.length;J++){const ae=x[J];A[ae]&&A[ae].node.mode===C.mode?(D[ae][B]=f(A[ae].lastCount+C.length,C.mode)-f(A[ae].lastCount,C.mode),A[ae].lastCount+=C.length):(A[ae]&&(A[ae].lastCount=C.length),D[ae][B]=f(C.length,C.mode)+4+e.getCharCountIndicator(C.mode,$))}}x=E}for(let y=0;y<x.length;y++)D[x[y]].end=0;return{map:D,table:A}}function b(w,$){let A;const D=e.getBestModeForData(w);if(A=e.from($,D),A!==e.BYTE&&A.bit<D.bit)throw new Error('"'+w+'" cannot be encoded with mode '+e.toString(A)+`.
|
|
Suggested mode is: `+e.toString(D));switch(A===e.KANJI&&!a.isKanjiModeEnabled()&&(A=e.BYTE),A){case e.NUMERIC:return new n(w);case e.ALPHANUMERIC:return new s(w);case e.KANJI:return new o(w);case e.BYTE:return new i(w)}}t.fromArray=function($){return $.reduce(function(A,D){return typeof D=="string"?A.push(b(D,null)):D.data&&A.push(b(D.data,D.mode)),A},[])},t.fromString=function($,A){const D=d($,a.isKanjiModeEnabled()),x=_(D),y=m(x,A),S=l.find_path(y.map,"start","end"),E=[];for(let T=1;T<S.length-1;T++)E.push(y.table[S[T]].node);return t.fromArray(g(E))},t.rawSplit=function($){return t.fromArray(d($,a.isKanjiModeEnabled()))}})(A1);const hu=Bn,gd=cu,cW=Hj,uW=jj,dW=_1,hW=v1,uh=b1,dh=uu,fW=zj,Pc=x1,pW=S1,gW=Ui,md=A1;function mW(t,e){const n=t.size,s=hW.getPositions(e);for(let i=0;i<s.length;i++){const o=s[i][0],r=s[i][1];for(let a=-1;a<=7;a++)if(!(o+a<=-1||n<=o+a))for(let l=-1;l<=7;l++)r+l<=-1||n<=r+l||(a>=0&&a<=6&&(l===0||l===6)||l>=0&&l<=6&&(a===0||a===6)||a>=2&&a<=4&&l>=2&&l<=4?t.set(o+a,r+l,!0,!0):t.set(o+a,r+l,!1,!0))}}function _W(t){const e=t.size;for(let n=8;n<e-8;n++){const s=n%2===0;t.set(n,6,s,!0),t.set(6,n,s,!0)}}function vW(t,e){const n=dW.getPositions(e);for(let s=0;s<n.length;s++){const i=n[s][0],o=n[s][1];for(let r=-2;r<=2;r++)for(let a=-2;a<=2;a++)r===-2||r===2||a===-2||a===2||r===0&&a===0?t.set(i+r,o+a,!0,!0):t.set(i+r,o+a,!1,!0)}}function bW(t,e){const n=t.size,s=Pc.getEncodedBits(e);let i,o,r;for(let a=0;a<18;a++)i=Math.floor(a/3),o=a%3+n-8-3,r=(s>>a&1)===1,t.set(i,o,r,!0),t.set(o,i,r,!0)}function _d(t,e,n){const s=t.size,i=pW.getEncodedBits(e,n);let o,r;for(o=0;o<15;o++)r=(i>>o&1)===1,o<6?t.set(o,8,r,!0):o<8?t.set(o+1,8,r,!0):t.set(s-15+o,8,r,!0),o<8?t.set(8,s-o-1,r,!0):o<9?t.set(8,15-o-1+1,r,!0):t.set(8,15-o-1,r,!0);t.set(s-8,8,1,!0)}function yW(t,e){const n=t.size;let s=-1,i=n-1,o=7,r=0;for(let a=n-1;a>0;a-=2)for(a===6&&a--;;){for(let l=0;l<2;l++)if(!t.isReserved(i,a-l)){let c=!1;r<e.length&&(c=(e[r]>>>o&1)===1),t.set(i,a-l,c),o--,o===-1&&(r++,o=7)}if(i+=s,i<0||n<=i){i-=s,s=-s;break}}}function wW(t,e,n){const s=new cW;n.forEach(function(l){s.put(l.mode.bit,4),s.put(l.getLength(),gW.getCharCountIndicator(l.mode,t)),l.write(s)});const i=hu.getSymbolTotalCodewords(t),o=dh.getTotalCodewordsCount(t,e),r=(i-o)*8;for(s.getLengthInBits()+4<=r&&s.put(0,4);s.getLengthInBits()%8!==0;)s.putBit(0);const a=(r-s.getLengthInBits())/8;for(let l=0;l<a;l++)s.put(l%2?17:236,8);return xW(s,t,e)}function xW(t,e,n){const s=hu.getSymbolTotalCodewords(e),i=dh.getTotalCodewordsCount(e,n),o=s-i,r=dh.getBlocksCount(e,n),a=s%r,l=r-a,c=Math.floor(s/r),u=Math.floor(o/r),d=u+1,f=c-u,g=new fW(f);let _=0;const m=new Array(r),b=new Array(r);let w=0;const $=new Uint8Array(t.buffer);for(let S=0;S<r;S++){const E=S<l?u:d;m[S]=$.slice(_,_+E),b[S]=g.encode(m[S]),_+=E,w=Math.max(w,E)}const A=new Uint8Array(s);let D=0,x,y;for(x=0;x<w;x++)for(y=0;y<r;y++)x<m[y].length&&(A[D++]=m[y][x]);for(x=0;x<f;x++)for(y=0;y<r;y++)A[D++]=b[y][x];return A}function kW(t,e,n,s){let i;if(Array.isArray(t))i=md.fromArray(t);else if(typeof t=="string"){let c=e;if(!c){const u=md.rawSplit(t);c=Pc.getBestVersionForData(u,n)}i=md.fromString(t,c||40)}else throw new Error("Invalid data");const o=Pc.getBestVersionForData(i,n);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=o;else if(e<o)throw new Error(`
|
|
The chosen QR Code version cannot contain this amount of data.
|
|
Minimum version required to store current data is: `+o+`.
|
|
`);const r=wW(e,n,i),a=hu.getSymbolSize(e),l=new uW(a);return mW(l,e),_W(l),vW(l,e),_d(l,n,0),e>=7&&bW(l,e),yW(l,r),isNaN(s)&&(s=uh.getBestMask(l,_d.bind(null,l,n))),uh.applyMask(s,l),_d(l,n,s),{modules:l,version:e,errorCorrectionLevel:n,maskPattern:s,segments:i}}g1.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let s=gd.M,i,o;return typeof n<"u"&&(s=gd.from(n.errorCorrectionLevel,gd.M),i=Pc.from(n.version),o=uh.from(n.maskPattern),n.toSJISFunc&&hu.setToSJISFunction(n.toSJISFunc)),kW(e,i,s,o)};var E1={},Wf={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let s=n.slice().replace("#","").split("");if(s.length<3||s.length===5||s.length>8)throw new Error("Invalid hex color: "+n);(s.length===3||s.length===4)&&(s=Array.prototype.concat.apply([],s.map(function(o){return[o,o]}))),s.length===6&&s.push("F","F");const i=parseInt(s.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+s.slice(0,6).join("")}}t.getOptions=function(s){s||(s={}),s.color||(s.color={});const i=typeof s.margin>"u"||s.margin===null||s.margin<0?4:s.margin,o=s.width&&s.width>=21?s.width:void 0,r=s.scale||4;return{width:o,scale:o?4:r,margin:i,color:{dark:e(s.color.dark||"#000000ff"),light:e(s.color.light||"#ffffffff")},type:s.type,rendererOpts:s.rendererOpts||{}}},t.getScale=function(s,i){return i.width&&i.width>=s+i.margin*2?i.width/(s+i.margin*2):i.scale},t.getImageWidth=function(s,i){const o=t.getScale(s,i);return Math.floor((s+i.margin*2)*o)},t.qrToImageData=function(s,i,o){const r=i.modules.size,a=i.modules.data,l=t.getScale(r,o),c=Math.floor((r+o.margin*2)*l),u=o.margin*l,d=[o.color.light,o.color.dark];for(let f=0;f<c;f++)for(let g=0;g<c;g++){let _=(f*c+g)*4,m=o.color.light;if(f>=u&&g>=u&&f<c-u&&g<c-u){const b=Math.floor((f-u)/l),w=Math.floor((g-u)/l);m=d[a[b*r+w]?1:0]}s[_++]=m.r,s[_++]=m.g,s[_++]=m.b,s[_]=m.a}}})(Wf);(function(t){const e=Wf;function n(i,o,r){i.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=r,o.width=r,o.style.height=r+"px",o.style.width=r+"px"}function s(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,r,a){let l=a,c=r;typeof l>"u"&&(!r||!r.getContext)&&(l=r,r=void 0),r||(c=s()),l=e.getOptions(l);const u=e.getImageWidth(o.modules.size,l),d=c.getContext("2d"),f=d.createImageData(u,u);return e.qrToImageData(f.data,o,l),n(d,c,u),d.putImageData(f,0,0),c},t.renderToDataURL=function(o,r,a){let l=a;typeof l>"u"&&(!r||!r.getContext)&&(l=r,r=void 0),l||(l={});const c=t.render(o,r,l),u=l.type||"image/png",d=l.rendererOpts||{};return c.toDataURL(u,d.quality)}})(E1);var P1={};const SW=Wf;function X_(t,e){const n=t.a/255,s=e+'="'+t.hex+'"';return n<1?s+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':s}function vd(t,e,n){let s=t+e;return typeof n<"u"&&(s+=" "+n),s}function $W(t,e,n){let s="",i=0,o=!1,r=0;for(let a=0;a<t.length;a++){const l=Math.floor(a%e),c=Math.floor(a/e);!l&&!o&&(o=!0),t[a]?(r++,a>0&&l>0&&t[a-1]||(s+=o?vd("M",l+n,.5+c+n):vd("m",i,0),i=0,o=!1),l+1<e&&t[a+1]||(s+=vd("h",r),r=0)):i++}return s}P1.render=function(e,n,s){const i=SW.getOptions(n),o=e.modules.size,r=e.modules.data,a=o+i.margin*2,l=i.color.light.a?"<path "+X_(i.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+X_(i.color.dark,"stroke")+' d="'+$W(r,o,i.margin)+'"/>',u='viewBox="0 0 '+a+" "+a+'"',f='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+u+' shape-rendering="crispEdges">'+l+c+`</svg>
|
|
`;return typeof s=="function"&&s(null,f),f};const AW=Bj,hh=g1,T1=E1,CW=P1;function zf(t,e,n,s,i){const o=[].slice.call(arguments,1),r=o.length,a=typeof o[r-1]=="function";if(!a&&!AW())throw new Error("Callback required as last argument");if(a){if(r<2)throw new Error("Too few arguments provided");r===2?(i=n,n=e,e=s=void 0):r===3&&(e.getContext&&typeof i>"u"?(i=s,s=void 0):(i=s,s=n,n=e,e=void 0))}else{if(r<1)throw new Error("Too few arguments provided");return r===1?(n=e,e=s=void 0):r===2&&!e.getContext&&(s=n,n=e,e=void 0),new Promise(function(l,c){try{const u=hh.create(n,s);l(t(u,e,s))}catch(u){c(u)}})}try{const l=hh.create(n,s);i(null,t(l,e,s))}catch(l){i(l)}}Lo.create=hh.create;Lo.toCanvas=zf.bind(null,T1.render);Lo.toDataURL=zf.bind(null,T1.renderToDataURL);Lo.toString=zf.bind(null,function(t,e,n){return CW.render(t,n)});const EW={name:"peerQRCode",props:{peerConfigData:String},mounted(){Lo.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,t=>{t&&console.error(t)})}},PW={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},TW={class:"container d-flex h-100 w-100"},MW={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},DW={class:"card rounded-3 shadow"},OW={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},IW=h("h4",{class:"mb-0"},"QR Code",-1),RW={class:"card-body"},LW={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function NW(t,e,n,s,i,o){return M(),F("div",PW,[h("div",TW,[h("div",MW,[h("div",DW,[h("div",OW,[IW,h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=r=>this.$emit("close"))})]),h("div",RW,[h("canvas",LW,null,512)])])])])])}const FW=We(EW,[["render",NW]]),BW={name:"nameInput",props:{bulk:Boolean,data:Object,saving:Boolean}},VW=h("label",{for:"peer_name_textbox",class:"form-label"},[h("small",{class:"text-muted"},"Name")],-1),HW=["disabled"];function jW(t,e,n,s,i,o){return M(),F("div",{class:Ce({inactiveField:this.bulk})},[VW,Oe(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||this.bulk,"onUpdate:modelValue":e[0]||(e[0]=r=>this.data.name=r),id:"peer_name_textbox",placeholder:""},null,8,HW),[[je,this.data.name]])],2)}const WW=We(BW,[["render",jW]]),zW={name:"privatePublicKeyInput",props:{data:Object,saving:Boolean,bulk:Boolean},setup(){return{dashboardStore:Xe()}},data(){return{keypair:{publicKey:"",privateKey:"",presharedKey:""},editKey:!1,error:!1}},methods:{genKeyPair(){this.editKey=!1,this.keypair=window.wireguard.generateKeypair(),this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey},checkMatching(){try{window.wireguard.generatePublicKey(this.keypair.privateKey)!==this.keypair.publicKey&&(this.error=!0,this.dashboardStore.newMessage("WGDashboard","Private Key and Public Key does not match.","danger"))}catch{this.error=!0,this.data.private_key="",this.data.public_key=""}}},mounted(){this.genKeyPair()},watch:{keypair:{deep:!0,handler(){this.error=!1,this.checkMatching()}}}},YW=h("label",{for:"peer_private_key_textbox",class:"form-label"},[h("small",{class:"text-muted"},[be("Private Key "),h("code",null,"(Required for QR Code and Download)")])],-1),UW={class:"input-group"},KW=["disabled"],qW=["disabled"],GW=h("i",{class:"bi bi-arrow-repeat"},null,-1),JW=[GW],XW={class:"d-flex"},QW=h("label",{for:"public_key",class:"form-label"},[h("small",{class:"text-muted"},[be("Public Key "),h("code",null,"(Required)")])],-1),ZW={class:"form-check form-switch ms-auto"},ez=["disabled"],tz=h("label",{class:"form-check-label",for:"enablePublicKeyEdit"},[h("small",null,"Edit")],-1),nz=["disabled"];function sz(t,e,n,s,i,o){return M(),F("div",{class:Ce(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[h("div",null,[YW,h("div",UW,[Oe(h("input",{type:"text",class:Ce(["form-control form-control-sm rounded-start-3",{"is-invalid":this.error}]),"onUpdate:modelValue":e[0]||(e[0]=r=>this.keypair.privateKey=r),disabled:!this.editKey||this.bulk,onBlur:e[1]||(e[1]=r=>this.checkMatching()),id:"peer_private_key_textbox"},null,42,KW),[[je,this.keypair.privateKey]]),h("button",{class:"btn btn-outline-info btn-sm rounded-end-3",onClick:e[2]||(e[2]=r=>this.genKeyPair()),disabled:this.bulk,type:"button",id:"button-addon2"},JW,8,qW)])]),h("div",null,[h("div",XW,[QW,h("div",ZW,[Oe(h("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:this.bulk,id:"enablePublicKeyEdit","onUpdate:modelValue":e[3]||(e[3]=r=>this.editKey=r)},null,8,ez),[[_n,this.editKey]]),tz])]),Oe(h("input",{class:Ce(["form-control-sm form-control rounded-3",{"is-invalid":this.error}]),"onUpdate:modelValue":e[4]||(e[4]=r=>this.keypair.publicKey=r),onBlur:e[5]||(e[5]=r=>this.checkMatching()),disabled:!this.editKey||this.bulk,type:"text",id:"public_key"},null,42,nz),[[je,this.keypair.publicKey]])])],2)}const iz=We(zW,[["render",sz]]),oz={name:"allowedIPsInput",props:{data:Object,saving:Boolean,bulk:Boolean,availableIp:void 0},data(){return{allowedIp:[],availableIpSearchString:"",customAvailableIp:"",allowedIpFormatError:!1}},setup(){const t=Tn(),e=Xe();return{store:t,dashboardStore:e}},computed:{searchAvailableIps(){return this.availableIpSearchString?this.availableIp.filter(t=>t.includes(this.availableIpSearchString)&&!this.data.allowed_ips.includes(t)):this.availableIp.filter(t=>!this.data.allowed_ips.includes(t))}},methods:{addAllowedIp(t){return this.store.checkCIDR(t)?(this.data.allowed_ips.push(t),this.customAvailableIp="",!0):(this.allowedIpFormatError=!0,this.dashboardStore.newMessage("WGDashboard","Allowed IP is invalid","danger"),!1)}},watch:{customAvailableIp(){this.allowedIpFormatError=!1},availableIp(){this.availableIp!==void 0&&this.availableIp.length>0&&this.addAllowedIp(this.availableIp[0])}},mounted(){}},ol=t=>(Ut("data-v-f69c864a"),t=t(),Kt(),t),rz=ol(()=>h("label",{for:"peer_allowed_ip_textbox",class:"form-label"},[h("small",{class:"text-muted"},[be("Allowed IPs "),h("code",null,"(Required)")])],-1)),az=["onClick"],lz=ol(()=>h("i",{class:"bi bi-x-circle-fill ms-1"},null,-1)),cz=[lz],uz={class:"d-flex gap-2 align-items-center"},dz={class:"input-group"},hz=["disabled"],fz=["disabled"],pz=ol(()=>h("i",{class:"bi bi-plus-lg"},null,-1)),gz=[pz],mz=ol(()=>h("small",{class:"text-muted"},"or",-1)),_z={class:"dropdown flex-grow-1"},vz=["disabled"],bz=ol(()=>h("i",{class:"bi bi-filter-circle me-2"},null,-1)),yz={key:0,class:"dropdown-menu mt-2 shadow w-100 dropdown-menu-end rounded-3",style:{"overflow-y":"scroll","max-height":"270px",width:"300px !important"}},wz={class:"px-3 pb-2 pt-1"},xz=["onClick"],kz={class:"me-auto"},Sz={key:0},$z={class:"px-3 text-muted"};function Az(t,e,n,s,i,o){return M(),F("div",{class:Ce({inactiveField:this.bulk})},[rz,h("div",{class:Ce(["d-flex gap-2 flex-wrap",{"mb-2":this.data.allowed_ips.length>0}])},[Se(Bi,{name:"list"},{default:Pe(()=>[(M(!0),F(Te,null,Ue(this.data.allowed_ips,(r,a)=>(M(),F("span",{class:"badge rounded-pill text-bg-success",key:r},[be(me(r)+" ",1),h("a",{role:"button",onClick:l=>this.data.allowed_ips.splice(a,1)},cz,8,az)]))),128))]),_:1})],2),h("div",uz,[h("div",dz,[Oe(h("input",{type:"text",class:Ce(["form-control form-control-sm rounded-start-3",{"is-invalid":this.allowedIpFormatError}]),placeholder:"Enter IP Address/CIDR","onUpdate:modelValue":e[0]||(e[0]=r=>i.customAvailableIp=r),disabled:n.bulk},null,10,hz),[[je,i.customAvailableIp]]),h("button",{class:"btn btn-outline-success btn-sm rounded-end-3",disabled:n.bulk||!this.customAvailableIp,onClick:e[1]||(e[1]=r=>this.addAllowedIp(this.customAvailableIp)),type:"button",id:"button-addon2"},gz,8,fz)]),mz,h("div",_z,[h("button",{class:"btn btn-outline-secondary btn-sm dropdown-toggle rounded-3 w-100",disabled:!n.availableIp||n.bulk,"data-bs-auto-close":"outside",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[bz,be(" Pick Available IP ")],8,vz),this.availableIp?(M(),F("ul",yz,[h("li",null,[h("div",wz,[Oe(h("input",{class:"form-control form-control-sm rounded-3","onUpdate:modelValue":e[2]||(e[2]=r=>this.availableIpSearchString=r),placeholder:"Search..."},null,512),[[je,this.availableIpSearchString]])])]),(M(!0),F(Te,null,Ue(this.searchAvailableIps,r=>(M(),F("li",null,[h("a",{class:"dropdown-item d-flex",role:"button",onClick:a=>this.addAllowedIp(r)},[h("span",kz,[h("small",null,me(r),1)])],8,xz)]))),256)),this.searchAvailableIps.length===0?(M(),F("li",Sz,[h("small",$z,'No available IP containing "'+me(this.availableIpSearchString)+'"',1)])):re("",!0)])):re("",!0)])])],2)}const Cz=We(oz,[["render",Az],["__scopeId","data-v-f69c864a"]]),Ez={name:"dnsInput",props:{data:Object,saving:Boolean},data(){return{error:!1,dns:JSON.parse(JSON.stringify(this.data.DNS))}},setup(){const t=Tn(),e=Xe();return{store:t,dashboardStore:e}},methods:{checkDNS(){if(this.dns){let t=this.dns.split(",").map(e=>e.replaceAll(" ",""));for(let e in t)if(!this.store.regexCheckIP(t[e])){this.error||this.dashboardStore.newMessage("WGDashboard","DNS is invalid","danger"),this.error=!0,this.data.DNS="";return}this.error=!1,this.data.DNS=this.dns}}},watch:{dns(){this.checkDNS()}}},Pz=h("label",{for:"peer_DNS_textbox",class:"form-label"},[h("small",{class:"text-muted"},"DNS")],-1),Tz=["disabled"];function Mz(t,e,n,s,i,o){return M(),F("div",null,[Pz,Oe(h("input",{type:"text",class:Ce(["form-control form-control-sm rounded-3",{"is-invalid":this.error}]),disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=r=>this.dns=r),id:"peer_DNS_textbox"},null,10,Tz),[[je,this.dns]])])}const Dz=We(Ez,[["render",Mz]]),Oz={name:"endpointAllowedIps",props:{data:Object,saving:Boolean},setup(){const t=Tn(),e=Xe();return{store:t,dashboardStore:e}},data(){return{endpointAllowedIps:JSON.parse(JSON.stringify(this.data.endpoint_allowed_ip)),error:!1}},methods:{checkAllowedIP(){let t=this.endpointAllowedIps.split(",").map(e=>e.replaceAll(" ",""));for(let e in t)if(!this.store.checkCIDR(t[e])){this.error||this.dashboardStore.newMessage("WGDashboard","Endpoint Allowed IP is invalid.","danger"),this.data.endpoint_allowed_ip="",this.error=!0;return}this.error=!1,this.data.endpoint_allowed_ip=this.endpointAllowedIps}},watch:{endpointAllowedIps(){this.checkAllowedIP()}}},Iz=h("label",{for:"peer_endpoint_allowed_ips",class:"form-label"},[h("small",{class:"text-muted"},[be("Endpoint Allowed IPs "),h("code",null,"(Required)")])],-1),Rz=["disabled"];function Lz(t,e,n,s,i,o){return M(),F("div",null,[Iz,Oe(h("input",{type:"text",class:Ce(["form-control form-control-sm rounded-3",{"is-invalid":i.error}]),disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=r=>this.endpointAllowedIps=r),onBlur:e[1]||(e[1]=r=>this.checkAllowedIP()),id:"peer_endpoint_allowed_ips"},null,42,Rz),[[je,this.endpointAllowedIps]])])}const Nz=We(Oz,[["render",Lz]]),Fz={name:"presharedKeyInput",props:{data:Object,saving:Boolean},data(){return{enable:!1}},watch:{enable(){this.enable?this.data.preshared_key=window.wireguard.generateKeypair().presharedKey:this.data.preshared_key=""}}},Bz={class:"d-flex align-items-start"},Vz=h("label",{for:"peer_preshared_key_textbox",class:"form-label"},[h("small",{class:"text-muted"},"Pre-Shared Key")],-1),Hz={class:"form-check form-switch ms-auto"},jz=["disabled"];function Wz(t,e,n,s,i,o){return M(),F("div",null,[h("div",Bz,[Vz,h("div",Hz,[Oe(h("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":e[0]||(e[0]=r=>this.enable=r),id:"peer_preshared_key_switch"},null,512),[[_n,this.enable]])])]),Oe(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||!this.enable,"onUpdate:modelValue":e[1]||(e[1]=r=>this.data.preshared_key=r),id:"peer_preshared_key_textbox"},null,8,jz),[[je,this.data.preshared_key]])])}const zz=We(Fz,[["render",Wz]]),Yz={name:"mtuInput",props:{data:Object,saving:Boolean}},Uz=h("label",{for:"peer_mtu",class:"form-label"},[h("small",{class:"text-muted"},"MTU")],-1),Kz=["disabled"];function qz(t,e,n,s,i,o){return M(),F("div",null,[Uz,Oe(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=r=>this.data.mtu=r),id:"peer_mtu"},null,8,Kz),[[je,this.data.mtu]])])}const Gz=We(Yz,[["render",qz]]),Jz={name:"persistentKeepAliveInput",props:{data:Object,saving:Boolean}},Xz=h("label",{for:"peer_keep_alive",class:"form-label"},[h("small",{class:"text-muted"},"Persistent Keepalive")],-1),Qz=["disabled"];function Zz(t,e,n,s,i,o){return M(),F("div",null,[Xz,Oe(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=r=>this.data.keepalive=r),id:"peer_keep_alive"},null,8,Qz),[[je,this.data.keepalive]])])}const eY=We(Jz,[["render",Zz]]),tY={name:"bulkAdd",props:{saving:Boolean,data:Object,availableIp:void 0}},nY={class:"form-check form-switch"},sY=["disabled"],iY=h("label",{class:"form-check-label me-2",for:"bulk_add"},[h("small",null,[h("strong",null,"Bulk Add")])],-1),oY=h("small",{class:"text-muted d-block"}," By adding peers by bulk, each peer's name will be auto generated, and Allowed IP will be assign to the next available IP. ",-1),rY=[oY],aY={key:0,class:"form-group"},lY=["max"],cY={class:"text-muted"};function uY(t,e,n,s,i,o){return M(),F("div",null,[h("div",nY,[Oe(h("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:!this.availableIp,id:"bulk_add","onUpdate:modelValue":e[0]||(e[0]=r=>this.data.bulkAdd=r)},null,8,sY),[[_n,this.data.bulkAdd]]),iY]),h("p",{class:Ce({"mb-0":!this.data.bulkAdd})},rY,2),this.data.bulkAdd?(M(),F("div",aY,[Oe(h("input",{class:"form-control form-control-sm rounded-3 mb-1",type:"number",min:"1",max:this.availableIp.length,"onUpdate:modelValue":e[1]||(e[1]=r=>this.data.bulkAddAmount=r),placeholder:"How many peers you want to add?"},null,8,lY),[[je,this.data.bulkAddAmount]]),h("small",cY,[be(" You can add up to "),h("strong",null,me(this.availableIp.length),1),be(" peers ")])])):re("",!0)])}const dY=We(tY,[["render",uY]]),hY={name:"peerCreate",components:{BulkAdd:dY,PersistentKeepAliveInput:eY,MtuInput:Gz,PresharedKeyInput:zz,EndpointAllowedIps:Nz,DnsInput:Dz,AllowedIPsInput:Cz,PrivatePublicKeyInput:iz,NameInput:WW},data(){return{data:{bulkAdd:!1,bulkAddAmount:"",name:"",allowed_ips:[],private_key:"",public_key:"",DNS:this.dashboardStore.Configuration.Peers.peer_global_dns,endpoint_allowed_ip:this.dashboardStore.Configuration.Peers.peer_endpoint_allowed_ip,keepalive:parseInt(this.dashboardStore.Configuration.Peers.peer_keep_alive),mtu:parseInt(this.dashboardStore.Configuration.Peers.peer_mtu),preshared_key:"",preshared_key_bulkAdd:!1},availableIp:void 0,availableIpSearchString:"",saving:!1,allowedIpDropdown:void 0}},mounted(){wt("/api/getAvailableIPs/"+this.$route.params.id,{},t=>{t.status&&(this.availableIp=t.data)})},setup(){const t=Tn(),e=Xe();return{store:t,dashboardStore:e}},methods:{peerCreate(){this.saving=!0,ht("/api/addPeers/"+this.$route.params.id,this.data,t=>{t.status?(this.$router.push(`/configuration/${this.$route.params.id}/peers`),this.dashboardStore.newMessage("Server","Peer create successfully","success")):this.dashboardStore.newMessage("Server",t.message,"danger"),this.saving=!1})}},computed:{allRequireFieldsFilled(){let t=!0;return this.data.bulkAdd?(this.data.bulkAddAmount.length===0||this.data.bulkAddAmount>this.availableIp.length)&&(t=!1):["allowed_ips","private_key","public_key","endpoint_allowed_ip","keepalive","mtu"].forEach(n=>{this.data[n].length===0&&(t=!1)}),t}},watch:{bulkAdd(t){t||(this.data.bulkAddAmount="")},"data.bulkAddAmount"(){this.data.bulkAddAmount>this.availableIp.length&&(this.data.bulkAddAmount=this.availableIp.length)}}},fu=t=>(Ut("data-v-7d433383"),t=t(),Kt(),t),fY={class:"container"},pY={class:"mb-4"},gY=fu(()=>h("h3",{class:"mb-0 text-body"},[h("i",{class:"bi bi-chevron-left"})],-1)),mY=fu(()=>h("h3",{class:"text-body mb-0"},"Add Peers",-1)),_Y={class:"d-flex flex-column gap-2"},vY=fu(()=>h("hr",{class:"mb-0 mt-2"},null,-1)),bY=fu(()=>h("hr",{class:"mb-0 mt-2"},null,-1)),yY={class:"row gy-3"},wY={key:0,class:"col-sm"},xY={class:"col-sm"},kY={class:"col-sm"},SY={key:1,class:"col-12"},$Y={class:"form-check form-switch"},AY={class:"form-check-label",for:"bullAdd_PresharedKey_Switch"},CY={class:"d-flex mt-2"},EY=["disabled"],PY={key:0,class:"bi bi-plus-circle-fill me-2"};function TY(t,e,n,s,i,o){const r=He("RouterLink"),a=He("BulkAdd"),l=He("NameInput"),c=He("PrivatePublicKeyInput"),u=He("AllowedIPsInput"),d=He("EndpointAllowedIps"),f=He("DnsInput"),g=He("PresharedKeyInput"),_=He("MtuInput"),m=He("PersistentKeepAliveInput");return M(),F("div",fY,[h("div",pY,[Se(r,{to:"peers",is:"div",class:"d-flex align-items-center gap-4 text-decoration-none"},{default:Pe(()=>[gY,mY]),_:1})]),h("div",_Y,[Se(a,{saving:i.saving,data:this.data,availableIp:this.availableIp},null,8,["saving","data","availableIp"]),vY,this.data.bulkAdd?re("",!0):(M(),Le(l,{key:0,saving:i.saving,data:this.data},null,8,["saving","data"])),this.data.bulkAdd?re("",!0):(M(),Le(c,{key:1,saving:i.saving,data:i.data},null,8,["saving","data"])),this.data.bulkAdd?re("",!0):(M(),Le(u,{key:2,availableIp:this.availableIp,saving:i.saving,data:i.data},null,8,["availableIp","saving","data"])),Se(d,{saving:i.saving,data:i.data},null,8,["saving","data"]),Se(f,{saving:i.saving,data:i.data},null,8,["saving","data"]),bY,h("div",yY,[this.data.bulkAdd?re("",!0):(M(),F("div",wY,[Se(g,{saving:i.saving,data:i.data,bulk:this.data.bulkAdd},null,8,["saving","data","bulk"])])),h("div",xY,[Se(_,{saving:i.saving,data:i.data},null,8,["saving","data"])]),h("div",kY,[Se(m,{saving:i.saving,data:i.data},null,8,["saving","data"])]),this.data.bulkAdd?(M(),F("div",SY,[h("div",$Y,[Oe(h("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":e[0]||(e[0]=b=>this.data.preshared_key_bulkAdd=b),id:"bullAdd_PresharedKey_Switch",checked:""},null,512),[[_n,this.data.preshared_key_bulkAdd]]),h("label",AY," Pre-Share Key "+me(this.data.preshared_key_bulkAdd?"Enabled":"Disabled"),1)])])):re("",!0)]),h("div",CY,[h("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!this.allRequireFieldsFilled||this.saving,onClick:e[1]||(e[1]=b=>this.peerCreate())},[this.saving?re("",!0):(M(),F("i",PY)),be(" "+me(this.saving?"Saving...":"Add"),1)],8,EY)])])])}const M1=We(hY,[["render",TY],["__scopeId","data-v-7d433383"]]),MY={name:"scheduleDropdown",props:{options:Array,data:String,edit:!1},setup(t){t.data===void 0&&this.$emit("update",this.options[0].value)},computed:{currentSelection(){return this.options.find(t=>t.value===this.data)}}},DY={class:"dropdown scheduleDropdown"},OY={class:"dropdown-menu rounded-3 shadow",style:{"font-size":"0.875rem",width:"200px"}},IY=["onClick"],RY={key:0,class:"bi bi-check ms-auto"};function LY(t,e,n,s,i,o){return M(),F("div",DY,[h("button",{class:Ce(["btn btn-sm btn-outline-primary rounded-3",{"disabled border-transparent":!n.edit}]),type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[h("samp",null,me(this.currentSelection.display),1)],2),h("ul",OY,[n.edit?(M(!0),F(Te,{key:0},Ue(this.options,r=>(M(),F("li",null,[h("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:a=>t.$emit("update",r.value)},[h("samp",null,me(r.display),1),r.value===this.currentSelection.value?(M(),F("i",RY)):re("",!0)],8,IY)]))),256)):re("",!0)])])}const D1=We(MY,[["render",LY],["__scopeId","data-v-6a5aba2a"]]),NY={name:"schedulePeerJob",components:{VueDatePicker:Za,ScheduleDropdown:D1},props:{dropdowns:Array[Object],pjob:Object,viewOnly:!1},setup(t){const e=ve({}),n=ve(!1),s=ve(!1);e.value=JSON.parse(JSON.stringify(t.pjob)),e.value.CreationDate||(n.value=!0,s.value=!0);const i=Xe();return{job:e,edit:n,newJob:s,store:i}},data(){return{inputType:void 0}},watch:{pjob:{deep:!0,immediate:!0,handler(t){this.edit||(this.job=JSON.parse(JSON.stringify(t)))}}},methods:{save(){this.job.Field&&this.job.Operator&&this.job.Action&&this.job.Value?ht("/api/savePeerScheduleJob/",{Job:this.job},t=>{t.status?(this.edit=!1,this.store.newMessage("Server","Job Saved!","success"),console.log(t.data),this.$emit("refresh",t.data[0]),this.newJob=!1):this.store.newMessage("Server",t.message,"danger")}):this.alert()},alert(){let t="animate__flash",e=this.$el.querySelectorAll(".scheduleDropdown"),n=this.$el.querySelectorAll("input");e.forEach(s=>s.classList.add("animate__animated",t)),n.forEach(s=>s.classList.add("animate__animated",t)),setTimeout(()=>{e.forEach(s=>s.classList.remove("animate__animated",t)),n.forEach(s=>s.classList.remove("animate__animated",t))},2e3)},reset(){this.job.CreationDate?(this.job=JSON.parse(JSON.stringify(this.pjob)),this.edit=!1):this.$emit("delete")},delete(){this.job.CreationDate&&ht("/api/deletePeerScheduleJob/",{Job:this.job},t=>{t.status?this.store.newMessage("Server","Job Deleted!","success"):(this.store.newMessage("Server",t.message,"danger"),this.$emit("delete"))}),this.$emit("delete")},parseTime(t){t&&(this.job.Value=Cn(t).format("YYYY-MM-DD HH:mm:ss"))}}},Fr=t=>(Ut("data-v-811b149e"),t=t(),Kt(),t),FY={class:"card-header bg-transparent text-muted border-0"},BY={key:0,class:"d-flex"},VY=Fr(()=>h("strong",{class:"me-auto"},"Job ID",-1)),HY={key:1},jY=Fr(()=>h("span",{class:"badge text-bg-warning"},"Unsaved Job",-1)),WY=[jY],zY={class:"card-body pt-1",style:{"font-family":"var(--bs-font-monospace)"}},YY={class:"d-flex gap-2 align-items-center mb-2"},UY=Fr(()=>h("samp",null," if ",-1)),KY=Fr(()=>h("samp",null," is ",-1)),qY=["disabled"],GY={class:"px-5 d-flex gap-2 align-items-center"},JY=Fr(()=>h("samp",null,"then",-1)),XY={class:"d-flex gap-3"},QY=Fr(()=>h("samp",null,"}",-1)),ZY={key:0,class:"ms-auto d-flex gap-3"},eU={key:1,class:"ms-auto d-flex gap-3"};function tU(t,e,n,s,i,o){const r=He("ScheduleDropdown"),a=He("VueDatePicker");return M(),F("div",{class:Ce(["card shadow-sm rounded-3 mb-2",{"border-warning-subtle":this.newJob}])},[h("div",FY,[this.newJob?(M(),F("small",HY,WY)):(M(),F("small",BY,[VY,h("samp",null,me(this.job.JobID),1)]))]),h("div",zY,[h("div",YY,[UY,Se(r,{edit:s.edit,options:this.dropdowns.Field,data:this.job.Field,onUpdate:e[0]||(e[0]=l=>{this.job.Field=l})},null,8,["edit","options","data"]),KY,Se(r,{edit:s.edit,options:this.dropdowns.Operator,data:this.job.Operator,onUpdate:e[1]||(e[1]=l=>this.job.Operator=l)},null,8,["edit","options","data"]),this.job.Field==="date"?(M(),Le(a,{key:0,is24:!0,"min-date":new Date,"model-value":this.job.Value,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:!s.edit,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])):Oe((M(),F("input",{key:1,class:"form-control form-control-sm form-control-dark rounded-3 flex-grow-1",disabled:!s.edit,"onUpdate:modelValue":e[2]||(e[2]=l=>this.job.Value=l),style:{width:"auto"}},null,8,qY)),[[je,this.job.Value]]),h("samp",null,me(this.dropdowns.Field.find(l=>l.value===this.job.Field)?.unit)+" { ",1)]),h("div",GY,[JY,Se(r,{edit:s.edit,options:this.dropdowns.Action,data:this.job.Action,onUpdate:e[3]||(e[3]=l=>this.job.Action=l)},null,8,["edit","options","data"])]),h("div",XY,[QY,this.edit?(M(),F("div",eU,[h("a",{role:"button",class:"text-secondary text-decoration-none",onClick:e[6]||(e[6]=l=>this.reset())},"[C] Cancel"),h("a",{role:"button",class:"text-primary ms-auto text-decoration-none",onClick:e[7]||(e[7]=l=>this.save())},"[S] Save")])):(M(),F("div",ZY,[h("a",{role:"button",class:"ms-auto text-decoration-none",onClick:e[4]||(e[4]=l=>this.edit=!0)},"[E] Edit"),h("a",{role:"button",onClick:e[5]||(e[5]=l=>this.delete()),class:"text-danger text-decoration-none"},"[D] Delete")]))])])],2)}const O1=We(NY,[["render",tU],["__scopeId","data-v-811b149e"]]),nU={name:"peerJobs",setup(){return{store:Tn()}},props:{selectedPeer:Object},components:{SchedulePeerJob:O1,ScheduleDropdown:D1},data(){return{}},methods:{deleteJob(t){this.selectedPeer.jobs=this.selectedPeer.jobs.filter(e=>e.JobID!==t.JobID)},addJob(){this.selectedPeer.jobs.unshift(JSON.parse(JSON.stringify({JobID:Ps().toString(),Configuration:this.selectedPeer.configuration.Name,Peer:this.selectedPeer.id,Field:this.store.PeerScheduleJobs.dropdowns.Field[0].value,Operator:this.store.PeerScheduleJobs.dropdowns.Operator[0].value,Value:"",CreationDate:"",ExpireDate:"",Action:this.store.PeerScheduleJobs.dropdowns.Action[0].value})))}}},Yf=t=>(Ut("data-v-31a1606a"),t=t(),Kt(),t),sU={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},iU={class:"container d-flex h-100 w-100"},oU={class:"m-auto modal-dialog-centered dashboardModal"},rU={class:"card rounded-3 shadow",style:{width:"700px"}},aU={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},lU=Yf(()=>h("h4",{class:"mb-0 fw-normal"},[be("Schedule Jobs "),h("strong")],-1)),cU={class:"card-body px-4 pb-4 pt-2 position-relative"},uU={class:"d-flex align-items-center mb-3"},dU=Yf(()=>h("i",{class:"bi bi-plus-lg me-2"},null,-1)),hU={class:"card shadow-sm",key:"none",style:{height:"153px"}},fU=Yf(()=>h("div",{class:"card-body text-muted text-center d-flex"},[h("h6",{class:"m-auto"},"This peer does not have any job yet.")],-1)),pU=[fU];function gU(t,e,n,s,i,o){const r=He("SchedulePeerJob");return M(),F("div",sU,[h("div",iU,[h("div",oU,[h("div",rU,[h("div",aU,[lU,h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),h("div",cU,[h("div",uU,[h("button",{class:"btn bg-primary-subtle border-1 border-primary-subtle text-primary-emphasis rounded-3 shadow",onClick:e[1]||(e[1]=a=>this.addJob())},[dU,be(" Job ")])]),Se(Bi,{name:"schedulePeerJobTransition",tag:"div",class:"position-relative"},{default:Pe(()=>[(M(!0),F(Te,null,Ue(this.selectedPeer.jobs,(a,l)=>(M(),Le(r,{onRefresh:e[2]||(e[2]=c=>this.$emit("refresh")),onDelete:c=>this.deleteJob(a),dropdowns:this.store.PeerScheduleJobs.dropdowns,key:a.JobID,pjob:a},null,8,["onDelete","dropdowns","pjob"]))),128)),this.selectedPeer.jobs.length===0?(M(),F("div",hU,pU)):re("",!0)]),_:1})])])])])])}const mU=We(nU,[["render",gU],["__scopeId","data-v-31a1606a"]]),_U={name:"peerJobsAllModal",setup(){return{store:Tn()}},components:{SchedulePeerJob:O1},props:{configurationPeers:Array[Object]},methods:{getuuid(){return Ps()}},computed:{getAllJobs(){return this.configurationPeers.filter(t=>t.jobs.length>0)}}},vU={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},bU={class:"container d-flex h-100 w-100"},yU={class:"m-auto modal-dialog-centered dashboardModal"},wU={class:"card rounded-3 shadow",style:{width:"700px"}},xU={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},kU=h("h4",{class:"mb-0 fw-normal"},"All Active Jobs ",-1),SU={class:"card-body px-4 pb-4 pt-2"},$U={key:0,class:"accordion",id:"peerJobsLogsModalAccordion"},AU={class:"accordion-header"},CU=["data-bs-target"],EU={key:0},PU={class:"text-muted"},TU=["id"],MU={class:"accordion-body"},DU={key:1,class:"card shadow-sm",style:{height:"153px"}},OU=h("div",{class:"card-body text-muted text-center d-flex"},[h("h6",{class:"m-auto"},"No active job at the moment.")],-1),IU=[OU];function RU(t,e,n,s,i,o){const r=He("SchedulePeerJob");return M(),F("div",vU,[h("div",bU,[h("div",yU,[h("div",wU,[h("div",xU,[kU,h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),h("div",SU,[this.getAllJobs.length>0?(M(),F("div",$U,[(M(!0),F(Te,null,Ue(this.getAllJobs,(a,l)=>(M(),F("div",{class:"accordion-item",key:a.id},[h("h2",AU,[h("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapse_"+l},[h("small",null,[h("strong",null,[a.name?(M(),F("span",EU,me(a.name)+" • ",1)):re("",!0),h("samp",PU,me(a.id),1)])])],8,CU)]),h("div",{id:"collapse_"+l,class:"accordion-collapse collapse","data-bs-parent":"#peerJobsLogsModalAccordion"},[h("div",MU,[(M(!0),F(Te,null,Ue(a.jobs,c=>(M(),Le(r,{onDelete:e[1]||(e[1]=u=>this.$emit("refresh")),onRefresh:e[2]||(e[2]=u=>this.$emit("refresh")),dropdowns:this.store.PeerScheduleJobs.dropdowns,viewOnly:!0,key:c.JobID,pjob:c},null,8,["dropdowns","pjob"]))),128))])],8,TU)]))),128))])):(M(),F("div",DU,IU))])])])])])}const LU=We(_U,[["render",RU]]),NU={name:"peerJobsLogsModal",props:{configurationInfo:Object},data(){return{dataLoading:!0,data:[],logFetchTime:void 0,showLogID:!1,showJobID:!0,showSuccessJob:!0,showFailedJob:!0,showLogAmount:10}},async mounted(){await this.fetchLog()},methods:{async fetchLog(){this.dataLoading=!0,await wt(`/api/getPeerScheduleJobLogs/${this.configurationInfo.Name}`,{},t=>{this.data=t.data,this.logFetchTime=Cn().format("YYYY-MM-DD HH:mm:ss"),this.dataLoading=!1})}},computed:{getLogs(){return this.data.filter(t=>this.showSuccessJob&&t.Status==="1"||this.showFailedJob&&t.Status==="0")},showLogs(){return this.getLogs.slice(0,this.showLogAmount)}}},FU={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},BU={class:"container-fluid d-flex h-100 w-100"},VU={class:"m-auto mt-0 modal-dialog-centered dashboardModal",style:{width:"100%"}},HU={class:"card rounded-3 shadow w-100"},jU={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},WU=h("h4",{class:"mb-0"},"Jobs Logs",-1),zU={class:"card-body px-4 pb-4 pt-2"},YU={key:0},UU={class:"mb-2 d-flex gap-3"},KU=h("i",{class:"bi bi-arrow-clockwise me-2"},null,-1),qU={class:"d-flex gap-3 align-items-center"},GU=h("span",{class:"text-muted"},"Filter",-1),JU={class:"form-check"},XU=h("label",{class:"form-check-label",for:"jobLogsShowSuccessCheck"},[h("span",{class:"badge text-success-emphasis bg-success-subtle"},"Success")],-1),QU={class:"form-check"},ZU=h("label",{class:"form-check-label",for:"jobLogsShowFailedCheck"},[h("span",{class:"badge text-danger-emphasis bg-danger-subtle"},"Failed")],-1),eK={class:"d-flex gap-3 align-items-center ms-auto"},tK=h("span",{class:"text-muted"},"Display",-1),nK={class:"form-check"},sK=h("label",{class:"form-check-label",for:"jobLogsShowJobIDCheck"}," Job ID ",-1),iK={class:"form-check"},oK=h("label",{class:"form-check-label",for:"jobLogsShowLogIDCheck"}," Log ID ",-1),rK={class:"table"},aK=h("th",{scope:"col"},"Date",-1),lK={key:0,scope:"col"},cK={key:1,scope:"col"},uK=h("th",{scope:"col"},"Status",-1),dK=h("th",{scope:"col"},"Message",-1),hK={style:{"font-size":"0.875rem"}},fK={scope:"row"},pK={key:0},gK={class:"text-muted"},mK={key:1},_K={class:"text-muted"},vK={class:"d-flex gap-2"},bK=h("i",{class:"bi bi-chevron-down me-2"},null,-1),yK=h("i",{class:"bi bi-chevron-up me-2"},null,-1),wK={key:1,class:"d-flex align-items-center flex-column"},xK=h("div",{class:"spinner-border text-body",role:"status"},[h("span",{class:"visually-hidden"},"Loading...")],-1),kK=[xK];function SK(t,e,n,s,i,o){return M(),F("div",FU,[h("div",BU,[h("div",VU,[h("div",HU,[h("div",jU,[WU,h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=r=>this.$emit("close"))})]),h("div",zU,[this.dataLoading?(M(),F("div",wK,kK)):(M(),F("div",YU,[h("p",null,"Updated at: "+me(this.logFetchTime),1),h("div",UU,[h("button",{onClick:e[1]||(e[1]=r=>this.fetchLog()),class:"btn btn-sm rounded-3 shadow-sm text-info-emphasis bg-info-subtle border-1 border-info-subtle me-1"},[KU,be(" Refresh ")]),h("div",qU,[GU,h("div",JU,[Oe(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[2]||(e[2]=r=>this.showSuccessJob=r),id:"jobLogsShowSuccessCheck"},null,512),[[_n,this.showSuccessJob]]),XU]),h("div",QU,[Oe(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[3]||(e[3]=r=>this.showFailedJob=r),id:"jobLogsShowFailedCheck"},null,512),[[_n,this.showFailedJob]]),ZU])]),h("div",eK,[tK,h("div",nK,[Oe(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[4]||(e[4]=r=>i.showJobID=r),id:"jobLogsShowJobIDCheck"},null,512),[[_n,i.showJobID]]),sK]),h("div",iK,[Oe(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=r=>i.showLogID=r),id:"jobLogsShowLogIDCheck"},null,512),[[_n,i.showLogID]]),oK])])]),h("table",rK,[h("thead",null,[h("tr",null,[aK,i.showLogID?(M(),F("th",lK,"Log ID")):re("",!0),i.showJobID?(M(),F("th",cK,"Job ID")):re("",!0),uK,dK])]),h("tbody",null,[(M(!0),F(Te,null,Ue(this.showLogs,r=>(M(),F("tr",hK,[h("th",fK,me(r.LogDate),1),i.showLogID?(M(),F("td",pK,[h("samp",gK,me(r.LogID),1)])):re("",!0),i.showJobID?(M(),F("td",mK,[h("samp",_K,me(r.JobID),1)])):re("",!0),h("td",null,[h("span",{class:Ce(["badge",[r.Status==="1"?"text-success-emphasis bg-success-subtle":"text-danger-emphasis bg-danger-subtle"]])},me(r.Status==="1"?"Success":"Failed"),3)]),h("td",null,me(r.Message),1)]))),256))])]),h("div",vK,[this.getLogs.length>this.showLogAmount?(M(),F("button",{key:0,onClick:e[6]||(e[6]=r=>this.showLogAmount+=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},[bK,be(" Show More ")])):re("",!0),this.showLogAmount>20?(M(),F("button",{key:1,onClick:e[7]||(e[7]=r=>this.showLogAmount=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},[yK,be(" Collapse ")])):re("",!0)])]))])])])])])}const $K=We(NU,[["render",SK]]),AK={name:"peerShareLinkModal",props:{peer:Object},components:{VueDatePicker:Za},data(){return{dataCopy:void 0,loading:!1}},setup(){return{store:Xe()}},mounted(){this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0)},watch:{"peer.ShareLink":{deep:!0,handler(t,e){e.length!==t.length&&(this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0))}}},methods:{startSharing(){this.loading=!0,ht("/api/sharePeer/create",{Configuration:this.peer.configuration.Name,Peer:this.peer.id,ExpireDate:Cn().add(7,"d").format("YYYY-MM-DD HH:mm:ss")},t=>{t.status?(this.peer.ShareLink=t.data,this.dataCopy=t.data.at(0),this.store.newMessage("Server","Share link created successfully","success")):this.store.newMessage("Server","Share link failed to create. Reason: "+t.message,"danger"),this.loading=!1})},updateLinkExpireDate(){ht("/api/sharePeer/update",this.dataCopy,t=>{t.status?(this.dataCopy=t.data.at(0),this.peer.ShareLink=t.data,this.store.newMessage("Server","Link expire date updated","success")):this.store.newMessage("Server","Link expire date failed to update. Reason: "+t.message,"danger"),this.loading=!1})},stopSharing(){this.loading=!0,this.dataCopy.ExpireDate=Cn().format("YYYY-MM-DD HH:mm:ss"),this.updateLinkExpireDate()},parseTime(t){t?this.dataCopy.ExpireDate=Cn(t).format("YYYY-MM-DD HH:mm:ss"):this.dataCopy.ExpireDate=void 0,this.updateLinkExpireDate()}},computed:{getUrl(){const t=this.store.getActiveCrossServer();return t?`${t.host}/${this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}`:window.location.origin+window.location.pathname+this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}}},CK={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},EK={class:"container d-flex h-100 w-100"},PK={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"500px"}},TK={class:"card rounded-3 shadow flex-grow-1"},MK={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},DK=h("h4",{class:"mb-0"},"Share Peer",-1),OK={key:0,class:"card-body px-4 pb-4"},IK={key:0},RK=h("h6",{class:"mb-3 text-muted"}," Currently the peer is not sharing ",-1),LK=["disabled"],NK=h("i",{class:"bi bi-send-fill me-2"},null,-1),FK=[NK],BK={key:1},VK={class:"d-flex gap-2 mb-4"},HK=h("i",{class:"bi bi-link-45deg"},null,-1),jK=["href"],WK={class:"d-flex flex-column gap-2 mb-3"},zK=h("small",null,[h("i",{class:"bi bi-calendar me-2"}),be(" Expire Date ")],-1),YK=["disabled"],UK=h("i",{class:"bi bi-send-slash-fill me-2"},null,-1),KK=[UK];function qK(t,e,n,s,i,o){const r=He("VueDatePicker");return M(),F("div",CK,[h("div",EK,[h("div",PK,[h("div",TK,[h("div",MK,[DK,h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),this.peer.ShareLink?(M(),F("div",OK,[this.dataCopy?(M(),F("div",BK,[h("div",VK,[HK,h("a",{href:this.getUrl,class:"text-decoration-none",target:"_blank"},me(o.getUrl),9,jK)]),h("div",WK,[zK,Se(r,{is24:!0,"min-date":new Date,"model-value":this.dataCopy.ExpireDate,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","dark"])]),h("button",{onClick:e[2]||(e[2]=a=>this.stopSharing()),disabled:this.loading,class:"w-100 btn bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle rounded-3 shadow-sm"},[h("span",{class:Ce({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},KK,2),be(" "+me(this.loading?"Stop Sharing...":"Stop Sharing"),1)],8,YK)])):(M(),F("div",IK,[RK,h("button",{onClick:e[1]||(e[1]=a=>this.startSharing()),disabled:this.loading,class:"w-100 btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm"},[h("span",{class:Ce({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},FK,2),be(" "+me(this.loading?"Sharing...":"Start Sharing"),1)],8,LK)]))])):re("",!0)])])])])}const GK=We(AK,[["render",qK]]);ru.register(y6,au,L6,T6,I0,Z4,R0,L0,nV,tV,sV,iV,AH,EH,MH,YH,nh,GH,V6,rH,hH,pH,xH);const JK={name:"peerList",components:{PeerShareLinkModal:GK,PeerJobsLogsModal:$K,PeerJobsAllModal:LU,PeerJobs:mU,PeerCreate:M1,PeerQRCode:FW,PeerSettings:Fj,PeerSearch:K5,Peer:WF,Line:i8,Bar:s8},setup(){const t=Xe(),e=Tn(),n=ve(void 0);return{dashboardConfigurationStore:t,wireguardConfigurationStore:e,interval:n}},data(){return{configurationToggling:!1,loading:!1,error:null,configurationInfo:[],configurationPeers:[],historyDataSentDifference:[],historyDataReceivedDifference:[],historySentData:{labels:[],datasets:[{label:"Data Sent",data:[],fill:!1,borderColor:"#198754",tension:0}]},historyReceiveData:{labels:[],datasets:[{label:"Data Received",data:[],fill:!1,borderColor:"#0d6efd",tension:0}]},peerSetting:{modalOpen:!1,selectedPeer:void 0},peerScheduleJobs:{modalOpen:!1,selectedPeer:void 0},peerQRCode:{modalOpen:!1,peerConfigData:void 0},peerCreate:{modalOpen:!1},peerScheduleJobsAll:{modalOpen:!1},peerScheduleJobsLogs:{modalOpen:!1},peerShare:{modalOpen:!1,selectedPeer:void 0}}},mounted(){},watch:{$route:{immediate:!0,handler(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.loading=!0;let t=this.$route.params.id;this.configurationInfo=[],this.configurationPeers=[],t&&(this.getPeers(t),this.setPeerInterval())}},"dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval"(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.setPeerInterval()}},beforeRouteLeave(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval)},methods:{toggle(){this.configurationToggling=!0,wt("/api/toggleWireguardConfiguration/",{configurationName:this.configurationInfo.Name},t=>{t.status?this.dashboardConfigurationStore.newMessage("Server",`${this.configurationInfo.Name} is
|
|
${t.data?"is on":"is off"}`,"Success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.configurationInfo.Status=t.data,this.configurationToggling=!1})},getPeers(t=this.$route.params.id){wt("/api/getWireguardConfigurationInfo",{configurationName:t},e=>{if(this.configurationInfo=e.data.configurationInfo,this.configurationPeers=e.data.configurationPeers,this.configurationPeers.forEach(n=>{n.restricted=!1}),e.data.configurationRestrictedPeers.forEach(n=>{n.restricted=!0,this.configurationPeers.push(n)}),this.loading=!1,this.configurationPeers.length>0){const n=this.configurationPeers.map(i=>i.total_sent+i.cumu_sent).reduce((i,o)=>i+o).toFixed(4),s=this.configurationPeers.map(i=>i.total_receive+i.cumu_receive).reduce((i,o)=>i+o).toFixed(4);this.historyDataSentDifference[this.historyDataSentDifference.length-1]!==n&&(this.historyDataSentDifference.length>0&&(this.historySentData={labels:[...this.historySentData.labels,Cn().format("HH:mm:ss A")],datasets:[{label:"Data Sent",data:[...this.historySentData.datasets[0].data,((n-this.historyDataSentDifference[this.historyDataSentDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#198754",tension:0}]}),this.historyDataSentDifference.push(n)),this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1]!==s&&(this.historyDataReceivedDifference.length>0&&(this.historyReceiveData={labels:[...this.historyReceiveData.labels,Cn().format("HH:mm:ss A")],datasets:[{label:"Data Received",data:[...this.historyReceiveData.datasets[0].data,((s-this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#0d6efd",tension:0}]}),this.historyDataReceivedDifference.push(s))}})},setPeerInterval(){this.dashboardConfigurationStore.Peers.RefreshInterval=setInterval(()=>{this.getPeers()},parseInt(this.dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval))}},computed:{configurationSummary(){return{connectedPeers:this.configurationPeers.filter(e=>e.status==="running").length,totalUsage:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_data+e.cumu_data).reduce((e,n)=>e+n,0).toFixed(4):0,totalReceive:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_receive+e.cumu_receive).reduce((e,n)=>e+n,0).toFixed(4):0,totalSent:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_sent+e.cumu_sent).reduce((e,n)=>e+n,0).toFixed(4):0}},receiveData(){return this.historyReceiveData},sentData(){return this.historySentData},individualDataUsage(){return{labels:this.configurationPeers.map(t=>t.name?t.name:`Untitled Peer - ${t.id}`),datasets:[{label:"Total Data Usage",data:this.configurationPeers.map(t=>t.cumu_data+t.total_data),backgroundColor:this.configurationPeers.map(t=>"#0dcaf0"),tooltip:{callbacks:{label:t=>`${t.formattedValue} GB`}}}]}},individualDataUsageChartOption(){return{responsive:!0,plugins:{legend:{display:!1}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(t,e)=>`${t} GB`},grid:{display:!1}}}}},chartOptions(){return{responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:t=>`${t.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(t,e)=>`${t} MB/s`},grid:{display:!1}}}}},searchPeers(){new Nr(this.configurationPeers,{keys:["name","id","allowed_ip"]});const t=this.wireguardConfigurationStore.searchString?this.configurationPeers.filter(e=>e.name.includes(this.wireguardConfigurationStore.searchString)||e.id.includes(this.wireguardConfigurationStore.searchString)||e.allowed_ip.includes(this.wireguardConfigurationStore.searchString)):this.configurationPeers;return this.dashboardConfigurationStore.Configuration.Server.dashboard_sort==="restricted"?t.slice().sort((e,n)=>e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]<n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]>n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:0):t.slice().sort((e,n)=>e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]<n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]>n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:0)}}},fn=t=>(Ut("data-v-0de09f6d"),t=t(),Kt(),t),XK={key:0,class:"container-md"},QK={class:"d-flex align-items-center"},ZK=fn(()=>h("small",{CLASS:"text-muted"},"CONFIGURATION",-1)),e7={class:"d-flex align-items-center gap-3"},t7={class:"mb-0"},n7={class:"card rounded-3 bg-transparent shadow-sm ms-auto"},s7={class:"card-body py-2 d-flex align-items-center"},i7=fn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Status")],-1)),o7={class:"form-check form-switch ms-auto"},r7=["for"],a7={key:0,class:"spinner-border spinner-border-sm","aria-hidden":"true"},l7=["disabled","id"],c7={class:"row mt-3 gy-2 gx-2 mb-2"},u7={class:"col-6 col-lg-3"},d7={class:"card rounded-3 bg-transparent shadow-sm"},h7={class:"card-body py-2"},f7=fn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Address")],-1)),p7={class:"col-6 col-lg-3"},g7={class:"card rounded-3 bg-transparent shadow-sm"},m7={class:"card-body py-2"},_7=fn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Listen Port")],-1)),v7={style:{"word-break":"break-all"},class:"col-12 col-lg-6"},b7={class:"card rounded-3 bg-transparent shadow-sm"},y7={class:"card-body py-2"},w7=fn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Public Key")],-1)),x7={class:"row gx-2 gy-2 mb-2"},k7={class:"col-6 col-lg-3"},S7={class:"card rounded-3 bg-transparent shadow-sm"},$7={class:"card-body d-flex"},A7=fn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Connected Peers")],-1)),C7={class:"h4"},E7=fn(()=>h("i",{class:"bi bi-ethernet ms-auto h2 text-muted"},null,-1)),P7={class:"col-6 col-lg-3"},T7={class:"card rounded-3 bg-transparent shadow-sm"},M7={class:"card-body d-flex"},D7=fn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Total Usage")],-1)),O7={class:"h4"},I7=fn(()=>h("i",{class:"bi bi-arrow-down-up ms-auto h2 text-muted"},null,-1)),R7={class:"col-6 col-lg-3"},L7={class:"card rounded-3 bg-transparent shadow-sm"},N7={class:"card-body d-flex"},F7=fn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Total Received")],-1)),B7={class:"h4 text-primary"},V7=fn(()=>h("i",{class:"bi bi-arrow-down ms-auto h2 text-muted"},null,-1)),H7={class:"col-6 col-lg-3"},j7={class:"card rounded-3 bg-transparent shadow-sm"},W7={class:"card-body d-flex"},z7=fn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Total Sent")],-1)),Y7={class:"h4 text-success"},U7=fn(()=>h("i",{class:"bi bi-arrow-up ms-auto h2 text-muted"},null,-1)),K7={class:"row gx-2 gy-2 mb-3"},q7={class:"col-12 col-lg-6"},G7={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},J7=fn(()=>h("div",{class:"card-header bg-transparent border-0"},[h("small",{class:"text-muted"},"Peers Total Data Usage")],-1)),X7={class:"card-body pt-1"},Q7={class:"col-sm col-lg-3"},Z7={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},e9=fn(()=>h("div",{class:"card-header bg-transparent border-0"},[h("small",{class:"text-muted"},"Real Time Received Data Usage")],-1)),t9={class:"card-body pt-1"},n9={class:"col-sm col-lg-3"},s9={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},i9=fn(()=>h("div",{class:"card-header bg-transparent border-0"},[h("small",{class:"text-muted"},"Real Time Sent Data Usage")],-1)),o9={class:"card-body pt-1"},r9={class:"mb-3"};function a9(t,e,n,s,i,o){const r=He("Bar"),a=He("Line"),l=He("PeerSearch"),c=He("Peer"),u=He("PeerSettings"),d=He("PeerQRCode"),f=He("PeerJobs"),g=He("PeerJobsAllModal"),_=He("PeerJobsLogsModal"),m=He("PeerShareLinkModal");return this.loading?re("",!0):(M(),F("div",XK,[h("div",QK,[h("div",null,[ZK,h("div",e7,[h("h1",t7,[h("samp",null,me(this.configurationInfo.Name),1)])])]),h("div",n7,[h("div",s7,[h("div",null,[i7,h("div",o7,[h("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+this.configurationInfo.id},[be(me(this.configurationToggling?"Turning ":"")+" "+me(this.configurationInfo.Status?"On":"Off")+" ",1),this.configurationToggling?(M(),F("span",a7)):re("",!0)],8,r7),Oe(h("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+this.configurationInfo.id,onChange:e[0]||(e[0]=b=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=b=>this.configurationInfo.Status=b)},null,40,l7),[[_n,this.configurationInfo.Status]])])]),h("div",{class:Ce(["dot ms-5",{active:this.configurationInfo.Status}])},null,2)])])]),h("div",c7,[h("div",u7,[h("div",d7,[h("div",h7,[f7,be(" "+me(this.configurationInfo.Address),1)])])]),h("div",p7,[h("div",g7,[h("div",m7,[_7,be(" "+me(this.configurationInfo.ListenPort),1)])])]),h("div",v7,[h("div",b7,[h("div",y7,[w7,h("samp",null,me(this.configurationInfo.PublicKey),1)])])])]),h("div",x7,[h("div",k7,[h("div",S7,[h("div",$7,[h("div",null,[A7,h("strong",C7,me(o.configurationSummary.connectedPeers),1)]),E7])])]),h("div",P7,[h("div",T7,[h("div",M7,[h("div",null,[D7,h("strong",O7,me(o.configurationSummary.totalUsage)+" GB",1)]),I7])])]),h("div",R7,[h("div",L7,[h("div",N7,[h("div",null,[F7,h("strong",B7,me(o.configurationSummary.totalReceive)+" GB",1)]),V7])])]),h("div",H7,[h("div",j7,[h("div",W7,[h("div",null,[z7,h("strong",Y7,me(o.configurationSummary.totalSent)+" GB",1)]),U7])])])]),h("div",K7,[h("div",q7,[h("div",G7,[J7,h("div",X7,[Se(r,{data:o.individualDataUsage,options:o.individualDataUsageChartOption,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["data","options"])])])]),h("div",Q7,[h("div",Z7,[e9,h("div",t9,[Se(a,{options:o.chartOptions,data:o.receiveData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])]),h("div",n9,[h("div",s9,[i9,h("div",o9,[Se(a,{options:o.chartOptions,data:o.sentData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])])]),h("div",r9,[Se(l,{onJobsAll:e[2]||(e[2]=b=>this.peerScheduleJobsAll.modalOpen=!0),onJobLogs:e[3]||(e[3]=b=>this.peerScheduleJobsLogs.modalOpen=!0),configuration:this.configurationInfo},null,8,["configuration"]),Se(Bi,{name:"list",tag:"div",class:"row gx-2 gy-2 z-0"},{default:Pe(()=>[(M(!0),F(Te,null,Ue(this.searchPeers,b=>(M(),F("div",{class:"col-12 col-lg-6 col-xl-4",key:b.id},[Se(c,{Peer:b,onShare:w=>{this.peerShare.selectedPeer=b.id,this.peerShare.modalOpen=!0},onRefresh:e[4]||(e[4]=w=>this.getPeers()),onJobs:w=>{i.peerScheduleJobs.modalOpen=!0,i.peerScheduleJobs.selectedPeer=this.configurationPeers.find($=>$.id===b.id)},onSetting:w=>{i.peerSetting.modalOpen=!0,i.peerSetting.selectedPeer=this.configurationPeers.find($=>$.id===b.id)},onQrcode:e[5]||(e[5]=w=>{this.peerQRCode.peerConfigData=w,this.peerQRCode.modalOpen=!0})},null,8,["Peer","onShare","onJobs","onSetting"])]))),128))]),_:1})]),Se(At,{name:"zoom"},{default:Pe(()=>[this.peerSetting.modalOpen?(M(),Le(u,{key:"settings",selectedPeer:this.peerSetting.selectedPeer,onRefresh:e[6]||(e[6]=b=>this.getPeers()),onClose:e[7]||(e[7]=b=>this.peerSetting.modalOpen=!1)},null,8,["selectedPeer"])):re("",!0)]),_:1}),Se(At,{name:"zoom"},{default:Pe(()=>[i.peerQRCode.modalOpen?(M(),Le(d,{peerConfigData:this.peerQRCode.peerConfigData,key:"qrcode",onClose:e[8]||(e[8]=b=>this.peerQRCode.modalOpen=!1)},null,8,["peerConfigData"])):re("",!0)]),_:1}),Se(At,{name:"zoom"},{default:Pe(()=>[this.peerScheduleJobs.modalOpen?(M(),Le(f,{key:0,onRefresh:e[9]||(e[9]=b=>this.getPeers()),selectedPeer:this.peerScheduleJobs.selectedPeer,onClose:e[10]||(e[10]=b=>this.peerScheduleJobs.modalOpen=!1)},null,8,["selectedPeer"])):re("",!0)]),_:1}),Se(At,{name:"zoom"},{default:Pe(()=>[this.peerScheduleJobsAll.modalOpen?(M(),Le(g,{key:0,onRefresh:e[11]||(e[11]=b=>this.getPeers()),onClose:e[12]||(e[12]=b=>this.peerScheduleJobsAll.modalOpen=!1),configurationPeers:this.configurationPeers},null,8,["configurationPeers"])):re("",!0)]),_:1}),Se(At,{name:"zoom"},{default:Pe(()=>[this.peerScheduleJobsLogs.modalOpen?(M(),Le(_,{key:0,onClose:e[13]||(e[13]=b=>this.peerScheduleJobsLogs.modalOpen=!1),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):re("",!0)]),_:1}),Se(At,{name:"zoom"},{default:Pe(()=>[this.peerShare.modalOpen?(M(),Le(m,{key:0,onClose:e[14]||(e[14]=b=>{this.peerShare.modalOpen=!1,this.peerShare.selectedPeer=void 0}),peer:this.configurationPeers.find(b=>b.id===this.peerShare.selectedPeer)},null,8,["peer"])):re("",!0)]),_:1})]))}const l9=We(JK,[["render",a9],["__scopeId","data-v-0de09f6d"]]),c9={name:"ping",data(){return{loading:!1,cips:{},selectedConfiguration:void 0,selectedPeer:void 0,selectedIp:void 0,count:4,pingResult:void 0,pinging:!1}},setup(){return{store:Xe()}},mounted(){wt("/api/ping/getAllPeersIpAddress",{},t=>{t.status&&(this.loading=!0,this.cips=t.data,console.log(this.cips))})},methods:{execute(){this.selectedIp&&(this.pinging=!0,this.pingResult=void 0,wt("/api/ping/execute",{ipAddress:this.selectedIp,count:this.count},t=>{t.status?this.pingResult=t.data:this.store.newMessage("Server",t.message,"danger")}))}},watch:{selectedConfiguration(){this.selectedPeer=void 0,this.selectedIp=void 0},selectedPeer(){this.selectedIp=void 0}}},Vn=t=>(Ut("data-v-7b32cdf7"),t=t(),Kt(),t),u9={class:"mt-md-5 mt-3 text-body"},d9={class:"container"},h9=Vn(()=>h("h3",{class:"mb-3 text-body"},"Ping",-1)),f9={class:"row"},p9={class:"col-sm-4 d-flex gap-2 flex-column"},g9=Vn(()=>h("label",{class:"mb-1 text-muted",for:"configuration"},[h("small",null,"Configuration")],-1)),m9=Vn(()=>h("option",{disabled:"",selected:"",value:void 0},"Select a Configuration...",-1)),_9=["value"],v9=Vn(()=>h("label",{class:"mb-1 text-muted",for:"peer"},[h("small",null,"Peer")],-1)),b9=["disabled"],y9=Vn(()=>h("option",{disabled:"",selected:"",value:void 0},"Select a Peer...",-1)),w9=["value"],x9=Vn(()=>h("label",{class:"mb-1 text-muted",for:"ip"},[h("small",null,"IP Address")],-1)),k9=["disabled"],S9=Vn(()=>h("option",{disabled:"",selected:"",value:void 0},"Select a IP...",-1)),$9=Vn(()=>h("label",{class:"mb-1 text-muted",for:"count"},[h("small",null,"Ping Count")],-1)),A9=["disabled"],C9=Vn(()=>h("i",{class:"bi bi-person-walking me-2"},null,-1)),E9={class:"col-sm-8"},P9={key:"pingPlaceholder"},T9={key:"pingResult",class:"d-flex flex-column gap-2 w-100"},M9={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.15s"}},D9={class:"card-body"},O9=Vn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Address")],-1)),I9={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.3s"}},R9={class:"card-body"},L9=Vn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Is Alive")],-1)),N9={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.45s"}},F9={class:"card-body"},B9=Vn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Average / Min / Max Round Trip Time")],-1)),V9={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.6s"}},H9={class:"card-body"},j9=Vn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Sent / Received / Lost Package")],-1));function W9(t,e,n,s,i,o){return M(),F("div",u9,[h("div",d9,[h9,h("div",f9,[h("div",p9,[h("div",null,[g9,Oe(h("select",{class:"form-select","onUpdate:modelValue":e[0]||(e[0]=r=>this.selectedConfiguration=r)},[m9,(M(!0),F(Te,null,Ue(this.cips,(r,a)=>(M(),F("option",{value:a},me(a),9,_9))),256))],512),[[nc,this.selectedConfiguration]])]),h("div",null,[v9,Oe(h("select",{id:"peer",class:"form-select","onUpdate:modelValue":e[1]||(e[1]=r=>this.selectedPeer=r),disabled:this.selectedConfiguration===void 0},[y9,this.selectedConfiguration!==void 0?(M(!0),F(Te,{key:0},Ue(this.cips[this.selectedConfiguration],(r,a)=>(M(),F("option",{value:a},me(a),9,w9))),256)):re("",!0)],8,b9),[[nc,this.selectedPeer]])]),h("div",null,[x9,Oe(h("select",{id:"ip",class:"form-select","onUpdate:modelValue":e[2]||(e[2]=r=>this.selectedIp=r),disabled:this.selectedPeer===void 0},[S9,this.selectedPeer!==void 0?(M(!0),F(Te,{key:0},Ue(this.cips[this.selectedConfiguration][this.selectedPeer].allowed_ips,r=>(M(),F("option",null,me(r),1))),256)):re("",!0)],8,k9),[[nc,this.selectedIp]])]),h("div",null,[$9,Oe(h("input",{class:"form-control",type:"number","onUpdate:modelValue":e[3]||(e[3]=r=>this.count=r),min:"1",id:"count",placeholder:"How many times you want to ping?"},null,512),[[je,this.count]])]),h("button",{class:"btn btn-primary rounded-3 mt-3",disabled:!this.selectedIp,onClick:e[4]||(e[4]=r=>this.execute())},[C9,be("Go! ")],8,A9)]),h("div",E9,[Se(Bi,{name:"ping"},{default:Pe(()=>[this.pingResult?(M(),F("div",T9,[h("div",M9,[h("div",D9,[O9,be(" "+me(this.pingResult.address),1)])]),h("div",I9,[h("div",R9,[L9,h("span",{class:Ce([this.pingResult.is_alive?"text-success":"text-danger"])},[h("i",{class:Ce(["bi me-1",[this.pingResult.is_alive?"bi-check-circle-fill":"bi-x-circle-fill"]])},null,2),be(" "+me(this.pingResult.is_alive?"Yes":"No"),1)],2)])]),h("div",N9,[h("div",F9,[B9,h("samp",null,me(this.pingResult.avg_rtt)+"ms / "+me(this.pingResult.min_rtt)+"ms / "+me(this.pingResult.max_rtt)+"ms ",1)])]),h("div",V9,[h("div",H9,[j9,h("samp",null,me(this.pingResult.package_sent)+" / "+me(this.pingResult.package_received)+" / "+me(this.pingResult.package_loss),1)])])])):(M(),F("div",P9,[(M(),F(Te,null,Ue(4,r=>h("div",{class:Ce(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.pinging}]),style:jt({"animation-delay":`${r*.15}s`})},null,6)),64))]))]),_:1})])])])])}const z9=We(c9,[["render",W9],["__scopeId","data-v-7b32cdf7"]]),Y9={name:"traceroute",data(){return{tracing:!1,ipAddress:void 0,tracerouteResult:void 0}},setup(){return{store:Tn()}},methods:{execute(){this.ipAddress&&(this.tracing=!0,this.tracerouteResult=void 0,wt("/api/traceroute/execute",{ipAddress:this.ipAddress},t=>{t.status?this.tracerouteResult=t.data:this.store.newMessage("Server",t.message,"danger"),this.tracing=!1}))}}},pu=t=>(Ut("data-v-606c2c93"),t=t(),Kt(),t),U9={class:"mt-md-5 mt-3 text-body"},K9={class:"container-md"},q9=pu(()=>h("h3",{class:"mb-3 text-body"},"Traceroute",-1)),G9={class:"row"},J9={class:"col-sm-4 d-flex gap-2 flex-column"},X9=pu(()=>h("label",{class:"mb-1 text-muted",for:"ipAddress"},[h("small",null,"IP Address")],-1)),Q9=["disabled"],Z9=pu(()=>h("i",{class:"bi bi-bullseye me-2"},null,-1)),eq={class:"col-sm-8 position-relative"},tq={key:"pingPlaceholder"},nq={key:"table",class:"w-100"},sq={class:"table table-borderless rounded-3 w-100"},iq=pu(()=>h("thead",null,[h("tr",null,[h("th",{scope:"col"},"Hop"),h("th",{scope:"col"},"IP Address"),h("th",{scope:"col"},"Average / Min / Max Round Trip Time")])],-1));function oq(t,e,n,s,i,o){return M(),F("div",U9,[h("div",K9,[q9,h("div",G9,[h("div",J9,[h("div",null,[X9,Oe(h("input",{id:"ipAddress",class:"form-control","onUpdate:modelValue":e[0]||(e[0]=r=>this.ipAddress=r),type:"text",placeholder:"Enter an IP Address you want to trace :)"},null,512),[[je,this.ipAddress]])]),h("button",{class:"btn btn-primary rounded-3 mt-3",disabled:!this.store.regexCheckIP(this.ipAddress)||this.tracing,onClick:e[1]||(e[1]=r=>this.execute())},[Z9,be(" "+me(this.tracing?"Tracing...":"Trace It!"),1)],8,Q9)]),h("div",eq,[Se(Bi,{name:"ping"},{default:Pe(()=>[this.tracerouteResult?(M(),F("div",nq,[h("table",sq,[iq,h("tbody",null,[(M(!0),F(Te,null,Ue(this.tracerouteResult,(r,a)=>(M(),F("tr",{class:"animate__fadeInUp animate__animated",style:jt({"animation-delay":`${a*.05}s`})},[h("td",null,me(r.hop),1),h("td",null,me(r.ip),1),h("td",null,me(r.avg_rtt)+" / "+me(r.min_rtt)+" / "+me(r.max_rtt),1)],4))),256))])])])):(M(),F("div",tq,[(M(),F(Te,null,Ue(10,r=>h("div",{class:Ce(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.tracing}]),style:jt({"animation-delay":`${r*.05}s`})},null,6)),64))]))]),_:1})])])])])}const rq=We(Y9,[["render",oq],["__scopeId","data-v-606c2c93"]]),aq={name:"totp",async setup(){const t=Xe();let e="";return await wt("/api/Welcome_GetTotpLink",{},n=>{n.status&&(e=n.data)}),{l:e,store:t}},mounted(){this.l&&Lo.toCanvas(document.getElementById("qrcode"),this.l,function(t){})},data(){return{totp:"",totpInvalidMessage:"",verified:!1}},methods:{validateTotp(){}},watch:{totp(t){const e=document.querySelector("#totp");e.classList.remove("is-invalid","is-valid"),t.length===6&&(console.log(t),/[0-9]{6}/.test(t)?ht("/api/Welcome_VerifyTotpLink",{totp:t},n=>{n.status?(this.verified=!0,e.classList.add("is-valid"),this.$emit("verified")):(e.classList.add("is-invalid"),this.totpInvalidMessage="TOTP does not match.")}):(e.classList.add("is-invalid"),this.totpInvalidMessage="TOTP can only contain numbers"))}}},lq=["data-bs-theme"],cq={class:"m-auto text-body",style:{width:"500px"}},uq={class:"d-flex flex-column"},dq=h("h1",{class:"dashboardLogo display-4"},"Multi-Factor Authentication",-1),hq=h("p",{class:"mb-2"},[h("small",{class:"text-muted"},"1. Please scan the following QR Code to generate TOTP")],-1),fq=h("canvas",{id:"qrcode",class:"rounded-3 mb-2"},null,-1),pq={class:"p-3 bg-body-secondary rounded-3 border mb-3"},gq=h("p",{class:"text-muted mb-0"},[h("small",null,"Or you can click the link below:")],-1),mq=["href"],_q={style:{"line-break":"anywhere"}},vq=h("label",{for:"totp",class:"mb-2"},[h("small",{class:"text-muted"},"2. Enter the TOTP generated by your authenticator to verify")],-1),bq={class:"form-group mb-2"},yq=["disabled"],wq={class:"invalid-feedback"},xq=h("div",{class:"valid-feedback"}," TOTP verified! ",-1),kq=h("div",{class:"alert alert-warning rounded-3"},[h("i",{class:"bi bi-exclamation-triangle-fill me-2"}),be(" If you ever lost your TOTP and can't login, please follow instruction on "),h("a",{href:"https://github.com/donaldzou/WGDashboard",target:"_blank"},"readme.md"),be(" to reset. ")],-1),Sq=h("hr",null,null,-1),$q={class:"d-flex gap-3 mt-5 flex-column"},Aq=h("i",{class:"bi bi-chevron-right ms-auto"},null,-1),Cq=h("i",{class:"bi bi-chevron-right ms-auto"},null,-1);function Eq(t,e,n,s,i,o){const r=He("RouterLink");return M(),F("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[h("div",cq,[h("div",uq,[h("div",null,[dq,hq,fq,h("div",pq,[gq,h("a",{href:this.l},[h("code",_q,me(this.l),1)],8,mq)]),vq,h("div",bq,[Oe(h("input",{class:"form-control text-center totp",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code","onUpdate:modelValue":e[0]||(e[0]=a=>this.totp=a),disabled:this.verified},null,8,yq),[[je,this.totp]]),h("div",wq,me(this.totpInvalidMessage),1),xq]),kq]),Sq,h("div",$q,[this.verified?(M(),Le(r,{key:1,to:"/",class:"btn btn-dark btn-lg d-flex btn-brand shadow align-items-center flex-grow-1 rounded-3"},{default:Pe(()=>[be(" Complete "),Cq]),_:1})):(M(),Le(r,{key:0,to:"/",class:"btn bg-secondary-subtle text-secondary-emphasis rounded-3 flex-grow-1 btn-lg border-1 border-secondary-subtle shadow d-flex"},{default:Pe(()=>[be(" I don't need MFA "),Aq]),_:1}))])])])],8,lq)}const Pq=We(aq,[["render",Eq]]),Tq={name:"share",async setup(){const t=NE(),e=ve(!1),n=Xe(),s=ve(""),i=ve(""),o=ve(new Blob);await wt("/api/getDashboardTheme",{},a=>{s.value=a.data});const r=t.query.ShareID;return r===void 0||r.length===0?(i.value=void 0,e.value=!0):await wt("/api/sharePeer/get",{ShareID:r},a=>{a.status?(i.value=a.data,o.value=new Blob([i.value.file],{type:"text/plain"})):i.value=void 0,e.value=!0}),{store:n,theme:s,peerConfiguration:i,blob:o}},mounted(){Lo.toCanvas(document.querySelector("#qrcode"),this.peerConfiguration.file,t=>{t&&console.error(t)})},methods:{download(){const t=new Blob([this.peerConfiguration.file],{type:"text/plain"}),e=URL.createObjectURL(t),n=`${this.peerConfiguration.fileName}.conf`,s=document.createElement("a");s.href=e,s.download=n,s.click()}},computed:{getBlob(){return URL.createObjectURL(this.blob)}}},Uf=t=>(Ut("data-v-99d4b06a"),t=t(),Kt(),t),Mq=["data-bs-theme"],Dq={class:"m-auto text-body",style:{width:"500px"}},Oq={key:0,class:"text-center position-relative",style:{}},Iq=IA('<div class="animate__animated animate__fadeInUp" data-v-99d4b06a><h1 style="font-size:20rem;filter:blur(1rem);animation-duration:7s;" class="animate__animated animate__flash animate__infinite" data-v-99d4b06a><i class="bi bi-file-binary" data-v-99d4b06a></i></h1></div><div class="position-absolute w-100 h-100 top-0 start-0 d-flex animate__animated animate__fadeInUp" style="animation-delay:0.1s;" data-v-99d4b06a><h3 class="m-auto" data-v-99d4b06a>Oh no... This link is either expired or invalid.</h3></div>',2),Rq=[Iq],Lq={key:1,class:"d-flex align-items-center flex-column gap-3"},Nq=Uf(()=>h("div",{class:"h1 dashboardLogo text-center animate__animated animate__fadeInUp"},[h("h6",null,"WGDashboard"),be(" Scan QR Code from the WireGuard App ")],-1)),Fq={id:"qrcode",class:"rounded-3 shadow animate__animated animate__fadeInUp mb-3",ref:"qrcode"},Bq=Uf(()=>h("p",{class:"text-muted animate__animated animate__fadeInUp mb-1",style:{"animation-delay":"0.2s"}},[be("or click the button below to download the "),h("samp",null,".conf"),be(" file")],-1)),Vq=["download","href"],Hq=Uf(()=>h("i",{class:"bi bi-download"},null,-1)),jq=[Hq];function Wq(t,e,n,s,i,o){return M(),F("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.theme},[h("div",Dq,[this.peerConfiguration?(M(),F("div",Lq,[Nq,h("canvas",Fq,null,512),Bq,h("a",{download:this.peerConfiguration.fileName+".conf",href:o.getBlob,class:"btn btn-lg bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle animate__animated animate__fadeInUp shadow-sm",style:{"animation-delay":"0.25s"}},jq,8,Vq)])):(M(),F("div",Oq,Rq))])],8,Mq)}const zq=We(Tq,[["render",Wq],["__scopeId","data-v-99d4b06a"]]),Yq=async()=>{let t=!1;return await wt("/api/validateAuthentication",{},e=>{t=e.status}),t},rl=RE({history:QC(),routes:[{name:"Index",path:"/",component:MP,meta:{requiresAuth:!0},children:[{name:"Configuration List",path:"",component:mM,meta:{title:"WireGuard Configurations"}},{name:"Settings",path:"/settings",component:S3,meta:{title:"Settings"}},{path:"/ping",name:"Ping",component:z9},{path:"/traceroute",name:"Traceroute",component:rq},{name:"New Configuration",path:"/new_configuration",component:r5,meta:{title:"New Configuration"}},{name:"Configuration",path:"/configuration/:id",component:u5,meta:{title:"Configuration"},children:[{name:"Peers List",path:"peers",component:l9},{name:"Peers Create",path:"create",component:M1}]}]},{path:"/signin",component:RT,meta:{title:"Sign In"}},{path:"/welcome",component:U3,meta:{requiresAuth:!0,title:"Welcome to WGDashboard"}},{path:"/2FASetup",component:Pq,meta:{requiresAuth:!0,title:"Multi-Factor Authentication Setup"}},{path:"/share",component:zq,meta:{title:"Share"}}]});rl.beforeEach(async(t,e,n)=>{const s=Tn(),i=Xe();t.meta.title?t.params.id?document.title=t.params.id+" | WGDashboard":document.title=t.meta.title+" | WGDashboard":document.title="WGDashboard",i.ShowNavBar=!1,t.meta.requiresAuth?i.getActiveCrossServer()?(await i.getConfiguration(),!s.Configurations&&t.name!=="Configuration List"&&await s.getConfigurations(),n()):FE.getCookie("authToken")&&await Yq()?(await i.getConfiguration(),!s.Configurations&&t.name!=="Configuration List"&&await s.getConfigurations(),i.Redirect=void 0,n()):(i.Redirect=t,n("/signin"),i.newMessage("WGDashboard","Session Ended","warning")):n()});const I1=()=>{let t={"content-type":"application/json"};const n=Xe().getActiveCrossServer();return n&&(t["wg-dashboard-apikey"]=n.apiKey),t},R1=t=>{const n=Xe().getActiveCrossServer();return n?`${n.host}${t}`:`${window.location.protocol}//${(window.location.host+window.location.pathname+t).replace(/\/\//g,"/")}`},wt=async(t,e=void 0,n=void 0)=>{const s=new URLSearchParams(e);await fetch(`${R1(t)}?${s.toString()}`,{headers:I1()}).then(i=>{const o=Xe();if(i.ok)return i.json();if(i.status!==200)throw i.status===401&&o.newMessage("WGDashboard","Session Ended","warning"),new Error(i.statusText)}).then(i=>n?n(i):void 0).catch(i=>{console.log(i),rl.push({path:"/signin"})})},ht=async(t,e,n)=>{await fetch(`${R1(t)}`,{headers:I1(),method:"POST",body:JSON.stringify(e)}).then(s=>{const i=Xe();if(s.ok)return s.json();if(s.status!==200)throw s.status===401&&i.newMessage("WGDashboard","Session Ended","warning"),new Error(s.statusText)}).then(s=>n?n(s):void 0).catch(s=>{console.log(s),rl.push({path:"/signin"})})},Xe=Qh("DashboardConfigurationStore",{state:()=>({Redirect:void 0,Configuration:void 0,Messages:[],Peers:{Selecting:!1,RefreshInterval:void 0},CrossServerConfiguration:{Enable:!1,ServerList:{}},ActiveServerConfiguration:void 0,IsElectronApp:!1,ShowNavBar:!1,Locale:{}}),actions:{initCrossServerConfiguration(){const t=localStorage.getItem("CrossServerConfiguration");localStorage.getItem("ActiveCrossServerConfiguration")!==null&&(this.ActiveServerConfiguration=localStorage.getItem("ActiveCrossServerConfiguration")),t===null?window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration)):this.CrossServerConfiguration=JSON.parse(t)},syncCrossServerConfiguration(){window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration))},addCrossServerConfiguration(){this.CrossServerConfiguration.ServerList[Ps().toString()]={host:"",apiKey:"",active:!1}},deleteCrossServerConfiguration(t){delete this.CrossServerConfiguration.ServerList[t]},getActiveCrossServer(){const t=localStorage.getItem("ActiveCrossServerConfiguration");if(t!==null)return this.CrossServerConfiguration.ServerList[t]},setActiveCrossServer(t){this.ActiveServerConfiguration=t,localStorage.setItem("ActiveCrossServerConfiguration",t)},removeActiveCrossServer(){this.ActiveServerConfiguration=void 0,localStorage.removeItem("ActiveCrossServerConfiguration")},async getConfiguration(){await wt("/api/getDashboardConfiguration",{},t=>{t.status&&(this.Configuration=t.data)})},async signOut(){await wt("/api/signout",{},t=>{this.removeActiveCrossServer(),this.$router.go("/signin")})},newMessage(t,e,n){this.Messages.push({id:Ps(),from:t,content:e,type:n,show:!0})},async getLocale(){await wt("/api/locale",{id:"zh-CN"},t=>{this.Locale=JSON.parse(t.data)})}}}),Kf=t=>(Ut("data-v-822f113b"),t=t(),Kt(),t),Uq={class:"navbar bg-dark sticky-top","data-bs-theme":"dark"},Kq={class:"container-fluid d-flex text-body align-items-center"},qq=Kf(()=>h("span",{class:"navbar-brand mb-0 h1"},"WGDashboard",-1)),Gq={key:0,class:"ms-auto text-muted"},Jq=Kf(()=>h("i",{class:"bi bi-server me-2"},null,-1)),Xq=Kf(()=>h("i",{class:"bi bi-list"},null,-1)),Qq=[Xq],Zq={__name:"App",setup(t){const e=Xe();e.initCrossServerConfiguration(),window.IS_WGDASHBOARD_DESKTOP&&(e.IsElectronApp=!0,e.CrossServerConfiguration.Enable=!0),Bt(e.CrossServerConfiguration,()=>{e.syncCrossServerConfiguration()},{deep:!0});const n=_e(()=>{if(e.ActiveServerConfiguration)return e.CrossServerConfiguration.ServerList[e.ActiveServerConfiguration]});return(s,i)=>(M(),F(Te,null,[h("nav",Uq,[h("div",Kq,[qq,n.value!==void 0?(M(),F("small",Gq,[Jq,be(me(n.value.host),1)])):re("",!0),h("a",{role:"button",class:"navbarBtn text-body",onClick:i[0]||(i[0]=o=>q(e).ShowNavBar=!q(e).ShowNavBar),style:{"line-height":"0","font-size":"2rem"}},Qq)])]),(M(),Le(Wh,null,{default:Pe(()=>[Se(q(iy),null,{default:Pe(({Component:o})=>[Se(At,{name:"app",mode:"out-in"},{default:Pe(()=>[(M(),Le(Mo(o)))]),_:2},1024)]),_:1})]),_:1}))],64))}},eG=We(Zq,[["__scopeId","data-v-822f113b"]]),qf=SC(eG);qf.use(rl);const L1=EC();L1.use(({store:t})=>{t.$router=Bc(rl)});qf.use(L1);const tG=Xe();await tG.getLocale();qf.mount("#app");
|