69 lines
754 KiB
JavaScript
Raw Normal View History

2024-08-10 00:25:25 -04:00
var dS=Object.defineProperty;var hS=(e,t,n)=>t in e?dS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var re=(e,t,n)=>(hS(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 a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).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 hb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pS(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 mS={exports:{}},_n="top",In="bottom",Rn="right",bn="left",jc="auto",Ia=[_n,In,Rn,bn],Ao="start",ua="end",fb="clippingParents",Ph="viewport",Zo="popper",pb="reference",Td=Ia.reduce(function(e,t){return e.concat([t+"-"+Ao,t+"-"+ua])},[]),Th=[].concat(Ia,[jc]).reduce(function(e,t){return e.concat([t,t+"-"+Ao,t+"-"+ua])},[]),mb="beforeRead",gb="read",_b="afterRead",bb="beforeMain",vb="main",yb="afterMain",wb="beforeWrite",xb="write",kb="afterWrite",Sb=[mb,gb,_b,bb,vb,yb,wb,xb,kb];function Ps(e){return e?(e.nodeName||"").toLowerCase():null}function Ln(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function $o(e){var t=Ln(e).Element;return e instanceof t||e instanceof Element}function Gn(e){var t=Ln(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Mh(e){if(typeof ShadowRoot>"u")return!1;var t=Ln(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function gS(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];!Gn(o)||!Ps(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(a){var r=i[a];r===!1?o.removeAttribute(a):o.setAttribute(a,r===!0?"":r)}))})}function _S(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]||{},a=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:n[s]),r=a.reduce(function(l,c){return l[c]="",l},{});!Gn(i)||!Ps(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Dh={name:"applyStyles",enabled:!0,phase:"write",fn:gS,effect:_S,requires:["computeStyles"]};function $s(e){return e.split("-")[0]}var _o=Math.max,bc=Math.min,da=Math.round;function Md(){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 Ab(){return!/^((?!chrome|android).)*safari/i.test(Md())}function ha(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var s=e.getBoundingClientRect(),i=1,o=1;t&&Gn(e)&&(i=e.offsetWidth>0&&da(s.width)/e.offsetWidth||1,o=e.offsetHeight>0&&da(s.height)/e.offsetHeight||1);var a=$o(e)?Ln(e):window,r=a.visualViewport,l=!Ab()&&n,c=(s.left+(l&&r?r.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-08-10 00:25:25 -04:00
*/(function(e,t){(function(n,s){e.exports=s(iA)})(hb,function(n){function s(z){const m=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(z){for(const S in z)if(S!=="default"){const K=Object.getOwnPropertyDescriptor(z,S);Object.defineProperty(m,S,K.get?K:{enumerable:!0,get:()=>z[S]})}}return m.default=z,Object.freeze(m)}const i=s(n),o=new Map,a={set(z,m,S){o.has(z)||o.set(z,new Map);const K=o.get(z);if(!K.has(m)&&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(m,S)},get(z,m){return o.has(z)&&o.get(z).get(m)||null},remove(z,m){if(!o.has(z))return;const S=o.get(z);S.delete(m),S.size===0&&o.delete(z)}},r=1e6,l=1e3,c="transitionend",u=z=>(z&&window.CSS&&window.CSS.escape&&(z=z.replace(/#([^\s"#']+)/g,(m,S)=>`#${CSS.escape(S)}`)),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()*r);while(document.getElementById(z));return z},p=z=>{if(!z)return 0;let{transitionDuration:m,transitionDelay:S}=window.getComputedStyle(z);const K=Number.parseFloat(m),me=Number.parseFloat(S);return!K&&!me?0:(m=m.split(",")[0],S=S.split(",")[0],(Number.parseFloat(m)+Number.parseFloat(S))*l)},g=z=>{z.dispatchEvent(new Event(c))},_=z=>!z||typeof z!="object"?!1:(typeof z.jquery<"u"&&(z=z[0]),typeof z.nodeType<"u"),v=z=>_(z)?z.jquery?z[0]:z:typeof z=="string"&&z.length>0?document.querySelector(u(z)):null,w=z=>{if(!_(z)||z.getClientRects().length===0)return!1;const m=getComputedStyle(z).getPropertyValue("visibility")==="visible",S=z.closest("details:not([open])");if(!S)return m;if(S!==z){const K=z.closest("summary");if(K&&K.parentNode!==S||K===null)return!1}return m},A=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",$=z=>{if(!document.documentElement.attachShadow)return null;if(typeof z.getRootNode=="function"){const m=z.getRootNode();return m instanceof ShadowRoot?m:null}return z instanceof ShadowRoot?z:z.parentNode?$(z.parentNode):null},M=()=>{},k=z=>{z.offsetHeight},y=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,x=[],E=z=>{document.readyState==="loading"?(x.length||document.addEventListener("DOMContentLoaded",()=>{for(const m of x)m()}),x.push(z)):z()},P=()=>document.documentElement.dir==="rtl",C=z=>{E(()=>{const m=y();if(m){const S=z.NAME,K=m.fn[S];m.fn[S]=z.jQueryInterface,m.fn[S].Constructor=z,m.fn[S].noConflict=()=>(m.fn[S]=K,z.jQueryInterface)}})},F=(z,m=[],S=z)=>typeof z=="function"?z(...m):S,G=(z,m,S=!0)=>{if(!S){F(z);return}const me=p(m)+5;let Ce=!1;const Ee=({target:Xe})=>{Xe===m&&(Ce=!0,m.removeEventListener(c,Ee),F(z))};m.addEventListener(c,Ee),setTimeout(()=>{Ce||g(m)},me)},ae=(z,m,S,K)=>{const me=z.length;let Ce=z.indexOf(m);return Ce===-1?!S&&K?z[me-1]:z[0]:(Ce+=S?1:-1,K&&(Ce=(Ce+me)%me),z[Math.max(0,Math.min(Ce,me-1))])},Y=/[^.]*(?=\..*)\.|.*/,L=/\..*/,O=/::\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,m){return m&&`${m}::${Q++}`||z.uidEvent||Q++}function U(z){const m=ye(z);return z.uidEvent=m,V[m]=V[m]||{},V[m]}function X(z,m){return function S(K){return fe(K,{delegateTarget:z}),S.oneOff&&N.off(z,K.type,m),m.apply(z,[K])}}function I(z,m,S){return function K(me){const Ce=z.querySelectorAll(m);for(let{target:Ee}=me;Ee&&Ee!==this;Ee=Ee.parentNode)for(const Xe of Ce)if(Xe===Ee)return fe(me,{delegateTa
2024-06-18 03:16:42 +08:00
* @vue/shared v3.4.29
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2024-08-10 00:25:25 -04:00
**//*! #__NO_SIDE_EFFECTS__ */function Hh(e,t){const n=new Set(e.split(","));return t?s=>n.has(s.toLowerCase()):s=>n.has(s)}const bt={},ia=[],Yn=()=>{},oA=()=>!1,Yc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),jh=e=>e.startsWith("onUpdate:"),Lt=Object.assign,Wh=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},aA=Object.prototype.hasOwnProperty,it=(e,t)=>aA.call(e,t),Be=Array.isArray,oa=e=>Zr(e)==="[object Map]",Ra=e=>Zr(e)==="[object Set]",om=e=>Zr(e)==="[object Date]",Ue=e=>typeof e=="function",St=e=>typeof e=="string",Qs=e=>typeof e=="symbol",ht=e=>e!==null&&typeof e=="object",Nb=e=>(ht(e)||Ue(e))&&Ue(e.then)&&Ue(e.catch),Fb=Object.prototype.toString,Zr=e=>Fb.call(e),rA=e=>Zr(e).slice(8,-1),Bb=e=>Zr(e)==="[object Object]",zh=e=>St(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,fr=Hh(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Uc=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},lA=/-(\w)/g,Ts=Uc(e=>e.replace(lA,(t,n)=>n?n.toUpperCase():"")),cA=/\B([A-Z])/g,Mo=Uc(e=>e.replace(cA,"-$1").toLowerCase()),Kc=Uc(e=>e.charAt(0).toUpperCase()+e.slice(1)),Hu=Uc(e=>e?`on${Kc(e)}`:""),Di=(e,t)=>!Object.is(e,t),tc=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Vb=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},vc=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Hb=e=>{const t=St(e)?Number(e):NaN;return isNaN(t)?e:t};let am;const jb=()=>am||(am=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function jt(e){if(Be(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],i=St(s)?fA(s):jt(s);if(i)for(const o in i)t[o]=i[o]}return t}else if(St(e)||ht(e))return e}const uA=/;(?![^(]*\))/g,dA=/:([^]+)/,hA=/\/\*[^]*?\*\//g;function fA(e){const t={};return e.replace(hA,"").split(uA).forEach(n=>{if(n){const s=n.split(dA);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Pe(e){let t="";if(St(e))t=e;else if(Be(e))for(let n=0;n<e.length;n++){const s=Pe(e[n]);s&&(t+=s+" ")}else if(ht(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Xt(e){if(!e)return null;let{class:t,style:n}=e;return t&&!St(t)&&(e.class=Pe(t)),n&&(e.style=jt(n)),e}const pA="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",mA=Hh(pA);function Wb(e){return!!e||e===""}function gA(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Eo(e[s],t[s]);return n}function Eo(e,t){if(e===t)return!0;let n=om(e),s=om(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Qs(e),s=Qs(t),n||s)return e===t;if(n=Be(e),s=Be(t),n||s)return n&&s?gA(e,t):!1;if(n=ht(e),s=ht(t),n||s){if(!n||!s)return!1;const i=Object.keys(e).length,o=Object.keys(t).length;if(i!==o)return!1;for(const a in e){const r=e.hasOwnProperty(a),l=t.hasOwnProperty(a);if(r&&!l||!r&&l||!Eo(e[a],t[a]))return!1}}return String(e)===String(t)}function Yh(e,t){return e.findIndex(n=>Eo(n,t))}const be=e=>St(e)?e:e==null?"":Be(e)||ht(e)&&(e.toString===Fb||!Ue(e.toString))?JSON.stringify(e,zb,2):String(e),zb=(e,t)=>t&&t.__v_isRef?zb(e,t.value):oa(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,i],o)=>(n[ju(s,o)+" =>"]=i,n),{})}:Ra(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ju(n))}:Qs(t)?ju(t):ht(t)&&!Be(t)&&!Bb(t)?String(t):t,ju=(e,t="")=>{var n;return Qs(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
2024-06-18 03:16:42 +08:00
* @vue/reactivity v3.4.29
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2024-08-10 00:25:25 -04:00
**/let Tn;class Yb{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Tn,!t&&Tn&&(this.index=(Tn.scopes||(Tn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Tn;try{return Tn=this,t()}finally{Tn=n}}}on(){Tn=this}off(){Tn=this.parent}stop(t){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&&!t){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 Ub(e){return new Yb(e)}function _A(e,t=Tn){t&&t.active&&t.effects.push(e)}function qc(){return Tn}function Uh(e){Tn&&Tn.cleanups.push(e)}let bo;class Kh{constructor(t,n,s,i){this.fn=t,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,Bi();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed){if(n.computed.effect._dirtyLevel===2)return!0;if(bA(n.computed),this._dirtyLevel>=5)break}}this._dirtyLevel===1&&(this._dirtyLevel=0),Vi()}return this._dirtyLevel>=5}set dirty(t){this._dirtyLevel=t?5:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Ei,n=bo;try{return Ei=!0,bo=this,this._runnings++,rm(this),this.fn()}finally{lm(this),this._runnings--,bo=n,Ei=t}}stop(){this.active&&(rm(this),lm(this),this.onStop&&this.onStop(),this.active=!1)}}function bA(e){return e.value}function rm(e){e._trackId++,e._depsLength=0}function lm(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Kb(e.deps[t],e);e.deps.length=e._depsLength}}function Kb(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let Ei=!0,Od=0;const qb=[];function Bi(){qb.push(Ei),Ei=!1}function Vi(){const e=qb.pop();Ei=e===void 0?!0:e}function qh(){Od++}function Gh(){for(Od--;!Od&&Id.length;)Id.shift()()}function Gb(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const s=e.deps[e._depsLength];s!==t?(s&&Kb(s,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Id=[];function Jb(e,t,n){qh();for(const s of e.keys()){if(!e.computed&&s.computed&&e.get(s)===s._trackId&&s._runnings>0){s._dirtyLevel=2;continue}let i;s._dirtyLevel<t&&(i??(i=e.get(s)===s._trackId))&&(s._shouldSchedule||(s._shouldSchedule=s._dirtyLevel===0),s.computed&&s._dirtyLevel===2&&(s._shouldSchedule=!0),s._dirtyLevel=t),s._shouldSchedule&&(i??(i=e.get(s)===s._trackId))&&(s.trigger(),(!s._runnings||s.allowRecurse)&&s._dirtyLevel!==3&&(s._shouldSchedule=!1,s.scheduler&&Id.push(s.scheduler)))}Gh()}const Xb=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},yc=new WeakMap,vo=Symbol(""),Rd=Symbol("");function $n(e,t,n){if(Ei&&bo){let s=yc.get(e);s||yc.set(e,s=new Map);let i=s.get(n);i||s.set(n,i=Xb(()=>s.delete(n))),Gb(bo,i)}}function Js(e,t,n,s,i,o){const a=yc.get(e);if(!a)return;let r=[];if(t==="clear")r=[...a.values()];else if(n==="length"&&Be(e)){const l=Number(s);a.forEach((c,u)=>{(u==="length"||!Qs(u)&&u>=l)&&r.push(c)})}else switch(n!==void 0&&r.push(a.get(n)),t){case"add":Be(e)?zh(n)&&r.push(a.get("length")):(r.push(a.get(vo)),oa(e)&&r.push(a.get(Rd)));break;case"delete":Be(e)||(r.push(a.get(vo)),oa(e)&&r.push(a.get(Rd)));break;case"set":oa(e)&&r.push(a.get(vo));break}qh();for(const l of r)l&&Jb(l,5);Gh()}function vA(e,t){const n=yc.get(e);return n&&n.get(t)}const yA=Hh("__proto__,__v_isRef,__isVue"),Qb=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Qs)),cm=wA();function wA(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=Ze(this);for(let o=0,a=this.length;o<a;o++)$n(s,"get",o+"");const i=s[t](...n);return i===-1||i===!1?s[t](...n.map(Ze)):i}}),["push","pop"
2024-06-18 03:16:42 +08:00
* @vue/runtime-core v3.4.29
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2024-08-10 00:25:25 -04:00
**/function Ci(e,t,n,s){try{return s?e(...s):e()}catch(i){el(i,t,n)}}function Jn(e,t,n,s){if(Ue(e)){const i=Ci(e,t,n,s);return i&&Nb(i)&&i.catch(o=>{el(o,t,n)}),i}if(Be(e)){const i=[];for(let o=0;o<e.length;o++)i.push(Jn(e[o],t,n,s));return i}}function el(e,t,n,s=!0){const i=t?t.vnode:null;if(t){let o=t.parent;const a=t.proxy,r=`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](e,a,r)===!1)return}o=o.parent}const l=t.appContext.config.errorHandler;if(l){Bi(),Ci(l,null,10,[e,a,r]),Vi();return}}zA(e,n,i,s)}function zA(e,t,n,s=!0){console.error(e)}let Or=!1,Ld=!1;const ln=[];let ys=0;const aa=[];let mi=null,po=0;const dv=Promise.resolve();let tf=null;function Zt(e){const t=tf||dv;return e?t.then(this?e.bind(this):e):t}function YA(e){let t=ys+1,n=ln.length;for(;t<n;){const s=t+n>>>1,i=ln[s],o=Ir(i);o<e||o===e&&i.pre?t=s+1:n=s}return t}function nf(e){(!ln.length||!ln.includes(e,Or&&e.allowRecurse?ys+1:ys))&&(e.id==null?ln.push(e):ln.splice(YA(e.id),0,e),hv())}function hv(){!Or&&!Ld&&(Ld=!0,tf=dv.then(pv))}function UA(e){const t=ln.indexOf(e);t>ys&&ln.splice(t,1)}function Nd(e){Be(e)?aa.push(...e):(!mi||!mi.includes(e,e.allowRecurse?po+1:po))&&aa.push(e),hv()}function pm(e,t,n=Or?ys+1:0){for(;n<ln.length;n++){const s=ln[n];if(s&&s.pre){if(e&&s.id!==e.uid)continue;ln.splice(n,1),n--,s()}}}function fv(e){if(aa.length){const t=[...new Set(aa)].sort((n,s)=>Ir(n)-Ir(s));if(aa.length=0,mi){mi.push(...t);return}for(mi=t,po=0;po<mi.length;po++){const n=mi[po];n.active!==!1&&n()}mi=null,po=0}}const Ir=e=>e.id==null?1/0:e.id,KA=(e,t)=>{const n=Ir(e)-Ir(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function pv(e){Ld=!1,Or=!0,ln.sort(KA);try{for(ys=0;ys<ln.length;ys++){const t=ln[ys];t&&t.active!==!1&&Ci(t,null,14)}}finally{ys=0,ln.length=0,fv(),Or=!1,tf=null,(ln.length||aa.length)&&pv()}}function qA(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||bt;let i=n;const o=t.startsWith("update:"),a=o&&t.slice(7);if(a&&a in s){const u=`${a==="modelValue"?"model":a}Modifiers`,{number:d,trim:f}=s[u]||bt;f&&(i=n.map(p=>St(p)?p.trim():p)),d&&(i=n.map(vc))}let r,l=s[r=Hu(t)]||s[r=Hu(Ts(t))];!l&&o&&(l=s[r=Hu(Mo(t))]),l&&Jn(l,e,6,i);const c=s[r+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,Jn(c,e,6,i)}}function mv(e,t,n=!1){const s=t.emitsCache,i=s.get(e);if(i!==void 0)return i;const o=e.emits;let a={},r=!1;if(!Ue(e)){const l=c=>{const u=mv(c,t,!0);u&&(r=!0,Lt(a,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!r?(ht(e)&&s.set(e,null),null):(Be(o)?o.forEach(l=>a[l]=null):Lt(a,o),ht(e)&&s.set(e,a),a)}function Qc(e,t){return!e||!Yc(t)?!1:(t=t.slice(2).replace(/Once$/,""),it(e,t[0].toLowerCase()+t.slice(1))||it(e,Mo(t))||it(e,t))}let Wt=null,Zc=null;function xc(e){const t=Wt;return Wt=e,Zc=e&&e.type.__scopeId||null,t}function En(e){Zc=e}function Cn(){Zc=null}function Te(e,t=Wt,n){if(!t||e._n)return e;const s=(...i)=>{s._d&&Tm(-1);const o=xc(t);let a;try{a=e(...i)}finally{xc(o),s._d&&Tm(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function Wu(e){const{type:t,vnode:n,proxy:s,withProxy:i,propsOptions:[o],slots:a,attrs:r,emit:l,render:c,renderCache:u,props:d,data:f,setupState:p,ctx:g,inheritAttrs:_}=e,v=xc(e);let w,A;try{if(n.shapeFlag&4){const M=i||s,k=M;w=ss(c.call(k,M,u,d,p,f,g)),A=r}else{const M=t;w=ss(M.length>1?M(d,{attrs:r,slots:a,emit:l}):M(d,null)),A=t.props?r:JA(r)}}catch(M){_r.length=0,el(M,e,1),w=$e(cn)}let $=w;if(A&&_!==!1){const M=Object.keys(A),{shapeFlag:k}=$;M.length&&k&7&&(o&&M.some(jh)&&(A=XA(A,o)),$=Oi($,A,!1,!0))}return n.dirs&&($=Oi($,null,!1,!0),$.dirs=$.dirs?$.dirs.concat(n.dirs):n.dirs),n.transition&&($.transition=n.transition),w=$,xc(v),w}function GA(e,t=!0){let n;for(let s=0;s<e.length;s++){const i=e[s];if(Nr(i)){if(i.type!==cn||i.children==="v-if"){if(n)return;n=i}}else return}return n}const JA=e=>{let t;for(const n in e)(n==="class"||n==="style"||Yc(n))&&((t||(t={}))[n]=e[n]);return t},XA=(e,t)=>{const n={};for(const s in e)(!jh(s)||
2024-06-18 03:16:42 +08:00
* @vue/runtime-dom v3.4.29
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2024-08-10 00:25:25 -04:00
**/const Z$="http://www.w3.org/2000/svg",eE="http://www.w3.org/1998/Math/MathML",js=typeof document<"u"?document:null,Om=js&&js.createElement("template"),tE={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const i=t==="svg"?js.createElementNS(Z$,e):t==="mathml"?js.createElementNS(eE,e):n?js.createElement(e,{is:n}):js.createElement(e);return e==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:e=>js.createTextNode(e),createComment:e=>js.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>js.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,i,o){const a=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{Om.innerHTML=s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e;const r=Om.content;if(s==="svg"||s==="mathml"){const l=r.firstChild;for(;l.firstChild;)r.appendChild(l.firstChild);r.removeChild(l)}t.insertBefore(r,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},li="transition",Ua="animation",_a=Symbol("_vtc"),Bt=(e,{slots:t})=>Co(F$,Gv(e),t);Bt.displayName="Transition";const qv={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},nE=Bt.props=Lt({},Nv,qv),io=(e,t=[])=>{Be(e)?e.forEach(n=>n(...t)):e&&e(...t)},Im=e=>e?Be(e)?e.some(t=>t.length>1):e.length>1:!1;function Gv(e){const t={};for(const G in e)G in qv||(t[G]=e[G]);if(e.css===!1)return t;const{name:n="v",type:s,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:r=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:c=a,appearToClass:u=r,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,g=sE(i),_=g&&g[0],v=g&&g[1],{onBeforeEnter:w,onEnter:A,onEnterCancelled:$,onLeave:M,onLeaveCancelled:k,onBeforeAppear:y=w,onAppear:x=A,onAppearCancelled:E=$}=t,P=(G,ae,Y)=>{fi(G,ae?u:r),fi(G,ae?c:a),Y&&Y()},C=(G,ae)=>{G._isLeaving=!1,fi(G,d),fi(G,p),fi(G,f),ae&&ae()},F=G=>(ae,Y)=>{const L=G?x:A,O=()=>P(ae,G,Y);io(L,[ae,O]),Rm(()=>{fi(ae,G?l:o),Bs(ae,G?u:r),Im(L)||Lm(ae,s,_,O)})};return Lt(t,{onBeforeEnter(G){io(w,[G]),Bs(G,o),Bs(G,a)},onBeforeAppear(G){io(y,[G]),Bs(G,l),Bs(G,c)},onEnter:F(!1),onAppear:F(!0),onLeave(G,ae){G._isLeaving=!0;const Y=()=>C(G,ae);Bs(G,d),Bs(G,f),Xv(),Rm(()=>{G._isLeaving&&(fi(G,d),Bs(G,p),Im(M)||Lm(G,s,v,Y))}),io(M,[G,Y])},onEnterCancelled(G){P(G,!1),io($,[G])},onAppearCancelled(G){P(G,!0),io(E,[G])},onLeaveCancelled(G){C(G),io(k,[G])}})}function sE(e){if(e==null)return null;if(ht(e))return[Ku(e.enter),Ku(e.leave)];{const t=Ku(e);return[t,t]}}function Ku(e){return Hb(e)}function Bs(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[_a]||(e[_a]=new Set)).add(t)}function fi(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[_a];n&&(n.delete(t),n.size||(e[_a]=void 0))}function Rm(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let iE=0;function Lm(e,t,n,s){const i=e._endId=++iE,o=()=>{i===e._endId&&s()};if(n)return setTimeout(o,n);const{type:a,timeout:r,propCount:l}=Jv(e,t);if(!a)return s();const c=a+"end";let u=0;const d=()=>{e.removeEventListener(c,f),o()},f=p=>{p.target===e&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},r+1),e.addEventListener(c,f)}function Jv(e,t){const n=window.getComputedStyle(e),s=g=>(n[g]||"").split(", "),i=s(`${li}Delay`),o=s(`${li}Duration`),a=Nm(i,o),r=s(`${Ua}Delay`),l=s(`${Ua}Duration`),c=Nm(r,l);let u=null,d=0,f=0;t===li?a>0&&(u=li,d=a,f=o.length):t===Ua?c>0&&(u=Ua,d=c,f=l.length):(d=Math.max(a,c),u=d>0?a>c?li:Ua:null,f=u?u===li?o.length:l.length:0);const p=u===li&&/\b(transform|all)(,|$)/.test(s(`${li}Proper
* pinia v2.1.7
* (c) 2023 Eduardo San Martin Morote
* @license MIT
2024-08-10 00:25:25 -04:00
*/let iy;const ou=e=>iy=e,oy=Symbol();function Kd(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var br;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(br||(br={}));function FE(){const e=Ub(!0),t=e.run(()=>ve({}));let n=[],s=[];const i=Xc({install(o){ou(i),i._a=o,o.provide(oy,i),o.config.globalProperties.$pinia=i,s.forEach(a=>n.push(a)),s=[]},use(o){return!this._a&&!NE?s.push(o):n.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}const ay=()=>{};function Qm(e,t,n,s=ay){e.push(t);const i=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&qc()&&Uh(i),i}function Ko(e,...t){e.slice().forEach(n=>{n(...t)})}const BE=e=>e();function qd(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];Kd(i)&&Kd(s)&&e.hasOwnProperty(n)&&!Ct(s)&&!yo(s)?e[n]=qd(i,s):e[n]=s}return e}const VE=Symbol();function HE(e){return!Kd(e)||!e.hasOwnProperty(VE)}const{assign:pi}=Object;function jE(e){return!!(Ct(e)&&e.effect)}function WE(e,t,n,s){const{state:i,actions:o,getters:a}=t,r=n.state.value[e];let l;function c(){r||(n.state.value[e]=i?i():{});const u=HA(n.state.value[e]);return pi(u,o,Object.keys(a||{}).reduce((d,f)=>(d[f]=Xc(_e(()=>{ou(n);const p=n._s.get(e);return a[f].call(p,p)})),d),{}))}return l=ry(e,c,t,n,s,!0),l}function ry(e,t,n={},s,i,o){let a;const r=pi({actions:{}},n),l={deep:!0};let c,u,d=[],f=[],p;const g=s.state.value[e];!o&&!g&&(s.state.value[e]={}),ve({});let _;function v(E){let P;c=u=!1,typeof E=="function"?(E(s.state.value[e]),P={type:br.patchFunction,storeId:e,events:p}):(qd(s.state.value[e],E),P={type:br.patchObject,payload:E,storeId:e,events:p});const C=_=Symbol();Zt().then(()=>{_===C&&(c=!0)}),u=!0,Ko(d,P,s.state.value[e])}const w=o?function(){const{state:P}=n,C=P?P():{};this.$patch(F=>{pi(F,C)})}:ay;function A(){a.stop(),d=[],f=[],s._s.delete(e)}function $(E,P){return function(){ou(s);const C=Array.from(arguments),F=[],G=[];function ae(O){F.push(O)}function Y(O){G.push(O)}Ko(f,{args:C,name:E,store:k,after:ae,onError:Y});let L;try{L=P.apply(this&&this.$id===e?this:k,C)}catch(O){throw Ko(G,O),O}return L instanceof Promise?L.then(O=>(Ko(F,O),O)).catch(O=>(Ko(G,O),Promise.reject(O))):(Ko(F,L),L)}}const M={_p:s,$id:e,$onAction:Qm.bind(null,f),$patch:v,$reset:w,$subscribe(E,P={}){const C=Qm(d,E,P.detached,()=>F()),F=a.run(()=>Ut(()=>s.state.value[e],G=>{(P.flush==="sync"?u:c)&&E({storeId:e,type:br.direct,events:p},G)},pi({},l,P)));return C},$dispose:A},k=Ms(M);s._s.set(e,k);const x=(s._a&&s._a.runWithContext||BE)(()=>s._e.run(()=>(a=Ub()).run(t)));for(const E in x){const P=x[E];if(Ct(P)&&!jE(P)||yo(P))o||(g&&HE(P)&&(Ct(P)?P.value=g[E]:qd(P,g[E])),s.state.value[e][E]=P);else if(typeof P=="function"){const C=$(E,P);x[E]=C,r.actions[E]=P}}return pi(k,x),pi(Ze(k),x),Object.defineProperty(k,"$state",{get:()=>s.state.value[e],set:E=>{v(P=>{pi(P,E)})}}),s._p.forEach(E=>{pi(k,a.run(()=>E({store:k,app:s._a,pinia:s,options:r})))}),g&&o&&n.hydrate&&n.hydrate(k.$state,g),c=!0,u=!0,k}function mf(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 a(r,l){const c=w$();return r=r||(c?ls(oy,null):null),r&&ou(r),r=iy,r._s.has(s)||(o?ry(s,t,i,r):WE(s,i,r)),r._s.get(s)}return a.$id=s,a}/*!
* vue-router v4.2.5
* (c) 2023 Eduardo San Martin Morote
* @license MIT
2024-08-10 00:25:25 -04:00
*/const ea=typeof window<"u";function zE(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ct=Object.assign;function Ju(e,t){const n={};for(const s in t){const i=t[s];n[s]=ds(i)?i.map(e):e(i)}return n}const vr=()=>{},ds=Array.isArray,YE=/\/$/,UE=e=>e.replace(YE,"");function Xu(e,t,n="/"){let s,i={},o="",a="";const r=t.indexOf("#");let l=t.indexOf("?");return r<l&&r>=0&&(l=-1),l>-1&&(s=t.slice(0,l),o=t.slice(l+1,r>-1?r:t.length),i=e(o)),r>-1&&(s=s||t.slice(0,r),a=t.slice(r,t.length)),s=JE(s??t,n),{fullPath:s+(o&&"?")+o+a,path:s,query:i,hash:a}}function KE(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Zm(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function qE(e,t,n){const s=t.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&va(t.matched[s],n.matched[i])&&ly(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function va(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ly(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!GE(e[n],t[n]))return!1;return!0}function GE(e,t){return ds(e)?eg(e,t):ds(t)?eg(t,e):e===t}function eg(e,t){return ds(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function JE(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,a,r;for(a=0;a<s.length;a++)if(r=s[a],r!==".")if(r==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(a-(a===s.length?1:0)).join("/")}var Br;(function(e){e.pop="pop",e.push="push"})(Br||(Br={}));var yr;(function(e){e.back="back",e.forward="forward",e.unknown=""})(yr||(yr={}));function XE(e){if(!e)if(ea){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),UE(e)}const QE=/^[^#]+#/;function ZE(e,t){return e.replace(QE,"#")+t}function eC(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 au=()=>({left:window.pageXOffset,top:window.pageYOffset});function tC(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=eC(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 tg(e,t){return(history.state?history.state.position-t:-1)+e}const Gd=new Map;function nC(e,t){Gd.set(e,t)}function sC(e){const t=Gd.get(e);return Gd.delete(e),t}let iC=()=>location.protocol+"//"+location.host;function cy(e,t){const{pathname:n,search:s,hash:i}=t,o=e.indexOf("#");if(o>-1){let r=i.includes(e.slice(o))?e.slice(o).length:1,l=i.slice(r);return l[0]!=="/"&&(l="/"+l),Zm(l,"")}return Zm(n,e)+s+i}function oC(e,t,n,s){let i=[],o=[],a=null;const r=({state:f})=>{const p=cy(e,location),g=n.value,_=t.value;let v=0;if(f){if(n.value=p,t.value=f,a&&a===g){a=null;return}v=_?f.position-_.position:0}else s(p);i.forEach(w=>{w(n.value,g,{delta:v,type:Br.pop,direction:v?v>0?yr.forward:yr.back:yr.unknown})})};function l(){a=n.value}function c(f){i.push(f);const p=()=>{const g=i.indexOf(f);g>-1&&i.splice(g,1)};return o.push(p),p}function u(){const{history:f}=window;f.state&&f.replaceState(ct({},f.state,{scroll:au()}),"")}function d(){for(const f of o)f();o=[],window.removeEventListener("popstate",r),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",r),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function ng(e,t,n,s=!1,i=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:i?au():null}}function aC(e){const{history:t,location:n}=window,s={value:cy(e,n)},i={value:t.state};i.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replace
2024-04-03 01:16:56 -04:00
(?:
2024-08-10 00:25:25 -04:00
(?:${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
2024-04-03 01:16:56 -04:00
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
2024-08-10 00:25:25 -04:00
`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),GC=new RegExp(`(?:^${ns}$)|(?:^${ru}$)`),JC=new RegExp(`^${ns}$`),XC=new RegExp(`^${ru}$`),lu=e=>e&&e.exact?GC:new RegExp(`(?:${yi(e)}${ns}${yi(e)})|(?:${yi(e)}${ru}${yi(e)})`,"g");lu.v4=e=>e&&e.exact?JC:new RegExp(`${yi(e)}${ns}${yi(e)}`,"g");lu.v6=e=>e&&e.exact?XC:new RegExp(`${yi(e)}${ru}${yi(e)}`,"g");const vy={exact:!1},yy=`${lu.v4().source}\\/(3[0-2]|[12]?[0-9])`,wy=`${lu.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,QC=new RegExp(`^${yy}$`),ZC=new RegExp(`^${wy}$`),eP=({exact:e}=vy)=>e?QC:new RegExp(yy,"g"),tP=({exact:e}=vy)=>e?ZC:new RegExp(wy,"g"),xy=eP({exact:!0}),ky=tP({exact:!0}),vf=e=>xy.test(e)?4:ky.test(e)?6:0;vf.v4=e=>xy.test(e);vf.v6=e=>ky.test(e);const Nn=mf("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 Tt("/api/getWireguardConfigurations",{},e=>{e.status&&(this.Configurations=e.data)})},regexCheckIP(e){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(e)},checkCIDR(e){return vf(e)!==0}}}),Ye=(e,t)=>{const n=e.__vccOpts||e;for(const[s,i]of t)n[s]=i;return n},nP={name:"navbar",setup(){const e=Nn(),t=st();return{wireguardConfigurationsStore:e,dashboardConfigurationStore:t}}},sP={class:"col-md-3 col-lg-2 d-md-block p-3",style:{height:"calc(-50px + 100vh)"}},iP={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},oP={class:"sidebar-sticky pt-3"},aP={class:"nav flex-column px-2"},rP={class:"nav-item"},lP=h("i",{class:"bi bi-house me-2"},null,-1),cP={class:"nav-item"},uP=h("i",{class:"bi bi-gear me-2"},null,-1),dP=h("hr",{class:"text-body"},null,-1),hP=h("h6",{class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},[h("i",{class:"bi bi-body-text me-2"}),we(" Configurations ")],-1),fP={class:"nav flex-column px-2"},pP={class:"nav-item"},mP=h("hr",{class:"text-body"},null,-1),gP=h("h6",{class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},[h("i",{class:"bi bi-tools me-2"}),we(" Tools ")],-1),_P={class:"nav flex-column px-2"},bP={class:"nav-item"},vP={class:"nav-item"},yP=h("hr",{class:"text-body"},null,-1),wP={class:"nav flex-column px-2"},xP={class:"nav-item"},kP=h("i",{class:"bi bi-box-arrow-left me-2"},null,-1),SP=h("ul",{class:"nav flex-column"},[h("li",{class:"nav-item"},[h("a",{href:"https://github.com/donaldzou/WGDashboard/
*
* Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
2024-08-10 00:25:25 -04:00
*/(function(){function e(k){var y=new Float64Array(16);if(k)for(var x=0;x<k.length;++x)y[x]=k[x];return y}function t(k,y){for(var x,E=e(),P=e(),C=0;C<16;++C)P[C]=y[C];n(P),n(P),n(P);for(var F=0;F<2;++F){E[0]=P[0]-65517;for(var C=1;C<15;++C)E[C]=P[C]-65535-(E[C-1]>>16&1),E[C-1]&=65535;E[15]=P[15]-32767-(E[14]>>16&1),x=E[15]>>16&1,E[14]&=65535,s(P,E,1-x)}for(var C=0;C<16;++C)k[2*C]=P[C]&255,k[2*C+1]=P[C]>>8}function n(k){for(var y=0;y<16;++y)k[(y+1)%16]+=(y<15?1:38)*Math.floor(k[y]/65536),k[y]&=65535}function s(k,y,x){for(var E,P=~(x-1),C=0;C<16;++C)E=P&(k[C]^y[C]),k[C]^=E,y[C]^=E}function i(k,y,x){for(var E=0;E<16;++E)k[E]=y[E]+x[E]|0}function o(k,y,x){for(var E=0;E<16;++E)k[E]=y[E]-x[E]|0}function a(k,y,x){for(var E=new Float64Array(31),P=0;P<16;++P)for(var C=0;C<16;++C)E[P+C]+=y[P]*x[C];for(var P=0;P<15;++P)E[P]+=38*E[P+16];for(var P=0;P<16;++P)k[P]=E[P];n(k),n(k)}function r(k,y){for(var x=e(),E=0;E<16;++E)x[E]=y[E];for(var E=253;E>=0;--E)a(x,x,x),E!==2&&E!==4&&a(x,x,y);for(var E=0;E<16;++E)k[E]=x[E]}function l(k){k[31]=k[31]&127|64,k[0]&=248}function c(k){for(var y,x=new Uint8Array(32),E=e([1]),P=e([9]),C=e(),F=e([1]),G=e(),ae=e(),Y=e([56129,1]),L=e([9]),O=0;O<32;++O)x[O]=k[O];l(x);for(var O=254;O>=0;--O)y=x[O>>>3]>>>(O&7)&1,s(E,P,y),s(C,F,y),i(G,E,C),o(E,E,C),i(C,P,F),o(P,P,F),a(F,G,G),a(ae,E,E),a(E,C,E),a(C,P,G),i(G,E,C),o(E,E,C),a(P,E,E),o(C,F,ae),a(E,C,Y),i(E,E,F),a(C,C,E),a(E,F,ae),a(F,P,L),a(P,G,G),s(E,P,y),s(C,F,y);return r(C,C),a(E,E,C),t(x,E),x}function u(){var k=new Uint8Array(32);return window.crypto.getRandomValues(k),k}function d(){var k=u();return l(k),k}function f(k,y){for(var x=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)k[E]=x[E]+65+(25-x[E]>>8&6)-(51-x[E]>>8&75)-(61-x[E]>>8&15)+(62-x[E]>>8&3)}function p(k){var y,x=new Uint8Array(44);for(y=0;y<32/3;++y)f(x.subarray(y*4),k.subarray(y*3));return f(x.subarray(y*4),Uint8Array.from([k[y*3+0],k[y*3+1],0])),x[43]=61,String.fromCharCode.apply(null,x)}function g(k){let y=window.atob(k),x=y.length,E=new Uint8Array(x);for(let C=0;C<x;C++)E[C]=y.charCodeAt(C);return new Uint8Array(E.buffer)}function _(k,y){k.push(y&255,y>>>8&255,y>>>16&255,y>>>24&255)}function v(k,y){k.push(y&255,y>>>8&255)}function w(k,y){for(var x=0;x<y.length;++x)k.push(y[x]&255)}function A(k){for(var y=unescape(encodeURIComponent(k)),x=new Uint8Array(y.length),E=0;E<y.length;++E)x[E]=y.charCodeAt(E);return x}function $(k){if(!$.table){$.table=[];for(var y=0,x=0;x<256;y=++x){for(var E=0;E<8;++E)y=y&1?3988292384^y>>>1:y>>>1;$.table[x]=y}}for(var P=-1,C=0;C<k.length;++C)P=P>>>8^$.table[(P^k[C])&255];return(P^-1)>>>0}function M(k){for(var y=[],x=[],E=0,P=0;P<k.length;++P){var C=A(k[P].fileName),F=A(k[P].file),G=$(F);_(y,67324752),v(y,20),v(y,0),v(y,0),v(y,0),v(y,0),_(y,G),_(y,F.length),_(y,F.length),v(y,C.length),v(y,0),w(y,C),w(y,F),_(x,33639248),v(x,0),v(x,20),v(x,0),v(x,0),v(x,0),v(x,0),_(x,G),_(x,F.length),_(x,F.length),v(x,C.length),v(x,0),v(x,0),v(x,0),v(x,0),_(x,32),_(x,E),w(x,C),E+=30+F.length+C.length}return w(y,x),_(y,101010256),v(y,0),v(y,0),v(y,k.length),v(y,k.length),_(y,x.length),_(y,E),v(y,0),Uint8Array.from(y)}window.wireguard={generateKeypair:function(){var k=d(),y=c(k),x=u();return{publicKey:p(y),privateKey:p(k),presharedKey:p(x)}},generatePublicKey:function(k){return k=g(k),p(c(k))},generateZipFiles:function(k,y){var x=k.data,E=M(x),P=new Blob([E],{type:"application/zip"}),C=document.createElement("a");C.download=y,C.href=URL.createObjectURL(P),C.style.display="none",document.body.appendChild(C),C.click(),document.body.removeChild(C)}}})();const gN={name:"newConfiguration",setup(){return{store:Nn()}},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.PublicKey
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
2024-08-10 00:25:25 -04:00
*/function al(e){return e+.5|0}const xi=(e,t,n)=>Math.max(Math.min(e,n),t);function or(e){return xi(al(e*2.55),0,255)}function Mi(e){return xi(al(e*255),0,255)}function zs(e){return xi(al(e/2.55)/100,0,1)}function Ng(e){return xi(al(e*100),0,100)}const zn={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},ih=[..."0123456789ABCDEF"],Q5=e=>ih[e&15],Z5=e=>ih[(e&240)>>4]+ih[e&15],Nl=e=>(e&240)>>4===(e&15),eF=e=>Nl(e.r)&&Nl(e.g)&&Nl(e.b)&&Nl(e.a);function tF(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&zn[e[1]]*17,g:255&zn[e[2]]*17,b:255&zn[e[3]]*17,a:t===5?zn[e[4]]*17:255}:(t===7||t===9)&&(n={r:zn[e[1]]<<4|zn[e[2]],g:zn[e[3]]<<4|zn[e[4]],b:zn[e[5]]<<4|zn[e[6]],a:t===9?zn[e[7]]<<4|zn[e[8]]:255})),n}const nF=(e,t)=>e<255?t(e):"";function sF(e){var t=eF(e)?Q5:Z5;return e?"#"+t(e.r)+t(e.g)+t(e.b)+nF(e.a,t):void 0}const iF=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function _0(e,t,n){const s=t*Math.min(n,1-n),i=(o,a=(o+e/30)%12)=>n-s*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function oF(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 aF(e,t,n){const s=_0(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 rF(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 Bf(e){const n=e.r/255,s=e.g/255,i=e.b/255,o=Math.max(n,s,i),a=Math.min(n,s,i),r=(o+a)/2;let l,c,u;return o!==a&&(u=o-a,c=r>.5?u/(2-o-a):u/(o+a),l=rF(n,s,i,u,o),l=l*60+.5),[l|0,c||0,r]}function Vf(e,t,n,s){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,s)).map(Mi)}function Hf(e,t,n){return Vf(_0,e,t,n)}function lF(e,t,n){return Vf(aF,e,t,n)}function cF(e,t,n){return Vf(oF,e,t,n)}function b0(e){return(e%360+360)%360}function uF(e){const t=iF.exec(e);let n=255,s;if(!t)return;t[5]!==s&&(n=t[6]?or(+t[5]):Mi(+t[5]));const i=b0(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?s=lF(i,o,a):t[1]==="hsv"?s=cF(i,o,a):s=Hf(i,o,a),{r:s[0],g:s[1],b:s[2],a:n}}function dF(e,t){var n=Bf(e);n[0]=b0(n[0]+t),n=Hf(n),e.r=n[0],e.g=n[1],e.b=n[2]}function hF(e){if(!e)return;const t=Bf(e),n=t[0],s=Ng(t[1]),i=Ng(t[2]);return e.a<255?`hsla(${n}, ${s}%, ${i}%, ${zs(e.a)})`:`hsl(${n}, ${s}%, ${i}%)`}const Fg={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"},Bg={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-08-10 00:25:25 -04:00
*/function Fs(){}const yF=(()=>{let e=0;return()=>e++})();function ot(e){return e===null||typeof e>"u"}function vt(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 nt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function $t(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Pn(e,t){return $t(e)?e:t}function Ge(e,t){return typeof e>"u"?t:e}const wF=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,y0=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function pt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function ut(e,t,n,s){let i,o,a;if(vt(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(nt(e))for(a=Object.keys(e),o=a.length,i=0;i<o;i++)t.call(n,e[a[i]],a[i])}function Mc(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 Dc(e){if(vt(e))return e.map(Dc);if(nt(e)){const t=Object.create(null),n=Object.keys(e),s=n.length;let i=0;for(;i<s;++i)t[n[i]]=Dc(e[n[i]]);return t}return e}function w0(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function xF(e,t,n,s){if(!w0(e))return;const i=t[e],o=n[e];nt(i)&&nt(o)?zr(i,o,s):t[e]=Dc(o)}function zr(e,t,n){const s=vt(t)?t:[t],i=s.length;if(!nt(e))return e;n=n||{};const o=n.merger||xF;let a;for(let r=0;r<i;++r){if(a=s[r],!nt(a))continue;const l=Object.keys(a);for(let c=0,u=l.length;c<u;++c)o(l[c],e,a,n)}return e}function kr(e,t){return zr(e,t,{merger:kF})}function kF(e,t,n){if(!w0(e))return;const s=t[e],i=n[e];nt(s)&&nt(i)?kr(s,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Dc(i))}const Hg={"":e=>e,x:e=>e.x,y:e=>e.y};function SF(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 AF(e){const t=SF(e);return n=>{for(const s of t){if(s==="")break;n=n&&n[s]}return n}}function Li(e,t){return(Hg[t]||(Hg[t]=AF(t)))(e)}function jf(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Yr=e=>typeof e<"u",Ni=e=>typeof e=="function",jg=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function $F(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const wt=Math.PI,yt=2*wt,EF=yt+wt,Oc=Number.POSITIVE_INFINITY,CF=wt/180,Rt=wt/2,oo=wt/4,Wg=wt*2/3,ki=Math.log10,Cs=Math.sign;function Sr(e,t,n){return Math.abs(e-t)<n}function zg(e){const t=Math.round(e);e=Sr(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(ki(e))),s=e/n;return(s<=1?1:s<=2?2:s<=5?5:10)*n}function PF(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 Ea(e){return!isNaN(parseFloat(e))&&isFinite(e)}function TF(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function x0(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 rs(e){return e*(wt/180)}function Wf(e){return e*(180/wt)}function Yg(e){if(!$t(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function k0(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+=yt),{angle:o,distance:i}}function oh(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function MF(e,t){return(e-t+EF)%yt-wt}function Mn(e){return(e%yt+yt)%yt}function Ur(e,t,n,s){const i=Mn(e),o=Mn(t),a=Mn(n),r=Mn(o-i),l=Mn(a-i),c=Mn(i-o),u=Mn(i-a);return i===o||i===a||s&&o===a||r>l&&c<u}function Qt(e,t,n){return Math.max(t,Math.min(n,e))}function DF(e){return Qt(e,-32768,32767)}function Ks(e,t,n,s=1e-6){return e>=Math.min(t,n)-s&&e<=Math.max(t,n)+s}function zf(e,t,n){n=n||(a=>e[a]<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 qs=(e,t,n,s)=>zf(e,n,s?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),OF=(e,t,n)=>zf
* Chart.js v4.4.1
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
2024-08-10 00:25:25 -04:00
*/class NB{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],a=n.duration;o.forEach(r=>r({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(s-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=$0.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 a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(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 Vs=new NB;const o_="transparent",FB={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const s=Gg(e||o_),i=s.valid&&Gg(t||o_);return i&&i.valid?i.mix(s,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class BB{constructor(t,n,s,i){const o=n[s];i=ar([t.to,i,o,t.from]);const a=ar([t.from,o,i]);this._active=!0,this._fn=t.fn||FB[t.type||typeof a],this._easing=Ar[t.easing]||Ar.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=a,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,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=ar([t.to,n,i,t.from]),this._from=ar([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,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||n<s),!this._active){this._target[i]=r,this._notify(!0);return}if(n<0){this._target[i]=o;return}l=n/s%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,r,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 z0{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!nt(t))return;const n=Object.keys(Et.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!nt(o))return;const a={};for(const r of n)a[r]=o[r];(vt(o.properties)&&o.properties||[i]).forEach(r=>{(r===i||!s.has(r))&&s.set(r,a)})})}_animateOptions(t,n){const s=n.options,i=HB(t,s);if(!i)return[];const o=this._createAnimations(i,s);return s.$shared&&VB(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,n){const s=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(n),r=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[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,r);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}o[c]=d=new BB(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size
`)>-1?e.split(`
2024-08-10 00:25:25 -04:00
`):e}function m6(e,t){const{element:n,datasetIndex:s,index:i}=t,o=e.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[s].data[i],formattedValue:r,dataset:o.getDataset(),dataIndex:i,datasetIndex:s,element:n}}function W_(e,t){const n=e.chart.ctx,{body:s,footer:i,title:o}=e,{boxWidth:a,boxHeight:r}=t,l=Yt(t.bodyFont),c=Yt(t.titleFont),u=Yt(t.footerFont),d=o.length,f=i.length,p=s.length,g=dn(t.padding);let _=g.height,v=0,w=s.reduce((M,k)=>M+k.before.length+k.lines.length+k.after.length,0);if(w+=e.beforeBody.length+e.afterBody.length,d&&(_+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),w){const M=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;_+=p*M+(w-p)*l.lineHeight+(w-1)*t.bodySpacing}f&&(_+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let A=0;const $=function(M){v=Math.max(v,n.measureText(M).width+A)};return n.save(),n.font=c.string,ut(e.title,$),n.font=l.string,ut(e.beforeBody.concat(e.afterBody),$),A=t.displayColors?a+2+t.boxPadding:0,ut(s,M=>{ut(M.before,$),ut(M.lines,$),ut(M.after,$)}),A=0,n.font=u.string,ut(e.footer,$),n.restore(),v+=g.width,{width:v,height:_}}function g6(e,t){const{y:n,height:s}=t;return n<s/2?"top":n>e.height-s/2?"bottom":"center"}function _6(e,t,n,s){const{x:i,width:o}=s,a=n.caretSize+n.caretPadding;if(e==="left"&&i+o+a>t.width||e==="right"&&i-o-a<0)return!0}function b6(e,t,n,s){const{x:i,width:o}=n,{width:a,chartArea:{left:r,right:l}}=e;let c="center";return s==="center"?c=i<=(r+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),_6(c,e,t,n)&&(c="center"),c}function z_(e,t,n){const s=n.yAlign||t.yAlign||g6(e,n);return{xAlign:n.xAlign||t.xAlign||b6(e,t,n,s),yAlign:s}}function v6(e,t){let{x:n,width:s}=e;return t==="right"?n-=s:t==="center"&&(n-=s/2),n}function y6(e,t,n){let{y:s,height:i}=e;return t==="top"?s+=n:t==="bottom"?s-=i+n:s-=i/2,s}function Y_(e,t,n,s){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:r,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=ko(a);let g=v6(t,r);const _=y6(t,l,c);return l==="center"?r==="left"?g+=c:r==="right"&&(g-=c):r==="left"?g-=Math.max(u,f)+i:r==="right"&&(g+=Math.max(d,p)+i),{x:Qt(g,0,s.width-t.width),y:Qt(_,0,s.height-t.height)}}function ql(e,t,n){const s=dn(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-s.right:e.x+s.left}function U_(e){return bs([],Hs(e))}function w6(e,t,n){return Yi(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function K_(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const u1={beforeTitle:Fs,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:Fs,beforeBody:Fs,beforeLabel:Fs,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 ot(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:Fs,afterBody:Fs,beforeFooter:Fs,footer:Fs,afterFooter:Fs};function xn(e,t,n,s){const i=e[t].call(n,s);return typeof i>"u"?u1[t].call(n,s):i}class fh extends si{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
]))+`;Ds.KANJI=new RegExp(Xr,"g");Ds.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Ds.BYTE=new RegExp(H8,"g");Ds.NUMERIC=new RegExp(O1,"g");Ds.ALPHANUMERIC=new RegExp(V8,"g");const j8=new RegExp("^"+Xr+"$"),W8=new RegExp("^"+O1+"$"),z8=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Ds.testKanji=function(t){return j8.test(t)};Ds.testNumeric=function(t){return W8.test(t)};Ds.testAlphanumeric=function(t){return z8.test(t)};(function(e){const t=ip,n=Ds;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,a){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?o.ccBits[0]:a<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,a){if(e.isValid(o))return o;try{return s(o)}catch{return a}}})(Ki);(function(e){const t=Fn,n=wu,s=yu,i=Ki,o=ip,a=7973,r=t.getBCHDigit(a);function l(f,p,g){for(let _=1;_<=40;_++)if(p<=e.getCapacity(_,g,f))return _}function c(f,p){return i.getCharCountIndicator(f,p)+4}function u(f,p){let g=0;return f.forEach(function(_){const v=c(_.mode,p);g+=v+_.getBitsLength()}),g}function d(f,p){for(let g=1;g<=40;g++)if(u(f,g)<=e.getCapacity(g,p,i.MIXED))return g}e.from=function(p,g){return o.isValid(p)?parseInt(p,10):g},e.getCapacity=function(p,g,_){if(!o.isValid(p))throw new Error("Invalid QR Code version");typeof _>"u"&&(_=i.BYTE);const v=t.getSymbolTotalCodewords(p),w=n.getTotalCodewordsCount(p,g),A=(v-w)*8;if(_===i.MIXED)return A;const $=A-c(_,p);switch(_){case i.NUMERIC:return Math.floor($/10*3);case i.ALPHANUMERIC:return Math.floor($/11*2);case i.KANJI:return Math.floor($/13);case i.BYTE:default:return Math.floor($/8)}},e.getBestVersionForData=function(p,g){let _;const v=s.from(g,s.M);if(Array.isArray(p)){if(p.length>1)return d(p,v);if(p.length===0)return 1;_=p[0]}else _=p;return l(_.mode,_.getLength(),v)},e.getEncodedBits=function(p){if(!o.isValid(p)||p<7)throw new Error("Invalid QR Code version");let g=p<<12;for(;t.getBCHDigit(g)-r>=0;)g^=a<<t.getBCHDigit(g)-r;return p<<12|g}})(D1);var I1={};const Ah=Fn,R1=1335,Y8=21522,ub=Ah.getBCHDigit(R1);I1.getEncodedBits=function(t,n){const s=t.bit<<3|n;let i=s<<10;for(;Ah.getBCHDigit(i)-ub>=0;)i^=R1<<Ah.getBCHDigit(i)-ub;return(s<<10|i)^Y8};var L1={};const U8=Ki;function Ta(e){this.mode=U8.NUMERIC,this.data=e.toString()}Ta.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};Ta.prototype.getLength=function(){return this.data.length};Ta.prototype.getBitsLength=function(){return Ta.getBitsLength(this.data.length)};Ta.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 K8=Ta;const q8=Ki,Ad=["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 Ma(e){this.mode=q8.ALPHANUMERIC,this.data=e}Ma.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Ma.prototype.getLength=function(){return this.data.length};Ma.prototype.getBitsLength=function(){return Ma.getBitsLength(this.data.length)};Ma.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let s=Ad.indexOf(this.data[n])*45;s+=Ad.indexOf(this.data[n+1]),t.put(s,11)}this.data.length%2&&t.put(Ad.indexOf(this.data[n]),6)};var G8
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var nj=Oa,N1={exports:{}};(function(e){var t={single_source_shortest_paths:function(n,s,i){var o={},a={};a[s]=0;var r=t.PriorityQueue.make();r.push(s,0);for(var l,c,u,d,f,p,g,_,v;!r.empty();){l=r.pop(),c=l.value,d=l.cost,f=n[c]||{};for(u in f)f.hasOwnProperty(u)&&(p=f[u],g=d+p,_=a[u],v=typeof a[u]>"u",(v||_>g)&&(a[u]=g,r.push(u,g),o[u]=c))}if(typeof i<"u"&&typeof a[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=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})(N1);var sj=N1.exports;(function(e){const t=Ki,n=K8,s=G8,i=Z8,o=nj,a=Ds,r=Fn,l=sj;function c(w){return unescape(encodeURIComponent(w)).length}function u(w,A,$){const M=[];let k;for(;(k=w.exec($))!==null;)M.push({data:k[0],index:k.index,mode:A,length:k[0].length});return M}function d(w){const A=u(a.NUMERIC,t.NUMERIC,w),$=u(a.ALPHANUMERIC,t.ALPHANUMERIC,w);let M,k;return r.isKanjiModeEnabled()?(M=u(a.BYTE,t.BYTE,w),k=u(a.KANJI,t.KANJI,w)):(M=u(a.BYTE_KANJI,t.BYTE,w),k=[]),A.concat($,M,k).sort(function(x,E){return x.index-E.index}).map(function(x){return{data:x.data,mode:x.mode,length:x.length}})}function f(w,A){switch(A){case t.NUMERIC:return n.getBitsLength(w);case t.ALPHANUMERIC:return s.getBitsLength(w);case t.KANJI:return o.getBitsLength(w);case t.BYTE:return i.getBitsLength(w)}}function p(w){return w.reduce(function(A,$){const M=A.length-1>=0?A[A.length-1]:null;return M&&M.mode===$.mode?(A[A.length-1].data+=$.data,A):(A.push($),A)},[])}function g(w){const A=[];for(let $=0;$<w.length;$++){const M=w[$];switch(M.mode){case t.NUMERIC:A.push([M,{data:M.data,mode:t.ALPHANUMERIC,length:M.length},{data:M.data,mode:t.BYTE,length:M.length}]);break;case t.ALPHANUMERIC:A.push([M,{data:M.data,mode:t.BYTE,length:M.length}]);break;case t.KANJI:A.push([M,{data:M.data,mode:t.BYTE,length:c(M.data)}]);break;case t.BYTE:A.push([{data:M.data,mode:t.BYTE,length:c(M.data)}])}}return A}function _(w,A){const $={},M={start:{}};let k=["start"];for(let y=0;y<w.length;y++){const x=w[y],E=[];for(let P=0;P<x.length;P++){const C=x[P],F=""+y+P;E.push(F),$[F]={node:C,lastCount:0},M[F]={};for(let G=0;G<k.length;G++){const ae=k[G];$[ae]&&$[ae].node.mode===C.mode?(M[ae][F]=f($[ae].lastCount+C.length,C.mode)-f($[ae].lastCount,C.mode),$[ae].lastCount+=C.length):($[ae]&&($[ae].lastCount=C.length),M[ae][F]=f(C.length,C.mode)+4+t.getCharCountIndicator(C.mode,A))}}k=E}for(let y=0;y<k.length;y++)M[k[y]].end=0;return{map:M,table:$}}function v(w,A){let $;const M=t.getBestModeForData(w);if($=t.from(A,M),$!==t.BYTE&&$.bit<M.bit)throw new Error('"'+w+'" cannot be encoded with mode '+t.toString($)+`.
Suggested mode is: `+t.toString(M));switch($===t.KANJI&&!r.isKanjiModeEnabled()&&($=t.BYTE),$){case t.NUMERIC:return new n(w);case t.ALPHANUMERIC:return new s(w);case t.KANJI:return new o(w);case t.BYTE:return new i(w)}}e.fromArray=function(A){return A.reduce(function($,M){return typeof M=="string"?$.push(v(M,null)):M.data&&$.push(v(M.data,M.mode)),$},[])},e.fromString=function(A,$){const M=d(A,r.isKanjiModeEnabled()),k=g(M),y=_(k,$),x=l.find_path(y.map,"start","end"),E=[];for(let P=1;P<x.length-1;P++)E.push(y.table[x[P]].node);return e.fromArray(p(E))},e.rawSplit=function(A){return e.fromArray(d(A,r.isKanjiModeEnabled()))}})(L1);const ku=Fn,$d=yu,ij=L8,oj=N8,aj=E1,rj=C1,$h=P1,Eh=wu,lj=B8,Hc=D1,cj=I1,uj=Ki,Ed=L1;function dj(e,t){const n=e.size,s=rj.getPositions(t);for(let i=0;i<s.length;i++){const o=s[i][0],a=s[i][1];for(let r=-1;r<=7;r++)if(!(o+r<=-1||n<=o+r))for(let l=-1;l<=7;l++)a+l<=-1||n<=a+l||(r>=0&&r<=6&&(l===0||l===6)||l>=0&&l<=6&&(r===0||r===6)||r>=2&&r<=4&&l>=2&&l<=4?e.set(o+r,a+l,!0,!0):e.set(o+r,a+l,!1,!0))}}function hj(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 fj(e,t){const n=aj.getPositions(t);for(let s=0;s<n.length;s++){const i=n[s][0],o=n[s][1];for(let a=-2;a<=2;a++)for(let r=-2;r<=2;r++)a===-2||a===2||r===-2||r===2||a===0&&r===0?e.set(i+a,o+r,!0,!0):e.set(i+a,o+r,!1,!0)}}function pj(e,t){const n=e.size,s=Hc.getEncodedBits(t);let i,o,a;for(let r=0;r<18;r++)i=Math.floor(r/3),o=r%3+n-8-3,a=(s>>r&1)===1,e.set(i,o,a,!0),e.set(o,i,a,!0)}function Cd(e,t,n){const s=e.size,i=cj.getEncodedBits(t,n);let o,a;for(o=0;o<15;o++)a=(i>>o&1)===1,o<6?e.set(o,8,a,!0):o<8?e.set(o+1,8,a,!0):e.set(s-15+o,8,a,!0),o<8?e.set(8,s-o-1,a,!0):o<9?e.set(8,15-o-1+1,a,!0):e.set(8,15-o-1,a,!0);e.set(s-8,8,1,!0)}function mj(e,t){const n=e.size;let s=-1,i=n-1,o=7,a=0;for(let r=n-1;r>0;r-=2)for(r===6&&r--;;){for(let l=0;l<2;l++)if(!e.isReserved(i,r-l)){let c=!1;a<t.length&&(c=(t[a]>>>o&1)===1),e.set(i,r-l,c),o--,o===-1&&(a++,o=7)}if(i+=s,i<0||n<=i){i-=s,s=-s;break}}}function gj(e,t,n){const s=new ij;n.forEach(function(l){s.put(l.mode.bit,4),s.put(l.getLength(),uj.getCharCountIndicator(l.mode,e)),l.write(s)});const i=ku.getSymbolTotalCodewords(e),o=Eh.getTotalCodewordsCount(e,t),a=(i-o)*8;for(s.getLengthInBits()+4<=a&&s.put(0,4);s.getLengthInBits()%8!==0;)s.putBit(0);const r=(a-s.getLengthInBits())/8;for(let l=0;l<r;l++)s.put(l%2?17:236,8);return _j(s,e,t)}function _j(e,t,n){const s=ku.getSymbolTotalCodewords(t),i=Eh.getTotalCodewordsCount(t,n),o=s-i,a=Eh.getBlocksCount(t,n),r=s%a,l=a-r,c=Math.floor(s/a),u=Math.floor(o/a),d=u+1,f=c-u,p=new lj(f);let g=0;const _=new Array(a),v=new Array(a);let w=0;const A=new Uint8Array(e.buffer);for(let x=0;x<a;x++){const E=x<l?u:d;_[x]=A.slice(g,g+E),v[x]=p.encode(_[x]),g+=E,w=Math.max(w,E)}const $=new Uint8Array(s);let M=0,k,y;for(k=0;k<w;k++)for(y=0;y<a;y++)k<_[y].length&&($[M++]=_[y][k]);for(k=0;k<f;k++)for(y=0;y<a;y++)$[M++]=v[y][k];return $}function bj(e,t,n,s){let i;if(Array.isArray(e))i=Ed.fromArray(e);else if(typeof e=="string"){let c=t;if(!c){const u=Ed.rawSplit(e);c=Hc.getBestVersionForData(u,n)}i=Ed.fromString(e,c||40)}else throw new Error("Invalid data");const o=Hc.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(`
2024-08-05 15:39:11 -04:00
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+o+`.
2024-08-10 00:25:25 -04:00
`);const a=gj(t,n,i),r=ku.getSymbolSize(t),l=new oj(r);return dj(l,t),hj(l),fj(l,t),Cd(l,n,0),t>=7&&pj(l,t),mj(l,a),isNaN(s)&&(s=$h.getBestMask(l,Cd.bind(null,l,n))),$h.applyMask(s,l),Cd(l,n,s),{modules:l,version:t,errorCorrectionLevel:n,maskPattern:s,segments:i}}A1.create=function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let s=$d.M,i,o;return typeof n<"u"&&(s=$d.from(n.errorCorrectionLevel,$d.M),i=Hc.from(n.version),o=$h.from(n.maskPattern),n.toSJISFunc&&ku.setToSJISFunction(n.toSJISFunc)),bj(t,i,s,o)};var F1={},op={};(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,a=s.scale||4;return{width:o,scale:o?4:a,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 a=i.modules.size,r=i.modules.data,l=e.getScale(a,o),c=Math.floor((a+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 g=(f*c+p)*4,_=o.color.light;if(f>=u&&p>=u&&f<c-u&&p<c-u){const v=Math.floor((f-u)/l),w=Math.floor((p-u)/l);_=d[r[v*a+w]?1:0]}s[g++]=_.r,s[g++]=_.g,s[g++]=_.b,s[g]=_.a}}})(op);(function(e){const t=op;function n(i,o,a){i.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=a,o.width=a,o.style.height=a+"px",o.style.width=a+"px"}function s(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(o,a,r){let l=r,c=a;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),a||(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,a,r){let l=r;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),l||(l={});const c=e.render(o,a,l),u=l.type||"image/png",d=l.rendererOpts||{};return c.toDataURL(u,d.quality)}})(F1);var B1={};const vj=op;function db(e,t){const n=e.a/255,s=t+'="'+e.hex+'"';return n<1?s+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':s}function Pd(e,t,n){let s=e+t;return typeof n<"u"&&(s+=" "+n),s}function yj(e,t,n){let s="",i=0,o=!1,a=0;for(let r=0;r<e.length;r++){const l=Math.floor(r%t),c=Math.floor(r/t);!l&&!o&&(o=!0),e[r]?(a++,r>0&&l>0&&e[r-1]||(s+=o?Pd("M",l+n,.5+c+n):Pd("m",i,0),i=0,o=!1),l+1<t&&e[r+1]||(s+=Pd("h",a),a=0)):i++}return s}B1.render=function(t,n,s){const i=vj.getOptions(n),o=t.modules.size,a=t.modules.data,r=o+i.margin*2,l=i.color.light.a?"<path "+db(i.color.light,"fill")+' d="M0 0h'+r+"v"+r+'H0z"/>':"",c="<path "+db(i.color.dark,"stroke")+' d="'+yj(a,o,i.margin)+'"/>',u='viewBox="0 0 '+r+" "+r+'"',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 wj=I8,Ch=A1,V1=F1,xj=B1;function ap(e,t,n,s,i){const o=[].slice.call(arguments,1),a=o.length,r=typeof o[a-1]=="function";if(!r&&!wj())throw new Error("Callback required as last argument");if(r){if(a<2)throw new Error("Too few arguments provided");a===2?(i=n,n=t,t=s=void 0):a===3&&(t.getContext&&typeof i>"u"?(i=s,s=void 0):(i=s,s=n,n=t,t=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(n=t,t=s=void 0):a===2&&!t.getContext&&(s=n,n=t,t=void 0),new Promise(function(l,c){try{const u=Ch.create(n,s);l(e(u,t,s))}catch(u){c(u)}})}try{const l=Ch.create(n,s);i(null,e(l,t,s))}catch(l){i(l)}}No.create=Ch.create;No.toCanvas=ap.bind(null,V1.render);No.toDataURL=ap.bind(null,V1.renderToDataURL);No.toString=ap.bind(null,function(e,t,n){return xj.render(e,n)});const kj={name:"peerQRCode",props:{peerConfigData:String},mounted(){No.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,e=>{e&&console.error(e)})}},Sj={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},Aj={class:"container d-flex h-100 w-100"},$j={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},Ej={class:"card rounded-3 shadow"},Cj={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},Pj=h("h4",{class:"mb-0"},"QR Code",-1),Tj={class:"card-body"},Mj={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function Dj(e,t,n,s,i,o){return R(),B("div",Sj,[h("div",Aj,[h("div",$j,[h("div",Ej,[h("div",Cj,[Pj,h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=a=>this.$emit("close"))})]),h("div",Tj,[h("canvas",Mj,null,512)])])])])])}const Oj=Ye(kj,[["render",Dj]]),Ij={name:"nameInput",props:{bulk:Boolean,data:Object,saving:Boolean}},Rj=h("label",{for:"peer_name_textbox",class:"form-label"},[h("small",{class:"text-muted"},"Name")],-1),Lj=["disabled"];function Nj(e,t,n,s,i,o){return R(),B("div",{class:Pe({inactiveField:this.bulk})},[Rj,Le(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||this.bulk,"onUpdate:modelValue":t[0]||(t[0]=a=>this.data.name=a),id:"peer_name_textbox",placeholder:""},null,8,Lj),[[We,this.data.name]])],2)}const Fj=Ye(Ij,[["render",Nj]]),Bj={name:"privatePublicKeyInput",props:{data:Object,saving:Boolean,bulk:Boolean},setup(){return{dashboardStore:st()}},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()}}}},Vj=h("label",{for:"peer_private_key_textbox",class:"form-label"},[h("small",{class:"text-muted"},[we("Private Key "),h("code",null,"(Required for QR Code and Download)")])],-1),Hj={class:"input-group"},jj=["disabled"],Wj=["disabled"],zj=h("i",{class:"bi bi-arrow-repeat"},null,-1),Yj=[zj],Uj={class:"d-flex"},Kj=h("label",{for:"public_key",class:"form-label"},[h("small",{class:"text-muted"},[we("Public Key "),h("code",null,"(Required)")])],-1),qj={class:"form-check form-switch ms-auto"},Gj=["disabled"],Jj=h("label",{class:"form-check-label",for:"enablePublicKeyEdit"},[h("small",null,"Edit")],-1),Xj=["disabled"];function Qj(e,t,n,s,i,o){return R(),B("div",{class:Pe(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[h("div",null,[Vj,h("div",Hj,[Le(h("input",{type:"text",class:Pe(["form-control form-control-sm rounded-start-3",{"is-invalid":this.error}]),"onUpdate:modelValue":t[0]||(t[0]=a=>this.keypair.privateKey=a),disabled:!this.editKey||this.bulk,onBlur:t[1]||(t[1]=a=>this.checkMatching()),id:"peer_private_key_textbox"},null,42,jj),[
${e.data?"is on":"is off"}`,"Success"):this.dashboardConfigurationStore.newMessage("Server",e.message,"danger"),this.configurationInfo.Status=e.data,this.configurationToggling=!1})},getPeers(e=this.$route.params.id){Tt("/api/getWireguardConfigurationInfo",{configurationName:e},t=>{if(this.configurationInfo=t.data.configurationInfo,this.configurationPeers=t.data.configurationPeers,this.configurationPeers.forEach(n=>{n.restricted=!1}),t.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,as().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,as().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(t=>t.status==="running").length,totalUsage:this.configurationPeers.length>0?this.configurationPeers.filter(t=>!t.restricted).map(t=>t.total_data+t.cumu_data).reduce((t,n)=>t+n).toFixed(4):0,totalReceive:this.configurationPeers.length>0?this.configurationPeers.filter(t=>!t.restricted).map(t=>t.total_receive+t.cumu_receive).reduce((t,n)=>t+n).toFixed(4):0,totalSent:this.configurationPeers.length>0?this.configurationPeers.filter(t=>!t.restricted).map(t=>t.total_sent+t.cumu_sent).reduce((t,n)=>t+n).toFixed(4):0}},receiveData(){return this.historyReceiveData},sentData(){return this.historySentData},individualDataUsage(){return{labels:this.configurationPeers.map(e=>e.name?e.name:`Untitled Peer - ${e.id}`),datasets:[{label:"Total Data Usage",data:this.configurationPeers.map(e=>e.cumu_data+e.total_data),backgroundColor:this.configurationPeers.map(e=>"#0dcaf0"),tooltip:{callbacks:{label:e=>`${e.formattedValue} GB`}}}]}},individualDataUsageChartOption(){return{responsive:!0,plugins:{legend:{display:!1}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(e,t)=>`${e} GB`},grid:{display:!1}}}}},chartOptions(){return{responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:e=>`${e.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(e,t)=>`${e} MB/s`},grid:{display:!1}}}}},searchPeers(){const e=new Fa(this.configurationPeers,{keys:["name","id","allowed_ip"]}),t=this.wireguardConfigurationStore.searchString?e.search(this.wireguardConfigurationStore.searchString).map(n=>n.item):this.configurationPeers;return this.dashboardConfigurationStore.Configuration.Server.dashboard_sort==="restricted"?t.slice().sort((n,s)=>n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]<s[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]>s[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:0):t.slice().sort((n,s)=>n[this.dashboardConfigurationStore.Configuration.