41 lines
495 KiB
JavaScript
Raw Normal View History

2024-03-24 22:55:19 -04:00
var q0=Object.defineProperty;var G0=(e,t,n)=>t in e?q0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var st=(e,t,n)=>(G0(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.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 Rp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function X0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Q0(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),n}var J0={exports:{}},ge="top",De="bottom",$e="right",me="left",Da="auto",Ui=[ge,De,$e,me],Ws="start",wi="end",Np="clippingParents",Vc="viewport",ui="popper",Fp="reference",Jl=Ui.reduce(function(e,t){return e.concat([t+"-"+Ws,t+"-"+wi])},[]),Hc=[].concat(Ui,[Da]).reduce(function(e,t){return e.concat([t,t+"-"+Ws,t+"-"+wi])},[]),Bp="beforeRead",Vp="read",Hp="afterRead",jp="beforeMain",Wp="main",zp="afterMain",Up="beforeWrite",Kp="write",Yp="afterWrite",qp=[Bp,Vp,Hp,jp,Wp,zp,Up,Kp,Yp];function hn(e){return e?(e.nodeName||"").toLowerCase():null}function Le(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function zs(e){var t=Le(e).Element;return e instanceof t||e instanceof Element}function Ue(e){var t=Le(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function jc(e){if(typeof ShadowRoot>"u")return!1;var t=Le(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Z0(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var s=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Ue(o)||!hn(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 tx(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(s){var i=t.elements[s],o=t.attributes[s]||{},r=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:n[s]),a=r.reduce(function(l,c){return l[c]="",l},{});!Ue(i)||!hn(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Wc={name:"applyStyles",enabled:!0,phase:"write",fn:Z0,effect:tx,requires:["computeStyles"]};function cn(e){return e.split("-")[0]}var Rs=Math.max,aa=Math.min,Ei=Math.round;function Zl(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Gp(){return!/^((?!chrome|android).)*safari/i.test(Zl())}function Si(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var s=e.getBoundingClientRect(),i=1,o=1;t&&Ue(e)&&(i=e.offsetWidth>0&&Ei(s.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Ei(s.height)/e.offsetHeight||1);var r=zs(e)?Le(e):window,a=r.visualViewport,l=!Gp()&&n,c=(s.left+(l&&a?a.offsetLeft:0))
* 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)
2024-03-24 22:55:19 -04:00
*/(function(e,t){(function(n,s){e.exports=s(Hx)})(Rp,function(n){function s(M){const h=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(M){for(const b in M)if(b!=="default"){const O=Object.getOwnPropertyDescriptor(M,b);Object.defineProperty(h,b,O.get?O:{enumerable:!0,get:()=>M[b]})}}return h.default=M,Object.freeze(h)}const i=s(n),o=new Map,r={set(M,h,b){o.has(M)||o.set(M,new Map);const O=o.get(M);if(!O.has(h)&&O.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(O.keys())[0]}.`);return}O.set(h,b)},get(M,h){return o.has(M)&&o.get(M).get(h)||null},remove(M,h){if(!o.has(M))return;const b=o.get(M);b.delete(h),b.size===0&&o.delete(M)}},a=1e6,l=1e3,c="transitionend",u=M=>(M&&window.CSS&&window.CSS.escape&&(M=M.replace(/#([^\s"#']+)/g,(h,b)=>`#${CSS.escape(b)}`)),M),d=M=>M==null?`${M}`:Object.prototype.toString.call(M).match(/\s([a-z]+)/i)[1].toLowerCase(),f=M=>{do M+=Math.floor(Math.random()*a);while(document.getElementById(M));return M},p=M=>{if(!M)return 0;let{transitionDuration:h,transitionDelay:b}=window.getComputedStyle(M);const O=Number.parseFloat(h),z=Number.parseFloat(b);return!O&&!z?0:(h=h.split(",")[0],b=b.split(",")[0],(Number.parseFloat(h)+Number.parseFloat(b))*l)},m=M=>{M.dispatchEvent(new Event(c))},_=M=>!M||typeof M!="object"?!1:(typeof M.jquery<"u"&&(M=M[0]),typeof M.nodeType<"u"),y=M=>_(M)?M.jquery?M[0]:M:typeof M=="string"&&M.length>0?document.querySelector(u(M)):null,x=M=>{if(!_(M)||M.getClientRects().length===0)return!1;const h=getComputedStyle(M).getPropertyValue("visibility")==="visible",b=M.closest("details:not([open])");if(!b)return h;if(b!==M){const O=M.closest("summary");if(O&&O.parentNode!==b||O===null)return!1}return h},S=M=>!M||M.nodeType!==Node.ELEMENT_NODE||M.classList.contains("disabled")?!0:typeof M.disabled<"u"?M.disabled:M.hasAttribute("disabled")&&M.getAttribute("disabled")!=="false",P=M=>{if(!document.documentElement.attachShadow)return null;if(typeof M.getRootNode=="function"){const h=M.getRootNode();return h instanceof ShadowRoot?h:null}return M instanceof ShadowRoot?M:M.parentNode?P(M.parentNode):null},C=()=>{},v=M=>{M.offsetHeight},E=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,A=[],w=M=>{document.readyState==="loading"?(A.length||document.addEventListener("DOMContentLoaded",()=>{for(const h of A)h()}),A.push(M)):M()},k=()=>document.documentElement.dir==="rtl",$=M=>{w(()=>{const h=E();if(h){const b=M.NAME,O=h.fn[b];h.fn[b]=M.jQueryInterface,h.fn[b].Constructor=M,h.fn[b].noConflict=()=>(h.fn[b]=O,M.jQueryInterface)}})},L=(M,h=[],b=M)=>typeof M=="function"?M(...h):b,N=(M,h,b=!0)=>{if(!b){L(M);return}const z=p(h)+5;let nt=!1;const tt=({target:St})=>{St===h&&(nt=!0,h.removeEventListener(c,tt),L(M))};h.addEventListener(c,tt),setTimeout(()=>{nt||m(h)},z)},X=(M,h,b,O)=>{const z=M.length;let nt=M.indexOf(h);return nt===-1?!b&&O?M[z-1]:M[0]:(nt+=b?1:-1,O&&(nt=(nt+z)%z),M[Math.max(0,Math.min(nt,z-1))])},Y=/[^.]*(?=\..*)\.|.*/,H=/\..*/,R=/::\d+$/,W={};let U=1;const it={mouseenter:"mouseover",mouseleave:"mouseout"},lt=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 pt(M,h){return h&&`${h}::${U++}`||M.uidEvent||U++}function ft(M){const h=pt(M);return M.uidEvent=h,W[h]=W[h]||{},W[h]}function At(M,h){return function b(O){return T(O,{delegateTarget:M}),b.oneOff&&F.off(M,O.type,h),h.apply(M,[O])}}function wt(M,h,b){return function O(z){const nt=M.querySelectorAll(h);for(let{target:tt}=z;tt&&tt!==this;tt=tt.parentNode)for(const St of nt)if(St===tt)return T(z,{delegateTarget:tt}),O
* pinia v2.1.7
* (c) 2023 Eduardo San Martin Morote
* @license MIT
2024-03-24 22:55:19 -04:00
*/let vm;const Xa=e=>vm=e,xm=Symbol();function gc(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var wo;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(wo||(wo={}));function vE(){const e=gg(!0),t=e.run(()=>Pi({}));let n=[],s=[];const i=er({install(o){Xa(i),i._a=o,o.provide(xm,i),o.config.globalProperties.$pinia=i,s.forEach(r=>n.push(r)),s=[]},use(o){return!this._a&&!yE?s.push(o):n.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}const wm=()=>{};function Bh(e,t,n,s=wm){e.push(t);const i=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&iu()&&mg(i),i}function ri(e,...t){e.slice().forEach(n=>{n(...t)})}const xE=e=>e();function mc(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,s)=>e.set(s,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],i=e[n];gc(i)&&gc(s)&&e.hasOwnProperty(n)&&!ne(s)&&!ts(s)?e[n]=mc(i,s):e[n]=s}return e}const wE=Symbol();function EE(e){return!gc(e)||!e.hasOwnProperty(wE)}const{assign:zn}=Object;function SE(e){return!!(ne(e)&&e.effect)}function CE(e,t,n,s){const{state:i,actions:o,getters:r}=t,a=n.state.value[e];let l;function c(){a||(n.state.value[e]=i?i():{});const u=Sw(n.state.value[e]);return zn(u,o,Object.keys(r||{}).reduce((d,f)=>(d[f]=er(He(()=>{Xa(n);const p=n._s.get(e);return r[f].call(p,p)})),d),{}))}return l=Em(e,c,t,n,s,!0),l}function Em(e,t,n={},s,i,o){let r;const a=zn({actions:{}},n),l={deep:!0};let c,u,d=[],f=[],p;const m=s.state.value[e];!o&&!m&&(s.state.value[e]={}),Pi({});let _;function y(w){let k;c=u=!1,typeof w=="function"?(w(s.state.value[e]),k={type:wo.patchFunction,storeId:e,events:p}):(mc(s.state.value[e],w),k={type:wo.patchObject,payload:w,storeId:e,events:p});const $=_=Symbol();Va().then(()=>{_===$&&(c=!0)}),u=!0,ri(d,k,s.state.value[e])}const x=o?function(){const{state:k}=n,$=k?k():{};this.$patch(L=>{zn(L,$)})}:wm;function S(){r.stop(),d=[],f=[],s._s.delete(e)}function P(w,k){return function(){Xa(s);const $=Array.from(arguments),L=[],N=[];function X(R){L.push(R)}function Y(R){N.push(R)}ri(f,{args:$,name:w,store:v,after:X,onError:Y});let H;try{H=k.apply(this&&this.$id===e?this:v,$)}catch(R){throw ri(N,R),R}return H instanceof Promise?H.then(R=>(ri(L,R),R)).catch(R=>(ri(N,R),Promise.reject(R))):(ri(L,H),H)}}const C={_p:s,$id:e,$onAction:Bh.bind(null,f),$patch:y,$reset:x,$subscribe(w,k={}){const $=Bh(d,w,k.detached,()=>L()),L=r.run(()=>Bs(()=>s.state.value[e],N=>{(k.flush==="sync"?u:c)&&w({storeId:e,type:wo.direct,events:p},N)},zn({},l,k)));return $},$dispose:S},v=tr(C);s._s.set(e,v);const A=(s._a&&s._a.runWithContext||xE)(()=>s._e.run(()=>(r=gg()).run(t)));for(const w in A){const k=A[w];if(ne(k)&&!SE(k)||ts(k))o||(m&&EE(k)&&(ne(k)?k.value=m[w]:mc(k,m[w])),s.state.value[e][w]=k);else if(typeof k=="function"){const $=P(w,k);A[w]=$,a.actions[w]=k}}return zn(v,A),zn(Tt(v),A),Object.defineProperty(v,"$state",{get:()=>s.state.value[e],set:w=>{y(k=>{zn(k,w)})}}),s._p.forEach(w=>{zn(v,r.run(()=>w({store:v,app:s._a,pinia:s,options:a})))}),m&&o&&n.hydrate&&n.hydrate(v.$state,m),c=!0,u=!0,v}function Pu(e,t,n){let s,i;const o=typeof t=="function";typeof e=="string"?(s=e,i=o?n:t):(i=e,s=e.id);function r(a,l){const c=h1();return a=a||(c?un(xm,null):null),a&&Xa(a),a=vm,a._s.has(s)||(o?Em(s,t,i,a):CE(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
2024-03-24 22:55:19 -04:00
*/const di=typeof window<"u";function AE(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Rt=Object.assign;function kl(e,t){const n={};for(const s in t){const i=t[s];n[s]=tn(i)?i.map(e):e(i)}return n}const Eo=()=>{},tn=Array.isArray,TE=/\/$/,PE=e=>e.replace(TE,"");function Ol(e,t,n="/"){let s,i={},o="",r="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(s=t.slice(0,l),o=t.slice(l+1,a>-1?a:t.length),i=e(o)),a>-1&&(s=s||t.slice(0,a),r=t.slice(a,t.length)),s=DE(s??t,n),{fullPath:s+(o&&"?")+o+r,path:s,query:i,hash:r}}function ME(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Vh(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function kE(e,t,n){const s=t.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&Ii(t.matched[s],n.matched[i])&&Sm(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Ii(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Sm(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!OE(e[n],t[n]))return!1;return!0}function OE(e,t){return tn(e)?Hh(e,t):tn(t)?Hh(t,e):e===t}function Hh(e,t){return tn(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function DE(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.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 Wo;(function(e){e.pop="pop",e.push="push"})(Wo||(Wo={}));var So;(function(e){e.back="back",e.forward="forward",e.unknown=""})(So||(So={}));function $E(e){if(!e)if(di){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),PE(e)}const LE=/^[^#]+#/;function IE(e,t){return e.replace(LE,"#")+t}function RE(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Qa=()=>({left:window.pageXOffset,top:window.pageYOffset});function NE(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=RE(i,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function jh(e,t){return(history.state?history.state.position-t:-1)+e}const _c=new Map;function FE(e,t){_c.set(e,t)}function BE(e){const t=_c.get(e);return _c.delete(e),t}let VE=()=>location.protocol+"//"+location.host;function Cm(e,t){const{pathname:n,search:s,hash:i}=t,o=e.indexOf("#");if(o>-1){let a=i.includes(e.slice(o))?e.slice(o).length:1,l=i.slice(a);return l[0]!=="/"&&(l="/"+l),Vh(l,"")}return Vh(n,e)+s+i}function HE(e,t,n,s){let i=[],o=[],r=null;const a=({state:f})=>{const p=Cm(e,location),m=n.value,_=t.value;let y=0;if(f){if(n.value=p,t.value=f,r&&r===m){r=null;return}y=_?f.position-_.position:0}else s(p);i.forEach(x=>{x(n.value,m,{delta:y,type:Wo.pop,direction:y?y>0?So.forward:So.back:So.unknown})})};function l(){r=n.value}function c(f){i.push(f);const p=()=>{const m=i.indexOf(f);m>-1&&i.splice(m,1)};return o.push(p),p}function u(){const{history:f}=window;f.state&&f.replaceState(Rt({},f.state,{scroll:Qa()}),"")}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 Wh(e,t,n,s=!1,i=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:i?Qa():null}}function jE(e){const{history:t,location:n}=window,s={value:Cm(e,n)},i={value:t.state};i.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replace
]))+`;pn.KANJI=new RegExp(zo,"g");pn.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");pn.BYTE=new RegExp(QT,"g");pn.NUMERIC=new RegExp(zm,"g");pn.ALPHANUMERIC=new RegExp(XT,"g");const JT=new RegExp("^"+zo+"$"),ZT=new RegExp("^"+zm+"$"),tP=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");pn.testKanji=function(t){return JT.test(t)};pn.testNumeric=function(t){return ZT.test(t)};pn.testAlphanumeric=function(t){return tP.test(t)};(function(e){const t=$u,n=pn;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,r){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?o.ccBits[0]:r<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return n.testNumeric(o)?e.NUMERIC:n.testAlphanumeric(o)?e.ALPHANUMERIC:n.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.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 e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+i)}}e.from=function(o,r){if(e.isValid(o))return o;try{return s(o)}catch{return r}}})(ds);(function(e){const t=Ie,n=Za,s=Ja,i=ds,o=$u,r=7973,a=t.getBCHDigit(r);function l(f,p,m){for(let _=1;_<=40;_++)if(p<=e.getCapacity(_,m,f))return _}function c(f,p){return i.getCharCountIndicator(f,p)+4}function u(f,p){let m=0;return f.forEach(function(_){const y=c(_.mode,p);m+=y+_.getBitsLength()}),m}function d(f,p){for(let m=1;m<=40;m++)if(u(f,m)<=e.getCapacity(m,p,i.MIXED))return m}e.from=function(p,m){return o.isValid(p)?parseInt(p,10):m},e.getCapacity=function(p,m,_){if(!o.isValid(p))throw new Error("Invalid QR Code version");typeof _>"u"&&(_=i.BYTE);const y=t.getSymbolTotalCodewords(p),x=n.getTotalCodewordsCount(p,m),S=(y-x)*8;if(_===i.MIXED)return S;const P=S-c(_,p);switch(_){case i.NUMERIC:return Math.floor(P/10*3);case i.ALPHANUMERIC:return Math.floor(P/11*2);case i.KANJI:return Math.floor(P/13);case i.BYTE:default:return Math.floor(P/8)}},e.getBestVersionForData=function(p,m){let _;const y=s.from(m,s.M);if(Array.isArray(p)){if(p.length>1)return d(p,y);if(p.length===0)return 1;_=p[0]}else _=p;return l(_.mode,_.getLength(),y)},e.getEncodedBits=function(p){if(!o.isValid(p)||p<7)throw new Error("Invalid QR Code version");let m=p<<12;for(;t.getBCHDigit(m)-a>=0;)m^=r<<t.getBCHDigit(m)-a;return p<<12|m}})(Wm);var Um={};const vc=Ie,Km=1335,eP=21522,of=vc.getBCHDigit(Km);Um.getEncodedBits=function(t,n){const s=t.bit<<3|n;let i=s<<10;for(;vc.getBCHDigit(i)-of>=0;)i^=Km<<vc.getBCHDigit(i)-of;return(s<<10|i)^eP};var Ym={};const nP=ds;function Ni(e){this.mode=nP.NUMERIC,this.data=e.toString()}Ni.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};Ni.prototype.getLength=function(){return this.data.length};Ni.prototype.getBitsLength=function(){return Ni.getBitsLength(this.data.length)};Ni.prototype.write=function(t){let n,s,i;for(n=0;n+3<=this.data.length;n+=3)s=this.data.substr(n,3),i=parseInt(s,10),t.put(i,10);const o=this.data.length-n;o>0&&(s=this.data.substr(n),i=parseInt(s,10),t.put(i,o*3+1))};var sP=Ni;const iP=ds,$l=["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 Fi(e){this.mode=iP.ALPHANUMERIC,this.data=e}Fi.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Fi.prototype.getLength=function(){return this.data.length};Fi.prototype.getBitsLength=function(){return Fi.getBitsLength(this.data.length)};Fi.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let s=$l.indexOf(this.data[n])*45;s+=$l.indexOf(this.data[n+1]),t.put(s,11)}this.data.length%2&&t.put($l.indexOf(this.data[n]),6)};var oP
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var hP=Vi,qm={exports:{}};(function(e){var t={single_source_shortest_paths:function(n,s,i){var o={},r={};r[s]=0;var a=t.PriorityQueue.make();a.push(s,0);for(var l,c,u,d,f,p,m,_,y;!a.empty();){l=a.pop(),c=l.value,d=l.cost,f=n[c]||{};for(u in f)f.hasOwnProperty(u)&&(p=f[u],m=d+p,_=r[u],y=typeof r[u]>"u",(y||_>m)&&(r[u]=m,a.push(u,m),o[u]=c))}if(typeof i<"u"&&typeof r[i]>"u"){var x=["Could not find a path from ",s," to ",i,"."].join("");throw new Error(x)}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=t.single_source_shortest_paths(n,s,i);return t.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(n){var s=t.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}}};e.exports=t})(qm);var fP=qm.exports;(function(e){const t=ds,n=sP,s=oP,i=cP,o=hP,r=pn,a=Ie,l=fP;function c(x){return unescape(encodeURIComponent(x)).length}function u(x,S,P){const C=[];let v;for(;(v=x.exec(P))!==null;)C.push({data:v[0],index:v.index,mode:S,length:v[0].length});return C}function d(x){const S=u(r.NUMERIC,t.NUMERIC,x),P=u(r.ALPHANUMERIC,t.ALPHANUMERIC,x);let C,v;return a.isKanjiModeEnabled()?(C=u(r.BYTE,t.BYTE,x),v=u(r.KANJI,t.KANJI,x)):(C=u(r.BYTE_KANJI,t.BYTE,x),v=[]),S.concat(P,C,v).sort(function(A,w){return A.index-w.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function f(x,S){switch(S){case t.NUMERIC:return n.getBitsLength(x);case t.ALPHANUMERIC:return s.getBitsLength(x);case t.KANJI:return o.getBitsLength(x);case t.BYTE:return i.getBitsLength(x)}}function p(x){return x.reduce(function(S,P){const C=S.length-1>=0?S[S.length-1]:null;return C&&C.mode===P.mode?(S[S.length-1].data+=P.data,S):(S.push(P),S)},[])}function m(x){const S=[];for(let P=0;P<x.length;P++){const C=x[P];switch(C.mode){case t.NUMERIC:S.push([C,{data:C.data,mode:t.ALPHANUMERIC,length:C.length},{data:C.data,mode:t.BYTE,length:C.length}]);break;case t.ALPHANUMERIC:S.push([C,{data:C.data,mode:t.BYTE,length:C.length}]);break;case t.KANJI:S.push([C,{data:C.data,mode:t.BYTE,length:c(C.data)}]);break;case t.BYTE:S.push([{data:C.data,mode:t.BYTE,length:c(C.data)}])}}return S}function _(x,S){const P={},C={start:{}};let v=["start"];for(let E=0;E<x.length;E++){const A=x[E],w=[];for(let k=0;k<A.length;k++){const $=A[k],L=""+E+k;w.push(L),P[L]={node:$,lastCount:0},C[L]={};for(let N=0;N<v.length;N++){const X=v[N];P[X]&&P[X].node.mode===$.mode?(C[X][L]=f(P[X].lastCount+$.length,$.mode)-f(P[X].lastCount,$.mode),P[X].lastCount+=$.length):(P[X]&&(P[X].lastCount=$.length),C[X][L]=f($.length,$.mode)+4+t.getCharCountIndicator($.mode,S))}}v=w}for(let E=0;E<v.length;E++)C[v[E]].end=0;return{map:C,table:P}}function y(x,S){let P;const C=t.getBestModeForData(x);if(P=t.from(S,C),P!==t.BYTE&&P.bit<C.bit)throw new Error('"'+x+'" cannot be encoded with mode '+t.toString(P)+`.
Suggested mode is: `+t.toString(C));switch(P===t.KANJI&&!a.isKanjiModeEnabled()&&(P=t.BYTE),P){case t.NUMERIC:return new n(x);case t.ALPHANUMERIC:return new s(x);case t.KANJI:return new o(x);case t.BYTE:return new i(x)}}e.fromArray=function(S){return S.reduce(function(P,C){return typeof C=="string"?P.push(y(C,null)):C.data&&P.push(y(C.data,C.mode)),P},[])},e.fromString=function(S,P){const C=d(S,a.isKanjiModeEnabled()),v=m(C),E=_(v,P),A=l.find_path(E.map,"start","end"),w=[];for(let k=1;k<A.length-1;k++)w.push(E.table[A[k]].node);return e.fromArray(p(w))},e.rawSplit=function(S){return e.fromArray(d(S,a.isKanjiModeEnabled()))}})(Ym);const el=Ie,Ll=Ja,pP=KT,gP=YT,mP=Fm,_P=Bm,xc=Vm,wc=Za,bP=GT,_a=Wm,yP=Um,vP=ds,Il=Ym;function xP(e,t){const n=e.size,s=_P.getPositions(t);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?e.set(o+a,r+l,!0,!0):e.set(o+a,r+l,!1,!0))}}function wP(e){const t=e.size;for(let n=8;n<t-8;n++){const s=n%2===0;e.set(n,6,s,!0),e.set(6,n,s,!0)}}function EP(e,t){const n=mP.getPositions(t);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?e.set(i+r,o+a,!0,!0):e.set(i+r,o+a,!1,!0)}}function SP(e,t){const n=e.size,s=_a.getEncodedBits(t);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,e.set(i,o,r,!0),e.set(o,i,r,!0)}function Rl(e,t,n){const s=e.size,i=yP.getEncodedBits(t,n);let o,r;for(o=0;o<15;o++)r=(i>>o&1)===1,o<6?e.set(o,8,r,!0):o<8?e.set(o+1,8,r,!0):e.set(s-15+o,8,r,!0),o<8?e.set(8,s-o-1,r,!0):o<9?e.set(8,15-o-1+1,r,!0):e.set(8,15-o-1,r,!0);e.set(s-8,8,1,!0)}function CP(e,t){const n=e.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(!e.isReserved(i,a-l)){let c=!1;r<t.length&&(c=(t[r]>>>o&1)===1),e.set(i,a-l,c),o--,o===-1&&(r++,o=7)}if(i+=s,i<0||n<=i){i-=s,s=-s;break}}}function AP(e,t,n){const s=new pP;n.forEach(function(l){s.put(l.mode.bit,4),s.put(l.getLength(),vP.getCharCountIndicator(l.mode,e)),l.write(s)});const i=el.getSymbolTotalCodewords(e),o=wc.getTotalCodewordsCount(e,t),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 TP(s,e,t)}function TP(e,t,n){const s=el.getSymbolTotalCodewords(t),i=wc.getTotalCodewordsCount(t,n),o=s-i,r=wc.getBlocksCount(t,n),a=s%r,l=r-a,c=Math.floor(s/r),u=Math.floor(o/r),d=u+1,f=c-u,p=new bP(f);let m=0;const _=new Array(r),y=new Array(r);let x=0;const S=new Uint8Array(e.buffer);for(let A=0;A<r;A++){const w=A<l?u:d;_[A]=S.slice(m,m+w),y[A]=p.encode(_[A]),m+=w,x=Math.max(x,w)}const P=new Uint8Array(s);let C=0,v,E;for(v=0;v<x;v++)for(E=0;E<r;E++)v<_[E].length&&(P[C++]=_[E][v]);for(v=0;v<f;v++)for(E=0;E<r;E++)P[C++]=y[E][v];return P}function PP(e,t,n,s){let i;if(Array.isArray(e))i=Il.fromArray(e);else if(typeof e=="string"){let c=t;if(!c){const u=Il.rawSplit(e);c=_a.getBestVersionForData(u,n)}i=Il.fromString(e,c||40)}else throw new Error("Invalid data");const o=_a.getBestVersionForData(i,n);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=o;else if(t<o)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+o+`.
2024-03-24 22:55:19 -04:00
`);const r=AP(t,n,i),a=el.getSymbolSize(t),l=new gP(a);return xP(l,t),wP(l),EP(l,t),Rl(l,n,0),t>=7&&SP(l,t),CP(l,r),isNaN(s)&&(s=xc.getBestMask(l,Rl.bind(null,l,n))),xc.applyMask(s,l),Rl(l,n,s),{modules:l,version:t,errorCorrectionLevel:n,maskPattern:s,segments:i}}Rm.create=function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let s=Ll.M,i,o;return typeof n<"u"&&(s=Ll.from(n.errorCorrectionLevel,Ll.M),i=_a.from(n.version),o=xc.from(n.maskPattern),n.toSJISFunc&&el.setToSJISFunction(n.toSJISFunc)),PP(t,i,s,o)};var Gm={},Lu={};(function(e){function t(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("")}}e.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:t(s.color.dark||"#000000ff"),light:t(s.color.light||"#ffffffff")},type:s.type,rendererOpts:s.rendererOpts||{}}},e.getScale=function(s,i){return i.width&&i.width>=s+i.margin*2?i.width/(s+i.margin*2):i.scale},e.getImageWidth=function(s,i){const o=e.getScale(s,i);return Math.floor((s+i.margin*2)*o)},e.qrToImageData=function(s,i,o){const r=i.modules.size,a=i.modules.data,l=e.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 p=0;p<c;p++){let m=(f*c+p)*4,_=o.color.light;if(f>=u&&p>=u&&f<c-u&&p<c-u){const y=Math.floor((f-u)/l),x=Math.floor((p-u)/l);_=d[a[y*r+x]?1:0]}s[m++]=_.r,s[m++]=_.g,s[m++]=_.b,s[m]=_.a}}})(Lu);(function(e){const t=Lu;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")}}e.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=t.getOptions(l);const u=t.getImageWidth(o.modules.size,l),d=c.getContext("2d"),f=d.createImageData(u,u);return t.qrToImageData(f.data,o,l),n(d,c,u),d.putImageData(f,0,0),c},e.renderToDataURL=function(o,r,a){let l=a;typeof l>"u"&&(!r||!r.getContext)&&(l=r,r=void 0),l||(l={});const c=e.render(o,r,l),u=l.type||"image/png",d=l.rendererOpts||{};return c.toDataURL(u,d.quality)}})(Gm);var Xm={};const MP=Lu;function rf(e,t){const n=e.a/255,s=t+'="'+e.hex+'"';return n<1?s+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':s}function Nl(e,t,n){let s=e+t;return typeof n<"u"&&(s+=" "+n),s}function kP(e,t,n){let s="",i=0,o=!1,r=0;for(let a=0;a<e.length;a++){const l=Math.floor(a%t),c=Math.floor(a/t);!l&&!o&&(o=!0),e[a]?(r++,a>0&&l>0&&e[a-1]||(s+=o?Nl("M",l+n,.5+c+n):Nl("m",i,0),i=0,o=!1),l+1<t&&e[a+1]||(s+=Nl("h",r),r=0)):i++}return s}Xm.render=function(t,n,s){const i=MP.getOptions(n),o=t.modules.size,r=t.modules.data,a=o+i.margin*2,l=i.color.light.a?"<path "+rf(i.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+rf(i.color.dark,"stroke")+' d="'+kP(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 OP=zT,Ec=Rm,Qm=Gm,DP=Xm;function Iu(e,t,n,s,i){const o=[].slice.call(arguments,1),r=o.length,a=typeof o[r-1]=="function";if(!a&&!OP())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=t,t=s=void 0):r===3&&(t.getContext&&typeof i>"u"?(i=s,s=void 0):(i=s,s=n,n=t,t=void 0))}else{if(r<1)throw new Error("Too few arguments provided");return r===1?(n=t,t=s=void 0):r===2&&!t.getContext&&(s=n,n=t,t=void 0),new Promise(function(l,c){try{const u=Ec.create(n,s);l(e(u,t,s))}catch(u){c(u)}})}try{const l=Ec.create(n,s);i(null,e(l,t,s))}catch(l){i(l)}}Xi.create=Ec.create;Xi.toCanvas=Iu.bind(null,Qm.render);Xi.toDataURL=Iu.bind(null,Qm.renderToDataURL);Xi.toString=Iu.bind(null,function(e,t,n){return DP.render(e,n)});const $P={name:"totp",async setup(){let e="";return await qe("/api/Welcome_GetTotpLink",{},t=>{t.status&&(e=t.data)}),{l:e}},mounted(){this.l&&Xi.toCanvas(document.getElementById("qrcode"),this.l,function(e){})},data(){return{totp:"",totpInvalidMessage:"",verified:!1}},methods:{validateTotp(){}},watch:{totp(e){const t=document.querySelector("#totp");t.classList.remove("is-invalid","is-valid"),e.length===6&&(console.log(e),/[0-9]{6}/.test(e)?Ce("/api/Welcome_VerifyTotpLink",{totp:e},n=>{n.status?(this.verified=!0,t.classList.add("is-valid"),this.$emit("verified")):(t.classList.add("is-invalid"),this.totpInvalidMessage="TOTP does not match.")}):(t.classList.add("is-invalid"),this.totpInvalidMessage="TOTP can only contain numbers"))}}},LP={class:"mb-3"},IP=g("p",{class:"mb-2"},[g("small",{class:"text-muted"},"1. Please scan the following QR Code to generate TOTP")],-1),RP=g("canvas",{id:"qrcode",class:"rounded-3 mb-2"},null,-1),NP={class:"p-3 bg-body-secondary rounded-3 border mb-3"},FP=g("p",{class:"text-muted mb-0"},[g("small",null,"Or you can click the link below:")],-1),BP=["href"],VP={style:{"line-break":"anywhere"}},HP=g("label",{for:"totp",class:"mb-2"},[g("small",{class:"text-muted"},"2. Enter the TOTP generated by your authenticator to verify")],-1),jP={class:"form-group"},WP=["disabled"],zP={class:"invalid-feedback"},UP=g("div",{class:"valid-feedback"}," TOTP verified! ",-1);function KP(e,t,n,s,i,o){return ot(),ct("div",LP,[IP,RP,g("div",NP,[FP,g("a",{href:this.l},[g("code",VP,Ct(this.l),1)],8,BP)]),HP,g("div",jP,[kt(g("input",{class:"form-control text-center totp",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code","onUpdate:modelValue":t[0]||(t[0]=r=>this.totp=r),disabled:this.verified},null,8,WP),[[Ot,this.totp]]),g("div",zP,Ct(this.totpInvalidMessage),1),UP])])}const YP=Ut($P,[["render",KP]]),qP={name:"setup",components:{Totp:YP},setup(){return{store:re()}},data(){return{setup:{username:"",newPassword:"",repeatNewPassword:"",enable_totp:!1,verified_totp:!1},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&&(this.setup.enable_totp&&this.setup.verified_totp||!this.setup.enable_totp)}},methods:{submit(){this.loading=!0,Ce("/api/Welcome_Finish",this.setup,e=>{e.status?(this.done=!0,setTimeout(()=>{this.$router.push("/")},500)):(document.querySelectorAll("#createAccount input").forEach(t=>t.classList.add("is-invalid")),this.errorMessage=e.message,document.querySelector(".login-container-fluid").scrollTo({top:0,left:0,behavior:"smooth"})),this.loading=!1})}}},GP=["data-bs-theme"],XP={class:"mx-auto text-body",style:{width:"500px"}},QP=g("span",{class:"dashboardLogo display-4"},"Nice to meet you!",-1),JP=g("p",{class:"mb-5"},"Please fill in the following fields to finish setup 😊",-1),ZP=g("h3",null,"Create an account",-1),tM={key:0,class:"alert alert-danger"},eM={class:"d-flex flex-column gap-3"},nM={id:"createAccount"},sM={class:"form-group text-body"},iM=g("label",{for:"username",class:"mb-1 text-muted"},[g("small",null,"Pick an username you like")],-1),oM={class:"form-group text-body"},rM=g("l
*
* Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
2024-03-24 22:55:19 -04:00
*/(function(){function e(v){var E=new Float64Array(16);if(v)for(var A=0;A<v.length;++A)E[A]=v[A];return E}function t(v,E){for(var A,w=e(),k=e(),$=0;$<16;++$)k[$]=E[$];n(k),n(k),n(k);for(var L=0;L<2;++L){w[0]=k[0]-65517;for(var $=1;$<15;++$)w[$]=k[$]-65535-(w[$-1]>>16&1),w[$-1]&=65535;w[15]=k[15]-32767-(w[14]>>16&1),A=w[15]>>16&1,w[14]&=65535,s(k,w,1-A)}for(var $=0;$<16;++$)v[2*$]=k[$]&255,v[2*$+1]=k[$]>>8}function n(v){for(var E=0;E<16;++E)v[(E+1)%16]+=(E<15?1:38)*Math.floor(v[E]/65536),v[E]&=65535}function s(v,E,A){for(var w,k=~(A-1),$=0;$<16;++$)w=k&(v[$]^E[$]),v[$]^=w,E[$]^=w}function i(v,E,A){for(var w=0;w<16;++w)v[w]=E[w]+A[w]|0}function o(v,E,A){for(var w=0;w<16;++w)v[w]=E[w]-A[w]|0}function r(v,E,A){for(var w=new Float64Array(31),k=0;k<16;++k)for(var $=0;$<16;++$)w[k+$]+=E[k]*A[$];for(var k=0;k<15;++k)w[k]+=38*w[k+16];for(var k=0;k<16;++k)v[k]=w[k];n(v),n(v)}function a(v,E){for(var A=e(),w=0;w<16;++w)A[w]=E[w];for(var w=253;w>=0;--w)r(A,A,A),w!==2&&w!==4&&r(A,A,E);for(var w=0;w<16;++w)v[w]=A[w]}function l(v){v[31]=v[31]&127|64,v[0]&=248}function c(v){for(var E,A=new Uint8Array(32),w=e([1]),k=e([9]),$=e(),L=e([1]),N=e(),X=e(),Y=e([56129,1]),H=e([9]),R=0;R<32;++R)A[R]=v[R];l(A);for(var R=254;R>=0;--R)E=A[R>>>3]>>>(R&7)&1,s(w,k,E),s($,L,E),i(N,w,$),o(w,w,$),i($,k,L),o(k,k,L),r(L,N,N),r(X,w,w),r(w,$,w),r($,k,N),i(N,w,$),o(w,w,$),r(k,w,w),o($,L,X),r(w,$,Y),i(w,w,L),r($,$,w),r(w,L,X),r(L,k,H),r(k,N,N),s(w,k,E),s($,L,E);return a($,$),r(w,w,$),t(A,w),A}function u(){var v=new Uint8Array(32);return window.crypto.getRandomValues(v),v}function d(){var v=u();return l(v),v}function f(v,E){for(var A=Uint8Array.from([E[0]>>2&63,(E[0]<<4|E[1]>>4)&63,(E[1]<<2|E[2]>>6)&63,E[2]&63]),w=0;w<4;++w)v[w]=A[w]+65+(25-A[w]>>8&6)-(51-A[w]>>8&75)-(61-A[w]>>8&15)+(62-A[w]>>8&3)}function p(v){var E,A=new Uint8Array(44);for(E=0;E<32/3;++E)f(A.subarray(E*4),v.subarray(E*3));return f(A.subarray(E*4),Uint8Array.from([v[E*3+0],v[E*3+1],0])),A[43]=61,String.fromCharCode.apply(null,A)}function m(v){let E=window.atob(v),A=E.length,w=new Uint8Array(A);for(let $=0;$<A;$++)w[$]=E.charCodeAt($);return new Uint8Array(w.buffer)}function _(v,E){v.push(E&255,E>>>8&255,E>>>16&255,E>>>24&255)}function y(v,E){v.push(E&255,E>>>8&255)}function x(v,E){for(var A=0;A<E.length;++A)v.push(E[A]&255)}function S(v){for(var E=unescape(encodeURIComponent(v)),A=new Uint8Array(E.length),w=0;w<E.length;++w)A[w]=E.charCodeAt(w);return A}function P(v){if(!P.table){P.table=[];for(var E=0,A=0;A<256;E=++A){for(var w=0;w<8;++w)E=E&1?3988292384^E>>>1:E>>>1;P.table[A]=E}}for(var k=-1,$=0;$<v.length;++$)k=k>>>8^P.table[(k^v[$])&255];return(k^-1)>>>0}function C(v){for(var E=[],A=[],w=0,k=0;k<v.length;++k){var $=S(v[k].filename),L=S(v[k].content),N=P(L);_(E,67324752),y(E,20),y(E,0),y(E,0),y(E,0),y(E,0),_(E,N),_(E,L.length),_(E,L.length),y(E,$.length),y(E,0),x(E,$),x(E,L),_(A,33639248),y(A,0),y(A,20),y(A,0),y(A,0),y(A,0),y(A,0),_(A,N),_(A,L.length),_(A,L.length),y(A,$.length),y(A,0),y(A,0),y(A,0),y(A,0),_(A,32),_(A,w),x(A,$),w+=30+L.length+$.length}return x(E,A),_(E,101010256),y(E,0),y(E,0),y(E,v.length),y(E,v.length),_(E,A.length),_(E,w),y(E,0),Uint8Array.from(E)}window.wireguard={generateKeypair:function(){var v=d(),E=c(v),A=u();return{publicKey:p(E),privateKey:p(v),presharedKey:p(A)}},generatePublicKey:function(v){return v=m(v),p(c(v))},generateZipFiles:function(v){var E=v.peers,A=C(E),w=new Blob([A],{type:"application/zip"}),k=document.createElement("a");k.download=v.filename,k.href=URL.createObjectURL(w),k.style.display="none",document.body.appendChild(k),k.click(),document.body.removeChild(k)}}})();const EM={name:"newConfiguration",setup(){return{store:Gi()}},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 e=window.wireguard.generateKeypair();this.newConfiguration.PrivateKey=e.privateKey,this.newConfiguration.Pu
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
2024-03-24 22:55:19 -04:00
*/function rr(e){return e+.5|0}const Xn=(e,t,n)=>Math.max(Math.min(e,n),t);function po(e){return Xn(rr(e*2.55),0,255)}function ss(e){return Xn(rr(e*255),0,255)}function En(e){return Xn(rr(e/2.55)/100,0,1)}function cf(e){return Xn(rr(e*100),0,100)}const Ve={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},Sc=[..."0123456789ABCDEF"],vO=e=>Sc[e&15],xO=e=>Sc[(e&240)>>4]+Sc[e&15],Rr=e=>(e&240)>>4===(e&15),wO=e=>Rr(e.r)&&Rr(e.g)&&Rr(e.b)&&Rr(e.a);function EO(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Ve[e[1]]*17,g:255&Ve[e[2]]*17,b:255&Ve[e[3]]*17,a:t===5?Ve[e[4]]*17:255}:(t===7||t===9)&&(n={r:Ve[e[1]]<<4|Ve[e[2]],g:Ve[e[3]]<<4|Ve[e[4]],b:Ve[e[5]]<<4|Ve[e[6]],a:t===9?Ve[e[7]]<<4|Ve[e[8]]:255})),n}const SO=(e,t)=>e<255?t(e):"";function CO(e){var t=wO(e)?vO:xO;return e?"#"+t(e.r)+t(e.g)+t(e.b)+SO(e.a,t):void 0}const AO=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function e_(e,t,n){const s=t*Math.min(n,1-n),i=(o,r=(o+e/30)%12)=>n-s*Math.max(Math.min(r-3,9-r,1),-1);return[i(0),i(8),i(4)]}function TO(e,t,n){const s=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function PO(e,t,n){const s=e_(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)s[i]*=1-t-n,s[i]+=t;return s}function MO(e,t,n,s,i){return e===i?(t-n)/s+(t<n?6:0):t===i?(n-e)/s+2:(e-t)/s+4}function Nu(e){const n=e.r/255,s=e.g/255,i=e.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=MO(n,s,i,u,o),l=l*60+.5),[l|0,c||0,a]}function Fu(e,t,n,s){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,s)).map(ss)}function Bu(e,t,n){return Fu(e_,e,t,n)}function kO(e,t,n){return Fu(PO,e,t,n)}function OO(e,t,n){return Fu(TO,e,t,n)}function n_(e){return(e%360+360)%360}function DO(e){const t=AO.exec(e);let n=255,s;if(!t)return;t[5]!==s&&(n=t[6]?po(+t[5]):ss(+t[5]));const i=n_(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?s=kO(i,o,r):t[1]==="hsv"?s=OO(i,o,r):s=Bu(i,o,r),{r:s[0],g:s[1],b:s[2],a:n}}function $O(e,t){var n=Nu(e);n[0]=n_(n[0]+t),n=Bu(n),e.r=n[0],e.g=n[1],e.b=n[2]}function LO(e){if(!e)return;const t=Nu(e),n=t[0],s=cf(t[1]),i=cf(t[2]);return e.a<255?`hsla(${n}, ${s}%, ${i}%, ${En(e.a)})`:`hsl(${n}, ${s}%, ${i}%)`}const uf={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"},df={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:"
* Chart.js v4.4.1
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
2024-03-24 22:55:19 -04:00
*/function bn(){}const jO=(()=>{let e=0;return()=>e++})();function Lt(e){return e===null||typeof e>"u"}function Ht(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Pt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function qt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Te(e,t){return qt(e)?e:t}function yt(e,t){return typeof e>"u"?t:e}const WO=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,i_=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Bt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Nt(e,t,n,s){let i,o,r;if(Ht(e))if(o=e.length,s)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i<o;i++)t.call(n,e[i],i);else if(Pt(e))for(r=Object.keys(e),o=r.length,i=0;i<o;i++)t.call(n,e[r[i]],r[i])}function ba(e,t){let n,s,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,s=e.length;n<s;++n)if(i=e[n],o=t[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function ya(e){if(Ht(e))return e.map(ya);if(Pt(e)){const t=Object.create(null),n=Object.keys(e),s=n.length;let i=0;for(;i<s;++i)t[n[i]]=ya(e[n[i]]);return t}return e}function o_(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function zO(e,t,n,s){if(!o_(e))return;const i=t[e],o=n[e];Pt(i)&&Pt(o)?Ko(i,o,s):t[e]=ya(o)}function Ko(e,t,n){const s=Ht(t)?t:[t],i=s.length;if(!Pt(e))return e;n=n||{};const o=n.merger||zO;let r;for(let a=0;a<i;++a){if(r=s[a],!Pt(r))continue;const l=Object.keys(r);for(let c=0,u=l.length;c<u;++c)o(l[c],e,r,n)}return e}function Ao(e,t){return Ko(e,t,{merger:UO})}function UO(e,t,n){if(!o_(e))return;const s=t[e],i=n[e];Pt(s)&&Pt(i)?Ao(s,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=ya(i))}const ff={"":e=>e,x:e=>e.x,y:e=>e.y};function KO(e){const t=e.split("."),n=[];let s="";for(const i of t)s+=i,s.endsWith("\\")?s=s.slice(0,-1)+".":(n.push(s),s="");return n}function YO(e){const t=KO(e);return n=>{for(const s of t){if(s==="")break;n=n&&n[s]}return n}}function ls(e,t){return(ff[t]||(ff[t]=YO(t)))(e)}function Vu(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Yo=e=>typeof e<"u",cs=e=>typeof e=="function",pf=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function qO(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Wt=Math.PI,jt=2*Wt,GO=jt+Wt,va=Number.POSITIVE_INFINITY,XO=Wt/180,Xt=Wt/2,Ts=Wt/4,gf=Wt*2/3,Qn=Math.log10,dn=Math.sign;function To(e,t,n){return Math.abs(e-t)<n}function mf(e){const t=Math.round(e);e=To(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Qn(e))),s=e/n;return(s<=1?1:s<=2?2:s<=5?5:10)*n}function QO(e){const t=[],n=Math.sqrt(e);let s;for(s=1;s<n;s++)e%s===0&&(t.push(s),t.push(e/s));return n===(n|0)&&t.push(n),t.sort((i,o)=>i-o).pop(),t}function Hi(e){return!isNaN(parseFloat(e))&&isFinite(e)}function JO(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function r_(e,t,n){let s,i,o;for(s=0,i=e.length;s<i;s++)o=e[s][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function Je(e){return e*(Wt/180)}function Hu(e){return e*(180/Wt)}function _f(e){if(!qt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function a_(e,t){const n=t.x-e.x,s=t.y-e.y,i=Math.sqrt(n*n+s*s);let o=Math.atan2(s,n);return o<-.5*Wt&&(o+=jt),{angle:o,distance:i}}function Cc(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function ZO(e,t){return(e-t+GO)%jt-Wt}function Me(e){return(e%jt+jt)%jt}function qo(e,t,n,s){const i=Me(e),o=Me(t),r=Me(n),a=Me(o-i),l=Me(r-i),c=Me(i-o),u=Me(i-r);return i===o||i===r||s&&o===r||a>l&&c<u}function ie(e,t,n){return Math.max(t,Math.min(n,e))}function tD(e){return ie(e,-32768,32767)}function An(e,t,n,s=1e-6){return e>=Math.min(t,n)-s&&e<=Math.max(t,n)+s}function ju(e,t,n){n=n||(r=>e[r]<t);let s=e.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 Tn=(e,t,n,s)=>ju(e,n,s?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),eD=(e,t,n)=>ju
* Chart.js v4.4.1
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
2024-03-24 22:55:19 -04:00
*/class o${constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,s,i){const o=n.listeners[i],r=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:r,currentStep:Math.min(s-n.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=u_.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=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(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,s,t,"progress")),o.length||(s.running=!1,this._notify(i,s,t,"complete"),s.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let s=n.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,s)),s}listen(t,n,s){this._getAnims(t).listeners[n].push(s)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((s,i)=>Math.max(s,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);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(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var vn=new o$;const Of="transparent",r$={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const s=xf(e||Of),i=s.valid&&xf(t||Of);return i&&i.valid?i.mix(s,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class a${constructor(t,n,s,i){const o=n[s];i=go([t.to,i,o,t.from]);const r=go([t.from,o,i]);this._active=!0,this._fn=t.fn||r$[t.type||typeof r],this._easing=Po[t.easing]||Po.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=s,this._from=r,this._to=i,this._promises=void 0}active(){return this._active}update(t,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,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=go([t.to,n,i,t.from]),this._from=go([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-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 t=this._promises||(this._promises=[]);return new Promise((n,s)=>{t.push({res:n,rej:s})})}_notify(t){const n=t?"res":"rej",s=this._promises||[];for(let i=0;i<s.length;i++)s[i][n]()}}class P_{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Pt(t))return;const n=Object.keys(Gt.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!Pt(o))return;const r={};for(const a of n)r[a]=o[a];(Ht(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,n){const s=n.options,i=c$(t,s);if(!i)return[];const o=this._createAnimations(i,s);return s.$shared&&l$(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,n){const s=this._properties,i=[],o=t.$animations||(t.$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(t,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){t[c]=u;continue}o[c]=d=new a$(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size
`)>-1?e.split(`
2024-03-24 22:55:19 -04:00
`):e}function $I(e,t){const{element:n,datasetIndex:s,index:i}=t,o=e.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(i);return{chart:e,label:r,parsed:o.getParsed(i),raw:e.data.datasets[s].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:s,element:n}}function gp(e,t){const n=e.chart.ctx,{body:s,footer:i,title:o}=e,{boxWidth:r,boxHeight:a}=t,l=ee(t.bodyFont),c=ee(t.titleFont),u=ee(t.footerFont),d=o.length,f=i.length,p=s.length,m=fe(t.padding);let _=m.height,y=0,x=s.reduce((C,v)=>C+v.before.length+v.lines.length+v.after.length,0);if(x+=e.beforeBody.length+e.afterBody.length,d&&(_+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),x){const C=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;_+=p*C+(x-p)*l.lineHeight+(x-1)*t.bodySpacing}f&&(_+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let S=0;const P=function(C){y=Math.max(y,n.measureText(C).width+S)};return n.save(),n.font=c.string,Nt(e.title,P),n.font=l.string,Nt(e.beforeBody.concat(e.afterBody),P),S=t.displayColors?r+2+t.boxPadding:0,Nt(s,C=>{Nt(C.before,P),Nt(C.lines,P),Nt(C.after,P)}),S=0,n.font=u.string,Nt(e.footer,P),n.restore(),y+=m.width,{width:y,height:_}}function LI(e,t){const{y:n,height:s}=t;return n<s/2?"top":n>e.height-s/2?"bottom":"center"}function II(e,t,n,s){const{x:i,width:o}=s,r=n.caretSize+n.caretPadding;if(e==="left"&&i+o+r>t.width||e==="right"&&i-o-r<0)return!0}function RI(e,t,n,s){const{x:i,width:o}=n,{width:r,chartArea:{left:a,right:l}}=e;let c="center";return s==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=r-o/2&&(c="right"),II(c,e,t,n)&&(c="center"),c}function mp(e,t,n){const s=n.yAlign||t.yAlign||LI(e,n);return{xAlign:n.xAlign||t.xAlign||RI(e,t,n,s),yAlign:s}}function NI(e,t){let{x:n,width:s}=e;return t==="right"?n-=s:t==="center"&&(n-=s/2),n}function FI(e,t,n){let{y:s,height:i}=e;return t==="top"?s+=n:t==="bottom"?s-=i+n:s-=i/2,s}function _p(e,t,n,s){const{caretSize:i,caretPadding:o,cornerRadius:r}=e,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=Hs(r);let m=NI(t,a);const _=FI(t,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(u,f)+i:a==="right"&&(m+=Math.max(d,p)+i),{x:ie(m,0,s.width-t.width),y:ie(_,0,s.height-t.height)}}function Yr(e,t,n){const s=fe(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-s.right:e.x+s.left}function bp(e){return sn([],xn(e))}function BI(e,t,n){return fs(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function yp(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const J_={beforeTitle:bn,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,s=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return n[t.dataIndex]}return""},afterTitle:bn,beforeBody:bn,beforeLabel:bn,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Lt(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.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(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:bn,afterBody:bn,beforeFooter:bn,footer:bn,afterFooter:bn};function ye(e,t,n,s){const i=e[t].call(n,s);return typeof i>"u"?J_[t].call(n,s):i}class Dc extends In{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void