69 lines
554 KiB
JavaScript
Raw Normal View History

2024-08-04 01:31:31 -04:00
var b1=Object.defineProperty;var v1=(e,t,s)=>t in e?b1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var ot=(e,t,s)=>(v1(e,typeof t!="symbol"?t+"":t,s),s);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(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"&&n(r)}).observe(document,{childList:!0,subtree:!0});function s(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 n(i){if(i.ep)return;i.ep=!0;const o=s(i);fetch(i.href,o)}})();var Zp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function y1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function x1(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(s,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),s}var w1={exports:{}},Ee="top",Ne="bottom",Fe="right",Ae="left",Fa="auto",Xi=[Ee,Ne,Fe,Ae],ei="start",Mi="end",tg="clippingParents",sd="viewport",xi="popper",eg="reference",dc=Xi.reduce(function(e,t){return e.concat([t+"-"+ei,t+"-"+Mi])},[]),nd=[].concat(Xi,[Fa]).reduce(function(e,t){return e.concat([t,t+"-"+ei,t+"-"+Mi])},[]),sg="beforeRead",ng="read",ig="afterRead",og="beforeMain",rg="main",ag="afterMain",lg="beforeWrite",cg="write",dg="afterWrite",ug=[sg,ng,ig,og,rg,ag,lg,cg,dg];function ws(e){return e?(e.nodeName||"").toLowerCase():null}function Be(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function si(e){var t=Be(e).Element;return e instanceof t||e instanceof Element}function Ze(e){var t=Be(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function id(e){if(typeof ShadowRoot>"u")return!1;var t=Be(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function S1(e){var t=e.state;Object.keys(t.elements).forEach(function(s){var n=t.styles[s]||{},i=t.attributes[s]||{},o=t.elements[s];!Ze(o)||!ws(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(r){var a=i[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function E1(e){var t=e.state,s={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,s.popper),t.styles=s,t.elements.arrow&&Object.assign(t.elements.arrow.style,s.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],o=t.attributes[n]||{},r=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:s[n]),a=r.reduce(function(l,c){return l[c]="",l},{});!Ze(i)||!ws(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const od={name:"applyStyles",enabled:!0,phase:"write",fn:S1,effect:E1,requires:["computeStyles"]};function bs(e){return e.split("-")[0]}var qn=Math.max,_a=Math.min,Di=Math.round;function uc(){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 hg(){return!/^((?!chrome|android).)*safari/i.test(uc())}function Ii(e,t,s){t===void 0&&(t=!1),s===void 0&&(s=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&Ze(e)&&(i=e.offsetWidth>0&&Di(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Di(n.height)/e.offsetHeight||1);var r=si(e)?Be(e):window,a=r.visualViewport,l=!hg()&&s,c=(n.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-08-04 01:31:31 -04:00
*/(function(e,t){(function(s,n){e.exports=n(ux)})(Zp,function(s){function n(k){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(k){for(const b in k)if(b!=="default"){const D=Object.getOwnPropertyDescriptor(k,b);Object.defineProperty(f,b,D.get?D:{enumerable:!0,get:()=>k[b]})}}return f.default=k,Object.freeze(f)}const i=n(s),o=new Map,r={set(k,f,b){o.has(k)||o.set(k,new Map);const D=o.get(k);if(!D.has(f)&&D.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(D.keys())[0]}.`);return}D.set(f,b)},get(k,f){return o.has(k)&&o.get(k).get(f)||null},remove(k,f){if(!o.has(k))return;const b=o.get(k);b.delete(f),b.size===0&&o.delete(k)}},a=1e6,l=1e3,c="transitionend",d=k=>(k&&window.CSS&&window.CSS.escape&&(k=k.replace(/#([^\s"#']+)/g,(f,b)=>`#${CSS.escape(b)}`)),k),u=k=>k==null?`${k}`:Object.prototype.toString.call(k).match(/\s([a-z]+)/i)[1].toLowerCase(),p=k=>{do k+=Math.floor(Math.random()*a);while(document.getElementById(k));return k},g=k=>{if(!k)return 0;let{transitionDuration:f,transitionDelay:b}=window.getComputedStyle(k);const D=Number.parseFloat(f),U=Number.parseFloat(b);return!D&&!U?0:(f=f.split(",")[0],b=b.split(",")[0],(Number.parseFloat(f)+Number.parseFloat(b))*l)},m=k=>{k.dispatchEvent(new Event(c))},_=k=>!k||typeof k!="object"?!1:(typeof k.jquery<"u"&&(k=k[0]),typeof k.nodeType<"u"),v=k=>_(k)?k.jquery?k[0]:k:typeof k=="string"&&k.length>0?document.querySelector(d(k)):null,w=k=>{if(!_(k)||k.getClientRects().length===0)return!1;const f=getComputedStyle(k).getPropertyValue("visibility")==="visible",b=k.closest("details:not([open])");if(!b)return f;if(b!==k){const D=k.closest("summary");if(D&&D.parentNode!==b||D===null)return!1}return f},S=k=>!k||k.nodeType!==Node.ELEMENT_NODE||k.classList.contains("disabled")?!0:typeof k.disabled<"u"?k.disabled:k.hasAttribute("disabled")&&k.getAttribute("disabled")!=="false",$=k=>{if(!document.documentElement.attachShadow)return null;if(typeof k.getRootNode=="function"){const f=k.getRootNode();return f instanceof ShadowRoot?f:null}return k instanceof ShadowRoot?k:k.parentNode?$(k.parentNode):null},T=()=>{},y=k=>{k.offsetHeight},x=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,C=[],E=k=>{document.readyState==="loading"?(C.length||document.addEventListener("DOMContentLoaded",()=>{for(const f of C)f()}),C.push(k)):k()},P=()=>document.documentElement.dir==="rtl",M=k=>{E(()=>{const f=x();if(f){const b=k.NAME,D=f.fn[b];f.fn[b]=k.jQueryInterface,f.fn[b].Constructor=k,f.fn[b].noConflict=()=>(f.fn[b]=D,k.jQueryInterface)}})},O=(k,f=[],b=k)=>typeof k=="function"?k(...f):b,F=(k,f,b=!0)=>{if(!b){O(k);return}const U=g(f)+5;let it=!1;const et=({target:Tt})=>{Tt===f&&(it=!0,f.removeEventListener(c,et),O(k))};f.addEventListener(c,et),setTimeout(()=>{it||m(f)},U)},Q=(k,f,b,D)=>{const U=k.length;let it=k.indexOf(f);return it===-1?!b&&D?k[U-1]:k[0]:(it+=b?1:-1,D&&(it=(it+U)%U),k[Math.max(0,Math.min(it,U-1))])},G=/[^.]*(?=\..*)\.|.*/,H=/\..*/,R=/::\d+$/,z={};let Y=1;const rt={mouseenter:"mouseover",mouseleave:"mouseout"},ht=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 vt(k,f){return f&&`${f}::${Y++}`||k.uidEvent||Y++}function _t(k){const f=vt(k);return k.uidEvent=f,z[f]=z[f]||{},z[f]}function Dt(k,f){return function b(D){return Lt(D,{delegateTarget:k}),b.oneOff&&j.off(k,D.type,f),f.apply(k,[D])}}function Pt(k,f,b){return function D(U){const it=k.querySelectorAll(f);for(let{target:et}=U;et&&et!==this;et=et.parentNode)for(const Tt of it)if(Tt===et)return Lt(U,{delegateTarget:et})
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-04 01:31:31 -04:00
**//*! #__NO_SIDE_EFFECTS__ */function pd(e,t){const s=new Set(e.split(","));return t?n=>s.has(n.toLowerCase()):n=>s.has(n)}const Gt={},Ei=[],Ge=()=>{},hx=()=>!1,ja=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),gd=e=>e.startsWith("onUpdate:"),ie=Object.assign,md=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},fx=Object.prototype.hasOwnProperty,Vt=(e,t)=>fx.call(e,t),mt=Array.isArray,Ai=e=>nr(e)==="[object Map]",Qi=e=>nr(e)==="[object Set]",uh=e=>nr(e)==="[object Date]",St=e=>typeof e=="function",oe=e=>typeof e=="string",js=e=>typeof e=="symbol",Ut=e=>e!==null&&typeof e=="object",Eg=e=>(Ut(e)||St(e))&&St(e.then)&&St(e.catch),Ag=Object.prototype.toString,nr=e=>Ag.call(e),px=e=>nr(e).slice(8,-1),Cg=e=>nr(e)==="[object Object]",_d=e=>oe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,$o=pd(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ha=e=>{const t=Object.create(null);return s=>t[s]||(t[s]=e(s))},gx=/-(\w)/g,Ss=Ha(e=>e.replace(gx,(t,s)=>s?s.toUpperCase():"")),mx=/\B([A-Z])/g,Zi=Ha(e=>e.replace(mx,"-$1").toLowerCase()),Wa=Ha(e=>e.charAt(0).toUpperCase()+e.slice(1)),Dl=Ha(e=>e?`on${Wa(e)}`:""),mn=(e,t)=>!Object.is(e,t),ea=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},$g=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},ba=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Pg=e=>{const t=oe(e)?Number(e):NaN;return isNaN(t)?e:t};let hh;const kg=()=>hh||(hh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ri(e){if(mt(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],i=oe(n)?yx(n):Ri(n);if(i)for(const o in i)t[o]=i[o]}return t}else if(oe(e)||Ut(e))return e}const _x=/;(?![^(]*\))/g,bx=/:([^]+)/,vx=/\/\*[^]*?\*\//g;function yx(e){const t={};return e.replace(vx,"").split(_x).forEach(s=>{if(s){const n=s.split(bx);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Mt(e){let t="";if(oe(e))t=e;else if(mt(e))for(let s=0;s<e.length;s++){const n=Mt(e[s]);n&&(t+=n+" ")}else if(Ut(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const xx="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",wx=pd(xx);function Tg(e){return!!e||e===""}function Sx(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=ni(e[n],t[n]);return s}function ni(e,t){if(e===t)return!0;let s=uh(e),n=uh(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=js(e),n=js(t),s||n)return e===t;if(s=mt(e),n=mt(t),s||n)return s&&n?Sx(e,t):!1;if(s=Ut(e),n=Ut(t),s||n){if(!s||!n)return!1;const i=Object.keys(e).length,o=Object.keys(t).length;if(i!==o)return!1;for(const r in e){const a=e.hasOwnProperty(r),l=t.hasOwnProperty(r);if(a&&!l||!a&&l||!ni(e[r],t[r]))return!1}}return String(e)===String(t)}function bd(e,t){return e.findIndex(s=>ni(s,t))}const nt=e=>oe(e)?e:e==null?"":mt(e)||Ut(e)&&(e.toString===Ag||!St(e.toString))?JSON.stringify(e,Mg,2):String(e),Mg=(e,t)=>t&&t.__v_isRef?Mg(e,t.value):Ai(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,i],o)=>(s[Il(n,o)+" =>"]=i,s),{})}:Qi(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Il(s))}:js(t)?Il(t):Ut(t)&&!mt(t)&&!Cg(t)?String(t):t,Il=(e,t="")=>{var s;return js(e)?`Symbol(${(s=e.description)!=null?s: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-04 01:31:31 -04:00
**/let Oe;class Dg{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Oe,!t&&Oe&&(this.index=(Oe.scopes||(Oe.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const s=Oe;try{return Oe=this,t()}finally{Oe=s}}}on(){Oe=this}off(){Oe=this.parent}stop(t){if(this._active){let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.scopes)for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].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 Ig(e){return new Dg(e)}function Ex(e,t=Oe){t&&t.active&&t.effects.push(e)}function vd(){return Oe}function Og(e){Oe&&Oe.cleanups.push(e)}let Gn;class yd{constructor(t,s,n,i){this.fn=t,this.trigger=s,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=5,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,Ex(this,i)}get dirty(){if(this._dirtyLevel===2)return!1;if(this._dirtyLevel===3||this._dirtyLevel===4){this._dirtyLevel=1,wn();for(let t=0;t<this._depsLength;t++){const s=this.deps[t];if(s.computed){if(s.computed.effect._dirtyLevel===2)return!0;if(Ax(s.computed),this._dirtyLevel>=5)break}}this._dirtyLevel===1&&(this._dirtyLevel=0),Sn()}return this._dirtyLevel>=5}set dirty(t){this._dirtyLevel=t?5:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=hn,s=Gn;try{return hn=!0,Gn=this,this._runnings++,fh(this),this.fn()}finally{ph(this),this._runnings--,Gn=s,hn=t}}stop(){this.active&&(fh(this),ph(this),this.onStop&&this.onStop(),this.active=!1)}}function Ax(e){return e.value}function fh(e){e._trackId++,e._depsLength=0}function ph(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Lg(e.deps[t],e);e.deps.length=e._depsLength}}function Lg(e,t){const s=e.get(t);s!==void 0&&t._trackId!==s&&(e.delete(t),e.size===0&&e.cleanup())}let hn=!0,fc=0;const Rg=[];function wn(){Rg.push(hn),hn=!1}function Sn(){const e=Rg.pop();hn=e===void 0?!0:e}function xd(){fc++}function wd(){for(fc--;!fc&&pc.length;)pc.shift()()}function Ng(e,t,s){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&Lg(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}const pc=[];function Fg(e,t,s){xd();for(const n of e.keys()){if(!e.computed&&n.computed&&e.get(n)===n._trackId&&n._runnings>0){n._dirtyLevel=2;continue}let i;n._dirtyLevel<t&&(i??(i=e.get(n)===n._trackId))&&(n._shouldSchedule||(n._shouldSchedule=n._dirtyLevel===0),n.computed&&n._dirtyLevel===2&&(n._shouldSchedule=!0),n._dirtyLevel=t),n._shouldSchedule&&(i??(i=e.get(n)===n._trackId))&&(n.trigger(),(!n._runnings||n.allowRecurse)&&n._dirtyLevel!==3&&(n._shouldSchedule=!1,n.scheduler&&pc.push(n.scheduler)))}wd()}const Bg=(e,t)=>{const s=new Map;return s.cleanup=e,s.computed=t,s},va=new WeakMap,Jn=Symbol(""),gc=Symbol("");function De(e,t,s){if(hn&&Gn){let n=va.get(e);n||va.set(e,n=new Map);let i=n.get(s);i||n.set(s,i=Bg(()=>n.delete(s))),Ng(Gn,i)}}function Bs(e,t,s,n,i,o){const r=va.get(e);if(!r)return;let a=[];if(t==="clear")a=[...r.values()];else if(s==="length"&&mt(e)){const l=Number(n);r.forEach((c,d)=>{(d==="length"||!js(d)&&d>=l)&&a.push(c)})}else switch(s!==void 0&&a.push(r.get(s)),t){case"add":mt(e)?_d(s)&&a.push(r.get("length")):(a.push(r.get(Jn)),Ai(e)&&a.push(r.get(gc)));break;case"delete":mt(e)||(a.push(r.get(Jn)),Ai(e)&&a.push(r.get(gc)));break;case"set":Ai(e)&&a.push(r.get(Jn));break}xd();for(const l of a)l&&Fg(l,5);wd()}function Cx(e,t){const s=va.get(e);return s&&s.get(t)}const $x=pd("__proto__,__v_isRef,__isVue"),Vg=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(js)),gh=Px();function Px(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...s){const n=Ot(this);for(let o=0,r=this.length;o<r;o++)De(n,"get",o+"");const i=n[t](...s);return i===-1||i===!1?n[t](...s.map(Ot)):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-04 01:31:31 -04:00
**/function pn(e,t,s,n){try{return n?e(...n):e()}catch(i){or(i,t,s)}}function ts(e,t,s,n){if(St(e)){const i=pn(e,t,s,n);return i&&Eg(i)&&i.catch(o=>{or(o,t,s)}),i}if(mt(e)){const i=[];for(let o=0;o<e.length;o++)i.push(ts(e[o],t,s,n));return i}}function or(e,t,s,n=!0){const i=t?t.vnode:null;if(t){let o=t.parent;const r=t.proxy,a=`https://vuejs.org/error-reference/#runtime-${s}`;for(;o;){const c=o.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,r,a)===!1)return}o=o.parent}const l=t.appContext.config.errorHandler;if(l){wn(),pn(l,null,10,[e,r,a]),Sn();return}}Xx(e,s,i,n)}function Xx(e,t,s,n=!0){console.error(e)}let Ho=!1,mc=!1;const _e=[];let gs=0;const Ci=[];let tn=null,Un=0;const Qg=Promise.resolve();let Pd=null;function rr(e){const t=Pd||Qg;return e?t.then(this?e.bind(this):e):t}function Qx(e){let t=gs+1,s=_e.length;for(;t<s;){const n=t+s>>>1,i=_e[n],o=Wo(i);o<e||o===e&&i.pre?t=n+1:s=n}return t}function kd(e){(!_e.length||!_e.includes(e,Ho&&e.allowRecurse?gs+1:gs))&&(e.id==null?_e.push(e):_e.splice(Qx(e.id),0,e),Zg())}function Zg(){!Ho&&!mc&&(mc=!0,Pd=Qg.then(em))}function Zx(e){const t=_e.indexOf(e);t>gs&&_e.splice(t,1)}function _c(e){mt(e)?Ci.push(...e):(!tn||!tn.includes(e,e.allowRecurse?Un+1:Un))&&Ci.push(e),Zg()}function yh(e,t,s=Ho?gs+1:0){for(;s<_e.length;s++){const n=_e[s];if(n&&n.pre){if(e&&n.id!==e.uid)continue;_e.splice(s,1),s--,n()}}}function tm(e){if(Ci.length){const t=[...new Set(Ci)].sort((s,n)=>Wo(s)-Wo(n));if(Ci.length=0,tn){tn.push(...t);return}for(tn=t,Un=0;Un<tn.length;Un++){const s=tn[Un];s.active!==!1&&s()}tn=null,Un=0}}const Wo=e=>e.id==null?1/0:e.id,tw=(e,t)=>{const s=Wo(e)-Wo(t);if(s===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return s};function em(e){mc=!1,Ho=!0,_e.sort(tw);try{for(gs=0;gs<_e.length;gs++){const t=_e[gs];t&&t.active!==!1&&pn(t,null,14)}}finally{gs=0,_e.length=0,tm(),Ho=!1,Pd=null,(_e.length||Ci.length)&&em()}}function ew(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||Gt;let i=s;const o=t.startsWith("update:"),r=o&&t.slice(7);if(r&&r in n){const d=`${r==="modelValue"?"model":r}Modifiers`,{number:u,trim:p}=n[d]||Gt;p&&(i=s.map(g=>oe(g)?g.trim():g)),u&&(i=s.map(ba))}let a,l=n[a=Dl(t)]||n[a=Dl(Ss(t))];!l&&o&&(l=n[a=Dl(Zi(t))]),l&&ts(l,e,6,i);const c=n[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ts(c,e,6,i)}}function sm(e,t,s=!1){const n=t.emitsCache,i=n.get(e);if(i!==void 0)return i;const o=e.emits;let r={},a=!1;if(!St(e)){const l=c=>{const d=sm(c,t,!0);d&&(a=!0,ie(r,d))};!s&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(Ut(e)&&n.set(e,null),null):(mt(o)?o.forEach(l=>r[l]=null):ie(r,o),Ut(e)&&n.set(e,r),r)}function Ya(e,t){return!e||!ja(t)?!1:(t=t.slice(2).replace(/Once$/,""),Vt(e,t[0].toLowerCase()+t.slice(1))||Vt(e,Zi(t))||Vt(e,t))}let Se=null,qa=null;function xa(e){const t=Se;return Se=e,qa=e&&e.type.__scopeId||null,t}function ss(e){qa=e}function ns(){qa=null}function It(e,t=Se,s){if(!t||e._n)return e;const n=(...i)=>{n._d&&Oh(-1);const o=xa(t);let r;try{r=e(...i)}finally{xa(o),n._d&&Oh(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}function Ol(e){const{type:t,vnode:s,proxy:n,withProxy:i,propsOptions:[o],slots:r,attrs:a,emit:l,render:c,renderCache:d,props:u,data:p,setupState:g,ctx:m,inheritAttrs:_}=e,v=xa(e);let w,S;try{if(s.shapeFlag&4){const T=i||n,y=T;w=as(c.call(y,T,d,u,g,p,m)),S=a}else{const T=t;w=as(T.length>1?T(u,{attrs:a,slots:r,emit:l}):T(u,null)),S=t.props?a:nw(a)}}catch(T){ko.length=0,or(T,e,1),w=dt(we)}let $=w;if(S&&_!==!1){const T=Object.keys(S),{shapeFlag:y}=$;T.length&&y&7&&(o&&T.some(gd)&&(S=iw(S,o)),$=_n($,S,!1,!0))}return s.dirs&&($=_n($,null,!1,!0),$.dirs=$.dirs?$.dirs.concat(s.dirs):s.dirs),s.transition&&($.transition=s.transition),w=$,xa(v),w}function sw(e,t=!0){let s;for(let n=0;n<e.length;n++){const i=e[n];if(Sa(i)){if(i.type!==we||i.children==="v-if"){if(s)return;s=i}}else return}return s}const nw=e=>{let t;for(const s in e)(s==="class"||s==="style"||ja(s))&&((t||(t={}))[s]=e[s]);return t},iw=(e,t)=>{const s={};for(const n in e)(!gd(n)||
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-04 01:31:31 -04:00
**/const oS="http://www.w3.org/2000/svg",rS="http://www.w3.org/1998/Math/MathML",Is=typeof document<"u"?document:null,Nh=Is&&Is.createElement("template"),aS={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const i=t==="svg"?Is.createElementNS(oS,e):t==="mathml"?Is.createElementNS(rS,e):s?Is.createElement(e,{is:s}):Is.createElement(e);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:e=>Is.createTextNode(e),createComment:e=>Is.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Is.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,i,o){const r=s?s.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),s),!(i===o||!(i=i.nextSibling)););else{Nh.innerHTML=n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e;const a=Nh.content;if(n==="svg"||n==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,s)}return[r?r.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Gs="transition",co="animation",Vi=Symbol("_vtc"),Te=(e,{slots:t})=>Bi(Kw,Om(e),t);Te.displayName="Transition";const Im={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},lS=Te.props=ie({},Sm,Im),Bn=(e,t=[])=>{mt(e)?e.forEach(s=>s(...t)):e&&e(...t)},Fh=e=>e?mt(e)?e.some(t=>t.length>1):e.length>1:!1;function Om(e){const t={};for(const F in e)F in Im||(t[F]=e[F]);if(e.css===!1)return t;const{name:s="v",type:n,duration:i,enterFromClass:o=`${s}-enter-from`,enterActiveClass:r=`${s}-enter-active`,enterToClass:a=`${s}-enter-to`,appearFromClass:l=o,appearActiveClass:c=r,appearToClass:d=a,leaveFromClass:u=`${s}-leave-from`,leaveActiveClass:p=`${s}-leave-active`,leaveToClass:g=`${s}-leave-to`}=e,m=cS(i),_=m&&m[0],v=m&&m[1],{onBeforeEnter:w,onEnter:S,onEnterCancelled:$,onLeave:T,onLeaveCancelled:y,onBeforeAppear:x=w,onAppear:C=S,onAppearCancelled:E=$}=t,P=(F,Q,G)=>{Qs(F,Q?d:a),Qs(F,Q?c:r),G&&G()},M=(F,Q)=>{F._isLeaving=!1,Qs(F,u),Qs(F,g),Qs(F,p),Q&&Q()},O=F=>(Q,G)=>{const H=F?C:S,R=()=>P(Q,F,G);Bn(H,[Q,R]),Bh(()=>{Qs(Q,F?l:o),Ts(Q,F?d:a),Fh(H)||Vh(Q,n,_,R)})};return ie(t,{onBeforeEnter(F){Bn(w,[F]),Ts(F,o),Ts(F,r)},onBeforeAppear(F){Bn(x,[F]),Ts(F,l),Ts(F,c)},onEnter:O(!1),onAppear:O(!0),onLeave(F,Q){F._isLeaving=!0;const G=()=>M(F,Q);Ts(F,u),Ts(F,p),Rm(),Bh(()=>{F._isLeaving&&(Qs(F,u),Ts(F,g),Fh(T)||Vh(F,n,v,G))}),Bn(T,[F,G])},onEnterCancelled(F){P(F,!1),Bn($,[F])},onAppearCancelled(F){P(F,!0),Bn(E,[F])},onLeaveCancelled(F){M(F),Bn(y,[F])}})}function cS(e){if(e==null)return null;if(Ut(e))return[Bl(e.enter),Bl(e.leave)];{const t=Bl(e);return[t,t]}}function Bl(e){return Pg(e)}function Ts(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[Vi]||(e[Vi]=new Set)).add(t)}function Qs(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const s=e[Vi];s&&(s.delete(t),s.size||(e[Vi]=void 0))}function Bh(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let dS=0;function Vh(e,t,s,n){const i=e._endId=++dS,o=()=>{i===e._endId&&n()};if(s)return setTimeout(o,s);const{type:r,timeout:a,propCount:l}=Lm(e,t);if(!r)return n();const c=r+"end";let d=0;const u=()=>{e.removeEventListener(c,p),o()},p=g=>{g.target===e&&++d>=l&&u()};setTimeout(()=>{d<l&&u()},a+1),e.addEventListener(c,p)}function Lm(e,t){const s=window.getComputedStyle(e),n=m=>(s[m]||"").split(", "),i=n(`${Gs}Delay`),o=n(`${Gs}Duration`),r=jh(i,o),a=n(`${co}Delay`),l=n(`${co}Duration`),c=jh(a,l);let d=null,u=0,p=0;t===Gs?r>0&&(d=Gs,u=r,p=o.length):t===co?c>0&&(d=co,u=c,p=l.length):(u=Math.max(r,c),d=u>0?r>c?Gs:co:null,p=d?d===Gs?o.length:l.length:0);const g=d===Gs&&/\b(transform|all)(,|$)/.test(n(`${Gs}Property`).toString(
* pinia v2.1.7
* (c) 2023 Eduardo San Martin Morote
* @license MIT
2024-08-04 01:31:31 -04:00
*/let jm;const sl=e=>jm=e,Hm=Symbol();function Cc(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var To;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(To||(To={}));function HS(){const e=Ig(!0),t=e.run(()=>vs({}));let s=[],n=[];const i=Ua({install(o){sl(i),i._a=o,o.provide(Hm,i),o.config.globalProperties.$pinia=i,n.forEach(r=>s.push(r)),n=[]},use(o){return!this._a&&!jS?n.push(o):s.push(o),this},_p:s,_a:null,_e:e,_s:new Map,state:t});return i}const Wm=()=>{};function sf(e,t,s,n=Wm){e.push(t);const i=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),n())};return!s&&vd()&&Og(i),i}function _i(e,...t){e.slice().forEach(s=>{s(...t)})}const WS=e=>e();function $c(e,t){e instanceof Map&&t instanceof Map&&t.forEach((s,n)=>e.set(n,s)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const s in t){if(!t.hasOwnProperty(s))continue;const n=t[s],i=e[s];Cc(i)&&Cc(n)&&e.hasOwnProperty(s)&&!de(n)&&!Xn(n)?e[s]=$c(i,n):e[s]=n}return e}const zS=Symbol();function KS(e){return!Cc(e)||!e.hasOwnProperty(zS)}const{assign:Zs}=Object;function US(e){return!!(de(e)&&e.effect)}function YS(e,t,s,n){const{state:i,actions:o,getters:r}=t,a=s.state.value[e];let l;function c(){a||(s.state.value[e]=i?i():{});const d=qx(s.state.value[e]);return Zs(d,o,Object.keys(r||{}).reduce((u,p)=>(u[p]=Ua(qe(()=>{sl(s);const g=s._s.get(e);return r[p].call(g,g)})),u),{}))}return l=zm(e,c,t,s,n,!0),l}function zm(e,t,s={},n,i,o){let r;const a=Zs({actions:{}},s),l={deep:!0};let c,d,u=[],p=[],g;const m=n.state.value[e];!o&&!m&&(n.state.value[e]={}),vs({});let _;function v(E){let P;c=d=!1,typeof E=="function"?(E(n.state.value[e]),P={type:To.patchFunction,storeId:e,events:g}):($c(n.state.value[e],E),P={type:To.patchObject,payload:E,storeId:e,events:g});const M=_=Symbol();rr().then(()=>{_===M&&(c=!0)}),d=!0,_i(u,P,n.state.value[e])}const w=o?function(){const{state:P}=s,M=P?P():{};this.$patch(O=>{Zs(O,M)})}:Wm;function S(){r.stop(),u=[],p=[],n._s.delete(e)}function $(E,P){return function(){sl(n);const M=Array.from(arguments),O=[],F=[];function Q(R){O.push(R)}function G(R){F.push(R)}_i(p,{args:M,name:E,store:y,after:Q,onError:G});let H;try{H=P.apply(this&&this.$id===e?this:y,M)}catch(R){throw _i(F,R),R}return H instanceof Promise?H.then(R=>(_i(O,R),R)).catch(R=>(_i(F,R),Promise.reject(R))):(_i(O,H),H)}}const T={_p:n,$id:e,$onAction:sf.bind(null,p),$patch:v,$reset:w,$subscribe(E,P={}){const M=sf(u,E,P.detached,()=>O()),O=r.run(()=>Qn(()=>n.state.value[e],F=>{(P.flush==="sync"?d:c)&&E({storeId:e,type:To.direct,events:g},F)},Zs({},l,P)));return M},$dispose:S},y=ir(T);n._s.set(e,y);const C=(n._a&&n._a.runWithContext||WS)(()=>n._e.run(()=>(r=Ig()).run(t)));for(const E in C){const P=C[E];if(de(P)&&!US(P)||Xn(P))o||(m&&KS(P)&&(de(P)?P.value=m[E]:$c(P,m[E])),n.state.value[e][E]=P);else if(typeof P=="function"){const M=$(E,P);C[E]=M,a.actions[E]=P}}return Zs(y,C),Zs(Ot(y),C),Object.defineProperty(y,"$state",{get:()=>n.state.value[e],set:E=>{v(P=>{Zs(P,E)})}}),n._p.forEach(E=>{Zs(y,r.run(()=>E({store:y,app:n._a,pinia:n,options:a})))}),m&&o&&s.hydrate&&s.hydrate(y.$state,m),c=!0,d=!0,y}function Vd(e,t,s){let n,i;const o=typeof t=="function";typeof e=="string"?(n=e,i=o?s:t):(i=e,n=e.id);function r(a,l){const c=Pw();return a=a||(c?ys(Hm,null):null),a&&sl(a),a=jm,a._s.has(n)||(o?zm(n,t,i,a):YS(n,i,a)),a._s.get(n)}return r.$id=n,r}/*!
* vue-router v4.2.5
* (c) 2023 Eduardo San Martin Morote
* @license MIT
2024-08-04 01:31:31 -04:00
*/const wi=typeof window<"u";function qS(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Wt=Object.assign;function Hl(e,t){const s={};for(const n in t){const i=t[n];s[n]=ds(i)?i.map(e):e(i)}return s}const Mo=()=>{},ds=Array.isArray,GS=/\/$/,JS=e=>e.replace(GS,"");function Wl(e,t,s="/"){let n,i={},o="",r="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(n=t.slice(0,l),o=t.slice(l+1,a>-1?a:t.length),i=e(o)),a>-1&&(n=n||t.slice(0,a),r=t.slice(a,t.length)),n=tE(n??t,s),{fullPath:n+(o&&"?")+o+r,path:n,query:i,hash:r}}function XS(e,t){const s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function nf(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function QS(e,t,s){const n=t.matched.length-1,i=s.matched.length-1;return n>-1&&n===i&&Hi(t.matched[n],s.matched[i])&&Km(t.params,s.params)&&e(t.query)===e(s.query)&&t.hash===s.hash}function Hi(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Km(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(!ZS(e[s],t[s]))return!1;return!0}function ZS(e,t){return ds(e)?of(e,t):ds(t)?of(t,e):e===t}function of(e,t){return ds(t)?e.length===t.length&&e.every((s,n)=>s===t[n]):e.length===1&&e[0]===t}function tE(e,t){if(e.startsWith("/"))return e;if(!e)return t;const s=t.split("/"),n=e.split("/"),i=n[n.length-1];(i===".."||i===".")&&n.push("");let o=s.length-1,r,a;for(r=0;r<n.length;r++)if(a=n[r],a!==".")if(a==="..")o>1&&o--;else break;return s.slice(0,o).join("/")+"/"+n.slice(r-(r===n.length?1:0)).join("/")}var Uo;(function(e){e.pop="pop",e.push="push"})(Uo||(Uo={}));var Do;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Do||(Do={}));function eE(e){if(!e)if(wi){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),JS(e)}const sE=/^[^#]+#/;function nE(e,t){return e.replace(sE,"#")+t}function iE(e,t){const s=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-s.left-(t.left||0),top:n.top-s.top-(t.top||0)}}const nl=()=>({left:window.pageXOffset,top:window.pageYOffset});function oE(e){let t;if("el"in e){const s=e.el,n=typeof s=="string"&&s.startsWith("#"),i=typeof s=="string"?n?document.getElementById(s.slice(1)):document.querySelector(s):s;if(!i)return;t=iE(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 rf(e,t){return(history.state?history.state.position-t:-1)+e}const Pc=new Map;function rE(e,t){Pc.set(e,t)}function aE(e){const t=Pc.get(e);return Pc.delete(e),t}let lE=()=>location.protocol+"//"+location.host;function Um(e,t){const{pathname:s,search:n,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),nf(l,"")}return nf(s,e)+n+i}function cE(e,t,s,n){let i=[],o=[],r=null;const a=({state:p})=>{const g=Um(e,location),m=s.value,_=t.value;let v=0;if(p){if(s.value=g,t.value=p,r&&r===m){r=null;return}v=_?p.position-_.position:0}else n(g);i.forEach(w=>{w(s.value,m,{delta:v,type:Uo.pop,direction:v?v>0?Do.forward:Do.back:Do.unknown})})};function l(){r=s.value}function c(p){i.push(p);const g=()=>{const m=i.indexOf(p);m>-1&&i.splice(m,1)};return o.push(g),g}function d(){const{history:p}=window;p.state&&p.replaceState(Wt({},p.state,{scroll:nl()}),"")}function u(){for(const p of o)p();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",d,{passive:!0}),{pauseListeners:l,listen:c,destroy:u}}function af(e,t,s,n=!1,i=!1){return{back:e,current:t,forward:s,replaced:n,position:window.history.length,scroll:i?nl():null}}function dE(e){const{history:t,location:s}=window,n={value:Um(e,s)},i={value:t.state};i.value||o(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replace
2024-04-03 01:16:56 -04:00
(?:
2024-08-04 01:31:31 -04:00
(?:${ae}:){7}(?:${ae}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
(?:${ae}:){6}(?:${rs}|:${ae}|:)| // 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
(?:${ae}:){5}(?::${rs}|(?::${ae}){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
(?:${ae}:){4}(?:(?::${ae}){0,1}:${rs}|(?::${ae}){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
(?:${ae}:){3}(?:(?::${ae}){0,2}:${rs}|(?::${ae}){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
(?:${ae}:){2}(?:(?::${ae}){0,3}:${rs}|(?::${ae}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
(?:${ae}:){1}(?:(?::${ae}){0,4}:${rs}|(?::${ae}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
(?::(?:(?::${ae}){0,5}:${rs}|(?::${ae}){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-04 01:31:31 -04:00
`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),QE=new RegExp(`(?:^${rs}$)|(?:^${il}$)`),ZE=new RegExp(`^${rs}$`),tA=new RegExp(`^${il}$`),ol=e=>e&&e.exact?QE:new RegExp(`(?:${rn(e)}${rs}${rn(e)})|(?:${rn(e)}${il}${rn(e)})`,"g");ol.v4=e=>e&&e.exact?ZE:new RegExp(`${rn(e)}${rs}${rn(e)}`,"g");ol.v6=e=>e&&e.exact?tA:new RegExp(`${rn(e)}${il}${rn(e)}`,"g");const n_={exact:!1},i_=`${ol.v4().source}\\/(3[0-2]|[12]?[0-9])`,o_=`${ol.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,eA=new RegExp(`^${i_}$`),sA=new RegExp(`^${o_}$`),nA=({exact:e}=n_)=>e?eA:new RegExp(i_,"g"),iA=({exact:e}=n_)=>e?sA:new RegExp(o_,"g"),r_=nA({exact:!0}),a_=iA({exact:!0}),Wd=e=>r_.test(e)?4:a_.test(e)?6:0;Wd.v4=e=>r_.test(e);Wd.v6=e=>a_.test(e);const Ve=Vd("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",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 le("/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 Wd(e)!==0}}}),Et=(e,t)=>{const s=e.__vccOpts||e;for(const[n,i]of t)s[n]=i;return s},oA={name:"navbar",setup(){const e=Ve(),t=Kt();return{wireguardConfigurationsStore:e,dashboardConfigurationStore:t}}},rA={class:"col-md-3 col-lg-2 d-md-block p-3",style:{height:"calc(-50px + 100vh)"}},aA={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},lA={class:"sidebar-sticky pt-3"},cA={class:"nav flex-column"},dA={class:"nav-item"},uA={class:"nav-item"},hA=h("hr",null,null,-1),fA=h("h6",{class:"sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted"},[h("span",null,"Configurations")],-1),pA={class:"nav flex-column"},gA={class:"nav-item"},mA=h("hr",null,null,-1),_A=h("h6",{class:"sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted"},[h("span",null,"Tools")],-1),bA={class:"nav flex-column"},vA={class:"nav-item"},yA={class:"nav-item"},xA=h("hr",null,null,-1),wA={class:"nav flex-column"},SA={class:"nav-item"},EA=h("ul",{class:"nav flex-column"},[h("li",{class:"nav-item"},[h("a",{href:"https://github.com/donaldzou/WGDashboard/releases/tag/"},[h("small",{class:"nav-link text-muted"})])])],-1);function AA(e,t,s,n,i,o){const r=At("RouterLink");return L(),V("div",rA,[h("nav",aA,[h("div",lA,[h("ul",cA,[h("li",dA,[dt(r,{class:"nav-link",to:"/","ex
]))+`;Es.KANJI=new RegExp(Yo,"g");Es.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Es.BYTE=new RegExp(Sk,"g");Es.NUMERIC=new RegExp(v_,"g");Es.ALPHANUMERIC=new RegExp(wk,"g");const Ek=new RegExp("^"+Yo+"$"),Ak=new RegExp("^"+v_+"$"),Ck=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Es.testKanji=function(t){return Ek.test(t)};Es.testNumeric=function(t){return Ak.test(t)};Es.testAlphanumeric=function(t){return Ck.test(t)};(function(e){const t=Ud,s=Es;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 s.testNumeric(o)?e.NUMERIC:s.testAlphanumeric(o)?e.ALPHANUMERIC:s.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 n(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 n(o)}catch{return r}}})(Cn);(function(e){const t=je,s=al,n=rl,i=Cn,o=Ud,r=7973,a=t.getBCHDigit(r);function l(p,g,m){for(let _=1;_<=40;_++)if(g<=e.getCapacity(_,m,p))return _}function c(p,g){return i.getCharCountIndicator(p,g)+4}function d(p,g){let m=0;return p.forEach(function(_){const v=c(_.mode,g);m+=v+_.getBitsLength()}),m}function u(p,g){for(let m=1;m<=40;m++)if(d(p,m)<=e.getCapacity(m,g,i.MIXED))return m}e.from=function(g,m){return o.isValid(g)?parseInt(g,10):m},e.getCapacity=function(g,m,_){if(!o.isValid(g))throw new Error("Invalid QR Code version");typeof _>"u"&&(_=i.BYTE);const v=t.getSymbolTotalCodewords(g),w=s.getTotalCodewordsCount(g,m),S=(v-w)*8;if(_===i.MIXED)return S;const $=S-c(_,g);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(g,m){let _;const v=n.from(m,n.M);if(Array.isArray(g)){if(g.length>1)return u(g,v);if(g.length===0)return 1;_=g[0]}else _=g;return l(_.mode,_.getLength(),v)},e.getEncodedBits=function(g){if(!o.isValid(g)||g<7)throw new Error("Invalid QR Code version");let m=g<<12;for(;t.getBCHDigit(m)-a>=0;)m^=r<<t.getBCHDigit(m)-a;return g<<12|m}})(b_);var y_={};const Mc=je,x_=1335,$k=21522,Sf=Mc.getBCHDigit(x_);y_.getEncodedBits=function(t,s){const n=t.bit<<3|s;let i=n<<10;for(;Mc.getBCHDigit(i)-Sf>=0;)i^=x_<<Mc.getBCHDigit(i)-Sf;return(n<<10|i)^$k};var w_={};const Pk=Cn;function zi(e){this.mode=Pk.NUMERIC,this.data=e.toString()}zi.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};zi.prototype.getLength=function(){return this.data.length};zi.prototype.getBitsLength=function(){return zi.getBitsLength(this.data.length)};zi.prototype.write=function(t){let s,n,i;for(s=0;s+3<=this.data.length;s+=3)n=this.data.substr(s,3),i=parseInt(n,10),t.put(i,10);const o=this.data.length-s;o>0&&(n=this.data.substr(s),i=parseInt(n,10),t.put(i,o*3+1))};var kk=zi;const Tk=Cn,Kl=["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 Ki(e){this.mode=Tk.ALPHANUMERIC,this.data=e}Ki.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Ki.prototype.getLength=function(){return this.data.length};Ki.prototype.getBitsLength=function(){return Ki.getBitsLength(this.data.length)};Ki.prototype.write=function(t){let s;for(s=0;s+2<=this.data.length;s+=2){let n=Kl.indexOf(this.data[s])*45;n+=Kl.indexOf(this.data[s+1]),t.put(n,11)}this.data.length%2&&t.put(Kl.indexOf(this.data[s]),6)};var Mk
Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),e.put(s,13)}};var Fk=Yi,S_={exports:{}};(function(e){var t={single_source_shortest_paths:function(s,n,i){var o={},r={};r[n]=0;var a=t.PriorityQueue.make();a.push(n,0);for(var l,c,d,u,p,g,m,_,v;!a.empty();){l=a.pop(),c=l.value,u=l.cost,p=s[c]||{};for(d in p)p.hasOwnProperty(d)&&(g=p[d],m=u+g,_=r[d],v=typeof r[d]>"u",(v||_>m)&&(r[d]=m,a.push(d,m),o[d]=c))}if(typeof i<"u"&&typeof r[i]>"u"){var w=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(w)}return o},extract_shortest_path_from_predecessor_list:function(s,n){for(var i=[],o=n;o;)i.push(o),s[o],o=s[o];return i.reverse(),i},find_path:function(s,n,i){var o=t.single_source_shortest_paths(s,n,i);return t.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(s){var n=t.PriorityQueue,i={},o;s=s||{};for(o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);return i.queue=[],i.sorter=s.sorter||n.default_sorter,i},default_sorter:function(s,n){return s.cost-n.cost},push:function(s,n){var i={value:s,cost:n};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})(S_);var Bk=S_.exports;(function(e){const t=Cn,s=kk,n=Mk,i=Lk,o=Fk,r=Es,a=je,l=Bk;function c(w){return unescape(encodeURIComponent(w)).length}function d(w,S,$){const T=[];let y;for(;(y=w.exec($))!==null;)T.push({data:y[0],index:y.index,mode:S,length:y[0].length});return T}function u(w){const S=d(r.NUMERIC,t.NUMERIC,w),$=d(r.ALPHANUMERIC,t.ALPHANUMERIC,w);let T,y;return a.isKanjiModeEnabled()?(T=d(r.BYTE,t.BYTE,w),y=d(r.KANJI,t.KANJI,w)):(T=d(r.BYTE_KANJI,t.BYTE,w),y=[]),S.concat($,T,y).sort(function(C,E){return C.index-E.index}).map(function(C){return{data:C.data,mode:C.mode,length:C.length}})}function p(w,S){switch(S){case t.NUMERIC:return s.getBitsLength(w);case t.ALPHANUMERIC:return n.getBitsLength(w);case t.KANJI:return o.getBitsLength(w);case t.BYTE:return i.getBitsLength(w)}}function g(w){return w.reduce(function(S,$){const T=S.length-1>=0?S[S.length-1]:null;return T&&T.mode===$.mode?(S[S.length-1].data+=$.data,S):(S.push($),S)},[])}function m(w){const S=[];for(let $=0;$<w.length;$++){const T=w[$];switch(T.mode){case t.NUMERIC:S.push([T,{data:T.data,mode:t.ALPHANUMERIC,length:T.length},{data:T.data,mode:t.BYTE,length:T.length}]);break;case t.ALPHANUMERIC:S.push([T,{data:T.data,mode:t.BYTE,length:T.length}]);break;case t.KANJI:S.push([T,{data:T.data,mode:t.BYTE,length:c(T.data)}]);break;case t.BYTE:S.push([{data:T.data,mode:t.BYTE,length:c(T.data)}])}}return S}function _(w,S){const $={},T={start:{}};let y=["start"];for(let x=0;x<w.length;x++){const C=w[x],E=[];for(let P=0;P<C.length;P++){const M=C[P],O=""+x+P;E.push(O),$[O]={node:M,lastCount:0},T[O]={};for(let F=0;F<y.length;F++){const Q=y[F];$[Q]&&$[Q].node.mode===M.mode?(T[Q][O]=p($[Q].lastCount+M.length,M.mode)-p($[Q].lastCount,M.mode),$[Q].lastCount+=M.length):($[Q]&&($[Q].lastCount=M.length),T[Q][O]=p(M.length,M.mode)+4+t.getCharCountIndicator(M.mode,S))}}y=E}for(let x=0;x<y.length;x++)T[y[x]].end=0;return{map:T,table:$}}function v(w,S){let $;const T=t.getBestModeForData(w);if($=t.from(S,T),$!==t.BYTE&&$.bit<T.bit)throw new Error('"'+w+'" cannot be encoded with mode '+t.toString($)+`.
Suggested mode is: `+t.toString(T));switch($===t.KANJI&&!a.isKanjiModeEnabled()&&($=t.BYTE),$){case t.NUMERIC:return new s(w);case t.ALPHANUMERIC:return new n(w);case t.KANJI:return new o(w);case t.BYTE:return new i(w)}}e.fromArray=function(S){return S.reduce(function($,T){return typeof T=="string"?$.push(v(T,null)):T.data&&$.push(v(T.data,T.mode)),$},[])},e.fromString=function(S,$){const T=u(S,a.isKanjiModeEnabled()),y=m(T),x=_(y,$),C=l.find_path(x.map,"start","end"),E=[];for(let P=1;P<C.length-1;P++)E.push(x.table[C[P]].node);return e.fromArray(g(E))},e.rawSplit=function(S){return e.fromArray(u(S,a.isKanjiModeEnabled()))}})(w_);const cl=je,Ul=rl,Vk=bk,jk=vk,Hk=f_,Wk=p_,Dc=g_,Ic=al,zk=xk,Pa=b_,Kk=y_,Uk=Cn,Yl=w_;function Yk(e,t){const s=e.size,n=Wk.getPositions(t);for(let i=0;i<n.length;i++){const o=n[i][0],r=n[i][1];for(let a=-1;a<=7;a++)if(!(o+a<=-1||s<=o+a))for(let l=-1;l<=7;l++)r+l<=-1||s<=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 qk(e){const t=e.size;for(let s=8;s<t-8;s++){const n=s%2===0;e.set(s,6,n,!0),e.set(6,s,n,!0)}}function Gk(e,t){const s=Hk.getPositions(t);for(let n=0;n<s.length;n++){const i=s[n][0],o=s[n][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 Jk(e,t){const s=e.size,n=Pa.getEncodedBits(t);let i,o,r;for(let a=0;a<18;a++)i=Math.floor(a/3),o=a%3+s-8-3,r=(n>>a&1)===1,e.set(i,o,r,!0),e.set(o,i,r,!0)}function ql(e,t,s){const n=e.size,i=Kk.getEncodedBits(t,s);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(n-15+o,8,r,!0),o<8?e.set(8,n-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(n-8,8,1,!0)}function Xk(e,t){const s=e.size;let n=-1,i=s-1,o=7,r=0;for(let a=s-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+=n,i<0||s<=i){i-=n,n=-n;break}}}function Qk(e,t,s){const n=new Vk;s.forEach(function(l){n.put(l.mode.bit,4),n.put(l.getLength(),Uk.getCharCountIndicator(l.mode,e)),l.write(n)});const i=cl.getSymbolTotalCodewords(e),o=Ic.getTotalCodewordsCount(e,t),r=(i-o)*8;for(n.getLengthInBits()+4<=r&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const a=(r-n.getLengthInBits())/8;for(let l=0;l<a;l++)n.put(l%2?17:236,8);return Zk(n,e,t)}function Zk(e,t,s){const n=cl.getSymbolTotalCodewords(t),i=Ic.getTotalCodewordsCount(t,s),o=n-i,r=Ic.getBlocksCount(t,s),a=n%r,l=r-a,c=Math.floor(n/r),d=Math.floor(o/r),u=d+1,p=c-d,g=new zk(p);let m=0;const _=new Array(r),v=new Array(r);let w=0;const S=new Uint8Array(e.buffer);for(let C=0;C<r;C++){const E=C<l?d:u;_[C]=S.slice(m,m+E),v[C]=g.encode(_[C]),m+=E,w=Math.max(w,E)}const $=new Uint8Array(n);let T=0,y,x;for(y=0;y<w;y++)for(x=0;x<r;x++)y<_[x].length&&($[T++]=_[x][y]);for(y=0;y<p;y++)for(x=0;x<r;x++)$[T++]=v[x][y];return $}function tT(e,t,s,n){let i;if(Array.isArray(e))i=Yl.fromArray(e);else if(typeof e=="string"){let c=t;if(!c){const d=Yl.rawSplit(e);c=Pa.getBestVersionForData(d,s)}i=Yl.fromString(e,c||40)}else throw new Error("Invalid data");const o=Pa.getBestVersionForData(i,s);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-08-04 01:31:31 -04:00
`);const r=Qk(t,s,i),a=cl.getSymbolSize(t),l=new jk(a);return Yk(l,t),qk(l),Gk(l,t),ql(l,s,0),t>=7&&Jk(l,t),Xk(l,r),isNaN(n)&&(n=Dc.getBestMask(l,ql.bind(null,l,s))),Dc.applyMask(n,l),ql(l,s,n),{modules:l,version:t,errorCorrectionLevel:s,maskPattern:n,segments:i}}u_.create=function(t,s){if(typeof t>"u"||t==="")throw new Error("No input text");let n=Ul.M,i,o;return typeof s<"u"&&(n=Ul.from(s.errorCorrectionLevel,Ul.M),i=Pa.from(s.version),o=Dc.from(s.maskPattern),s.toSJISFunc&&cl.setToSJISFunction(s.toSJISFunc)),tT(t,i,n,o)};var E_={},Yd={};(function(e){function t(s){if(typeof s=="number"&&(s=s.toString()),typeof s!="string")throw new Error("Color should be defined as hex string");let n=s.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+s);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(o){return[o,o]}))),n.length===6&&n.push("F","F");const i=parseInt(n.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(n){n||(n={}),n.color||(n.color={});const i=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,o=n.width&&n.width>=21?n.width:void 0,r=n.scale||4;return{width:o,scale:o?4:r,margin:i,color:{dark:t(n.color.dark||"#000000ff"),light:t(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},e.getScale=function(n,i){return i.width&&i.width>=n+i.margin*2?i.width/(n+i.margin*2):i.scale},e.getImageWidth=function(n,i){const o=e.getScale(n,i);return Math.floor((n+i.margin*2)*o)},e.qrToImageData=function(n,i,o){const r=i.modules.size,a=i.modules.data,l=e.getScale(r,o),c=Math.floor((r+o.margin*2)*l),d=o.margin*l,u=[o.color.light,o.color.dark];for(let p=0;p<c;p++)for(let g=0;g<c;g++){let m=(p*c+g)*4,_=o.color.light;if(p>=d&&g>=d&&p<c-d&&g<c-d){const v=Math.floor((p-d)/l),w=Math.floor((g-d)/l);_=u[a[v*r+w]?1:0]}n[m++]=_.r,n[m++]=_.g,n[m++]=_.b,n[m]=_.a}}})(Yd);(function(e){const t=Yd;function s(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 n(){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=n()),l=t.getOptions(l);const d=t.getImageWidth(o.modules.size,l),u=c.getContext("2d"),p=u.createImageData(d,d);return t.qrToImageData(p.data,o,l),s(u,c,d),u.putImageData(p,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),d=l.type||"image/png",u=l.rendererOpts||{};return c.toDataURL(d,u.quality)}})(E_);var A_={};const eT=Yd;function Ef(e,t){const s=e.a/255,n=t+'="'+e.hex+'"';return s<1?n+" "+t+'-opacity="'+s.toFixed(2).slice(1)+'"':n}function Gl(e,t,s){let n=e+t;return typeof s<"u"&&(n+=" "+s),n}function sT(e,t,s){let n="",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]||(n+=o?Gl("M",l+s,.5+c+s):Gl("m",i,0),i=0,o=!1),l+1<t&&e[a+1]||(n+=Gl("h",r),r=0)):i++}return n}A_.render=function(t,s,n){const i=eT.getOptions(s),o=t.modules.size,r=t.modules.data,a=o+i.margin*2,l=i.color.light.a?"<path "+Ef(i.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+Ef(i.color.dark,"stroke")+' d="'+sT(r,o,i.margin)+'"/>',d='viewBox="0 0 '+a+" "+a+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+d+' shape-rendering="crispEdges">'+l+c+`</svg>
`;return typeof n=="function"&&n(null,p),p};const nT=mk,Oc=u_,C_=E_,iT=A_;function qd(e,t,s,n,i){const o=[].slice.call(arguments,1),r=o.length,a=typeof o[r-1]=="function";if(!a&&!nT())throw new Error("Callback required as last argument");if(a){if(r<2)throw new Error("Too few arguments provided");r===2?(i=s,s=t,t=n=void 0):r===3&&(t.getContext&&typeof i>"u"?(i=n,n=void 0):(i=n,n=s,s=t,t=void 0))}else{if(r<1)throw new Error("Too few arguments provided");return r===1?(s=t,t=n=void 0):r===2&&!t.getContext&&(n=s,s=t,t=void 0),new Promise(function(l,c){try{const d=Oc.create(s,n);l(e(d,t,n))}catch(d){c(d)}})}try{const l=Oc.create(s,n);i(null,e(l,t,n))}catch(l){i(l)}}to.create=Oc.create;to.toCanvas=qd.bind(null,C_.render);to.toDataURL=qd.bind(null,C_.renderToDataURL);to.toString=qd.bind(null,function(e,t,s){return iT.render(e,s)});const oT={name:"totp",async setup(){let e="";return await le("/api/Welcome_GetTotpLink",{},t=>{t.status&&(e=t.data)}),{l:e}},mounted(){this.l&&to.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)?Zt("/api/Welcome_VerifyTotpLink",{totp:e},s=>{s.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"))}}},rT={class:"mb-3"},aT=h("p",{class:"mb-2"},[h("small",{class:"text-muted"},"1. Please scan the following QR Code to generate TOTP")],-1),lT=h("canvas",{id:"qrcode",class:"rounded-3 mb-2"},null,-1),cT={class:"p-3 bg-body-secondary rounded-3 border mb-3"},dT=h("p",{class:"text-muted mb-0"},[h("small",null,"Or you can click the link below:")],-1),uT=["href"],hT={style:{"line-break":"anywhere"}},fT=h("label",{for:"totp",class:"mb-2"},[h("small",{class:"text-muted"},"2. Enter the TOTP generated by your authenticator to verify")],-1),pT={class:"form-group"},gT=["disabled"],mT={class:"invalid-feedback"},_T=h("div",{class:"valid-feedback"}," TOTP verified! ",-1);function bT(e,t,s,n,i,o){return L(),V("div",rT,[aT,lT,h("div",cT,[dT,h("a",{href:this.l},[h("code",hT,nt(this.l),1)],8,uT)]),fT,h("div",pT,[ft(h("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,gT),[[bt,this.totp]]),h("div",mT,nt(this.totpInvalidMessage),1),_T])])}const vT=Et(oT,[["render",bT]]),yT={name:"setup",components:{Totp:vT},setup(){return{store:Kt()}},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,Zt("/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})}}},xT=["data-bs-theme"],wT={class:"mx-auto text-body",style:{width:"500px"}},ST=h("span",{class:"dashboardLogo display-4"},"Nice to meet you!",-1),ET=h("p",{class:"mb-5"},"Please fill in the following fields to finish setup 😊",-1),AT=h("h3",null,"Create an account",-1),CT={key:0,class:"alert alert-danger"},$T={class:"d-flex flex-column gap-3"},PT={id:"createAccount",class:"d-flex flex-column gap-2"},kT={class:"form-group text-body"},TT=h("label",{for:"username",class:"mb-1 text-muted"},[h("small",null,"Pick an username you like")],-1),MT={class:
*
* Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
2024-08-04 01:31:31 -04:00
*/(function(){function e(y){var x=new Float64Array(16);if(y)for(var C=0;C<y.length;++C)x[C]=y[C];return x}function t(y,x){for(var C,E=e(),P=e(),M=0;M<16;++M)P[M]=x[M];s(P),s(P),s(P);for(var O=0;O<2;++O){E[0]=P[0]-65517;for(var M=1;M<15;++M)E[M]=P[M]-65535-(E[M-1]>>16&1),E[M-1]&=65535;E[15]=P[15]-32767-(E[14]>>16&1),C=E[15]>>16&1,E[14]&=65535,n(P,E,1-C)}for(var M=0;M<16;++M)y[2*M]=P[M]&255,y[2*M+1]=P[M]>>8}function s(y){for(var x=0;x<16;++x)y[(x+1)%16]+=(x<15?1:38)*Math.floor(y[x]/65536),y[x]&=65535}function n(y,x,C){for(var E,P=~(C-1),M=0;M<16;++M)E=P&(y[M]^x[M]),y[M]^=E,x[M]^=E}function i(y,x,C){for(var E=0;E<16;++E)y[E]=x[E]+C[E]|0}function o(y,x,C){for(var E=0;E<16;++E)y[E]=x[E]-C[E]|0}function r(y,x,C){for(var E=new Float64Array(31),P=0;P<16;++P)for(var M=0;M<16;++M)E[P+M]+=x[P]*C[M];for(var P=0;P<15;++P)E[P]+=38*E[P+16];for(var P=0;P<16;++P)y[P]=E[P];s(y),s(y)}function a(y,x){for(var C=e(),E=0;E<16;++E)C[E]=x[E];for(var E=253;E>=0;--E)r(C,C,C),E!==2&&E!==4&&r(C,C,x);for(var E=0;E<16;++E)y[E]=C[E]}function l(y){y[31]=y[31]&127|64,y[0]&=248}function c(y){for(var x,C=new Uint8Array(32),E=e([1]),P=e([9]),M=e(),O=e([1]),F=e(),Q=e(),G=e([56129,1]),H=e([9]),R=0;R<32;++R)C[R]=y[R];l(C);for(var R=254;R>=0;--R)x=C[R>>>3]>>>(R&7)&1,n(E,P,x),n(M,O,x),i(F,E,M),o(E,E,M),i(M,P,O),o(P,P,O),r(O,F,F),r(Q,E,E),r(E,M,E),r(M,P,F),i(F,E,M),o(E,E,M),r(P,E,E),o(M,O,Q),r(E,M,G),i(E,E,O),r(M,M,E),r(E,O,Q),r(O,P,H),r(P,F,F),n(E,P,x),n(M,O,x);return a(M,M),r(E,E,M),t(C,E),C}function d(){var y=new Uint8Array(32);return window.crypto.getRandomValues(y),y}function u(){var y=d();return l(y),y}function p(y,x){for(var C=Uint8Array.from([x[0]>>2&63,(x[0]<<4|x[1]>>4)&63,(x[1]<<2|x[2]>>6)&63,x[2]&63]),E=0;E<4;++E)y[E]=C[E]+65+(25-C[E]>>8&6)-(51-C[E]>>8&75)-(61-C[E]>>8&15)+(62-C[E]>>8&3)}function g(y){var x,C=new Uint8Array(44);for(x=0;x<32/3;++x)p(C.subarray(x*4),y.subarray(x*3));return p(C.subarray(x*4),Uint8Array.from([y[x*3+0],y[x*3+1],0])),C[43]=61,String.fromCharCode.apply(null,C)}function m(y){let x=window.atob(y),C=x.length,E=new Uint8Array(C);for(let M=0;M<C;M++)E[M]=x.charCodeAt(M);return new Uint8Array(E.buffer)}function _(y,x){y.push(x&255,x>>>8&255,x>>>16&255,x>>>24&255)}function v(y,x){y.push(x&255,x>>>8&255)}function w(y,x){for(var C=0;C<x.length;++C)y.push(x[C]&255)}function S(y){for(var x=unescape(encodeURIComponent(y)),C=new Uint8Array(x.length),E=0;E<x.length;++E)C[E]=x.charCodeAt(E);return C}function $(y){if(!$.table){$.table=[];for(var x=0,C=0;C<256;x=++C){for(var E=0;E<8;++E)x=x&1?3988292384^x>>>1:x>>>1;$.table[C]=x}}for(var P=-1,M=0;M<y.length;++M)P=P>>>8^$.table[(P^y[M])&255];return(P^-1)>>>0}function T(y){for(var x=[],C=[],E=0,P=0;P<y.length;++P){var M=S(y[P].fileName),O=S(y[P].file),F=$(O);_(x,67324752),v(x,20),v(x,0),v(x,0),v(x,0),v(x,0),_(x,F),_(x,O.length),_(x,O.length),v(x,M.length),v(x,0),w(x,M),w(x,O),_(C,33639248),v(C,0),v(C,20),v(C,0),v(C,0),v(C,0),v(C,0),_(C,F),_(C,O.length),_(C,O.length),v(C,M.length),v(C,0),v(C,0),v(C,0),v(C,0),_(C,32),_(C,E),w(C,M),E+=30+O.length+M.length}return w(x,C),_(x,101010256),v(x,0),v(x,0),v(x,y.length),v(x,y.length),_(x,C.length),_(x,E),v(x,0),Uint8Array.from(x)}window.wireguard={generateKeypair:function(){var y=u(),x=c(y),C=d();return{publicKey:g(x),privateKey:g(y),presharedKey:g(C)}},generatePublicKey:function(y){return y=m(y),g(c(y))},generateZipFiles:function(y,x){var C=y.data,E=T(C),P=new Blob([E],{type:"application/zip"}),M=document.createElement("a");M.download=x,M.href=URL.createObjectURL(P),M.style.display="none",document.body.appendChild(M),M.click(),document.body.removeChild(M)}}})();const GT={name:"newConfiguration",setup(){return{store:Ve()}},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=e.p
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
2024-08-04 01:31:31 -04:00
*/function cr(e){return e+.5|0}const ln=(e,t,s)=>Math.max(Math.min(e,s),t);function vo(e){return ln(cr(e*2.55),0,255)}function gn(e){return ln(cr(e*255),0,255)}function Os(e){return ln(cr(e/2.55)/100,0,1)}function $f(e){return ln(cr(e*100),0,100)}const Ye={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},Lc=[..."0123456789ABCDEF"],EI=e=>Lc[e&15],AI=e=>Lc[(e&240)>>4]+Lc[e&15],Br=e=>(e&240)>>4===(e&15),CI=e=>Br(e.r)&&Br(e.g)&&Br(e.b)&&Br(e.a);function $I(e){var t=e.length,s;return e[0]==="#"&&(t===4||t===5?s={r:255&Ye[e[1]]*17,g:255&Ye[e[2]]*17,b:255&Ye[e[3]]*17,a:t===5?Ye[e[4]]*17:255}:(t===7||t===9)&&(s={r:Ye[e[1]]<<4|Ye[e[2]],g:Ye[e[3]]<<4|Ye[e[4]],b:Ye[e[5]]<<4|Ye[e[6]],a:t===9?Ye[e[7]]<<4|Ye[e[8]]:255})),s}const PI=(e,t)=>e<255?t(e):"";function kI(e){var t=CI(e)?EI:AI;return e?"#"+t(e.r)+t(e.g)+t(e.b)+PI(e.a,t):void 0}const TI=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function T_(e,t,s){const n=t*Math.min(s,1-s),i=(o,r=(o+e/30)%12)=>s-n*Math.max(Math.min(r-3,9-r,1),-1);return[i(0),i(8),i(4)]}function MI(e,t,s){const n=(i,o=(i+e/60)%6)=>s-s*t*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function DI(e,t,s){const n=T_(e,1,.5);let i;for(t+s>1&&(i=1/(t+s),t*=i,s*=i),i=0;i<3;i++)n[i]*=1-t-s,n[i]+=t;return n}function II(e,t,s,n,i){return e===i?(t-s)/n+(t<s?6:0):t===i?(s-e)/n+2:(e-t)/n+4}function Jd(e){const s=e.r/255,n=e.g/255,i=e.b/255,o=Math.max(s,n,i),r=Math.min(s,n,i),a=(o+r)/2;let l,c,d;return o!==r&&(d=o-r,c=a>.5?d/(2-o-r):d/(o+r),l=II(s,n,i,d,o),l=l*60+.5),[l|0,c||0,a]}function Xd(e,t,s,n){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,s,n)).map(gn)}function Qd(e,t,s){return Xd(T_,e,t,s)}function OI(e,t,s){return Xd(DI,e,t,s)}function LI(e,t,s){return Xd(MI,e,t,s)}function M_(e){return(e%360+360)%360}function RI(e){const t=TI.exec(e);let s=255,n;if(!t)return;t[5]!==n&&(s=t[6]?vo(+t[5]):gn(+t[5]));const i=M_(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?n=OI(i,o,r):t[1]==="hsv"?n=LI(i,o,r):n=Qd(i,o,r),{r:n[0],g:n[1],b:n[2],a:s}}function NI(e,t){var s=Jd(e);s[0]=M_(s[0]+t),s=Qd(s),e.r=s[0],e.g=s[1],e.b=s[2]}function FI(e){if(!e)return;const t=Jd(e),s=t[0],n=$f(t[1]),i=$f(t[2]);return e.a<255?`hsla(${s}, ${n}%, ${i}%, ${Os(e.a)})`:`hsl(${s}, ${n}%, ${i}%)`}const Pf={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"},kf={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-04 01:31:31 -04:00
*/function ks(){}const UI=(()=>{let e=0;return()=>e++})();function jt(e){return e===null||typeof e>"u"}function Jt(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 Ft(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function te(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Ie(e,t){return te(e)?e:t}function $t(e,t){return typeof e>"u"?t:e}const YI=(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 Yt(e,t,s){if(e&&typeof e.call=="function")return e.apply(s,t)}function zt(e,t,s,n){let i,o,r;if(Jt(e))if(o=e.length,n)for(i=o-1;i>=0;i--)t.call(s,e[i],i);else for(i=0;i<o;i++)t.call(s,e[i],i);else if(Ft(e))for(r=Object.keys(e),o=r.length,i=0;i<o;i++)t.call(s,e[r[i]],r[i])}function ka(e,t){let s,n,i,o;if(!e||!t||e.length!==t.length)return!1;for(s=0,n=e.length;s<n;++s)if(i=e[s],o=t[s],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function Ta(e){if(Jt(e))return e.map(Ta);if(Ft(e)){const t=Object.create(null),s=Object.keys(e),n=s.length;let i=0;for(;i<n;++i)t[s[i]]=Ta(e[s[i]]);return t}return e}function O_(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function qI(e,t,s,n){if(!O_(e))return;const i=t[e],o=s[e];Ft(i)&&Ft(o)?Go(i,o,n):t[e]=Ta(o)}function Go(e,t,s){const n=Jt(t)?t:[t],i=n.length;if(!Ft(e))return e;s=s||{};const o=s.merger||qI;let r;for(let a=0;a<i;++a){if(r=n[a],!Ft(r))continue;const l=Object.keys(r);for(let c=0,d=l.length;c<d;++c)o(l[c],e,r,s)}return e}function Oo(e,t){return Go(e,t,{merger:GI})}function GI(e,t,s){if(!O_(e))return;const n=t[e],i=s[e];Ft(n)&&Ft(i)?Oo(n,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Ta(i))}const Mf={"":e=>e,x:e=>e.x,y:e=>e.y};function JI(e){const t=e.split("."),s=[];let n="";for(const i of t)n+=i,n.endsWith("\\")?n=n.slice(0,-1)+".":(s.push(n),n="");return s}function XI(e){const t=JI(e);return s=>{for(const n of t){if(n==="")break;s=s&&s[n]}return s}}function vn(e,t){return(Mf[t]||(Mf[t]=XI(t)))(e)}function Zd(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Jo=e=>typeof e<"u",yn=e=>typeof e=="function",Df=(e,t)=>{if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;return!0};function QI(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Qt=Math.PI,Xt=2*Qt,ZI=Xt+Qt,Ma=Number.POSITIVE_INFINITY,tO=Qt/180,ne=Qt/2,Vn=Qt/4,If=Qt*2/3,cn=Math.log10,xs=Math.sign;function Lo(e,t,s){return Math.abs(e-t)<s}function Of(e){const t=Math.round(e);e=Lo(e,t,e/1e3)?t:e;const s=Math.pow(10,Math.floor(cn(e))),n=e/s;return(n<=1?1:n<=2?2:n<=5?5:10)*s}function eO(e){const t=[],s=Math.sqrt(e);let n;for(n=1;n<s;n++)e%n===0&&(t.push(n),t.push(e/n));return s===(s|0)&&t.push(s),t.sort((i,o)=>i-o).pop(),t}function qi(e){return!isNaN(parseFloat(e))&&isFinite(e)}function sO(e,t){const s=Math.round(e);return s-t<=e&&s+t>=e}function L_(e,t,s){let n,i,o;for(n=0,i=e.length;n<i;n++)o=e[n][s],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function ls(e){return e*(Qt/180)}function tu(e){return e*(180/Qt)}function Lf(e){if(!te(e))return;let t=1,s=0;for(;Math.round(e*t)/t!==e;)t*=10,s++;return s}function R_(e,t){const s=t.x-e.x,n=t.y-e.y,i=Math.sqrt(s*s+n*n);let o=Math.atan2(n,s);return o<-.5*Qt&&(o+=Xt),{angle:o,distance:i}}function Rc(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function nO(e,t){return(e-t+ZI)%Xt-Qt}function Le(e){return(e%Xt+Xt)%Xt}function Xo(e,t,s,n){const i=Le(e),o=Le(t),r=Le(s),a=Le(o-i),l=Le(r-i),c=Le(i-o),d=Le(i-r);return i===o||i===r||n&&o===r||a>l&&c<d}function fe(e,t,s){return Math.max(t,Math.min(s,e))}function iO(e){return fe(e,-32768,32767)}function Rs(e,t,s,n=1e-6){return e>=Math.min(t,s)-n&&e<=Math.max(t,s)+n}function eu(e,t,s){s=s||(r=>e[r]<t);let n=e.length-1,i=0,o;for(;n-i>1;)o=i+n>>1,s(o)?i=o:n=o;return{lo:i,hi:n}}const Ns=(e,t,s,n)=>eu(e,s,n?i=>{const o=e[i][t];return o<s||o===s&&e[i+1][t]===s}:i=>e[i][t]<s),oO=(e,t,s)=>eu
* Chart.js v4.4.1
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
2024-08-04 01:31:31 -04:00
*/class c2{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,s,n,i){const o=s.listeners[i],r=s.duration;o.forEach(a=>a({chart:t,initial:s.initial,numSteps:r,currentStep:Math.min(n-s.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=B_.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let s=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;const o=n.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,n,t,"progress")),o.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),s+=o.length}),this._lastDate=t,s===0&&(this._running=!1)}_getAnims(t){const s=this._charts;let n=s.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},s.set(t,n)),n}listen(t,s,n){this._getAnims(t).listeners[s].push(n)}add(t,s){!s||!s.length||this._getAnims(t).items.push(...s)}has(t){return this._getAnims(t).items.length>0}start(t){const s=this._charts.get(t);s&&(s.running=!0,s.start=Date.now(),s.duration=s.items.reduce((n,i)=>Math.max(n,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const s=this._charts.get(t);return!(!s||!s.running||!s.items.length)}stop(t){const s=this._charts.get(t);if(!s||!s.items.length)return;const n=s.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();s.items=[],this._notify(t,s,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Ms=new c2;const Gf="transparent",d2={boolean(e,t,s){return s>.5?t:e},color(e,t,s){const n=Bf(e||Gf),i=n.valid&&Bf(t||Gf);return i&&i.valid?i.mix(n,s).hexString():t},number(e,t,s){return e+(t-e)*s}};class u2{constructor(t,s,n,i){const o=s[n];i=yo([t.to,i,o,t.from]);const r=yo([t.from,o,i]);this._active=!0,this._fn=t.fn||d2[t.type||typeof r],this._easing=Ro[t.easing]||Ro.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=s,this._prop=n,this._from=r,this._to=i,this._promises=void 0}active(){return this._active}update(t,s,n){if(this._active){this._notify(!1);const i=this._target[this._prop],o=n-this._start,r=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=yo([t.to,s,i,t.from]),this._from=yo([t.from,i,s])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const s=t-this._start,n=this._duration,i=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||s<n),!this._active){this._target[i]=a,this._notify(!0);return}if(s<0){this._target[i]=o;return}l=s/n%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((s,n)=>{t.push({res:s,rej:n})})}_notify(t){const s=t?"res":"rej",n=this._promises||[];for(let i=0;i<n.length;i++)n[i][s]()}}class nb{constructor(t,s){this._chart=t,this._properties=new Map,this.configure(s)}configure(t){if(!Ft(t))return;const s=Object.keys(ee.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!Ft(o))return;const r={};for(const a of s)r[a]=o[a];(Jt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!n.has(a))&&n.set(a,r)})})}_animateOptions(t,s){const n=s.options,i=f2(t,n);if(!i)return[];const o=this._createAnimations(i,n);return n.$shared&&h2(t.options.$animations,n).then(()=>{t.options=n},()=>{}),o}_createAnimations(t,s){const n=this._properties,i=[],o=t.$animations||(t.$animations={}),r=Object.keys(s),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,s));continue}const d=s[c];let u=o[c];const p=n.get(c);if(u)if(p&&u.active()){u.update(p,d,a);continue}else u.cancel();if(!p||!p.duration){t[c]=d;continue}o[c]=u=new u2(p,t,c,d),i.push(u)}return i}update(t,s){if(this._properties.size
`)>-1?e.split(`
2024-08-04 01:31:31 -04:00
`):e}function jR(e,t){const{element:s,datasetIndex:n,index:i}=t,o=e.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(i);return{chart:e,label:r,parsed:o.getParsed(i),raw:e.data.datasets[n].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:n,element:s}}function Ip(e,t){const s=e.chart.ctx,{body:n,footer:i,title:o}=e,{boxWidth:r,boxHeight:a}=t,l=ce(t.bodyFont),c=ce(t.titleFont),d=ce(t.footerFont),u=o.length,p=i.length,g=n.length,m=be(t.padding);let _=m.height,v=0,w=n.reduce((T,y)=>T+y.before.length+y.lines.length+y.after.length,0);if(w+=e.beforeBody.length+e.afterBody.length,u&&(_+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),w){const T=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;_+=g*T+(w-g)*l.lineHeight+(w-1)*t.bodySpacing}p&&(_+=t.footerMarginTop+p*d.lineHeight+(p-1)*t.footerSpacing);let S=0;const $=function(T){v=Math.max(v,s.measureText(T).width+S)};return s.save(),s.font=c.string,zt(e.title,$),s.font=l.string,zt(e.beforeBody.concat(e.afterBody),$),S=t.displayColors?r+2+t.boxPadding:0,zt(n,T=>{zt(T.before,$),zt(T.lines,$),zt(T.after,$)}),S=0,s.font=d.string,zt(e.footer,$),s.restore(),v+=m.width,{width:v,height:_}}function HR(e,t){const{y:s,height:n}=t;return s<n/2?"top":s>e.height-n/2?"bottom":"center"}function WR(e,t,s,n){const{x:i,width:o}=n,r=s.caretSize+s.caretPadding;if(e==="left"&&i+o+r>t.width||e==="right"&&i-o-r<0)return!0}function zR(e,t,s,n){const{x:i,width:o}=s,{width:r,chartArea:{left:a,right:l}}=e;let c="center";return n==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=r-o/2&&(c="right"),WR(c,e,t,s)&&(c="center"),c}function Op(e,t,s){const n=s.yAlign||t.yAlign||HR(e,s);return{xAlign:s.xAlign||t.xAlign||zR(e,t,s,n),yAlign:n}}function KR(e,t){let{x:s,width:n}=e;return t==="right"?s-=n:t==="center"&&(s-=n/2),s}function UR(e,t,s){let{y:n,height:i}=e;return t==="top"?n+=s:t==="bottom"?n-=i+s:n-=i/2,n}function Lp(e,t,s,n){const{caretSize:i,caretPadding:o,cornerRadius:r}=e,{xAlign:a,yAlign:l}=s,c=i+o,{topLeft:d,topRight:u,bottomLeft:p,bottomRight:g}=Zn(r);let m=KR(t,a);const _=UR(t,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(d,p)+i:a==="right"&&(m+=Math.max(u,g)+i),{x:fe(m,0,n.width-t.width),y:fe(_,0,n.height-t.height)}}function Jr(e,t,s){const n=be(s.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-n.right:e.x+n.left}function Rp(e){return fs([],Ds(e))}function YR(e,t,s){return $n(e,{tooltip:t,tooltipItems:s,type:"tooltip"})}function Np(e,t){const s=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return s?e.override(s):e}const Sb={beforeTitle:ks,title(e){if(e.length>0){const t=e[0],s=t.chart.data.labels,n=s?s.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return s[t.dataIndex]}return""},afterTitle:ks,beforeBody:ks,beforeLabel:ks,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 s=e.formattedValue;return jt(s)||(t+=s),t},labelColor(e){const s=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:s.borderColor,backgroundColor:s.backgroundColor,borderWidth:s.borderWidth,borderDash:s.borderDash,borderDashOffset:s.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const s=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:s.pointStyle,rotation:s.rotation}},afterLabel:ks,afterBody:ks,beforeFooter:ks,footer:ks,afterFooter:ks};function Pe(e,t,s,n){const i=e[t].call(s,n);return typeof i>"u"?Sb[t].call(s,n):i}class zc extends zs{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
${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){le("/api/getWireguardConfigurationInfo",{configurationName:e},t=>{if(this.configurationInfo=t.data.configurationInfo,this.configurationPeers=t.data.configurationPeers,this.configurationPeers.forEach(s=>{s.restricted=!1}),t.data.configurationRestrictedPeers.forEach(s=>{s.restricted=!0,this.configurationPeers.push(s)}),this.loading=!1,this.configurationPeers.length>0){const s=this.configurationPeers.map(i=>i.total_sent+i.cumu_sent).reduce((i,o)=>i+o).toFixed(4),n=this.configurationPeers.map(i=>i.total_receive+i.cumu_receive).reduce((i,o)=>i+o).toFixed(4);this.historyDataSentDifference[this.historyDataSentDifference.length-1]!==s&&(this.historyDataSentDifference.length>0&&(this.historySentData={labels:[...this.historySentData.labels,ki().format("HH:mm:ss A")],datasets:[{label:"Data Sent",data:[...this.historySentData.datasets[0].data,((s-this.historyDataSentDifference[this.historyDataSentDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:" #198754",tension:0}]}),this.historyDataSentDifference.push(s)),this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1]!==n&&(this.historyDataReceivedDifference.length>0&&(this.historyReceiveData={labels:[...this.historyReceiveData.labels,ki().format("HH:mm:ss A")],datasets:[{label:"Data Received",data:[...this.historyReceiveData.datasets[0].data,((n-this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#0d6efd",tension:0}]}),this.historyDataReceivedDifference.push(n))}})},setPeerInterval(){this.dashboardConfigurationStore.Peers.RefreshInterval=setInterval(()=>{this.getPeers()},parseInt(this.dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval)),console.log(this.dashboardConfigurationStore.Peers.RefreshInterval)}},computed:{configurationSummary(){return{connectedPeers:this.configurationPeers.filter(e=>e.status==="running").length,totalUsage:this.configurationPeers.length>0?this.configurationPeers.map(e=>e.total_data+e.cumu_data).reduce((e,t)=>e+t):0,totalReceive:this.configurationPeers.length>0?this.configurationPeers.map(e=>e.total_receive+e.cumu_receive).reduce((e,t)=>e+t):0,totalSent:this.configurationPeers.length>0?this.configurationPeers.map(e=>e.total_sent+e.cumu_sent).reduce((e,t)=>e+t):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 eo(this.configurationPeers,{keys:["name","id","allowed_ip"]}),t=this.wireguardConfigurationStore.searchString?e.search(this.wireguardConfigurationStore.searchString).map(s=>s.item):this.configurationPeers;return this.dashboardConfigurationStore.Configuration.Server.dashboard_sort==="restricted"?t.slice().sort((s,n)=>s[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]<n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:s[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]>n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:0):t.slice().sort((s,n)=>s[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]<n[this.dashboard